diff options
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-bast.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 3bb97eb6e693..f3e970039b65 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * 03-Mar-2005 BJD Ensured that bast-cpld.h is included | 26 | * 03-Mar-2005 BJD Ensured that bast-cpld.h is included |
27 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 27 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
28 | * 14-Mar-2006 BJD Updated for __iomem changes | 28 | * 14-Mar-2006 BJD Updated for __iomem changes |
29 | * 22-Jun-2006 BJD Added DM9000 platform information | ||
29 | */ | 30 | */ |
30 | 31 | ||
31 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
@@ -35,6 +36,7 @@ | |||
35 | #include <linux/timer.h> | 36 | #include <linux/timer.h> |
36 | #include <linux/init.h> | 37 | #include <linux/init.h> |
37 | #include <linux/device.h> | 38 | #include <linux/device.h> |
39 | #include <linux/dm9000.h> | ||
38 | 40 | ||
39 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | 42 | #include <asm/mach/map.h> |
@@ -53,6 +55,7 @@ | |||
53 | #include <asm/arch/regs-serial.h> | 55 | #include <asm/arch/regs-serial.h> |
54 | #include <asm/arch/regs-gpio.h> | 56 | #include <asm/arch/regs-gpio.h> |
55 | #include <asm/arch/regs-mem.h> | 57 | #include <asm/arch/regs-mem.h> |
58 | #include <asm/arch/regs-lcd.h> | ||
56 | #include <asm/arch/nand.h> | 59 | #include <asm/arch/nand.h> |
57 | 60 | ||
58 | #include <linux/mtd/mtd.h> | 61 | #include <linux/mtd/mtd.h> |
@@ -112,7 +115,6 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
112 | { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 115 | { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
113 | { VA_C2(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, | 116 | { VA_C2(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, |
114 | { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 117 | { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
115 | { VA_C2(BAST_VA_DM9000), PA_CS2(BAST_PA_DM9000), SZ_1M, MT_DEVICE }, | ||
116 | { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | 118 | { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, |
117 | { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | 119 | { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, |
118 | { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | 120 | { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, |
@@ -123,7 +125,6 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
123 | { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 125 | { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
124 | { VA_C3(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, | 126 | { VA_C3(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, |
125 | { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 127 | { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
126 | { VA_C3(BAST_VA_DM9000), PA_CS3(BAST_PA_DM9000), SZ_1M, MT_DEVICE }, | ||
127 | { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | 128 | { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, |
128 | { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | 129 | { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, |
129 | { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | 130 | { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, |
@@ -134,7 +135,6 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
134 | { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 135 | { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
135 | { VA_C4(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, | 136 | { VA_C4(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, |
136 | { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 137 | { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
137 | { VA_C4(BAST_VA_DM9000), PA_CS4(BAST_PA_DM9000), SZ_1M, MT_DEVICE }, | ||
138 | { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | 138 | { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, |
139 | { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | 139 | { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, |
140 | { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | 140 | { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, |
@@ -145,7 +145,6 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
145 | { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 145 | { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
146 | { VA_C5(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, | 146 | { VA_C5(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE }, |
147 | { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 147 | { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
148 | { VA_C5(BAST_VA_DM9000), PA_CS5(BAST_PA_DM9000), SZ_1M, MT_DEVICE }, | ||
149 | { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | 148 | { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, |
150 | { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | 149 | { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, |
151 | { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | 150 | { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, |
@@ -313,6 +312,45 @@ static struct s3c2410_platform_nand bast_nand_info = { | |||
313 | .select_chip = bast_nand_select, | 312 | .select_chip = bast_nand_select, |
314 | }; | 313 | }; |
315 | 314 | ||
315 | /* DM9000 */ | ||
316 | |||
317 | static struct resource bast_dm9k_resource[] = { | ||
318 | [0] = { | ||
319 | .start = S3C2410_CS5 + BAST_PA_DM9000, | ||
320 | .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, | ||
321 | .flags = IORESOURCE_MEM | ||
322 | }, | ||
323 | [1] = { | ||
324 | .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40, | ||
325 | .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f, | ||
326 | .flags = IORESOURCE_MEM | ||
327 | }, | ||
328 | [2] = { | ||
329 | .start = IRQ_DM9000, | ||
330 | .end = IRQ_DM9000, | ||
331 | .flags = IORESOURCE_IRQ | ||
332 | } | ||
333 | |||
334 | }; | ||
335 | |||
336 | /* for the moment we limit ourselves to 16bit IO until some | ||
337 | * better IO routines can be written and tested | ||
338 | */ | ||
339 | |||
340 | struct dm9000_plat_data bast_dm9k_platdata = { | ||
341 | .flags = DM9000_PLATF_16BITONLY | ||
342 | }; | ||
343 | |||
344 | static struct platform_device bast_device_dm9k = { | ||
345 | .name = "dm9000", | ||
346 | .id = 0, | ||
347 | .num_resources = ARRAY_SIZE(bast_dm9k_resource), | ||
348 | .resource = bast_dm9k_resource, | ||
349 | .dev = { | ||
350 | .platform_data = &bast_dm9k_platdata, | ||
351 | } | ||
352 | }; | ||
353 | |||
316 | 354 | ||
317 | /* Standard BAST devices */ | 355 | /* Standard BAST devices */ |
318 | 356 | ||
@@ -324,7 +362,8 @@ static struct platform_device *bast_devices[] __initdata = { | |||
324 | &s3c_device_iis, | 362 | &s3c_device_iis, |
325 | &s3c_device_rtc, | 363 | &s3c_device_rtc, |
326 | &s3c_device_nand, | 364 | &s3c_device_nand, |
327 | &bast_device_nor | 365 | &bast_device_nor, |
366 | &bast_device_dm9k, | ||
328 | }; | 367 | }; |
329 | 368 | ||
330 | static struct clk *bast_clocks[] = { | 369 | static struct clk *bast_clocks[] = { |