Message ID | 1345092267-16077-2-git-send-email-voice.shen@atmel.com |
---|---|
State | Accepted, archived |
Delegated to: | Andreas Bießmann |
Headers | show |
On Thursday 16 August 2012 00:44:25 Bo Shen wrote:
> Add atmel at25df321 serial flash support
thanks, merged into my spi flash branch
-mike
Hi Mike, On 8/17/2012 12:18, Mike Frysinger wrote: > On Thursday 16 August 2012 00:44:25 Bo Shen wrote: >> Add atmel at25df321 serial flash support > After reading the spi framework. I found there are common interface for serial flash. So, I plan to use the common interface (spi_flash_cmd_write_multi) while not the private interface (dataflash_write_p2), and etc. I am sorry for this inconvenience. :( Will you revert this patch? Or, maybe I should submit a patch for this base on the merged code? which one will you prefer to? > thanks, merged into my spi flash branch > -mike >
On Friday 17 August 2012 01:08:01 Bo Shen wrote: > On 8/17/2012 12:18, Mike Frysinger wrote: > > On Thursday 16 August 2012 00:44:25 Bo Shen wrote: > >> Add atmel at25df321 serial flash support > > After reading the spi framework. I found there are common interface for > serial flash. So, I plan to use the common interface > (spi_flash_cmd_write_multi) while not the private interface > (dataflash_write_p2), and etc. > > I am sorry for this inconvenience. :( > > Will you revert this patch? Or, maybe I should submit a patch for this > base on the merged code? > > which one will you prefer to? i think this is an independent issue that the atmel driver has long not been using the unified pieces. if you want to submit a patch on top of this one, that'd be best. -mike
Dear Bo Shen, On 16.08.2012 06:44, Bo Shen wrote: > Add atmel at25df321 serial flash support > > Signed-off-by: Bo Shen <voice.shen@atmel.com> > --- since this patch did not appear to be merged by Mike as mentioned earlier ([1], [2], [3]) I did apply it to u-boot-atmel/master, thanks! Best regards Andreas Bießmann [1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/138226/focus=138332 [2] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/137983/focus=139926 [3] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/140642/focus=140774
diff --git a/drivers/mtd/spi/atmel.c b/drivers/mtd/spi/atmel.c index 1ecece0..89ebe9d 100644 --- a/drivers/mtd/spi/atmel.c +++ b/drivers/mtd/spi/atmel.c @@ -109,6 +109,14 @@ static const struct atmel_spi_flash_params atmel_spi_flash_table[] = { .nr_sectors = 32, .name = "AT45DB642D", }, + { + .idcode1 = 0x47, + .l2_page_size = 8, + .pages_per_block = 16, + .blocks_per_sector = 16, + .nr_sectors = 64, + .name = "AT25DF321", + }, }; static int at45_wait_ready(struct spi_flash *flash, unsigned long timeout) @@ -515,6 +523,8 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode) case DF_FAMILY_AT26F: case DF_FAMILY_AT26DF: asf->flash.read = spi_flash_cmd_read_fast; + asf->flash.write = dataflash_write_p2; + asf->flash.erase = dataflash_erase_p2; break; default:
Add atmel at25df321 serial flash support Signed-off-by: Bo Shen <voice.shen@atmel.com> --- drivers/mtd/spi/atmel.c | 10 ++++++++++ 1 file changed, 10 insertions(+)