Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame] | 1 | /* linux/arch/arm/plat-samsung/include/plat/sdhci.h |
| 2 | * |
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 4 | * http://www.samsung.com |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 5 | * |
| 6 | * Copyright 2008 Openmoko, Inc. |
| 7 | * Copyright 2008 Simtec Electronics |
| 8 | * http://armlinux.simtec.co.uk/ |
| 9 | * Ben Dooks <ben@simtec.co.uk> |
| 10 | * |
| 11 | * S3C Platform - SDHCI (HSMMC) platform data definitions |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License version 2 as |
| 15 | * published by the Free Software Foundation. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __PLAT_S3C_SDHCI_H |
| 19 | #define __PLAT_S3C_SDHCI_H __FILE__ |
| 20 | |
Arnd Bergmann | cc014f3 | 2013-03-04 18:28:21 +0100 | [diff] [blame] | 21 | #include <linux/platform_data/mmc-sdhci-s3c.h> |
Thomas Abraham | 8482c81 | 2012-04-14 08:04:46 -0700 | [diff] [blame] | 22 | #include <plat/devs.h> |
| 23 | |
Banajit Goswami | 5e8e0a1 | 2011-08-18 20:32:01 +0900 | [diff] [blame] | 24 | /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data |
| 25 | * @pd: The default platform data for this device. |
| 26 | * @set: Pointer to the platform data to fill in. |
| 27 | */ |
| 28 | extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd, |
| 29 | struct s3c_sdhci_platdata *set); |
| 30 | |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 31 | /** |
| 32 | * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device. |
| 33 | * @pd: Platform data to register to device. |
| 34 | * |
| 35 | * Register the given platform data for use withe S3C SDHCI device. |
| 36 | * The call will copy the platform data, so the board definitions can |
| 37 | * make the structure itself __initdata. |
| 38 | */ |
| 39 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); |
Ben Dooks | a2205cd | 2008-10-31 16:14:39 +0000 | [diff] [blame] | 40 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 41 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); |
Hyuk Lee | b3c674b | 2010-06-10 15:22:16 +0900 | [diff] [blame] | 42 | extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd); |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 43 | |
| 44 | /* Default platform data, exported so that per-cpu initialisation can |
| 45 | * set the correct one when there are more than one cpu type selected. |
| 46 | */ |
| 47 | |
Ben Dooks | a2205cd | 2008-10-31 16:14:39 +0000 | [diff] [blame] | 48 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; |
| 49 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 50 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
Hyuk Lee | b3c674b | 2010-06-10 15:22:16 +0900 | [diff] [blame] | 51 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 52 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 53 | /* Helper function availability */ |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 54 | |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 55 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 56 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 57 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 58 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 59 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 60 | extern void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
| 61 | extern void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 62 | extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 63 | extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 64 | extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
| 65 | extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 66 | extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
Kukjin Kim | 3db3ae5 | 2011-02-14 16:22:36 +0900 | [diff] [blame] | 67 | extern void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 68 | extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
| 69 | extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
| 70 | extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
Rajeshwari Shinde | ebc433c | 2011-12-26 16:28:54 +0900 | [diff] [blame] | 71 | extern void s5p64x0_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
| 72 | extern void s5p64x0_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
| 73 | extern void s5p6440_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
| 74 | extern void s5p6450_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 75 | |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 76 | /* S3C2416 SDHCI setup */ |
| 77 | |
| 78 | #ifdef CONFIG_S3C2416_SETUP_SDHCI |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 79 | static inline void s3c2416_default_sdhci0(void) |
| 80 | { |
| 81 | #ifdef CONFIG_S3C_DEV_HSMMC |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 82 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 83 | #endif /* CONFIG_S3C_DEV_HSMMC */ |
| 84 | } |
| 85 | |
| 86 | static inline void s3c2416_default_sdhci1(void) |
| 87 | { |
| 88 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 89 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; |
Yauhen Kharuzhy | c29cfa6 | 2010-12-17 14:42:09 +0900 | [diff] [blame] | 90 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ |
| 91 | } |
| 92 | |
| 93 | #else |
| 94 | static inline void s3c2416_default_sdhci0(void) { } |
| 95 | static inline void s3c2416_default_sdhci1(void) { } |
| 96 | |
| 97 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ |
Rajeshwari Shinde | ebc433c | 2011-12-26 16:28:54 +0900 | [diff] [blame] | 98 | |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 99 | /* S3C64XX SDHCI setup */ |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 100 | |
Ben Dooks | 2f6c2ac | 2010-01-26 10:38:52 +0900 | [diff] [blame] | 101 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 102 | static inline void s3c6400_default_sdhci0(void) |
| 103 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 104 | #ifdef CONFIG_S3C_DEV_HSMMC |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 105 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 106 | #endif |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 107 | } |
| 108 | |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 109 | static inline void s3c6400_default_sdhci1(void) |
| 110 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 111 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 112 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 113 | #endif |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 114 | } |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 115 | |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 116 | static inline void s3c6400_default_sdhci2(void) |
| 117 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 118 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 119 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 120 | #endif |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 121 | } |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 122 | |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 123 | static inline void s3c6410_default_sdhci0(void) |
| 124 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 125 | #ifdef CONFIG_S3C_DEV_HSMMC |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 126 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 127 | #endif |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 128 | } |
Ben Dooks | a2205cd | 2008-10-31 16:14:39 +0000 | [diff] [blame] | 129 | |
| 130 | static inline void s3c6410_default_sdhci1(void) |
| 131 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 132 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
Ben Dooks | 4faf6867 | 2009-03-25 11:01:24 +0000 | [diff] [blame] | 133 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 134 | #endif |
Ben Dooks | a2205cd | 2008-10-31 16:14:39 +0000 | [diff] [blame] | 135 | } |
Ben Dooks | 713e9de | 2008-10-31 16:29:19 +0000 | [diff] [blame] | 136 | |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 137 | static inline void s3c6410_default_sdhci2(void) |
| 138 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 139 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 140 | s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 141 | #endif |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 142 | } |
Maurus Cuelenaere | 92b118f | 2009-11-23 13:34:46 +0100 | [diff] [blame] | 143 | |
Ben Dooks | 713e9de | 2008-10-31 16:29:19 +0000 | [diff] [blame] | 144 | #else |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 145 | static inline void s3c6410_default_sdhci0(void) { } |
Ben Dooks | a2205cd | 2008-10-31 16:14:39 +0000 | [diff] [blame] | 146 | static inline void s3c6410_default_sdhci1(void) { } |
Marek Szyprowski | 6b34f49 | 2010-06-22 15:45:26 +0900 | [diff] [blame] | 147 | static inline void s3c6410_default_sdhci2(void) { } |
Ben Dooks | 2f6c2ac | 2010-01-26 10:38:52 +0900 | [diff] [blame] | 148 | static inline void s3c6400_default_sdhci0(void) { } |
| 149 | static inline void s3c6400_default_sdhci1(void) { } |
Marek Szyprowski | 6b34f49 | 2010-06-22 15:45:26 +0900 | [diff] [blame] | 150 | static inline void s3c6400_default_sdhci2(void) { } |
Ben Dooks | 2f6c2ac | 2010-01-26 10:38:52 +0900 | [diff] [blame] | 151 | |
| 152 | #endif /* CONFIG_S3C64XX_SETUP_SDHCI */ |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 153 | |
Rajeshwari Shinde | ebc433c | 2011-12-26 16:28:54 +0900 | [diff] [blame] | 154 | /* S5P64X0 SDHCI setup */ |
| 155 | |
Paul Bolle | 2294450 | 2013-04-04 08:48:17 +0900 | [diff] [blame] | 156 | #ifdef CONFIG_S5P64X0_SETUP_SDHCI_GPIO |
Rajeshwari Shinde | ebc433c | 2011-12-26 16:28:54 +0900 | [diff] [blame] | 157 | static inline void s5p64x0_default_sdhci0(void) |
| 158 | { |
| 159 | #ifdef CONFIG_S3C_DEV_HSMMC |
| 160 | s3c_hsmmc0_def_platdata.cfg_gpio = s5p64x0_setup_sdhci0_cfg_gpio; |
| 161 | #endif |
| 162 | } |
| 163 | |
| 164 | static inline void s5p64x0_default_sdhci1(void) |
| 165 | { |
| 166 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
| 167 | s3c_hsmmc1_def_platdata.cfg_gpio = s5p64x0_setup_sdhci1_cfg_gpio; |
| 168 | #endif |
| 169 | } |
| 170 | |
| 171 | static inline void s5p6440_default_sdhci2(void) |
| 172 | { |
| 173 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
| 174 | s3c_hsmmc2_def_platdata.cfg_gpio = s5p6440_setup_sdhci2_cfg_gpio; |
| 175 | #endif |
| 176 | } |
| 177 | |
| 178 | static inline void s5p6450_default_sdhci2(void) |
| 179 | { |
| 180 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
| 181 | s3c_hsmmc2_def_platdata.cfg_gpio = s5p6450_setup_sdhci2_cfg_gpio; |
| 182 | #endif |
| 183 | } |
| 184 | |
| 185 | #else |
| 186 | static inline void s5p64x0_default_sdhci0(void) { } |
| 187 | static inline void s5p64x0_default_sdhci1(void) { } |
| 188 | static inline void s5p6440_default_sdhci2(void) { } |
| 189 | static inline void s5p6450_default_sdhci2(void) { } |
| 190 | |
Paul Bolle | 2294450 | 2013-04-04 08:48:17 +0900 | [diff] [blame] | 191 | #endif /* CONFIG_S5P64X0_SETUP_SDHCI_GPIO */ |
Rajeshwari Shinde | ebc433c | 2011-12-26 16:28:54 +0900 | [diff] [blame] | 192 | |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 193 | /* S5PC100 SDHCI setup */ |
| 194 | |
| 195 | #ifdef CONFIG_S5PC100_SETUP_SDHCI |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 196 | static inline void s5pc100_default_sdhci0(void) |
| 197 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 198 | #ifdef CONFIG_S3C_DEV_HSMMC |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 199 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 200 | #endif |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 201 | } |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 202 | |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 203 | static inline void s5pc100_default_sdhci1(void) |
| 204 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 205 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 206 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 207 | #endif |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 208 | } |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 209 | |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 210 | static inline void s5pc100_default_sdhci2(void) |
| 211 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 212 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 213 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 214 | #endif |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 215 | } |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 216 | |
| 217 | #else |
| 218 | static inline void s5pc100_default_sdhci0(void) { } |
| 219 | static inline void s5pc100_default_sdhci1(void) { } |
| 220 | static inline void s5pc100_default_sdhci2(void) { } |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 221 | |
Kyungmin Park | 86cd4f5 | 2009-11-17 08:41:23 +0100 | [diff] [blame] | 222 | #endif /* CONFIG_S5PC100_SETUP_SDHCI */ |
| 223 | |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 224 | /* S5PV210 SDHCI setup */ |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 225 | |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 226 | #ifdef CONFIG_S5PV210_SETUP_SDHCI |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 227 | static inline void s5pv210_default_sdhci0(void) |
| 228 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 229 | #ifdef CONFIG_S3C_DEV_HSMMC |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 230 | s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 231 | #endif |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 232 | } |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 233 | |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 234 | static inline void s5pv210_default_sdhci1(void) |
| 235 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 236 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 237 | s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 238 | #endif |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 239 | } |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 240 | |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 241 | static inline void s5pv210_default_sdhci2(void) |
| 242 | { |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 243 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 244 | s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio; |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 245 | #endif |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 246 | } |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 247 | |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 248 | static inline void s5pv210_default_sdhci3(void) |
| 249 | { |
Kukjin Kim | d61bd77 | 2010-08-06 21:49:18 +0900 | [diff] [blame] | 250 | #ifdef CONFIG_S3C_DEV_HSMMC3 |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 251 | s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio; |
Kukjin Kim | d61bd77 | 2010-08-06 21:49:18 +0900 | [diff] [blame] | 252 | #endif |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 253 | } |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 254 | |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 255 | #else |
| 256 | static inline void s5pv210_default_sdhci0(void) { } |
| 257 | static inline void s5pv210_default_sdhci1(void) { } |
| 258 | static inline void s5pv210_default_sdhci2(void) { } |
Hyuk Lee | 976a62f | 2010-06-14 10:18:56 +0900 | [diff] [blame] | 259 | static inline void s5pv210_default_sdhci3(void) { } |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 260 | |
Kukjin Kim | 88eb715 | 2010-07-29 22:18:45 +0900 | [diff] [blame] | 261 | #endif /* CONFIG_S5PV210_SETUP_SDHCI */ |
Marek Szyprowski | e6f66a9 | 2010-05-20 08:13:07 +0200 | [diff] [blame] | 262 | |
Thomas Abraham | 8482c81 | 2012-04-14 08:04:46 -0700 | [diff] [blame] | 263 | static inline void s3c_sdhci_setname(int id, char *name) |
| 264 | { |
| 265 | switch (id) { |
| 266 | #ifdef CONFIG_S3C_DEV_HSMMC |
| 267 | case 0: |
| 268 | s3c_device_hsmmc0.name = name; |
| 269 | break; |
| 270 | #endif |
| 271 | #ifdef CONFIG_S3C_DEV_HSMMC1 |
| 272 | case 1: |
| 273 | s3c_device_hsmmc1.name = name; |
| 274 | break; |
| 275 | #endif |
| 276 | #ifdef CONFIG_S3C_DEV_HSMMC2 |
| 277 | case 2: |
| 278 | s3c_device_hsmmc2.name = name; |
| 279 | break; |
| 280 | #endif |
| 281 | #ifdef CONFIG_S3C_DEV_HSMMC3 |
| 282 | case 3: |
| 283 | s3c_device_hsmmc3.name = name; |
| 284 | break; |
| 285 | #endif |
Sachin Kamat | 8d67ec8 | 2013-02-12 10:27:52 -0800 | [diff] [blame] | 286 | default: |
| 287 | break; |
Thomas Abraham | 8482c81 | 2012-04-14 08:04:46 -0700 | [diff] [blame] | 288 | } |
| 289 | } |
Ben Dooks | 5cc7fd8 | 2008-10-31 16:14:38 +0000 | [diff] [blame] | 290 | #endif /* __PLAT_S3C_SDHCI_H */ |