summaryrefslogtreecommitdiff
path: root/src/drivers/spi/winbond.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2020-01-23 11:45:30 -0700
committerAaron Durbin <adurbin@chromium.org>2020-01-28 14:44:37 +0000
commitfc7b953366b776aa3eaaf0539af06086facda14e (patch)
tree52ae47be248bed559c27128e97a51d24b8d3d3c6 /src/drivers/spi/winbond.c
parent98eeb961353d187a26085a07889bd0414cdaa910 (diff)
drivers/spi/spi_flash: remove spi flash names
The names of each spi flash cause quite a bit of bloat in the text size of each stage/program. Remove the name entirely from spi flash in order to reduce overhead. In order to pack space as closely as possible the previous 32-bit id and mask were split into 2 16-bit ids and masks. On Chrome OS build of Aleena there's a savings of >2.21KiB in each of verstage, romstage, and ramstage. Change-Id: Ie98f7e1c7d116c5d7b4bf78605f62fee89dee0a5 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38380 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/drivers/spi/winbond.c')
-rw-r--r--src/drivers/spi/winbond.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index e85f59db03..f1aa1c4186 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -81,141 +81,141 @@ struct status_regs {
static const struct spi_flash_part_id flash_table[] = {
{
- .id = 0x2014,
- .name = "W25P80",
+ /* W25P80 */
+ .id[0] = 0x2014,
.nr_sectors_shift = 8,
},
{
- .id = 0x2015,
- .name = "W25P16",
+ /* W25P16 */
+ .id[0] = 0x2015,
.nr_sectors_shift = 9,
},
{
- .id = 0x2016,
- .name = "W25P32",
+ /* W25P32 */
+ .id[0] = 0x2016,
.nr_sectors_shift = 10,
},
{
- .id = 0x3014,
- .name = "W25X80",
+ /* W25X80 */
+ .id[0] = 0x3014,
.nr_sectors_shift = 8,
.fast_read_dual_output_support = 1,
},
{
- .id = 0x3015,
- .name = "W25X16",
+ /* W25X16 */
+ .id[0] = 0x3015,
.nr_sectors_shift = 9,
.fast_read_dual_output_support = 1,
},
{
- .id = 0x3016,
- .name = "W25X32",
+ /* W25X32 */
+ .id[0] = 0x3016,
.nr_sectors_shift = 10,
.fast_read_dual_output_support = 1,
},
{
- .id = 0x3017,
- .name = "W25X64",
+ /* W25X64 */
+ .id[0] = 0x3017,
.nr_sectors_shift = 11,
.fast_read_dual_output_support = 1,
},
{
- .id = 0x4014,
- .name = "W25Q80_V",
+ /* W25Q80_V */
+ .id[0] = 0x4014,
.nr_sectors_shift = 8,
.fast_read_dual_output_support = 1,
},
{
- .id = 0x4015,
- .name = "W25Q16_V",
+ /* W25Q16_V */
+ .id[0] = 0x4015,
.nr_sectors_shift = 9,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
.bp_bits = 3,
},
{
- .id = 0x6015,
- .name = "W25Q16DW",
+ /* W25Q16DW */
+ .id[0] = 0x6015,
.nr_sectors_shift = 9,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
.bp_bits = 3,
},
{
- .id = 0x4016,
- .name = "W25Q32_V",
+ /* W25Q32_V */
+ .id[0] = 0x4016,
.nr_sectors_shift = 10,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
.bp_bits = 3,
},
{
- .id = 0x6016,
- .name = "W25Q32DW",
+ /* W25Q32DW */
+ .id[0] = 0x6016,
.nr_sectors_shift = 10,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
.bp_bits = 3,
},
{
- .id = 0x4017,
- .name = "W25Q64_V",
+ /* W25Q64_V */
+ .id[0] = 0x4017,
.nr_sectors_shift = 11,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 17,
.bp_bits = 3,
},
{
- .id = 0x6017,
- .name = "W25Q64DW",
+ /* W25Q64DW */
+ .id[0] = 0x6017,
.nr_sectors_shift = 11,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 17,
.bp_bits = 3,
},
{
- .id = 0x4018,
- .name = "W25Q128_V",
+ /* W25Q128_V */
+ .id[0] = 0x4018,
.nr_sectors_shift = 12,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 18,
.bp_bits = 3,
},
{
- .id = 0x6018,
- .name = "W25Q128FW",
+ /* W25Q128FW */
+ .id[0] = 0x6018,
.nr_sectors_shift = 12,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 18,
.bp_bits = 3,
},
{
- .id = 0x7018,
- .name = "W25Q128J",
+ /* W25Q128J */
+ .id[0] = 0x7018,
.nr_sectors_shift = 12,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 18,
.bp_bits = 3,
},
{
- .id = 0x8018,
- .name = "W25Q128JW",
+ /* W25Q128JW */
+ .id[0] = 0x8018,
.nr_sectors_shift = 12,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 18,
.bp_bits = 3,
},
{
- .id = 0x4019,
- .name = "W25Q256_V",
+ /* W25Q256_V */
+ .id[0] = 0x4019,
.nr_sectors_shift = 13,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
.bp_bits = 4,
},
{
- .id = 0x7019,
- .name = "W25Q256J",
+ /* W25Q256J */
+ .id[0] = 0x7019,
.nr_sectors_shift = 13,
.fast_read_dual_output_support = 1,
.protection_granularity_shift = 16,
@@ -551,7 +551,7 @@ const struct spi_flash_vendor_info spi_flash_winbond_vi = {
.id = VENDOR_ID_WINBOND,
.page_size_shift = 8,
.sector_size_kib_shift = 2,
- .match_id_mask = 0xffff,
+ .match_id_mask[0] = 0xffff,
.ids = flash_table,
.nr_part_ids = ARRAY_SIZE(flash_table),
.desc = &spi_flash_pp_0x20_sector_desc,