cpc925_edac.c 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081
  1. /*
  2. * cpc925_edac.c, EDAC driver for IBM CPC925 Bridge and Memory Controller.
  3. *
  4. * Copyright (c) 2008 Wind River Systems, Inc.
  5. *
  6. * Authors: Cao Qingtao <qingtao.cao@windriver.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #include <linux/module.h>
  22. #include <linux/init.h>
  23. #include <linux/io.h>
  24. #include <linux/edac.h>
  25. #include <linux/of.h>
  26. #include <linux/platform_device.h>
  27. #include <linux/gfp.h>
  28. #include "edac_core.h"
  29. #include "edac_module.h"
  30. #define CPC925_EDAC_REVISION " Ver: 1.0.0"
  31. #define CPC925_EDAC_MOD_STR "cpc925_edac"
  32. #define cpc925_printk(level, fmt, arg...) \
  33. edac_printk(level, "CPC925", fmt, ##arg)
  34. #define cpc925_mc_printk(mci, level, fmt, arg...) \
  35. edac_mc_chipset_printk(mci, level, "CPC925", fmt, ##arg)
  36. /*
  37. * CPC925 registers are of 32 bits with bit0 defined at the
  38. * most significant bit and bit31 at that of least significant.
  39. */
  40. #define CPC925_BITS_PER_REG 32
  41. #define CPC925_BIT(nr) (1UL << (CPC925_BITS_PER_REG - 1 - nr))
  42. /*
  43. * EDAC device names for the error detections of
  44. * CPU Interface and Hypertransport Link.
  45. */
  46. #define CPC925_CPU_ERR_DEV "cpu"
  47. #define CPC925_HT_LINK_DEV "htlink"
  48. /* Suppose DDR Refresh cycle is 15.6 microsecond */
  49. #define CPC925_REF_FREQ 0xFA69
  50. #define CPC925_SCRUB_BLOCK_SIZE 64 /* bytes */
  51. #define CPC925_NR_CSROWS 8
  52. /*
  53. * All registers and bits definitions are taken from
  54. * "CPC925 Bridge and Memory Controller User Manual, SA14-2761-02".
  55. */
  56. /*
  57. * CPU and Memory Controller Registers
  58. */
  59. /************************************************************
  60. * Processor Interface Exception Mask Register (APIMASK)
  61. ************************************************************/
  62. #define REG_APIMASK_OFFSET 0x30070
  63. enum apimask_bits {
  64. APIMASK_DART = CPC925_BIT(0), /* DART Exception */
  65. APIMASK_ADI0 = CPC925_BIT(1), /* Handshake Error on PI0_ADI */
  66. APIMASK_ADI1 = CPC925_BIT(2), /* Handshake Error on PI1_ADI */
  67. APIMASK_STAT = CPC925_BIT(3), /* Status Exception */
  68. APIMASK_DERR = CPC925_BIT(4), /* Data Error Exception */
  69. APIMASK_ADRS0 = CPC925_BIT(5), /* Addressing Exception on PI0 */
  70. APIMASK_ADRS1 = CPC925_BIT(6), /* Addressing Exception on PI1 */
  71. /* BIT(7) Reserved */
  72. APIMASK_ECC_UE_H = CPC925_BIT(8), /* UECC upper */
  73. APIMASK_ECC_CE_H = CPC925_BIT(9), /* CECC upper */
  74. APIMASK_ECC_UE_L = CPC925_BIT(10), /* UECC lower */
  75. APIMASK_ECC_CE_L = CPC925_BIT(11), /* CECC lower */
  76. CPU_MASK_ENABLE = (APIMASK_DART | APIMASK_ADI0 | APIMASK_ADI1 |
  77. APIMASK_STAT | APIMASK_DERR | APIMASK_ADRS0 |
  78. APIMASK_ADRS1),
  79. ECC_MASK_ENABLE = (APIMASK_ECC_UE_H | APIMASK_ECC_CE_H |
  80. APIMASK_ECC_UE_L | APIMASK_ECC_CE_L),
  81. };
  82. #define APIMASK_ADI(n) CPC925_BIT(((n)+1))
  83. /************************************************************
  84. * Processor Interface Exception Register (APIEXCP)
  85. ************************************************************/
  86. #define REG_APIEXCP_OFFSET 0x30060
  87. enum apiexcp_bits {
  88. APIEXCP_DART = CPC925_BIT(0), /* DART Exception */
  89. APIEXCP_ADI0 = CPC925_BIT(1), /* Handshake Error on PI0_ADI */
  90. APIEXCP_ADI1 = CPC925_BIT(2), /* Handshake Error on PI1_ADI */
  91. APIEXCP_STAT = CPC925_BIT(3), /* Status Exception */
  92. APIEXCP_DERR = CPC925_BIT(4), /* Data Error Exception */
  93. APIEXCP_ADRS0 = CPC925_BIT(5), /* Addressing Exception on PI0 */
  94. APIEXCP_ADRS1 = CPC925_BIT(6), /* Addressing Exception on PI1 */
  95. /* BIT(7) Reserved */
  96. APIEXCP_ECC_UE_H = CPC925_BIT(8), /* UECC upper */
  97. APIEXCP_ECC_CE_H = CPC925_BIT(9), /* CECC upper */
  98. APIEXCP_ECC_UE_L = CPC925_BIT(10), /* UECC lower */
  99. APIEXCP_ECC_CE_L = CPC925_BIT(11), /* CECC lower */
  100. CPU_EXCP_DETECTED = (APIEXCP_DART | APIEXCP_ADI0 | APIEXCP_ADI1 |
  101. APIEXCP_STAT | APIEXCP_DERR | APIEXCP_ADRS0 |
  102. APIEXCP_ADRS1),
  103. UECC_EXCP_DETECTED = (APIEXCP_ECC_UE_H | APIEXCP_ECC_UE_L),
  104. CECC_EXCP_DETECTED = (APIEXCP_ECC_CE_H | APIEXCP_ECC_CE_L),
  105. ECC_EXCP_DETECTED = (UECC_EXCP_DETECTED | CECC_EXCP_DETECTED),
  106. };
  107. /************************************************************
  108. * Memory Bus Configuration Register (MBCR)
  109. ************************************************************/
  110. #define REG_MBCR_OFFSET 0x2190
  111. #define MBCR_64BITCFG_SHIFT 23
  112. #define MBCR_64BITCFG_MASK (1UL << MBCR_64BITCFG_SHIFT)
  113. #define MBCR_64BITBUS_SHIFT 22
  114. #define MBCR_64BITBUS_MASK (1UL << MBCR_64BITBUS_SHIFT)
  115. /************************************************************
  116. * Memory Bank Mode Register (MBMR)
  117. ************************************************************/
  118. #define REG_MBMR_OFFSET 0x21C0
  119. #define MBMR_MODE_MAX_VALUE 0xF
  120. #define MBMR_MODE_SHIFT 25
  121. #define MBMR_MODE_MASK (MBMR_MODE_MAX_VALUE << MBMR_MODE_SHIFT)
  122. #define MBMR_BBA_SHIFT 24
  123. #define MBMR_BBA_MASK (1UL << MBMR_BBA_SHIFT)
  124. /************************************************************
  125. * Memory Bank Boundary Address Register (MBBAR)
  126. ************************************************************/
  127. #define REG_MBBAR_OFFSET 0x21D0
  128. #define MBBAR_BBA_MAX_VALUE 0xFF
  129. #define MBBAR_BBA_SHIFT 24
  130. #define MBBAR_BBA_MASK (MBBAR_BBA_MAX_VALUE << MBBAR_BBA_SHIFT)
  131. /************************************************************
  132. * Memory Scrub Control Register (MSCR)
  133. ************************************************************/
  134. #define REG_MSCR_OFFSET 0x2400
  135. #define MSCR_SCRUB_MOD_MASK 0xC0000000 /* scrub_mod - bit0:1*/
  136. #define MSCR_BACKGR_SCRUB 0x40000000 /* 01 */
  137. #define MSCR_SI_SHIFT 16 /* si - bit8:15*/
  138. #define MSCR_SI_MAX_VALUE 0xFF
  139. #define MSCR_SI_MASK (MSCR_SI_MAX_VALUE << MSCR_SI_SHIFT)
  140. /************************************************************
  141. * Memory Scrub Range Start Register (MSRSR)
  142. ************************************************************/
  143. #define REG_MSRSR_OFFSET 0x2410
  144. /************************************************************
  145. * Memory Scrub Range End Register (MSRER)
  146. ************************************************************/
  147. #define REG_MSRER_OFFSET 0x2420
  148. /************************************************************
  149. * Memory Scrub Pattern Register (MSPR)
  150. ************************************************************/
  151. #define REG_MSPR_OFFSET 0x2430
  152. /************************************************************
  153. * Memory Check Control Register (MCCR)
  154. ************************************************************/
  155. #define REG_MCCR_OFFSET 0x2440
  156. enum mccr_bits {
  157. MCCR_ECC_EN = CPC925_BIT(0), /* ECC high and low check */
  158. };
  159. /************************************************************
  160. * Memory Check Range End Register (MCRER)
  161. ************************************************************/
  162. #define REG_MCRER_OFFSET 0x2450
  163. /************************************************************
  164. * Memory Error Address Register (MEAR)
  165. ************************************************************/
  166. #define REG_MEAR_OFFSET 0x2460
  167. #define MEAR_BCNT_MAX_VALUE 0x3
  168. #define MEAR_BCNT_SHIFT 30
  169. #define MEAR_BCNT_MASK (MEAR_BCNT_MAX_VALUE << MEAR_BCNT_SHIFT)
  170. #define MEAR_RANK_MAX_VALUE 0x7
  171. #define MEAR_RANK_SHIFT 27
  172. #define MEAR_RANK_MASK (MEAR_RANK_MAX_VALUE << MEAR_RANK_SHIFT)
  173. #define MEAR_COL_MAX_VALUE 0x7FF
  174. #define MEAR_COL_SHIFT 16
  175. #define MEAR_COL_MASK (MEAR_COL_MAX_VALUE << MEAR_COL_SHIFT)
  176. #define MEAR_BANK_MAX_VALUE 0x3
  177. #define MEAR_BANK_SHIFT 14
  178. #define MEAR_BANK_MASK (MEAR_BANK_MAX_VALUE << MEAR_BANK_SHIFT)
  179. #define MEAR_ROW_MASK 0x00003FFF
  180. /************************************************************
  181. * Memory Error Syndrome Register (MESR)
  182. ************************************************************/
  183. #define REG_MESR_OFFSET 0x2470
  184. #define MESR_ECC_SYN_H_MASK 0xFF00
  185. #define MESR_ECC_SYN_L_MASK 0x00FF
  186. /************************************************************
  187. * Memory Mode Control Register (MMCR)
  188. ************************************************************/
  189. #define REG_MMCR_OFFSET 0x2500
  190. enum mmcr_bits {
  191. MMCR_REG_DIMM_MODE = CPC925_BIT(3),
  192. };
  193. /*
  194. * HyperTransport Link Registers
  195. */
  196. /************************************************************
  197. * Error Handling/Enumeration Scratch Pad Register (ERRCTRL)
  198. ************************************************************/
  199. #define REG_ERRCTRL_OFFSET 0x70140
  200. enum errctrl_bits { /* nonfatal interrupts for */
  201. ERRCTRL_SERR_NF = CPC925_BIT(0), /* system error */
  202. ERRCTRL_CRC_NF = CPC925_BIT(1), /* CRC error */
  203. ERRCTRL_RSP_NF = CPC925_BIT(2), /* Response error */
  204. ERRCTRL_EOC_NF = CPC925_BIT(3), /* End-Of-Chain error */
  205. ERRCTRL_OVF_NF = CPC925_BIT(4), /* Overflow error */
  206. ERRCTRL_PROT_NF = CPC925_BIT(5), /* Protocol error */
  207. ERRCTRL_RSP_ERR = CPC925_BIT(6), /* Response error received */
  208. ERRCTRL_CHN_FAL = CPC925_BIT(7), /* Sync flooding detected */
  209. HT_ERRCTRL_ENABLE = (ERRCTRL_SERR_NF | ERRCTRL_CRC_NF |
  210. ERRCTRL_RSP_NF | ERRCTRL_EOC_NF |
  211. ERRCTRL_OVF_NF | ERRCTRL_PROT_NF),
  212. HT_ERRCTRL_DETECTED = (ERRCTRL_RSP_ERR | ERRCTRL_CHN_FAL),
  213. };
  214. /************************************************************
  215. * Link Configuration and Link Control Register (LINKCTRL)
  216. ************************************************************/
  217. #define REG_LINKCTRL_OFFSET 0x70110
  218. enum linkctrl_bits {
  219. LINKCTRL_CRC_ERR = (CPC925_BIT(22) | CPC925_BIT(23)),
  220. LINKCTRL_LINK_FAIL = CPC925_BIT(27),
  221. HT_LINKCTRL_DETECTED = (LINKCTRL_CRC_ERR | LINKCTRL_LINK_FAIL),
  222. };
  223. /************************************************************
  224. * Link FreqCap/Error/Freq/Revision ID Register (LINKERR)
  225. ************************************************************/
  226. #define REG_LINKERR_OFFSET 0x70120
  227. enum linkerr_bits {
  228. LINKERR_EOC_ERR = CPC925_BIT(17), /* End-Of-Chain error */
  229. LINKERR_OVF_ERR = CPC925_BIT(18), /* Receive Buffer Overflow */
  230. LINKERR_PROT_ERR = CPC925_BIT(19), /* Protocol error */
  231. HT_LINKERR_DETECTED = (LINKERR_EOC_ERR | LINKERR_OVF_ERR |
  232. LINKERR_PROT_ERR),
  233. };
  234. /************************************************************
  235. * Bridge Control Register (BRGCTRL)
  236. ************************************************************/
  237. #define REG_BRGCTRL_OFFSET 0x70300
  238. enum brgctrl_bits {
  239. BRGCTRL_DETSERR = CPC925_BIT(0), /* SERR on Secondary Bus */
  240. BRGCTRL_SECBUSRESET = CPC925_BIT(9), /* Secondary Bus Reset */
  241. };
  242. /* Private structure for edac memory controller */
  243. struct cpc925_mc_pdata {
  244. void __iomem *vbase;
  245. unsigned long total_mem;
  246. const char *name;
  247. int edac_idx;
  248. };
  249. /* Private structure for common edac device */
  250. struct cpc925_dev_info {
  251. void __iomem *vbase;
  252. struct platform_device *pdev;
  253. char *ctl_name;
  254. int edac_idx;
  255. struct edac_device_ctl_info *edac_dev;
  256. void (*init)(struct cpc925_dev_info *dev_info);
  257. void (*exit)(struct cpc925_dev_info *dev_info);
  258. void (*check)(struct edac_device_ctl_info *edac_dev);
  259. };
  260. /* Get total memory size from Open Firmware DTB */
  261. static void get_total_mem(struct cpc925_mc_pdata *pdata)
  262. {
  263. struct device_node *np = NULL;
  264. const unsigned int *reg, *reg_end;
  265. int len, sw, aw;
  266. unsigned long start, size;
  267. np = of_find_node_by_type(NULL, "memory");
  268. if (!np)
  269. return;
  270. aw = of_n_addr_cells(np);
  271. sw = of_n_size_cells(np);
  272. reg = (const unsigned int *)of_get_property(np, "reg", &len);
  273. reg_end = reg + len/4;
  274. pdata->total_mem = 0;
  275. do {
  276. start = of_read_number(reg, aw);
  277. reg += aw;
  278. size = of_read_number(reg, sw);
  279. reg += sw;
  280. debugf1("%s: start 0x%lx, size 0x%lx\n", __func__,
  281. start, size);
  282. pdata->total_mem += size;
  283. } while (reg < reg_end);
  284. of_node_put(np);
  285. debugf0("%s: total_mem 0x%lx\n", __func__, pdata->total_mem);
  286. }
  287. static void cpc925_init_csrows(struct mem_ctl_info *mci)
  288. {
  289. struct cpc925_mc_pdata *pdata = mci->pvt_info;
  290. struct csrow_info *csrow;
  291. int index;
  292. u32 mbmr, mbbar, bba;
  293. unsigned long row_size, last_nr_pages = 0;
  294. get_total_mem(pdata);
  295. for (index = 0; index < mci->nr_csrows; index++) {
  296. mbmr = __raw_readl(pdata->vbase + REG_MBMR_OFFSET +
  297. 0x20 * index);
  298. mbbar = __raw_readl(pdata->vbase + REG_MBBAR_OFFSET +
  299. 0x20 + index);
  300. bba = (((mbmr & MBMR_BBA_MASK) >> MBMR_BBA_SHIFT) << 8) |
  301. ((mbbar & MBBAR_BBA_MASK) >> MBBAR_BBA_SHIFT);
  302. if (bba == 0)
  303. continue; /* not populated */
  304. csrow = &mci->csrows[index];
  305. row_size = bba * (1UL << 28); /* 256M */
  306. csrow->first_page = last_nr_pages;
  307. csrow->nr_pages = row_size >> PAGE_SHIFT;
  308. csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
  309. last_nr_pages = csrow->last_page + 1;
  310. csrow->mtype = MEM_RDDR;
  311. csrow->edac_mode = EDAC_SECDED;
  312. switch (csrow->nr_channels) {
  313. case 1: /* Single channel */
  314. csrow->grain = 32; /* four-beat burst of 32 bytes */
  315. break;
  316. case 2: /* Dual channel */
  317. default:
  318. csrow->grain = 64; /* four-beat burst of 64 bytes */
  319. break;
  320. }
  321. switch ((mbmr & MBMR_MODE_MASK) >> MBMR_MODE_SHIFT) {
  322. case 6: /* 0110, no way to differentiate X8 VS X16 */
  323. case 5: /* 0101 */
  324. case 8: /* 1000 */
  325. csrow->dtype = DEV_X16;
  326. break;
  327. case 7: /* 0111 */
  328. case 9: /* 1001 */
  329. csrow->dtype = DEV_X8;
  330. break;
  331. default:
  332. csrow->dtype = DEV_UNKNOWN;
  333. break;
  334. }
  335. }
  336. }
  337. /* Enable memory controller ECC detection */
  338. static void cpc925_mc_init(struct mem_ctl_info *mci)
  339. {
  340. struct cpc925_mc_pdata *pdata = mci->pvt_info;
  341. u32 apimask;
  342. u32 mccr;
  343. /* Enable various ECC error exceptions */
  344. apimask = __raw_readl(pdata->vbase + REG_APIMASK_OFFSET);
  345. if ((apimask & ECC_MASK_ENABLE) == 0) {
  346. apimask |= ECC_MASK_ENABLE;
  347. __raw_writel(apimask, pdata->vbase + REG_APIMASK_OFFSET);
  348. }
  349. /* Enable ECC detection */
  350. mccr = __raw_readl(pdata->vbase + REG_MCCR_OFFSET);
  351. if ((mccr & MCCR_ECC_EN) == 0) {
  352. mccr |= MCCR_ECC_EN;
  353. __raw_writel(mccr, pdata->vbase + REG_MCCR_OFFSET);
  354. }
  355. }
  356. /* Disable memory controller ECC detection */
  357. static void cpc925_mc_exit(struct mem_ctl_info *mci)
  358. {
  359. /*
  360. * WARNING:
  361. * We are supposed to clear the ECC error detection bits,
  362. * and it will be no problem to do so. However, once they
  363. * are cleared here if we want to re-install CPC925 EDAC
  364. * module later, setting them up in cpc925_mc_init() will
  365. * trigger machine check exception.
  366. * Also, it's ok to leave ECC error detection bits enabled,
  367. * since they are reset to 1 by default or by boot loader.
  368. */
  369. return;
  370. }
  371. /*
  372. * Revert DDR column/row/bank addresses into page frame number and
  373. * offset in page.
  374. *
  375. * Suppose memory mode is 0x0111(128-bit mode, identical DIMM pairs),
  376. * physical address(PA) bits to column address(CA) bits mappings are:
  377. * CA 0 1 2 3 4 5 6 7 8 9 10
  378. * PA 59 58 57 56 55 54 53 52 51 50 49
  379. *
  380. * physical address(PA) bits to bank address(BA) bits mappings are:
  381. * BA 0 1
  382. * PA 43 44
  383. *
  384. * physical address(PA) bits to row address(RA) bits mappings are:
  385. * RA 0 1 2 3 4 5 6 7 8 9 10 11 12
  386. * PA 36 35 34 48 47 46 45 40 41 42 39 38 37
  387. */
  388. static void cpc925_mc_get_pfn(struct mem_ctl_info *mci, u32 mear,
  389. unsigned long *pfn, unsigned long *offset, int *csrow)
  390. {
  391. u32 bcnt, rank, col, bank, row;
  392. u32 c;
  393. unsigned long pa;
  394. int i;
  395. bcnt = (mear & MEAR_BCNT_MASK) >> MEAR_BCNT_SHIFT;
  396. rank = (mear & MEAR_RANK_MASK) >> MEAR_RANK_SHIFT;
  397. col = (mear & MEAR_COL_MASK) >> MEAR_COL_SHIFT;
  398. bank = (mear & MEAR_BANK_MASK) >> MEAR_BANK_SHIFT;
  399. row = mear & MEAR_ROW_MASK;
  400. *csrow = rank;
  401. #ifdef CONFIG_EDAC_DEBUG
  402. if (mci->csrows[rank].first_page == 0) {
  403. cpc925_mc_printk(mci, KERN_ERR, "ECC occurs in a "
  404. "non-populated csrow, broken hardware?\n");
  405. return;
  406. }
  407. #endif
  408. /* Revert csrow number */
  409. pa = mci->csrows[rank].first_page << PAGE_SHIFT;
  410. /* Revert column address */
  411. col += bcnt;
  412. for (i = 0; i < 11; i++) {
  413. c = col & 0x1;
  414. col >>= 1;
  415. pa |= c << (14 - i);
  416. }
  417. /* Revert bank address */
  418. pa |= bank << 19;
  419. /* Revert row address, in 4 steps */
  420. for (i = 0; i < 3; i++) {
  421. c = row & 0x1;
  422. row >>= 1;
  423. pa |= c << (26 - i);
  424. }
  425. for (i = 0; i < 3; i++) {
  426. c = row & 0x1;
  427. row >>= 1;
  428. pa |= c << (21 + i);
  429. }
  430. for (i = 0; i < 4; i++) {
  431. c = row & 0x1;
  432. row >>= 1;
  433. pa |= c << (18 - i);
  434. }
  435. for (i = 0; i < 3; i++) {
  436. c = row & 0x1;
  437. row >>= 1;
  438. pa |= c << (29 - i);
  439. }
  440. *offset = pa & (PAGE_SIZE - 1);
  441. *pfn = pa >> PAGE_SHIFT;
  442. debugf0("%s: ECC physical address 0x%lx\n", __func__, pa);
  443. }
  444. static int cpc925_mc_find_channel(struct mem_ctl_info *mci, u16 syndrome)
  445. {
  446. if ((syndrome & MESR_ECC_SYN_H_MASK) == 0)
  447. return 0;
  448. if ((syndrome & MESR_ECC_SYN_L_MASK) == 0)
  449. return 1;
  450. cpc925_mc_printk(mci, KERN_INFO, "Unexpected syndrome value: 0x%x\n",
  451. syndrome);
  452. return 1;
  453. }
  454. /* Check memory controller registers for ECC errors */
  455. static void cpc925_mc_check(struct mem_ctl_info *mci)
  456. {
  457. struct cpc925_mc_pdata *pdata = mci->pvt_info;
  458. u32 apiexcp;
  459. u32 mear;
  460. u32 mesr;
  461. u16 syndrome;
  462. unsigned long pfn = 0, offset = 0;
  463. int csrow = 0, channel = 0;
  464. /* APIEXCP is cleared when read */
  465. apiexcp = __raw_readl(pdata->vbase + REG_APIEXCP_OFFSET);
  466. if ((apiexcp & ECC_EXCP_DETECTED) == 0)
  467. return;
  468. mesr = __raw_readl(pdata->vbase + REG_MESR_OFFSET);
  469. syndrome = mesr | (MESR_ECC_SYN_H_MASK | MESR_ECC_SYN_L_MASK);
  470. mear = __raw_readl(pdata->vbase + REG_MEAR_OFFSET);
  471. /* Revert column/row addresses into page frame number, etc */
  472. cpc925_mc_get_pfn(mci, mear, &pfn, &offset, &csrow);
  473. if (apiexcp & CECC_EXCP_DETECTED) {
  474. cpc925_mc_printk(mci, KERN_INFO, "DRAM CECC Fault\n");
  475. channel = cpc925_mc_find_channel(mci, syndrome);
  476. edac_mc_handle_ce(mci, pfn, offset, syndrome,
  477. csrow, channel, mci->ctl_name);
  478. }
  479. if (apiexcp & UECC_EXCP_DETECTED) {
  480. cpc925_mc_printk(mci, KERN_INFO, "DRAM UECC Fault\n");
  481. edac_mc_handle_ue(mci, pfn, offset, csrow, mci->ctl_name);
  482. }
  483. cpc925_mc_printk(mci, KERN_INFO, "Dump registers:\n");
  484. cpc925_mc_printk(mci, KERN_INFO, "APIMASK 0x%08x\n",
  485. __raw_readl(pdata->vbase + REG_APIMASK_OFFSET));
  486. cpc925_mc_printk(mci, KERN_INFO, "APIEXCP 0x%08x\n",
  487. apiexcp);
  488. cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Ctrl 0x%08x\n",
  489. __raw_readl(pdata->vbase + REG_MSCR_OFFSET));
  490. cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Rge Start 0x%08x\n",
  491. __raw_readl(pdata->vbase + REG_MSRSR_OFFSET));
  492. cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Rge End 0x%08x\n",
  493. __raw_readl(pdata->vbase + REG_MSRER_OFFSET));
  494. cpc925_mc_printk(mci, KERN_INFO, "Mem Scrub Pattern 0x%08x\n",
  495. __raw_readl(pdata->vbase + REG_MSPR_OFFSET));
  496. cpc925_mc_printk(mci, KERN_INFO, "Mem Chk Ctrl 0x%08x\n",
  497. __raw_readl(pdata->vbase + REG_MCCR_OFFSET));
  498. cpc925_mc_printk(mci, KERN_INFO, "Mem Chk Rge End 0x%08x\n",
  499. __raw_readl(pdata->vbase + REG_MCRER_OFFSET));
  500. cpc925_mc_printk(mci, KERN_INFO, "Mem Err Address 0x%08x\n",
  501. mesr);
  502. cpc925_mc_printk(mci, KERN_INFO, "Mem Err Syndrome 0x%08x\n",
  503. syndrome);
  504. }
  505. /******************** CPU err device********************************/
  506. static u32 cpc925_cpu_mask_disabled(void)
  507. {
  508. struct device_node *cpus;
  509. struct device_node *cpunode = NULL;
  510. static u32 mask = 0;
  511. /* use cached value if available */
  512. if (mask != 0)
  513. return mask;
  514. mask = APIMASK_ADI0 | APIMASK_ADI1;
  515. cpus = of_find_node_by_path("/cpus");
  516. if (cpus == NULL) {
  517. cpc925_printk(KERN_DEBUG, "No /cpus node !\n");
  518. return 0;
  519. }
  520. while ((cpunode = of_get_next_child(cpus, cpunode)) != NULL) {
  521. const u32 *reg = of_get_property(cpunode, "reg", NULL);
  522. if (strcmp(cpunode->type, "cpu")) {
  523. cpc925_printk(KERN_ERR, "Not a cpu node in /cpus: %s\n", cpunode->name);
  524. continue;
  525. }
  526. if (reg == NULL || *reg > 2) {
  527. cpc925_printk(KERN_ERR, "Bad reg value at %s\n", cpunode->full_name);
  528. continue;
  529. }
  530. mask &= ~APIMASK_ADI(*reg);
  531. }
  532. if (mask != (APIMASK_ADI0 | APIMASK_ADI1)) {
  533. /* We assume that each CPU sits on it's own PI and that
  534. * for present CPUs the reg property equals to the PI
  535. * interface id */
  536. cpc925_printk(KERN_WARNING,
  537. "Assuming PI id is equal to CPU MPIC id!\n");
  538. }
  539. of_node_put(cpunode);
  540. of_node_put(cpus);
  541. return mask;
  542. }
  543. /* Enable CPU Errors detection */
  544. static void cpc925_cpu_init(struct cpc925_dev_info *dev_info)
  545. {
  546. u32 apimask;
  547. u32 cpumask;
  548. apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET);
  549. cpumask = cpc925_cpu_mask_disabled();
  550. if (apimask & cpumask) {
  551. cpc925_printk(KERN_WARNING, "CPU(s) not present, "
  552. "but enabled in APIMASK, disabling\n");
  553. apimask &= ~cpumask;
  554. }
  555. if ((apimask & CPU_MASK_ENABLE) == 0)
  556. apimask |= CPU_MASK_ENABLE;
  557. __raw_writel(apimask, dev_info->vbase + REG_APIMASK_OFFSET);
  558. }
  559. /* Disable CPU Errors detection */
  560. static void cpc925_cpu_exit(struct cpc925_dev_info *dev_info)
  561. {
  562. /*
  563. * WARNING:
  564. * We are supposed to clear the CPU error detection bits,
  565. * and it will be no problem to do so. However, once they
  566. * are cleared here if we want to re-install CPC925 EDAC
  567. * module later, setting them up in cpc925_cpu_init() will
  568. * trigger machine check exception.
  569. * Also, it's ok to leave CPU error detection bits enabled,
  570. * since they are reset to 1 by default.
  571. */
  572. return;
  573. }
  574. /* Check for CPU Errors */
  575. static void cpc925_cpu_check(struct edac_device_ctl_info *edac_dev)
  576. {
  577. struct cpc925_dev_info *dev_info = edac_dev->pvt_info;
  578. u32 apiexcp;
  579. u32 apimask;
  580. /* APIEXCP is cleared when read */
  581. apiexcp = __raw_readl(dev_info->vbase + REG_APIEXCP_OFFSET);
  582. if ((apiexcp & CPU_EXCP_DETECTED) == 0)
  583. return;
  584. if ((apiexcp & ~cpc925_cpu_mask_disabled()) == 0)
  585. return;
  586. apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET);
  587. cpc925_printk(KERN_INFO, "Processor Interface Fault\n"
  588. "Processor Interface register dump:\n");
  589. cpc925_printk(KERN_INFO, "APIMASK 0x%08x\n", apimask);
  590. cpc925_printk(KERN_INFO, "APIEXCP 0x%08x\n", apiexcp);
  591. edac_device_handle_ue(edac_dev, 0, 0, edac_dev->ctl_name);
  592. }
  593. /******************** HT Link err device****************************/
  594. /* Enable HyperTransport Link Error detection */
  595. static void cpc925_htlink_init(struct cpc925_dev_info *dev_info)
  596. {
  597. u32 ht_errctrl;
  598. ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
  599. if ((ht_errctrl & HT_ERRCTRL_ENABLE) == 0) {
  600. ht_errctrl |= HT_ERRCTRL_ENABLE;
  601. __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET);
  602. }
  603. }
  604. /* Disable HyperTransport Link Error detection */
  605. static void cpc925_htlink_exit(struct cpc925_dev_info *dev_info)
  606. {
  607. u32 ht_errctrl;
  608. ht_errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
  609. ht_errctrl &= ~HT_ERRCTRL_ENABLE;
  610. __raw_writel(ht_errctrl, dev_info->vbase + REG_ERRCTRL_OFFSET);
  611. }
  612. /* Check for HyperTransport Link errors */
  613. static void cpc925_htlink_check(struct edac_device_ctl_info *edac_dev)
  614. {
  615. struct cpc925_dev_info *dev_info = edac_dev->pvt_info;
  616. u32 brgctrl = __raw_readl(dev_info->vbase + REG_BRGCTRL_OFFSET);
  617. u32 linkctrl = __raw_readl(dev_info->vbase + REG_LINKCTRL_OFFSET);
  618. u32 errctrl = __raw_readl(dev_info->vbase + REG_ERRCTRL_OFFSET);
  619. u32 linkerr = __raw_readl(dev_info->vbase + REG_LINKERR_OFFSET);
  620. if (!((brgctrl & BRGCTRL_DETSERR) ||
  621. (linkctrl & HT_LINKCTRL_DETECTED) ||
  622. (errctrl & HT_ERRCTRL_DETECTED) ||
  623. (linkerr & HT_LINKERR_DETECTED)))
  624. return;
  625. cpc925_printk(KERN_INFO, "HT Link Fault\n"
  626. "HT register dump:\n");
  627. cpc925_printk(KERN_INFO, "Bridge Ctrl 0x%08x\n",
  628. brgctrl);
  629. cpc925_printk(KERN_INFO, "Link Config Ctrl 0x%08x\n",
  630. linkctrl);
  631. cpc925_printk(KERN_INFO, "Error Enum and Ctrl 0x%08x\n",
  632. errctrl);
  633. cpc925_printk(KERN_INFO, "Link Error 0x%08x\n",
  634. linkerr);
  635. /* Clear by write 1 */
  636. if (brgctrl & BRGCTRL_DETSERR)
  637. __raw_writel(BRGCTRL_DETSERR,
  638. dev_info->vbase + REG_BRGCTRL_OFFSET);
  639. if (linkctrl & HT_LINKCTRL_DETECTED)
  640. __raw_writel(HT_LINKCTRL_DETECTED,
  641. dev_info->vbase + REG_LINKCTRL_OFFSET);
  642. /* Initiate Secondary Bus Reset to clear the chain failure */
  643. if (errctrl & ERRCTRL_CHN_FAL)
  644. __raw_writel(BRGCTRL_SECBUSRESET,
  645. dev_info->vbase + REG_BRGCTRL_OFFSET);
  646. if (errctrl & ERRCTRL_RSP_ERR)
  647. __raw_writel(ERRCTRL_RSP_ERR,
  648. dev_info->vbase + REG_ERRCTRL_OFFSET);
  649. if (linkerr & HT_LINKERR_DETECTED)
  650. __raw_writel(HT_LINKERR_DETECTED,
  651. dev_info->vbase + REG_LINKERR_OFFSET);
  652. edac_device_handle_ce(edac_dev, 0, 0, edac_dev->ctl_name);
  653. }
  654. static struct cpc925_dev_info cpc925_devs[] = {
  655. {
  656. .ctl_name = CPC925_CPU_ERR_DEV,
  657. .init = cpc925_cpu_init,
  658. .exit = cpc925_cpu_exit,
  659. .check = cpc925_cpu_check,
  660. },
  661. {
  662. .ctl_name = CPC925_HT_LINK_DEV,
  663. .init = cpc925_htlink_init,
  664. .exit = cpc925_htlink_exit,
  665. .check = cpc925_htlink_check,
  666. },
  667. {0}, /* Terminated by NULL */
  668. };
  669. /*
  670. * Add CPU Err detection and HyperTransport Link Err detection
  671. * as common "edac_device", they have no corresponding device
  672. * nodes in the Open Firmware DTB and we have to add platform
  673. * devices for them. Also, they will share the MMIO with that
  674. * of memory controller.
  675. */
  676. static void cpc925_add_edac_devices(void __iomem *vbase)
  677. {
  678. struct cpc925_dev_info *dev_info;
  679. if (!vbase) {
  680. cpc925_printk(KERN_ERR, "MMIO not established yet\n");
  681. return;
  682. }
  683. for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) {
  684. dev_info->vbase = vbase;
  685. dev_info->pdev = platform_device_register_simple(
  686. dev_info->ctl_name, 0, NULL, 0);
  687. if (IS_ERR(dev_info->pdev)) {
  688. cpc925_printk(KERN_ERR,
  689. "Can't register platform device for %s\n",
  690. dev_info->ctl_name);
  691. continue;
  692. }
  693. /*
  694. * Don't have to allocate private structure but
  695. * make use of cpc925_devs[] instead.
  696. */
  697. dev_info->edac_idx = edac_device_alloc_index();
  698. dev_info->edac_dev =
  699. edac_device_alloc_ctl_info(0, dev_info->ctl_name,
  700. 1, NULL, 0, 0, NULL, 0, dev_info->edac_idx);
  701. if (!dev_info->edac_dev) {
  702. cpc925_printk(KERN_ERR, "No memory for edac device\n");
  703. goto err1;
  704. }
  705. dev_info->edac_dev->pvt_info = dev_info;
  706. dev_info->edac_dev->dev = &dev_info->pdev->dev;
  707. dev_info->edac_dev->ctl_name = dev_info->ctl_name;
  708. dev_info->edac_dev->mod_name = CPC925_EDAC_MOD_STR;
  709. dev_info->edac_dev->dev_name = dev_name(&dev_info->pdev->dev);
  710. if (edac_op_state == EDAC_OPSTATE_POLL)
  711. dev_info->edac_dev->edac_check = dev_info->check;
  712. if (dev_info->init)
  713. dev_info->init(dev_info);
  714. if (edac_device_add_device(dev_info->edac_dev) > 0) {
  715. cpc925_printk(KERN_ERR,
  716. "Unable to add edac device for %s\n",
  717. dev_info->ctl_name);
  718. goto err2;
  719. }
  720. debugf0("%s: Successfully added edac device for %s\n",
  721. __func__, dev_info->ctl_name);
  722. continue;
  723. err2:
  724. if (dev_info->exit)
  725. dev_info->exit(dev_info);
  726. edac_device_free_ctl_info(dev_info->edac_dev);
  727. err1:
  728. platform_device_unregister(dev_info->pdev);
  729. }
  730. }
  731. /*
  732. * Delete the common "edac_device" for CPU Err Detection
  733. * and HyperTransport Link Err Detection
  734. */
  735. static void cpc925_del_edac_devices(void)
  736. {
  737. struct cpc925_dev_info *dev_info;
  738. for (dev_info = &cpc925_devs[0]; dev_info->init; dev_info++) {
  739. if (dev_info->edac_dev) {
  740. edac_device_del_device(dev_info->edac_dev->dev);
  741. edac_device_free_ctl_info(dev_info->edac_dev);
  742. platform_device_unregister(dev_info->pdev);
  743. }
  744. if (dev_info->exit)
  745. dev_info->exit(dev_info);
  746. debugf0("%s: Successfully deleted edac device for %s\n",
  747. __func__, dev_info->ctl_name);
  748. }
  749. }
  750. /* Convert current back-ground scrub rate into byte/sec bandwidth */
  751. static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci)
  752. {
  753. struct cpc925_mc_pdata *pdata = mci->pvt_info;
  754. int bw;
  755. u32 mscr;
  756. u8 si;
  757. mscr = __raw_readl(pdata->vbase + REG_MSCR_OFFSET);
  758. si = (mscr & MSCR_SI_MASK) >> MSCR_SI_SHIFT;
  759. debugf0("%s, Mem Scrub Ctrl Register 0x%x\n", __func__, mscr);
  760. if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) ||
  761. (si == 0)) {
  762. cpc925_mc_printk(mci, KERN_INFO, "Scrub mode not enabled\n");
  763. bw = 0;
  764. } else
  765. bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si;
  766. return bw;
  767. }
  768. /* Return 0 for single channel; 1 for dual channel */
  769. static int cpc925_mc_get_channels(void __iomem *vbase)
  770. {
  771. int dual = 0;
  772. u32 mbcr;
  773. mbcr = __raw_readl(vbase + REG_MBCR_OFFSET);
  774. /*
  775. * Dual channel only when 128-bit wide physical bus
  776. * and 128-bit configuration.
  777. */
  778. if (((mbcr & MBCR_64BITCFG_MASK) == 0) &&
  779. ((mbcr & MBCR_64BITBUS_MASK) == 0))
  780. dual = 1;
  781. debugf0("%s: %s channel\n", __func__,
  782. (dual > 0) ? "Dual" : "Single");
  783. return dual;
  784. }
  785. static int __devinit cpc925_probe(struct platform_device *pdev)
  786. {
  787. static int edac_mc_idx;
  788. struct mem_ctl_info *mci;
  789. void __iomem *vbase;
  790. struct cpc925_mc_pdata *pdata;
  791. struct resource *r;
  792. int res = 0, nr_channels;
  793. debugf0("%s: %s platform device found!\n", __func__, pdev->name);
  794. if (!devres_open_group(&pdev->dev, cpc925_probe, GFP_KERNEL)) {
  795. res = -ENOMEM;
  796. goto out;
  797. }
  798. r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  799. if (!r) {
  800. cpc925_printk(KERN_ERR, "Unable to get resource\n");
  801. res = -ENOENT;
  802. goto err1;
  803. }
  804. if (!devm_request_mem_region(&pdev->dev,
  805. r->start,
  806. resource_size(r),
  807. pdev->name)) {
  808. cpc925_printk(KERN_ERR, "Unable to request mem region\n");
  809. res = -EBUSY;
  810. goto err1;
  811. }
  812. vbase = devm_ioremap(&pdev->dev, r->start, resource_size(r));
  813. if (!vbase) {
  814. cpc925_printk(KERN_ERR, "Unable to ioremap device\n");
  815. res = -ENOMEM;
  816. goto err2;
  817. }
  818. nr_channels = cpc925_mc_get_channels(vbase);
  819. mci = edac_mc_alloc(sizeof(struct cpc925_mc_pdata),
  820. CPC925_NR_CSROWS, nr_channels + 1, edac_mc_idx);
  821. if (!mci) {
  822. cpc925_printk(KERN_ERR, "No memory for mem_ctl_info\n");
  823. res = -ENOMEM;
  824. goto err2;
  825. }
  826. pdata = mci->pvt_info;
  827. pdata->vbase = vbase;
  828. pdata->edac_idx = edac_mc_idx++;
  829. pdata->name = pdev->name;
  830. mci->dev = &pdev->dev;
  831. platform_set_drvdata(pdev, mci);
  832. mci->dev_name = dev_name(&pdev->dev);
  833. mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR;
  834. mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
  835. mci->edac_cap = EDAC_FLAG_SECDED;
  836. mci->mod_name = CPC925_EDAC_MOD_STR;
  837. mci->mod_ver = CPC925_EDAC_REVISION;
  838. mci->ctl_name = pdev->name;
  839. if (edac_op_state == EDAC_OPSTATE_POLL)
  840. mci->edac_check = cpc925_mc_check;
  841. mci->ctl_page_to_phys = NULL;
  842. mci->scrub_mode = SCRUB_SW_SRC;
  843. mci->set_sdram_scrub_rate = NULL;
  844. mci->get_sdram_scrub_rate = cpc925_get_sdram_scrub_rate;
  845. cpc925_init_csrows(mci);
  846. /* Setup memory controller registers */
  847. cpc925_mc_init(mci);
  848. if (edac_mc_add_mc(mci) > 0) {
  849. cpc925_mc_printk(mci, KERN_ERR, "Failed edac_mc_add_mc()\n");
  850. goto err3;
  851. }
  852. cpc925_add_edac_devices(vbase);
  853. /* get this far and it's successful */
  854. debugf0("%s: success\n", __func__);
  855. res = 0;
  856. goto out;
  857. err3:
  858. cpc925_mc_exit(mci);
  859. edac_mc_free(mci);
  860. err2:
  861. devm_release_mem_region(&pdev->dev, r->start, resource_size(r));
  862. err1:
  863. devres_release_group(&pdev->dev, cpc925_probe);
  864. out:
  865. return res;
  866. }
  867. static int cpc925_remove(struct platform_device *pdev)
  868. {
  869. struct mem_ctl_info *mci = platform_get_drvdata(pdev);
  870. /*
  871. * Delete common edac devices before edac mc, because
  872. * the former share the MMIO of the latter.
  873. */
  874. cpc925_del_edac_devices();
  875. cpc925_mc_exit(mci);
  876. edac_mc_del_mc(&pdev->dev);
  877. edac_mc_free(mci);
  878. return 0;
  879. }
  880. static struct platform_driver cpc925_edac_driver = {
  881. .probe = cpc925_probe,
  882. .remove = cpc925_remove,
  883. .driver = {
  884. .name = "cpc925_edac",
  885. }
  886. };
  887. static int __init cpc925_edac_init(void)
  888. {
  889. int ret = 0;
  890. printk(KERN_INFO "IBM CPC925 EDAC driver " CPC925_EDAC_REVISION "\n");
  891. printk(KERN_INFO "\t(c) 2008 Wind River Systems, Inc\n");
  892. /* Only support POLL mode so far */
  893. edac_op_state = EDAC_OPSTATE_POLL;
  894. ret = platform_driver_register(&cpc925_edac_driver);
  895. if (ret) {
  896. printk(KERN_WARNING "Failed to register %s\n",
  897. CPC925_EDAC_MOD_STR);
  898. }
  899. return ret;
  900. }
  901. static void __exit cpc925_edac_exit(void)
  902. {
  903. platform_driver_unregister(&cpc925_edac_driver);
  904. }
  905. module_init(cpc925_edac_init);
  906. module_exit(cpc925_edac_exit);
  907. MODULE_LICENSE("GPL");
  908. MODULE_AUTHOR("Cao Qingtao <qingtao.cao@windriver.com>");
  909. MODULE_DESCRIPTION("IBM CPC925 Bridge and MC EDAC kernel module");