diff options
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/Kconfig | 24 | ||||
-rw-r--r-- | arch/arm/plat-samsung/clock-clksrc.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/devs.c | 128 | ||||
-rw-r--r-- | arch/arm/plat-samsung/dma-ops.c | 15 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/cpu.h | 26 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma-ops.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma-pl330.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/irqs.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/keypad.h | 27 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/pm.h | 8 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-serial.h | 45 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 24 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 75 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/udc.h | 15 | ||||
-rw-r--r-- | arch/arm/plat-samsung/pm-gpio.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/wakeup-mask.c | 2 |
19 files changed, 274 insertions, 139 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 313eb26cfa62..6a2abe67c8b2 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -88,12 +88,20 @@ config S5P_GPIO_DRVSTR | |||
88 | 88 | ||
89 | config SAMSUNG_GPIO_EXTRA | 89 | config SAMSUNG_GPIO_EXTRA |
90 | int "Number of additional GPIO pins" | 90 | int "Number of additional GPIO pins" |
91 | default 128 if SAMSUNG_GPIO_EXTRA128 | ||
92 | default 64 if SAMSUNG_GPIO_EXTRA64 | ||
91 | default 0 | 93 | default 0 |
92 | help | 94 | help |
93 | Use additional GPIO space in addition to the GPIO's the SOC | 95 | Use additional GPIO space in addition to the GPIO's the SOC |
94 | provides. This allows expanding the GPIO space for use with | 96 | provides. This allows expanding the GPIO space for use with |
95 | GPIO expanders. | 97 | GPIO expanders. |
96 | 98 | ||
99 | config SAMSUNG_GPIO_EXTRA64 | ||
100 | bool | ||
101 | |||
102 | config SAMSUNG_GPIO_EXTRA128 | ||
103 | bool | ||
104 | |||
97 | config S3C_GPIO_SPACE | 105 | config S3C_GPIO_SPACE |
98 | int "Space between gpio banks" | 106 | int "Space between gpio banks" |
99 | default 0 | 107 | default 0 |
@@ -226,11 +234,23 @@ config SAMSUNG_DEV_IDE | |||
226 | help | 234 | help |
227 | Compile in platform device definitions for IDE | 235 | Compile in platform device definitions for IDE |
228 | 236 | ||
229 | config S3C64XX_DEV_SPI | 237 | config S3C64XX_DEV_SPI0 |
238 | bool | ||
239 | help | ||
240 | Compile in platform device definitions for S3C64XX's type | ||
241 | SPI controller 0 | ||
242 | |||
243 | config S3C64XX_DEV_SPI1 | ||
244 | bool | ||
245 | help | ||
246 | Compile in platform device definitions for S3C64XX's type | ||
247 | SPI controller 1 | ||
248 | |||
249 | config S3C64XX_DEV_SPI2 | ||
230 | bool | 250 | bool |
231 | help | 251 | help |
232 | Compile in platform device definitions for S3C64XX's type | 252 | Compile in platform device definitions for S3C64XX's type |
233 | SPI controllers. | 253 | SPI controller 2 |
234 | 254 | ||
235 | config SAMSUNG_DEV_TS | 255 | config SAMSUNG_DEV_TS |
236 | bool | 256 | bool |
diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c index ae8b8507663f..786a4107a157 100644 --- a/arch/arm/plat-samsung/clock-clksrc.c +++ b/arch/arm/plat-samsung/clock-clksrc.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/device.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | 21 | ||
22 | #include <plat/clock.h> | 22 | #include <plat/clock.h> |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 3b4451979d1b..10f71179071f 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/sysdev.h> | 36 | #include <linux/device.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/ioport.h> | 38 | #include <linux/ioport.h> |
39 | #include <linux/clk.h> | 39 | #include <linux/clk.h> |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 4ca8b571f971..32a6e394db24 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mtd/partitions.h> | 29 | #include <linux/mtd/partitions.h> |
30 | #include <linux/mmc/host.h> | 30 | #include <linux/mmc/host.h> |
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/platform_data/s3c-hsudc.h> | ||
32 | 33 | ||
33 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
34 | #include <asm/pmu.h> | 35 | #include <asm/pmu.h> |
@@ -61,6 +62,7 @@ | |||
61 | #include <plat/regs-iic.h> | 62 | #include <plat/regs-iic.h> |
62 | #include <plat/regs-serial.h> | 63 | #include <plat/regs-serial.h> |
63 | #include <plat/regs-spi.h> | 64 | #include <plat/regs-spi.h> |
65 | #include <plat/s3c64xx-spi.h> | ||
64 | 66 | ||
65 | static u64 samsung_device_dma_mask = DMA_BIT_MASK(32); | 67 | static u64 samsung_device_dma_mask = DMA_BIT_MASK(32); |
66 | 68 | ||
@@ -1461,3 +1463,129 @@ struct platform_device s3c_device_wdt = { | |||
1461 | .resource = s3c_wdt_resource, | 1463 | .resource = s3c_wdt_resource, |
1462 | }; | 1464 | }; |
1463 | #endif /* CONFIG_S3C_DEV_WDT */ | 1465 | #endif /* CONFIG_S3C_DEV_WDT */ |
1466 | |||
1467 | #ifdef CONFIG_S3C64XX_DEV_SPI0 | ||
1468 | static struct resource s3c64xx_spi0_resource[] = { | ||
1469 | [0] = DEFINE_RES_MEM(S3C_PA_SPI0, SZ_256), | ||
1470 | [1] = DEFINE_RES_DMA(DMACH_SPI0_TX), | ||
1471 | [2] = DEFINE_RES_DMA(DMACH_SPI0_RX), | ||
1472 | [3] = DEFINE_RES_IRQ(IRQ_SPI0), | ||
1473 | }; | ||
1474 | |||
1475 | struct platform_device s3c64xx_device_spi0 = { | ||
1476 | .name = "s3c64xx-spi", | ||
1477 | .id = 0, | ||
1478 | .num_resources = ARRAY_SIZE(s3c64xx_spi0_resource), | ||
1479 | .resource = s3c64xx_spi0_resource, | ||
1480 | .dev = { | ||
1481 | .dma_mask = &samsung_device_dma_mask, | ||
1482 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1483 | }, | ||
1484 | }; | ||
1485 | |||
1486 | void __init s3c64xx_spi0_set_platdata(struct s3c64xx_spi_info *pd, | ||
1487 | int src_clk_nr, int num_cs) | ||
1488 | { | ||
1489 | if (!pd) { | ||
1490 | pr_err("%s:Need to pass platform data\n", __func__); | ||
1491 | return; | ||
1492 | } | ||
1493 | |||
1494 | /* Reject invalid configuration */ | ||
1495 | if (!num_cs || src_clk_nr < 0) { | ||
1496 | pr_err("%s: Invalid SPI configuration\n", __func__); | ||
1497 | return; | ||
1498 | } | ||
1499 | |||
1500 | pd->num_cs = num_cs; | ||
1501 | pd->src_clk_nr = src_clk_nr; | ||
1502 | if (!pd->cfg_gpio) | ||
1503 | pd->cfg_gpio = s3c64xx_spi0_cfg_gpio; | ||
1504 | |||
1505 | s3c_set_platdata(pd, sizeof(*pd), &s3c64xx_device_spi0); | ||
1506 | } | ||
1507 | #endif /* CONFIG_S3C64XX_DEV_SPI0 */ | ||
1508 | |||
1509 | #ifdef CONFIG_S3C64XX_DEV_SPI1 | ||
1510 | static struct resource s3c64xx_spi1_resource[] = { | ||
1511 | [0] = DEFINE_RES_MEM(S3C_PA_SPI1, SZ_256), | ||
1512 | [1] = DEFINE_RES_DMA(DMACH_SPI1_TX), | ||
1513 | [2] = DEFINE_RES_DMA(DMACH_SPI1_RX), | ||
1514 | [3] = DEFINE_RES_IRQ(IRQ_SPI1), | ||
1515 | }; | ||
1516 | |||
1517 | struct platform_device s3c64xx_device_spi1 = { | ||
1518 | .name = "s3c64xx-spi", | ||
1519 | .id = 1, | ||
1520 | .num_resources = ARRAY_SIZE(s3c64xx_spi1_resource), | ||
1521 | .resource = s3c64xx_spi1_resource, | ||
1522 | .dev = { | ||
1523 | .dma_mask = &samsung_device_dma_mask, | ||
1524 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1525 | }, | ||
1526 | }; | ||
1527 | |||
1528 | void __init s3c64xx_spi1_set_platdata(struct s3c64xx_spi_info *pd, | ||
1529 | int src_clk_nr, int num_cs) | ||
1530 | { | ||
1531 | if (!pd) { | ||
1532 | pr_err("%s:Need to pass platform data\n", __func__); | ||
1533 | return; | ||
1534 | } | ||
1535 | |||
1536 | /* Reject invalid configuration */ | ||
1537 | if (!num_cs || src_clk_nr < 0) { | ||
1538 | pr_err("%s: Invalid SPI configuration\n", __func__); | ||
1539 | return; | ||
1540 | } | ||
1541 | |||
1542 | pd->num_cs = num_cs; | ||
1543 | pd->src_clk_nr = src_clk_nr; | ||
1544 | if (!pd->cfg_gpio) | ||
1545 | pd->cfg_gpio = s3c64xx_spi1_cfg_gpio; | ||
1546 | |||
1547 | s3c_set_platdata(pd, sizeof(*pd), &s3c64xx_device_spi1); | ||
1548 | } | ||
1549 | #endif /* CONFIG_S3C64XX_DEV_SPI1 */ | ||
1550 | |||
1551 | #ifdef CONFIG_S3C64XX_DEV_SPI2 | ||
1552 | static struct resource s3c64xx_spi2_resource[] = { | ||
1553 | [0] = DEFINE_RES_MEM(S3C_PA_SPI2, SZ_256), | ||
1554 | [1] = DEFINE_RES_DMA(DMACH_SPI2_TX), | ||
1555 | [2] = DEFINE_RES_DMA(DMACH_SPI2_RX), | ||
1556 | [3] = DEFINE_RES_IRQ(IRQ_SPI2), | ||
1557 | }; | ||
1558 | |||
1559 | struct platform_device s3c64xx_device_spi2 = { | ||
1560 | .name = "s3c64xx-spi", | ||
1561 | .id = 2, | ||
1562 | .num_resources = ARRAY_SIZE(s3c64xx_spi2_resource), | ||
1563 | .resource = s3c64xx_spi2_resource, | ||
1564 | .dev = { | ||
1565 | .dma_mask = &samsung_device_dma_mask, | ||
1566 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1567 | }, | ||
1568 | }; | ||
1569 | |||
1570 | void __init s3c64xx_spi2_set_platdata(struct s3c64xx_spi_info *pd, | ||
1571 | int src_clk_nr, int num_cs) | ||
1572 | { | ||
1573 | if (!pd) { | ||
1574 | pr_err("%s:Need to pass platform data\n", __func__); | ||
1575 | return; | ||
1576 | } | ||
1577 | |||
1578 | /* Reject invalid configuration */ | ||
1579 | if (!num_cs || src_clk_nr < 0) { | ||
1580 | pr_err("%s: Invalid SPI configuration\n", __func__); | ||
1581 | return; | ||
1582 | } | ||
1583 | |||
1584 | pd->num_cs = num_cs; | ||
1585 | pd->src_clk_nr = src_clk_nr; | ||
1586 | if (!pd->cfg_gpio) | ||
1587 | pd->cfg_gpio = s3c64xx_spi2_cfg_gpio; | ||
1588 | |||
1589 | s3c_set_platdata(pd, sizeof(*pd), &s3c64xx_device_spi2); | ||
1590 | } | ||
1591 | #endif /* CONFIG_S3C64XX_DEV_SPI2 */ | ||
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c index 93a994a5dd8f..2cded872f22b 100644 --- a/arch/arm/plat-samsung/dma-ops.c +++ b/arch/arm/plat-samsung/dma-ops.c | |||
@@ -18,23 +18,24 @@ | |||
18 | 18 | ||
19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
20 | 20 | ||
21 | static inline bool pl330_filter(struct dma_chan *chan, void *param) | ||
22 | { | ||
23 | struct dma_pl330_peri *peri = chan->private; | ||
24 | return peri->peri_id == (unsigned)param; | ||
25 | } | ||
26 | |||
27 | static unsigned samsung_dmadev_request(enum dma_ch dma_ch, | 21 | static unsigned samsung_dmadev_request(enum dma_ch dma_ch, |
28 | struct samsung_dma_info *info) | 22 | struct samsung_dma_info *info) |
29 | { | 23 | { |
30 | struct dma_chan *chan; | 24 | struct dma_chan *chan; |
31 | dma_cap_mask_t mask; | 25 | dma_cap_mask_t mask; |
32 | struct dma_slave_config slave_config; | 26 | struct dma_slave_config slave_config; |
27 | void *filter_param; | ||
33 | 28 | ||
34 | dma_cap_zero(mask); | 29 | dma_cap_zero(mask); |
35 | dma_cap_set(info->cap, mask); | 30 | dma_cap_set(info->cap, mask); |
36 | 31 | ||
37 | chan = dma_request_channel(mask, pl330_filter, (void *)dma_ch); | 32 | /* |
33 | * If a dma channel property of a device node from device tree is | ||
34 | * specified, use that as the fliter parameter. | ||
35 | */ | ||
36 | filter_param = (dma_ch == DMACH_DT_PROP) ? (void *)info->dt_dmach_prop : | ||
37 | (void *)dma_ch; | ||
38 | chan = dma_request_channel(mask, pl330_filter, filter_param); | ||
38 | 39 | ||
39 | if (info->direction == DMA_FROM_DEVICE) { | 40 | if (info->direction == DMA_FROM_DEVICE) { |
40 | memset(&slave_config, 0, sizeof(struct dma_slave_config)); | 41 | memset(&slave_config, 0, sizeof(struct dma_slave_config)); |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 258d9d8a94f2..73cb3cfd0685 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -180,19 +180,19 @@ extern struct syscore_ops s3c2412_pm_syscore_ops; | |||
180 | extern struct syscore_ops s3c2416_pm_syscore_ops; | 180 | extern struct syscore_ops s3c2416_pm_syscore_ops; |
181 | extern struct syscore_ops s3c244x_pm_syscore_ops; | 181 | extern struct syscore_ops s3c244x_pm_syscore_ops; |
182 | 182 | ||
183 | /* system device classes */ | 183 | /* system device subsystems */ |
184 | 184 | ||
185 | extern struct sysdev_class s3c2410_sysclass; | 185 | extern struct bus_type s3c2410_subsys; |
186 | extern struct sysdev_class s3c2410a_sysclass; | 186 | extern struct bus_type s3c2410a_subsys; |
187 | extern struct sysdev_class s3c2412_sysclass; | 187 | extern struct bus_type s3c2412_subsys; |
188 | extern struct sysdev_class s3c2416_sysclass; | 188 | extern struct bus_type s3c2416_subsys; |
189 | extern struct sysdev_class s3c2440_sysclass; | 189 | extern struct bus_type s3c2440_subsys; |
190 | extern struct sysdev_class s3c2442_sysclass; | 190 | extern struct bus_type s3c2442_subsys; |
191 | extern struct sysdev_class s3c2443_sysclass; | 191 | extern struct bus_type s3c2443_subsys; |
192 | extern struct sysdev_class s3c6410_sysclass; | 192 | extern struct bus_type s3c6410_subsys; |
193 | extern struct sysdev_class s5p64x0_sysclass; | 193 | extern struct bus_type s5p64x0_subsys; |
194 | extern struct sysdev_class s5pv210_sysclass; | 194 | extern struct bus_type s5pv210_subsys; |
195 | extern struct sysdev_class exynos4_sysclass; | 195 | extern struct bus_type exynos4_subsys; |
196 | 196 | ||
197 | extern void (*s5pc1xx_idle)(void); | 197 | extern void (*s5pc1xx_idle)(void); |
198 | 198 | ||
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index ab633c9c2aec..4214ea0ff8fe 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -39,6 +39,7 @@ extern struct platform_device s3c64xx_device_pcm0; | |||
39 | extern struct platform_device s3c64xx_device_pcm1; | 39 | extern struct platform_device s3c64xx_device_pcm1; |
40 | extern struct platform_device s3c64xx_device_spi0; | 40 | extern struct platform_device s3c64xx_device_spi0; |
41 | extern struct platform_device s3c64xx_device_spi1; | 41 | extern struct platform_device s3c64xx_device_spi1; |
42 | extern struct platform_device s3c64xx_device_spi2; | ||
42 | 43 | ||
43 | extern struct platform_device s3c_device_adc; | 44 | extern struct platform_device s3c_device_adc; |
44 | extern struct platform_device s3c_device_cfcon; | 45 | extern struct platform_device s3c_device_cfcon; |
@@ -98,8 +99,6 @@ extern struct platform_device s5p6450_device_iis1; | |||
98 | extern struct platform_device s5p6450_device_iis2; | 99 | extern struct platform_device s5p6450_device_iis2; |
99 | extern struct platform_device s5p6450_device_pcm0; | 100 | extern struct platform_device s5p6450_device_pcm0; |
100 | 101 | ||
101 | extern struct platform_device s5p64x0_device_spi0; | ||
102 | extern struct platform_device s5p64x0_device_spi1; | ||
103 | 102 | ||
104 | extern struct platform_device s5pc100_device_ac97; | 103 | extern struct platform_device s5pc100_device_ac97; |
105 | extern struct platform_device s5pc100_device_iis0; | 104 | extern struct platform_device s5pc100_device_iis0; |
@@ -108,9 +107,6 @@ extern struct platform_device s5pc100_device_iis2; | |||
108 | extern struct platform_device s5pc100_device_pcm0; | 107 | extern struct platform_device s5pc100_device_pcm0; |
109 | extern struct platform_device s5pc100_device_pcm1; | 108 | extern struct platform_device s5pc100_device_pcm1; |
110 | extern struct platform_device s5pc100_device_spdif; | 109 | extern struct platform_device s5pc100_device_spdif; |
111 | extern struct platform_device s5pc100_device_spi0; | ||
112 | extern struct platform_device s5pc100_device_spi1; | ||
113 | extern struct platform_device s5pc100_device_spi2; | ||
114 | 110 | ||
115 | extern struct platform_device s5pv210_device_ac97; | 111 | extern struct platform_device s5pv210_device_ac97; |
116 | extern struct platform_device s5pv210_device_iis0; | 112 | extern struct platform_device s5pv210_device_iis0; |
@@ -120,8 +116,6 @@ extern struct platform_device s5pv210_device_pcm0; | |||
120 | extern struct platform_device s5pv210_device_pcm1; | 116 | extern struct platform_device s5pv210_device_pcm1; |
121 | extern struct platform_device s5pv210_device_pcm2; | 117 | extern struct platform_device s5pv210_device_pcm2; |
122 | extern struct platform_device s5pv210_device_spdif; | 118 | extern struct platform_device s5pv210_device_spdif; |
123 | extern struct platform_device s5pv210_device_spi0; | ||
124 | extern struct platform_device s5pv210_device_spi1; | ||
125 | 119 | ||
126 | extern struct platform_device exynos4_device_ac97; | 120 | extern struct platform_device exynos4_device_ac97; |
127 | extern struct platform_device exynos4_device_ahci; | 121 | extern struct platform_device exynos4_device_ahci; |
@@ -129,6 +123,7 @@ extern struct platform_device exynos4_device_dwmci; | |||
129 | extern struct platform_device exynos4_device_i2s0; | 123 | extern struct platform_device exynos4_device_i2s0; |
130 | extern struct platform_device exynos4_device_i2s1; | 124 | extern struct platform_device exynos4_device_i2s1; |
131 | extern struct platform_device exynos4_device_i2s2; | 125 | extern struct platform_device exynos4_device_i2s2; |
126 | extern struct platform_device exynos4_device_ohci; | ||
132 | extern struct platform_device exynos4_device_pcm0; | 127 | extern struct platform_device exynos4_device_pcm0; |
133 | extern struct platform_device exynos4_device_pcm1; | 128 | extern struct platform_device exynos4_device_pcm1; |
134 | extern struct platform_device exynos4_device_pcm2; | 129 | extern struct platform_device exynos4_device_pcm2; |
diff --git a/arch/arm/plat-samsung/include/plat/dma-ops.h b/arch/arm/plat-samsung/include/plat/dma-ops.h index 4c1a363526cf..22eafc310bd7 100644 --- a/arch/arm/plat-samsung/include/plat/dma-ops.h +++ b/arch/arm/plat-samsung/include/plat/dma-ops.h | |||
@@ -31,6 +31,7 @@ struct samsung_dma_info { | |||
31 | enum dma_slave_buswidth width; | 31 | enum dma_slave_buswidth width; |
32 | dma_addr_t fifo; | 32 | dma_addr_t fifo; |
33 | struct s3c2410_dma_client *client; | 33 | struct s3c2410_dma_client *client; |
34 | struct property *dt_dmach_prop; | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | struct samsung_dma_ops { | 37 | struct samsung_dma_ops { |
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h b/arch/arm/plat-samsung/include/plat/dma-pl330.h index 2e55e5958674..c5eaad529de5 100644 --- a/arch/arm/plat-samsung/include/plat/dma-pl330.h +++ b/arch/arm/plat-samsung/include/plat/dma-pl330.h | |||
@@ -21,7 +21,8 @@ | |||
21 | * use these just as IDs. | 21 | * use these just as IDs. |
22 | */ | 22 | */ |
23 | enum dma_ch { | 23 | enum dma_ch { |
24 | DMACH_UART0_RX, | 24 | DMACH_DT_PROP = -1, |
25 | DMACH_UART0_RX = 0, | ||
25 | DMACH_UART0_TX, | 26 | DMACH_UART0_TX, |
26 | DMACH_UART1_RX, | 27 | DMACH_UART1_RX, |
27 | DMACH_UART1_TX, | 28 | DMACH_UART1_TX, |
diff --git a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h index 1c1ed5481253..d01576318b2c 100644 --- a/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h +++ b/arch/arm/plat-samsung/include/plat/dma-s3c24xx.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <plat/dma-core.h> | 13 | #include <plat/dma-core.h> |
14 | 14 | ||
15 | extern struct sysdev_class dma_sysclass; | 15 | extern struct bus_type dma_subsys; |
16 | extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; | 16 | extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; |
17 | 17 | ||
18 | #define DMA_CH_VALID (1<<31) | 18 | #define DMA_CH_VALID (1<<31) |
diff --git a/arch/arm/plat-samsung/include/plat/irqs.h b/arch/arm/plat-samsung/include/plat/irqs.h index 08d1a7ef97b7..df46b776976a 100644 --- a/arch/arm/plat-samsung/include/plat/irqs.h +++ b/arch/arm/plat-samsung/include/plat/irqs.h | |||
@@ -44,13 +44,14 @@ | |||
44 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) | 44 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) |
45 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) | 45 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) |
46 | 46 | ||
47 | #define S5P_TIMER_IRQ(x) (11 + (x)) | 47 | #define S5P_TIMER_IRQ(x) (IRQ_TIMER_BASE + (x)) |
48 | 48 | ||
49 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) | 49 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) |
50 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) | 50 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) |
51 | #define IRQ_TIMER2 S5P_TIMER_IRQ(2) | 51 | #define IRQ_TIMER2 S5P_TIMER_IRQ(2) |
52 | #define IRQ_TIMER3 S5P_TIMER_IRQ(3) | 52 | #define IRQ_TIMER3 S5P_TIMER_IRQ(3) |
53 | #define IRQ_TIMER4 S5P_TIMER_IRQ(4) | 53 | #define IRQ_TIMER4 S5P_TIMER_IRQ(4) |
54 | #define IRQ_TIMER_COUNT (5) | ||
54 | 55 | ||
55 | #define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ | 56 | #define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ |
56 | : ((x) - 16 + S5P_EINT_BASE2)) | 57 | : ((x) - 16 + S5P_EINT_BASE2)) |
diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/plat-samsung/include/plat/keypad.h index b59a6483cd8a..c81ace332a1e 100644 --- a/arch/arm/plat-samsung/include/plat/keypad.h +++ b/arch/arm/plat-samsung/include/plat/keypad.h | |||
@@ -13,32 +13,7 @@ | |||
13 | #ifndef __PLAT_SAMSUNG_KEYPAD_H | 13 | #ifndef __PLAT_SAMSUNG_KEYPAD_H |
14 | #define __PLAT_SAMSUNG_KEYPAD_H | 14 | #define __PLAT_SAMSUNG_KEYPAD_H |
15 | 15 | ||
16 | #include <linux/input/matrix_keypad.h> | 16 | #include <linux/input/samsung-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 | 17 | ||
43 | /** | 18 | /** |
44 | * samsung_keypad_set_platdata - Set platform data for Samsung Keypad device. | 19 | * samsung_keypad_set_platdata - Set platform data for Samsung Keypad device. |
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index dcf68709f9cf..61fc53740fbd 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -17,11 +17,12 @@ | |||
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | struct sys_device; | 20 | struct device; |
21 | 21 | ||
22 | #ifdef CONFIG_PM | 22 | #ifdef CONFIG_PM |
23 | 23 | ||
24 | extern __init int s3c_pm_init(void); | 24 | extern __init int s3c_pm_init(void); |
25 | extern __init int s3c64xx_pm_init(void); | ||
25 | 26 | ||
26 | #else | 27 | #else |
27 | 28 | ||
@@ -29,6 +30,11 @@ static inline int s3c_pm_init(void) | |||
29 | { | 30 | { |
30 | return 0; | 31 | return 0; |
31 | } | 32 | } |
33 | |||
34 | static inline int s3c64xx_pm_init(void) | ||
35 | { | ||
36 | return 0; | ||
37 | } | ||
32 | #endif | 38 | #endif |
33 | 39 | ||
34 | /* configuration for the IRQ mask over sleep */ | 40 | /* configuration for the IRQ mask over sleep */ |
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h index 720734847027..29c26a818842 100644 --- a/arch/arm/plat-samsung/include/plat/regs-serial.h +++ b/arch/arm/plat-samsung/include/plat/regs-serial.h | |||
@@ -71,6 +71,7 @@ | |||
71 | #define S3C2410_LCON_IRM (1<<6) | 71 | #define S3C2410_LCON_IRM (1<<6) |
72 | 72 | ||
73 | #define S3C2440_UCON_CLKMASK (3<<10) | 73 | #define S3C2440_UCON_CLKMASK (3<<10) |
74 | #define S3C2440_UCON_CLKSHIFT (10) | ||
74 | #define S3C2440_UCON_PCLK (0<<10) | 75 | #define S3C2440_UCON_PCLK (0<<10) |
75 | #define S3C2440_UCON_UCLK (1<<10) | 76 | #define S3C2440_UCON_UCLK (1<<10) |
76 | #define S3C2440_UCON_PCLK2 (2<<10) | 77 | #define S3C2440_UCON_PCLK2 (2<<10) |
@@ -78,6 +79,7 @@ | |||
78 | #define S3C2443_UCON_EPLL (3<<10) | 79 | #define S3C2443_UCON_EPLL (3<<10) |
79 | 80 | ||
80 | #define S3C6400_UCON_CLKMASK (3<<10) | 81 | #define S3C6400_UCON_CLKMASK (3<<10) |
82 | #define S3C6400_UCON_CLKSHIFT (10) | ||
81 | #define S3C6400_UCON_PCLK (0<<10) | 83 | #define S3C6400_UCON_PCLK (0<<10) |
82 | #define S3C6400_UCON_PCLK2 (2<<10) | 84 | #define S3C6400_UCON_PCLK2 (2<<10) |
83 | #define S3C6400_UCON_UCLK0 (1<<10) | 85 | #define S3C6400_UCON_UCLK0 (1<<10) |
@@ -90,11 +92,14 @@ | |||
90 | #define S3C2440_UCON_DIVSHIFT (12) | 92 | #define S3C2440_UCON_DIVSHIFT (12) |
91 | 93 | ||
92 | #define S3C2412_UCON_CLKMASK (3<<10) | 94 | #define S3C2412_UCON_CLKMASK (3<<10) |
95 | #define S3C2412_UCON_CLKSHIFT (10) | ||
93 | #define S3C2412_UCON_UCLK (1<<10) | 96 | #define S3C2412_UCON_UCLK (1<<10) |
94 | #define S3C2412_UCON_USYSCLK (3<<10) | 97 | #define S3C2412_UCON_USYSCLK (3<<10) |
95 | #define S3C2412_UCON_PCLK (0<<10) | 98 | #define S3C2412_UCON_PCLK (0<<10) |
96 | #define S3C2412_UCON_PCLK2 (2<<10) | 99 | #define S3C2412_UCON_PCLK2 (2<<10) |
97 | 100 | ||
101 | #define S3C2410_UCON_CLKMASK (1 << 10) | ||
102 | #define S3C2410_UCON_CLKSHIFT (10) | ||
98 | #define S3C2410_UCON_UCLK (1<<10) | 103 | #define S3C2410_UCON_UCLK (1<<10) |
99 | #define S3C2410_UCON_SBREAK (1<<4) | 104 | #define S3C2410_UCON_SBREAK (1<<4) |
100 | 105 | ||
@@ -193,6 +198,7 @@ | |||
193 | 198 | ||
194 | /* Following are specific to S5PV210 */ | 199 | /* Following are specific to S5PV210 */ |
195 | #define S5PV210_UCON_CLKMASK (1<<10) | 200 | #define S5PV210_UCON_CLKMASK (1<<10) |
201 | #define S5PV210_UCON_CLKSHIFT (10) | ||
196 | #define S5PV210_UCON_PCLK (0<<10) | 202 | #define S5PV210_UCON_PCLK (0<<10) |
197 | #define S5PV210_UCON_UCLK (1<<10) | 203 | #define S5PV210_UCON_UCLK (1<<10) |
198 | 204 | ||
@@ -221,29 +227,24 @@ | |||
221 | #define S5PV210_UFSTAT_RXMASK (255<<0) | 227 | #define S5PV210_UFSTAT_RXMASK (255<<0) |
222 | #define S5PV210_UFSTAT_RXSHIFT (0) | 228 | #define S5PV210_UFSTAT_RXSHIFT (0) |
223 | 229 | ||
224 | #define NO_NEED_CHECK_CLKSRC 1 | 230 | #define S3C2410_UCON_CLKSEL0 (1 << 0) |
231 | #define S3C2410_UCON_CLKSEL1 (1 << 1) | ||
232 | #define S3C2410_UCON_CLKSEL2 (1 << 2) | ||
233 | #define S3C2410_UCON_CLKSEL3 (1 << 3) | ||
225 | 234 | ||
226 | #ifndef __ASSEMBLY__ | 235 | /* Default values for s5pv210 UCON and UFCON uart registers */ |
236 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
237 | S3C2410_UCON_RXILEVEL | \ | ||
238 | S3C2410_UCON_TXIRQMODE | \ | ||
239 | S3C2410_UCON_RXIRQMODE | \ | ||
240 | S3C2410_UCON_RXFIFO_TOI | \ | ||
241 | S3C2443_UCON_RXERR_IRQEN) | ||
227 | 242 | ||
228 | /* struct s3c24xx_uart_clksrc | 243 | #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ |
229 | * | 244 | S5PV210_UFCON_TXTRIG4 | \ |
230 | * this structure defines a named clock source that can be used for the | 245 | S5PV210_UFCON_RXTRIG4) |
231 | * uart, so that the best clock can be selected for the requested baud | ||
232 | * rate. | ||
233 | * | ||
234 | * min_baud and max_baud define the range of baud-rates this clock is | ||
235 | * acceptable for, if they are both zero, it is assumed any baud rate that | ||
236 | * can be generated from this clock will be used. | ||
237 | * | ||
238 | * divisor gives the divisor from the clock to the one seen by the uart | ||
239 | */ | ||
240 | 246 | ||
241 | struct s3c24xx_uart_clksrc { | 247 | #ifndef __ASSEMBLY__ |
242 | const char *name; | ||
243 | unsigned int divisor; | ||
244 | unsigned int min_baud; | ||
245 | unsigned int max_baud; | ||
246 | }; | ||
247 | 248 | ||
248 | /* configuration structure for per-machine configurations for the | 249 | /* configuration structure for per-machine configurations for the |
249 | * serial port | 250 | * serial port |
@@ -257,15 +258,13 @@ struct s3c2410_uartcfg { | |||
257 | unsigned char unused; | 258 | unsigned char unused; |
258 | unsigned short flags; | 259 | unsigned short flags; |
259 | upf_t uart_flags; /* default uart flags */ | 260 | upf_t uart_flags; /* default uart flags */ |
261 | unsigned int clk_sel; | ||
260 | 262 | ||
261 | unsigned int has_fracval; | 263 | unsigned int has_fracval; |
262 | 264 | ||
263 | unsigned long ucon; /* value of ucon for port */ | 265 | unsigned long ucon; /* value of ucon for port */ |
264 | unsigned long ulcon; /* value of ulcon for port */ | 266 | unsigned long ulcon; /* value of ulcon for port */ |
265 | unsigned long ufcon; /* value of ufcon for port */ | 267 | unsigned long ufcon; /* value of ufcon for port */ |
266 | |||
267 | struct s3c24xx_uart_clksrc *clocks; | ||
268 | unsigned int clocks_size; | ||
269 | }; | 268 | }; |
270 | 269 | ||
271 | /* s3c24xx_uart_devs | 270 | /* s3c24xx_uart_devs |
diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h index 4c16fa3621bb..aea68b60ef98 100644 --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | |||
@@ -31,7 +31,6 @@ struct s3c64xx_spi_csinfo { | |||
31 | /** | 31 | /** |
32 | * struct s3c64xx_spi_info - SPI Controller defining structure | 32 | * struct s3c64xx_spi_info - SPI Controller defining structure |
33 | * @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field. | 33 | * @src_clk_nr: Clock source index for the CLK_CFG[SPI_CLKSEL] field. |
34 | * @src_clk_name: Platform name of the corresponding clock. | ||
35 | * @clk_from_cmu: If the SPI clock/prescalar control block is present | 34 | * @clk_from_cmu: If the SPI clock/prescalar control block is present |
36 | * by the platform's clock-management-unit and not in SPI controller. | 35 | * by the platform's clock-management-unit and not in SPI controller. |
37 | * @num_cs: Number of CS this controller emulates. | 36 | * @num_cs: Number of CS this controller emulates. |
@@ -43,7 +42,6 @@ struct s3c64xx_spi_csinfo { | |||
43 | */ | 42 | */ |
44 | struct s3c64xx_spi_info { | 43 | struct s3c64xx_spi_info { |
45 | int src_clk_nr; | 44 | int src_clk_nr; |
46 | char *src_clk_name; | ||
47 | bool clk_from_cmu; | 45 | bool clk_from_cmu; |
48 | 46 | ||
49 | int num_cs; | 47 | int num_cs; |
@@ -58,18 +56,28 @@ struct s3c64xx_spi_info { | |||
58 | }; | 56 | }; |
59 | 57 | ||
60 | /** | 58 | /** |
61 | * s3c64xx_spi_set_info - SPI Controller configure callback by the board | 59 | * s3c64xx_spi_set_platdata - SPI Controller configure callback by the board |
62 | * initialization code. | 60 | * initialization code. |
63 | * @cntrlr: SPI controller number the configuration is for. | 61 | * @pd: SPI platform data to set. |
64 | * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks. | 62 | * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks. |
65 | * @num_cs: Number of elements in the 'cs' array. | 63 | * @num_cs: Number of elements in the 'cs' array. |
66 | * | 64 | * |
67 | * Call this from machine init code for each SPI Controller that | 65 | * Call this from machine init code for each SPI Controller that |
68 | * has some chips attached to it. | 66 | * has some chips attached to it. |
69 | */ | 67 | */ |
70 | extern void s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 68 | extern void s3c64xx_spi0_set_platdata(struct s3c64xx_spi_info *pd, |
71 | extern void s5pc100_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 69 | int src_clk_nr, int num_cs); |
72 | extern void s5pv210_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 70 | extern void s3c64xx_spi1_set_platdata(struct s3c64xx_spi_info *pd, |
73 | extern void s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 71 | int src_clk_nr, int num_cs); |
72 | extern void s3c64xx_spi2_set_platdata(struct s3c64xx_spi_info *pd, | ||
73 | int src_clk_nr, int num_cs); | ||
74 | 74 | ||
75 | /* defined by architecture to configure gpio */ | ||
76 | extern int s3c64xx_spi0_cfg_gpio(struct platform_device *dev); | ||
77 | extern int s3c64xx_spi1_cfg_gpio(struct platform_device *dev); | ||
78 | extern int s3c64xx_spi2_cfg_gpio(struct platform_device *dev); | ||
79 | |||
80 | extern struct s3c64xx_spi_info s3c64xx_spi0_pdata; | ||
81 | extern struct s3c64xx_spi_info s3c64xx_spi1_pdata; | ||
82 | extern struct s3c64xx_spi_info s3c64xx_spi2_pdata; | ||
75 | #endif /* __S3C64XX_PLAT_SPI_H */ | 83 | #endif /* __S3C64XX_PLAT_SPI_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index e7b3c752e919..656dc00d30ed 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -66,8 +66,6 @@ struct s3c_sdhci_platdata { | |||
66 | enum cd_types cd_type; | 66 | enum cd_types cd_type; |
67 | enum clk_types clk_type; | 67 | enum clk_types clk_type; |
68 | 68 | ||
69 | char **clocks; /* set of clock sources */ | ||
70 | |||
71 | int ext_cd_gpio; | 69 | int ext_cd_gpio; |
72 | bool ext_cd_gpio_invert; | 70 | bool ext_cd_gpio_invert; |
73 | int (*ext_cd_init)(void (*notify_func)(struct platform_device *, | 71 | int (*ext_cd_init)(void (*notify_func)(struct platform_device *, |
@@ -125,16 +123,17 @@ extern void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | |||
125 | extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 123 | extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
126 | extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 124 | extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
127 | extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 125 | extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
126 | extern void s5p64x0_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
127 | extern void s5p64x0_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
128 | extern void s5p6440_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
129 | extern void s5p6450_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
128 | 130 | ||
129 | /* S3C2416 SDHCI setup */ | 131 | /* S3C2416 SDHCI setup */ |
130 | 132 | ||
131 | #ifdef CONFIG_S3C2416_SETUP_SDHCI | 133 | #ifdef CONFIG_S3C2416_SETUP_SDHCI |
132 | extern char *s3c2416_hsmmc_clksrcs[4]; | ||
133 | |||
134 | static inline void s3c2416_default_sdhci0(void) | 134 | static inline void s3c2416_default_sdhci0(void) |
135 | { | 135 | { |
136 | #ifdef CONFIG_S3C_DEV_HSMMC | 136 | #ifdef CONFIG_S3C_DEV_HSMMC |
137 | s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
138 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; | 137 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; |
139 | #endif /* CONFIG_S3C_DEV_HSMMC */ | 138 | #endif /* CONFIG_S3C_DEV_HSMMC */ |
140 | } | 139 | } |
@@ -142,7 +141,6 @@ static inline void s3c2416_default_sdhci0(void) | |||
142 | static inline void s3c2416_default_sdhci1(void) | 141 | static inline void s3c2416_default_sdhci1(void) |
143 | { | 142 | { |
144 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 143 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
145 | s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
146 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; | 144 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; |
147 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | 145 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ |
148 | } | 146 | } |
@@ -152,15 +150,13 @@ static inline void s3c2416_default_sdhci0(void) { } | |||
152 | static inline void s3c2416_default_sdhci1(void) { } | 150 | static inline void s3c2416_default_sdhci1(void) { } |
153 | 151 | ||
154 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ | 152 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ |
153 | |||
155 | /* S3C64XX SDHCI setup */ | 154 | /* S3C64XX SDHCI setup */ |
156 | 155 | ||
157 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 156 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
158 | extern char *s3c64xx_hsmmc_clksrcs[4]; | ||
159 | |||
160 | static inline void s3c6400_default_sdhci0(void) | 157 | static inline void s3c6400_default_sdhci0(void) |
161 | { | 158 | { |
162 | #ifdef CONFIG_S3C_DEV_HSMMC | 159 | #ifdef CONFIG_S3C_DEV_HSMMC |
163 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
164 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 160 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
165 | #endif | 161 | #endif |
166 | } | 162 | } |
@@ -168,7 +164,6 @@ static inline void s3c6400_default_sdhci0(void) | |||
168 | static inline void s3c6400_default_sdhci1(void) | 164 | static inline void s3c6400_default_sdhci1(void) |
169 | { | 165 | { |
170 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 166 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
171 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
172 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 167 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
173 | #endif | 168 | #endif |
174 | } | 169 | } |
@@ -176,7 +171,6 @@ static inline void s3c6400_default_sdhci1(void) | |||
176 | static inline void s3c6400_default_sdhci2(void) | 171 | static inline void s3c6400_default_sdhci2(void) |
177 | { | 172 | { |
178 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 173 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
179 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
180 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 174 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
181 | #endif | 175 | #endif |
182 | } | 176 | } |
@@ -184,7 +178,6 @@ static inline void s3c6400_default_sdhci2(void) | |||
184 | static inline void s3c6410_default_sdhci0(void) | 178 | static inline void s3c6410_default_sdhci0(void) |
185 | { | 179 | { |
186 | #ifdef CONFIG_S3C_DEV_HSMMC | 180 | #ifdef CONFIG_S3C_DEV_HSMMC |
187 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
188 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 181 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
189 | #endif | 182 | #endif |
190 | } | 183 | } |
@@ -192,7 +185,6 @@ static inline void s3c6410_default_sdhci0(void) | |||
192 | static inline void s3c6410_default_sdhci1(void) | 185 | static inline void s3c6410_default_sdhci1(void) |
193 | { | 186 | { |
194 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 187 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
195 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
196 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 188 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
197 | #endif | 189 | #endif |
198 | } | 190 | } |
@@ -200,7 +192,6 @@ static inline void s3c6410_default_sdhci1(void) | |||
200 | static inline void s3c6410_default_sdhci2(void) | 192 | static inline void s3c6410_default_sdhci2(void) |
201 | { | 193 | { |
202 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 194 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
203 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; | ||
204 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 195 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
205 | #endif | 196 | #endif |
206 | } | 197 | } |
@@ -215,15 +206,51 @@ static inline void s3c6400_default_sdhci2(void) { } | |||
215 | 206 | ||
216 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ | 207 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ |
217 | 208 | ||
209 | /* S5P64X0 SDHCI setup */ | ||
210 | |||
211 | #ifdef CONFIG_S5P64X0_SETUP_SDHCI | ||
212 | static inline void s5p64x0_default_sdhci0(void) | ||
213 | { | ||
214 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
215 | s3c_hsmmc0_def_platdata.cfg_gpio = s5p64x0_setup_sdhci0_cfg_gpio; | ||
216 | #endif | ||
217 | } | ||
218 | |||
219 | static inline void s5p64x0_default_sdhci1(void) | ||
220 | { | ||
221 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
222 | s3c_hsmmc1_def_platdata.cfg_gpio = s5p64x0_setup_sdhci1_cfg_gpio; | ||
223 | #endif | ||
224 | } | ||
225 | |||
226 | static inline void s5p6440_default_sdhci2(void) | ||
227 | { | ||
228 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
229 | s3c_hsmmc2_def_platdata.cfg_gpio = s5p6440_setup_sdhci2_cfg_gpio; | ||
230 | #endif | ||
231 | } | ||
232 | |||
233 | static inline void s5p6450_default_sdhci2(void) | ||
234 | { | ||
235 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
236 | s3c_hsmmc2_def_platdata.cfg_gpio = s5p6450_setup_sdhci2_cfg_gpio; | ||
237 | #endif | ||
238 | } | ||
239 | |||
240 | #else | ||
241 | static inline void s5p64x0_default_sdhci0(void) { } | ||
242 | static inline void s5p64x0_default_sdhci1(void) { } | ||
243 | static inline void s5p6440_default_sdhci2(void) { } | ||
244 | static inline void s5p6450_default_sdhci2(void) { } | ||
245 | |||
246 | #endif /* CONFIG_S5P64X0_SETUP_SDHCI */ | ||
247 | |||
218 | /* S5PC100 SDHCI setup */ | 248 | /* S5PC100 SDHCI setup */ |
219 | 249 | ||
220 | #ifdef CONFIG_S5PC100_SETUP_SDHCI | 250 | #ifdef CONFIG_S5PC100_SETUP_SDHCI |
221 | extern char *s5pc100_hsmmc_clksrcs[4]; | ||
222 | |||
223 | static inline void s5pc100_default_sdhci0(void) | 251 | static inline void s5pc100_default_sdhci0(void) |
224 | { | 252 | { |
225 | #ifdef CONFIG_S3C_DEV_HSMMC | 253 | #ifdef CONFIG_S3C_DEV_HSMMC |
226 | s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
227 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; | 254 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; |
228 | #endif | 255 | #endif |
229 | } | 256 | } |
@@ -231,7 +258,6 @@ static inline void s5pc100_default_sdhci0(void) | |||
231 | static inline void s5pc100_default_sdhci1(void) | 258 | static inline void s5pc100_default_sdhci1(void) |
232 | { | 259 | { |
233 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 260 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
234 | s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
235 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; | 261 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; |
236 | #endif | 262 | #endif |
237 | } | 263 | } |
@@ -239,7 +265,6 @@ static inline void s5pc100_default_sdhci1(void) | |||
239 | static inline void s5pc100_default_sdhci2(void) | 265 | static inline void s5pc100_default_sdhci2(void) |
240 | { | 266 | { |
241 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 267 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
242 | s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs; | ||
243 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; | 268 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; |
244 | #endif | 269 | #endif |
245 | } | 270 | } |
@@ -254,12 +279,9 @@ static inline void s5pc100_default_sdhci2(void) { } | |||
254 | /* S5PV210 SDHCI setup */ | 279 | /* S5PV210 SDHCI setup */ |
255 | 280 | ||
256 | #ifdef CONFIG_S5PV210_SETUP_SDHCI | 281 | #ifdef CONFIG_S5PV210_SETUP_SDHCI |
257 | extern char *s5pv210_hsmmc_clksrcs[4]; | ||
258 | |||
259 | static inline void s5pv210_default_sdhci0(void) | 282 | static inline void s5pv210_default_sdhci0(void) |
260 | { | 283 | { |
261 | #ifdef CONFIG_S3C_DEV_HSMMC | 284 | #ifdef CONFIG_S3C_DEV_HSMMC |
262 | s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | ||
263 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; | 285 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; |
264 | #endif | 286 | #endif |
265 | } | 287 | } |
@@ -267,7 +289,6 @@ static inline void s5pv210_default_sdhci0(void) | |||
267 | static inline void s5pv210_default_sdhci1(void) | 289 | static inline void s5pv210_default_sdhci1(void) |
268 | { | 290 | { |
269 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 291 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
270 | s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | ||
271 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; | 292 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; |
272 | #endif | 293 | #endif |
273 | } | 294 | } |
@@ -275,7 +296,6 @@ static inline void s5pv210_default_sdhci1(void) | |||
275 | static inline void s5pv210_default_sdhci2(void) | 296 | static inline void s5pv210_default_sdhci2(void) |
276 | { | 297 | { |
277 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 298 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
278 | s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | ||
279 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; | 299 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; |
280 | #endif | 300 | #endif |
281 | } | 301 | } |
@@ -283,7 +303,6 @@ static inline void s5pv210_default_sdhci2(void) | |||
283 | static inline void s5pv210_default_sdhci3(void) | 303 | static inline void s5pv210_default_sdhci3(void) |
284 | { | 304 | { |
285 | #ifdef CONFIG_S3C_DEV_HSMMC3 | 305 | #ifdef CONFIG_S3C_DEV_HSMMC3 |
286 | s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs; | ||
287 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; | 306 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; |
288 | #endif | 307 | #endif |
289 | } | 308 | } |
@@ -298,12 +317,9 @@ static inline void s5pv210_default_sdhci3(void) { } | |||
298 | 317 | ||
299 | /* EXYNOS4 SDHCI setup */ | 318 | /* EXYNOS4 SDHCI setup */ |
300 | #ifdef CONFIG_EXYNOS4_SETUP_SDHCI | 319 | #ifdef CONFIG_EXYNOS4_SETUP_SDHCI |
301 | extern char *exynos4_hsmmc_clksrcs[4]; | ||
302 | |||
303 | static inline void exynos4_default_sdhci0(void) | 320 | static inline void exynos4_default_sdhci0(void) |
304 | { | 321 | { |
305 | #ifdef CONFIG_S3C_DEV_HSMMC | 322 | #ifdef CONFIG_S3C_DEV_HSMMC |
306 | s3c_hsmmc0_def_platdata.clocks = exynos4_hsmmc_clksrcs; | ||
307 | s3c_hsmmc0_def_platdata.cfg_gpio = exynos4_setup_sdhci0_cfg_gpio; | 323 | s3c_hsmmc0_def_platdata.cfg_gpio = exynos4_setup_sdhci0_cfg_gpio; |
308 | #endif | 324 | #endif |
309 | } | 325 | } |
@@ -311,7 +327,6 @@ static inline void exynos4_default_sdhci0(void) | |||
311 | static inline void exynos4_default_sdhci1(void) | 327 | static inline void exynos4_default_sdhci1(void) |
312 | { | 328 | { |
313 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 329 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
314 | s3c_hsmmc1_def_platdata.clocks = exynos4_hsmmc_clksrcs; | ||
315 | s3c_hsmmc1_def_platdata.cfg_gpio = exynos4_setup_sdhci1_cfg_gpio; | 330 | s3c_hsmmc1_def_platdata.cfg_gpio = exynos4_setup_sdhci1_cfg_gpio; |
316 | #endif | 331 | #endif |
317 | } | 332 | } |
@@ -319,7 +334,6 @@ static inline void exynos4_default_sdhci1(void) | |||
319 | static inline void exynos4_default_sdhci2(void) | 334 | static inline void exynos4_default_sdhci2(void) |
320 | { | 335 | { |
321 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 336 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
322 | s3c_hsmmc2_def_platdata.clocks = exynos4_hsmmc_clksrcs; | ||
323 | s3c_hsmmc2_def_platdata.cfg_gpio = exynos4_setup_sdhci2_cfg_gpio; | 337 | s3c_hsmmc2_def_platdata.cfg_gpio = exynos4_setup_sdhci2_cfg_gpio; |
324 | #endif | 338 | #endif |
325 | } | 339 | } |
@@ -327,7 +341,6 @@ static inline void exynos4_default_sdhci2(void) | |||
327 | static inline void exynos4_default_sdhci3(void) | 341 | static inline void exynos4_default_sdhci3(void) |
328 | { | 342 | { |
329 | #ifdef CONFIG_S3C_DEV_HSMMC3 | 343 | #ifdef CONFIG_S3C_DEV_HSMMC3 |
330 | s3c_hsmmc3_def_platdata.clocks = exynos4_hsmmc_clksrcs; | ||
331 | s3c_hsmmc3_def_platdata.cfg_gpio = exynos4_setup_sdhci3_cfg_gpio; | 344 | s3c_hsmmc3_def_platdata.cfg_gpio = exynos4_setup_sdhci3_cfg_gpio; |
332 | #endif | 345 | #endif |
333 | } | 346 | } |
diff --git a/arch/arm/plat-samsung/include/plat/udc.h b/arch/arm/plat-samsung/include/plat/udc.h index 8c22d586befb..de8e2288a509 100644 --- a/arch/arm/plat-samsung/include/plat/udc.h +++ b/arch/arm/plat-samsung/include/plat/udc.h | |||
@@ -37,20 +37,7 @@ struct s3c2410_udc_mach_info { | |||
37 | 37 | ||
38 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); | 38 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); |
39 | 39 | ||
40 | /** | 40 | struct s3c24xx_hsudc_platdata; |
41 | * s3c24xx_hsudc_platdata - Platform data for USB High-Speed gadget controller. | ||
42 | * @epnum: Number of endpoints to be instantiated by the controller driver. | ||
43 | * @gpio_init: Platform specific USB related GPIO initialization. | ||
44 | * @gpio_uninit: Platform specific USB releted GPIO uninitialzation. | ||
45 | * | ||
46 | * Representation of platform data for the S3C24XX USB 2.0 High Speed gadget | ||
47 | * controllers. | ||
48 | */ | ||
49 | struct s3c24xx_hsudc_platdata { | ||
50 | unsigned int epnum; | ||
51 | void (*gpio_init)(void); | ||
52 | void (*gpio_uninit)(void); | ||
53 | }; | ||
54 | 41 | ||
55 | extern void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd); | 42 | extern void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd); |
56 | 43 | ||
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c index 4be016eaa6db..c2ff92c30bdf 100644 --- a/arch/arm/plat-samsung/pm-gpio.c +++ b/arch/arm/plat-samsung/pm-gpio.c | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/device.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
diff --git a/arch/arm/plat-samsung/wakeup-mask.c b/arch/arm/plat-samsung/wakeup-mask.c index dc814037297b..20c3d9117cc2 100644 --- a/arch/arm/plat-samsung/wakeup-mask.c +++ b/arch/arm/plat-samsung/wakeup-mask.c | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/sysdev.h> | 14 | #include <linux/device.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |