diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-01-25 20:38:52 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-25 20:38:52 -0500 |
commit | 2f6c2ac1d945ffc2e343103bdcfccbdb2e2de805 (patch) | |
tree | 738e1ead7db6798944179f8eac2c963ff5f72ab6 /arch/arm/plat-samsung/include/plat/sdhci.h | |
parent | 97ce9d6938d58e7846dc0365c720c13ebe64547e (diff) |
ARM: S3C64XX: Squash SDHCI setup into one file
Squash the SDHCI setup for both the S3C6400 and S3C6410 into one file and
make the S3C6410 case use the S3C6400 code.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/include/plat/sdhci.h')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 53198673b6bd..7d07cd7aa4f2 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -78,8 +78,8 @@ extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | |||
78 | 78 | ||
79 | /* S3C6400 SDHCI setup */ | 79 | /* S3C6400 SDHCI setup */ |
80 | 80 | ||
81 | #ifdef CONFIG_S3C6400_SETUP_SDHCI | 81 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
82 | extern char *s3c6400_hsmmc_clksrcs[4]; | 82 | extern char *s3c64xx_hsmmc_clksrcs[4]; |
83 | 83 | ||
84 | #ifdef CONFIG_S3C_DEV_HSMMC | 84 | #ifdef CONFIG_S3C_DEV_HSMMC |
85 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | 85 | extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, |
@@ -89,7 +89,7 @@ extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, | |||
89 | 89 | ||
90 | static inline void s3c6400_default_sdhci0(void) | 90 | static inline void s3c6400_default_sdhci0(void) |
91 | { | 91 | { |
92 | s3c_hsmmc0_def_platdata.clocks = s3c6400_hsmmc_clksrcs; | 92 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
93 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 93 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
94 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 94 | s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
95 | } | 95 | } |
@@ -101,7 +101,7 @@ static inline void s3c6400_default_sdhci0(void) { } | |||
101 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 101 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
102 | static inline void s3c6400_default_sdhci1(void) | 102 | static inline void s3c6400_default_sdhci1(void) |
103 | { | 103 | { |
104 | s3c_hsmmc1_def_platdata.clocks = s3c6400_hsmmc_clksrcs; | 104 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
105 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 105 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
106 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 106 | s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
107 | } | 107 | } |
@@ -112,7 +112,7 @@ static inline void s3c6400_default_sdhci1(void) { } | |||
112 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 112 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
113 | static inline void s3c6400_default_sdhci2(void) | 113 | static inline void s3c6400_default_sdhci2(void) |
114 | { | 114 | { |
115 | s3c_hsmmc2_def_platdata.clocks = s3c6400_hsmmc_clksrcs; | 115 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
116 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 116 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
117 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; | 117 | s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card; |
118 | } | 118 | } |
@@ -120,27 +120,19 @@ static inline void s3c6400_default_sdhci2(void) | |||
120 | static inline void s3c6400_default_sdhci2(void) { } | 120 | static inline void s3c6400_default_sdhci2(void) { } |
121 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ | 121 | #endif /* CONFIG_S3C_DEV_HSMMC2 */ |
122 | 122 | ||
123 | #else | ||
124 | static inline void s3c6400_default_sdhci0(void) { } | ||
125 | static inline void s3c6400_default_sdhci1(void) { } | ||
126 | #endif /* CONFIG_S3C6400_SETUP_SDHCI */ | ||
127 | |||
128 | /* S3C6410 SDHCI setup */ | 123 | /* S3C6410 SDHCI setup */ |
129 | 124 | ||
130 | #ifdef CONFIG_S3C6410_SETUP_SDHCI | 125 | extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev, |
131 | extern char *s3c6410_hsmmc_clksrcs[4]; | 126 | void __iomem *r, |
132 | 127 | struct mmc_ios *ios, | |
133 | extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, | 128 | struct mmc_card *card); |
134 | void __iomem *r, | ||
135 | struct mmc_ios *ios, | ||
136 | struct mmc_card *card); | ||
137 | 129 | ||
138 | #ifdef CONFIG_S3C_DEV_HSMMC | 130 | #ifdef CONFIG_S3C_DEV_HSMMC |
139 | static inline void s3c6410_default_sdhci0(void) | 131 | static inline void s3c6410_default_sdhci0(void) |
140 | { | 132 | { |
141 | s3c_hsmmc0_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | 133 | s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
142 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; | 134 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
143 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | 135 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
144 | } | 136 | } |
145 | #else | 137 | #else |
146 | static inline void s3c6410_default_sdhci0(void) { } | 138 | static inline void s3c6410_default_sdhci0(void) { } |
@@ -149,9 +141,9 @@ static inline void s3c6410_default_sdhci0(void) { } | |||
149 | #ifdef CONFIG_S3C_DEV_HSMMC1 | 141 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
150 | static inline void s3c6410_default_sdhci1(void) | 142 | static inline void s3c6410_default_sdhci1(void) |
151 | { | 143 | { |
152 | s3c_hsmmc1_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | 144 | s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
153 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; | 145 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
154 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | 146 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
155 | } | 147 | } |
156 | #else | 148 | #else |
157 | static inline void s3c6410_default_sdhci1(void) { } | 149 | static inline void s3c6410_default_sdhci1(void) { } |
@@ -160,9 +152,9 @@ static inline void s3c6410_default_sdhci1(void) { } | |||
160 | #ifdef CONFIG_S3C_DEV_HSMMC2 | 152 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
161 | static inline void s3c6410_default_sdhci2(void) | 153 | static inline void s3c6410_default_sdhci2(void) |
162 | { | 154 | { |
163 | s3c_hsmmc2_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | 155 | s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs; |
164 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; | 156 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
165 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | 157 | s3c_hsmmc2_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card; |
166 | } | 158 | } |
167 | #else | 159 | #else |
168 | static inline void s3c6410_default_sdhci2(void) { } | 160 | static inline void s3c6410_default_sdhci2(void) { } |
@@ -171,7 +163,10 @@ static inline void s3c6410_default_sdhci2(void) { } | |||
171 | #else | 163 | #else |
172 | static inline void s3c6410_default_sdhci0(void) { } | 164 | static inline void s3c6410_default_sdhci0(void) { } |
173 | static inline void s3c6410_default_sdhci1(void) { } | 165 | static inline void s3c6410_default_sdhci1(void) { } |
174 | #endif /* CONFIG_S3C6410_SETUP_SDHCI */ | 166 | static inline void s3c6400_default_sdhci0(void) { } |
167 | static inline void s3c6400_default_sdhci1(void) { } | ||
168 | |||
169 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ | ||
175 | 170 | ||
176 | /* S5PC100 SDHCI setup */ | 171 | /* S5PC100 SDHCI setup */ |
177 | 172 | ||