[flashrom] [PATCH 06/12] add missing ICH9 register macros and use them to eliminate magic numbers
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sun Jun 12 00:36:01 CEST 2011
Am 08.06.2011 04:55 schrieb Stefan Tauner:
> Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
with two minor changes:
> @@ -537,15 +549,15 @@ static int program_opcodes(OPCODES *op, int enable_undo)
> */
> void ich_set_bbar(uint32_t minaddr)
> {
> -#define BBAR_MASK 0x00ffff00
> minaddr &= BBAR_MASK;
> switch (spi_programmer->type) {
> case SPI_CONTROLLER_ICH7:
> case SPI_CONTROLLER_VIA:
> ichspi_bbar = mmio_readl(ich_spibar + 0x50) & ~BBAR_MASK;
> - if (ichspi_bbar)
> + if (ichspi_bbar) {
> msg_pdbg("Reserved bits in BBAR not zero: 0x%04x",
> ichspi_bbar);
> + }
>
Kill the additional braces, please. I know this is a multiline
statement, but it is only a single statement and the indentation of the
second line makes it obvious where it belongs to.
> @@ -556,13 +568,14 @@ void ich_set_bbar(uint32_t minaddr)
> msg_perr("Setting BBAR failed!\n");
> break;
> case SPI_CONTROLLER_ICH9:
> - ichspi_bbar = mmio_readl(ich_spibar + 0xA0) & ~BBAR_MASK;
> - if (ichspi_bbar)
> + ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR) & ~BBAR_MASK;
> + if (ichspi_bbar) {
> msg_pdbg("Reserved bits in BBAR not zero: 0x%04x",
> ichspi_bbar);
> + }
>
Same here.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the flashrom
mailing list