HomeFreeBSD

Fix finding appropriate BGX node in DTB and move it to a separate function

Description

Fix finding appropriate BGX node in DTB and move it to a separate function

Search for BGX node in DTS in two ways:

  1. Try to find it uder root node first
  2. If not found under root, find the top level PCI bridge node and search all nodes below it until appropriate BGX node is found.

Move search code to another function to make the code more clear.
Remove unused variable by the way.

Reviewed by: wma
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D5066