public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: denali: detect the number of banks before resetting NAND
@ 2011-06-06 16:11 Jamie Iles
  2011-06-07  4:23 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Jamie Iles @ 2011-06-06 16:11 UTC (permalink / raw)
  To: linux-mtd; +Cc: Jamie Iles, David Woodhouse, Artem Bityutskiy

Commit c89eeda810f0ec4f0eee0206ebb79e476df9f83e (mtd: denali: detect the
number of banks) introduced runtime detection of the number of banks.

However, denali_nand_reset() uses uses denanli_nand_info::max_banks so
we need to detect the maximum number of banks before doing the reset.

Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---

Artem, I believe that this one will be needed for 3.0 to avoid breakage
on Moorestown.

 drivers/mtd/nand/denali.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index eebdfb5..3984d48 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1346,6 +1346,7 @@ static void denali_hw_init(struct denali_nand_info *denali)
 	 * */
 	denali->bbtskipbytes = ioread32(denali->flash_reg +
 						SPARE_AREA_SKIP_BYTES);
+	detect_max_banks(denali);
 	denali_nand_reset(denali);
 	iowrite32(0x0F, denali->flash_reg + RB_PIN_ENABLED);
 	iowrite32(CHIP_EN_DONT_CARE__FLAG,
@@ -1356,7 +1357,6 @@ static void denali_hw_init(struct denali_nand_info *denali)
 	/* Should set value for these registers when init */
 	iowrite32(0, denali->flash_reg + TWO_ROW_ADDR_CYCLES);
 	iowrite32(1, denali->flash_reg + ECC_ENABLE);
-	detect_max_banks(denali);
 	denali_nand_timing_set(denali);
 	denali_irq_init(denali);
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: denali: detect the number of banks before resetting NAND
  2011-06-06 16:11 [PATCH] mtd: denali: detect the number of banks before resetting NAND Jamie Iles
@ 2011-06-07  4:23 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-06-07  4:23 UTC (permalink / raw)
  To: Jamie Iles; +Cc: linux-mtd, David Woodhouse


On Mon, 2011-06-06 at 17:11 +0100, Jamie Iles wrote:
> Commit c89eeda810f0ec4f0eee0206ebb79e476df9f83e (mtd: denali: detect the
> number of banks) introduced runtime detection of the number of banks.
> 
> However, denali_nand_reset() uses uses denanli_nand_info::max_banks so
> we need to detect the maximum number of banks before doing the reset.
> 
> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Cc: David Woodhouse <David.Woodhouse@intel.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>

Pushed to l2-mtd-2.6.git, thanks.

> Artem, I believe that this one will be needed for 3.0 to avoid breakage
> on Moorestown.

All the upstream merging is done by David, not me.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-07  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 16:11 [PATCH] mtd: denali: detect the number of banks before resetting NAND Jamie Iles
2011-06-07  4:23 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox