Lines Matching refs:this
73 * You will see a DMA timeout in this case. The bug has been fixed
76 * To avoid this bug, just add a new parameter `just_enable` for
121 static int __gpmi_enable_clk(struct gpmi_nand_data *this, bool v)
128 clk = this->resources.clock[i];
144 clk_disable_unprepare(this->resources.clock[i - 1]);
148 static int gpmi_init(struct gpmi_nand_data *this)
150 struct resources *r = &this->resources;
153 ret = pm_runtime_resume_and_get(this->dev);
165 ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MXS(this));
191 pm_runtime_mark_last_busy(this->dev);
192 pm_runtime_put_autosuspend(this->dev);
197 static void gpmi_dump_info(struct gpmi_nand_data *this)
199 struct resources *r = &this->resources;
200 struct bch_geometry *geo = &this->bch_geometry;
204 dev_err(this->dev, "Show GPMI registers :\n");
207 dev_err(this->dev, "offset 0x%.3x : 0x%.8x\n", i * 0x10, reg);
211 dev_err(this->dev, "Show BCH registers :\n");
214 dev_err(this->dev, "offset 0x%.3x : 0x%.8x\n", i * 0x10, reg);
216 dev_err(this->dev, "BCH Geometry :\n"
243 static bool gpmi_check_ecc(struct gpmi_nand_data *this)
245 struct nand_chip *chip = &this->nand;
246 struct bch_geometry *geo = &this->bch_geometry;
254 if (GPMI_IS_MXS(this)) {
260 if (geo->ecc_strength > this->devdata->bch_max_ecc_strength)
270 static bool bbm_in_data_chunk(struct gpmi_nand_data *this,
273 struct bch_geometry *geo = &this->bch_geometry;
274 struct nand_chip *chip = &this->nand;
279 dev_err(this->dev,
294 dev_dbg(this->dev, "Set ecc to %d and bbm in chunk %d\n",
306 * We may have available oob space in this case.
308 static int set_geometry_by_ecc_info(struct gpmi_nand_data *this,
312 struct bch_geometry *geo = &this->bch_geometry;
313 struct nand_chip *chip = &this->nand;
325 dev_err(this->dev,
334 if (!gpmi_check_ecc(this))
339 dev_err(this->dev,
407 if (!this->swap_block_mark)
438 static inline int get_ecc_strength(struct gpmi_nand_data *this)
440 struct bch_geometry *geo = &this->bch_geometry;
441 struct mtd_info *mtd = nand_to_mtd(&this->nand);
451 static int set_geometry_for_large_oob(struct gpmi_nand_data *this)
453 struct bch_geometry *geo = &this->bch_geometry;
454 struct nand_chip *chip = &this->nand;
469 /* check if platform can support this nand */
470 if (!gpmi_check_ecc(this)) {
471 dev_err(this->dev,
483 max_ecc = min(get_ecc_strength(this),
484 this->devdata->bch_max_ecc_strength);
492 if (bbm_in_data_chunk(this, &bbm_chunk))
504 /* check if oob can afford this extra ecc chunk */
507 dev_err(this->dev, "unsupported NAND chip with new layout\n");
533 if (!this->swap_block_mark)
546 dev_dbg(this->dev, "BCH Geometry :\n"
579 static int legacy_set_geometry(struct gpmi_nand_data *this)
581 struct bch_geometry *geo = &this->bch_geometry;
582 struct mtd_info *mtd = nand_to_mtd(&this->nand);
609 geo->ecc_strength = get_ecc_strength(this);
610 if (!gpmi_check_ecc(this)) {
611 dev_err(this->dev,
615 this->devdata->bch_max_ecc_strength);
635 if (!this->swap_block_mark)
693 static int common_nfc_set_geometry(struct gpmi_nand_data *this)
695 struct nand_chip *chip = &this->nand;
696 struct mtd_info *mtd = nand_to_mtd(&this->nand);
702 use_minimun_ecc = of_property_read_bool(this->dev->of_node,
708 dev_dbg(this->dev, "use legacy bch geometry\n");
709 err = legacy_set_geometry(this);
716 dev_dbg(this->dev, "use large oob bch geometry\n");
717 err = set_geometry_for_large_oob(this);
723 dev_dbg(this->dev, "use minimum ecc bch geometry\n");
724 err = set_geometry_by_ecc_info(this, requirements->strength,
727 dev_err(this->dev, "none of the bch geometry setting works\n");
733 static int bch_set_geometry(struct gpmi_nand_data *this)
735 struct resources *r = &this->resources;
738 ret = common_nfc_set_geometry(this);
742 ret = pm_runtime_resume_and_get(this->dev);
748 * Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this
752 ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MXS(this));
761 pm_runtime_mark_last_busy(this->dev);
762 pm_runtime_put_autosuspend(this->dev);
841 static int gpmi_nfc_compute_timings(struct gpmi_nand_data *this,
844 struct gpmi_nfc_hardware_timing *hw = &this->hw;
845 struct resources *r = &this->resources;
846 unsigned int dll_threshold_ps = this->devdata->max_chain_delay;
876 dev_err(this->dev, "clock setting: expected %ld, got %ld\n",
926 static int gpmi_nfc_apply_timings(struct gpmi_nand_data *this)
928 struct gpmi_nfc_hardware_timing *hw = &this->hw;
929 struct resources *r = &this->resources;
938 if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this))
943 dev_err(this->dev, "cannot set clock rate to %lu Hz: %d\n", hw->clk_rate, ret);
947 if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this)) {
977 struct gpmi_nand_data *this = nand_get_controller_data(chip);
987 if (sdr->tRC_min <= 25000 && !this->devdata->support_edo_timing)
990 /* Stop here if this call was just a check */
995 ret = gpmi_nfc_compute_timings(this, sdr);
999 this->hw.must_apply_timings = true;
1005 static void gpmi_clear_bch(struct gpmi_nand_data *this)
1007 struct resources *r = &this->resources;
1011 static struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)
1014 return this->dma_chans[0];
1020 struct gpmi_nand_data *this = param;
1021 struct completion *dma_c = &this->dma_done;
1028 struct gpmi_nand_data *this = cookie;
1030 gpmi_clear_bch(this);
1031 complete(&this->bch_done);
1035 static int gpmi_raw_len_to_len(struct gpmi_nand_data *this, int raw_len)
1041 if (this->bch)
1042 return ALIGN_DOWN(raw_len, this->bch_geometry.eccn_chunk_size);
1048 static bool prepare_data_dma(struct gpmi_nand_data *this, const void *buf,
1053 int len = gpmi_raw_len_to_len(this, raw_len);
1058 ret = dma_map_sg(this->dev, sgl, 1, dr);
1067 sg_init_one(sgl, this->data_buffer_dma, len);
1069 if (dr == DMA_TO_DEVICE && buf != this->data_buffer_dma)
1070 memcpy(this->data_buffer_dma, buf, len);
1072 dma_map_sg(this->dev, sgl, 1, dr);
1094 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1095 struct bch_geometry *geo = &this->bch_geometry;
1110 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1111 struct bch_geometry *geo = &this->bch_geometry;
1199 static int acquire_register_block(struct gpmi_nand_data *this,
1202 struct platform_device *pdev = this->pdev;
1203 struct resources *res = &this->resources;
1215 dev_err(this->dev, "unknown resource name : %s\n", res_name);
1220 static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
1222 struct platform_device *pdev = this->pdev;
1230 err = devm_request_irq(this->dev, err, irq_h, 0, res_name, this);
1232 dev_err(this->dev, "error requesting BCH IRQ\n");
1237 static void release_dma_channels(struct gpmi_nand_data *this)
1241 if (this->dma_chans[i]) {
1242 dma_release_channel(this->dma_chans[i]);
1243 this->dma_chans[i] = NULL;
1247 static int acquire_dma_channels(struct gpmi_nand_data *this)
1249 struct platform_device *pdev = this->pdev;
1256 ret = dev_err_probe(this->dev, PTR_ERR(dma_chan),
1258 release_dma_channels(this);
1260 this->dma_chans[0] = dma_chan;
1266 static int gpmi_get_clks(struct gpmi_nand_data *this)
1268 struct resources *r = &this->resources;
1272 for (i = 0; i < this->devdata->clks_count; i++) {
1273 clk = devm_clk_get(this->dev, this->devdata->clks[i]);
1285 dev_dbg(this->dev, "failed in finding the clocks.\n");
1289 static int acquire_resources(struct gpmi_nand_data *this)
1293 ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME);
1297 ret = acquire_register_block(this, GPMI_NAND_BCH_REGS_ADDR_RES_NAME);
1301 ret = acquire_bch_irq(this, bch_irq);
1305 ret = acquire_dma_channels(this);
1309 ret = gpmi_get_clks(this);
1315 release_dma_channels(this);
1320 static void release_resources(struct gpmi_nand_data *this)
1322 release_dma_channels(this);
1325 static void gpmi_free_dma_buffer(struct gpmi_nand_data *this)
1327 struct device *dev = this->dev;
1328 struct bch_geometry *geo = &this->bch_geometry;
1330 if (this->auxiliary_virt && virt_addr_valid(this->auxiliary_virt))
1332 this->auxiliary_virt,
1333 this->auxiliary_phys);
1334 kfree(this->data_buffer_dma);
1335 kfree(this->raw_buffer);
1337 this->data_buffer_dma = NULL;
1338 this->raw_buffer = NULL;
1342 static int gpmi_alloc_dma_buffer(struct gpmi_nand_data *this)
1344 struct bch_geometry *geo = &this->bch_geometry;
1345 struct device *dev = this->dev;
1346 struct mtd_info *mtd = nand_to_mtd(&this->nand);
1356 this->data_buffer_dma = kzalloc(mtd->writesize ?: PAGE_SIZE,
1358 if (this->data_buffer_dma == NULL)
1361 this->auxiliary_virt = dma_alloc_coherent(dev, geo->auxiliary_size,
1362 &this->auxiliary_phys, GFP_DMA);
1363 if (!this->auxiliary_virt)
1366 this->raw_buffer = kzalloc((mtd->writesize ?: PAGE_SIZE) + mtd->oobsize, GFP_KERNEL);
1367 if (!this->raw_buffer)
1373 gpmi_free_dma_buffer(this);
1382 static void block_mark_swapping(struct gpmi_nand_data *this,
1385 struct bch_geometry *nfc_geo = &this->bch_geometry;
1393 if (!this->swap_block_mark)
1428 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1429 struct bch_geometry *nfc_geo = &this->bch_geometry;
1436 status = this->auxiliary_virt + ALIGN(meta, 4);
1444 u8 *eccbuf = this->raw_buffer;
1477 * nothing was written into this subpage the ECC is
1479 * at this point that we are reading an erased page and
1481 * ecc_strength bitflips. If this is a page with random
1482 * data, we exceed this number of bitflips and have a
1491 this->auxiliary_virt,
1521 static void gpmi_bch_layout_std(struct gpmi_nand_data *this)
1523 struct bch_geometry *geo = &this->bch_geometry;
1529 this->bch_flashlayout0 =
1532 BF_BCH_FLASH0LAYOUT0_ECC0(ecc_strength, this) |
1533 BF_BCH_FLASH0LAYOUT0_GF(gf_len, this) |
1534 BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(block0_size, this);
1536 this->bch_flashlayout1 =
1538 BF_BCH_FLASH0LAYOUT1_ECCN(ecc_strength, this) |
1539 BF_BCH_FLASH0LAYOUT1_GF(gf_len, this) |
1540 BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(blockn_size, this);
1546 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1548 struct bch_geometry *geo = &this->bch_geometry;
1552 gpmi_bch_layout_std(this);
1553 this->bch = true;
1564 block_mark_swapping(this, buf, this->auxiliary_virt);
1578 chip->oob_poi[0] = ((uint8_t *)this->auxiliary_virt)[0];
1588 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1589 struct bch_geometry *geo = &this->bch_geometry;
1606 if (this->swap_block_mark) {
1609 * If this chunk is in the range of [first, last],
1616 dev_dbg(this->dev,
1654 this->bch_flashlayout0 = BF_BCH_FLASH0LAYOUT0_NBLOCKS(
1657 BF_BCH_FLASH0LAYOUT0_ECC0(ecc_strength, this) |
1658 BF_BCH_FLASH0LAYOUT0_GF(geo->gf_len, this) |
1660 0 : geo->ecc0_chunk_size), this);
1662 this->bch_flashlayout1 = BF_BCH_FLASH0LAYOUT1_PAGE_SIZE(page_size) |
1663 BF_BCH_FLASH0LAYOUT1_ECCN(ecc_strength, this) |
1664 BF_BCH_FLASH0LAYOUT1_GF(geo->gf_len, this) |
1665 BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(geo->eccn_chunk_size, this);
1667 this->bch = true;
1673 dev_dbg(this->dev, "page:%d(%d:%d)%d, chunk:(%d:%d), BCH PG size:%d\n",
1685 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1686 struct bch_geometry *nfc_geo = &this->bch_geometry;
1688 dev_dbg(this->dev, "ecc write page.\n");
1690 gpmi_bch_layout_std(this);
1691 this->bch = true;
1693 memcpy(this->auxiliary_virt, chip->oob_poi, nfc_geo->auxiliary_size);
1695 if (this->swap_block_mark) {
1700 memcpy(this->data_buffer_dma, buf, mtd->writesize);
1701 buf = this->data_buffer_dma;
1702 block_mark_swapping(this, this->data_buffer_dma,
1703 this->auxiliary_virt);
1710 * There are several places in this driver where we have to handle the OOB and
1712 * this is where we try to explain it all. All the other places refer back to
1733 * What we do for this specific read operation depends on two questions:
1772 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1789 if (GPMI_IS_MX23(this)) {
1832 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1833 struct bch_geometry *nfc_geo = &this->bch_geometry;
1836 u8 *tmp_buf = this->raw_buffer;
1853 * See the layout description for a detailed explanation on why this
1856 if (this->swap_block_mark)
1860 * Copy the metadata section into the oob buffer (this section is
1917 struct gpmi_nand_data *this = nand_get_controller_data(chip);
1918 struct bch_geometry *nfc_geo = &this->bch_geometry;
1921 u8 *tmp_buf = this->raw_buffer;
1974 * See the layout description for a detailed explanation on why this
1977 if (this->swap_block_mark)
1997 struct gpmi_nand_data *this = nand_get_controller_data(chip);
2005 column = !GPMI_IS_MX23(this) ? mtd->writesize : 0;
2008 block_mark = this->data_buffer_dma;
2021 static int nand_boot_set_geometry(struct gpmi_nand_data *this)
2023 struct boot_rom_geometry *geometry = &this->rom_geometry;
2028 * In principle, we should be reading this from the OTP bits, since
2038 * In principle, we should be reading this from the OTP bits, since
2048 static int mx23_check_transcription_stamp(struct gpmi_nand_data *this)
2050 struct boot_rom_geometry *rom_geo = &this->rom_geometry;
2051 struct device *dev = this->dev;
2052 struct nand_chip *chip = &this->nand;
2103 static int mx23_write_transcription_stamp(struct gpmi_nand_data *this)
2105 struct device *dev = this->dev;
2106 struct boot_rom_geometry *rom_geo = &this->rom_geometry;
2107 struct nand_chip *chip = &this->nand;
2139 /* Erase this block. */
2169 static int mx23_boot_init(struct gpmi_nand_data *this)
2171 struct device *dev = this->dev;
2172 struct nand_chip *chip = &this->nand;
2188 if (mx23_check_transcription_stamp(this))
2206 * Compute the chip, page and byte addresses for this block's
2224 * again, but this time the result will be a mark in the
2238 mx23_write_transcription_stamp(this);
2242 static int nand_boot_init(struct gpmi_nand_data *this)
2244 nand_boot_set_geometry(this);
2247 if (GPMI_IS_MX23(this))
2248 return mx23_boot_init(this);
2252 static int gpmi_set_geometry(struct gpmi_nand_data *this)
2257 gpmi_free_dma_buffer(this);
2260 ret = bch_set_geometry(this);
2262 dev_err(this->dev, "Error setting BCH geometry : %d\n", ret);
2267 return gpmi_alloc_dma_buffer(this);
2270 static int gpmi_init_last(struct gpmi_nand_data *this)
2272 struct nand_chip *chip = &this->nand;
2275 struct bch_geometry *bch_geo = &this->bch_geometry;
2279 ret = gpmi_set_geometry(this);
2302 if (GPMI_IS_MX6(this) &&
2313 struct gpmi_nand_data *this = nand_get_controller_data(chip);
2319 if (of_property_read_bool(this->dev->of_node,
2321 this->swap_block_mark = false;
2323 dev_dbg(this->dev, "Blockmark swapping %s\n",
2324 str_enabled_disabled(this->swap_block_mark));
2326 ret = gpmi_init_last(this);
2335 static struct gpmi_transfer *get_next_transfer(struct gpmi_nand_data *this)
2337 struct gpmi_transfer *transfer = &this->transfers[this->ntransfers];
2339 this->ntransfers++;
2341 if (this->ntransfers == GPMI_MAX_TRANSFERS)
2348 struct gpmi_nand_data *this, u8 cmd, const u8 *addr, int naddr)
2350 struct dma_chan *channel = get_dma_chan(this);
2353 int chip = this->nand.cur_cs;
2359 | BF_GPMI_CTRL0_CS(chip, this)
2360 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this)
2371 transfer = get_next_transfer(this);
2380 dma_map_sg(this->dev, &transfer->sgl, 1, DMA_TO_DEVICE);
2390 struct gpmi_nand_data *this)
2392 struct dma_chan *channel = get_dma_chan(this);
2397 | BF_GPMI_CTRL0_CS(this->nand.cur_cs, this)
2398 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this)
2408 struct gpmi_nand_data *this, void *buf, int raw_len, bool *direct)
2411 struct dma_chan *channel = get_dma_chan(this);
2415 transfer = get_next_transfer(this);
2421 *direct = prepare_data_dma(this, buf, raw_len, &transfer->sgl,
2426 | BF_GPMI_CTRL0_CS(this->nand.cur_cs, this)
2427 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this)
2431 if (this->bch) {
2438 pio[5] = this->auxiliary_phys;
2446 if (!this->bch)
2455 struct gpmi_nand_data *this, const void *buf, int raw_len)
2457 struct dma_chan *channel = get_dma_chan(this);
2462 transfer = get_next_transfer(this);
2468 prepare_data_dma(this, buf, raw_len, &transfer->sgl, DMA_TO_DEVICE);
2472 | BF_GPMI_CTRL0_CS(this->nand.cur_cs, this)
2473 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this)
2477 if (this->bch) {
2484 pio[5] = this->auxiliary_phys;
2489 (this->bch ? MXS_DMA_CTRL_WAIT4END : 0));
2493 if (!this->bch)
2506 struct gpmi_nand_data *this = nand_get_controller_data(chip);
2519 this->ntransfers = 0;
2521 this->transfers[i].direction = DMA_NONE;
2523 ret = pm_runtime_resume_and_get(this->dev);
2533 if (this->hw.must_apply_timings) {
2534 this->hw.must_apply_timings = false;
2535 ret = gpmi_nfc_apply_timings(this);
2540 dev_dbg(this->dev, "%s: %d instructions\n", __func__, op->ninstrs);
2549 desc = gpmi_chain_wait_ready(this);
2555 * When this command has an address cycle chain it
2562 desc = gpmi_chain_command(this, cmd, NULL, 0);
2566 desc = gpmi_chain_command(this, cmd, instr->ctx.addr.addrs,
2574 desc = gpmi_chain_data_write(this, buf_write, buf_len);
2584 desc = gpmi_chain_data_read(this, buf_read, buf_len,
2595 dev_dbg(this->dev, "%s setup done\n", __func__);
2598 dev_err(this->dev, "Multiple data instructions not supported\n");
2603 if (this->bch) {
2604 writel(this->bch_flashlayout0,
2605 this->resources.bch_regs + HW_BCH_FLASH0LAYOUT0);
2606 writel(this->bch_flashlayout1,
2607 this->resources.bch_regs + HW_BCH_FLASH0LAYOUT1);
2611 desc->callback_param = this;
2612 dma_completion = &this->dma_done;
2617 if (this->bch && buf_read) {
2619 this->resources.bch_regs + HW_BCH_CTRL_SET);
2620 bch_completion = &this->bch_done;
2625 dma_async_issue_pending(get_dma_chan(this));
2629 dev_err(this->dev, "DMA timeout, last DMA\n");
2630 gpmi_dump_info(this);
2635 if (this->bch && buf_read) {
2638 dev_err(this->dev, "BCH timeout, last DMA\n");
2639 gpmi_dump_info(this);
2646 this->resources.bch_regs + HW_BCH_CTRL_CLR);
2647 gpmi_clear_bch(this);
2652 for (i = 0; i < this->ntransfers; i++) {
2653 struct gpmi_transfer *transfer = &this->transfers[i];
2656 dma_unmap_sg(this->dev, &transfer->sgl, 1,
2661 memcpy(buf_read, this->data_buffer_dma,
2662 gpmi_raw_len_to_len(this, buf_len));
2664 this->bch = false;
2667 pm_runtime_mark_last_busy(this->dev);
2668 pm_runtime_put_autosuspend(this->dev);
2679 static int gpmi_nand_init(struct gpmi_nand_data *this)
2681 struct nand_chip *chip = &this->nand;
2687 mtd->dev.parent = this->dev;
2690 nand_set_controller_data(chip, this);
2691 nand_set_flash_node(chip, this->pdev->dev.of_node);
2697 this->swap_block_mark = !GPMI_IS_MX23(this);
2703 this->bch_geometry.payload_size = 1024;
2704 this->bch_geometry.auxiliary_size = 128;
2705 ret = gpmi_alloc_dma_buffer(this);
2709 nand_controller_init(&this->base);
2710 this->base.ops = &gpmi_nand_controller_ops;
2711 chip->controller = &this->base;
2713 ret = nand_scan(chip, GPMI_IS_MX6(this) ? 2 : 1);
2717 ret = nand_boot_init(this);
2732 gpmi_free_dma_buffer(this);
2749 struct gpmi_nand_data *this;
2752 this = devm_kzalloc(&pdev->dev, sizeof(*this), GFP_KERNEL);
2753 if (!this)
2756 this->devdata = of_device_get_match_data(&pdev->dev);
2757 platform_set_drvdata(pdev, this);
2758 this->pdev = pdev;
2759 this->dev = &pdev->dev;
2761 ret = acquire_resources(this);
2769 ret = gpmi_init(this);
2773 ret = gpmi_nand_init(this);
2777 dev_info(this->dev, "driver registered.\n");
2784 release_resources(this);
2792 struct gpmi_nand_data *this = platform_get_drvdata(pdev);
2793 struct nand_chip *chip = &this->nand;
2799 gpmi_free_dma_buffer(this);
2800 release_resources(this);
2817 struct gpmi_nand_data *this = dev_get_drvdata(dev);
2822 dev_err(this->dev, "Error in resume %d\n", ret);
2829 ret = gpmi_init(this);
2831 dev_err(this->dev, "Error setting GPMI : %d\n", ret);
2836 if (this->hw.clk_rate)
2837 this->hw.must_apply_timings = true;
2840 ret = bch_set_geometry(this);
2842 dev_err(this->dev, "Error setting BCH : %d\n", ret);
2854 struct gpmi_nand_data *this = dev_get_drvdata(dev);
2856 gpmi_disable_clk(this);
2863 struct gpmi_nand_data *this = dev_get_drvdata(dev);
2866 ret = gpmi_enable_clk(this);