bcm-v4

[Specification

chipattach

  1. coreunit = call si_coreunit() (this returns the core-type instantiation # of the current core) (see: brcm/shared/siutils.c)
  2. if the core rev is 0x80000000 (GMAC_4706B0_CORE_REV) we also need the core 0x5dc (GMAC_COMMON_4706_CORE_ID)
  3. get ethernet address from "et<coreunit>macaddr" field in nvram

  4. get phy address from "et<coreunit>phyaddr" field in nvram

  5. mask phyaddr with 0x1f (phy mask)
  6. fail if phy addrs is 31 (no phy present at all)
  7. call si_pci_setup() coremask= 1 << <coreindex> (does nothing on SoCs) (see: brcm/shared/siutils.c)

  8. call chipreset()

dma resources allocation

  1. call dma_attach(osh, "et<coreunit>", ch->sih, dmaregs[0].dmaxmt, dmaregs[0].dmarcv, 128, 512,2048 - 256, -1, 320, 30, 0) (see: brcm/shared/hnddma.c:)

  2. call dma_attach(osh, "et<coreunit>", ch->sih, dmaregs[1].dmaxmt, NULL, 128, 0,0, -1, 0, 0, 0)

  3. call dma_attach(osh, "et<coreunit>", ch->sih, dmaregs[2].dmaxmt, NULL, 128, 0,0, -1, 0, 0, 0)

  4. call dma_attach(osh, "et<coreunit>", ch->sih, dmaregs[3].dmaxmt, NULL, 128, 0,0, -1, 0, 0, 0)

  5. if "et<coreunit>_no_txint" is set

    1. intmask = DEF_INTMASK & ~(I_XI0 | I_XI1 | I_XI2 | I_XI3);

  6. else
    1. intmask = DEF_INTMASK
  7. TODO: reset the external phy
  8. call chipphyreset(ch, etc->phyaddr);

  9. TODO: Broadcom Robo ethernet switch.
  10. TODO: ADMtek ethernet switch.

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