Hi, Here two patches about this issue.
Thanks. On Tue, Mar 29, 2011 at 4:24 PM, Alexandre Pereira da Silva <aletes....@gmail.com> wrote: > Hi, > > Is anybody using the LPC32XX nand driver? > > I'm having some issues about large nand devices support. It's > relatively easy to make the current openocd driver suporte larger > devices in SLC mode than in MLC. > > I think, in most cases, the SLC driver should be the default as its > enough for most devices, instead of the MLC as it is today. > > What do you think about this? > > Thanks. >
From 37cf60996431523805a128b33b09a28fe91260aa Mon Sep 17 00:00:00 2001 From: Alexandre Pereira da Silva <aletes....@gmail.com> Date: Tue, 12 Apr 2011 10:56:56 -0300 Subject: [PATCH 1/3] Make the LPC32xx slc nand driver the default --- src/flash/nand/lpc32xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c index 963dd13..653bcde 100644 --- a/src/flash/nand/lpc32xx.c +++ b/src/flash/nand/lpc32xx.c @@ -227,8 +227,8 @@ static int lpc32xx_init(struct nand_device *nand) /* select MLC controller if none is currently selected */ if (lpc32xx_info->selected_controller == LPC32xx_NO_CONTROLLER) { LOG_DEBUG("no LPC32xx NAND flash controller selected, " - "using default 'mlc'"); - lpc32xx_info->selected_controller = LPC32xx_MLC_CONTROLLER; + "using default 'slc'"); + lpc32xx_info->selected_controller = LPC32xx_SLC_CONTROLLER; } if (lpc32xx_info->selected_controller == LPC32xx_MLC_CONTROLLER) { -- 1.7.1
From f34e8a0b7293e3fa5d1344516d23b593cc4435d9 Mon Sep 17 00:00:00 2001 From: Alexandre Pereira da Silva <aletes....@gmail.com> Date: Tue, 12 Apr 2011 13:06:13 -0300 Subject: [PATCH 3/3] Make the LPC32xx nand driver support up to 5 address cycles. This will only work in the SLC driver. --- src/flash/nand/lpc32xx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c index 653bcde..ffb322c 100644 --- a/src/flash/nand/lpc32xx.c +++ b/src/flash/nand/lpc32xx.c @@ -214,7 +214,7 @@ static int lpc32xx_init(struct nand_device *nand) /* inform calling code about selected bus width */ nand->bus_width = bus_width; - if ((address_cycles != 3) && (address_cycles != 4)) { + if ((address_cycles < 3) || (address_cycles > 5)) { LOG_ERROR("LPC32xx driver doesn't support %i address cycles", address_cycles); return ERROR_NAND_OPERATION_NOT_SUPPORTED; } -- 1.7.1
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development