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/amic.c | |
parent | 98eeb961353d187a26085a07889bd0414cdaa910 (diff) | |
download | coreboot-fc7b953366b776aa3eaaf0539af06086facda14e.tar.xz |
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/amic.c')
-rw-r--r-- | src/drivers/spi/amic.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/drivers/spi/amic.c b/src/drivers/spi/amic.c index 8e25cd933c..cb4ada01ce 100644 --- a/src/drivers/spi/amic.c +++ b/src/drivers/spi/amic.c @@ -36,48 +36,48 @@ static const struct spi_flash_part_id flash_table[] = { { - .id = 0x2015, - .name = "A25L16PU", + /* A25L16PU */ + .id[0] = 0x2015, .nr_sectors_shift = 9, }, { - .id = 0x2025, - .name = "A25L16PT", + /* A25L16PT */ + .id[0] = 0x2025, .nr_sectors_shift = 9, }, { - .id = 0x3014, - .name = "A25L080", + /* A25L080 */ + .id[0] = 0x3014, .nr_sectors_shift = 8, }, { - .id = 0x3015, - .name = "A25L016", + /* A25L016 */ + .id[0] = 0x3015, .nr_sectors_shift = 9, }, { - .id = 0x3016, - .name = "A25L032", + /* A25L032 */ + .id[0] = 0x3016, .nr_sectors_shift = 10, }, { - .id = 0x4014, - .name = "A25LQ080", + /* A25LQ080 */ + .id[0] = 0x4014, .nr_sectors_shift = 8, }, { - .id = 0x4015, - .name = "A25LQ16", + /* A25LQ16 */ + .id[0] = 0x4015, .nr_sectors_shift = 9, }, { - .id = 0x4016, - .name = "A25LQ032", + /* A25LQ032 */ + .id[0] = 0x4016, .nr_sectors_shift = 10, }, { - .id = 0x4017, - .name = "A25LQ64", + /* A25LQ64 */ + .id[0] = 0x4017, .nr_sectors_shift = 11, }, }; @@ -86,7 +86,7 @@ const struct spi_flash_vendor_info spi_flash_amic_vi = { .id = VENDOR_ID_AMIC, .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, |