aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-h2.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 19:08:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 19:08:50 -0400
commit65a6ec0d72a07f16719e9b7a96e1c4bae044b591 (patch)
tree344e03a5039a44982c1b78d6113633b21b434820 /arch/arm/mach-omap1/board-h2.c
parent541010e4b8921cd781ff02ae68028501457045b6 (diff)
parent0181b61a988424b5cc44fe09e6968142359c815e (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (95 commits) [ARM] 4578/1: CM-x270: PCMCIA support [ARM] 4577/1: ITE 8152 PCI bridge support [ARM] 4576/1: CM-X270 machine support [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put() [ARM] pxa: move pxa_set_mode() from pxa2xx_mainstone.c to mainstone.c [ARM] pxa: move pxa_set_mode() from pxa2xx_lubbock.c to lubbock.c [ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols [ARM] pxa: PXA3xx base support [NET] smc91x: fix PXA DMA support code [SERIAL] Fix console initialisation ordering [ARM] pxa: tidy up arch/arm/mach-pxa/Makefile [ARM] Update arch/arm/Kconfig for drivers/Kconfig changes [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23) [ARM] Rename consistent_sync() as dma_cache_maint() [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32 [ARM] 4594/1: ns9xxx: use the new gpio functions [ARM] 4593/1: ns9xxx: implement generic clockevents ...
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r--arch/arm/mach-omap1/board-h2.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 2f8f6ecf111f..b0921622566f 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -140,6 +140,66 @@ static struct platform_device h2_nor_device = {
140 .resource = &h2_nor_resource, 140 .resource = &h2_nor_resource,
141}; 141};
142 142
143#if 0 /* REVISIT: Enable when nand_platform_data is applied */
144
145static struct mtd_partition h2_nand_partitions[] = {
146#if 0
147 /* REVISIT: enable these partitions if you make NAND BOOT
148 * work on your H2 (rev C or newer); published versions of
149 * x-load only support P2 and H3.
150 */
151 {
152 .name = "xloader",
153 .offset = 0,
154 .size = 64 * 1024,
155 .mask_flags = MTD_WRITEABLE, /* force read-only */
156 },
157 {
158 .name = "bootloader",
159 .offset = MTDPART_OFS_APPEND,
160 .size = 256 * 1024,
161 .mask_flags = MTD_WRITEABLE, /* force read-only */
162 },
163 {
164 .name = "params",
165 .offset = MTDPART_OFS_APPEND,
166 .size = 192 * 1024,
167 },
168 {
169 .name = "kernel",
170 .offset = MTDPART_OFS_APPEND,
171 .size = 2 * SZ_1M,
172 },
173#endif
174 {
175 .name = "filesystem",
176 .size = MTDPART_SIZ_FULL,
177 .offset = MTDPART_OFS_APPEND,
178 },
179};
180
181/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
182static struct nand_platform_data h2_nand_data = {
183 .options = NAND_SAMSUNG_LP_OPTIONS,
184 .parts = h2_nand_partitions,
185 .nr_parts = ARRAY_SIZE(h2_nand_partitions),
186};
187
188static struct resource h2_nand_resource = {
189 .flags = IORESOURCE_MEM,
190};
191
192static struct platform_device h2_nand_device = {
193 .name = "omapnand",
194 .id = 0,
195 .dev = {
196 .platform_data = &h2_nand_data,
197 },
198 .num_resources = 1,
199 .resource = &h2_nand_resource,
200};
201#endif
202
143static struct resource h2_smc91x_resources[] = { 203static struct resource h2_smc91x_resources[] = {
144 [0] = { 204 [0] = {
145 .start = OMAP1610_ETHR_START, /* Physical */ 205 .start = OMAP1610_ETHR_START, /* Physical */
@@ -219,11 +279,15 @@ static struct resource h2_irda_resources[] = {
219 .flags = IORESOURCE_IRQ, 279 .flags = IORESOURCE_IRQ,
220 }, 280 },
221}; 281};
282
283static u64 irda_dmamask = 0xffffffff;
284
222static struct platform_device h2_irda_device = { 285static struct platform_device h2_irda_device = {
223 .name = "omapirda", 286 .name = "omapirda",
224 .id = 0, 287 .id = 0,
225 .dev = { 288 .dev = {
226 .platform_data = &h2_irda_data, 289 .platform_data = &h2_irda_data,
290 .dma_mask = &irda_dmamask,
227 }, 291 },
228 .num_resources = ARRAY_SIZE(h2_irda_resources), 292 .num_resources = ARRAY_SIZE(h2_irda_resources),
229 .resource = h2_irda_resources, 293 .resource = h2_irda_resources,
@@ -271,6 +335,7 @@ static struct platform_device h2_mcbsp1_device = {
271 335
272static struct platform_device *h2_devices[] __initdata = { 336static struct platform_device *h2_devices[] __initdata = {
273 &h2_nor_device, 337 &h2_nor_device,
338 //&h2_nand_device,
274 &h2_smc91x_device, 339 &h2_smc91x_device,
275 &h2_irda_device, 340 &h2_irda_device,
276 &h2_kp_device, 341 &h2_kp_device,
@@ -348,6 +413,13 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
348 { OMAP_TAG_LCD, &h2_lcd_config }, 413 { OMAP_TAG_LCD, &h2_lcd_config },
349}; 414};
350 415
416#define H2_NAND_RB_GPIO_PIN 62
417
418static int h2_nand_dev_ready(struct nand_platform_data *data)
419{
420 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
421}
422
351static void __init h2_init(void) 423static void __init h2_init(void)
352{ 424{
353 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 425 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
@@ -362,6 +434,13 @@ static void __init h2_init(void)
362 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys(); 434 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
363 h2_nor_resource.end += SZ_32M - 1; 435 h2_nor_resource.end += SZ_32M - 1;
364 436
437#if 0 /* REVISIT: Enable when nand_platform_data is applied */
438 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
439 h2_nand_resource.end += SZ_4K - 1;
440 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
441 h2_nand_data.dev_ready = h2_nand_dev_ready;
442#endif
443
365 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 444 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
366 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 445 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
367 446