diff options
Diffstat (limited to 'src/southbridge/amd')
-rw-r--r-- | src/southbridge/amd/cs5535/cs5535_early_setup.c | 10 | ||||
-rw-r--r-- | src/southbridge/amd/cs5536/cs5536_smbus2.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/southbridge/amd/cs5535/cs5535_early_setup.c b/src/southbridge/amd/cs5535/cs5535_early_setup.c index 583602c3dd..fbb3647578 100644 --- a/src/southbridge/amd/cs5535/cs5535_early_setup.c +++ b/src/southbridge/amd/cs5535/cs5535_early_setup.c @@ -23,11 +23,11 @@ static void cs5535_setup_extmsr(void) /* forward MSR access to CS5535_GLINK_PORT_NUM to CS5535_DEV_NUM */ msr.hi = msr.lo = 0x00000000; - if (CS5535_GLINK_PORT_NUM <= 4) { - msr.lo = CS5535_DEV_NUM << ((CS5535_GLINK_PORT_NUM - 1) * 8); - } else { - msr.hi = CS5535_DEV_NUM << ((CS5535_GLINK_PORT_NUM - 5) * 8); - } +#if CS5535_GLINK_PORT_NUM <= 4 + msr.lo = CS5535_DEV_NUM << ((CS5535_GLINK_PORT_NUM - 1) * 8); +#else + msr.hi = CS5535_DEV_NUM << ((CS5535_GLINK_PORT_NUM - 5) * 8); +#endif wrmsr(0x5000201e, msr); } diff --git a/src/southbridge/amd/cs5536/cs5536_smbus2.h b/src/southbridge/amd/cs5536/cs5536_smbus2.h index a470b3714c..6e50a8cc84 100644 --- a/src/southbridge/amd/cs5536/cs5536_smbus2.h +++ b/src/southbridge/amd/cs5536/cs5536_smbus2.h @@ -239,9 +239,9 @@ static void _doread(unsigned smbus_io_base, unsigned char device, *data++ = val; if (count > 1) { - int ret = smbus_wait(smbus_io_base); + ret = smbus_wait(smbus_io_base); if (ret) - return ret; + return; } count--; |