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
412 static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_r1234589() argument
415 nvram_read_u16(prefix, NULL, "devid", &sprom->dev_id, 0, fallback); in bcm47xx_fill_sprom_r1234589()
416 nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback); in bcm47xx_fill_sprom_r1234589()
419 static void bcm47xx_fill_sprom_r3(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_sprom_r3() argument
422 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, in bcm47xx_fill_sprom_r3()
423 &sprom->leddc_off_time, fallback); in bcm47xx_fill_sprom_r3()
426 static void bcm47xx_fill_sprom_r4589(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_r4589() argument
429 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, in bcm47xx_fill_sprom_r4589()
430 &sprom->leddc_off_time, fallback); in bcm47xx_fill_sprom_r4589()
433 static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r4589() argument
439 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r4589()
440 struct ssb_sprom_core_pwr_info *pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r4589()
481 static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_path_r45() argument
487 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) { in bcm47xx_fill_sprom_path_r45()
488 struct ssb_sprom_core_pwr_info *pwr_info = &sprom->core_pwr_info[i]; in bcm47xx_fill_sprom_path_r45()
528 static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, in bcm47xx_fill_sprom_ethernet() argument
531 nvram_read_macaddr(prefix, "et0macaddr", sprom->et0mac, fallback); in bcm47xx_fill_sprom_ethernet()
532 nvram_read_u8(prefix, NULL, "et0mdcport", &sprom->et0mdcport, 0, in bcm47xx_fill_sprom_ethernet()
534 nvram_read_u8(prefix, NULL, "et0phyaddr", &sprom->et0phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
537 nvram_read_macaddr(prefix, "et1macaddr", sprom->et1mac, fallback); in bcm47xx_fill_sprom_ethernet()
538 nvram_read_u8(prefix, NULL, "et1mdcport", &sprom->et1mdcport, 0, in bcm47xx_fill_sprom_ethernet()
540 nvram_read_u8(prefix, NULL, "et1phyaddr", &sprom->et1phyaddr, 0, in bcm47xx_fill_sprom_ethernet()
543 nvram_read_macaddr(prefix, "macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
544 nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback); in bcm47xx_fill_sprom_ethernet()
551 if (!bcm47xx_is_valid_mac(sprom->il0mac)) { in bcm47xx_fill_sprom_ethernet()
559 ether_addr_copy(sprom->il0mac, mac); in bcm47xx_fill_sprom_ethernet()
566 static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_board_data() argument
569 nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, in bcm47xx_fill_board_data()
570 &sprom->boardflags_hi, fallback); in bcm47xx_fill_board_data()
571 nvram_read_u32_2(prefix, "boardflags2", &sprom->boardflags2_lo, in bcm47xx_fill_board_data()
572 &sprom->boardflags2_hi, fallback); in bcm47xx_fill_board_data()
575 void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, in bcm47xx_fill_sprom() argument
578 bcm47xx_fill_sprom_ethernet(sprom, prefix, fallback); in bcm47xx_fill_sprom()
579 bcm47xx_fill_board_data(sprom, prefix, fallback); in bcm47xx_fill_sprom()
581 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0, fallback); in bcm47xx_fill_sprom()
583 switch (sprom->revision) { in bcm47xx_fill_sprom()
585 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
588 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
591 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
592 bcm47xx_fill_sprom_r3(sprom, prefix, fallback); in bcm47xx_fill_sprom()
596 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
597 bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
598 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
599 bcm47xx_fill_sprom_path_r45(sprom, prefix, fallback); in bcm47xx_fill_sprom()
602 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
603 bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
604 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
607 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
608 bcm47xx_fill_sprom_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
609 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
613 sprom->revision); in bcm47xx_fill_sprom()
614 sprom->revision = 1; in bcm47xx_fill_sprom()
615 bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); in bcm47xx_fill_sprom()
618 bcm47xx_sprom_fill_auto(sprom, prefix, fallback); in bcm47xx_fill_sprom()