diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-01-19 03:42:25 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-19 03:42:25 -0500 |
commit | 44d6cef805c1b17218723279a2767484e43d6fac (patch) | |
tree | f8d3559552eb4e86929a217619e74cd08d56bcab | |
parent | 8e2376ab1086b2bff18fdb887f5bc13740ae6e24 (diff) | |
parent | a4e946947b966d018f3f712d5c7ca2932c2aadd2 (diff) |
ARM: Merge next-s3c6410-andygreen
Merge branch 'next-s3c6410-andygreen' into next-samsung-try5
-rw-r--r-- | arch/arm/mach-s3c6400/include/mach/map.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/mach-smdk6410.c | 37 | ||||
-rw-r--r-- | arch/arm/plat-s3c64xx/cpu.c | 5 | ||||
-rw-r--r-- | arch/arm/plat-s3c64xx/include/plat/regs-srom.h | 59 |
4 files changed, 113 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h index c33810ed21b..3e17adf3a89 100644 --- a/arch/arm/mach-s3c6400/include/mach/map.h +++ b/arch/arm/mach-s3c6400/include/mach/map.h | |||
@@ -17,6 +17,18 @@ | |||
17 | 17 | ||
18 | #include <plat/map-base.h> | 18 | #include <plat/map-base.h> |
19 | 19 | ||
20 | /* | ||
21 | * Post-mux Chip Select Regions Xm0CSn_ | ||
22 | * These may be used by SROM, NAND or CF depending on settings | ||
23 | */ | ||
24 | |||
25 | #define S3C64XX_PA_XM0CSN0 (0x10000000) | ||
26 | #define S3C64XX_PA_XM0CSN1 (0x18000000) | ||
27 | #define S3C64XX_PA_XM0CSN2 (0x20000000) | ||
28 | #define S3C64XX_PA_XM0CSN3 (0x28000000) | ||
29 | #define S3C64XX_PA_XM0CSN4 (0x30000000) | ||
30 | #define S3C64XX_PA_XM0CSN5 (0x38000000) | ||
31 | |||
20 | /* HSMMC units */ | 32 | /* HSMMC units */ |
21 | #define S3C64XX_PA_HSMMC(x) (0x7C200000 + ((x) * 0x100000)) | 33 | #define S3C64XX_PA_HSMMC(x) (0x7C200000 + ((x) * 0x100000)) |
22 | #define S3C64XX_PA_HSMMC0 S3C64XX_PA_HSMMC(0) | 34 | #define S3C64XX_PA_HSMMC0 S3C64XX_PA_HSMMC(0) |
@@ -38,6 +50,8 @@ | |||
38 | #define S3C_VA_UART2 S3C_VA_UARTx(2) | 50 | #define S3C_VA_UART2 S3C_VA_UARTx(2) |
39 | #define S3C_VA_UART3 S3C_VA_UARTx(3) | 51 | #define S3C_VA_UART3 S3C_VA_UARTx(3) |
40 | 52 | ||
53 | #define S3C64XX_PA_SROM (0x70000000) | ||
54 | |||
41 | #define S3C64XX_PA_NAND (0x70200000) | 55 | #define S3C64XX_PA_NAND (0x70200000) |
42 | #define S3C64XX_PA_FB (0x77100000) | 56 | #define S3C64XX_PA_FB (0x77100000) |
43 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) | 57 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) |
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c index 8969fe73b83..eb5de981c09 100644 --- a/arch/arm/mach-s3c6410/mach-smdk6410.c +++ b/arch/arm/mach-s3c6410/mach-smdk6410.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <plat/regs-modem.h> | 49 | #include <plat/regs-modem.h> |
50 | #include <plat/regs-gpio.h> | 50 | #include <plat/regs-gpio.h> |
51 | #include <plat/regs-sys.h> | 51 | #include <plat/regs-sys.h> |
52 | #include <plat/regs-srom.h> | ||
52 | #include <plat/iic.h> | 53 | #include <plat/iic.h> |
53 | #include <plat/fb.h> | 54 | #include <plat/fb.h> |
54 | #include <plat/gpio-cfg.h> | 55 | #include <plat/gpio-cfg.h> |
@@ -154,10 +155,20 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { | |||
154 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 155 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
155 | }; | 156 | }; |
156 | 157 | ||
158 | /* | ||
159 | * Configuring Ethernet on SMDK6410 | ||
160 | * | ||
161 | * Both CS8900A and LAN9115 chips share one chip select mediated by CFG6. | ||
162 | * The constant address below corresponds to nCS1 | ||
163 | * | ||
164 | * 1) Set CFGB2 p3 ON others off, no other CFGB selects "ethernet" | ||
165 | * 2) CFG6 needs to be switched to "LAN9115" side | ||
166 | */ | ||
167 | |||
157 | static struct resource smdk6410_smsc911x_resources[] = { | 168 | static struct resource smdk6410_smsc911x_resources[] = { |
158 | [0] = { | 169 | [0] = { |
159 | .start = 0x18000000, | 170 | .start = S3C64XX_PA_XM0CSN1, |
160 | .end = 0x18000000 + SZ_64K - 1, | 171 | .end = S3C64XX_PA_XM0CSN1 + SZ_64K - 1, |
161 | .flags = IORESOURCE_MEM, | 172 | .flags = IORESOURCE_MEM, |
162 | }, | 173 | }, |
163 | [1] = { | 174 | [1] = { |
@@ -430,10 +441,32 @@ static void __init smdk6410_map_io(void) | |||
430 | 441 | ||
431 | static void __init smdk6410_machine_init(void) | 442 | static void __init smdk6410_machine_init(void) |
432 | { | 443 | { |
444 | u32 cs1; | ||
445 | |||
433 | s3c_i2c0_set_platdata(NULL); | 446 | s3c_i2c0_set_platdata(NULL); |
434 | s3c_i2c1_set_platdata(NULL); | 447 | s3c_i2c1_set_platdata(NULL); |
435 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | 448 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); |
436 | 449 | ||
450 | /* configure nCS1 width to 16 bits */ | ||
451 | |||
452 | cs1 = __raw_readl(S3C64XX_SROM_BW) & | ||
453 | ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT); | ||
454 | cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) | | ||
455 | (1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) | | ||
456 | (1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) << | ||
457 | S3C64XX_SROM_BW__NCS1__SHIFT; | ||
458 | __raw_writel(cs1, S3C64XX_SROM_BW); | ||
459 | |||
460 | /* set timing for nCS1 suitable for ethernet chip */ | ||
461 | |||
462 | __raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) | | ||
463 | (6 << S3C64XX_SROM_BCX__TACP__SHIFT) | | ||
464 | (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) | | ||
465 | (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) | | ||
466 | (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) | | ||
467 | (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) | | ||
468 | (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1); | ||
469 | |||
437 | gpio_request(S3C64XX_GPN(5), "LCD power"); | 470 | gpio_request(S3C64XX_GPN(5), "LCD power"); |
438 | gpio_request(S3C64XX_GPF(13), "LCD power"); | 471 | gpio_request(S3C64XX_GPF(13), "LCD power"); |
439 | gpio_request(S3C64XX_GPF(15), "LCD power"); | 472 | gpio_request(S3C64XX_GPF(15), "LCD power"); |
diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index c0e6f2a4515..bc7ca1812e3 100644 --- a/arch/arm/plat-s3c64xx/cpu.c +++ b/arch/arm/plat-s3c64xx/cpu.c | |||
@@ -73,6 +73,11 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
73 | .length = SZ_4K, | 73 | .length = SZ_4K, |
74 | .type = MT_DEVICE, | 74 | .type = MT_DEVICE, |
75 | }, { | 75 | }, { |
76 | .virtual = (unsigned long)S3C_VA_MEM, | ||
77 | .pfn = __phys_to_pfn(S3C64XX_PA_SROM), | ||
78 | .length = SZ_4K, | ||
79 | .type = MT_DEVICE, | ||
80 | }, { | ||
76 | .virtual = (unsigned long)(S3C_VA_UART + UART_OFFS), | 81 | .virtual = (unsigned long)(S3C_VA_UART + UART_OFFS), |
77 | .pfn = __phys_to_pfn(S3C_PA_UART), | 82 | .pfn = __phys_to_pfn(S3C_PA_UART), |
78 | .length = SZ_4K, | 83 | .length = SZ_4K, |
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-srom.h b/arch/arm/plat-s3c64xx/include/plat/regs-srom.h new file mode 100644 index 00000000000..756731b3629 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/regs-srom.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/regs-srom.h | ||
2 | * | ||
3 | * Copyright 2009 Andy Green <andy@warmcat.com> | ||
4 | * | ||
5 | * S3C64XX SROM definitions | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __PLAT_REGS_SROM_H | ||
13 | #define __PLAT_REGS_SROM_H __FILE__ | ||
14 | |||
15 | #define S3C64XX_SROMREG(x) (S3C_VA_MEM + (x)) | ||
16 | |||
17 | #define S3C64XX_SROM_BW S3C64XX_SROMREG(0) | ||
18 | #define S3C64XX_SROM_BC0 S3C64XX_SROMREG(4) | ||
19 | #define S3C64XX_SROM_BC1 S3C64XX_SROMREG(8) | ||
20 | #define S3C64XX_SROM_BC2 S3C64XX_SROMREG(0xc) | ||
21 | #define S3C64XX_SROM_BC3 S3C64XX_SROMREG(0x10) | ||
22 | #define S3C64XX_SROM_BC4 S3C64XX_SROMREG(0x14) | ||
23 | #define S3C64XX_SROM_BC5 S3C64XX_SROMREG(0x18) | ||
24 | |||
25 | /* | ||
26 | * one register BW holds 5 x 4-bit packed settings for NCS0 - NCS4 | ||
27 | */ | ||
28 | |||
29 | #define S3C64XX_SROM_BW__DATAWIDTH__SHIFT 0 | ||
30 | #define S3C64XX_SROM_BW__WAITENABLE__SHIFT 2 | ||
31 | #define S3C64XX_SROM_BW__BYTEENABLE__SHIFT 3 | ||
32 | #define S3C64XX_SROM_BW__CS_MASK 0xf | ||
33 | |||
34 | #define S3C64XX_SROM_BW__NCS0__SHIFT 0 | ||
35 | #define S3C64XX_SROM_BW__NCS1__SHIFT 4 | ||
36 | #define S3C64XX_SROM_BW__NCS2__SHIFT 8 | ||
37 | #define S3C64XX_SROM_BW__NCS3__SHIFT 0xc | ||
38 | #define S3C64XX_SROM_BW__NCS4__SHIFT 0x10 | ||
39 | |||
40 | /* | ||
41 | * applies to same to BCS0 - BCS4 | ||
42 | */ | ||
43 | |||
44 | #define S3C64XX_SROM_BCX__PMC__SHIFT 0 | ||
45 | #define S3C64XX_SROM_BCX__PMC__MASK 3 | ||
46 | #define S3C64XX_SROM_BCX__TACP__SHIFT 4 | ||
47 | #define S3C64XX_SROM_BCX__TACP__MASK 0xf | ||
48 | #define S3C64XX_SROM_BCX__TCAH__SHIFT 8 | ||
49 | #define S3C64XX_SROM_BCX__TCAH__MASK 0xf | ||
50 | #define S3C64XX_SROM_BCX__TCOH__SHIFT 12 | ||
51 | #define S3C64XX_SROM_BCX__TCOH__MASK 0xf | ||
52 | #define S3C64XX_SROM_BCX__TACC__SHIFT 16 | ||
53 | #define S3C64XX_SROM_BCX__TACC__MASK 0x1f | ||
54 | #define S3C64XX_SROM_BCX__TCOS__SHIFT 24 | ||
55 | #define S3C64XX_SROM_BCX__TCOS__MASK 0xf | ||
56 | #define S3C64XX_SROM_BCX__TACS__SHIFT 28 | ||
57 | #define S3C64XX_SROM_BCX__TACS__MASK 0xf | ||
58 | |||
59 | #endif /* _PLAT_REGS_SROM_H */ | ||