From: Abraham vd M. <ab...@us...> - 2003-08-06 22:58:19
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv7704/src/lib Modified Files: Makefile.am i2c-gpio.c i2c.c icache.c led-sa11x0.c led.c reboot-sa11x0.c serial-pxa.c serial-sa11x0.c time.c 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/lib/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Makefile.am 3 Apr 2003 14:58:17 -0000 1.27 +++ Makefile.am 6 Aug 2003 22:55:41 -0000 1.28 @@ -30,8 +30,6 @@ crc32.c \ error.c \ ext2fs.c \ - i2c-gpio.c \ - i2c.c \ icache.c \ init.c \ led.c \ @@ -69,6 +67,8 @@ gio_part_blob.c \ gio_ram.c \ gio_flash.c \ + i2c-gpio.c \ + i2c.c \ tar.c Index: i2c-gpio.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/i2c-gpio.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- i2c-gpio.c 24 Jan 2003 10:03:29 -0000 1.3 +++ i2c-gpio.c 6 Aug 2003 22:55:41 -0000 1.4 @@ -28,7 +28,7 @@ #include <blob/i2c.h> #include <blob/i2c-gpio.h> -#include <blob/sa1100.h> +#include <blob/arch.h> #include <blob/errno.h> #include <blob/util.h> Index: i2c.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/i2c.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- i2c.c 2 May 2002 01:45:39 -0000 1.4 +++ i2c.c 6 Aug 2003 22:55:41 -0000 1.5 @@ -169,7 +169,7 @@ bit = get_sda(bus); if (bit) - printf(__FUNCTION__ ": did not get ack\n"); + printf("%s: did not get ack\n",__FUNCTION__); set_scl(bus, 0); Index: icache.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/icache.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- icache.c 7 Oct 2001 20:16:57 -0000 1.3 +++ icache.c 6 Aug 2003 22:55:41 -0000 1.4 @@ -30,7 +30,7 @@ #include <blob/icache.h> #include <blob/types.h> - +#include<blob/util.h> void enable_icache(void) { Index: led-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/led-sa11x0.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- led-sa11x0.c 13 Feb 2003 01:10:53 -0000 1.1 +++ led-sa11x0.c 6 Aug 2003 22:55:41 -0000 1.2 @@ -33,7 +33,6 @@ #endif #include <blob/arch.h> -#include <blob/sa1100.h> #include <blob/led.h> #include <blob/init.h> Index: led.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/led.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- led.c 13 Feb 2003 01:10:53 -0000 1.8 +++ led.c 6 Aug 2003 22:55:41 -0000 1.9 @@ -33,17 +33,15 @@ led_driver_t *led_driver; -int led_init(void) +void led_init(void) { if (led_driver == NULL){ deprintf("No LED driver defined in arch specific file\n"); - return -1; + return; } led_driver->led_unlock(); led_driver->led_on(); - - return 0; } int led_on(void) Index: reboot-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/reboot-sa11x0.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- reboot-sa11x0.c 4 Jan 2003 02:11:43 -0000 1.1 +++ reboot-sa11x0.c 6 Aug 2003 22:55:41 -0000 1.2 @@ -27,7 +27,7 @@ # include <blob/config.h> #endif -#include <blob/sa1100.h> +#include <blob/arch.h> #include <blob/reboot.h> Index: serial-pxa.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/serial-pxa.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- serial-pxa.c 14 Aug 2002 21:13:45 -0000 1.3 +++ serial-pxa.c 6 Aug 2003 22:55:41 -0000 1.4 @@ -101,8 +101,7 @@ static int pxa_serial_flush_output(void) { /* wait until the transmitter is no longer busy */ - while(SerialLSR & ~LSR_TDRQ) { - } + while(SerialLSR & ~LSR_TDRQ) ; return 0; } @@ -115,6 +114,11 @@ { u32 divisor; +#ifdef USE_SERIAL1 + /* enable clock */ + CKEN |= CKEN6_FFUART; +#endif + /* get correct divisor */ switch(baud) { case baud_1200: @@ -149,29 +153,26 @@ return -ERANGE; } - pxa_serial_flush_output(); - /* switch receiver and transmitter off */ - SerialIER = 0x00; + SerialLCR = 0; + SerialIER = 0; + SerialFIFO = 0; /* Gain access to divisor latch */ - SerialLCR = LCR_DLAB; + SerialLCR = LCR_WLS0 | LCR_WLS1 | LCR_DLAB; /* Load baud rate divisor in two steps, lsb, then msb of value */ SerialDATA = divisor & 0xff; - SerialIER = (divisor & 0xff00) >> 8; + SerialIER = (divisor >> 8) & 0xff; /* set the port to sensible defaults (no break, no interrupts, * no parity, 8 databits, 1 stopbit, transmitter and receiver * enabled), reset dlab bit: */ - SerialLCR = ( LCR_WLS1 | LCR_WLS0 ); + SerialLCR = LCR_WLS1 | LCR_WLS0; - /* turn on tx/rx fifo's */ - SerialFIFO = FCR_TRFIFOE; - /* turn the receiver and transmitter back on */ SerialIER = IER_UUE; Index: serial-sa11x0.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/serial-sa11x0.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- serial-sa11x0.c 1 Feb 2002 14:38:55 -0000 1.3 +++ serial-sa11x0.c 6 Aug 2003 22:55:41 -0000 1.4 @@ -29,7 +29,7 @@ #include <blob/arch.h> #include <blob/errno.h> -#include <blob/sa1100.h> +#include <blob/arch.h> #include <blob/serial.h> #include <blob/types.h> Index: time.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/time.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- time.c 7 Oct 2001 20:16:57 -0000 1.3 +++ time.c 6 Aug 2003 22:55:41 -0000 1.4 @@ -37,17 +37,11 @@ #include <blob/init.h> #include <blob/led.h> -#include <blob/sa1100.h> +#include <blob/arch.h> #include <blob/time.h> - - - static int numOverflows; - - - void TimerInit(void) { /* clear counter */ @@ -57,8 +51,7 @@ OIER = 0; /* wait until OSCR > 0 */ - while(OSCR == 0) - ; + while(OSCR == 0) ; /* clear match register 0 */ OSMR0 = 0; @@ -69,9 +62,6 @@ numOverflows = 0; } - - - /* returns the time in 1/TICKS_PER_SECOND seconds */ u32 TimerGetTime(void) { @@ -84,16 +74,11 @@ return((u32) OSCR); } - - - int TimerDetectOverflow(void) { return(OSSR & OSSR_M0); } - - void TimerClearOverflow(void) { if(TimerDetectOverflow()) @@ -102,8 +87,6 @@ OSSR = OSSR_M0; } - - void msleep(unsigned int msec) { u32 ticks, start, end; @@ -141,3 +124,4 @@ reached = 1; } while(!reached); } + |