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/winbond.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/winbond.c')
-rw-r--r-- | drivers/mtd/spi/winbond.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index e88802f..e8d30ae 100644 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -170,12 +170,9 @@ out: return ret; } -int winbond_erase(struct spi_flash *flash, u32 offset, size_t len) +static int winbond_erase(struct spi_flash *flash, u32 offset, size_t len) { - struct winbond_spi_flash *stm = to_winbond_spi_flash(flash); - return spi_flash_cmd_erase(flash, CMD_W25_SE, - (1 << stm->params->l2_page_size) * stm->params->pages_per_sector, - offset, len); + return spi_flash_cmd_erase(flash, CMD_W25_SE, offset, len); } struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) @@ -213,13 +210,11 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) stm->flash.write = winbond_write; stm->flash.erase = winbond_erase; stm->flash.read = spi_flash_cmd_read_fast; + stm->flash.sector_size = (1 << stm->params->l2_page_size) * + stm->params->pages_per_sector; stm->flash.size = page_size * params->pages_per_sector * params->sectors_per_block * params->nr_blocks; - printf("SF: Detected %s with page size %u, total ", - params->name, page_size); - print_size(stm->flash.size, "\n"); - return &stm->flash; } |