i7300_edac.c (dd23cd6eb1f59ba722a6e6aa228adff7c01404de) | i7300_edac.c (7e881856eee8b889b76cd1d8e04ce2fc79b72099) |
---|---|
1/* 2 * Intel 7300 class Memory Controllers kernel module (Clarksboro) 3 * 4 * This file may be distributed under the terms of the 5 * GNU General Public License version 2 only. 6 * 7 * Copyright (c) 2010 by: 8 * Mauro Carvalho Chehab <mchehab@redhat.com> --- 168 unchanged lines hidden (view full) --- 177#define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 5)) ? 8 : 4) 178#define MTR_DIMM_RANKS(mtr) (((mtr) & (1 << 4)) ? 1 : 0) 179#define MTR_DIMM_ROWS(mtr) (((mtr) >> 2) & 0x3) 180#define MTR_DRAM_BANKS_ADDR_BITS 2 181#define MTR_DIMM_ROWS_ADDR_BITS(mtr) (MTR_DIMM_ROWS(mtr) + 13) 182#define MTR_DIMM_COLS(mtr) ((mtr) & 0x3) 183#define MTR_DIMM_COLS_ADDR_BITS(mtr) (MTR_DIMM_COLS(mtr) + 10) 184 | 1/* 2 * Intel 7300 class Memory Controllers kernel module (Clarksboro) 3 * 4 * This file may be distributed under the terms of the 5 * GNU General Public License version 2 only. 6 * 7 * Copyright (c) 2010 by: 8 * Mauro Carvalho Chehab <mchehab@redhat.com> --- 168 unchanged lines hidden (view full) --- 177#define MTR_DRAM_BANKS(mtr) (((mtr) & (1 << 5)) ? 8 : 4) 178#define MTR_DIMM_RANKS(mtr) (((mtr) & (1 << 4)) ? 1 : 0) 179#define MTR_DIMM_ROWS(mtr) (((mtr) >> 2) & 0x3) 180#define MTR_DRAM_BANKS_ADDR_BITS 2 181#define MTR_DIMM_ROWS_ADDR_BITS(mtr) (MTR_DIMM_ROWS(mtr) + 13) 182#define MTR_DIMM_COLS(mtr) ((mtr) & 0x3) 183#define MTR_DIMM_COLS_ADDR_BITS(mtr) (MTR_DIMM_COLS(mtr) + 10) 184 |
185#ifdef CONFIG_EDAC_DEBUG 186/* MTR NUMROW */ 187static const char *numrow_toString[] = { 188 "8,192 - 13 rows", 189 "16,384 - 14 rows", 190 "32,768 - 15 rows", 191 "65,536 - 16 rows" 192}; 193 194/* MTR NUMCOL */ 195static const char *numcol_toString[] = { 196 "1,024 - 10 columns", 197 "2,048 - 11 columns", 198 "4,096 - 12 columns", 199 "reserved" 200}; 201#endif 202 | |
203/************************************************ 204 * i7300 Register definitions for error detection 205 ************************************************/ 206 207/* 208 * Device 16.1: FBD Error Registers 209 */ 210#define FERR_FAT_FBD 0x98 --- 429 unchanged lines hidden (view full) --- 640 641 debugf2("\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 642 643 debugf2("\t\tELECTRICAL THROTTLING is %s\n", 644 MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 645 646 debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 647 debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANKS(mtr) ? "double" : "single"); | 185/************************************************ 186 * i7300 Register definitions for error detection 187 ************************************************/ 188 189/* 190 * Device 16.1: FBD Error Registers 191 */ 192#define FERR_FAT_FBD 0x98 --- 429 unchanged lines hidden (view full) --- 622 623 debugf2("\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 624 625 debugf2("\t\tELECTRICAL THROTTLING is %s\n", 626 MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 627 628 debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 629 debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANKS(mtr) ? "double" : "single"); |
648 debugf2("\t\tNUMROW: %s\n", numrow_toString[MTR_DIMM_ROWS(mtr)]); 649 debugf2("\t\tNUMCOL: %s\n", numcol_toString[MTR_DIMM_COLS(mtr)]); | 630 debugf2("\t\tNUMROW: %s\n", 631 MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 632 MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 633 MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 634 "65,536 - 16 rows"); 635 debugf2("\t\tNUMCOL: %s\n", 636 MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 637 MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 638 MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 639 "reserved"); |
650 debugf2("\t\tSIZE: %d MB\n", dinfo->megabytes); 651 652 /* 653 * The type of error detection actually depends of the 654 * mode of operation. When it is just one single memory chip, at 655 * socket 0, channel 0, it uses 8-byte-over-32-byte SECDED+ code. 656 * In normal or mirrored mode, it uses Lockstep mode, 657 * with the possibility of using an extended algorithm for x8 memories --- 562 unchanged lines hidden --- | 640 debugf2("\t\tSIZE: %d MB\n", dinfo->megabytes); 641 642 /* 643 * The type of error detection actually depends of the 644 * mode of operation. When it is just one single memory chip, at 645 * socket 0, channel 0, it uses 8-byte-over-32-byte SECDED+ code. 646 * In normal or mirrored mode, it uses Lockstep mode, 647 * with the possibility of using an extended algorithm for x8 memories --- 562 unchanged lines hidden --- |