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: Abraham vd M. <ab...@2d...> - 2002-02-08 13:10:46
|
Hi Erik! > > Update of /cvsroot/blob/blob/src/blob > > In directory usw-pr-cvs1:/tmp/cvs-serv2855/src/blob > >=20 > > Modified Files: > > memsetup-sa1110.S=20 > > Log Message: > > Changed the SA-1110 memory setup routines so that stuff related to exte= rnal > > memory and memory in banks 2/3 is optional. Simply defining values such= as > > MDCAS21_VALUE to junk doesn't work. >=20 > Then set them to something useful like the *documented* reset value. > Making it optional creates an #ifdef jungle that I tried to avoid. > Please back out this change. That means everyone has to know what the _documented_ reset values is :P I can clean up the ifdef mess, but I still think it should reprogram memory settings that is undefined. --=20 Regards Abraham Weinberg's Principle: An expert is a person who avoids the small errors while sweeping on to the grand fallacy. __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |
From: Erik M. <er...@us...> - 2002-02-08 12:55:19
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv24965/src/blob Modified Files: reboot.c main.c linux.c Log Message: Change a lot of code to printf() instead of SerialOutput*(). Index: reboot.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/reboot.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- reboot.c 6 Jan 2002 15:46:17 -0000 1.7 +++ reboot.c 8 Feb 2002 12:55:16 -0000 1.8 @@ -33,7 +33,6 @@ #include <blob/error.h> #include <blob/init.h> #include <blob/main.h> -#include <blob/serial.h> @@ -45,11 +44,11 @@ /* sanity check */ if(blob_status.blobType == fromFlash) { printerrprefix(); - SerialOutputString("blob not downloaded\n"); + printf("blob not downloaded\n"); return -EINVAL; } - SerialOutputString("Restarting blob from RAM...\n\n"); + printf("Restarting blob from RAM...\n\n"); serial_flush_output(); Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- main.c 5 Feb 2002 14:47:54 -0000 1.30 +++ main.c 8 Feb 2002 12:55:16 -0000 1.31 @@ -110,16 +110,14 @@ #endif /* Print the required GPL string */ - SerialOutputString("\nConsider yourself LARTed!\n\n"); - SerialOutputString(version_str); - SerialOutputString("Copyright (C) 1999 2000 2001 " - "Jan-Derk Bakker and Erik Mouw\n"); - SerialOutputString(PACKAGE " comes with ABSOLUTELY NO WARRANTY; " - "read the GNU GPL for details.\n"); - SerialOutputString("This is free software, and you are welcome " - "to redistribute it\n"); - SerialOutputString("under certain conditions; " - "read the GNU GPL for details.\n"); + printf("\nConsider yourself LARTed!\n\n"); + printf("%sCopyright (C) 1999 2000 2001 2002 " + "Jan-Derk Bakker and Erik Mouw\n", version_str); + printf(PACKAGE " comes with ABSOLUTELY NO WARRANTY; " + "read the GNU GPL for details.\n"); + printf("This is free software, and you are welcome " + "to redistribute it\n"); + printf("under certain conditions; read the GNU GPL for details.\n"); /* get the amount of memory */ get_memory_map(); @@ -128,11 +126,9 @@ #ifdef BLOB_DEBUG { - register u32 stackptr; - SerialOutputString("Current stack pointer: 0x"); + register unsigned int stackptr; asm("mov %0, sp": "=r" (stackptr)); - SerialOutputHex(stackptr); - serial_write('\n'); + printf("Current stack pointer: 0x%08x\n", stackptr); } #endif @@ -152,9 +148,9 @@ int retval = 0; /* wait 10 seconds before starting autoboot */ - SerialOutputString("Autoboot ("); - SerialOutputDec(blob_status.boot_delay); - SerialOutputString(" seconds) in progress, press any key to stop "); + printf("Autoboot (%i seconds) in progress, press any key to stop ", + blob_status.boot_delay); + for(i = 0; i < blob_status.boot_delay; i++) { serial_write('.'); @@ -170,8 +166,8 @@ parse_command("boot"); } - SerialOutputString("\nAutoboot aborted\n"); - SerialOutputString("Type \"help\" to get a list of commands\n"); + printf("\nAutoboot aborted\n"); + printf("Type \"help\" to get a list of commands\n"); } /* the command loop. endless, of course */ @@ -268,26 +264,26 @@ return 0; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { - SerialOutputString("Switching to "); + printf("Switching to "); PrintSerialSpeed(blob_status.downloadSpeed); - SerialOutputString(" baud\n"); + printf(" baud\n"); - SerialOutputString("You have 60 seconds to switch your terminal emulator to the same speed and\n"); - SerialOutputString("start downloading. After that " PACKAGE " will switch back to "); + printf("You have 60 seconds to switch your terminal emulator to the same speed and\n"); + printf("start downloading. After that " PACKAGE " will switch back to "); PrintSerialSpeed(blob_status.terminalSpeed); - SerialOutputString(" baud.\n"); + printf(" baud.\n"); serial_init(blob_status.downloadSpeed); } else { - SerialOutputString("You have 60 seconds to start downloading.\n"); + printf("You have 60 seconds to start downloading.\n"); } *numRead = UUDecode((char *)startAddress, bufLen); if (blob_status.terminalSpeed != blob_status.downloadSpeed) { - SerialOutputString("\n(Please switch your terminal emulator back to "); + printf("\n(Please switch your terminal emulator back to "); PrintSerialSpeed(blob_status.terminalSpeed); - SerialOutputString(" baud)\n"); + printf(" baud)\n"); } if(*numRead < 0) { @@ -303,20 +299,15 @@ do_md5sum((u32 *)startAddress, *numRead, digest); - SerialOutputString("Received "); - SerialOutputDec(*numRead); - SerialOutputString(" (0x"); - SerialOutputHex(*numRead); - SerialOutputString(") bytes"); + printf("Received %i (0x%08x) bytes", *numRead, *numRead); #ifdef BLOB_DEBUG - SerialOutputString(" at 0x"); - SerialOutputHex((u32) startAddress); + printf("at 0x%08x", (unsigned int)startAddress); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(", MD5: "); + printf(", MD5: "); print_md5_digest(digest); #endif #endif - serial_write('\n'); + printf("\n"); serial_init(blob_status.terminalSpeed); @@ -349,29 +340,30 @@ return 0; if (blob_status.terminalSpeed != blob_status.downloadSpeed) { - SerialOutputString("Switching to "); + printf("Switching to "); PrintSerialSpeed(blob_status.downloadSpeed); - SerialOutputString(" baud\n"); + printf(" baud\n"); - SerialOutputString("Switch your terminal emulator to the same speed and\n"); - SerialOutputString("start sending using the XMODEM protocl (repeated ^X) to quit.\n"); - SerialOutputString(PACKAGE " will switch back to "); + printf("Switch your terminal emulator to the same speed and\n"); + printf("start sending using the XMODEM protocol (repeated ^X) to quit.\n"); + printf(PACKAGE " will switch back to "); PrintSerialSpeed(blob_status.terminalSpeed); - SerialOutputString(" baud after XMODEM succeeds or times out.\n"); + printf(" baud after XMODEM succeeds or times out.\n"); serial_init(blob_status.downloadSpeed); } else { - SerialOutputString("Start sending using the XMODEM protocol (repeated ^X to quit).\n\n"); + printf("Start sending using the XMODEM protocol (repeated ^X to quit).\n\n"); } *numRead = XModemReceive((char *) startAddress, bufLen); - SerialOutputString("\n\n\n"); + printf("\n\n\n"); + serial_flush_output(); if (blob_status.terminalSpeed != blob_status.downloadSpeed) { - SerialOutputString("\n(Please switch your terminal emulator back to "); + printf("\n(Please switch your terminal emulator back to "); PrintSerialSpeed(blob_status.terminalSpeed); - SerialOutputString(" baud)\n"); + printf(" baud)\n"); } if(*numRead < 0) { @@ -387,20 +379,15 @@ do_md5sum((u32 *)startAddress, *numRead, digest); - SerialOutputString("Received "); - SerialOutputDec(*numRead); - SerialOutputString(" (0x"); - SerialOutputHex(*numRead); - SerialOutputString(") bytes"); + printf("Received %i (0x%08x) bytes", *numRead, *numRead); #ifdef BLOB_DEBUG - SerialOutputString(" at 0x"); - SerialOutputHex((u32) startAddress); + printf("at 0x%08x", (unsigned int)startAddress); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(", MD5: "); + printf(", MD5: "); print_md5_digest(digest); #endif #endif - serial_write('\n'); + printf("\n"); serial_init(blob_status.terminalSpeed); @@ -467,28 +454,21 @@ if(type == fromFlash) { printerrprefix(); - SerialOutputString(argv[1]); - SerialOutputString(" not downloaded\n"); + printf("%s not downloaded\n", argv[1]); return -EINVAL; } if(numBytes > maxSize) { printerrprefix(); - SerialOutputString("image too large for flash: 0x"); - SerialOutputHex(numBytes); - SerialOutputString(" > 0x"); - SerialOutputHex(maxSize); - serial_write('\n'); + printf("image too large for flash: 0x%08x > 0x%08x\n", + (unsigned int)numBytes, (unsigned int)maxSize); return -ETOOLONG; } nwords = (numBytes + sizeof(u32) - 1) / sizeof(u32); - SerialOutputString("Saving "); - SerialOutputString(argv[1]); - SerialOutputString(" to flash\n"); - + printf("Saving %s to flash\n", argv[1]); flash_write_region(dst, src, nwords); @@ -540,9 +520,9 @@ return -EINVAL; } - SerialOutputString("Download speed set to "); + printf("Download speed set to "); PrintSerialSpeed(blob_status.downloadSpeed); - SerialOutputString(" baud\n"); + printf(" baud\n"); return 0; } @@ -559,89 +539,69 @@ static int PrintStatus(int argc, char *argv[]) { - SerialOutputString(version_str); + printf(version_str); - SerialOutputString("Download speed : "); + printf("Download speed : "); PrintSerialSpeed(blob_status.downloadSpeed); - SerialOutputString(" baud\n"); + printf(" baud\n"); - SerialOutputString("Terminal speed : "); + printf("Terminal speed : "); PrintSerialSpeed(blob_status.terminalSpeed); - SerialOutputString(" baud\n"); + printf(" baud\n"); - SerialOutputString("blob (0x"); - SerialOutputHex(BLOB_FLASH_BASE); - SerialOutputString("): "); + printf("blob (0x%08x): ", BLOB_FLASH_BASE); if(blob_status.blobType == fromFlash) { - SerialOutputString("from flash\n"); + printf("from flash\n"); } else { - SerialOutputString("downloaded at 0x"); - SerialOutputHex(BLOB_RAM_BASE); - SerialOutputString(", "); - SerialOutputDec(blob_status.blobSize); - SerialOutputString(" bytes\n"); + printf("downloaded at 0x%08x, %i bytes\n", + BLOB_RAM_BASE, blob_status.blobSize); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(" MD5: "); + printf(" MD5: "); print_md5_digest(blob_status.blob_md5_digest); - serial_write('\n'); + printf("\n"); #endif } #ifdef PARAM_START - SerialOutputString("param (0x"); - SerialOutputHex(PARAM_FLASH_BASE); - SerialOutputString("): "); + printf("param (0x%08x): ", PARAM_FLASH_BASE); if(blob_status.paramType == fromFlash) { - SerialOutputString("from flash\n"); + printf("from flash\n"); } else { - SerialOutputString("downloaded at 0x"); - SerialOutputHex(PARAM_RAM_BASE); - SerialOutputString(", "); - SerialOutputDec(blob_status.paramSize); - SerialOutputString(" bytes\n"); + printf("downloaded at 0x%08x, %i bytes\n", + PARAM_RAM_BASE, blob_status.paramSize); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(" MD5: "); + printf(" MD5: "); print_md5_digest(blob_status.param_md5_digest); - serial_write('\n'); + printf("\n"); #endif } #else - SerialOutputString("param : Not available\n"); + printf("param : Not available\n"); #endif - SerialOutputString("kernel (0x"); - SerialOutputHex(KERNEL_FLASH_BASE); - SerialOutputString("): "); + printf("kernel (0x%08x): ", KERNEL_FLASH_BASE); if(blob_status.kernelType == fromFlash) { - SerialOutputString("from flash\n"); + printf("from flash\n"); } else { - SerialOutputString("downloaded at 0x"); - SerialOutputHex(KERNEL_RAM_BASE); - SerialOutputString(", "); - SerialOutputDec(blob_status.kernelSize); - SerialOutputString(" bytes\n"); + printf("downloaded at 0x%08x, %i bytes\n", + KERNEL_RAM_BASE, blob_status.kernelSize); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(" MD5: "); + printf(" MD5: "); print_md5_digest(blob_status.kernel_md5_digest); - serial_write('\n'); + printf("\n"); #endif } - SerialOutputString("ramdisk (0x"); - SerialOutputHex(RAMDISK_FLASH_BASE); - SerialOutputString("): "); + printf("ramdisk (0x%08x): ", RAMDISK_FLASH_BASE); if(blob_status.ramdiskType == fromFlash) { - SerialOutputString("from flash\n"); + printf("from flash\n"); } else { - SerialOutputString("downloaded at 0x"); - SerialOutputHex(RAMDISK_RAM_BASE); - SerialOutputString(", "); - SerialOutputDec(blob_status.ramdiskSize); - SerialOutputString(" bytes\n"); + printf("downloaded at 0x%08x, %i bytes\n", + RAMDISK_RAM_BASE, blob_status.ramdiskSize); #ifdef CONFIG_MD5_SUPPORT - SerialOutputString(" MD5: "); + printf(" MD5: "); print_md5_digest(blob_status.ramdisk_md5_digest); - serial_write('\n'); + printf("\n"); #endif } @@ -668,7 +628,7 @@ numWords = BLOB_FLASH_LEN / 4; blob_status.blobSize = 0; blob_status.blobType = fromFlash; - SerialOutputString("Loading blob from flash "); + printf("Loading blob from flash "); #ifdef PARAM_START } else if(strncmp(what, "param", 6) == 0) { dst = (u32 *)PARAM_RAM_BASE; @@ -676,7 +636,7 @@ numWords = PARAM_FLASH_LEN / 4; blob_status.paramSize = 0; blob_status.paramType = fromFlash; - SerialOutputString("Loading paramater block from flash "); + printf("Loading paramater block from flash "); #endif } else if(strncmp(what, "kernel", 7) == 0) { dst = (u32 *)KERNEL_RAM_BASE; @@ -684,21 +644,21 @@ numWords = KERNEL_FLASH_LEN / 4; blob_status.kernelSize = 0; blob_status.kernelType = fromFlash; - SerialOutputString("Loading kernel from flash "); + printf("Loading kernel from flash "); } else if(strncmp(what, "ramdisk", 8) == 0) { dst = (u32 *)RAMDISK_RAM_BASE; src = (u32 *)RAMDISK_FLASH_BASE; numWords = RAMDISK_FLASH_LEN / 4; blob_status.ramdiskSize = 0; blob_status.ramdiskType = fromFlash; - SerialOutputString("Loading ramdisk from flash "); + printf("Loading ramdisk from flash "); } else { printerror(EINVAL, what); return 0; } MyMemCpy(dst, src, numWords); - SerialOutputString(" done\n"); + printf(" done\n"); return 0; } @@ -724,39 +684,44 @@ static void PrintSerialSpeed(serial_baud_t speed) { + int tmp; + switch(speed) { case baud_1200: - SerialOutputDec(1200); + tmp = 1200; break; case baud_9600: - SerialOutputDec(9600); + tmp = 9600; break; case baud_19200: - SerialOutputDec(19200); + tmp = 19200; break; case baud_38400: - SerialOutputDec(38400); + tmp = 38400; break; case baud_57600: - SerialOutputDec(57600); + tmp = 57600; break; case baud_115200: - SerialOutputDec(115200); + tmp = 115200; break; case baud_230400: - SerialOutputDec(230400); + tmp = 230400; break; default: - SerialOutputString("(unknown)"); + printf("(unknown)"); + return; break; } + + printf("%i", tmp); } @@ -776,15 +741,13 @@ extern u32 __bss_start, __bss_end; extern u32 __stack_start, __stack_end; - SerialOutputString("ELF sections layout:\n"); + printf("ELF sections layout:\n"); #define PRINT_ELF_SECTION(from, to, name) \ - SerialOutputString(" 0x"); \ - SerialOutputHex((u32)&(from)); \ - SerialOutputString(" - 0x"); \ - SerialOutputHex((u32)&(to)); \ - SerialOutputString(" " name "\n"); - + printf(" 0x%08x - 0x%08x %s\n", \ + (unsigned int)&(from), \ + (unsigned int)&(to), \ + name); PRINT_ELF_SECTION(__text_start, __text_end, ".text"); PRINT_ELF_SECTION(__rodata_start, __rodata_end, ".rodata"); Index: linux.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/linux.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- linux.c 6 Jan 2002 15:46:17 -0000 1.8 +++ linux.c 8 Feb 2002 12:55:16 -0000 1.9 @@ -32,7 +32,6 @@ #include <blob/main.h> #include <blob/memory.h> #include <blob/util.h> -#include <blob/serial.h> #include <asm-arm/setup.h> @@ -60,7 +59,7 @@ setup_end_tag(); /* we assume that the kernel is in place */ - SerialOutputString("\nStarting kernel ...\n\n"); + printf("\nStarting kernel ...\n\n"); serial_flush_output(); /* disable subsystems that want to be disabled before kernel boot */ @@ -69,7 +68,7 @@ /* start kernel */ theKernel(0, ARCH_NUMBER); - SerialOutputString("Hey, the kernel returned! This should not happen.\n"); + printf("Hey, the kernel returned! This should not happen.\n"); return 0; } |
From: Erik M. <er...@us...> - 2002-02-08 12:55:19
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv24965/src/lib Modified Files: init.c util.c command.c error.c Log Message: Change a lot of code to printf() instead of SerialOutput*(). Index: init.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/init.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- init.c 3 Jan 2002 16:07:18 -0000 1.3 +++ init.c 8 Feb 2002 12:55:16 -0000 1.4 @@ -30,8 +30,8 @@ #include <blob/errno.h> #include <blob/error.h> #include <blob/init.h> -#include <blob/serial.h> #include <blob/types.h> +#include <blob/util.h> /* int and exit list start and end. filled in by the linker */ @@ -51,9 +51,8 @@ printerror(EMAGIC, NULL); #ifdef BLOB_DEBUG printerrprefix(); - SerialOutputString("Address = 0x"); - SerialOutputHex((u32)item); - serial_write('\n'); + printf(__FUNCTION__ "(): magic failed at 0x%08x\n", + (unsigned int)item); #endif return; } Index: util.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/util.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- util.c 3 Jan 2002 16:07:18 -0000 1.4 +++ util.c 8 Feb 2002 12:55:16 -0000 1.5 @@ -37,7 +37,6 @@ #include <blob/types.h> #include <blob/util.h> -#include <blob/serial.h> @@ -45,13 +44,8 @@ void MyMemCpy(u32 *dest, const u32 *src, int numWords) { #ifdef BLOB_DEBUG - SerialOutputString("\n### Now copying 0x"); - SerialOutputHex(numWords); - SerialOutputString(" words from 0x"); - SerialOutputHex((int)src); - SerialOutputString(" to 0x"); - SerialOutputHex((int)dest); - serial_write('\n'); + printf("### copying 0x%08x words from 0x%08x to 0x%08x ...", + (unsigned int)numWords, (unsigned int)src, (unsigned int)dest); #endif while(numWords--) { @@ -62,7 +56,7 @@ } #ifdef BLOB_DEBUG - SerialOutputString(" done\n"); + printf(" done\n"); #endif } /* MyMemCpy */ Index: command.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/command.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- command.c 4 Feb 2002 22:03:29 -0000 1.10 +++ command.c 8 Feb 2002 12:55:16 -0000 1.11 @@ -126,11 +126,7 @@ #ifdef BLOB_DEBUG for(i = 0; i < *argc; i++) { printerrprefix(); - SerialOutputString("argv["); - SerialOutputDec(i); - SerialOutputString("] = "); - SerialOutputString(argv[i]); - serial_write('\n'); + printf("argv[%i] = %s\n", i, argv[i]); } #endif } @@ -151,9 +147,8 @@ if(cmd->magic != COMMAND_MAGIC) { #ifdef BLOB_DEBUG printerrprefix(); - SerialOutputString(__FUNCTION__ "(): Address = 0x"); - SerialOutputHex((u32)cmd); - serial_write('\n'); + printf(__FUNCTION__ "(): Magic failed at 0x%08x\n", + (unsigned int)cmd); #endif return -EMAGIC; } @@ -201,9 +196,8 @@ if(cmd->magic != COMMAND_MAGIC) { #ifdef BLOB_DEBUG printerrprefix(); - SerialOutputString(__FUNCTION__ "(): Address = 0x"); - SerialOutputHex((u32)cmd); - serial_write('\n'); + printf(__FUNCTION__ "(): magic faild at 0x%08x\n", + (unsigned int)cmd); #endif return -EMAGIC; @@ -231,10 +225,8 @@ for(cmd = commands; cmd != NULL; cmd = cmd->next) { if(strncmp(cmd->name, argv[1], MAX_COMMANDLINE_LENGTH) == 0) { - SerialOutputString("Help for '"); - SerialOutputString(argv[1]); - SerialOutputString("':\n\nUsage: "); - SerialOutputString(cmd->help); + printf("Help for %s:\n\nUsage: %s\n", + argv[1], cmd->help); return 0; } } @@ -242,14 +234,12 @@ return -EINVAL; } - SerialOutputString("The following commands are supported:"); + printf("The following commands are supported:\n"); - for(cmd = commands; cmd != NULL; cmd = cmd->next) { - SerialOutputString("\n* "); - SerialOutputString(cmd->name); - } + for(cmd = commands; cmd != NULL; cmd = cmd->next) + printf("* %s\n", cmd->name); - SerialOutputString("\nUse \"help command\" to get help on a specific command\n"); + printf("Use \"help command\" to get help on a specific command\n"); return 0; } @@ -267,9 +257,9 @@ void DisplayPrompt(char *prompt) { if(prompt == NULL) { - SerialOutputString(PACKAGE "> "); + printf(PACKAGE "> "); } else { - SerialOutputString(prompt); + printf("%s", prompt); } } @@ -324,7 +314,7 @@ i--; numRead--; /* cursor one position back. */ - SerialOutputString("\b \b"); + printf("\b \b"); } } else { command[i++] = c; Index: error.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/error.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- error.c 3 Jan 2002 16:07:18 -0000 1.6 +++ error.c 8 Feb 2002 12:55:16 -0000 1.7 @@ -29,8 +29,8 @@ #include <blob/errno.h> #include <blob/error.h> -#include <blob/serial.h> #include <blob/types.h> +#include <blob/util.h> static char *error_strings[] = { @@ -73,19 +73,16 @@ void printerrprefix(void) { - SerialOutputString(errprefix); + printf("%s", errprefix); } void printerror(int errnum, char *s) { - printerrprefix(); - SerialOutputString(strerror(errnum)); - - if(s != NULL) { - SerialOutputString(": "); - SerialOutputString(s); - } + printf("%s%s", errprefix, strerror(errnum)); - serial_write('\n'); + if(s != NULL) + printf(": %s\n", s); + else + printf("\n"); } |
From: Erik M. <er...@us...> - 2002-02-08 12:50:42
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv23339/include/blob Modified Files: util.h Log Message: Add printf() from linux-2.4.17-rmk3. Fully functional and relatively small. Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/util.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- util.h 6 Jan 2002 17:04:36 -0000 1.7 +++ util.h 8 Feb 2002 12:50:39 -0000 1.8 @@ -55,6 +55,9 @@ /* convert a string to an u32 value */ int strtou32(const char *str, u32 *value); +/* printf and friends */ +int snprintf(char * buf, size_t size, const char *fmt, ...); +int printf(const char *fmt, ...); /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ |
From: Erik M. <er...@us...> - 2002-02-08 12:49:06
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv22500/src/lib Modified Files: Makefile.am Added Files: printf.c Log Message: Add printf() from linux-2.4.17-rmk3. Fully functional and relatively small. --- NEW FILE: printf.c --- /* * printf.c: printf implementation * * $Id: printf.c,v 1.1 2002/02/08 12:49:03 erikm Exp $ * * Copyright (C) 1991, 1992 Linus Torvalds * * vsprintf.c -- Lars Wirzenius & Linus Torvalds. * * Wirzenius wrote this portably, Torvalds fucked it up :-) * * Fri Jul 13 2001 Crutcher Dunnavant <cru...@da...> * - changed to provide snprintf and vsnprintf functions * * Taken from linux-2.4.17-rmk3 by Erik Mouw <J.A...@it...> * * Note that this code is licensed under GPLv2 only! -- Erik * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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: printf.c,v 1.1 2002/02/08 12:49:03 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/types.h> #include <blob/util.h> #include <blob/serial.h> #include <asm/div64.h> #include <stdarg.h> #define ZEROPAD 1 /* pad with zero */ #define SIGN 2 /* unsigned/signed long */ #define PLUS 4 /* show plus */ #define SPACE 8 /* space if plus */ #define LEFT 16 /* left justified */ #define SPECIAL 32 /* 0x */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ static inline int isdigit(char digit) { if (digit >= '0' && digit <= '9' ) return 1; else return 0; } static inline int strnlen(const char *s, size_t maxlen) { int len; len = strlen(s); if(len > maxlen) return maxlen; else return len; } static int skip_atoi(const char **s) { int i=0; while (isdigit(**s)) i = i*10 + *((*s)++) - '0'; return i; } static char * number(char * buf, char * end, long long num, int base, int size, int precision, int type) { char c,sign,tmp[66]; const char *digits; const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i; digits = (type & LARGE) ? large_digits : small_digits; if (type & LEFT) type &= ~ZEROPAD; if (base < 2 || base > 36) return 0; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) { if (num < 0) { sign = '-'; num = -num; size--; } else if (type & PLUS) { sign = '+'; size--; } else if (type & SPACE) { sign = ' '; size--; } } if (type & SPECIAL) { if (base == 16) size -= 2; else if (base == 8) size--; } i = 0; if (num == 0) tmp[i++]='0'; else while (num != 0) tmp[i++] = digits[do_div(num,base)]; if (i > precision) precision = i; size -= precision; if (!(type&(ZEROPAD+LEFT))) { while(size-->0) { if (buf <= end) *buf = ' '; ++buf; } } if (sign) { if (buf <= end) *buf = sign; ++buf; } if (type & SPECIAL) { if (base==8) { if (buf <= end) *buf = '0'; ++buf; } else if (base==16) { if (buf <= end) *buf = '0'; ++buf; if (buf <= end) *buf = digits[33]; ++buf; } } if (!(type & LEFT)) { while (size-- > 0) { if (buf <= end) *buf = c; ++buf; } } while (i < precision--) { if (buf <= end) *buf = '0'; ++buf; } while (i-- > 0) { if (buf <= end) *buf = tmp[i]; ++buf; } while (size-- > 0) { if (buf <= end) *buf = ' '; ++buf; } return buf; } /** * vsnprintf - Format a string and place it in a buffer * @buf: The buffer to place the result into * @size: The size of the buffer, including the trailing null space * @fmt: The format string to use * @args: Arguments for the format string * * Call this function if you are already dealing with a va_list. * You probably want snprintf instead. */ static int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) { int len; unsigned long long num; int i, base; char *str, *end, c; const char *s; int flags; /* flags to number() */ int field_width; /* width of output field */ int precision; /* min. # of digits for integers; max number of chars for from string */ int qualifier; /* 'h', 'l', or 'L' for integer fields */ /* 'z' support added 23/7/1999 S.H. */ /* 'z' changed to 'Z' --davidm 1/25/99 */ str = buf; end = buf + size - 1; if (end < buf - 1) { end = ((void *) -1); size = end - buf + 1; } for (; *fmt ; ++fmt) { if (*fmt != '%') { if (str <= end) *str = *fmt; ++str; continue; } /* process flags */ flags = 0; repeat: ++fmt; /* this also skips first '%' */ switch (*fmt) { case '-': flags |= LEFT; goto repeat; case '+': flags |= PLUS; goto repeat; case ' ': flags |= SPACE; goto repeat; case '#': flags |= SPECIAL; goto repeat; case '0': flags |= ZEROPAD; goto repeat; } /* get field width */ field_width = -1; if (isdigit(*fmt)) field_width = skip_atoi(&fmt); else if (*fmt == '*') { ++fmt; /* it's the next argument */ field_width = va_arg(args, int); if (field_width < 0) { field_width = -field_width; flags |= LEFT; } } /* get the precision */ precision = -1; if (*fmt == '.') { ++fmt; if (isdigit(*fmt)) precision = skip_atoi(&fmt); else if (*fmt == '*') { ++fmt; /* it's the next argument */ precision = va_arg(args, int); } if (precision < 0) precision = 0; } /* get the conversion qualifier */ qualifier = -1; if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { qualifier = *fmt; ++fmt; if (qualifier == 'l' && *fmt == 'l') { qualifier = 'L'; ++fmt; } } /* default base */ base = 10; switch (*fmt) { case 'c': if (!(flags & LEFT)) { while (--field_width > 0) { if (str <= end) *str = ' '; ++str; } } c = (unsigned char) va_arg(args, int); if (str <= end) *str = c; ++str; while (--field_width > 0) { if (str <= end) *str = ' '; ++str; } continue; case 's': s = va_arg(args, char *); if (!s) s = "<NULL>"; len = strnlen(s, precision); if (!(flags & LEFT)) { while (len < field_width--) { if (str <= end) *str = ' '; ++str; } } for (i = 0; i < len; ++i) { if (str <= end) *str = *s; ++str; ++s; } while (len < field_width--) { if (str <= end) *str = ' '; ++str; } continue; case 'p': if (field_width == -1) { field_width = 2*sizeof(void *); flags |= ZEROPAD; } str = number(str, end, (unsigned long) va_arg(args, void *), 16, field_width, precision, flags); continue; case 'n': /* FIXME: * What does C99 say about the overflow case here? */ if (qualifier == 'l') { long * ip = va_arg(args, long *); *ip = (str - buf); } else if (qualifier == 'Z') { size_t * ip = va_arg(args, size_t *); *ip = (str - buf); } else { int * ip = va_arg(args, int *); *ip = (str - buf); } continue; case '%': if (str <= end) *str = '%'; ++str; continue; /* integer number formats - set up the flags and "break" */ case 'o': base = 8; break; case 'X': flags |= LARGE; case 'x': base = 16; break; case 'd': case 'i': flags |= SIGN; case 'u': break; default: if (str <= end) *str = '%'; ++str; if (*fmt) { if (str <= end) *str = *fmt; ++str; } else { --fmt; } continue; } if (qualifier == 'L') num = va_arg(args, long long); else if (qualifier == 'l') { num = va_arg(args, unsigned long); if (flags & SIGN) num = (signed long) num; } else if (qualifier == 'Z') { num = va_arg(args, size_t); } else if (qualifier == 'h') { num = (unsigned short) va_arg(args, int); if (flags & SIGN) num = (signed short) num; } else { num = va_arg(args, unsigned int); if (flags & SIGN) num = (signed int) num; } str = number(str, end, num, base, field_width, precision, flags); } if (str <= end) *str = '\0'; else if (size > 0) /* don't write out a null byte if the buf size is zero */ *end = '\0'; /* the trailing null byte doesn't count towards the total * ++str; */ return str-buf; } /** * snprintf - Format a string and place it in a buffer * @buf: The buffer to place the result into * @size: The size of the buffer, including the trailing null space * @fmt: The format string to use * @...: Arguments for the format string */ int snprintf(char * buf, size_t size, const char *fmt, ...) { va_list args; int i; va_start(args, fmt); i=vsnprintf(buf,size,fmt,args); va_end(args); return i; } #define PRINTF_BUFFER_LENGTH 1024 static char printf_buffer[PRINTF_BUFFER_LENGTH]; int printf(const char *fmt, ...) { va_list args; int i; va_start(args, fmt); i = vsnprintf(printf_buffer, PRINTF_BUFFER_LENGTH, fmt, args); va_end(args); SerialOutputString(printf_buffer); return i; } Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.am 20 Jan 2002 23:16:18 -0000 1.10 +++ Makefile.am 8 Feb 2002 12:49:03 -0000 1.11 @@ -35,6 +35,7 @@ md5.c \ md5support.c \ memcpy.c \ + printf.c \ reboot.c \ serial.c \ serial-sa11x0.c \ |
From: Erik M. <er...@us...> - 2002-02-08 12:49:06
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv22500 Modified Files: configure.in Log Message: Add printf() from linux-2.4.17-rmk3. Fully functional and relatively small. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- configure.in 8 Feb 2002 10:19:55 -0000 1.43 +++ configure.in 8 Feb 2002 12:49:03 -0000 1.44 @@ -507,7 +507,7 @@ dnl define compiler and linker flags -CFLAGS=`echo $CFLAGS $cpu_cflags -mapcs-32 -fomit-frame-pointer -fno-builtin -nostdinc` +CFLAGS=`echo $CFLAGS $cpu_cflags -mapcs-32 -fomit-frame-pointer -fno-builtin` LDFLAGS=`echo $LDFLAGS -static -nostdlib` OCFLAGS="-O binary -R .note -R .comment -S" AC_SUBST(OCFLAGS) |
From: Erik M. <J.A...@it...> - 2002-02-08 12:44:42
|
On Fri, Feb 08, 2002 at 02:19:58AM -0800, Abraham vd Merwe wrote: > Update of /cvsroot/blob/blob/src/blob > In directory usw-pr-cvs1:/tmp/cvs-serv2855/src/blob > > Modified Files: > memsetup-sa1110.S > Log Message: > Changed the SA-1110 memory setup routines so that stuff related to external > memory and memory in banks 2/3 is optional. Simply defining values such as > MDCAS21_VALUE to junk doesn't work. Then set them to something useful like the *documented* reset value. Making it optional creates an #ifdef jungle that I tried to avoid. Please back out this change. 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. <er...@us...> - 2002-02-08 12:39:08
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv18842 Removed Files: config.h.in Log Message: Don't put generated files into CVS. --- config.h.in DELETED --- |
From: Erik M. <J.A...@it...> - 2002-02-08 12:38:45
|
On Fri, Feb 08, 2002 at 02:19:46AM -0800, Holger Schurig wrote: > Update of /cvsroot/blob/blob/include/blob > In directory usw-pr-cvs1:/tmp/cvs-serv3076 > > Added Files: > config.h.in > Log Message: > This file was missing It isn't. It is autogenerated. Autgenerated files do NOT belong in CVS. 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: Abraham vd M. <ab...@us...> - 2002-02-08 10:29:51
|
Update of /cvsroot/blob/blob/utils In directory usw-pr-cvs1:/tmp/cvs-serv4908/utils Added Files: dontdiff Log Message: Added a dontdiff file for blob (useful for generating patches against blob) --- NEW FILE: dontdiff --- *~ *.a *.o *.rej configure Makefile INSTALL Makefile.in config.cache aclocal.m4 config.log config.status frodo-cfg.sh CVS config.h stamp-h stamp-h.in .deps *.map rest-ld-script config.guess config.sub install-sh missing mkinstalldirs mkparamblock blob-start-elf32 blob-start-chain-elf32 blob-start-chain blob-start blob-rest-elf32 blob-rest blob-chain diag-elf32 |
From: Abraham vd M. <ab...@us...> - 2002-02-08 10:29:50
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv4908 Modified Files: ChangeLog Log Message: Added a dontdiff file for blob (useful for generating patches against blob) Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ChangeLog 8 Feb 2002 10:26:36 -0000 1.22 +++ ChangeLog 8 Feb 2002 10:29:47 -0000 1.23 @@ -18,6 +18,7 @@ - First stage loader modularisation Erik Mouw - Made external, bank 2/3 memory references optional for SA-1110 platforms Abraham van der Merwe +- Added a dontdiff file for blob Abraham van der Merwe blob-2.0.5-pre2: - MD5 support Christopher Hoover |
From: Abraham vd M. <ab...@us...> - 2002-02-08 10:26:39
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv4339 Modified Files: ChangeLog Log Message: made note of memory config change Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ChangeLog 8 Feb 2002 10:19:47 -0000 1.21 +++ ChangeLog 8 Feb 2002 10:26:36 -0000 1.22 @@ -16,6 +16,8 @@ - Changed Xmodem support to be optional Abraham van der Merwe - 2d3D SA-1110 Dev Board support Abraham van der Merwe - First stage loader modularisation Erik Mouw +- Made external, bank 2/3 memory references + optional for SA-1110 platforms Abraham van der Merwe blob-2.0.5-pre2: - MD5 support Christopher Hoover |
From: Abraham vd M. <ab...@us...> - 2002-02-08 10:19:59
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv2855/src/blob Modified Files: memsetup-sa1110.S Log Message: Changed the SA-1110 memory setup routines so that stuff related to external memory and memory in banks 2/3 is optional. Simply defining values such as MDCAS21_VALUE to junk doesn't work. Index: memsetup-sa1110.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memsetup-sa1110.S,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- memsetup-sa1110.S 15 Jan 2002 01:45:01 -0000 1.9 +++ memsetup-sa1110.S 8 Feb 2002 10:19:56 -0000 1.10 @@ -58,18 +58,50 @@ .long MDCAS00_VALUE /* 0x04 MDCAS00 */ .long MDCAS01_VALUE /* 0x08 MDCAS01 */ .long MDCAS02_VALUE /* 0x0c MDCAS02 */ - .long MSC0_VALUE /* 0x10 MSC0 */ - .long MSC1_VALUE /* 0x14 MSC1 */ - .long MECR_VALUE /* 0x18 MECR */ + .long MSC0_VALUE /* 0x10 MSC0 */ + +#ifdef MSC1_VALUE + .long MSC1_VALUE /* 0x14 MSC1 */ +#else + .long 0x00000000 +#endif + +#ifdef MECR_VALUE + .long MECR_VALUE /* 0x18 MECR */ +#else + .long 0x00000000 +#endif + #ifdef MDRFER_DONT_BELIEVE_IN_MAGIC .long MDREFR_VALUE #else - .long 0xdeadbeef /* 0x1C MDREFR */ -#endif + .long 0xdeadbeef /* 0x1C MDREFR */ +#endif + +#ifdef MDCAS20_VALUE .long MDCAS20_VALUE /* 0x20 MDCAS20 */ +#else + .long 0x00000000 +#endif + +#ifdef MDCAS21_VALUE .long MDCAS21_VALUE /* 0x24 MDCAS21 */ +#else + .long 0x00000000 +#endif + +#ifdef MDCAS22_VALUE .long MDCAS22_VALUE /* 0x28 MDCAS22 */ - .long MSC2_VALUE /* 0x2C MSC2 */ +#else + .long 0x00000000 +#endif + +#ifdef MSC2_VALUE + .long MSC2_VALUE /* 0x2C MSC2 */ +#else + .long 0x00000000 +#endif + .long SMCNFG_VALUE /* 0x30 SMCNFG */ .globl memsetup @@ -92,14 +124,20 @@ ldr r2, [r1, #MDCAS02 ] str r2, [r0, #MDCAS02 ] +#ifdef MDCAS20_VALUE ldr r2, [r1, #MDCAS20 ] str r2, [r0, #MDCAS20 ] +#endif +#ifdef MDCAS21_VALUE ldr r2, [r1, #MDCAS21 ] str r2, [r0, #MDCAS21 ] +#endif +#ifdef MDCAS22_VALUE ldr r2, [r1, #MDCAS22 ] str r2, [r0, #MDCAS22 ] +#endif #ifdef MDREFR_DONT_BELIEVE_IN_MAGIC ldr r2, [r1, #MDREFR ] @@ -165,16 +203,23 @@ ldr r2, [r1, #MCS0 ] str r2, [r0, #MCS0 ] +#ifdef MSC1_VALUE ldr r2, [r1, #MCS1 ] str r2, [r0, #MCS1 ] +#endif +#ifdef MSC2_VALUE ldr r2, [r1, #MCS2 ] str r2, [r0, #MCS2 ] +#endif ldr r2, [r1, #SMCNFG ] str r2, [r0, #SMCNFG ] +#ifdef MECR_VALUE ldr r2, [r1, #MECR ] str r2, [r0, #MECR ] - +#endif + mov pc, r5 + |
From: Abraham vd M. <ab...@us...> - 2002-02-08 10:19:58
|
Update of /cvsroot/blob/blob/include/blob/arch In directory usw-pr-cvs1:/tmp/cvs-serv2855/include/blob/arch Modified Files: frodo.h Log Message: Changed the SA-1110 memory setup routines so that stuff related to external memory and memory in banks 2/3 is optional. Simply defining values such as MDCAS21_VALUE to junk doesn't work. Index: frodo.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/frodo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- frodo.h 1 Feb 2002 14:38:55 -0000 1.1 +++ frodo.h 8 Feb 2002 10:19:56 -0000 1.2 @@ -36,7 +36,7 @@ * * CCF[4:0] 3.6864-MHz Crystal Oscillator 3.5795-MHz Crystal Oscillator * ------------------------------------------------------------------------- - * 00 59.0 57.3 + * 00 59.0 57.3 * 01 73.7 71.6 * 02 88.5 85.9 * 03 103.2 100.2 @@ -48,10 +48,33 @@ * 09 191.7 186.1 * 0a 206.4 200.5 * 0b 221.2 214.8 + * + * these are undocumented. + * + * 0c 235.9 ?? + * 0d 250.7 ?? + * 0e 265.4 ?? + * 0f 280.2 ?? */ +#define CPU_CORE_SPEED_59mhz 0x00 +#define CPU_CORE_SPEED_73mhz 0x01 +#define CPU_CORE_SPEED_88mhz 0x02 +#define CPU_CORE_SPEED_103mhz 0x03 +#define CPU_CORE_SPEED_118mhz 0x04 +#define CPU_CORE_SPEED_132mhz 0x05 +#define CPU_CORE_SPEED_147mhz 0x06 +#define CPU_CORE_SPEED_162mhz 0x07 +#define CPU_CORE_SPEED_176mhz 0x08 +#define CPU_CORE_SPEED_191mhz 0x09 +#define CPU_CORE_SPEED_206mhz 0x0a +#define CPU_CORE_SPEED_221mhz 0x0b +#define CPU_CORE_SPEED_235mhz 0x0c +#define CPU_CORE_SPEED_250mhz 0x0d +#define CPU_CORE_SPEED_265mhz 0x0e +#define CPU_CORE_SPEED_280mhz 0x0f /* boot CPU speed */ -#define CPU_SPEED (0x0a) +#define CPU_SPEED (CPU_CORE_SPEED_221mhz) /* * Serial port 1 is used for the Serial port w/ flow control. @@ -60,22 +83,18 @@ /* serial port */ #define USE_SERIAL2 - /* GPIO for the LED */ #define LED_GPIO (0x00000000) /* no led (for now) */ - /* the base address were BLOB is loaded by the first stage loader */ #define BLOB_ABS_BASE_ADDR (0xc0200400) - /* 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) - /* and where do they live in flash */ #define BLOB_FLASH_BASE 0x00000000 #define BLOB_FLASH_LEN (256 * 1024) @@ -86,35 +105,56 @@ #define RAMDISK_FLASH_BASE (KERNEL_FLASH_BASE + KERNEL_FLASH_LEN) #define RAMDISK_FLASH_LEN (4 * 1024 * 1024) - /* the position of the kernel boot parameters */ #define BOOT_PARAMS (0xc0000100) - /* the size (in kbytes) to which the compressed ramdisk expands */ #define RAMDISK_SIZE (8 * 1024) - /* Memory configuration */ #ifdef BLOB_NEED_MEMCONFIG -#warning "use defines from memsetup.h for better readability" + +#define SMCNFG_VALUE 0x00000000 + +#if (CPU_SPEED >= CPU_CORE_SPEED_206mhz) + # define MDCNFG_VALUE 0x0000a265 + +#ifdef MDRFER_DONT_BELIEVE_IN_MAGIC +# define MDREFR_VALUE 0x00700061 +#endif /* #ifdef MDRFER_DONT_BELIEVE_IN_MAGIC */ + # define MDCAS00_VALUE 0x5555557f # define MDCAS01_VALUE 0x55555555 # define MDCAS02_VALUE 0x55555555 # define MSC0_VALUE 0x00004770 -# define MSC1_VALUE 0x00000000 -# define MECR_VALUE 0xffffffff -/* MDREFR == 0x00700061 */ -# define MDREFR_VALUE do_not_use_this_value__gets_automagically_computed -# define MDCAS20_VALUE 0xaaaaaa7f /* 0x20 MDCAS20 */ -# define MDCAS21_VALUE 0xaaaaaaaa /* 0x24 MDCAS21 */ -# define MDCAS22_VALUE 0xaaaaaaaa /* 0x28 MDCAS22 */ -# define MSC2_VALUE 0x42196669 /* 0x2C MCS2 */ -# define SMCNFG_VALUE 0x00000000 -#endif +#else /* #if (CPU_SPEED >= CPU_CORE_SPEED_206mhz) */ +# define MDCNFG_VALUE 0x0000a165 +#ifdef MDRFER_DONT_BELIEVE_IN_MAGIC +# define MDREFR_VALUE 0x00300051 +#endif /* #ifdef MDRFER_DONT_BELIEVE_IN_MAGIC */ -#endif +# define MDCAS00_VALUE 0xaaaaaaa7 +# define MDCAS01_VALUE 0xaaaaaaaa +# define MDCAS02_VALUE 0xaaaaaaaa +# define MSC0_VALUE 0x00004668 + +#endif /* #if (CPU_SPEED >= CPU_CORE_SPEED_206mhz) */ + +/* + * These are currently unused: + * + * MECR_VALUE + * MDCAS20_VALUE + * MDCAS21_VALUE + * MDCAS22_VALUE + * MSC1_VALUE + * MSC2_VALUE + */ + +#endif /* #ifdef BLOB_NEED_MEMCONFIG */ + +#endif /* #ifndef BLOB_ARCH_FRODO_H */ |
From: Abraham vd M. <ab...@us...> - 2002-02-08 10:19:58
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv2855 Modified Files: configure.in Log Message: Changed the SA-1110 memory setup routines so that stuff related to external memory and memory in banks 2/3 is optional. Simply defining values such as MDCAS21_VALUE to junk doesn't work. Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- configure.in 5 Feb 2002 14:47:54 -0000 1.42 +++ configure.in 8 Feb 2002 10:19:55 -0000 1.43 @@ -158,7 +158,6 @@ board_name="2d3D, Inc. SA-1110 Development Board" AC_DEFINE(FRODO) BLOB_PLATFORM_OBJ="frodo.o" - AC_MSG_WARN([Please check frodo memory config in arch/frodo.h]) BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="frodo.o" use_cpu="sa1110" |
From: Erik M. <er...@us...> - 2002-02-08 10:19:49
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv3031 Modified Files: ChangeLog Log Message: Make note of the license issue in the ChangeLog. Index: ChangeLog =================================================================== RCS file: /cvsroot/blob/blob/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ChangeLog 5 Feb 2002 14:47:54 -0000 1.20 +++ ChangeLog 8 Feb 2002 10:19:47 -0000 1.21 @@ -3,13 +3,19 @@ $Id$ +(Please add new entries at the top, not at the bottom) + + blob-2.0.5-pre3: +- Change license for src/blob/testmem*.S from + GPLv2+later to GPLv2 only. My fault, I should have + asked Russell. Erik Mouw +- Changed UU Codec support to be optional Abraham van der Merwe - Accelent IDP support Holger Schurig - Added a script to automate uploading of images Abraham van der Merwe - Changed Xmodem support to be optional Abraham van der Merwe - 2d3D SA-1110 Dev Board support Abraham van der Merwe - First stage loader modularisation Erik Mouw -- Changed UU Codec support to be optional Abraham van der Merwe blob-2.0.5-pre2: - MD5 support Christopher Hoover |
From: Holger S. <hol...@us...> - 2002-02-08 10:19:46
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv3076 Added Files: config.h.in Log Message: This file was missing --- NEW FILE: config.h.in --- /* include/blob/config.h.in. Generated automatically from configure.in by autoheader. */ /*------------------------------------------------------------------------- * Filename: acconfig.h * Version: $Id: config.h.in,v 1.1 2002/02/08 10:19:44 holgerschurig Exp $ * Copyright: Copyright (C) 1999, Erik Mouw * Author: Erik Mouw <J.A...@it...> * Description: Definitions for GNU autoconf/automake/libtool * Created at: Wed Jul 28 22:35:51 1999 * Modified by: Erik Mouw <J.A...@it...> * Modified at: Sun Oct 3 18:47:48 1999 *-----------------------------------------------------------------------*/ /* * acconfig.h: Definitions for GNU autoconf/automake/libtool * * Copyright (C) 1999 Erik Mouw (J.A...@it...) * * 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 * */ /* * * WARNING: * Don't try to edit config.h.in or config.h, because your changes * will be overwritten once you run automake, autoconf or * configure. Edit acconfig.h instead. * */ #ident "$Id: config.h.in,v 1.1 2002/02/08 10:19:44 holgerschurig Exp $" #ifndef BLOB_CONFIG_H #define BLOB_CONFIG_H /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define the board name over here */ #undef BOARD_NAME /* Define the CPU type */ #undef CPU /* Define to enable run-time debug information */ #undef BLOB_DEBUG /* Define for FRODO boards */ #undef FRODO /* Define for Accelent/IDP */ #undef ACCELENT_SA /* Define for Assabet boards */ #undef ASSABET /* Define if Neponset board attached to Assabet */ #undef NEPONSET /* Define for Badge 4 */ #undef BADGE4 /* Define for Brutus boards */ #undef BRUTUS /* Define for CreditLART boards */ #undef CLART /* Define for Ipaq H3600 */ #undef H3600 /* Define for Vercel UD-1 (IDR) */ #undef IDR /* Define for Jornada 720 */ #undef JORNADA720 /* Define for LART boards */ #undef LART /* Define for NESA boards */ #undef NESA /* Define for PLEB boards */ #undef PLEB /* Define for PT System 3 boards */ #undef PT_SYSTEM3 /* Define for Shannon (TuxScreen) */ #undef SHANNON /* Define if LCD support is wanted */ #undef CONFIG_LCD_SUPPORT /* Define if MD5 support is wanted */ #undef CONFIG_MD5_SUPPORT /* Define if JFFS2 support is wanted */ #undef CONFIG_JFFS2_SUPPORT /* Define if cramfs support is wanted */ #undef CONFIG_CRAMFS_SUPPORT /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION #endif |
From: Erik M. <er...@us...> - 2002-02-08 10:15:08
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv1927 Modified Files: testmem.S testmem2.S Log Message: Change license for src/blob/testmem.S and src/blob/testmem2.S from GPLv2+later to GPLv2 only. My fault, rmk defaults to GPLv2 only, just like Linus does. Index: testmem.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/testmem.S,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- testmem.S 7 Oct 2001 15:51:01 -0000 1.1 +++ testmem.S 8 Feb 2002 10:15:05 -0000 1.2 @@ -9,9 +9,8 @@ * * * 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. + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of Index: testmem2.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/testmem2.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- testmem2.S 7 Oct 2001 19:34:17 -0000 1.2 +++ testmem2.S 8 Feb 2002 10:15:05 -0000 1.3 @@ -8,9 +8,8 @@ * * * 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. + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of |
From: Abraham vd M. <ab...@2d...> - 2002-02-08 09:26:18
|
Hi Erik! > > Anyone have any objections if I change blob so that you can put the > > kernel+ramdisk+jffs2+etc offsets & sizes in the parameter block? That w= ay > > you can have different board setups without changing blob. >=20 > As a matter of fact: yes. The idea is to use a flash partition table > for that. Both the partition table and the paramter block are small > structures, so I want to put them in the same flash block. I'm going to > work on the partition table this weekend: we need it anyway for quite > some other stuff (JFFS2, cramfs, tftp). Good. I also think we should make it so that you can configure this (partition+kernel parameters) from blob (and not via some other program + uploading the parameter block to blob) - after all, it is part of the configuration. --=20 Regards Abraham Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western Civilization? Gandhi: I think it would be a good idea. __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |
From: Erik M. <J.A...@it...> - 2002-02-08 08:19:30
|
On Fri, Feb 08, 2002 at 10:00:07AM +0200, Abraham vd Merwe wrote: > Anyone have any objections if I change blob so that you can put the > kernel+ramdisk+jffs2+etc offsets & sizes in the parameter block? That way > you can have different board setups without changing blob. As a matter of fact: yes. The idea is to use a flash partition table for that. Both the partition table and the paramter block are small structures, so I want to put them in the same flash block. I'm going to work on the partition table this weekend: we need it anyway for quite some other stuff (JFFS2, cramfs, tftp). Erik PS: I just finished a printf() function, I only need to test it properly before I commit it. -- 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: Abraham vd M. <ab...@2d...> - 2002-02-08 07:59:00
|
Hi! Anyone have any objections if I change blob so that you can put the kernel+ramdisk+jffs2+etc offsets & sizes in the parameter block? That way you can have different board setups without changing blob. --=20 Regards Abraham The wise man seeks everything in himself; the ignorant man tries to get everything from somebody else. __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |
From: Erik M. <er...@us...> - 2002-02-07 23:59:39
|
Update of /cvsroot/blob/blob/src/diag In directory usw-pr-cvs1:/tmp/cvs-serv31555 Modified Files: Makefile.am ld-script Removed Files: stack.S Log Message: Same bug fix for diag. Not tested, should work though. Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/diag/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.am 4 Feb 2002 18:02:42 -0000 1.11 +++ Makefile.am 7 Feb 2002 23:59:37 -0000 1.12 @@ -36,7 +36,6 @@ # be linked in the wrong order! diag_elf32_SOURCES = \ start.S \ - stack.S \ command_hist.c \ commands.c \ initcalls.c \ Index: ld-script =================================================================== RCS file: /cvsroot/blob/blob/src/diag/ld-script,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ld-script 28 Oct 2001 22:14:20 -0000 1.2 +++ ld-script 7 Feb 2002 23:59:37 -0000 1.3 @@ -55,11 +55,15 @@ .bss : { __bss_start = .; /* first the real BSS data */ - *(.bss) + *(.bss) + *(COMMON) /* and next the stack */ . = ALIGN(4); - *(.stack) + + /* allocate an 8kB stack */ + . = . + 8 * 1024; + __stack_end = .; __bss_end = .; } --- stack.S DELETED --- |
From: Erik M. <er...@us...> - 2002-02-07 23:08:03
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv12890 Modified Files: Makefile.am rest-ld-script.in Removed Files: stack.S Log Message: Fix bug with new GNU linkers outputting the .bss section. Old GNU linkers let the section attributes of the output section take precedence over the input section attributes, new GNU linkers do it the other way around. The .bss section only needs to be allocated, but if you put a .stack section in it that is CONTENTS+(whatever), the new linkers will promote the output .bss section to CONTENTS+(whatever) and hence the output section won't be discarded. This patch fixes it by directly allocating the necessary stack space in the linker script. Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 4 Feb 2002 18:02:42 -0000 1.21 +++ Makefile.am 7 Feb 2002 22:56:22 -0000 1.22 @@ -123,7 +123,6 @@ blob_rest_elf32_SOURCES = \ trampoline.S \ flashasm.S \ - stack.S \ testmem2.S \ bootldrpart.c \ commands.c \ Index: rest-ld-script.in =================================================================== RCS file: /cvsroot/blob/blob/src/blob/rest-ld-script.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rest-ld-script.in 7 Jan 2002 15:00:15 -0000 1.2 +++ rest-ld-script.in 7 Feb 2002 22:56:22 -0000 1.3 @@ -92,12 +92,16 @@ .bss : { __bss_start = .; /* first the real BSS data */ - *(.bss) + *(.bss) + *(COMMON) /* and next the stack */ . = ALIGN(4); __stack_start = .; - *(.stack) + + /* allocate an 8kB stack */ + . = . + 8 * 1024; + __stack_end = .; __bss_end = .; } --- stack.S DELETED --- |
From: Erik M. <J.A...@it...> - 2002-02-07 13:08:31
|
On Wed, Feb 06, 2002 at 05:56:21PM -0800, Christopher Hoover wrote: > Is it just me? If I type characters to blob when blob isn't reading > them (e.g. in the midst of flashing or erasing), the serial i/o hangs. > When the command prompt comes back, blob won't accept any input. > > This is on BadgePAD 4 which is SA-1110/SA-1111. > > I'm running at 115k2,8N1 with no flow control. Yes, I've seen it as well. I guess it's something with the new serial driver, but I still haven't a clue why it happens. I think it's timer related, I need to go over that code as well. 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: Abraham vd M. <ab...@2d...> - 2002-02-07 07:39:26
|
Hi Christopher! > Is it just me? If I type characters to blob when blob isn't reading > them (e.g. in the midst of flashing or erasing), the serial i/o hangs. > When the command prompt comes back, blob won't accept any input. >=20 > This is on BadgePAD 4 which is SA-1110/SA-1111. >=20 > I'm running at 115k2,8N1 with no flow control. Yes, happens to me too. --=20 Regards Abraham Do you think the "Monkees" should get gas on odd or even days? __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |