diff options
Diffstat (limited to 'arch/arm/plat-samsung/include/plat')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/audio.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 7 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg.h | 56 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-core.h | 15 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/iic.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/map-base.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/nand-core.h | 28 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 64 |
9 files changed, 197 insertions, 2 deletions
diff --git a/arch/arm/plat-samsung/include/plat/audio.h b/arch/arm/plat-samsung/include/plat/audio.h index e32f9edfd4b..7712ff6336f 100644 --- a/arch/arm/plat-samsung/include/plat/audio.h +++ b/arch/arm/plat-samsung/include/plat/audio.h | |||
@@ -16,6 +16,15 @@ | |||
16 | #define S3C64XX_AC97_GPE 1 | 16 | #define S3C64XX_AC97_GPE 1 |
17 | extern void s3c64xx_ac97_setup_gpio(int); | 17 | extern void s3c64xx_ac97_setup_gpio(int); |
18 | 18 | ||
19 | /* | ||
20 | * The machine init code calls s5p*_spdif_setup_gpio with | ||
21 | * one of these defines in order to select appropriate bank | ||
22 | * of GPIO for S/PDIF pins | ||
23 | */ | ||
24 | #define S5PC100_SPDIF_GPD 0 | ||
25 | #define S5PC100_SPDIF_GPG3 1 | ||
26 | extern void s5pc100_spdif_setup_gpio(int); | ||
27 | |||
19 | /** | 28 | /** |
20 | * struct s3c_audio_pdata - common platform data for audio device drivers | 29 | * struct s3c_audio_pdata - common platform data for audio device drivers |
21 | * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode | 30 | * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index c8b94279bad..2d82a6cb144 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -48,6 +48,11 @@ extern struct platform_device s3c_device_wdt; | |||
48 | extern struct platform_device s3c_device_i2c0; | 48 | extern struct platform_device s3c_device_i2c0; |
49 | extern struct platform_device s3c_device_i2c1; | 49 | extern struct platform_device s3c_device_i2c1; |
50 | extern struct platform_device s3c_device_i2c2; | 50 | extern struct platform_device s3c_device_i2c2; |
51 | extern struct platform_device s3c_device_i2c3; | ||
52 | extern struct platform_device s3c_device_i2c4; | ||
53 | extern struct platform_device s3c_device_i2c5; | ||
54 | extern struct platform_device s3c_device_i2c6; | ||
55 | extern struct platform_device s3c_device_i2c7; | ||
51 | extern struct platform_device s3c_device_rtc; | 56 | extern struct platform_device s3c_device_rtc; |
52 | extern struct platform_device s3c_device_adc; | 57 | extern struct platform_device s3c_device_adc; |
53 | extern struct platform_device s3c_device_sdi; | 58 | extern struct platform_device s3c_device_sdi; |
@@ -89,6 +94,7 @@ extern struct platform_device s5pv210_device_pcm2; | |||
89 | extern struct platform_device s5pv210_device_iis0; | 94 | extern struct platform_device s5pv210_device_iis0; |
90 | extern struct platform_device s5pv210_device_iis1; | 95 | extern struct platform_device s5pv210_device_iis1; |
91 | extern struct platform_device s5pv210_device_iis2; | 96 | extern struct platform_device s5pv210_device_iis2; |
97 | extern struct platform_device s5pv210_device_spdif; | ||
92 | 98 | ||
93 | extern struct platform_device s5p6442_device_pcm0; | 99 | extern struct platform_device s5p6442_device_pcm0; |
94 | extern struct platform_device s5p6442_device_pcm1; | 100 | extern struct platform_device s5p6442_device_pcm1; |
@@ -108,6 +114,7 @@ extern struct platform_device s5pc100_device_pcm1; | |||
108 | extern struct platform_device s5pc100_device_iis0; | 114 | extern struct platform_device s5pc100_device_iis0; |
109 | extern struct platform_device s5pc100_device_iis1; | 115 | extern struct platform_device s5pc100_device_iis1; |
110 | extern struct platform_device s5pc100_device_iis2; | 116 | extern struct platform_device s5pc100_device_iis2; |
117 | extern struct platform_device s5pc100_device_spdif; | ||
111 | 118 | ||
112 | extern struct platform_device samsung_device_keypad; | 119 | extern struct platform_device samsung_device_keypad; |
113 | 120 | ||
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index 3e21c75feef..8fd65d8b586 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
@@ -42,6 +42,12 @@ static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, | |||
42 | return (chip->config->set_pull)(chip, off, pull); | 42 | return (chip->config->set_pull)(chip, off, pull); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline s3c_gpio_pull_t s3c_gpio_do_getpull(struct s3c_gpio_chip *chip, | ||
46 | unsigned int off) | ||
47 | { | ||
48 | return chip->config->get_pull(chip, off); | ||
49 | } | ||
50 | |||
45 | /** | 51 | /** |
46 | * s3c_gpio_setcfg_s3c24xx - S3C24XX style GPIO configuration. | 52 | * s3c_gpio_setcfg_s3c24xx - S3C24XX style GPIO configuration. |
47 | * @chip: The gpio chip that is being configured. | 53 | * @chip: The gpio chip that is being configured. |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 1c6b92947c5..e4b5cf126fa 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -108,6 +108,19 @@ extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); | |||
108 | */ | 108 | */ |
109 | extern unsigned s3c_gpio_getcfg(unsigned int pin); | 109 | extern unsigned s3c_gpio_getcfg(unsigned int pin); |
110 | 110 | ||
111 | /** | ||
112 | * s3c_gpio_cfgpin_range() - Change the GPIO function for configuring pin range | ||
113 | * @start: The pin number to start at | ||
114 | * @nr: The number of pins to configure from @start. | ||
115 | * @cfg: The configuration for the pin's function | ||
116 | * | ||
117 | * Call s3c_gpio_cfgpin() for the @nr pins starting at @start. | ||
118 | * | ||
119 | * @sa s3c_gpio_cfgpin. | ||
120 | */ | ||
121 | extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | ||
122 | unsigned int cfg); | ||
123 | |||
111 | /* Define values for the pull-{up,down} available for each gpio pin. | 124 | /* Define values for the pull-{up,down} available for each gpio pin. |
112 | * | 125 | * |
113 | * These values control the state of the weak pull-{up,down} resistors | 126 | * These values control the state of the weak pull-{up,down} resistors |
@@ -140,6 +153,31 @@ extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull); | |||
140 | */ | 153 | */ |
141 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); | 154 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); |
142 | 155 | ||
156 | /* configure `all` aspects of an gpio */ | ||
157 | |||
158 | /** | ||
159 | * s3c_gpio_cfgall_range() - configure range of gpio functtion and pull. | ||
160 | * @start: The gpio number to start at. | ||
161 | * @nr: The number of gpio to configure from @start. | ||
162 | * @cfg: The configuration to use | ||
163 | * @pull: The pull setting to use. | ||
164 | * | ||
165 | * Run s3c_gpio_cfgpin() and s3c_gpio_setpull() over the gpio range starting | ||
166 | * @gpio and running for @size. | ||
167 | * | ||
168 | * @sa s3c_gpio_cfgpin | ||
169 | * @sa s3c_gpio_setpull | ||
170 | * @sa s3c_gpio_cfgpin_range | ||
171 | */ | ||
172 | extern int s3c_gpio_cfgall_range(unsigned int start, unsigned int nr, | ||
173 | unsigned int cfg, s3c_gpio_pull_t pull); | ||
174 | |||
175 | static inline int s3c_gpio_cfgrange_nopull(unsigned int pin, unsigned int size, | ||
176 | unsigned int cfg) | ||
177 | { | ||
178 | return s3c_gpio_cfgall_range(pin, size, cfg, S3C_GPIO_PULL_NONE); | ||
179 | } | ||
180 | |||
143 | /* Define values for the drvstr available for each gpio pin. | 181 | /* Define values for the drvstr available for each gpio pin. |
144 | * | 182 | * |
145 | * These values control the value of the output signal driver strength, | 183 | * These values control the value of the output signal driver strength, |
@@ -169,4 +207,22 @@ extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin); | |||
169 | */ | 207 | */ |
170 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); | 208 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); |
171 | 209 | ||
210 | /** | ||
211 | * s5p_register_gpio_interrupt() - register interrupt support for a gpio group | ||
212 | * @pin: The pin number from the group to be registered | ||
213 | * | ||
214 | * This function registers gpio interrupt support for the group that the | ||
215 | * specified pin belongs to. | ||
216 | * | ||
217 | * The total number of gpio pins is quite large ob s5p series. Registering | ||
218 | * irq support for all of them would be a resource waste. Because of that the | ||
219 | * interrupt support for standard gpio pins is registered dynamically. | ||
220 | * | ||
221 | * It will return the irq number of the interrupt that has been registered | ||
222 | * or -ENOMEM if no more gpio interrupts can be registered. It is allowed | ||
223 | * to call this function more than once for the same gpio group (the group | ||
224 | * will be registered only once). | ||
225 | */ | ||
226 | extern int s5p_register_gpio_interrupt(int pin); | ||
227 | |||
172 | #endif /* __PLAT_GPIO_CFG_H */ | 228 | #endif /* __PLAT_GPIO_CFG_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index e358c7da848..13a22b8861e 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h | |||
@@ -43,6 +43,8 @@ struct s3c_gpio_cfg; | |||
43 | * struct s3c_gpio_chip - wrapper for specific implementation of gpio | 43 | * struct s3c_gpio_chip - wrapper for specific implementation of gpio |
44 | * @chip: The chip structure to be exported via gpiolib. | 44 | * @chip: The chip structure to be exported via gpiolib. |
45 | * @base: The base pointer to the gpio configuration registers. | 45 | * @base: The base pointer to the gpio configuration registers. |
46 | * @group: The group register number for gpio interrupt support. | ||
47 | * @irq_base: The base irq number. | ||
46 | * @config: special function and pull-resistor control information. | 48 | * @config: special function and pull-resistor control information. |
47 | * @lock: Lock for exclusive access to this gpio bank. | 49 | * @lock: Lock for exclusive access to this gpio bank. |
48 | * @pm_save: Save information for suspend/resume support. | 50 | * @pm_save: Save information for suspend/resume support. |
@@ -63,6 +65,8 @@ struct s3c_gpio_chip { | |||
63 | struct s3c_gpio_cfg *config; | 65 | struct s3c_gpio_cfg *config; |
64 | struct s3c_gpio_pm *pm; | 66 | struct s3c_gpio_pm *pm; |
65 | void __iomem *base; | 67 | void __iomem *base; |
68 | int irq_base; | ||
69 | int group; | ||
66 | spinlock_t lock; | 70 | spinlock_t lock; |
67 | #ifdef CONFIG_PM | 71 | #ifdef CONFIG_PM |
68 | u32 pm_save[4]; | 72 | u32 pm_save[4]; |
@@ -118,6 +122,17 @@ extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, | |||
118 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); | 122 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); |
119 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); | 123 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); |
120 | 124 | ||
125 | |||
126 | /** | ||
127 | * samsung_gpiolib_to_irq - convert gpio pin to irq number | ||
128 | * @chip: The gpio chip that the pin belongs to. | ||
129 | * @offset: The offset of the pin in the chip. | ||
130 | * | ||
131 | * This helper returns the irq number calculated from the chip->irq_base and | ||
132 | * the provided offset. | ||
133 | */ | ||
134 | extern int samsung_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset); | ||
135 | |||
121 | /* exported for core SoC support to change */ | 136 | /* exported for core SoC support to change */ |
122 | extern struct s3c_gpio_cfg s3c24xx_gpiocfg_default; | 137 | extern struct s3c_gpio_cfg s3c24xx_gpiocfg_default; |
123 | 138 | ||
diff --git a/arch/arm/plat-samsung/include/plat/iic.h b/arch/arm/plat-samsung/include/plat/iic.h index 133308bf595..1543da8f85c 100644 --- a/arch/arm/plat-samsung/include/plat/iic.h +++ b/arch/arm/plat-samsung/include/plat/iic.h | |||
@@ -55,10 +55,20 @@ struct s3c2410_platform_i2c { | |||
55 | extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c); | 55 | extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c); |
56 | extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c); | 56 | extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c); |
57 | extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c); | 57 | extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c); |
58 | extern void s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
59 | extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
60 | extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
61 | extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
62 | extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
58 | 63 | ||
59 | /* defined by architecture to configure gpio */ | 64 | /* defined by architecture to configure gpio */ |
60 | extern void s3c_i2c0_cfg_gpio(struct platform_device *dev); | 65 | extern void s3c_i2c0_cfg_gpio(struct platform_device *dev); |
61 | extern void s3c_i2c1_cfg_gpio(struct platform_device *dev); | 66 | extern void s3c_i2c1_cfg_gpio(struct platform_device *dev); |
62 | extern void s3c_i2c2_cfg_gpio(struct platform_device *dev); | 67 | extern void s3c_i2c2_cfg_gpio(struct platform_device *dev); |
68 | extern void s3c_i2c3_cfg_gpio(struct platform_device *dev); | ||
69 | extern void s3c_i2c4_cfg_gpio(struct platform_device *dev); | ||
70 | extern void s3c_i2c5_cfg_gpio(struct platform_device *dev); | ||
71 | extern void s3c_i2c6_cfg_gpio(struct platform_device *dev); | ||
72 | extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); | ||
63 | 73 | ||
64 | #endif /* __ASM_ARCH_IIC_H */ | 74 | #endif /* __ASM_ARCH_IIC_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/map-base.h b/arch/arm/plat-samsung/include/plat/map-base.h index 250be311c85..3ffac4d2e4f 100644 --- a/arch/arm/plat-samsung/include/plat/map-base.h +++ b/arch/arm/plat-samsung/include/plat/map-base.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __ASM_PLAT_MAP_H | 14 | #ifndef __ASM_PLAT_MAP_H |
15 | #define __ASM_PLAT_MAP_H __FILE__ | 15 | #define __ASM_PLAT_MAP_H __FILE__ |
16 | 16 | ||
17 | /* Fit all our registers in at 0xF4000000 upwards, trying to use as | 17 | /* Fit all our registers in at 0xF6000000 upwards, trying to use as |
18 | * little of the VA space as possible so vmalloc and friends have a | 18 | * little of the VA space as possible so vmalloc and friends have a |
19 | * better chance of getting memory. | 19 | * better chance of getting memory. |
20 | * | 20 | * |
@@ -22,7 +22,7 @@ | |||
22 | * an single MOVS instruction (ie, only 8 bits of set data) | 22 | * an single MOVS instruction (ie, only 8 bits of set data) |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define S3C_ADDR_BASE (0xF4000000) | 25 | #define S3C_ADDR_BASE 0xF6000000 |
26 | 26 | ||
27 | #ifndef __ASSEMBLY__ | 27 | #ifndef __ASSEMBLY__ |
28 | #define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x)) | 28 | #define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x)) |
diff --git a/arch/arm/plat-samsung/include/plat/nand-core.h b/arch/arm/plat-samsung/include/plat/nand-core.h new file mode 100644 index 00000000000..6de20789a95 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/nand-core.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* arch/arm/plat-samsung/include/plat/nand-core.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S3C - Nand 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_ARCH_NAND_CORE_H | ||
14 | #define __ASM_ARCH_NAND_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_nand_setname(char *name) | ||
22 | { | ||
23 | #ifdef CONFIG_S3C_DEV_NAND | ||
24 | s3c_device_nand.name = name; | ||
25 | #endif | ||
26 | } | ||
27 | |||
28 | #endif /* __ASM_ARCH_NAND_CORE_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 30844c263d0..85853f8c4c5 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -28,11 +28,17 @@ enum cd_types { | |||
28 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ | 28 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ |
29 | }; | 29 | }; |
30 | 30 | ||
31 | enum clk_types { | ||
32 | S3C_SDHCI_CLK_DIV_INTERNAL, /* use mmc internal clock divider */ | ||
33 | S3C_SDHCI_CLK_DIV_EXTERNAL, /* use external clock divider */ | ||
34 | }; | ||
35 | |||
31 | /** | 36 | /** |
32 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI | 37 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI |
33 | * @max_width: The maximum number of data bits supported. | 38 | * @max_width: The maximum number of data bits supported. |
34 | * @host_caps: Standard MMC host capabilities bit field. | 39 | * @host_caps: Standard MMC host capabilities bit field. |
35 | * @cd_type: Type of Card Detection method (see cd_types enum above) | 40 | * @cd_type: Type of Card Detection method (see cd_types enum above) |
41 | * @clk_type: Type of clock divider method (see clk_types enum above) | ||
36 | * @ext_cd_init: Initialize external card detect subsystem. Called on | 42 | * @ext_cd_init: Initialize external card detect subsystem. Called on |
37 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. | 43 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. |
38 | * notify_func argument is a callback to the sdhci-s3c driver | 44 | * notify_func argument is a callback to the sdhci-s3c driver |
@@ -59,6 +65,7 @@ struct s3c_sdhci_platdata { | |||
59 | unsigned int max_width; | 65 | unsigned int max_width; |
60 | unsigned int host_caps; | 66 | unsigned int host_caps; |
61 | enum cd_types cd_type; | 67 | enum cd_types cd_type; |
68 | enum clk_types clk_type; | ||
62 | 69 | ||
63 | char **clocks; /* set of clock sources */ | 70 | char **clocks; /* set of clock sources */ |
64 | 71 | ||
@@ -110,6 +117,10 @@ extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | |||
110 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 117 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
111 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 118 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
112 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 119 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
120 | extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
121 | extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
122 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | ||
123 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | ||
113 | 124 | ||
114 | /* S3C64XX SDHCI setup */ | 125 | /* S3C64XX SDHCI setup */ |
115 | 126 | ||
@@ -288,4 +299,57 @@ static inline void s5pv210_default_sdhci3(void) { } | |||
288 | 299 | ||
289 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ | 300 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ |
290 | 301 | ||
302 | /* S5PV310 SDHCI setup */ | ||
303 | #ifdef CONFIG_S5PV310_SETUP_SDHCI | ||
304 | extern char *s5pv310_hsmmc_clksrcs[4]; | ||
305 | |||
306 | extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev, | ||
307 | void __iomem *r, | ||
308 | struct mmc_ios *ios, | ||
309 | struct mmc_card *card); | ||
310 | |||
311 | static inline void s5pv310_default_sdhci0(void) | ||
312 | { | ||
313 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
314 | s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
315 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio; | ||
316 | s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
317 | #endif | ||
318 | } | ||
319 | |||
320 | static inline void s5pv310_default_sdhci1(void) | ||
321 | { | ||
322 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
323 | s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
324 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio; | ||
325 | s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
326 | #endif | ||
327 | } | ||
328 | |||
329 | static inline void s5pv310_default_sdhci2(void) | ||
330 | { | ||
331 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
332 | s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
333 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio; | ||
334 | s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
335 | #endif | ||
336 | } | ||
337 | |||
338 | static inline void s5pv310_default_sdhci3(void) | ||
339 | { | ||
340 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
341 | s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs; | ||
342 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio; | ||
343 | s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card; | ||
344 | #endif | ||
345 | } | ||
346 | |||
347 | #else | ||
348 | static inline void s5pv310_default_sdhci0(void) { } | ||
349 | static inline void s5pv310_default_sdhci1(void) { } | ||
350 | static inline void s5pv310_default_sdhci2(void) { } | ||
351 | static inline void s5pv310_default_sdhci3(void) { } | ||
352 | |||
353 | #endif /* CONFIG_S5PV310_SETUP_SDHCI */ | ||
354 | |||
291 | #endif /* __PLAT_S3C_SDHCI_H */ | 355 | #endif /* __PLAT_S3C_SDHCI_H */ |