diff options
Diffstat (limited to 'arch')
64 files changed, 980 insertions, 144 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3e68a93ce71f..c797a8b4d8cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -634,6 +634,7 @@ config ARCH_S3C2410 | |||
| 634 | select ARCH_HAS_CPUFREQ | 634 | select ARCH_HAS_CPUFREQ |
| 635 | select HAVE_CLK | 635 | select HAVE_CLK |
| 636 | select ARCH_USES_GETTIMEOFFSET | 636 | select ARCH_USES_GETTIMEOFFSET |
| 637 | select HAVE_S3C2410_I2C | ||
| 637 | help | 638 | help |
| 638 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics | 639 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics |
| 639 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 640 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
| @@ -663,6 +664,8 @@ config ARCH_S3C64XX | |||
| 663 | select S3C_DEV_NAND | 664 | select S3C_DEV_NAND |
| 664 | select USB_ARCH_HAS_OHCI | 665 | select USB_ARCH_HAS_OHCI |
| 665 | select SAMSUNG_GPIOLIB_4BIT | 666 | select SAMSUNG_GPIOLIB_4BIT |
| 667 | select HAVE_S3C2410_I2C | ||
| 668 | select HAVE_S3C2410_WATCHDOG | ||
| 666 | help | 669 | help |
| 667 | Samsung S3C64XX series based systems | 670 | Samsung S3C64XX series based systems |
| 668 | 671 | ||
| @@ -671,7 +674,10 @@ config ARCH_S5P6440 | |||
| 671 | select CPU_V6 | 674 | select CPU_V6 |
| 672 | select GENERIC_GPIO | 675 | select GENERIC_GPIO |
| 673 | select HAVE_CLK | 676 | select HAVE_CLK |
| 677 | select HAVE_S3C2410_WATCHDOG | ||
| 674 | select ARCH_USES_GETTIMEOFFSET | 678 | select ARCH_USES_GETTIMEOFFSET |
| 679 | select HAVE_S3C2410_I2C | ||
| 680 | select HAVE_S3C_RTC | ||
| 675 | help | 681 | help |
| 676 | Samsung S5P6440 CPU based systems | 682 | Samsung S5P6440 CPU based systems |
| 677 | 683 | ||
| @@ -681,6 +687,7 @@ config ARCH_S5P6442 | |||
| 681 | select GENERIC_GPIO | 687 | select GENERIC_GPIO |
| 682 | select HAVE_CLK | 688 | select HAVE_CLK |
| 683 | select ARCH_USES_GETTIMEOFFSET | 689 | select ARCH_USES_GETTIMEOFFSET |
| 690 | select HAVE_S3C2410_WATCHDOG | ||
| 684 | help | 691 | help |
| 685 | Samsung S5P6442 CPU based systems | 692 | Samsung S5P6442 CPU based systems |
| 686 | 693 | ||
| @@ -691,6 +698,9 @@ config ARCH_S5PC100 | |||
| 691 | select CPU_V7 | 698 | select CPU_V7 |
| 692 | select ARM_L1_CACHE_SHIFT_6 | 699 | select ARM_L1_CACHE_SHIFT_6 |
| 693 | select ARCH_USES_GETTIMEOFFSET | 700 | select ARCH_USES_GETTIMEOFFSET |
| 701 | select HAVE_S3C2410_I2C | ||
| 702 | select HAVE_S3C_RTC | ||
| 703 | select HAVE_S3C2410_WATCHDOG | ||
| 694 | help | 704 | help |
| 695 | Samsung S5PC100 series based systems | 705 | Samsung S5PC100 series based systems |
| 696 | 706 | ||
| @@ -701,6 +711,9 @@ config ARCH_S5PV210 | |||
| 701 | select HAVE_CLK | 711 | select HAVE_CLK |
| 702 | select ARM_L1_CACHE_SHIFT_6 | 712 | select ARM_L1_CACHE_SHIFT_6 |
| 703 | select ARCH_USES_GETTIMEOFFSET | 713 | select ARCH_USES_GETTIMEOFFSET |
| 714 | select HAVE_S3C2410_I2C | ||
| 715 | select HAVE_S3C_RTC | ||
| 716 | select HAVE_S3C2410_WATCHDOG | ||
| 704 | help | 717 | help |
| 705 | Samsung S5PV210/S5PC110 series based systems | 718 | Samsung S5PV210/S5PC110 series based systems |
| 706 | 719 | ||
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index f5a59727949f..071e8a1e0765 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 |
| @@ -95,15 +105,20 @@ config MACH_SMDK6410 | |||
| 95 | select S3C_DEV_HSMMC | 105 | select S3C_DEV_HSMMC |
| 96 | select S3C_DEV_HSMMC1 | 106 | select S3C_DEV_HSMMC1 |
| 97 | select S3C_DEV_I2C1 | 107 | select S3C_DEV_I2C1 |
| 108 | select SAMSUNG_DEV_IDE | ||
| 98 | select S3C_DEV_FB | 109 | select S3C_DEV_FB |
| 110 | select S3C_DEV_RTC | ||
| 99 | select SAMSUNG_DEV_TS | 111 | select SAMSUNG_DEV_TS |
| 100 | select S3C_DEV_USB_HOST | 112 | select S3C_DEV_USB_HOST |
| 101 | select S3C_DEV_USB_HSOTG | 113 | select S3C_DEV_USB_HSOTG |
| 102 | select S3C_DEV_WDT | 114 | select S3C_DEV_WDT |
| 115 | select SAMSUNG_DEV_KEYPAD | ||
| 103 | select HAVE_S3C2410_WATCHDOG | 116 | select HAVE_S3C2410_WATCHDOG |
| 104 | select S3C64XX_SETUP_SDHCI | 117 | select S3C64XX_SETUP_SDHCI |
| 105 | select S3C64XX_SETUP_I2C1 | 118 | select S3C64XX_SETUP_I2C1 |
| 119 | select S3C64XX_SETUP_IDE | ||
| 106 | select S3C64XX_SETUP_FB_24BPP | 120 | select S3C64XX_SETUP_FB_24BPP |
| 121 | select S3C64XX_SETUP_KEYPAD | ||
| 107 | help | 122 | help |
| 108 | Machine support for the Samsung SMDK6410 | 123 | Machine support for the Samsung SMDK6410 |
| 109 | 124 | ||
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile index 9d1006938f5c..48d3dfac8dd7 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 |
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 c3e9e73bd0f9..9648fbc36eec 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/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/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/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d9a03555f88b..b5d78616c774 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 |
| @@ -242,6 +245,29 @@ static struct platform_device smdk6410_b_pwr_5v = { | |||
| 242 | }; | 245 | }; |
| 243 | #endif | 246 | #endif |
| 244 | 247 | ||
| 248 | static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = { | ||
| 249 | .setup_gpio = s3c64xx_ide_setup_gpio, | ||
| 250 | }; | ||
| 251 | |||
| 252 | static uint32_t smdk6410_keymap[] __initdata = { | ||
| 253 | /* KEY(row, col, keycode) */ | ||
| 254 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
| 255 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
| 256 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
| 257 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
| 258 | }; | ||
| 259 | |||
| 260 | static struct matrix_keymap_data smdk6410_keymap_data __initdata = { | ||
| 261 | .keymap = smdk6410_keymap, | ||
| 262 | .keymap_size = ARRAY_SIZE(smdk6410_keymap), | ||
| 263 | }; | ||
| 264 | |||
| 265 | static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | ||
| 266 | .keymap_data = &smdk6410_keymap_data, | ||
| 267 | .rows = 2, | ||
| 268 | .cols = 8, | ||
| 269 | }; | ||
| 270 | |||
| 245 | static struct map_desc smdk6410_iodesc[] = {}; | 271 | static struct map_desc smdk6410_iodesc[] = {}; |
| 246 | 272 | ||
| 247 | static struct platform_device *smdk6410_devices[] __initdata = { | 273 | static struct platform_device *smdk6410_devices[] __initdata = { |
| @@ -257,6 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
| 257 | &s3c_device_ohci, | 283 | &s3c_device_ohci, |
| 258 | &s3c_device_usb_hsotg, | 284 | &s3c_device_usb_hsotg, |
| 259 | &s3c64xx_device_iisv4, | 285 | &s3c64xx_device_iisv4, |
| 286 | &samsung_device_keypad, | ||
| 260 | 287 | ||
| 261 | #ifdef CONFIG_REGULATOR | 288 | #ifdef CONFIG_REGULATOR |
| 262 | &smdk6410_b_pwr_5v, | 289 | &smdk6410_b_pwr_5v, |
| @@ -265,6 +292,8 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
| 265 | 292 | ||
| 266 | &smdk6410_smsc911x, | 293 | &smdk6410_smsc911x, |
| 267 | &s3c_device_adc, | 294 | &s3c_device_adc, |
| 295 | &s3c_device_cfcon, | ||
| 296 | &s3c_device_rtc, | ||
| 268 | &s3c_device_ts, | 297 | &s3c_device_ts, |
| 269 | &s3c_device_wdt, | 298 | &s3c_device_wdt, |
| 270 | }; | 299 | }; |
| @@ -636,6 +665,8 @@ static void __init smdk6410_machine_init(void) | |||
| 636 | s3c_i2c1_set_platdata(NULL); | 665 | s3c_i2c1_set_platdata(NULL); |
| 637 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | 666 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); |
| 638 | 667 | ||
| 668 | samsung_keypad_set_platdata(&smdk6410_keypad_data); | ||
| 669 | |||
| 639 | s3c24xx_ts_set_platdata(&s3c_ts_platform); | 670 | s3c24xx_ts_set_platdata(&s3c_ts_platform); |
| 640 | 671 | ||
| 641 | /* configure nCS1 width to 16 bits */ | 672 | /* configure nCS1 width to 16 bits */ |
| @@ -665,6 +696,8 @@ static void __init smdk6410_machine_init(void) | |||
| 665 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | 696 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); |
| 666 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 697 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
| 667 | 698 | ||
| 699 | s3c_ide_set_platdata(&smdk6410_ide_pdata); | ||
| 700 | |||
| 668 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 701 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
| 669 | } | 702 | } |
| 670 | 703 | ||
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) |
diff --git a/arch/arm/mach-s5p6440/Kconfig b/arch/arm/mach-s5p6440/Kconfig index 153f8c9994c8..6a4af7f57584 100644 --- a/arch/arm/mach-s5p6440/Kconfig +++ b/arch/arm/mach-s5p6440/Kconfig | |||
| @@ -21,13 +21,11 @@ config S5P6440_SETUP_I2C1 | |||
| 21 | config MACH_SMDK6440 | 21 | config MACH_SMDK6440 |
| 22 | bool "SMDK6440" | 22 | bool "SMDK6440" |
| 23 | select CPU_S5P6440 | 23 | select CPU_S5P6440 |
| 24 | select SAMSUNG_DEV_TS | ||
| 25 | select SAMSUNG_DEV_ADC | ||
| 26 | select S3C_DEV_RTC | ||
| 27 | select S3C_DEV_I2C1 | 24 | select S3C_DEV_I2C1 |
| 25 | select S3C_DEV_RTC | ||
| 28 | select S3C_DEV_WDT | 26 | select S3C_DEV_WDT |
| 29 | select HAVE_S3C_RTC | 27 | select SAMSUNG_DEV_ADC |
| 30 | select HAVE_S3C2410_WATCHDOG | 28 | select SAMSUNG_DEV_TS |
| 31 | select S5P6440_SETUP_I2C1 | 29 | select S5P6440_SETUP_I2C1 |
| 32 | help | 30 | help |
| 33 | Machine support for the Samsung SMDK6440 | 31 | Machine support for the Samsung SMDK6440 |
diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c index b2fe6a58155a..526f33adb31d 100644 --- a/arch/arm/mach-s5p6440/cpu.c +++ b/arch/arm/mach-s5p6440/cpu.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include <plat/devs.h> | 37 | #include <plat/devs.h> |
| 38 | #include <plat/clock.h> | 38 | #include <plat/clock.h> |
| 39 | #include <plat/s5p6440.h> | 39 | #include <plat/s5p6440.h> |
| 40 | #include <plat/adc-core.h> | ||
| 40 | 41 | ||
| 41 | static void s5p6440_idle(void) | 42 | static void s5p6440_idle(void) |
| 42 | { | 43 | { |
| @@ -61,7 +62,7 @@ static void s5p6440_idle(void) | |||
| 61 | void __init s5p6440_map_io(void) | 62 | void __init s5p6440_map_io(void) |
| 62 | { | 63 | { |
| 63 | /* initialize any device information early */ | 64 | /* initialize any device information early */ |
| 64 | s3c_device_adc.name = "s3c64xx-adc"; | 65 | s3c_adc_setname("s3c64xx-adc"); |
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | void __init s5p6440_init_clocks(int xtal) | 68 | void __init s5p6440_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s5p6440/dev-audio.c b/arch/arm/mach-s5p6440/dev-audio.c index 0c5367962830..3ca0d2b8275d 100644 --- a/arch/arm/mach-s5p6440/dev-audio.c +++ b/arch/arm/mach-s5p6440/dev-audio.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <plat/gpio-cfg.h> | 15 | #include <plat/gpio-cfg.h> |
| 15 | #include <plat/audio.h> | 16 | #include <plat/audio.h> |
| 16 | 17 | ||
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
| 19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
| 20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5p6440/dev-spi.c b/arch/arm/mach-s5p6440/dev-spi.c index 0a30280019c0..510af44d180c 100644 --- a/arch/arm/mach-s5p6440/dev-spi.c +++ b/arch/arm/mach-s5p6440/dev-spi.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <mach/dma.h> | 15 | #include <mach/dma.h> |
| 15 | #include <mach/map.h> | 16 | #include <mach/map.h> |
| 16 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/spi-clocks.h> | 18 | #include <mach/spi-clocks.h> |
| 19 | 19 | ||
| 20 | #include <plat/s3c64xx-spi.h> | 20 | #include <plat/s3c64xx-spi.h> |
diff --git a/arch/arm/mach-s5p6440/gpio.c b/arch/arm/mach-s5p6440/gpio.c index 92efc05b1ba2..8bf6e0ce51c9 100644 --- a/arch/arm/mach-s5p6440/gpio.c +++ b/arch/arm/mach-s5p6440/gpio.c | |||
| @@ -13,9 +13,11 @@ | |||
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
| 15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
| 16 | #include <linux/gpio.h> | ||
| 17 | |||
| 16 | #include <mach/map.h> | 18 | #include <mach/map.h> |
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/regs-gpio.h> | 19 | #include <mach/regs-gpio.h> |
| 20 | |||
| 19 | #include <plat/gpio-core.h> | 21 | #include <plat/gpio-core.h> |
| 20 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
| 21 | #include <plat/gpio-cfg-helpers.h> | 23 | #include <plat/gpio-cfg-helpers.h> |
diff --git a/arch/arm/mach-s5p6442/Kconfig b/arch/arm/mach-s5p6442/Kconfig index 7cd28435b50b..0fda0a5df968 100644 --- a/arch/arm/mach-s5p6442/Kconfig +++ b/arch/arm/mach-s5p6442/Kconfig | |||
| @@ -20,7 +20,6 @@ config MACH_SMDK6442 | |||
| 20 | bool "SMDK6442" | 20 | bool "SMDK6442" |
| 21 | select CPU_S5P6442 | 21 | select CPU_S5P6442 |
| 22 | select S3C_DEV_WDT | 22 | select S3C_DEV_WDT |
| 23 | select HAVE_S3C2410_WATCHDOG | ||
| 24 | help | 23 | help |
| 25 | Machine support for Samsung SMDK6442 | 24 | Machine support for Samsung SMDK6442 |
| 26 | 25 | ||
diff --git a/arch/arm/mach-s5p6442/dev-audio.c b/arch/arm/mach-s5p6442/dev-audio.c index cb801e1f5e23..7a4e34720b7b 100644 --- a/arch/arm/mach-s5p6442/dev-audio.c +++ b/arch/arm/mach-s5p6442/dev-audio.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <plat/gpio-cfg.h> | 15 | #include <plat/gpio-cfg.h> |
| 15 | #include <plat/audio.h> | 16 | #include <plat/audio.h> |
| 16 | 17 | ||
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
| 19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
| 20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5p6442/dev-spi.c b/arch/arm/mach-s5p6442/dev-spi.c index 30199525daca..e894651a88bd 100644 --- a/arch/arm/mach-s5p6442/dev-spi.c +++ b/arch/arm/mach-s5p6442/dev-spi.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <mach/dma.h> | 15 | #include <mach/dma.h> |
| 15 | #include <mach/map.h> | 16 | #include <mach/map.h> |
| 16 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/spi-clocks.h> | 18 | #include <mach/spi-clocks.h> |
| 19 | 19 | ||
| 20 | #include <plat/s3c64xx-spi.h> | 20 | #include <plat/s3c64xx-spi.h> |
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index 25ca7c686e77..ab038d090764 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
| @@ -49,24 +49,22 @@ config S5PC100_SETUP_SDHCI_GPIO | |||
| 49 | config MACH_SMDKC100 | 49 | config MACH_SMDKC100 |
| 50 | bool "SMDKC100" | 50 | bool "SMDKC100" |
| 51 | select CPU_S5PC100 | 51 | select CPU_S5PC100 |
| 52 | select SAMSUNG_DEV_ADC | ||
| 53 | select S3C_DEV_FB | 52 | select S3C_DEV_FB |
| 54 | select S3C_DEV_I2C1 | ||
| 55 | select SAMSUNG_DEV_IDE | ||
| 56 | select S3C_DEV_HSMMC | 53 | select S3C_DEV_HSMMC |
| 57 | select S3C_DEV_HSMMC1 | 54 | select S3C_DEV_HSMMC1 |
| 58 | select S3C_DEV_HSMMC2 | 55 | select S3C_DEV_HSMMC2 |
| 59 | select SAMSUNG_DEV_KEYPAD | 56 | select S3C_DEV_I2C1 |
| 60 | select S3C_DEV_RTC | 57 | select S3C_DEV_RTC |
| 61 | select SAMSUNG_DEV_TS | ||
| 62 | select S3C_DEV_WDT | 58 | select S3C_DEV_WDT |
| 63 | select HAVE_S3C2410_WATCHDOG | 59 | select SAMSUNG_DEV_ADC |
| 60 | select SAMSUNG_DEV_IDE | ||
| 61 | select SAMSUNG_DEV_KEYPAD | ||
| 62 | select SAMSUNG_DEV_TS | ||
| 64 | select S5PC100_SETUP_FB_24BPP | 63 | select S5PC100_SETUP_FB_24BPP |
| 65 | select S5PC100_SETUP_I2C1 | 64 | select S5PC100_SETUP_I2C1 |
| 66 | select S5PC100_SETUP_IDE | 65 | select S5PC100_SETUP_IDE |
| 67 | select S5PC100_SETUP_KEYPAD | 66 | select S5PC100_SETUP_KEYPAD |
| 68 | select S5PC100_SETUP_SDHCI | 67 | select S5PC100_SETUP_SDHCI |
| 69 | select HAVE_S3C_RTC | ||
| 70 | help | 68 | help |
| 71 | Machine support for the Samsung SMDKC100 | 69 | Machine support for the Samsung SMDKC100 |
| 72 | 70 | ||
diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index 18cfe9ae1936..a699ed6acc23 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <plat/gpio-cfg.h> | 15 | #include <plat/gpio-cfg.h> |
| 15 | #include <plat/audio.h> | 16 | #include <plat/audio.h> |
| 16 | 17 | ||
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
| 19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
| 20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5pc100/dev-spi.c b/arch/arm/mach-s5pc100/dev-spi.c index 14618c346057..a0ef7c302c16 100644 --- a/arch/arm/mach-s5pc100/dev-spi.c +++ b/arch/arm/mach-s5pc100/dev-spi.c | |||
| @@ -10,10 +10,10 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <mach/dma.h> | 15 | #include <mach/dma.h> |
| 15 | #include <mach/map.h> | 16 | #include <mach/map.h> |
| 16 | #include <mach/gpio.h> | ||
| 17 | #include <mach/spi-clocks.h> | 17 | #include <mach/spi-clocks.h> |
| 18 | 18 | ||
| 19 | #include <plat/s3c64xx-spi.h> | 19 | #include <plat/s3c64xx-spi.h> |
diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h index c018697e79bf..01b9134feff0 100644 --- a/arch/arm/mach-s5pc100/include/mach/map.h +++ b/arch/arm/mach-s5pc100/include/mach/map.h | |||
| @@ -99,6 +99,10 @@ | |||
| 99 | 99 | ||
| 100 | #define S5PC100_PA_FB (0xEE000000) | 100 | #define S5PC100_PA_FB (0xEE000000) |
| 101 | 101 | ||
| 102 | #define S5PC100_PA_FIMC0 (0xEE200000) | ||
| 103 | #define S5PC100_PA_FIMC1 (0xEE300000) | ||
| 104 | #define S5PC100_PA_FIMC2 (0xEE400000) | ||
| 105 | |||
| 102 | #define S5PC100_PA_I2S0 (0xF2000000) | 106 | #define S5PC100_PA_I2S0 (0xF2000000) |
| 103 | #define S5PC100_PA_I2S1 (0xF2100000) | 107 | #define S5PC100_PA_I2S1 (0xF2100000) |
| 104 | #define S5PC100_PA_I2S2 (0xF2200000) | 108 | #define S5PC100_PA_I2S2 (0xF2200000) |
| @@ -148,4 +152,8 @@ | |||
| 148 | #define SAMSUNG_PA_CFCON S5PC100_PA_CFCON | 152 | #define SAMSUNG_PA_CFCON S5PC100_PA_CFCON |
| 149 | #define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD | 153 | #define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD |
| 150 | 154 | ||
| 155 | #define S5P_PA_FIMC0 S5PC100_PA_FIMC0 | ||
| 156 | #define S5P_PA_FIMC1 S5PC100_PA_FIMC1 | ||
| 157 | #define S5P_PA_FIMC2 S5PC100_PA_FIMC2 | ||
| 158 | |||
| 151 | #endif /* __ASM_ARCH_C100_MAP_H */ | 159 | #endif /* __ASM_ARCH_C100_MAP_H */ |
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c index 7769c760c9ef..dc7208c639ea 100644 --- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c +++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c | |||
| @@ -20,9 +20,11 @@ | |||
| 20 | 20 | ||
| 21 | #include <plat/gpio-cfg.h> | 21 | #include <plat/gpio-cfg.h> |
| 22 | #include <plat/regs-sdhci.h> | 22 | #include <plat/regs-sdhci.h> |
| 23 | #include <plat/sdhci.h> | ||
| 23 | 24 | ||
| 24 | void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | 25 | void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) |
| 25 | { | 26 | { |
| 27 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 26 | unsigned int gpio; | 28 | unsigned int gpio; |
| 27 | unsigned int end; | 29 | unsigned int end; |
| 28 | unsigned int num; | 30 | unsigned int num; |
| @@ -47,12 +49,15 @@ void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
| 47 | } | 49 | } |
| 48 | } | 50 | } |
| 49 | 51 | ||
| 50 | s3c_gpio_setpull(S5PC100_GPG1(2), S3C_GPIO_PULL_UP); | 52 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 51 | s3c_gpio_cfgpin(S5PC100_GPG1(2), S3C_GPIO_SFN(2)); | 53 | s3c_gpio_setpull(S5PC100_GPG1(2), S3C_GPIO_PULL_UP); |
| 54 | s3c_gpio_cfgpin(S5PC100_GPG1(2), S3C_GPIO_SFN(2)); | ||
| 55 | } | ||
| 52 | } | 56 | } |
| 53 | 57 | ||
| 54 | void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | 58 | void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) |
| 55 | { | 59 | { |
| 60 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 56 | unsigned int gpio; | 61 | unsigned int gpio; |
| 57 | unsigned int end; | 62 | unsigned int end; |
| 58 | 63 | ||
| @@ -64,12 +69,15 @@ void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | |||
| 64 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | 69 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); |
| 65 | } | 70 | } |
| 66 | 71 | ||
| 67 | s3c_gpio_setpull(S5PC100_GPG2(6), S3C_GPIO_PULL_UP); | 72 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 68 | s3c_gpio_cfgpin(S5PC100_GPG2(6), S3C_GPIO_SFN(2)); | 73 | s3c_gpio_setpull(S5PC100_GPG2(6), S3C_GPIO_PULL_UP); |
| 74 | s3c_gpio_cfgpin(S5PC100_GPG2(6), S3C_GPIO_SFN(2)); | ||
| 75 | } | ||
| 69 | } | 76 | } |
| 70 | 77 | ||
| 71 | void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | 78 | void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) |
| 72 | { | 79 | { |
| 80 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 73 | unsigned int gpio; | 81 | unsigned int gpio; |
| 74 | unsigned int end; | 82 | unsigned int end; |
| 75 | 83 | ||
| @@ -81,6 +89,8 @@ void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | |||
| 81 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | 89 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); |
| 82 | } | 90 | } |
| 83 | 91 | ||
| 84 | s3c_gpio_setpull(S5PC100_GPG3(6), S3C_GPIO_PULL_UP); | 92 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 85 | s3c_gpio_cfgpin(S5PC100_GPG3(6), S3C_GPIO_SFN(2)); | 93 | s3c_gpio_setpull(S5PC100_GPG3(6), S3C_GPIO_PULL_UP); |
| 94 | s3c_gpio_cfgpin(S5PC100_GPG3(6), S3C_GPIO_SFN(2)); | ||
| 95 | } | ||
| 86 | } | 96 | } |
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 9b84abf1a822..ea9d147d4585 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
| @@ -53,19 +53,24 @@ config S5PV210_SETUP_SDHCI_GPIO | |||
| 53 | help | 53 | help |
| 54 | Common setup code for SDHCI gpio. | 54 | Common setup code for SDHCI gpio. |
| 55 | 55 | ||
| 56 | config S5PC110_DEV_ONENAND | ||
| 57 | bool | ||
| 58 | help | ||
| 59 | Compile in platform device definition for OneNAND1 controller | ||
| 60 | |||
| 56 | menu "S5PC110 Machines" | 61 | menu "S5PC110 Machines" |
| 57 | 62 | ||
| 58 | config MACH_AQUILA | 63 | config MACH_AQUILA |
| 59 | bool "Aquila" | 64 | bool "Aquila" |
| 60 | select CPU_S5PV210 | 65 | select CPU_S5PV210 |
| 61 | select ARCH_SPARSEMEM_ENABLE | 66 | select ARCH_SPARSEMEM_ENABLE |
| 62 | select S5PV210_SETUP_FB_24BPP | ||
| 63 | select S5PV210_SETUP_SDHCI | ||
| 64 | select S3C_DEV_FB | 67 | select S3C_DEV_FB |
| 65 | select S5PC110_DEV_ONENAND | ||
| 66 | select S3C_DEV_HSMMC | 68 | select S3C_DEV_HSMMC |
| 67 | select S3C_DEV_HSMMC1 | 69 | select S3C_DEV_HSMMC1 |
| 68 | select S3C_DEV_HSMMC2 | 70 | select S3C_DEV_HSMMC2 |
| 71 | select S5PC110_DEV_ONENAND | ||
| 72 | select S5PV210_SETUP_FB_24BPP | ||
| 73 | select S5PV210_SETUP_SDHCI | ||
| 69 | help | 74 | help |
| 70 | Machine support for the Samsung Aquila target based on S5PC110 SoC | 75 | Machine support for the Samsung Aquila target based on S5PC110 SoC |
| 71 | 76 | ||
| @@ -73,13 +78,13 @@ config MACH_GONI | |||
| 73 | bool "GONI" | 78 | bool "GONI" |
| 74 | select CPU_S5PV210 | 79 | select CPU_S5PV210 |
| 75 | select ARCH_SPARSEMEM_ENABLE | 80 | select ARCH_SPARSEMEM_ENABLE |
| 76 | select S5PV210_SETUP_FB_24BPP | ||
| 77 | select S5PV210_SETUP_SDHCI | ||
| 78 | select S3C_DEV_FB | 81 | select S3C_DEV_FB |
| 79 | select S5PC110_DEV_ONENAND | ||
| 80 | select S3C_DEV_HSMMC | 82 | select S3C_DEV_HSMMC |
| 81 | select S3C_DEV_HSMMC1 | 83 | select S3C_DEV_HSMMC1 |
| 82 | select S3C_DEV_HSMMC2 | 84 | select S3C_DEV_HSMMC2 |
| 85 | select S5PC110_DEV_ONENAND | ||
| 86 | select S5PV210_SETUP_FB_24BPP | ||
| 87 | select S5PV210_SETUP_SDHCI | ||
| 83 | help | 88 | help |
| 84 | Machine support for Samsung GONI board | 89 | Machine support for Samsung GONI board |
| 85 | S5PC110(MCP) is one of package option of S5PV210 | 90 | S5PC110(MCP) is one of package option of S5PV210 |
| @@ -90,11 +95,9 @@ config MACH_SMDKC110 | |||
| 90 | select ARCH_SPARSEMEM_ENABLE | 95 | select ARCH_SPARSEMEM_ENABLE |
| 91 | select S3C_DEV_I2C1 | 96 | select S3C_DEV_I2C1 |
| 92 | select S3C_DEV_I2C2 | 97 | select S3C_DEV_I2C2 |
| 93 | select SAMSUNG_DEV_IDE | ||
| 94 | select S3C_DEV_RTC | 98 | select S3C_DEV_RTC |
| 95 | select S3C_DEV_WDT | 99 | select S3C_DEV_WDT |
| 96 | select HAVE_S3C_RTC | 100 | select SAMSUNG_DEV_IDE |
| 97 | select HAVE_S3C2410_WATCHDOG | ||
| 98 | select S5PV210_SETUP_I2C1 | 101 | select S5PV210_SETUP_I2C1 |
| 99 | select S5PV210_SETUP_I2C2 | 102 | select S5PV210_SETUP_I2C2 |
| 100 | select S5PV210_SETUP_IDE | 103 | select S5PV210_SETUP_IDE |
| @@ -104,31 +107,24 @@ config MACH_SMDKC110 | |||
| 104 | 107 | ||
| 105 | endmenu | 108 | endmenu |
| 106 | 109 | ||
| 107 | config S5PC110_DEV_ONENAND | ||
| 108 | bool | ||
| 109 | help | ||
| 110 | Compile in platform device definition for OneNAND1 controller | ||
| 111 | |||
| 112 | menu "S5PV210 Machines" | 110 | menu "S5PV210 Machines" |
| 113 | 111 | ||
| 114 | config MACH_SMDKV210 | 112 | config MACH_SMDKV210 |
| 115 | bool "SMDKV210" | 113 | bool "SMDKV210" |
| 116 | select CPU_S5PV210 | 114 | select CPU_S5PV210 |
| 117 | select ARCH_SPARSEMEM_ENABLE | 115 | select ARCH_SPARSEMEM_ENABLE |
| 118 | select SAMSUNG_DEV_ADC | ||
| 119 | select S3C_DEV_HSMMC | 116 | select S3C_DEV_HSMMC |
| 120 | select S3C_DEV_HSMMC1 | 117 | select S3C_DEV_HSMMC1 |
| 121 | select S3C_DEV_HSMMC2 | 118 | select S3C_DEV_HSMMC2 |
| 122 | select S3C_DEV_HSMMC3 | 119 | select S3C_DEV_HSMMC3 |
| 123 | select S3C_DEV_I2C1 | 120 | select S3C_DEV_I2C1 |
| 124 | select S3C_DEV_I2C2 | 121 | select S3C_DEV_I2C2 |
| 122 | select S3C_DEV_RTC | ||
| 123 | select S3C_DEV_WDT | ||
| 124 | select SAMSUNG_DEV_ADC | ||
| 125 | select SAMSUNG_DEV_IDE | 125 | select SAMSUNG_DEV_IDE |
| 126 | select SAMSUNG_DEV_KEYPAD | 126 | select SAMSUNG_DEV_KEYPAD |
| 127 | select SAMSUNG_DEV_TS | 127 | select SAMSUNG_DEV_TS |
| 128 | select S3C_DEV_RTC | ||
| 129 | select S3C_DEV_WDT | ||
| 130 | select HAVE_S3C_RTC | ||
| 131 | select HAVE_S3C2410_WATCHDOG | ||
| 132 | select S5PV210_SETUP_I2C1 | 128 | select S5PV210_SETUP_I2C1 |
| 133 | select S5PV210_SETUP_I2C2 | 129 | select S5PV210_SETUP_I2C2 |
| 134 | select S5PV210_SETUP_IDE | 130 | select S5PV210_SETUP_IDE |
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index ede163707db1..c7e0b8a65c4a 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
| @@ -32,7 +32,9 @@ | |||
| 32 | #include <plat/devs.h> | 32 | #include <plat/devs.h> |
| 33 | #include <plat/clock.h> | 33 | #include <plat/clock.h> |
| 34 | #include <plat/s5pv210.h> | 34 | #include <plat/s5pv210.h> |
| 35 | #include <plat/adc-core.h> | ||
| 35 | #include <plat/ata-core.h> | 36 | #include <plat/ata-core.h> |
| 37 | #include <plat/fimc-core.h> | ||
| 36 | #include <plat/iic-core.h> | 38 | #include <plat/iic-core.h> |
| 37 | #include <plat/keypad-core.h> | 39 | #include <plat/keypad-core.h> |
| 38 | #include <plat/sdhci.h> | 40 | #include <plat/sdhci.h> |
| @@ -84,9 +86,6 @@ static void s5pv210_sw_reset(void) | |||
| 84 | 86 | ||
| 85 | void __init s5pv210_map_io(void) | 87 | void __init s5pv210_map_io(void) |
| 86 | { | 88 | { |
| 87 | #ifdef CONFIG_S3C_DEV_ADC | ||
| 88 | s3c_device_adc.name = "s3c64xx-adc"; | ||
| 89 | #endif | ||
| 90 | iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc)); | 89 | iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc)); |
| 91 | 90 | ||
| 92 | /* initialise device information early */ | 91 | /* initialise device information early */ |
| @@ -95,8 +94,14 @@ void __init s5pv210_map_io(void) | |||
| 95 | s5pv210_default_sdhci2(); | 94 | s5pv210_default_sdhci2(); |
| 96 | s5pv210_default_sdhci3(); | 95 | s5pv210_default_sdhci3(); |
| 97 | 96 | ||
| 97 | s3c_adc_setname("s3c64xx-adc"); | ||
| 98 | |||
| 98 | s3c_cfcon_setname("s5pv210-pata"); | 99 | s3c_cfcon_setname("s5pv210-pata"); |
| 99 | 100 | ||
| 101 | s3c_fimc_setname(0, "s5pv210-fimc"); | ||
| 102 | s3c_fimc_setname(1, "s5pv210-fimc"); | ||
| 103 | s3c_fimc_setname(2, "s5pv210-fimc"); | ||
| 104 | |||
| 100 | /* the i2c devices are directly compatible with s3c2440 */ | 105 | /* the i2c devices are directly compatible with s3c2440 */ |
| 101 | s3c_i2c0_setname("s3c2440-i2c"); | 106 | s3c_i2c0_setname("s3c2440-i2c"); |
| 102 | s3c_i2c1_setname("s3c2440-i2c"); | 107 | s3c_i2c1_setname("s3c2440-i2c"); |
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c index 6e215330a1be..21dc6cf955c3 100644 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ b/arch/arm/mach-s5pv210/dev-audio.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <plat/gpio-cfg.h> | 15 | #include <plat/gpio-cfg.h> |
| 15 | #include <plat/audio.h> | 16 | #include <plat/audio.h> |
| 16 | 17 | ||
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
| 19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
| 20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5pv210/dev-spi.c b/arch/arm/mach-s5pv210/dev-spi.c index 337a62b57a0b..826cdbc43e20 100644 --- a/arch/arm/mach-s5pv210/dev-spi.c +++ b/arch/arm/mach-s5pv210/dev-spi.c | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/gpio.h> | ||
| 13 | 14 | ||
| 14 | #include <mach/dma.h> | 15 | #include <mach/dma.h> |
| 15 | #include <mach/map.h> | 16 | #include <mach/map.h> |
| 16 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
| 17 | #include <mach/gpio.h> | ||
| 18 | #include <mach/spi-clocks.h> | 18 | #include <mach/spi-clocks.h> |
| 19 | 19 | ||
| 20 | #include <plat/s3c64xx-spi.h> | 20 | #include <plat/s3c64xx-spi.h> |
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h index 986b285fa578..dd4fb6bf14b5 100644 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ b/arch/arm/mach-s5pv210/include/mach/map.h | |||
| @@ -65,6 +65,10 @@ | |||
| 65 | 65 | ||
| 66 | #define S5PV210_PA_FB (0xF8000000) | 66 | #define S5PV210_PA_FB (0xF8000000) |
| 67 | 67 | ||
| 68 | #define S5PV210_PA_FIMC0 (0xFB200000) | ||
| 69 | #define S5PV210_PA_FIMC1 (0xFB300000) | ||
| 70 | #define S5PV210_PA_FIMC2 (0xFB400000) | ||
| 71 | |||
| 68 | #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) | 72 | #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) |
| 69 | 73 | ||
| 70 | #define S5PV210_PA_VIC0 (0xF2000000) | 74 | #define S5PV210_PA_VIC0 (0xF2000000) |
| @@ -109,6 +113,9 @@ | |||
| 109 | #define S3C_PA_FB S5PV210_PA_FB | 113 | #define S3C_PA_FB S5PV210_PA_FB |
| 110 | #define S3C_PA_RTC S5PV210_PA_RTC | 114 | #define S3C_PA_RTC S5PV210_PA_RTC |
| 111 | #define S3C_PA_WDT S5PV210_PA_WATCHDOG | 115 | #define S3C_PA_WDT S5PV210_PA_WATCHDOG |
| 116 | #define S5P_PA_FIMC0 S5PV210_PA_FIMC0 | ||
| 117 | #define S5P_PA_FIMC1 S5PV210_PA_FIMC1 | ||
| 118 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 | ||
| 112 | 119 | ||
| 113 | #define SAMSUNG_PA_ADC S5PV210_PA_ADC | 120 | #define SAMSUNG_PA_ADC S5PV210_PA_ADC |
| 114 | #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON | 121 | #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON |
diff --git a/arch/arm/mach-s5pv210/setup-fb-24bpp.c b/arch/arm/mach-s5pv210/setup-fb-24bpp.c index a50cbac8720d..928cf1f125fa 100644 --- a/arch/arm/mach-s5pv210/setup-fb-24bpp.c +++ b/arch/arm/mach-s5pv210/setup-fb-24bpp.c | |||
| @@ -13,9 +13,9 @@ | |||
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
| 16 | #include <linux/gpio.h> | ||
| 16 | 17 | ||
| 17 | #include <mach/regs-fb.h> | 18 | #include <mach/regs-fb.h> |
| 18 | #include <mach/gpio.h> | ||
| 19 | #include <mach/map.h> | 19 | #include <mach/map.h> |
| 20 | #include <plat/fb.h> | 20 | #include <plat/fb.h> |
| 21 | #include <mach/regs-clock.h> | 21 | #include <mach/regs-clock.h> |
diff --git a/arch/arm/mach-s5pv210/setup-i2c0.c b/arch/arm/mach-s5pv210/setup-i2c0.c index c718253c70b8..d38f7cb7e662 100644 --- a/arch/arm/mach-s5pv210/setup-i2c0.c +++ b/arch/arm/mach-s5pv210/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 <plat/iic.h> | 21 | #include <plat/iic.h> |
| 22 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
| 23 | 23 | ||
diff --git a/arch/arm/mach-s5pv210/setup-i2c1.c b/arch/arm/mach-s5pv210/setup-i2c1.c index 45e0e6ed2ed0..148bb7857d89 100644 --- a/arch/arm/mach-s5pv210/setup-i2c1.c +++ b/arch/arm/mach-s5pv210/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 <plat/iic.h> | 21 | #include <plat/iic.h> |
| 22 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
| 23 | 23 | ||
diff --git a/arch/arm/mach-s5pv210/setup-i2c2.c b/arch/arm/mach-s5pv210/setup-i2c2.c index b11b4bff69ac..2396cb8c373e 100644 --- a/arch/arm/mach-s5pv210/setup-i2c2.c +++ b/arch/arm/mach-s5pv210/setup-i2c2.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 <plat/iic.h> | 21 | #include <plat/iic.h> |
| 22 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
| 23 | 23 | ||
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c index 143bfec1e05f..9f0f63ddd66a 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c +++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c | |||
| @@ -15,15 +15,17 @@ | |||
| 15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/gpio.h> | ||
| 18 | #include <linux/mmc/host.h> | 19 | #include <linux/mmc/host.h> |
| 19 | #include <linux/mmc/card.h> | 20 | #include <linux/mmc/card.h> |
| 20 | 21 | ||
| 21 | #include <mach/gpio.h> | ||
| 22 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
| 23 | #include <plat/regs-sdhci.h> | 23 | #include <plat/regs-sdhci.h> |
| 24 | #include <plat/sdhci.h> | ||
| 24 | 25 | ||
| 25 | void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | 26 | void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) |
| 26 | { | 27 | { |
| 28 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 27 | unsigned int gpio; | 29 | unsigned int gpio; |
| 28 | 30 | ||
| 29 | /* Set all the necessary GPG0/GPG1 pins to special-function 2 */ | 31 | /* Set all the necessary GPG0/GPG1 pins to special-function 2 */ |
| @@ -48,12 +50,15 @@ void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
| 48 | break; | 50 | break; |
| 49 | } | 51 | } |
| 50 | 52 | ||
| 51 | s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP); | 53 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 52 | s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2)); | 54 | s3c_gpio_setpull(S5PV210_GPG0(2), S3C_GPIO_PULL_UP); |
| 55 | s3c_gpio_cfgpin(S5PV210_GPG0(2), S3C_GPIO_SFN(2)); | ||
| 56 | } | ||
| 53 | } | 57 | } |
| 54 | 58 | ||
| 55 | void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | 59 | void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) |
| 56 | { | 60 | { |
| 61 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 57 | unsigned int gpio; | 62 | unsigned int gpio; |
| 58 | 63 | ||
| 59 | /* Set all the necessary GPG1[0:1] pins to special-function 2 */ | 64 | /* Set all the necessary GPG1[0:1] pins to special-function 2 */ |
| @@ -68,12 +73,15 @@ void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | |||
| 68 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | 73 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); |
| 69 | } | 74 | } |
| 70 | 75 | ||
| 71 | s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP); | 76 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 72 | s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2)); | 77 | s3c_gpio_setpull(S5PV210_GPG1(2), S3C_GPIO_PULL_UP); |
| 78 | s3c_gpio_cfgpin(S5PV210_GPG1(2), S3C_GPIO_SFN(2)); | ||
| 79 | } | ||
| 73 | } | 80 | } |
| 74 | 81 | ||
| 75 | void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | 82 | void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) |
| 76 | { | 83 | { |
| 84 | struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; | ||
| 77 | unsigned int gpio; | 85 | unsigned int gpio; |
| 78 | 86 | ||
| 79 | /* Set all the necessary GPG2[0:1] pins to special-function 2 */ | 87 | /* Set all the necessary GPG2[0:1] pins to special-function 2 */ |
| @@ -99,8 +107,10 @@ void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | |||
| 99 | break; | 107 | break; |
| 100 | } | 108 | } |
| 101 | 109 | ||
| 102 | s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); | 110 | if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { |
| 103 | s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); | 111 | s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); |
| 112 | s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); | ||
| 113 | } | ||
| 104 | } | 114 | } |
| 105 | 115 | ||
| 106 | void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width) | 116 | void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *dev, int width) |
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index 7e34194b0aaf..b2e029673950 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
| @@ -19,3 +19,8 @@ obj-y += clock.o | |||
| 19 | obj-y += irq.o | 19 | obj-y += irq.o |
| 20 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o | 20 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o |
| 21 | 21 | ||
| 22 | # devices | ||
| 23 | |||
| 24 | obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o | ||
| 25 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | ||
| 26 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | ||
diff --git a/arch/arm/plat-s5p/dev-fimc0.c b/arch/arm/plat-s5p/dev-fimc0.c new file mode 100644 index 000000000000..d3f1a9b5d2b5 --- /dev/null +++ b/arch/arm/plat-s5p/dev-fimc0.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* linux/arch/arm/plat-s5p/dev-fimc0.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics | ||
| 4 | * | ||
| 5 | * Base S5P FIMC0 resource and device 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 | #include <linux/kernel.h> | ||
| 13 | #include <linux/platform_device.h> | ||
| 14 | #include <linux/interrupt.h> | ||
| 15 | #include <linux/ioport.h> | ||
| 16 | #include <mach/map.h> | ||
| 17 | |||
| 18 | static struct resource s5p_fimc0_resource[] = { | ||
| 19 | [0] = { | ||
| 20 | .start = S5P_PA_FIMC0, | ||
| 21 | .end = S5P_PA_FIMC0 + SZ_1M - 1, | ||
| 22 | .flags = IORESOURCE_MEM, | ||
| 23 | }, | ||
| 24 | [1] = { | ||
| 25 | .start = IRQ_FIMC0, | ||
| 26 | .end = IRQ_FIMC0, | ||
| 27 | .flags = IORESOURCE_IRQ, | ||
| 28 | }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct platform_device s5p_device_fimc0 = { | ||
| 32 | .name = "s5p-fimc", | ||
| 33 | .id = 0, | ||
| 34 | .num_resources = ARRAY_SIZE(s5p_fimc0_resource), | ||
| 35 | .resource = s5p_fimc0_resource, | ||
| 36 | }; | ||
diff --git a/arch/arm/plat-s5p/dev-fimc1.c b/arch/arm/plat-s5p/dev-fimc1.c new file mode 100644 index 000000000000..41bd6986d0ad --- /dev/null +++ b/arch/arm/plat-s5p/dev-fimc1.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* linux/arch/arm/plat-s5p/dev-fimc1.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics | ||
| 4 | * | ||
| 5 | * Base S5P FIMC1 resource and device 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 | #include <linux/kernel.h> | ||
| 13 | #include <linux/platform_device.h> | ||
| 14 | #include <linux/interrupt.h> | ||
| 15 | #include <linux/ioport.h> | ||
| 16 | #include <mach/map.h> | ||
| 17 | |||
| 18 | static struct resource s5p_fimc1_resource[] = { | ||
| 19 | [0] = { | ||
| 20 | .start = S5P_PA_FIMC1, | ||
| 21 | .end = S5P_PA_FIMC1 + SZ_1M - 1, | ||
| 22 | .flags = IORESOURCE_MEM, | ||
| 23 | }, | ||
| 24 | [1] = { | ||
| 25 | .start = IRQ_FIMC1, | ||
| 26 | .end = IRQ_FIMC1, | ||
| 27 | .flags = IORESOURCE_IRQ, | ||
| 28 | }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct platform_device s5p_device_fimc1 = { | ||
| 32 | .name = "s5p-fimc", | ||
| 33 | .id = 1, | ||
| 34 | .num_resources = ARRAY_SIZE(s5p_fimc1_resource), | ||
| 35 | .resource = s5p_fimc1_resource, | ||
| 36 | }; | ||
diff --git a/arch/arm/plat-s5p/dev-fimc2.c b/arch/arm/plat-s5p/dev-fimc2.c new file mode 100644 index 000000000000..dfddeda6d4a3 --- /dev/null +++ b/arch/arm/plat-s5p/dev-fimc2.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* linux/arch/arm/plat-s5p/dev-fimc2.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics | ||
| 4 | * | ||
| 5 | * Base S5P FIMC2 resource and device 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 | #include <linux/kernel.h> | ||
| 13 | #include <linux/platform_device.h> | ||
| 14 | #include <linux/interrupt.h> | ||
| 15 | #include <linux/ioport.h> | ||
| 16 | #include <mach/map.h> | ||
| 17 | |||
| 18 | static struct resource s5p_fimc2_resource[] = { | ||
| 19 | [0] = { | ||
| 20 | .start = S5P_PA_FIMC2, | ||
| 21 | .end = S5P_PA_FIMC2 + SZ_1M - 1, | ||
| 22 | .flags = IORESOURCE_MEM, | ||
| 23 | }, | ||
| 24 | [1] = { | ||
| 25 | .start = IRQ_FIMC2, | ||
| 26 | .end = IRQ_FIMC2, | ||
| 27 | .flags = IORESOURCE_IRQ, | ||
| 28 | }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct platform_device s5p_device_fimc2 = { | ||
| 32 | .name = "s5p-fimc", | ||
| 33 | .id = 2, | ||
| 34 | .num_resources = ARRAY_SIZE(s5p_fimc2_resource), | ||
| 35 | .resource = s5p_fimc2_resource, | ||
| 36 | }; | ||
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 2753fb3e4f73..4529dd6232bc 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
| @@ -160,6 +160,11 @@ config S3C_DEV_HSMMC2 | |||
| 160 | help | 160 | help |
| 161 | Compile in platform device definitions for HSMMC channel 2 | 161 | Compile in platform device definitions for HSMMC channel 2 |
| 162 | 162 | ||
| 163 | config S3C_DEV_HSMMC3 | ||
| 164 | bool | ||
| 165 | help | ||
| 166 | Compile in platform device definitions for HSMMC channel 3 | ||
| 167 | |||
| 163 | config S3C_DEV_HWMON | 168 | config S3C_DEV_HWMON |
| 164 | bool | 169 | bool |
| 165 | help | 170 | help |
| @@ -216,6 +221,11 @@ config SAMSUNG_DEV_ADC | |||
| 216 | help | 221 | help |
| 217 | Compile in platform device definition for ADC controller | 222 | Compile in platform device definition for ADC controller |
| 218 | 223 | ||
| 224 | config SAMSUNG_DEV_IDE | ||
| 225 | bool | ||
| 226 | help | ||
| 227 | Compile in platform device definitions for IDE | ||
| 228 | |||
| 219 | config S3C64XX_DEV_SPI | 229 | config S3C64XX_DEV_SPI |
| 220 | bool | 230 | bool |
| 221 | help | 231 | help |
| @@ -227,6 +237,11 @@ config SAMSUNG_DEV_TS | |||
| 227 | help | 237 | help |
| 228 | Common in platform device definitions for touchscreen device | 238 | Common in platform device definitions for touchscreen device |
| 229 | 239 | ||
| 240 | config SAMSUNG_DEV_KEYPAD | ||
| 241 | bool | ||
| 242 | help | ||
| 243 | Compile in platform device definitions for keypad | ||
| 244 | |||
| 230 | # DMA | 245 | # DMA |
| 231 | 246 | ||
| 232 | config S3C_DMA | 247 | config S3C_DMA |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 0d5bf8a20a63..4d8ff923207a 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
| @@ -30,9 +30,12 @@ obj-$(CONFIG_S3C_ADC) += adc.o | |||
| 30 | 30 | ||
| 31 | # devices | 31 | # devices |
| 32 | 32 | ||
| 33 | obj-y += platformdata.o | ||
| 34 | |||
| 33 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o | 35 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o |
| 34 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o | 36 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o |
| 35 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o | 37 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o |
| 38 | obj-$(CONFIG_S3C_DEV_HSMMC3) += dev-hsmmc3.o | ||
| 36 | obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o | 39 | obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o |
| 37 | obj-y += dev-i2c0.o | 40 | obj-y += dev-i2c0.o |
| 38 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o | 41 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o |
| @@ -47,7 +50,9 @@ obj-$(CONFIG_S3C_DEV_ONENAND) += dev-onenand.o | |||
| 47 | obj-$(CONFIG_S3C_DEV_RTC) += dev-rtc.o | 50 | obj-$(CONFIG_S3C_DEV_RTC) += dev-rtc.o |
| 48 | 51 | ||
| 49 | obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o | 52 | obj-$(CONFIG_SAMSUNG_DEV_ADC) += dev-adc.o |
| 53 | obj-$(CONFIG_SAMSUNG_DEV_IDE) += dev-ide.o | ||
| 50 | obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o | 54 | obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o |
| 55 | obj-$(CONFIG_SAMSUNG_DEV_KEYPAD) += dev-keypad.o | ||
| 51 | 56 | ||
| 52 | # DMA support | 57 | # DMA support |
| 53 | 58 | ||
diff --git a/arch/arm/plat-samsung/dev-hsmmc.c b/arch/arm/plat-samsung/dev-hsmmc.c index 4c05b39810e2..b0f93f11e281 100644 --- a/arch/arm/plat-samsung/dev-hsmmc.c +++ b/arch/arm/plat-samsung/dev-hsmmc.c | |||
| @@ -60,6 +60,11 @@ void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd) | |||
| 60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc0_def_platdata; | 60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc0_def_platdata; |
| 61 | 61 | ||
| 62 | set->max_width = pd->max_width; | 62 | set->max_width = pd->max_width; |
| 63 | set->cd_type = pd->cd_type; | ||
| 64 | set->ext_cd_init = pd->ext_cd_init; | ||
| 65 | set->ext_cd_cleanup = pd->ext_cd_cleanup; | ||
| 66 | set->ext_cd_gpio = pd->ext_cd_gpio; | ||
| 67 | set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; | ||
| 63 | 68 | ||
| 64 | if (pd->cfg_gpio) | 69 | if (pd->cfg_gpio) |
| 65 | set->cfg_gpio = pd->cfg_gpio; | 70 | set->cfg_gpio = pd->cfg_gpio; |
diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c b/arch/arm/plat-samsung/dev-hsmmc1.c index e49bc4cd0ee6..1504fd802865 100644 --- a/arch/arm/plat-samsung/dev-hsmmc1.c +++ b/arch/arm/plat-samsung/dev-hsmmc1.c | |||
| @@ -60,6 +60,11 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) | |||
| 60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata; | 60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata; |
| 61 | 61 | ||
| 62 | set->max_width = pd->max_width; | 62 | set->max_width = pd->max_width; |
| 63 | set->cd_type = pd->cd_type; | ||
| 64 | set->ext_cd_init = pd->ext_cd_init; | ||
| 65 | set->ext_cd_cleanup = pd->ext_cd_cleanup; | ||
| 66 | set->ext_cd_gpio = pd->ext_cd_gpio; | ||
| 67 | set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; | ||
| 63 | 68 | ||
| 64 | if (pd->cfg_gpio) | 69 | if (pd->cfg_gpio) |
| 65 | set->cfg_gpio = pd->cfg_gpio; | 70 | set->cfg_gpio = pd->cfg_gpio; |
diff --git a/arch/arm/plat-samsung/dev-hsmmc2.c b/arch/arm/plat-samsung/dev-hsmmc2.c index 824580bc0e06..b28ef173444d 100644 --- a/arch/arm/plat-samsung/dev-hsmmc2.c +++ b/arch/arm/plat-samsung/dev-hsmmc2.c | |||
| @@ -61,6 +61,11 @@ void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd) | |||
| 61 | struct s3c_sdhci_platdata *set = &s3c_hsmmc2_def_platdata; | 61 | struct s3c_sdhci_platdata *set = &s3c_hsmmc2_def_platdata; |
| 62 | 62 | ||
| 63 | set->max_width = pd->max_width; | 63 | set->max_width = pd->max_width; |
| 64 | set->cd_type = pd->cd_type; | ||
| 65 | set->ext_cd_init = pd->ext_cd_init; | ||
| 66 | set->ext_cd_cleanup = pd->ext_cd_cleanup; | ||
| 67 | set->ext_cd_gpio = pd->ext_cd_gpio; | ||
| 68 | set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; | ||
| 64 | 69 | ||
| 65 | if (pd->cfg_gpio) | 70 | if (pd->cfg_gpio) |
| 66 | set->cfg_gpio = pd->cfg_gpio; | 71 | set->cfg_gpio = pd->cfg_gpio; |
diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c new file mode 100644 index 000000000000..85aaf0f2842f --- /dev/null +++ b/arch/arm/plat-samsung/dev-hsmmc3.c | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/dev-hsmmc3.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Copyright (c) 2008 Simtec Electronics | ||
| 7 | * Ben Dooks <ben@simtec.co.uk> | ||
| 8 | * http://armlinux.simtec.co.uk/ | ||
| 9 | * | ||
| 10 | * Based on arch/arm/plat-samsung/dev-hsmmc1.c | ||
| 11 | * | ||
| 12 | * Samsung device definition for hsmmc device 3 | ||
| 13 | * | ||
| 14 | * This program is free software; you can redistribute it and/or modify | ||
| 15 | * it under the terms of the GNU General Public License version 2 as | ||
| 16 | * published by the Free Software Foundation. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/kernel.h> | ||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/mmc/host.h> | ||
| 22 | |||
| 23 | #include <mach/map.h> | ||
| 24 | #include <plat/sdhci.h> | ||
| 25 | #include <plat/devs.h> | ||
| 26 | |||
| 27 | #define S3C_SZ_HSMMC (0x1000) | ||
| 28 | |||
| 29 | static struct resource s3c_hsmmc3_resource[] = { | ||
| 30 | [0] = { | ||
| 31 | .start = S3C_PA_HSMMC3, | ||
| 32 | .end = S3C_PA_HSMMC3 + S3C_SZ_HSMMC - 1, | ||
| 33 | .flags = IORESOURCE_MEM, | ||
| 34 | }, | ||
| 35 | [1] = { | ||
| 36 | .start = IRQ_MMC3, | ||
| 37 | .end = IRQ_MMC3, | ||
| 38 | .flags = IORESOURCE_IRQ, | ||
| 39 | } | ||
| 40 | }; | ||
| 41 | |||
| 42 | static u64 s3c_device_hsmmc3_dmamask = 0xffffffffUL; | ||
| 43 | |||
| 44 | struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata = { | ||
| 45 | .max_width = 4, | ||
| 46 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
| 47 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct platform_device s3c_device_hsmmc3 = { | ||
| 51 | .name = "s3c-sdhci", | ||
| 52 | .id = 3, | ||
| 53 | .num_resources = ARRAY_SIZE(s3c_hsmmc3_resource), | ||
| 54 | .resource = s3c_hsmmc3_resource, | ||
| 55 | .dev = { | ||
| 56 | .dma_mask = &s3c_device_hsmmc3_dmamask, | ||
| 57 | .coherent_dma_mask = 0xffffffffUL, | ||
| 58 | .platform_data = &s3c_hsmmc3_def_platdata, | ||
| 59 | }, | ||
| 60 | }; | ||
| 61 | |||
| 62 | void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd) | ||
| 63 | { | ||
| 64 | struct s3c_sdhci_platdata *set = &s3c_hsmmc3_def_platdata; | ||
| 65 | |||
| 66 | set->max_width = pd->max_width; | ||
| 67 | set->cd_type = pd->cd_type; | ||
| 68 | set->ext_cd_init = pd->ext_cd_init; | ||
| 69 | set->ext_cd_cleanup = pd->ext_cd_cleanup; | ||
| 70 | set->ext_cd_gpio = pd->ext_cd_gpio; | ||
| 71 | set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert; | ||
| 72 | |||
| 73 | if (pd->cfg_gpio) | ||
| 74 | set->cfg_gpio = pd->cfg_gpio; | ||
| 75 | if (pd->cfg_card) | ||
| 76 | set->cfg_card = pd->cfg_card; | ||
| 77 | } | ||
diff --git a/arch/arm/plat-samsung/dev-ide.c b/arch/arm/plat-samsung/dev-ide.c new file mode 100644 index 000000000000..b497982795a7 --- /dev/null +++ b/arch/arm/plat-samsung/dev-ide.c | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/dev-ide.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Samsung CF-ATA device definition. | ||
| 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/interrupt.h> | ||
| 15 | #include <linux/platform_device.h> | ||
| 16 | |||
| 17 | #include <mach/map.h> | ||
| 18 | #include <plat/ata.h> | ||
| 19 | #include <plat/devs.h> | ||
| 20 | |||
| 21 | static struct resource s3c_cfcon_resource[] = { | ||
| 22 | [0] = { | ||
| 23 | .start = SAMSUNG_PA_CFCON, | ||
| 24 | .end = SAMSUNG_PA_CFCON + SZ_16K - 1, | ||
| 25 | .flags = IORESOURCE_MEM, | ||
| 26 | }, | ||
| 27 | [1] = { | ||
| 28 | .start = IRQ_CFCON, | ||
| 29 | .end = IRQ_CFCON, | ||
| 30 | .flags = IORESOURCE_IRQ, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | struct platform_device s3c_device_cfcon = { | ||
| 35 | .id = 0, | ||
| 36 | .num_resources = ARRAY_SIZE(s3c_cfcon_resource), | ||
| 37 | .resource = s3c_cfcon_resource, | ||
| 38 | }; | ||
| 39 | |||
| 40 | void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata) | ||
| 41 | { | ||
| 42 | s3c_set_platdata(pdata, sizeof(struct s3c_ide_platdata), | ||
| 43 | &s3c_device_cfcon); | ||
| 44 | } | ||
diff --git a/arch/arm/plat-samsung/dev-keypad.c b/arch/arm/plat-samsung/dev-keypad.c new file mode 100644 index 000000000000..677c2d731b65 --- /dev/null +++ b/arch/arm/plat-samsung/dev-keypad.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/plat-samsung/dev-keypad.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
| 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <mach/irqs.h> | ||
| 16 | #include <mach/map.h> | ||
| 17 | #include <plat/cpu.h> | ||
| 18 | #include <plat/devs.h> | ||
| 19 | #include <plat/keypad.h> | ||
| 20 | |||
| 21 | static struct resource samsung_keypad_resources[] = { | ||
| 22 | [0] = { | ||
| 23 | .start = SAMSUNG_PA_KEYPAD, | ||
| 24 | .end = SAMSUNG_PA_KEYPAD + 0x20 - 1, | ||
| 25 | .flags = IORESOURCE_MEM, | ||
| 26 | }, | ||
| 27 | [1] = { | ||
| 28 | .start = IRQ_KEYPAD, | ||
| 29 | .end = IRQ_KEYPAD, | ||
| 30 | .flags = IORESOURCE_IRQ, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | struct platform_device samsung_device_keypad = { | ||
| 35 | .name = "samsung-keypad", | ||
| 36 | .id = -1, | ||
| 37 | .num_resources = ARRAY_SIZE(samsung_keypad_resources), | ||
| 38 | .resource = samsung_keypad_resources, | ||
| 39 | }; | ||
| 40 | |||
| 41 | void __init samsung_keypad_set_platdata(struct samsung_keypad_platdata *pd) | ||
| 42 | { | ||
| 43 | struct samsung_keypad_platdata *npd; | ||
| 44 | |||
| 45 | npd = s3c_set_platdata(pd, sizeof(struct samsung_keypad_platdata), | ||
| 46 | &samsung_device_keypad); | ||
| 47 | |||
| 48 | if (!npd->cfg_gpio) | ||
| 49 | npd->cfg_gpio = samsung_keypad_cfg_gpio; | ||
| 50 | } | ||
diff --git a/arch/arm/plat-samsung/dev-wdt.c b/arch/arm/plat-samsung/dev-wdt.c index 5efca87cddbd..019b5b8cf14c 100644 --- a/arch/arm/plat-samsung/dev-wdt.c +++ b/arch/arm/plat-samsung/dev-wdt.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | static struct resource s3c_wdt_resource[] = { | 21 | static struct resource s3c_wdt_resource[] = { |
| 22 | [0] = { | 22 | [0] = { |
| 23 | .start = S3C_PA_WDT, | 23 | .start = S3C_PA_WDT, |
| 24 | .end = S3C_PA_WDT + SZ_1M - 1, | 24 | .end = S3C_PA_WDT + SZ_1K, |
| 25 | .flags = IORESOURCE_MEM, | 25 | .flags = IORESOURCE_MEM, |
| 26 | }, | 26 | }, |
| 27 | [1] = { | 27 | [1] = { |
diff --git a/arch/arm/plat-samsung/gpiolib.c b/arch/arm/plat-samsung/gpiolib.c index 8a8ba8bc1d96..c354089254fc 100644 --- a/arch/arm/plat-samsung/gpiolib.c +++ b/arch/arm/plat-samsung/gpiolib.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| 19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | #include <mach/gpio.h> | 21 | #include <linux/gpio.h> |
| 22 | #include <plat/gpio-core.h> | 22 | #include <plat/gpio-core.h> |
| 23 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
| 24 | #include <plat/gpio-cfg-helpers.h> | 24 | #include <plat/gpio-cfg-helpers.h> |
diff --git a/arch/arm/plat-samsung/include/plat/adc-core.h b/arch/arm/plat-samsung/include/plat/adc-core.h new file mode 100644 index 000000000000..a281568d5856 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/adc-core.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/adc-core.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com/ | ||
| 5 | * | ||
| 6 | * Samsung ADC Controller core functions | ||
| 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 | #ifndef __ASM_PLAT_ADC_CORE_H | ||
| 14 | #define __ASM_PLAT_ADC_CORE_H __FILE__ | ||
| 15 | |||
| 16 | /* These functions are only for use with the core support code, such as | ||
| 17 | * the cpu specific initialisation code | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* re-define device name depending on support. */ | ||
| 21 | static inline void s3c_adc_setname(char *name) | ||
| 22 | { | ||
| 23 | #ifdef CONFIG_SAMSUNG_DEV_ADC | ||
| 24 | s3c_device_adc.name = name; | ||
| 25 | #endif | ||
| 26 | } | ||
| 27 | |||
| 28 | #endif /* __ASM_PLAT_ADC_CORE_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/ata-core.h b/arch/arm/plat-samsung/include/plat/ata-core.h new file mode 100644 index 000000000000..f5a4ec7141b1 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/ata-core.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/ata-core.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Samsung CF-ATA Controller core functions | ||
| 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 | #ifndef __ASM_PLAT_ATA_CORE_H | ||
| 14 | #define __ASM_PLAT_ATA_CORE_H __FILE__ | ||
| 15 | |||
| 16 | /* These functions are only for use with the core support code, such as | ||
| 17 | * the cpu specific initialisation code | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* re-define device name depending on support. */ | ||
| 21 | static inline void s3c_cfcon_setname(char *name) | ||
| 22 | { | ||
| 23 | #ifdef CONFIG_SAMSUNG_DEV_IDE | ||
| 24 | s3c_device_cfcon.name = name; | ||
| 25 | #endif | ||
| 26 | } | ||
| 27 | |||
| 28 | #endif /* __ASM_PLAT_ATA_CORE_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/ata.h b/arch/arm/plat-samsung/include/plat/ata.h new file mode 100644 index 000000000000..2a3855a8372a --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/ata.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/ata.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Samsung CF-ATA platform_device info | ||
| 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 | #ifndef __ASM_PLAT_ATA_H | ||
| 14 | #define __ASM_PLAT_ATA_H __FILE__ | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct s3c_ide_platdata - S3C IDE driver platform data. | ||
| 18 | * @setup_gpio: Setup the external GPIO pins to the right state for data | ||
| 19 | * transfer in true-ide mode. | ||
| 20 | */ | ||
| 21 | struct s3c_ide_platdata { | ||
| 22 | void (*setup_gpio)(void); | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* | ||
| 26 | * s3c_ide_set_platdata() - Setup the platform specifc data for IDE driver. | ||
| 27 | * @pdata: Platform data for IDE driver. | ||
| 28 | */ | ||
| 29 | extern void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata); | ||
| 30 | |||
| 31 | /* architecture-specific IDE configuration */ | ||
| 32 | extern void s3c64xx_ide_setup_gpio(void); | ||
| 33 | extern void s5pc100_ide_setup_gpio(void); | ||
| 34 | extern void s5pv210_ide_setup_gpio(void); | ||
| 35 | |||
| 36 | #endif /*__ASM_PLAT_ATA_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index e6144e4b9118..85f6f23a510f 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
| @@ -54,6 +54,8 @@ extern struct platform_device s3c_device_hwmon; | |||
| 54 | extern struct platform_device s3c_device_hsmmc0; | 54 | extern struct platform_device s3c_device_hsmmc0; |
| 55 | extern struct platform_device s3c_device_hsmmc1; | 55 | extern struct platform_device s3c_device_hsmmc1; |
| 56 | extern struct platform_device s3c_device_hsmmc2; | 56 | extern struct platform_device s3c_device_hsmmc2; |
| 57 | extern struct platform_device s3c_device_hsmmc3; | ||
| 58 | extern struct platform_device s3c_device_cfcon; | ||
| 57 | 59 | ||
| 58 | extern struct platform_device s3c_device_spi0; | 60 | extern struct platform_device s3c_device_spi0; |
| 59 | extern struct platform_device s3c_device_spi1; | 61 | extern struct platform_device s3c_device_spi1; |
| @@ -100,6 +102,12 @@ extern struct platform_device s5pc100_device_iis0; | |||
| 100 | extern struct platform_device s5pc100_device_iis1; | 102 | extern struct platform_device s5pc100_device_iis1; |
| 101 | extern struct platform_device s5pc100_device_iis2; | 103 | extern struct platform_device s5pc100_device_iis2; |
| 102 | 104 | ||
| 105 | extern struct platform_device samsung_device_keypad; | ||
| 106 | |||
| 107 | extern struct platform_device s5p_device_fimc0; | ||
| 108 | extern struct platform_device s5p_device_fimc1; | ||
| 109 | extern struct platform_device s5p_device_fimc2; | ||
| 110 | |||
| 103 | /* s3c2440 specific devices */ | 111 | /* s3c2440 specific devices */ |
| 104 | 112 | ||
| 105 | #ifdef CONFIG_CPU_S3C2440 | 113 | #ifdef CONFIG_CPU_S3C2440 |
| @@ -108,3 +116,15 @@ extern struct platform_device s3c_device_camif; | |||
| 108 | extern struct platform_device s3c_device_ac97; | 116 | extern struct platform_device s3c_device_ac97; |
| 109 | 117 | ||
| 110 | #endif | 118 | #endif |
| 119 | |||
| 120 | /** | ||
| 121 | * s3c_set_platdata() - helper for setting platform data | ||
| 122 | * @pd: The default platform data for this device. | ||
| 123 | * @pdsize: The size of the platform data. | ||
| 124 | * @pdev: Pointer to the device to fill in. | ||
| 125 | * | ||
| 126 | * This helper replaces a number of calls that copy and then set the | ||
| 127 | * platform data of the device. | ||
| 128 | */ | ||
| 129 | extern void *s3c_set_platdata(void *pd, size_t pdsize, | ||
| 130 | struct platform_device *pdev); | ||
diff --git a/arch/arm/plat-samsung/include/plat/fimc-core.h b/arch/arm/plat-samsung/include/plat/fimc-core.h new file mode 100644 index 000000000000..81a3bfeeccad --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/fimc-core.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/plat-samsung/include/plat/fimc-core.h | ||
| 3 | * | ||
| 4 | * Copyright 2010 Samsung Electronics Co., Ltd. | ||
| 5 | * Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
| 6 | * | ||
| 7 | * Samsung camera interface driver core functions | ||
| 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 | #ifndef __ASM_PLAT_FIMC_CORE_H | ||
| 15 | #define __ASM_PLAT_FIMC_CORE_H __FILE__ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * These functions are only for use with the core support code, such as | ||
| 19 | * the CPU-specific initialization code. | ||
| 20 | */ | ||
| 21 | |||
| 22 | /* Re-define device name to differentiate the subsystem in various SoCs. */ | ||
| 23 | static inline void s3c_fimc_setname(int id, char *name) | ||
| 24 | { | ||
| 25 | switch (id) { | ||
| 26 | #ifdef CONFIG_S5P_DEV_FIMC0 | ||
| 27 | case 0: | ||
| 28 | s5p_device_fimc0.name = name; | ||
| 29 | break; | ||
| 30 | #endif | ||
| 31 | #ifdef CONFIG_S5P_DEV_FIMC1 | ||
| 32 | case 1: | ||
| 33 | s5p_device_fimc1.name = name; | ||
| 34 | break; | ||
| 35 | #endif | ||
| 36 | #ifdef CONFIG_S5P_DEV_FIMC2 | ||
| 37 | case 2: | ||
| 38 | s5p_device_fimc2.name = name; | ||
| 39 | break; | ||
| 40 | #endif | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | #endif /* __ASM_PLAT_FIMC_CORE_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/plat-samsung/include/plat/keypad.h new file mode 100644 index 000000000000..b59a6483cd8a --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/keypad.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | * Samsung Platform - Keypad platform data definitions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
| 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __PLAT_SAMSUNG_KEYPAD_H | ||
| 14 | #define __PLAT_SAMSUNG_KEYPAD_H | ||
| 15 | |||
| 16 | #include <linux/input/matrix_keypad.h> | ||
| 17 | |||
| 18 | #define SAMSUNG_MAX_ROWS 8 | ||
| 19 | #define SAMSUNG_MAX_COLS 8 | ||
| 20 | |||
| 21 | /** | ||
| 22 | * struct samsung_keypad_platdata - Platform device data for Samsung Keypad. | ||
| 23 | * @keymap_data: pointer to &matrix_keymap_data. | ||
| 24 | * @rows: number of keypad row supported. | ||
| 25 | * @cols: number of keypad col supported. | ||
| 26 | * @no_autorepeat: disable key autorepeat. | ||
| 27 | * @wakeup: controls whether the device should be set up as wakeup source. | ||
| 28 | * @cfg_gpio: configure the GPIO. | ||
| 29 | * | ||
| 30 | * Initialisation data specific to either the machine or the platform | ||
| 31 | * for the device driver to use or call-back when configuring gpio. | ||
| 32 | */ | ||
| 33 | struct samsung_keypad_platdata { | ||
| 34 | const struct matrix_keymap_data *keymap_data; | ||
| 35 | unsigned int rows; | ||
| 36 | unsigned int cols; | ||
| 37 | bool no_autorepeat; | ||
| 38 | bool wakeup; | ||
| 39 | |||
| 40 | void (*cfg_gpio)(unsigned int rows, unsigned int cols); | ||
| 41 | }; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * samsung_keypad_set_platdata - Set platform data for Samsung Keypad device. | ||
| 45 | * @pd: Platform data to register to device. | ||
| 46 | * | ||
| 47 | * Register the given platform data for use with Samsung Keypad device. | ||
| 48 | * The call will copy the platform data, so the board definitions can | ||
| 49 | * make the structure itself __initdata. | ||
| 50 | */ | ||
| 51 | extern void samsung_keypad_set_platdata(struct samsung_keypad_platdata *pd); | ||
| 52 | |||
| 53 | /* defined by architecture to configure gpio. */ | ||
| 54 | extern void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols); | ||
| 55 | |||
| 56 | #endif /* __PLAT_SAMSUNG_KEYPAD_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-ata.h b/arch/arm/plat-samsung/include/plat/regs-ata.h new file mode 100644 index 000000000000..f5df92fdae26 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/regs-ata.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/regs-ata.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * Samsung CF-ATA register definitions | ||
| 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 | #ifndef __ASM_PLAT_REGS_ATA_H | ||
| 14 | #define __ASM_PLAT_REGS_ATA_H __FILE__ | ||
| 15 | |||
| 16 | #define S3C_CFATA_REG(x) (x) | ||
| 17 | |||
| 18 | #define S3C_CFATA_MUX S3C_CFATA_REG(0x0) | ||
| 19 | |||
| 20 | #define S3C_ATA_CTRL S3C_CFATA_REG(0x0) | ||
| 21 | #define S3C_ATA_STATUS S3C_CFATA_REG(0x4) | ||
| 22 | #define S3C_ATA_CMD S3C_CFATA_REG(0x8) | ||
| 23 | #define S3C_ATA_SWRST S3C_CFATA_REG(0xc) | ||
| 24 | #define S3C_ATA_IRQ S3C_CFATA_REG(0x10) | ||
| 25 | #define S3C_ATA_IRQ_MSK S3C_CFATA_REG(0x14) | ||
| 26 | #define S3C_ATA_CFG S3C_CFATA_REG(0x18) | ||
| 27 | |||
| 28 | #define S3C_ATA_MDMA_TIME S3C_CFATA_REG(0x28) | ||
| 29 | #define S3C_ATA_PIO_TIME S3C_CFATA_REG(0x2c) | ||
| 30 | #define S3C_ATA_UDMA_TIME S3C_CFATA_REG(0x30) | ||
| 31 | #define S3C_ATA_XFR_NUM S3C_CFATA_REG(0x34) | ||
| 32 | #define S3C_ATA_XFR_CNT S3C_CFATA_REG(0x38) | ||
| 33 | #define S3C_ATA_TBUF_START S3C_CFATA_REG(0x3c) | ||
| 34 | #define S3C_ATA_TBUF_SIZE S3C_CFATA_REG(0x40) | ||
| 35 | #define S3C_ATA_SBUF_START S3C_CFATA_REG(0x44) | ||
| 36 | #define S3C_ATA_SBUF_SIZE S3C_CFATA_REG(0x48) | ||
| 37 | #define S3C_ATA_CADR_TBUF S3C_CFATA_REG(0x4c) | ||
| 38 | #define S3C_ATA_CADR_SBUF S3C_CFATA_REG(0x50) | ||
| 39 | #define S3C_ATA_PIO_DTR S3C_CFATA_REG(0x54) | ||
| 40 | #define S3C_ATA_PIO_FED S3C_CFATA_REG(0x58) | ||
| 41 | #define S3C_ATA_PIO_SCR S3C_CFATA_REG(0x5c) | ||
| 42 | #define S3C_ATA_PIO_LLR S3C_CFATA_REG(0x60) | ||
| 43 | #define S3C_ATA_PIO_LMR S3C_CFATA_REG(0x64) | ||
| 44 | #define S3C_ATA_PIO_LHR S3C_CFATA_REG(0x68) | ||
| 45 | #define S3C_ATA_PIO_DVR S3C_CFATA_REG(0x6c) | ||
| 46 | #define S3C_ATA_PIO_CSD S3C_CFATA_REG(0x70) | ||
| 47 | #define S3C_ATA_PIO_DAD S3C_CFATA_REG(0x74) | ||
| 48 | #define S3C_ATA_PIO_READY S3C_CFATA_REG(0x78) | ||
| 49 | #define S3C_ATA_PIO_RDATA S3C_CFATA_REG(0x7c) | ||
| 50 | |||
| 51 | #define S3C_CFATA_MUX_TRUEIDE 0x01 | ||
| 52 | |||
| 53 | #define S3C_ATA_CFG_SWAP 0x40 | ||
| 54 | #define S3C_ATA_CFG_IORDYEN 0x02 | ||
| 55 | |||
| 56 | #endif /* __ASM_PLAT_REGS_ATA_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-rtc.h b/arch/arm/plat-samsung/include/plat/regs-rtc.h index 65c190d142dd..30b7cc14cef5 100644 --- a/arch/arm/plat-samsung/include/plat/regs-rtc.h +++ b/arch/arm/plat-samsung/include/plat/regs-rtc.h | |||
| @@ -14,6 +14,9 @@ | |||
| 14 | #define __ASM_ARCH_REGS_RTC_H __FILE__ | 14 | #define __ASM_ARCH_REGS_RTC_H __FILE__ |
| 15 | 15 | ||
| 16 | #define S3C2410_RTCREG(x) (x) | 16 | #define S3C2410_RTCREG(x) (x) |
| 17 | #define S3C2410_INTP S3C2410_RTCREG(0x30) | ||
| 18 | #define S3C2410_INTP_ALM (1 << 1) | ||
| 19 | #define S3C2410_INTP_TIC (1 << 0) | ||
| 17 | 20 | ||
| 18 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) | 21 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) |
| 19 | #define S3C2410_RTCCON_RTCEN (1<<0) | 22 | #define S3C2410_RTCCON_RTCEN (1<<0) |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 10413728530f..30844c263d03 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
| @@ -20,10 +20,31 @@ struct mmc_host; | |||
| 20 | struct mmc_card; | 20 | struct mmc_card; |
| 21 | struct mmc_ios; | 21 | struct mmc_ios; |
| 22 | 22 | ||
| 23 | enum cd_types { | ||
| 24 | S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */ | ||
| 25 | S3C_SDHCI_CD_EXTERNAL, /* use external callback */ | ||
| 26 | S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */ | ||
| 27 | S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */ | ||
| 28 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ | ||
| 29 | }; | ||
| 30 | |||
| 23 | /** | 31 | /** |
| 24 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI | 32 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI |
| 25 | * @max_width: The maximum number of data bits supported. | 33 | * @max_width: The maximum number of data bits supported. |
| 26 | * @host_caps: Standard MMC host capabilities bit field. | 34 | * @host_caps: Standard MMC host capabilities bit field. |
| 35 | * @cd_type: Type of Card Detection method (see cd_types enum above) | ||
| 36 | * @ext_cd_init: Initialize external card detect subsystem. Called on | ||
| 37 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. | ||
| 38 | * notify_func argument is a callback to the sdhci-s3c driver | ||
| 39 | * that triggers the card detection event. Callback arguments: | ||
| 40 | * dev is pointer to platform device of the host controller, | ||
| 41 | * state is new state of the card (0 - removed, 1 - inserted). | ||
| 42 | * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on | ||
| 43 | * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL. | ||
| 44 | * notify_func argument is the same callback as for ext_cd_init. | ||
| 45 | * @ext_cd_gpio: gpio pin used for external CD line, valid only if | ||
| 46 | * cd_type == S3C_SDHCI_CD_GPIO | ||
| 47 | * @ext_cd_gpio_invert: invert values for external CD gpio line | ||
| 27 | * @cfg_gpio: Configure the GPIO for a specific card bit-width | 48 | * @cfg_gpio: Configure the GPIO for a specific card bit-width |
| 28 | * @cfg_card: Configure the interface for a specific card and speed. This | 49 | * @cfg_card: Configure the interface for a specific card and speed. This |
| 29 | * is necessary the controllers and/or GPIO blocks require the | 50 | * is necessary the controllers and/or GPIO blocks require the |
| @@ -37,9 +58,17 @@ struct mmc_ios; | |||
| 37 | struct s3c_sdhci_platdata { | 58 | struct s3c_sdhci_platdata { |
| 38 | unsigned int max_width; | 59 | unsigned int max_width; |
| 39 | unsigned int host_caps; | 60 | unsigned int host_caps; |
| 61 | enum cd_types cd_type; | ||
| 40 | 62 | ||
| 41 | char **clocks; /* set of clock sources */ | 63 | char **clocks; /* set of clock sources */ |
| 42 | 64 | ||
| 65 | int ext_cd_gpio; | ||
| 66 | bool ext_cd_gpio_invert; | ||
| 67 | int (*ext_cd_init)(void (*notify_func)(struct platform_device *, | ||
| 68 | int state)); | ||
| 69 | int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *, | ||
| 70 | int state)); | ||
| 71 | |||
| 43 | void (*cfg_gpio)(struct platform_device *dev, int width); | 72 | void (*cfg_gpio)(struct platform_device *dev, int width); |
| 44 | void (*cfg_card)(struct platform_device *dev, | 73 | void (*cfg_card)(struct platform_device *dev, |
| 45 | void __iomem *regbase, | 74 | void __iomem *regbase, |
| @@ -58,6 +87,7 @@ struct s3c_sdhci_platdata { | |||
| 58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); | 87 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); |
| 59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); | 88 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); |
| 60 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | 89 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); |
| 90 | extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd); | ||
| 61 | 91 | ||
| 62 | /* Default platform data, exported so that per-cpu initialisation can | 92 | /* Default platform data, exported so that per-cpu initialisation can |
| 63 | * set the correct one when there are more than one cpu type selected. | 93 | * set the correct one when there are more than one cpu type selected. |
| @@ -66,6 +96,7 @@ extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | |||
| 66 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; | 96 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; |
| 67 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | 97 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; |
| 68 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | 98 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
| 99 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | ||
| 69 | 100 | ||
| 70 | /* Helper function availablity */ | 101 | /* Helper function availablity */ |
| 71 | 102 | ||
| @@ -80,12 +111,11 @@ extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
| 80 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 111 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
| 81 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 112 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
| 82 | 113 | ||
| 83 | /* S3C6400 SDHCI setup */ | 114 | /* S3C64XX SDHCI setup */ |
| 84 | 115 | ||
| 85 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 116 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
| 86 | extern char *s3c64xx_hsmmc_clksrcs[4]; | 117 | extern char *s3c64xx_hsmmc_clksrcs[4]; |
| 87 | 118 | ||
| 88 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 89 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | 119 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, |
| 90 | void __iomem *r, | 120 | void __iomem *r, |
| 91 | struct mmc_ios *ios, | 121 | struct mmc_ios *ios, |
| @@ -93,76 +123,62 @@ extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | |||
| 93 | 123 | ||
| 94 | static inline void s3c6400_default_sdhci0(void) | 124 | static inline void s3c6400_default_sdhci0(void) |
| 95 | { | 125 | { |
| 126 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 96 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 127 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 97 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 128 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
| 98 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 129 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
| 130 | #endif | ||
| 99 | } | 131 | } |
| 100 | 132 | ||
| 101 | #else | ||
| 102 | static inline void s3c6400_default_sdhci0(void) { } | ||
| 103 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
| 104 | |||
| 105 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 106 | static inline void s3c6400_default_sdhci1(void) | 133 | static inline void s3c6400_default_sdhci1(void) |
| 107 | { | 134 | { |
| 135 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 108 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 136 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 109 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 137 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
| 110 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 138 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
| 139 | #endif | ||
| 111 | } | 140 | } |
| 112 | #else | ||
| 113 | static inline void s3c6400_default_sdhci1(void) { } | ||
| 114 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
| 115 | 141 | ||
| 116 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 117 | static inline void s3c6400_default_sdhci2(void) | 142 | static inline void s3c6400_default_sdhci2(void) |
| 118 | { | 143 | { |
| 144 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 119 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 145 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 120 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 146 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
| 121 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 147 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
| 148 | #endif | ||
| 122 | } | 149 | } |
| 123 | #else | ||
| 124 | static inline void s3c6400_default_sdhci2(void) { } | ||
| 125 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
| 126 | |||
| 127 | /* S3C6410 SDHCI setup */ | ||
| 128 | 150 | ||
| 129 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, | 151 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, |
| 130 | void __iomem *r, | 152 | void __iomem *r, |
| 131 | struct mmc_ios *ios, | 153 | struct mmc_ios *ios, |
| 132 | struct mmc_card *card); | 154 | struct mmc_card *card); |
| 133 | 155 | ||
| 134 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 135 | static inline void s3c6410_default_sdhci0(void) | 156 | static inline void s3c6410_default_sdhci0(void) |
| 136 | { | 157 | { |
| 158 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 137 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 159 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 138 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 160 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
| 139 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 161 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
| 162 | #endif | ||
| 140 | } | 163 | } |
| 141 | #else | ||
| 142 | static inline void s3c6410_default_sdhci0(void) { } | ||
| 143 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
| 144 | 164 | ||
| 145 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 146 | static inline void s3c6410_default_sdhci1(void) | 165 | static inline void s3c6410_default_sdhci1(void) |
| 147 | { | 166 | { |
| 167 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 148 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 168 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 149 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 169 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
| 150 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 170 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
| 171 | #endif | ||
| 151 | } | 172 | } |
| 152 | #else | ||
| 153 | static inline void s3c6410_default_sdhci1(void) { } | ||
| 154 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
| 155 | 173 | ||
| 156 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 157 | static inline void s3c6410_default_sdhci2(void) | 174 | static inline void s3c6410_default_sdhci2(void) |
| 158 | { | 175 | { |
| 176 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 159 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | 177 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
| 160 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 178 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
| 161 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; | 179 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
| 180 | #endif | ||
| 162 | } | 181 | } |
| 163 | #else | ||
| 164 | static inline void s3c6410_default_sdhci2(void) { } | ||
| 165 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
| 166 | 182 | ||
| 167 | #else | 183 | #else |
| 168 | static inline void s3c6410_default_sdhci0(void) { } | 184 | static inline void s3c6410_default_sdhci0(void) { } |
| @@ -184,48 +200,42 @@ extern void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev, | |||
| 184 | struct mmc_ios *ios, | 200 | struct mmc_ios *ios, |
| 185 | struct mmc_card *card); | 201 | struct mmc_card *card); |
| 186 | 202 | ||
| 187 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 188 | static inline void s5pc100_default_sdhci0(void) | 203 | static inline void s5pc100_default_sdhci0(void) |
| 189 | { | 204 | { |
| 205 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 190 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 206 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
| 191 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; | 207 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; |
| 192 | s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 208 | s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
| 209 | #endif | ||
| 193 | } | 210 | } |
| 194 | #else | ||
| 195 | static inline void s5pc100_default_sdhci0(void) { } | ||
| 196 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
| 197 | 211 | ||
| 198 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 199 | static inline void s5pc100_default_sdhci1(void) | 212 | static inline void s5pc100_default_sdhci1(void) |
| 200 | { | 213 | { |
| 214 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 201 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 215 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
| 202 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; | 216 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; |
| 203 | s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 217 | s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
| 218 | #endif | ||
| 204 | } | 219 | } |
| 205 | #else | ||
| 206 | static inline void s5pc100_default_sdhci1(void) { } | ||
| 207 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
| 208 | 220 | ||
| 209 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 210 | static inline void s5pc100_default_sdhci2(void) | 221 | static inline void s5pc100_default_sdhci2(void) |
| 211 | { | 222 | { |
| 223 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 212 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | 224 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; |
| 213 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; | 225 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; |
| 214 | s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; | 226 | s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card; |
| 227 | #endif | ||
| 215 | } | 228 | } |
| 216 | #else | ||
| 217 | static inline void s5pc100_default_sdhci2(void) { } | ||
| 218 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
| 219 | |||
| 220 | 229 | ||
| 221 | #else | 230 | #else |
| 222 | static inline void s5pc100_default_sdhci0(void) { } | 231 | static inline void s5pc100_default_sdhci0(void) { } |
| 223 | static inline void s5pc100_default_sdhci1(void) { } | 232 | static inline void s5pc100_default_sdhci1(void) { } |
| 224 | static inline void s5pc100_default_sdhci2(void) { } | 233 | static inline void s5pc100_default_sdhci2(void) { } |
| 234 | |||
| 225 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | 235 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ |
| 226 | 236 | ||
| 237 | /* S5PV210 SDHCI setup */ | ||
| 227 | 238 | ||
| 228 | /* S5PC110 SDHCI setup */ | ||
| 229 | #ifdef CONFIG_S5PV210_SETUP_SDHCI | 239 | #ifdef CONFIG_S5PV210_SETUP_SDHCI |
| 230 | extern char *s5pv210_hsmmc_clksrcs[4]; | 240 | extern char *s5pv210_hsmmc_clksrcs[4]; |
| 231 | 241 | ||
| @@ -234,58 +244,48 @@ extern void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev, | |||
| 234 | struct mmc_ios *ios, | 244 | struct mmc_ios *ios, |
| 235 | struct mmc_card *card); | 245 | struct mmc_card *card); |
| 236 | 246 | ||
| 237 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 238 | static inline void s5pv210_default_sdhci0(void) | 247 | static inline void s5pv210_default_sdhci0(void) |
| 239 | { | 248 | { |
| 249 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
| 240 | s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 250 | s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
| 241 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; | 251 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; |
| 242 | s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 252 | s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
| 253 | #endif | ||
| 243 | } | 254 | } |
| 244 | #else | ||
| 245 | static inline void s5pv210_default_sdhci0(void) { } | ||
| 246 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
| 247 | 255 | ||
| 248 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 249 | static inline void s5pv210_default_sdhci1(void) | 256 | static inline void s5pv210_default_sdhci1(void) |
| 250 | { | 257 | { |
| 258 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
| 251 | s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 259 | s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
| 252 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; | 260 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; |
| 253 | s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 261 | s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
| 262 | #endif | ||
| 254 | } | 263 | } |
| 255 | #else | ||
| 256 | static inline void s5pv210_default_sdhci1(void) { } | ||
| 257 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
| 258 | 264 | ||
| 259 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 260 | static inline void s5pv210_default_sdhci2(void) | 265 | static inline void s5pv210_default_sdhci2(void) |
| 261 | { | 266 | { |
| 267 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
| 262 | s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 268 | s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
| 263 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; | 269 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; |
| 264 | s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 270 | s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
| 271 | #endif | ||
| 265 | } | 272 | } |
| 266 | #else | ||
| 267 | static inline void s5pv210_default_sdhci2(void) { } | ||
| 268 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | ||
| 269 | 273 | ||
| 270 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
| 271 | static inline void s5pv210_default_sdhci3(void) | 274 | static inline void s5pv210_default_sdhci3(void) |
| 272 | { | 275 | { |
| 276 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
| 273 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | 277 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; |
| 274 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; | 278 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; |
| 275 | s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; | 279 | s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card; |
| 280 | #endif | ||
| 276 | } | 281 | } |
| 277 | #else | ||
| 278 | static inline void s5pv210_default_sdhci3(void) { } | ||
| 279 | #endif /* CONFIG_S3C_DEV_HSMMC3 */ | ||
| 280 | 282 | ||
| 281 | #else | 283 | #else |
| 282 | static inline void s5pv210_default_sdhci0(void) { } | 284 | static inline void s5pv210_default_sdhci0(void) { } |
| 283 | static inline void s5pv210_default_sdhci1(void) { } | 285 | static inline void s5pv210_default_sdhci1(void) { } |
| 284 | static inline void s5pv210_default_sdhci2(void) { } | 286 | static inline void s5pv210_default_sdhci2(void) { } |
| 285 | static inline void s5pv210_default_sdhci3(void) { } | 287 | static inline void s5pv210_default_sdhci3(void) { } |
| 286 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ | ||
| 287 | |||
| 288 | |||
| 289 | 288 | ||
| 289 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ | ||
| 290 | 290 | ||
| 291 | #endif /* __PLAT_S3C_SDHCI_H */ | 291 | #endif /* __PLAT_S3C_SDHCI_H */ |
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-samsung/platformdata.c new file mode 100644 index 000000000000..7cf2e1e3b20f --- /dev/null +++ b/arch/arm/plat-samsung/platformdata.c | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/platformdata.c | ||
| 2 | * | ||
| 3 | * Copyright 2010 Ben Dooks <ben-linux <at> fluff.org> | ||
| 4 | * | ||
| 5 | * Helper for platform data setting | ||
| 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 | #include <linux/kernel.h> | ||
| 13 | #include <linux/string.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | |||
| 16 | #include <plat/devs.h> | ||
| 17 | |||
| 18 | void __init *s3c_set_platdata(void *pd, size_t pdsize, | ||
| 19 | struct platform_device *pdev) | ||
| 20 | { | ||
| 21 | void *npd; | ||
| 22 | |||
| 23 | if (!pd) { | ||
| 24 | /* too early to use dev_name(), may not be registered */ | ||
| 25 | printk(KERN_ERR "%s: no platform data supplied\n", pdev->name); | ||
| 26 | return NULL; | ||
| 27 | } | ||
| 28 | |||
| 29 | npd = kmemdup(pd, pdsize, GFP_KERNEL); | ||
| 30 | if (!npd) { | ||
| 31 | printk(KERN_ERR "%s: cannot clone platform data\n", pdev->name); | ||
| 32 | return NULL; | ||
| 33 | } | ||
| 34 | |||
| 35 | pdev->dev.platform_data = npd; | ||
| 36 | return npd; | ||
| 37 | } | ||
