aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@codeaurora.org>2010-05-05 10:17:31 -0400
committerDaniel Walker <dwalker@codeaurora.org>2010-05-13 19:08:30 -0400
commitd1c0d43d40a625345634d2b08325fb9e8be41534 (patch)
treee95f8fe8799ffc53ad5bf65be575c5bfe8c31481 /arch/arm/mach-msm
parenteb61bf85595f7ebb789ca71e590773ff3aa0c10f (diff)
msm: update basic board layout for QSD8x50
Signed-off-by: Daniel Walker <dwalker@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Gregory Bean <gbean@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c120
1 files changed, 19 insertions, 101 deletions
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index a5e862c6ef7b..ec4606643d2c 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -27,106 +27,48 @@
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29 29
30#include <mach/vreg.h>
31#include <mach/mpp.h>
32#include <mach/gpio.h>
33#include <mach/board.h> 30#include <mach/board.h>
34#include <mach/dma.h> 31#include <mach/irqs.h>
35#include <mach/memory.h> 32#include <mach/sirc.h>
33#include <mach/gpio.h>
36 34
37#include "devices.h" 35#include "devices.h"
38#include "timer.h"
39#include "socinfo.h"
40#include "proc_comm.h"
41
42#define MSM_SHARED_RAM_PHYS (MSM_SMI_BASE + 0x00100000)
43 36
44static struct resource smc91x_resources[] = { 37extern struct sys_timer msm_timer;
45 [0] = {
46 .flags = IORESOURCE_MEM,
47 },
48 [1] = {
49 .flags = IORESOURCE_IRQ,
50 },
51};
52 38
53static struct platform_device smc91x_device = { 39static struct msm_gpio uart3_config_data[] = {
54 .name = "smc91x", 40 { GPIO_CFG(86, 1, GPIO_INPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_Rx"},
55 .id = 0, 41 { GPIO_CFG(87, 1, GPIO_OUTPUT, GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"},
56 .num_resources = ARRAY_SIZE(smc91x_resources),
57 .resource = smc91x_resources,
58}; 42};
59 43
60static struct platform_device *devices[] __initdata = { 44static struct platform_device *devices[] __initdata = {
61 &smc91x_device, 45 &msm_device_uart3,
62 &msm_device_smd,
63 &msm_device_dmov,
64 &msm_device_nand,
65}; 46};
66 47
67static void __init qsd8x50_init_irq(void) 48static void msm8x50_init_uart3(void)
68{ 49{
69 msm_init_irq(); 50 msm_gpios_request_enable(uart3_config_data,
51 ARRAY_SIZE(uart3_config_data));
70} 52}
71 53
72static void __init qsd8x50_init_host(void) 54static void __init qsd8x50_map_io(void)
73{ 55{
74 if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa()) 56 msm_map_qsd8x50_io();
75 return; 57 msm_clock_init(msm_clocks_8x50, msm_num_clocks_8x50);
76
77 vreg_usb = vreg_get(NULL, "boost");
78
79 if (IS_ERR(vreg_usb)) {
80 printk(KERN_ERR "%s: vreg get failed (%ld)\n",
81 __func__, PTR_ERR(vreg_usb));
82 return;
83 }
84
85 platform_device_register(&msm_device_hsusb_otg);
86} 58}
87 59
88static void __init qsd8x50_cfg_smc91x(void) 60static void __init qsd8x50_init_irq(void)
89{ 61{
90 int rc = 0; 62 msm_init_irq();
91 63 msm_init_sirc();
92 if (machine_is_qsd8x50_surf() || machine_is_qsd8x50a_surf()) {
93 smc91x_resources[0].start = 0x70000300;
94 smc91x_resources[0].end = 0x700003ff;
95 smc91x_resources[1].start = MSM_GPIO_TO_INT(156);
96 smc91x_resources[1].end = MSM_GPIO_TO_INT(156);
97 } else if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa()) {
98 smc91x_resources[0].start = 0x84000300;
99 smc91x_resources[0].end = 0x840003ff;
100 smc91x_resources[1].start = MSM_GPIO_TO_INT(87);
101 smc91x_resources[1].end = MSM_GPIO_TO_INT(87);
102
103 rc = gpio_tlmm_config(GPIO_CFG(87, 0, GPIO_INPUT,
104 GPIO_PULL_DOWN, GPIO_2MA),
105 GPIO_ENABLE);
106 if (rc) {
107 printk(KERN_ERR "%s: gpio_tlmm_config=%d\n",
108 __func__, rc);
109 }
110 } else
111 printk(KERN_ERR "%s: invalid machine type\n", __func__);
112} 64}
113 65
114static void __init qsd8x50_init(void) 66static void __init qsd8x50_init(void)
115{ 67{
116 if (socinfo_init() < 0) 68 msm8x50_init_uart3();
117 printk(KERN_ERR "%s: socinfo_init() failed!\n",
118 __func__);
119 qsd8x50_cfg_smc91x();
120 platform_add_devices(devices, ARRAY_SIZE(devices)); 69 platform_add_devices(devices, ARRAY_SIZE(devices));
121} 70}
122 71
123static void __init qsd8x50_map_io(void)
124{
125 msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
126 msm_map_qsd8x50_io();
127 msm_clock_init(msm_clocks_8x50, msm_num_clocks_8x50);
128}
129
130MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") 72MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
131#ifdef CONFIG_MSM_DEBUG_UART 73#ifdef CONFIG_MSM_DEBUG_UART
132 .phys_io = MSM_DEBUG_UART_PHYS, 74 .phys_io = MSM_DEBUG_UART_PHYS,
@@ -139,31 +81,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
139 .timer = &msm_timer, 81 .timer = &msm_timer,
140MACHINE_END 82MACHINE_END
141 83
142MACHINE_START(QSD8X50_FFA, "QCT QSD8X50 FFA") 84MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
143#ifdef CONFIG_MSM_DEBUG_UART
144 .phys_io = MSM_DEBUG_UART_PHYS,
145 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
146#endif
147 .boot_params = PHYS_OFFSET + 0x100,
148 .map_io = qsd8x50_map_io,
149 .init_irq = qsd8x50_init_irq,
150 .init_machine = qsd8x50_init,
151 .timer = &msm_timer,
152MACHINE_END
153
154MACHINE_START(QSD8X50A_SURF, "QCT QSD8X50A SURF")
155#ifdef CONFIG_MSM_DEBUG_UART
156 .phys_io = MSM_DEBUG_UART_PHYS,
157 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
158#endif
159 .boot_params = PHYS_OFFSET + 0x100,
160 .map_io = qsd8x50_map_io,
161 .init_irq = qsd8x50_init_irq,
162 .init_machine = qsd8x50_init,
163 .timer = &msm_timer,
164MACHINE_END
165
166MACHINE_START(QSD8X50A_FFA, "QCT QSD8X50A FFA")
167#ifdef CONFIG_MSM_DEBUG_UART 85#ifdef CONFIG_MSM_DEBUG_UART
168 .phys_io = MSM_DEBUG_UART_PHYS, 86 .phys_io = MSM_DEBUG_UART_PHYS,
169 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc, 87 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,