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 D7462C2B9F4 for ; Sat, 19 Jun 2021 20:16:02 +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 A5B266100B for ; Sat, 19 Jun 2021 20:16:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5B266100B 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 2BA3081FD5; Sat, 19 Jun 2021 22:15:59 +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="fFI0Th2F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7893482824; Sat, 19 Jun 2021 22:15:57 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 320D980F3A for ; Sat, 19 Jun 2021 22:15:54 +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-ej1-x62d.google.com with SMTP id gt18so21556781ejc.11 for ; Sat, 19 Jun 2021 13:15:54 -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=Fw59w5zrSXlaSSStFpJ8zPuYCPAfbcIwuONW9n8JCz0=; b=fFI0Th2FkfSfeH3afYzBGaTcUnpEoBZfJYrqTQqZJpfXjLKeaHBSmnGuo5uY0hkrEl kiwcWfHna/tpTJLX5pSrKP7FOcTQ94CJMezXWlb3FCyh6+g8ssJPSL27xVAFAMzpYc4N iey9zwZaR2TzHQ/6yA3gnXeGlStICGe4tshXlisjQkox/IuTAlV6UQei+qLnx7INzCbT 0QxLuqBtnSUuNCm7cxfiU49HwPIyldG6ArBvxRyivo/pYvi9+4R8dqhm72C9qa7mbS60 3c8cD013NtcU6eXgMcxfLxtWsyr9XNEDOCHFGC8kAngY3G2dF8oTw8FQH5UQkQm5MKAy NIKA== 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=Fw59w5zrSXlaSSStFpJ8zPuYCPAfbcIwuONW9n8JCz0=; b=N1NCWqoj3KEc7HM3uZvmqFCFhfkyfwpDoq0x0/dkHNquZV8MswNot1GfmUDqBzbjN1 1unh2rUyKFhLlvcdEPLlN78DwrJrSQdVPSdiD58rz9Ouw+0hq/ekCw4LyhpI0OoKMbwE pZIuHtF8EtGsVtbsCEl3E6roB+pe4tsAu36sJviXsHMJmITdtf+YA9rtYgBqzM4ZHMgY DFgFn01WR/MNNc/mJhHmwrDGtGlaTBNWYa3O+3+LeEzIB+cFCz7EyJLdMuR+S2IPKgrz YVbXvB2SEFff3WS64jYnHPTcSvye+QuoGMO3R0qnZGsPGPlzCZp1J3twRxGPEHIfOBqU Mg5A== X-Gm-Message-State: AOAM531rGeHs1hEcfEf86fqmyvUOSbxh/9jotUeOVSl8E11wKKoi77Mf HEzoheNgI+a48G5/Z0WMLaM= X-Google-Smtp-Source: ABdhPJyP/o7GE+l3xWRQJdZINDvo/LOzat/jTR4hzYEUSFfkhX6oF5icOsUT4LDC5FUg3chk69sARA== X-Received: by 2002:a17:906:63d2:: with SMTP id u18mr16958295ejk.186.1624133753845; Sat, 19 Jun 2021 13:15:53 -0700 (PDT) Received: from [192.168.1.10] ([46.249.74.23]) by smtp.googlemail.com with ESMTPSA id g8sm8345681edw.89.2021.06.19.13.15.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Jun 2021 13:15:53 -0700 (PDT) Subject: Re: [PATCH 1/2] DM_USB: allow building without OF_CONTROL To: Marek Vasut Cc: Tom Rini , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Lokesh Vutla , Simon Glass , Merlijn Wajer , u-boot@lists.denx.de, Pavel Machek References: <20210618145724.2558-1-pali@kernel.org> <20210618163812.GR9516@bill-the-cat> <3c44a3cf-b9ad-1b31-d0a4-54c896222d78@gmail.com> <0a8a9dab-ee44-fab7-d712-d66cb121c170@gmail.com> <249e8e4f-b5f7-1f97-adbd-a83d75883ef4@denx.de> From: Ivaylo Dimitrov Message-ID: <338bfdad-15f6-fbff-6fde-d0411e585bf4@gmail.com> Date: Sat, 19 Jun 2021 23:15:50 +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: <249e8e4f-b5f7-1f97-adbd-a83d75883ef4@denx.de> 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 19.06.21 г. 22:38 ч., Marek Vasut wrote: > On 6/19/21 9:33 PM, Ivaylo Dimitrov wrote: >> Hi, > > Hi, > >>>>>>> Currently DM_USB requires OF_CONTROL to be enabled, otherwise >>>>>>> link errors >>>>>>> occur. On the other hand OF_CONTROL requires board code to be >>>>>>> migrated to >>>>>>> DT, which is not always possible or required. >>>>>>> >>>>>>> Fix that by conditionally compiling OF_CONTROL specific sections >>>>>>> in USB >>>>>>> related drivers code in the same way like it is done in the other >>>>>>> drivers. >>>>>>> Also, auto select OF_LIBFDT if DM_USB is selected but OF_CONTROL >>>>>>> is not. >>>>>>> Introduce a new Kconfig option OF_NODE used to compile of_node.c >>>>>>> in case >>>>>>> OF_CONTROL is not enabled. Fix deprecation warning condition as >>>>>>> well. >>>>> >>>>> So, what is the use case of this? Why not just enable DM_USB and >>>>> OF_CONTROL ? >>>> >>>> OF_CONTROL requires migration to device-tree. >>> >>> That's where the supported platforms are heading anyway. Or is there >>> some issue with switching the platform you use over to DT ? >> >> OK, let me elaborate: It is about enabling DM_USB on N900 (Nokia rx-51 >> board). For various reasons I am not going to discuss (1), migration >> to DM was delayed to the point where we saw "[PATCH] arm: Remove >> nokia_rx51 board" with a commit message "This board has not been >> converted to CONFIG_DM_USB by the deadline. Remove it." posted. The >> missing pieces were WDT (a patch is already merged in -next) and >> DM_USB. The board itself does not support host mode, but USB TTY is >> very useful for debugging purposes. The particular task I am after is >> USB DM migration and the $subject patch allows this to be achieved >> with relatively little effort (a couple of defconfig changes), >> incomparable with the effort needed for migration to DT. As we are >> already past the DM migration deadline I think it makes sense to >> fulfil its requirements before undertaking such a big task like >> migration to DT. > > This sounds like a workaround though. Can you instead do the full > conversion of the board? I am sure the board removal patch can be > postponed if there is plan to convert it. Hard to say if migration to device-tree is even possible on N900 ATM, enabling OF_CONTROL increases the size of the produced binary with some 100k (.dtb not included), making the size of the binary way above our budget of ~256k. Sure, board config does not enable -mthumb, but omap3 in rx-51 suffers from ARM errata 430973 and noone can guarantee we're not going to see SIGILL faults if we enable it. Which it seems we are forced to do even with DM_USB migration only. Re workaround - I took examples of #ifdef's from the current u-boot code (mmc, i2c, etc.) so workaround or not, it is no different to what the other drivers are doing. I don't really understand where this requirement to convert to DTS comes from - will boards that are not converted be removed at some point? When is that deadline if exists? If there is no such deadline, why shall we spend who knows how many hours just because "you know, it sounds like a good idea to convert to DTS"? You understand this is not a trivial task and given the pace rx-51 patches were reviewed lately, it will easily take 2 years to do that conversion. To sum it up - maybe I can do a full DTS migration, but I don't see a point in doing it ATM. The $subject patch allows rx-51 to be fully migrated to DM and does nothing different to what already is done all over the place. Regards, Ivo