Hello Detlev, Detlev Zundel wrote: > This patch adds advanced diagnosis functions for the inka4x0 board. > > Signed-off-by: Andreas Pfefferle <a...@denx.de> > Signed-off-by: Detlev Zundel <a...@denx.de> > --- > board/inka4x0/Makefile | 4 +- > board/inka4x0/inka4x0.c | 19 ++- > board/inka4x0/inkadiag.c | 541 > +++++++++++++++++++++++++++++++++++++++++++++ > include/configs/inka4x0.h | 1 + > 4 files changed, 561 insertions(+), 4 deletions(-) > create mode 100644 board/inka4x0/inkadiag.c > [...]
> diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c > new file mode 100644 > index 0000000..bdbf652 > --- /dev/null > +++ b/board/inka4x0/inkadiag.c > @@ -0,0 +1,541 @@ > +/* > + * (C) Copyright 2008, 2009 Andreas Pfefferle, > + * DENX Software Engineering, a...@denx.de. > + * (C) Copyright 2009 Detlev Zundel, > + * DENX Software Engineering, d...@denx.de. > + * > + * See file CREDITS for list of people who contributed to this > + * project. > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of > + * the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > + * MA 02111-1307 USA > + */ > + > +#include <asm/io.h> > +#include <common.h> > +#include <config.h> > +#include <mpc5xxx.h> > +#include <pci.h> > + > +#include <command.h> > + > +#define GPIO_BASE (u_char *)0x30400000 > should be #define GPIO_BASE (u_char *)CONFIG_SYS_CS3_START > + > +#define DIGIN_TOUCHSCR_MASK 0x00003000 /* Inputs 12-13 */ > +#define DIGIN_KEYB_MASK 0x00010000 /* Input 16 */ > + > +#define DIGIN_DRAWER_SW1 0x00400000 /* Input 22 */ > +#define DIGIN_DRAWER_SW2 0x00800000 /* Input 23 */ > + > +#define DIGIO_LED0 0x00000001 /* Output 0 */ > +#define DIGIO_LED1 0x00000002 /* Output 1 */ > +#define DIGIO_LED2 0x00000004 /* Output 2 */ > +#define DIGIO_LED3 0x00000008 /* Output 3 */ > +#define DIGIO_LED4 0x00000010 /* Output 4 */ > +#define DIGIO_LED5 0x00000020 /* Output 5 */ > + > +#define DIGIO_DRAWER1 0x00000100 /* Output 8 */ > +#define DIGIO_DRAWER2 0x00000200 /* Output 9 */ > + > +#define SERIAL_PORT_BASE (u_char *)0x80000000 > this should be #define SERIAL_PORT_BASE (u_char *)CONFIG_SYS_CS2_START > + > +#define UART_RX 0 /* In: Receive buffer (DLAB=0) */ > +#define UART_TX 0 /* Out: Transmit buffer (DLAB=0) */ > +#define UART_DLL 0 /* Out: Divisor Latch Low (DLAB=1) */ > + > +#define UART_LCR 3 /* Out: Line Control Register */ > +#define UART_MCR 4 /* Out: Modem Control Register */ > + > +#define UART_LSR 5 /* In: Line Status Register */ > +#define UART_MSR 6 /* In: Modem Status Register */ > + > +#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */ > +#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */ > + > +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ > +#define UART_LSR_DR 0x01 /* Receiver data ready */ > + > +#define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ > +#define UART_MCR_RTS 0x02 /* RTS complement */ > +#define UART_MCR_DTR 0x01 /* DTR complement */ > + > +#define UART_MSR_DCD 0x80 /* Data Carrier Detect */ > +#define UART_MSR_DSR 0x20 /* Data Set Ready */ > +#define UART_MSR_CTS 0x10 /* Clear to Send */ > Are this not common 16xxx UART registers? If so, I think, they should go in include/ns16550.h ... bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot