diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ssb/pci.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 6e88d2b603b4..3226832df32d 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
@@ -573,37 +573,38 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out, | |||
573 | ssb_dprintk(KERN_DEBUG PFX "SPROM revision %d detected.\n", out->revision); | 573 | ssb_dprintk(KERN_DEBUG PFX "SPROM revision %d detected.\n", out->revision); |
574 | memset(out->et0mac, 0xFF, 6); /* preset et0 and et1 mac */ | 574 | memset(out->et0mac, 0xFF, 6); /* preset et0 and et1 mac */ |
575 | memset(out->et1mac, 0xFF, 6); | 575 | memset(out->et1mac, 0xFF, 6); |
576 | |||
576 | if ((bus->chip_id & 0xFF00) == 0x4400) { | 577 | if ((bus->chip_id & 0xFF00) == 0x4400) { |
577 | /* Workaround: The BCM44XX chip has a stupid revision | 578 | /* Workaround: The BCM44XX chip has a stupid revision |
578 | * number stored in the SPROM. | 579 | * number stored in the SPROM. |
579 | * Always extract r1. */ | 580 | * Always extract r1. */ |
580 | out->revision = 1; | 581 | out->revision = 1; |
581 | sprom_extract_r123(out, in); | 582 | ssb_dprintk(KERN_DEBUG PFX "SPROM treated as revision %d\n", out->revision); |
582 | } else if (bus->chip_id == 0x4321) { | 583 | } else if (bus->chip_id == 0x4321) { |
583 | /* the BCM4328 has a chipid == 0x4321 and a rev 4 SPROM */ | 584 | /* the BCM4328 has a chipid == 0x4321 and a rev 4 SPROM */ |
584 | out->revision = 4; | 585 | out->revision = 4; |
586 | ssb_dprintk(KERN_DEBUG PFX "SPROM treated as revision %d\n", out->revision); | ||
587 | } | ||
588 | |||
589 | switch (out->revision) { | ||
590 | case 1: | ||
591 | case 2: | ||
592 | case 3: | ||
593 | sprom_extract_r123(out, in); | ||
594 | break; | ||
595 | case 4: | ||
596 | case 5: | ||
585 | sprom_extract_r45(out, in); | 597 | sprom_extract_r45(out, in); |
586 | } else { | 598 | break; |
587 | switch (out->revision) { | 599 | case 8: |
588 | case 1: | 600 | sprom_extract_r8(out, in); |
589 | case 2: | 601 | break; |
590 | case 3: | 602 | default: |
591 | sprom_extract_r123(out, in); | 603 | ssb_printk(KERN_WARNING PFX "Unsupported SPROM" |
592 | break; | 604 | " revision %d detected. Will extract" |
593 | case 4: | 605 | " v1\n", out->revision); |
594 | case 5: | 606 | out->revision = 1; |
595 | sprom_extract_r45(out, in); | 607 | sprom_extract_r123(out, in); |
596 | break; | ||
597 | case 8: | ||
598 | sprom_extract_r8(out, in); | ||
599 | break; | ||
600 | default: | ||
601 | ssb_printk(KERN_WARNING PFX "Unsupported SPROM" | ||
602 | " revision %d detected. Will extract" | ||
603 | " v1\n", out->revision); | ||
604 | out->revision = 1; | ||
605 | sprom_extract_r123(out, in); | ||
606 | } | ||
607 | } | 608 | } |
608 | 609 | ||
609 | if (out->boardflags_lo == 0xFFFF) | 610 | if (out->boardflags_lo == 0xFFFF) |