summaryrefslogtreecommitdiff
path: root/src/drivers/spi/sst.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/sst.c
parent98eeb961353d187a26085a07889bd0414cdaa910 (diff)
downloadcoreboot-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/sst.c')
-rw-r--r--src/drivers/spi/sst.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/drivers/spi/sst.c b/src/drivers/spi/sst.c
index 559f30f022..4b25b902f1 100644
--- a/src/drivers/spi/sst.c
+++ b/src/drivers/spi/sst.c
@@ -46,56 +46,56 @@
static const struct spi_flash_part_id flash_table_ai[] = {
{
- .id = 0x8d,
- .name = "SST25VF040B",
+ /* SST25VF040B */
+ .id[0] = 0x8d,
.nr_sectors_shift = 7,
},{
- .id = 0x8e,
- .name = "SST25VF080B",
+ /* SST25VF080B */
+ .id[0] = 0x8e,
.nr_sectors_shift = 8,
},{
- .id = 0x80,
- .name = "SST25VF080",
+ /* SST25VF080 */
+ .id[0] = 0x80,
.nr_sectors_shift = 8,
},{
- .id = 0x41,
- .name = "SST25VF016B",
+ /* SST25VF016B */
+ .id[0] = 0x41,
.nr_sectors_shift = 9,
},{
- .id = 0x4a,
- .name = "SST25VF032B",
+ /* SST25VF032B */
+ .id[0] = 0x4a,
.nr_sectors_shift = 10,
},{
- .id = 0x01,
- .name = "SST25WF512",
+ /* SST25WF512 */
+ .id[0] = 0x01,
.nr_sectors_shift = 4,
},{
- .id = 0x02,
- .name = "SST25WF010",
+ /* SST25WF010 */
+ .id[0] = 0x02,
.nr_sectors_shift = 5,
},{
- .id = 0x03,
- .name = "SST25WF020",
+ /* SST25WF020 */
+ .id[0] = 0x03,
.nr_sectors_shift = 6,
},{
- .id = 0x04,
- .name = "SST25WF040",
+ /* SST25WF040 */
+ .id[0] = 0x04,
.nr_sectors_shift = 7,
},{
- .id = 0x05,
- .name = "SST25WF080",
+ /* SST25WF080 */
+ .id[0] = 0x05,
.nr_sectors_shift = 8,
},{
- .id = 0x14,
- .name = "SST25WF080B",
+ /* SST25WF080B */
+ .id[0] = 0x14,
.nr_sectors_shift = 8,
},
};
static const struct spi_flash_part_id flash_table_pp256[] = {
{
- .id = 0x4b,
- .name = "SST25VF064C",
+ /* SST25VF064C */
+ .id[0] = 0x4b,
.nr_sectors_shift = 11,
},
};
@@ -254,7 +254,7 @@ static const struct spi_flash_ops_descriptor descai = {
const struct spi_flash_vendor_info spi_flash_sst_ai_vi = {
.id = VENDOR_ID_SST,
.sector_size_kib_shift = 2,
- .match_id_mask = 0xff,
+ .match_id_mask[0] = 0xff,
.ids = flash_table_ai,
.nr_part_ids = ARRAY_SIZE(flash_table_ai),
.desc = &descai,
@@ -265,7 +265,7 @@ const struct spi_flash_vendor_info spi_flash_sst_vi = {
.id = VENDOR_ID_SST,
.page_size_shift = 8,
.sector_size_kib_shift = 2,
- .match_id_mask = 0xff,
+ .match_id_mask[0] = 0xff,
.ids = flash_table_pp256,
.nr_part_ids = ARRAY_SIZE(flash_table_pp256),
.desc = &spi_flash_pp_0x20_sector_desc,