[U-Boot] [PATCH v3 0/5] lpc32xx: add legacy NXP BSP drivers

From: Sylvain Lemieux slemieux@tycoint.com
This series of patches bring the legacy NXP LPC32xx BSP drivers SLC NAND (hardware ECC), DMA & USB into the latest u-boot.
Refer to each individual patches for details on the change done to integrate the driver into the latest u-boot.
The legacy BSP patch (u-boot-2009.03_lpc32x0-v1.07.patch.tar.bz2) was downloaded from the LPCLinux Web site.
The patch adding the LPC32xx MAC and SMSC RMII phy support should be applied first: - http://patchwork.ozlabs.org/patch/489100/ - http://patchwork.ozlabs.org/patch/489190/ - http://patchwork.ozlabs.org/patch/491419/ - http://patchwork.ozlabs.org/patch/491420/
The SLC NAND patch should be applied after: - https://patchwork.ozlabs.org/patch/497308/
The patch modifying the I2C to use the HCLK get API function should be applied after the SLC NAND patch: - https://patchwork.ozlabs.org/patch/500511/
The NAND driver was only tested for large page NAND.
Based on the test I did, the NAND SLC hardware ECC support feature increase the read rate by approx. 242% (raw read: 57%).
Potential test opportunity for small page NAND: - Since the equivalent of the legacy NXP BSP drivers are available (NAND SLC / DMA / Ethernet / USB), it will be nice if somebody using the PHY3250 development board can test small pafe NAND. - The remaining porting work to the latest u-boot include the migration of the board & configuration files.
Changes from v2 to v3: * As per feedback on mailing list from Vladimir, - add warning when DMA and SPL build option are selected. - add another DMA specific read & write buffer functions. * Addressed Marek's comments on LPC32xx NAND & DMA driver: - use defined in header file instead of local definition. - remove for loop and use "ffz()". - removed typecast and update type, when possible. * As per discussion on mailing list with Vladimir & Marek, updated conditional compile option (DMA only) to build the original NAND SLC code using software ECC. * Provide define to assign next DMA linked list item address to removed typecast in DMA client (ex. NAND SLC). * Re-organized the conditional compile code inside "board_nand_init()" - DMA vs. non-DMA initialization. * added original NAND source code credit. * Addressed Marek's comments on LPC32xx USB driver: - use "get_timer()" to handle timeout (usbpll_setup). - submit i2c driver update into a separate patch. - use "u32" for 4 bytes registers definition. - Move pin mux code to setup file (i.e. "device.c"). * Updated ISP1301 register definition (set & clear) instead of using an extra mask for the clear address.
Changes from v1 to v2: * Moved the DMA patch as the first patch of the series and the NAND SLC patch as thesecond one. * As per discussion on mailing list with Vladimir, incorporate NAND SLC hardware ECC support into the following NAND SLC patch: https://patchwork.ozlabs.org/patch/497308/ * As per discussion on mailing list with Vladimir & Albert, add conditional compile option to build the original NAND SLC code using software ECC for SPL build. * Moved ECC layout for small page NAND in a separate patch. * Addressed Marek's comments on LPC32xx USB driver: - use "get_timer()" to handle timeout. - Split USB and I2C driver. * Updated LPC32xx I2C driver to support the I2C that is part of the USB module. * Removed ISP1301 USB transceiver I2C registers definition that are not used. * For the USB driver, use "cpu" initialization & stop functions API instead of the "board" API.
Note: I am sending the patches using slemieux.tyco@gmail.com, until I can submit patch using my regular e-mail slemieux@tycoint.com.
Sylvain Lemieux (5): dma: lpc32xx: add DMA driver nand: lpc32xx: add hardware ECC support nand: lpc32xx: add ECC layout for small page NAND i2c: lpc32xx: add support for OTG I2C usb: lpc32xx: add host USB driver
arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 12 + arch/arm/include/asm/arch-lpc32xx/clk.h | 15 + arch/arm/include/asm/arch-lpc32xx/dma.h | 42 +++ arch/arm/include/asm/arch-lpc32xx/sys_proto.h | 2 + drivers/dma/Makefile | 1 + drivers/dma/lpc32xx_dma.c | 147 ++++++++++ drivers/i2c/lpc32xx_i2c.c | 20 +- drivers/mtd/nand/lpc32xx_nand_slc.c | 385 +++++++++++++++++++++++++- drivers/usb/host/Makefile | 1 + drivers/usb/host/ohci-lpc32xx.c | 238 ++++++++++++++++ 10 files changed, 855 insertions(+), 8 deletions(-) create mode 100644 arch/arm/include/asm/arch-lpc32xx/dma.h create mode 100644 drivers/dma/lpc32xx_dma.c create mode 100644 drivers/usb/host/ohci-lpc32xx.c
participants (1)
-
slemieux.tycoï¼ gmail.com