All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Javier Martinez Canillas <martinez.javier@gmail.com>,
	Enric Balletbo Serra <eballetbo@gmail.com>,
	Pekon Gupta <pekon@ti.com>, Tony Lindgren <tony@atomide.com>,
	linux-mtd@lists.infradead.org, Jon Hunter <jgchunter@gmail.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: [PATCH 3/3] omap2: gpmc: Move legacy GPMC width setting
Date: Sun, 27 Oct 2013 21:51:48 -0300	[thread overview]
Message-ID: <1382921508-5104-4-git-send-email-ezequiel.garcia@free-electrons.com> (raw)
In-Reply-To: <1382921508-5104-1-git-send-email-ezequiel.garcia@free-electrons.com>

After the introduction of gpmc_set_legacy(), move the GPMC width setting
to be done inside it. Currently, in the DT probed case, this is (wrongly)
done twice: first at gpmc_read_settings_dt(), and then based in the
NAND width setting.
Fix this and use only the value obtained from the DT.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-omap2/gpmc-nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 9dd40e7..174caec 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -74,6 +74,11 @@ static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data,
 		s->wait_on_read = true;
 		s->wait_on_write = true;
 	}
+
+	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
+		s->device_width = GPMC_DEVWIDTH_16BIT;
+	else
+		s->device_width = GPMC_DEVWIDTH_8BIT;
 }
 
 int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
@@ -118,11 +123,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
 
 	s.device_nand = true;
 
-	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
-		s.device_width = GPMC_DEVWIDTH_16BIT;
-	else
-		s.device_width = GPMC_DEVWIDTH_8BIT;
-
 	err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
 	if (err < 0)
 		goto out_free_cs;
-- 
1.8.1.5


WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: <linux-omap@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>
Cc: Javier Martinez Canillas <martinez.javier@gmail.com>,
	Enric Balletbo Serra <eballetbo@gmail.com>,
	Jon Hunter <jgchunter@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	linux-mtd@lists.infradead.org, Pekon Gupta <pekon@ti.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: [PATCH 3/3] omap2: gpmc: Move legacy GPMC width setting
Date: Sun, 27 Oct 2013 21:51:48 -0300	[thread overview]
Message-ID: <1382921508-5104-4-git-send-email-ezequiel.garcia@free-electrons.com> (raw)
In-Reply-To: <1382921508-5104-1-git-send-email-ezequiel.garcia@free-electrons.com>

After the introduction of gpmc_set_legacy(), move the GPMC width setting
to be done inside it. Currently, in the DT probed case, this is (wrongly)
done twice: first at gpmc_read_settings_dt(), and then based in the
NAND width setting.
Fix this and use only the value obtained from the DT.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-omap2/gpmc-nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 9dd40e7..174caec 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -74,6 +74,11 @@ static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data,
 		s->wait_on_read = true;
 		s->wait_on_write = true;
 	}
+
+	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
+		s->device_width = GPMC_DEVWIDTH_16BIT;
+	else
+		s->device_width = GPMC_DEVWIDTH_8BIT;
 }
 
 int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
@@ -118,11 +123,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
 
 	s.device_nand = true;
 
-	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
-		s.device_width = GPMC_DEVWIDTH_16BIT;
-	else
-		s.device_width = GPMC_DEVWIDTH_8BIT;
-
 	err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
 	if (err < 0)
 		goto out_free_cs;
-- 
1.8.1.5

WARNING: multiple messages have this Message-ID (diff)
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] omap2: gpmc: Move legacy GPMC width setting
Date: Sun, 27 Oct 2013 21:51:48 -0300	[thread overview]
Message-ID: <1382921508-5104-4-git-send-email-ezequiel.garcia@free-electrons.com> (raw)
In-Reply-To: <1382921508-5104-1-git-send-email-ezequiel.garcia@free-electrons.com>

After the introduction of gpmc_set_legacy(), move the GPMC width setting
to be done inside it. Currently, in the DT probed case, this is (wrongly)
done twice: first at gpmc_read_settings_dt(), and then based in the
NAND width setting.
Fix this and use only the value obtained from the DT.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-omap2/gpmc-nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 9dd40e7..174caec 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -74,6 +74,11 @@ static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data,
 		s->wait_on_read = true;
 		s->wait_on_write = true;
 	}
+
+	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
+		s->device_width = GPMC_DEVWIDTH_16BIT;
+	else
+		s->device_width = GPMC_DEVWIDTH_8BIT;
 }
 
 int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
@@ -118,11 +123,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
 
 	s.device_nand = true;
 
-	if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
-		s.device_width = GPMC_DEVWIDTH_16BIT;
-	else
-		s.device_width = GPMC_DEVWIDTH_8BIT;
-
 	err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
 	if (err < 0)
 		goto out_free_cs;
-- 
1.8.1.5

  parent reply	other threads:[~2013-10-28  0:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28  0:51 [PATCH 0/3] omap2: Assorted GPMC cleanups Ezequiel Garcia
2013-10-28  0:51 ` Ezequiel Garcia
2013-10-28  0:51 ` Ezequiel Garcia
2013-10-28  0:51 ` [PATCH 1/3] omap2: gpmc: Move initialization outside the gpmc_t condition Ezequiel Garcia
2013-10-28  0:51   ` Ezequiel Garcia
2013-10-28  0:51   ` Ezequiel Garcia
2013-10-28  0:51 ` [PATCH 2/3] omap2: gpmc: Introduce gpmc_set_legacy() Ezequiel Garcia
2013-10-28  0:51   ` Ezequiel Garcia
2013-10-28  0:51   ` Ezequiel Garcia
2013-10-28  0:51 ` Ezequiel Garcia [this message]
2013-10-28  0:51   ` [PATCH 3/3] omap2: gpmc: Move legacy GPMC width setting Ezequiel Garcia
2013-10-28  0:51   ` Ezequiel Garcia
2013-11-06 19:16 ` [PATCH 0/3] omap2: Assorted GPMC cleanups Ezequiel Garcia
2013-11-06 19:16   ` Ezequiel Garcia
2013-11-06 19:16   ` Ezequiel Garcia
2014-01-08 19:18 ` Tony Lindgren
2014-01-08 19:18   ` Tony Lindgren
2014-01-08 19:18   ` Tony Lindgren
2014-01-08 23:38   ` Ezequiel Garcia
2014-01-08 23:38     ` Ezequiel Garcia
2014-01-08 23:38     ` Ezequiel Garcia
2014-01-08 23:40     ` Tony Lindgren
2014-01-08 23:40       ` Tony Lindgren
2014-01-08 23:40       ` Tony Lindgren

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=1382921508-5104-4-git-send-email-ezequiel.garcia@free-electrons.com \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=eballetbo@gmail.com \
    --cc=jgchunter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=martinez.javier@gmail.com \
    --cc=pekon@ti.com \
    --cc=tony@atomide.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.