[flashrom] [PATCH 6/7] add missing ICH9 register macros and use them to eliminate magic numbers

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Wed May 25 11:26:22 CEST 2011


On Tue, 24 May 2011 01:23:13 +0200
Stefan Tauner <stefan.tauner at student.tuwien.ac.at> wrote:

> +		if (ichspi_bbar) {
>  			msg_pdbg("Reserved bits in BBAR not zero: 0x%04x",
>  				 ichspi_bbar);
>  		ichspi_bbar |= minaddr;

dunno why the closing } was lost here. must have been a mistake when i
reordered my patches with cherry-pick and did not compile test again. :/

did i mention that i hate line limits?

the correct hunk(s) should look like this:
diff --git a/ichspi.c b/ichspi.c
index b7b8cbd..03bc162 100644
@@ -556,9 +556,10 @@ void ich_set_bbar(uint32_t minaddr)
 	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);
+		}
 		ichspi_bbar |= minaddr;
 		rmmio_writel(ichspi_bbar, ich_spibar + 0x50);
 		ichspi_bbar = mmio_readl(ich_spibar + 0x50);
@@ -570,9 +571,10 @@ void ich_set_bbar(uint32_t minaddr)
 		break;
 	case SPI_CONTROLLER_ICH9:
 		ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR) & ~BBAR_MASK;
-		if (ichspi_bbar)
+		if (ichspi_bbar) {
 			msg_pdbg("Reserved bits in BBAR not zero: 0x%04x",
 				 ichspi_bbar);
+		}
 		ichspi_bbar |= minaddr;
 		rmmio_writel(ichspi_bbar, ich_spibar + ICH9_REG_BBAR);
 		ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR);

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list