u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
To: u-boot@lists.denx.de
Cc: "Marek Vasut" <marek.vasut+renesas@mailbox.org>,
	"Ariel D'Alessandro" <ariel.dalessandro@collabora.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Marek Behún" <kabel@kernel.org>,
	"Alex Nemirovsky" <alex.nemirovsky@cortina-access.com>,
	"Haolin Li" <li.haolin@qq.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Joe Hershberger" <joe.hershberger@ni.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Josua Mayer" <josua@solid-run.com>,
	"Michael Trimarchi" <michael@amarulasolutions.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Nate Drude" <nate.d@variscite.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Radu Pirea" <radu-nicolae.pirea@oss.nxp.com>,
	"Ramon Fried" <rfried.dev@gmail.com>,
	"Samuel Mendoza-Jonas" <sam@mendozajonas.com>,
	"Stefan Roese" <sr@denx.de>,
	"T Karthik Reddy" <t.karthik.reddy@xilinx.com>,
	"Tim Harvey" <tharvey@gateworks.com>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>,
	u-boot-amlogic@groups.io
Subject: [PATCH 10/41] net: phy: b53: Convert to U_BOOT_PHY_DRIVER()
Date: Sun, 19 Mar 2023 18:02:46 +0100	[thread overview]
Message-ID: <20230319170317.27711-10-marek.vasut+renesas@mailbox.org> (raw)
In-Reply-To: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org>

Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.

Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: "Ariel D'Alessandro" <ariel.dalessandro@collabora.com>
Cc: "Cédric Le Goater" <clg@kaod.org>
Cc: "Marek Behún" <kabel@kernel.org>
Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Cc: Haolin Li <li.haolin@qq.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Josua Mayer <josua@solid-run.com>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Michal Simek <michal.simek@amd.com>
Cc: Nate Drude <nate.d@variscite.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Radu Pirea <radu-nicolae.pirea@oss.nxp.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Cc: Stefan Roese <sr@denx.de>
Cc: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: u-boot-amlogic@groups.io
---
 drivers/net/phy/b53.c | 9 +--------
 drivers/net/phy/phy.c | 3 ---
 include/phy.h         | 1 -
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index c706e2b9bde..26e8e2fe64f 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -612,7 +612,7 @@ static int b53_phy_startup(struct phy_device *phydev)
 	return 0;
 }
 
-static struct phy_driver b53_driver = {
+U_BOOT_PHY_DRIVER(b53) = {
 	.name = "Broadcom BCM53125",
 	.uid = 0x03625c00,
 	.mask = 0xfffffc00,
@@ -623,13 +623,6 @@ static struct phy_driver b53_driver = {
 	.shutdown = &genphy_shutdown,
 };
 
-int phy_b53_init(void)
-{
-	phy_register(&b53_driver);
-
-	return 0;
-}
-
 int do_b53_reg_read(const char *name, int argc, char *const argv[])
 {
 	u8 page, offset, width;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 853302cf974..7a7762377b6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -514,9 +514,6 @@ int phy_init(void)
 		phy_drv_reloc(drv);
 #endif
 
-#ifdef CONFIG_B53_SWITCH
-	phy_b53_init();
-#endif
 #ifdef CONFIG_MV88E61XX_SWITCH
 	phy_mv88e61xx_init();
 #endif
diff --git a/include/phy.h b/include/phy.h
index a1be1fbe1a1..88c9013f1f8 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -315,7 +315,6 @@ int gen10g_startup(struct phy_device *phydev);
 int gen10g_shutdown(struct phy_device *phydev);
 int gen10g_discover_mmds(struct phy_device *phydev);
 
-int phy_b53_init(void);
 int phy_mv88e61xx_init(void);
 int phy_broadcom_init(void);
 int phy_cortina_init(void);
-- 
2.39.2


  parent reply	other threads:[~2023-03-19 17:06 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 17:02 [PATCH 01/41] net: phy: aquantia: Staticize PHY driver entries Marek Vasut
2023-03-19 17:02 ` [PATCH 02/41] net: phy: ca_phy: " Marek Vasut
2023-03-19 17:02 ` [PATCH 03/41] net: phy: cortina: " Marek Vasut
2023-03-19 17:02 ` [PATCH 04/41] net: phy: teranetics: " Marek Vasut
2023-03-19 17:02 ` [PATCH 05/41] net: phy: Factor manual relocation into separate function Marek Vasut
2023-03-19 17:02 ` [PATCH 06/41] net: phy: Iterate over both registered PHYs and struct phy_driver linker list Marek Vasut
2023-03-19 17:02 ` [PATCH 07/41] net: phy: adin: Convert to U_BOOT_PHY_DRIVER() Marek Vasut
2023-03-19 17:02 ` [PATCH 08/41] net: phy: aquantia: " Marek Vasut
2023-03-19 17:02 ` [PATCH 09/41] net: phy: atheros: " Marek Vasut
2023-03-19 17:02 ` Marek Vasut [this message]
2023-03-19 17:02 ` [PATCH 11/41] net: phy: broadcom: " Marek Vasut
2023-03-19 17:02 ` [PATCH 12/41] net: phy: ca_phy: " Marek Vasut
2023-03-19 17:02 ` [PATCH 13/41] net: phy: cortina: " Marek Vasut
2023-03-19 17:02 ` [PATCH 14/41] net: phy: davicom: " Marek Vasut
2023-03-19 17:02 ` [PATCH 15/41] net: phy: mv88e61xx: " Marek Vasut
2023-03-19 17:02 ` [PATCH 16/41] net: phy: et1011c: " Marek Vasut
2023-03-19 17:02 ` [PATCH 17/41] net: phy: lxt: " Marek Vasut
2023-03-19 17:02 ` [PATCH 18/41] net: phy: marvell: " Marek Vasut
2023-03-19 17:02 ` [PATCH 19/41] net: phy: ksz8xxx: " Marek Vasut
2023-03-19 17:02 ` [PATCH 20/41] net: phy: ksz90x1: " Marek Vasut
2023-03-19 17:02 ` [PATCH 21/41] net: phy: meson-gxl: " Marek Vasut
2023-03-19 17:02 ` [PATCH 22/41] net: phy: natsemi: " Marek Vasut
2023-03-19 17:02 ` [PATCH 23/41] net: phy: nxp-c45-tja11xx: " Marek Vasut
2023-03-19 17:03 ` [PATCH 24/41] net: phy: nxp-tja11xx: " Marek Vasut
2023-03-19 17:03 ` [PATCH 25/41] net: phy: realtek: " Marek Vasut
2023-03-19 17:03 ` [PATCH 26/41] net: phy: smsc: " Marek Vasut
2023-03-19 17:03 ` [PATCH 27/41] net: phy: teranetics: " Marek Vasut
2023-03-19 17:03 ` [PATCH 28/41] net: phy: ti: " Marek Vasut
2023-03-19 17:03 ` [PATCH 29/41] net: phy: vitesse: " Marek Vasut
2023-04-01 18:45   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 30/41] net: phy: xilinx: " Marek Vasut
2023-04-01 18:45   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 31/41] net: phy: intel-xway: " Marek Vasut
2023-04-01 18:45   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 32/41] net: phy: mscc: " Marek Vasut
2023-04-01 18:45   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 33/41] net: phy: fixed: " Marek Vasut
2023-04-01 18:45   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 34/41] net: phy: ncsi: " Marek Vasut
2023-04-01 18:46   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 35/41] net: phy: xilinx-gmii2rgmii: " Marek Vasut
2023-04-01 18:46   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 36/41] net: phy: genphy: " Marek Vasut
2023-03-19 17:03 ` [PATCH 37/41] net: phy: gen10g: " Marek Vasut
2023-04-01 18:46   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 38/41] net: phy: Drop static phy_drivers list Marek Vasut
2023-04-01 18:47   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 39/41] net: phy: Drop unused phy_register() Marek Vasut
2023-04-01 18:47   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 40/41] net: phy: Re-inline phy_drv_reloc() Marek Vasut
2023-04-01 18:47   ` Ramon Fried
2023-03-19 17:03 ` [PATCH 41/41] net: phy: Only call phy_init() on systems needing manual relocation Marek Vasut
2023-04-01 18:48   ` Ramon Fried
2023-03-21 14:39 ` [PATCH 01/41] net: phy: aquantia: Staticize PHY driver entries Michal Simek
2023-03-21 17:28   ` Vladimir Oltean
2023-04-01 18:59 ` Ramon Fried

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230319170317.27711-10-marek.vasut+renesas@mailbox.org \
    --to=marek.vasut+renesas@mailbox.org \
    --cc=alex.nemirovsky@cortina-access.com \
    --cc=ariel.dalessandro@collabora.com \
    --cc=clg@kaod.org \
    --cc=joe.hershberger@ni.com \
    --cc=joel@jms.id.au \
    --cc=josua@solid-run.com \
    --cc=kabel@kernel.org \
    --cc=li.haolin@qq.com \
    --cc=michael@amarulasolutions.com \
    --cc=michal.simek@amd.com \
    --cc=nate.d@variscite.com \
    --cc=neil.armstrong@linaro.org \
    --cc=radu-nicolae.pirea@oss.nxp.com \
    --cc=rfried.dev@gmail.com \
    --cc=sam@mendozajonas.com \
    --cc=sr@denx.de \
    --cc=t.karthik.reddy@xilinx.com \
    --cc=tharvey@gateworks.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).