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>
This commit is contained in:
@@ -36,38 +36,38 @@
|
||||
|
||||
static const struct spi_flash_part_id flash_table[] = {
|
||||
{
|
||||
.id = 0x3015,
|
||||
.name = "AT25X16",
|
||||
/* AT25X16 */
|
||||
.id[0] = 0x3015,
|
||||
.nr_sectors_shift = 9,
|
||||
},
|
||||
{
|
||||
.id = 0x47,
|
||||
.name = "AT25DF32",
|
||||
/* AT25DF32 */
|
||||
.id[0] = 0x47,
|
||||
.nr_sectors_shift = 10,
|
||||
},
|
||||
{
|
||||
.id = 0x3017,
|
||||
.name = "AT25X64",
|
||||
/* AT25X64 */
|
||||
.id[0] = 0x3017,
|
||||
.nr_sectors_shift = 11,
|
||||
},
|
||||
{
|
||||
.id = 0x4015,
|
||||
.name = "AT25Q16",
|
||||
/* AT25Q16 */
|
||||
.id[0] = 0x4015,
|
||||
.nr_sectors_shift = 9,
|
||||
},
|
||||
{
|
||||
.id = 0x4016,
|
||||
.name = "AT25Q32",
|
||||
/* AT25Q32 */
|
||||
.id[0] = 0x4016,
|
||||
.nr_sectors_shift = 10,
|
||||
},
|
||||
{
|
||||
.id = 0x4017,
|
||||
.name = "AT25Q64",
|
||||
/* AT25Q64 */
|
||||
.id[0] = 0x4017,
|
||||
.nr_sectors_shift = 11,
|
||||
},
|
||||
{
|
||||
.id = 0x4018,
|
||||
.name = "AT25Q128",
|
||||
/* AT25Q128 */
|
||||
.id[0] = 0x4018,
|
||||
.nr_sectors_shift = 12,
|
||||
},
|
||||
};
|
||||
@@ -76,7 +76,7 @@ const struct spi_flash_vendor_info spi_flash_atmel_vi = {
|
||||
.id = VENDOR_ID_ATMEL,
|
||||
.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,
|
||||
|
Reference in New Issue
Block a user