From: wdenk Date: Wed, 13 Mar 2002 09:55:10 +0000 (+0000) Subject: * Add support for TTTech board (TQM823E + Sharp LQ104V7DS01 Display) X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=63ca77dd6d37b1b356eeabbe48649d8907431009;p=users%2Frw%2Fppcboot.git * Add support for TTTech board (TQM823E + Sharp LQ104V7DS01 Display) * Patch by Stefan Roese, 11 Mar 2002 Fixes for ESD boards * Patch by Frank Panno, 11 Mar 2002: - fix warnings, add CFG_RESET_ADDRESS in include/config_ep8260.h --- diff --git a/CHANGELOG b/CHANGELOG index 0263eb3..6b4c3fb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,14 @@ Modifications for 1.1.6: ====================================================================== +* Add support for TTTech board (TQM823E + Sharp LQ104V7DS01 Display) + +* Patch by Stefan Roese, 11 Mar 2002 + Fixes for ESD boards + +* Patch by Frank Panno, 11 Mar 2002: + - fix warnings, add CFG_RESET_ADDRESS in include/config_ep8260.h + * Add configuration for MicroSys CPU86 board * Patch by Erik Theisen, 9 Mar 2002: diff --git a/MAINTAINERS b/MAINTAINERS index f69046c..64cd3e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -85,6 +85,39 @@ Erik Theisen W7OLMC PPC4xx W7OLMG PPC4xx +Murray Jensen + + cogent_mpc8xx MPC8xx + + cogent_mpc8260 MPC8260 + hymod MPC8260 + +Frank Panno + + ep8260 MPC8260 + +Stefan Roese + + ADCIOP IOP480 (PPC401) + AR405 PPC405GP + CANBT PPC405CR + CPCI405 PPC405GP + CPCIISER4 PPC405GP + DASA_SIM IOP480 (PPC401) + DU405 PPC405GP + OCRTC PPC405GP + ORSG PPC405GP + +Jim Thompson + + MUSENKI MPC8245/8241 + Sandpoint8245 MPC8245 + +Oliver Brown + + sbc8260 MPC8260 + gw8260 MPC8260 + ------------------------------------------------------------------------- Unknown / orphaned boards: @@ -101,30 +134,15 @@ Unknown / orphaned boards: RPXClassic MPC8xx RPXlite MPC8xx SXNI855T MPC8xx - cogent_mpc8xx MPC8xx - ADCIOP PPC4xx - AR405 PPC4xx - CANBT PPC4xx - CPCI405 PPC4xx - CPCIISER4 PPC4xx CRAYL1 PPC4xx - DASA_SIM PPC4xx - DU405 PPC4xx ERIC PPC4xx MIP405 PPC4xx - OCRTC PPC4xx PIP405 PPC4xx WALNUT405 PPC4xx MOUSSE MPC824x - MUSENKI MPC824x - Sandpoint8245 MPC8245 - cogent_mpc8260 MPC8260 - ep8260 MPC8260 - gw8260 MPC8260 - hymod MPC8260 MPC8260ADS MPC8260 RPXsuper MPC8260 rsdproto MPC8260 diff --git a/MAKEALL b/MAKEALL index fc8829d..0cdb279 100755 --- a/MAKEALL +++ b/MAKEALL @@ -25,7 +25,7 @@ LIST_8xx=" \ MHPC NX823 pcu_e RPXClassic \ RPXlite SM850 SPD823TS SXNI855T \ TQM823L TQM823L_LCD TQM850L TQM855L \ - TQM860L TQM860L_FEC \ + TQM860L TQM860L_FEC TTTech \ " ######################################################################### @@ -35,8 +35,8 @@ LIST_8xx=" \ LIST_4xx=" \ ADCIOP AR405 CANBT CPCI405 \ CPCIISER4 CRAYL1 DASA_SIM DU405 \ - ERIC MIP405 OCRTC PIP405 \ - W7OLMC W7OLMG WALNUT405 \ + ERIC MIP405 OCRTC ORSG \ + PIP405 W7OLMC W7OLMG WALNUT405 \ " ######################################################################### diff --git a/Makefile b/Makefile index b91ee00..ba94ea0 100644 --- a/Makefile +++ b/Makefile @@ -450,10 +450,22 @@ TQM860L_FEC_80MHz_config: unconfig } @[ -z "$(findstring _LCD,$@)" ] || \ { echo "#define CONFIG_LCD" >>include/config.h ; \ + echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \ echo "... with LCD display" ; \ } @echo "#include " >>include/config.h +TTTech_config: unconfig + @echo "Configuring for $@ Board..." ; \ + cd ./include ; \ + echo "ARCH = ppc" > config.mk ; \ + echo "BOARD = tqm8xx" >>config.mk ; \ + echo "CPU = mpc8xx" >>config.mk + @echo "/* Automatically generated - do not edit */" >include/config.h + @echo "#define CONFIG_LCD" >>include/config.h + @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h + @echo "#include " >>include/config.h + ######################################################################### ## PPC4xx Systems ######################################################################### diff --git a/board/ep8260/flash.c b/board/ep8260/flash.c index db73059..816fdd2 100644 --- a/board/ep8260/flash.c +++ b/board/ep8260/flash.c @@ -352,7 +352,8 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) */ static int write_dword (flash_info_t *info, ulong dest, unsigned char * pdata) { - ulong start, cl, ch; + ulong start; + ulong cl = 0, ch =0; int flag, i; for (ch=0, i=0; i < 4; i++) diff --git a/board/esd/adciop/pci.c b/board/esd/adciop/pci.c index eb26382..7386a72 100644 --- a/board/esd/adciop/pci.c +++ b/board/esd/adciop/pci.c @@ -67,7 +67,7 @@ unsigned int PCI_Read_CFG_Reg(int BusDevFunc, int Reg, int Width) { unsigned long conAdrVal; unsigned long val; - unsigned long Value; + unsigned long Value = 0; /* generate coded value for CON_ADR register */ diff --git a/board/esd/dasa_sim/pci.c b/board/esd/dasa_sim/pci.c index fcfdebb..5570b65 100644 --- a/board/esd/dasa_sim/pci.c +++ b/board/esd/dasa_sim/pci.c @@ -67,7 +67,7 @@ unsigned int PCI_Read_CFG_Reg(int BusDevFunc, int Reg, int Width) { unsigned long conAdrVal; unsigned long val; - unsigned long Value; + unsigned long Value = 0; /* generate coded value for CON_ADR register */ diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c index 45e0b7e..c634439 100644 --- a/cpu/mpc8xx/lcd.c +++ b/cpu/mpc8xx/lcd.c @@ -40,7 +40,7 @@ /* ** DEBUG SETTINGS */ /************************************************************************/ -#undef LCD_DEBUG +#undef LCD_DEBUG #ifdef LCD_DEBUG #define DEBUGF(fmt,args...) printf(fmt ,##args) @@ -52,8 +52,9 @@ /* ** CONFIG STUFF -- should be moved to board config file */ /************************************************************************/ #define CONFIG_LCD_LOGO -#define LCD_INFO -//#define LCD_TEST_PATTERN +#define LCD_INFO /* Display Logo, (C) and system info */ +/* #define LCD_TEST_PATTERN */ /* color backgnd for frame/color adjust */ +/* #define CFG_INVERT_COLORS */ /* Not needed - adjust vl_dp instead */ /************************************************************************/ /************************************************************************/ @@ -190,6 +191,18 @@ static vidinfo_t panel_info = { #endif /* CONFIG_NEC_NL6648BC20 */ /*----------------------------------------------------------------------*/ +#ifdef CONFIG_SHARP_LQ104V7DS01 +/* + * SHARP LQ104V7DS01. 6.5", 640x480. Active, color, single scan. + */ +static vidinfo_t panel_info = { + 640, 480, 132, 99, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_LOW, + 3, 0, 0, 1, 1, 25, 1, 0, 33 + /* wbl, vpw, lcdac, wbf */ +}; +#endif /* CONFIG_SHARP_LQ104V7DS01 */ +/*----------------------------------------------------------------------*/ + #ifdef CONFIG_SHARP_16x9 /* * Sharp 320x240. Active, color, single scan. It isn't 16x9, and I am @@ -709,10 +722,18 @@ lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue) { volatile immap_t *immr = (immap_t *) CFG_IMMR; volatile cpm8xx_t *cp = &(immr->im_cpm); + unsigned short colreg, *cmap_ptr; - *red = (cp->lcd_cmap[ regno * 2 ] & 0x0f); - *green = (cp->lcd_cmap[(regno * 2) + 1] & 0xf0) >> 4; - *blue = (cp->lcd_cmap[(regno * 2) + 1] & 0x0f); + cmap_ptr = (unsigned short *)&cp->lcd_cmap[regno * 2]; + + colreg = *cmap_ptr; +#ifdef CFG_INVERT_COLORS + colreg ^= 0x0FFF; +#endif + + *red = (colreg >> 8) & 0x0F; + *green = (colreg >> 4) & 0x0F; + *blue = colreg & 0x0F; } #endif /* NOT_USED_SO_FAR */ @@ -723,9 +744,17 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue) { volatile immap_t *immr = (immap_t *) CFG_IMMR; volatile cpm8xx_t *cp = &(immr->im_cpm); + unsigned short colreg, *cmap_ptr; - cp->lcd_cmap[ regno * 2 ] = (red & 0x0F); - cp->lcd_cmap[(regno * 2) + 1] = ((green & 0x0F) << 4) | (blue & 0x0F); + cmap_ptr = (unsigned short *)&cp->lcd_cmap[regno * 2]; + + colreg = ((red & 0x0F) << 8) | + ((green & 0x0F) << 4) | + (blue & 0x0F) ; +#ifdef CFG_INVERT_COLORS + colreg ^= 0x0FFF; +#endif + *cmap_ptr = colreg; DEBUGF ("setcolreg: reg %2d @ %p: R=%02X G=%02X B=%02X => %02X%02X\n", regno, &(cp->lcd_cmap[regno * 2]), @@ -827,7 +856,11 @@ static void bitmap_plot (int x, int y) /* Set color map */ for (i=0; i<(sizeof(bmp_logo_palette)/(sizeof(ushort))); ++i) { - *cmap++ = bmp_logo_palette[i]; + ushort colreg = bmp_logo_palette[i]; +#ifdef CFG_INVERT_COLORS + colreg ^= 0xFFF; +#endif + *cmap++ = colreg; } bmap = &bmp_logo_bitmap[0]; diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c index fb29a9d..6071a09 100644 --- a/cpu/ppc4xx/speed.c +++ b/cpu/ppc4xx/speed.c @@ -190,88 +190,77 @@ void get_sys_info (PPC405_SYS_INFO * sysInfo) } } -#endif /* CONFIG_405GP || CONFIG_405CR */ - -ulong get_gclk_freq (void) +/******************************************** + * get_OPB_freq + * return OPB bus freq in Hz +*********************************************/ +ulong get_OPB_freq (void) { - ulong val; + ulong val = 0; -#if defined(CONFIG_405GP) || defined(CONFIG_405CR) PPC405_SYS_INFO sys_info; get_sys_info (&sys_info); - val = sys_info.freqProcessor; -#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */ - -#ifdef CONFIG_IOP480 - val = 66000000; -#endif + val = sys_info.freqPLB / sys_info.pllOpbDiv; return val; } -/* ------------------------------------------------------------------------- */ + /******************************************** - * get_bus_freq - * return PLB bus freq in Hz + * get_PCI_freq + * return PCI bus freq in Hz *********************************************/ -ulong get_bus_freq (ulong gclk_freq) +ulong get_PCI_freq (void) { ulong val; - -#ifdef CONFIG_405GP PPC405_SYS_INFO sys_info; get_sys_info (&sys_info); - val = sys_info.freqPLB; -#endif /* CONFIG_405GP */ - -#ifdef CONFIG_IOP480 - val = 66; -#endif - -#if !defined(CONFIG_405GP) && (!defined(CONFIG_IOP480)) -#error get_bus_freq() not implemented -#endif - + val = sys_info.freqPLB / sys_info.pllPciDiv; return val; } +#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */ -/******************************************** - * get_OPB_freq - * return OPB bus freq in Hz -*********************************************/ -ulong get_OPB_freq (void) + +ulong get_gclk_freq (void) { - ulong val = 0; + ulong val; -#ifdef CONFIG_405GP +#if defined(CONFIG_405GP) || defined(CONFIG_405CR) PPC405_SYS_INFO sys_info; get_sys_info (&sys_info); - val = sys_info.freqPLB / sys_info.pllOpbDiv; -#else -# error get_OPB_freq() not implemented -#endif /* CONFIG_405GP */ + val = sys_info.freqProcessor; +#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */ + +#ifdef CONFIG_IOP480 + val = 66000000; +#endif return val; } -#if defined(CONFIG_405GP) || defined(CONFIG_405CR) /******************************************** - * get_PCI_freq - * return PCI bus freq in Hz + * get_bus_freq + * return PLB bus freq in Hz *********************************************/ -ulong get_PCI_freq (void) +ulong get_bus_freq (ulong gclk_freq) { ulong val; + +#if defined(CONFIG_405GP) || defined(CONFIG_405CR) PPC405_SYS_INFO sys_info; get_sys_info (&sys_info); - val = sys_info.freqPLB / sys_info.pllPciDiv; + val = sys_info.freqPLB; +#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */ + +#ifdef CONFIG_IOP480 + val = 66; +#endif + return val; } -#endif /* defined(CONFIG_405GP) || defined(CONFIG_405CR) */ -/*---------------------------------------------------------------------- */ diff --git a/include/config_CPU86.h b/include/config_CPU86.h index 8f09367..28f9033 100644 --- a/include/config_CPU86.h +++ b/include/config_CPU86.h @@ -166,8 +166,11 @@ #define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT|CONFIG_BOOTP_BOOTFILESIZE) -#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_EEPROM | \ - CFG_CMD_DATE | CFG_CMD_DOC) +#define CONFIG_COMMANDS (CONFIG_CMD_DFL | \ + CFG_CMD_EEPROM | \ + CFG_CMD_DATE | \ + CFG_CMD_I2C | \ + CFG_CMD_DOC) /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include diff --git a/include/config_ORSG.h b/include/config_ORSG.h index 03291b3..e078d4f 100644 --- a/include/config_ORSG.h +++ b/include/config_ORSG.h @@ -205,9 +205,10 @@ /*----------------------------------------------------------------------- * Cache Configuration */ -#define CFG_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ +#define CFG_DCACHE_SIZE 8192 /* For IBM 405 CPUs */ +#define CFG_CACHELINE_SIZE 32 /* ... */ #if (CONFIG_COMMANDS & CFG_CMD_KGDB) -#define CFG_CACHELINE_SHIFT 4 /* log base 2 of the above value */ +#define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */ #endif /* diff --git a/include/config_TQM823L.h b/include/config_TQM823L.h index 70a53c6..94c4dfd 100644 --- a/include/config_TQM823L.h +++ b/include/config_TQM823L.h @@ -37,7 +37,7 @@ #define CONFIG_TQM823L 1 /* ...on a TQM8xxL module */ #ifdef CONFIG_LCD /* with LCD controller ? */ -#define CONFIG_NEC_NL6648BC20 1 /* use NEC NL6648BC20 display */ +/* #define CONFIG_NEC_NL6648BC20 1 / * use NEC NL6648BC20 display */ #endif #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ diff --git a/include/config_ep8260.h b/include/config_ep8260.h index 040165b..4f2064d 100644 --- a/include/config_ep8260.h +++ b/include/config_ep8260.h @@ -73,6 +73,12 @@ /* #define CFG_SBC_BOOT_LOW 1 */ /* only for HRCW */ /* #undef CFG_SBC_BOOT_LOW */ +/* The reset command will not work as expected if the reset address does + * not point to the correct address. + */ + +#define CFG_RESET_ADDRESS 0xFFF00100 + /* What should the base address of the main FLASH be and how big is * it (in MBytes)? This must contain TEXT_BASE from board/ep8260/config.mk * The main FLASH is whichever is connected to *CS0. PPCBOOT expects