From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2F59C7618A for ; Sun, 19 Mar 2023 17:06:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D567D85D23; Sun, 19 Mar 2023 18:06:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="AwqKiXFg"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="eXMgG5QL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6238785B66; Sun, 19 Mar 2023 18:05:31 +0100 (CET) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E664585B6E for ; Sun, 19 Mar 2023 18:04:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PfkkB4W8mz9sc0; Sun, 19 Mar 2023 18:04:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3dsCrBqWbtMbthUNGbLjq013Sdx5XjIlrpTS0AbRoVQ=; b=AwqKiXFg5LCnSAJNviNjSLu+/35A1cHIfX8d/bzasC7W4cLEkhISY2guwec4c5D01wOwDl 9UVlOoR3fpGfld4UuT6iYHa+Ksxs7SZvu4CZe7AiiS7CpqZo/UAoH+AJMTONe90TRxTey/ UyksQOjUy//w1WZQTqp/qwPs7P+zocJ7HcAc+rwSw0yrxdgrW9tQeizCRAqHEAPe1dcOXV Y3sRWKkXlXqE2luKdmbQWOtIoRqduA5Ujmgs9BNzIzFif9HPUtRJCIKM9ozCCRvrONAg5R DlZe4vEzRKrof/Uh7vcz4o8RGlU1wzdDxBDUOi28iBALoTQimUyaY82R+/YbGQ== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3dsCrBqWbtMbthUNGbLjq013Sdx5XjIlrpTS0AbRoVQ=; b=eXMgG5QLbufy7J0Sa0RPwMXKYEre280gx/Q/YYsQ5innUvKlja1l/ejfvjSLU7r3XX2EJk vvKhWjEwa9dXiV+S8IRP1InzsgtaD8CW/FTJQY+c9OqCtx5LCHQNKwLwq+eAlC3pQpQVsL Qw31/CAdON/1eGjxGiY4wcnd6eIo/dQ87Y4WwEVDKPts/OjKD7L96oYkXSGse1vAEv5YDe D5R9ch1vuZwWfCM6twwwfiKaW5gtLySYIG404xyisjio0Hk+huWPU4bdMAVwQJEEBdhf3U CV8wgqWG3l36Xo/SoObES9K5qfS9hopjmfhA6SnuxmSseDE3SOOaut8PlFSekA== To: u-boot@lists.denx.de Cc: Marek Vasut , "Ariel D'Alessandro" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Alex Nemirovsky , Haolin Li , Heinrich Schuchardt , Joe Hershberger , Joel Stanley , Josua Mayer , Michael Trimarchi , Michal Simek , Nate Drude , Neil Armstrong , Radu Pirea , Ramon Fried , Samuel Mendoza-Jonas , Stefan Roese , T Karthik Reddy , Tim Harvey , Vladimir Oltean , u-boot-amlogic@groups.io Subject: [PATCH 12/41] net: phy: ca_phy: Convert to U_BOOT_PHY_DRIVER() Date: Sun, 19 Mar 2023 18:02:48 +0100 Message-Id: <20230319170317.27711-12-marek.vasut+renesas@mailbox.org> In-Reply-To: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> References: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 4fbf997b4cf9c607b9a X-MBO-RS-META: 4z4gp8sreiwjzqa199drexshicnoria9 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 --- Cc: "Ariel D'Alessandro" Cc: "Cédric Le Goater" Cc: "Marek Behún" Cc: Alex Nemirovsky Cc: Haolin Li Cc: Heinrich Schuchardt Cc: Joe Hershberger Cc: Joel Stanley Cc: Josua Mayer Cc: Marek Vasut Cc: Michael Trimarchi Cc: Michal Simek Cc: Nate Drude Cc: Neil Armstrong Cc: Radu Pirea Cc: Ramon Fried Cc: Samuel Mendoza-Jonas Cc: Stefan Roese Cc: T Karthik Reddy Cc: Tim Harvey Cc: Vladimir Oltean Cc: u-boot-amlogic@groups.io --- drivers/net/phy/ca_phy.c | 11 ++--------- drivers/net/phy/phy.c | 3 --- include/phy.h | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/phy/ca_phy.c b/drivers/net/phy/ca_phy.c index 9180a41111c..edef21867b0 100644 --- a/drivers/net/phy/ca_phy.c +++ b/drivers/net/phy/ca_phy.c @@ -104,7 +104,7 @@ static int rtl8211_probe(struct phy_device *phydev) } /* Support for RTL8211 External PHY */ -static struct phy_driver rtl8211_external_driver = { +U_BOOT_PHY_DRIVER(rtl8211_external) = { .name = "Cortina RTL8211 External", .uid = PHY_ID_RTL8211_EXT, .mask = PHY_ID_MASK, @@ -115,7 +115,7 @@ static struct phy_driver rtl8211_external_driver = { }; /* Support for RTL8211 Internal PHY */ -static struct phy_driver rtl8211_internal_driver = { +U_BOOT_PHY_DRIVER(rtl8211_internal) = { .name = "Cortina RTL8211 Inrernal", .uid = PHY_ID_RTL8211_INT, .mask = PHY_ID_MASK, @@ -124,10 +124,3 @@ static struct phy_driver rtl8211_internal_driver = { .probe = &rtl8211_probe, .startup = &genphy_startup, }; - -int phy_cortina_access_init(void) -{ - phy_register(&rtl8211_external_driver); - phy_register(&rtl8211_internal_driver); - return 0; -} diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 4b1fed1ff6f..4446902ab63 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -520,9 +520,6 @@ int phy_init(void) #ifdef CONFIG_PHY_CORTINA phy_cortina_init(); #endif -#ifdef CONFIG_PHY_CORTINA_ACCESS - phy_cortina_access_init(); -#endif #ifdef CONFIG_PHY_DAVICOM phy_davicom_init(); #endif diff --git a/include/phy.h b/include/phy.h index cecfbe6968f..50a53982810 100644 --- a/include/phy.h +++ b/include/phy.h @@ -317,7 +317,6 @@ int gen10g_discover_mmds(struct phy_device *phydev); int phy_mv88e61xx_init(void); int phy_cortina_init(void); -int phy_cortina_access_init(void); int phy_davicom_init(void); int phy_et1011c_init(void); int phy_lxt_init(void); -- 2.39.2