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 E0695C4332F for ; Tue, 13 Dec 2022 06:14:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A7D0852B5; Tue, 13 Dec 2022 07:14:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1670912057; bh=+EpcwTXOEkOi8jzdqI3bu5XWMeqOWFRbqI90fNlzpkE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Sr0TIxzV/j3WXSam1yCTzQgAvWY1byPoMlyJQJz+7Laj5Oc3AbknIWExzLf1Q/jq1 eF0+Jg7Mg3TPnyHejiokQNxcoLy7mXLo1ddgQJMCUuPaM7ffydYskFjoYTcnE/+eQM Z8w16Y9P6DqTCH+BYAboNWzE5BTI5t2gSotG8ip3Jv/sFe+aH4+vq+RXhMv29vyVju 0bpCIX28m3XZqVczsVXF+H5C1q3DS1EOh+JpXkoDs89uBFzQWc8cRDsUz9zyWXjh4U Fzjogfa1KqyVb68dvORx7taMOBIVOD9/beK1nRsXAIBmSVy9zPguT1jexFrkoBqEnx XrzT+Fw0GQCfA== Received: by phobos.denx.de (Postfix, from userid 109) id 3CDCD85424; Tue, 13 Dec 2022 07:14:16 +0100 (CET) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [80.241.59.204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3DEE084EA1 for ; Tue, 13 Dec 2022 07:14:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4NWSr16GT1z9sT8; Tue, 13 Dec 2022 07:14:09 +0100 (CET) Message-ID: <4c711ad2-693f-05b9-e0f6-72464c4eb33c@denx.de> Date: Tue, 13 Dec 2022 07:14:04 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] serial: ns16550: Enable clocks during probe Content-Language: en-US To: Samuel Holland , Tom Rini Cc: Simon Glass , u-boot@lists.denx.de, Wadim Egorov , Philipp Tomsich , Kever Yang References: <20221128054834.34950-1-samuel@sholland.org> <20221212185446.GB3787616@bill-the-cat> <1f81aa7c-349d-06d0-9143-2d36b5111470@sholland.org> From: Stefan Roese In-Reply-To: <1f81aa7c-349d-06d0-9143-2d36b5111470@sholland.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Samuel, On 12/13/22 02:46, Samuel Holland wrote: > On 12/12/22 12:54, Tom Rini wrote: >> On Sun, Nov 27, 2022 at 11:48:34PM -0600, Samuel Holland wrote: >> >>> If the UART bus or baud clock has a gate, it must be enabled before the >>> UART can be used. >>> >>> Signed-off-by: Samuel Holland >>> Reviewed-by: Stefan Roese >> >> This breaks building on phycore-rk3288 > > I get: > > binman: Error 1 running 'mkimage -d ./mkimage.simple-bin.mkimage -n > rk3288 -T rksd ./idbloader.img': Error: SPL image is too large (size > 0x8800 than 0x8000) > > Before applying this patch: > > $ ls -l spl/u-boot-spl.bin > -rw-r--r-- 1 samuel samuel 32704 Dec 12 19:35 spl/u-boot-spl.bin > > So the board was quite close to its SPL size limit already. > > I was trying to be general with this patch, but I suppose for my > immediate purposes (Allwinner D1), I only care about the first clock. If > I use clk_get_by_index() instead of clk_get_bulk(), the phycore-rk3288 > build passes with 4 bytes to spare: > > $ ls -l spl/u-boot-spl.bin > -rw-r--r-- 1 samuel samuel 32760 Dec 12 19:36 spl/u-boot-spl.bin > > I will send a v2, but I imagine some other unsuspecting patch will run > into this limit again before long. Why not enable LTO to save more space. I just checked this on this platform: w/o LTO: spl/u-boot-spl.bin 32604 with LTO enabled: spl/u-boot-spl.bin 30016 Not tested though. Thanks, Stefan