Symbol: gpiomtd
drivers/mtd/nand/raw/gpio.c
102
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
105
ioread16_rep(gpiomtd->io, instr->ctx.data.buf.in,
drivers/mtd/nand/raw/gpio.c
108
ioread8_rep(gpiomtd->io, instr->ctx.data.buf.in,
drivers/mtd/nand/raw/gpio.c
113
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
116
iowrite16_rep(gpiomtd->io, instr->ctx.data.buf.out,
drivers/mtd/nand/raw/gpio.c
119
iowrite8_rep(gpiomtd->io, instr->ctx.data.buf.out,
drivers/mtd/nand/raw/gpio.c
124
if (!gpiomtd->rdy)
drivers/mtd/nand/raw/gpio.c
127
return nand_gpio_waitrdy(chip, gpiomtd->rdy,
drivers/mtd/nand/raw/gpio.c
141
struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip));
drivers/mtd/nand/raw/gpio.c
148
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
149
gpiod_set_value(gpiomtd->nce, 0);
drivers/mtd/nand/raw/gpio.c
158
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
159
gpiod_set_value(gpiomtd->nce, 1);
drivers/mtd/nand/raw/gpio.c
270
struct gpiomtd *gpiomtd = platform_get_drvdata(pdev);
drivers/mtd/nand/raw/gpio.c
271
struct nand_chip *chip = &gpiomtd->nand_chip;
drivers/mtd/nand/raw/gpio.c
279
if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp))
drivers/mtd/nand/raw/gpio.c
280
gpiod_set_value(gpiomtd->nwp, 0);
drivers/mtd/nand/raw/gpio.c
281
if (gpiomtd->nce && !IS_ERR(gpiomtd->nce))
drivers/mtd/nand/raw/gpio.c
282
gpiod_set_value(gpiomtd->nce, 0);
drivers/mtd/nand/raw/gpio.c
287
struct gpiomtd *gpiomtd;
drivers/mtd/nand/raw/gpio.c
297
gpiomtd = devm_kzalloc(dev, sizeof(*gpiomtd), GFP_KERNEL);
drivers/mtd/nand/raw/gpio.c
298
if (!gpiomtd)
drivers/mtd/nand/raw/gpio.c
301
chip = &gpiomtd->nand_chip;
drivers/mtd/nand/raw/gpio.c
303
gpiomtd->io = devm_platform_ioremap_resource(pdev, 0);
drivers/mtd/nand/raw/gpio.c
304
if (IS_ERR(gpiomtd->io))
drivers/mtd/nand/raw/gpio.c
305
return PTR_ERR(gpiomtd->io);
drivers/mtd/nand/raw/gpio.c
309
gpiomtd->io_sync = devm_ioremap_resource(dev, res);
drivers/mtd/nand/raw/gpio.c
310
if (IS_ERR(gpiomtd->io_sync))
drivers/mtd/nand/raw/gpio.c
311
return PTR_ERR(gpiomtd->io_sync);
drivers/mtd/nand/raw/gpio.c
314
ret = gpio_nand_get_config(dev, &gpiomtd->plat);
drivers/mtd/nand/raw/gpio.c
319
gpiomtd->nce = devm_gpiod_get_optional(dev, "nce", GPIOD_OUT_HIGH);
drivers/mtd/nand/raw/gpio.c
320
if (IS_ERR(gpiomtd->nce))
drivers/mtd/nand/raw/gpio.c
321
return PTR_ERR(gpiomtd->nce);
drivers/mtd/nand/raw/gpio.c
324
gpiomtd->nwp = devm_gpiod_get_optional(dev, "nwp", GPIOD_OUT_LOW);
drivers/mtd/nand/raw/gpio.c
325
if (IS_ERR(gpiomtd->nwp)) {
drivers/mtd/nand/raw/gpio.c
326
ret = PTR_ERR(gpiomtd->nwp);
drivers/mtd/nand/raw/gpio.c
330
gpiomtd->ale = devm_gpiod_get(dev, "ale", GPIOD_OUT_LOW);
drivers/mtd/nand/raw/gpio.c
331
if (IS_ERR(gpiomtd->ale)) {
drivers/mtd/nand/raw/gpio.c
332
ret = PTR_ERR(gpiomtd->ale);
drivers/mtd/nand/raw/gpio.c
336
gpiomtd->cle = devm_gpiod_get(dev, "cle", GPIOD_OUT_LOW);
drivers/mtd/nand/raw/gpio.c
337
if (IS_ERR(gpiomtd->cle)) {
drivers/mtd/nand/raw/gpio.c
338
ret = PTR_ERR(gpiomtd->cle);
drivers/mtd/nand/raw/gpio.c
342
gpiomtd->rdy = devm_gpiod_get_optional(dev, "rdy", GPIOD_IN);
drivers/mtd/nand/raw/gpio.c
343
if (IS_ERR(gpiomtd->rdy)) {
drivers/mtd/nand/raw/gpio.c
344
ret = PTR_ERR(gpiomtd->rdy);
drivers/mtd/nand/raw/gpio.c
348
nand_controller_init(&gpiomtd->base);
drivers/mtd/nand/raw/gpio.c
349
gpiomtd->base.ops = &gpio_nand_ops;
drivers/mtd/nand/raw/gpio.c
352
chip->options = gpiomtd->plat.options;
drivers/mtd/nand/raw/gpio.c
353
chip->controller = &gpiomtd->base;
drivers/mtd/nand/raw/gpio.c
358
platform_set_drvdata(pdev, gpiomtd);
drivers/mtd/nand/raw/gpio.c
361
if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp))
drivers/mtd/nand/raw/gpio.c
362
gpiod_direction_output(gpiomtd->nwp, 1);
drivers/mtd/nand/raw/gpio.c
375
if (gpiomtd->plat.adjust_parts)
drivers/mtd/nand/raw/gpio.c
376
gpiomtd->plat.adjust_parts(&gpiomtd->plat, mtd->size);
drivers/mtd/nand/raw/gpio.c
378
ret = mtd_device_register(mtd, gpiomtd->plat.parts,
drivers/mtd/nand/raw/gpio.c
379
gpiomtd->plat.num_parts);
drivers/mtd/nand/raw/gpio.c
384
if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp))
drivers/mtd/nand/raw/gpio.c
385
gpiod_set_value(gpiomtd->nwp, 0);
drivers/mtd/nand/raw/gpio.c
387
if (gpiomtd->nce && !IS_ERR(gpiomtd->nce))
drivers/mtd/nand/raw/gpio.c
388
gpiod_set_value(gpiomtd->nce, 0);
drivers/mtd/nand/raw/gpio.c
43
static inline struct gpiomtd *gpio_nand_getpriv(struct mtd_info *mtd)
drivers/mtd/nand/raw/gpio.c
45
return container_of(mtd_to_nand(mtd), struct gpiomtd, nand_chip);
drivers/mtd/nand/raw/gpio.c
57
static void gpio_nand_dosync(struct gpiomtd *gpiomtd)
drivers/mtd/nand/raw/gpio.c
61
if (gpiomtd->io_sync) {
drivers/mtd/nand/raw/gpio.c
67
tmp = readl(gpiomtd->io_sync);
drivers/mtd/nand/raw/gpio.c
72
static inline void gpio_nand_dosync(struct gpiomtd *gpiomtd) {}
drivers/mtd/nand/raw/gpio.c
78
struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip));
drivers/mtd/nand/raw/gpio.c
83
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
84
gpiod_set_value(gpiomtd->cle, 1);
drivers/mtd/nand/raw/gpio.c
85
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
86
writeb(instr->ctx.cmd.opcode, gpiomtd->io);
drivers/mtd/nand/raw/gpio.c
87
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
88
gpiod_set_value(gpiomtd->cle, 0);
drivers/mtd/nand/raw/gpio.c
92
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
93
gpiod_set_value(gpiomtd->ale, 1);
drivers/mtd/nand/raw/gpio.c
94
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
96
writeb(instr->ctx.addr.addrs[i], gpiomtd->io);
drivers/mtd/nand/raw/gpio.c
97
gpio_nand_dosync(gpiomtd);
drivers/mtd/nand/raw/gpio.c
98
gpiod_set_value(gpiomtd->ale, 0);