diff options
Diffstat (limited to 'arch/arm/mach-davinci/board-dm644x-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 5387e6b20405..c039674fe99e 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -16,11 +16,12 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/memory.h> | 18 | #include <linux/memory.h> |
19 | #include <linux/etherdevice.h> | ||
19 | 20 | ||
20 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
21 | #include <linux/i2c/pcf857x.h> | 22 | #include <linux/i2c/pcf857x.h> |
22 | #include <linux/i2c/at24.h> | 23 | #include <linux/i2c/at24.h> |
23 | #include <linux/etherdevice.h> | 24 | |
24 | #include <linux/mtd/mtd.h> | 25 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
26 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
@@ -113,20 +114,49 @@ static struct platform_device davinci_evm_norflash_device = { | |||
113 | .resource = &davinci_evm_norflash_resource, | 114 | .resource = &davinci_evm_norflash_resource, |
114 | }; | 115 | }; |
115 | 116 | ||
117 | /* DM644x EVM includes a 64 MByte small-page NAND flash (16K blocks). | ||
118 | * It may used instead of the (default) NOR chip to boot, using TI's | ||
119 | * tools to install the secondary boot loader (UBL) and U-Boot. | ||
120 | */ | ||
116 | struct mtd_partition davinci_evm_nandflash_partition[] = { | 121 | struct mtd_partition davinci_evm_nandflash_partition[] = { |
117 | /* 5 MB space at the beginning for bootloader and kernel */ | 122 | /* Bootloader layout depends on whose u-boot is installed, but we |
123 | * can hide all the details. | ||
124 | * - block 0 for u-boot environment ... in mainline u-boot | ||
125 | * - block 1 for UBL (plus up to four backup copies in blocks 2..5) | ||
126 | * - blocks 6...? for u-boot | ||
127 | * - blocks 16..23 for u-boot environment ... in TI's u-boot | ||
128 | */ | ||
129 | { | ||
130 | .name = "bootloader", | ||
131 | .offset = 0, | ||
132 | .size = SZ_256K + SZ_128K, | ||
133 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
134 | }, | ||
135 | /* Kernel */ | ||
118 | { | 136 | { |
119 | .name = "NAND filesystem", | 137 | .name = "kernel", |
120 | .offset = 5 * SZ_1M, | 138 | .offset = MTDPART_OFS_APPEND, |
139 | .size = SZ_4M, | ||
140 | .mask_flags = 0, | ||
141 | }, | ||
142 | /* File system (older GIT kernels started this on the 5MB mark) */ | ||
143 | { | ||
144 | .name = "filesystem", | ||
145 | .offset = MTDPART_OFS_APPEND, | ||
121 | .size = MTDPART_SIZ_FULL, | 146 | .size = MTDPART_SIZ_FULL, |
122 | .mask_flags = 0, | 147 | .mask_flags = 0, |
123 | } | 148 | } |
149 | /* A few blocks at end hold a flash BBT ... created by TI's CCS | ||
150 | * using flashwriter_nand.out, but ignored by TI's versions of | ||
151 | * Linux and u-boot. We boot faster by using them. | ||
152 | */ | ||
124 | }; | 153 | }; |
125 | 154 | ||
126 | static struct davinci_nand_pdata davinci_evm_nandflash_data = { | 155 | static struct davinci_nand_pdata davinci_evm_nandflash_data = { |
127 | .parts = davinci_evm_nandflash_partition, | 156 | .parts = davinci_evm_nandflash_partition, |
128 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), | 157 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), |
129 | .ecc_mode = NAND_ECC_HW, | 158 | .ecc_mode = NAND_ECC_HW, |
159 | .options = NAND_USE_FLASH_BBT, | ||
130 | }; | 160 | }; |
131 | 161 | ||
132 | static struct resource davinci_evm_nandflash_resource[] = { | 162 | static struct resource davinci_evm_nandflash_resource[] = { |
@@ -151,14 +181,14 @@ static struct platform_device davinci_evm_nandflash_device = { | |||
151 | .resource = davinci_evm_nandflash_resource, | 181 | .resource = davinci_evm_nandflash_resource, |
152 | }; | 182 | }; |
153 | 183 | ||
154 | static u64 davinci_fb_dma_mask = DMA_32BIT_MASK; | 184 | static u64 davinci_fb_dma_mask = DMA_BIT_MASK(32); |
155 | 185 | ||
156 | static struct platform_device davinci_fb_device = { | 186 | static struct platform_device davinci_fb_device = { |
157 | .name = "davincifb", | 187 | .name = "davincifb", |
158 | .id = -1, | 188 | .id = -1, |
159 | .dev = { | 189 | .dev = { |
160 | .dma_mask = &davinci_fb_dma_mask, | 190 | .dma_mask = &davinci_fb_dma_mask, |
161 | .coherent_dma_mask = DMA_32BIT_MASK, | 191 | .coherent_dma_mask = DMA_BIT_MASK(32), |
162 | }, | 192 | }, |
163 | .num_resources = 0, | 193 | .num_resources = 0, |
164 | }; | 194 | }; |