diff options
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r-- | arch/arm/mach-s5pc100/Kconfig | 23 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/clock.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/cpu.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/dev-audio.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/dev-spi.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/irqs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/map.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/regs-clock.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/system.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/mach-smdkc100.c | 78 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/setup-ide.c | 70 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/setup-keypad.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/setup-sdhci.c | 8 |
15 files changed, 249 insertions, 42 deletions
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index b2a11dfa3399..77ae4bfb74ba 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
@@ -25,6 +25,16 @@ config S5PC100_SETUP_I2C1 | |||
25 | help | 25 | help |
26 | Common setup code for i2c bus 1. | 26 | Common setup code for i2c bus 1. |
27 | 27 | ||
28 | config S5PC100_SETUP_IDE | ||
29 | bool | ||
30 | help | ||
31 | Common setup code for S5PC100 IDE GPIO configurations | ||
32 | |||
33 | config S5PC100_SETUP_KEYPAD | ||
34 | bool | ||
35 | help | ||
36 | Common setup code for KEYPAD GPIO configurations. | ||
37 | |||
28 | config S5PC100_SETUP_SDHCI | 38 | config S5PC100_SETUP_SDHCI |
29 | bool | 39 | bool |
30 | select S5PC100_SETUP_SDHCI_GPIO | 40 | select S5PC100_SETUP_SDHCI_GPIO |
@@ -40,13 +50,24 @@ config MACH_SMDKC100 | |||
40 | bool "SMDKC100" | 50 | bool "SMDKC100" |
41 | select CPU_S5PC100 | 51 | select CPU_S5PC100 |
42 | select S3C_DEV_FB | 52 | select S3C_DEV_FB |
43 | select S3C_DEV_I2C1 | ||
44 | select S3C_DEV_HSMMC | 53 | select S3C_DEV_HSMMC |
45 | select S3C_DEV_HSMMC1 | 54 | select S3C_DEV_HSMMC1 |
46 | select S3C_DEV_HSMMC2 | 55 | select S3C_DEV_HSMMC2 |
56 | select S3C_DEV_I2C1 | ||
57 | select S3C_DEV_RTC | ||
58 | select S3C_DEV_WDT | ||
59 | select SAMSUNG_DEV_ADC | ||
60 | select SAMSUNG_DEV_IDE | ||
61 | select SAMSUNG_DEV_KEYPAD | ||
62 | select SAMSUNG_DEV_TS | ||
47 | select S5PC100_SETUP_FB_24BPP | 63 | select S5PC100_SETUP_FB_24BPP |
48 | select S5PC100_SETUP_I2C1 | 64 | select S5PC100_SETUP_I2C1 |
65 | select S5PC100_SETUP_IDE | ||
66 | select S5PC100_SETUP_KEYPAD | ||
49 | select S5PC100_SETUP_SDHCI | 67 | select S5PC100_SETUP_SDHCI |
68 | select S5P_DEV_FIMC0 | ||
69 | select S5P_DEV_FIMC1 | ||
70 | select S5P_DEV_FIMC2 | ||
50 | help | 71 | help |
51 | Machine support for the Samsung SMDKC100 | 72 | Machine support for the Samsung SMDKC100 |
52 | 73 | ||
diff --git a/arch/arm/mach-s5pc100/Makefile b/arch/arm/mach-s5pc100/Makefile index 543f3de5131e..a021ed1fb4b6 100644 --- a/arch/arm/mach-s5pc100/Makefile +++ b/arch/arm/mach-s5pc100/Makefile | |||
@@ -19,6 +19,8 @@ obj-$(CONFIG_CPU_S5PC100) += dma.o | |||
19 | 19 | ||
20 | obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o | 20 | obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o |
21 | obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o | 21 | obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o |
22 | obj-$(CONFIG_S5PC100_SETUP_IDE) += setup-ide.o | ||
23 | obj-$(CONFIG_S5PC100_SETUP_KEYPAD) += setup-keypad.o | ||
22 | obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o | 24 | obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o |
23 | obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 25 | obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
24 | 26 | ||
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c index e3fed4cfe7ad..084abd13b0a5 100644 --- a/arch/arm/mach-s5pc100/clock.c +++ b/arch/arm/mach-s5pc100/clock.c | |||
@@ -737,7 +737,7 @@ static struct clk init_clocks_disable[] = { | |||
737 | .enable = s5pc100_d1_5_ctrl, | 737 | .enable = s5pc100_d1_5_ctrl, |
738 | .ctrlbit = (1 << 7), | 738 | .ctrlbit = (1 << 7), |
739 | }, { | 739 | }, { |
740 | .name = "keyif", | 740 | .name = "keypad", |
741 | .id = -1, | 741 | .id = -1, |
742 | .parent = &clk_div_d1_bus.clk, | 742 | .parent = &clk_div_d1_bus.clk, |
743 | .enable = s5pc100_d1_5_ctrl, | 743 | .enable = s5pc100_d1_5_ctrl, |
@@ -1078,7 +1078,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1078 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 24, .size = 4 }, | 1078 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 24, .size = 4 }, |
1079 | }, { | 1079 | }, { |
1080 | .clk = { | 1080 | .clk = { |
1081 | .name = "mmc_bus", | 1081 | .name = "sclk_mmc", |
1082 | .id = 0, | 1082 | .id = 0, |
1083 | .ctrlbit = (1 << 12), | 1083 | .ctrlbit = (1 << 12), |
1084 | .enable = s5pc100_sclk1_ctrl, | 1084 | .enable = s5pc100_sclk1_ctrl, |
@@ -1089,7 +1089,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1089 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 0, .size = 4 }, | 1089 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 0, .size = 4 }, |
1090 | }, { | 1090 | }, { |
1091 | .clk = { | 1091 | .clk = { |
1092 | .name = "mmc_bus", | 1092 | .name = "sclk_mmc", |
1093 | .id = 1, | 1093 | .id = 1, |
1094 | .ctrlbit = (1 << 13), | 1094 | .ctrlbit = (1 << 13), |
1095 | .enable = s5pc100_sclk1_ctrl, | 1095 | .enable = s5pc100_sclk1_ctrl, |
@@ -1100,7 +1100,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1100 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 4, .size = 4 }, | 1100 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 4, .size = 4 }, |
1101 | }, { | 1101 | }, { |
1102 | .clk = { | 1102 | .clk = { |
1103 | .name = "mmc_bus", | 1103 | .name = "sclk_mmc", |
1104 | .id = 2, | 1104 | .id = 2, |
1105 | .ctrlbit = (1 << 14), | 1105 | .ctrlbit = (1 << 14), |
1106 | .enable = s5pc100_sclk1_ctrl, | 1106 | .enable = s5pc100_sclk1_ctrl, |
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 7b5bdbc9a5df..799d22f41fcd 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c | |||
@@ -38,8 +38,10 @@ | |||
38 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
39 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
40 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
41 | #include <plat/ata-core.h> | ||
41 | #include <plat/iic-core.h> | 42 | #include <plat/iic-core.h> |
42 | #include <plat/sdhci.h> | 43 | #include <plat/sdhci.h> |
44 | #include <plat/adc-core.h> | ||
43 | #include <plat/onenand-core.h> | 45 | #include <plat/onenand-core.h> |
44 | 46 | ||
45 | #include <plat/s5pc100.h> | 47 | #include <plat/s5pc100.h> |
@@ -87,11 +89,14 @@ void __init s5pc100_map_io(void) | |||
87 | s5pc100_default_sdhci1(); | 89 | s5pc100_default_sdhci1(); |
88 | s5pc100_default_sdhci2(); | 90 | s5pc100_default_sdhci2(); |
89 | 91 | ||
92 | s3c_adc_setname("s3c64xx-adc"); | ||
93 | |||
90 | /* the i2c devices are directly compatible with s3c2440 */ | 94 | /* the i2c devices are directly compatible with s3c2440 */ |
91 | s3c_i2c0_setname("s3c2440-i2c"); | 95 | s3c_i2c0_setname("s3c2440-i2c"); |
92 | s3c_i2c1_setname("s3c2440-i2c"); | 96 | s3c_i2c1_setname("s3c2440-i2c"); |
93 | 97 | ||
94 | s3c_onenand_setname("s5pc100-onenand"); | 98 | s3c_onenand_setname("s5pc100-onenand"); |
99 | s3c_cfcon_setname("s5pc100-pata"); | ||
95 | } | 100 | } |
96 | 101 | ||
97 | void __init s5pc100_init_clocks(int xtal) | 102 | void __init s5pc100_init_clocks(int xtal) |
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/irqs.h b/arch/arm/mach-s5pc100/include/mach/irqs.h index 28aa551dc3a8..06513e647242 100644 --- a/arch/arm/mach-s5pc100/include/mach/irqs.h +++ b/arch/arm/mach-s5pc100/include/mach/irqs.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #define IRQ_GPIOINT S5P_IRQ_VIC0(30) | 29 | #define IRQ_GPIOINT S5P_IRQ_VIC0(30) |
30 | 30 | ||
31 | /* VIC1: ARM, power, memory, connectivity */ | 31 | /* VIC1: ARM, power, memory, connectivity */ |
32 | #define IRQ_CORTEX0 S5P_IRQ_VIC1(0) | 32 | #define IRQ_PMU S5P_IRQ_VIC1(0) |
33 | #define IRQ_CORTEX1 S5P_IRQ_VIC1(1) | 33 | #define IRQ_CORTEX1 S5P_IRQ_VIC1(1) |
34 | #define IRQ_CORTEX2 S5P_IRQ_VIC1(2) | 34 | #define IRQ_CORTEX2 S5P_IRQ_VIC1(2) |
35 | #define IRQ_CORTEX3 S5P_IRQ_VIC1(3) | 35 | #define IRQ_CORTEX3 S5P_IRQ_VIC1(3) |
@@ -38,7 +38,7 @@ | |||
38 | #define IRQ_IEMIEC S5P_IRQ_VIC1(6) | 38 | #define IRQ_IEMIEC S5P_IRQ_VIC1(6) |
39 | #define IRQ_ONENAND S5P_IRQ_VIC1(7) | 39 | #define IRQ_ONENAND S5P_IRQ_VIC1(7) |
40 | #define IRQ_NFC S5P_IRQ_VIC1(8) | 40 | #define IRQ_NFC S5P_IRQ_VIC1(8) |
41 | #define IRQ_CFC S5P_IRQ_VIC1(9) | 41 | #define IRQ_CFCON S5P_IRQ_VIC1(9) |
42 | #define IRQ_UART0 S5P_IRQ_VIC1(10) | 42 | #define IRQ_UART0 S5P_IRQ_VIC1(10) |
43 | #define IRQ_UART1 S5P_IRQ_VIC1(11) | 43 | #define IRQ_UART1 S5P_IRQ_VIC1(11) |
44 | #define IRQ_UART2 S5P_IRQ_VIC1(12) | 44 | #define IRQ_UART2 S5P_IRQ_VIC1(12) |
diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h index cadae4305688..01b9134feff0 100644 --- a/arch/arm/mach-s5pc100/include/mach/map.h +++ b/arch/arm/mach-s5pc100/include/mach/map.h | |||
@@ -61,6 +61,8 @@ | |||
61 | 61 | ||
62 | #define S5PC100_PA_ONENAND (0xE7100000) | 62 | #define S5PC100_PA_ONENAND (0xE7100000) |
63 | 63 | ||
64 | #define S5PC100_PA_CFCON (0xE7800000) | ||
65 | |||
64 | /* DMA */ | 66 | /* DMA */ |
65 | #define S5PC100_PA_MDMA (0xE8100000) | 67 | #define S5PC100_PA_MDMA (0xE8100000) |
66 | #define S5PC100_PA_PDMA0 (0xE9000000) | 68 | #define S5PC100_PA_PDMA0 (0xE9000000) |
@@ -72,6 +74,9 @@ | |||
72 | 74 | ||
73 | #define S5PC100_PA_SYSTIMER (0xEA100000) | 75 | #define S5PC100_PA_SYSTIMER (0xEA100000) |
74 | 76 | ||
77 | #define S5PC100_PA_WATCHDOG (0xEA200000) | ||
78 | #define S5PC100_PA_RTC (0xEA300000) | ||
79 | |||
75 | #define S5PC100_PA_UART (0xEC000000) | 80 | #define S5PC100_PA_UART (0xEC000000) |
76 | 81 | ||
77 | #define S5P_PA_UART0 (S5PC100_PA_UART + 0x0) | 82 | #define S5P_PA_UART0 (S5PC100_PA_UART + 0x0) |
@@ -94,6 +99,10 @@ | |||
94 | 99 | ||
95 | #define S5PC100_PA_FB (0xEE000000) | 100 | #define S5PC100_PA_FB (0xEE000000) |
96 | 101 | ||
102 | #define S5PC100_PA_FIMC0 (0xEE200000) | ||
103 | #define S5PC100_PA_FIMC1 (0xEE300000) | ||
104 | #define S5PC100_PA_FIMC2 (0xEE400000) | ||
105 | |||
97 | #define S5PC100_PA_I2S0 (0xF2000000) | 106 | #define S5PC100_PA_I2S0 (0xF2000000) |
98 | #define S5PC100_PA_I2S1 (0xF2100000) | 107 | #define S5PC100_PA_I2S1 (0xF2100000) |
99 | #define S5PC100_PA_I2S2 (0xF2200000) | 108 | #define S5PC100_PA_I2S2 (0xF2200000) |
@@ -104,6 +113,8 @@ | |||
104 | #define S5PC100_PA_PCM0 0xF2400000 | 113 | #define S5PC100_PA_PCM0 0xF2400000 |
105 | #define S5PC100_PA_PCM1 0xF2500000 | 114 | #define S5PC100_PA_PCM1 0xF2500000 |
106 | 115 | ||
116 | #define S5PC100_PA_TSADC (0xF3000000) | ||
117 | |||
107 | /* KEYPAD */ | 118 | /* KEYPAD */ |
108 | #define S5PC100_PA_KEYPAD (0xF3100000) | 119 | #define S5PC100_PA_KEYPAD (0xF3100000) |
109 | 120 | ||
@@ -130,9 +141,19 @@ | |||
130 | #define S3C_PA_HSMMC1 S5PC100_PA_HSMMC(1) | 141 | #define S3C_PA_HSMMC1 S5PC100_PA_HSMMC(1) |
131 | #define S3C_PA_HSMMC2 S5PC100_PA_HSMMC(2) | 142 | #define S3C_PA_HSMMC2 S5PC100_PA_HSMMC(2) |
132 | #define S3C_PA_KEYPAD S5PC100_PA_KEYPAD | 143 | #define S3C_PA_KEYPAD S5PC100_PA_KEYPAD |
144 | #define S3C_PA_WDT S5PC100_PA_WATCHDOG | ||
133 | #define S3C_PA_TSADC S5PC100_PA_TSADC | 145 | #define S3C_PA_TSADC S5PC100_PA_TSADC |
134 | #define S3C_PA_ONENAND S5PC100_PA_ONENAND | 146 | #define S3C_PA_ONENAND S5PC100_PA_ONENAND |
135 | #define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF | 147 | #define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF |
136 | #define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF | 148 | #define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF |
149 | #define S3C_PA_RTC S5PC100_PA_RTC | ||
150 | |||
151 | #define SAMSUNG_PA_ADC S5PC100_PA_TSADC | ||
152 | #define SAMSUNG_PA_CFCON S5PC100_PA_CFCON | ||
153 | #define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD | ||
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 | ||
137 | 158 | ||
138 | #endif /* __ASM_ARCH_C100_MAP_H */ | 159 | #endif /* __ASM_ARCH_C100_MAP_H */ |
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-clock.h b/arch/arm/mach-s5pc100/include/mach/regs-clock.h index 5d27d286d504..bc92da2e0ba2 100644 --- a/arch/arm/mach-s5pc100/include/mach/regs-clock.h +++ b/arch/arm/mach-s5pc100/include/mach/regs-clock.h | |||
@@ -71,7 +71,10 @@ | |||
71 | #define S5P_CLKDIV1_PCLKD1_SHIFT (16) | 71 | #define S5P_CLKDIV1_PCLKD1_SHIFT (16) |
72 | 72 | ||
73 | #define S5PC100_SWRESET S5PC100_REG_OTHERS(0x000) | 73 | #define S5PC100_SWRESET S5PC100_REG_OTHERS(0x000) |
74 | #define S5PC100_MEM_SYS_CFG S5PC100_REG_OTHERS(0x200) | ||
74 | 75 | ||
75 | #define S5PC100_SWRESET_RESETVAL 0xc100 | 76 | #define S5PC100_SWRESET_RESETVAL 0xc100 |
76 | 77 | ||
78 | #define MEM_SYS_CFG_EBI_FIX_PRI_CFCON 0x30 | ||
79 | |||
77 | #endif /* __ASM_ARCH_REGS_CLOCK_H */ | 80 | #endif /* __ASM_ARCH_REGS_CLOCK_H */ |
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h index 681f626a9ae1..a9ea57c06600 100644 --- a/arch/arm/mach-s5pc100/include/mach/system.h +++ b/arch/arm/mach-s5pc100/include/mach/system.h | |||
@@ -11,18 +11,11 @@ | |||
11 | #ifndef __ASM_ARCH_SYSTEM_H | 11 | #ifndef __ASM_ARCH_SYSTEM_H |
12 | #define __ASM_ARCH_SYSTEM_H __FILE__ | 12 | #define __ASM_ARCH_SYSTEM_H __FILE__ |
13 | 13 | ||
14 | #include <linux/io.h> | 14 | #include <plat/system-reset.h> |
15 | #include <mach/map.h> | ||
16 | #include <mach/regs-clock.h> | ||
17 | 15 | ||
18 | static void arch_idle(void) | 16 | static void arch_idle(void) |
19 | { | 17 | { |
20 | /* nothing here yet */ | 18 | /* nothing here yet */ |
21 | } | 19 | } |
22 | 20 | ||
23 | static void arch_reset(char mode, const char *cmd) | ||
24 | { | ||
25 | __raw_writel(S5PC100_SWRESET_RESETVAL, S5PC100_SWRESET); | ||
26 | return; | ||
27 | } | ||
28 | #endif /* __ASM_ARCH_IRQ_H */ | 21 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index af22f8202a07..2dc519c172ec 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/fb.h> | 23 | #include <linux/fb.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/input.h> | ||
25 | 26 | ||
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
@@ -42,18 +43,22 @@ | |||
42 | #include <plat/s5pc100.h> | 43 | #include <plat/s5pc100.h> |
43 | #include <plat/fb.h> | 44 | #include <plat/fb.h> |
44 | #include <plat/iic.h> | 45 | #include <plat/iic.h> |
46 | #include <plat/ata.h> | ||
47 | #include <plat/adc.h> | ||
48 | #include <plat/keypad.h> | ||
49 | #include <plat/ts.h> | ||
45 | 50 | ||
46 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 51 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
47 | #define S5PC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 52 | #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
48 | S3C2410_UCON_RXILEVEL | \ | 53 | S3C2410_UCON_RXILEVEL | \ |
49 | S3C2410_UCON_TXIRQMODE | \ | 54 | S3C2410_UCON_TXIRQMODE | \ |
50 | S3C2410_UCON_RXIRQMODE | \ | 55 | S3C2410_UCON_RXIRQMODE | \ |
51 | S3C2410_UCON_RXFIFO_TOI | \ | 56 | S3C2410_UCON_RXFIFO_TOI | \ |
52 | S3C2443_UCON_RXERR_IRQEN) | 57 | S3C2443_UCON_RXERR_IRQEN) |
53 | 58 | ||
54 | #define S5PC100_ULCON_DEFAULT S3C2410_LCON_CS8 | 59 | #define SMDKC100_ULCON_DEFAULT S3C2410_LCON_CS8 |
55 | 60 | ||
56 | #define S5PC100_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | 61 | #define SMDKC100_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ |
57 | S3C2440_UFCON_RXTRIG8 | \ | 62 | S3C2440_UFCON_RXTRIG8 | \ |
58 | S3C2440_UFCON_TXTRIG16) | 63 | S3C2440_UFCON_TXTRIG16) |
59 | 64 | ||
@@ -61,30 +66,30 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = { | |||
61 | [0] = { | 66 | [0] = { |
62 | .hwport = 0, | 67 | .hwport = 0, |
63 | .flags = 0, | 68 | .flags = 0, |
64 | .ucon = S5PC100_UCON_DEFAULT, | 69 | .ucon = SMDKC100_UCON_DEFAULT, |
65 | .ulcon = S5PC100_ULCON_DEFAULT, | 70 | .ulcon = SMDKC100_ULCON_DEFAULT, |
66 | .ufcon = S5PC100_UFCON_DEFAULT, | 71 | .ufcon = SMDKC100_UFCON_DEFAULT, |
67 | }, | 72 | }, |
68 | [1] = { | 73 | [1] = { |
69 | .hwport = 1, | 74 | .hwport = 1, |
70 | .flags = 0, | 75 | .flags = 0, |
71 | .ucon = S5PC100_UCON_DEFAULT, | 76 | .ucon = SMDKC100_UCON_DEFAULT, |
72 | .ulcon = S5PC100_ULCON_DEFAULT, | 77 | .ulcon = SMDKC100_ULCON_DEFAULT, |
73 | .ufcon = S5PC100_UFCON_DEFAULT, | 78 | .ufcon = SMDKC100_UFCON_DEFAULT, |
74 | }, | 79 | }, |
75 | [2] = { | 80 | [2] = { |
76 | .hwport = 2, | 81 | .hwport = 2, |
77 | .flags = 0, | 82 | .flags = 0, |
78 | .ucon = S5PC100_UCON_DEFAULT, | 83 | .ucon = SMDKC100_UCON_DEFAULT, |
79 | .ulcon = S5PC100_ULCON_DEFAULT, | 84 | .ulcon = SMDKC100_ULCON_DEFAULT, |
80 | .ufcon = S5PC100_UFCON_DEFAULT, | 85 | .ufcon = SMDKC100_UFCON_DEFAULT, |
81 | }, | 86 | }, |
82 | [3] = { | 87 | [3] = { |
83 | .hwport = 3, | 88 | .hwport = 3, |
84 | .flags = 0, | 89 | .flags = 0, |
85 | .ucon = S5PC100_UCON_DEFAULT, | 90 | .ucon = SMDKC100_UCON_DEFAULT, |
86 | .ulcon = S5PC100_ULCON_DEFAULT, | 91 | .ulcon = SMDKC100_ULCON_DEFAULT, |
87 | .ufcon = S5PC100_UFCON_DEFAULT, | 92 | .ufcon = SMDKC100_UFCON_DEFAULT, |
88 | }, | 93 | }, |
89 | }; | 94 | }; |
90 | 95 | ||
@@ -149,16 +154,54 @@ static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = { | |||
149 | .setup_gpio = s5pc100_fb_gpio_setup_24bpp, | 154 | .setup_gpio = s5pc100_fb_gpio_setup_24bpp, |
150 | }; | 155 | }; |
151 | 156 | ||
157 | static struct s3c_ide_platdata smdkc100_ide_pdata __initdata = { | ||
158 | .setup_gpio = s5pc100_ide_setup_gpio, | ||
159 | }; | ||
160 | |||
161 | static uint32_t smdkc100_keymap[] __initdata = { | ||
162 | /* KEY(row, col, keycode) */ | ||
163 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
164 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
165 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
166 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
167 | }; | ||
168 | |||
169 | static struct matrix_keymap_data smdkc100_keymap_data __initdata = { | ||
170 | .keymap = smdkc100_keymap, | ||
171 | .keymap_size = ARRAY_SIZE(smdkc100_keymap), | ||
172 | }; | ||
173 | |||
174 | static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { | ||
175 | .keymap_data = &smdkc100_keymap_data, | ||
176 | .rows = 2, | ||
177 | .cols = 8, | ||
178 | }; | ||
179 | |||
152 | static struct platform_device *smdkc100_devices[] __initdata = { | 180 | static struct platform_device *smdkc100_devices[] __initdata = { |
181 | &s3c_device_adc, | ||
182 | &s3c_device_cfcon, | ||
153 | &s3c_device_i2c0, | 183 | &s3c_device_i2c0, |
154 | &s3c_device_i2c1, | 184 | &s3c_device_i2c1, |
155 | &s3c_device_fb, | 185 | &s3c_device_fb, |
156 | &s3c_device_hsmmc0, | 186 | &s3c_device_hsmmc0, |
157 | &s3c_device_hsmmc1, | 187 | &s3c_device_hsmmc1, |
158 | &s3c_device_hsmmc2, | 188 | &s3c_device_hsmmc2, |
189 | &s3c_device_ts, | ||
190 | &s3c_device_wdt, | ||
159 | &smdkc100_lcd_powerdev, | 191 | &smdkc100_lcd_powerdev, |
160 | &s5pc100_device_iis0, | 192 | &s5pc100_device_iis0, |
193 | &samsung_device_keypad, | ||
161 | &s5pc100_device_ac97, | 194 | &s5pc100_device_ac97, |
195 | &s3c_device_rtc, | ||
196 | &s5p_device_fimc0, | ||
197 | &s5p_device_fimc1, | ||
198 | &s5p_device_fimc2, | ||
199 | }; | ||
200 | |||
201 | static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | ||
202 | .delay = 10000, | ||
203 | .presc = 49, | ||
204 | .oversampling_shift = 2, | ||
162 | }; | 205 | }; |
163 | 206 | ||
164 | static void __init smdkc100_map_io(void) | 207 | static void __init smdkc100_map_io(void) |
@@ -170,6 +213,8 @@ static void __init smdkc100_map_io(void) | |||
170 | 213 | ||
171 | static void __init smdkc100_machine_init(void) | 214 | static void __init smdkc100_machine_init(void) |
172 | { | 215 | { |
216 | s3c24xx_ts_set_platdata(&s3c_ts_platform); | ||
217 | |||
173 | /* I2C */ | 218 | /* I2C */ |
174 | s3c_i2c0_set_platdata(NULL); | 219 | s3c_i2c0_set_platdata(NULL); |
175 | s3c_i2c1_set_platdata(NULL); | 220 | s3c_i2c1_set_platdata(NULL); |
@@ -177,6 +222,9 @@ static void __init smdkc100_machine_init(void) | |||
177 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 222 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
178 | 223 | ||
179 | s3c_fb_set_platdata(&smdkc100_lcd_pdata); | 224 | s3c_fb_set_platdata(&smdkc100_lcd_pdata); |
225 | s3c_ide_set_platdata(&smdkc100_ide_pdata); | ||
226 | |||
227 | samsung_keypad_set_platdata(&smdkc100_keypad_data); | ||
180 | 228 | ||
181 | /* LCD init */ | 229 | /* LCD init */ |
182 | gpio_request(S5PC100_GPD(0), "GPD"); | 230 | gpio_request(S5PC100_GPD(0), "GPD"); |
diff --git a/arch/arm/mach-s5pc100/setup-ide.c b/arch/arm/mach-s5pc100/setup-ide.c new file mode 100644 index 000000000000..83575671fb59 --- /dev/null +++ b/arch/arm/mach-s5pc100/setup-ide.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* linux/arch/arm/mach-s5pc100/setup-ide.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PC100 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/regs-clock.h> | ||
18 | #include <plat/gpio-cfg.h> | ||
19 | |||
20 | void s5pc100_ide_setup_gpio(void) | ||
21 | { | ||
22 | u32 reg; | ||
23 | u32 gpio = 0; | ||
24 | |||
25 | /* Independent CF interface, CF chip select configuration */ | ||
26 | reg = readl(S5PC100_MEM_SYS_CFG) & (~0x3f); | ||
27 | writel(reg | MEM_SYS_CFG_EBI_FIX_PRI_CFCON, S5PC100_MEM_SYS_CFG); | ||
28 | |||
29 | /* CF_Add[0 - 2], CF_IORDY, CF_INTRQ, CF_DMARQ, CF_DMARST, CF_DMACK */ | ||
30 | for (gpio = S5PC100_GPJ0(0); gpio <= S5PC100_GPJ0(7); gpio++) { | ||
31 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4)); | ||
32 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
33 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | ||
34 | } | ||
35 | |||
36 | /*CF_Data[0 - 7] */ | ||
37 | for (gpio = S5PC100_GPJ2(0); gpio <= S5PC100_GPJ2(7); gpio++) { | ||
38 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4)); | ||
39 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
40 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | ||
41 | } | ||
42 | |||
43 | /* CF_Data[8 - 15] */ | ||
44 | for (gpio = S5PC100_GPJ3(0); gpio <= S5PC100_GPJ3(7); gpio++) { | ||
45 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4)); | ||
46 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
47 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | ||
48 | } | ||
49 | |||
50 | /* CF_CS0, CF_CS1, CF_IORD, CF_IOWR */ | ||
51 | for (gpio = S5PC100_GPJ4(0); gpio <= S5PC100_GPJ4(3); gpio++) { | ||
52 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4)); | ||
53 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
54 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | ||
55 | } | ||
56 | |||
57 | /* EBI_OE, EBI_WE */ | ||
58 | for (gpio = S5PC100_GPK0(6); gpio <= S5PC100_GPK0(7); gpio++) | ||
59 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0)); | ||
60 | |||
61 | /* CF_OE, CF_WE */ | ||
62 | for (gpio = S5PC100_GPK1(6); gpio <= S5PC100_GPK1(7); gpio++) { | ||
63 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
64 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
65 | } | ||
66 | |||
67 | /* CF_CD */ | ||
68 | s3c_gpio_cfgpin(S5PC100_GPK3(5), S3C_GPIO_SFN(2)); | ||
69 | s3c_gpio_setpull(S5PC100_GPK3(5), S3C_GPIO_PULL_NONE); | ||
70 | } | ||
diff --git a/arch/arm/mach-s5pc100/setup-keypad.c b/arch/arm/mach-s5pc100/setup-keypad.c new file mode 100644 index 000000000000..d0837a72a58e --- /dev/null +++ b/arch/arm/mach-s5pc100/setup-keypad.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* linux/arch/arm/mach-s5pc100/setup-keypad.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * GPIO configuration for S5PC100 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 GPH3 pins to special-function 3: KP_ROW[x] */ | ||
22 | end = S5PC100_GPH3(rows); | ||
23 | for (gpio = S5PC100_GPH3(0); 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 GPH2 pins to special-function 3: KP_COL[x] */ | ||
29 | end = S5PC100_GPH2(cols); | ||
30 | for (gpio = S5PC100_GPH2(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-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-s5pc100/setup-sdhci.c b/arch/arm/mach-s5pc100/setup-sdhci.c index ea7ff19adb95..f16946e456e9 100644 --- a/arch/arm/mach-s5pc100/setup-sdhci.c +++ b/arch/arm/mach-s5pc100/setup-sdhci.c | |||
@@ -26,10 +26,10 @@ | |||
26 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ | 26 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ |
27 | 27 | ||
28 | char *s5pc100_hsmmc_clksrcs[4] = { | 28 | char *s5pc100_hsmmc_clksrcs[4] = { |
29 | [0] = "hsmmc", | 29 | [0] = "hsmmc", /* HCLK */ |
30 | [1] = "hsmmc", | 30 | /* [1] = "hsmmc", - duplicate HCLK entry */ |
31 | /* [2] = "mmc_bus", not yet successfully used yet */ | 31 | [2] = "sclk_mmc", /* mmc_bus */ |
32 | /* [3] = "48m", - note not successfully used yet */ | 32 | /* [3] = "48m", - note not successfully used yet */ |
33 | }; | 33 | }; |
34 | 34 | ||
35 | 35 | ||