Lines Matching refs:ncfg

179 	struct lpc32xx_nand_cfg_mlc	*ncfg;  member
255 tmp |= MLCTIMEREG_TCEA_DELAY(clkrate / host->ncfg->tcea_delay + 1); in lpc32xx_nand_setup()
256 tmp |= MLCTIMEREG_BUSY_DELAY(clkrate / host->ncfg->busy_delay + 1); in lpc32xx_nand_setup()
257 tmp |= MLCTIMEREG_NAND_TA(clkrate / host->ncfg->nand_ta + 1); in lpc32xx_nand_setup()
258 tmp |= MLCTIMEREG_RD_HIGH(clkrate / host->ncfg->rd_high + 1); in lpc32xx_nand_setup()
259 tmp |= MLCTIMEREG_RD_LOW(clkrate / host->ncfg->rd_low); in lpc32xx_nand_setup()
260 tmp |= MLCTIMEREG_WR_HIGH(clkrate / host->ncfg->wr_high + 1); in lpc32xx_nand_setup()
261 tmp |= MLCTIMEREG_WR_LOW(clkrate / host->ncfg->wr_low); in lpc32xx_nand_setup()
371 if (gpio_is_valid(host->ncfg->wp_gpio)) in lpc32xx_wp_enable()
372 gpio_set_value(host->ncfg->wp_gpio, 0); in lpc32xx_wp_enable()
380 if (gpio_is_valid(host->ncfg->wp_gpio)) in lpc32xx_wp_disable()
381 gpio_set_value(host->ncfg->wp_gpio, 1); in lpc32xx_wp_disable()
612 struct lpc32xx_nand_cfg_mlc *ncfg; in lpc32xx_parse_dt() local
615 ncfg = devm_kzalloc(dev, sizeof(*ncfg), GFP_KERNEL); in lpc32xx_parse_dt()
616 if (!ncfg) in lpc32xx_parse_dt()
619 of_property_read_u32(np, "nxp,tcea-delay", &ncfg->tcea_delay); in lpc32xx_parse_dt()
620 of_property_read_u32(np, "nxp,busy-delay", &ncfg->busy_delay); in lpc32xx_parse_dt()
621 of_property_read_u32(np, "nxp,nand-ta", &ncfg->nand_ta); in lpc32xx_parse_dt()
622 of_property_read_u32(np, "nxp,rd-high", &ncfg->rd_high); in lpc32xx_parse_dt()
623 of_property_read_u32(np, "nxp,rd-low", &ncfg->rd_low); in lpc32xx_parse_dt()
624 of_property_read_u32(np, "nxp,wr-high", &ncfg->wr_high); in lpc32xx_parse_dt()
625 of_property_read_u32(np, "nxp,wr-low", &ncfg->wr_low); in lpc32xx_parse_dt()
627 if (!ncfg->tcea_delay || !ncfg->busy_delay || !ncfg->nand_ta || in lpc32xx_parse_dt()
628 !ncfg->rd_high || !ncfg->rd_low || !ncfg->wr_high || in lpc32xx_parse_dt()
629 !ncfg->wr_low) { in lpc32xx_parse_dt()
634 ncfg->wp_gpio = of_get_named_gpio(np, "gpios", 0); in lpc32xx_parse_dt()
636 return ncfg; in lpc32xx_parse_dt()
666 host->ncfg = lpc32xx_parse_dt(&pdev->dev); in lpc32xx_nand_probe()
667 if (!host->ncfg) { in lpc32xx_nand_probe()
672 if (host->ncfg->wp_gpio == -EPROBE_DEFER) in lpc32xx_nand_probe()
674 if (gpio_is_valid(host->ncfg->wp_gpio) && in lpc32xx_nand_probe()
675 gpio_request(host->ncfg->wp_gpio, "NAND WP")) { in lpc32xx_nand_probe()
790 res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts, in lpc32xx_nand_probe()
791 host->ncfg->num_parts); in lpc32xx_nand_probe()
807 gpio_free(host->ncfg->wp_gpio); in lpc32xx_nand_probe()
829 gpio_free(host->ncfg->wp_gpio); in lpc32xx_nand_remove()