diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
commit | e4862f2f6f5653dfb67f3ba2b6f0bc74516ed51a (patch) | |
tree | 1db5a0540a4eecfad9b7daee476b985e82ddc810 /arch/arm/mach-s3c64xx | |
parent | ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (diff) | |
parent | b2c1e07b81a126e5846dfc3d36f559d861df59f4 (diff) |
Merge branch 'for-2.6.36' into for-2.6.37
Fairly simple conflicts, the most serious ones are the i.MX ones which I
suspect now need another rename.
Conflicts:
arch/arm/mach-mx2/clock_imx27.c
arch/arm/mach-mx2/devices.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom2.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/fsl/mpc5200_dma.h
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/pxa/spitz.c
Diffstat (limited to 'arch/arm/mach-s3c64xx')
25 files changed, 392 insertions, 109 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index f5a59727949f..1e4d78af7d84 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -57,11 +57,21 @@ config S3C64XX_SETUP_I2C1 | |||
57 | help | 57 | help |
58 | Common setup code for i2c bus 1. | 58 | Common setup code for i2c bus 1. |
59 | 59 | ||
60 | config S3C64XX_SETUP_IDE | ||
61 | bool | ||
62 | help | ||
63 | Common setup code for S3C64XX IDE. | ||
64 | |||
60 | config S3C64XX_SETUP_FB_24BPP | 65 | config S3C64XX_SETUP_FB_24BPP |
61 | bool | 66 | bool |
62 | help | 67 | help |
63 | Common setup code for S3C64XX with an 24bpp RGB display helper. | 68 | Common setup code for S3C64XX with an 24bpp RGB display helper. |
64 | 69 | ||
70 | config S3C64XX_SETUP_KEYPAD | ||
71 | bool | ||
72 | help | ||
73 | Common setup code for S3C64XX KEYPAD GPIO configurations | ||
74 | |||
65 | config S3C64XX_SETUP_SDHCI_GPIO | 75 | config S3C64XX_SETUP_SDHCI_GPIO |
66 | bool | 76 | bool |
67 | help | 77 | help |
@@ -88,6 +98,15 @@ config MACH_ANW6410 | |||
88 | help | 98 | help |
89 | Machine support for the A&W6410 | 99 | Machine support for the A&W6410 |
90 | 100 | ||
101 | config MACH_REAL6410 | ||
102 | bool "REAL6410" | ||
103 | select CPU_S3C6410 | ||
104 | select S3C_DEV_HSMMC | ||
105 | select S3C_DEV_HSMMC1 | ||
106 | select S3C64XX_SETUP_SDHCI | ||
107 | help | ||
108 | Machine support for the CoreWind REAL6410 | ||
109 | |||
91 | config MACH_SMDK6410 | 110 | config MACH_SMDK6410 |
92 | bool "SMDK6410" | 111 | bool "SMDK6410" |
93 | select CPU_S3C6410 | 112 | select CPU_S3C6410 |
@@ -95,15 +114,20 @@ config MACH_SMDK6410 | |||
95 | select S3C_DEV_HSMMC | 114 | select S3C_DEV_HSMMC |
96 | select S3C_DEV_HSMMC1 | 115 | select S3C_DEV_HSMMC1 |
97 | select S3C_DEV_I2C1 | 116 | select S3C_DEV_I2C1 |
117 | select SAMSUNG_DEV_IDE | ||
98 | select S3C_DEV_FB | 118 | select S3C_DEV_FB |
119 | select S3C_DEV_RTC | ||
99 | select SAMSUNG_DEV_TS | 120 | select SAMSUNG_DEV_TS |
100 | select S3C_DEV_USB_HOST | 121 | select S3C_DEV_USB_HOST |
101 | select S3C_DEV_USB_HSOTG | 122 | select S3C_DEV_USB_HSOTG |
102 | select S3C_DEV_WDT | 123 | select S3C_DEV_WDT |
124 | select SAMSUNG_DEV_KEYPAD | ||
103 | select HAVE_S3C2410_WATCHDOG | 125 | select HAVE_S3C2410_WATCHDOG |
104 | select S3C64XX_SETUP_SDHCI | 126 | select S3C64XX_SETUP_SDHCI |
105 | select S3C64XX_SETUP_I2C1 | 127 | select S3C64XX_SETUP_I2C1 |
128 | select S3C64XX_SETUP_IDE | ||
106 | select S3C64XX_SETUP_FB_24BPP | 129 | select S3C64XX_SETUP_FB_24BPP |
130 | select S3C64XX_SETUP_KEYPAD | ||
107 | help | 131 | help |
108 | Machine support for the Samsung SMDK6410 | 132 | Machine support for the Samsung SMDK6410 |
109 | 133 | ||
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile index 9d1006938f5c..90221a2e0c55 100644 --- a/arch/arm/mach-s3c64xx/Makefile +++ b/arch/arm/mach-s3c64xx/Makefile | |||
@@ -35,6 +35,8 @@ obj-$(CONFIG_S3C64XX_DMA) += dma.o | |||
35 | 35 | ||
36 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o | 36 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o |
37 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o | 37 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o |
38 | obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o | ||
39 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o | ||
38 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o | 40 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o |
39 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o | 41 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o |
40 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 42 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
@@ -50,6 +52,7 @@ obj-$(CONFIG_PM) += irq-pm.o | |||
50 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o | 52 | obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o |
51 | obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o | 53 | obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o |
52 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o | 54 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o |
55 | obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o | ||
53 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o | 56 | obj-$(CONFIG_MACH_NCP) += mach-ncp.o |
54 | obj-$(CONFIG_MACH_HMT) += mach-hmt.o | 57 | obj-$(CONFIG_MACH_HMT) += mach-hmt.o |
55 | obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o | 58 | obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o |
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index fbd85a9b7bbf..7e03f0ae2fc8 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -133,6 +133,12 @@ static struct clk init_clocks_disable[] = { | |||
133 | .id = -1, | 133 | .id = -1, |
134 | .parent = &clk_h, | 134 | .parent = &clk_h, |
135 | }, { | 135 | }, { |
136 | .name = "rtc", | ||
137 | .id = -1, | ||
138 | .parent = &clk_p, | ||
139 | .enable = s3c64xx_pclk_ctrl, | ||
140 | .ctrlbit = S3C_CLKCON_PCLK_RTC, | ||
141 | }, { | ||
136 | .name = "adc", | 142 | .name = "adc", |
137 | .id = -1, | 143 | .id = -1, |
138 | .parent = &clk_p, | 144 | .parent = &clk_p, |
@@ -165,6 +171,12 @@ static struct clk init_clocks_disable[] = { | |||
165 | .ctrlbit = S3C6410_CLKCON_PCLK_IIS2, | 171 | .ctrlbit = S3C6410_CLKCON_PCLK_IIS2, |
166 | }, { | 172 | }, { |
167 | #endif | 173 | #endif |
174 | .name = "keypad", | ||
175 | .id = -1, | ||
176 | .parent = &clk_p, | ||
177 | .enable = s3c64xx_pclk_ctrl, | ||
178 | .ctrlbit = S3C_CLKCON_PCLK_KEYPAD, | ||
179 | }, { | ||
168 | .name = "spi", | 180 | .name = "spi", |
169 | .id = 0, | 181 | .id = 0, |
170 | .parent = &clk_p, | 182 | .parent = &clk_p, |
@@ -295,12 +307,6 @@ static struct clk init_clocks[] = { | |||
295 | .enable = s3c64xx_pclk_ctrl, | 307 | .enable = s3c64xx_pclk_ctrl, |
296 | .ctrlbit = S3C_CLKCON_PCLK_UART3, | 308 | .ctrlbit = S3C_CLKCON_PCLK_UART3, |
297 | }, { | 309 | }, { |
298 | .name = "rtc", | ||
299 | .id = -1, | ||
300 | .parent = &clk_p, | ||
301 | .enable = s3c64xx_pclk_ctrl, | ||
302 | .ctrlbit = S3C_CLKCON_PCLK_RTC, | ||
303 | }, { | ||
304 | .name = "watchdog", | 310 | .name = "watchdog", |
305 | .id = -1, | 311 | .id = -1, |
306 | .parent = &clk_p, | 312 | .parent = &clk_p, |
@@ -310,6 +316,12 @@ static struct clk init_clocks[] = { | |||
310 | .id = -1, | 316 | .id = -1, |
311 | .parent = &clk_p, | 317 | .parent = &clk_p, |
312 | .ctrlbit = S3C_CLKCON_PCLK_AC97, | 318 | .ctrlbit = S3C_CLKCON_PCLK_AC97, |
319 | }, { | ||
320 | .name = "cfcon", | ||
321 | .id = -1, | ||
322 | .parent = &clk_h, | ||
323 | .enable = s3c64xx_hclk_ctrl, | ||
324 | .ctrlbit = S3C_CLKCON_HCLK_IHOST, | ||
313 | } | 325 | } |
314 | }; | 326 | }; |
315 | 327 | ||
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index 55ae1b0afae9..f0942585b9c1 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/gpio.h> | ||
15 | 16 | ||
16 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
17 | #include <mach/map.h> | 18 | #include <mach/map.h> |
18 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
19 | #include <mach/gpio.h> | ||
20 | 20 | ||
21 | #include <plat/devs.h> | 21 | #include <plat/devs.h> |
22 | #include <plat/audio.h> | 22 | #include <plat/audio.h> |
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c index 29c32d088515..a492b982aa06 100644 --- a/arch/arm/mach-s3c64xx/dev-spi.c +++ b/arch/arm/mach-s3c64xx/dev-spi.c | |||
@@ -12,10 +12,10 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/gpio.h> | ||
15 | 16 | ||
16 | #include <mach/dma.h> | 17 | #include <mach/dma.h> |
17 | #include <mach/map.h> | 18 | #include <mach/map.h> |
18 | #include <mach/gpio.h> | ||
19 | #include <mach/gpio-bank-c.h> | 19 | #include <mach/gpio-bank-c.h> |
20 | #include <mach/spi-clocks.h> | 20 | #include <mach/spi-clocks.h> |
21 | 21 | ||
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 5567e037b0d1..e7d03ab41d80 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -697,7 +697,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase, | |||
697 | chptr->number = chno; | 697 | chptr->number = chno; |
698 | chptr->dmac = dmac; | 698 | chptr->dmac = dmac; |
699 | chptr->regs = regptr; | 699 | chptr->regs = regptr; |
700 | regptr += PL008_Cx_STRIDE; | 700 | regptr += PL080_Cx_STRIDE; |
701 | } | 701 | } |
702 | 702 | ||
703 | /* for the moment, permanently enable the controller */ | 703 | /* for the moment, permanently enable the controller */ |
diff --git a/arch/arm/mach-s3c64xx/gpiolib.c b/arch/arm/mach-s3c64xx/gpiolib.c index 60c929a3cab6..300dee4a667b 100644 --- a/arch/arm/mach-s3c64xx/gpiolib.c +++ b/arch/arm/mach-s3c64xx/gpiolib.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/gpio.h> | ||
18 | 19 | ||
19 | #include <mach/map.h> | 20 | #include <mach/map.h> |
20 | #include <mach/gpio.h> | ||
21 | 21 | ||
22 | #include <plat/gpio-core.h> | 22 | #include <plat/gpio-core.h> |
23 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h index e1eab3c94aea..a1f13f02c841 100644 --- a/arch/arm/mach-s3c64xx/include/mach/map.h +++ b/arch/arm/mach-s3c64xx/include/mach/map.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) | 67 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) |
68 | #define S3C64XX_PA_WATCHDOG (0x7E004000) | 68 | #define S3C64XX_PA_WATCHDOG (0x7E004000) |
69 | #define S3C64XX_PA_RTC (0x7E005000) | 69 | #define S3C64XX_PA_RTC (0x7E005000) |
70 | #define S3C64XX_PA_KEYPAD (0x7E00A000) | ||
70 | #define S3C64XX_PA_ADC (0x7E00B000) | 71 | #define S3C64XX_PA_ADC (0x7E00B000) |
71 | #define S3C64XX_PA_SYSCON (0x7E00F000) | 72 | #define S3C64XX_PA_SYSCON (0x7E00F000) |
72 | #define S3C64XX_PA_AC97 (0x7F001000) | 73 | #define S3C64XX_PA_AC97 (0x7F001000) |
@@ -86,6 +87,9 @@ | |||
86 | #define S3C64XX_SZ_GPIO SZ_4K | 87 | #define S3C64XX_SZ_GPIO SZ_4K |
87 | 88 | ||
88 | #define S3C64XX_PA_SDRAM (0x50000000) | 89 | #define S3C64XX_PA_SDRAM (0x50000000) |
90 | |||
91 | #define S3C64XX_PA_CFCON (0x70300000) | ||
92 | |||
89 | #define S3C64XX_PA_VIC0 (0x71200000) | 93 | #define S3C64XX_PA_VIC0 (0x71200000) |
90 | #define S3C64XX_PA_VIC1 (0x71300000) | 94 | #define S3C64XX_PA_VIC1 (0x71300000) |
91 | 95 | ||
@@ -120,5 +124,7 @@ | |||
120 | #define S3C_PA_WDT S3C64XX_PA_WATCHDOG | 124 | #define S3C_PA_WDT S3C64XX_PA_WATCHDOG |
121 | 125 | ||
122 | #define SAMSUNG_PA_ADC S3C64XX_PA_ADC | 126 | #define SAMSUNG_PA_ADC S3C64XX_PA_ADC |
127 | #define SAMSUNG_PA_CFCON S3C64XX_PA_CFCON | ||
128 | #define SAMSUNG_PA_KEYPAD S3C64XX_PA_KEYPAD | ||
123 | 129 | ||
124 | #endif /* __ASM_ARCH_6400_MAP_H */ | 130 | #endif /* __ASM_ARCH_6400_MAP_H */ |
diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h index a3ac84a65480..42cc54e2ee30 100644 --- a/arch/arm/mach-s3c64xx/include/mach/memory.h +++ b/arch/arm/mach-s3c64xx/include/mach/memory.h | |||
@@ -15,4 +15,6 @@ | |||
15 | 15 | ||
16 | #define PHYS_OFFSET UL(0x50000000) | 16 | #define PHYS_OFFSET UL(0x50000000) |
17 | 17 | ||
18 | #define CONSISTENT_DMA_SIZE SZ_8M | ||
19 | |||
18 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h index 0114eb0c1fe7..05332b998ec0 100644 --- a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h +++ b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define S3C_SCLK_GATE S3C_CLKREG(0x38) | 34 | #define S3C_SCLK_GATE S3C_CLKREG(0x38) |
35 | #define S3C_MEM0_GATE S3C_CLKREG(0x3C) | 35 | #define S3C_MEM0_GATE S3C_CLKREG(0x3C) |
36 | #define S3C6410_CLK_SRC2 S3C_CLKREG(0x10C) | 36 | #define S3C6410_CLK_SRC2 S3C_CLKREG(0x10C) |
37 | #define S3C_MEM_SYS_CFG S3C_CLKREG(0x120) | ||
37 | 38 | ||
38 | /* CLKDIV0 */ | 39 | /* CLKDIV0 */ |
39 | #define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12) | 40 | #define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12) |
@@ -154,4 +155,8 @@ | |||
154 | #define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2) | 155 | #define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2) |
155 | #define S3C6400_CLKSRC_MFC (1 << 4) | 156 | #define S3C6400_CLKSRC_MFC (1 << 4) |
156 | 157 | ||
158 | /* MEM_SYS_CFG */ | ||
159 | #define MEM_SYS_CFG_INDEP_CF 0x4000 | ||
160 | #define MEM_SYS_CFG_EBI_FIX_PRI_CFCON 0x30 | ||
161 | |||
157 | #endif /* _PLAT_REGS_CLOCK_H */ | 162 | #endif /* _PLAT_REGS_CLOCK_H */ |
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h index f56611526c63..a06ee0af9a4b 100644 --- a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h +++ b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h | |||
@@ -18,24 +18,4 @@ | |||
18 | 18 | ||
19 | #include <plat/regs-fb-v4.h> | 19 | #include <plat/regs-fb-v4.h> |
20 | 20 | ||
21 | /* Palette registers */ | ||
22 | #define WIN2_PAL(_entry) (0x300 + ((_entry) * 2)) | ||
23 | #define WIN3_PAL(_entry) (0x320 + ((_entry) * 2)) | ||
24 | #define WIN4_PAL(_entry) (0x340 + ((_entry) * 2)) | ||
25 | #define WIN0_PAL(_entry) (0x400 + ((_entry) * 4)) | ||
26 | #define WIN1_PAL(_entry) (0x800 + ((_entry) * 4)) | ||
27 | |||
28 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) | ||
29 | { | ||
30 | switch (window) { | ||
31 | case 0: return WIN0_PAL(reg); | ||
32 | case 1: return WIN1_PAL(reg); | ||
33 | case 2: return WIN2_PAL(reg); | ||
34 | case 3: return WIN3_PAL(reg); | ||
35 | case 4: return WIN4_PAL(reg); | ||
36 | } | ||
37 | |||
38 | BUG(); | ||
39 | } | ||
40 | |||
41 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ | 21 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ |
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 4a0bb243d14a..742dc87bd9c1 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -134,7 +134,6 @@ static struct platform_device anw6410_lcd_powerdev = { | |||
134 | static struct s3c_fb_pd_win anw6410_fb_win0 = { | 134 | static struct s3c_fb_pd_win anw6410_fb_win0 = { |
135 | /* this is to ensure we use win0 */ | 135 | /* this is to ensure we use win0 */ |
136 | .win_mode = { | 136 | .win_mode = { |
137 | .pixclock = 41094, | ||
138 | .left_margin = 8, | 137 | .left_margin = 8, |
139 | .right_margin = 13, | 138 | .right_margin = 13, |
140 | .upper_margin = 7, | 139 | .upper_margin = 7, |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 187441a78dd5..fba90229f0df 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -128,7 +128,6 @@ static struct platform_device hmt_backlight_device = { | |||
128 | 128 | ||
129 | static struct s3c_fb_pd_win hmt_fb_win0 = { | 129 | static struct s3c_fb_pd_win hmt_fb_win0 = { |
130 | .win_mode = { | 130 | .win_mode = { |
131 | .pixclock = 41094, | ||
132 | .left_margin = 8, | 131 | .left_margin = 8, |
133 | .right_margin = 13, | 132 | .right_margin = 13, |
134 | .upper_margin = 7, | 133 | .upper_margin = 7, |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c new file mode 100644 index 000000000000..5c07d013b23d --- /dev/null +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -0,0 +1,152 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/mach-real6410.c | ||
2 | * | ||
3 | * Copyright 2010 Darius Augulis <augulis.darius@gmail.com> | ||
4 | * Copyright 2008 Openmoko, Inc. | ||
5 | * Copyright 2008 Simtec Electronics | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * http://armlinux.simtec.co.uk/ | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/list.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/dm9000.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | #include <mach/map.h> | ||
27 | #include <mach/s3c6410.h> | ||
28 | #include <mach/regs-srom.h> | ||
29 | #include <plat/cpu.h> | ||
30 | #include <plat/devs.h> | ||
31 | #include <plat/regs-serial.h> | ||
32 | |||
33 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | ||
34 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | ||
35 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | ||
36 | |||
37 | static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = { | ||
38 | [0] = { | ||
39 | .hwport = 0, | ||
40 | .flags = 0, | ||
41 | .ucon = UCON, | ||
42 | .ulcon = ULCON, | ||
43 | .ufcon = UFCON, | ||
44 | }, | ||
45 | [1] = { | ||
46 | .hwport = 1, | ||
47 | .flags = 0, | ||
48 | .ucon = UCON, | ||
49 | .ulcon = ULCON, | ||
50 | .ufcon = UFCON, | ||
51 | }, | ||
52 | [2] = { | ||
53 | .hwport = 2, | ||
54 | .flags = 0, | ||
55 | .ucon = UCON, | ||
56 | .ulcon = ULCON, | ||
57 | .ufcon = UFCON, | ||
58 | }, | ||
59 | [3] = { | ||
60 | .hwport = 3, | ||
61 | .flags = 0, | ||
62 | .ucon = UCON, | ||
63 | .ulcon = ULCON, | ||
64 | .ufcon = UFCON, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | /* DM9000AEP 10/100 ethernet controller */ | ||
69 | |||
70 | static struct resource real6410_dm9k_resource[] = { | ||
71 | [0] = { | ||
72 | .start = S3C64XX_PA_XM0CSN1, | ||
73 | .end = S3C64XX_PA_XM0CSN1 + 1, | ||
74 | .flags = IORESOURCE_MEM | ||
75 | }, | ||
76 | [1] = { | ||
77 | .start = S3C64XX_PA_XM0CSN1 + 4, | ||
78 | .end = S3C64XX_PA_XM0CSN1 + 5, | ||
79 | .flags = IORESOURCE_MEM | ||
80 | }, | ||
81 | [2] = { | ||
82 | .start = S3C_EINT(7), | ||
83 | .end = S3C_EINT(7), | ||
84 | .flags = IORESOURCE_IRQ, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct dm9000_plat_data real6410_dm9k_pdata = { | ||
89 | .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), | ||
90 | }; | ||
91 | |||
92 | static struct platform_device real6410_device_eth = { | ||
93 | .name = "dm9000", | ||
94 | .id = -1, | ||
95 | .num_resources = ARRAY_SIZE(real6410_dm9k_resource), | ||
96 | .resource = real6410_dm9k_resource, | ||
97 | .dev = { | ||
98 | .platform_data = &real6410_dm9k_pdata, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | static struct platform_device *real6410_devices[] __initdata = { | ||
103 | &real6410_device_eth, | ||
104 | &s3c_device_hsmmc0, | ||
105 | &s3c_device_hsmmc1, | ||
106 | }; | ||
107 | |||
108 | static void __init real6410_map_io(void) | ||
109 | { | ||
110 | s3c64xx_init_io(NULL, 0); | ||
111 | s3c24xx_init_clocks(12000000); | ||
112 | s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); | ||
113 | } | ||
114 | |||
115 | static void __init real6410_machine_init(void) | ||
116 | { | ||
117 | u32 cs1; | ||
118 | |||
119 | /* configure nCS1 width to 16 bits */ | ||
120 | |||
121 | cs1 = __raw_readl(S3C64XX_SROM_BW) & | ||
122 | ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT); | ||
123 | cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) | | ||
124 | (1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) | | ||
125 | (1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) << | ||
126 | S3C64XX_SROM_BW__NCS1__SHIFT; | ||
127 | __raw_writel(cs1, S3C64XX_SROM_BW); | ||
128 | |||
129 | /* set timing for nCS1 suitable for ethernet chip */ | ||
130 | |||
131 | __raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) | | ||
132 | (6 << S3C64XX_SROM_BCX__TACP__SHIFT) | | ||
133 | (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) | | ||
134 | (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) | | ||
135 | (13 << S3C64XX_SROM_BCX__TACC__SHIFT) | | ||
136 | (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) | | ||
137 | (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1); | ||
138 | |||
139 | platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices)); | ||
140 | } | ||
141 | |||
142 | MACHINE_START(REAL6410, "REAL6410") | ||
143 | /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ | ||
144 | .phys_io = S3C_PA_UART & 0xfff00000, | ||
145 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | ||
146 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | ||
147 | |||
148 | .init_irq = s3c6410_init_irq, | ||
149 | .map_io = real6410_map_io, | ||
150 | .init_machine = real6410_machine_init, | ||
151 | .timer = &s3c24xx_timer, | ||
152 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index 028d080dcd35..3a9639bc3d9b 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/pwm_backlight.h> | 17 | #include <linux/pwm_backlight.h> |
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | #include <linux/spi/spi_gpio.h> | ||
19 | #include <linux/usb/gpio_vbus.h> | 20 | #include <linux/usb/gpio_vbus.h> |
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -166,7 +167,7 @@ static struct s3c2410_ts_mach_info smartq_touchscreen_pdata __initdata = { | |||
166 | 167 | ||
167 | static struct s3c_sdhci_platdata smartq_internal_hsmmc_pdata = { | 168 | static struct s3c_sdhci_platdata smartq_internal_hsmmc_pdata = { |
168 | .max_width = 4, | 169 | .max_width = 4, |
169 | /*.broken_card_detection = true,*/ | 170 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
170 | }; | 171 | }; |
171 | 172 | ||
172 | static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { | 173 | static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { |
@@ -184,6 +185,33 @@ static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { | |||
184 | }, | 185 | }, |
185 | }; | 186 | }; |
186 | 187 | ||
188 | static int __init smartq_lcd_setup_gpio(void) | ||
189 | { | ||
190 | int ret; | ||
191 | |||
192 | ret = gpio_request(S3C64XX_GPM(3), "LCD power"); | ||
193 | if (ret < 0) | ||
194 | return ret; | ||
195 | |||
196 | /* turn power off */ | ||
197 | gpio_direction_output(S3C64XX_GPM(3), 0); | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | /* GPM0 -> CS */ | ||
203 | static struct spi_gpio_platform_data smartq_lcd_control = { | ||
204 | .sck = S3C64XX_GPM(1), | ||
205 | .mosi = S3C64XX_GPM(2), | ||
206 | .miso = S3C64XX_GPM(2), | ||
207 | }; | ||
208 | |||
209 | static struct platform_device smartq_lcd_control_device = { | ||
210 | .name = "spi-gpio", | ||
211 | .id = 1, | ||
212 | .dev.platform_data = &smartq_lcd_control, | ||
213 | }; | ||
214 | |||
187 | static void smartq_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | 215 | static void smartq_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) |
188 | { | 216 | { |
189 | gpio_direction_output(S3C64XX_GPM(3), power); | 217 | gpio_direction_output(S3C64XX_GPM(3), power); |
@@ -199,6 +227,9 @@ static struct platform_device smartq_lcd_power_device = { | |||
199 | .dev.platform_data = &smartq_lcd_power_data, | 227 | .dev.platform_data = &smartq_lcd_power_data, |
200 | }; | 228 | }; |
201 | 229 | ||
230 | static struct i2c_board_info smartq_i2c_devs[] __initdata = { | ||
231 | { I2C_BOARD_INFO("wm8987", 0x1a), }, | ||
232 | }; | ||
202 | 233 | ||
203 | static struct platform_device *smartq_devices[] __initdata = { | 234 | static struct platform_device *smartq_devices[] __initdata = { |
204 | &s3c_device_hsmmc1, /* Init iNAND first, ... */ | 235 | &s3c_device_hsmmc1, /* Init iNAND first, ... */ |
@@ -213,7 +244,9 @@ static struct platform_device *smartq_devices[] __initdata = { | |||
213 | &s3c_device_timer[1], | 244 | &s3c_device_timer[1], |
214 | &s3c_device_ts, | 245 | &s3c_device_ts, |
215 | &s3c_device_usb_hsotg, | 246 | &s3c_device_usb_hsotg, |
247 | &s3c64xx_device_iis0, | ||
216 | &smartq_backlight_device, | 248 | &smartq_backlight_device, |
249 | &smartq_lcd_control_device, | ||
217 | &smartq_lcd_power_device, | 250 | &smartq_lcd_power_device, |
218 | &smartq_usb_otg_vbus_dev, | 251 | &smartq_usb_otg_vbus_dev, |
219 | }; | 252 | }; |
@@ -252,7 +285,6 @@ static int __init smartq_power_off_init(void) | |||
252 | /* leave power on */ | 285 | /* leave power on */ |
253 | gpio_direction_output(S3C64XX_GPK(15), 0); | 286 | gpio_direction_output(S3C64XX_GPK(15), 0); |
254 | 287 | ||
255 | |||
256 | pm_power_off = smartq_power_off; | 288 | pm_power_off = smartq_power_off; |
257 | 289 | ||
258 | return ret; | 290 | return ret; |
@@ -354,6 +386,10 @@ void __init smartq_machine_init(void) | |||
354 | s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); | 386 | s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); |
355 | s3c24xx_ts_set_platdata(&smartq_touchscreen_pdata); | 387 | s3c24xx_ts_set_platdata(&smartq_touchscreen_pdata); |
356 | 388 | ||
389 | i2c_register_board_info(0, smartq_i2c_devs, | ||
390 | ARRAY_SIZE(smartq_i2c_devs)); | ||
391 | |||
392 | WARN_ON(smartq_lcd_setup_gpio()); | ||
357 | WARN_ON(smartq_power_off_init()); | 393 | WARN_ON(smartq_power_off_init()); |
358 | WARN_ON(smartq_usb_host_init()); | 394 | WARN_ON(smartq_usb_host_init()); |
359 | WARN_ON(smartq_usb_otg_init()); | 395 | WARN_ON(smartq_usb_otg_init()); |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 1d0326ead90f..a4d59b076e3d 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/fb.h> | 12 | #include <linux/fb.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/gpio_keys.h> | 14 | #include <linux/gpio_keys.h> |
15 | #include <linux/i2c-gpio.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/input.h> | 16 | #include <linux/input.h> |
18 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
@@ -33,31 +32,6 @@ | |||
33 | 32 | ||
34 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
35 | 34 | ||
36 | static void __init smartq5_lcd_setup_gpio(void) | ||
37 | { | ||
38 | gpio_request(S3C64XX_GPM(0), "LCD SCEN pin"); | ||
39 | gpio_request(S3C64XX_GPM(1), "LCD SCL pin"); | ||
40 | gpio_request(S3C64XX_GPM(2), "LCD SDA pin"); | ||
41 | gpio_request(S3C64XX_GPM(3), "LCD power"); | ||
42 | |||
43 | /* turn power off */ | ||
44 | gpio_direction_output(S3C64XX_GPM(0), 1); | ||
45 | gpio_direction_input(S3C64XX_GPM(1)); | ||
46 | gpio_direction_input(S3C64XX_GPM(2)); | ||
47 | gpio_direction_output(S3C64XX_GPM(3), 0); | ||
48 | } | ||
49 | |||
50 | static struct i2c_gpio_platform_data smartq5_lcd_control = { | ||
51 | .sda_pin = S3C64XX_GPM(2), | ||
52 | .scl_pin = S3C64XX_GPM(1), | ||
53 | }; | ||
54 | |||
55 | static struct platform_device smartq5_lcd_control_device = { | ||
56 | .name = "i2c-gpio", | ||
57 | .id = 1, | ||
58 | .dev.platform_data = &smartq5_lcd_control, | ||
59 | }; | ||
60 | |||
61 | static struct gpio_led smartq5_leds[] __initdata = { | 35 | static struct gpio_led smartq5_leds[] __initdata = { |
62 | { | 36 | { |
63 | .name = "smartq5:green", | 37 | .name = "smartq5:green", |
@@ -134,16 +108,15 @@ static struct platform_device smartq5_buttons_device = { | |||
134 | 108 | ||
135 | static struct s3c_fb_pd_win smartq5_fb_win0 = { | 109 | static struct s3c_fb_pd_win smartq5_fb_win0 = { |
136 | .win_mode = { | 110 | .win_mode = { |
137 | .pixclock = 1000000000000ULL / | 111 | .left_margin = 216, |
138 | ((40+1+216+800)*(10+1+35+480)*80), | 112 | .right_margin = 40, |
139 | .left_margin = 40, | 113 | .upper_margin = 35, |
140 | .right_margin = 216, | 114 | .lower_margin = 10, |
141 | .upper_margin = 10, | ||
142 | .lower_margin = 35, | ||
143 | .hsync_len = 1, | 115 | .hsync_len = 1, |
144 | .vsync_len = 1, | 116 | .vsync_len = 1, |
145 | .xres = 800, | 117 | .xres = 800, |
146 | .yres = 480, | 118 | .yres = 480, |
119 | .refresh = 80, | ||
147 | }, | 120 | }, |
148 | .max_bpp = 32, | 121 | .max_bpp = 32, |
149 | .default_bpp = 16, | 122 | .default_bpp = 16, |
@@ -160,7 +133,6 @@ static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = { | |||
160 | static struct platform_device *smartq5_devices[] __initdata = { | 133 | static struct platform_device *smartq5_devices[] __initdata = { |
161 | &smartq5_leds_device, | 134 | &smartq5_leds_device, |
162 | &smartq5_buttons_device, | 135 | &smartq5_buttons_device, |
163 | &smartq5_lcd_control_device, | ||
164 | }; | 136 | }; |
165 | 137 | ||
166 | static void __init smartq5_machine_init(void) | 138 | static void __init smartq5_machine_init(void) |
@@ -168,7 +140,6 @@ static void __init smartq5_machine_init(void) | |||
168 | s3c_fb_set_platdata(&smartq5_lcd_pdata); | 140 | s3c_fb_set_platdata(&smartq5_lcd_pdata); |
169 | 141 | ||
170 | smartq_machine_init(); | 142 | smartq_machine_init(); |
171 | smartq5_lcd_setup_gpio(); | ||
172 | 143 | ||
173 | platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices)); | 144 | platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices)); |
174 | } | 145 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index e0bc78ecb156..e50a7d781732 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/fb.h> | 12 | #include <linux/fb.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/gpio_keys.h> | 14 | #include <linux/gpio_keys.h> |
15 | #include <linux/i2c-gpio.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/input.h> | 16 | #include <linux/input.h> |
18 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
@@ -33,31 +32,6 @@ | |||
33 | 32 | ||
34 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
35 | 34 | ||
36 | static void __init smartq7_lcd_setup_gpio(void) | ||
37 | { | ||
38 | gpio_request(S3C64XX_GPM(0), "LCD CSB pin"); | ||
39 | gpio_request(S3C64XX_GPM(3), "LCD power"); | ||
40 | gpio_request(S3C64XX_GPM(4), "LCD power status"); | ||
41 | |||
42 | /* turn power off */ | ||
43 | gpio_direction_output(S3C64XX_GPM(0), 1); | ||
44 | gpio_direction_output(S3C64XX_GPM(3), 0); | ||
45 | gpio_direction_input(S3C64XX_GPM(4)); | ||
46 | } | ||
47 | |||
48 | static struct i2c_gpio_platform_data smartq7_lcd_control = { | ||
49 | .sda_pin = S3C64XX_GPM(2), | ||
50 | .scl_pin = S3C64XX_GPM(1), | ||
51 | .sda_is_open_drain = 1, | ||
52 | .scl_is_open_drain = 1, | ||
53 | }; | ||
54 | |||
55 | static struct platform_device smartq7_lcd_control_device = { | ||
56 | .name = "i2c-gpio", | ||
57 | .id = 1, | ||
58 | .dev.platform_data = &smartq7_lcd_control, | ||
59 | }; | ||
60 | |||
61 | static struct gpio_led smartq7_leds[] __initdata = { | 35 | static struct gpio_led smartq7_leds[] __initdata = { |
62 | { | 36 | { |
63 | .name = "smartq7:red", | 37 | .name = "smartq7:red", |
@@ -150,8 +124,6 @@ static struct platform_device smartq7_buttons_device = { | |||
150 | 124 | ||
151 | static struct s3c_fb_pd_win smartq7_fb_win0 = { | 125 | static struct s3c_fb_pd_win smartq7_fb_win0 = { |
152 | .win_mode = { | 126 | .win_mode = { |
153 | .pixclock = 1000000000000ULL / | ||
154 | ((3+10+5+800)*(1+3+20+480)*80), | ||
155 | .left_margin = 3, | 127 | .left_margin = 3, |
156 | .right_margin = 5, | 128 | .right_margin = 5, |
157 | .upper_margin = 1, | 129 | .upper_margin = 1, |
@@ -160,6 +132,7 @@ static struct s3c_fb_pd_win smartq7_fb_win0 = { | |||
160 | .vsync_len = 3, | 132 | .vsync_len = 3, |
161 | .xres = 800, | 133 | .xres = 800, |
162 | .yres = 480, | 134 | .yres = 480, |
135 | .refresh = 80, | ||
163 | }, | 136 | }, |
164 | .max_bpp = 32, | 137 | .max_bpp = 32, |
165 | .default_bpp = 16, | 138 | .default_bpp = 16, |
@@ -176,7 +149,6 @@ static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = { | |||
176 | static struct platform_device *smartq7_devices[] __initdata = { | 149 | static struct platform_device *smartq7_devices[] __initdata = { |
177 | &smartq7_leds_device, | 150 | &smartq7_leds_device, |
178 | &smartq7_buttons_device, | 151 | &smartq7_buttons_device, |
179 | &smartq7_lcd_control_device, | ||
180 | }; | 152 | }; |
181 | 153 | ||
182 | static void __init smartq7_machine_init(void) | 154 | static void __init smartq7_machine_init(void) |
@@ -184,7 +156,6 @@ static void __init smartq7_machine_init(void) | |||
184 | s3c_fb_set_platdata(&smartq7_lcd_pdata); | 156 | s3c_fb_set_platdata(&smartq7_lcd_pdata); |
185 | 157 | ||
186 | smartq_machine_init(); | 158 | smartq_machine_init(); |
187 | smartq7_lcd_setup_gpio(); | ||
188 | 159 | ||
189 | platform_add_devices(smartq7_devices, ARRAY_SIZE(smartq7_devices)); | 160 | platform_add_devices(smartq7_devices, ARRAY_SIZE(smartq7_devices)); |
190 | } | 161 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 362fc76ee726..ecbddd377cb8 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/input.h> | ||
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -56,6 +57,7 @@ | |||
56 | #include <mach/regs-gpio.h> | 57 | #include <mach/regs-gpio.h> |
57 | #include <mach/regs-sys.h> | 58 | #include <mach/regs-sys.h> |
58 | #include <mach/regs-srom.h> | 59 | #include <mach/regs-srom.h> |
60 | #include <plat/ata.h> | ||
59 | #include <plat/iic.h> | 61 | #include <plat/iic.h> |
60 | #include <plat/fb.h> | 62 | #include <plat/fb.h> |
61 | #include <plat/gpio-cfg.h> | 63 | #include <plat/gpio-cfg.h> |
@@ -66,6 +68,7 @@ | |||
66 | #include <plat/cpu.h> | 68 | #include <plat/cpu.h> |
67 | #include <plat/adc.h> | 69 | #include <plat/adc.h> |
68 | #include <plat/ts.h> | 70 | #include <plat/ts.h> |
71 | #include <plat/keypad.h> | ||
69 | 72 | ||
70 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 73 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
71 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 74 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
@@ -141,7 +144,6 @@ static struct platform_device smdk6410_lcd_powerdev = { | |||
141 | static struct s3c_fb_pd_win smdk6410_fb_win0 = { | 144 | static struct s3c_fb_pd_win smdk6410_fb_win0 = { |
142 | /* this is to ensure we use win0 */ | 145 | /* this is to ensure we use win0 */ |
143 | .win_mode = { | 146 | .win_mode = { |
144 | .pixclock = 41094, | ||
145 | .left_margin = 8, | 147 | .left_margin = 8, |
146 | .right_margin = 13, | 148 | .right_margin = 13, |
147 | .upper_margin = 7, | 149 | .upper_margin = 7, |
@@ -153,6 +155,8 @@ static struct s3c_fb_pd_win smdk6410_fb_win0 = { | |||
153 | }, | 155 | }, |
154 | .max_bpp = 32, | 156 | .max_bpp = 32, |
155 | .default_bpp = 16, | 157 | .default_bpp = 16, |
158 | .virtual_y = 480 * 2, | ||
159 | .virtual_x = 800, | ||
156 | }; | 160 | }; |
157 | 161 | ||
158 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ | 162 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ |
@@ -242,6 +246,29 @@ static struct platform_device smdk6410_b_pwr_5v = { | |||
242 | }; | 246 | }; |
243 | #endif | 247 | #endif |
244 | 248 | ||
249 | static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = { | ||
250 | .setup_gpio = s3c64xx_ide_setup_gpio, | ||
251 | }; | ||
252 | |||
253 | static uint32_t smdk6410_keymap[] __initdata = { | ||
254 | /* KEY(row, col, keycode) */ | ||
255 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
256 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
257 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
258 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
259 | }; | ||
260 | |||
261 | static struct matrix_keymap_data smdk6410_keymap_data __initdata = { | ||
262 | .keymap = smdk6410_keymap, | ||
263 | .keymap_size = ARRAY_SIZE(smdk6410_keymap), | ||
264 | }; | ||
265 | |||
266 | static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | ||
267 | .keymap_data = &smdk6410_keymap_data, | ||
268 | .rows = 2, | ||
269 | .cols = 8, | ||
270 | }; | ||
271 | |||
245 | static struct map_desc smdk6410_iodesc[] = {}; | 272 | static struct map_desc smdk6410_iodesc[] = {}; |
246 | 273 | ||
247 | static struct platform_device *smdk6410_devices[] __initdata = { | 274 | static struct platform_device *smdk6410_devices[] __initdata = { |
@@ -258,6 +285,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
258 | &s3c_device_usb_hsotg, | 285 | &s3c_device_usb_hsotg, |
259 | &s3c_device_pcm, | 286 | &s3c_device_pcm, |
260 | &s3c64xx_device_iisv4, | 287 | &s3c64xx_device_iisv4, |
288 | &samsung_device_keypad, | ||
261 | 289 | ||
262 | #ifdef CONFIG_REGULATOR | 290 | #ifdef CONFIG_REGULATOR |
263 | &smdk6410_b_pwr_5v, | 291 | &smdk6410_b_pwr_5v, |
@@ -266,6 +294,8 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
266 | 294 | ||
267 | &smdk6410_smsc911x, | 295 | &smdk6410_smsc911x, |
268 | &s3c_device_adc, | 296 | &s3c_device_adc, |
297 | &s3c_device_cfcon, | ||
298 | &s3c_device_rtc, | ||
269 | &s3c_device_ts, | 299 | &s3c_device_ts, |
270 | &s3c_device_wdt, | 300 | &s3c_device_wdt, |
271 | }; | 301 | }; |
@@ -637,6 +667,8 @@ static void __init smdk6410_machine_init(void) | |||
637 | s3c_i2c1_set_platdata(NULL); | 667 | s3c_i2c1_set_platdata(NULL); |
638 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | 668 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); |
639 | 669 | ||
670 | samsung_keypad_set_platdata(&smdk6410_keypad_data); | ||
671 | |||
640 | s3c24xx_ts_set_platdata(&s3c_ts_platform); | 672 | s3c24xx_ts_set_platdata(&s3c_ts_platform); |
641 | 673 | ||
642 | /* configure nCS1 width to 16 bits */ | 674 | /* configure nCS1 width to 16 bits */ |
@@ -666,6 +698,8 @@ static void __init smdk6410_machine_init(void) | |||
666 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | 698 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); |
667 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 699 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
668 | 700 | ||
701 | s3c_ide_set_platdata(&smdk6410_ide_pdata); | ||
702 | |||
669 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 703 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
670 | } | 704 | } |
671 | 705 | ||
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c index 014401c39f36..312aa6b115e8 100644 --- a/arch/arm/mach-s3c64xx/s3c6410.c +++ b/arch/arm/mach-s3c64xx/s3c6410.c | |||
@@ -37,8 +37,9 @@ | |||
37 | #include <plat/devs.h> | 37 | #include <plat/devs.h> |
38 | #include <plat/clock.h> | 38 | #include <plat/clock.h> |
39 | #include <plat/sdhci.h> | 39 | #include <plat/sdhci.h> |
40 | #include <plat/ata-core.h> | ||
41 | #include <plat/adc-core.h> | ||
40 | #include <plat/iic-core.h> | 42 | #include <plat/iic-core.h> |
41 | #include <plat/adc.h> | ||
42 | #include <plat/onenand-core.h> | 43 | #include <plat/onenand-core.h> |
43 | #include <mach/s3c6400.h> | 44 | #include <mach/s3c6400.h> |
44 | #include <mach/s3c6410.h> | 45 | #include <mach/s3c6410.h> |
@@ -54,10 +55,11 @@ void __init s3c6410_map_io(void) | |||
54 | s3c_i2c0_setname("s3c2440-i2c"); | 55 | s3c_i2c0_setname("s3c2440-i2c"); |
55 | s3c_i2c1_setname("s3c2440-i2c"); | 56 | s3c_i2c1_setname("s3c2440-i2c"); |
56 | 57 | ||
57 | s3c_device_adc.name = "s3c64xx-adc"; | 58 | s3c_adc_setname("s3c64xx-adc"); |
58 | s3c_device_nand.name = "s3c6400-nand"; | 59 | s3c_device_nand.name = "s3c6400-nand"; |
59 | s3c_onenand_setname("s3c6410-onenand"); | 60 | s3c_onenand_setname("s3c6410-onenand"); |
60 | s3c64xx_onenand1_setname("s3c6410-onenand"); | 61 | s3c64xx_onenand1_setname("s3c6410-onenand"); |
62 | s3c_cfcon_setname("s3c64xx-pata"); | ||
61 | } | 63 | } |
62 | 64 | ||
63 | void __init s3c6410_init_clocks(int xtal) | 65 | void __init s3c6410_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c index 8e28e448dd20..000736877df2 100644 --- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c +++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/gpio.h> | ||
18 | 19 | ||
19 | #include <mach/regs-fb.h> | 20 | #include <mach/regs-fb.h> |
20 | #include <mach/gpio.h> | ||
21 | #include <plat/fb.h> | 21 | #include <plat/fb.h> |
22 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
23 | 23 | ||
diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c64xx/setup-i2c0.c index d1b11e6e77e8..406192a43c6e 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c0.c +++ b/arch/arm/mach-s3c64xx/setup-i2c0.c | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/gpio.h> | ||
17 | 18 | ||
18 | struct platform_device; /* don't need the contents */ | 19 | struct platform_device; /* don't need the contents */ |
19 | 20 | ||
20 | #include <mach/gpio.h> | ||
21 | #include <mach/gpio-bank-b.h> | 21 | #include <mach/gpio-bank-b.h> |
22 | #include <plat/iic.h> | 22 | #include <plat/iic.h> |
23 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c64xx/setup-i2c1.c index 2dce57d8c6f8..1ee62c97cd7f 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c1.c +++ b/arch/arm/mach-s3c64xx/setup-i2c1.c | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/gpio.h> | ||
17 | 18 | ||
18 | struct platform_device; /* don't need the contents */ | 19 | struct platform_device; /* don't need the contents */ |
19 | 20 | ||
20 | #include <mach/gpio.h> | ||
21 | #include <mach/gpio-bank-b.h> | 21 | #include <mach/gpio-bank-b.h> |
22 | #include <plat/iic.h> | 22 | #include <plat/iic.h> |
23 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/mach-s3c64xx/setup-ide.c b/arch/arm/mach-s3c64xx/setup-ide.c new file mode 100644 index 000000000000..c12c315f33bc --- /dev/null +++ b/arch/arm/mach-s3c64xx/setup-ide.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/setup-ide.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S3C64XX setup information for IDE | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/gpio.h> | ||
15 | #include <linux/io.h> | ||
16 | |||
17 | #include <mach/map.h> | ||
18 | #include <mach/regs-clock.h> | ||
19 | #include <plat/gpio-cfg.h> | ||
20 | |||
21 | void s3c64xx_ide_setup_gpio(void) | ||
22 | { | ||
23 | u32 reg; | ||
24 | u32 gpio = 0; | ||
25 | |||
26 | reg = readl(S3C_MEM_SYS_CFG) & (~0x3f); | ||
27 | |||
28 | /* Independent CF interface, CF chip select configuration */ | ||
29 | writel(reg | MEM_SYS_CFG_INDEP_CF | | ||
30 | MEM_SYS_CFG_EBI_FIX_PRI_CFCON, S3C_MEM_SYS_CFG); | ||
31 | |||
32 | s3c_gpio_cfgpin(S3C64XX_GPB(4), S3C_GPIO_SFN(4)); | ||
33 | |||
34 | /* Set XhiDATA[15:0] pins as CF Data[15:0] */ | ||
35 | for (gpio = S3C64XX_GPK(0); gpio <= S3C64XX_GPK(15); gpio++) | ||
36 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(5)); | ||
37 | |||
38 | /* Set XhiADDR[2:0] pins as CF ADDR[2:0] */ | ||
39 | for (gpio = S3C64XX_GPL(0); gpio <= S3C64XX_GPL(2); gpio++) | ||
40 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(6)); | ||
41 | |||
42 | /* Set Xhi ctrl pins as CF ctrl pins(IORDY, IOWR, IORD, CE[0:1]) */ | ||
43 | s3c_gpio_cfgpin(S3C64XX_GPM(5), S3C_GPIO_SFN(1)); | ||
44 | for (gpio = S3C64XX_GPM(0); gpio <= S3C64XX_GPM(4); gpio++) | ||
45 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(6)); | ||
46 | } | ||
diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c64xx/setup-keypad.c new file mode 100644 index 000000000000..abc34e4e1a93 --- /dev/null +++ b/arch/arm/mach-s3c64xx/setup-keypad.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/setup-keypad.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * GPIO configuration for S3C64XX KeyPad device | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/gpio.h> | ||
14 | #include <plat/gpio-cfg.h> | ||
15 | |||
16 | void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | ||
17 | { | ||
18 | unsigned int gpio; | ||
19 | unsigned int end; | ||
20 | |||
21 | /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */ | ||
22 | end = S3C64XX_GPK(8 + rows); | ||
23 | for (gpio = S3C64XX_GPK(8); gpio < end; gpio++) { | ||
24 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | ||
25 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
26 | } | ||
27 | |||
28 | /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */ | ||
29 | end = S3C64XX_GPL(0 + cols); | ||
30 | for (gpio = S3C64XX_GPL(0); gpio < end; gpio++) { | ||
31 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | ||
32 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
33 | } | ||
34 | } | ||
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c index a58c0cc7ba5e..322359591374 100644 --- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c +++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | |||
@@ -16,12 +16,14 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <mach/gpio.h> | ||
21 | #include <plat/gpio-cfg.h> | 21 | #include <plat/gpio-cfg.h> |
22 | #include <plat/sdhci.h> | ||
22 | 23 | ||
23 | void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | 24 | void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) |
24 | { | 25 | { |
26 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
25 | unsigned int gpio; | 27 | unsigned int gpio; |
26 | unsigned int end; | 28 | unsigned int end; |
27 | 29 | ||
@@ -33,12 +35,15 @@ void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
33 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | 35 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); |
34 | } | 36 | } |
35 | 37 | ||
36 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | 38 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
37 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); | 39 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); |
40 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); | ||
41 | } | ||
38 | } | 42 | } |
39 | 43 | ||
40 | void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | 44 | void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) |
41 | { | 45 | { |
46 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
42 | unsigned int gpio; | 47 | unsigned int gpio; |
43 | unsigned int end; | 48 | unsigned int end; |
44 | 49 | ||
@@ -50,8 +55,10 @@ void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | |||
50 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | 55 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); |
51 | } | 56 | } |
52 | 57 | ||
53 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | 58 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
54 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); | 59 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); |
60 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); | ||
61 | } | ||
55 | } | 62 | } |
56 | 63 | ||
57 | void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | 64 | void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) |