aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorSudhakar Rajashekhara <sudhakar.raj@ti.com>2009-11-03 01:21:09 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 13:21:36 -0500
commit039c5ee3c901aded685fbbfbbea636f2f3ffc0e2 (patch)
tree3c4f0bb3b7be2fd3a526f129d55c575a50aa3e84 /arch/arm/mach-davinci
parent17fadd9a5edfeef15ea0e06822a25cc073d9ee02 (diff)
davinci: DA850/OMAP-L138: eliminate static function declaration
Eliminate the static function declaration by rearranging data in da850/omap-l138 board file. Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c103
1 files changed, 51 insertions, 52 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index d0e3178f8fe9..19eb0479d26d 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -145,8 +145,58 @@ static struct platform_device da850_evm_nandflash_device = {
145 .resource = da850_evm_nandflash_resource, 145 .resource = da850_evm_nandflash_resource,
146}; 146};
147 147
148static struct platform_device *da850_evm_devices[] __initdata = {
149 &da850_evm_nandflash_device,
150 &da850_evm_norflash_device,
151};
152
153#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
154#define DA8XX_AEMIF_ASIZE_16BIT 0x1
155
156static void __init da850_evm_init_nor(void)
157{
158 void __iomem *aemif_addr;
159
160 aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
161
162 /* Configure data bus width of CS2 to 16 bit */
163 writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
164 DA8XX_AEMIF_ASIZE_16BIT,
165 aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
166
167 iounmap(aemif_addr);
168}
169
148static u32 ui_card_detected; 170static u32 ui_card_detected;
149static void da850_evm_setup_nor_nand(void); 171
172#if defined(CONFIG_MMC_DAVINCI) || \
173 defined(CONFIG_MMC_DAVINCI_MODULE)
174#define HAS_MMC 1
175#else
176#define HAS_MMC 0
177#endif
178
179static void da850_evm_setup_nor_nand(void)
180{
181 int ret = 0;
182
183 if (ui_card_detected & !HAS_MMC) {
184 ret = da8xx_pinmux_setup(da850_nand_pins);
185 if (ret)
186 pr_warning("da850_evm_init: nand mux setup failed: "
187 "%d\n", ret);
188
189 ret = da8xx_pinmux_setup(da850_nor_pins);
190 if (ret)
191 pr_warning("da850_evm_init: nor mux setup failed: %d\n",
192 ret);
193
194 da850_evm_init_nor();
195
196 platform_add_devices(da850_evm_devices,
197 ARRAY_SIZE(da850_evm_devices));
198 }
199}
150 200
151#ifdef CONFIG_DA850_UI_RMII 201#ifdef CONFIG_DA850_UI_RMII
152static inline void da850_evm_setup_emac_rmii(int rmii_sel) 202static inline void da850_evm_setup_emac_rmii(int rmii_sel)
@@ -249,11 +299,6 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = {
249 .enabled_uarts = 0x7, 299 .enabled_uarts = 0x7,
250}; 300};
251 301
252static struct platform_device *da850_evm_devices[] __initdata = {
253 &da850_evm_nandflash_device,
254 &da850_evm_norflash_device,
255};
256
257/* davinci da850 evm audio machine driver */ 302/* davinci da850 evm audio machine driver */
258static u8 da850_iis_serializer_direction[] = { 303static u8 da850_iis_serializer_direction[] = {
259 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, 304 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
@@ -324,23 +369,6 @@ static int da850_lcd_hw_init(void)
324 return 0; 369 return 0;
325} 370}
326 371
327#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
328#define DA8XX_AEMIF_ASIZE_16BIT 0x1
329
330static void __init da850_evm_init_nor(void)
331{
332 void __iomem *aemif_addr;
333
334 aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
335
336 /* Configure data bus width of CS2 to 16 bit */
337 writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
338 DA8XX_AEMIF_ASIZE_16BIT,
339 aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
340
341 iounmap(aemif_addr);
342}
343
344/* TPS65070 voltage regulator support */ 372/* TPS65070 voltage regulator support */
345 373
346/* 3.3V */ 374/* 3.3V */
@@ -488,35 +516,6 @@ static int __init pmic_tps65070_init(void)
488 ARRAY_SIZE(da850evm_tps65070_info)); 516 ARRAY_SIZE(da850evm_tps65070_info));
489} 517}
490 518
491#if defined(CONFIG_MMC_DAVINCI) || \
492 defined(CONFIG_MMC_DAVINCI_MODULE)
493#define HAS_MMC 1
494#else
495#define HAS_MMC 0
496#endif
497
498static void da850_evm_setup_nor_nand(void)
499{
500 int ret = 0;
501
502 if (ui_card_detected & !HAS_MMC) {
503 ret = da8xx_pinmux_setup(da850_nand_pins);
504 if (ret)
505 pr_warning("da850_evm_init: nand mux setup failed: "
506 "%d\n", ret);
507
508 ret = da8xx_pinmux_setup(da850_nor_pins);
509 if (ret)
510 pr_warning("da850_evm_init: nor mux setup failed: %d\n",
511 ret);
512
513 da850_evm_init_nor();
514
515 platform_add_devices(da850_evm_devices,
516 ARRAY_SIZE(da850_evm_devices));
517 }
518}
519
520static const short da850_evm_lcdc_pins[] = { 519static const short da850_evm_lcdc_pins[] = {
521 DA850_GPIO2_8, DA850_GPIO2_15, 520 DA850_GPIO2_8, DA850_GPIO2_15,
522 -1 521 -1