aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e7xxx_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 04:38:52 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:08 -0500
commite7ecd8910293564d357dbaf18eb179e06fa35fd0 (patch)
tree7ec33cd42783cc53dd3ce161802d1032cea869a7 /drivers/edac/e7xxx_edac.c
parent54933dddc3e8ccd9db48966d8ada11951cb8a558 (diff)
[PATCH] EDAC: formatting cleanup
Cosmetic indentation/formatting cleanup for EDAC code. Make sure we are using tabs rather than spaces to indent, etc. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r--drivers/edac/e7xxx_edac.c165
1 files changed, 79 insertions, 86 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 9b59c661f45e..a9518d3e4be4 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -11,9 +11,9 @@
11 * http://www.anime.net/~goemon/linux-ecc/ 11 * http://www.anime.net/~goemon/linux-ecc/
12 * 12 *
13 * Contributors: 13 * Contributors:
14 * Eric Biederman (Linux Networx) 14 * Eric Biederman (Linux Networx)
15 * Tom Zimmerman (Linux Networx) 15 * Tom Zimmerman (Linux Networx)
16 * Jim Garlick (Lawrence Livermore National Labs) 16 * Jim Garlick (Lawrence Livermore National Labs)
17 * Dave Peterson (Lawrence Livermore National Labs) 17 * Dave Peterson (Lawrence Livermore National Labs)
18 * That One Guy (Some other place) 18 * That One Guy (Some other place)
19 * Wang Zhenyu (intel.com) 19 * Wang Zhenyu (intel.com)
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25
26#include <linux/config.h> 25#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/init.h> 27#include <linux/init.h>
@@ -31,14 +30,11 @@
31#include <linux/slab.h> 30#include <linux/slab.h>
32#include "edac_mc.h" 31#include "edac_mc.h"
33 32
34
35#define e7xxx_printk(level, fmt, arg...) \ 33#define e7xxx_printk(level, fmt, arg...) \
36 edac_printk(level, "e7xxx", fmt, ##arg) 34 edac_printk(level, "e7xxx", fmt, ##arg)
37
38 35
39#define e7xxx_mc_printk(mci, level, fmt, arg...) \ 36#define e7xxx_mc_printk(mci, level, fmt, arg...) \
40 edac_mc_chipset_printk(mci, level, "e7xxx", fmt, ##arg) 37 edac_mc_chipset_printk(mci, level, "e7xxx", fmt, ##arg)
41
42 38
43#ifndef PCI_DEVICE_ID_INTEL_7205_0 39#ifndef PCI_DEVICE_ID_INTEL_7205_0
44#define PCI_DEVICE_ID_INTEL_7205_0 0x255d 40#define PCI_DEVICE_ID_INTEL_7205_0 0x255d
@@ -72,11 +68,9 @@
72#define PCI_DEVICE_ID_INTEL_7505_1_ERR 0x2551 68#define PCI_DEVICE_ID_INTEL_7505_1_ERR 0x2551
73#endif /* PCI_DEVICE_ID_INTEL_7505_1_ERR */ 69#endif /* PCI_DEVICE_ID_INTEL_7505_1_ERR */
74 70
75
76#define E7XXX_NR_CSROWS 8 /* number of csrows */ 71#define E7XXX_NR_CSROWS 8 /* number of csrows */
77#define E7XXX_NR_DIMMS 8 /* FIXME - is this correct? */ 72#define E7XXX_NR_DIMMS 8 /* FIXME - is this correct? */
78 73
79
80/* E7XXX register addresses - device 0 function 0 */ 74/* E7XXX register addresses - device 0 function 0 */
81#define E7XXX_DRB 0x60 /* DRAM row boundary register (8b) */ 75#define E7XXX_DRB 0x60 /* DRAM row boundary register (8b) */
82#define E7XXX_DRA 0x70 /* DRAM row attribute register (8b) */ 76#define E7XXX_DRA 0x70 /* DRAM row attribute register (8b) */
@@ -126,7 +120,6 @@ enum e7xxx_chips {
126 E7205, 120 E7205,
127}; 121};
128 122
129
130struct e7xxx_pvt { 123struct e7xxx_pvt {
131 struct pci_dev *bridge_ck; 124 struct pci_dev *bridge_ck;
132 u32 tolm; 125 u32 tolm;
@@ -135,13 +128,11 @@ struct e7xxx_pvt {
135 const struct e7xxx_dev_info *dev_info; 128 const struct e7xxx_dev_info *dev_info;
136}; 129};
137 130
138
139struct e7xxx_dev_info { 131struct e7xxx_dev_info {
140 u16 err_dev; 132 u16 err_dev;
141 const char *ctl_name; 133 const char *ctl_name;
142}; 134};
143 135
144
145struct e7xxx_error_info { 136struct e7xxx_error_info {
146 u8 dram_ferr; 137 u8 dram_ferr;
147 u8 dram_nerr; 138 u8 dram_nerr;
@@ -152,20 +143,23 @@ struct e7xxx_error_info {
152 143
153static const struct e7xxx_dev_info e7xxx_devs[] = { 144static const struct e7xxx_dev_info e7xxx_devs[] = {
154 [E7500] = { 145 [E7500] = {
155 .err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR, 146 .err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR,
156 .ctl_name = "E7500"}, 147 .ctl_name = "E7500"
148 },
157 [E7501] = { 149 [E7501] = {
158 .err_dev = PCI_DEVICE_ID_INTEL_7501_1_ERR, 150 .err_dev = PCI_DEVICE_ID_INTEL_7501_1_ERR,
159 .ctl_name = "E7501"}, 151 .ctl_name = "E7501"
152 },
160 [E7505] = { 153 [E7505] = {
161 .err_dev = PCI_DEVICE_ID_INTEL_7505_1_ERR, 154 .err_dev = PCI_DEVICE_ID_INTEL_7505_1_ERR,
162 .ctl_name = "E7505"}, 155 .ctl_name = "E7505"
156 },
163 [E7205] = { 157 [E7205] = {
164 .err_dev = PCI_DEVICE_ID_INTEL_7205_1_ERR, 158 .err_dev = PCI_DEVICE_ID_INTEL_7205_1_ERR,
165 .ctl_name = "E7205"}, 159 .ctl_name = "E7205"
160 },
166}; 161};
167 162
168
169/* FIXME - is this valid for both SECDED and S4ECD4ED? */ 163/* FIXME - is this valid for both SECDED and S4ECD4ED? */
170static inline int e7xxx_find_channel(u16 syndrome) 164static inline int e7xxx_find_channel(u16 syndrome)
171{ 165{
@@ -173,16 +167,18 @@ static inline int e7xxx_find_channel(u16 syndrome)
173 167
174 if ((syndrome & 0xff00) == 0) 168 if ((syndrome & 0xff00) == 0)
175 return 0; 169 return 0;
170
176 if ((syndrome & 0x00ff) == 0) 171 if ((syndrome & 0x00ff) == 0)
177 return 1; 172 return 1;
173
178 if ((syndrome & 0xf000) == 0 || (syndrome & 0x0f00) == 0) 174 if ((syndrome & 0xf000) == 0 || (syndrome & 0x0f00) == 0)
179 return 0; 175 return 0;
176
180 return 1; 177 return 1;
181} 178}
182 179
183 180static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci,
184static unsigned long 181 unsigned long page)
185ctl_page_to_phys(struct mem_ctl_info *mci, unsigned long page)
186{ 182{
187 u32 remap; 183 u32 remap;
188 struct e7xxx_pvt *pvt = (struct e7xxx_pvt *) mci->pvt_info; 184 struct e7xxx_pvt *pvt = (struct e7xxx_pvt *) mci->pvt_info;
@@ -190,17 +186,20 @@ ctl_page_to_phys(struct mem_ctl_info *mci, unsigned long page)
190 debugf3("%s()\n", __func__); 186 debugf3("%s()\n", __func__);
191 187
192 if ((page < pvt->tolm) || 188 if ((page < pvt->tolm) ||
193 ((page >= 0x100000) && (page < pvt->remapbase))) 189 ((page >= 0x100000) && (page < pvt->remapbase)))
194 return page; 190 return page;
191
195 remap = (page - pvt->tolm) + pvt->remapbase; 192 remap = (page - pvt->tolm) + pvt->remapbase;
193
196 if (remap < pvt->remaplimit) 194 if (remap < pvt->remaplimit)
197 return remap; 195 return remap;
196
198 e7xxx_printk(KERN_ERR, "Invalid page %lx - out of range\n", page); 197 e7xxx_printk(KERN_ERR, "Invalid page %lx - out of range\n", page);
199 return pvt->tolm - 1; 198 return pvt->tolm - 1;
200} 199}
201 200
202 201static void process_ce(struct mem_ctl_info *mci,
203static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info) 202 struct e7xxx_error_info *info)
204{ 203{
205 u32 error_1b, page; 204 u32 error_1b, page;
206 u16 syndrome; 205 u16 syndrome;
@@ -208,52 +207,46 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
208 int channel; 207 int channel;
209 208
210 debugf3("%s()\n", __func__); 209 debugf3("%s()\n", __func__);
211
212 /* read the error address */ 210 /* read the error address */
213 error_1b = info->dram_celog_add; 211 error_1b = info->dram_celog_add;
214 /* FIXME - should use PAGE_SHIFT */ 212 /* FIXME - should use PAGE_SHIFT */
215 page = error_1b >> 6; /* convert the address to 4k page */ 213 page = error_1b >> 6; /* convert the address to 4k page */
216 /* read the syndrome */ 214 /* read the syndrome */
217 syndrome = info->dram_celog_syndrome; 215 syndrome = info->dram_celog_syndrome;
218 /* FIXME - check for -1 */ 216 /* FIXME - check for -1 */
219 row = edac_mc_find_csrow_by_page(mci, page); 217 row = edac_mc_find_csrow_by_page(mci, page);
220 /* convert syndrome to channel */ 218 /* convert syndrome to channel */
221 channel = e7xxx_find_channel(syndrome); 219 channel = e7xxx_find_channel(syndrome);
222 edac_mc_handle_ce(mci, page, 0, syndrome, row, channel, 220 edac_mc_handle_ce(mci, page, 0, syndrome, row, channel, "e7xxx CE");
223 "e7xxx CE");
224} 221}
225 222
226
227static void process_ce_no_info(struct mem_ctl_info *mci) 223static void process_ce_no_info(struct mem_ctl_info *mci)
228{ 224{
229 debugf3("%s()\n", __func__); 225 debugf3("%s()\n", __func__);
230 edac_mc_handle_ce_no_info(mci, "e7xxx CE log register overflow"); 226 edac_mc_handle_ce_no_info(mci, "e7xxx CE log register overflow");
231} 227}
232 228
233 229static void process_ue(struct mem_ctl_info *mci,
234static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info) 230 struct e7xxx_error_info *info)
235{ 231{
236 u32 error_2b, block_page; 232 u32 error_2b, block_page;
237 int row; 233 int row;
238 234
239 debugf3("%s()\n", __func__); 235 debugf3("%s()\n", __func__);
240
241 /* read the error address */ 236 /* read the error address */
242 error_2b = info->dram_uelog_add; 237 error_2b = info->dram_uelog_add;
243 /* FIXME - should use PAGE_SHIFT */ 238 /* FIXME - should use PAGE_SHIFT */
244 block_page = error_2b >> 6; /* convert to 4k address */ 239 block_page = error_2b >> 6; /* convert to 4k address */
245 row = edac_mc_find_csrow_by_page(mci, block_page); 240 row = edac_mc_find_csrow_by_page(mci, block_page);
246 edac_mc_handle_ue(mci, block_page, 0, row, "e7xxx UE"); 241 edac_mc_handle_ue(mci, block_page, 0, row, "e7xxx UE");
247} 242}
248 243
249
250static void process_ue_no_info(struct mem_ctl_info *mci) 244static void process_ue_no_info(struct mem_ctl_info *mci)
251{ 245{
252 debugf3("%s()\n", __func__); 246 debugf3("%s()\n", __func__);
253 edac_mc_handle_ue_no_info(mci, "e7xxx UE log register overflow"); 247 edac_mc_handle_ue_no_info(mci, "e7xxx UE log register overflow");
254} 248}
255 249
256
257static void e7xxx_get_error_info (struct mem_ctl_info *mci, 250static void e7xxx_get_error_info (struct mem_ctl_info *mci,
258 struct e7xxx_error_info *info) 251 struct e7xxx_error_info *info)
259{ 252{
@@ -261,31 +254,29 @@ static void e7xxx_get_error_info (struct mem_ctl_info *mci,
261 254
262 pvt = (struct e7xxx_pvt *) mci->pvt_info; 255 pvt = (struct e7xxx_pvt *) mci->pvt_info;
263 pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_FERR, 256 pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_FERR,
264 &info->dram_ferr); 257 &info->dram_ferr);
265 pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_NERR, 258 pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_NERR,
266 &info->dram_nerr); 259 &info->dram_nerr);
267 260
268 if ((info->dram_ferr & 1) || (info->dram_nerr & 1)) { 261 if ((info->dram_ferr & 1) || (info->dram_nerr & 1)) {
269 pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_CELOG_ADD, 262 pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_CELOG_ADD,
270 &info->dram_celog_add); 263 &info->dram_celog_add);
271 pci_read_config_word(pvt->bridge_ck, 264 pci_read_config_word(pvt->bridge_ck,
272 E7XXX_DRAM_CELOG_SYNDROME, &info->dram_celog_syndrome); 265 E7XXX_DRAM_CELOG_SYNDROME,
266 &info->dram_celog_syndrome);
273 } 267 }
274 268
275 if ((info->dram_ferr & 2) || (info->dram_nerr & 2)) 269 if ((info->dram_ferr & 2) || (info->dram_nerr & 2))
276 pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_UELOG_ADD, 270 pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_UELOG_ADD,
277 &info->dram_uelog_add); 271 &info->dram_uelog_add);
278 272
279 if (info->dram_ferr & 3) 273 if (info->dram_ferr & 3)
280 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_FERR, 0x03, 274 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_FERR, 0x03, 0x03);
281 0x03);
282 275
283 if (info->dram_nerr & 3) 276 if (info->dram_nerr & 3)
284 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_NERR, 0x03, 277 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_NERR, 0x03, 0x03);
285 0x03);
286} 278}
287 279
288
289static int e7xxx_process_error_info (struct mem_ctl_info *mci, 280static int e7xxx_process_error_info (struct mem_ctl_info *mci,
290 struct e7xxx_error_info *info, int handle_errors) 281 struct e7xxx_error_info *info, int handle_errors)
291{ 282{
@@ -333,7 +324,6 @@ static int e7xxx_process_error_info (struct mem_ctl_info *mci,
333 return error_found; 324 return error_found;
334} 325}
335 326
336
337static void e7xxx_check(struct mem_ctl_info *mci) 327static void e7xxx_check(struct mem_ctl_info *mci)
338{ 328{
339 struct e7xxx_error_info info; 329 struct e7xxx_error_info info;
@@ -343,7 +333,6 @@ static void e7xxx_check(struct mem_ctl_info *mci)
343 e7xxx_process_error_info(mci, &info, 1); 333 e7xxx_process_error_info(mci, &info, 1);
344} 334}
345 335
346
347static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) 336static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
348{ 337{
349 int rc = -ENODEV; 338 int rc = -ENODEV;
@@ -363,13 +352,14 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
363 352
364 /* need to find out the number of channels */ 353 /* need to find out the number of channels */
365 pci_read_config_dword(pdev, E7XXX_DRC, &drc); 354 pci_read_config_dword(pdev, E7XXX_DRC, &drc);
355
366 /* only e7501 can be single channel */ 356 /* only e7501 can be single channel */
367 if (dev_idx == E7501) { 357 if (dev_idx == E7501) {
368 drc_chan = ((drc >> 22) & 0x1); 358 drc_chan = ((drc >> 22) & 0x1);
369 drc_drbg = (drc >> 18) & 0x3; 359 drc_drbg = (drc >> 18) & 0x3;
370 } 360 }
371 drc_ddim = (drc >> 20) & 0x3;
372 361
362 drc_ddim = (drc >> 20) & 0x3;
373 mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); 363 mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1);
374 364
375 if (mci == NULL) { 365 if (mci == NULL) {
@@ -378,10 +368,9 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
378 } 368 }
379 369
380 debugf3("%s(): init mci\n", __func__); 370 debugf3("%s(): init mci\n", __func__);
381
382 mci->mtype_cap = MEM_FLAG_RDDR; 371 mci->mtype_cap = MEM_FLAG_RDDR;
383 mci->edac_ctl_cap = 372 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED |
384 EDAC_FLAG_NONE | EDAC_FLAG_SECDED | EDAC_FLAG_S4ECD4ED; 373 EDAC_FLAG_S4ECD4ED;
385 /* FIXME - what if different memory types are in different csrows? */ 374 /* FIXME - what if different memory types are in different csrows? */
386 mci->mod_name = EDAC_MOD_STR; 375 mci->mod_name = EDAC_MOD_STR;
387 mci->mod_ver = "$Revision: 1.5.2.9 $"; 376 mci->mod_ver = "$Revision: 1.5.2.9 $";
@@ -391,19 +380,18 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
391 pvt = (struct e7xxx_pvt *) mci->pvt_info; 380 pvt = (struct e7xxx_pvt *) mci->pvt_info;
392 pvt->dev_info = &e7xxx_devs[dev_idx]; 381 pvt->dev_info = &e7xxx_devs[dev_idx];
393 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, 382 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
394 pvt->dev_info->err_dev, 383 pvt->dev_info->err_dev,
395 pvt->bridge_ck); 384 pvt->bridge_ck);
385
396 if (!pvt->bridge_ck) { 386 if (!pvt->bridge_ck) {
397 e7xxx_printk(KERN_ERR, "error reporting device not found:" 387 e7xxx_printk(KERN_ERR, "error reporting device not found:"
398 "vendor %x device 0x%x (broken BIOS?)\n", 388 "vendor %x device 0x%x (broken BIOS?)\n",
399 PCI_VENDOR_ID_INTEL, 389 PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev);
400 e7xxx_devs[dev_idx].err_dev);
401 goto fail; 390 goto fail;
402 } 391 }
403 392
404 debugf3("%s(): more mci init\n", __func__); 393 debugf3("%s(): more mci init\n", __func__);
405 mci->ctl_name = pvt->dev_info->ctl_name; 394 mci->ctl_name = pvt->dev_info->ctl_name;
406
407 mci->edac_check = e7xxx_check; 395 mci->edac_check = e7xxx_check;
408 mci->ctl_page_to_phys = ctl_page_to_phys; 396 mci->ctl_page_to_phys = ctl_page_to_phys;
409 397
@@ -428,15 +416,16 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
428 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); 416 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT);
429 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, 417 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index,
430 cumul_size); 418 cumul_size);
419
431 if (cumul_size == last_cumul_size) 420 if (cumul_size == last_cumul_size)
432 continue; /* not populated */ 421 continue; /* not populated */
433 422
434 csrow->first_page = last_cumul_size; 423 csrow->first_page = last_cumul_size;
435 csrow->last_page = cumul_size - 1; 424 csrow->last_page = cumul_size - 1;
436 csrow->nr_pages = cumul_size - last_cumul_size; 425 csrow->nr_pages = cumul_size - last_cumul_size;
437 last_cumul_size = cumul_size; 426 last_cumul_size = cumul_size;
438 csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ 427 csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */
439 csrow->mtype = MEM_RDDR; /* only one type supported */ 428 csrow->mtype = MEM_RDDR; /* only one type supported */
440 csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; 429 csrow->dtype = mem_dev ? DEV_X4 : DEV_X8;
441 430
442 /* 431 /*
@@ -466,8 +455,8 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
466 pci_read_config_word(mci->pdev, E7XXX_REMAPLIMIT, &pci_data); 455 pci_read_config_word(mci->pdev, E7XXX_REMAPLIMIT, &pci_data);
467 pvt->remaplimit = ((u32) pci_data) << 14; 456 pvt->remaplimit = ((u32) pci_data) << 14;
468 e7xxx_printk(KERN_INFO, 457 e7xxx_printk(KERN_INFO,
469 "tolm = %x, remapbase = %x, remaplimit = %x\n", 458 "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm,
470 pvt->tolm, pvt->remapbase, pvt->remaplimit); 459 pvt->remapbase, pvt->remaplimit);
471 460
472 /* clear any pending errors, or initial state bits */ 461 /* clear any pending errors, or initial state bits */
473 e7xxx_get_error_info(mci, &discard); 462 e7xxx_get_error_info(mci, &discard);
@@ -492,17 +481,16 @@ fail:
492} 481}
493 482
494/* returns count (>= 0), or negative on error */ 483/* returns count (>= 0), or negative on error */
495static int __devinit 484static int __devinit e7xxx_init_one(struct pci_dev *pdev,
496e7xxx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 485 const struct pci_device_id *ent)
497{ 486{
498 debugf0("%s()\n", __func__); 487 debugf0("%s()\n", __func__);
499 488
500 /* wake up and enable device */ 489 /* wake up and enable device */
501 return pci_enable_device(pdev) ? 490 return pci_enable_device(pdev) ?
502 -EIO : e7xxx_probe1(pdev, ent->driver_data); 491 -EIO : e7xxx_probe1(pdev, ent->driver_data);
503} 492}
504 493
505
506static void __devexit e7xxx_remove_one(struct pci_dev *pdev) 494static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
507{ 495{
508 struct mem_ctl_info *mci; 496 struct mem_ctl_info *mci;
@@ -518,22 +506,30 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
518 edac_mc_free(mci); 506 edac_mc_free(mci);
519} 507}
520 508
521
522static const struct pci_device_id e7xxx_pci_tbl[] __devinitdata = { 509static const struct pci_device_id e7xxx_pci_tbl[] __devinitdata = {
523 {PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0, 510 {
524 E7205}, 511 PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
525 {PCI_VEND_DEV(INTEL, 7500_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0, 512 E7205
526 E7500}, 513 },
527 {PCI_VEND_DEV(INTEL, 7501_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0, 514 {
528 E7501}, 515 PCI_VEND_DEV(INTEL, 7500_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
529 {PCI_VEND_DEV(INTEL, 7505_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0, 516 E7500
530 E7505}, 517 },
531 {0,} /* 0 terminated list. */ 518 {
519 PCI_VEND_DEV(INTEL, 7501_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
520 E7501
521 },
522 {
523 PCI_VEND_DEV(INTEL, 7505_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
524 E7505
525 },
526 {
527 0,
528 } /* 0 terminated list. */
532}; 529};
533 530
534MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl); 531MODULE_DEVICE_TABLE(pci, e7xxx_pci_tbl);
535 532
536
537static struct pci_driver e7xxx_driver = { 533static struct pci_driver e7xxx_driver = {
538 .name = EDAC_MOD_STR, 534 .name = EDAC_MOD_STR,
539 .probe = e7xxx_init_one, 535 .probe = e7xxx_init_one,
@@ -541,13 +537,11 @@ static struct pci_driver e7xxx_driver = {
541 .id_table = e7xxx_pci_tbl, 537 .id_table = e7xxx_pci_tbl,
542}; 538};
543 539
544
545static int __init e7xxx_init(void) 540static int __init e7xxx_init(void)
546{ 541{
547 return pci_register_driver(&e7xxx_driver); 542 return pci_register_driver(&e7xxx_driver);
548} 543}
549 544
550
551static void __exit e7xxx_exit(void) 545static void __exit e7xxx_exit(void)
552{ 546{
553 pci_unregister_driver(&e7xxx_driver); 547 pci_unregister_driver(&e7xxx_driver);
@@ -556,8 +550,7 @@ static void __exit e7xxx_exit(void)
556module_init(e7xxx_init); 550module_init(e7xxx_init);
557module_exit(e7xxx_exit); 551module_exit(e7xxx_exit);
558 552
559
560MODULE_LICENSE("GPL"); 553MODULE_LICENSE("GPL");
561MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh et al\n" 554MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh et al\n"
562 "Based on.work by Dan Hollis et al"); 555 "Based on.work by Dan Hollis et al");
563MODULE_DESCRIPTION("MC support for Intel e7xxx memory controllers"); 556MODULE_DESCRIPTION("MC support for Intel e7xxx memory controllers");