summaryrefslogtreecommitdiff
path: root/include/fdt_decode.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-08-17 15:18:33 -0700
committerSimon Glass <sjg@chromium.org>2011-09-13 13:47:08 -0700
commitb7f199f50179894f7ba19820a9f7c7e0a35493f8 (patch)
tree03330e9dd7847b7d2f1e1eef00fa11915b0d9c70 /include/fdt_decode.h
parentedd48fd3df33f7a7668d6cb469a3bf0c72637031 (diff)
fdt: Only support serial if selected by CONFIG
This fixes what would become a build break if a board did not have NS16550 serial support included. T30 needs this change. Change-Id: I6e06dd7f7fce7e475c0cbe48edae8d068ca5b7e8 Reviewed-on: http://gerrit.chromium.org/gerrit/7637 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdt_decode.h')
-rw-r--r--include/fdt_decode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/fdt_decode.h b/include/fdt_decode.h
index 8417997964..02c452e767 100644
--- a/include/fdt_decode.h
+++ b/include/fdt_decode.h
@@ -28,7 +28,10 @@
* changes to support FDT are minimized.
*/
+#ifdef CONFIG_SYS_NS16550
#include <ns16550.h>
+#endif
+
#include <asm/arch/clock.h>
/* A typedef for a physical address. We should move it to a generic place */
@@ -81,12 +84,14 @@ struct fdt_uart {
enum fdt_compat_id compat; /* our selected driver */
};
+#ifdef CONFIG_SYS_NS16550
/* Information about the spi/uart switch */
struct fdt_spi_uart {
int gpio; /* GPIO to control switch */
NS16550_t regs; /* Address of UART affected */
u32 port; /* Port number of UART affected */
};
+#endif
enum {
FDT_GPIO_NONE = 255, /* an invalid GPIO used to end our list */
@@ -339,6 +344,7 @@ int fdt_decode_next_compatible(const void *blob, int node,
int fdt_decode_next_alias(const void *blob, const char *name,
enum fdt_compat_id id, int *upto);
+#ifdef CONFIG_SYS_NS16550
/**
* Returns information from the FDT about the SPI / UART switch on tegra
* platforms.
@@ -348,6 +354,7 @@ int fdt_decode_next_alias(const void *blob, const char *name,
* @returns 0 on success, -ve on error, in which case config is unchanged
*/
int fdt_decode_get_spi_switch(const void *blob, struct fdt_spi_uart *config);
+#endif
/**
* Decode a single GPIOs from an FDT.