summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/eon.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-04-13 22:04:11 +0200
committerWolfgang Denk <wd@denx.de>2011-04-13 22:04:11 +0200
commitf16b608ae7d0c4611d3a41d2570616a498e64d4c (patch)
tree213c9f261e590c22f21683a619d997a895ada35b /drivers/mtd/spi/eon.c
parent107b56bdd8e82b07458df11f8df4a01067512281 (diff)
parent1c091f59a03af9f2e821cb054fd555a2748dd091 (diff)
downloadu-boot-imx-f16b608ae7d0c4611d3a41d2570616a498e64d4c.zip
u-boot-imx-f16b608ae7d0c4611d3a41d2570616a498e64d4c.tar.gz
u-boot-imx-f16b608ae7d0c4611d3a41d2570616a498e64d4c.tar.bz2
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin
Diffstat (limited to 'drivers/mtd/spi/eon.c')
-rw-r--r--drivers/mtd/spi/eon.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mtd/spi/eon.c b/drivers/mtd/spi/eon.c
index 01caed5..e3de3aa 100644
--- a/drivers/mtd/spi/eon.c
+++ b/drivers/mtd/spi/eon.c
@@ -119,13 +119,9 @@ static int eon_write(struct spi_flash *flash,
return ret;
}
-int eon_erase(struct spi_flash *flash, u32 offset, size_t len)
+static int eon_erase(struct spi_flash *flash, u32 offset, size_t len)
{
- struct eon_spi_flash *eon = to_eon_spi_flash(flash);
- return spi_flash_cmd_erase(flash, CMD_EN25Q128_BE,
- eon->params->page_size * eon->params->pages_per_sector *
- eon->params->sectors_per_block;
- offset, len);
+ return spi_flash_cmd_erase(flash, CMD_EN25Q128_BE, offset, len);
}
struct spi_flash *spi_flash_probe_eon(struct spi_slave *spi, u8 *idcode)
@@ -158,11 +154,10 @@ struct spi_flash *spi_flash_probe_eon(struct spi_slave *spi, u8 *idcode)
eon->flash.write = eon_write;
eon->flash.erase = eon_erase;
eon->flash.read = spi_flash_cmd_read_fast;
+ eon->flash.sector_size = params->page_size * params->pages_per_sector
+ * params->sectors_per_block;
eon->flash.size = params->page_size * params->pages_per_sector
* params->nr_sectors;
- debug("SF: Detected %s with page size %u, total %u bytes\n",
- params->name, params->page_size, eon->flash.size);
-
return &eon->flash;
}