Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Lu, -snip- > > > > > > > > Sorry for the late testing. > > > > Tested, it works on ColdFire mcf54415. But please add if possible the _IMX > > (CONFIG_FSL_ESDHC_IMX) for the sysam/stmark2 board too. > > [Y.b. Lu] Thanks a lot for your testing. > In default, CONFIG_FSL_ESDHC wasn't enabled. We can send another patch to > enable CONFIG_FSL_ESDHC_IMX for ColdFire mcf54415 after this patch-set was > applied. > Sorry, realized CONFIG_FSL_ESDHC was enabled only here locally. Don't worry about, sent a patch for it, in case i'll refix it later on to CONFIG_FSL_ESDHC_IMX. > > > > > > Tested-by: Angelo Dureghello > > > > > > > > Regards, > > > > Angelo Dureghello > > > > Thanks, > > Regards > > Angelo Dureghello Thanks, Regards, Angelo Dureghello ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
On 5/31/19 8:12 AM, Y.b. Lu wrote: > Hi Angelo, > >> -Original Message- >> From: Angelo Dureghello <...> >> Sent: 2019年5月31日 2:23 >> To: Y.b. Lu >> Cc: ; Stefano Babic <...>; Fabio Estevam <...> [...] Can you please fix your mailer and stop quoting everyone's email in the body of your reply ? It only feeds the spambots and has no value. In fact, this whole "-- Original Message --" stuff quoting the headers is useless, quote only the message body. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Angelo, > -Original Message- > From: Angelo Dureghello > Sent: 2019年6月23日 5:43 > To: Y.b. Lu > Cc: u-boot@lists.denx.de > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > Hi Lu, > > On Mon, Jun 03, 2019 at 04:28:24AM +, Y.b. Lu wrote: > > Hi, > > > > > -Original Message- > > > From: Angelo Dureghello > > > Sent: 2019年5月31日 15:15 > > > To: Y.b. Lu > > > Cc: u-boot@lists.denx.de > > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > > > Hi Lu, > > > > > > On Fri, May 31, 2019 at 06:12:12AM +, Y.b. Lu wrote: > > > > Hi Angelo, > > > > > > > > > -Original Message- > > > > > From: Angelo Dureghello > > > > > Sent: 2019年5月31日 2:23 > > > > > To: Y.b. Lu > > > > > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio > > > > > Estevam ; dl-uboot-imx > ; > > > > > Albert Aribaud ; Eddy Petrișor > > > > > ; Akshay Bhat ; > > > Ken > > > > > Lin ; Heiko Schocher ; > > > > > Christian Gmeiner ; Stefan Roese > > > > > ; Patrick Bruenn ; Troy Kisky > > > > > ; Uri Mashiach > > > > > ; Nikita Kiryanov > > > > > ; Otavio Salvador > > > > > ; Andreas Geisreiter > > > > > ; Ludwig Zenz > > > > > ; Eric Bénard ; Peng > > > > > Fan ; Jason Liu ; Ye Li > > > > > ; Adrian Alonso ; Alison > > > > > Wang ; thar...@gateworks.com; Ian Ray > > > > > ; Marcin Niestroj ; > > > > > Andrej Rosano ; Marek Vasut > > > ; > > > > > Lukasz Majewski ; Adam Ford > ; > > > > > Olaf Mandel ; Martyn Welch > > > > > ; Ingo Schroeck > > > ; > > > > > Boris Brezillon ; Soeren > > > > > Moch ; Richard Hu ; > > > > > Vanessa Maegima ; Max Krummenacher > > > > > ; Stefan Agner > > > > > ; Markus Niebel > > > > > ; Breno Matheus Lima > > > > > ; Francesco Montefoschi > > > > > ; Parthiban Nallathambi > > > > > ; Albert ARIBAUD ; > > > > > Jagan Teki ; Raffaele RECALCATI > > > > > ; Simone CIANNI > > > > > ; Bhaskar Upadhaya > > > > > ; Vinitha V Pillai > > > > > ; Prabhakar Kushwaha > > > > > ; Rajesh Bhagat > > > ; > > > > > Antti Mäentausta ; Sébastien Szymanski > > > > > ; Lucile Quirion > > > > > ; Alexey Brodkin > > > > > ; Trevor Woerner ; > > > > > Anatolij Gustschin ; Denis Zalevskiy > > > > > ; Fabien Lahoudere > > > > > ; Joe Hershberger > > > > > ; Simon Goldschmidt > > > > > ; James Byrne > > > > > > > > > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > > > > > > > Hi Lu, > > > > > > > > > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > > > > > Dropped useless code for i.MX eSDHC driver. > > > > > > > > > > > > Signed-off-by: Yangbo Lu > > > > > > --- > > > > > > Changes for v2: > > > > > > - Added this patch. > > > > > > Changes for v3: > > > > > > - None. > > > > > > --- > > > > > > drivers/mmc/fsl_esdhc_imx.c | 96 > > > > > > ++--- > > > > > > include/fsl_esdhc_imx.h | 4 -- > > > > > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > > > > > > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c > > > > > > b/drivers/mmc/fsl_esdhc_imx.c index faf133390f..1c02e0eef1 > > > > > > 100644 > > > > > > --- a/drivers/mmc/fsl_esdhc_imx.c > > > > > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > > > > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct > > > > > > fsl_esdhc_priv *priv, struct mmc *mmc, { > > > > > > int timeout; > > > > > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > > +defined(CONFIG_IMX8M) > > > > > > dma_addr_t addr; > > > > > > #endif > > > > > > uint wml_value; > > > > > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct > > > > > > fsl_esdhc_priv *priv, struct mmc *mmc, > > > > > > > > > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, > > > wml_value); > > > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > > +defined(CONFIG_IMX8M) > > > > > > addr = virt_to_phys((void *)(data->dest)); > > > > > > if (upper_32_bits(addr)) > > > > > > printf("Error found for upper 32 bits\n"); @@ > > > > > > -310,8 > > > +308,7 > > > > > @@ > > > > > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, > > > > > > struct mmc > > > *mmc, > > > > > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > > > > > wml_value << 16); > > > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > > +defined(CONFIG_IMX8M) > > > > > >
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Lu, On Mon, Jun 03, 2019 at 04:28:24AM +, Y.b. Lu wrote: > Hi, > > > -Original Message- > > From: Angelo Dureghello > > Sent: 2019年5月31日 15:15 > > To: Y.b. Lu > > Cc: u-boot@lists.denx.de > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > Hi Lu, > > > > On Fri, May 31, 2019 at 06:12:12AM +, Y.b. Lu wrote: > > > Hi Angelo, > > > > > > > -Original Message- > > > > From: Angelo Dureghello > > > > Sent: 2019年5月31日 2:23 > > > > To: Y.b. Lu > > > > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio > > > > Estevam ; dl-uboot-imx ; > > > > Albert Aribaud ; Eddy Petrișor > > > > ; Akshay Bhat ; > > Ken > > > > Lin ; Heiko Schocher ; > > > > Christian Gmeiner ; Stefan Roese > > > > ; Patrick Bruenn ; Troy Kisky > > > > ; Uri Mashiach > > > > ; Nikita Kiryanov > > > > ; Otavio Salvador ; > > > > Andreas Geisreiter ; Ludwig Zenz > > > > ; Eric Bénard ; Peng Fan > > > > ; Jason Liu ; Ye Li > > > > ; Adrian Alonso ; Alison Wang > > > > ; thar...@gateworks.com; Ian Ray > > > > ; Marcin Niestroj ; > > > > Andrej Rosano ; Marek Vasut > > ; > > > > Lukasz Majewski ; Adam Ford ; > > > > Olaf Mandel ; Martyn Welch > > > > ; Ingo Schroeck > > ; > > > > Boris Brezillon ; Soeren Moch > > > > ; Richard Hu ; Vanessa > > > > Maegima ; Max Krummenacher > > > > ; Stefan Agner > > > > ; Markus Niebel > > > > ; Breno Matheus Lima > > > > ; Francesco Montefoschi > > > > ; Parthiban Nallathambi > > > > ; Albert ARIBAUD ; > > > > Jagan Teki ; Raffaele RECALCATI > > > > ; Simone CIANNI > > > > ; Bhaskar Upadhaya > > > > ; Vinitha V Pillai > > > > ; Prabhakar Kushwaha > > > > ; Rajesh Bhagat > > ; > > > > Antti Mäentausta ; Sébastien Szymanski > > > > ; Lucile Quirion > > > > ; Alexey Brodkin > > > > ; Trevor Woerner ; > > > > Anatolij Gustschin ; Denis Zalevskiy > > > > ; Fabien Lahoudere > > > > ; Joe Hershberger > > > > ; Simon Goldschmidt > > > > ; James Byrne > > > > > > > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > > > > > Hi Lu, > > > > > > > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > > > > Dropped useless code for i.MX eSDHC driver. > > > > > > > > > > Signed-off-by: Yangbo Lu > > > > > --- > > > > > Changes for v2: > > > > > - Added this patch. > > > > > Changes for v3: > > > > > - None. > > > > > --- > > > > > drivers/mmc/fsl_esdhc_imx.c | 96 > > > > > ++--- > > > > > include/fsl_esdhc_imx.h | 4 -- > > > > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > > > > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c > > > > > b/drivers/mmc/fsl_esdhc_imx.c index faf133390f..1c02e0eef1 100644 > > > > > --- a/drivers/mmc/fsl_esdhc_imx.c > > > > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > > > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct > > > > > fsl_esdhc_priv *priv, struct mmc *mmc, { > > > > > int timeout; > > > > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > +defined(CONFIG_IMX8M) > > > > > dma_addr_t addr; > > > > > #endif > > > > > uint wml_value; > > > > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct > > > > > fsl_esdhc_priv *priv, struct mmc *mmc, > > > > > > > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, > > wml_value); > > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > +defined(CONFIG_IMX8M) > > > > > addr = virt_to_phys((void *)(data->dest)); > > > > > if (upper_32_bits(addr)) > > > > > printf("Error found for upper 32 bits\n"); @@ > > > > > -310,8 > > +308,7 > > > > @@ > > > > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc > > *mmc, > > > > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > > > > wml_value << 16); > > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > > +defined(CONFIG_IMX8M) > > > > > addr = virt_to_phys((void *)(data->src)); > > > > > if (upper_32_bits(addr)) > > > > > printf("Error found for upper 32 bits\n"); @@ > > > > > -376,8 > > +373,7 > > > > @@ > > > > > static void check_and_invalidate_dcache_range > > > > > unsigned end = 0; > > > > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > > > > data->blocks*data->blocksize); -#if > > > > >
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi, > -Original Message- > From: Angelo Dureghello > Sent: 2019年5月31日 15:15 > To: Y.b. Lu > Cc: u-boot@lists.denx.de > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > Hi Lu, > > On Fri, May 31, 2019 at 06:12:12AM +, Y.b. Lu wrote: > > Hi Angelo, > > > > > -Original Message- > > > From: Angelo Dureghello > > > Sent: 2019年5月31日 2:23 > > > To: Y.b. Lu > > > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio > > > Estevam ; dl-uboot-imx ; > > > Albert Aribaud ; Eddy Petrișor > > > ; Akshay Bhat ; > Ken > > > Lin ; Heiko Schocher ; > > > Christian Gmeiner ; Stefan Roese > > > ; Patrick Bruenn ; Troy Kisky > > > ; Uri Mashiach > > > ; Nikita Kiryanov > > > ; Otavio Salvador ; > > > Andreas Geisreiter ; Ludwig Zenz > > > ; Eric Bénard ; Peng Fan > > > ; Jason Liu ; Ye Li > > > ; Adrian Alonso ; Alison Wang > > > ; thar...@gateworks.com; Ian Ray > > > ; Marcin Niestroj ; > > > Andrej Rosano ; Marek Vasut > ; > > > Lukasz Majewski ; Adam Ford ; > > > Olaf Mandel ; Martyn Welch > > > ; Ingo Schroeck > ; > > > Boris Brezillon ; Soeren Moch > > > ; Richard Hu ; Vanessa > > > Maegima ; Max Krummenacher > > > ; Stefan Agner > > > ; Markus Niebel > > > ; Breno Matheus Lima > > > ; Francesco Montefoschi > > > ; Parthiban Nallathambi > > > ; Albert ARIBAUD ; > > > Jagan Teki ; Raffaele RECALCATI > > > ; Simone CIANNI > > > ; Bhaskar Upadhaya > > > ; Vinitha V Pillai > > > ; Prabhakar Kushwaha > > > ; Rajesh Bhagat > ; > > > Antti Mäentausta ; Sébastien Szymanski > > > ; Lucile Quirion > > > ; Alexey Brodkin > > > ; Trevor Woerner ; > > > Anatolij Gustschin ; Denis Zalevskiy > > > ; Fabien Lahoudere > > > ; Joe Hershberger > > > ; Simon Goldschmidt > > > ; James Byrne > > > > > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > > > Hi Lu, > > > > > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > > > Dropped useless code for i.MX eSDHC driver. > > > > > > > > Signed-off-by: Yangbo Lu > > > > --- > > > > Changes for v2: > > > > - Added this patch. > > > > Changes for v3: > > > > - None. > > > > --- > > > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > > > include/fsl_esdhc_imx.h | 4 -- > > > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c > > > > b/drivers/mmc/fsl_esdhc_imx.c index faf133390f..1c02e0eef1 100644 > > > > --- a/drivers/mmc/fsl_esdhc_imx.c > > > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct > > > > fsl_esdhc_priv *priv, struct mmc *mmc, { > > > > int timeout; > > > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > +defined(CONFIG_IMX8M) > > > > dma_addr_t addr; > > > > #endif > > > > uint wml_value; > > > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct > > > > fsl_esdhc_priv *priv, struct mmc *mmc, > > > > > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, > wml_value); > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > +defined(CONFIG_IMX8M) > > > > addr = virt_to_phys((void *)(data->dest)); > > > > if (upper_32_bits(addr)) > > > > printf("Error found for upper 32 bits\n"); @@ > > > > -310,8 > +308,7 > > > @@ > > > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc > *mmc, > > > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > > > wml_value << 16); > > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > +defined(CONFIG_IMX8M) > > > > addr = virt_to_phys((void *)(data->src)); > > > > if (upper_32_bits(addr)) > > > > printf("Error found for upper 32 bits\n"); @@ > > > > -376,8 > +373,7 > > > @@ > > > > static void check_and_invalidate_dcache_range > > > > unsigned end = 0; > > > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > > > data->blocks*data->blocksize); -#if > > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > > +defined(CONFIG_IMX8M) > > > > dma_addr_t addr; > > > > > > > > addr = virt_to_phys((void *)(data->dest));
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Angelo, > -Original Message- > From: Angelo Dureghello > Sent: 2019年5月31日 2:23 > To: Y.b. Lu > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio Estevam > ; dl-uboot-imx ; Albert Aribaud > ; Eddy Petrișor ; > Akshay Bhat ; Ken Lin > ; Heiko Schocher ; Christian > Gmeiner ; Stefan Roese ; Patrick > Bruenn ; Troy Kisky > ; Uri Mashiach > ; Nikita Kiryanov ; > Otavio Salvador ; Andreas Geisreiter > ; Ludwig Zenz ; Eric > Bénard ; Peng Fan ; Jason Liu > ; Ye Li ; Adrian Alonso > ; Alison Wang ; > thar...@gateworks.com; Ian Ray ; Marcin Niestroj > ; Andrej Rosano ; > Marek Vasut ; Lukasz Majewski ; Adam > Ford ; Olaf Mandel ; > Martyn Welch ; Ingo Schroeck > ; Boris Brezillon > ; Soeren Moch ; > Richard Hu ; Vanessa Maegima > ; Max Krummenacher > ; Stefan Agner > ; Markus Niebel ; > Breno Matheus Lima ; Francesco Montefoschi > ; Parthiban Nallathambi > ; Albert ARIBAUD ; Jagan > Teki ; Raffaele RECALCATI > ; Simone CIANNI ; > Bhaskar Upadhaya ; Vinitha V Pillai > ; Prabhakar Kushwaha > ; Rajesh Bhagat ; > Antti Mäentausta ; Sébastien Szymanski > ; Lucile Quirion > ; Alexey Brodkin > ; Trevor Woerner ; > Anatolij Gustschin ; Denis Zalevskiy > ; Fabien Lahoudere > ; Joe Hershberger > ; Simon Goldschmidt > ; James Byrne > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > Hi Lu, > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > Dropped useless code for i.MX eSDHC driver. > > > > Signed-off-by: Yangbo Lu > > --- > > Changes for v2: > > - Added this patch. > > Changes for v3: > > - None. > > --- > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > include/fsl_esdhc_imx.h | 4 -- > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > > index faf133390f..1c02e0eef1 100644 > > --- a/drivers/mmc/fsl_esdhc_imx.c > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, { > > int timeout; > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > dma_addr_t addr; > > #endif > > uint wml_value; > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, wml_value); > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > addr = virt_to_phys((void *)(data->dest)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -310,8 > > +308,7 > @@ > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > wml_value << 16); > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > addr = virt_to_phys((void *)(data->src)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -376,8 > > +373,7 > @@ > > static void check_and_invalidate_dcache_range > > unsigned end = 0; > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > data->blocks*data->blocksize); > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > dma_addr_t addr; > > > > addr = virt_to_phys((void *)(data->dest)); @@ -392,25 +388,6 @@ > > static void check_and_invalidate_dcache_range > > invalidate_dcache_range(start, end); } > > > > -#ifdef CONFIG_MCF5441x > > -/* > > - * Swaps 32-bit words to little-endian byte order. > > - */ > > -static inline void sd_swap_dma_buff(struct mmc_data *data) -{ > > - int i, size = data->blocksize >> 2; > > - u32 *buffer = (u32 *)data->dest; > > - u32 sw; > > - > > - while (data->blocks--) { > > - for (i = 0; i < size; i++) { > > - sw = __sw32(*buffer); > > - *buffer++ = sw; > > - } > > - } > > -} > > -#endif > > - > > Doing so you remove the ColdFire family code (mcf5441x) i just added recently. > Since they are big-endian, and dma hw has no options to swap, swap is > needed. > > Please don't remove it. [Y.b. Lu] I didn’t remove mcf5441x support. The code
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi, > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > Hi Lu, > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > Dropped useless code for i.MX eSDHC driver. > > > > Signed-off-by: Yangbo Lu > > --- > > Changes for v2: > > - Added this patch. > > Changes for v3: > > - None. > > --- > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > include/fsl_esdhc_imx.h | 4 -- > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > > index faf133390f..1c02e0eef1 100644 > > --- a/drivers/mmc/fsl_esdhc_imx.c > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, { > > int timeout; > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > dma_addr_t addr; > > #endif > > uint wml_value; > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, > wml_value); > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > addr = virt_to_phys((void *)(data->dest)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -310,8 > > +308,7 > @@ > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > wml_value << 16); > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > addr = virt_to_phys((void *)(data->src)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -376,8 > > +373,7 > @@ > > static void check_and_invalidate_dcache_range > > unsigned end = 0; > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > data->blocks*data->blocksize); > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > +defined(CONFIG_IMX8M) > > dma_addr_t addr; > > > > addr = virt_to_phys((void *)(data->dest)); @@ -392,25 +388,6 @@ > > static void check_and_invalidate_dcache_range > > invalidate_dcache_range(start, end); } > > > > -#ifdef CONFIG_MCF5441x > > -/* > > - * Swaps 32-bit words to little-endian byte order. > > - */ > > -static inline void sd_swap_dma_buff(struct mmc_data *data) -{ > > - int i, size = data->blocksize >> 2; > > - u32 *buffer = (u32 *)data->dest; > > - u32 sw; > > - > > - while (data->blocks--) { > > - for (i = 0; i < size; i++) { > > - sw = __sw32(*buffer); > > - *buffer++ = sw; > > - } > > - } > > -} > > -#endif > > - > > Doing so you remove the ColdFire family code (mcf5441x) i just added recently. > Since they are big-endian, and dma hw has no options to swap, swap is > needed. > > Please don't remove it. The mcf code is still in fsl_esdhc.c, this patch is to modify fsl_esdhc_imx.c. Regards, Peng. > > > /* > > * Sends a command out on the bus. Takes the mmc pointer, > > * a command pointer, and an optional data pointer. > > @@ -575,9 +552,6 @@ static int esdhc_send_cmd_common(struct > fsl_esdhc_priv *priv, struct mmc *mmc, > > */ > > if (data->flags & MMC_DATA_READ) { > > check_and_invalidate_dcache_range(cmd, data); -#ifdef > > CONFIG_MCF5441x > > - sd_swap_dma_buff(data); > > Same here. > > > -#endif > > } > > #endif > > } > > @@ -1073,12 +1047,8 @@ static int esdhc_init_common(struct > fsl_esdhc_priv *priv, struct mmc *mmc) > > /* Disable the BRR and BWR bits in IRQSTAT */ > > esdhc_clrbits32(>irqstaten, IRQSTATEN_BRR | IRQSTATEN_BWR); > > > > -#ifdef CONFIG_MCF5441x > > - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); > > -#else > > /* Put the PROCTL reg back to the default */ > > esdhc_write32(>proctl, PROCTL_INIT); -#endif > > > > /* Set timout to the maximum value */ > > esdhc_clrsetbits32(>sysctl, SYSCTL_TIMEOUT_MASK, 14 << 16); > @@ > > -1186,11 +1156,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, > > if (ret) > >
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Lu, On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > Dropped useless code for i.MX eSDHC driver. > > Signed-off-by: Yangbo Lu > --- > Changes for v2: > - Added this patch. > Changes for v3: > - None. > --- > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > include/fsl_esdhc_imx.h | 4 -- > 2 files changed, 4 insertions(+), 96 deletions(-) > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > index faf133390f..1c02e0eef1 100644 > --- a/drivers/mmc/fsl_esdhc_imx.c > +++ b/drivers/mmc/fsl_esdhc_imx.c > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, > struct mmc *mmc, > { > int timeout; > struct fsl_esdhc *regs = priv->esdhc_regs; > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > dma_addr_t addr; > #endif > uint wml_value; > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, > struct mmc *mmc, > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, wml_value); > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > addr = virt_to_phys((void *)(data->dest)); > if (upper_32_bits(addr)) > printf("Error found for upper 32 bits\n"); > @@ -310,8 +308,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, > struct mmc *mmc, > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > wml_value << 16); > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > addr = virt_to_phys((void *)(data->src)); > if (upper_32_bits(addr)) > printf("Error found for upper 32 bits\n"); > @@ -376,8 +373,7 @@ static void check_and_invalidate_dcache_range > unsigned end = 0; > unsigned size = roundup(ARCH_DMA_MINALIGN, > data->blocks*data->blocksize); > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > dma_addr_t addr; > > addr = virt_to_phys((void *)(data->dest)); > @@ -392,25 +388,6 @@ static void check_and_invalidate_dcache_range > invalidate_dcache_range(start, end); > } > > -#ifdef CONFIG_MCF5441x > -/* > - * Swaps 32-bit words to little-endian byte order. > - */ > -static inline void sd_swap_dma_buff(struct mmc_data *data) > -{ > - int i, size = data->blocksize >> 2; > - u32 *buffer = (u32 *)data->dest; > - u32 sw; > - > - while (data->blocks--) { > - for (i = 0; i < size; i++) { > - sw = __sw32(*buffer); > - *buffer++ = sw; > - } > - } > -} > -#endif > - Doing so you remove the ColdFire family code (mcf5441x) i just added recently. Since they are big-endian, and dma hw has no options to swap, swap is needed. Please don't remove it. > /* > * Sends a command out on the bus. Takes the mmc pointer, > * a command pointer, and an optional data pointer. > @@ -575,9 +552,6 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv > *priv, struct mmc *mmc, >*/ > if (data->flags & MMC_DATA_READ) { > check_and_invalidate_dcache_range(cmd, data); > -#ifdef CONFIG_MCF5441x > - sd_swap_dma_buff(data); Same here. > -#endif > } > #endif > } > @@ -1073,12 +1047,8 @@ static int esdhc_init_common(struct fsl_esdhc_priv > *priv, struct mmc *mmc) > /* Disable the BRR and BWR bits in IRQSTAT */ > esdhc_clrbits32(>irqstaten, IRQSTATEN_BRR | IRQSTATEN_BWR); > > -#ifdef CONFIG_MCF5441x > - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); > -#else > /* Put the PROCTL reg back to the default */ > esdhc_write32(>proctl, PROCTL_INIT); > -#endif > > /* Set timout to the maximum value */ > esdhc_clrsetbits32(>sysctl, SYSCTL_TIMEOUT_MASK, 14 << 16); > @@ -1186,11 +1156,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, > if (ret) > return ret; > > -#ifdef CONFIG_MCF5441x > - /* ColdFire, using SDHC_DATA[3] for card detection */ > - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); > -#endif > - > #ifndef CONFIG_FSL_USDHC > esdhc_setbits32(>sysctl, SYSCTL_PEREN | SYSCTL_HCKEN > | SYSCTL_IPGEN |
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Hi Lu, On Fri, May 31, 2019 at 06:12:12AM +, Y.b. Lu wrote: > Hi Angelo, > > > -Original Message- > > From: Angelo Dureghello > > Sent: 2019年5月31日 2:23 > > To: Y.b. Lu > > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio Estevam > > ; dl-uboot-imx ; Albert Aribaud > > ; Eddy Petrișor ; > > Akshay Bhat ; Ken Lin > > ; Heiko Schocher ; Christian > > Gmeiner ; Stefan Roese ; Patrick > > Bruenn ; Troy Kisky > > ; Uri Mashiach > > ; Nikita Kiryanov ; > > Otavio Salvador ; Andreas Geisreiter > > ; Ludwig Zenz ; Eric > > Bénard ; Peng Fan ; Jason Liu > > ; Ye Li ; Adrian Alonso > > ; Alison Wang ; > > thar...@gateworks.com; Ian Ray ; Marcin Niestroj > > ; Andrej Rosano ; > > Marek Vasut ; Lukasz Majewski ; Adam > > Ford ; Olaf Mandel ; > > Martyn Welch ; Ingo Schroeck > > ; Boris Brezillon > > ; Soeren Moch ; > > Richard Hu ; Vanessa Maegima > > ; Max Krummenacher > > ; Stefan Agner > > ; Markus Niebel ; > > Breno Matheus Lima ; Francesco Montefoschi > > ; Parthiban Nallathambi > > ; Albert ARIBAUD ; Jagan > > Teki ; Raffaele RECALCATI > > ; Simone CIANNI ; > > Bhaskar Upadhaya ; Vinitha V Pillai > > ; Prabhakar Kushwaha > > ; Rajesh Bhagat ; > > Antti Mäentausta ; Sébastien Szymanski > > ; Lucile Quirion > > ; Alexey Brodkin > > ; Trevor Woerner ; > > Anatolij Gustschin ; Denis Zalevskiy > > ; Fabien Lahoudere > > ; Joe Hershberger > > ; Simon Goldschmidt > > ; James Byrne > > > > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > Hi Lu, > > > > On Tue, May 21, 2019 at 08:53:04AM +, Y.b. Lu wrote: > > > Dropped useless code for i.MX eSDHC driver. > > > > > > Signed-off-by: Yangbo Lu > > > --- > > > Changes for v2: > > > - Added this patch. > > > Changes for v3: > > > - None. > > > --- > > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > > include/fsl_esdhc_imx.h | 4 -- > > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > > > index faf133390f..1c02e0eef1 100644 > > > --- a/drivers/mmc/fsl_esdhc_imx.c > > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > > *priv, struct mmc *mmc, { > > > int timeout; > > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > +defined(CONFIG_IMX8M) > > > dma_addr_t addr; > > > #endif > > > uint wml_value; > > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > > *priv, struct mmc *mmc, > > > > > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, wml_value); > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > +defined(CONFIG_IMX8M) > > > addr = virt_to_phys((void *)(data->dest)); > > > if (upper_32_bits(addr)) > > > printf("Error found for upper 32 bits\n"); @@ -310,8 > > > +308,7 > > @@ > > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, > > > esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, > > > wml_value << 16); > > > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > +defined(CONFIG_IMX8M) > > > addr = virt_to_phys((void *)(data->src)); > > > if (upper_32_bits(addr)) > > > printf("Error found for upper 32 bits\n"); @@ -376,8 > > > +373,7 > > @@ > > > static void check_and_invalidate_dcache_range > > > unsigned end = 0; > > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > > data->blocks*data->blocksize); > > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > > +defined(CONFIG_IMX8M) > > > dma_addr_t addr; > > > > > > addr = virt_to_phys((void *)(data->dest)); @@ -392,25 +388,6 @@ > > > static void check_and_invalidate_dcache_range > > > invalidate_dcache_range(start, end); } > > > > > > -#ifdef CONFIG_MCF5441x > > > -/* > > > - * Swaps 32-bit words to little-endian byte order. > > > - */ > > > -static inline void sd_swap_dma_buff(struct mmc_data *data) -{ > > > - int i, size = data->blocksize >> 2; > > > - u32 *buffer = (u32 *)data->dest; > > > - u32 sw; > > > - > > > - while (data->blocks--) { > > > - for (i = 0; i < size; i++) { > > > - sw = __sw32(*buffer); > > > - *buffer++ = sw; > > > - } > > > - } >
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
> -Original Message- > From: Lukasz Majewski > Sent: 2019年5月29日 14:43 > To: Y.b. Lu > Cc: u-boot@lists.denx.de; Stefano Babic ; Fabio Estevam > ; dl-uboot-imx ; Albert Aribaud > ; Eddy Petrișor ; > Akshay Bhat ; Ken Lin > ; Heiko Schocher ; Christian > Gmeiner ; Stefan Roese ; Patrick > Bruenn ; Troy Kisky > ; Uri Mashiach > ; Nikita Kiryanov ; > Otavio Salvador ; Andreas Geisreiter > ; Ludwig Zenz ; Eric > Bénard ; Peng Fan ; Jason Liu > ; Ye Li ; Adrian Alonso > ; Alison Wang ; > thar...@gateworks.com; Ian Ray ; Marcin Niestroj > ; Andrej Rosano ; > Marek Vasut ; Adam Ford ; Olaf > Mandel ; Martyn Welch > ; Ingo Schroeck ; > Boris Brezillon ; Soeren Moch > ; Richard Hu ; Vanessa > Maegima ; Max Krummenacher > ; Stefan Agner > ; Markus Niebel ; > Breno Matheus Lima ; Francesco Montefoschi > ; Parthiban Nallathambi > ; Albert ARIBAUD ; Jagan > Teki ; Raffaele RECALCATI > ; Simone CIANNI ; > Bhaskar Upadhaya ; Vinitha V Pillai > ; Prabhakar Kushwaha > ; Rajesh Bhagat ; > Antti Mäentausta ; Sébastien Szymanski > ; Lucile Quirion > ; Alexey Brodkin > ; Trevor Woerner ; > Anatolij Gustschin ; Denis Zalevskiy > ; Fabien Lahoudere > ; Joe Hershberger > ; Simon Goldschmidt > ; James Byrne > ; Angelo Dureghello > Subject: Re: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > On Tue, 21 May 2019 08:53:04 + > "Y.b. Lu" wrote: > > > Dropped useless code for i.MX eSDHC driver. > > > > Signed-off-by: Yangbo Lu > > --- > > Changes for v2: > > - Added this patch. > > Changes for v3: > > - None. > > --- > > drivers/mmc/fsl_esdhc_imx.c | 96 > > ++--- include/fsl_esdhc_imx.h | > > 4 -- 2 files changed, 4 insertions(+), 96 deletions(-) > > > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > > index faf133390f..1c02e0eef1 100644 > > --- a/drivers/mmc/fsl_esdhc_imx.c > > +++ b/drivers/mmc/fsl_esdhc_imx.c > > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, { > > int timeout; > > struct fsl_esdhc *regs = priv->esdhc_regs; -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > defined(CONFIG_IMX8M) dma_addr_t addr; #endif > > uint wml_value; > > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > > *priv, struct mmc *mmc, > > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, wml_value); > #ifndef > > CONFIG_SYS_FSL_ESDHC_USE_PIO -#if defined(CONFIG_FSL_LAYERSCAPE) || > > defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->dest)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -310,8 > > +308,7 > @@ > > static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc > > *mmc, esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, wml_value > << > > 16); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if > > defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->src)); > > if (upper_32_bits(addr)) > > printf("Error found for upper 32 bits\n"); @@ -376,8 > > +373,7 > @@ > > static void check_and_invalidate_dcache_range > > unsigned end = 0; > > unsigned size = roundup(ARCH_DMA_MINALIGN, > > data->blocks*data->blocksize); > > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > > defined(CONFIG_IMX8M) dma_addr_t addr; > > > > addr = virt_to_phys((void *)(data->dest)); @@ -392,25 +388,6 @@ > > static void check_and_invalidate_dcache_range > > invalidate_dcache_range(start, end); } > > > > -#ifdef CONFIG_MCF5441x > > -/* > > - * Swaps 32-bit words to little-endian byte order. > > - */ > > -static inline void sd_swap_dma_buff(struct mmc_data *data) -{ > > - int i, size = data->blocksize >> 2; > > - u32 *buffer = (u32 *)data->dest; > > - u32 sw; > > - > > - while (data->blocks--) { > > - for (i = 0; i < size; i++) { > > - sw = __sw32(*buffer); > > - *buffer++ = sw; > > - } > > - } > > -} > > -#endif > > - > > /* > > * Sends a command out on the bus. Takes the mmc pointer, > > * a command pointer, and an optional data pointer. > > @@ -575,9 +552,6 @@ static int esdhc_send_cmd_common(struct > > fsl_esdhc_priv *priv, struct mmc *mmc, */ > > if (data->flags & MMC_DATA_READ) { > > check_and_invalidate_dcache_range(cmd, data); -#ifdef > >
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
On Tue, 21 May 2019 08:53:04 + "Y.b. Lu" wrote: > Dropped useless code for i.MX eSDHC driver. > > Signed-off-by: Yangbo Lu > --- > Changes for v2: > - Added this patch. > Changes for v3: > - None. > --- > drivers/mmc/fsl_esdhc_imx.c | 96 > ++--- include/fsl_esdhc_imx.h | > 4 -- 2 files changed, 4 insertions(+), 96 deletions(-) > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > index faf133390f..1c02e0eef1 100644 > --- a/drivers/mmc/fsl_esdhc_imx.c > +++ b/drivers/mmc/fsl_esdhc_imx.c > @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > *priv, struct mmc *mmc, { > int timeout; > struct fsl_esdhc *regs = priv->esdhc_regs; > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > defined(CONFIG_IMX8M) dma_addr_t addr; > #endif > uint wml_value; > @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > *priv, struct mmc *mmc, > esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, > wml_value); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->dest)); > if (upper_32_bits(addr)) > printf("Error found for upper 32 bits\n"); > @@ -310,8 +308,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv > *priv, struct mmc *mmc, esdhc_clrsetbits32(>wml, > WML_WR_WML_MASK, wml_value << 16); > #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->src)); > if (upper_32_bits(addr)) > printf("Error found for upper 32 bits\n"); > @@ -376,8 +373,7 @@ static void check_and_invalidate_dcache_range > unsigned end = 0; > unsigned size = roundup(ARCH_DMA_MINALIGN, > data->blocks*data->blocksize); > -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ > - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) > +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || > defined(CONFIG_IMX8M) dma_addr_t addr; > > addr = virt_to_phys((void *)(data->dest)); > @@ -392,25 +388,6 @@ static void check_and_invalidate_dcache_range > invalidate_dcache_range(start, end); > } > > -#ifdef CONFIG_MCF5441x > -/* > - * Swaps 32-bit words to little-endian byte order. > - */ > -static inline void sd_swap_dma_buff(struct mmc_data *data) > -{ > - int i, size = data->blocksize >> 2; > - u32 *buffer = (u32 *)data->dest; > - u32 sw; > - > - while (data->blocks--) { > - for (i = 0; i < size; i++) { > - sw = __sw32(*buffer); > - *buffer++ = sw; > - } > - } > -} > -#endif > - > /* > * Sends a command out on the bus. Takes the mmc pointer, > * a command pointer, and an optional data pointer. > @@ -575,9 +552,6 @@ static int esdhc_send_cmd_common(struct > fsl_esdhc_priv *priv, struct mmc *mmc, */ > if (data->flags & MMC_DATA_READ) { > check_and_invalidate_dcache_range(cmd, data); > -#ifdef CONFIG_MCF5441x > - sd_swap_dma_buff(data); > -#endif > } > #endif > } > @@ -1073,12 +1047,8 @@ static int esdhc_init_common(struct > fsl_esdhc_priv *priv, struct mmc *mmc) /* Disable the BRR and BWR > bits in IRQSTAT */ esdhc_clrbits32(>irqstaten, IRQSTATEN_BRR | > IRQSTATEN_BWR); > -#ifdef CONFIG_MCF5441x > - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); > -#else > /* Put the PROCTL reg back to the default */ > esdhc_write32(>proctl, PROCTL_INIT); > -#endif > > /* Set timout to the maximum value */ > esdhc_clrsetbits32(>sysctl, SYSCTL_TIMEOUT_MASK, 14 << > 16); @@ -1186,11 +1156,6 @@ static int fsl_esdhc_init(struct > fsl_esdhc_priv *priv, if (ret) > return ret; > > -#ifdef CONFIG_MCF5441x > - /* ColdFire, using SDHC_DATA[3] for card detection */ > - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); > -#endif > - > #ifndef CONFIG_FSL_USDHC > esdhc_setbits32(>sysctl, SYSCTL_PEREN | SYSCTL_HCKEN > | SYSCTL_IPGEN | SYSCTL_CKEN); > @@ -1215,15 +1180,6 @@ static int fsl_esdhc_init(struct > fsl_esdhc_priv *priv, voltage_caps = 0; > caps = esdhc_read32(>hostcapblt); > > -#ifdef CONFIG_MCF5441x > - /* > - * MCF5441x RM declares in more points that sdhc clock speed > must > - * never exceed 25 Mhz. From this, the HS bit needs to be > disabled > - *
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
> -Original Message- > From: Peng Fan > Sent: 2019年5月29日 9:53 > To: Y.b. Lu ; u-boot@lists.denx.de > Cc: Stefano Babic ; Fabio Estevam ; > dl-uboot-imx ; Albert Aribaud > ; Eddy Petrișor ; > Akshay Bhat ; Ken Lin > ; Heiko Schocher ; Christian > Gmeiner ; Stefan Roese ; Patrick > Bruenn ; Troy Kisky > ; Uri Mashiach > ; Nikita Kiryanov ; > Otavio Salvador ; Andreas Geisreiter > ; Ludwig Zenz ; Eric > Bénard ; Jason Liu ; Ye Li > ; Adrian Alonso ; Alison Wang > ; thar...@gateworks.com; Ian Ray > ; Marcin Niestroj ; Andrej > Rosano ; Marek Vasut ; Lukasz > Majewski ; Adam Ford ; Olaf > Mandel ; Martyn Welch > ; Ingo Schroeck ; > Boris Brezillon ; Soeren Moch > ; Richard Hu ; Vanessa > Maegima ; Max Krummenacher > ; Stefan Agner > ; Markus Niebel ; > Breno Matheus Lima ; Francesco Montefoschi > ; Parthiban Nallathambi > ; Albert ARIBAUD ; Jagan > Teki ; Raffaele RECALCATI > ; Simone CIANNI ; > Bhaskar Upadhaya ; Vinitha V Pillai > ; Prabhakar Kushwaha > ; Rajesh Bhagat ; > Antti Mäentausta ; Sébastien Szymanski > ; Lucile Quirion > ; Alexey Brodkin > ; Trevor Woerner ; > Anatolij Gustschin ; Denis Zalevskiy > ; Fabien Lahoudere > ; Joe Hershberger > ; Simon Goldschmidt > ; James Byrne > ; Angelo Dureghello > Subject: RE: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > Subject: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > Dropped useless code for i.MX eSDHC driver. > > > > Signed-off-by: Yangbo Lu > > --- > > Changes for v2: > > - Added this patch. > > Changes for v3: > > - None. > > --- > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > include/fsl_esdhc_imx.h | 4 -- > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > [.] > > > - { .compatible = "fsl,esdhc", }, > > Please keep this, the following 2 dts using this compatible. > ./arch/arm/dts/vf.dtsi > ./arch/arm/dts/imx53-ppd.dts > > With this addressed, you could have my > `Reviewed-by: Peng Fan ` [Y.b. Lu] Ok, thanks Peng. May I know which u-boot subtree and branch should I use to rebase these patches? Thanks! > > > { /* sentinel */ } > > }; > > > > diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h index > > e05b24e7e8..8abd28ea50 100644 > > --- a/include/fsl_esdhc_imx.h > > +++ b/include/fsl_esdhc_imx.h > > @@ -17,10 +17,6 @@ > > /* needed for the mmc_cfg definition */ #include > > > > -#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT -#include > > "../board/freescale/common/qixis.h" > > -#endif > > - > > /* FSL eSDHC-specific constants */ > > #define SYSCTL 0x0002e02c > > #define SYSCTL_INITA 0x0800 > > -- > > 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
> > > > > Subject: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > > > > > Dropped useless code for i.MX eSDHC driver. > > > > > > Signed-off-by: Yangbo Lu > > > --- > > > Changes for v2: > > > - Added this patch. > > > Changes for v3: > > > - None. > > > --- > > > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > > > include/fsl_esdhc_imx.h | 4 -- > > > 2 files changed, 4 insertions(+), 96 deletions(-) > > > > > > > [.] > > > > > - { .compatible = "fsl,esdhc", }, > > > > Please keep this, the following 2 dts using this compatible. > > ./arch/arm/dts/vf.dtsi > > ./arch/arm/dts/imx53-ppd.dts > > > > With this addressed, you could have my > > `Reviewed-by: Peng Fan ` > > [Y.b. Lu] Ok, thanks Peng. > May I know which u-boot subtree and branch should I use to rebase these > patches? I do not see Stefano update his tree, so use Tom's tree should be fine. Regards, Peng. > Thanks! > > > > > > { /* sentinel */ } > > > }; > > > > > > diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h index > > > e05b24e7e8..8abd28ea50 100644 > > > --- a/include/fsl_esdhc_imx.h > > > +++ b/include/fsl_esdhc_imx.h > > > @@ -17,10 +17,6 @@ > > > /* needed for the mmc_cfg definition */ #include > > > > > > -#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT -#include > > > "../board/freescale/common/qixis.h" > > > -#endif > > > - > > > /* FSL eSDHC-specific constants */ > > > #define SYSCTL 0x0002e02c > > > #define SYSCTL_INITA 0x0800 > > > -- > > > 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
> Subject: [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code > > Dropped useless code for i.MX eSDHC driver. > > Signed-off-by: Yangbo Lu > --- > Changes for v2: > - Added this patch. > Changes for v3: > - None. > --- > drivers/mmc/fsl_esdhc_imx.c | 96 ++--- > include/fsl_esdhc_imx.h | 4 -- > 2 files changed, 4 insertions(+), 96 deletions(-) > [.] > - { .compatible = "fsl,esdhc", }, Please keep this, the following 2 dts using this compatible. ./arch/arm/dts/vf.dtsi ./arch/arm/dts/imx53-ppd.dts With this addressed, you could have my `Reviewed-by: Peng Fan ` > { /* sentinel */ } > }; > > diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h index > e05b24e7e8..8abd28ea50 100644 > --- a/include/fsl_esdhc_imx.h > +++ b/include/fsl_esdhc_imx.h > @@ -17,10 +17,6 @@ > /* needed for the mmc_cfg definition */ #include > > -#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT > -#include "../board/freescale/common/qixis.h" > -#endif > - > /* FSL eSDHC-specific constants */ > #define SYSCTL 0x0002e02c > #define SYSCTL_INITA 0x0800 > -- > 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [v3, 5/5] mmc: fsl_esdhc_imx: drop useless code
Dropped useless code for i.MX eSDHC driver. Signed-off-by: Yangbo Lu --- Changes for v2: - Added this patch. Changes for v3: - None. --- drivers/mmc/fsl_esdhc_imx.c | 96 ++--- include/fsl_esdhc_imx.h | 4 -- 2 files changed, 4 insertions(+), 96 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index faf133390f..1c02e0eef1 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -259,8 +259,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, { int timeout; struct fsl_esdhc *regs = priv->esdhc_regs; -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) dma_addr_t addr; #endif uint wml_value; @@ -273,8 +272,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, esdhc_clrsetbits32(>wml, WML_RD_WML_MASK, wml_value); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->dest)); if (upper_32_bits(addr)) printf("Error found for upper 32 bits\n"); @@ -310,8 +308,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, esdhc_clrsetbits32(>wml, WML_WR_WML_MASK, wml_value << 16); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) addr = virt_to_phys((void *)(data->src)); if (upper_32_bits(addr)) printf("Error found for upper 32 bits\n"); @@ -376,8 +373,7 @@ static void check_and_invalidate_dcache_range unsigned end = 0; unsigned size = roundup(ARCH_DMA_MINALIGN, data->blocks*data->blocksize); -#if defined(CONFIG_FSL_LAYERSCAPE) || defined(CONFIG_S32V234) || \ - defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) dma_addr_t addr; addr = virt_to_phys((void *)(data->dest)); @@ -392,25 +388,6 @@ static void check_and_invalidate_dcache_range invalidate_dcache_range(start, end); } -#ifdef CONFIG_MCF5441x -/* - * Swaps 32-bit words to little-endian byte order. - */ -static inline void sd_swap_dma_buff(struct mmc_data *data) -{ - int i, size = data->blocksize >> 2; - u32 *buffer = (u32 *)data->dest; - u32 sw; - - while (data->blocks--) { - for (i = 0; i < size; i++) { - sw = __sw32(*buffer); - *buffer++ = sw; - } - } -} -#endif - /* * Sends a command out on the bus. Takes the mmc pointer, * a command pointer, and an optional data pointer. @@ -575,9 +552,6 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv *priv, struct mmc *mmc, */ if (data->flags & MMC_DATA_READ) { check_and_invalidate_dcache_range(cmd, data); -#ifdef CONFIG_MCF5441x - sd_swap_dma_buff(data); -#endif } #endif } @@ -1073,12 +1047,8 @@ static int esdhc_init_common(struct fsl_esdhc_priv *priv, struct mmc *mmc) /* Disable the BRR and BWR bits in IRQSTAT */ esdhc_clrbits32(>irqstaten, IRQSTATEN_BRR | IRQSTATEN_BWR); -#ifdef CONFIG_MCF5441x - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); -#else /* Put the PROCTL reg back to the default */ esdhc_write32(>proctl, PROCTL_INIT); -#endif /* Set timout to the maximum value */ esdhc_clrsetbits32(>sysctl, SYSCTL_TIMEOUT_MASK, 14 << 16); @@ -1186,11 +1156,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, if (ret) return ret; -#ifdef CONFIG_MCF5441x - /* ColdFire, using SDHC_DATA[3] for card detection */ - esdhc_write32(>proctl, PROCTL_INIT | PROCTL_D3CD); -#endif - #ifndef CONFIG_FSL_USDHC esdhc_setbits32(>sysctl, SYSCTL_PEREN | SYSCTL_HCKEN | SYSCTL_IPGEN | SYSCTL_CKEN); @@ -1215,15 +1180,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, voltage_caps = 0; caps = esdhc_read32(>hostcapblt); -#ifdef CONFIG_MCF5441x - /* -* MCF5441x RM declares in more points that sdhc clock speed must -* never exceed 25 Mhz. From this, the HS bit needs to be disabled -* from host capabilities. -*/ - caps &=