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 35EB7C00140 for ; Mon, 8 Aug 2022 07:44:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4320283F93; Mon, 8 Aug 2022 09:44:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.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=amd.com header.i=@amd.com header.b="ZM6IPq8A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19ED882A4B; Mon, 8 Aug 2022 09:44:42 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.61]) (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 92106849B3 for ; Mon, 8 Aug 2022 09:44:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lt26WXrJM3iCAQGL74OwMl79AOtQC/nZknEfB1jpDz4FxxhLPR7SiFnq4z2PUN/UpdWd/2WrAJTcjfNr81Tj13BsAmxdHoeyA6vW8aenJ31fQXJgjLLhZHcykqLzjF+fPFjaFa5I/orz+FANmjOJ0TNHtsm3UEpz4eiQiHCSLwkoUAoZ60n7RSHdD/5NPP/2qaKUUAMwgmlL+HXXrkvfdiRXfVS+7M7sw5/C9oUs5s3J747kRCicwsZh1h8dxSx6UQO8w6wySO86iolF6WW9JkMlezNaO8GfSq5sIrot74SxiLbzM2N3XHpYcvBxVwv9Ob77dX2ODf+mxd3ImXs9wA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1yKPQaC4Ghpz8YTrj7jXPLNK+AeTX+bYsiAyEavMV9c=; b=fqsEXdlT+G2c3LqIieFgnjtnbz1V7B3ROqBC19n1FVEp4utp61WW8IRf0WPcF8r0UIMJT72xjJruhNrksoxzA2weWit1AZoAY59mtnfZPv6YurIsM5BbI4QOGhy9mP9ryyCZ2YumFFkZDEe8cmfULUGuW7hzBdBuQVaIVexARSKHAKSbGuDZiLjdudIs55Qke1TVqeRVo/NHqv4MkRwaD+UsAOnZ5ltYEJ3+HnFlWmdxFOX8d4C9rdaZKKvpcJ/zZbDdmj5Rc5Z1/6iZ1JOqE1wqdDPqKBSOypdB2H2r8WPQ8cLch6W79cxwrRxUUH6vxFm4UTCYxUgyPWDFaB3OQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1yKPQaC4Ghpz8YTrj7jXPLNK+AeTX+bYsiAyEavMV9c=; b=ZM6IPq8A1lftvFGtl6WsjDkycY8ULk+u2drZzyf3uG0VuPLL2Hdx1P4mnty2XEdEAYrTGDaQnpoPYhfWgQcfTP370aIWRKVNyuB9Da6JgyRiavT916whdZoQ5rMn1wbcf4S7t88xUyau0iROrD/DTg4vzhnbr2s0CPfgr0Lpa1E= Received: from BN9P222CA0019.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::24) by MWHPR1201MB0045.namprd12.prod.outlook.com (2603:10b6:301:5a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 07:44:33 +0000 Received: from BN8NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10c:cafe::1f) by BN9P222CA0019.outlook.office365.com (2603:10b6:408:10c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15 via Frontend Transport; Mon, 8 Aug 2022 07:44:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT027.mail.protection.outlook.com (10.13.177.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5504.14 via Frontend Transport; Mon, 8 Aug 2022 07:44:33 +0000 Received: from [10.254.241.52] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 8 Aug 2022 02:44:26 -0500 Message-ID: Date: Mon, 8 Aug 2022 09:44:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/3] net: emaclite: fix broken build Content-Language: en-US From: Michal Simek To: Ramon Fried , Samuel Obuch CC: U-Boot Mailing List References: <20220713135204.233268-1-samuel.obuch@codasip.com> <20220713135204.233268-2-samuel.obuch@codasip.com> <42d81d97-f5ed-ff3d-928c-cead2de207d7@amd.com> In-Reply-To: <42d81d97-f5ed-ff3d-928c-cead2de207d7@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 645ae3cd-a231-4a85-b039-08da7911d5a0 X-MS-TrafficTypeDiagnostic: MWHPR1201MB0045:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nt60WnS33EvfHNsl9rmwgzHT0ku7Bn0pubYL9Jzq0LmoHtLmmGxe7IyJkeD29vZd1N0EBbBOtssUvUhDZ2O2snWljPtV5SuOtyILEqockk8+qorQGdWfwUOA5D+MvDFWphGfP7vgtRI/GkZyYxzzvYw15UNKC1y5dN6L1tFpCbmLqChWXiomwqvW2rZNaqXkGRyeph7o20Su3y6i12Px0UwN/dg5f7bauah6Fjlh6fJ/99kLy/Vq8VFgJ5b8RkS/myH9QzqhguxzE0R8nvbsf2Xef2qMJnfurFItFzqVQ8txbJ2oKz7eCKO6+bb4KXlKet5UirFKjWrlakfaGr0cQ/bXs75G/SXqswDAawhamxBkZ+YrlVB9QS+YS9t1F8WnOhialDK+Dgx+D7b7Xdkbjrb+7/d6tMagLOAFULbBzQuNIRrQDnhMceahQi8eSuLBEv14TgHDl7X8GH96ibImKUA9bXry+jiBobFe1vC3EkIsgD3VltSeHBPSo+TYRsUi/j5NZ/7Iw/UqsvCpnvKAAUxucKtLk2ZurCJvX6mmRuQFVDNN/1iaq1VQyXCQ/Oodog+cTFPo/PN5pubEameS9Sv/E1Ji9kKPk3NAdbgSQdvYacR83j6x1BOU9+5nVqRju3eFOOlZCG6bqdgBy4RIo0smv+dPLs0jE2pDzyVVwV4hFFc/9jjioypXlkl8tyxxNkRGoQkUaIgaX9oWvNyHwpQpGF5VotGO/MQgItuDCHoIUObSP38kpPpKo53h9keIHVZoG/+9fPG+B0x70Mb3WzxugYRd5cI9w2vytx0sPyLnAAwKqbvWR1x0OhHpV8rH4HYQHBWGcPe1tOopXbEEpm6rk8R+/8ESI1+8xMu6taQC+8kTWn8CYFu2Ce/VZZnT X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(346002)(396003)(136003)(376002)(36840700001)(40470700004)(46966006)(70586007)(70206006)(36860700001)(8936002)(44832011)(8676002)(4326008)(82740400003)(16526019)(5660300002)(356005)(47076005)(478600001)(81166007)(16576012)(426003)(186003)(336012)(2616005)(6666004)(41300700001)(53546011)(2906002)(26005)(316002)(40460700003)(36756003)(110136005)(83380400001)(82310400005)(31696002)(86362001)(40480700001)(31686004)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2022 07:44:33.1048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 645ae3cd-a231-4a85-b039-08da7911d5a0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0045 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.6 at phobos.denx.de X-Virus-Status: Clean Hi, On 8/8/22 09:35, Michal Simek wrote: > > > On 8/6/22 19:31, Ramon Fried wrote: >> On Wed, Jul 13, 2022 at 5:02 PM Samuel Obuch wrote: >>> >>> Function ioremap_nocache seems to be defined only for mips and microblaze >>> architectures. Therefore, the function call in the emaclite driver causes >>> this driver to be unusable with other architectures, for example riscv. >>> >>> Signed-off-by: Samuel Obuch >>> --- >>>   drivers/net/xilinx_emaclite.c | 4 ++++ >>>   1 file changed, 4 insertions(+) >>> >>> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c >>> index 6c9f1f7c27..5cd88e04fe 100644 >>> --- a/drivers/net/xilinx_emaclite.c >>> +++ b/drivers/net/xilinx_emaclite.c >>> @@ -615,8 +615,12 @@ static int emaclite_of_to_plat(struct udevice *dev) >>>          int offset = 0; >>> >>>          pdata->iobase = dev_read_addr(dev); >>> +#if defined(CONFIG_MICROBLAZE) || defined(CONFIG_MIPS) >>>          emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase, >>>                                                                   0x10000); >>> +#else >>> +       emaclite->regs = (struct emaclite_regs *)pdata->iobase; >>> +#endif >>> >>>          emaclite->phyaddr = -1; >>> >>> -- >>> 2.31.1 >>> >> Hm... >> Well, this isn't right,The right solution is to replace >> ioremap_nocache() with ioremap(). >> This way it will work both for MIPS and other architectures. >> I can do it myself, you can fix your patch. let me know. > > Microblaze doesn't define it now. But I agree that using ioremap which has > implicit nocache is the right way to go. > It means please create the first patch which creates ioremap for microblaze, > Then second to replace ioremap_nocache() in emaclite driver to ioremap. And > third to remove ioremap_nocache from microblaze io.h. I did closer look when I looked at other patches. You should switch to linux/io.h which automatically create ioremap if not defined by architecture. And ioremap_nocache for microblaze can be removed later. diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 48aee77ab509..3299eefd999f 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include M