drivers/spi/winbond.c: Add the rest of >=1MB Winbond W25 chips
Required for ACPI S3 suspend support at some motherboards. Synchronizing with flashchips.c/h flashrom source code. Signed-off-by: Mike Banon <mikebdp2@gmail.com> Change-Id: I4d15d5acf0e2044e5128ce809c282fbcb35f24f0 Reviewed-on: https://review.coreboot.org/c/30746 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							1e7d69944d
						
					
				
				
					commit
					72812fa516
				
			@@ -103,6 +103,38 @@ struct status_regs {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
					static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x2014,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 4,
 | 
				
			||||||
 | 
							.name				= "W25P80",
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x2015,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 5,
 | 
				
			||||||
 | 
							.name				= "W25P16",
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x2016,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 6,
 | 
				
			||||||
 | 
							.name				= "W25P32",
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x3014,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 4,
 | 
				
			||||||
 | 
							.name				= "W25X80",
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		.id				= 0x3015,
 | 
							.id				= 0x3015,
 | 
				
			||||||
		.l2_page_size_shift		= 8,
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
@@ -133,7 +165,7 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 4,
 | 
							.nr_blocks_shift		= 4,
 | 
				
			||||||
		.name				= "W25Q80",
 | 
							.name				= "W25Q80_V",
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		.id				= 0x4015,
 | 
							.id				= 0x4015,
 | 
				
			||||||
@@ -141,7 +173,17 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 5,
 | 
							.nr_blocks_shift		= 5,
 | 
				
			||||||
		.name				= "W25Q16",
 | 
							.name				= "W25Q16_V",
 | 
				
			||||||
 | 
							.protection_granularity_shift	= 16,
 | 
				
			||||||
 | 
							.bp_bits			= 3,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x6015,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 5,
 | 
				
			||||||
 | 
							.name				= "W25Q16DW",
 | 
				
			||||||
		.protection_granularity_shift	= 16,
 | 
							.protection_granularity_shift	= 16,
 | 
				
			||||||
		.bp_bits			= 3,
 | 
							.bp_bits			= 3,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -151,7 +193,7 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 6,
 | 
							.nr_blocks_shift		= 6,
 | 
				
			||||||
		.name				= "W25Q32",
 | 
							.name				= "W25Q32_V",
 | 
				
			||||||
		.protection_granularity_shift	= 16,
 | 
							.protection_granularity_shift	= 16,
 | 
				
			||||||
		.bp_bits			= 3,
 | 
							.bp_bits			= 3,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -171,7 +213,7 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 7,
 | 
							.nr_blocks_shift		= 7,
 | 
				
			||||||
		.name				= "W25Q64",
 | 
							.name				= "W25Q64_V",
 | 
				
			||||||
		.protection_granularity_shift	= 17,
 | 
							.protection_granularity_shift	= 17,
 | 
				
			||||||
		.bp_bits			= 3,
 | 
							.bp_bits			= 3,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -191,7 +233,7 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 8,
 | 
							.nr_blocks_shift		= 8,
 | 
				
			||||||
		.name				= "W25Q128",
 | 
							.name				= "W25Q128_V",
 | 
				
			||||||
		.protection_granularity_shift	= 18,
 | 
							.protection_granularity_shift	= 18,
 | 
				
			||||||
		.bp_bits			= 3,
 | 
							.bp_bits			= 3,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -221,7 +263,17 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
 | 
				
			|||||||
		.pages_per_sector_shift		= 4,
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
		.sectors_per_block_shift	= 4,
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
		.nr_blocks_shift		= 9,
 | 
							.nr_blocks_shift		= 9,
 | 
				
			||||||
		.name				= "W25Q256",
 | 
							.name				= "W25Q256_V",
 | 
				
			||||||
 | 
							.protection_granularity_shift	= 16,
 | 
				
			||||||
 | 
							.bp_bits			= 4,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.id				= 0x7019,
 | 
				
			||||||
 | 
							.l2_page_size_shift		= 8,
 | 
				
			||||||
 | 
							.pages_per_sector_shift		= 4,
 | 
				
			||||||
 | 
							.sectors_per_block_shift	= 4,
 | 
				
			||||||
 | 
							.nr_blocks_shift		= 9,
 | 
				
			||||||
 | 
							.name				= "W25Q256J",
 | 
				
			||||||
		.protection_granularity_shift	= 16,
 | 
							.protection_granularity_shift	= 16,
 | 
				
			||||||
		.bp_bits			= 4,
 | 
							.bp_bits			= 4,
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user