public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] fsl_esdhc: Remove cache snooping for i.MX
Date: Mon, 13 Aug 2012 16:39:28 +0200 (CEST)	[thread overview]
Message-ID: <1193048219.2362030.1344868768606.JavaMail.root@advansee.com> (raw)
In-Reply-To: <50290E01.2060200@denx.de>

Hi Stefano,

On 08/13/2012 16:24, Stefano Babic wrote:
> On 13/08/2012 16:18, Beno?t Th?baudeau wrote:
> > The cache snooping feature of Freescale's eSDHC IP is not available
> > on i.MX, so
> > disable it globally for this architecture. This avoids setting
> > no_snoop for all
> > i.MX boards, and it prevents setting a reserved bit of a reserved
> > register if
> > fsl_esdhc_mmc_init() were used for an i.MX board.
> > 
> > Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> > Cc: Andy Fleming <afleming@gmail.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Kim Phillips <kim.phillips@freescale.com>
> > ---
> >  .../board/efikamx/efikamx.c                        |    4 ++--
> >  .../board/esg/ima3-mx53/ima3-mx53.c                |    2 +-
> >  .../board/freescale/mx51evk/mx51evk.c              |    4 ++--
> >  .../board/freescale/mx53ard/mx53ard.c              |    4 ++--
> >  .../board/freescale/mx53evk/mx53evk.c              |    4 ++--
> >  .../board/freescale/mx53loco/mx53loco.c            |    4 ++--
> >  .../board/freescale/mx53smd/mx53smd.c              |    2 +-
> >  .../board/freescale/mx6qarm2/mx6qarm2.c            |    4 ++--
> >  .../board/freescale/mx6qsabrelite/mx6qsabrelite.c  |    4 ++--
> >  .../board/ttcontrol/vision2/vision2.c              |    2 +-
> >  .../drivers/mmc/fsl_esdhc.c                        |    2 ++
> >  .../include/fsl_esdhc.h                            |    3 +++
> >  12 files changed, 22 insertions(+), 17 deletions(-)
> > 
> 
> Hi Beno?t,
> 
> 
> > diff --git u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c
> > u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c
> > index b6c969d..efdc6be 100644
> > --- u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c
> > +++ u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c
> > @@ -479,9 +479,11 @@ static int esdhc_init(struct mmc *mmc)
> >  	while ((esdhc_read32(&regs->sysctl) & SYSCTL_RSTA) && --timeout)
> >  		udelay(1000);
> >  
> > +#ifndef ARCH_IMX
> >  	/* Enable cache snooping */
> >  	if (cfg && !cfg->no_snoop)
> >  		esdhc_write32(&regs->scr, 0x00000040);
> > +#endif
> >  
> >  	esdhc_write32(&regs->sysctl, SYSCTL_HCKEN | SYSCTL_IPGEN);
> >  
> > diff --git u-boot-4d3c95f.orig/include/fsl_esdhc.h
> > u-boot-4d3c95f/include/fsl_esdhc.h
> > index 0e26558..44f9f06 100644
> > --- u-boot-4d3c95f.orig/include/fsl_esdhc.h
> > +++ u-boot-4d3c95f/include/fsl_esdhc.h
> > @@ -26,6 +26,7 @@
> >  #ifndef  __FSL_ESDHC_H__
> >  #define	__FSL_ESDHC_H__
> >  
> > +#include <config.h>
> >  #include <asm/errno.h>
> >  #include <asm/byteorder.h>
> >  
> > @@ -167,7 +168,9 @@
> >  
> >  struct fsl_esdhc_cfg {
> >  	u32	esdhc_base;
> > +#ifndef ARCH_IMX
> >  	u32	no_snoop;
> > +#endif
> >  };
> 
> Why don't you get rid of no_snoop at all ? Using  ARCH_IMX is not
> needed
> anymore.

Because I didn't know if disabling cache snooping could be a useful option or
not for architectures other than i.MX, so I preferred to leave it just in case,
even if it seems to be unused.

But if you are certain that disabling cache snooping can not be useful for
architectures other than i.MX (now or in the future, for boards in or out of
tree), I can completely remove no_snoop. Just tell me.

Perhaps you have a rule such as "remove any stuff that is unused in mainstream".

Best regards,
Beno?t

  reply	other threads:[~2012-08-13 14:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 21:13 [U-Boot] [PATCH] fsl_esdhc: Add no-snoop config for default init Benoît Thébaudeau
2012-08-11 10:43 ` Stefano Babic
2012-08-11 14:39   ` Benoît Thébaudeau
2012-08-11 17:25     ` Stefano Babic
2012-08-11 17:59       ` Benoît Thébaudeau
2012-08-11 21:57         ` stefano babic
2012-08-13 14:18           ` [U-Boot] [PATCH 1/2] imx: Define architecture identifier Benoît Thébaudeau
2012-08-13 14:18             ` [U-Boot] [PATCH 2/2] fsl_esdhc: Remove cache snooping for i.MX Benoît Thébaudeau
2012-08-13 14:24               ` Stefano Babic
2012-08-13 14:39                 ` Benoît Thébaudeau [this message]
2012-08-13 15:16                   ` Stefano Babic
2012-08-13 15:53                     ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-08-13 17:28                       ` [U-Boot] [PATCH v3 " Benoît Thébaudeau
2012-08-13 16:32             ` [U-Boot] [PATCH 1/2] imx: Define architecture identifier Otavio Salvador
2012-08-13 17:27               ` [U-Boot] [PATCH v3 1/2] mxc: " Benoît Thébaudeau
2012-09-01  7:35                 ` Stefano Babic
2012-08-12  6:25         ` [U-Boot] [PATCH] fsl_esdhc: Add no-snoop config for default init Stefano Babic
2012-08-12 13:52           ` Benoît Thébaudeau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193048219.2362030.1344868768606.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox