diff options
author | Wolfgang Denk <wd@denx.de> | 2011-04-13 22:04:11 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-04-13 22:04:11 +0200 |
commit | f16b608ae7d0c4611d3a41d2570616a498e64d4c (patch) | |
tree | 213c9f261e590c22f21683a619d997a895ada35b /drivers/mtd/spi/eon.c | |
parent | 107b56bdd8e82b07458df11f8df4a01067512281 (diff) | |
parent | 1c091f59a03af9f2e821cb054fd555a2748dd091 (diff) | |
download | u-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.c | 13 |
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; } |