Lines Matching refs:sprom
176 if (_revmask & BIT(sprom->revision)) \
177 nvram_read_ ## _type(_prefix, NULL, _name, &sprom->_val, \
188 static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, in bcm47xx_sprom_fill_auto() argument
409 static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r4589() argument
415 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r4589()
418 pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r4589()
460 static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r45() argument
466 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r45()
469 pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r45()
510 static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_ethernet() argument
515 nvram_read_macaddr(prefix, "et0macaddr", sprom->et0mac, fallback); in bcm47xx_fill_sprom_ethernet()
516 nvram_read_u8(prefix, NULL, "et0mdcport", &sprom->et0mdcport, 0, in bcm47xx_fill_sprom_ethernet()
518 nvram_read_u8(prefix, NULL, "et0phyaddr", &sprom->et0phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
521 nvram_read_macaddr(prefix, "et1macaddr", sprom->et1mac, fallback); in bcm47xx_fill_sprom_ethernet()
522 nvram_read_u8(prefix, NULL, "et1mdcport", &sprom->et1mdcport, 0, in bcm47xx_fill_sprom_ethernet()
524 nvram_read_u8(prefix, NULL, "et1phyaddr", &sprom->et1phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
527 nvram_read_macaddr(prefix, "et2macaddr", sprom->et2mac, fb); in bcm47xx_fill_sprom_ethernet()
528 nvram_read_u8(prefix, NULL, "et2mdcport", &sprom->et2mdcport, 0, fb); in bcm47xx_fill_sprom_ethernet()
529 nvram_read_u8(prefix, NULL, "et2phyaddr", &sprom->et2phyaddr, 0, fb); in bcm47xx_fill_sprom_ethernet()
531 nvram_read_macaddr(prefix, "macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
532 nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
540 if (!bcm47xx_is_valid_mac(sprom->il0mac)) { in bcm47xx_fill_sprom_ethernet()
548 ether_addr_copy(sprom->il0mac, mac); in bcm47xx_fill_sprom_ethernet()
555 static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_board_data() argument
558 nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, in bcm47xx_fill_board_data()
559 &sprom->boardflags_hi, fallback); in bcm47xx_fill_board_data()
560 nvram_read_u32_2(prefix, "boardflags2", &sprom->boardflags2_lo, in bcm47xx_fill_board_data()
561 &sprom->boardflags2_hi, fallback); in bcm47xx_fill_board_data()
564 void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_sprom() argument
567 bcm47xx_fill_sprom_ethernet(sprom, prefix, fallback); in bcm47xx_fill_sprom()
568 bcm47xx_fill_board_data(sprom, prefix, fallback); in bcm47xx_fill_sprom()
570 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0, fallback); in bcm47xx_fill_sprom()
573 nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback); in bcm47xx_fill_sprom()
574 if (sprom->revision >= 3) in bcm47xx_fill_sprom()
575 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, in bcm47xx_fill_sprom()
576 &sprom->leddc_off_time, fallback); in bcm47xx_fill_sprom()
578 switch (sprom->revision) { in bcm47xx_fill_sprom()
581 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
582 bcm47xx_fill_sprom_path_r45(sprom, prefix, fallback); in bcm47xx_fill_sprom()
586 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
590 bcm47xx_sprom_fill_auto(sprom, prefix, fallback); in bcm47xx_fill_sprom()