From patchwork Tue Jun 22 14:41:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 12337735 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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,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 98F74C48BE5 for ; Tue, 22 Jun 2021 14:41:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DF7E60241 for ; Tue, 22 Jun 2021 14:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231899AbhFVOny (ORCPT ); Tue, 22 Jun 2021 10:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbhFVOnw (ORCPT ); Tue, 22 Jun 2021 10:43:52 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 939F4C061756 for ; Tue, 22 Jun 2021 07:41:36 -0700 (PDT) Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 332B3829DD; Tue, 22 Jun 2021 16:41:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1624372892; bh=RjyIwcg5fUhUIzD3eS6xz7N3932Q9h5VTjIC7gYpgdU=; h=From:To:Cc:Subject:Date:From; b=URAWQAhpk2P6CAnrYm4ST7Bt18IETl4mXe5WtaGjt0oNlTBqhZGve6ikEoacHSFuc 0DSIVcgmoNnJeFki+DqoI7cC2luTxzOr/U0845nyGW+H1UFhos1gY6P1qFzq1CJO4W +fK6PVOIIjTwGtg0qpeneg0mdAeQFbWQdn/eoqahfCQePyYG0BmsocdrKk9GfmKEhJ PUs4wJvreubkPnACbQFsIS5D9SS1soYZ6w3HmRK4S/c8QOlCsvBjDhCl8eEx1YInG1 bdf1nciG0reGZ38qONRpR26IHQubVfPT8I5HAWkqVee42xY6ka8+VGT3TOEBKGBO86 r8ZTf7pGHfDXQ== From: Lukasz Majewski To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , Nicolas Ferre , Joakim Zhang , Andrew Lunn , Florian Fainelli , Vladimir Oltean Cc: netdev@vger.kernel.org, Arnd Bergmann , Mark Einon , NXP Linux Team , linux-kernel@lists.infradead.org, Lukasz Majewski Subject: [RFC 0/3] net: imx: Provide support for L2 switch as switchdev accelerator Date: Tue, 22 Jun 2021 16:41:08 +0200 Message-Id: <20210622144111.19647-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC This patch series is a followup for the earlier effort [1] to bring support for L2 switch IP block on some NXP devices. This time it augment the fec driver, so the L2 switch is treated as a HW network accelerator. This is minimal, yet functional driver, which enables bridging between imx28 ENET-MAC ports. Links: [1] - https://lwn.net/ml/linux-kernel/20201125232459.378-1-lukma@denx.de/ Lukasz Majewski (3): ARM: dts: imx28: Add description for L2 switch on XEA board net: Provide switchdev driver for NXP's More Than IP L2 switch net: imx: Adjust fec_main.c to provide support for L2 switch arch/arm/boot/dts/imx28-xea.dts | 42 ++ drivers/net/ethernet/freescale/Kconfig | 1 + drivers/net/ethernet/freescale/Makefile | 1 + drivers/net/ethernet/freescale/fec.h | 36 ++ drivers/net/ethernet/freescale/fec_main.c | 139 +++++- drivers/net/ethernet/freescale/mtipsw/Kconfig | 11 + .../net/ethernet/freescale/mtipsw/Makefile | 3 + .../net/ethernet/freescale/mtipsw/fec_mtip.c | 438 ++++++++++++++++++ .../net/ethernet/freescale/mtipsw/fec_mtip.h | 213 +++++++++ 9 files changed, 860 insertions(+), 24 deletions(-) create mode 100644 drivers/net/ethernet/freescale/mtipsw/Kconfig create mode 100644 drivers/net/ethernet/freescale/mtipsw/Makefile create mode 100644 drivers/net/ethernet/freescale/mtipsw/fec_mtip.c create mode 100644 drivers/net/ethernet/freescale/mtipsw/fec_mtip.h