diff options
author | Tom Rix <Tom.Rix@windriver.com> | 2009-05-31 12:44:37 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-12 20:39:53 +0200 |
commit | 660888b7fb8840ce169dcd2589e49ab44c46b87b (patch) | |
tree | 150f29155c8460803bb60cf4b070bbbadbb4c604 /board/omap3/zoom2/zoom2_serial.h | |
parent | 3ea201b016ab259a5ac8824af767569522768c47 (diff) | |
download | u-boot-imx-660888b7fb8840ce169dcd2589e49ab44c46b87b.zip u-boot-imx-660888b7fb8840ce169dcd2589e49ab44c46b87b.tar.gz u-boot-imx-660888b7fb8840ce169dcd2589e49ab44c46b87b.tar.bz2 |
ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS. On your host pick the first
enumeration.
The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.
The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.
The kernel bootargs are
console=ttyS3,115200n8
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Diffstat (limited to 'board/omap3/zoom2/zoom2_serial.h')
-rw-r--r-- | board/omap3/zoom2/zoom2_serial.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/board/omap3/zoom2/zoom2_serial.h b/board/omap3/zoom2/zoom2_serial.h new file mode 100644 index 0000000..c98158f --- /dev/null +++ b/board/omap3/zoom2/zoom2_serial.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2009 Wind River Systems, Inc. + * Tom Rix <Tom.Rix@windriver.com> + * + * 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 + * + */ + +#ifndef ZOOM2_SERIAL_H +#define ZOOM2_SERIAL_H + +extern int zoom2_debug_board_connected (void); + +#define SERIAL_TL16CP754C_BASE 0x10000000 /* Zoom2 Serial chip address */ + +#define QUAD_BASE_0 SERIAL_TL16CP754C_BASE +#define QUAD_BASE_1 (SERIAL_TL16CP754C_BASE + 0x100) +#define QUAD_BASE_2 (SERIAL_TL16CP754C_BASE + 0x200) +#define QUAD_BASE_3 (SERIAL_TL16CP754C_BASE + 0x300) + +#define S(a) #a +#define N(a) S(quad##a) +#define U(a) S(UART##a) + +#define QUAD_INIT(n) \ +int quad_init_##n(void) \ +{ \ + return quad_init_dev(QUAD_BASE_##n); \ +} \ +void quad_setbrg_##n(void) \ +{ \ + quad_setbrg_dev(QUAD_BASE_##n); \ +} \ +void quad_putc_##n(const char c) \ +{ \ + quad_putc_dev(QUAD_BASE_##n, c); \ +} \ +void quad_puts_##n(const char *s) \ +{ \ + quad_puts_dev(QUAD_BASE_##n, s); \ +} \ +int quad_getc_##n(void) \ +{ \ + return quad_getc_dev(QUAD_BASE_##n); \ +} \ +int quad_tstc_##n(void) \ +{ \ + return quad_tstc_dev(QUAD_BASE_##n); \ +} \ +struct serial_device zoom2_serial_device##n = \ +{ \ + N(n), \ + U(n), \ + quad_init_##n, \ + quad_setbrg_##n, \ + quad_getc_##n, \ + quad_tstc_##n, \ + quad_putc_##n, \ + quad_puts_##n, \ +}; + +#endif /* ZOOM2_SERIAL_H */ |