[U-Boot] [PATCH 3/8] ZOOM2 Add support for debug board detection.
Dirk Behme
dirk.behme at googlemail.com
Sat Apr 4 10:28:13 CEST 2009
Hi Tom,
Tom Rix wrote:
> https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=GettingStartedWithZoomII_AKA_OMAP34XII_MDP
>
> The zoom2 has an auxillary board that contains the serial, net, jtag and
> battery simulator. This change supports a runtime check if the debug board is
> connected.
>
> Signed-off-by: Tom Rix <Tom.Rix at windriver.com>
> ---
> board/omap3/zoom2/Makefile | 3 +-
> board/omap3/zoom2/debug_board.c | 57 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 59 insertions(+), 1 deletions(-)
> create mode 100644 board/omap3/zoom2/debug_board.c
>
> diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile
> index 088b8cb..b8fa5a7 100644
> --- a/board/omap3/zoom2/Makefile
> +++ b/board/omap3/zoom2/Makefile
> @@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
...
> --- /dev/null
> +++ b/board/omap3/zoom2/debug_board.c
...
> +static void zoom2_debug_board_detect (void)
> +{
> + unsigned int val;
> + /*
> + * GPIO to query for debug board
> + * 158 db board query, bank 5, index 30
> + */
> + gpio_t *gpio5_base = (gpio_t *) OMAP34XX_GPIO5_BASE;
> +
> + val = __raw_readl (&gpio5_base->datain);
Is there any special reason why you use __raw_readl() instead of just
readl() here? Looking at ARM's io.h, they seem to map to the same macro?
Best regards
Dirk
More information about the U-Boot
mailing list