From 83e40ba75d7f8d0c2e2ecdd203db96ccd79a0340 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 31 Mar 2005 18:42:15 +0000 Subject: * Patch by Detlev Zundel, 31 Mar 2005: Cleanup duplicate definition of overwrite_console() * Update TQM5200 configuration; prepare for Rev. 200 starter kit boards --- CHANGELOG | 6 ++++++ common/console.c | 8 +++----- drivers/keyboard.c | 10 ++++------ drivers/sm501.h | 48 ----------------------------------------------- include/configs/TQM5200.h | 26 +++++++++++++++++-------- include/sm501.h | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 67 deletions(-) delete mode 100644 drivers/sm501.h create mode 100644 include/sm501.h diff --git a/CHANGELOG b/CHANGELOG index 93caa794ce..e7fc57cf8a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ Changes for U-Boot 1.1.3: ====================================================================== +* Patch by Detlev Zundel, 31 Mar 2005: + Cleanup duplicate definition of overwrite_console() + +* Update TQM5200 configuration; + prepare for Rev. 200 starter kit boards + * Patch by Scott McNutt, 21 Oct 2004: Add support for Nios-II EPCS Controller core. diff --git a/common/console.c b/common/console.c index 8dbd8e3891..3c535d23d6 100644 --- a/common/console.c +++ b/common/console.c @@ -39,11 +39,9 @@ int console_changed = 0; */ #ifdef CFG_CONSOLE_OVERWRITE_ROUTINE extern int overwrite_console (void); +#define OVERWRITE_CONSOLE overwrite_console () #else -int overwrite_console (void) -{ - return (0); -} +#define OVERWRITE_CONSOLE 0 #endif /* CFG_CONSOLE_OVERWRITE_ROUTINE */ #endif /* CFG_CONSOLE_IS_IN_ENV */ @@ -429,7 +427,7 @@ int console_init_r (void) stdoutname = getenv ("stdout"); stderrname = getenv ("stderr"); - if (overwrite_console () == 0) { /* if not overwritten by config switch */ + if (OVERWRITE_CONSOLE == 0) { /* if not overwritten by config switch */ inputdev = search_device (DEV_FLAGS_INPUT, stdinname); outputdev = search_device (DEV_FLAGS_OUTPUT, stdoutname); errdev = search_device (DEV_FLAGS_OUTPUT, stderrname); diff --git a/drivers/keyboard.c b/drivers/keyboard.c index f12de838f3..1579095558 100644 --- a/drivers/keyboard.c +++ b/drivers/keyboard.c @@ -262,12 +262,10 @@ void handle_scancode(unsigned char scancode) #ifdef CFG_CONSOLE_OVERWRITE_ROUTINE extern int overwrite_console (void); +#define OVERWRITE_CONSOLE overwrite_console () #else -int overwrite_console (void) -{ - return (0); -} -#endif +#define OVERWRITE_CONSOLE 0 +#endif /* CFG_CONSOLE_OVERWRITE_ROUTINE */ int kbd_init (void) { @@ -290,7 +288,7 @@ int kbd_init (void) /* check if this is the standard input device */ if(strcmp(stdinname,DEVNAME)==0) { /* reassign the console */ - if(overwrite_console()) { + if(OVERWRITE_CONSOLE) { return 1; } error=console_assign(stdin,DEVNAME); diff --git a/drivers/sm501.h b/drivers/sm501.h deleted file mode 100644 index d8f26fbf29..0000000000 --- a/drivers/sm501.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Copyright 2002 - * Stäubli Faverges - - * Pierre AUBERT p.aubert@staubli.com - * - * (C) Copyright 2005 - * Martin Krause TQ-Systems GmbH martin.krause@tqs.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 - */ - -/* - * Basic video support for SMI SM501 "Voyager" graphic controller - */ - -#ifndef _SM501_H_ -#define _SM501_H_ - -typedef struct { - unsigned int Index; - unsigned int Value; -} SMI_REGS; - -/* Board specific functions */ -unsigned int board_video_init (void); -void board_validate_screen (unsigned int base); -const SMI_REGS *board_get_regs (void); -int board_get_width (void); -int board_get_height (void); -unsigned int board_video_get_fb (void); - -#endif /* _SM501_H_ */ diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index a5a63443f2..b33f726e8a 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -37,6 +37,7 @@ #define CONFIG_TQM5200 1 /* ... on TQM5200 module */ #undef CONFIG_TQM5200_REV100 /* define for revision 100 modules */ #define CONFIG_STK52XX 1 /* ... on a STK52XX base board */ +#define CONFIG_STK52XX_REV100 1 /* define for revision 100 baseboards */ #define CFG_MPC5XXX_CLKIN 33000000 /* ... running at 33.000000MHz */ @@ -85,6 +86,7 @@ #define CONFIG_EEPRO100 1 #define CFG_RX_ETH_BUFFER 8 /* use 8 rx buffer on eepro100 */ #define CONFIG_NS8382X 1 +#endif /* CONFIG_STK52XX */ #ifdef CONFIG_PCI #define ADD_PCI_CMD CFG_CMD_PCI @@ -105,6 +107,7 @@ #define CONFIG_CONSOLE_EXTRA_INFO #define CONFIG_VIDEO_SW_CURSOR #define CONFIG_SPLASH_SCREEN +#define CFG_CONSOLE_IS_IN_ENV #endif #ifdef CONFIG_VIDEO @@ -373,11 +376,14 @@ * Bit 0 (mask: 0x80000000): 1 * use ALT CAN position: Bits 2-3 (mask: 0x30000000): * 00 -> No Alternatives, CAN1/2 on PSC2 according to PSC2 setting. - * Set for rev 100 modules with an onboard EEPROM (because, - * there I2C1 is used as I2C bus) * 01 -> CAN1 on I2C1, CAN2 on Tmr0/1. - * Set for rev 200 modules + * Use for REV200 STK52XX boards. Do not use with REV100 modules + * (because, there I2C1 is used as I2C bus) * use PSC1 as UART: Bits 28-31 (mask: 0x00000007): 0100 + * use PSC2 as CAN: Bits 25:27 (mask: 0x00000030) + * 000 -> All PSC2 pins are GIOPs + * 001 -> CAN1/2 on PSC2 pins + * Use for REV100 STK52xx boards * use PSC6: * on STK52xx: * use as UART. Pins PSC6_0 to PSC6_3 are used. @@ -392,12 +398,16 @@ #if defined (CONFIG_MINIFAP) # define CFG_GPS_PORT_CONFIG 0x91000004 #elif defined (CONFIG_STK52XX) -# if defined (CONFIG_TQM5200_REV100) -# define CFG_GPS_PORT_CONFIG 0x81500004 -# else -# define CFG_GPS_PORT_CONFIG 0x91500004 +# if defined (CONFIG_STK52XX_REV100) +# define CFG_GPS_PORT_CONFIG 0x81500014 +# else /* STK52xx REV200 and above */ +# if defined (CONFIG_TQM5200_REV100) +# error TQM5200 REV100 not supported on STK52XX REV200 or above +# else/* TQM5200 REV200 and above */ +# define CFG_GPS_PORT_CONFIG 0x91500004 +# endif # endif -#else /* TMQ5200_IP */ +#else /* TMQ5200 Inbetriebnahme-Board */ # define CFG_GPS_PORT_CONFIG 0x81000004 #endif diff --git a/include/sm501.h b/include/sm501.h new file mode 100644 index 0000000000..d8f26fbf29 --- /dev/null +++ b/include/sm501.h @@ -0,0 +1,48 @@ +/* + * (C) Copyright 2002 + * Stäubli Faverges - + * Pierre AUBERT p.aubert@staubli.com + * + * (C) Copyright 2005 + * Martin Krause TQ-Systems GmbH martin.krause@tqs.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 + */ + +/* + * Basic video support for SMI SM501 "Voyager" graphic controller + */ + +#ifndef _SM501_H_ +#define _SM501_H_ + +typedef struct { + unsigned int Index; + unsigned int Value; +} SMI_REGS; + +/* Board specific functions */ +unsigned int board_video_init (void); +void board_validate_screen (unsigned int base); +const SMI_REGS *board_get_regs (void); +int board_get_width (void); +int board_get_height (void); +unsigned int board_video_get_fb (void); + +#endif /* _SM501_H_ */ -- cgit v1.2.3