sb/intel/i82371eb: Streamline IDE debug messages

Debug messages shown during IDE initialization are streamlined as
follows:

"Primary IDE interface" (and similar) are shortened to
"Primary interface".
We don't need to see "IDE" twice as messages are already prefixed.

Refactor "IDE: (Primary) IDE interface: (on)" into
"IDE: (Primary interface): (on)" to allow compiler to deduplicate
component strings, also used later in messages re UDMA/33.

This reduces uncompressed string size by 32 bytes and allows ramstage
to compress a wee bit better.

Change-Id: I16f5c2b3775c5a73b83d83817d7075e944089a12
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73331
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Keith Hui 2023-02-27 23:42:40 -05:00 committed by Matt DeVillier
parent 6b85c292c9
commit 8677d2ddb8
1 changed files with 6 additions and 6 deletions

View File

@ -32,14 +32,14 @@ static void ide_init_enable(struct device *dev)
reg16 = pci_read_config16(dev, IDETIM_PRI);
reg16 = ONOFF(conf->ide0_enable, reg16, IDE_DECODE_ENABLE);
pci_write_config16(dev, IDETIM_PRI, reg16);
printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Primary",
printk(BIOS_DEBUG, "IDE: %s: %s\n", "Primary interface",
conf->ide0_enable ? "on" : "off");
/* Enable/disable the secondary IDE interface. */
reg16 = pci_read_config16(dev, IDETIM_SEC);
reg16 = ONOFF(conf->ide1_enable, reg16, IDE_DECODE_ENABLE);
pci_write_config16(dev, IDETIM_SEC, reg16);
printk(BIOS_DEBUG, "IDE: %s IDE interface: %s\n", "Secondary",
printk(BIOS_DEBUG, "IDE: %s: %s\n", "Secondary interface",
conf->ide1_enable ? "on" : "off");
/* Enable access to the legacy IDE ports (both primary and secondary),
@ -81,10 +81,10 @@ static void ide_init_udma33(struct device *dev)
pci_write_config8(dev, UDMACTL, reg8);
printk(BIOS_DEBUG, "IDE: %s, drive %d: UDMA/33: %s\n",
"Primary IDE interface", 0,
"Primary interface", 0,
conf->ide0_drive0_udma33_enable ? "on" : "off");
printk(BIOS_DEBUG, "IDE: %s, drive %d: UDMA/33: %s\n",
"Primary IDE interface", 1,
"Primary interface", 1,
conf->ide0_drive1_udma33_enable ? "on" : "off");
}
@ -96,10 +96,10 @@ static void ide_init_udma33(struct device *dev)
pci_write_config8(dev, UDMACTL, reg8);
printk(BIOS_DEBUG, "IDE: %s, drive %d: UDMA/33: %s\n",
"Secondary IDE interface", 0,
"Secondary interface", 0,
conf->ide1_drive0_udma33_enable ? "on" : "off");
printk(BIOS_DEBUG, "IDE: %s, drive %d: UDMA/33: %s\n",
"Secondary IDE interface", 1,
"Secondary interface", 1,
conf->ide1_drive1_udma33_enable ? "on" : "off");
}
}