You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(79) |
Aug
(27) |
Sep
(64) |
Oct
(202) |
Nov
(31) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(173) |
Mar
(13) |
Apr
(140) |
May
(75) |
Jun
(1) |
Jul
(37) |
Aug
(14) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(2) |
2003 |
Jan
(51) |
Feb
(12) |
Mar
(18) |
Apr
(24) |
May
(1) |
Jun
|
Jul
|
Aug
(72) |
Sep
(12) |
Oct
(18) |
Nov
(60) |
Dec
(26) |
2004 |
Jan
(1) |
Feb
(40) |
Mar
(3) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(5) |
2006 |
Jan
(13) |
Feb
(5) |
Mar
(8) |
Apr
(13) |
May
(7) |
Jun
(6) |
Jul
(10) |
Aug
(6) |
Sep
(6) |
Oct
(35) |
Nov
(20) |
Dec
(10) |
2007 |
Jan
(13) |
Feb
(9) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(54) |
Jun
(78) |
Jul
(35) |
Aug
(21) |
Sep
(21) |
Oct
(29) |
Nov
(10) |
Dec
(5) |
2010 |
Jan
|
Feb
|
Mar
(26) |
Apr
(55) |
May
(73) |
Jun
(63) |
Jul
(38) |
Aug
(39) |
Sep
(19) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Erik M. <J.A...@it...> - 2002-01-15 22:42:44
|
On Mon, Jan 14, 2002 at 07:30:55PM -0800, Christopher Hoover wrote: > Any interest in the flash commands I wrote? I placed the code into a > separate file (see below) and hacked the commands to use (u32 *start, > u32 nwords) ranges as that seems to be the preferred interface for the > flash functions. If a different organization is preferred, let me know. > > [The code will have to changed a bit once the new partition code goes > in, but hopefully the changes will be isolated to a single function, > parse_partition.] Agreed. The only thing I don't like is the print_flash_map() function. Printing the complete flash map is really only a debug function, it isn't needed for normal use. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Erik M. <J.A...@it...> - 2002-01-15 22:22:00
|
On Mon, Jan 14, 2002 at 09:44:31PM -0700, Russ Dill wrote: > On Mon, 2002-01-14 at 19:02, Christopher Hoover wrote: > > Update of /cvsroot/blob/blob/include/blob > > In directory usw-pr-cvs1:/tmp/cvs-serv30485/include/blob > > > > Modified Files: > > linux.h > > Log Message: > > use official rmk-issued architecture number for ARCH_BADGE4 > > do you think it is time to move the arch number to the <board>.c or > <board>.h file? One of my plans was to generate the architecture numbers at compile time from the arch/arm/tools/mach-types file in the kernel tree. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |
From: Russ D. <Rus...@as...> - 2002-01-15 04:43:12
|
On Mon, 2002-01-14 at 19:02, Christopher Hoover wrote: > Update of /cvsroot/blob/blob/include/blob > In directory usw-pr-cvs1:/tmp/cvs-serv30485/include/blob > > Modified Files: > linux.h > Log Message: > use official rmk-issued architecture number for ARCH_BADGE4 do you think it is time to move the arch number to the <board>.c or <board>.h file? |
From: Russ D. <Rus...@as...> - 2002-01-15 04:41:53
|
On Mon, 2002-01-14 at 18:59, Christopher Hoover wrote: > Update of /cvsroot/blob/blob/src/blob > In directory usw-pr-cvs1:/tmp/cvs-serv29871/src/blob > > Modified Files: > main.c param_block.c > Log Message: > Make parameters really work by adding include of <arch.h> to param_block.c. > Zero autoboot timeout disables autoboot. feel free to tear up paramater block stuff, especially all the stuff about configuration states. It needs to be started off a bit simpler, so that the paramaters can be easily written from blob. Multiple boot configurations will be addressed later. |
From: Christopher H. <ch...@fr...> - 2002-01-15 03:34:03
|
Erik et al: Any interest in the flash commands I wrote? I placed the code into a separate file (see below) and hacked the commands to use (u32 *start, u32 nwords) ranges as that seems to be the preferred interface for the flash functions. If a different organization is preferred, let me know. [The code will have to changed a bit once the new partition code goes in, but hopefully the changes will be isolated to a single function, parse_partition.] Cheers, Christopher. ch...@mu... ch...@hp... p.s. This is last set of my changes that haven't hit the cvs tree. ? diffs ? src/blob/badge4-low.c ? src/blob/flash-commands.c Index: include/blob/flash.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/flash.h,v retrieving revision 1.9 diff -a -u -r1.9 flash.h --- include/blob/flash.h 2001/12/31 00:28:53 1.9 +++ include/blob/flash.h 2002/01/15 03:17:55 @@ -93,6 +93,6 @@ int flash_lock_region(u32 *start, u32 nwords); int flash_unlock_region(u32 *start, u32 nwords); int flash_query_region(u32 *start, u32 nwords); - +void print_flash_map(); #endif Index: src/blob/Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.16 diff -a -u -r1.16 Makefile.am --- src/blob/Makefile.am 2002/01/12 01:45:57 1.16 +++ src/blob/Makefile.am 2002/01/15 03:17:55 @@ -126,6 +126,7 @@ bootldrpart.c \ commands.c \ flash.c \ + flash-commands.c \ initcalls.c \ linux.c \ main.c \ Index: src/blob/flash.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/flash.c,v retrieving revision 1.11 diff -a -u -r1.11 flash.c --- src/blob/flash.c 2002/01/03 16:07:17 1.11 +++ src/blob/flash.c 2002/01/15 03:17:55 @@ -143,21 +143,7 @@ } #ifdef BLOB_DEBUG - SerialOutputString("Flash map:\n"); - for(i = 0; i < num_flash_blocks; i++) { - SerialOutputString(" 0x"); - SerialOutputHex(flash_blocks[i].size); - SerialOutputString(" @ 0x"); - SerialOutputHex(flash_blocks[i].start); - SerialOutputString(" ("); - SerialOutputDec(flash_blocks[i].size / 1024); - SerialOutputString(" kB), "); - - if(!flash_blocks[i].lockable) - SerialOutputString("not "); - - SerialOutputString("lockable\n"); - } + print_flash_map(); #endif } @@ -331,7 +317,35 @@ } +void print_flash_map(void) +{ + int i; + + SerialOutputString("Flash map:\n"); + for(i = 0; i < num_flash_blocks; i++) { + u32 start = flash_blocks[i].start; + + SerialOutputDec(i); + SerialOutputString(":\t0x"); + SerialOutputHex(flash_blocks[i].size); + SerialOutputString(" @ 0x"); + SerialOutputHex(start); + SerialOutputString(" ("); + SerialOutputDec(flash_blocks[i].size / 1024); + SerialOutputString(" kB),\t"); + if(flash_blocks[i].lockable && + flash_driver->query_block_lock) { + if ((flash_driver->query_block_lock)((u32 *) start)) + SerialOutputString("locked"); + else + SerialOutputString("unlocked"); + } else { + SerialOutputString("not lockable"); + } + SerialOutputString("\n"); + } +} /* given an address, return the flash block index number (or negative * error number otherwise /*------------------------------------------------------------------------- * Filename: flash-commands.c * Version: $Id$ * Copyright: Copyright (C) 2002, Hewlett-Packard Company * Author: Christopher Hoover <ch...@hp...> * Description: Flash commands for blob * Created at: Tue Jan 15 02:27:30 UTC 2002 *-----------------------------------------------------------------------*/ /* * flash-commands.c: Flash commands for blob * * Copyright (C) 2002 Hewlett-Packard Company * * 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 * */ #ident "$Id$" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/util.h> #include <blob/serial.h> #include <blob/flash.h> #include <blob/command.h> static int parse_partition(char *s, u32 **addr, u32 *length) { /* this will eventually be replaced by some functionality in the partition manager */ if(strncmp(s, "blob", 5) == 0) { *addr = (u32 *)BLOB_FLASH_BASE; *length = BLOB_FLASH_LEN; #ifdef PARAM_START } else if(strncmp(s, "param", 6) == 0) { *addr = (u32 *)PARAM_FLASH_BASE; *length = PARAM_FLASH_LEN; #endif } else if(strncmp(s, "kernel", 7) == 0) { *addr = (u32 *)KERNEL_FLASH_BASE; *length = KERNEL_FLASH_LEN; } else if(strncmp(s, "ramdisk", 8) == 0) { *addr = (u32 *)RAMDISK_FLASH_BASE; *length = RAMDISK_FLASH_LEN; } else { return -EINVAL; } return 0; } static int FlLock(int argc, char *argv[]) { int rv; u32 *addr, length; if(argc != 2) return -ENOPARAMS; if (!flash_driver->unlock_block) { printerror(EINVAL, argv[1]); return 0; } rv = parse_partition(argv[1], &addr, &length); if (rv < 0) { printerror(rv, argv[1]); return 0; } rv = flash_lock_region(addr, length >> 2); if (rv < 0) { printerror(rv, argv[1]); return 0; } return 0; } static char fllockhelp[] = "fllock {blob|param|kernel|ramdisk}\n" "Lock <argument> region of flash\n"; __commandlist(FlLock, "fllock", fllockhelp); static int FlUnlock(int argc, char *argv[]) { int rv; u32 *addr, length; if(argc != 2) return -ENOPARAMS; if (!flash_driver->unlock_block) { printerror(EINVAL, argv[1]); return 0; } rv = parse_partition(argv[1], &addr, &length); if (rv < 0) { printerror(rv, argv[1]); return 0; } rv = flash_unlock_region(addr, length >> 2); if (rv < 0) { printerror(rv, argv[1]); return 0; } return 0; } static char flunlockhelp[] = "flunlock {blob|param|kernel|ramdisk}\n" "Unlock <argument> region of flash\n"; __commandlist(FlUnlock, "flunlock", flunlockhelp); static int FlErase(int argc, char *argv[]) { int rv; u32 *addr, length; if(argc != 2) return -ENOPARAMS; if (!flash_driver->unlock_block) { printerror(EINVAL, argv[1]); return 0; } rv = parse_partition(argv[1], &addr, &length); if (rv < 0) { printerror(rv, argv[1]); return 0; } rv = flash_erase_region(addr, length >> 2); if (rv < 0) { printerror(rv, argv[1]); return 0; } return 0; } static char flerasehelp[] = "flerase {blob|param|kernel|ramdisk}\n" "Erase <argument> region of flash\n"; __commandlist(FlErase, "flerase", flerasehelp); static int FlMap(int argc, char *argv[]) { if(argc != 1) return -ENOPARAMS; print_flash_map(); return 0; } static char flmaphelp[] = "flmap"; __commandlist(FlMap, "flmap", flmaphelp); |
From: Christopher H. <ch...@us...> - 2002-01-15 02:57:47
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv9096/src/blob Modified Files: main.c Log Message: squelch double error message Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- main.c 2002/01/15 01:59:34 1.25 +++ main.c 2002/01/15 02:57:44 1.26 @@ -264,7 +264,7 @@ retval = set_download_parameters(argv[1], &startAddress, &bufLen, &numRead, &digest); if (retval < 0) - return -EINVAL; + return 0; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { SerialOutputString("Switching to "); @@ -345,7 +345,7 @@ retval = set_download_parameters(argv[1], &startAddress, &bufLen, &numRead, &digest); if (retval < 0) - return -EINVAL; + return 0; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { SerialOutputString("Switching to "); |
From: Christopher H. <ch...@us...> - 2002-01-15 02:02:21
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv30485/include/blob Modified Files: linux.h Log Message: use official rmk-issued architecture number for ARCH_BADGE4 Index: linux.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/linux.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- linux.h 2001/12/27 18:27:37 1.4 +++ linux.h 2002/01/15 02:02:18 1.5 @@ -35,7 +35,7 @@ #if defined ASSABET # define ARCH_NUMBER (25) #elif defined BADGE4 -# define ARCH_NUMBER (138) +# define ARCH_NUMBER (148) #elif defined BRUTUS # define ARCH_NUMBER (16) #elif defined CLART |
From: Christopher H. <ch...@us...> - 2002-01-15 01:59:37
|
Update of /cvsroot/blob/blob/utils/mkparamblock In directory usw-pr-cvs1:/tmp/cvs-serv29871/utils/mkparamblock Modified Files: mkparamblock.c Log Message: Make parameters really work by adding include of <arch.h> to param_block.c. Zero autoboot timeout disables autoboot. Index: mkparamblock.c =================================================================== RCS file: /cvsroot/blob/blob/utils/mkparamblock/mkparamblock.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mkparamblock.c 2002/01/06 18:57:31 1.8 +++ mkparamblock.c 2002/01/15 01:59:34 1.9 @@ -3,6 +3,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <limits.h> #include <sys/stat.h> #define USE_BLOB_TOGETHER_WITH_LIBC #include <blob/param_block.h> @@ -87,7 +88,8 @@ tag.hdr.conf_mask = 0; tag.hdr.conf = 0; - if ((tag.u.bootdelay.delay = strtoul(line, 0, 0)) <= 0) return -1; + if ((tag.u.bootdelay.delay = strtoul(line, 0, 0)) == ULONG_MAX) + return -1; fwrite(&tag, ptag_size(ptag_bootdelay), 4, fp); return 0; |
From: Christopher H. <ch...@us...> - 2002-01-15 01:59:37
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv29871/src/blob Modified Files: main.c param_block.c Log Message: Make parameters really work by adding include of <arch.h> to param_block.c. Zero autoboot timeout disables autoboot. Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- main.c 2002/01/15 01:51:07 1.24 +++ main.c 2002/01/15 01:59:34 1.25 @@ -77,8 +77,6 @@ { int numRead = 0; char commandline[MAX_COMMANDLINE_LENGTH]; - int i; - int retval = 0; #ifdef PARAM_START u32 conf; #endif @@ -149,25 +147,32 @@ if(blob_status.load_ramdisk) do_reload("ramdisk"); - /* wait 10 seconds before starting autoboot */ - SerialOutputString("Autoboot in progress, press any key to stop "); - for(i = 0; i < blob_status.boot_delay; i++) { - serial_write('.'); + if (blob_status.boot_delay > 0) { + int i; + int retval = 0; - retval = SerialInputBlock(commandline, 1, 1); + /* wait 10 seconds before starting autoboot */ + SerialOutputString("Autoboot ("); + SerialOutputDec(blob_status.boot_delay); + SerialOutputString(" seconds) in progress, press any key to stop "); + for(i = 0; i < blob_status.boot_delay; i++) { + serial_write('.'); - if(retval > 0) - break; - } + retval = SerialInputBlock(commandline, 1, 1); - /* no key was pressed, so proceed booting the kernel */ - if(retval == 0) { - commandline[0] = '\0'; - parse_command("boot"); - } + if(retval > 0) + break; + } - SerialOutputString("\nAutoboot aborted\n"); - SerialOutputString("Type \"help\" to get a list of commands\n"); + /* no key was pressed, so proceed booting the kernel */ + if(retval == 0) { + commandline[0] = '\0'; + parse_command("boot"); + } + + SerialOutputString("\nAutoboot aborted\n"); + SerialOutputString("Type \"help\" to get a list of commands\n"); + } /* the command loop. endless, of course */ for(;;) { @@ -177,6 +182,8 @@ numRead = GetCommand(commandline, MAX_COMMANDLINE_LENGTH, 600); if(numRead > 0) { + int retval; + if((retval = parse_command(commandline)) < 0 ) printerror(retval, NULL); } Index: param_block.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/param_block.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- param_block.c 2002/01/03 16:07:18 1.5 +++ param_block.c 2002/01/15 01:59:34 1.6 @@ -35,13 +35,16 @@ # include <blob/config.h> #endif +#include <blob/arch.h> #include <blob/types.h> #include <blob/param_block.h> #include <blob/main.h> #include <blob/util.h> #include <blob/sa1100.h> - +#if (defined(PARAM_START) && !defined(PARAM_LEN)) +#error If PARAM_START is defined, PARAM_LEN must be too. +#endif /* * Paramater Tag parsing. |
From: Christopher H. <ch...@us...> - 2002-01-15 01:59:37
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv29871/include/blob/arch Modified Files: shannon.h Log Message: Make parameters really work by adding include of <arch.h> to param_block.c. Zero autoboot timeout disables autoboot. Index: shannon.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/shannon.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- shannon.h 2001/12/08 07:04:30 1.5 +++ shannon.h 2002/01/15 01:59:34 1.6 @@ -64,8 +64,6 @@ #define PARAM_RAM_BASE (0xc8040000) #define RAMDISK_RAM_BASE (0xd0000000) -#define PARAM_START PARAM_RAM_BASE - /* and where do they live in flash */ #define BLOB_FLASH_BASE (0x00000000) #define BLOB_FLASH_LEN (64 * 1024) @@ -76,6 +74,9 @@ #define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) #define RAMDISK_FLASH_LEN (4 * 1024 * 1024 - BLOB_FLASH_LEN - PARAM_FLASH_LEN - KERNEL_FLASH_LEN) +#warning "check these defines" +#define PARAM_START PARAM_FLASH_BASE +#define PARAM_LEN PARAM_FLASH_LEN /* the position of the kernel boot parameters */ #define BOOT_PARAMS (0xc0000100) |
From: Christopher H. <ch...@us...> - 2002-01-15 01:51:10
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv28230/src/blob Modified Files: main.c Log Message: Don't continue with download if set_download_parameters fails. Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- main.c 2002/01/07 14:48:25 1.23 +++ main.c 2002/01/15 01:51:07 1.24 @@ -256,6 +256,8 @@ retval = set_download_parameters(argv[1], &startAddress, &bufLen, &numRead, &digest); + if (retval < 0) + return -EINVAL; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { SerialOutputString("Switching to "); @@ -335,6 +337,8 @@ retval = set_download_parameters(argv[1], &startAddress, &bufLen, &numRead, &digest); + if (retval < 0) + return -EINVAL; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { SerialOutputString("Switching to "); |
From: Christopher H. <ch...@us...> - 2002-01-15 01:45:05
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv27195/include/blob/arch Modified Files: badge4.h jornada720.h Log Message: Latest port for HPL BadgePAD 4 and HP Jornada 720. Both are thought to work well. Index: badge4.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/badge4.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- badge4.h 2001/12/27 18:27:37 1.1 +++ badge4.h 2002/01/15 01:45:01 1.2 @@ -44,26 +44,27 @@ /* the base address were BLOB is loaded by the first stage loader */ -#define BLOB_ABS_BASE_ADDR (0xc0200400) +#define BLOB_ABS_BASE_ADDR (0x08000400) /* sram */ /* where do various parts live in RAM */ #define BLOB_RAM_BASE (0xc0100000) #define KERNEL_RAM_BASE (0xC0008000) #define PARAM_RAM_BASE (0xc0110000) -#define RAMDISK_RAM_BASE (0xC0400000) +#define RAMDISK_RAM_BASE (0xC0600000) /* and where do they live in flash */ #define BLOB_FLASH_BASE (0x00000000) -#define BLOB_FLASH_LEN (0x0000A000) +#define BLOB_FLASH_LEN (0x00002000 * 6) #define PARAM_FLASH_BASE (BLOB_FLASH_BASE + BLOB_FLASH_LEN) -#define PARAM_FLASH_LEN (0x00006000) +#define PARAM_FLASH_LEN (0x00002000 * 2) #define KERNEL_FLASH_BASE (PARAM_FLASH_BASE + PARAM_FLASH_LEN) -#define KERNEL_FLASH_LEN (1 * 1024 * 1024) +#define KERNEL_FLASH_LEN (0x00010000 * 20) #define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) -#define RAMDISK_FLASH_LEN (4 * 1024 * 1024 - KERNEL_FLASH_LEN - PARAM_FLASH_LEN - BLOB_FLASH_LEN) +#define RAMDISK_FLASH_LEN (0x00010000 * 43) #define PARAM_START PARAM_FLASH_BASE +#define PARAM_LEN PARAM_FLASH_LEN /* the position of the kernel boot parameters */ #define BOOT_PARAMS (0xc0000100) @@ -98,7 +99,7 @@ /* On CS5: SA-1111 */ #define BADGE4_CS5 \ - (MSC_RT_VARLAT_345|MSC_RBW16|MSC_RDF(31)|MSC_RDN(31)|MSC_RRR(7)) + (MSC_RT_SRAM_012|MSC_RBW32|MSC_RDF(31)|MSC_RDN(31)|MSC_RRR(7)) #define BADGE4_MSC0 (BADGE4_CS0 | (BADGE4_CS1<<16)) /* was: 0xfff9fffc */ #define BADGE4_MSC1 (BADGE4_CS2 | (BADGE4_CS3<<16)) /* was: 0x0000fff9 */ Index: jornada720.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/jornada720.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jornada720.h 2001/12/27 18:27:37 1.1 +++ jornada720.h 2002/01/15 01:45:01 1.2 @@ -51,19 +51,20 @@ #define BLOB_RAM_BASE (0xc0100000) #define KERNEL_RAM_BASE (0xC0008000) #define PARAM_RAM_BASE (0xc0110000) -#define RAMDISK_RAM_BASE (0xC0400000) +#define RAMDISK_RAM_BASE (0xC0600000) /* and where do they live in flash */ #define BLOB_FLASH_BASE (0x00000000) -#define BLOB_FLASH_LEN (128 * 1024) +#define BLOB_FLASH_LEN (1 * 256 * 1024) #define PARAM_FLASH_BASE (BLOB_FLASH_BASE + BLOB_FLASH_LEN) -#define PARAM_FLASH_LEN (128 * 1024) +#define PARAM_FLASH_LEN (1 * 256 * 1024) #define KERNEL_FLASH_BASE (PARAM_FLASH_BASE + PARAM_FLASH_LEN) -#define KERNEL_FLASH_LEN (1 * 1024 * 1024) +#define KERNEL_FLASH_LEN (4 * 256 * 1024) #define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) -#define RAMDISK_FLASH_LEN (2 * 1024 * 1024) +#define RAMDISK_FLASH_LEN (8 * 256 * 1024) -#define PARAM_START PARAM_RAM_BASE +#define PARAM_START PARAM_FLASH_BASE +#define PARAM_LEN PARAM_FLASH_LEN /* the position of the kernel boot parameters */ #define BOOT_PARAMS (0xc0000100) @@ -118,7 +119,8 @@ # define MSC0_VALUE JORNADA720_MSC0 /* 0x10 MSC0 */ # define MSC1_VALUE JORNADA720_MSC1 /* 0x14 MSC1 */ # define MECR_VALUE 0x98c698c6 /* 0x18 MECR */ -# define MDREFR_VALUE DO_NOT_USE_THIS_VALUE__GETS_AUTOMAGICALLY_COMPUTED +# define MDREFR_DONT_BELIEVE_IN_MAGIC +# define MDREFR_VALUE 0x307402a1 /* 0x1C MDREFR */ # define MDCAS20_VALUE 0xd1284142 /* 0x20 MDCAS20 */ # define MDCAS21_VALUE 0x72249529 /* 0x24 MDCAS21 */ # define MDCAS22_VALUE 0x78414351 /* 0x28 MDCAS22 */ |
From: Christopher H. <ch...@us...> - 2002-01-15 01:45:04
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv27195/src/blob Modified Files: badge4.c jornada720.c memsetup-sa1110.S Log Message: Latest port for HPL BadgePAD 4 and HP Jornada 720. Both are thought to work well. Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- badge4.c 2002/01/03 16:07:17 1.3 +++ badge4.c 2002/01/15 01:45:01 1.4 @@ -67,12 +67,51 @@ static void init_hardware(void) { - // GPIO 19 and 20 specify SDRAM "type". - // These settings are for 12 row bits, 9 col bits. - // ### Incorporate SPD code here. - GPDR |= (GPIO_GPIO19 | GPIO_GPIO20); + /* + * Grab a paper bag. This is ugly. + * + * We have to do part of the SA-1111 initialization here. + * Whenever we pull down GPIO_SA1111_NRST (GPIO 25, 1111_RST~ + * on the schematic), the DRAM goes to hell as that GPIO is + * also wired into the CPLD that controls the DRAM interface. + * Argh. + * + * The only reason the following works is that we're running + * blob out of sram. (The same kind of thing would also work + * when running out of flash, but there's no good place to + * hook int platform-specific initialization in the blob + * loader in the short window when it is running out of + * flash. + */ + + /* Asert nRESET. */ + GPCR = GPIO_GPIO25; + GPDR |= GPIO_GPIO25; + + /* + * Set up the 3.6864MHz clock on GPIO 27 for the SA-1111: + * (SA-1110 Developer's Manual, section 9.1.2.1) + */ + GAFR |= GPIO_32_768kHz; + GPDR |= GPIO_32_768kHz; + TUCR = TUCR_3_6864MHz; + + /* De-assert nRESET */ + GPSR = GPIO_GPIO25; + + /* + * The SA-1111 initialization is not yet done, but Linux + * can do the rest. + */ + + /* + * GPIO 19 and 20 specify SDRAM "type". + * These settings are for 12 row bits, 9 col bits. + * ### Incorporate SPD code here. + */ GPSR = GPIO_GPIO19; GPCR = GPIO_GPIO20; + GPDR |= (GPIO_GPIO19 | GPIO_GPIO20); /* select serial driver */ serial_driver = &sa11x0_serial_driver; Index: jornada720.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/jornada720.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- jornada720.c 2002/01/03 16:07:18 1.3 +++ jornada720.c 2002/01/15 01:45:01 1.4 @@ -66,24 +66,23 @@ } -static void init_flash_driver(void) +static void init_driver(void) { flash_descriptors = jornada720_flash_descriptors; flash_driver = &intel32_flash_driver; flash_driver->enable_vpp = jornada720_enable_vpp; flash_driver->disable_vpp = jornada720_disable_vpp; + + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; } -__initlist(init_flash_driver, INIT_LEVEL_DRIVER_SELECTION); +__initlist(init_driver, INIT_LEVEL_DRIVER_SELECTION); -static void init_hardware(void) +static void init_hardware_plus_one(void) { - PPSR &= ~(GPIO_GPIO10 | GPIO_GPIO7); - PPDR |= (GPIO_GPIO10 | GPIO_GPIO7); - -#warning "Please check this code!" /* Careful over here! the timer might not yet be initialised * at this point, so calling msleep() is unsafe! The best way * to make sure that it is, is to put the GPIO stuff in a @@ -91,13 +90,14 @@ * INIT_LEVEL_INITIAL_HARDWARE+1. The serial port stuff can be * called without problems at INIT_LEVEL_INITIAL_HARDWARE -- Erik */ + + PPSR &= ~(GPIO_GPIO10 | GPIO_GPIO7); + PPDR |= GPIO_GPIO10 | GPIO_GPIO7; + msleep(10 * 1000); /* Take the MCU out of reset mode */ PPSR |= GPIO_GPIO10; - - /* select serial driver */ - serial_driver = &sa11x0_serial_driver; } -__initlist(init_hardware, INIT_LEVEL_DRIVER_SELECTION); +__initlist(init_hardware_plus_one, INIT_LEVEL_INITIAL_HARDWARE + 1); Index: memsetup-sa1110.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memsetup-sa1110.S,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- memsetup-sa1110.S 2001/12/27 18:27:37 1.8 +++ memsetup-sa1110.S 2002/01/15 01:45:01 1.9 @@ -61,7 +61,11 @@ .long MSC0_VALUE /* 0x10 MSC0 */ .long MSC1_VALUE /* 0x14 MSC1 */ .long MECR_VALUE /* 0x18 MECR */ +#ifdef MDRFER_DONT_BELIEVE_IN_MAGIC + .long MDREFR_VALUE +#else .long 0xdeadbeef /* 0x1C MDREFR */ +#endif .long MDCAS20_VALUE /* 0x20 MDCAS20 */ .long MDCAS21_VALUE /* 0x24 MDCAS21 */ .long MDCAS22_VALUE /* 0x28 MDCAS22 */ @@ -97,6 +101,10 @@ ldr r2, [r1, #MDCAS22 ] str r2, [r0, #MDCAS22 ] +#ifdef MDREFR_DONT_BELIEVE_IN_MAGIC + ldr r2, [r1, #MDREFR ] + str r2, [r0, #MDREFR ] +#else /* clear KxDB2 */ ldr r2, [ r0, #MDREFR ] bic r2, r2, #MDREFR_K0DB2 @@ -129,6 +137,7 @@ ldr r2, [ r0, #MDREFR ] orr r2, r2, #MDREFR_E1PIN str r2, [ r0, #MDREFR ] +#endif /* Issue read requests to disabled bank to start refresh */ ldr r1, MEM_START |
From: Christopher H. <ch...@us...> - 2002-01-15 01:32:50
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv24809/src/blob Modified Files: intel16.c intel32.c Log Message: Cleaned up code, increased conformance with Intel's CFI documentation, improved status reporting, and added a timeout mechanism so that (hopefully) the code never hangs while talking to the flash. Index: intel16.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/intel16.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- intel16.c 2002/01/03 16:07:17 1.4 +++ intel16.c 2002/01/15 01:32:47 1.5 @@ -1,5 +1,5 @@ /* - * intel16.c: Intel 16 bit flash driver + * intel16: Intel 16 bit flash driver * * Copyright (C) 2001 Erik Mouw (J.A...@it...) * Copyright (C) 1999 Jan-Derk Bakker (J.D...@it...) @@ -30,7 +30,7 @@ #include <blob/flash.h> #include <blob/util.h> #include <blob/serial.h> - +#include <blob/time.h> /* flash commands for a single 16 bit intel flash chip */ #define READ_ARRAY 0x000000FF @@ -39,9 +39,14 @@ #define PGM_SETUP 0x00000040 #define STATUS_READ 0x00000070 #define STATUS_CLEAR 0x00000050 -#define STATUS_BUSY 0x00000080 + +#define STATUS_READY 0x00000080 +#define STATUS_ERASE_SUSP 0x00000040 #define STATUS_ERASE_ERR 0x00000020 #define STATUS_PGM_ERR 0x00000010 +#define STATUS_VPPLOW_ERR 0x00000008 +#define STATUS_PGM_SUSP 0x00000004 +#define STATUS_LOCKED_ERR 0x00000002 #define CONFIG_SETUP 0x00000060 #define LOCK_SECTOR 0x00000001 @@ -50,15 +55,86 @@ #define LOCK_STATUS_LOCKED 0x00000001 #define LOCK_STATUS_LOCKEDDOWN 0x00000002 +#define WRITE_ERROR_MASK \ + (STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define ERASE_ERROR_MASK \ + (STATUS_ERASE_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define LOCK_ERROR_MASK \ + (STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define CONFIG_ERROR_MASK \ + (STATUS_ERASE_ERR|STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define FLASH_TIMEOUT (20) +static void clear_status(u16 *addr) +{ + *addr = STATUS_CLEAR; + barrier(); +} +static int get_status(u16 *addr) +{ + u32 start, end; + + start = TimerGetTime(); + end = start + (FLASH_TIMEOUT * TICKS_PER_SECOND); + + for (;;) { + u16 status; + + status = *addr; + barrier(); + + if ((status & STATUS_READY) == STATUS_READY) + return status; + + if (TimerGetTime() >= end) + return -1; + } +} + +static void print_flash_error(const char *what, u16 *addr, int status) +{ + serial_write('\n'); + SerialOutputString(what); + SerialOutputString(" failed for address 0x"); + SerialOutputHex((u32) addr); + serial_write('\n'); + + SerialOutputString(" status = 0x"); + SerialOutputHex(status); + serial_write('\n'); + + if (status < 0) { + SerialOutputString(" { timeout fetching status }"); + } else { + SerialOutputString(" { "); + +#define PRINT(x) \ + if (status & x) SerialOutputString(#x " ") + + PRINT(STATUS_READY); + PRINT(STATUS_ERASE_SUSP); + PRINT(STATUS_ERASE_ERR); + PRINT(STATUS_PGM_ERR); + PRINT(STATUS_VPPLOW_ERR); + PRINT(STATUS_PGM_SUSP); + PRINT(STATUS_LOCKED_ERR); + +#undef PRINT + + serial_write('}'); + } + + SerialOutputString("\n\n"); +} + +/* erases a flash block at the given address */ static int do_erase(u16 *addr) { - u16 result; + int status; - *addr = STATUS_CLEAR; - barrier(); + clear_status(addr); /* prepare for erase */ *addr = ERASE_SETUP; @@ -68,41 +144,27 @@ *addr = ERASE_CONFIRM; barrier(); - /* status check */ - do { - *addr = STATUS_READ; - barrier(); - result = *addr; - barrier(); - } while((~result & STATUS_BUSY) != 0); + status = get_status(addr); /* put flash back into Read Array mode */ *addr = READ_ARRAY; barrier(); - if((result & STATUS_ERASE_ERR) != 0) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ " failed, result=0x"); - SerialOutputHex(result); - SerialOutputString(", addr=0x"); - SerialOutputHex((u32) addr); - serial_write('\n'); -#endif + if ((status < 0) || + ((status & ERASE_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, addr, status); return -EFLASHERASE; } return 0; } - - - +/* write a flash block at a given location */ static int do_write(u16 *dst, const u16* src) { - u16 result; + int status; - *dst = STATUS_CLEAR; - barrier(); + clear_status(dst); /* setup flash for writing */ *dst = PGM_SETUP; @@ -113,39 +175,27 @@ barrier(); /* status check */ - do { - *dst = STATUS_READ; - barrier(); - - result = *dst; - barrier(); - } while((~result & STATUS_BUSY) != 0); + status = get_status(dst); /* put flash back into Read Array mode */ *dst = READ_ARRAY; barrier(); - if(((result & STATUS_PGM_ERR) != 0) || (*dst != *src)) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ " failed, result=0x"); - SerialOutputHex(result); - SerialOutputString(", dst=0x"); - SerialOutputHex((u32) dst); - SerialOutputString(", *dst=0x"); - SerialOutputHex(*dst); - SerialOutputString(", *src=0x"); - SerialOutputHex(*src); - serial_write('\n'); + if ((status < 0) || + ((status & WRITE_ERROR_MASK) != 0) || + (*dst != *src)) { +#ifdef FLASH_DEBUG + /* this often fails because we need to erase, so + don't be noisy about it */ + print_flash_error(__FUNCTION__, dst, status); #endif return -EFLASHPGM; } - + return 0; } - - /* erases a flash block at the given address */ /* we have to break this up in two erases at 16 bit aligned addresses * (if necessary) @@ -172,8 +222,6 @@ } - - /* write a flash block at a given location */ /* this has to be broken up into two consectutive 16 bit writes */ static int flash_write_intel16(u32 *dst, const u32* src) @@ -196,89 +244,55 @@ return 0; } - - - static int flash_lock_block_intel16(u32 *blockStart) { u16 *p = (u16 *) blockStart; - u16 result; - - *p = STATUS_CLEAR; - barrier(); + int status; *p = CONFIG_SETUP; barrier(); *p = LOCK_SECTOR; barrier(); - /* status check */ - *p = STATUS_READ; - barrier(); - - result = *p; - barrier(); + status = get_status(p); *p = READ_ARRAY; barrier(); - if ((result & STATUS_PGM_ERR) != 0) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ " failed at 0x"); - SerialOutputHex((u32) blockStart); - SerialOutputString(", status=0x"); - SerialOutputHex((u32) result); - serial_write('\n'); -#endif - return -EFLASHPGM; + if ((status < 0) || + ((status & LOCK_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, p, status); + return status; } return 0; } - - - static int flash_unlock_block_intel16(u32 *blockStart) { u16 *p = (u16 *) blockStart; - u16 result; - - *p = STATUS_CLEAR; - barrier(); + int status; *p = CONFIG_SETUP; barrier(); *p = UNLOCK_SECTOR; barrier(); - /* status check */ - *p = STATUS_READ; - barrier(); - - result = *p; - barrier(); + status = get_status(p); *p = READ_ARRAY; barrier(); - if ((result & STATUS_PGM_ERR) != 0) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ " failed at 0x"); - SerialOutputHex((u32) blockStart); - SerialOutputString(", status=0x"); - SerialOutputHex((u32) result); - serial_write('\n'); -#endif - return -EFLASHPGM; + + if ((status < 0) || + ((status & CONFIG_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, p, status); + return status; } return 0; } - - - static int flash_query_block_lock_intel16(u32 *blockStart) { u16 *p = (u16 *) blockStart; @@ -292,16 +306,17 @@ *blockStart = READ_ARRAY; barrier(); -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ ": status of block starting at 0x"); +#ifdef FLASH_DEBUG + SerialOutputString(__FUNCTION__ ": lock status of block starting at 0x"); SerialOutputHex((u32) blockStart); SerialOutputString(": 0x"); SerialOutputHex((u32) result); - serial_write('\n'); + SerialOutputString("\n"); #endif - return result & (LOCK_STATUS_LOCKED | LOCK_STATUS_LOCKEDDOWN); + return ((result & (LOCK_STATUS_LOCKED|LOCK_STATUS_LOCKEDDOWN)) != 0); } + /* flash driver structure */ flash_driver_t intel16_flash_driver = { Index: intel32.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/intel32.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- intel32.c 2002/01/03 16:07:18 1.4 +++ intel32.c 2002/01/15 01:32:47 1.5 @@ -30,7 +30,7 @@ #include <blob/flash.h> #include <blob/util.h> #include <blob/serial.h> - +#include <blob/time.h> /* flash commands for two 16 bit intel flash chips */ #define READ_ARRAY 0x00FF00FF @@ -39,9 +39,14 @@ #define PGM_SETUP 0x00400040 #define STATUS_READ 0x00700070 #define STATUS_CLEAR 0x00500050 -#define STATUS_BUSY 0x00800080 + +#define STATUS_READY 0x00800080 +#define STATUS_ERASE_SUSP 0x00400040 #define STATUS_ERASE_ERR 0x00200020 #define STATUS_PGM_ERR 0x00100010 +#define STATUS_VPPLOW_ERR 0x00080008 +#define STATUS_PGM_SUSP 0x00040004 +#define STATUS_LOCKED_ERR 0x00020002 #define CONFIG_SETUP 0x00600060 #define LOCK_SECTOR 0x00010001 @@ -50,16 +55,86 @@ #define LOCK_STATUS_LOCKED 0x00010001 #define LOCK_STATUS_LOCKEDDOWN 0x00020002 +#define WRITE_ERROR_MASK \ + (STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define ERASE_ERROR_MASK \ + (STATUS_ERASE_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define LOCK_ERROR_MASK \ + (STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) +#define CONFIG_ERROR_MASK \ + (STATUS_ERASE_ERR|STATUS_PGM_ERR|STATUS_VPPLOW_ERR|STATUS_LOCKED_ERR) + +#define FLASH_TIMEOUT (20) + +static void clear_status(u32 *addr) +{ + *addr = data_to_flash(STATUS_CLEAR); + barrier(); +} + +static int get_status(u32 *addr) +{ + u32 start, end; + + start = TimerGetTime(); + end = start + (FLASH_TIMEOUT * TICKS_PER_SECOND); + + for (;;) { + u32 status; + + status = data_from_flash(*addr); + barrier(); + + if ((status & STATUS_READY) == STATUS_READY) + return status; + if (TimerGetTime() >= end) + return -1; + } +} +static void print_flash_error(const char *what, u32 *addr, int status) +{ + serial_write('\n'); + SerialOutputString(what); + SerialOutputString(" failed for address 0x"); + SerialOutputHex((u32) addr); + serial_write('\n'); + SerialOutputString(" status = 0x"); + SerialOutputHex(status); + serial_write('\n'); + + if (status < 0) { + SerialOutputString(" { timeout fetching status }"); + } else { + SerialOutputString(" { "); + +#define PRINT(x) \ + if (status & x) SerialOutputString(#x " ") + + PRINT(STATUS_READY); + PRINT(STATUS_ERASE_SUSP); + PRINT(STATUS_ERASE_ERR); + PRINT(STATUS_PGM_ERR); + PRINT(STATUS_VPPLOW_ERR); + PRINT(STATUS_PGM_SUSP); + PRINT(STATUS_LOCKED_ERR); + +#undef PRINT + + serial_write('}'); + } + + SerialOutputString("\n\n"); +} + /* erases a flash block at the given address */ static int flash_erase_intel32(u32 *addr) { - u32 result; + u32 status; - *addr = data_to_flash(STATUS_CLEAR); - barrier(); + clear_status(addr); /* prepare for erase */ *addr = data_to_flash(ERASE_SETUP); @@ -69,41 +144,27 @@ *addr = data_to_flash(ERASE_CONFIRM); barrier(); - /* status check */ - do { - *addr = data_to_flash(STATUS_READ); - barrier(); - result = data_from_flash(*addr); - barrier(); - } while((~result & STATUS_BUSY) != 0); + status = get_status(addr); /* put flash back into Read Array mode */ *addr = data_to_flash(READ_ARRAY); barrier(); - if((result & STATUS_ERASE_ERR) != 0) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ " failed, result=0x"); - SerialOutputHex(result); - SerialOutputString(", addr=0x"); - SerialOutputHex((u32) addr); - serial_write('\n'); -#endif + if ((status < 0) || + ((status & ERASE_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, addr, status); return -EFLASHERASE; } return 0; } - - /* write a flash block at a given location */ static int flash_write_intel32(u32 *dst, const u32* src) { - u32 result; + u32 status; - *dst = data_to_flash(STATUS_CLEAR); - barrier(); + clear_status(dst); /* setup flash for writing */ *dst = data_to_flash(PGM_SETUP); @@ -114,115 +175,72 @@ barrier(); /* status check */ - do { - *dst = data_to_flash(STATUS_READ); - barrier(); - - result = data_from_flash(*dst); - barrier(); - } while((~result & STATUS_BUSY) != 0); + status = get_status(dst); /* put flash back into Read Array mode */ *dst = data_to_flash(READ_ARRAY); barrier(); - if(((result & STATUS_PGM_ERR) != 0) || (*dst != *src)) { -#ifdef BLOB_DEBUG - SerialOutputString(__FUNCTION__ "failed, result=0x"); - SerialOutputHex(result); - SerialOutputString(", addr=0x"); - SerialOutputHex((u32) dst); - serial_write('\n'); + if ((status < 0) || + ((status & WRITE_ERROR_MASK) != 0) || + (*dst != *src)) { +#ifdef FLASH_DEBUG + /* this often fails because we need to erase, so + don't be noisy about it */ + print_flash_error(__FUNCTION__, dst, status); #endif return -EFLASHPGM; } - + return 0; } - - - static int flash_lock_block_intel32(u32 *blockStart) { - u32 result; - - *blockStart = data_to_flash(STATUS_CLEAR); - barrier(); + u32 status; *blockStart = data_to_flash(CONFIG_SETUP); barrier(); *blockStart = data_to_flash(LOCK_SECTOR); barrier(); - - *blockStart = data_to_flash(READ_ARRAY); - barrier(); - - /* status check */ - *blockStart = data_to_flash(STATUS_READ); - barrier(); - result = data_from_flash(*blockStart); - barrier(); + status = get_status(blockStart); *blockStart = data_to_flash(READ_ARRAY); barrier(); - if ((result & STATUS_PGM_ERR) != 0) { -#ifdef FLASH_DEBUG - SerialOutputString(__FUNCTION__ " failed at 0x"); - SerialOutputHex((u32) blockStart); - SerialOutputString(", status=0x"); - SerialOutputHex((u32) result); - SerialOutputByte('\n'); -#endif - return -EFLASHPGM; + if ((status < 0) || + ((status & LOCK_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, blockStart, status); + return status; } return 0; } - - - static int flash_unlock_block_intel32(u32 *blockStart) { - u32 result; - - *blockStart = data_to_flash(STATUS_CLEAR); - barrier(); + u32 status; *blockStart = data_to_flash(CONFIG_SETUP); barrier(); *blockStart = data_to_flash(UNLOCK_SECTOR); barrier(); - *blockStart = data_to_flash(STATUS_READ); - barrier(); - - result = data_from_flash(*blockStart); - barrier(); + status = get_status(blockStart); *blockStart = data_to_flash(READ_ARRAY); barrier(); - if ((result & STATUS_PGM_ERR) != 0) { -#ifdef FLASH_DEBUG - SerialOutputString(__FUNCTION__ " failed at 0x"); - SerialOutputHex((u32) blockStart); - SerialOutputString(", status=0x"); - SerialOutputHex((u32) result); - SerialOutputByte('\n'); -#endif - return -EFLASHPGM; + if ((status < 0) || + ((status & CONFIG_ERROR_MASK) != 0)) { + print_flash_error(__FUNCTION__, blockStart, status); + return status; } return 0; } - - - static int flash_query_block_lock_intel32(u32 *blockStart) { u32 result; @@ -236,16 +254,15 @@ barrier(); #ifdef FLASH_DEBUG - SerialOutputString(__FUNCTION__ ": status of block starting at 0x"); + SerialOutputString(__FUNCTION__ ": lock status of block starting at 0x"); SerialOutputHex((u32) blockStart); SerialOutputString(": 0x"); - SerialOutputHex((u32) result); - SerialOutputByte('\n'); + SerialOutputHex( result); + serial_write('\n'); #endif - return result & (LOCK_STATUS_LOCKED | LOCK_STATUS_LOCKEDDOWN); + return ((result & (LOCK_STATUS_LOCKED|LOCK_STATUS_LOCKEDDOWN)) != 0); } - |
From: Erik M. <er...@us...> - 2002-01-12 01:46:00
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv15720/src/blob Modified Files: Makefile.am start.S Added Files: start-sa11x0.S Log Message: Split up startup code in machine dependent (start-sa11x0.S) and machine independent part (start.S). Not yet finished, proof of concept that actually works. --- NEW FILE: start-sa11x0.S --- /* * start-sa11x0.S: StrongARM SA11x0 specific start code * * Copyright (C) 1999 2000 2001 2002 Erik Mouw (J.A...@it...) and * Jan-Derk Bakker (J.D...@it...) * * $Id: start-sa11x0.S,v 1.1 2002/01/12 01:45:57 erikm Exp $ * * 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 * */ /* * Documentation: * [1] Intel Corporation, "Intel StrongARM SA-1100 Microprocessor * Developer's Manual", April 1999 * [2] Intel Corporation, "Intel StrongARM SA-1110 Microprocessor * Advanced Developer's manual, December 1999 */ .ident "$Id: start-sa11x0.S,v 1.1 2002/01/12 01:45:57 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> .text /* some defines to make life easier */ /* Register addresses can be found in [1] Appendix A */ IC_BASE: .word 0x90050000 #define ICMR 0x04 PWR_BASE: .word 0x90020000 #define PSSR 0x04 #define PSPR 0x08 #define PPCR 0x14 RST_BASE: .word 0x90030000 #define RCSR 0x04 /* The initial CPU speed. Note that the SA11x0 CPUs can be safely overclocked: * 190 MHz CPUs are able to run at 221 MHz, 133 MHz CPUs can do 190 Mhz. */ cpuspeed: .word CPU_SPEED /* We start by implementing *all* exception vectors */ /* Reset vector: this initialises the machine */ .globl reset reset: /* First, mask **ALL** interrupts */ ldr r0, IC_BASE mov r1, #0x00 str r1, [r0, #ICMR] /* switch CPU to correct speed */ ldr r0, PWR_BASE ldr r1, cpuspeed str r1, [r0, #PPCR] /* init LED */ bl ledinit /* setup memory */ bl memsetup /* check if this is a wake-up from sleep */ ldr r0, RST_BASE ldr r1, [r0, #RCSR] and r1, r1, #0x0f teq r1, #0x08 bne normal_boot /* no, continue booting */ /* yes, a wake-up. clear RCSR by writing a 1 (see 9.6.2.1 from [1]) */ mov r1, #0x08 str r1, [r0, #RCSR] ; /* handle Power Manager Sleep Status Register (PSSR) * see 9.5.7.5 from [1]*/ ldr r1, [r0, #PSSR] /* clear DH bit, brings out DRAM from self-refresh */ orr r1, r1, #0x08 /* clear PH bit, bring periperal pins out from sleep state */ orr r1, r1, #0x10 str r1, [r0, #PSSR] /* get the value from the PSPR and jump to it */ ldr r0, PWR_BASE ldr r1, [r0, #PSPR] mov pc, r1 /* everything is said and done over here, call normal_boot in * the generic startup code to continue the boot procedure */ bl normal_boot Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 2002/01/07 15:00:14 1.15 +++ Makefile.am 2002/01/12 01:45:57 1.16 @@ -61,10 +61,12 @@ EXTRA_blob_start_elf32_SOURCES = \ memsetup-sa1100.S \ - memsetup-sa1110.S + memsetup-sa1110.S \ + start-sa11x0.S blob_start_elf32_DEPENDENCIES = \ @MEMSETUP@ \ + @STARTCODE@ \ start-ld-script blob_start_elf32_LDFLAGS += \ @@ -72,6 +74,7 @@ blob_start_elf32_LDADD += \ @MEMSETUP@ \ + @STARTCODE@ \ -lgcc Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/start.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- start.S 2001/11/15 11:56:20 1.6 +++ start.S 2002/01/12 01:45:57 1.7 @@ -1,7 +1,7 @@ /* * start.S: blob start code * - * Copyright (C) 1999 2000 2001 Erik Mouw (J.A...@it...) and + * Copyright (C) 1999 2000 2001 2002 Erik Mouw (J.A...@it...) and * Jan-Derk Bakker (J.D...@it...) * * This program is free software; you can redistribute it and/or modify @@ -55,78 +55,12 @@ b irq b fiq - - - /* some defines to make life easier */ -/* Register addresses can be found in [1] Appendix A */ -IC_BASE: .word 0x90050000 -#define ICMR 0x04 - -PWR_BASE: .word 0x90020000 -#define PSSR 0x04 -#define PSPR 0x08 -#define PPCR 0x14 - -RST_BASE: .word 0x90030000 -#define RCSR 0x04 - /* main memory starts at 0xc0000000 */ BLOB_START: .word BLOB_ABS_BASE_ADDR - -/* The initial CPU speed. Note that the SA11x0 CPUs can be safely overclocked: - * 190 MHz CPUs are able to run at 221 MHz, 133 MHz CPUs can do 190 Mhz. - */ -cpuspeed: .word CPU_SPEED - - - -/* the actual reset code */ -reset: - /* First, mask **ALL** interrupts */ - ldr r0, IC_BASE - mov r1, #0x00 - str r1, [r0, #ICMR] - - /* switch CPU to correct speed */ - ldr r0, PWR_BASE - ldr r1, cpuspeed - str r1, [r0, #PPCR] - - - /* init LED */ - bl ledinit - - /* setup memory */ - bl memsetup - - /* check if this is a wake-up from sleep */ - ldr r0, RST_BASE - ldr r1, [r0, #RCSR] - and r1, r1, #0x0f - teq r1, #0x08 - bne normal_boot /* no, continue booting */ - /* yes, a wake-up. clear RCSR by writing a 1 (see 9.6.2.1 from [1]) */ - mov r1, #0x08 - str r1, [r0, #RCSR] ; - - /* handle Power Manager Sleep Status Register (PSSR) - * see 9.5.7.5 from [1]*/ - ldr r1, [r0, #PSSR] - /* clear DH bit, brings out DRAM from self-refresh */ - orr r1, r1, #0x08 - /* clear PH bit, bring periperal pins out from sleep state */ - orr r1, r1, #0x10 - str r1, [r0, #PSSR] - - /* get the value from the PSPR and jump to it */ - ldr r0, PWR_BASE - ldr r1, [r0, #PSPR] - mov pc, r1 - - +.globl normal_boot normal_boot: /* check the first 1MB of BLOB_START in increments of 4k */ mov r7, #0x1000 |
From: Erik M. <er...@us...> - 2002-01-12 01:46:00
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv15720 Modified Files: configure.in Log Message: Split up startup code in machine dependent (start-sa11x0.S) and machine independent part (start.S). Not yet finished, proof of concept that actually works. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- configure.in 2002/01/07 20:27:46 1.35 +++ configure.in 2002/01/12 01:45:57 1.36 @@ -221,29 +221,36 @@ ;; *) AC_MSG_RESULT(unknown) - AC_MSG_ERROR([Unknown board name, bailing out]) + AC_MSG_ERROR([Unknown board name \"$board_name\", bailing out]) ;; esac -dnl define board name in configuration +dnl define board name and CPU in configuration AC_MSG_RESULT("${board_name}") AC_DEFINE_UNQUOTED(BOARD_NAME, "${board_name}") +AC_DEFINE_UNQUOTED(CPU, "${use_cpu}") -if test "x$use_cpu" = "xsa1100" ; then +dnl Select correct startup code and other platform dependent object files +case "$use_cpu" in + sa1100) dnl SA1100 CPU: EDORAM memory setup code + STARTCODE="start-sa11x0.o" MEMSETUP="memsetup-sa1100.o" -elif test "x$use_cpu" = "xsa1110" ; then + ;; + sa1110) dnl SA1110 CPU: SDRAM memory setup code + STARTCODE="start-sa11x0.o" MEMSETUP="memsetup-sa1110.o" -else - AC_MSG_WARN([No CPU defined!]); - use_cpu="(none)" - MEMSETUP="" -fi + ;; + *) + AC_MSG_ERROR([Unknown CPU name \"$use_cpu\", bailing out]); + ;; +esac +dnl Define in configuration +AC_SUBST(STARTCODE) AC_SUBST(MEMSETUP) -AC_DEFINE_UNQUOTED(CPU, "${use_cpu}") @@ -422,13 +429,26 @@ dnl Change the "-O2" flag in "-Os" CFLAGS=`echo $CFLAGS | sed 's/-O2/-Os/'` -dnl Add some StrongARM specific flags -CFLAGS=`echo $CFLAGS -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -nostdinc` + +dnl Figure out CPU specific CFLAGS to help optimisation +case "$use_cpu" in + sa11?0) + cpu_cflags="-march=armv4 -mtune=strongarm1100" + ;; + *) + cpu_cflags="" + ;; +esac + + +dnl define compiler and linker flags +CFLAGS=`echo $CFLAGS $cpu_cflags -mapcs-32 -fomit-frame-pointer -fno-builtin -nostdinc` LDFLAGS=`echo $LDFLAGS -static -nostdlib` OCFLAGS="-O binary -R .note -R .comment -S" AC_SUBST(OCFLAGS) +dnl Generate output files AC_OUTPUT(Makefile doc/Makefile include/Makefile @@ -444,10 +464,12 @@ utils/mkparamblock/Makefile) +dnl Tell the user about the configuration echo "" echo "Configuration" echo "------------------------------------------------------------------------" echo "Target board ${board_name}" +echo "Target CPU ${use_cpu}" echo "C compiler ${CC}" echo "C flags ${CFLAGS}" echo "Linker flags ${LDFLAGS}" |
From: Erik M. <er...@us...> - 2002-01-07 20:27:49
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv15235 Modified Files: configure.in ChangeLog Log Message: Kick the version number. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- configure.in 2002/01/07 14:58:16 1.34 +++ configure.in 2002/01/07 20:27:46 1.35 @@ -19,7 +19,7 @@ PACKAGE=blob BLOB_MAJOR_VERSION=2 BLOB_MINOR_VERSION=0 -BLOB_MICRO_VERSION=5-pre2 +BLOB_MICRO_VERSION=5-pre3 BLOB_VERSION=$BLOB_MAJOR_VERSION.$BLOB_MINOR_VERSION.$BLOB_MICRO_VERSION VERSION=$BLOB_VERSION Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ChangeLog 2002/01/06 19:03:36 1.14 +++ ChangeLog 2002/01/07 20:27:46 1.15 @@ -3,6 +3,8 @@ $Id$ +blob-2.0.5-pre3: + blob-2.0.5-pre2: - MD5 support Christopher Hoover - New call command Christopher Hoover |
From: Erik M. <er...@us...> - 2002-01-07 20:16:54
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv11619 Modified Files: README RELEASE-NOTES Log Message: Bring documentation in sync with new release. Index: README =================================================================== RCS file: /cvsroot/blob/blob/README,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- README 2001/12/05 21:09:19 1.6 +++ README 2002/01/07 20:16:49 1.7 @@ -44,7 +44,11 @@ general blob discussion is done on the LART mailing list, see http://www.lart.tudelft.nl/list/ for more information. -Blob also has a home page: http://www.lart.tudelft.nl/lartware/blob/ . +There is also a blob IRC channel: log on to irc.openprojects.net and +join #blob. Note that this is a strictly on-topic development IRC +channel, not a general blob help channel. + +Blob even has a home page: http://www.lart.tudelft.nl/lartware/blob/ . @@ -80,10 +84,10 @@ better) and gcc 2.95.2 installed - GNU make (although some vendor supplied make utilities will do) - GNU autoconf and automake (if you build blob from CVS) -- A Linux kernel source tree: the latest linux-2.4.* kernel will - usually do. If not, apply the appropriate -rmk patch (see the LART - website for details). Linux-2.2.* kernels will NOT work, but it's - considered obsolete for arm-linux anyway. +- A configured Linux kernel source tree: the latest linux-2.4.* kernel + will usually do. If not, apply the appropriate -rmk patch (see the + LART website for details). Linux-2.2.* kernels will NOT work, but + it's considered obsolete for arm-linux anyway. We tested blob with a native system (Corel/Rebel Netwinder) and with several i386-linux to arm-linux cross compiler systems, but the GNU @@ -121,6 +125,15 @@ "--enable-maintainer-mode" flag. This will automatically regenerate Makefiles and configure scripts if you change the source files. You need autoconf (>= 2.13) and automake (>= 1.4) for this feature. + + Note that the linux kernel needs to be configured or otherwise + blob will not compile. To get a configured kernel tree, unpack the + kernel and run: + + make ARCH=arm CROSS_COMPILE=arm-linux- mrproper + make ARCH=arm CROSS_COMPILE=arm-linux- lart_config + yes no | make ARCH=arm CROSS_COMPILE=arm-linux- oldconfig + - Run "make" If you use the bash shell, use "export FOO=bar" instead of Index: RELEASE-NOTES =================================================================== RCS file: /cvsroot/blob/blob/RELEASE-NOTES,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- RELEASE-NOTES 2001/12/16 04:34:02 1.6 +++ RELEASE-NOTES 2002/01/07 20:16:49 1.7 @@ -1,5 +1,47 @@ $Id$ +Release notes for blob-2.0.5-pre2 +================================= + +This is blob-2.0.5-pre2, a development snapshot. This is a work in +progress, so expect it to break on some parts. Don't complain that we +didn't warn you! + +We admit, we made a mess of it. There's lots of work going on in blob +so we'd better release a development snapshot before we're going to +make it an even bigger mess. The documentation is still not in sync +with the code, but there is some new documentation in the doc/ +directory. See the ChangeLog file to see what's new. + +This snapshot is reported to work on: + +- Assabet +- Assabet+Neponset +- LART +- Ipaq (only blob-chain) +- System3 + +It should work on: + +- Badge4 +- NESA +- PLEB +- Shannon (aka TuxScreen) +- Vercel UD-1 (IDR) +- Jornada 720 + +But was never tested on: + +- Brutus +- CreditLART + +If you meet any problems, don't hesitate to write to the LART mailing +list (see http://www.lart.tudelft.nl/list/), or join the #blob IRC +channel on irc.openprojects.net. + + + + Release notes for blob-2.0.5-pre1 ================================= |
From: Erik M. <er...@us...> - 2002-01-07 20:15:13
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv11182/doc Modified Files: Makefile.am Log Message: Add diag.txt to list of files Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/doc/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 2001/12/17 00:07:37 1.2 +++ Makefile.am 2002/01/07 20:15:10 1.3 @@ -6,5 +6,6 @@ CLEANFILES = *~ EXTRA_DIST = \ - porting.txt \ - commandlist.txt + commandlist.txt \ + diag.txt \ + porting.txt |
From: Stefan E. <se...@us...> - 2002-01-07 19:58:17
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv5171 Modified Files: diag.txt Log Message: - grammar! Index: diag.txt =================================================================== RCS file: /cvsroot/blob/blob/doc/diag.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- diag.txt 2002/01/07 19:52:32 1.1 +++ diag.txt 2002/01/07 19:58:14 1.2 @@ -20,9 +20,9 @@ ----------- Diag is a tool to be used mainly as a diagnostic tool, hence the name. It was -written by Erik Mouw and the autor for exactly this purpose. +written by Erik Mouw and the author for exactly this purpose. -The intention the autor had in mind when writing diag and using/adding features +The intention the author had in mind when writing diag and using/adding features to diag was that: - diag could be easy extended - diag could be easy ported to other boards |
From: Stefan E. <se...@us...> - 2002-01-07 19:52:35
|
Update of /cvsroot/blob/blob/doc In directory usw-pr-cvs1:/tmp/cvs-serv1865 Added Files: diag.txt Log Message: - added mninimal diag docs - TODO: + command list + make how-to port more complete --- NEW FILE: diag.txt --- diag.txt quickly hacked up by Stefan Eletzhofer <ste...@el...> Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> $Id: diag.txt,v 1.1 2002/01/07 19:52:32 seletz Exp $ Disclaimer ---------- - This document is not yet complete. - English is not my native language, so... - send _any_ bug reports regarding _this_ _doc_ to the above email address - Don't panic :) What is it? ----------- Diag is a tool to be used mainly as a diagnostic tool, hence the name. It was written by Erik Mouw and the autor for exactly this purpose. The intention the autor had in mind when writing diag and using/adding features to diag was that: - diag could be easy extended - diag could be easy ported to other boards - diag could be used to test the board hardware before actually start to write for ex. linux kernel drivers for that hardware to make sure that the hw itself works What does it already do? ------------------------ Diag can currently be used for/as: - a general memory tester (several algorithms are implemented to detect different possible memory failures) - as a test bed for trying out SA1110 LCD functionality - to display and manipulate arbitary memory locations - do dump register contents (UART, Memory, LCD etc.) - to get a new board up and running in general Currently worked on: - PCMCIA - IDE Flash via PCMCIA - loading a real kernel from IDE Flash stored in a real filesystem (ext2, msdos) How to use it? -------------- Once support for your board is added (see below for that), diag compiles as a separate object file, which has to be download by some means on your board. Diag behaves much like the linux kernel, and thus can be uploaded and started like a kernel, if "blob" is used as bootloader a "download kernel" and "boot" is the comand to use. In other words: Diag mimics a linux kernel and has to be loaded and started like the linux kernel. How do I add support for my board, then? ---------------------------------------- First you need to port BLOB on your hardware. Thats not too hard, see "porting.txt" by Erik Mouw for a step-by-step doc on how to do that. Diag lives in blob/src/diag. For every supported platform there is a <platform>.c, like "system3.c" for the Pruftechnik Digital Board. You have to add one for your hardware. Take the h3600.c for example. Add the appropriate sections to configure.in, Makefile.am etc. This should be fairly simple. Build diag, load it onto your board and start it. Then begin to play around and write test/debug commands for your hardware. Read "commandlist.txt" for more infos on that. Read the source of the other arch support files. |
From: Stefan E. <se...@us...> - 2002-01-07 19:36:18
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv31054 Modified Files: system3.c Log Message: - remove regs cruft Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/system3.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- system3.c 2002/01/07 18:15:27 1.7 +++ system3.c 2002/01/07 19:36:15 1.8 @@ -64,10 +64,6 @@ /********************************************************************** * types */ -typedef struct _reg { - char *name; - u32 adr; -} register_t; /********************************************************************** * program globals @@ -76,22 +72,6 @@ /********************************************************************** * module globals */ -static register_t registers[] = { - { "MDCNFG ", 0xa0000000 + 0x0 }, - { "MDCAS00", 0xa0000000 + 0x04 }, - { "MDCAS01", 0xa0000000 + 0x08 }, - { "MDCAS02", 0xa0000000 + 0x0c }, - { "MCS0 ", 0xa0000000 + 0x10 }, - { "MCS1 ", 0xa0000000 + 0x14 }, - { "MECR ", 0xa0000000 + 0x18 }, - { "MDREFR ", 0xa0000000 + 0x1C }, - { "MDCAS20", 0xa0000000 + 0x20 }, - { "MDCAS21", 0xa0000000 + 0x24 }, - { "MDCAS22", 0xa0000000 + 0x28 }, - { "MCS2 ", 0xa0000000 + 0x2C }, - { "SMCNFG ", 0xa0000000 + 0x30 }, - { NULL, 0 } -}; /********************************************************************** * prototypes @@ -283,21 +263,3 @@ static char smctesthelp[] = "test smc 91c96 ethernet chip\n"; __commandlist(smctest, "smctest", smctesthelp); #endif - -static int regs_show( int argc, char *argv[] ) -{ - int i = 0; - - i = 0; - while ( registers[i].name ) { - SerialOutputString( registers[i].name ); - SerialOutputString( "= 0x" ); - SerialOutputHex( MEM( registers[i].adr ) ); - serial_write( '\n' ); - i++; - } - - return 0; -} -static char regshelp[] = "print register info\n"; -__commandlist(regs_show, "regs", regshelp); |
From: Stefan E. <se...@us...> - 2002-01-07 18:15:30
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv7156/src/diag Modified Files: system3.c Log Message: - erikms patch to prevent warnings Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/system3.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- system3.c 2002/01/03 16:07:18 1.6 +++ system3.c 2002/01/07 18:15:27 1.7 @@ -246,7 +246,7 @@ SMC_outb((d)>>8, (r)+1);} while (0) static int smctest( int argc, char *argv[] ) { - u32 *base = (u32 *)SMC_BASE; + u32 base = (u32)SMC_BASE; u32 *attr; u16 bank; |
From: Stefan E. <se...@us...> - 2002-01-07 17:54:19
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv1291 Modified Files: sa1111.h Log Message: - make newer kernel include files happy Index: sa1111.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/sa1111.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sa1111.h 2001/12/27 18:27:37 1.3 +++ sa1111.h 2002/01/07 17:54:14 1.4 @@ -33,6 +33,10 @@ #endif #define SA1111_p2v(x) (x) +#define SA1101_p2v(PhAdd) (PhAdd) +#define io_p2v(x) (x) +#define __REG(x) (*((volatile u32 *)io_p2v(x))) +#define __REGP(x) (*((volatile u32 *)io_p2v(x))) /* Tell SA-1111.h to shut up; we're including it anyway. Nyah nyah ;-) */ #define __ASM_ARCH_HARDWARE_H |
From: Erik M. <er...@us...> - 2002-01-07 17:35:09
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv28036/src/diag Modified Files: regs-sa11x0.c Log Message: Remove blob/sa1111.h, it breaks all other architectures. Index: regs-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/diag/regs-sa11x0.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- regs-sa11x0.c 2002/01/07 17:02:10 1.2 +++ regs-sa11x0.c 2002/01/07 17:35:06 1.3 @@ -38,7 +38,6 @@ #include <blob/serial.h> #include <blob/time.h> #include <blob/sa1100.h> -#include <blob/sa1111.h> /********************************************************************** * defines |