From patchwork Wed Nov 18 22:03:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 11915939 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 D5427C56201 for ; Wed, 18 Nov 2020 22:04:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80932246DD for ; Wed, 18 Nov 2020 22:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbgKRWEQ (ORCPT ); Wed, 18 Nov 2020 17:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726433AbgKRWEP (ORCPT ); Wed, 18 Nov 2020 17:04:15 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C3D1C061A4F for ; Wed, 18 Nov 2020 14:04:14 -0800 (PST) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfVYg-00058r-Du; Wed, 18 Nov 2020 23:04:10 +0100 Received: from mgr by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kfVYe-0000yX-9p; Wed, 18 Nov 2020 23:04:08 +0100 From: Michael Grzeschik To: netdev@vger.kernel.org Cc: andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net, kernel@pengutronix.de, matthias.schiffer@ew.tq-group.com, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com Subject: [PATCH 00/11] net: dsa: microchip: make ksz8795 driver more dynamic Date: Wed, 18 Nov 2020 23:03:46 +0100 Message-Id: <20201118220357.22292-1-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series changes the ksz8795 driver to use more dynamic variables instead of static defines. The purpose is to prepare the driver to be used with other microchip switches with a similar layout. Michael Grzeschik (11): net: dsa: microchip: ksz8795: remove unused last_port variable net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment net: dsa: microchip: ksz8795: move variable assignments from detect to init net: dsa: microchip: ksz8795: use reg_mib_cnt where possible net: dsa: microchip: ksz8795: use mib_cnt where possible net: dsa: microchip: ksz8795: use phy_port_cnt where possible net: dsa: microchip: remove superfluous num_ports asignment net: dsa: microchip: ksz8795: align port_cnt usage with other microchip drivers net: dsa: microchip: remove usage of mib_port_count net: dsa: microchip: ksz8795: dynamic allocate memory for flush_dyn_mac_table net: dsa: microchip: ksz8795: use num_vlans where possible drivers/net/dsa/microchip/ksz8795.c | 74 ++++++++++++------------- drivers/net/dsa/microchip/ksz8795_reg.h | 10 ---- drivers/net/dsa/microchip/ksz9477.c | 14 ++--- drivers/net/dsa/microchip/ksz_common.c | 4 +- drivers/net/dsa/microchip/ksz_common.h | 2 - 5 files changed, 43 insertions(+), 61 deletions(-)