[U-Boot] [PATCH 2/2 v3] FSL/eSDHC: enable the clock to detect the SD card

Huang Changming-R66093 r66093 at freescale.com
Mon May 21 04:34:36 CEST 2012



Best Regards
Jerry Huang


> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, May 18, 2012 11:55 PM
> To: Huang Changming-R66093
> Cc: u-boot at lists.denx.de; Marek Vasut; Andy Fleming
> Subject: Re: [U-Boot] [PATCH 2/2 v3] FSL/eSDHC: enable the clock to
> detect the SD card
> 
> On 05/18/2012 04:57 AM, Chang-Ming.Huang at freescale.com wrote:
> > From: Jerry Huang <Chang-Ming.Huang at freescale.com>
> >
> > For FSL low-end processors (VVN2.2), in order to detect the SD card,
> > we should enable PEREN, HCKEN and IPGEN to enable the clock.
> > Otherwise, after booting the u-boot, and then inserting the SD card,
> > the SD card can't be detected.
> > For SDHC VVN2.3 IP, these bits are reserved, and SDCLKEN is used.
> > And when accessing to these reserved bit, no any impact happened.
> 
> Again, have you talked to a hardware designer and confirmed that there's
> no impact from setting these bits on chips where they're reserved?  Just
> because you don't notice any obvious impact doesn't mean it's totally
> safe.
> 
Do you read the FSL SDHC driver? If not, please read it first.
Without my this patch, FSL SDHC driver has done it as I mentioned. 
The committer provided the patch to support VVN2.3 should talk to the hardware designer,
And he think it is safe. Otherwise he should detect the VVN to do the different thing.
The below is the code driver enable these bit:
In function set_sysctl:
clk = SYSCTL_PEREN | SYSCTL_CKEN; 
in function esdhc_init:
esdhc_write32(&regs->sysctl, SYSCTL_HCKEN | SYSCTL_IPGEN);

My work is just to pick up the codes from the driver and do it again in function fsl_esdhc_initialize:
esdhc_setbits32(&regs->sysctl, SYSCTL_PEREN | SYSCTL_HCKEN
                                | SYSCTL_IPGEN | SYSCTL_CKEN);



More information about the U-Boot mailing list