diff options
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 59 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 50 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/da8xx.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/mux.h | 34 |
4 files changed, 145 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 62d37cb6f29d..70a2f487da95 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mtd/mtd.h> | 22 | #include <linux/mtd/mtd.h> |
23 | #include <linux/mtd/nand.h> | 23 | #include <linux/mtd/nand.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | ||
25 | 26 | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -41,6 +42,39 @@ | |||
41 | #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) | 42 | #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) |
42 | #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) | 43 | #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) |
43 | 44 | ||
45 | static struct mtd_partition da850_evm_norflash_partition[] = { | ||
46 | { | ||
47 | .name = "NOR filesystem", | ||
48 | .offset = 0, | ||
49 | .size = MTDPART_SIZ_FULL, | ||
50 | .mask_flags = 0, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct physmap_flash_data da850_evm_norflash_data = { | ||
55 | .width = 2, | ||
56 | .parts = da850_evm_norflash_partition, | ||
57 | .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition), | ||
58 | }; | ||
59 | |||
60 | static struct resource da850_evm_norflash_resource[] = { | ||
61 | { | ||
62 | .start = DA8XX_AEMIF_CS2_BASE, | ||
63 | .end = DA8XX_AEMIF_CS2_BASE + SZ_32M - 1, | ||
64 | .flags = IORESOURCE_MEM, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static struct platform_device da850_evm_norflash_device = { | ||
69 | .name = "physmap-flash", | ||
70 | .id = 0, | ||
71 | .dev = { | ||
72 | .platform_data = &da850_evm_norflash_data, | ||
73 | }, | ||
74 | .num_resources = 1, | ||
75 | .resource = da850_evm_norflash_resource, | ||
76 | }; | ||
77 | |||
44 | /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash | 78 | /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash |
45 | * (128K blocks). It may be used instead of the (default) SPI flash | 79 | * (128K blocks). It may be used instead of the (default) SPI flash |
46 | * to boot, using TI's tools to install the secondary boot loader | 80 | * to boot, using TI's tools to install the secondary boot loader |
@@ -120,6 +154,7 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = { | |||
120 | 154 | ||
121 | static struct platform_device *da850_evm_devices[] __initdata = { | 155 | static struct platform_device *da850_evm_devices[] __initdata = { |
122 | &da850_evm_nandflash_device, | 156 | &da850_evm_nandflash_device, |
157 | &da850_evm_norflash_device, | ||
123 | }; | 158 | }; |
124 | 159 | ||
125 | /* davinci da850 evm audio machine driver */ | 160 | /* davinci da850 evm audio machine driver */ |
@@ -192,6 +227,23 @@ static int da850_lcd_hw_init(void) | |||
192 | return 0; | 227 | return 0; |
193 | } | 228 | } |
194 | 229 | ||
230 | #define DA8XX_AEMIF_CE2CFG_OFFSET 0x10 | ||
231 | #define DA8XX_AEMIF_ASIZE_16BIT 0x1 | ||
232 | |||
233 | static void __init da850_evm_init_nor(void) | ||
234 | { | ||
235 | void __iomem *aemif_addr; | ||
236 | |||
237 | aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K); | ||
238 | |||
239 | /* Configure data bus width of CS2 to 16 bit */ | ||
240 | writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) | | ||
241 | DA8XX_AEMIF_ASIZE_16BIT, | ||
242 | aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET); | ||
243 | |||
244 | iounmap(aemif_addr); | ||
245 | } | ||
246 | |||
195 | static __init void da850_evm_init(void) | 247 | static __init void da850_evm_init(void) |
196 | { | 248 | { |
197 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 249 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
@@ -202,6 +254,13 @@ static __init void da850_evm_init(void) | |||
202 | pr_warning("da850_evm_init: nand mux setup failed: %d\n", | 254 | pr_warning("da850_evm_init: nand mux setup failed: %d\n", |
203 | ret); | 255 | ret); |
204 | 256 | ||
257 | ret = da8xx_pinmux_setup(da850_nor_pins); | ||
258 | if (ret) | ||
259 | pr_warning("da850_evm_init: nor mux setup failed: %d\n", | ||
260 | ret); | ||
261 | |||
262 | da850_evm_init_nor(); | ||
263 | |||
205 | platform_add_devices(da850_evm_devices, | 264 | platform_add_devices(da850_evm_devices, |
206 | ARRAY_SIZE(da850_evm_devices)); | 265 | ARRAY_SIZE(da850_evm_devices)); |
207 | 266 | ||
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index db4209413450..192d719a47df 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -471,6 +471,40 @@ static const struct mux_config da850_pins[] = { | |||
471 | MUX_CFG(DA850, NEMA_CS_4, 7, 8, 15, 1, false) | 471 | MUX_CFG(DA850, NEMA_CS_4, 7, 8, 15, 1, false) |
472 | MUX_CFG(DA850, NEMA_WE, 7, 16, 15, 1, false) | 472 | MUX_CFG(DA850, NEMA_WE, 7, 16, 15, 1, false) |
473 | MUX_CFG(DA850, NEMA_OE, 7, 20, 15, 1, false) | 473 | MUX_CFG(DA850, NEMA_OE, 7, 20, 15, 1, false) |
474 | MUX_CFG(DA850, EMA_A_0, 12, 28, 15, 1, false) | ||
475 | MUX_CFG(DA850, EMA_A_3, 12, 16, 15, 1, false) | ||
476 | MUX_CFG(DA850, EMA_A_4, 12, 12, 15, 1, false) | ||
477 | MUX_CFG(DA850, EMA_A_5, 12, 8, 15, 1, false) | ||
478 | MUX_CFG(DA850, EMA_A_6, 12, 4, 15, 1, false) | ||
479 | MUX_CFG(DA850, EMA_A_7, 12, 0, 15, 1, false) | ||
480 | MUX_CFG(DA850, EMA_A_8, 11, 28, 15, 1, false) | ||
481 | MUX_CFG(DA850, EMA_A_9, 11, 24, 15, 1, false) | ||
482 | MUX_CFG(DA850, EMA_A_10, 11, 20, 15, 1, false) | ||
483 | MUX_CFG(DA850, EMA_A_11, 11, 16, 15, 1, false) | ||
484 | MUX_CFG(DA850, EMA_A_12, 11, 12, 15, 1, false) | ||
485 | MUX_CFG(DA850, EMA_A_13, 11, 8, 15, 1, false) | ||
486 | MUX_CFG(DA850, EMA_A_14, 11, 4, 15, 1, false) | ||
487 | MUX_CFG(DA850, EMA_A_15, 11, 0, 15, 1, false) | ||
488 | MUX_CFG(DA850, EMA_A_16, 10, 28, 15, 1, false) | ||
489 | MUX_CFG(DA850, EMA_A_17, 10, 24, 15, 1, false) | ||
490 | MUX_CFG(DA850, EMA_A_18, 10, 20, 15, 1, false) | ||
491 | MUX_CFG(DA850, EMA_A_19, 10, 16, 15, 1, false) | ||
492 | MUX_CFG(DA850, EMA_A_20, 10, 12, 15, 1, false) | ||
493 | MUX_CFG(DA850, EMA_A_21, 10, 8, 15, 1, false) | ||
494 | MUX_CFG(DA850, EMA_A_22, 10, 4, 15, 1, false) | ||
495 | MUX_CFG(DA850, EMA_A_23, 10, 0, 15, 1, false) | ||
496 | MUX_CFG(DA850, EMA_D_8, 8, 28, 15, 1, false) | ||
497 | MUX_CFG(DA850, EMA_D_9, 8, 24, 15, 1, false) | ||
498 | MUX_CFG(DA850, EMA_D_10, 8, 20, 15, 1, false) | ||
499 | MUX_CFG(DA850, EMA_D_11, 8, 16, 15, 1, false) | ||
500 | MUX_CFG(DA850, EMA_D_12, 8, 12, 15, 1, false) | ||
501 | MUX_CFG(DA850, EMA_D_13, 8, 8, 15, 1, false) | ||
502 | MUX_CFG(DA850, EMA_D_14, 8, 4, 15, 1, false) | ||
503 | MUX_CFG(DA850, EMA_D_15, 8, 0, 15, 1, false) | ||
504 | MUX_CFG(DA850, EMA_BA_1, 5, 24, 15, 1, false) | ||
505 | MUX_CFG(DA850, EMA_CLK, 6, 0, 15, 1, false) | ||
506 | MUX_CFG(DA850, EMA_WAIT_1, 6, 24, 15, 1, false) | ||
507 | MUX_CFG(DA850, NEMA_CS_2, 7, 0, 15, 1, false) | ||
474 | /* GPIO function */ | 508 | /* GPIO function */ |
475 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) | 509 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) |
476 | MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false) | 510 | MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false) |
@@ -545,6 +579,22 @@ const short da850_nand_pins[] __initdata = { | |||
545 | -1 | 579 | -1 |
546 | }; | 580 | }; |
547 | 581 | ||
582 | const short da850_nor_pins[] __initdata = { | ||
583 | DA850_EMA_BA_1, DA850_EMA_CLK, DA850_EMA_WAIT_1, DA850_NEMA_CS_2, | ||
584 | DA850_NEMA_WE, DA850_NEMA_OE, DA850_EMA_D_0, DA850_EMA_D_1, | ||
585 | DA850_EMA_D_2, DA850_EMA_D_3, DA850_EMA_D_4, DA850_EMA_D_5, | ||
586 | DA850_EMA_D_6, DA850_EMA_D_7, DA850_EMA_D_8, DA850_EMA_D_9, | ||
587 | DA850_EMA_D_10, DA850_EMA_D_11, DA850_EMA_D_12, DA850_EMA_D_13, | ||
588 | DA850_EMA_D_14, DA850_EMA_D_15, DA850_EMA_A_0, DA850_EMA_A_1, | ||
589 | DA850_EMA_A_2, DA850_EMA_A_3, DA850_EMA_A_4, DA850_EMA_A_5, | ||
590 | DA850_EMA_A_6, DA850_EMA_A_7, DA850_EMA_A_8, DA850_EMA_A_9, | ||
591 | DA850_EMA_A_10, DA850_EMA_A_11, DA850_EMA_A_12, DA850_EMA_A_13, | ||
592 | DA850_EMA_A_14, DA850_EMA_A_15, DA850_EMA_A_16, DA850_EMA_A_17, | ||
593 | DA850_EMA_A_18, DA850_EMA_A_19, DA850_EMA_A_20, DA850_EMA_A_21, | ||
594 | DA850_EMA_A_22, DA850_EMA_A_23, | ||
595 | -1 | ||
596 | }; | ||
597 | |||
548 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ | 598 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ |
549 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { | 599 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { |
550 | [IRQ_DA8XX_COMMTX] = 7, | 600 | [IRQ_DA8XX_COMMTX] = 7, |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 77e5d2398e21..d4095d0572c6 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define DA8XX_PSC1_BASE 0x01e27000 | 40 | #define DA8XX_PSC1_BASE 0x01e27000 |
41 | #define DA8XX_LCD_CNTRL_BASE 0x01e13000 | 41 | #define DA8XX_LCD_CNTRL_BASE 0x01e13000 |
42 | #define DA8XX_MMCSD0_BASE 0x01c40000 | 42 | #define DA8XX_MMCSD0_BASE 0x01c40000 |
43 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | ||
43 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 44 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
44 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 45 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
45 | 46 | ||
@@ -113,6 +114,7 @@ extern const short da850_mcasp_pins[]; | |||
113 | extern const short da850_lcdcntl_pins[]; | 114 | extern const short da850_lcdcntl_pins[]; |
114 | extern const short da850_mmcsd0_pins[]; | 115 | extern const short da850_mmcsd0_pins[]; |
115 | extern const short da850_nand_pins[]; | 116 | extern const short da850_nand_pins[]; |
117 | extern const short da850_nor_pins[]; | ||
116 | 118 | ||
117 | int da8xx_pinmux_setup(const short pins[]); | 119 | int da8xx_pinmux_setup(const short pins[]); |
118 | 120 | ||
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index ee6f29db4452..88cd22af4946 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h | |||
@@ -821,6 +821,40 @@ enum davinci_da850_index { | |||
821 | DA850_NEMA_CS_4, | 821 | DA850_NEMA_CS_4, |
822 | DA850_NEMA_WE, | 822 | DA850_NEMA_WE, |
823 | DA850_NEMA_OE, | 823 | DA850_NEMA_OE, |
824 | DA850_EMA_D_15, | ||
825 | DA850_EMA_D_14, | ||
826 | DA850_EMA_D_13, | ||
827 | DA850_EMA_D_12, | ||
828 | DA850_EMA_D_11, | ||
829 | DA850_EMA_D_10, | ||
830 | DA850_EMA_D_9, | ||
831 | DA850_EMA_D_8, | ||
832 | DA850_EMA_A_0, | ||
833 | DA850_EMA_A_3, | ||
834 | DA850_EMA_A_4, | ||
835 | DA850_EMA_A_5, | ||
836 | DA850_EMA_A_6, | ||
837 | DA850_EMA_A_7, | ||
838 | DA850_EMA_A_8, | ||
839 | DA850_EMA_A_9, | ||
840 | DA850_EMA_A_10, | ||
841 | DA850_EMA_A_11, | ||
842 | DA850_EMA_A_12, | ||
843 | DA850_EMA_A_13, | ||
844 | DA850_EMA_A_14, | ||
845 | DA850_EMA_A_15, | ||
846 | DA850_EMA_A_16, | ||
847 | DA850_EMA_A_17, | ||
848 | DA850_EMA_A_18, | ||
849 | DA850_EMA_A_19, | ||
850 | DA850_EMA_A_20, | ||
851 | DA850_EMA_A_21, | ||
852 | DA850_EMA_A_22, | ||
853 | DA850_EMA_A_23, | ||
854 | DA850_EMA_BA_1, | ||
855 | DA850_EMA_CLK, | ||
856 | DA850_EMA_WAIT_1, | ||
857 | DA850_NEMA_CS_2, | ||
824 | 858 | ||
825 | /* GPIO function */ | 859 | /* GPIO function */ |
826 | DA850_GPIO2_15, | 860 | DA850_GPIO2_15, |