1 /* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
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.
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.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 #include <linux/kernel.h>
19 #include <linux/irq.h>
20 #include <linux/gpio.h>
21 #include <linux/platform_device.h>
22 #include <linux/delay.h>
23 #include <linux/bootmem.h>
25 #include <linux/smsc911x.h>
27 #include <asm/mach-types.h>
28 #include <asm/mach/arch.h>
29 #include <asm/setup.h>
31 #include <mach/gpio.h>
32 #include <mach/board.h>
33 #include <mach/memory.h>
34 #include <mach/msm_iomap.h>
37 #include <mach/vreg.h>
39 #include "proc_comm.h"
41 extern struct sys_timer msm_timer;
43 #ifdef CONFIG_SERIAL_MSM_CONSOLE
44 static struct msm_gpio uart2_config_data[] = {
45 { GPIO_CFG(49, 2, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_RFR"},
46 { GPIO_CFG(50, 2, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_CTS"},
47 { GPIO_CFG(51, 2, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_Rx"},
48 { GPIO_CFG(52, 2, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"},
51 static void msm7x30_init_uart2(void)
53 msm_gpios_request_enable(uart2_config_data,
54 ARRAY_SIZE(uart2_config_data));
59 static struct platform_device *devices[] __initdata = {
60 #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
66 static void __init msm7x30_init_irq(void)
71 static void __init msm7x30_init(void)
73 platform_add_devices(devices, ARRAY_SIZE(devices));
74 #ifdef CONFIG_SERIAL_MSM_CONSOLE
80 static void __init msm7x30_map_io(void)
83 msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
86 MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
87 #ifdef CONFIG_MSM_DEBUG_UART
88 .phys_io = MSM_DEBUG_UART_PHYS,
89 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
91 .boot_params = PHYS_OFFSET + 0x100,
92 .map_io = msm7x30_map_io,
93 .init_irq = msm7x30_init_irq,
94 .init_machine = msm7x30_init,
98 MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
99 #ifdef CONFIG_MSM_DEBUG_UART
100 .phys_io = MSM_DEBUG_UART_PHYS,
101 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
103 .boot_params = PHYS_OFFSET + 0x100,
104 .map_io = msm7x30_map_io,
105 .init_irq = msm7x30_init_irq,
106 .init_machine = msm7x30_init,
110 MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
111 #ifdef CONFIG_MSM_DEBUG_UART
112 .phys_io = MSM_DEBUG_UART_PHYS,
113 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
115 .boot_params = PHYS_OFFSET + 0x100,
116 .map_io = msm7x30_map_io,
117 .init_irq = msm7x30_init_irq,
118 .init_machine = msm7x30_init,