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 DAFBDC00140 for ; Mon, 8 Aug 2022 07:36:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5F0528496C; Mon, 8 Aug 2022 09:36:40 +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="iPMj5lcX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 56629848CA; Mon, 8 Aug 2022 09:36:39 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062.outbound.protection.outlook.com [40.107.220.62]) (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 33DA5849B3 for ; Mon, 8 Aug 2022 09:36:36 +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=Km2mI/a4otFgOgm/H1H3kijeGjGDn91yiJxHZVgM5+COLNI9l+w0eMUQffeRU+C+9+aftxZ1DoQD0cXhN1l5J9EOXbuFNi5u8GTU7baKA2dhyCyu1IO9KscEWQwWUxeSpE1QwqpJ2aEAkvmGdwsEEs2DxZxbYSD+F9wun95axLy+vBoFTVEooFf/2YBJBtQautZLJTL/sjRRsexoDecxSRtzvjtYZXiGxjonjaiXHROOmCsuPGIG0ZIk+FJAwbGtCsyXRxCLxhbVQolUgyo3jbf3a4LGi1LQgRqFf6jdimB0wwHIyHkPwf9wJiHYzrsG2S3NsbNRJhFwAAnaRGHalw== 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=L4ATRzGYMgNFvW5GRZKB4oQyPYThbX36fQjitTNa95w=; b=dYTh7YeYy+ce49vRE1Y+j8Xl9ohEYlqm9vo1jkxGj0hDeyKNgseQZfoaY3HcxtDAqcDY02ljZ6KVEVHhyJwYJ4KUzSbYhX7AId7RVR7Qie4254BmDZGGxeolk3aulkC2xSxgmpaHOS4xnGMC0DqckCAGUQD2iV+l75uIkledotfoswwion6WN4CWSDBDlgkm8xUrEQUxQQnlXFGqYGS1JEK/FP2J2vN0thiDhi72upMChUZQcWDJ2rJkxvId2B5xmfbhyDL6v3N1NW1iinlg/N2dMV+LU1GlNWRtVeGP/LOR5QtTfH+Dp+NNIbvCGVhABHj9yxJcJBWiJK9C72Tj/g== 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=L4ATRzGYMgNFvW5GRZKB4oQyPYThbX36fQjitTNa95w=; b=iPMj5lcX5jXR6lJeV2L+bu0xI8HrVxtlF1xlZRD00JwJ9MpuSGaivVXsp0AV1JazvwwiVCFcYJcp2gnVAL4kcBUCdt8Pbj9e8jPtHYf5dvgZBU1aOK2sgt6oBrNXAWbrLvpNiarGn7Y5hBDQxfkO9R1HzVZgBFFnUI+hGfVrvWA= Received: from DM6PR13CA0027.namprd13.prod.outlook.com (2603:10b6:5:bc::40) by CY4PR12MB1719.namprd12.prod.outlook.com (2603:10b6:903:125::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Mon, 8 Aug 2022 07:36:32 +0000 Received: from DM6NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:5:bc:cafe::2e) by DM6PR13CA0027.outlook.office365.com (2603:10b6:5:bc::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.8 via Frontend Transport; Mon, 8 Aug 2022 07:36:32 +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 DM6NAM11FT003.mail.protection.outlook.com (10.13.173.162) 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:36:31 +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:36:25 -0500 Message-ID: <42d81d97-f5ed-ff3d-928c-cead2de207d7@amd.com> Date: Mon, 8 Aug 2022 09:35:59 +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 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> From: Michal Simek In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: 8dbda908-92ee-4a31-b5c5-08da7910b6d8 X-MS-TrafficTypeDiagnostic: CY4PR12MB1719:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AFJqAcNvqx50sugUHTuBpFW4MJFtQbN5GhFjBvuRzBLgc7GROmsjcsSESwO9gCc9n4EOMd+6c4CZRcJV3VLcwg5M2UwLoiteeTg/AnVW/PpTg+z5+/xjwlZ65guyJBRs01eyCplGpqgz5jY3fzTse/Vz/vMcFJSm6pQAwT7K8wWdXctgUOyv58EMHcQffnMZ3TGR+Ed4JYTukfBfjUJ4on42TIXg042TThEjWQbuRoI9N0qRCjv/A5+VmJIfTtS+Sz+PsAQbr5+4Huj5aLgiPayy1jC9D6SRjjGC9i6Tz6JQ0vf3bb9WkL4OVxWaGQA8OF7Z3b7hmDj4RzYjVdngc4FH/s1u3Y9EJ80tPwD0Zqshy0BWrpX7GiowEuk8Smpv42WeHZ5C4uActWnjFpSln4bkLsBwuk2rP4SFwF2mDM6D0UaNbR1UAM6bS3zlSCn/9eABpkFmjHHzqnLvclpCslwlI1ze1VRJULjgI5ZUiDzeKlk/7UFUd3oM7MvihPb4nbpF3aY04cxDm6Pknc9ewaLBkz+GcyEdt2A8oymFlJRv0U5J/keaZp8zDB9E3KRfNVR5db/p43c1iD3qAkEitvW9YhX0/arScdpGpJqk+N/a29U8csoG3hOfB4fg6GNsEhYmHinYinx0KFyuAPE+TtGh8+I2mfPaQ9+mPi1ebj1gG1Bg6QLXHwL6kQa/ByYpduiRrq47nu7ImAglw9ypiScRYclEbBW4EcCnXM2DQZiFuUQydORWUUWbiYTKkkM0o7cfECMTcy2YDXoGCv0+I/HXsNdUg9yj947w6r+gG3NxX+mb9VzMLuIuQZdIQRr28EVlLmqnBNnodaOPCpLyQlXSvllRV0ozXt/ryV/tgtz1K8mFSotIzqN/XIOL9YDJ 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)(396003)(376002)(39860400002)(346002)(136003)(40470700004)(36840700001)(46966006)(478600001)(16576012)(316002)(110136005)(40460700003)(2906002)(70206006)(40480700001)(82310400005)(2616005)(70586007)(4326008)(8676002)(5660300002)(8936002)(44832011)(36860700001)(81166007)(356005)(86362001)(31696002)(82740400003)(31686004)(53546011)(6666004)(41300700001)(26005)(336012)(47076005)(426003)(36756003)(16526019)(186003)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2022 07:36:31.9346 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dbda908-92ee-4a31-b5c5-08da7910b6d8 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: DM6NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1719 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 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. Thanks, Michal