diff options
author | Simon Glass <sjg@chromium.org> | 2011-06-08 15:49:27 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:18 -0700 |
commit | 3892d6826cb8a99dc79c719a2831131baf49e2b0 (patch) | |
tree | 16c6063f842f5223ac7e452510790024d77a8c80 /include/fdt_decode.h | |
parent | 3a25d71c3942d77d17825da4978062e5d93892c0 (diff) |
fdt: Simplify the compatible naming list
This was a structure but can simply be a string.
BUG=chromium-os:11623
TEST=build U-Boot
Change-Id: I89b32266739f394f416f0abbae529213788f863d
Reviewed-on: http://gerrit.chromium.org/gerrit/2347
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'include/fdt_decode.h')
-rw-r--r-- | include/fdt_decode.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/fdt_decode.h b/include/fdt_decode.h index f81821401b..ad8b46559d 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -48,18 +48,12 @@ typedef u32 addr_t; */ enum fdt_compat_id { COMPAT_UNKNOWN, - COMPAT_SPI_UART_SWITCH, /* SPI / UART switch */ + COMPAT_NVIDIA_SPI_UART_SWITCH, /* SPI / UART switch */ COMPAT_SERIAL_NS16550, /* NS16550 UART */ COMPAT_COUNT, }; -/** compat items that we know about and might have drivers for */ -struct fdt_compat { - enum fdt_compat_id id; - const char *name; -}; - /* Information obtained about a UART from the FDT */ struct fdt_uart { addr_t reg; /* address of registers in physical memory */ @@ -174,6 +168,18 @@ void fdt_decode_uart_calc_divisor(struct fdt_uart *uart); enum fdt_compat_id fdt_decode_lookup(const void *blob, int node); /** + * Find the next node which is compatible with the given id. Pass in a node + * of 0 the first time. + * + * @param blob FDT blob to use + * @param node Node offset to start search after + * @param id Compatible ID to look for + * @return offset of next compatible node, or -FDT_ERR_NOTFOUND if no more + */ +int fdt_decode_next_compatible(const void *blob, int node, + enum fdt_compat_id id); + +/** * Returns information from the FDT about the SPI / UART switch on tegra * platforms. * @@ -194,6 +200,7 @@ void fdt_setup_gpios(struct fdt_gpio_state *gpio_list); * Returns information from the FDT about the LCD display. This function reads * out the following attributes: * + * reg physical address of display peripheral * width width in pixels * height height in pixels * bits_per_pixel put in bpp |