diff options
author | Tom Rini <trini@ti.com> | 2013-03-20 14:55:10 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-03-20 14:55:10 -0400 |
commit | 8b906a9f0b3fd0d4421e08c4fa62f61a01289611 (patch) | |
tree | 049acc34fee9692c0c394b8d1697d97257c0a074 /drivers/mtd/spi/sst.c | |
parent | 3c47f2f4871c345c20b9d986b11fec550ef6cc9f (diff) | |
parent | 1e7133e99e27c4f02998e7eb87fa43424d48152b (diff) | |
download | u-boot-imx-8b906a9f0b3fd0d4421e08c4fa62f61a01289611.zip u-boot-imx-8b906a9f0b3fd0d4421e08c4fa62f61a01289611.tar.gz u-boot-imx-8b906a9f0b3fd0d4421e08c4fa62f61a01289611.tar.bz2 |
Merge branch 'spi' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'drivers/mtd/spi/sst.c')
-rw-r--r-- | drivers/mtd/spi/sst.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c index ced4f24..95f5490 100644 --- a/drivers/mtd/spi/sst.c +++ b/drivers/mtd/spi/sst.c @@ -203,22 +203,16 @@ spi_flash_probe_sst(struct spi_slave *spi, u8 *idcode) return NULL; } - stm = malloc(sizeof(*stm)); + stm = spi_flash_alloc(struct sst_spi_flash, spi, params->name); if (!stm) { debug("SF: Failed to allocate memory\n"); return NULL; } stm->params = params; - stm->flash.spi = spi; - stm->flash.name = params->name; if (stm->params->flags & SST_FEAT_WP) stm->flash.write = sst_write_wp; - else - stm->flash.write = spi_flash_cmd_write_multi; - stm->flash.erase = spi_flash_cmd_erase; - stm->flash.read = spi_flash_cmd_read_fast; stm->flash.page_size = 256; stm->flash.sector_size = 4096; stm->flash.size = stm->flash.sector_size * params->nr_sectors; |