ndfc.c (7e534323c416216e8ac45b5633fb0a5e5137e5b5) | ndfc.c (c0739d85723a381302907f9613392d7ac8515176) |
---|---|
1/* 2 * Overview: 3 * Platform independent driver for NDFC (NanD Flash Controller) 4 * integrated into EP440 cores 5 * 6 * Ported to an OF platform driver by Sean MacLennan 7 * 8 * The NDFC supports multiple chips, but this driver only supports a --- 111 unchanged lines hidden (view full) --- 120{ 121 struct ndfc_controller *ndfc = nand_get_controller_data(chip); 122 uint32_t *p = (uint32_t *) buf; 123 124 for(;len > 0; len -= 4) 125 *p++ = in_be32(ndfc->ndfcbase + NDFC_DATA); 126} 127 | 1/* 2 * Overview: 3 * Platform independent driver for NDFC (NanD Flash Controller) 4 * integrated into EP440 cores 5 * 6 * Ported to an OF platform driver by Sean MacLennan 7 * 8 * The NDFC supports multiple chips, but this driver only supports a --- 111 unchanged lines hidden (view full) --- 120{ 121 struct ndfc_controller *ndfc = nand_get_controller_data(chip); 122 uint32_t *p = (uint32_t *) buf; 123 124 for(;len > 0; len -= 4) 125 *p++ = in_be32(ndfc->ndfcbase + NDFC_DATA); 126} 127 |
128static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) | 128static void ndfc_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) |
129{ | 129{ |
130 struct nand_chip *chip = mtd_to_nand(mtd); | |
131 struct ndfc_controller *ndfc = nand_get_controller_data(chip); 132 uint32_t *p = (uint32_t *) buf; 133 134 for(;len > 0; len -= 4) 135 out_be32(ndfc->ndfcbase + NDFC_DATA, *p++); 136} 137 138/* --- 145 unchanged lines hidden --- | 130 struct ndfc_controller *ndfc = nand_get_controller_data(chip); 131 uint32_t *p = (uint32_t *) buf; 132 133 for(;len > 0; len -= 4) 134 out_be32(ndfc->ndfcbase + NDFC_DATA, *p++); 135} 136 137/* --- 145 unchanged lines hidden --- |