[U-Boot] [PATCH v4 2/2] mdio: add marvell MDIO driver

Stefan Roese sr at denx.de
Thu Jul 5 07:48:48 UTC 2018


On 05.07.2018 09:34, make at marvell.com wrote:
> From: Ken Ma <make at marvell.com>
> 
> This patch adds a separate driver for the MDIO interface of the
> Marvell Ethernet controllers based on driver model. There are two
> reasons to have a separate driver rather than including it inside
> the MAC driver itself:
>    *) The MDIO interface is shared by all Ethernet ports, so a driver
>       must guarantee non-concurrent accesses to this MDIO interface. The
>       most logical way is to have a separate driver that handles this
>       single MDIO interface, used by all Ethernet ports.
>    *) The MDIO interface is the same between the existing mv643xx_eth
>       driver and the new mvneta/mvpp2 driver. Even though it is for now
>       only used by the mvneta/mvpp2 driver, it will in the future be
>       used by the mv643xx_eth driver as well.
> 
> This driver supports SMI IEEE for 802.3 Clause 22 and XSMI for IEEE
> 802.3 Clause 45.
> 
> This patch also adds device tree binding for marvell MDIO driver.
> 
> Signed-off-by: Ken Ma <make at marvell.com>
> Reviewed-by: Chris Packham <judge.packham at gmail.com>
> ---
> 
> Changes in v4:
> - Use wait_for_bit_le32() instead of implementing private busy wait
>    polling function.
> 
> Changes in v3:
> - Move marvell mdio driver to driver/net/mdio folder;
> - Update codes according to mdio uclass implementation updates.
> 
> Changes in v2:
> - Fix error printing:
>    - Change some debug to pr_err;
>    - mii bus has no parent member and it is not a udevice, so dev_err
>      is changed to pr_err for mii bus error printings.
> 
>   MAINTAINERS                                   |   1 +
>   arch/arm/Kconfig                              |   1 +
>   doc/device-tree-bindings/net/marvell-mdio.txt |  18 +++
>   drivers/net/mdio/Kconfig                      |  10 ++
>   drivers/net/mdio/Makefile                     |   1 +
>   drivers/net/mdio/mvmdio.c                     | 200 ++++++++++++++++++++++++++
>   6 files changed, 231 insertions(+)
>   create mode 100644 doc/device-tree-bindings/net/marvell-mdio.txt
>   create mode 100644 drivers/net/mdio/mvmdio.c

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan


More information about the U-Boot mailing list