Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv8566/src/blob Modified Files: assabet.c badge4.c brutus.c clart.c h3600.c idr.c jornada720.c lart.c nesa.c pleb.c shannon.c system3.c Log Message: Happy new year! This is the start of a new serial driver that should make porting blob to non-StrongARM architectures easier. The SA11x0 driver is implemented, but completely untested at the moment. It's trivial to do the rest of the serial code, but I'd better go to bed, or otherwise Jan-Derk will complain that I'm working too late ;) Part two follows tomorrow. Index: assabet.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/assabet.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- assabet.c 2001/10/25 09:28:04 1.4 +++ assabet.c 2002/01/02 01:18:57 1.5 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -62,12 +63,16 @@ #define RS232_ENABLE 0x00001000 #define GREEN_LED_ENABLE 0x00004000 -static void assabet_init_bcr(void) +static void assabet_init_hardware(void) { u32 *bcr = (u32 *)0x12000000; + /* enable RS232 tranceiver and green LED */ *bcr = RS232_ENABLE | GREEN_LED_ENABLE; + + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; } -__initlist(assabet_init_bcr, INIT_LEVEL_INITIAL_HARDWARE); +__initlist(assabet_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: badge4.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/badge4.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- badge4.c 2001/12/27 18:27:37 1.1 +++ badge4.c 2002/01/02 01:18:57 1.2 @@ -29,6 +29,7 @@ #include <blob/flash.h> #include <blob/init.h> #include <blob/sa1100.h> +#include <blob/serial.h> /* flash descriptor for Badge4 flash */ /* 1 x Intel 28F320C3BA100 Advanced+ Boot Block Flash (32 Mbit) */ @@ -72,6 +73,9 @@ GPDR |= (GPIO_GPIO19 | GPIO_GPIO20); GPSR = GPIO_GPIO19; GPCR = GPIO_GPIO20; + + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; } Index: brutus.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/brutus.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- brutus.c 2001/10/21 21:38:34 1.3 +++ brutus.c 2002/01/02 01:18:57 1.4 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -52,3 +53,14 @@ } __initlist(init_brutus_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void brutus_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(brutus_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: clart.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/clart.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- clart.c 2001/10/21 21:38:34 1.3 +++ clart.c 2002/01/02 01:18:57 1.4 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -55,3 +56,14 @@ } __initlist(init_clart_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void clart_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(clart_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: h3600.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/h3600.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- h3600.c 2001/10/31 16:44:18 1.3 +++ h3600.c 2002/01/02 01:18:57 1.4 @@ -29,6 +29,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -118,13 +119,15 @@ -static void h3600_init_egpio(void) +static void h3600_init_hardware(void) { shadow_egpio = 0; /* enable RS232 tranceiver */ h3600_set_egpio(EGPIO_H3600_RS232_ON); -} + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} -__initlist(h3600_init_egpio, INIT_LEVEL_INITIAL_HARDWARE); +__initlist(h3600_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: idr.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/idr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- idr.c 2001/12/16 07:39:22 1.2 +++ idr.c 2002/01/02 01:18:57 1.3 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> /* flash descriptor for IDR flash */ /* 1x Intel 28F128J3A strataflash (16MB) */ @@ -49,3 +50,12 @@ } __initlist(init_idr_flash_driver, INIT_LEVEL_OTHER_STUFF); + + +static void idr_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(idr_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: jornada720.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/jornada720.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jornada720.c 2001/12/27 18:27:37 1.1 +++ jornada720.c 2002/01/02 01:18:57 1.2 @@ -29,6 +29,7 @@ #include <blob/flash.h> #include <blob/init.h> #include <blob/sa1100.h> +#include <blob/serial.h> /* flash descriptor for Jornada720 flash */ @@ -81,10 +82,21 @@ PPSR &= ~(GPIO_GPIO10 | GPIO_GPIO7); PPDR |= (GPIO_GPIO10 | GPIO_GPIO7); +#warning "Please check this code!" + /* Careful over here! the timer might not yet be initialised + * at this point, so calling msleep() is unsafe! The best way + * to make sure that it is, is to put the GPIO stuff in a + * separate init function that runs at + * INIT_LEVEL_INITIAL_HARDWARE+1. The serial port stuff can be + * called without problems at INIT_LEVEL_INITIAL_HARDWARE -- Erik + */ msleep(10 * 1000); /* Take the MCU out of reset mode */ PPSR |= GPIO_GPIO10; + + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; } __initlist(init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: lart.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/lart.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lart.c 2001/11/04 23:13:44 1.4 +++ lart.c 2002/01/02 01:18:57 1.5 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -64,3 +65,14 @@ } __initlist(init_lart_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void lart_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(lart_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: nesa.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/nesa.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- nesa.c 2001/10/21 21:38:34 1.3 +++ nesa.c 2002/01/02 01:18:57 1.4 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -59,3 +60,14 @@ } __initlist(init_nesa_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void nesa_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(nesa_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: pleb.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/pleb.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pleb.c 2001/10/21 21:38:34 1.3 +++ pleb.c 2002/01/02 01:18:57 1.4 @@ -28,6 +28,7 @@ #include <blob/flash.h> #include <blob/init.h> #include <blob/led.h> +#include <blob/serial.h> @@ -69,3 +70,14 @@ } __initlist(init_pleb_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void pleb_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(pleb_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: shannon.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/shannon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- shannon.c 2001/12/14 01:33:21 1.4 +++ shannon.c 2002/01/02 01:18:57 1.5 @@ -27,6 +27,7 @@ #include <blob/flash.h> #include <blob/init.h> +#include <blob/serial.h> @@ -58,3 +59,14 @@ } __initlist(init_shannon_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void shannon_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(shannon_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: system3.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/system3.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- system3.c 2001/11/21 02:14:44 1.7 +++ system3.c 2002/01/02 01:18:57 1.8 @@ -41,6 +41,7 @@ #include <blob/init.h> #include <blob/command.h> #include <blob/uucodec.h> +#include <blob/serial.h> /********************************************************************** * defines @@ -96,6 +97,18 @@ } __initlist(init_system3_flash_driver, INIT_LEVEL_OTHER_STUFF); + + + + +static void system3_init_hardware(void) +{ + /* select serial driver */ + serial_driver = &sa11x0_serial_driver; +} + +__initlist(system3_init_hardware, INIT_LEVEL_INITIAL_HARDWARE); + |