diff options
author | Aaron Durbin <adurbin@chromium.org> | 2020-01-23 11:45:30 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2020-01-28 14:44:37 +0000 |
commit | fc7b953366b776aa3eaaf0539af06086facda14e (patch) | |
tree | 52ae47be248bed559c27128e97a51d24b8d3d3c6 /src/drivers/spi/gigadevice.c | |
parent | 98eeb961353d187a26085a07889bd0414cdaa910 (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/gigadevice.c')
-rw-r--r-- | src/drivers/spi/gigadevice.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/drivers/spi/gigadevice.c b/src/drivers/spi/gigadevice.c index 64d9706551..717b01613f 100644 --- a/src/drivers/spi/gigadevice.c +++ b/src/drivers/spi/gigadevice.c @@ -36,79 +36,79 @@ static const struct spi_flash_part_id flash_table[] = { { - .id = 0x3114, - .name = "GD25T80", + /* GD25T80 */ + .id[0] = 0x3114, .nr_sectors_shift = 8, }, { - .id = 0x4014, - .name = "GD25Q80", + /* GD25Q80 */ + .id[0] = 0x4014, .nr_sectors_shift = 8, .fast_read_dual_output_support = 1, }, /* also GD25Q80B */ { - .id = 0x4015, - .name = "GD25Q16", + /* GD25Q16 */ + .id[0] = 0x4015, .nr_sectors_shift = 9, .fast_read_dual_output_support = 1, }, /* also GD25Q16B */ { - .id = 0x4016, - .name = "GD25Q32B", + /* GD25Q32B */ + .id[0] = 0x4016, .nr_sectors_shift = 10, .fast_read_dual_output_support = 1, }, /* also GD25Q32B */ { - .id = 0x4017, - .name = "GD25Q64", + /* GD25Q64 */ + .id[0] = 0x4017, .nr_sectors_shift = 11, .fast_read_dual_output_support = 1, }, /* also GD25Q64B, GD25B64C */ { - .id = 0x4018, - .name = "GD25Q128", + /* GD25Q128 */ + .id[0] = 0x4018, .nr_sectors_shift = 12, .fast_read_dual_output_support = 1, }, /* also GD25Q128B */ { - .id = 0x4214, - .name = "GD25VQ80C", + /* GD25VQ80C */ + .id[0] = 0x4214, .nr_sectors_shift = 8, .fast_read_dual_output_support = 1, }, { - .id = 0x4215, - .name = "GD25VQ16C", + /* GD25VQ16C */ + .id[0] = 0x4215, .nr_sectors_shift = 9, .fast_read_dual_output_support = 1, }, { - .id = 0x6014, - .name = "GD25LQ80", + /* GD25LQ80 */ + .id[0] = 0x6014, .nr_sectors_shift = 8, .fast_read_dual_output_support = 1, }, { - .id = 0x6015, - .name = "GD25LQ16", + /* GD25LQ16 */ + .id[0] = 0x6015, .nr_sectors_shift = 9, .fast_read_dual_output_support = 1, }, { - .id = 0x6016, - .name = "GD25LQ32", + /* GD25LQ32 */ + .id[0] = 0x6016, .nr_sectors_shift = 10, .fast_read_dual_output_support = 1, }, { - .id = 0x6017, - .name = "GD25LQ64C", + /* GD25LQ64C */ + .id[0] = 0x6017, .nr_sectors_shift = 11, .fast_read_dual_output_support = 1, }, /* also GD25LB64C */ { - .id = 0x6018, - .name = "GD25LQ128", + /* GD25LQ128 */ + .id[0] = 0x6018, .nr_sectors_shift = 12, .fast_read_dual_output_support = 1, }, @@ -118,7 +118,7 @@ const struct spi_flash_vendor_info spi_flash_gigadevice_vi = { .id = VENDOR_ID_GIGADEVICE, .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, |