Re: [PATCH] libfdt: add helpers to read address and size from reg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Nov 18, 2016 at 11:37:41AM -0600, Benjamin Fair wrote:
> On 11/09/2016 10:58 AM, Benjamin Fair wrote:
> > This patch extends the capability of libfdt to parse the contents of device
> > trees in a similar manner to fdt_address_cells and fdt_size_cells.
> > 
> > It adds a helper function which reads the address and size of a device from
> > the reg property and performs basic sanity checks.
> > 
> > It does not perform translation to a physical address using the ranges
> > properties of parents, but this enhancement may be added as a separate
> > function in the future.
> > 
> > Signed-off-by: Benjamin Fair <b-fair@xxxxxx>
> > ---
> > 
> > The intent of this patch is similar to the commit "libfdt: Add helpers to read
> > #address-cells and #size-cells" [1].
> > 
> > It is related to "libfdt: add address translation support" [2] but does not
> > attempt to perform address translation and was written from scratch rather than
> > reusing GPL code. If the issues with that patch are resolved, that
> > functionality will complement what is added in this patch.
> > 
> > [1] http://www.spinics.net/lists/devicetree-compiler/msg00113.html
> > [2] http://www.spinics.net/lists/devicetree-compiler/msg00093.html
> > 
> >  libfdt/fdt_addresses.c | 62 ++++++++++++++++++++++++++++++++++++++++++
> >  libfdt/libfdt.h        | 29 ++++++++++++++++++++
> >  libfdt/version.lds     |  1 +
> >  tests/.gitignore       |  1 +
> >  tests/Makefile.tests   |  2 +-
> >  tests/addr_size.c      | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/addresses.dts    | 11 ++++++++
> >  tests/run_tests.sh     |  1 +
> >  8 files changed, 180 insertions(+), 1 deletion(-)
> >  create mode 100644 tests/addr_size.c
> 
> Hi David,
> 
> Did you see this patch?

Yes, I saw it, I've just been busy with other things. 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux