[PATCH 0/3] staging: mt7621-pci: extract PCI PHY part into a new 'pci-mt7621-phy' driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is a lot of code related with PHY part of the mt7621 PCI driver
that can be extracted to a new PHY generic driver to do the same function.

This patch series add a new 'mt7621-pci-phy' driver to handle those
and updates the mt7621-pci driver code to use generic kernel's PHY
API. This makes the code much better and readable.

Device tree has been also updated with new related bindinds for the
PCI PHY part.

There is one issue which makes the new driver not as clean as I would
like to be which is the fact that pcie0_port and pcie1_port share the
same address space  for its registers and only differ en enable bit for
the phy. Because of this, we cannot remap the register address space twice.
The function 'probe' of the driver take this into consideration to not
fail if port is '1' which is not a good way to go, but I cannot find similar
sample or another way to go. It would be nice if someone could point me
out in the correct way.

This changes are only compile-tested.

Hope this helps.

Thanks in advance.

Best regards,
     Sergio Paracuellos

Sergio Paracuellos (3):
  staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci
  staging: mt7621-pci: handle phy using new generic phy 'pci-mt7621-phy'
    driver
  staging: mt7621-dts: add pci-phy related bindings to board's device
    tree

 drivers/staging/Kconfig                       |   2 +
 drivers/staging/Makefile                      |   1 +
 drivers/staging/mt7621-dts/mt7621.dtsi        |  40 ++
 drivers/staging/mt7621-pci-phy/Kconfig        |   7 +
 drivers/staging/mt7621-pci-phy/Makefile       |   1 +
 drivers/staging/mt7621-pci-phy/TODO           |   4 +
 .../staging/mt7621-pci-phy/pci-mt7621-phy.c   | 422 ++++++++++++++++++
 drivers/staging/mt7621-pci/pci-mt7621.c       | 250 ++---------
 8 files changed, 509 insertions(+), 218 deletions(-)
 create mode 100644 drivers/staging/mt7621-pci-phy/Kconfig
 create mode 100644 drivers/staging/mt7621-pci-phy/Makefile
 create mode 100644 drivers/staging/mt7621-pci-phy/TODO
 create mode 100644 drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c

-- 
2.19.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux