[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block: Add Intel common smbus code

Aamir Bohra (Code Review) gerrit at coreboot.org
Fri Apr 21 08:48:15 CEST 2017


Aamir Bohra has posted comments on this change. ( https://review.coreboot.org/19372 )

Change subject: soc/intel/common/block: Add Intel common smbus code
......................................................................


Patch Set 2:

(3 comments)

https://review.coreboot.org/#/c/19372/2/src/soc/intel/common/block/smbus/smbus.c
File src/soc/intel/common/block/smbus/smbus.c:

Line 36: #define SMBUS_TIMEOUT	(10 * 1000 * 100)
> please comment out delay value
Renamed it to SMBUS_TIMEOUT_COUNT as it does not represent time unit,max time out delay would be SMBUS_TIMEOUT_COUNT * inb instruction cycle


PS2, Line 79: inb
> can't we use ioread? just a thought
using standard io(arch/io) call..i think this should be fine


PS2, Line 180: #if !ENV_RAMSTAGE
             : 
             : u8 smbus_read_byte(u32 smbus_dev, u8 addr, u8 offset)
             : {
             : 	return do_smbus_read_byte(SMBUS_IO_BASE, addr, offset);
             : }
             : 
             : u8 smbus_write_byte(u32 smbus_dev, u8 addr, u8 offset, u8 value)
             : {
             : 	return do_smbus_write_byte(SMBUS_IO_BASE, addr, offset, value);
             : }
             : #endif
> u don't want to include this 2 function in ramstage?
there was a definition conflict for these functions owing to multiple declarations...could not co-exist in ramstage.Had to limit scope.


-- 
To view, visit https://review.coreboot.org/19372
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I936143a334c31937d557c6828e5876d35b133567
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Hannah Williams <hannah.williams at intel.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi at intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.com>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: Yes



More information about the coreboot-gerrit mailing list