From b7f199f50179894f7ba19820a9f7c7e0a35493f8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 17 Aug 2011 15:18:33 -0700 Subject: 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 Tested-by: Simon Glass --- include/fdt_decode.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/fdt_decode.h') 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 +#endif + #include /* 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. -- cgit v1.2.3