x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / arm / plat-samsung / include / plat / sdhci.h
blob2787553c3ae2656cda4ec74db512970ce945d296
1 /* linux/arch/arm/plat-samsung/include/plat/sdhci.h
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Copyright 2008 Openmoko, Inc.
7 * Copyright 2008 Simtec Electronics
8 * http://armlinux.simtec.co.uk/
9 * Ben Dooks <ben@simtec.co.uk>
11 * S3C Platform - SDHCI (HSMMC) platform data definitions
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.
18 #ifndef __PLAT_S3C_SDHCI_H
19 #define __PLAT_S3C_SDHCI_H __FILE__
21 #include <linux/platform_data/mmc-sdhci-s3c.h>
22 #include <plat/devs.h>
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.
28 extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
29 struct s3c_sdhci_platdata *set);
31 /**
32 * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device.
33 * @pd: Platform data to register to device.
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.
39 extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
40 extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
41 extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
42 extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd);
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.
48 extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
49 extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
50 extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
51 extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
53 /* Helper function availability */
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);
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);
59 extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
61 /* S3C2416 SDHCI setup */
63 #ifdef CONFIG_S3C2416_SETUP_SDHCI
64 static inline void s3c2416_default_sdhci0(void)
66 #ifdef CONFIG_S3C_DEV_HSMMC
67 s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio;
68 #endif /* CONFIG_S3C_DEV_HSMMC */
71 static inline void s3c2416_default_sdhci1(void)
73 #ifdef CONFIG_S3C_DEV_HSMMC1
74 s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio;
75 #endif /* CONFIG_S3C_DEV_HSMMC1 */
78 #else
79 static inline void s3c2416_default_sdhci0(void) { }
80 static inline void s3c2416_default_sdhci1(void) { }
82 #endif /* CONFIG_S3C2416_SETUP_SDHCI */
84 /* S3C64XX SDHCI setup */
86 #ifdef CONFIG_S3C64XX_SETUP_SDHCI
87 static inline void s3c6400_default_sdhci0(void)
89 #ifdef CONFIG_S3C_DEV_HSMMC
90 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
91 #endif
94 static inline void s3c6400_default_sdhci1(void)
96 #ifdef CONFIG_S3C_DEV_HSMMC1
97 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
98 #endif
101 static inline void s3c6400_default_sdhci2(void)
103 #ifdef CONFIG_S3C_DEV_HSMMC2
104 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
105 #endif
108 static inline void s3c6410_default_sdhci0(void)
110 #ifdef CONFIG_S3C_DEV_HSMMC
111 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
112 #endif
115 static inline void s3c6410_default_sdhci1(void)
117 #ifdef CONFIG_S3C_DEV_HSMMC1
118 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
119 #endif
122 static inline void s3c6410_default_sdhci2(void)
124 #ifdef CONFIG_S3C_DEV_HSMMC2
125 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
126 #endif
129 #else
130 static inline void s3c6410_default_sdhci0(void) { }
131 static inline void s3c6410_default_sdhci1(void) { }
132 static inline void s3c6410_default_sdhci2(void) { }
133 static inline void s3c6400_default_sdhci0(void) { }
134 static inline void s3c6400_default_sdhci1(void) { }
135 static inline void s3c6400_default_sdhci2(void) { }
137 #endif /* CONFIG_S3C64XX_SETUP_SDHCI */
139 static inline void s3c_sdhci_setname(int id, char *name)
141 switch (id) {
142 #ifdef CONFIG_S3C_DEV_HSMMC
143 case 0:
144 s3c_device_hsmmc0.name = name;
145 break;
146 #endif
147 #ifdef CONFIG_S3C_DEV_HSMMC1
148 case 1:
149 s3c_device_hsmmc1.name = name;
150 break;
151 #endif
152 #ifdef CONFIG_S3C_DEV_HSMMC2
153 case 2:
154 s3c_device_hsmmc2.name = name;
155 break;
156 #endif
157 #ifdef CONFIG_S3C_DEV_HSMMC3
158 case 3:
159 s3c_device_hsmmc3.name = name;
160 break;
161 #endif
162 default:
163 break;
166 #endif /* __PLAT_S3C_SDHCI_H */