bcm-v4

[Specification

gmac_enable

  1. read Gmac core reg cmdcfg
  2. call gmac_init_reset

  3. set CC_SR bit in cmdcfg
  4. unset CC_RE and CC_TE bit in cmdcfg
  5. write cmdcfg back into Gmac core reg
  6. call gmac_clear_reset

  7. sleep 2 usec
  8. unset CC_SR bit in cmdcfg
  9. set CC_RE and CC_TE bit in cmdcfg
  10. write cmdcfg back into Gmac core reg
  11. mask devstatus with DS_MM_MASK and shift it to the right by DS_MM_SHIFT, write result into var mode
  12. if chipid is not 47162 or mode is not 0
    1. set bit CS_FH in gmac core reg clk_ctl_st
  13. if chipid is 47162 and mod is 2
    1. call si_pmu_chipcontrol with sih, PMU_CHIPCTL1, PMU_CC1_RXC_DLL_BYPASS and PMU_CC1_RXC_DLL_BYPASS (source: brcm/shared/hndpmu.c)
  14. if chipid is 0x5357 or chipid is 0x4749 or chipid is 53572 or chipid is 0x4716 or chipid is 47162
    1. set var flctl to 0x03cb04cb
    2. if chipid is 0x5357 or chipid is 0x4749 or chipid is 53572
      1. set var flctl to 0x2300e1
    3. write var flctl into gmac core reg flowctlthresh
    4. write 0x27fff into gmac core reg pausectl
  15. red gmac core reg rxqctl into var rxqctl
  16. unset RC_MDP_MASK mask in var rxqctl
  17. call si_clock, device the result by 1000000 and write it into var bp_clk (source: brcm/shared/siutils.c)
  18. multiply bp_clk by 128, divide the result by 1000, subtract 3 and write the result into mdp
  19. OR rxqctl with mdp shifted by RC_MDP_SHIFT to the left
  20. write var rxqctl into gmac core reg rxqctl

Exported/Archived from the wiki to HTML on 2016-10-27