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 X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 67311C48BE5 for ; Thu, 17 Jun 2021 07:18:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4E1BB61241 for ; Thu, 17 Jun 2021 07:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E1BB61241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6870881E53; Thu, 17 Jun 2021 09:18:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E39F2Qth"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 172D081E77; Thu, 17 Jun 2021 09:18:15 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CFE39804E7 for ; Thu, 17 Jun 2021 09:18:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ivo.g.dimitrov.75@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id r7so2499051edv.12 for ; Thu, 17 Jun 2021 00:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TzCVQWok0ub3E5+cSRMGpYM6NIP23n/Xz+VinGugpd4=; b=E39F2Qth+UrBoPCxlXGUsNJe91qEOGjTbAccnFvgVkgrqAxOAxJY7zJjr2DlP+57yS y8uKEU58XAm7V9CWc3HVrulN3WcaXGbGUn1e8gADaaaMDl7QDe3++O88hraybFi9Pv+x ixctP8WqlqjRFiRCxv2v+j1TTXDkgNrQIOYua8ZNzGY6PSRF47ODrqfaZaolFCpGxr2A zATnnqkK5X5vHYz/Tyzb0WQK10OC3w2cw9/leD2oFw6foyySBymP2DA01aH4pNfgfM9m AH2pwyKdhUF/2jxd1PSod3+TPrRZM1yxmJu4e/m9UTVrztUT63ko2/t3sUWWS00Z4vGf Dy2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TzCVQWok0ub3E5+cSRMGpYM6NIP23n/Xz+VinGugpd4=; b=ahCncfaiJm6CafcDm7BR6zyK3nf8FuEFaYBMlb2EE/Y28LlesLrxR5bU5byoU6Zuy5 Z9vFYSXmxFacXu3djjcYCGCOl0hFRaUMMgga5GBsNEYhh1dqJzaw91D2jFMjAHAUdwhg uCabaBxqDLyyr39VkU+aV9L6JKLRz9LrYoW8GTyjhG936QvuL1m4wToFSCGjwZyokEQO EyqgwKKvggn2k/g9wEoPlr0khzKL8K44R7PspXU29NCWF6NTkI0fW4Z8U/xbDh19vh28 BBpEuDw9xhThMXxcLLjuEaTzUaWUOWqSZSte4QfYXvrydYhUYHJKRAph8ZJ6S382XCAD sM8Q== X-Gm-Message-State: AOAM532eEER3Pw+EPJX+4Ch4SgeTvkvAbMGw9YAJ1llaw3rtocPGFUTU NUuvfqQp7EoOyVry9JGvtVw= X-Google-Smtp-Source: ABdhPJwXqoNA/Ah4Ot7i277MHkw3Ls5vwDX81fW2TMO+Pn4OvDSPWCqUatiT6AgoHKDhIt8Ogshtkw== X-Received: by 2002:a05:6402:1a:: with SMTP id d26mr4704832edu.105.1623914290458; Thu, 17 Jun 2021 00:18:10 -0700 (PDT) Received: from [192.168.1.10] ([46.249.74.23]) by smtp.googlemail.com with ESMTPSA id au11sm3179225ejc.88.2021.06.17.00.18.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jun 2021 00:18:09 -0700 (PDT) Subject: Re: [maemo-leste] [PATCH] arm: Remove nokia_rx51 board To: Tom Rini Cc: =?UTF-8?Q?Pali_Roh=c3=a1r?= , maemo-leste@lists.dyne.org, u-boot@lists.denx.de, Merlijn Wajer References: <20210521144418.GI17669@bill-the-cat> <20210521213645.2y5dawkvr6wfaymy@pali> <20210615123436.GH9516@bill-the-cat> <5848e9c9-4dab-00cc-07dc-ffa57b9417cd@gmail.com> <20210616121008.GR9516@bill-the-cat> <20210616121313.GS9516@bill-the-cat> <20210616173702.GW9516@bill-the-cat> <20210616211213.GZ9516@bill-the-cat> From: Ivaylo Dimitrov Message-ID: <6b4732f2-0733-7bbe-f7a1-95b39deba5cb@gmail.com> Date: Thu, 17 Jun 2021 10:18:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20210616211213.GZ9516@bill-the-cat> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit 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 On 17.06.21 г. 0:12 ч., Tom Rini wrote: > On Thu, Jun 17, 2021 at 12:03:15AM +0300, Ivaylo Dimitrov wrote: >> Hi Tom, >> >> On 16.06.21 г. 20:37 ч., Tom Rini wrote: >>> On Wed, Jun 16, 2021 at 08:25:28PM +0300, Ivaylo Dimitrov wrote: >>>> Hi, >>>> >>>> On 16.06.21 г. 15:13 ч., Tom Rini wrote: >>>>> On Wed, Jun 16, 2021 at 08:10:08AM -0400, Tom Rini wrote: >>>>>> On Wed, Jun 16, 2021 at 09:02:16AM +0300, Ivaylo Dimitrov wrote: >>>>>>> Hi, >>>>>>> >>>>>>> On 15.06.21 г. 15:34 ч., Tom Rini wrote: >>>>>>>> On Tue, Jun 15, 2021 at 08:40:30AM +0300, Ivaylo Dimitrov wrote: >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> On 22.05.21 г. 0:36 ч., Pali Rohár wrote: >>>>>>>>>> On Friday 21 May 2021 10:44:18 Tom Rini wrote: >>>>>>>>>>> On Wed, May 19, 2021 at 11:52:03AM -0400, Tom Rini wrote: >>>>>>>>>>>> On Wed, May 19, 2021 at 03:27:48PM +0200, Pali Rohár wrote: >>>>>>>>>>>> >>>>>>>>>>>>> On Tuesday 18 May 2021 21:26:40 Tom Rini wrote: >>>>>>>>>>>>>> This board has not been converted to CONFIG_DM_USB by the deadline. >>>>>>>>>>>>>> Remove it. >>>>>>>>>>>>> >>>>>>>>>>>>> I'm very disappointed that you want to remove Nokia N900 from U-Boot. >>>>>>>>>>>>> >>>>>>>>>>>>> I was waiting waiting half of year because other developers did not >>>>>>>>>>>>> react to issues which were introduced and neither to patches which I >>>>>>>>>>>>> sent (+ trying to remind open issues). And also I was waiting another >>>>>>>>>>>>> half of year until other N900 related patches were merged. So the whole >>>>>>>>>>>>> slowdown was not caused by me, why it is taking so long. >>>>>>>>>>>>> >>>>>>>>>>>>> Now there is still one N900 DM related patch waiting for review. I'm >>>>>>>>>>>>> converting code step by step. >>>>>>>>>>>>> >>>>>>>>>>>>> So the ball is not on my side. >>>>>>>>>>>> >>>>>>>>>>>> So, what patch(es) need to be applied to get DM_USB enabled? Thanks. >>>>>>>>>>> >>>>>>>>>>> I don't see any open patches from you that look related to enabling >>>>>>>>>>> DM_USB on the platform. If you want to disable USB on the platform for >>>>>>>>>>> now instead, that's fine too. >>>>>>>>>> >>>>>>>>> >>>>>>>>> I tried to migrate the latest master to DM_USB, but unfortunately the >>>>>>>>> results are pretty much sad - adding OF_CONTROL (which is a prerequisite to >>>>>>>>> have DM_USB IIUC) and OF_BOARD (so binary to be compiled), adds ~100k to the >>>>>>>>> size of the u-boot binary, so it becomes 370284 bytes. Given that we have >>>>>>>>> less than 256k of storage space for the u-boot, the produced binary cannot >>>>>>>>> be used on n900 the same way current (no DM_USB) binary is used. >>>>>>>>> >>>>>>>>> As I see it, there are not much options left - u-boot on N900 is not SPL, so >>>>>>>>> we can't use OF_PLATDATA, which in turn always links libfdt. >>>>>>>>> Also, if I read the code (usb-uclass.c) correctly, enabling DM_USB requires >>>>>>>>> the board to be converted to DT and this is way bigger change. >>>>>>>>> >>>>>>>>> Please advice on how to proceed. >>>>>>>> >>>>>>>> Please post your WIP patches, thanks. >>>>>>>> >>>>>>> >>>>>>> Sorry, I am not sure I understand what patches you want me to post: >>>>>>> >>>>>>> WDT patch has already been sent couple of months ago - >>>>>>> https://lists.denx.de/pipermail/u-boot/2021-March/443868.html >>>>>>> Do you want it to be rebased and resend? >>>>>>> >>>>>>> DM_USB, I just started writing one and I immediately hit the OF_CONTROL >>>>>>> requirement. Enabling OF_CONTROL requires a full blown migration to DT, >>>>>>> which is a huge task and not really equal to "Please update the board to use >>>>>>> CONFIG_DM_USB...". Without OF_CONTROL, I simply get link failures: >>>>>>> >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> DWARF error: could not find abbrev number 3998 >>>>>>> /tmp/cc0BOqms.ltrans0.ltrans.o: in function `usb_child_post_bind': >>>>>>> :(.text+0x5672): undefined reference to >>>>>>> `ofnode_read_u32_default' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> :(.text+0x568c): undefined reference to >>>>>>> `ofnode_read_u32_default' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> /tmp/cc0BOqms.ltrans0.ltrans.o: in function `usb_scan_device': >>>>>>> :(.text+0x6c84): undefined reference to `ofnode_first_subnode' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> :(.text+0x6c96): undefined reference to `ofnode_read_u32' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> :(.text+0x6ca4): undefined reference to `ofnode_next_subnode' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> /tmp/cc0BOqms.ltrans0.ltrans.o:(.u_boot_list_2_uclass_driver_2_usb+0x8): >>>>>>> undefined reference to `dm_scan_fdt_dev' >>>>>>> /usr/lib/gcc-cross/arm-linux-gnueabi/8/../../../../arm-linux-gnueabi/bin/ld: >>>>>>> /tmp/cc0BOqms.ltrans0.ltrans.o:(.u_boot_list_2_uclass_driver_2_usb_hub+0x8): >>>>>>> undefined reference to `dm_scan_fdt_dev' >>>>>>> >>>>>>> Fixing those requires enabling of OF_CONTROL and this in turn means the >>>>>>> board must be migrated to DT, unless I am missing something. That's why my >>>>>>> "please advice..." stance. >>>>>> >>>>>> Please post the patches that bring you to the above link errors, yes, >>>>>> thanks. >>>>> >>>>> To be clearer, finish up a patch that completes the migration but is too >>>>> large to install on the hardware so that others can take a look. >>>> >>>> I am not sure I understand that - a patch that completes the migration to >>>> DM_USB cannot be done ATM as the binary does not link without OF_CONTROL. >>>> And I am not going to enable OF_CONTROL as this means I will have to migrate >>>> everything to DT. That's why I enable DM_USB only - see reply to the other >>>> mail. >>> >>> My advise is to provide a linkable but not runnable (or, only runnable >>> in QEMU, the problem is the fixed layout of the actual device flash, >>> right?) patch so that we can figure out how and what needs to be tuned >>> where so that we can see what to do about this platform. >>> >> >> What about the following patch (once you confirm I am on the right track, I >> will send a proper patch as well). Enabling thumb is a must, otherwise >> binary does not fit. With the below changes code compiles and runs on a real >> HW: > > Wait, why is thumb disabled? That's something I'd really like to know > why on as my first guess is there's units with old enough cores that > have some thumb errata maybe? omap3 in N900 suffers from ARM errata 430973, I guess that's why -mthumb was disabled back then. I implemented N900 specific workaround to set the IBE bit in ACR in the board code, but I don't see flush BTAC/BTB being executed on context switch (if there are context switches at all). The only places I was able to find that flush BTAC/BTB instruction are on startup (cpu_init_cp15()) and cache invalidate (invalidate_icache_all()). BTW the code in cpu_init_cp15() is buggy, as flush is executed before IBE bit in ACR is set, making that flush effectively a noop on boards where IBE bit was not set by the previous stage loader, but that's another story not affecting N900 :). So, as soon as there are no context switches in u-boot that may land different code on a same physical address, we should be safe. Could you confirm this is the case? Is there virtual addressing? Multiple processes? > For the second part, how are you binding > the device? And oh, we didn't disable the EFI loader support already? Yeah, looks like selecting libfdt automagically selects a whole bunch of other things (like CMD_FDT and OF_LIBFDT_OVERLAY) > Yeah, that would be another pretty easy choice to win back a bunch of > space. So yes, this is certainly on the right track, thanks! > Ok, we'll send a proper patch series as soon as it is confirmed that it is safe to enable -mthumb. In the meanwhile, could you please have a look at the WDT patch Pali posted back then? Thanks, Ivo