All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Roger Quadros <rogerq@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] memory: omap-gpmc: Fix debug output for access width
Date: Mon, 8 May 2017 10:36:10 -0700	[thread overview]
Message-ID: <20170508173610.GJ3489@atomide.com> (raw)
In-Reply-To: <a59b8a21-056a-0e1f-44a6-585256945747@ti.com>

* Roger Quadros <rogerq@ti.com> [170508 03:44]:
> Hi Tony,
> 
> On 06/05/17 01:37, Tony Lindgren wrote:
> > The width needs to be configured in bytes with 1 meaning 8-bit
> > access and 2 meaning 16-bit access.
> 
> As per the TRM, for GPMC_CONFIG1.DEVICESIZE
> 0 means 8-bit
> 1 means 16-bit
> 
> > 
> > Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> > Cc: Roger Quadros <rogerq@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  drivers/memory/omap-gpmc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> > --- a/drivers/memory/omap-gpmc.c
> > +++ b/drivers/memory/omap-gpmc.c
> > @@ -513,7 +513,7 @@ static void gpmc_cs_show_timings(int cs, const char *desc)
> >  	pr_info("gpmc cs%i access configuration:\n", cs);
> >  	GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1,  4,  4, "time-para-granularity");
> >  	GPMC_GET_RAW(GPMC_CS_CONFIG1,  8,  9, "mux-add-data");
> > -	GPMC_GET_RAW_MAX(GPMC_CS_CONFIG1, 12, 13,
> > +	GPMC_GET_RAW_SHIFT_MAX(GPMC_CS_CONFIG1, 12, 13, 1,
> >  			 GPMC_CONFIG1_DEVICESIZE_MAX, "device-width");
> 
> setting shift 1 means the value will be multiplied by 2
> so this will read 0 for 8-bit and 2 for 16-bit.
> 
> Is this what we want?

Yeah we already have debug output that is supposed to be usable
for configuring a new device based on debug output of the bootloader
timings. And the configured parameters use bytes for device-width.

> I'd still prefer the old way of showing RAW values than interpreted ones.

We have that too in the debug output as the raw values of
all the GPMC_CS_CONFIG registers.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] memory: omap-gpmc: Fix debug output for access width
Date: Mon, 8 May 2017 10:36:10 -0700	[thread overview]
Message-ID: <20170508173610.GJ3489@atomide.com> (raw)
In-Reply-To: <a59b8a21-056a-0e1f-44a6-585256945747@ti.com>

* Roger Quadros <rogerq@ti.com> [170508 03:44]:
> Hi Tony,
> 
> On 06/05/17 01:37, Tony Lindgren wrote:
> > The width needs to be configured in bytes with 1 meaning 8-bit
> > access and 2 meaning 16-bit access.
> 
> As per the TRM, for GPMC_CONFIG1.DEVICESIZE
> 0 means 8-bit
> 1 means 16-bit
> 
> > 
> > Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> > Cc: Roger Quadros <rogerq@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  drivers/memory/omap-gpmc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> > --- a/drivers/memory/omap-gpmc.c
> > +++ b/drivers/memory/omap-gpmc.c
> > @@ -513,7 +513,7 @@ static void gpmc_cs_show_timings(int cs, const char *desc)
> >  	pr_info("gpmc cs%i access configuration:\n", cs);
> >  	GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1,  4,  4, "time-para-granularity");
> >  	GPMC_GET_RAW(GPMC_CS_CONFIG1,  8,  9, "mux-add-data");
> > -	GPMC_GET_RAW_MAX(GPMC_CS_CONFIG1, 12, 13,
> > +	GPMC_GET_RAW_SHIFT_MAX(GPMC_CS_CONFIG1, 12, 13, 1,
> >  			 GPMC_CONFIG1_DEVICESIZE_MAX, "device-width");
> 
> setting shift 1 means the value will be multiplied by 2
> so this will read 0 for 8-bit and 2 for 16-bit.
> 
> Is this what we want?

Yeah we already have debug output that is supposed to be usable
for configuring a new device based on debug output of the bootloader
timings. And the configured parameters use bytes for device-width.

> I'd still prefer the old way of showing RAW values than interpreted ones.

We have that too in the debug output as the raw values of
all the GPMC_CS_CONFIG registers.

Regards,

Tony

  reply	other threads:[~2017-05-08 17:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 22:37 [PATCH] memory: omap-gpmc: Fix debug output for access width Tony Lindgren
2017-05-05 22:37 ` Tony Lindgren
2017-05-08 10:40 ` Roger Quadros
2017-05-08 10:40   ` Roger Quadros
2017-05-08 17:36   ` Tony Lindgren [this message]
2017-05-08 17:36     ` Tony Lindgren
2017-05-11  9:46 ` Roger Quadros
2017-05-11  9:46   ` Roger Quadros

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=20170508173610.GJ3489@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rogerq@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.