Searched refs:ltq_mtd (Results 1 - 1 of 1) sorted by relevance
/linux-4.4.14/drivers/mtd/maps/ |
H A D | lantiq-flash.c | 41 struct ltq_mtd { struct 114 struct ltq_mtd *ltq_mtd; ltq_mtd_probe() local 124 ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL); ltq_mtd_probe() 125 if (!ltq_mtd) ltq_mtd_probe() 128 platform_set_drvdata(pdev, ltq_mtd); ltq_mtd_probe() 130 ltq_mtd->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ltq_mtd_probe() 131 if (!ltq_mtd->res) { ltq_mtd_probe() 136 ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info), ltq_mtd_probe() 138 if (!ltq_mtd->map) ltq_mtd_probe() 141 ltq_mtd->map->phys = ltq_mtd->res->start; ltq_mtd_probe() 142 ltq_mtd->map->size = resource_size(ltq_mtd->res); ltq_mtd_probe() 143 ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); ltq_mtd_probe() 144 if (IS_ERR(ltq_mtd->map->virt)) ltq_mtd_probe() 145 return PTR_ERR(ltq_mtd->map->virt); ltq_mtd_probe() 147 ltq_mtd->map->name = ltq_map_name; ltq_mtd_probe() 148 ltq_mtd->map->bankwidth = 2; ltq_mtd_probe() 149 ltq_mtd->map->read = ltq_read16; ltq_mtd_probe() 150 ltq_mtd->map->write = ltq_write16; ltq_mtd_probe() 151 ltq_mtd->map->copy_from = ltq_copy_from; ltq_mtd_probe() 152 ltq_mtd->map->copy_to = ltq_copy_to; ltq_mtd_probe() 154 ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING; ltq_mtd_probe() 155 ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map); ltq_mtd_probe() 156 ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL; ltq_mtd_probe() 158 if (!ltq_mtd->mtd) { ltq_mtd_probe() 163 ltq_mtd->mtd->dev.parent = &pdev->dev; ltq_mtd_probe() 165 cfi = ltq_mtd->map->fldrv_priv; ltq_mtd_probe() 170 err = mtd_device_parse_register(ltq_mtd->mtd, NULL, &ppdata, NULL, 0); ltq_mtd_probe() 179 map_destroy(ltq_mtd->mtd); ltq_mtd_probe() 186 struct ltq_mtd *ltq_mtd = platform_get_drvdata(pdev); ltq_mtd_remove() local 188 if (ltq_mtd && ltq_mtd->mtd) { ltq_mtd_remove() 189 mtd_device_unregister(ltq_mtd->mtd); ltq_mtd_remove() 190 map_destroy(ltq_mtd->mtd); ltq_mtd_remove()
|
Completed in 38 milliseconds