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 A6727C433EF for ; Fri, 20 May 2022 07:45:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53FDF81111; Fri, 20 May 2022 09:45:11 +0200 (CEST) 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=1653032712; bh=hfwA4McE8orfVlWGpab1LNcdYcILFJI5y1bvxNnst18=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=i7zn+pZJB6ujNuE+f72sKVClNCAAxm8buCQH1XyGJd9NUKVyU29CgqXF+a57/nvbe 1fUS8VpEKb2ZbHZFx9lVrLIGyMwDWV5J882yaFo7MLH+9hTgC1mJw1183eLUTQc8t5 ERbyEruwI9IKzIBR5qYWzqeqzQRQa5P8iBJjYi2vUUWFevMQ4yUMun6Vt42s6OjIzC 3rz6byH1d9xGKA+/GwSPB2LmTx+crmDNBrD4MH4ulkE0Q9UEsQ6k8ZaNntUwRQ0D/2 Cv+D4N1ONPkujDS2e/8FQyAsMz7egEoOkksC2LrJiFfkNbH3FtC0yc+V419akxuY3V HCjc1evMqC8LQ== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 37EB982107; Fri, 20 May 2022 09:45:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1653032709; bh=hfwA4McE8orfVlWGpab1LNcdYcILFJI5y1bvxNnst18=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iGCwuwxAeHprXxsfjdRki6MK/9hBeouBTHU5Vr6AecvLj7iJOCxee7tdbu0dMtDKe +OX32XjBXr0Upd7dnkh4Au58ByrjWDwkCp5ErA0o9UjYviAi+PzE4UvmMNPf+gmm/c ULFJLnuTdLb6wUGYcWHhJRAY82FI/LeteHG9JuMFKha8XtWFG91G7ntgE0GlU0GFzo XlLhtP9jmg++A4e3/8d472aYw+kNzYNNqZ1lTCUJryb7zAMKezkPzs2Tels2rh8OQf HlNbL4PeUl7m1q3DVZX+Pz50dqjO98yhkwhjzSQ0ihFwdnboXM2WC1uqL3ethQdDkT +H4gpLvWHLqTQ== Message-ID: <6aaff845-517a-eb54-aed2-4a08159de751@denx.de> Date: Fri, 20 May 2022 09:45:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 4/4] ARM: imx: imx5: Introduce and use UART_BASE_ADDR(n) Content-Language: en-US To: Stefano Babic , u-boot@lists.denx.de Cc: Fabio Estevam , Peng Fan References: <20220424214406.52658-1-marex@denx.de> <20220424214406.52658-4-marex@denx.de> <9cb83ca7-9c2b-e04c-9100-508695f40ddd@denx.de> From: Marek Vasut In-Reply-To: <9cb83ca7-9c2b-e04c-9100-508695f40ddd@denx.de> 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.5 at phobos.denx.de X-Virus-Status: Clean On 5/20/22 09:30, Stefano Babic wrote: > Hi Marek, > > On 24.04.22 23:44, Marek Vasut wrote: >> Introduce helper macro UART_BASE_ADDR(n), which returns Nth UART base >> address. Convert all board configurations to this new macro. This is the >> first step toward switching CONFIG_MXC_UART_BASE to Kconfig. This is a >> clean up, no functional change. >> >> The new macro contains compile-time test to verify N is in suitable >> range. The test works such that it multiplies constant N by constant >> double-negation of size of a non-empty structure, i.e. it multiplies >> constant N by constant 1 in each successful compilation case. >> >> The non-empty structure may contain C11 _Static_assert(), make use of >> this and place the kernel variant of static assert in there, so that >> it performs the compile-time check for N in the correct range. Note >> that it is not possible to directly use static_assert in compound >> statements, hence this convoluted construct. >> >> Signed-off-by: Marek Vasut >> Cc: Fabio Estevam >> Cc: Peng Fan >> Cc: Stefano Babic >> --- > > I have not found the reason, but this breaks MX51: All this UART_BASE_ADDR stuff is postponed, just drop for now.