|  | @@ -76,3 +76,170 @@ struct s3c_sdhci_platdata {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
 | 
	
		
			
				|  |  |   * @pd: The default platform data for this device.
 | 
	
		
			
				|  |  | + * @set: Pointer to the platform data to fill in.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
 | 
	
		
			
				|  |  | +				    struct s3c_sdhci_platdata *set);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device.
 | 
	
		
			
				|  |  | + * @pd: Platform data to register to device.
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * Register the given platform data for use withe S3C SDHCI device.
 | 
	
		
			
				|  |  | + * The call will copy the platform data, so the board definitions can
 | 
	
		
			
				|  |  | + * make the structure itself __initdata.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
 | 
	
		
			
				|  |  | +extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
 | 
	
		
			
				|  |  | +extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
 | 
	
		
			
				|  |  | +extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Default platform data, exported so that per-cpu initialisation can
 | 
	
		
			
				|  |  | + * set the correct one when there are more than one cpu type selected.
 | 
	
		
			
				|  |  | +*/
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
 | 
	
		
			
				|  |  | +extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
 | 
	
		
			
				|  |  | +extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
 | 
	
		
			
				|  |  | +extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* Helper function availability */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pc100_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pc100_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pv210_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void exynos4_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void exynos4_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void exynos4_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5p64x0_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5p64x0_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5p6440_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +extern void s5p6450_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* S3C2416 SDHCI setup */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C2416_SETUP_SDHCI
 | 
	
		
			
				|  |  | +static inline void s3c2416_default_sdhci0(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC
 | 
	
		
			
				|  |  | +	s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif /* CONFIG_S3C_DEV_HSMMC */
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c2416_default_sdhci1(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC1
 | 
	
		
			
				|  |  | +	s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif /* CONFIG_S3C_DEV_HSMMC1 */
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#else
 | 
	
		
			
				|  |  | +static inline void s3c2416_default_sdhci0(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c2416_default_sdhci1(void) { }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#endif /* CONFIG_S3C2416_SETUP_SDHCI */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* S3C64XX SDHCI setup */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C64XX_SETUP_SDHCI
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci0(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC
 | 
	
		
			
				|  |  | +	s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci1(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC1
 | 
	
		
			
				|  |  | +	s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci2(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC2
 | 
	
		
			
				|  |  | +	s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci0(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC
 | 
	
		
			
				|  |  | +	s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci1(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC1
 | 
	
		
			
				|  |  | +	s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci2(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC2
 | 
	
		
			
				|  |  | +	s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#else
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci0(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci1(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c6410_default_sdhci2(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci0(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci1(void) { }
 | 
	
		
			
				|  |  | +static inline void s3c6400_default_sdhci2(void) { }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#endif /* CONFIG_S3C64XX_SETUP_SDHCI */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* S5P64X0 SDHCI setup */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S5P64X0_SETUP_SDHCI
 | 
	
		
			
				|  |  | +static inline void s5p64x0_default_sdhci0(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC
 | 
	
		
			
				|  |  | +	s3c_hsmmc0_def_platdata.cfg_gpio = s5p64x0_setup_sdhci0_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s5p64x0_default_sdhci1(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC1
 | 
	
		
			
				|  |  | +	s3c_hsmmc1_def_platdata.cfg_gpio = s5p64x0_setup_sdhci1_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s5p6440_default_sdhci2(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC2
 | 
	
		
			
				|  |  | +	s3c_hsmmc2_def_platdata.cfg_gpio = s5p6440_setup_sdhci2_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static inline void s5p6450_default_sdhci2(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_S3C_DEV_HSMMC2
 | 
	
		
			
				|  |  | +	s3c_hsmmc2_def_platdata.cfg_gpio = s5p6450_setup_sdhci2_cfg_gpio;
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#else
 | 
	
		
			
				|  |  | +static inline void s5p64x0_default_sdhci0(void) { }
 | 
	
		
			
				|  |  | +static inline void s5p64x0_default_sdhci1(void) { }
 | 
	
		
			
				|  |  | +static inline void s5p6440_default_sdhci2(void) { }
 | 
	
		
			
				|  |  | +static inline void s5p6450_default_sdhci2(void) { }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#endif /* CONFIG_S5P64X0_SETUP_SDHCI */
 | 
	
		
			
				|  |  | +
 |