From: Tim R. <tim...@us...> - 2002-04-27 05:00:02
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv18882/src/lib Modified Files: Makefile.am ide.c pcmcia.c Log Message: turn on ide and pcmcia again, fix pcmcia compiles (but not features) for non sa1111 systems Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 27 Apr 2002 04:16:34 -0000 1.19 +++ Makefile.am 27 Apr 2002 04:59:59 -0000 1.20 @@ -33,6 +33,7 @@ i2c.c \ i2c-gpio.c \ icache.c \ + ide.c \ init.c \ led.c \ md5.c \ @@ -40,6 +41,7 @@ memcpy.c \ memset.c \ mini_inflate.c \ + pcmcia.c \ printf.c \ reboot.c \ serial.c \ Index: ide.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/ide.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ide.c 26 Apr 2002 09:22:05 -0000 1.3 +++ ide.c 27 Apr 2002 04:59:59 -0000 1.4 @@ -23,6 +23,9 @@ * $Id$ * * $Log$ + * Revision 1.4 2002/04/27 04:59:59 timriker + * turn on ide and pcmcia again, fix pcmcia compiles (but not features) for non sa1111 systems + * * Revision 1.3 2002/04/26 09:22:05 seletz * - added original copyright from Brad Parker * - corrected EMAIL addr @@ -53,8 +56,7 @@ #include <blob/command.h> #include <blob/time.h> #include <blob/serial.h> -#include <blob/sa1100.h> -#include <blob/sa1111.h> +#include <blob/arch.h> #include <blob/ide.h> /********************************************************************** @@ -332,7 +334,7 @@ if (dbg > 2) printf("hd_read_mapped(sector_num=%d, buffer=%x)\n", - sector_num, buffer); + sector_num, (u32)buffer); #if 0 sector = (sector_num % disk_sectors_per_track) + 1; @@ -463,7 +465,7 @@ } _DBG( "ide: %s: port=%x, count=%d, status=%x\n", __FUNCTION__, - port, count, status ); + *port, count, status ); if (status & 0x01) { err = port[1]; Index: pcmcia.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/pcmcia.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pcmcia.c 26 Apr 2002 09:22:05 -0000 1.3 +++ pcmcia.c 27 Apr 2002 04:59:59 -0000 1.4 @@ -24,6 +24,9 @@ * $Id$ * * $Log$ + * Revision 1.4 2002/04/27 04:59:59 timriker + * turn on ide and pcmcia again, fix pcmcia compiles (but not features) for non sa1111 systems + * * Revision 1.3 2002/04/26 09:22:05 seletz * - added original copyright from Brad Parker * - corrected EMAIL addr @@ -54,10 +57,13 @@ #include <blob/command.h> #include <blob/time.h> #include <blob/serial.h> -#include <blob/sa1100.h> -#include <blob/sa1111.h> +#include <blob/arch.h> #include <blob/pcmcia.h> +#ifdef SA1111_BASE +#include <blob/sa1111.h> +#endif + /********************************************************************** * Defines / Makros */ @@ -155,6 +161,7 @@ int WEAK_SYM pcmcia_slot_detect( int slot ) { int detect = 0; +#ifdef SA1111_BASE unsigned int flags = PCSR; switch ( slot ) { @@ -177,8 +184,10 @@ } _DBG( "%s: slot %d status: %x\n", __FUNCTION__, slot, pcmcia_slots[slot].status ); - DONE: +#else +#warning "FIXME: non sa1111 systems not yet supported" +#endif return detect; } @@ -187,6 +196,7 @@ { int ret = 0; +#ifdef SA1111_BASE switch ( slot ) { case 0: PCCR = (PCCR & ~PCCR_S0_PSE) | PCCR_S0_FLT | PCCR_S0_PWAITEN; @@ -204,6 +214,9 @@ _DBG( "%s: slot %d status: %x\n", __FUNCTION__, slot, pcmcia_slots[slot].status ); DONE: +#else +#warning "FIXME: non sa1111 systems not yet supported" +#endif return ret; } @@ -212,6 +225,7 @@ { int ret = 0; +#ifdef SA1111_BASE switch ( slot ) { case 0: PCCR = PCCR | PCCR_S0_PSE; @@ -229,6 +243,9 @@ _DBG( "%s: slot %d status: %x\n", __FUNCTION__, slot, pcmcia_slots[slot].status ); DONE: +#else +#warning "FIXME: non sa1111 systems not yet supported" +#endif return ret; } @@ -237,6 +254,7 @@ { int ret = 0; +#ifdef SA1111_BASE switch ( slot ) { case 0: PCCR |= PCCR_S0_RST; @@ -256,13 +274,16 @@ } _DBG( "%s: slot %d reset\n", __FUNCTION__, slot ); - +#else +#warning "FIXME: non sa1111 systems not yet supported" +#endif return ret; } /* dump slot HW line stati */ int pcmcia_dump_stati( void ) { +#ifdef SA1111_BASE int status = PCSR; printf("s0: "); @@ -284,6 +305,9 @@ if (status & PCSR_S1_BVD1) printf("bvd1 "); else printf(" "); if (status & PCSR_S1_BVD2) printf("bvd2 "); else printf(" "); printf("\n"); +#else +#warning "FIXME: non sa1111 systems not yet supported" +#endif return 0; } @@ -402,7 +426,7 @@ break; case CISTPL_FUNCID: func_id = *p; - _DBG( "%s: func_id=%p\n", __FUNCTION__, func_id ); + _DBG( "%s: func_id=%d\n", __FUNCTION__, func_id ); break; case CISTPL_FUNCE: if (n_features < PCMCIA_MAX_FEATURES) @@ -516,7 +540,6 @@ int pcmcia_slot_attr_read( int slot, u16 offset, u8 *value ) { int ret = 0; - u32 attr_base = 0; /* sanity check */ if ( slot < 0 ) { @@ -559,7 +582,6 @@ int pcmcia_slot_attr_write( int slot, u16 offset, u8 value ) { int ret = 0; - u32 attr_base = 0; /* sanity check */ if ( slot < 0 ) { |