From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 12 Apr 2013 14:21:38 -0500 Subject: [U-Boot] [PATCH v3 6/8] mtd: nand: add driver for diskonchip g4 nand flash In-Reply-To: <1365793160-18247-7-git-send-email-mikedunn@newsguy.com> (from mikedunn@newsguy.com on Fri Apr 12 13:59:18 2013) References: <1365793160-18247-1-git-send-email-mikedunn@newsguy.com> <1365793160-18247-7-git-send-email-mikedunn@newsguy.com> Message-ID: <1365794498.3640.28@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/12/2013 01:59:18 PM, Mike Dunn wrote: > This patch adds a driver for the diskonchip G4 nand flash device. It > is based > on the driver from the linux kernel. > > This also includes a separate SPL driver. A separate SPL driver is > used because > the device operates in a different mode (reliable mode) when loading > a boot > image, and also because the storage format of the boot image is > different from > normal data (pages are stored redundantly). The SPL driver basically > mimics how > a typical IPL reads data from the device. The special operating mode > and > storage format are used to compensate for the fact that the IPL does > not contain > the BCH ecc decoding algorithm (due to size constraints). Although > the u-boot > SPL *could* use ecc, it operates like an IPL for the sake of > simplicity and > uniformity, since the IPL and SPL share the task of loading the > u-boot image. > As a side benefit, the SPL driver is very small. > > [port from linux kernel 3.4 commit > 570469f3bde7f71cc1ece07a18d54a05b6a8775d] > > Signed-off-by: Mike Dunn > --- > Changelog: > v3: replace dbg macro with MTDDEBUG > v2: remove commented-out code > > drivers/mtd/nand/Makefile | 2 + > drivers/mtd/nand/docg4.c | 1028 > ++++++++++++++++++++++++++++++++++++++++++ > drivers/mtd/nand/docg4_spl.c | 222 +++++++++ > include/linux/mtd/docg4.h | 134 ++++++ > 4 files changed, 1386 insertions(+), 0 deletions(-) > create mode 100644 drivers/mtd/nand/docg4.c > create mode 100644 drivers/mtd/nand/docg4_spl.c > create mode 100644 include/linux/mtd/docg4.h Acked-by: Scott Wood -Scott