~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-s3c/sdhci.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4  *              http://www.samsung.com
  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 
 14 #ifndef __PLAT_S3C_SDHCI_H
 15 #define __PLAT_S3C_SDHCI_H __FILE__
 16 
 17 #include <linux/platform_data/mmc-sdhci-s3c.h>
 18 #include "devs.h"
 19 
 20 /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
 21  * @pd: The default platform data for this device.
 22  * @set: Pointer to the platform data to fill in.
 23  */
 24 extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
 25                                     struct s3c_sdhci_platdata *set);
 26 
 27 /**
 28  * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device.
 29  * @pd: Platform data to register to device.
 30  *
 31  * Register the given platform data for use withe S3C SDHCI device.
 32  * The call will copy the platform data, so the board definitions can
 33  * make the structure itself __initdata.
 34  */
 35 extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
 36 extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
 37 extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
 38 extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd);
 39 
 40 /* Default platform data, exported so that per-cpu initialisation can
 41  * set the correct one when there are more than one cpu type selected.
 42 */
 43 
 44 extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
 45 extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
 46 extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
 47 extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
 48 
 49 /* Helper function availability */
 50 
 51 extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 52 extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 53 extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 54 
 55 /* S3C64XX SDHCI setup */
 56 
 57 #ifdef CONFIG_S3C64XX_SETUP_SDHCI
 58 static inline void s3c6400_default_sdhci0(void)
 59 {
 60 #ifdef CONFIG_S3C_DEV_HSMMC
 61         s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
 62 #endif
 63 }
 64 
 65 static inline void s3c6400_default_sdhci1(void)
 66 {
 67 #ifdef CONFIG_S3C_DEV_HSMMC1
 68         s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
 69 #endif
 70 }
 71 
 72 static inline void s3c6400_default_sdhci2(void)
 73 {
 74 #ifdef CONFIG_S3C_DEV_HSMMC2
 75         s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
 76 #endif
 77 }
 78 
 79 static inline void s3c6410_default_sdhci0(void)
 80 {
 81 #ifdef CONFIG_S3C_DEV_HSMMC
 82         s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
 83 #endif
 84 }
 85 
 86 static inline void s3c6410_default_sdhci1(void)
 87 {
 88 #ifdef CONFIG_S3C_DEV_HSMMC1
 89         s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
 90 #endif
 91 }
 92 
 93 static inline void s3c6410_default_sdhci2(void)
 94 {
 95 #ifdef CONFIG_S3C_DEV_HSMMC2
 96         s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
 97 #endif
 98 }
 99 
100 #else
101 static inline void s3c6410_default_sdhci0(void) { }
102 static inline void s3c6410_default_sdhci1(void) { }
103 static inline void s3c6410_default_sdhci2(void) { }
104 static inline void s3c6400_default_sdhci0(void) { }
105 static inline void s3c6400_default_sdhci1(void) { }
106 static inline void s3c6400_default_sdhci2(void) { }
107 
108 #endif /* CONFIG_S3C64XX_SETUP_SDHCI */
109 
110 static inline void s3c_sdhci_setname(int id, char *name)
111 {
112         switch (id) {
113 #ifdef CONFIG_S3C_DEV_HSMMC
114         case 0:
115                 s3c_device_hsmmc0.name = name;
116                 break;
117 #endif
118 #ifdef CONFIG_S3C_DEV_HSMMC1
119         case 1:
120                 s3c_device_hsmmc1.name = name;
121                 break;
122 #endif
123 #ifdef CONFIG_S3C_DEV_HSMMC2
124         case 2:
125                 s3c_device_hsmmc2.name = name;
126                 break;
127 #endif
128 #ifdef CONFIG_S3C_DEV_HSMMC3
129         case 3:
130                 s3c_device_hsmmc3.name = name;
131                 break;
132 #endif
133         default:
134                 break;
135         }
136 }
137 #endif /* __PLAT_S3C_SDHCI_H */
138 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php