[U-Boot] [PATCH] serial: ns16550: Add register shift variable

Wolfgang Denk wd at denx.de
Mon Jul 16 12:42:48 UTC 2018


Dear Felix,

In message <1b0d33fa-adfb-9825-5ae8-8bded1678c0c at ltec.ch> you wrote:
>
> >> This needs to be rewritten.
> > 
> > To try and help clarify, the property in question means "quantity to
> > shift the register offsets by."  It should be clear in our Kconfig help
> > entry as well that this is what we're looking for.
> > 
> Thanks for this! The help text will be fixed in v2.

None of the places I could find in the Linux
Documentation/devicetree/bindings directory actually explains what
"shift the register offsets" means.   Only the code reveals that
this means a LEFT shift of the register address (offset).

At least one place in Linux interprets <reg-shift> differently; here
it operates on the _data_ (instead there they use <reg-spacing>):

"devicetree/bindings/ipmi/ipmi-smic.txt":

- reg-shift - The amount to shift the registers to the right to get the data
        into bit zero.

(see ipmi_si_mem_io.c


So can we please add an explanation what _exactly_ this means?

Thanks.


Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is easier to write an incorrect program than understand a  correct
one.


More information about the U-Boot mailing list