public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] inka4x0: Add hardware diagnosis functions for inka4x0
Date: Tue, 24 Mar 2009 18:53:08 +0100	[thread overview]
Message-ID: <49C91E04.2020801@denx.de> (raw)
In-Reply-To: <1237914158-15693-6-git-send-email-dzu@denx.de>

Hello Detlev,

Detlev Zundel wrote:
> This patch adds advanced diagnosis functions for the inka4x0 board.
>
> Signed-off-by: Andreas Pfefferle <ap@denx.de>
> Signed-off-by: Detlev Zundel <ap@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, ap at denx.de.
> + * (C) Copyright 2009 Detlev Zundel,
> + *     DENX Software Engineering, dzu at 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 

  parent reply	other threads:[~2009-03-24 17:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 17:02 [U-Boot] [PATCH v1 0/7] Update for inka4x0 plus some new features Detlev Zundel
2009-03-24 17:02 ` [U-Boot] [PATCH] command.c: Expose the core of do_help as _do_help to the rest of u-boot Detlev Zundel
2009-03-24 17:02   ` [U-Boot] [PATCH] mpc5xxx: Add structure definition for several more register blocks Detlev Zundel
2009-03-24 17:02     ` [U-Boot] [PATCH] drivers/twserial: Add protocol driver for "three wire serial" interface Detlev Zundel
2009-03-24 17:02       ` [U-Boot] [PATCH] rtc: add support for 4543 RTC (manufactured by e.g. EPSON) Detlev Zundel
2009-03-24 17:02         ` [U-Boot] [PATCH] inka4x0: Add hardware diagnosis functions for inka4x0 Detlev Zundel
2009-03-24 17:02           ` [U-Boot] [PATCH] inka4x0: Add hardware diagnosis and RTC in configuration Detlev Zundel
2009-03-24 17:02             ` [U-Boot] [PATCH] inka4x0: Use proper accessor macros for memory mapped registers Detlev Zundel
2009-03-24 22:56             ` [U-Boot] [PATCH] inka4x0: Add hardware diagnosis and RTC in configuration Wolfgang Denk
2009-03-25  9:16               ` Detlev Zundel
2009-03-25  9:41                 ` Wolfgang Denk
2009-03-25 15:18                   ` Detlev Zundel
2009-03-24 23:47             ` Anatolij Gustschin
2009-03-24 17:53           ` Heiko Schocher [this message]
2009-03-24 22:38             ` [U-Boot] [PATCH] inka4x0: Add hardware diagnosis functions for inka4x0 Wolfgang Denk
2009-03-25  9:40               ` Detlev Zundel
2009-03-25  9:40             ` Detlev Zundel
2009-03-25 12:16               ` Heiko Schocher
2009-03-24 22:50           ` Wolfgang Denk
2009-03-24 23:08             ` Scott Wood
2009-03-25 15:07             ` Detlev Zundel
2009-03-25 19:07               ` Wolfgang Denk
2009-03-24 23:36           ` Anatolij Gustschin
2009-03-25  9:13             ` Detlev Zundel
2009-03-24 22:54       ` [U-Boot] [PATCH] drivers/twserial: Add protocol driver for "three wire serial" interface Wolfgang Denk
2009-03-25 15:49         ` Detlev Zundel
2009-03-27 20:04     ` [U-Boot] [PATCH] mpc5xxx: Add structure definition for several more register blocks Wolfgang Denk
2009-03-24 22:36 ` [U-Boot] [PATCH v1 0/7] Update for inka4x0 plus some new features Wolfgang Denk
2009-03-25 15:12   ` Detlev Zundel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C91E04.2020801@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox