Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/platform_device.h> |
| 15 | #include <asm/mach-types.h> |
| 16 | #include <asm/mach/arch.h> |
| 17 | #include <mach/board.h> |
| 18 | #include <mach/msm_iomap.h> |
| 19 | #include <mach/gpio.h> |
| 20 | #include <mach/gpiomux.h> |
| 21 | #include "timer.h" |
| 22 | #include "devices.h" |
| 23 | |
| 24 | static int __init gpiomux_init(void) |
| 25 | { |
| 26 | int rc; |
| 27 | |
| 28 | rc = msm_gpiomux_init(NR_GPIO_IRQS); |
| 29 | if (rc) { |
| 30 | pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); |
| 31 | return rc; |
| 32 | } |
| 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | static void __init msm9615_common_init(void) |
| 37 | { |
| 38 | msm9615_device_init(); |
| 39 | gpiomux_init(); |
| 40 | } |
| 41 | |
| 42 | static void __init msm9615_cdp_init(void) |
| 43 | { |
| 44 | msm9615_common_init(); |
| 45 | } |
| 46 | |
| 47 | static void __init msm9615_mtp_init(void) |
| 48 | { |
| 49 | msm9615_common_init(); |
| 50 | } |
| 51 | |
| 52 | MACHINE_START(MSM9615_CDP, "QCT MSM9615 CDP") |
| 53 | .map_io = msm9615_map_io, |
| 54 | .init_irq = msm9615_init_irq, |
| 55 | .timer = &msm_timer, |
| 56 | .init_machine = msm9615_cdp_init, |
| 57 | MACHINE_END |
| 58 | |
| 59 | MACHINE_START(MSM9615_MTP, "QCT MSM9615 MTP") |
| 60 | .map_io = msm9615_map_io, |
| 61 | .init_irq = msm9615_init_irq, |
| 62 | .timer = &msm_timer, |
| 63 | .init_machine = msm9615_mtp_init, |
| 64 | MACHINE_END |