Lines Matching refs:sprom
185 if (_revmask & BIT(sprom->revision)) \
186 nvram_read_ ## _type(_prefix, NULL, _name, &sprom->_val, \
197 static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, in bcm47xx_sprom_fill_auto() argument
418 static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r4589() argument
424 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r4589()
427 pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r4589()
469 static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r45() argument
475 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r45()
478 pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r45()
519 static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_ethernet() argument
524 nvram_read_macaddr(prefix, "et0macaddr", sprom->et0mac, fallback); in bcm47xx_fill_sprom_ethernet()
525 nvram_read_u8(prefix, NULL, "et0mdcport", &sprom->et0mdcport, 0, in bcm47xx_fill_sprom_ethernet()
527 nvram_read_u8(prefix, NULL, "et0phyaddr", &sprom->et0phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
530 nvram_read_macaddr(prefix, "et1macaddr", sprom->et1mac, fallback); in bcm47xx_fill_sprom_ethernet()
531 nvram_read_u8(prefix, NULL, "et1mdcport", &sprom->et1mdcport, 0, in bcm47xx_fill_sprom_ethernet()
533 nvram_read_u8(prefix, NULL, "et1phyaddr", &sprom->et1phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
536 nvram_read_macaddr(prefix, "et2macaddr", sprom->et2mac, fb); in bcm47xx_fill_sprom_ethernet()
537 nvram_read_u8(prefix, NULL, "et2mdcport", &sprom->et2mdcport, 0, fb); in bcm47xx_fill_sprom_ethernet()
538 nvram_read_u8(prefix, NULL, "et2phyaddr", &sprom->et2phyaddr, 0, fb); in bcm47xx_fill_sprom_ethernet()
540 nvram_read_macaddr(prefix, "macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
541 nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
549 if (!bcm47xx_is_valid_mac(sprom->il0mac)) { in bcm47xx_fill_sprom_ethernet()
557 ether_addr_copy(sprom->il0mac, mac); in bcm47xx_fill_sprom_ethernet()
564 static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_board_data() argument
567 nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, in bcm47xx_fill_board_data()
568 &sprom->boardflags_hi, fallback); in bcm47xx_fill_board_data()
569 nvram_read_u32_2(prefix, "boardflags2", &sprom->boardflags2_lo, in bcm47xx_fill_board_data()
570 &sprom->boardflags2_hi, fallback); in bcm47xx_fill_board_data()
573 void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_sprom() argument
576 bcm47xx_fill_sprom_ethernet(sprom, prefix, fallback); in bcm47xx_fill_sprom()
577 bcm47xx_fill_board_data(sprom, prefix, fallback); in bcm47xx_fill_sprom()
579 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0, fallback); in bcm47xx_fill_sprom()
582 nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback); in bcm47xx_fill_sprom()
583 if (sprom->revision >= 3) in bcm47xx_fill_sprom()
584 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, in bcm47xx_fill_sprom()
585 &sprom->leddc_off_time, fallback); in bcm47xx_fill_sprom()
587 switch (sprom->revision) { in bcm47xx_fill_sprom()
590 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
591 bcm47xx_fill_sprom_path_r45(sprom, prefix, fallback); in bcm47xx_fill_sprom()
595 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
599 bcm47xx_sprom_fill_auto(sprom, prefix, fallback); in bcm47xx_fill_sprom()