Lines Matching full:lpddr
3 * LPDDR flash memory device operations. This module provides read, write,
4 * erase, lock/unlock support for LPDDR flash memories
37 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_cmdset() local
64 mtd->size = 1ULL << lpddr->qinfo->DevSizeShift; in lpddr_cmdset()
65 mtd->erasesize = 1 << lpddr->qinfo->UniformBlockSizeShift; in lpddr_cmdset()
66 mtd->writesize = 1 << lpddr->qinfo->BufSizeShift; in lpddr_cmdset()
68 shared = kmalloc_array(lpddr->numchips, sizeof(struct flchip_shared), in lpddr_cmdset()
75 chip = &lpddr->chips[0]; in lpddr_cmdset()
76 numchips = lpddr->numchips / lpddr->qinfo->HWPartsNum; in lpddr_cmdset()
80 for (j = 0; j < lpddr->qinfo->HWPartsNum; j++) { in lpddr_cmdset()
81 *chip = lpddr->chips[i]; in lpddr_cmdset()
82 chip->start += j << lpddr->chipshift; in lpddr_cmdset()
296 struct lpddr_private *lpddr = map->fldrv_priv; in chip_ready() local
310 if (!lpddr->qinfo->SuspEraseSupp || in chip_ready()
407 struct lpddr_private *lpddr = map->fldrv_priv; in do_write_buffer() local
414 wbufsize = 1 << lpddr->qinfo->BufSizeShift; in do_write_buffer()
469 ret = wait_for_ready(map, chip, (1<<lpddr->qinfo->ProgBufferTime)); in do_write_buffer()
484 struct lpddr_private *lpddr = map->fldrv_priv; in do_erase_oneblock() local
485 int chipnum = adr >> lpddr->chipshift; in do_erase_oneblock()
486 struct flchip *chip = &lpddr->chips[chipnum]; in do_erase_oneblock()
497 ret = wait_for_ready(map, chip, (1<<lpddr->qinfo->BlockEraseTime)*1000); in do_erase_oneblock()
512 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_read() local
513 int chipnum = adr >> lpddr->chipshift; in lpddr_read()
514 struct flchip *chip = &lpddr->chips[chipnum]; in lpddr_read()
536 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_point() local
537 int chipnum = adr >> lpddr->chipshift; in lpddr_point()
539 struct flchip *chip = &lpddr->chips[chipnum]; in lpddr_point()
546 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_point()
552 if (chipnum >= lpddr->numchips) in lpddr_point()
561 if ((len + ofs - 1) >> lpddr->chipshift) in lpddr_point()
562 thislen = (1<<lpddr->chipshift) - ofs; in lpddr_point()
578 last_end += 1 << lpddr->chipshift; in lpddr_point()
580 chip = &lpddr->chips[chipnum]; in lpddr_point()
588 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_unpoint() local
589 int chipnum = adr >> lpddr->chipshift, err = 0; in lpddr_unpoint()
593 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_unpoint()
599 chip = &lpddr->chips[chipnum]; in lpddr_unpoint()
600 if (chipnum >= lpddr->numchips) in lpddr_unpoint()
603 if ((len + ofs - 1) >> lpddr->chipshift) in lpddr_unpoint()
604 thislen = (1<<lpddr->chipshift) - ofs; in lpddr_unpoint()
646 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_writev() local
650 int wbufsize = 1 << lpddr->qinfo->BufSizeShift; in lpddr_writev()
659 chipnum = to >> lpddr->chipshift; in lpddr_writev()
671 ret = do_write_buffer(map, &lpddr->chips[chipnum], in lpddr_writev()
694 struct lpddr_private *lpddr = map->fldrv_priv; in lpddr_erase() local
695 int size = 1 << lpddr->qinfo->UniformBlockSizeShift; in lpddr_erase()
717 struct lpddr_private *lpddr = map->fldrv_priv; in do_xxlock() local
718 int chipnum = adr >> lpddr->chipshift; in do_xxlock()
719 struct flchip *chip = &lpddr->chips[chipnum]; in do_xxlock()
760 MODULE_DESCRIPTION("MTD driver for LPDDR flash chips");