diff options
author | Wolfgang Denk <wd@denx.de> | 2008-09-01 00:04:26 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-09-01 00:04:26 +0200 |
commit | e155c9e00b5f21a6de28479259c440ba71289d00 (patch) | |
tree | c15c30ce3db5d872eae093b37776bb720ae8960c /cpu/ppc4xx/ndfc.c | |
parent | de5b094def5d80c4355c0326cfb54b9289f7d609 (diff) | |
parent | c2b4b2e4814f4ace9015fdb64132894327400bf0 (diff) | |
download | u-boot-imx-e155c9e00b5f21a6de28479259c440ba71289d00.zip u-boot-imx-e155c9e00b5f21a6de28479259c440ba71289d00.tar.gz u-boot-imx-e155c9e00b5f21a6de28479259c440ba71289d00.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Diffstat (limited to 'cpu/ppc4xx/ndfc.c')
-rw-r--r-- | cpu/ppc4xx/ndfc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpu/ppc4xx/ndfc.c b/cpu/ppc4xx/ndfc.c index 72acfd0..7d96e79 100644 --- a/cpu/ppc4xx/ndfc.c +++ b/cpu/ppc4xx/ndfc.c @@ -149,6 +149,10 @@ static int ndfc_verify_buf(struct mtd_info *mtdinfo, const uint8_t *buf, int len } #endif /* #ifndef CONFIG_NAND_SPL */ +#ifndef CFG_NAND_BCR +#define CFG_NAND_BCR 0x80002222 +#endif + void board_nand_select_device(struct nand_chip *nand, int chip) { /* @@ -161,7 +165,14 @@ void board_nand_select_device(struct nand_chip *nand, int chip) /* Set NandFlash Core Configuration Register */ /* 1 col x 2 rows */ out_be32((u32 *)(base + NDFC_CCR), 0x00000000 | (cs << 24)); - out_be32((u32 *)(base + NDFC_BCFG0 + (cs << 2)), 0x80002222); + out_be32((u32 *)(base + NDFC_BCFG0 + (cs << 2)), CFG_NAND_BCR); +} + +static void ndfc_select_chip(struct mtd_info *mtd, int chip) +{ + /* + * Nothing to do here! + */ } int board_nand_init(struct nand_chip *nand) @@ -192,6 +203,7 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.mode = NAND_ECC_HW; nand->ecc.size = 256; nand->ecc.bytes = 3; + nand->select_chip = ndfc_select_chip; #ifndef CONFIG_NAND_SPL nand->write_buf = ndfc_write_buf; |