sprom.c (4b4f5be2e49a604de11dee0ee9b3f151de061724) | sprom.c (3d9d8af330a891f141db420115238f01e4c6ece7) |
---|---|
1/* 2 * Broadcom specific AMBA 3 * SPROM reading 4 * 5 * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de> 6 * 7 * Licensed under the GNU/GPL. See COPYING for details. 8 */ --- 46 unchanged lines hidden (view full) --- 55 err = -ENOENT; 56 goto fail; 57 } 58 59 err = get_fallback_sprom(bus, out); 60 if (err) 61 goto fail; 62 | 1/* 2 * Broadcom specific AMBA 3 * SPROM reading 4 * 5 * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de> 6 * 7 * Licensed under the GNU/GPL. See COPYING for details. 8 */ --- 46 unchanged lines hidden (view full) --- 55 err = -ENOENT; 56 goto fail; 57 } 58 59 err = get_fallback_sprom(bus, out); 60 if (err) 61 goto fail; 62 |
63 pr_debug("Using SPROM revision %d provided by" 64 " platform.\n", bus->sprom.revision); | 63 bcma_debug(bus, "Using SPROM revision %d provided by platform.\n", 64 bus->sprom.revision); |
65 return 0; 66fail: | 65 return 0; 66fail: |
67 pr_warn("Using fallback SPROM failed (err %d)\n", err); | 67 bcma_warn(bus, "Using fallback SPROM failed (err %d)\n", err); |
68 return err; 69} 70 71/************************************************** 72 * R/W ops. 73 **************************************************/ 74 75static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom) --- 502 unchanged lines hidden (view full) --- 578 GFP_KERNEL); 579 if (!sprom) 580 return -ENOMEM; 581 582 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || 583 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) 584 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false); 585 | 68 return err; 69} 70 71/************************************************** 72 * R/W ops. 73 **************************************************/ 74 75static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom) --- 502 unchanged lines hidden (view full) --- 578 GFP_KERNEL); 579 if (!sprom) 580 return -ENOMEM; 581 582 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || 583 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) 584 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false); 585 |
586 pr_debug("SPROM offset 0x%x\n", offset); | 586 bcma_debug(bus, "SPROM offset 0x%x\n", offset); |
587 bcma_sprom_read(bus, offset, sprom); 588 589 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || 590 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) 591 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true); 592 593 err = bcma_sprom_valid(sprom); 594 if (err) 595 goto out; 596 597 bcma_sprom_extract_r8(bus, sprom); 598 599out: 600 kfree(sprom); 601 return err; 602} | 587 bcma_sprom_read(bus, offset, sprom); 588 589 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || 590 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) 591 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true); 592 593 err = bcma_sprom_valid(sprom); 594 if (err) 595 goto out; 596 597 bcma_sprom_extract_r8(bus, sprom); 598 599out: 600 kfree(sprom); 601 return err; 602} |