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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 371EEC433F5 for ; Mon, 6 Sep 2021 08:38:09 +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 CE74360F92 for ; Mon, 6 Sep 2021 08:38:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE74360F92 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4235D82EEA; Mon, 6 Sep 2021 10:38:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc 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; secure) header.d=walle.cc header.i=@walle.cc header.b="DC8w3Oeu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CE3883189; Mon, 6 Sep 2021 10:38:01 +0200 (CEST) Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (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 425E4817D3 for ; Mon, 6 Sep 2021 10:37:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 66D5F22234; Mon, 6 Sep 2021 10:37:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1630917477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cyO9XoYxuTeZ75frNeAF7IMdGVDCvZX+ne40vBo0F0A=; b=DC8w3OeuN7y0VZZEeWvLa/vQ83WPsNQ0lZd/eMO/EFRWillXYF4BOFwz1jJ+N+GxR4SMwo 7g/vUO8jvIJ6OMqrUumyX0DwJtyz4SjZCOZ3N1bOpL7cWcXX63W84Nn7l0qLrT7Y/fZfK5 aZJgdQJEfaB//v/hcn1IF7gmLm5CRCE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 06 Sep 2021 10:37:57 +0200 From: Michael Walle To: Vladimir Oltean Cc: u-boot@lists.denx.de, Jagan Teki , Priyanka Jain , Tom Rini , Peter Griffin , Manivannan Sadhasivam Subject: Re: [PATCH v2 8/9] arm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linux In-Reply-To: <20210901215946.4nm5euczfndn4jd7@skbuf> References: <20210901085522.1712104-1-michael@walle.cc> <20210901085522.1712104-9-michael@walle.cc> <20210901102928.7m37vmk3s6nw3h6p@skbuf> <0ed0e06382a3a6f8de1c754965c3e492@walle.cc> <20210901215946.4nm5euczfndn4jd7@skbuf> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <8997df6fae896159b2e30d965700c2d0@walle.cc> X-Sender: michael@walle.cc 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 Am 2021-09-01 23:59, schrieb Vladimir Oltean: >> >> > As for pcie->lut itself, simplest would be to just default to what is >> > now the "dbi" reg value, plus a .lut_offset determined by compatible >> > string, in the case of "fsl,ls1028a-pcie" 0x80000, just like Linux. >> > >> > Ah, and not to mention that the reg-names are not even the same between >> > U-Boot and Linux. What is "dbi" in U-Boot is "regs" in Linux :) >> >> Well and there is a big-endian property, which of course is set for >> any >> Layerscape but the LS1028A. linux has instead just one endianess, but >> use a shift offset. > > You lost me here. How are registers accessed with the right endianness > in Linux and in U-Boot? Of all the ctrl registers, Linux seems to just use the lut_dbg register for link state detection (via the .lut_dbg offset). It uses the .ltssm_shift property to shift the read value of this register. That property is either 0 or 24, which I suspect is the same as converting the endianess (ie. in u-boot). -michael