diff mbox series

[U-Boot] net: phy: Define init routine and register generic phy driver

Message ID faef6f7c1c72df15ffdb66a5166600a793154b7a.1568193352.git.michal.simek@xilinx.com
State Accepted
Commit be49508a0f3229ff589dfabad80ab2774f47875a
Delegated to: Michal Simek
Headers show
Series [U-Boot] net: phy: Define init routine and register generic phy driver | expand

Commit Message

Michal Simek Sept. 11, 2019, 9:15 a.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

This patch define init routine for generic phy driver and registers it
using phy_register as this generic phy driver also needs to be relocated
incase of manual reloc.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/phy/phy.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Michal Simek Oct. 8, 2019, 7:46 a.m. UTC | #1
st 11. 9. 2019 v 11:15 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> This patch define init routine for generic phy driver and registers it
> using phy_register as this generic phy driver also needs to be relocated
> incase of manual reloc.
>
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  drivers/net/phy/phy.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index ae37dd6c1e37..8c4043445e86 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -458,6 +458,11 @@ static struct phy_driver genphy_driver = {
>         .shutdown       = genphy_shutdown,
>  };
>
> +int genphy_init(void)
> +{
> +       return phy_register(&genphy_driver);
> +}
> +
>  static LIST_HEAD(phy_drivers);
>
>  int phy_init(void)
> @@ -540,6 +545,8 @@ int phy_init(void)
>  #ifdef CONFIG_PHY_FIXED
>         phy_fixed_init();
>  #endif
> +       genphy_init();
> +
>         return 0;
>  }
>
> --
> 2.17.1
>

Applied.
M
diff mbox series

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index ae37dd6c1e37..8c4043445e86 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -458,6 +458,11 @@  static struct phy_driver genphy_driver = {
 	.shutdown	= genphy_shutdown,
 };
 
+int genphy_init(void)
+{
+	return phy_register(&genphy_driver);
+}
+
 static LIST_HEAD(phy_drivers);
 
 int phy_init(void)
@@ -540,6 +545,8 @@  int phy_init(void)
 #ifdef CONFIG_PHY_FIXED
 	phy_fixed_init();
 #endif
+	genphy_init();
+
 	return 0;
 }