From 26c664759b53cca1de4bbb4c517fc65f4ca079c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 4 Feb 2015 13:09:06 +0200 Subject: AMD K8 fam10: Refactor offset_unitid configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I198f2ad321e1a8b6d932f5624b129e312e36a309 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/8349 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- src/include/device/hypertransport_def.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/device/hypertransport_def.h') diff --git a/src/include/device/hypertransport_def.h b/src/include/device/hypertransport_def.h index d6276ba003..8af94d94ac 100644 --- a/src/include/device/hypertransport_def.h +++ b/src/include/device/hypertransport_def.h @@ -18,4 +18,11 @@ #define HT_FREQ_2600Mhz 14 #define HT_FREQ_VENDOR 15 /* AMD defines this to be 100Mhz */ + +static inline bool offset_unit_id(bool is_sb_ht_chain) +{ + bool need_offset = (CONFIG_HT_CHAIN_UNITID_BASE != 1) || (CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20); + return need_offset && (!CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY || is_sb_ht_chain); +} + #endif /* DEVICE_HYPERTRANSPORT_DEF_H */ -- cgit v1.2.3