Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221126
b: refs/heads/master
c: 1036c3a
h: refs/heads/master
v: v3
  • Loading branch information
Hyuk Lee authored and Kukjin Kim committed Oct 25, 2010
1 parent bda1c9f commit 40254ce
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 193151142b736f25882f250b6db3b02efd2d3cab
refs/heads/master: 1036c3ab6045ccf21b23427081c7b5d4149142dd
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-s5pv310/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -83,6 +84,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)
Expand Down
57 changes: 57 additions & 0 deletions trunk/arch/arm/plat-samsung/include/plat/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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 */

0 comments on commit 40254ce

Please sign in to comment.