@ -38,7 +38,6 @@
struct spansion_spi_flash_params {
struct spansion_spi_flash_params {
u16 idcode1 ;
u16 idcode1 ;
u16 idcode2 ;
u16 idcode2 ;
u16 page_size ;
u16 pages_per_sector ;
u16 pages_per_sector ;
u16 nr_sectors ;
u16 nr_sectors ;
const char * name ;
const char * name ;
@ -48,7 +47,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x0213 ,
. idcode1 = 0x0213 ,
. idcode2 = 0 ,
. idcode2 = 0 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 16 ,
. nr_sectors = 16 ,
. name = " S25FL008A " ,
. name = " S25FL008A " ,
@ -56,7 +54,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x0214 ,
. idcode1 = 0x0214 ,
. idcode2 = 0 ,
. idcode2 = 0 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 32 ,
. nr_sectors = 32 ,
. name = " S25FL016A " ,
. name = " S25FL016A " ,
@ -64,7 +61,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x0215 ,
. idcode1 = 0x0215 ,
. idcode2 = 0 ,
. idcode2 = 0 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 64 ,
. nr_sectors = 64 ,
. name = " S25FL032A " ,
. name = " S25FL032A " ,
@ -72,7 +68,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x0216 ,
. idcode1 = 0x0216 ,
. idcode2 = 0 ,
. idcode2 = 0 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 128 ,
. nr_sectors = 128 ,
. name = " S25FL064A " ,
. name = " S25FL064A " ,
@ -80,7 +75,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x2018 ,
. idcode1 = 0x2018 ,
. idcode2 = 0x0301 ,
. idcode2 = 0x0301 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 256 ,
. nr_sectors = 256 ,
. name = " S25FL128P_64K " ,
. name = " S25FL128P_64K " ,
@ -88,7 +82,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x2018 ,
. idcode1 = 0x2018 ,
. idcode2 = 0x0300 ,
. idcode2 = 0x0300 ,
. page_size = 256 ,
. pages_per_sector = 1024 ,
. pages_per_sector = 1024 ,
. nr_sectors = 64 ,
. nr_sectors = 64 ,
. name = " S25FL128P_256K " ,
. name = " S25FL128P_256K " ,
@ -96,7 +89,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x0215 ,
. idcode1 = 0x0215 ,
. idcode2 = 0x4d00 ,
. idcode2 = 0x4d00 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 64 ,
. nr_sectors = 64 ,
. name = " S25FL032P " ,
. name = " S25FL032P " ,
@ -104,7 +96,6 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = {
{
{
. idcode1 = 0x2018 ,
. idcode1 = 0x2018 ,
. idcode2 = 0x4d01 ,
. idcode2 = 0x4d01 ,
. page_size = 256 ,
. pages_per_sector = 256 ,
. pages_per_sector = 256 ,
. nr_sectors = 256 ,
. nr_sectors = 256 ,
. name = " S25FL129P_64K " ,
. name = " S25FL129P_64K " ,
@ -151,8 +142,8 @@ struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode)
flash - > write = spi_flash_cmd_write_multi ;
flash - > write = spi_flash_cmd_write_multi ;
flash - > erase = spansion_erase ;
flash - > erase = spansion_erase ;
flash - > read = spi_flash_cmd_read_fast ;
flash - > read = spi_flash_cmd_read_fast ;
flash - > page_size = params - > page_size ;
flash - > page_size = 256 ;
flash - > sector_size = params - > page_size * params - > pages_per_sector ;
flash - > sector_size = 256 * params - > pages_per_sector ;
flash - > size = flash - > sector_size * params - > nr_sectors ;
flash - > size = flash - > sector_size * params - > nr_sectors ;
return flash ;
return flash ;