From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.242]) by ozlabs.org (Postfix) with ESMTP id 8850ADDF0A for ; Tue, 25 Mar 2008 01:27:27 +1100 (EST) Received: by hs-out-0708.google.com with SMTP id z77so2719514hsz.9 for ; Mon, 24 Mar 2008 07:27:25 -0700 (PDT) Message-ID: Date: Mon, 24 Mar 2008 08:27:23 -0600 From: "Grant Likely" Sender: glikely@secretlab.ca To: "Sergei Shtylyov" Subject: Re: [PATCH 2/3] [POWERPC] Xilinx: of_serial support for Xilinx uart 16550. In-Reply-To: <47E7B61B.70708@ru.mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <12060242324116-git-send-email-john.linn@xilinx.com> <20080320144402.3063517C005D@mail148-sin.bigfish.com> <18403.32257.725539.470771@cargo.ozlabs.ibm.com> <47E7B61B.70708@ru.mvista.com> Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , John Linn List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Mar 24, 2008 at 8:09 AM, Sergei Shtylyov wrote: > Grant Likely wrote: > > >> > Personally, I'm not fond of this approach. There is already some > >> > traction to using the reg-shift property to specify spacing, and I > >> > think it would be appropriate to also define a reg-offset property to > >> > handle the +3 offset and then let the xilinx 16550 nodes use those. > > >> Why do we need a reg-offset property when we can just add the offset > >> to the appropriate word(s) in the reg property? > > > Primarily because the device creates 32 byte registers starting at 0; > > but they are also big-endian byte accessible so a byte read at offset > > 8 also works. > > Probably I misunderstood you: does it give the same result as offset 11? er; typo; oops. A 32 bit read add offset 0 is the same as a byte read at offset *3*. > > > > reg-offset seems to be a better description of the hardware to me. > > Have you considered using the existing "big-endian" property? No I haven't, but that would work too. I'm happy with that if it works for you. If the property was defined, then the byte offset to the first reg would be adjusted by 1^(reg-shift) - 1 Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.