]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
fdt: add decode helper library
authorSimon Glass <sjg@chromium.org>
Mon, 24 Oct 2011 19:15:32 +0000 (19:15 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 26 Oct 2011 19:39:40 +0000 (21:39 +0200)
commitb5220bc6ed6e6a197adf4926958dca1df4b420b0
tree196fdefeb08bdf98a12ceea89ac29424ecfc47f6
parent2c0f79e44bfdc592913b96aeeb7ecc5acca6eb37
fdt: add decode helper library

This library provides useful functions to drivers which want to use
the fdt to control their operation. Functions are provided to:

- look up and enumerate a device type (for example assigning i2c bus 0,
     i2c bus 1, etc.)
- decode basic types from the fdt, like addresses and integers

While this library is not strictly necessary, it helps to minimise the
changes to a driver, in order to make it work under fdt control. Less
code is required, and so the barrier to switch drivers over is lower.

Additional functions to read arrays and GPIOs could be made available
here also.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/fdtdec.h [new file with mode: 0644]
lib/Makefile
lib/fdtdec.c [new file with mode: 0644]