From patchwork Fri Jul 2 10:40:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ashok Reddy Soma X-Patchwork-Id: 1499957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-xilinx-onmicrosoft-com header.b=UZpSrmPD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GGWnx65Ppz9sV8 for ; Fri, 2 Jul 2021 20:40:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 91C91814A4; Fri, 2 Jul 2021 12:40:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="UZpSrmPD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8BAFC814A4; Fri, 2 Jul 2021 12:40:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20628.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::628]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CF5C18074A for ; Fri, 2 Jul 2021 12:40:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ashokred@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NVpFIaZ8Rr/PvcOe8cvIHpviteeddKfMwcH+VokfDhiGWf0itv/7TOXvddbTGoNqMFHorptXT0d63byB1P82ISxFKd2ESYPmcV5MnXA+2cNf01sjwn9Pkx4ELE/IOZuZsUDhOQoh5fs7KUdMZPIuV1egeRv28O+rUQUyyDGXPyLoS6jzsZ6CiSt9FyTIvFYfS7yf5/gmZlU0HxBpvbp4OQcenZByBn7moKErZXou0q5cXEjJR740gfrz2Har4feJ0vls25L41z6UPd1IO3a2OWb69kjZzHF4HGPG4dt566tTNH6/cX/tNmj3HqHZez5u9kvM4XXQHIeEoq0VKk9/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fzxX3TTwdQvJio9y5eWyc5NX1hh1Y66SXa0GvAnD1pA=; b=A5GVntYqGeE4HOnq/f70+ceutGk8d+jZduAerCFhUFuBMHYi4HQS8Zt1bSaFd+uZIGAZk+xbIhbBHlJMF4p+WIBq3X7s69Es98YhziUNC1+rMKNtwpKhXK6RIHJX670264QDfo22AMgCPrWBBa7v+iXCRh8iQVClQde2W8aX2oeuvIWw5yZ4t9t7j3ITZIMKyaAvXZzl5zO8GAHZp3tMyodKelv01OLNd2n4dyAKBv7vp4UKc/r5NTi6XdbZ+/4hCzvEx3NvzyftVltkORQZ0qVJkAWWTfJaxj4UcwpRc138q4hVAKndVPw5d9uWD1KlJJWe7Moo2x+K0HldbYHrcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=broadcom.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fzxX3TTwdQvJio9y5eWyc5NX1hh1Y66SXa0GvAnD1pA=; b=UZpSrmPDrCrX+2VtDYiANr2U7PZkZyl/U2ZzbxusLLrXG/ui2snDonl8IFNZoCf28wFJ2eO2Dg+Yll8X0ZmnvEe+LbDN2rHK3Pme6ScyMuUbRY1t1T3U/bGtvV/bs7iQx5bnbPx4ZLe7EexpRC0VbfOl7zI3WG88TxkfWcVV6Z4= Received: from DS7PR03CA0245.namprd03.prod.outlook.com (2603:10b6:5:3b3::10) by MW4PR02MB7202.namprd02.prod.outlook.com (2603:10b6:303:7b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Fri, 2 Jul 2021 10:40:41 +0000 Received: from DM3NAM02FT030.eop-nam02.prod.protection.outlook.com (2603:10b6:5:3b3:cafe::c3) by DS7PR03CA0245.outlook.office365.com (2603:10b6:5:3b3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Fri, 2 Jul 2021 10:40:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT030.mail.protection.outlook.com (10.13.4.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4287.22 via Frontend Transport; Fri, 2 Jul 2021 10:40:40 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 2 Jul 2021 03:40:39 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Fri, 2 Jul 2021 03:40:39 -0700 Envelope-to: git@xilinx.com, rayagonda.kokatanur@broadcom.com, sjg@chromium.org, alex.nemirovsky@cortina-access.com, anastasiia_lukianenko@epam.com, rfried.dev@gmail.com, seanga2@gmail.com, somaashokreddy@gmail.com, xypron.glpk@gmx.de, u-boot@lists.denx.de, weijie.gao@mediatek.com, monstr@monstr.eu, joe.hershberger@ni.com, stefan_b@posteo.net, robert.marko@sartura.hr Received: from [10.140.6.65] (port=55080 helo=xhdashokred41.localdomain) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lzGb8-0003Gp-9E; Fri, 02 Jul 2021 03:40:38 -0700 Received: by xhdashokred41.localdomain (Postfix, from userid 2896) id 810B110026D; Fri, 2 Jul 2021 04:40:37 -0600 (MDT) From: Ashok Reddy Soma To: CC: , , , , , , , , , , , , , , "Ashok Reddy Soma" Subject: [PATCH v3 0/3] Add MRMAC driver support Date: Fri, 2 Jul 2021 04:40:32 -0600 Message-ID: <20210702104035.18845-1-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0da0d0a2-ea8b-4506-6de9-08d93d45d65d X-MS-TrafficTypeDiagnostic: MW4PR02MB7202: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lmuM1/cw1SzzoNYmeq3qk6RSwe+y0r0yUV5mBPRXtD89PUZB2GA0h54YNmDB7LuoMitsLMiAtWBU4XtHZD/ooth5l5W0p8cnZA6TrDJeOWFZWiF49nOzkoPgRkseil7H84SPR9IFADOY+xGWn5+bPD9ZCDUCzI+Evg+a4X2snVYUrTzMMyzRS9XOzD5LnbvrJt7PvQ9utNNApchoz4a1cncW4V4PS+tI/HAkDQFU1grwSiWSmt1g582PqT8nAWcP2+6+LjjWH1K51AAf1/AQ6lKDw2IKZmQbYuyG27h0bWVMPflycNWiR1PlaHdFuB49HGlckqqOCgGCWNPg5WMrhmN88h0fnqkSE0zAuejTu5QEK2goKtLpoQe6miNQlDBElk8cXmOU7cvSgkIvytpCTyEwZC7MjNQ2JKr/j0rQnWjAtSukSwO3nqvoKe0JLt6r0GX/ESfpqa8krteELUzn0UpT1ciJMHfD3IZHycxDfDMKZut1jEoiqUzElwZ75eXubE4GqV85PJthA4fVPE8014khKg5lz0pVR4MBrRIaEnv1d9zLWv7P3ZLUEd4S4TXQ6ZLtC9JdRq+RcmfEstRlDZSAQehHYzELzBdMgMA8nif5goZML99WWaCiCYjkMkhYvzqSx0/O7zjaCAldTJCUmZNi2kGbr0KFXiIXKN4KljOwxfsUqNk3H6+MkaIvWwoqIMriTty+l31uLkHl46UZrA== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(396003)(39860400002)(346002)(376002)(136003)(46966006)(36840700001)(5660300002)(42186006)(36906005)(54906003)(316002)(70586007)(107886003)(6666004)(1076003)(70206006)(82310400003)(2616005)(4326008)(478600001)(336012)(8676002)(83380400001)(82740400003)(36860700001)(186003)(36756003)(2906002)(8936002)(7636003)(103116003)(26005)(47076005)(7416002)(356005)(6266002)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2021 10:40:40.7231 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0da0d0a2-ea8b-4506-6de9-08d93d45d65d X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT030.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR02MB7202 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This patch set adds Xilinx AXI Multirate MAC(MRMAC) driver support. This MRMAC is a high performance, low latency, adaptable Ethernet integrated hard IP. This can be configured up to four ports with MAC rates from 10GE to 100GE. Supported Configuration Combinations: 1 × 100GE 2 × 50GE 1 × 40GE 4 × 25GE 4 × 10GE Currently added support and tested below configurations in the driver: 4 × 25GE 4 × 10GE Changes in v3: - In V2 by mistake changed return type of isrxready() of xilinx_axi_emac driver instead of xilinx_axi_mrmac driver. Fixed it in V3. Changes in v2: - Changed all static allocations to dynamic and freed them. - Used setbits_le32 and clrbits_le32 wherever applicable - All return's are changed to proper error codes instead of 1 or -1 - Changed return type of isrxready() from int to bool - Changed all printf's to log_warning, and debug to log_debug - Added function headers with desciption - Changed all capital hex numbers to small hex numbers Ashok Reddy Soma (3): net: ethtool: Add ethernet speed macros for higher speeds net: xilinx: axi_mrmac: Add MRMAC driver xilinx: versal: Enable Xilinx AXI MRMAC MAINTAINERS | 1 + configs/xilinx_versal_virt_defconfig | 1 + drivers/net/Kconfig | 9 + drivers/net/Makefile | 1 + drivers/net/xilinx_axi_mrmac.c | 564 +++++++++++++++++++++++++++ drivers/net/xilinx_axi_mrmac.h | 203 ++++++++++ include/linux/ethtool.h | 8 + 7 files changed, 787 insertions(+) create mode 100644 drivers/net/xilinx_axi_mrmac.c create mode 100644 drivers/net/xilinx_axi_mrmac.h