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/stmicro.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/stmicro.c')
-rw-r--r-- | src/drivers/spi/stmicro.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c index 62755f4a01..e867d71450 100644 --- a/src/drivers/spi/stmicro.c +++ b/src/drivers/spi/stmicro.c @@ -66,142 +66,142 @@ static const struct spi_flash_part_id flash_table_se32k[] = { { - .id = STM_ID_M25P10, - .name = "M25P10", + /* M25P10 */ + .id[0] = STM_ID_M25P10, .nr_sectors_shift = 2, }, }; static const struct spi_flash_part_id flash_table_se64k[] = { { - .id = STM_ID_M25P16, - .name = "M25P16", + /* M25P16 */ + .id[0] = STM_ID_M25P16, .nr_sectors_shift = 5, }, { - .id = STM_ID_M25P20, - .name = "M25P20", + /* M25P20 */ + .id[0] = STM_ID_M25P20, .nr_sectors_shift = 2, }, { - .id = STM_ID_M25P32, - .name = "M25P32", + /* M25P32 */ + .id[0] = STM_ID_M25P32, .nr_sectors_shift = 6, }, { - .id = STM_ID_M25P40, - .name = "M25P40", + /* M25P40 */ + .id[0] = STM_ID_M25P40, .nr_sectors_shift = 3, }, { - .id = STM_ID_M25P64, - .name = "M25P64", + /* M25P64 */ + .id[0] = STM_ID_M25P64, .nr_sectors_shift = 7, }, { - .id = STM_ID_M25P80, - .name = "M25P80", + /* M25P80 */ + .id[0] = STM_ID_M25P80, .nr_sectors_shift = 4, }, { - .id = STM_ID_M25PX80, - .name = "M25PX80", + /* M25PX80 */ + .id[0] = STM_ID_M25PX80, .nr_sectors_shift = 4, }, { - .id = STM_ID_M25PX16, - .name = "M25PX16", + /* M25PX16 */ + .id[0] = STM_ID_M25PX16, .nr_sectors_shift = 5, }, { - .id = STM_ID_M25PX32, - .name = "M25PX32", + /* M25PX32 */ + .id[0] = STM_ID_M25PX32, .nr_sectors_shift = 6, }, { - .id = STM_ID_M25PX64, - .name = "M25PX64", + /* M25PX64 */ + .id[0] = STM_ID_M25PX64, .nr_sectors_shift = 7, }, { - .id = STM_ID_M25PE80, - .name = "M25PE80", + /* M25PE80 */ + .id[0] = STM_ID_M25PE80, .nr_sectors_shift = 4, }, { - .id = STM_ID_M25PE16, - .name = "M25PE16", + /* M25PE16 */ + .id[0] = STM_ID_M25PE16, .nr_sectors_shift = 5, }, { - .id = STM_ID_M25PE32, - .name = "M25PE32", + /* M25PE32 */ + .id[0] = STM_ID_M25PE32, .nr_sectors_shift = 6, }, { - .id = STM_ID_M25PE64, - .name = "M25PE64", + /* M25PE64 */ + .id[0] = STM_ID_M25PE64, .nr_sectors_shift = 7, }, }; static const struct spi_flash_part_id flash_table_se256k[] = { { - .id = STM_ID_M25P128, - .name = "M25P128", + /* M25P128 */ + .id[0] = STM_ID_M25P128, .nr_sectors_shift = 6, }, }; static const struct spi_flash_part_id flash_table_sse[] = { { - .id = STM_ID_N25Q016__3E, - .name = "N25Q016..3E", + /* N25Q016..3E */ + .id[0] = STM_ID_N25Q016__3E, .nr_sectors_shift = 9, }, { - .id = STM_ID_N25Q032__3E, - .name = "N25Q032..3E", + /* N25Q032..3E */ + .id[0] = STM_ID_N25Q032__3E, .nr_sectors_shift = 10, }, { - .id = STM_ID_N25Q064__3E, - .name = "N25Q064..3E", + /* N25Q064..3E */ + .id[0] = STM_ID_N25Q064__3E, .nr_sectors_shift = 11, }, { - .id = STM_ID_N25Q128__3E, - .name = "N25Q128..3E", + /* N25Q128..3E */ + .id[0] = STM_ID_N25Q128__3E, .nr_sectors_shift = 12, }, { - .id = STM_ID_N25Q256__3E, - .name = "N25Q256..3E", + /* N25Q256..3E */ + .id[0] = STM_ID_N25Q256__3E, .nr_sectors_shift = 13, }, { - .id = STM_ID_N25Q016__1E, - .name = "N25Q016..1E", + /* N25Q016..1E */ + .id[0] = STM_ID_N25Q016__1E, .nr_sectors_shift = 9, }, { - .id = STM_ID_N25Q032__1E, - .name = "N25Q032..1E", + /* N25Q032..1E */ + .id[0] = STM_ID_N25Q032__1E, .nr_sectors_shift = 10, }, { - .id = STM_ID_N25Q064__1E, - .name = "N25Q064..1E", + /* N25Q064..1E */ + .id[0] = STM_ID_N25Q064__1E, .nr_sectors_shift = 11, }, { - .id = STM_ID_N25Q128__1E, - .name = "N25Q128..1E", + /* N25Q128..1E */ + .id[0] = STM_ID_N25Q128__1E, .nr_sectors_shift = 12, }, { - .id = STM_ID_N25Q256__1E, - .name = "N25Q256..1E", + /* N25Q256..1E */ + .id[0] = STM_ID_N25Q256__1E, .nr_sectors_shift = 13, }, }; @@ -228,7 +228,7 @@ const struct spi_flash_vendor_info spi_flash_stmicro1_vi = { .id = VENDOR_ID_STMICRO, .page_size_shift = 8, .sector_size_kib_shift = 5, - .match_id_mask = 0xffff, + .match_id_mask[0] = 0xffff, .ids = flash_table_se32k, .nr_part_ids = ARRAY_SIZE(flash_table_se32k), .desc = &spi_flash_pp_0xd8_sector_desc, @@ -238,7 +238,7 @@ const struct spi_flash_vendor_info spi_flash_stmicro2_vi = { .id = VENDOR_ID_STMICRO, .page_size_shift = 8, .sector_size_kib_shift = 6, - .match_id_mask = 0xffff, + .match_id_mask[0] = 0xffff, .ids = flash_table_se64k, .nr_part_ids = ARRAY_SIZE(flash_table_se64k), .desc = &spi_flash_pp_0xd8_sector_desc, @@ -248,7 +248,7 @@ const struct spi_flash_vendor_info spi_flash_stmicro3_vi = { .id = VENDOR_ID_STMICRO, .page_size_shift = 8, .sector_size_kib_shift = 8, - .match_id_mask = 0xffff, + .match_id_mask[0] = 0xffff, .ids = flash_table_se256k, .nr_part_ids = ARRAY_SIZE(flash_table_se256k), .desc = &spi_flash_pp_0xd8_sector_desc, @@ -258,7 +258,7 @@ const struct spi_flash_vendor_info spi_flash_stmicro4_vi = { .id = VENDOR_ID_STMICRO, .page_size_shift = 8, .sector_size_kib_shift = 2, - .match_id_mask = 0xffff, + .match_id_mask[0] = 0xffff, .ids = flash_table_sse, .nr_part_ids = ARRAY_SIZE(flash_table_sse), .desc = &spi_flash_pp_0x20_sector_desc, |