diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-11-04 11:49:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-11 11:36:15 -0800 |
commit | a41a1f86189b31feebcb676cff824b83921db81a (patch) | |
tree | 736a5fd7721aafa1ed34c4462a9f594f400e60a6 /drivers/lightnvm | |
parent | d936550784a23b8dac077733cdf2f554a019286b (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/lightnvm')
0 files changed, 0 insertions, 0 deletions