gpiomtd 40 drivers/mtd/nand/raw/gpio.c static inline struct gpiomtd *gpio_nand_getpriv(struct mtd_info *mtd) gpiomtd 42 drivers/mtd/nand/raw/gpio.c return container_of(mtd_to_nand(mtd), struct gpiomtd, nand_chip); gpiomtd 54 drivers/mtd/nand/raw/gpio.c static void gpio_nand_dosync(struct gpiomtd *gpiomtd) gpiomtd 58 drivers/mtd/nand/raw/gpio.c if (gpiomtd->io_sync) { gpiomtd 64 drivers/mtd/nand/raw/gpio.c tmp = readl(gpiomtd->io_sync); gpiomtd 69 drivers/mtd/nand/raw/gpio.c static inline void gpio_nand_dosync(struct gpiomtd *gpiomtd) {} gpiomtd 75 drivers/mtd/nand/raw/gpio.c struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip)); gpiomtd 77 drivers/mtd/nand/raw/gpio.c gpio_nand_dosync(gpiomtd); gpiomtd 80 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nce) gpiomtd 81 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->nce, !(ctrl & NAND_NCE)); gpiomtd 82 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->cle, !!(ctrl & NAND_CLE)); gpiomtd 83 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->ale, !!(ctrl & NAND_ALE)); gpiomtd 84 drivers/mtd/nand/raw/gpio.c gpio_nand_dosync(gpiomtd); gpiomtd 89 drivers/mtd/nand/raw/gpio.c writeb(cmd, gpiomtd->nand_chip.legacy.IO_ADDR_W); gpiomtd 90 drivers/mtd/nand/raw/gpio.c gpio_nand_dosync(gpiomtd); gpiomtd 95 drivers/mtd/nand/raw/gpio.c struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip)); gpiomtd 97 drivers/mtd/nand/raw/gpio.c return gpiod_get_value(gpiomtd->rdy); gpiomtd 192 drivers/mtd/nand/raw/gpio.c struct gpiomtd *gpiomtd = platform_get_drvdata(pdev); gpiomtd 194 drivers/mtd/nand/raw/gpio.c nand_release(&gpiomtd->nand_chip); gpiomtd 197 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp)) gpiomtd 198 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->nwp, 0); gpiomtd 199 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nce && !IS_ERR(gpiomtd->nce)) gpiomtd 200 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->nce, 0); gpiomtd 207 drivers/mtd/nand/raw/gpio.c struct gpiomtd *gpiomtd; gpiomtd 217 drivers/mtd/nand/raw/gpio.c gpiomtd = devm_kzalloc(dev, sizeof(*gpiomtd), GFP_KERNEL); gpiomtd 218 drivers/mtd/nand/raw/gpio.c if (!gpiomtd) gpiomtd 221 drivers/mtd/nand/raw/gpio.c chip = &gpiomtd->nand_chip; gpiomtd 230 drivers/mtd/nand/raw/gpio.c gpiomtd->io_sync = devm_ioremap_resource(dev, res); gpiomtd 231 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->io_sync)) gpiomtd 232 drivers/mtd/nand/raw/gpio.c return PTR_ERR(gpiomtd->io_sync); gpiomtd 235 drivers/mtd/nand/raw/gpio.c ret = gpio_nand_get_config(dev, &gpiomtd->plat); gpiomtd 240 drivers/mtd/nand/raw/gpio.c gpiomtd->nce = devm_gpiod_get_optional(dev, "nce", GPIOD_OUT_HIGH); gpiomtd 241 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->nce)) gpiomtd 242 drivers/mtd/nand/raw/gpio.c return PTR_ERR(gpiomtd->nce); gpiomtd 245 drivers/mtd/nand/raw/gpio.c gpiomtd->nwp = devm_gpiod_get_optional(dev, "nwp", GPIOD_OUT_LOW); gpiomtd 246 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->nwp)) { gpiomtd 247 drivers/mtd/nand/raw/gpio.c ret = PTR_ERR(gpiomtd->nwp); gpiomtd 251 drivers/mtd/nand/raw/gpio.c gpiomtd->ale = devm_gpiod_get(dev, "ale", GPIOD_OUT_LOW); gpiomtd 252 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->ale)) { gpiomtd 253 drivers/mtd/nand/raw/gpio.c ret = PTR_ERR(gpiomtd->ale); gpiomtd 257 drivers/mtd/nand/raw/gpio.c gpiomtd->cle = devm_gpiod_get(dev, "cle", GPIOD_OUT_LOW); gpiomtd 258 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->cle)) { gpiomtd 259 drivers/mtd/nand/raw/gpio.c ret = PTR_ERR(gpiomtd->cle); gpiomtd 263 drivers/mtd/nand/raw/gpio.c gpiomtd->rdy = devm_gpiod_get_optional(dev, "rdy", GPIOD_IN); gpiomtd 264 drivers/mtd/nand/raw/gpio.c if (IS_ERR(gpiomtd->rdy)) { gpiomtd 265 drivers/mtd/nand/raw/gpio.c ret = PTR_ERR(gpiomtd->rdy); gpiomtd 269 drivers/mtd/nand/raw/gpio.c if (gpiomtd->rdy) gpiomtd 276 drivers/mtd/nand/raw/gpio.c chip->options = gpiomtd->plat.options; gpiomtd 277 drivers/mtd/nand/raw/gpio.c chip->legacy.chip_delay = gpiomtd->plat.chip_delay; gpiomtd 283 drivers/mtd/nand/raw/gpio.c platform_set_drvdata(pdev, gpiomtd); gpiomtd 286 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp)) gpiomtd 287 drivers/mtd/nand/raw/gpio.c gpiod_direction_output(gpiomtd->nwp, 1); gpiomtd 293 drivers/mtd/nand/raw/gpio.c if (gpiomtd->plat.adjust_parts) gpiomtd 294 drivers/mtd/nand/raw/gpio.c gpiomtd->plat.adjust_parts(&gpiomtd->plat, mtd->size); gpiomtd 296 drivers/mtd/nand/raw/gpio.c ret = mtd_device_register(mtd, gpiomtd->plat.parts, gpiomtd 297 drivers/mtd/nand/raw/gpio.c gpiomtd->plat.num_parts); gpiomtd 302 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp)) gpiomtd 303 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->nwp, 0); gpiomtd 305 drivers/mtd/nand/raw/gpio.c if (gpiomtd->nce && !IS_ERR(gpiomtd->nce)) gpiomtd 306 drivers/mtd/nand/raw/gpio.c gpiod_set_value(gpiomtd->nce, 0);