Thanks Jerry Huang
> -----Original Message----- > From: Stefano Babic [mailto:[email protected]] > Sent: Wednesday, March 28, 2012 1:17 AM > To: Dirk Behme > Cc: Huang Changming-R66093; [email protected]; Andy Fleming > Subject: Re: [U-Boot] [PATCH 1/2] FSL/eSDHC: enable the peripheral clock > to detect the card > > On 27/03/2012 13:01, Dirk Behme wrote: > > On 27.03.2012 12:25, [email protected] wrote: > >> From: Jerry Huang <[email protected]> > >> > >> According to the card detection of p1/p2 paltform RM, > > > > typo => platform > > > >> we should set SYSCTL[PEREN] to enable the clock. > >> Otherwise, after booting the u-boot, and then inserting the SD card, > >> the SD card can't be detected. > >> > >> Signed-off-by: Jerry Huang <[email protected]> > >> CC: Andy Fleming <[email protected]> > >> --- > >> drivers/mmc/fsl_esdhc.c | 2 ++ > >> 1 files changed, 2 insertions(+), 0 deletions(-) > >> > >> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index > >> a2f35e3..1682a79 100644 > >> --- a/drivers/mmc/fsl_esdhc.c > >> +++ b/drivers/mmc/fsl_esdhc.c > >> @@ -491,6 +491,8 @@ int fsl_esdhc_initialize(bd_t *bis, struct > >> fsl_esdhc_cfg *cfg) > >> /* First reset the eSDHC controller */ > >> esdhc_reset(regs); > >> > >> + esdhc_write32(®s->sysctl, SYSCTL_PEREN); > > > > If I read the iMX6 manual correctly, the SYSCTL_PEREN isn't > > implemented there. > > In the copy I could put my hands, SYSCTL_PEREN is implemented for i.MX6. > However, I do not know if this has an influence. ESDHC should be clocked > with SDCLKEN, that is enabled by default on i.MX (both MX5 and MX6). > > > So this should be a NOP for iMX6? > > However, if it is not implemented and it is marked as reserved, we should > not set it. > I.MX6/5 reuse the fsl_esdhc.c driver, and he don't care these reserved field. Otherwise he should change this driver. E.g: In function esdhc_init: esdhc_write32(®s->sysctl, SYSCTL_HCKEN | SYSCTL_IPGEN); in function set_sysctl: clk = SYSCTL_PEREN | SYSCTL_CKEN; esdhc_setbits32(®s->sysctl, clk); so I think my code has no any problem. _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

