Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBUS register layout outside header ......................................................................
sb/intel/common: Move SMBUS register layout outside header
Change-Id: I841cc3bd636414c59af15d64d3f96b9be158af98 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/southbridge/intel/common/smbus.c D src/southbridge/intel/common/smbus.h 2 files changed, 16 insertions(+), 40 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/38231/1
diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c index 1085cbd..374eea6 100644 --- a/src/southbridge/intel/common/smbus.c +++ b/src/southbridge/intel/common/smbus.c @@ -22,15 +22,28 @@ #include <device/smbus_host.h> #include <types.h>
-#include "smbus.h" - - #if CONFIG(DEBUG_SMBUS) #define dprintk(args...) printk(BIOS_DEBUG, ##args) #else #define dprintk(args...) do {} while (0) #endif
+/* SMBus register offsets. */ +#define SMBHSTSTAT 0x0 +#define SMBHSTCTL 0x2 +#define SMBHSTCMD 0x3 +#define SMBXMITADD 0x4 +#define SMBHSTDAT0 0x5 +#define SMBHSTDAT1 0x6 +#define SMBBLKDAT 0x7 +#define SMBTRNSADD 0x9 +#define SMBSLVDATA 0xa +#define SMLINK_PIN_CTL 0xe +#define SMBUS_PIN_CTL 0xf +#define SMBSLVCMD 0x11 + +#define SMB_RCV_SLVA SMBTRNSADD + /* I801 command constants */ #define I801_QUICK (0 << 2) #define I801_BYTE (1 << 2) diff --git a/src/southbridge/intel/common/smbus.h b/src/southbridge/intel/common/smbus.h deleted file mode 100644 index e72203e4..0000000 --- a/src/southbridge/intel/common/smbus.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2005 Yinghai Lu yinghailu@gmail.com - * Copyright (C) 2009 coresystems GmbH - * Copyright (C) 2013 Vladimir Serbinenko - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef INTEL_COMMON_SMBUS_H -#define INTEL_COMMON_SMBUS_H - -/* SMBus register offsets. */ -#define SMBHSTSTAT 0x0 -#define SMBHSTCTL 0x2 -#define SMBHSTCMD 0x3 -#define SMBXMITADD 0x4 -#define SMBHSTDAT0 0x5 -#define SMBHSTDAT1 0x6 -#define SMBBLKDAT 0x7 -#define SMBTRNSADD 0x9 -#define SMBSLVDATA 0xa -#define SMLINK_PIN_CTL 0xe -#define SMBUS_PIN_CTL 0xf -#define SMBSLVCMD 0x11 - -#define SMB_RCV_SLVA SMBTRNSADD - -#endif
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBUS register layout outside header ......................................................................
Patch Set 2: Code-Review+1
What's gained with this?
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBUS register layout outside header ......................................................................
Patch Set 2:
Patch Set 2: Code-Review+1
What's gained with this?
We get rid of one of ~15 header files where SMBUS related declarations. It also forces abstraction and ownership of the register space to this single file.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBUS register layout outside header ......................................................................
Patch Set 3: Code-Review+2
Patch Set 2:
Patch Set 2: Code-Review+1
What's gained with this?
We get rid of one of ~15 header files where SMBUS related declarations. It also forces abstraction and ownership of the register space to this single file.
Ack
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38231
to look at the new patch set (#4).
Change subject: sb/intel/common: Move SMBus register layout outside header ......................................................................
sb/intel/common: Move SMBus register layout outside header
Change-Id: I841cc3bd636414c59af15d64d3f96b9be158af98 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/southbridge/intel/common/smbus.c D src/southbridge/intel/common/smbus.h 2 files changed, 16 insertions(+), 40 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/38231/4
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBus register layout outside header ......................................................................
Patch Set 4: Code-Review+2
Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38231 )
Change subject: sb/intel/common: Move SMBus register layout outside header ......................................................................
sb/intel/common: Move SMBus register layout outside header
Change-Id: I841cc3bd636414c59af15d64d3f96b9be158af98 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/38231 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/common/smbus.c D src/southbridge/intel/common/smbus.h 2 files changed, 16 insertions(+), 40 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c index d253ae7..b54f1d7 100644 --- a/src/southbridge/intel/common/smbus.c +++ b/src/southbridge/intel/common/smbus.c @@ -22,15 +22,28 @@ #include <device/smbus_host.h> #include <types.h>
-#include "smbus.h" - - #if CONFIG(DEBUG_SMBUS) #define dprintk(args...) printk(BIOS_DEBUG, ##args) #else #define dprintk(args...) do {} while (0) #endif
+/* SMBus register offsets. */ +#define SMBHSTSTAT 0x0 +#define SMBHSTCTL 0x2 +#define SMBHSTCMD 0x3 +#define SMBXMITADD 0x4 +#define SMBHSTDAT0 0x5 +#define SMBHSTDAT1 0x6 +#define SMBBLKDAT 0x7 +#define SMBTRNSADD 0x9 +#define SMBSLVDATA 0xa +#define SMLINK_PIN_CTL 0xe +#define SMBUS_PIN_CTL 0xf +#define SMBSLVCMD 0x11 + +#define SMB_RCV_SLVA SMBTRNSADD + /* I801 command constants */ #define I801_QUICK (0 << 2) #define I801_BYTE (1 << 2) diff --git a/src/southbridge/intel/common/smbus.h b/src/southbridge/intel/common/smbus.h deleted file mode 100644 index e72203e4..0000000 --- a/src/southbridge/intel/common/smbus.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2005 Yinghai Lu yinghailu@gmail.com - * Copyright (C) 2009 coresystems GmbH - * Copyright (C) 2013 Vladimir Serbinenko - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef INTEL_COMMON_SMBUS_H -#define INTEL_COMMON_SMBUS_H - -/* SMBus register offsets. */ -#define SMBHSTSTAT 0x0 -#define SMBHSTCTL 0x2 -#define SMBHSTCMD 0x3 -#define SMBXMITADD 0x4 -#define SMBHSTDAT0 0x5 -#define SMBHSTDAT1 0x6 -#define SMBBLKDAT 0x7 -#define SMBTRNSADD 0x9 -#define SMBSLVDATA 0xa -#define SMLINK_PIN_CTL 0xe -#define SMBUS_PIN_CTL 0xf -#define SMBSLVCMD 0x11 - -#define SMB_RCV_SLVA SMBTRNSADD - -#endif