diff options
author | Frank Li <frank.li@freescale.com> | 2010-10-26 16:54:19 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2010-11-04 18:57:46 +0800 |
commit | 8916b65502796a48c3422c0e867fe6edfa67037a (patch) | |
tree | 9f72789b34990303ff26177978e5e532532f7c4d /drivers | |
parent | 7906a1ae5053d5c98fadf60c8d34ef1f6a967628 (diff) | |
download | u-boot-imx-8916b65502796a48c3422c0e867fe6edfa67037a.zip u-boot-imx-8916b65502796a48c3422c0e867fe6edfa67037a.tar.gz u-boot-imx-8916b65502796a48c3422c0e867fe6edfa67037a.tar.bz2 |
ENGR00133049 Support nand flash for MX28
Support nand basic read/write in MX28 u-boot.
Signed-off-by: Frank Li <frank.li@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/apbh_dma.c | 7 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi_nfc_gpmi.h | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi_nfc_hal.c | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index 296125a..71d9842 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -16,12 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <asm/apbh_dma.h> - #include <linux/err.h> #include <linux/list.h> #include <malloc.h> #include <common.h> +#include <asm/apbh_dma.h> #include <asm/io.h> #ifdef CONFIG_ARCH_MMU @@ -268,7 +267,7 @@ static int mxs_dma_apbh_probe(void) BM_APBH_CTRL0_APB_BURST_EN); #endif - mxs_dma_apbh.chan_base = MXS_DMA_CHANNEL_AHB_APBH_GPMI0; + mxs_dma_apbh.chan_base = MXS_DMA_CHANNEL_AHB_APBH; mxs_dma_apbh.chan_num = MXS_MAX_DMA_CHANNELS; return mxs_dma_device_register(&mxs_dma_apbh); @@ -566,7 +565,7 @@ struct mxs_dma_desc *mxs_dma_alloc_desc(void) if (pdesc == NULL) return NULL; memset(pdesc, 0, sizeof(*pdesc)); - pdesc->address = pdesc; + pdesc->address = (dma_addr_t)pdesc; #endif return pdesc; diff --git a/drivers/mtd/nand/gpmi_nfc_gpmi.h b/drivers/mtd/nand/gpmi_nfc_gpmi.h index c82e215..bd56e4c 100644 --- a/drivers/mtd/nand/gpmi_nfc_gpmi.h +++ b/drivers/mtd/nand/gpmi_nfc_gpmi.h @@ -311,7 +311,7 @@ #define HW_GPMI_TIMING2 (0x00000090) -#if defined(CONFIG_GPMI_NFC_V0) +#if !defined(CONFIG_GPMI_NFC_V2) #define BP_GPMI_TIMING2_UDMA_TRP 24 #define BM_GPMI_TIMING2_UDMA_TRP 0xFF000000 diff --git a/drivers/mtd/nand/gpmi_nfc_hal.c b/drivers/mtd/nand/gpmi_nfc_hal.c index ca8bd01..23ce265 100644 --- a/drivers/mtd/nand/gpmi_nfc_hal.c +++ b/drivers/mtd/nand/gpmi_nfc_hal.c @@ -1113,7 +1113,7 @@ static int read_data(struct mtd_info *mtd, unsigned chip, (*d)->cmd.cmd.data = 0; (*d)->cmd.cmd.bits.command = DMA_WRITE; -#if defined(CONFIG_GPMI_NFC_V2) +#if !defined(CONFIG_GPMI_NFC_V0) (*d)->cmd.cmd.bits.chain = 0; (*d)->cmd.cmd.bits.irq = 1; #else @@ -1398,7 +1398,7 @@ static int read_page(struct mtd_info *mtd, unsigned chip, (*d)->cmd.cmd.bits.irq = 0; (*d)->cmd.cmd.bits.nand_lock = 0; (*d)->cmd.cmd.bits.nand_wait_4_ready = 1; -#if defined(CONFIG_GPMI_NFC_V2) +#if !defined(CONFIG_GPMI_NFC_V0) (*d)->cmd.cmd.bits.dec_sem = 0; #else (*d)->cmd.cmd.bits.dec_sem = 1; @@ -1446,7 +1446,7 @@ static int read_page(struct mtd_info *mtd, unsigned chip, (*d)->cmd.cmd.bits.irq = 0; (*d)->cmd.cmd.bits.nand_lock = 0; (*d)->cmd.cmd.bits.nand_wait_4_ready = 0; -#if defined(CONFIG_GPMI_NFC_V2) +#if !defined(CONFIG_GPMI_NFC_V0) (*d)->cmd.cmd.bits.dec_sem = 0; #else (*d)->cmd.cmd.bits.dec_sem = 1; @@ -1509,7 +1509,7 @@ static int read_page(struct mtd_info *mtd, unsigned chip, (*d)->cmd.cmd.bits.irq = 0; (*d)->cmd.cmd.bits.nand_lock = 0; (*d)->cmd.cmd.bits.nand_wait_4_ready = 1; -#if defined(CONFIG_GPMI_NFC_V2) +#if !defined(CONFIG_GPMI_NFC_V0) (*d)->cmd.cmd.bits.dec_sem = 0; #else (*d)->cmd.cmd.bits.dec_sem = 1; |