From patchwork Fri Sep 18 10:57:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 962C9C43463 for ; Fri, 18 Sep 2020 10:58:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46A0C22208 for ; Fri, 18 Sep 2020 10:58:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ImX2Wk/T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726354AbgIRK6I (ORCPT ); Fri, 18 Sep 2020 06:58:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgIRK6G (ORCPT ); Fri, 18 Sep 2020 06:58:06 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F797C06174A for ; Fri, 18 Sep 2020 03:58:05 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id z23so7441404ejr.13 for ; Fri, 18 Sep 2020 03:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9OP1mRo71Vk0qTR/DvrQzjAovn7dQZQDwENlVj2lInA=; b=ImX2Wk/TaZwOGBvM9hOMXv05DK8bswHw7ZdJ/Jl+hM8q/WyhtRUs6z9qyr3+Gcag6S AmrvwP/EFYwBi+TvF9Fc3XAFbTiNZO7Ga3hGVjnaY/rydHbg1kE9smHyLg+Ta2yIIGQs e4ZFlIrjAM7vr40lR3UKZv/yYUwu4ySU+18XN0dRH6RmAPQa2gjkPjDQewyz1HeEehFS snNOwqYiiJj93OTOgCdoKiXHS6TBMHg136IOe4kGrsbsxZa0BvdYf3Z23/n1C4OIFgjz c1tz/iVJoEVn0naWX7HwbjlZ5t7ZzlKFgRL6TEBq3k3f28VURV1fmQ4VGKK/DyUlCy2w wwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9OP1mRo71Vk0qTR/DvrQzjAovn7dQZQDwENlVj2lInA=; b=U7393+MWoWhSRaNOQWxv39/YTxgaBpLFS3Dd4Rwiqzvztu++e2HnUo5rTgBa+fGC3c Ffe7nOEqupeI+QGYvrlXByDj6Tiu5kDxPIBP9cfQNvXi4A78sxvwyGUl+117kEAtQmku OAyDPl5PS6MOwiPVRurqIF8TQcN0C94OvSiUEsqdF89fKkOA6CRhexljL79mKk4Mv8xr Q3/EdMZKw3t6lIeGbSbTpYtH65G2TiApX2jr81QcKsIwjBCRgaq0gGqrfv/1eEOwgBKL A9MPFQJdNN+x9dotV1QaMzEBp5j3DMrL/P4s7dnLRBUkb6y7nXehZ2HAI9MkCd4gfL/4 bW7w== X-Gm-Message-State: AOAM5318pwqXGlu20/fiFdRttqFcsvgaMfmw+oPc99iEq5o2eXaZ4Sqn 0yc9P1FX7FYRSJwrB5JvPU4EClRbANw= X-Google-Smtp-Source: ABdhPJwAr0ExBmNUgC3LLI/44SOv+TU5lJ0Pd+FTWMDYaYygPTcOv2CKLzCBK6NDjVK5tUlGOpxKgg== X-Received: by 2002:a17:906:e08f:: with SMTP id gh15mr34598137ejb.443.1600426684107; Fri, 18 Sep 2020 03:58:04 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:03 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 01/11] net: dsa: felix: use ocelot_field_{read, write} helpers consistently Date: Fri, 18 Sep 2020 13:57:43 +0300 Message-Id: <20200918105753.3473725-2-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Since these helpers for regmap fields are available, use them. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/felix_vsc9959.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 126a53a811f7..397d24c9f7c2 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -727,7 +727,7 @@ static int vsc9959_gcb_soft_rst_status(struct ocelot *ocelot) { int val; - regmap_field_read(ocelot->regfields[GCB_SOFT_RST_SWC_RST], &val); + ocelot_field_read(ocelot, GCB_SOFT_RST_SWC_RST, &val); return val; } @@ -742,7 +742,7 @@ static int vsc9959_reset(struct ocelot *ocelot) int val, err; /* soft-reset the switch core */ - regmap_field_write(ocelot->regfields[GCB_SOFT_RST_SWC_RST], 1); + ocelot_field_write(ocelot, GCB_SOFT_RST_SWC_RST, 1); err = readx_poll_timeout(vsc9959_gcb_soft_rst_status, ocelot, val, !val, VSC9959_GCB_RST_SLEEP, VSC9959_INIT_TIMEOUT); @@ -762,7 +762,7 @@ static int vsc9959_reset(struct ocelot *ocelot) } /* enable switch core */ - regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1); + ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1); return 0; } From patchwork Fri Sep 18 10:57:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8370BC43464 for ; Fri, 18 Sep 2020 10:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 206152311B for ; Fri, 18 Sep 2020 10:58:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZAKVH2xV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbgIRK6I (ORCPT ); Fri, 18 Sep 2020 06:58:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgIRK6G (ORCPT ); Fri, 18 Sep 2020 06:58:06 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924C0C061756 for ; Fri, 18 Sep 2020 03:58:06 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id p9so7510447ejf.6 for ; Fri, 18 Sep 2020 03:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F2NLpL00YCxqMeTeI3wXMbdxw7Wf1cHrmp8RVXPy5D0=; b=ZAKVH2xV+lrGtSTGpuzzCbLov+sV2b0ilMjOt5jpq635Eij3P1fzKrSKxl+rNdE0az bcWn2+oF84OXRtPtASLATT+uQTnnOtoSrZeBwCydJhRUD+/XjydgzjSvam+Ik3BH+RAG L1Ge6jX9jrShdfIN/u3ZnbQf4/p25V1W3/Exbv6MOi0S6/4TChQrVxuNYUAnXUiM+GgM XRQDkghfPClI3klJMgcL97oF8zl7fo8uQRf9glG+lBHw94ibfgpZHbrhapZF6bLJgR6C HSPcN/NiGc4OcpiTUtAG8OzlWBs0/wAHYA6gi02shWBx9wFUzgsNipFF51QxISwb+DfX rOVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F2NLpL00YCxqMeTeI3wXMbdxw7Wf1cHrmp8RVXPy5D0=; b=TF4JX8TKTUAyW+kC9SfKYmoqXZCyXEz67aI3yw/0x2inOXNTihFiYCDCe2x8ao7Kro dsYPdH95opLzr3BPkM9sWukDDGP2yTK3hVUMAd4xJQL/suPhJvBtawALps+dnBzA8fO7 nZYgMfejHHTQTau1a0xOeheRqNKD4LSWMrQ9k5JP5NeQ2e+hXJ5cgMdGXxPAtN677jDr 8Z/7hvk9+6eUOZL+bSLxuVYtI2gY4nqT2XGEYJ1Z/ZLfzNF/SNr3Vmr+9z1umAR433X9 wN4l+JWgSliQp2vhwvmHKRYyw2AzWWl+w8CuNSuyN0N/me8VQbQIOV15rzGER4jB6Npv roQA== X-Gm-Message-State: AOAM533IEllwAdnkouu41aXrXB+1yPMACCdTz4k+1/oT9LVXR8ayvwA/ 6UIym6DnUizpuIwppSWYA0I= X-Google-Smtp-Source: ABdhPJzZ7WWDsg0Z+3ZlMdh9mmOWtlbb3HoDy7ZXJeXDd+Jdy78ELZzE/PvZjbHK35JmyJjzYB0o+w== X-Received: by 2002:a17:906:1945:: with SMTP id b5mr19474432eje.102.1600426685251; Fri, 18 Sep 2020 03:58:05 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:04 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 02/11] net: dsa: seville: don't write to MEM_ENA twice Date: Fri, 18 Sep 2020 13:57:44 +0300 Message-Id: <20200918105753.3473725-3-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean There is another one of these right above the readx_poll_status. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/seville_vsc9953.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index 83a1ab9393e9..df5709326ce1 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -847,7 +847,6 @@ static int vsc9953_reset(struct ocelot *ocelot) } /* enable switch core */ - ocelot_field_write(ocelot, SYS_RESET_CFG_MEM_ENA, 1); ocelot_field_write(ocelot, SYS_RESET_CFG_CORE_ENA, 1); return 0; From patchwork Fri Sep 18 10:57:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA830C43464 for ; Fri, 18 Sep 2020 10:58:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 976C121D24 for ; Fri, 18 Sep 2020 10:58:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uNPHXwa5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726448AbgIRK6R (ORCPT ); Fri, 18 Sep 2020 06:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgIRK6K (ORCPT ); Fri, 18 Sep 2020 06:58:10 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 057ECC061756 for ; Fri, 18 Sep 2020 03:58:10 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id lo4so7494533ejb.8 for ; Fri, 18 Sep 2020 03:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mz0nf5lKPBUxgJuP35DRL+TsAjc1AJ4rawiw0Qy5rqs=; b=uNPHXwa5Y8zNSbTInqX3pl2dxFZLvpvLq59lWYTJ+6extUA/gqD+yu32d0YWTkrYsa QsDababULPd+5pdgau3C5CAQ+C8Cviixe3rKVx5bqgPjYYl+3oPvcn2OHMzgu/cCIHMf aPqUe7jNzEy1p7D/KAavBlfKd4z/IFTPQh3f2Q9qi/OsdDivmpmMbbHq3G091wEHO1H0 J92e0w1YKSqJ+C0fbRFfJcJmgSHtB6TdD0l07DEkMEmfO4r+bbzS3GNtKg6bqcaAuOoD AiJZHdqyonC4RmkJlpmN+PnQpSHmOxmc70k2kX0vH3aIv/UL670VviyT3HlpFCPkJcD5 ablw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mz0nf5lKPBUxgJuP35DRL+TsAjc1AJ4rawiw0Qy5rqs=; b=KPJYYMiXRMFOMt+B/IXpNow8XCgdk5upliwm9wNIkcPTGgV8Y3mia5EZivolaePHUT lSmhkR2LUBn2DoBRF9Rd94dAfCrZPI1H7zTHXT/cOtXQGCsNo1f/CUhe2Ql0JhsD/evD xO9uub0rWRyvDb0KlSsLI0xnXIEXOQkCxXg/RuPR9KjVwuRgMVBUxN4dhuC/Iqs1qcH0 2dkOvogQEHp8lZqCk8sr7ehmeX8+lF126KgHyImUulEq3WYSiraAdo4BUKrXvKN05xbB TZnMsj1F7D2NiDew+l8f1cNEDryYlcbgE9K1P/8+0t6hSvl/qfmzOr61wNU2BH0A8uNu uOMw== X-Gm-Message-State: AOAM531tEH/zAekSkdLHbz8aG3hH9Z17M6LBkbkUdBg4vTqgO2RmIhlO ypbIiQ7iqPNbOaMLjPK1YAg= X-Google-Smtp-Source: ABdhPJywwhQqPgEWWh36koONOO/qekAGBUnqXfg3+G+lHUpcAhISAUHBdjY1UXNBIyCgifNCH7zYlg== X-Received: by 2002:a17:906:b285:: with SMTP id q5mr35042891ejz.545.1600426688713; Fri, 18 Sep 2020 03:58:08 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:08 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 05/11] net: dsa: seville: remove unused defines for the mdio controller Date: Fri, 18 Sep 2020 13:57:47 +0300 Message-Id: <20200918105753.3473725-6-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Some definitions were likely copied from drivers/net/mdio/mdio-mscc-miim.c. They are not necessary, remove them. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/seville_vsc9953.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index dfc9a1b2a504..0b6ceec85891 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -16,23 +16,12 @@ #define VSC9953_VCAP_IS2_ENTRY_WIDTH 376 #define VSC9953_VCAP_PORT_CNT 10 -#define MSCC_MIIM_REG_STATUS 0x0 -#define MSCC_MIIM_STATUS_STAT_BUSY BIT(3) -#define MSCC_MIIM_REG_CMD 0x8 #define MSCC_MIIM_CMD_OPR_WRITE BIT(1) #define MSCC_MIIM_CMD_OPR_READ BIT(2) #define MSCC_MIIM_CMD_WRDATA_SHIFT 4 #define MSCC_MIIM_CMD_REGAD_SHIFT 20 #define MSCC_MIIM_CMD_PHYAD_SHIFT 25 #define MSCC_MIIM_CMD_VLD BIT(31) -#define MSCC_MIIM_REG_DATA 0xC -#define MSCC_MIIM_DATA_ERROR (BIT(16) | BIT(17)) - -#define MSCC_PHY_REG_PHY_CFG 0x0 -#define PHY_CFG_PHY_ENA (BIT(0) | BIT(1) | BIT(2) | BIT(3)) -#define PHY_CFG_PHY_COMMON_RESET BIT(4) -#define PHY_CFG_PHY_RESET (BIT(5) | BIT(6) | BIT(7) | BIT(8)) -#define MSCC_PHY_REG_PHY_STATUS 0x4 static const u32 vsc9953_ana_regmap[] = { REG(ANA_ADVLEARN, 0x00b500), From patchwork Fri Sep 18 10:57:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260640 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18792C43463 for ; Fri, 18 Sep 2020 10:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C879920789 for ; Fri, 18 Sep 2020 10:58:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r8x8rXHN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbgIRK6Y (ORCPT ); Fri, 18 Sep 2020 06:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgIRK6M (ORCPT ); Fri, 18 Sep 2020 06:58:12 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6499DC06174A for ; Fri, 18 Sep 2020 03:58:12 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id q13so7484576ejo.9 for ; Fri, 18 Sep 2020 03:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+p4t9Y7PHpqMJyTr22QTWbnKUgVOmdEqNEoqHpx2MqY=; b=r8x8rXHNjQkLAt4G8UPlmyBC+Me6L90K+GWfoFTGmXUntx+vmTZltDsozLTQ/LifwK D2W8Bb8iCv+dhpsJIsA4tudKimqWyW7TEFz2OGud4Pnb7juIzUlxsE6YnFBlQQesXQ6w 6ZIjrPQJqousWPPWCOUkHbsGoOnq2ySmeVP1Wclp8agFaEsMRPaW3OC2bANQqwhPrNxs ARt3Db9USxFYfH05GCajySAUVpb7fqpKur/pWppRXU28RRnwk1MDIF+KUfjXkmzDULRV JJX8ycL4I1MR9IAksCNCp8JKY6h3qXdTi0u9Hc6utOWIQjEDY9iSWlRmxhMQjDWs7UM3 u0NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+p4t9Y7PHpqMJyTr22QTWbnKUgVOmdEqNEoqHpx2MqY=; b=StZI77/RGAI6GSouxRobkMZ87Qe3SNYbIfx33LKASA9XyXYzEq/S6E4Gq5AXD9mUpU lqNQiaPMVWHCkCvxXabEd/PKXQ+CzZAS4ujU+X2E+bisvjnCpI9ICSihCP7r85nd1sir coRGbMjwTDlwt1S4F/NF5dtzkK0QKbDHrGQS/nJGNf8LxRWOAN0oAweJyd8W8H3gymoC s4LqeCMVhevYw890tp06R+XFl1bYqxUnDobZHV5aXa/fbdsfeiVCnh+iAmGrq6JT2aN2 gf9A4PYCem6Q/V+iN93ri2drR3cN/SE5UwTIiwyuVV2NI/XG7jUHMYp6hPG+92w9yHgv kCAg== X-Gm-Message-State: AOAM531RpgY4+2krSks4YTBjUL9w/0x3jXsuMh2WUvXh7MgfPDjQ34g5 RbCRUQvoxaxwj/vPkPjqXGI= X-Google-Smtp-Source: ABdhPJxf3JrZm7K7F4Vu3y8spsskPGOU4VmQQUWiKcUSd9APRZgs4HeS/76TCoS0z9xMLtEvfEIxXw== X-Received: by 2002:a17:907:3301:: with SMTP id ym1mr37305746ejb.367.1600426691096; Fri, 18 Sep 2020 03:58:11 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:10 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 07/11] net: dsa: felix: replace tabs with spaces Date: Fri, 18 Sep 2020 13:57:49 +0300 Message-Id: <20200918105753.3473725-8-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Over the time, some patches have introduced structures aligned with spaces, near structures aligned with tabs. Fix the inconsistencies. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/felix.c | 2 +- drivers/net/dsa/ocelot/felix.h | 2 +- drivers/net/dsa/ocelot/felix_vsc9959.c | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 64939ee14648..b523ea3a2e5f 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -803,7 +803,7 @@ const struct dsa_switch_ops felix_switch_ops = { .cls_flower_add = felix_cls_flower_add, .cls_flower_del = felix_cls_flower_del, .cls_flower_stats = felix_cls_flower_stats, - .port_setup_tc = felix_port_setup_tc, + .port_setup_tc = felix_port_setup_tc, }; static int __init felix_init(void) diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h index 9bceb994b7db..807f18b74847 100644 --- a/drivers/net/dsa/ocelot/felix.h +++ b/drivers/net/dsa/ocelot/felix.h @@ -20,7 +20,7 @@ struct felix_info { const struct ocelot_stat_layout *stats_layout; unsigned int num_stats; int num_ports; - int num_tx_queues; + int num_tx_queues; struct vcap_field *vcap_is2_keys; struct vcap_field *vcap_is2_actions; const struct vcap_props *vcap; diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 6f6e4ef299c3..4dbc3283f7ea 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -296,15 +296,15 @@ static const u32 vsc9959_sys_regmap[] = { }; static const u32 vsc9959_ptp_regmap[] = { - REG(PTP_PIN_CFG, 0x000000), - REG(PTP_PIN_TOD_SEC_MSB, 0x000004), - REG(PTP_PIN_TOD_SEC_LSB, 0x000008), - REG(PTP_PIN_TOD_NSEC, 0x00000c), - REG(PTP_PIN_WF_HIGH_PERIOD, 0x000014), - REG(PTP_PIN_WF_LOW_PERIOD, 0x000018), - REG(PTP_CFG_MISC, 0x0000a0), - REG(PTP_CLK_CFG_ADJ_CFG, 0x0000a4), - REG(PTP_CLK_CFG_ADJ_FREQ, 0x0000a8), + REG(PTP_PIN_CFG, 0x000000), + REG(PTP_PIN_TOD_SEC_MSB, 0x000004), + REG(PTP_PIN_TOD_SEC_LSB, 0x000008), + REG(PTP_PIN_TOD_NSEC, 0x00000c), + REG(PTP_PIN_WF_HIGH_PERIOD, 0x000014), + REG(PTP_PIN_WF_LOW_PERIOD, 0x000018), + REG(PTP_CFG_MISC, 0x0000a0), + REG(PTP_CLK_CFG_ADJ_CFG, 0x0000a4), + REG(PTP_CLK_CFG_ADJ_FREQ, 0x0000a8), }; static const u32 vsc9959_gcb_regmap[] = { @@ -1173,8 +1173,8 @@ static const struct felix_info felix_info_vsc9959 = { .mdio_bus_free = vsc9959_mdio_bus_free, .phylink_validate = vsc9959_phylink_validate, .prevalidate_phy_mode = vsc9959_prevalidate_phy_mode, - .port_setup_tc = vsc9959_port_setup_tc, - .port_sched_speed_set = vsc9959_sched_speed_set, + .port_setup_tc = vsc9959_port_setup_tc, + .port_sched_speed_set = vsc9959_sched_speed_set, .xmit_template_populate = vsc9959_xmit_template_populate, }; From patchwork Fri Sep 18 10:57:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9A82C43463 for ; Fri, 18 Sep 2020 10:58:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFEB720789 for ; Fri, 18 Sep 2020 10:58:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hytelxy/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgIRK6S (ORCPT ); Fri, 18 Sep 2020 06:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbgIRK6P (ORCPT ); Fri, 18 Sep 2020 06:58:15 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B63FC061756 for ; Fri, 18 Sep 2020 03:58:14 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id z22so7495321ejl.7 for ; Fri, 18 Sep 2020 03:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XCPXM1cG7U3MCbziuVA0nBNFMY+VjATKo3apGChd5y0=; b=hytelxy/JhJmBXB/v8bNNvLpLd5cdLPwTsYUaf60EobvPnavy0oWABY/OpVOjBcXmt tB8h0QYYzSX/40fLqaHKRykS0OmIqwRSBS89XAgJ+IfwkII6STLl41GK3xSifbUdeOXs 7uYYNEd50I7JBsVSRg1jLu1zF/EAsWyt0Fk/WPavXF1VzNxGKP60IAAMdrlmMkvj3P3E WXdzwn/i4jygkjh5l4tP+GvOfjKOAYpFB7bZ5EZ/0KXgQ5RuSB87lsTDy7FY+l5WKI0c trTnWPcz/l86hxknU0JzXWeSQR5EHfw6zewn9DhJBoP69IL5iUoX09pLlSpxUx9Yw88R mAPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XCPXM1cG7U3MCbziuVA0nBNFMY+VjATKo3apGChd5y0=; b=Tr/GkxNr/7Cgrh7I2I2wf0WjImLXMnkm0hlIfzYXPUyqOx1PttZx2TghyMAILULBRF aLd2V/ae2MLTJKbjbzsECwq6kHtUU1z0+UFseIgdnwkwIlD+qVc58YnB4vzJjoIR8EgR dx+Q2eDp3d7CnRuVFnWDEh/moVMIMwQwXUpBoroNVOnHTLikkf3agqwo8LcMjJK6DWx6 eSO0G9uBXG9fLSMsGYY7bE4GrYmnfrxO04mn/GTN5SgTo43kdlBQwLGAq++KYGXDyYqH msPGRH+jLV5RzVw0jp7oLCszzI7cb+X2x0xUwOjX4sUtNtyJbqdfVc+5uSGB74FKNtDL mIgA== X-Gm-Message-State: AOAM530KdVB4Vk2y8UKUvpvUed6OKlBWJWi5PQ8mfe2gG81XKc41K/Gc EBU8YiFsRZ2y+uJ3IhxoHiU= X-Google-Smtp-Source: ABdhPJzzwZOf7oAX7fOFTrO4P41AniYRIaqcD6YpyIOeZ2mx08H7kIlZDhqtyy64GwqTKf2JsKtaEg== X-Received: by 2002:a17:906:a101:: with SMTP id t1mr34576569ejy.203.1600426693280; Fri, 18 Sep 2020 03:58:13 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:12 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 09/11] net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_info Date: Fri, 18 Sep 2020 13:57:51 +0300 Message-Id: <20200918105753.3473725-10-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean It is a good measure to ensure correctness if the structures that are meant to remain constant are only processed by functions that thake constant arguments. Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot_ptp.c | 3 ++- include/soc/mscc/ocelot_ptp.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_ptp.c b/drivers/net/ethernet/mscc/ocelot_ptp.c index 1e08fe4daaef..a33ab315cc6b 100644 --- a/drivers/net/ethernet/mscc/ocelot_ptp.c +++ b/drivers/net/ethernet/mscc/ocelot_ptp.c @@ -300,7 +300,8 @@ int ocelot_ptp_enable(struct ptp_clock_info *ptp, } EXPORT_SYMBOL(ocelot_ptp_enable); -int ocelot_init_timestamp(struct ocelot *ocelot, struct ptp_clock_info *info) +int ocelot_init_timestamp(struct ocelot *ocelot, + const struct ptp_clock_info *info) { struct ptp_clock *ptp_clock; int i; diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h index 4a6b2f71b6b2..6a7388fa7cc5 100644 --- a/include/soc/mscc/ocelot_ptp.h +++ b/include/soc/mscc/ocelot_ptp.h @@ -53,6 +53,7 @@ int ocelot_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin, enum ptp_pin_function func, unsigned int chan); int ocelot_ptp_enable(struct ptp_clock_info *ptp, struct ptp_clock_request *rq, int on); -int ocelot_init_timestamp(struct ocelot *ocelot, struct ptp_clock_info *info); +int ocelot_init_timestamp(struct ocelot *ocelot, + const struct ptp_clock_info *info); int ocelot_deinit_timestamp(struct ocelot *ocelot); #endif From patchwork Fri Sep 18 10:57:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 260639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 614CBC43463 for ; Fri, 18 Sep 2020 10:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26F6121D24 for ; Fri, 18 Sep 2020 10:58:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JH1+12xy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbgIRK6a (ORCPT ); Fri, 18 Sep 2020 06:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726455AbgIRK6R (ORCPT ); Fri, 18 Sep 2020 06:58:17 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5DCBC06174A for ; Fri, 18 Sep 2020 03:58:16 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id i1so5704083edv.2 for ; Fri, 18 Sep 2020 03:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TQIQa0gS3WPmmxwptczUkgj44MFbqm0AWi5fXpLCy60=; b=JH1+12xyyf6hW+NsK6HFSMuJ9Jir+C8K4xXkmsq2n1YgKHKSTkAiJsxBCTnot3g2mY sWCKaX7IjMcjkOcaR0IKNRVmoNBZAayssfe4igValyPF1uQmNmSCe6PAb0ANpT4IiJkA Op/WvCB9Fler6UUyHW0uJkwa4lbP564gi9QJUZUQb8LJUfSmkwJ71ouJif0dNcxlg4UZ VtUi2tKxdkAuIPp1kkaitHG+7GCC2X5qq2/V4elKo4or1R3xC8yIjc9Vm7g41SwgKfFH ICztOvnLcPuYvqB+SCMZDWMWtXvRfPSoaJTTDffXPfF2Soul/h5NvFYsh03SyJGIqagd NzUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TQIQa0gS3WPmmxwptczUkgj44MFbqm0AWi5fXpLCy60=; b=KGDKJJB8qOWxPl41tTU23Zkbj4EAKNdHQTignXzzswCz6vTH4Ena8cE0Yba8o6uTlL jCkDUjpyvZ3C5ArLfTvT5chpDYz1TQffi6NJxJ1qWjyPSPEbI1xV66yBviibLFUTRwOA Ma5n3GXjfYLxv7clCuX5pIHqCvO+xXX6SCipj/ahFx+lKz9aP1UggiRn2HNMUGU1XVt7 Oa+PHKCXxwJXQDPl9APvdV7iDMh7PZRyzsc0OvrHq3uCMUbdBZMbfIUBFbobO5KYl3Zv PNo171LrJkCAbSNC5TqNadVCdTWsJadEplZq8lC/4mwcyLRwW5TtSceRHjpBp5kYEeml K6yA== X-Gm-Message-State: AOAM532MAa8ajOngzIdRJUJQVBUvkLkbFx4JGqycdbdMyI38iRojSjnf Lpj6JwsYSGRxyk/+XONEMyM= X-Google-Smtp-Source: ABdhPJwCBYeSgbzF0G1o8VtTm1Dty3V4jWLcf3pOBPEQ3XxZUmp2o00uki4a6EhgDhfgM4fIxWglyA== X-Received: by 2002:a05:6402:1515:: with SMTP id f21mr38914042edw.175.1600426695511; Fri, 18 Sep 2020 03:58:15 -0700 (PDT) Received: from localhost.localdomain ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id k1sm1995086eji.20.2020.09.18.03.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 03:58:15 -0700 (PDT) From: Vladimir Oltean To: davem@davemloft.net, netdev@vger.kernel.org Cc: yangbo.lu@nxp.com, xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org Subject: [PATCH net-next 11/11] net: dsa: seville: build as separate module Date: Fri, 18 Sep 2020 13:57:53 +0300 Message-Id: <20200918105753.3473725-12-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918105753.3473725-1-olteanv@gmail.com> References: <20200918105753.3473725-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean Seville does not need to depend on PCI or on the ENETC MDIO controller. There will also be other compile-time differences in the future. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/Kconfig | 22 ++++++++++++-------- drivers/net/dsa/ocelot/Makefile | 6 +++++- drivers/net/dsa/ocelot/felix.c | 26 ------------------------ drivers/net/dsa/ocelot/felix.h | 2 -- drivers/net/dsa/ocelot/felix_vsc9959.c | 6 +++++- drivers/net/dsa/ocelot/seville_vsc9953.c | 6 +++++- 6 files changed, 29 insertions(+), 39 deletions(-) diff --git a/drivers/net/dsa/ocelot/Kconfig b/drivers/net/dsa/ocelot/Kconfig index e19718d4a7d4..c110e82a7973 100644 --- a/drivers/net/dsa/ocelot/Kconfig +++ b/drivers/net/dsa/ocelot/Kconfig @@ -10,11 +10,17 @@ config NET_DSA_MSCC_FELIX select FSL_ENETC_MDIO select PCS_LYNX help - This driver supports network switches from the Vitesse / - Microsemi / Microchip Ocelot family of switching cores that are - connected to their host CPU via Ethernet. - The following switches are supported: - - VSC9959 (Felix): embedded as a PCIe function of the NXP LS1028A - ENETC integrated endpoint. - - VSC9953 (Seville): embedded as a platform device on the - NXP T1040 SoC. + This driver supports the VSC9959 (Felix) switch, which is embedded as + a PCIe function of the NXP LS1028A ENETC RCiEP. + +config NET_DSA_MSCC_SEVILLE + tristate "Ocelot / Seville Ethernet switch support" + depends on NET_DSA + depends on NET_VENDOR_MICROSEMI + depends on HAS_IOMEM + select MSCC_OCELOT_SWITCH_LIB + select NET_DSA_TAG_OCELOT + select PCS_LYNX + help + This driver supports the VSC9953 (Seville) switch, which is embedded + as a platform device on the NXP T1040 SoC. diff --git a/drivers/net/dsa/ocelot/Makefile b/drivers/net/dsa/ocelot/Makefile index ec57a5a12330..f6dd131e7491 100644 --- a/drivers/net/dsa/ocelot/Makefile +++ b/drivers/net/dsa/ocelot/Makefile @@ -1,7 +1,11 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_NET_DSA_MSCC_FELIX) += mscc_felix.o +obj-$(CONFIG_NET_DSA_MSCC_SEVILLE) += mscc_seville.o mscc_felix-objs := \ felix.o \ - felix_vsc9959.o \ + felix_vsc9959.o + +mscc_seville-objs := \ + felix.o \ seville_vsc9953.o diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index fb1b3e117c78..5f395d4119ac 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -788,29 +788,3 @@ const struct dsa_switch_ops felix_switch_ops = { .cls_flower_stats = felix_cls_flower_stats, .port_setup_tc = felix_port_setup_tc, }; - -static int __init felix_init(void) -{ - int err; - - err = pci_register_driver(&felix_vsc9959_pci_driver); - if (err) - return err; - - err = platform_driver_register(&seville_vsc9953_driver); - if (err) - return err; - - return 0; -} -module_init(felix_init); - -static void __exit felix_exit(void) -{ - pci_unregister_driver(&felix_vsc9959_pci_driver); - platform_driver_unregister(&seville_vsc9953_driver); -} -module_exit(felix_exit); - -MODULE_DESCRIPTION("Felix Switch driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h index d0b2043e0ccb..cc3ec83a600a 100644 --- a/drivers/net/dsa/ocelot/felix.h +++ b/drivers/net/dsa/ocelot/felix.h @@ -42,8 +42,6 @@ struct felix_info { }; extern const struct dsa_switch_ops felix_switch_ops; -extern struct pci_driver felix_vsc9959_pci_driver; -extern struct platform_driver seville_vsc9953_driver; /* DSA glue / front-end for struct ocelot */ struct felix { diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 38e0fba6bca8..79ddc4ba27a3 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1328,9 +1328,13 @@ static struct pci_device_id felix_ids[] = { }; MODULE_DEVICE_TABLE(pci, felix_ids); -struct pci_driver felix_vsc9959_pci_driver = { +static struct pci_driver felix_vsc9959_pci_driver = { .name = "mscc_felix", .id_table = felix_ids, .probe = felix_pci_probe, .remove = felix_pci_remove, }; +module_pci_driver(felix_vsc9959_pci_driver); + +MODULE_DESCRIPTION("Felix Switch driver"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index 23f66bb1ab4e..650f7c0e6e6a 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -1110,7 +1110,7 @@ static const struct of_device_id seville_of_match[] = { }; MODULE_DEVICE_TABLE(of, seville_of_match); -struct platform_driver seville_vsc9953_driver = { +static struct platform_driver seville_vsc9953_driver = { .probe = seville_probe, .remove = seville_remove, .driver = { @@ -1118,3 +1118,7 @@ struct platform_driver seville_vsc9953_driver = { .of_match_table = of_match_ptr(seville_of_match), }, }; +module_platform_driver(seville_vsc9953_driver); + +MODULE_DESCRIPTION("Seville Switch driver"); +MODULE_LICENSE("GPL v2");