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/adesto.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/adesto.c')
-rw-r--r-- | src/drivers/spi/adesto.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/drivers/spi/adesto.c b/src/drivers/spi/adesto.c index 89e33f78ef..fe4106afd0 100644 --- a/src/drivers/spi/adesto.c +++ b/src/drivers/spi/adesto.c @@ -41,63 +41,63 @@ static const struct spi_flash_part_id flash_table[] = { { - .id = 0x4218, - .name = "AT25SL128A", + /* AT25SL128A */ + .id[0] = 0x4218, .nr_sectors_shift = 12, }, { - .id = 0x4501, - .name = "AT25DF081A", /* Yes, 81A id < 81 */ + /* AT25DF081A Yes, 81A id < 81 */ + .id[0] = 0x4501, .nr_sectors_shift = 8, }, { - .id = 0x4502, - .name = "AT25DF081", + /* AT25DF081 */ + .id[0] = 0x4502, .nr_sectors_shift = 8, }, { - .id = 0x4602, - .name = "AT25DF161", + /* AT25DF161 */ + .id[0] = 0x4602, .nr_sectors_shift = 9, }, { - .id = 0x4603, - .name = "AT25DL161", + /* AT25DL161 */ + .id[0] = 0x4603, .nr_sectors_shift = 9, }, { - .id = 0x4700, - .name = "AT25DF321", + /* AT25DF321 */ + .id[0] = 0x4700, .nr_sectors_shift = 10, }, { - .id = 0x4701, - .name = "AT25DF321A", + /* AT25DF321A */ + .id[0] = 0x4701, .nr_sectors_shift = 10, }, { - .id = 0x4800, - .name = "AT25DF641", + /* AT25DF641 */ + .id[0] = 0x4800, .nr_sectors_shift = 11, }, { - .id = 0x8501, - .name = "AT25SF081", + /* AT25SF081 */ + .id[0] = 0x8501, .nr_sectors_shift = 8, }, { - .id = 0x8600, - .name = "AT25DQ161", + /* AT25DQ161 */ + .id[0] = 0x8600, .nr_sectors_shift = 9, }, { - .id = 0x8601, - .name = "AT25SF161", + /* AT25SF161 */ + .id[0] = 0x8601, .nr_sectors_shift = 9, }, { - .id = 0x8700, - .name = "AT25DQ321", + /* AT25DQ321 */ + .id[0] = 0x8700, .nr_sectors_shift = 10, }, }; @@ -106,7 +106,7 @@ const struct spi_flash_vendor_info spi_flash_adesto_vi = { .id = VENDOR_ID_ADESTO, .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, |