Searched refs:ndfc (Results 1 - 3 of 3) sorted by relevance
/linux-4.4.14/drivers/mtd/nand/ |
H A D | ndfc.c | 28 #include <linux/mtd/ndfc.h> 52 struct ndfc_controller *ndfc = nchip->priv; ndfc_select_chip() local 54 ccr = in_be32(ndfc->ndfcbase + NDFC_CCR); ndfc_select_chip() 57 ccr |= NDFC_CCR_BS(chip + ndfc->chip_select); ndfc_select_chip() 60 out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); ndfc_select_chip() 66 struct ndfc_controller *ndfc = chip->priv; ndfc_hwcontrol() local 72 writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_CMD); ndfc_hwcontrol() 74 writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_ALE); ndfc_hwcontrol() 80 struct ndfc_controller *ndfc = chip->priv; ndfc_ready() local 82 return in_be32(ndfc->ndfcbase + NDFC_STAT) & NDFC_STAT_IS_READY; ndfc_ready() 89 struct ndfc_controller *ndfc = chip->priv; ndfc_enable_hwecc() local 91 ccr = in_be32(ndfc->ndfcbase + NDFC_CCR); ndfc_enable_hwecc() 93 out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); ndfc_enable_hwecc() 101 struct ndfc_controller *ndfc = chip->priv; ndfc_calculate_ecc() local 106 ecc = in_be32(ndfc->ndfcbase + NDFC_ECC); ndfc_calculate_ecc() 125 struct ndfc_controller *ndfc = chip->priv; ndfc_read_buf() local 129 *p++ = in_be32(ndfc->ndfcbase + NDFC_DATA); ndfc_read_buf() 135 struct ndfc_controller *ndfc = chip->priv; ndfc_write_buf() local 139 out_be32(ndfc->ndfcbase + NDFC_DATA, *p++); ndfc_write_buf() 145 static int ndfc_chip_init(struct ndfc_controller *ndfc, ndfc_chip_init() argument 149 struct nand_chip *chip = &ndfc->chip; ndfc_chip_init() 153 chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; ndfc_chip_init() 154 chip->IO_ADDR_W = ndfc->ndfcbase + NDFC_DATA; ndfc_chip_init() 159 chip->controller = &ndfc->ndfc_control; ndfc_chip_init() 169 chip->priv = ndfc; ndfc_chip_init() 171 ndfc->mtd.priv = chip; ndfc_chip_init() 172 ndfc->mtd.dev.parent = &ndfc->ofdev->dev; ndfc_chip_init() 179 ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", ndfc_chip_init() 180 dev_name(&ndfc->ofdev->dev), flash_np->name); ndfc_chip_init() 181 if (!ndfc->mtd.name) { ndfc_chip_init() 186 ret = nand_scan(&ndfc->mtd, 1); ndfc_chip_init() 190 ret = mtd_device_parse_register(&ndfc->mtd, NULL, &ppdata, NULL, 0); ndfc_chip_init() 195 kfree(ndfc->mtd.name); ndfc_chip_init() 201 struct ndfc_controller *ndfc; ndfc_probe() local 220 ndfc = &ndfc_ctrl[cs]; ndfc_probe() 221 ndfc->chip_select = cs; ndfc_probe() 223 spin_lock_init(&ndfc->ndfc_control.lock); ndfc_probe() 224 init_waitqueue_head(&ndfc->ndfc_control.wq); ndfc_probe() 225 ndfc->ofdev = ofdev; ndfc_probe() 226 dev_set_drvdata(&ofdev->dev, ndfc); ndfc_probe() 228 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); ndfc_probe() 229 if (!ndfc->ndfcbase) { ndfc_probe() 234 ccr = NDFC_CCR_BS(ndfc->chip_select); ndfc_probe() 241 out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); ndfc_probe() 246 int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); ndfc_probe() 247 out_be32(ndfc->ndfcbase + offset, be32_to_cpup(reg)); ndfc_probe() 250 err = ndfc_chip_init(ndfc, ofdev->dev.of_node); ndfc_probe() 252 iounmap(ndfc->ndfcbase); ndfc_probe() 261 struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev); ndfc_remove() local 263 nand_release(&ndfc->mtd); ndfc_remove() 264 kfree(ndfc->mtd.name); ndfc_remove() 270 { .compatible = "ibm,ndfc", }, 277 .name = "ndfc",
|
H A D | Makefile | 26 obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
|
/linux-4.4.14/include/linux/mtd/ |
H A D | ndfc.h | 2 * linux/include/linux/mtd/ndfc.h 11 * Contains defines, datastructures for ndfc nand controller
|
Completed in 76 milliseconds