This page does a simplified representation of the RTL9300 'longan' initialization flow when calling 'rtk_network_on'.

The output in U-boot looks like the following snippet, and translates nicely to the graph.

Enable network
RTCORE Driver Module Initialize
  IOAL init
  Hardware-profile probe    (Forced profile: RTL9302B_8218D_2x8226_2xGE)
 (RTL9302B_8218D_2x8226_2xGE)
  Hardware-profile init
  GPIO probe (unit 0): (found)
  GPIO Init
Reset PHY gpio OK!
  SPI init (unit 0) (type3)
    SPI Master init
  I2C probe (unit 0)
  I2C init (unit 0)
  NIC probe (unit 0)
  Loader RTNIC Driver Module Initialize
  IOAL init
RTK Driver Module Initialize
  MAC probe (unit 0)
    Chip 9302 (found)
  MAC init (unit 0)
  SMI protocol probe (unit 0)
  PHY probe (unit 0)
  Chip Construct (unit 0)
    Chip Construct
    Disable PHY Polling
    PHY Reset
    MAC Construct
    Turn Off Serdes
    Serdes Construct
    PHY Construct
    Turn On Serdes
    Enable PHY Polling
    Misc
  PHY init (unit 0)
  Mgmt_dev init (unit 0) 
Please wait for PHY init-time ...

Note the dal_longan functions, which is where the gross of the actual switch/serdes initialization lives. For the briefness of this high level overview, the actual network init call graph is left out. This can be added later.

rtk_network_on() (from U-Boot)rtk_network_on() (from U-Boot)uboot_func.cuboot_func.cuboot_init.cuboot_init.crtcore_init.crtcore_init.crtk/init.crtk/init.chalctrl.chalctrl.cdal_mgmt.cdal_mgmt.cmac_probe.cmac_probe.cphy_probe.cphy_probe.cdal_longan_construct.cdal_longan_construct.cdal_mgmt_initDevicedal_mgmt_initDeviceuboot_sdk_init()if rtcore_init_counter == 0rtcore_init()ioal_init()hwp_probe()hwp_init()ioal_init_unitID_change()hwp_chipInfo_update()gpio_probe()drv_gpio_init()drv_spi_init()i2c_probe()drv_i2c_init()nic_probe()uboot_rtnic_drv_init()rtcore_init_counter++if rtk_init_counter == 0rtk_init()hal_init()hal_init_sys()phy_identify_init()dal_mgmt_init()dal_mgmt_mapper_clear()mac_probe()hal_find_device()hal_find_driver()mac_init()fMdrv_init() -> rtl9300_init()phy_mdcProto_probe()phy_probe()_phy_probe_unit()phy_attach_hook_driver()if phyType = SerDesphy_identify_driver_find_by_phyType()phy_identify_serdesDrvCtrl_get()chip_construct() -> dal_longan_construct.cdal_longan_construct_default_init()dal_longan_construct_pollingPhy_disable()dal_longan_construct_phy_reset()dal_longan_construct_macConfig_init()dal_longan_construct_serdes_off()dal_longan_construct_serdesConfig_init()dal_longan_construct_phyConfig_init()dal_longan_construct_serdes_on()dal_longan_construct_pollingPhy_enable()dal_longan_construct_miscConfig_init()phy_init()fPhydrv_init -> phy_9300_init()dal_mgmt_initDevice() -> dal_longanMapper_init()dal_longan_init()dal_longan_l2Mapper_init()dal_longan_portMapper_init()rtk_init_counter++return success/failloop[for each port per switch]phy_enable_set()mdelay()