aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index e812df607a5c..fcd1aeccdf93 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -82,9 +82,8 @@ static struct mtd_info *cfi_intelext_setup (struct mtd_info *);
82static int cfi_intelext_partition_fixup(struct mtd_info *, struct cfi_private **); 82static int cfi_intelext_partition_fixup(struct mtd_info *, struct cfi_private **);
83 83
84static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, 84static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len,
85 size_t *retlen, u_char **mtdbuf); 85 size_t *retlen, void **virt, resource_size_t *phys);
86static void cfi_intelext_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, 86static void cfi_intelext_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
87 size_t len);
88 87
89static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode); 88static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
90static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode); 89static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
@@ -1240,7 +1239,8 @@ static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t a
1240 return ret; 1239 return ret;
1241} 1240}
1242 1241
1243static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf) 1242static int cfi_intelext_point(struct mtd_info *mtd, loff_t from, size_t len,
1243 size_t *retlen, void **virt, resource_size_t *phys)
1244{ 1244{
1245 struct map_info *map = mtd->priv; 1245 struct map_info *map = mtd->priv;
1246 struct cfi_private *cfi = map->fldrv_priv; 1246 struct cfi_private *cfi = map->fldrv_priv;
@@ -1257,8 +1257,10 @@ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, si
1257 chipnum = (from >> cfi->chipshift); 1257 chipnum = (from >> cfi->chipshift);
1258 ofs = from - (chipnum << cfi->chipshift); 1258 ofs = from - (chipnum << cfi->chipshift);
1259 1259
1260 *mtdbuf = (void *)map->virt + cfi->chips[chipnum].start + ofs; 1260 *virt = map->virt + cfi->chips[chipnum].start + ofs;
1261 *retlen = 0; 1261 *retlen = 0;
1262 if (phys)
1263 *phys = map->phys + cfi->chips[chipnum].start + ofs;
1262 1264
1263 while (len) { 1265 while (len) {
1264 unsigned long thislen; 1266 unsigned long thislen;
@@ -1291,7 +1293,7 @@ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, si
1291 return 0; 1293 return 0;
1292} 1294}
1293 1295
1294static void cfi_intelext_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) 1296static void cfi_intelext_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
1295{ 1297{
1296 struct map_info *map = mtd->priv; 1298 struct map_info *map = mtd->priv;
1297 struct cfi_private *cfi = map->fldrv_priv; 1299 struct cfi_private *cfi = map->fldrv_priv;