summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-11-04 11:49:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-11 11:36:15 -0800
commita41a1f86189b31feebcb676cff824b83921db81a (patch)
tree736a5fd7721aafa1ed34c4462a9f594f400e60a6 /drivers/clocksource
parentd936550784a23b8dac077733cdf2f554a019286b (diff)
staging: mt7621-pci: factor out 'mt7621_pcie_enable_ports' function
Driver probe function check for a bit in 'pcie_link_status' for enabling the pcie port or not. Instead of this add 'enabled' field in 'mt7621_pcie_port' structure and check its value to achieve this inside a new 'mt7621_pcie_enable_ports' function. The offsets for the correct port are derived from the slot of the port. This field 'enabled' is properly initilized in 'mt7621_pcie_init_port'. Also depending of the number of ports enabled we have to properly init its registers taking into account that we will use virtual bridges from zero to num_slots_enabled as follows: - Only one enabled -> only enable virtual bridge 0. - Two enabled -> enable virtual bridges 0 and 1. - Three enabled -> enable virtual bridges 0, 1 and 2. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clocksource')
0 files changed, 0 insertions, 0 deletions