aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/spi/eon.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/eon.c
parent98eeb961353d187a26085a07889bd0414cdaa910 (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/eon.c')
-rw-r--r--src/drivers/spi/eon.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c
index 6d4833ce22..706115a18c 100644
--- a/src/drivers/spi/eon.c
+++ b/src/drivers/spi/eon.c
@@ -57,108 +57,108 @@
static const struct spi_flash_part_id flash_table[] = {
{
- .id = EON_ID_EN25B80,
- .name = "EN25B80",
+ /* EN25B80 */
+ .id[0] = EON_ID_EN25B80,
.nr_sectors_shift = 8,
},
{
- .id = EON_ID_EN25B16,
- .name = "EN25B16",
+ /* EN25B16 */
+ .id[0] = EON_ID_EN25B16,
.nr_sectors_shift = 9,
},
{
- .id = EON_ID_EN25B32,
- .name = "EN25B32",
+ /* EN25B32 */
+ .id[0] = EON_ID_EN25B32,
.nr_sectors_shift = 10,
},
{
- .id = EON_ID_EN25B64,
- .name = "EN25B64",
+ /* EN25B64 */
+ .id[0] = EON_ID_EN25B64,
.nr_sectors_shift = 11,
},
{
- .id = EON_ID_EN25F80,
- .name = "EN25F80",
+ /* EN25F80 */
+ .id[0] = EON_ID_EN25F80,
.nr_sectors_shift = 8,
},
{
- .id = EON_ID_EN25F16,
- .name = "EN25F16",
+ /* EN25F16 */
+ .id[0] = EON_ID_EN25F16,
.nr_sectors_shift = 9,
},
{
- .id = EON_ID_EN25F32,
- .name = "EN25F32",
+ /* EN25F32 */
+ .id[0] = EON_ID_EN25F32,
.nr_sectors_shift = 10,
},
{
- .id = EON_ID_EN25F64,
- .name = "EN25F64",
+ /* EN25F64 */
+ .id[0] = EON_ID_EN25F64,
.nr_sectors_shift = 11,
},
{
- .id = EON_ID_EN25Q80,
- .name = "EN25Q80(A)",
+ /* EN25Q80(A) */
+ .id[0] = EON_ID_EN25Q80,
.nr_sectors_shift = 8,
},
{
- .id = EON_ID_EN25Q16,
- .name = "EN25Q16(D16)",
+ /* EN25Q16(D16) */
+ .id[0] = EON_ID_EN25Q16,
.nr_sectors_shift = 9,
},
{
- .id = EON_ID_EN25Q32,
- .name = "EN25Q32(A/B)",
+ /* EN25Q32(A/B) */
+ .id[0] = EON_ID_EN25Q32,
.nr_sectors_shift = 10,
},
{
- .id = EON_ID_EN25Q64,
- .name = "EN25Q64",
+ /* EN25Q64 */
+ .id[0] = EON_ID_EN25Q64,
.nr_sectors_shift = 11,
},
{
- .id = EON_ID_EN25Q128,
- .name = "EN25Q128",
+ /* EN25Q128 */
+ .id[0] = EON_ID_EN25Q128,
.nr_sectors_shift = 12,
},
{
- .id = EON_ID_EN25QH16,
- .name = "EN25QH16",
+ /* EN25QH16 */
+ .id[0] = EON_ID_EN25QH16,
.nr_sectors_shift = 9,
},
{
- .id = EON_ID_EN25QH32,
- .name = "EN25QH32",
+ /* EN25QH32 */
+ .id[0] = EON_ID_EN25QH32,
.nr_sectors_shift = 10,
},
{
- .id = EON_ID_EN25QH64,
- .name = "EN25QH64",
+ /* EN25QH64 */
+ .id[0] = EON_ID_EN25QH64,
.nr_sectors_shift = 11,
},
{
- .id = EON_ID_EN25QH128,
- .name = "EN25QH128",
+ /* EN25QH128 */
+ .id[0] = EON_ID_EN25QH128,
.nr_sectors_shift = 12,
},
{
- .id = EON_ID_EN25S80,
- .name = "EN25S80",
+ /* EN25S80 */
+ .id[0] = EON_ID_EN25S80,
.nr_sectors_shift = 8,
},
{
- .id = EON_ID_EN25S16,
- .name = "EN25S16",
+ /* EN25S16 */
+ .id[0] = EON_ID_EN25S16,
.nr_sectors_shift = 9,
},
{
- .id = EON_ID_EN25S32,
- .name = "EN25S32",
+ /* EN25S32 */
+ .id[0] = EON_ID_EN25S32,
.nr_sectors_shift = 10,
},
{
- .id = EON_ID_EN25S64,
- .name = "EN25S64",
+ /* EN25S64 */
+ .id[0] = EON_ID_EN25S64,
.nr_sectors_shift = 11,
},
};
@@ -167,7 +167,7 @@ const struct spi_flash_vendor_info spi_flash_eon_vi = {
.id = VENDOR_ID_EON,
.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,