Lines Matching refs:lpddr
20 static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr);
24 struct lpddr_private *lpddr);
91 static int lpddr_pfow_present(struct map_info *map, struct lpddr_private *lpddr) in lpddr_pfow_present() argument
120 static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr) in lpddr_chip_setup() argument
123 lpddr->qinfo = kzalloc(sizeof(struct qinfo_chip), GFP_KERNEL); in lpddr_chip_setup()
124 if (!lpddr->qinfo) in lpddr_chip_setup()
128 lpddr->ManufactId = CMDVAL(map_read(map, map->pfow_base + PFOW_MANUFACTURER_ID)); in lpddr_chip_setup()
130 lpddr->DevId = CMDVAL(map_read(map, map->pfow_base + PFOW_DEVICE_ID)); in lpddr_chip_setup()
132 lpddr->qinfo->DevSizeShift = lpddr_info_query(map, "DevSizeShift"); in lpddr_chip_setup()
133 lpddr->qinfo->TotalBlocksNum = lpddr_info_query(map, "TotalBlocksNum"); in lpddr_chip_setup()
134 lpddr->qinfo->BufSizeShift = lpddr_info_query(map, "BufSizeShift"); in lpddr_chip_setup()
135 lpddr->qinfo->HWPartsNum = lpddr_info_query(map, "HWPartsNum"); in lpddr_chip_setup()
136 lpddr->qinfo->UniformBlockSizeShift = in lpddr_chip_setup()
138 lpddr->qinfo->SuspEraseSupp = lpddr_info_query(map, "SuspEraseSupp"); in lpddr_chip_setup()
139 lpddr->qinfo->SingleWordProgTime = in lpddr_chip_setup()
141 lpddr->qinfo->ProgBufferTime = lpddr_info_query(map, "ProgBufferTime"); in lpddr_chip_setup()
142 lpddr->qinfo->BlockEraseTime = lpddr_info_query(map, "BlockEraseTime"); in lpddr_chip_setup()
147 struct lpddr_private lpddr; in lpddr_probe_chip() local
158 memset(&lpddr, 0, sizeof(struct lpddr_private)); in lpddr_probe_chip()
159 if (!lpddr_pfow_present(map, &lpddr)) in lpddr_probe_chip()
162 if (!lpddr_chip_setup(map, &lpddr)) in lpddr_probe_chip()
166 lpddr.chipshift = lpddr.qinfo->DevSizeShift; in lpddr_probe_chip()
167 lpddr.numchips = 1; in lpddr_probe_chip()
169 numvirtchips = lpddr.numchips * lpddr.qinfo->HWPartsNum; in lpddr_probe_chip()
175 memcpy(retlpddr, &lpddr, sizeof(struct lpddr_private)); in lpddr_probe_chip()
187 struct lpddr_private *lpddr; in lpddr_probe() local
190 lpddr = lpddr_probe_chip(map); in lpddr_probe()
191 if (!lpddr) in lpddr_probe()
194 map->fldrv_priv = lpddr; in lpddr_probe()
206 kfree(lpddr->qinfo); in lpddr_probe()
207 kfree(lpddr); in lpddr_probe()