diff options
author | Mark A. Greer <mgreer@mvista.com> | 2005-09-03 18:55:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:00 -0400 |
commit | d01c08c9ae91c1526d4564b400b3e0e04b49d1ba (patch) | |
tree | a1cc06a5342fdaf6185d2655a636cc181d56cb08 /arch/ppc/syslib/mv64360_pic.c | |
parent | bbde630b553d349307fe719486bc06f8cf9c1a2d (diff) |
[PATCH] ppc32: mv64x60 updates & enhancements
Updates and enhancement to the ppc32 mv64x60 code:
- move code to get mem size from mem ctlr to bootwrapper
- address some errata in the mv64360 pic code
- some minor cleanups
- export one of the bridge's regs via sysfs so user daemon can watch for
extraction events
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/syslib/mv64360_pic.c')
-rw-r--r-- | arch/ppc/syslib/mv64360_pic.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 74d8996418e9..8356da4678a2 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -366,10 +366,16 @@ mv64360_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
366 | return IRQ_HANDLED; | 366 | return IRQ_HANDLED; |
367 | } | 367 | } |
368 | 368 | ||
369 | /* | ||
370 | * Bit 0 of MV64x60_PCIx_ERR_MASK does not exist on the 64360 and because of | ||
371 | * errata FEr-#11 and FEr-##16 for the 64460, it should be 0 on that chip as | ||
372 | * well. IOW, don't set bit 0. | ||
373 | */ | ||
374 | #define MV64360_PCI0_ERR_MASK_VAL 0x00a50c24 | ||
375 | |||
369 | static int __init | 376 | static int __init |
370 | mv64360_register_hdlrs(void) | 377 | mv64360_register_hdlrs(void) |
371 | { | 378 | { |
372 | u32 mask; | ||
373 | int rc; | 379 | int rc; |
374 | 380 | ||
375 | /* Clear old errors and register CPU interface error intr handler */ | 381 | /* Clear old errors and register CPU interface error intr handler */ |
@@ -387,17 +393,6 @@ mv64360_register_hdlrs(void) | |||
387 | mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) | 393 | mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) |
388 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); | 394 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); |
389 | 395 | ||
390 | /* | ||
391 | * Bit 0 reserved on 64360 and erratum FEr PCI-#11 (PCI internal | ||
392 | * data parity error set incorrectly) on rev 0 & 1 of 64460 requires | ||
393 | * bit 0 to be cleared. | ||
394 | */ | ||
395 | mask = 0x00a50c24; | ||
396 | |||
397 | if ((mv64x60_get_bridge_type() == MV64x60_TYPE_MV64460) && | ||
398 | (mv64x60_get_bridge_rev() > 1)) | ||
399 | mask |= 0x1; /* enable DPErr on 64460 */ | ||
400 | |||
401 | /* Clear old errors and register PCI 0 error intr handler */ | 396 | /* Clear old errors and register PCI 0 error intr handler */ |
402 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); | 397 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); |
403 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, | 398 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, |
@@ -407,7 +402,11 @@ mv64360_register_hdlrs(void) | |||
407 | rc); | 402 | rc); |
408 | 403 | ||
409 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0); | 404 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0); |
410 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, mask); | 405 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, MV64360_PCI0_ERR_MASK_VAL); |
406 | |||
407 | /* Erratum FEr PCI-#16 says to clear bit 0 of PCI SERRn Mask reg. */ | ||
408 | mv64x60_write(&bh, MV64x60_PCI0_ERR_SERR_MASK, | ||
409 | mv64x60_read(&bh, MV64x60_PCI0_ERR_SERR_MASK) & ~0x1UL); | ||
411 | 410 | ||
412 | /* Clear old errors and register PCI 1 error intr handler */ | 411 | /* Clear old errors and register PCI 1 error intr handler */ |
413 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); | 412 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); |
@@ -418,7 +417,11 @@ mv64360_register_hdlrs(void) | |||
418 | rc); | 417 | rc); |
419 | 418 | ||
420 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0); | 419 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0); |
421 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, mask); | 420 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, MV64360_PCI0_ERR_MASK_VAL); |
421 | |||
422 | /* Erratum FEr PCI-#16 says to clear bit 0 of PCI Intr Mask reg. */ | ||
423 | mv64x60_write(&bh, MV64x60_PCI1_ERR_SERR_MASK, | ||
424 | mv64x60_read(&bh, MV64x60_PCI1_ERR_SERR_MASK) & ~0x1UL); | ||
422 | 425 | ||
423 | return 0; | 426 | return 0; |
424 | } | 427 | } |