From c021ffee45f7b19b3a8e6c426e0d14a4609bf593 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sun, 18 Sep 2016 19:18:56 +0200 Subject: southbridge/amd: Add space around operators Change-Id: I949ff7de072e5e0753d9c8ff0bf98abfca25798b Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/16637 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/southbridge/amd/agesa/hudson/early_setup.c | 4 ++-- src/southbridge/amd/agesa/hudson/enable_usbdebug.c | 4 ++-- src/southbridge/amd/agesa/hudson/imc.c | 6 ++--- src/southbridge/amd/agesa/hudson/ramtop.c | 4 ++-- src/southbridge/amd/amd8111/amd8111_smbus.h | 4 ++-- src/southbridge/amd/cimx/sb700/lpc.c | 2 +- src/southbridge/amd/cimx/sb800/ramtop.c | 4 ++-- src/southbridge/amd/cs5535/chipsetinit.c | 28 +++++++++++----------- src/southbridge/amd/cs5535/cs5535.c | 4 ++-- src/southbridge/amd/cs5536/pirq.c | 2 +- src/southbridge/amd/pi/hudson/early_setup.c | 4 ++-- src/southbridge/amd/pi/hudson/enable_usbdebug.c | 4 ++-- src/southbridge/amd/rs780/gfx.c | 24 +++++++++---------- src/southbridge/amd/sb600/hda.c | 2 +- src/southbridge/amd/sb700/early_setup.c | 6 ++--- src/southbridge/amd/sb700/enable_usbdebug.c | 2 +- src/southbridge/amd/sb700/hda.c | 2 +- src/southbridge/amd/sb700/lpc.c | 2 +- src/southbridge/amd/sb700/reset.c | 2 +- src/southbridge/amd/sb800/early_setup.c | 8 +++---- src/southbridge/amd/sb800/enable_usbdebug.c | 4 ++-- src/southbridge/amd/sb800/hda.c | 2 +- 22 files changed, 62 insertions(+), 62 deletions(-) (limited to 'src/southbridge/amd') diff --git a/src/southbridge/amd/agesa/hudson/early_setup.c b/src/southbridge/amd/agesa/hudson/early_setup.c index 1cdaa056b8..a5f46bec24 100644 --- a/src/southbridge/amd/agesa/hudson/early_setup.c +++ b/src/southbridge/amd/agesa/hudson/early_setup.c @@ -94,7 +94,7 @@ int s3_save_nvram_early(u32 dword, int size, int nvram_pos) int i; printk(BIOS_DEBUG, "Writing %x of size %d to nvram pos: %d\n", dword, size, nvram_pos); - for (i = 0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -107,7 +107,7 @@ int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) { u32 data = *old_dword; int i; - for (i = 0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -47,7 +47,7 @@ unsigned long get_top_of_ram(void) int xnvram_pos = 0xf8, xi; if (acpi_get_sleep_type() != 3) return 0; - for (xi = 0; xi<4; xi++) { + for (xi = 0; xi < 4; xi++) { outb(xnvram_pos, BIOSRAM_INDEX); xdata &= ~(0xff << (xi * 8)); xdata |= inb(BIOSRAM_DATA) << (xi *8); diff --git a/src/southbridge/amd/amd8111/amd8111_smbus.h b/src/southbridge/amd/amd8111/amd8111_smbus.h index bf0b03791f..f82bb19e8e 100644 --- a/src/southbridge/amd/amd8111/amd8111_smbus.h +++ b/src/southbridge/amd/amd8111/amd8111_smbus.h @@ -267,7 +267,7 @@ static int do_smbus_block_read(unsigned smbus_io_base, unsigned device, unsigned } /* read data block */ - for (i=0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; diff --git a/src/southbridge/amd/cimx/sb800/ramtop.c b/src/southbridge/amd/cimx/sb800/ramtop.c index c1ea53e66d..44a49600ac 100644 --- a/src/southbridge/amd/cimx/sb800/ramtop.c +++ b/src/southbridge/amd/cimx/sb800/ramtop.c @@ -33,7 +33,7 @@ void backup_top_of_ram(uint64_t ramtop) { u32 dword = (u32) ramtop; int nvram_pos = 0xf8, i; /* temp */ - for (i = 0; i<4; i++) { + for (i = 0; i < 4; i++) { outb(nvram_pos, BIOSRAM_INDEX); outb((dword >>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -47,7 +47,7 @@ unsigned long get_top_of_ram(void) int xnvram_pos = 0xf8, xi; if (acpi_get_sleep_type() != 3) return 0; - for (xi = 0; xi<4; xi++) { + for (xi = 0; xi < 4; xi++) { outb(xnvram_pos, BIOSRAM_INDEX); xdata &= ~(0xff << (xi * 8)); xdata |= inb(BIOSRAM_DATA) << (xi *8); diff --git a/src/southbridge/amd/cs5535/chipsetinit.c b/src/southbridge/amd/cs5535/chipsetinit.c index a6c0084087..1b7fe5dd80 100644 --- a/src/southbridge/amd/cs5535/chipsetinit.c +++ b/src/southbridge/amd/cs5535/chipsetinit.c @@ -22,11 +22,11 @@ struct msrinit { /* Master Configuration Register for Bus Masters. */ static struct msrinit SB_MASTER_CONF_TABLE[] = { - { USB1_SB_GLD_MSR_CONF, {.hi=0,.lo=0x00008f000} }, /* NOTE: Must be 1st entry in table */ - { USB2_SB_GLD_MSR_CONF, {.hi=0,.lo=0x00008f000} }, - { ATA_SB_GLD_MSR_CONF, {.hi=0,.lo=0x00048f000} }, - { AC97_SB_GLD_MSR_CONF, {.hi=0,.lo=0x00008f000} }, - { MDD_SB_GLD_MSR_CONF, {.hi=0,.lo=0x00000f000} }, + { USB1_SB_GLD_MSR_CONF, {.hi = 0,.lo = 0x00008f000} }, /* NOTE: Must be 1st entry in table */ + { USB2_SB_GLD_MSR_CONF, {.hi = 0,.lo = 0x00008f000} }, + { ATA_SB_GLD_MSR_CONF, {.hi = 0,.lo = 0x00048f000} }, + { AC97_SB_GLD_MSR_CONF, {.hi = 0,.lo = 0x00008f000} }, + { MDD_SB_GLD_MSR_CONF, {.hi = 0,.lo = 0x00000f000} }, /* GLPCI_SB_GLD_MSR_CONF, 0x0FFFFFFFF*/ /* GLCP_SB_GLD_MSR_CONF, 0x0FFFFFFFF*/ /* GLIU_SB_GLD_MSR_CONF, 0x0*/ @@ -35,15 +35,15 @@ static struct msrinit SB_MASTER_CONF_TABLE[] = { /* 5535_A3 Clock Gating*/ static struct msrinit CS5535_CLOCK_GATING_TABLE[] = { - { USB1_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000005} }, - { USB2_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000005} }, - { GLIU_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000004} }, - { GLPCI_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000005} }, - { GLCP_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000004} }, - { MDD_SB_GLD_MSR_PM, {.hi=0, .lo=0x050554111} }, - { ATA_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000005} }, - { AC97_SB_GLD_MSR_PM, {.hi=0, .lo=0x000000005} }, - { 0, {.hi=0, .lo=0x000000000} } + { USB1_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000005} }, + { USB2_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000005} }, + { GLIU_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000004} }, + { GLPCI_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000005} }, + { GLCP_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000004} }, + { MDD_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x050554111} }, + { ATA_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000005} }, + { AC97_SB_GLD_MSR_PM, {.hi = 0, .lo = 0x000000005} }, + { 0, {.hi = 0, .lo = 0x000000000} } }; #ifdef UNUSED_CODE diff --git a/src/southbridge/amd/cs5535/cs5535.c b/src/southbridge/amd/cs5535/cs5535.c index 3f6e48ff55..2868683df7 100644 --- a/src/southbridge/amd/cs5535/cs5535.c +++ b/src/southbridge/amd/cs5535/cs5535.c @@ -56,9 +56,9 @@ static void dump_south(struct device *dev) { int i, j; - for (i=0; i<256; i+=16) { + for (i = 0; i < 256; i+=16) { printk(BIOS_DEBUG, "0x%02x: ", i); - for (j=0; j<16; j++) + for (j = 0; j < 16; j++) printk(BIOS_DEBUG, "%02x ", pci_read_config8(dev, i+j)); printk(BIOS_DEBUG, "\n"); } diff --git a/src/southbridge/amd/cs5536/pirq.c b/src/southbridge/amd/cs5536/pirq.c index 4bb33d512e..0352dbc1ef 100644 --- a/src/southbridge/amd/cs5536/pirq.c +++ b/src/southbridge/amd/cs5536/pirq.c @@ -19,7 +19,7 @@ #include #include -#if (CONFIG_PIRQ_ROUTE==1 && CONFIG_GENERATE_PIRQ_TABLE==1) +#if (CONFIG_PIRQ_ROUTE == 1 && CONFIG_GENERATE_PIRQ_TABLE == 1) void pirq_assign_irqs(const unsigned char pIntAtoD[4]) { device_t pdev; diff --git a/src/southbridge/amd/pi/hudson/early_setup.c b/src/southbridge/amd/pi/hudson/early_setup.c index dce16206f0..29809f1aec 100644 --- a/src/southbridge/amd/pi/hudson/early_setup.c +++ b/src/southbridge/amd/pi/hudson/early_setup.c @@ -149,7 +149,7 @@ int s3_save_nvram_early(u32 dword, int size, int nvram_pos) int i; printk(BIOS_DEBUG, "Writing %x of size %d to nvram pos: %d\n", dword, size, nvram_pos); - for (i = 0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -162,7 +162,7 @@ int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) { u32 data = *old_dword; int i; - for (i = 0; i= pMMIO[i].Base && Limit <= pMMIO[i].Limit) { TempRange = AllocMMIO(pMMIO); if (TempRange == 0) return 0x80000000; @@ -148,12 +148,12 @@ static u32 SetMMIO(u32 Base, u32 Limit, u8 Attribute, MMIORANGE *pMMIO) static u8 FinalizeMMIO(MMIORANGE *pMMIO) { int i, j, n = 0; - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { if (pMMIO[i].Base == pMMIO[i].Limit) { FreeMMIO(&pMMIO[i]); continue; } - for (j=0; j>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -827,7 +827,7 @@ int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) { u32 data = *old_dword; int i; - for (i = 0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; diff --git a/src/southbridge/amd/sb700/reset.c b/src/southbridge/amd/sb700/reset.c index d0cd4a42f0..3c44982e6a 100644 --- a/src/southbridge/amd/sb700/reset.c +++ b/src/southbridge/amd/sb700/reset.c @@ -23,7 +23,7 @@ #define HTIC_BIOSR_Detect (1<<5) #if CONFIG_MAX_PHYSICAL_CPUS > 32 -#define NODE_PCI(x, fn) ((x<32)?(PCI_DEV(CONFIG_CBB,(CONFIG_CDB+x),fn)):(PCI_DEV((CONFIG_CBB-1),(CONFIG_CDB+x-32),fn))) +#define NODE_PCI(x, fn) ((x < 32)?(PCI_DEV(CONFIG_CBB,(CONFIG_CDB+x),fn)):(PCI_DEV((CONFIG_CBB-1),(CONFIG_CDB+x-32),fn))) #else #define NODE_PCI(x, fn) PCI_DEV(CONFIG_CBB,(CONFIG_CDB+x),fn) #endif diff --git a/src/southbridge/amd/sb800/early_setup.c b/src/southbridge/amd/sb800/early_setup.c index 070c1f535b..10961596e0 100644 --- a/src/southbridge/amd/sb800/early_setup.c +++ b/src/southbridge/amd/sb800/early_setup.c @@ -525,7 +525,7 @@ static void sb800_pmio_por_init(void) byte |= 1 << 0; pmio_write(0xB2, byte); - for (i=0; i>(8 * i)) & 0xff , BIOSRAM_DATA); nvram_pos++; @@ -650,7 +650,7 @@ int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) { u32 data = *old_dword; int i; - for (i = 0; i