From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Date: Sat, 04 Apr 2009 06:56:40 -0500 Subject: [U-Boot] [PATCH 3/8] ZOOM2 Add support for debug board detection. In-Reply-To: <49D71A1D.6090909@googlemail.com> References: <1238641341-26714-1-git-send-email-Tom.Rix@windriver.com> <1238641341-26714-2-git-send-email-Tom.Rix@windriver.com> <1238641341-26714-3-git-send-email-Tom.Rix@windriver.com> <49D71A1D.6090909@googlemail.com> Message-ID: <49D74AF8.1060108@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dirk Behme wrote: > 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 >> --- >> 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? > This code will go away once I finish bringing in the kernel's gpio code I will look for other instances of __raw and conform. Tom > Best regards > > Dirk