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...@us...> - 2003-08-06 22:55:44
|
Update of /cvsroot/blob/blob In directory sc8-pr-cvs1:/tmp/cvs-serv7704 Modified Files: AUTHORS acconfig.h configure.in Log Message: Support for CSIR IMS board and also a working PXA25x port. Still needs some cleaning up and the lubbock and PXA IDP targets are going to be broken by this (not sure if they ever worked and fixing them is trivial). Index: AUTHORS =================================================================== RCS file: /cvsroot/blob/blob/AUTHORS,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- AUTHORS 14 Oct 2002 13:17:24 -0000 1.12 +++ AUTHORS 6 Aug 2003 22:55:40 -0000 1.13 @@ -10,38 +10,31 @@ 2600 GA Delft The Netherlands - * Clock switching code ====================== - Johan Pouwelse <J.A...@it...> - * Assabet port ============== - Jeff Sutherland <jsu...@ac...> - Chester <ch...@li...> - * PLEB port =========== - Adam Wiggins <awi...@cs...> - * Brutus port ============= - Erik Mouw <J.A...@it...> - * NESA port =========== - Russ Dill <Rus...@as...> - * Shannon (aka TuxScreen) port ============================== - Tim Riker <Ti...@Ri...>, <Ti...@De...>, <Ti...@Li...> - * Various fixes and additions ============================= - Mark Huang <mh...@li...>, RTC fix @@ -54,36 +47,29 @@ ================== - Stefan Eletzhofer <ste...@el...> - * Memory tester =============== - Stefan Eletzhofer <ste...@el...> - * Ipaq H3600 port ================= - Erik Mouw <J.A...@it...> - * Vercel UD-1 port ================== - Tim Riker <Ti...@Ri...>, <Ti...@De...>, <Ti...@Li...> - * Jornada 720 port ================== - Christopher Hoover <ch...@hp...> - * Badge4 ======== - Christopher Hoover <ch...@hp...> - * Frodo port ============ -- Abraham vd Merwe <ab...@2d...>, <ab...@de...>, <ab...@bl...>, <ab...@fr...> - +- Abraham vd Merwe <ab...@4d...> * Accelent IDP port =================== @@ -104,4 +90,8 @@ * Iskratel CEP port =================== - Matej Sekoranja <mat...@co...> + +* CSIR IMS port +=============== +- Abraham vd Merwe <ab...@4d...> Index: acconfig.h =================================================================== RCS file: /cvsroot/blob/blob/acconfig.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- acconfig.h 3 Apr 2003 14:58:17 -0000 1.25 +++ acconfig.h 6 Aug 2003 22:55:40 -0000 1.26 @@ -125,6 +125,9 @@ /* Define for Accelent PXA-based IDP */ #undef PXA_IDP +/* Define for CSIR Incident Management System */ +#undef CSIR_IMS + /* Define if LCD support is wanted */ #undef CONFIG_LCD_SUPPORT Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- configure.in 3 Apr 2003 15:02:56 -0000 1.63 +++ configure.in 6 Aug 2003 22:55:40 -0000 1.64 @@ -82,21 +82,22 @@ brutus Intel Brutus cep Iskratel CEP creditlart CreditLART - dafit Prueftechnik VibXpert - frodo 2d3D, Inc. SA-1110 Development Board + dafit Prueftechnik VibXpert + frodo 2d3D, Inc. SA-1110 Development Board h3600 Compaq Ipaq H36x0 hackkit The Hack Kit base board idr Vercel UD-1 jornada720 HP Jornada 720 with Flash board lart LART lubbock Intel HCDDBCTA1 (Lubbock) - miniprint FGAG Miniprint + miniprint FGAG Miniprint nesa NESA pleb PLEB - pxa_idp Accelent PXA-based IDP + pxa_idp Accelent PXA-based IDP shannon TuxScreen (Shannon) system3 Prueftechnik Digital Board trizeps Keith & Koep Trizeps Board + csir_ims CSIR Incident Management System Default board is lart], board_name="$withval", board_name="lart") @@ -358,6 +359,15 @@ use_cpu="sa1110" use_lcd="no" ;; + csir_ims) + board_name="CSIR Incident Management System" + AC_DEFINE(CSIR_IMS) + BLOB_PLATFORM_OBJS="csir_ims.o" + BLOB_FLASH_OBJS="intel16.o" + DIAG_PLATFORM_OBJS="csir_ims.o" + use_cpu="pxa250" + use_lcd="no" + ;; *) AC_MSG_RESULT(unknown) AC_MSG_ERROR([Unknown board name \"$board_name\", bailing out]) @@ -396,7 +406,7 @@ ;; pxa250) dnl PXA250 CPU: SDRAM memory setup code - BLOB_STARTCODE_OBJS="start-pxa.o" + BLOB_STARTCODE_OBJS="start-pxa.o gpio-pxa.o" BLOB_MEMSETUP_OBJS="memsetup-pxa250.o" BLOB_REBOOT_DRIVER_OBJS="reboot-pxa.o" BLOB_SERIAL_DRIVER_OBJS="serial-pxa.o" @@ -773,6 +783,7 @@ include/Makefile include/blob/Makefile include/blob/arch/Makefile +include/blob/proc/Makefile include/net/Makefile src/Makefile src/blob/Makefile |
From: Abraham vd M. <ab...@us...> - 2003-08-06 22:55:44
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv7704/include/blob/arch Modified Files: Makefile.am Log Message: Support for CSIR IMS board and also a working PXA25x port. Still needs some cleaning up and the lubbock and PXA IDP targets are going to be broken by this (not sure if they ever worked and fixing them is trivial). Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 26 Nov 2002 18:52:52 -0000 1.12 +++ Makefile.am 6 Aug 2003 22:55:40 -0000 1.13 @@ -30,7 +30,8 @@ shannon.h \ system3.h \ trizeps.h \ - pxa_idp.h + pxa_idp.h \ + csir_ims.h CLEANFILES = ${srcdir}/*~ |
From: Abraham vd M. <ab...@us...> - 2003-08-06 22:55:44
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv7704/include/blob Modified Files: Makefile.am arch.h led.h linux.h Log Message: Support for CSIR IMS board and also a working PXA25x port. Still needs some cleaning up and the lubbock and PXA IDP targets are going to be broken by this (not sure if they ever worked and fixing them is trivial). Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/blob/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 3 Apr 2003 14:51:34 -0000 1.19 +++ Makefile.am 6 Aug 2003 22:55:40 -0000 1.20 @@ -11,7 +11,8 @@ ########################################################################### SUBDIRS = \ - arch + arch \ + proc noinst_HEADERS = \ @@ -47,8 +48,6 @@ partition.h \ pcmcia.h \ reboot.h \ - sa1100.h \ - sa1111.h \ serial.h \ tar.h \ time.h \ Index: arch.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- arch.h 3 Apr 2003 15:02:59 -0000 1.13 +++ arch.h 6 Aug 2003 22:55:40 -0000 1.14 @@ -27,10 +27,10 @@ #define BLOB_ARCH_H /* processor specific include files */ -#if defined PXA_IDP +#if defined(PXA_IDP) || defined(CSIR_IMS) #include <blob/proc/pxa.h> #else -#include <blob/proc/sa11x0.h> +#include <blob/proc/sa1100.h> #endif /* architecture specific include files */ @@ -76,6 +76,8 @@ # include <blob/arch/trizeps.h> #elif defined PXA_IDP # include <blob/arch/pxa_idp.h> +#elif defined CSIR_IMS +# include <blob/arch/csir_ims.h> #else # error "Please add an architecture specific include file" #endif Index: led.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/led.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- led.h 13 Feb 2003 01:10:52 -0000 1.4 +++ led.h 6 Aug 2003 22:55:40 -0000 1.5 @@ -27,7 +27,7 @@ -int led_init(void); +void led_init(void); int led_on(void); int led_off(void); void led_toggle(void); Index: linux.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/linux.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- linux.h 3 Apr 2003 15:02:59 -0000 1.13 +++ linux.h 6 Aug 2003 22:55:40 -0000 1.14 @@ -72,12 +72,11 @@ # define ARCH_NUMBER (112) #elif defined TRIZEPS # define ARCH_NUMBER (74) +#elif defined CSIR_IMS +# define ARCH_NUMBER (358) #else #warning "FIXME: Calling the kernel with a generic SA1100 architecture code. YMMV!" #define ARCH_NUMBER (18) #endif - - - #endif |
From: Abraham vd M. <ab...@us...> - 2003-08-06 22:55:44
|
Update of /cvsroot/blob/blob/src In directory sc8-pr-cvs1:/tmp/cvs-serv7704/src Modified Files: Makefile.am Log Message: Support for CSIR IMS board and also a working PXA25x port. Still needs some cleaning up and the lubbock and PXA IDP targets are going to be broken by this (not sure if they ever worked and fixing them is trivial). Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 29 Jan 2002 17:47:23 -0000 1.15 +++ Makefile.am 6 Aug 2003 22:55:40 -0000 1.16 @@ -13,8 +13,7 @@ SUBDIRS = \ commands \ lib \ - blob \ - diag + blob CLEANFILES = ${srcdir}/*~ |
From: Yves R. <y.r...@in...> - 2003-05-15 09:30:54
|
Hello people, I find the timeout code in lib/command.c function GetCommand works much better with this patch. Otherwise, it hangs if a character is already present in the uart, and doesn't timeout if there is none. While I am at it, why is GetCommand weak? Cheers, Y. diff -u -r1.1.1.1 command.c --- command.c 2002/11/05 13:32:25 1.1.1.1 +++ command.c 2003/05/14 16:34:11 @@ -275,7 +275,7 @@ for(numRead = 0, i = 0; numRead < maxRead;) { /* try to get a byte from the serial port */ - while(serial_poll() != 0) { + while(serial_poll() == 0) { currentTime = TimerGetTime(); /* check timeout value */ |
From: Stefan E. <se...@us...> - 2003-04-11 21:24:16
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv3541 Modified Files: dafit.c Log Message: - init GPIO levels properly for DAFIT Index: dafit.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/dafit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dafit.c 3 Apr 2003 15:02:58 -0000 1.1 +++ dafit.c 11 Apr 2003 21:24:12 -0000 1.2 @@ -61,15 +61,6 @@ * defines */ -#if 0 -#define CONFIG_PCMCIA_SUPPORT -#define CONFIG_BLOB_PARTITION -#define CONFIG_GIO_RAM -#define CONFIG_GIO_FLASH -#define CONFIG_GIO_BLOB_PARTITION -#define CONFIG_CMD_SYSUPDATE -#endif - /* more readable IMHO */ #define MEM( x ) (*((u32 *)(x))) #define SET(reg,bit) ((reg) |= (1<<(bit))) @@ -93,7 +84,7 @@ * module globals */ -#if SYSTEM3_DEBUG +#if DAFIT_DEBUG static int dbg = 1; #else static int sys3_dbg = 0; @@ -101,7 +92,7 @@ /* flash descriptor for System3 flash. */ /* System 3 uses 2xINTEL e28F640 Chips */ -static const flash_descriptor_t system3_flash_descriptors[] = +static const flash_descriptor_t dafit_flash_descriptors[] = { { size: 2 * 128 * 1024, @@ -113,8 +104,7 @@ }, }; -#if defined(CONFIG_BLOB_PARTITION) -/* default partition table for SYSTEM3 +/* default partition table for DAFIT System3 flash layout ~~~~~~~~~~~~~~~~~~~~ @@ -131,13 +121,13 @@ 0x01000000 total 16M Note: - - system3 partitions are named like the files they're flashed + - dafit partitions are named like the files they're flashed with. This is to keep updating easy: Just loop through all files that are on our update media and flash them on the partition named like the file. */ -static const blob_partition_t system3_default_partition_table[] = { +static const blob_partition_t dafit_default_partition_table[] = { { /* start of table */ magic: BLOB_DEFAULT_PART_TABLE_MAGIC, @@ -207,7 +197,6 @@ magic: BLOB_PART_LAST_MAGIC } }; -#endif /********************************************************************** * static functions @@ -215,29 +204,46 @@ static char module_version[] = "$Id$"; /********************************************************************* - * init_system3_flash - inits system 3 flash driver + * init_dafit_flash - inits system 3 flash driver */ -static void init_system3_flash_driver(void) +static void init_dafit_flash_driver(void) { - flash_descriptors = system3_flash_descriptors; + flash_descriptors = dafit_flash_descriptors; flash_driver = &intel32_flash_driver; } -__initlist(init_system3_flash_driver, INIT_LEVEL_DRIVER_SELECTION); +__initlist(init_dafit_flash_driver, INIT_LEVEL_DRIVER_SELECTION); /********************************************************************* - * system3_init_hardware - inits system 3 LL hardware stuff + * dafit_init_hardware - inits system 3 LL hardware stuff */ -static void system3_init_hardware(void) +static void dafit_init_hardware(void) { /* init on-board CPLD */ - MEM(SYSTEM3_CTRL_0) = 0x03; - MEM(SYSTEM3_CTRL_1) = 0x00; - MEM(SYSTEM3_CTRL_2) = 0x00; + MEM(DAFIT_CTRL_0) = 0x03; + MEM(DAFIT_CTRL_1) = 0x00; + MEM(DAFIT_CTRL_2) = 0x00; /* initialize GPIO states */ - GPDR = 0x0f35a7fc; - GPSR |= GPIO_GPIO15 | GPIO_GPIO20; /* 15: core fast, 20: SCL */ - GPCR |= 0x070527fc; + GPDR = 0x0ffdbb80; + GPSR |= + GPIO_GPIO13 | + GPIO_GPIO15 | + GPIO_GPIO26; + GPCR |= + GPIO_GPIO7 | + GPIO_GPIO8 | + GPIO_GPIO9 | + GPIO_GPIO11 | + GPIO_GPIO12 | + GPIO_GPIO16 | + GPIO_GPIO18 | + GPIO_GPIO19 | + GPIO_GPIO20 | + GPIO_GPIO21 | + GPIO_GPIO22 | + GPIO_GPIO23 | + GPIO_GPIO24 | + GPIO_GPIO25; /* activate SYSCLCK for keyboard controller */ RST( MEM(TUCR), 31 ); @@ -249,7 +255,7 @@ msleep( 1 ); - MEM(SYSTEM3_CTRL_1) = 0x04; + MEM(DAFIT_CTRL_1) = 0x04; /* tweak blob config */ blob_status.boot_delay = 1; @@ -259,16 +265,15 @@ serial_driver = &sa11x0_serial_driver; led_driver = &sa11x0_gpio_led_driver; } -__initlist(system3_init_hardware, INIT_LEVEL_DRIVER_SELECTION); +__initlist(dafit_init_hardware, INIT_LEVEL_DRIVER_SELECTION); -#if defined(CONFIG_BLOB_PARTITION) /********************************************************************** - * system3 default partition table + * dafit default partition table */ -static void system3_set_partition_table(void) +static void dafit_set_partition_table(void) { /* the default partition table */ - default_partition_table = system3_default_partition_table; + default_partition_table = dafit_default_partition_table; /* we don't know where the flash partition table will live, so * put the pointer at 0x0000000 and let the partition table @@ -277,10 +282,9 @@ flash_partition_table = (blob_partition_t*)0x00000000; } -__initlist(system3_set_partition_table, INIT_LEVEL_OTHER_STUFF); +__initlist(dafit_set_partition_table, INIT_LEVEL_OTHER_STUFF); /* FIXME: need to think if this is the correct init level, we might * want to have this before the param list stuff starts running */ -#endif /***************************************************************** @@ -307,7 +311,7 @@ printf( " revision 0x%02X.\n", PT_ID_REVISION ); return 0; } -static char sysver_help[] = "print BLOB and system3 version number\n"; +static char sysver_help[] = "print BLOB and dafit version number\n"; __commandlist(sysver_cmd, "sysver", sysver_help); /********************************************************************** @@ -357,7 +361,7 @@ */ int pcmcia_init() { - printf( "PT Digital Board PCMCIA init\n" ); + printf( "PT VibXpert CF init\n" ); return 0; } #endif @@ -414,121 +418,3 @@ char bootp_help[] = "bootp test command. No args.\n";; __commandlist(bootp_cmd, "net_bootp", bootp_help); -int arp_cmd(int argc, char *argv[]) -{ - int ret = 0; - extern int do_arp( u8 *, u8 *); - u8 serverip[4] = { 192, 168, 1, 11 }; - u8 servereth[6]; - - ret = smc_init( 0x18000000 ); - if ( ret ) { - printf( "smc_init failed: %d\n", ret ); - return ret; - } - - ret = do_arp( servereth, serverip ); - - printf( "%s: got eth addr %02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__, - servereth[0], servereth[1], servereth[2], servereth[3], servereth[4], - servereth[5] ); - - return 0; -} -char arp_help[] = "arp test command. No args.\n";; -__commandlist(arp_cmd, "arp", arp_help); - - -int setip_cmd( int argc, char *argv[] ) -{ - extern u8 clientipaddress[4]; - extern u8 serveripaddress[4]; - u8 *ip; - char *ptr, *num; - int i, fini; - - if ( argc < 3 ) - return -EINVAL; - - switch ( argv[1][0] ) { - case 'c': - case 'C': - ip = clientipaddress; - break; - case 's': - case 'S': - ip = serveripaddress; - break; - default: - return -EINVAL; - break; - } - - num = ptr = argv[2]; - fini=0; - for ( i=0; i<4 || !fini; i++ ) { - u32 n; - - while ( *ptr != '\0' && *ptr != '.' ) - ptr++; - - if ( *ptr == '\0' ) - fini = 1; - - *ptr = 0; - - strtou32( num, &n ); - ip[i]=n; - - num = ++ptr; - } - - if ( fini && i<4 ) { - printf( "error parsing ip.\n" ); - return -EINVAL; - } - - printf( "Set IP to %d.%d.%d.%d\n", - ip[0], ip[1], ip[2], ip[3] ); - - return 0; -} -char setip_help[] = "setip command. Set IP addresses for tftp.\n" -"usage: setip {client|server} ip\n" -"\tip in usual dotted-quad format please.\n";; -__commandlist(setip_cmd, "setip", setip_help); - -int tftp_cmd(int argc, char *argv[]) -{ - int ret = 0; - extern int do_tftp(char *file, unsigned long addr, unsigned long *size); - unsigned long size = 0; - char *tftp_file = "update.tar"; - - if ( argc>1 ) { - tftp_file = argv[1]; - } else { - printf( "No filename given, using '%s'\n", - tftp_file ); - } - - ret = smc_init( 0x18000000 ); - if ( ret ) { - printf( "smc_init failed: %d\n", ret ); - return ret; - } - - ret = do_tftp( tftp_file, RAM_START, &size ); - if ( ret ) { - return -EINVAL; - } - - printf( "%s: file '%s' loaded via tftp to address 0x%08x.\n", - __FUNCTION__, tftp_file, RAM_START ); - return 0; -} -char tftp_help[] = "tftp command.\n" -"usage: tftp filename\n" -"\tdownloads file over TFTP to RAM.\n" -"\tUse setip to set client and server IP addresses\n"; -__commandlist(tftp_cmd, "tftp", tftp_help); |
From: Stefan E. <se...@us...> - 2003-04-03 15:42:01
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv22372/src/blob Modified Files: initcalls.c Log Message: - PCMCIA, CF, IDE and GENERIC_IO support added to automake/autoconf Index: initcalls.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/initcalls.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- initcalls.c 27 Apr 2002 00:55:04 -0000 1.4 +++ initcalls.c 3 Apr 2003 14:58:16 -0000 1.5 @@ -33,6 +33,7 @@ #include <blob/led.h> #include <blob/serial.h> #include <blob/time.h> +#include <blob/gio_drivers.h> @@ -52,8 +53,11 @@ __initlist(led_init, INIT_LEVEL_INITIAL_HARDWARE); __initlist(TimerInit, INIT_LEVEL_OTHER_HARDWARE); - - +#if defined( CONFIG_GIO_SUPPORT ) +__initlist(init_flash_io, INIT_LEVEL_OTHER_STUFF + 2); +__initlist(init_part_io, INIT_LEVEL_OTHER_STUFF + 2); +__initlist(init_ram_io, INIT_LEVEL_OTHER_STUFF + 2); +#endif /* exit calls */ __exitlist(disable_icache, INIT_LEVEL_INITIAL_HARDWARE); |
From: Stefan E. <se...@us...> - 2003-04-03 15:31:48
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22372/src/lib Modified Files: Makefile.am Log Message: - PCMCIA, CF, IDE and GENERIC_IO support added to automake/autoconf Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Makefile.am 18 Mar 2003 17:38:16 -0000 1.26 +++ Makefile.am 3 Apr 2003 14:58:17 -0000 1.27 @@ -61,20 +61,36 @@ arp.c \ bootp.c \ tftp.c \ - ip_bits.c + ip_bits.c\ + ide.c \ + pcmcia.c \ + cf.c \ + generic_io.c \ + gio_part_blob.c \ + gio_ram.c \ + gio_flash.c \ + tar.c libblob_a_DEPENDENCIES = \ @BLOB_REBOOT_DRIVER_OBJS@ \ @BLOB_SERIAL_DRIVER_OBJS@ \ @BLOB_LED_DRIVER_OBJS@ \ - @BLOB_NETWORK_OBJS@ + @BLOB_NETWORK_OBJS@ \ + @BLOB_PCMCIA_OBJS@ \ + @BLOB_IDE_OBJS@ \ + @BLOB_CF_OBJS@ \ + @BLOB_GIO_OBJS@ libblob_a_LIBADD = \ @BLOB_REBOOT_DRIVER_OBJS@ \ @BLOB_SERIAL_DRIVER_OBJS@ \ @BLOB_LED_DRIVER_OBJS@ \ - @BLOB_NETWORK_OBJS@ + @BLOB_NETWORK_OBJS@ \ + @BLOB_PCMCIA_OBJS@ \ + @BLOB_IDE_OBJS@ \ + @BLOB_CF_OBJS@ \ + @BLOB_GIO_OBJS@ INCLUDES += \ -I${top_builddir}/include \ |
From: Stefan E. <se...@us...> - 2003-04-03 15:31:47
|
Update of /cvsroot/blob/blob In directory sc8-pr-cvs1:/tmp/cvs-serv22372 Modified Files: configure.in acconfig.h Log Message: - PCMCIA, CF, IDE and GENERIC_IO support added to automake/autoconf Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- configure.in 18 Mar 2003 17:38:14 -0000 1.61 +++ configure.in 3 Apr 2003 14:58:17 -0000 1.62 @@ -82,7 +82,7 @@ brutus Intel Brutus cep Iskratel CEP creditlart CreditLART - frodo 2d3D, Inc. SA-1110 Development Board + frodo 2d3D, Inc. SA-1110 Development Board h3600 Compaq Ipaq H36x0 hackkit The Hack Kit base board idr Vercel UD-1 @@ -449,14 +449,6 @@ blob_commands="$all_commands" fi -ALL_COMMANDS=`echo $default_commands $all_commands | sed 's/,//g'` -BLOB_COMMANDS=`echo $default_commands $blob_commands | sed 's/,//g'` - -AC_SUBST(ALL_COMMANDS) -AC_SUBST(BLOB_COMMANDS) - - - dnl Check for individual features AC_ARG_ENABLE(clock-scaling, @@ -510,6 +502,11 @@ [network_flag=no]) +AC_ARG_ENABLE(gio, +[ --enable-gio Enable generic IO (sysupd command)], +[gio_flag=$enable_gio], +[gio_flag=no]) + dnl Check if the user wants *all* features @@ -529,6 +526,7 @@ cramfs_flag=yes zimage_flag=yes network_flag=yes + network_flag=yes fi @@ -639,10 +637,46 @@ if test "x$network_flag" = "xyes" ; then BLOB_NETWORK_OBJS="bootp.o arp.o tftp.o ip_bits.o" AC_DEFINE(CONFIG_NETWORK_SUPPORT) + blob_commands="$blob_commands, setip, tftp"; + fi AC_SUBST(BLOB_NETWORK_OBJS) +dnl Check wether or not gio support is wanted +if test "x$gio_flag" = "xyes" ; then + BLOB_GIO_OBJS="generic_io.o gio_flash.o gio_part_blob.o gio_ram.o tar.o" + AC_DEFINE(CONFIG_GIO_SUPPORT) +dnl gio needs cf, pcmcia and ide + pcmcia_flag="yes"; + ide_flag="yes"; + cf_flag="yes"; + + blob_commands="$blob_commands, sysupd"; +fi +AC_SUBST(BLOB_GIO_OBJS) + +dnl Check wether or not pcmcia support is wanted +if test "x$pcmcia_flag" = "xyes" ; then + BLOB_PCMCIA_OBJS="pcmcia.o" + AC_DEFINE(CONFIG_PCMCIA_SUPPORT) + +fi +AC_SUBST(BLOB_PCMCIA_OBJS) + +dnl Check wether or not ide support is wanted +if test "x$ide_flag" = "xyes" ; then + AC_DEFINE(CONFIG_IDE_SUPPORT) + BLOB_IDE_OBJS="ide.o" +fi +AC_SUBST(BLOB_IDE_OBJS) + +dnl Check wether or not cf support is wanted +if test "x$cf_flag" = "xyes" ; then + AC_DEFINE(CONFIG_CF_SUPPORT) + BLOB_CF_OBJS="cf.o" +fi +AC_SUBST(BLOB_CF_OBJS) dnl Check for extra debug info AC_ARG_ENABLE(blob-debug, @@ -655,6 +689,11 @@ fi +dnl commands subst here so that extra flags can add commands +ALL_COMMANDS=`echo $default_commands $all_commands | sed 's/,//g'` +BLOB_COMMANDS=`echo $default_commands $blob_commands | sed 's/,//g'` +AC_SUBST(ALL_COMMANDS) +AC_SUBST(BLOB_COMMANDS) dnl Checks for typedefs, structures, and compiler characteristics. @@ -754,6 +793,10 @@ echo "JFFS2 support ${jffs2_flag}" echo "cramfs support ${cramfs_flag}" echo "zImage support ${zimage_flag}" +echo "PCMCIA support ${pcmcia_flag}" +echo "CF support ${cf_flag}" +echo "IDE support ${ide_flag}" +echo "Generic IO support ${gio_flag}" echo "Network support ${network_flag}" echo "Blob commands: ${BLOB_COMMANDS}" echo "Run-time debug information ${blob_debug_flag}" Index: acconfig.h =================================================================== RCS file: /cvsroot/blob/blob/acconfig.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- acconfig.h 18 Mar 2003 17:38:14 -0000 1.24 +++ acconfig.h 3 Apr 2003 14:58:17 -0000 1.25 @@ -113,6 +113,9 @@ /* Define for PT System 3 boards */ #undef PT_SYSTEM3 +/* Define for PT VibXpert boards */ +#undef PT_DAFIT + /* Define for Shannon (TuxScreen) */ #undef SHANNON @@ -145,6 +148,18 @@ /* Define if network support is wanted */ #undef CONFIG_NETWORK_SUPPORT + +/* Define if generic io support is wanted */ +#undef CONFIG_GIO_SUPPORT + +/* Define if pcmcia support is wanted */ +#undef CONFIG_PCMCIA_SUPPORT + +/* Define if cf support is wanted */ +#undef CONFIG_CF_SUPPORT + +/* Define if ide support is wanted */ +#undef CONFIG_IDE_SUPPORT @BOTTOM@ |
From: Stefan E. <se...@us...> - 2003-04-03 15:06:32
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv29929/include/blob Modified Files: pcmcia.h Log Message: - add dafit pcmcia support Index: pcmcia.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/pcmcia.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pcmcia.h 3 Apr 2003 14:52:46 -0000 1.7 +++ pcmcia.h 3 Apr 2003 15:06:28 -0000 1.8 @@ -76,7 +76,8 @@ */ #define PCMCIA_MAX_SLOTS 2 -#if defined(BADGE4) || defined(IDR) || defined(PT_SYSTEM3) || defined(SHANNON) +#if defined(BADGE4) || defined(IDR) || defined(PT_SYSTEM3) || defined(SHANNON) || \ + defined(PT_DAFIT) # define PCMCIA_S0_BASE 0x20000000 # define PCMCIA_S0_IO_BASE 0x20000000 # define PCMCIA_S0_ATTR_BASE 0x28000000 |
From: Stefan E. <se...@us...> - 2003-04-03 15:03:33
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv26874/src/blob Modified Files: Makefile.am Added Files: dafit.c Log Message: - add PT VibXpert (DAFIT) support --- NEW FILE: dafit.c --- /* * dafit.c: PT VibXpert specific tweaks * * Copyright (C) 2001 Erik Mouw (J.A...@it...) * Copyright (C) 2001,2002,2003 Stefan Eletzhofer * (ste...@el...) * * 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: dafit.c,v 1.1 2003/04/03 15:02:58 seletz Exp $" /********************************************************************** * includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/main.h> #include <blob/arch.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/util.h> #include <blob/reboot.h> #include <blob/serial.h> #include <blob/flash.h> #include <blob/init.h> #include <blob/command.h> #include <blob/uucodec.h> #include <blob/time.h> #include <blob/partition.h> #include <blob/led.h> #include <blob/sa1100.h> #include <blob/sa1111.h> #include <blob/generic_io.h> #include <blob/pcmcia.h> #include <blob/cf.h> #include <blob/ide.h> #include <blob/tar.h> #include <net/smc9196.h> /********************************************************************** * defines */ #if 0 #define CONFIG_PCMCIA_SUPPORT #define CONFIG_BLOB_PARTITION #define CONFIG_GIO_RAM #define CONFIG_GIO_FLASH #define CONFIG_GIO_BLOB_PARTITION #define CONFIG_CMD_SYSUPDATE #endif /* more readable IMHO */ #define MEM( x ) (*((u32 *)(x))) #define SET(reg,bit) ((reg) |= (1<<(bit))) #define RST(reg,bit) ((reg) &= ~(1<<(bit))) #define DAFIT_DEBUG 1 #if DAFIT_DEBUG # define DBG( x, args... ) if ( dbg>=x ) printf( args ) #else # define DBG( x, args... ) #endif /********************************************************************** * globals */ extern blob_status_t blob_status; /********************************************************************** * module globals */ #if SYSTEM3_DEBUG static int dbg = 1; #else static int sys3_dbg = 0; #endif /* flash descriptor for System3 flash. */ /* System 3 uses 2xINTEL e28F640 Chips */ static const flash_descriptor_t system3_flash_descriptors[] = { { size: 2 * 128 * 1024, num: 64, lockable: 1 }, { /* NULL block */ }, }; #if defined(CONFIG_BLOB_PARTITION) /* default partition table for SYSTEM3 System3 flash layout ~~~~~~~~~~~~~~~~~~~~ 16Mb Flash 256k erase size 0x00000000 BLOB 256k 0x00040000 CONFIG 256k 0x00080000 KERNEL 1024k 0x00180000 INITRD 1536k 0x00300000 ROOT 6M 0x00900000 DATA 7M 0x01000000 total 16M Note: - system3 partitions are named like the files they're flashed with. This is to keep updating easy: Just loop through all files that are on our update media and flash them on the partition named like the file. */ static const blob_partition_t system3_default_partition_table[] = { { /* start of table */ magic: BLOB_DEFAULT_PART_TABLE_MAGIC, next: sizeof(blob_partition_t), offset: 0x00000000, /* absolute base address */ size: 16 * 1024 * 1024 /* total size of the flash */ }, { /* blob itself */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: BLOB_FLASH_BASE, size: BLOB_FLASH_LEN, name: "blob", mem_base: BLOB_RAM_BASE }, { /* system config area */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: CONFIG_FLASH_BASE, size: CONFIG_FLASH_LEN, name: "config.tar", flags: 0 }, { /* kernel */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: KERNEL_FLASH_BASE, size: KERNEL_FLASH_LEN, name: "zImage", flags: BLOB_PART_FLAG_LOAD | BLOB_PART_FLAG_EXEC, mem_base: KERNEL_RAM_BASE, entry_point: KERNEL_RAM_BASE }, { /* ramdisk */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: RAMDISK_FLASH_BASE, size: RAMDISK_FLASH_LEN, name: "initrd.gz", flags: BLOB_PART_FLAG_LOAD, mem_base: RAMDISK_RAM_BASE }, { /* root (cramfs) */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: ROOTFS_FLASH_BASE, size: ROOTFS_FLASH_LEN, name: "cramfs", flags: BLOB_PART_FLAG_CRAMFS, }, { /* data (cramfs) */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: DATAFS_FLASH_BASE, size: DATAFS_FLASH_LEN, name: "data.img", flags: BLOB_PART_FLAG_CRAMFS, }, { /* last entry */ magic: BLOB_PART_LAST_MAGIC } }; #endif /********************************************************************** * static functions */ static char module_version[] = "$Id: dafit.c,v 1.1 2003/04/03 15:02:58 seletz Exp $"; /********************************************************************* * init_system3_flash - inits system 3 flash driver */ static void init_system3_flash_driver(void) { flash_descriptors = system3_flash_descriptors; flash_driver = &intel32_flash_driver; } __initlist(init_system3_flash_driver, INIT_LEVEL_DRIVER_SELECTION); /********************************************************************* * system3_init_hardware - inits system 3 LL hardware stuff */ static void system3_init_hardware(void) { /* init on-board CPLD */ MEM(SYSTEM3_CTRL_0) = 0x03; MEM(SYSTEM3_CTRL_1) = 0x00; MEM(SYSTEM3_CTRL_2) = 0x00; /* initialize GPIO states */ GPDR = 0x0f35a7fc; GPSR |= GPIO_GPIO15 | GPIO_GPIO20; /* 15: core fast, 20: SCL */ GPCR |= 0x070527fc; /* activate SYSCLCK for keyboard controller */ RST( MEM(TUCR), 31 ); GAFR |= GPIO_32_768kHz; GPDR |= GPIO_32_768kHz; /* 3.6864 MHz SYSCLK */ TUCR = TUCR_3_6864MHz; msleep( 1 ); MEM(SYSTEM3_CTRL_1) = 0x04; /* tweak blob config */ blob_status.boot_delay = 1; /* select drivers */ reboot_driver = &sa11x0_reboot_driver; serial_driver = &sa11x0_serial_driver; led_driver = &sa11x0_gpio_led_driver; } __initlist(system3_init_hardware, INIT_LEVEL_DRIVER_SELECTION); #if defined(CONFIG_BLOB_PARTITION) /********************************************************************** * system3 default partition table */ static void system3_set_partition_table(void) { /* the default partition table */ default_partition_table = system3_default_partition_table; /* we don't know where the flash partition table will live, so * put the pointer at 0x0000000 and let the partition table * parser figure out. */ flash_partition_table = (blob_partition_t*)0x00000000; } __initlist(system3_set_partition_table, INIT_LEVEL_OTHER_STUFF); /* FIXME: need to think if this is the correct init level, we might * want to have this before the param list stuff starts running */ #endif /***************************************************************** * sysver - print system version */ static int sysver_cmd( int argc, char *argv[] ) { printf( "version: '%s'\n", module_version ); switch ( PT_ID_BOARDID ) { case PT_BOARD_ALPHA: printf( "ALPHA Board" ); break; case PT_BOARD_SYS3: printf( "SYSTEM 3 Board" ); break; case PT_BOARD_DAFIT: printf( "DAFIT Board" ); break; default: printf( "UNKNOWN Board (ID 0x%X)", PT_ID_BOARDID ); break; } printf( " revision 0x%02X.\n", PT_ID_REVISION ); return 0; } static char sysver_help[] = "print BLOB and system3 version number\n"; __commandlist(sysver_cmd, "sysver", sysver_help); /********************************************************************** * setdbg - set debug level */ int setdbg_cmd( int argc, char *argv[] ) { extern int cf_dbg_set(int); int ret; u32 lvl; if ( argc < 2 ) return -EINVAL; ret = strtou32(argv[1], &lvl); if ( ret < 0 ) return -EINVAL; dbg = lvl; #if defined(CONFIG_PCMCIA_SUPPORT) if ( lvl>5 ) { cf_dbg_set( 5 ); tar_dbg_set( 5 ); } else { cf_dbg_set( 0 ); tar_dbg_set( 0 ); } if ( lvl>10 ) { io_dbg_set( 5 ); pcmcia_dbg_set( 5 ); } else { io_dbg_set( 0 ); pcmcia_dbg_set( 0 ); } #endif printf( "setdbg: debug level set to %d\n", dbg ); return 0; } static char setdbg_help[] = "setdbg level\n"; __commandlist(setdbg_cmd, "setdbg", setdbg_help); #if defined(CONFIG_PCMCIA_SUPPORT) /***************************************************************** * pcmcia_init - initialize PCMCIA */ int pcmcia_init() { printf( "PT Digital Board PCMCIA init\n" ); return 0; } #endif /***************************************************************** * misc utility funcs */ /***************************************************************** * manually reference flash and download commands until they * are in libblob. */ #if 0 extern int cf_test_module( int argc, char *argv[] ); extern char cf_help[]; __commandlist(cf_test_module, "cftest", cf_help); #endif #if 1 extern int fwrite_cmd(int argc, char *argv[]); extern char fwrite_help[]; __commandlist(fwrite_cmd, "fwrite", fwrite_help); extern int ferase_cmd(int argc, char *argv[]); extern char ferase_help[]; __commandlist(ferase_cmd, "ferase", ferase_help); #endif extern int dlfile_cmd(int argc, char *argv[]); extern char dlfile_help[]; __commandlist(dlfile_cmd, "dlfile", dlfile_help); int bootp_cmd(int argc, char *argv[]) { int ret = 0; char *file; extern char *do_bootp(void); ret = smc_init( 0x18000000 ); if ( ret ) { printf( "smc_init failed: %d\n", ret ); return ret; } file = do_bootp(); if ( file ) printf( "TFTP File: '%s'\n", file ); return 0; } char bootp_help[] = "bootp test command. No args.\n";; __commandlist(bootp_cmd, "net_bootp", bootp_help); int arp_cmd(int argc, char *argv[]) { int ret = 0; extern int do_arp( u8 *, u8 *); u8 serverip[4] = { 192, 168, 1, 11 }; u8 servereth[6]; ret = smc_init( 0x18000000 ); if ( ret ) { printf( "smc_init failed: %d\n", ret ); return ret; } ret = do_arp( servereth, serverip ); printf( "%s: got eth addr %02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__, servereth[0], servereth[1], servereth[2], servereth[3], servereth[4], servereth[5] ); return 0; } char arp_help[] = "arp test command. No args.\n";; __commandlist(arp_cmd, "arp", arp_help); int setip_cmd( int argc, char *argv[] ) { extern u8 clientipaddress[4]; extern u8 serveripaddress[4]; u8 *ip; char *ptr, *num; int i, fini; if ( argc < 3 ) return -EINVAL; switch ( argv[1][0] ) { case 'c': case 'C': ip = clientipaddress; break; case 's': case 'S': ip = serveripaddress; break; default: return -EINVAL; break; } num = ptr = argv[2]; fini=0; for ( i=0; i<4 || !fini; i++ ) { u32 n; while ( *ptr != '\0' && *ptr != '.' ) ptr++; if ( *ptr == '\0' ) fini = 1; *ptr = 0; strtou32( num, &n ); ip[i]=n; num = ++ptr; } if ( fini && i<4 ) { printf( "error parsing ip.\n" ); return -EINVAL; } printf( "Set IP to %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3] ); return 0; } char setip_help[] = "setip command. Set IP addresses for tftp.\n" "usage: setip {client|server} ip\n" "\tip in usual dotted-quad format please.\n";; __commandlist(setip_cmd, "setip", setip_help); int tftp_cmd(int argc, char *argv[]) { int ret = 0; extern int do_tftp(char *file, unsigned long addr, unsigned long *size); unsigned long size = 0; char *tftp_file = "update.tar"; if ( argc>1 ) { tftp_file = argv[1]; } else { printf( "No filename given, using '%s'\n", tftp_file ); } ret = smc_init( 0x18000000 ); if ( ret ) { printf( "smc_init failed: %d\n", ret ); return ret; } ret = do_tftp( tftp_file, RAM_START, &size ); if ( ret ) { return -EINVAL; } printf( "%s: file '%s' loaded via tftp to address 0x%08x.\n", __FUNCTION__, tftp_file, RAM_START ); return 0; } char tftp_help[] = "tftp command.\n" "usage: tftp filename\n" "\tdownloads file over TFTP to RAM.\n" "\tUse setip to set client and server IP addresses\n"; __commandlist(tftp_cmd, "tftp", tftp_help); Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- Makefile.am 18 Mar 2003 17:38:15 -0000 1.38 +++ Makefile.am 3 Apr 2003 15:02:57 -0000 1.39 @@ -86,7 +86,7 @@ uucodec.c \ xmodem.c \ smc9196.c \ - accelent_sa.c assabet.c brutus.c badge4.c cep.c clart.c frodo.c \ + accelent_sa.c assabet.c brutus.c badge4.c cep.c clart.c dafit.c frodo.c \ hackkit.c h3600.c idr.c jornada720.c lart.c miniprint.c nesa.c pleb.c \ shannon.c system3.c trizeps.c pxa_idp.c |
From: Stefan E. <se...@us...> - 2003-04-03 15:03:31
|
Update of /cvsroot/blob/blob In directory sc8-pr-cvs1:/tmp/cvs-serv26874 Modified Files: configure.in Log Message: - add PT VibXpert (DAFIT) support Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- configure.in 3 Apr 2003 14:58:17 -0000 1.62 +++ configure.in 3 Apr 2003 15:02:56 -0000 1.63 @@ -82,6 +82,7 @@ brutus Intel Brutus cep Iskratel CEP creditlart CreditLART + dafit Prueftechnik VibXpert frodo 2d3D, Inc. SA-1110 Development Board h3600 Compaq Ipaq H36x0 hackkit The Hack Kit base board @@ -184,6 +185,18 @@ DIAG_PLATFORM_OBJS="clart.o" use_cpu="sa1110" use_lcd="no" + ;; + dafit) + board_name="Prueftechnik VibXpert" + AC_DEFINE(PT_DAFIT) + BLOB_PLATFORM_OBJS="dafit.o" + BLOB_LED_DRIVER_OBJS="led-sa11x0.o" + BLOB_NETWORK_DRIVER_OBJS="smc9196.o" + BLOB_LED_STARTCODE="ledasm-sa11x0.o" + BLOB_FLASH_OBJS="intel32.o" + DIAG_PLATFORM_OBJS="dafit.o" + use_cpu="sa1110" + use_lcd="yes" ;; frodo) board_name="2d3D, Inc. SA-1110 Development Board" |
From: Stefan E. <se...@us...> - 2003-04-03 15:03:10
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv26874/include/blob Modified Files: arch.h linux.h Log Message: - add PT VibXpert (DAFIT) support Index: arch.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- arch.h 26 Nov 2002 18:52:52 -0000 1.12 +++ arch.h 3 Apr 2003 15:02:59 -0000 1.13 @@ -70,6 +70,8 @@ # include <blob/arch/shannon.h> #elif defined PT_SYSTEM3 # include <blob/arch/system3.h> +#elif defined PT_DAFIT +# include <blob/arch/dafit.h> #elif defined TRIZEPS # include <blob/arch/trizeps.h> #elif defined PXA_IDP Index: linux.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/linux.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- linux.h 26 Nov 2002 18:52:52 -0000 1.12 +++ linux.h 3 Apr 2003 15:02:59 -0000 1.13 @@ -68,7 +68,7 @@ # define ARCH_NUMBER (20) #elif defined SHANNON # define ARCH_NUMBER (97) -#elif defined PT_SYSTEM3 +#elif defined PT_SYSTEM3 || defined PT_DAFIT # define ARCH_NUMBER (112) #elif defined TRIZEPS # define ARCH_NUMBER (74) |
From: Stefan E. <se...@us...> - 2003-04-03 15:03:09
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv26874/include/blob/arch Added Files: dafit.h Log Message: - add PT VibXpert (DAFIT) support --- NEW FILE: dafit.h --- /* * system3.h: PT VibXpert defines * * Copyright (C) 2001 Erik Mouw (J.A...@it...) * Copyright (C) 2003 Stefan Eletzhofer <ste...@el...> * * $Id: dafit.h,v 1.1 2003/04/03 15:03:00 seletz 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 * */ #ident "$Id: dafit.h,v 1.1 2003/04/03 15:03:00 seletz Exp $" #ifndef BLOB_ARCH_DAFIT_H #define BLOB_ARCH_DAFIT_H #define CPU_SPEED (CPU_CORE_SPEED_206mhz) /* serial port */ #define USE_SERIAL1 #define TERMINAL_SPEED baud_115200 /* GPIO for the LED */ //#define LED_GPIO (0x00800000) /* GPIO 10 */ #define LED_GPIO (0x00000000) /* NO LED */ /* 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) #define PARAM_FLASH_BASE (0x00040000) #define PARAM_FLASH_LEN (256 * 1024) #define CONFIG_FLASH_BASE (0x00040000) #define CONFIG_FLASH_LEN (256 * 1024) #define KERNEL_FLASH_BASE (0x00080000) #define KERNEL_FLASH_LEN (1024 * 1024) #define LOAD_RAMDISK 1 /* load ramdisk into ram */ #define RAMDISK_FLASH_BASE (0x00180000) #define RAMDISK_FLASH_LEN (1536 * 1024) #define ROOTFS_FLASH_BASE (0x00300000) #define ROOTFS_FLASH_LEN (0x00600000) /* 6M */ #define DATAFS_FLASH_BASE (0x00900000) #define DATAFS_FLASH_LEN (0x00700000) /* 7M */ /* system3 RAM pool for up/downloading */ #define RAM_START (0xc1000000) #define RAM_SIZE (16*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) /* let SDRAM run at FULL memclk speed */ #define MDREFR_MEMCLK_FULLSPEED_0 #define MDREFR_MEMCLK_FULLSPEED_1 #define MDREFR_MEMCLK_FULLSPEED_2 /* Memory configuration */ #ifdef BLOB_NEED_MEMCONFIG #define MSC0_VALUE_66_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(10) | MSC_RDN(2) | MSC_RRR(1) #define MSC0_VALUE_66_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 8) | MSC_RDN(2) | MSC_RRR(1) #define MSC0_VALUE_66_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF( 7) | MSC_RDN(2) | MSC_RRR(1) #define MSC1_VALUE_66 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1) | ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) #define MSC2_VALUE_66 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(6) | MSC_RRR(3) #define MECR_VALUE_66 MECR_BSIO0(0x1f) | MECR_BSA0(0x1f) | MECR_BSM0(0x1f) | MECR_BSIO1(0x1f) | MECR_BSA1(0x1f) | MECR_BSM1(0x1f) #define MSC0_VALUE_100_150 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(16) | MSC_RDN(3) | MSC_RRR(2) #define MSC0_VALUE_100_120 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(3) | MSC_RRR(2) #define MSC0_VALUE_100_100 MSC_RT_ROMFLASH | MSC_RBW32 | MSC_RDF(11) | MSC_RDN(3) | MSC_RRR(2) #define MSC1_VALUE_100 MSC_RT_ROMFLASH | MSC_RBW16 | MSC_RDF(5) | MSC_RDN(1) | MSC_RRR(1)| ((MSC_RT_VARLAT_345 | MSC_RBW16 | MSC_RDF(30) | MSC_RDN(30) | MSC_RRR(7))<<16) #define MSC2_VALUE_100 MSC_RT_VARLAT_345 | MSC_RBW32 | MSC_RDF(13) | MSC_RDN(6) | MSC_RRR(3) #define MECR_VALUE_100 MECR_BSIO0(0x1f) | MECR_BSA0(0x1f) | MECR_BSM0(0x1f) | MECR_BSIO1(0x1f) | MECR_BSA1(0x1f) | MECR_BSM1(0x1f) #define MDCNFG_VALUE MDCNFG_DTIM0_SDRAM | MDCNFG_DWID0_32B | MDCNFG_DRAC0(6) | MDCNFG_CDB20(0) | MDCNFG_TRP0(2) | MDCNFG_TDL0(3) | MDCNFG_TWR0(1) | \ MDCNFG_DTIM2_SDRAM | MDCNFG_DWID2_32B | MDCNFG_DRAC2(6) | MDCNFG_CDB22(0) | MDCNFG_TRP2(2) | MDCNFG_TDL2(3) | MDCNFG_TWR2(1) #define MDCAS00_VALUE 0xAAAAAA9F #define MDCAS01_VALUE 0xAAAAAAAA #define MDCAS02_VALUE 0xAAAAAAAA #define MDCAS20_VALUE 0xAAAAAA9F #define MDCAS21_VALUE 0xAAAAAAAA #define MDCAS22_VALUE 0xAAAAAAAA #define MSC0_VALUE MSC0_VALUE_100_150 #define MSC1_VALUE MSC1_VALUE_100 #define MSC2_VALUE MSC2_VALUE_100 #define MECR_VALUE MECR_VALUE_100 #define SMCNFG_VALUE 0 #endif /* BLOB_NEED_MEMCONFIG */ #define DAFIT_SYSID (0x10000000) #define DAFIT_CTRL_0 (0x10000090) #define DAFIT_CTRL_1 (0x100000A0) #define DAFIT_CTRL_2 (0x100000B0) #define DAFIT_CTRL_IRR (0x10000024) /* System ID register */ #define PT_SYSID (*((volatile u8 *)DAFIT_SYSID)) #define PT_ID_BOARDID (( PT_SYSID & 0xE0 ) >> 5 ) #define PT_ID_REVISION ( PT_SYSID & 0x1F ) #define PT_BOARD_ALPHA ( 0 ) #define PT_BOARD_SYS3 ( 1 ) #define PT_BOARD_DAFIT ( 2 ) #endif |
From: Stefan E. <se...@us...> - 2003-04-03 14:52:50
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv17784 Modified Files: pcmcia.h Log Message: - added IO and MEM base defines Index: pcmcia.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/pcmcia.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pcmcia.h 29 Apr 2002 08:15:17 -0000 1.6 +++ pcmcia.h 3 Apr 2003 14:52:46 -0000 1.7 @@ -78,9 +78,13 @@ #if defined(BADGE4) || defined(IDR) || defined(PT_SYSTEM3) || defined(SHANNON) # define PCMCIA_S0_BASE 0x20000000 +# define PCMCIA_S0_IO_BASE 0x20000000 # define PCMCIA_S0_ATTR_BASE 0x28000000 +# define PCMCIA_S0_MEM_BASE 0x2C000000 # define PCMCIA_S1_BASE 0x30000000 +# define PCMCIA_S1_IO_BASE 0x30000000 # define PCMCIA_S1_ATTR_BASE 0x38000000 +# define PCMCIA_S1_MEM_BASE 0x3C000000 #else # error "Please add PCMCIA HW defines for your board here" #endif @@ -113,14 +117,14 @@ /* reset pcmcia slot */ int pcmcia_slot_reset(int slot); +/* dump slot stati */ +int pcmcia_dump_stati( void ); + /********************************************************************** * following symbols cannot be overwritten */ /* set debug verbosity */ void pcmcia_dbg_set( int level ); - -/* dump slot stati */ -int pcmcia_dump_stati( void ); /* identify pcmcia card */ int pcmcia_identify( volatile unsigned char *p ); |
From: Stefan E. <se...@us...> - 2003-04-03 14:51:40
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv16733 Modified Files: Makefile.am Log Message: - added missing headers Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/include/blob/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.am 4 Jan 2003 02:11:42 -0000 1.18 +++ Makefile.am 3 Apr 2003 14:51:34 -0000 1.19 @@ -16,6 +16,7 @@ noinst_HEADERS = \ arch.h \ + cf.h \ command.h \ command_hist.h \ compr_rubin.h \ @@ -24,7 +25,12 @@ errno.h \ error.h \ flash.h \ + generic_io.h \ + gio_drivers.h \ + i2c-gpio.h \ + i2c.h \ icache.h \ + ide.h \ init.h \ jffs2.h \ lcd.h \ @@ -39,10 +45,12 @@ mini_inflate.h \ param_block.h \ partition.h \ + pcmcia.h \ reboot.h \ sa1100.h \ sa1111.h \ serial.h \ + tar.h \ time.h \ types.h \ util.h \ |
From: Stefan E. <se...@us...> - 2003-04-03 14:51:10
|
Update of /cvsroot/blob/blob/include/blob In directory sc8-pr-cvs1:/tmp/cvs-serv16007 Added Files: gio_drivers.h Log Message: - all gio drivers init functions. --- NEW FILE: gio_drivers.h --- /* gio_drivers.h - generic io drivers * * Copyright (C) 2003, Stefan Eletzhofer <ste...@el...> * * 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 * * $Id: gio_drivers.h,v 1.1 2003/04/03 14:50:54 seletz Exp $ */ #ifndef BLOB_GIO_DRV_H #define BLOB_GIO_DRV_H 1 extern void init_flash_io(void); extern void init_part_io(void); extern void init_ram_io(void); #endif |
From: Stefan E. <se...@us...> - 2003-04-03 14:47:47
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv9892 Modified Files: system3.c Log Message: - removed #ifdef hell and moved commands and library functions where they belong to. Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/system3.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- system3.c 1 Apr 2003 19:01:29 -0000 1.27 +++ system3.c 3 Apr 2003 14:47:42 -0000 1.28 @@ -55,21 +55,12 @@ #include <blob/cf.h> #include <blob/ide.h> #include <blob/tar.h> +#include <net/net.h> #include <net/smc9196.h> /********************************************************************** * defines */ -#define CONFIG_PCMCIA_SUPPORT -#define CONFIG_BLOB_PARTITION -#define CONFIG_GIO_RAM -#define CONFIG_GIO_FLASH -#define CONFIG_GIO_BLOB_PARTITION -#define CONFIG_CMD_SYSUPDATE - -/* this will send a cold shiver through erik's spine ... */ -#define ERR( x ) { ret = x; goto DONE; } - /* more readable IMHO */ #define MEM( x ) (*((u32 *)(x))) #define SET(reg,bit) ((reg) |= (1<<(bit))) @@ -79,13 +70,8 @@ #if SYSTEM3_DEBUG # define DBG( x, args... ) if ( sys3_dbg>x ) printf( args ) -# define DBGIO( x, io ) if ( sys3_dbg>x ) printf( "%s: " \ - "%s(%p)={ c=%p, r=%p, w=%p,\n\tp=%p, sz=%d, ch=%p,\n\tn='%s' }\n", \ - __FUNCTION__, #io, io, io->conf, io->read, io->write, \ - io->private_data, io->io_size, io->child_io, io->name ); #else # define DBG( x, args... ) -# define DBGIO( x, io ) #endif @@ -196,7 +182,7 @@ next: sizeof(blob_partition_t), offset: ROOTFS_FLASH_BASE, size: ROOTFS_FLASH_LEN, - name: "root.img", + name: "cramfs", flags: BLOB_PART_FLAG_CRAMFS, }, { @@ -270,49 +256,7 @@ } __initlist(system3_init_hardware, INIT_LEVEL_DRIVER_SELECTION); -#if defined(CONFIG_BLOB_PARTITION) -/********************************************************************** - * system3 default partition table - */ -static void system3_set_partition_table(void) -{ - /* the default partition table */ - default_partition_table = system3_default_partition_table; - - /* we don't know where the flash partition table will live, so - * put the pointer at 0x0000000 and let the partition table - * parser figure out. - */ - flash_partition_table = (blob_partition_t*)0x00000000; -} -__initlist(system3_set_partition_table, INIT_LEVEL_OTHER_STUFF); -/* FIXME: need to think if this is the correct init level, we might - * want to have this before the param list stuff starts running */ -#endif - -#if defined(CONFIG_GIO_RAM) -/********************************************************************** - * init system3 ram pools - */ -void init_ram_default_io( void ) -{ - int ret; - static ram_io_t ram0; - static io_driver_t io_ram0; - - ram0.start=RAM_START; - ram0.len=RAM_SIZE; - ram0.pos=0; - - ret = ram_io_init( &io_ram0, &ram0 ); - if ( ret ) return; - - ret = io_register( &io_ram0, "RAM" ); - if ( ret ) return; -} -__initlist(init_ram_default_io, INIT_LEVEL_OTHER_STUFF + 2); -#endif /***************************************************************** * sysver - print system version @@ -346,6 +290,7 @@ */ int sys3dbg_cmd( int argc, char *argv[] ) { + extern int cf_dbg_set(int); int ret; u32 lvl; @@ -437,412 +382,9 @@ } #endif -#if defined(CONFIG_CMD_SYSUPDATE) -/********************************************************************** - * sysupd - update complete system. Flashes - * blob, config, kernel, initrd and cramfs images. - */ - -/* update_umage - Read image "image" from TAR io driver and flash it - * into a BLOB partition - */ -static int update_image( char *image ) -{ - int ret; - - if ( !image ) - return -EINVAL; - - /* select tar file */ - ret = io_configure( "TAR", image ); - if ( ret ) { - printf( "sysupd: can't find image '%s'. Skipping.\n", image ); - return -EINVAL; - } - - /* select partition */ - ret = io_configure( "BLOB_PART", image ); - if ( ret ) { - printf( "sysupd: can't find flash partition '%s'. Skipping.\n", image ); - return -EINVAL; - } - -#if !defined(SYSUPD_DUMMY_COPY) - /* flash tha image, man! */ - ret = io_copy( "BLOB_PART", "TAR", 0 ); - if ( ret ) { - /* ouch! */ - printf( "sysupd: error updating image %s (%d).\n", image, ret ); - return ret; - } -#else - DBG( 1, "%s: io_copy( BLOB_PART, TAR, 0 )\n", __FUNCTION__ ); -#endif - - return 0; -} - -static int sysupd_cmd( int argc, char *argv[] ) -{ - int ret; - char *update_files[] = { "blob", "config.tar", "zImage", "initrd.gz", - "root.img", "data.img", NULL }; - char *image = NULL; - int i=0; - char *source = "CF"; - - argv++; - - /* source io param */ - if ( argc>1 ) { - source = *argv; - argv++; - argc--; - } - - /* image list */ - if ( argc>1 ) { - char **ptr; - ptr = update_files; - while (argc && ptr ) { - *ptr = *argv; - DBG( 1, "image += '%s'\n", *ptr ); - - argc -= 1; - argv++; - ptr++; - } - *ptr = NULL; - } - - /* configure CF card if CF is source */ - if ( strncmp( source, "CF", 2 ) == 0 ) { - /* CF card is on slot 1 */ - ret = io_configure( "CF", (void *)1 ); - if ( ret ) { - printf( "io_configure() error %d\n", ret ); - return -EINVAL; - } - } - - /* write chain: --->blob partition->flash */ - ret = io_chain_driver( "BLOB_PART", "FLASH" ); - if ( ret ) { - DBG( 1, "%s: io_chain_driver() = %d.", __FUNCTION__, ret ); - return ret; - } - - /* read chain: <---TAR<--source(CF or RAM) */ - ret = io_chain_driver( "TAR", source ); - if ( ret ) { - DBG( 1, "%s: io_chain_driver( TAR, %s ) = %d.", __FUNCTION__, source, ret ); - return ret; - } - - /* update all images in list */ - while ( (image=update_files[i++]) != NULL ) { - ret = update_image( image ); - if ( ret == 0 ) - printf( "sysupd: flashed image '%s'\n", image ); - } - - return 0; -} -static char sysupd_help[] = "sysupd [CF|RAM] [image [image]...]\n\nUpdate board firmware from CF card or RAM.\n" - "You have to have a update CF card inserted (for CF updates) _or_ uploaded a\n" - "update image to ram."; -__commandlist(sysupd_cmd, "sysupd", sysupd_help); -#endif - -#if defined(IO_TEST) -int io_cmd( int argc, char *argv[] ) -{ - int ret; - - io_dbg_set( 1 ); - tar_dbg_set( 1 ); - - /* CF card is on slot 1 */ - ret = io_configure( "CF", (void *)1 ); - if ( ret ) { - printf( "io_configure() error %d\n", ret ); - return -EINVAL; - } - - /* have tar io driver reading from CF card io driver */ - ret = io_chain_driver( "TAR", "CF" ); - if ( ret ) return -EINVAL; - - /* chain blob partition io driver to flash */ - ret = io_chain_driver( "BLOB_PART", "FLASH" ); - if ( ret ) return -EINVAL; - - /* select a file */ - ret = io_configure( "TAR", "blob" ); - if ( ret ) return -EINVAL; - printf( "selected file\n" ); - - /* select a partition */ - ret = io_configure( "BLOB_PART", "config" ); - if ( ret ) return -EINVAL; - printf( "selected partition\n" ); - - /* copy a file */ - ret = io_copy( "BLOB_PART", "TAR", 0 ); - if ( ret ) return -EINVAL; - - printf( "flashed file\n" ); - - return 0; -} -static char io_help[] = "io test function\n"; -__commandlist(io_cmd, "iotest", io_help); -#endif - -#if defined(CONFIG_GIO_BLOB_PARTITION) -/********************************************************************** - * blob partition io driver - * - * - default blob partition is registered as a default io driver - * - the configure call "selects" a partition by it's name. - * (just like the tar io driver) - */ -int part_io_init( io_driver_t *io ); -static int part_io_conf( io_driver_t * io, void *conf ); -static int part_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); -static int part_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); - -/* register default blob partition io driver */ -void init_part_default_io( void ) -{ - int ret; - static io_driver_t io_part; - - ret = part_io_init( &io_part ); - if ( ret ) return ; - - ret = io_register( &io_part, "BLOB_PART" ); - if ( ret ) return; - - return; -} -__initlist(init_part_default_io, INIT_LEVEL_OTHER_STUFF + 3); - -/* initialize driver struct */ -int part_io_init( io_driver_t *io ) -{ - if ( !io ) - return -EINVAL; - - io->private_data = NULL; - io->io_size = 0; - io->conf = part_io_conf; - io->read = part_io_read; - io->write = part_io_write; - io->child_io = NULL; - - return 0; -} - -/* configure: select a partition by name */ -static int part_io_conf( io_driver_t * io, void *conf ) -{ - char *name; - const blob_partition_t *part; - - if ( !io || !conf ) - return -EINVAL; - - name = (char *)conf; - if ( !name ) - return -EINVAL; - - part = pt_find_by_name( name ); - if ( !part ) - return -EINVAL; - - DBG( 1, "%s: found partition '%s': offset=%x, size=%x, flags=%x\n", __FUNCTION__, - part->name, part->offset, part->size, part->flags ); - - - io->io_size=part->size; - io->private_data=(void*)part; - - return 0; -} - -static int part_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - blob_partition_t *part; - io_driver_t *child; - - DBG( 1, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, src, amount, io ); - - if ( !io || !dest ) - return -EINVAL; - - child = io_get_child( io ); - if ( !child ) - return -EINVAL; - - part = (blob_partition_t *)io->private_data; - if ( !part ) - return -EINVAL; - - DBG( 1, "%s: using partition '%s'.\n", __FUNCTION__, part->name ); - DBG( 1, "%s: dest=%p, src=%p(=%p), amount=%d, io=%p\n", __FUNCTION__, - dest, src, (void*)(src + part->offset), amount, io ); - - /* defer reading to our child */ - return io_read(dest, (void *)((u32)src + part->offset), amount, child); -} - -static int part_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - blob_partition_t *part; - io_driver_t *child; - - - if ( !io || !src ) - return -EINVAL; - - child = io_get_child( io ); - if ( !child ) - return -EINVAL; - - part = (blob_partition_t *)io->private_data; - if ( !part ) - return -EINVAL; - - DBG( 1, "%s: using partition '%s'.\n", __FUNCTION__, part->name ); - DBG( 1, "%s: dest=%p(=%p), src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, (void*)(dest + part->offset), src, amount, io ); - - /* defer writing to our child */ - return io_write((void *)((u32)dest + part->offset), src, amount, child); -} -#endif - -#if defined(CONFIG_GIO_FLASH) -/********************************************************************** - * flash io driver - */ -int flash_io_init( io_driver_t *io ); -static int flash_io_conf( io_driver_t * io, void *conf ); -static int flash_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); -static int flash_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); - -/* register flash io driver */ -void init_flash_default_io( void ) -{ - int ret; - static io_driver_t io_flash; - - ret = flash_io_init( &io_flash ); - if ( ret ) return ; - - ret = io_register( &io_flash, "FLASH" ); - if ( ret ) return; - - ret = io_configure( "FLASH", 0 ); - if ( ret ) return; - - return; -} -__initlist(init_flash_default_io, INIT_LEVEL_OTHER_STUFF + 3); - -/* initialize driver struct */ -int flash_io_init( io_driver_t *io ) -{ - if ( !io ) - return -EINVAL; - - io->private_data = NULL; - io->io_size = 0; - io->conf = flash_io_conf; - io->read = flash_io_read; - io->write = flash_io_write; - io->child_io = NULL; - - return 0; -} - -/* configure: select a base offset within the flash */ -static int flash_io_conf( io_driver_t * io, void *conf ) -{ - u32 offset; - - if ( !io ) - return -EINVAL; - - offset = (u32)conf; - - io->io_size = flash_get_size(); - - if ( offset > io->io_size ) - return -ERANGE; - - io->private_data=(void *)offset; - - return 0; -} - -static int flash_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - u32 offset; - - DBG( 5, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, src, amount, io ); - - if ( !io || !dest ) - return -EINVAL; - - - offset = (u32)io->private_data; - - DBG( 5, "%s: using offset %x.\n", __FUNCTION__, offset ); - - memcpy( dest, (unsigned char *)(offset + (u32)src), amount ); - - return 0; -} - -/* flash write: only on word boundaries! */ -static int flash_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - u32 offset; - u32 adr; - - DBG( 5, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, src, amount, io ); - if ( !io || !src ) - return -EINVAL; - offset = (u32)io->private_data; - DBG( 5, "%s: using offset %x.\n", __FUNCTION__, offset ); - - adr = (u32)dest + offset; - - /* check alignment */ - if ( adr%4 ) { - printf( "%s: misaligned destination address (%x).\n", - __FUNCTION__, adr ); - return -EALIGN; - } - if ( amount%4 ) { - printf( "%s: warning: misaligned amount to write (%d).\n", - __FUNCTION__, amount ); - } - - DBG( 5, "%s: adr=0x%08x, nwords=%d.\n", __FUNCTION__, - adr, amount/4 + (amount%4?1:0)); - - return flash_write_region( (u32 *)adr, (u32*)src, amount/4 + (amount%4?1:0)); -} -#endif /***************************************************************** * misc utility funcs @@ -852,12 +394,6 @@ * manually reference flash and download commands until they * are in libblob. */ -#if 0 -extern int cf_test_module( int argc, char *argv[] ); -extern char cf_help[]; -__commandlist(cf_test_module, "cftest", cf_help); -#endif - #if 1 extern int fwrite_cmd(int argc, char *argv[]); extern char fwrite_help[]; @@ -898,7 +434,6 @@ { int ret = 0; extern int do_arp( u8 *, u8 *); - u8 serverip[4] = { 192, 168, 1, 11 }; u8 servereth[6]; ret = smc_init( 0x18000000 ); @@ -907,7 +442,7 @@ return ret; } - ret = do_arp( servereth, serverip ); + ret = do_arp( servereth, serveripaddress ); printf( "%s: got eth addr %02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__, servereth[0], servereth[1], servereth[2], servereth[3], servereth[4], @@ -918,97 +453,24 @@ char arp_help[] = "arp test command. No args.\n";; __commandlist(arp_cmd, "arp", arp_help); - -int setip_cmd( int argc, char *argv[] ) +#if defined(CONFIG_BLOB_PARTITION) +/********************************************************************** + * system3 default partition table + */ +static void system3_set_partition_table(void) { - extern u8 clientipaddress[4]; - extern u8 serveripaddress[4]; - u8 *ip; - char *ptr, *num; - int i, fini; - - if ( argc < 3 ) - return -EINVAL; - - switch ( argv[1][0] ) { - case 'c': - case 'C': - ip = clientipaddress; - break; - case 's': - case 'S': - ip = serveripaddress; - break; - default: - return -EINVAL; - break; - } - - num = ptr = argv[2]; - fini=0; - for ( i=0; i<4 || !fini; i++ ) { - u32 n; - - while ( *ptr != '\0' && *ptr != '.' ) - ptr++; - - if ( *ptr == '\0' ) - fini = 1; - - *ptr = 0; - - strtou32( num, &n ); - ip[i]=n; - - num = ++ptr; - } - - if ( fini && i<4 ) { - printf( "error parsing ip.\n" ); - return -EINVAL; - } - - printf( "Set IP to %d.%d.%d.%d\n", - ip[0], ip[1], ip[2], ip[3] ); - - return 0; + /* the default partition table */ + default_partition_table = system3_default_partition_table; + + /* we don't know where the flash partition table will live, so + * put the pointer at 0x0000000 and let the partition table + * parser figure out. + */ + flash_partition_table = (blob_partition_t*)0x00000000; } -char setip_help[] = "setip command. Set IP addresses for tftp.\n" -"usage: setip {client|server} ip\n" -"\tip in usual dotted-quad format please.\n";; -__commandlist(setip_cmd, "setip", setip_help); - -int tftp_cmd(int argc, char *argv[]) -{ - int ret = 0; - extern int do_tftp(char *file, unsigned long addr, unsigned long *size); - unsigned long size = 0; - char *tftp_file = "update.tar"; - - if ( argc>1 ) { - tftp_file = argv[1]; - } else { - printf( "No filename given, using '%s'\n", - tftp_file ); - } - - ret = smc_init( 0x18000000 ); - if ( ret ) { - printf( "smc_init failed: %d\n", ret ); - return ret; - } - ret = do_tftp( tftp_file, RAM_START, &size ); - if ( ret ) { - return -EINVAL; - } +__initlist(system3_set_partition_table, INIT_LEVEL_OTHER_STUFF); +/* FIXME: need to think if this is the correct init level, we might + * want to have this before the param list stuff starts running */ +#endif - printf( "%s: file '%s' loaded via tftp to address 0x%08x.\n", - __FUNCTION__, tftp_file, RAM_START ); - return 0; -} -char tftp_help[] = "tftp command.\n" -"usage: tftp filename\n" -"\tdownloads file over TFTP to RAM.\n" -"\tUse setip to set client and server IP addresses\n"; -__commandlist(tftp_cmd, "tftp", tftp_help); |
From: Stefan E. <se...@us...> - 2003-04-03 14:41:08
|
Update of /cvsroot/blob/blob/src/commands In directory sc8-pr-cvs1:/tmp/cvs-serv7991 Modified Files: changebit.c dlfile.c ferase.c fwrite.c md5chk.c memcpy.c peek.c poke.c Log Message: - finally (!) corrected my email address. Doh. Index: changebit.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/changebit.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- changebit.c 17 Feb 2002 20:01:31 -0000 1.2 +++ changebit.c 3 Apr 2003 14:40:51 -0000 1.3 @@ -1,7 +1,7 @@ /* * debug.c: Debugging command functions * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@el...> * * 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 Index: dlfile.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/dlfile.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dlfile.c 27 Apr 2002 11:16:26 -0000 1.2 +++ dlfile.c 3 Apr 2003 14:40:55 -0000 1.3 @@ -2,7 +2,7 @@ * dlfile.c: command wrapper for xmodem/uuencode download to * arbitary memory loc * - * Copyright (C) 2002 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2002 Stefan Eletzhofer <ste...@el...> * * 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 Index: ferase.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/ferase.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ferase.c 12 Feb 2003 22:39:59 -0000 1.2 +++ ferase.c 3 Apr 2003 14:40:55 -0000 1.3 @@ -2,7 +2,7 @@ * ferase.c: command wrapper for erasing arbitary flash * regions * - * Copyright (C) 2002 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2002 Stefan Eletzhofer <ste...@el...> * * 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 Index: fwrite.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/fwrite.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fwrite.c 17 Apr 2002 19:39:51 -0000 1.1 +++ fwrite.c 3 Apr 2003 14:40:56 -0000 1.2 @@ -2,7 +2,7 @@ * fwrite.c: command wrapper for writing arbitary flash * regions * - * Copyright (C) 2002 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2002 Stefan Eletzhofer <ste...@el...> * * 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 Index: md5chk.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/md5chk.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- md5chk.c 27 Apr 2002 11:16:55 -0000 1.3 +++ md5chk.c 3 Apr 2003 14:40:57 -0000 1.4 @@ -1,7 +1,7 @@ /* * md5chk.c: command wrapper for md5 checks * - * Copyright (C) 2002 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2002 Stefan Eletzhofer <ste...@el...> * * 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 Index: memcpy.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/memcpy.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- memcpy.c 17 Feb 2002 20:01:31 -0000 1.2 +++ memcpy.c 3 Apr 2003 14:40:57 -0000 1.3 @@ -1,7 +1,7 @@ /* * memcpy.c: copy memory command * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@el...> * * 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 Index: peek.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/peek.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- peek.c 17 Feb 2002 20:01:31 -0000 1.2 +++ peek.c 3 Apr 2003 14:40:58 -0000 1.3 @@ -1,7 +1,7 @@ /* * debug.c: Debugging command functions * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@el...> * * 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 @@ -66,6 +66,7 @@ if ( argc >= 2 ) type = argv[2][0]; + dprintf("adr=0x%08x, type=%c\n", address, type); Index: poke.c =================================================================== RCS file: /cvsroot/blob/blob/src/commands/poke.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- poke.c 17 Feb 2002 20:01:31 -0000 1.2 +++ poke.c 3 Apr 2003 14:40:58 -0000 1.3 @@ -1,7 +1,7 @@ /* * poke.c: poke command * - * Copyright (C) 2001 Stefan Eletzhofer <ste...@ww...> + * Copyright (C) 2001 Stefan Eletzhofer <ste...@el...> * * 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 |
From: Stefan E. <se...@us...> - 2003-04-03 14:39:16
|
Update of /cvsroot/blob/blob/src/commands In directory sc8-pr-cvs1:/tmp/cvs-serv6611 Modified Files: Makefile.am Log Message: - makefile update for tftp, setip and sysupd commands Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/commands/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 17 Apr 2002 19:39:50 -0000 1.5 +++ Makefile.am 3 Apr 2003 14:39:11 -0000 1.6 @@ -38,7 +38,10 @@ peek.c \ poke.c \ reboot.c \ - terminal.c + setip.c \ + sysupd.c \ + terminal.c \ + tftp.c INCLUDES += \ |
From: Stefan E. <se...@us...> - 2003-04-03 14:37:29
|
Update of /cvsroot/blob/blob/src/commands In directory sc8-pr-cvs1:/tmp/cvs-serv5110 Added Files: setip.c sysupd.c tftp.c Log Message: - new commands for tftp uploads and easy firmware update --- NEW FILE: setip.c --- /* * setip.c: set client/server IP * * Client and server IP are used for TFTP downloads. * * Copyright (C) 2003 Stefan Eletzhofer <ste...@el...> * * 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: setip.c,v 1.1 2003/04/03 14:37:25 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/errno.h> #include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> #include <net/net.h> #if !defined( CONFIG_NETWORK_SUPPORT ) # error "You must enable NETWORK support." #endif /********************************************************************** * defines */ #define SETIP_DEBUG 0 #if SETIP_DEBUG static int dbg = 1; # define DBG( x, args... ) if ( dbg>=x ) printf( args ) #else # define DBG( x, args... ) #endif /********************************************************************** * command */ int setip_cmd( int argc, char *argv[] ) { u8 *ip; char *ptr, *num; int i, fini; if ( argc < 3 ) return -EINVAL; switch ( argv[1][0] ) { case 'c': case 'C': ip = clientipaddress; break; case 's': case 'S': ip = serveripaddress; break; default: return -EINVAL; break; } num = ptr = argv[2]; fini=0; for ( i=0; i<4 || !fini; i++ ) { u32 n; while ( *ptr != '\0' && *ptr != '.' ) ptr++; if ( *ptr == '\0' ) fini = 1; *ptr = 0; strtou32( num, &n ); ip[i]=n; num = ++ptr; } if ( fini && i<4 ) { printf( "error parsing ip.\n" ); return -EINVAL; } printf( "Set IP to %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3] ); return 0; } char setip_help[] = "setip command. Set IP addresses for tftp.\n" "usage: setip {client|server} ip\n" "\tip in usual dotted-quad format please.\n";; --- NEW FILE: sysupd.c --- /* * sysupd.c: system update from CF/RAM card * * Update a board's firmware from a tar file located on a CF memory * card or in RAM. * * Copyright (C) 2001 Stefan Eletzhofer <ste...@el...> * * 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: sysupd.c,v 1.1 2003/04/03 14:37:25 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/errno.h> #include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> #include <blob/generic_io.h> #include <blob/pcmcia.h> #include <blob/cf.h> #include <blob/ide.h> #include <blob/tar.h> #if !defined( CONFIG_GIO_SUPPORT ) # error "You must also enable PCMCIA and gereric IO support." #endif /* these are the default images */ static char *update_files[] = { "blob", "config.tar", "zImage", "initrd.gz", "cramfs", "data.img" }; /********************************************************************** * defines */ #define SYSUPD_DEBUG 1 #if SYSUPD_DEBUG static int dbg = 1; # define DBG( x, args... ) if ( dbg>=x ) printf( args ) #else # define DBG( x, args... ) #endif /********************************************************************** * sysupd - update complete system. Flashes * blob, config, kernel, initrd and cramfs images. */ /* update_umage - Read image "image" from TAR io driver and flash it * into a BLOB partition */ int update_image( char *image ) { int ret; if ( !image ) return -EINVAL; /* select tar file */ ret = io_configure( "TAR", image ); if ( ret ) { printf( "sysupd: can't find image '%s'. Skipping.\n", image ); return -EINVAL; } /* select partition */ ret = io_configure( "BLOB_PART", image ); if ( ret ) { printf( "sysupd: can't find flash partition '%s'. Skipping.\n", image ); return -EINVAL; } #if !defined(SYSUPD_DUMMY_COPY) /* flash tha image, man! */ ret = io_copy( "BLOB_PART", "TAR", 0 ); if ( ret ) { /* ouch! */ printf( "sysupd: error updating image %s (%d).\n", image, ret ); return ret; } #else DBG( 1, "%s: io_copy( BLOB_PART, TAR, 0 )\n", __FUNCTION__ ); #endif return 0; } int sysupd_cmd( int argc, char *argv[] ) { int ret; char **images = NULL; int nimages = sizeof(update_files)/sizeof(char *); int i=0; char *source = "CF"; argv++; /* source io param */ if ( argc>1 ) { source = *argv; argv++; argc--; } /* image list */ if ( argc>1 ) { nimages = argc -1; images = &argv[0]; } else { images = update_files; } /* configure CF card if CF is source */ if ( strncmp( source, "CF", 2 ) == 0 ) { /* CF card is on slot 1 */ ret = io_configure( "CF", (void *)1 ); if ( ret ) { printf( "io_configure() error %d\n", ret ); return -EINVAL; } } /* write chain: --->blob partition->flash */ ret = io_chain_driver( "BLOB_PART", "FLASH" ); if ( ret ) { DBG( 1, "%s: io_chain_driver() = %d.", __FUNCTION__, ret ); return ret; } /* read chain: <---TAR<--source(CF or RAM) */ ret = io_chain_driver( "TAR", source ); if ( ret ) { DBG( 1, "%s: io_chain_driver( TAR, %s ) = %d.", __FUNCTION__, source, ret ); return ret; } /* update all images in list */ for ( i=0; i<nimages; i++ ) { DBG( 1, "images[%d]=%s\n", i, images[i] ); ret = update_image( images[i] ); if ( ret == 0 ) printf( "sysupd: flashed image '%s'\n", images[i] ); DBG( 1, "i=%d\n", i ); } return 0; } char sysupd_help[] = "sysupd [CF|RAM] [image [image]...]\n\nUpdate board firmware from CF card or RAM.\n" "You have to have a update CF card inserted (for CF updates) _or_ uploaded a\n" "update image to ram."; --- NEW FILE: tftp.c --- /* * tftp.c: tftp download command * * Copyright (C) 2003 Stefan Eletzhofer <ste...@el...> * * 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: tftp.c,v 1.1 2003/04/03 14:37:25 seletz Exp $" /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> #include <blob/errno.h> #include <blob/debug.h> #include <blob/types.h> #include <blob/util.h> #include <net/net.h> #if !defined( CONFIG_NETWORK_SUPPORT ) # error "You must enable NETWORK support." #endif #if !defined( RAM_START ) # error "Please define RAM_START for your arch!" #endif /********************************************************************** * defines */ #define TFTP_DEBUG 0 #if TFTP_DEBUG static int dbg = 1; # define DBG( x, args... ) if ( dbg>=x ) printf( args ) #else # define DBG( x, args... ) #endif /********************************************************************** * command */ int tftp_cmd(int argc, char *argv[]) { int ret = 0; extern int do_tftp(char *file, unsigned long addr, unsigned long *size); unsigned long size = 0; char *tftp_file = "update.tar"; if ( argc>1 ) { tftp_file = argv[1]; } else { printf( "No filename given, using '%s'\n", tftp_file ); } /* FIXME: add a arch-specific define for SMC base */ ret = smc_init( 0x18000000 ); if ( ret ) { printf( "smc_init failed: %d\n", ret ); return ret; } ret = do_tftp( tftp_file, RAM_START, &size ); if ( ret ) { return -EINVAL; } printf( "%s: file '%s' loaded via tftp to address 0x%08x.\n", __FUNCTION__, tftp_file, RAM_START ); return 0; } char tftp_help[] = "tftp command.\n" "usage: tftp filename\n" "\tdownloads file over TFTP to RAM.\n" "\tUse setip to set client and server IP addresses\n"; |
From: Stefan E. <se...@us...> - 2003-04-03 14:32:55
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1077 Added Files: gio_flash.c gio_part_blob.c gio_ram.c Log Message: - gio "drivers" for flash, ram and blob partitions. Needed for the sysupd command. --- NEW FILE: gio_flash.c --- /********************************************************************** * GIO flash "driver" * * Copyright (C) 2003, Stefan Eletzhofer <ste...@el...> * * 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 * * $Id: gio_flash.c,v 1.1 2003/04/03 14:32:50 seletz Exp $ * */ /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/types.h> #include <blob/errno.h> #include <blob/util.h> #include <blob/command.h> #include <blob/init.h> #include <blob/flash.h> #include <blob/generic_io.h> /********************************************************************** * defines */ #define DEBUG 0 #if DEBUG # define DBG( x, args... ) if ( dbg>=x ) printf( args ); #else # define DBG( x, args... ) #endif /********************************************************************** * module globals */ #if DEBUG static int dbg = 1; #else static int dbg = 0; #endif static char module_version[] = "$Id: gio_flash.c,v 1.1 2003/04/03 14:32:50 seletz Exp $"; /********************************************************************** * static functions */ /********************************************************************** * flash io driver */ int flash_io_init( io_driver_t *io ); static int flash_io_conf( io_driver_t * io, void *conf ); static int flash_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); static int flash_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); /* initialize driver struct */ int flash_io_init( io_driver_t *io ) { if ( !io ) return -EINVAL; io->private_data = NULL; io->io_size = 0; io->conf = flash_io_conf; io->read = flash_io_read; io->write = flash_io_write; io->child_io = NULL; return 0; } /* configure: select a base offset within the flash */ static int flash_io_conf( io_driver_t * io, void *conf ) { u32 offset; if ( !io ) return -EINVAL; offset = (u32)conf; io->io_size = flash_get_size(); if ( offset > io->io_size ) return -ERANGE; io->private_data=(void *)offset; return 0; } static int flash_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { u32 offset; DBG( 5, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, src, amount, io ); if ( !io || !dest ) return -EINVAL; offset = (u32)io->private_data; DBG( 5, "%s: using offset %x.\n", __FUNCTION__, offset ); memcpy( dest, (unsigned char *)(offset + (u32)src), amount ); return 0; } /* flash write: only on word boundaries! */ static int flash_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { u32 offset; u32 adr; DBG( 5, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, src, amount, io ); if ( !io || !src ) return -EINVAL; offset = (u32)io->private_data; DBG( 5, "%s: using offset %x.\n", __FUNCTION__, offset ); adr = (u32)dest + offset; /* check alignment */ if ( adr%4 ) { printf( "%s: misaligned destination address (%x).\n", __FUNCTION__, adr ); return -EALIGN; } if ( amount%4 ) { printf( "%s: warning: misaligned amount to write (%d).\n", __FUNCTION__, amount ); } DBG( 5, "%s: adr=0x%08x, nwords=%d.\n", __FUNCTION__, adr, amount/4 + (amount%4?1:0)); return flash_write_region( (u32 *)adr, (u32*)src, amount/4 + (amount%4?1:0)); } /* register flash io driver */ void init_flash_io( void ) { int ret; static io_driver_t io_flash; ret = flash_io_init( &io_flash ); if ( ret ) return ; ret = io_register( &io_flash, "FLASH" ); if ( ret ) return; ret = io_configure( "FLASH", 0 ); if ( ret ) return; return; } --- NEW FILE: gio_part_blob.c --- /********************************************************************** * blob partition reading for GIO * * Copyright (C) 2003, Stefan Eletzhofer <ste...@el...> * * 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 * * $Id: gio_part_blob.c,v 1.1 2003/04/03 14:32:50 seletz Exp $ * */ /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/types.h> #include <blob/errno.h> #include <blob/util.h> #include <blob/command.h> #include <blob/init.h> #include <blob/partition.h> #include <blob/generic_io.h> /********************************************************************** * defines */ #define DEBUG 0 #if DEBUG # define DBG( x, args... ) if ( dbg>=x ) printf( args ); #else # define DBG( x, args... ) #endif /********************************************************************** * module globals */ #if DEBUG static int dbg = 1; #else static int dbg = 0; #endif static char module_version[] = "$Id: gio_part_blob.c,v 1.1 2003/04/03 14:32:50 seletz Exp $"; /********************************************************************** * static functions */ /********************************************************************** * blob partition io driver * * - default blob partition is registered as a default io driver * - the configure call "selects" a partition by it's name. * (just like the tar io driver) */ static int part_io_init( io_driver_t *io ); static int part_io_conf( io_driver_t * io, void *conf ); static int part_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); static int part_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); /* initialize driver struct */ static int part_io_init( io_driver_t *io ) { if ( !io ) return -EINVAL; io->private_data = NULL; io->io_size = 0; io->conf = part_io_conf; io->read = part_io_read; io->write = part_io_write; io->child_io = NULL; return 0; } /* configure: select a partition by name */ static int part_io_conf( io_driver_t * io, void *conf ) { char *name; const blob_partition_t *part; if ( !io || !conf ) return -EINVAL; name = (char *)conf; if ( !name ) return -EINVAL; part = pt_find_by_name( name ); if ( !part ) return -EINVAL; DBG( 1, "%s: found partition '%s': offset=%x, size=%x, flags=%x\n", __FUNCTION__, part->name, part->offset, part->size, part->flags ); io->io_size=part->size; io->private_data=(void*)part; return 0; } static int part_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { blob_partition_t *part; io_driver_t *child; DBG( 1, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, src, amount, io ); if ( !io || !dest ) return -EINVAL; child = io_get_child( io ); if ( !child ) return -EINVAL; part = (blob_partition_t *)io->private_data; if ( !part ) return -EINVAL; DBG( 1, "%s: using partition '%s'.\n", __FUNCTION__, part->name ); DBG( 1, "%s: dest=%p, src=%p(=%p), amount=%d, io=%p\n", __FUNCTION__, dest, src, (void*)(src + part->offset), amount, io ); /* defer reading to our child */ return io_read(dest, (void *)((u32)src + part->offset), amount, child); } static int part_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { blob_partition_t *part; io_driver_t *child; if ( !io || !src ) return -EINVAL; child = io_get_child( io ); if ( !child ) return -EINVAL; part = (blob_partition_t *)io->private_data; if ( !part ) return -EINVAL; DBG( 1, "%s: using partition '%s'.\n", __FUNCTION__, part->name ); DBG( 1, "%s: dest=%p(=%p), src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, (void*)(dest + part->offset), src, amount, io ); /* defer writing to our child */ return io_write((void *)((u32)dest + part->offset), src, amount, child); } /* register default blob partition io driver */ void init_part_io( void ) { int ret; static io_driver_t io_part; ret = part_io_init( &io_part ); if ( ret ) return ; ret = io_register( &io_part, "BLOB_PART" ); if ( ret ) return; return; } --- NEW FILE: gio_ram.c --- /********************************************************************** * GIO ram "driver" * * Copyright (C) 2003, Stefan Eletzhofer <ste...@el...> * * 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 * * $Id: gio_ram.c,v 1.1 2003/04/03 14:32:50 seletz Exp $ * */ /********************************************************************** * Includes */ #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> #include <blob/types.h> #include <blob/errno.h> #include <blob/util.h> #include <blob/command.h> #include <blob/init.h> #include <blob/generic_io.h> /********************************************************************** * defines */ #define DEBUG 0 #if DEBUG # define DBG( x, args... ) if ( dbg>=x ) printf( args ); #else # define DBG( x, args... ) #endif #if !defined( RAM_START ) || !defined( RAM_SIZE ) # error "define RAM_START and RAM_SIZE for your platform" #endif /********************************************************************** * module globals */ #if DEBUG static int dbg = 1; #else static int dbg = 0; #endif static char module_version[] = "$Id: gio_ram.c,v 1.1 2003/04/03 14:32:50 seletz Exp $"; /********************************************************************** * static functions */ static int ram_io_conf( io_driver_t * io, void *conf ); static int ram_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); static int ram_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); /********************************************************************** * A simple RAM driver * - io driver for RAM access */ int ram_io_init( io_driver_t *io, ram_io_t *ram ) { if ( !io || !ram ) return -EINVAL; io->private_data = (void *)ram; io->io_size = ram->len - ram->pos; io->conf = ram_io_conf; io->read = ram_io_read; io->write = ram_io_write; io->child_io = NULL; return 0; } static int ram_io_conf( io_driver_t * io, void *conf ) { ram_io_t *ram; if ( !io || !conf ) return -EINVAL; ram = (ram_io_t*)io->private_data; if ( !ram ) return -EINVAL; if ( (u32)conf >= ram->len ) return -EINVAL; ram->pos = (u32)conf; io->io_size = ram->len - (u32)ram->pos; return 0; } static int ram_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { u32 offset; ram_io_t *ram; DBG( 1, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, src, amount, io ); if ( !io || !dest ) return -EINVAL; ram = (ram_io_t*)io->private_data; if ( !ram ) return -EINVAL; offset = ram->start + (u32)ram->pos; DBG( 1, "%s: dest=%p, src=%p(=%p), amount=%d, io=%p\n", __FUNCTION__, dest, src, (void*)(src +offset), amount, io ); memcpy( dest, (void *)(offset + (u32)src), amount); return 0; } static int ram_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) { u32 offset; ram_io_t *ram; if ( !io || !src ) return -EINVAL; ram = (ram_io_t*)io->private_data; if ( !ram ) return -EINVAL; offset = ram->start + (u32)ram->pos; DBG( 1, "%s: dest=%p(=%p), src=%p, amount=%d, io=%p\n", __FUNCTION__, dest, (void*)(dest +offset), src, amount, io ); memcpy((void *)(offset + (u32)dest), src, amount); return 0; } /********************************************************************** * init ram pools */ void init_ram_io( void ) { int ret; static ram_io_t ram0; static io_driver_t io_ram0; ram0.start=RAM_START; ram0.len=RAM_SIZE; ram0.pos=0; ret = ram_io_init( &io_ram0, &ram0 ); if ( ret ) return; ret = io_register( &io_ram0, "RAM" ); if ( ret ) return; } |
From: Stefan E. <se...@us...> - 2003-04-03 14:21:30
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25435 Modified Files: generic_io.c Log Message: - put ram driver into a separate file Index: generic_io.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/generic_io.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- generic_io.c 13 May 2002 09:37:41 -0000 1.6 +++ generic_io.c 3 Apr 2003 14:21:23 -0000 1.7 @@ -45,7 +45,6 @@ * Defines / Makros */ -#define IO_MODULE_TEST 0 #define IO_DEBUG 1 #undef IO_QUIET @@ -86,9 +85,6 @@ /********************************************************************** * Prototypen */ -static int ram_io_conf( io_driver_t * io, void *conf ); -static int ram_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); -static int ram_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ); /********************************************************************** * Exported functions @@ -284,7 +280,7 @@ /* read from source */ ret = io_read( buffer, adr, to_copy, src ); if ( ret ) { - DBG( 1, "%s: read failed at block %d (adr %p).\n", + DBG( 1, "\n%s: read failed at block %d (adr %p).\n", __FUNCTION__, block, adr ); return -EINVAL; } @@ -292,7 +288,7 @@ /* write to dest */ ret = io_write( adr, buffer, to_copy, dest ); if ( ret ) { - DBG( 1, "%s: write failed at block %d (adr %p).\n", + DBG( 1, "\n%s: write failed at block %d (adr %p).\n", __FUNCTION__, block, adr ); return -EINVAL; } @@ -301,111 +297,9 @@ adr += to_copy; } - return 0; -} - - -/********************************************************************** - * A simple RAM driver - * - io driver for RAM access - */ -int ram_io_init( io_driver_t *io, ram_io_t *ram ) -{ - if ( !io || !ram ) - return -EINVAL; - - io->private_data = (void *)ram; - io->io_size = ram->len - ram->pos; - io->conf = ram_io_conf; - io->read = ram_io_read; - io->write = ram_io_write; - io->child_io = NULL; - - return 0; -} - -static int ram_io_conf( io_driver_t * io, void *conf ) -{ - ram_io_t *ram; - - if ( !io || !conf ) - return -EINVAL; - - ram = (ram_io_t*)io->private_data; - if ( !ram ) - return -EINVAL; - - if ( (u32)conf >= ram->len ) - return -EINVAL; - - ram->pos = (u32)conf; - - io->io_size = ram->len - (u32)ram->pos; - - return 0; -} - -static int ram_io_read( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - u32 offset; - ram_io_t *ram; - - DBG( 1, "%s: dest=%p, src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, src, amount, io ); - - if ( !io || !dest ) - return -EINVAL; - - ram = (ram_io_t*)io->private_data; - if ( !ram ) - return -EINVAL; - - offset = ram->start + (u32)ram->pos; - - DBG( 1, "%s: dest=%p, src=%p(=%p), amount=%d, io=%p\n", __FUNCTION__, - dest, src, (void*)(src +offset), amount, io ); - - memcpy( dest, (void *)(offset + (u32)src), amount); - - return 0; -} - -static int ram_io_write( unsigned char *dest, unsigned char *src, size_t amount, io_driver_t *io ) -{ - u32 offset; - ram_io_t *ram; - - - if ( !io || !src ) - return -EINVAL; - - ram = (ram_io_t*)io->private_data; - if ( !ram ) - return -EINVAL; - - offset = ram->start + (u32)ram->pos; - - DBG( 1, "%s: dest=%p(=%p), src=%p, amount=%d, io=%p\n", __FUNCTION__, - dest, (void*)(dest +offset), src, amount, io ); - - memcpy((void *)(offset + (u32)dest), src, amount); - - return 0; -} - -#if defined(IO_MODULE_TEST) -/********************************************************************** - * module test function - */ -int io_test( void ) -{ - int ret = 0; - - DBG( 1, "%s: version %s\n", __FUNCTION__, module_version ); - - ret = io_copy( "RAM1", "RAM0", 768 ); - if ( ret ) return -EINVAL; +#if !defined(IO_QUIET) + printf("\n"); +#endif return 0; } -#endif |
From: Stefan E. <se...@us...> - 2003-04-03 14:18:17
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23098 Modified Files: ip_bits.c Log Message: - use ethernet header struct Index: ip_bits.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/ip_bits.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ip_bits.c 1 Apr 2003 18:55:19 -0000 1.3 +++ ip_bits.c 3 Apr 2003 14:18:09 -0000 1.4 @@ -76,8 +76,10 @@ /* handle broadcast packets. For arp requests */ int do_bcast( unsigned char *ptr, unsigned int size ) { + struct ether_hdr *ether = (struct ether_hdr*)ptr; + /* check whether or not ARP proto */ - if (((ptr[OFF_ETHER + 12] << 8) | ptr[OFF_ETHER + 13]) != 0x0806) + if ( ether->proto != HTON(0x0806) ) return 0; /* not ARP */ /* ok, its an arp. handle it. */ |
From: Stefan E. <se...@us...> - 2003-04-01 19:04:11
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv8520 Modified Files: system3.h Log Message: - board id register definition - use fullspeed memory, 206Mhz clock and 0802 revision as default again. Index: system3.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/system3.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- system3.h 25 Jul 2002 14:21:42 -0000 1.18 +++ system3.h 1 Apr 2003 19:04:07 -0000 1.19 @@ -30,8 +30,8 @@ #undef CPU_SPEED_133 /* SYSTEM3 with 64 MB SDRAM, all on bank0 */ -#undef CONFIG_SYSTEM3_REV0802 -//#define CONFIG_SYSTEM3_REV0802 +//#undef CONFIG_SYSTEM3_REV0802 +#define CONFIG_SYSTEM3_REV0802 /* boot CPU speed */ #ifdef CPU_SPEED_133 @@ -45,7 +45,8 @@ #define TERMINAL_SPEED baud_115200 /* GPIO for the LED */ -#define LED_GPIO (0x00000000) /* GPIO 10 */ +//#define LED_GPIO (0x00800000) /* GPIO 10 */ +#define LED_GPIO (0x00000000) /* NO LED */ /* the base address were BLOB is loaded by the first stage loader */ @@ -94,12 +95,9 @@ #define RAMDISK_SIZE (8 * 1024) /* let SDRAM run at FULL memclk speed */ -#undef MDREFR_MEMCLK_FULLSPEED_0 -#undef MDREFR_MEMCLK_FULLSPEED_1 -#undef MDREFR_MEMCLK_FULLSPEED_2 -//#define MDREFR_MEMCLK_FULLSPEED_0 -//#define MDREFR_MEMCLK_FULLSPEED_1 -//#define MDREFR_MEMCLK_FULLSPEED_2 +#define MDREFR_MEMCLK_FULLSPEED_0 +#define MDREFR_MEMCLK_FULLSPEED_1 +#define MDREFR_MEMCLK_FULLSPEED_2 /* Memory configuration */ #ifdef BLOB_NEED_MEMCONFIG @@ -172,11 +170,20 @@ #endif #define SA1111_BASE (0x40000000) -#define SA1111_VBASE (0x40000000) +#define SYSTEM3_SYSID (0x10000000) #define SYSTEM3_CTRL_0 (0x10000090) #define SYSTEM3_CTRL_1 (0x100000A0) #define SYSTEM3_CTRL_2 (0x100000B0) #define SYSTEM3_CTRL_IRR (0x10000024) + +/* System ID register */ +#define PT_SYSID (*((volatile u8 *)SYSTEM3_SYSID)) +#define PT_ID_BOARDID (( PT_SYSID & 0xE0 ) >> 5 ) +#define PT_ID_REVISION ( PT_SYSID & 0x1F ) + +#define PT_BOARD_ALPHA ( 0 ) +#define PT_BOARD_SYS3 ( 1 ) +#define PT_BOARD_DAFIT ( 2 ) #endif |