提交 ef1e8d03 编写于 作者: A Aristeu Rozanski 提交者: Mauro Carvalho Chehab

sb_edac: make RANK_CFG_A value part of sbridge_info

This is in preparation of Ivy Bridge support.
Signed-off-by: NAristeu Rozanski <arozansk@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 5e01dc7b
...@@ -262,7 +262,7 @@ static const u32 correrrthrsld[] = { ...@@ -262,7 +262,7 @@ static const u32 correrrthrsld[] = {
/* Device 17, function 0 */ /* Device 17, function 0 */
#define RANK_CFG_A 0x0328 #define SB_RANK_CFG_A 0x0328
#define IS_RDIMM_ENABLED(reg) GET_BITFIELD(reg, 11, 11) #define IS_RDIMM_ENABLED(reg) GET_BITFIELD(reg, 11, 11)
...@@ -275,6 +275,7 @@ static const u32 correrrthrsld[] = { ...@@ -275,6 +275,7 @@ static const u32 correrrthrsld[] = {
struct sbridge_info { struct sbridge_info {
u32 mcmtr; u32 mcmtr;
u32 rankcfgr;
}; };
struct sbridge_channel { struct sbridge_channel {
...@@ -520,6 +521,8 @@ static int get_dimm_config(struct mem_ctl_info *mci) ...@@ -520,6 +521,8 @@ static int get_dimm_config(struct mem_ctl_info *mci)
enum edac_type mode; enum edac_type mode;
enum mem_type mtype; enum mem_type mtype;
pvt->info.rankcfgr = SB_RANK_CFG_A;
pci_read_config_dword(pvt->pci_br, SAD_TARGET, &reg); pci_read_config_dword(pvt->pci_br, SAD_TARGET, &reg);
pvt->sbridge_dev->source_id = SOURCE_ID(reg); pvt->sbridge_dev->source_id = SOURCE_ID(reg);
...@@ -558,7 +561,8 @@ static int get_dimm_config(struct mem_ctl_info *mci) ...@@ -558,7 +561,8 @@ static int get_dimm_config(struct mem_ctl_info *mci)
} }
if (pvt->pci_ddrio) { if (pvt->pci_ddrio) {
pci_read_config_dword(pvt->pci_ddrio, RANK_CFG_A, &reg); pci_read_config_dword(pvt->pci_ddrio, pvt->info.rankcfgr,
&reg);
if (IS_RDIMM_ENABLED(reg)) { if (IS_RDIMM_ENABLED(reg)) {
/* FIXME: Can also be LRDIMM */ /* FIXME: Can also be LRDIMM */
edac_dbg(0, "Memory is registered\n"); edac_dbg(0, "Memory is registered\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册