Re: [PATCH V2 2/3] ARM: S5PV310: Add HSMMC platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 6, 2010 at 3:00 PM, Jeongbae Seo <jeongbae.seo@xxxxxxxxxxx> wrote:
> From: Hyuk Lee <hyuk1.lee@xxxxxxxxxxx>
>
> This patch adds initialization HSMMC device information.
> And HSMMC platform data like card detect, data bus width
> and capability is configured.
>
> Signed-off-by: Hyuk Lee <hyuk1.lee@xxxxxxxxxxx>
> Signed-off-by: Jeongbae Seo <jeongbae.seo@xxxxxxxxxxx>
> ---
> Changes since v1:
> - Separated to board specific and common changes
> Â(This is for common part)
>
> Âarch/arm/mach-s5pv310/cpu.c        Â|  Â7 +++
> Âarch/arm/plat-samsung/include/plat/sdhci.h | Â 57 ++++++++++++++++++++++++++++
> Â2 files changed, 64 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index 225ca53..3345cf6 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -19,6 +19,7 @@
> Â#include <plat/cpu.h>
> Â#include <plat/clock.h>
> Â#include <plat/s5pv310.h>
> +#include <plat/sdhci.h>
>
> Â#include <mach/regs-irq.h>
>
> @@ -88,6 +89,12 @@ static void s5pv310_idle(void)
> Âvoid __init s5pv310_map_io(void)
> Â{
> Â Â Â Âiotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
> +
> + Â Â Â /* initialize device information early */
> + Â Â Â s5pv310_default_sdhci0();
> + Â Â Â s5pv310_default_sdhci1();
> + Â Â Â s5pv310_default_sdhci2();
> + Â Â Â s5pv310_default_sdhci3();
> Â}
>
> Âvoid __init s5pv310_init_clocks(int xtal)
> diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
> index 30844c2..d92670a 100644
> --- a/arch/arm/plat-samsung/include/plat/sdhci.h
> +++ b/arch/arm/plat-samsung/include/plat/sdhci.h
> @@ -110,6 +110,10 @@ 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 s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
> +extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
>
> Â/* S3C64XX SDHCI setup */
>
> @@ -288,4 +292,57 @@ static inline void s5pv210_default_sdhci3(void) { }
>
> Â#endif /* CONFIG_S5PV210_SETUP_SDHCI */
>
> +/* S5PV310 SDHCI setup */
> +#ifdef CONFIG_S5PV310_SETUP_SDHCI
> +extern char *s5pv310_hsmmc_clksrcs[4];
> +
> +extern void s5pv310_setup_sdhci_cfg_card(struct platform_device *dev,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âvoid __iomem *r,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âstruct mmc_ios *ios,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âstruct mmc_card *card);
> +
> +static inline void s5pv310_default_sdhci0(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC
> + Â Â Â s3c_hsmmc0_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + Â Â Â s3c_hsmmc0_def_platdata.cfg_gpio = s5pv310_setup_sdhci0_cfg_gpio;
> + Â Â Â s3c_hsmmc0_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci1(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC1
> + Â Â Â s3c_hsmmc1_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + Â Â Â s3c_hsmmc1_def_platdata.cfg_gpio = s5pv310_setup_sdhci1_cfg_gpio;
> + Â Â Â s3c_hsmmc1_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci2(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC2
> + Â Â Â s3c_hsmmc2_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + Â Â Â s3c_hsmmc2_def_platdata.cfg_gpio = s5pv310_setup_sdhci2_cfg_gpio;
> + Â Â Â s3c_hsmmc2_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +static inline void s5pv310_default_sdhci3(void)
> +{
> +#ifdef CONFIG_S3C_DEV_HSMMC3
> + Â Â Â s3c_hsmmc3_def_platdata.clocks = s5pv310_hsmmc_clksrcs;
> + Â Â Â s3c_hsmmc3_def_platdata.cfg_gpio = s5pv310_setup_sdhci3_cfg_gpio;
> + Â Â Â s3c_hsmmc3_def_platdata.cfg_card = s5pv310_setup_sdhci_cfg_card;
> +#endif
> +}
> +
> +#else
> +static inline void s5pv310_default_sdhci0(void) { }
> +static inline void s5pv310_default_sdhci1(void) { }
> +static inline void s5pv310_default_sdhci2(void) { }
> +static inline void s5pv310_default_sdhci3(void) { }
> +
> +#endif /* CONFIG_S5PV310_SETUP_SDHCI */
> +
> Â#endif /* __PLAT_S3C_SDHCI_H */

Why don't we have s5pv310_default_sdhci(int cont_num) ?
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux