diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared')
36 files changed, 0 insertions, 388 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/bootldr.h b/c/src/lib/libbsp/powerpc/shared/bootloader/bootldr.h index 594737efea..bf83667afe 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/bootldr.h +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/bootldr.h @@ -173,7 +173,6 @@ extern void * codemove(void *, const void *, size_t, unsigned long); #define isa_io_base (bd->io_base) - void * __palloc(u_long, int); void pfree(void *); diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/em86.c b/c/src/lib/libbsp/powerpc/shared/bootloader/em86.c index 1ca667a82f..f600ec7b52 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/em86.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/em86.c @@ -32,7 +32,6 @@ #include <rtems/bspIo.h> #endif - /* Code options, put them on the compiler command line */ /* #define EIP_STATS */ /* EIP based profiling */ /* #undef EIP_STATS */ @@ -78,7 +77,6 @@ typedef struct _x86 { x86 v86_private __attribute__((aligned(32))); - /* Emulator is in another source file */ extern void em86_enter(x86 * p); @@ -461,7 +459,6 @@ void cleanup_v86_mess(void) { p->ioperm=0; } - int init_v86(void) { x86 *p = (x86 *) bd->v86_private; @@ -502,7 +499,6 @@ void em86_main(struct pci_dev *dev){ #define IOMASK 0 #endif - #ifndef __BOOT__ int i; /* Allow or disable access to all ports */ @@ -550,7 +546,6 @@ void em86_main(struct pci_dev *dev){ p->rom = palloc(length*512); if (!p->rom) return; - for(dst=(u_int *) p->rom, src=(volatile u_int *)(ptr_mem_map->isa_mem_base+0xc0000), left = length*512/sizeof(u_int); diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/em86real.S b/c/src/lib/libbsp/powerpc/shared/bootloader/em86real.S index ad38fb24fb..e5560f4879 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/em86real.S +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/em86real.S @@ -193,7 +193,6 @@ * */ - /* Now the details of flag evaluation with the necessary macros */ /* Alignment check is toggable so the system believes it is a 486, but @@ -1721,7 +1720,6 @@ outl_eax_dx: li r4,DX eieio NEXT - /* Macro used for add and sub */ #define ARITH(op,fl) \ op##b_reg_mem: lbzx op1,MEM; SET_FLAGS(fl(B)); lbzx op2,REG; \ @@ -2612,7 +2610,6 @@ _finish_strw: li r4,SI sthbrx r3,state,r4 # update cx NEXT - lodsb_a16: bl _setup_stringw 1: lbzx r0,STRINGSRC # [rep] lodsb add offset,offset,r7 @@ -3878,7 +3875,6 @@ ldlptrw: lhzux r7,MEM lwz ssb,ssbase(state) blr - /* Intructions that may modify the current code segment: the next optimization * might be to avoid calling C code when the code segment does not change. But * it's probably not worth the effort. @@ -4532,7 +4528,6 @@ grp3##bwl: ENTRY(test##bwl##_imm,t); OP(ud); \ grp3table(w,3) grp3table(l,3) - grp4b: BOP(incb); BOP(decb); \ OP(ud); OP(ud); \ OP(ud); OP(ud); \ diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/head.S b/c/src/lib/libbsp/powerpc/shared/bootloader/head.S index cb6d9134fc..0d82791524 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/head.S +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/head.S @@ -38,9 +38,6 @@ li r10,0x26 ; \ sc - - - #define MONITOR_ENTER \ mfmsr r10 ; \ ori r10,r10,MSR_IP ; \ @@ -48,8 +45,6 @@ li r10,0x63 ; \ sc - - START_GOT GOT_ENTRY(_GOT2_TABLE_) GOT_ENTRY(_FIXUP_TABLE_) @@ -98,7 +93,6 @@ start: cmplwi cr2,r0,1 beq 2,2f - /* * commented out, 11/7/2002, gregm. This instruction sequence seems to * be pathological on the 603e. @@ -113,7 +107,6 @@ start: #endif */ - 2: bl reloc /* save all the parameters and the orginal msr/hid0/r31 */ @@ -314,8 +307,6 @@ moved: lwz r1,stack(bd) 1: bctr #endif - - /* relocation function, r30 must point to got2+0x8000 */ reloc: /* Adjust got2 pointers, no need to check for 0, this code already puts diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c b/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c index ae6cf1fafc..ce610fab04 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/lib.c @@ -15,7 +15,6 @@ * $Id$ */ - void* memset(void *p, int c, unsigned int n) { char *q =p; diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c index 6b4718e7ea..373b13bb45 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/misc.c @@ -33,7 +33,6 @@ struct wait_queue; struct buffer_head; typedef struct { int counter; } atomic_t; - typedef struct page { /* these must be first (free area handling) */ struct page *next; @@ -48,7 +47,6 @@ typedef struct page { struct buffer_head * buffers; } mem_map_t; - extern opaque mm_private, pci_private, v86_private, console_private; #define CONSOLE_ON_SERIAL "console=ttyS0" @@ -74,7 +72,6 @@ static void exit(void) { while(1); } - void hang(const char *s, u_long x, ctxt *p) { u_long *r1; #ifdef DEBUG @@ -91,7 +88,6 @@ void hang(const char *s, u_long x, ctxt *p) { exit(); }; - void *zalloc(void *x, unsigned items, unsigned size) { void *p = salloc(items*size); @@ -115,7 +111,6 @@ void zfree(void *x, void *addr, unsigned nb) #define DEFLATED 8 - void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) { z_stream s; @@ -422,7 +417,6 @@ setup_hw(void) *cp = 0; } - /* Functions to deal with the residual data */ static int same_DevID(unsigned short vendor, unsigned short Number, diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c b/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c index 4371ae6a0d..3cef24a30c 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/mm.c @@ -129,7 +129,6 @@ void print_maps(map *, const char *); * designed to properly handle MMU interrupts to fill the hash table. */ - void _handler(int vec, ctxt *p) { map *area; struct _mm_private *mm = (struct _mm_private *) bd->mm_private; @@ -261,7 +260,6 @@ int insert_map(map **head, map *p) { return 0; } - /* Removal from linked list */ static @@ -421,7 +419,6 @@ MEM_MAP seg_fix[] = { { 0x0480, 0x80800, 0x00800 }, { 0x0440, 0x80000, 0x00800 } }; - /* The Motorola NT firmware does not set up all required info in the residual * data. This routine changes some things in a way that the bootloader and * linux are happy. diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c index 8f17d06b46..dfa31a2a16 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c @@ -15,7 +15,6 @@ * $Id$ */ - #include <sys/types.h> #include <rtems/bspIo.h> #include <libcpu/spr.h> @@ -27,16 +26,13 @@ #include <string.h> - typedef unsigned int u32; - /* #define DEBUG #define PCI_DEBUG */ - /* Used to reorganize PCI space on stupid machines which spread resources * across a wide address space. This is bad when P2P bridges are present * or when it limits the mappings that a resource hog like a PCI<->VME @@ -166,19 +162,15 @@ static struct blacklist_entry blacklist[] = { {0xffff, 0, 0, 0} }; - /* This function filters resources and then inserts them into a list of * configurable pci resources. */ - #define AREA(r) \ (((r->type&PCI_BASE_ADDRESS_SPACE)==PCI_BASE_ADDRESS_SPACE_IO) ? PCI_AREA_IO :\ ((r->type&PCI_BASE_ADDRESS_MEM_PREFETCH) ? PCI_AREA_PREFETCHABLE :\ PCI_AREA_MEMORY)) - - static int insert_before(pci_resource *e, pci_resource *t) { if (e->dev->bus->number != t->dev->bus->number) return e->dev->bus->number > t->dev->bus->number; @@ -186,10 +178,6 @@ static int insert_before(pci_resource *e, pci_resource *t) { return (e->size > t->size); } - - - - static void insert_resource(pci_resource *r) { struct blacklist_entry *b; pci_resource *p; @@ -280,10 +268,6 @@ static void insert_resource(pci_resource *r) { } } - - - - /* This version only works for bus 0. I don't have any P2P bridges to test * a more sophisticated version which has therefore not been implemented. * Prefetchable memory is not yet handled correctly either. @@ -323,11 +307,6 @@ static u_long find_range(u_char bus, u_char type, return total; } - - - - - static inline void init_free_area(pci_area_head *h, u_long start, u_long end, u_int mask, int high) { pci_area *p; @@ -342,11 +321,6 @@ static inline void init_free_area(pci_area_head *h, u_long start, h->high = high; } - - - - - static void insert_area(pci_area_head *h, pci_area *p) { pci_area *q = h->head; if (!p) return; @@ -371,10 +345,6 @@ static void insert_area(pci_area_head *h, pci_area *p) { } } - - - - static void remove_area(pci_area_head *h, pci_area *p) { @@ -390,11 +360,6 @@ void remove_area(pci_area_head *h, pci_area *p) if (q) q->next=p->next; } - - - - - static pci_area * alloc_area(pci_area_head *h, struct pci_bus *bus, u_long required, u_long mask, u_int flags) { pci_area *p; @@ -460,10 +425,6 @@ static pci_area * alloc_area(pci_area_head *h, struct pci_bus *bus, return new; } - - - - static inline void alloc_space(pci_area *p, pci_resource *r) { @@ -476,10 +437,6 @@ void alloc_space(pci_area *p, pci_resource *r) } } - - - - static void reconfigure_bus_space(u_char bus, u_char type, pci_area_head *h) { pci_resource *first, *past, *r; @@ -500,12 +457,6 @@ static void reconfigure_bus_space(u_char bus, u_char type, pci_area_head *h) } } - - - - - - #define BUS0_IO_START 0x10000 #define BUS0_IO_END 0x1ffff #define BUS0_MEM_START 0x1000000 @@ -516,10 +467,6 @@ static void reconfigure_bus_space(u_char bus, u_char type, pci_area_head *h) #define BUSREST_MEM_START 0xb000000 #define BUSREST_MEM_END 0x10000000 - - - - static void reconfigure_pci(void) { pci_resource *r; struct pci_dev *dev; @@ -535,7 +482,6 @@ static void reconfigure_pci(void) { init_free_area(&pci->io, BUS0_IO_START, BUS0_IO_END, 0xfff, 0); init_free_area(&pci->mem, BUS0_MEM_START, BUS0_MEM_END, 0xfffff, 0); - /* First reconfigure the I/O space, this will be more * complex when there is more than 1 bus. And 64 bits * devices are another kind of problems. @@ -586,11 +532,6 @@ static void reconfigure_pci(void) { } } - - - - - static int indirect_pci_read_config_byte(unsigned char bus, unsigned char dev_fn, unsigned char offset, unsigned char *val) { @@ -660,7 +601,6 @@ static const struct pci_config_access_functions indirect_functions = { indirect_pci_write_config_dword }; - static int direct_pci_read_config_byte(unsigned char bus, unsigned char dev_fn, unsigned char offset, unsigned char *val) { @@ -750,11 +690,6 @@ static const struct pci_config_access_functions direct_functions = { direct_pci_write_config_dword }; - - - - - void pci_read_bases(struct pci_dev *dev, unsigned int howmany) { unsigned int reg, nextreg; @@ -821,13 +756,6 @@ void pci_read_bases(struct pci_dev *dev, unsigned int howmany) } } - - - - - - - u_int pci_scan_bus(struct pci_bus *bus) { unsigned int devfn, l, max, class; @@ -1018,15 +946,6 @@ u_int pci_scan_bus(struct pci_bus *bus) return max; } - - - - - - - - - #if 0 void @@ -1043,11 +962,6 @@ pci_fixup(void) } } - - - - - static void print_pci_info() { pci_resource *r; @@ -1102,17 +1016,6 @@ static void print_pci_info() #endif - - - - - - - - - - - static struct _addr_start { uint32_t start_pcimem; @@ -1120,10 +1023,6 @@ static struct _addr_start uint32_t start_prefetch; } astart; - - - - static pci_resource *enum_device_resources( struct pci_dev *pdev, int i ) { pci_resource *r; @@ -1138,21 +1037,12 @@ static pci_resource *enum_device_resources( struct pci_dev *pdev, int i ) return r; } - - - - - - - - static void recursive_bus_reconfigure( struct pci_bus *pbus ) { struct pci_dev *pdev; struct pci_bus *childbus; int isroot = 0; - if( !pbus ) { /* start with the root bus */ @@ -1164,13 +1054,11 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) isroot = -1; } - #define WRITE_BRIDGE_IO #define WRITE_BRIDGE_MEM #define WRITE_BRIDGE_PF #define WRITE_BRIDGE_ENABLE - /* ** Run thru the p2p bridges on this bus and recurse into subordinate busses */ @@ -1198,8 +1086,6 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) childbus->subordinate ); #endif - - /* **use the current values & the saved ones to figure out ** the address spaces for the bridge @@ -1230,9 +1116,6 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) pcibios_write_config_byte(pdev->bus->number, pdev->devfn, PCI_IO_LIMIT, limit8 ); #endif - - - if( addrhold.start_pcimem == astart.start_pcimem ) { limit16 = 0; @@ -1252,8 +1135,6 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_MEMORY_LIMIT, limit16 ); #endif - - if( astart.start_prefetch == addrhold.start_prefetch ) { limit16 = 0; @@ -1289,11 +1170,6 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) } } - - - - - if( !isroot ) { #ifdef PCI_DEBUG @@ -1370,15 +1246,6 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus ) } - - - - - - - - - void pci_init(void) { PPC_DEVICE *hostbridge; @@ -1439,5 +1306,4 @@ void pci_init(void) print_pci_resources("Allocated PCI resources:\n"); } - /* eof */ diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.h b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.h index 3884760c8b..619497d5b7 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.h +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.h @@ -1155,5 +1155,4 @@ extern struct pci_dev *pci_devices; /* list of all devices */ #define PCIBIOS_SET_FAILED 0x88 #define PCIBIOS_BUFFER_TOO_SMALL 0x89 - #endif /* BOOTLOADER_PCI_H */ diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.c b/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.c index 70e97abb6e..2eb7c1b777 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.c +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.c @@ -105,7 +105,6 @@ extern char *z_errmsg[]; /* indexed by 1-zlib_error */ # define Tracecv(c,x) #endif - typedef uLong (*check_func) OF((uLong check, Bytef *buf, uInt len)); /* voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); */ @@ -229,7 +228,6 @@ local int inflate_trees_free OF(( inflate_huft *, /* tables to free */ z_stream *)); /* for zfree function */ - /*+++++*/ /* infcodes.h -- header to use infcodes.c * Copyright (C) 1995 Mark Adler @@ -258,7 +256,6 @@ local void inflate_codes_free OF(( inflate_codes_statef *, z_stream *)); - /*+++++*/ /* inflate.c -- zlib interface to inflate modules * Copyright (C) 1995 Mark Adler @@ -299,7 +296,6 @@ struct internal_state { }; - int inflateReset(z) z_stream *z; { @@ -315,7 +311,6 @@ z_stream *z; return Z_OK; } - int inflateEnd(z) z_stream *z; { @@ -331,7 +326,6 @@ z_stream *z; return Z_OK; } - int inflateInit2(z, w) z_stream *z; int w; @@ -377,14 +371,12 @@ int w; return Z_OK; } - int inflateInit(z) z_stream *z; { return inflateInit2(z, DEF_WBITS); } - #define NEEDBYTE {if(z->avail_in==0)goto empty;r=Z_OK;} #define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) @@ -513,7 +505,6 @@ z_stream *z; return inflate_addhistory(z->state->blocks, z); } - int inflateSync(z) z_stream *z; { @@ -625,7 +616,6 @@ struct inflate_blocks_state { }; - /* defines for inflate input/output */ /* update pointers and return */ #define UPDBITS {s->bitb=b;s->bitk=k;} @@ -681,7 +671,6 @@ local int inflate_fast OF(( inflate_blocks_statef *, z_stream *)); - /*+++++*/ /* infblock.c -- interpret and process block types to last block * Copyright (C) 1995 Mark Adler @@ -737,7 +726,6 @@ local uInt border[] = { /* Order of the bit length code lengths */ the two sets of lengths. */ - local void inflate_blocks_reset(s, z, c) inflate_blocks_statef *s; z_stream *z; @@ -762,7 +750,6 @@ uLongf *c; Trace("inflate: blocks reset\n"); } - local inflate_blocks_statef *inflate_blocks_new(z, c, w) z_stream *z; check_func c; @@ -786,7 +773,6 @@ uInt w; return s; } - local int inflate_blocks(s, z, r) inflate_blocks_statef *s; z_stream *z; @@ -1049,7 +1035,6 @@ int r; } } - local int inflate_blocks_free(s, z, c) inflate_blocks_statef *s; z_stream *z; @@ -1115,7 +1100,6 @@ z_stream *z; return Z_OK; } - /* * At the end of a Deflate-compressed PPP packet, we expect to have seen * a `stored' block type value but not the (zero) length bytes. @@ -1129,7 +1113,6 @@ local int inflate_packet_flush(s) return Z_OK; } - /*+++++*/ /* inftrees.c -- generate Huffman trees for efficient decoding * Copyright (C) 1995 Mark Adler @@ -1142,7 +1125,6 @@ local int inflate_packet_flush(s) #define exop word.what.Exop #define bits word.what.Bits - local int huft_build OF(( uIntf *, /* code lengths in bits */ uInt, /* number of codes */ @@ -1212,7 +1194,6 @@ local uInt cpdext[] = { /* Extra bits for distance codes */ possibly even between compilers. Your mileage may vary. */ - /* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ #define BMAX 15 /* maximum bit length of any code */ #define N_MAX 288 /* maximum number of codes in any set */ @@ -1257,7 +1238,6 @@ z_stream *zs; /* for zalloc function */ int y; /* number of dummy codes added */ uInt z; /* number of entries in current table */ - /* Generate counts for each bit length */ p = c; #define C0 *p++ = 0; @@ -1275,7 +1255,6 @@ z_stream *zs; /* for zalloc function */ return Z_OK; } - /* Find minimum and maximum length, bound *m by those */ l = *m; for (j = 1; j <= BMAX; j++) @@ -1292,7 +1271,6 @@ z_stream *zs; /* for zalloc function */ l = i; *m = l; - /* Adjust last length count to fill out codes, if needed */ for (y = 1 << j; j < i; j++, y <<= 1) if ((y -= c[j]) < 0) @@ -1301,7 +1279,6 @@ z_stream *zs; /* for zalloc function */ return Z_DATA_ERROR; c[i] += y; - /* Generate starting offsets into the value table for each length */ x[1] = j = 0; p = c + 1; xp = x + 2; @@ -1309,7 +1286,6 @@ z_stream *zs; /* for zalloc function */ *xp++ = (j += *p++); } - /* Make a table of values in order of bit lengths */ p = b; i = 0; do { @@ -1317,7 +1293,6 @@ z_stream *zs; /* for zalloc function */ v[x[j]++] = i; } while (++i < n); - /* Generate the Huffman codes and for each, make the table entries */ x[0] = i = 0; /* first Huffman code is zero */ p = v; /* grab values in bit order */ @@ -1418,12 +1393,10 @@ z_stream *zs; /* for zalloc function */ } } - /* Return Z_BUF_ERROR if we were given an incomplete table */ return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; } - local int inflate_trees_bits(c, bb, tb, z) uIntf *c; /* 19 code lengths */ uIntf *bb; /* bits tree desired/actual depth */ @@ -1444,7 +1417,6 @@ z_stream *z; /* for zfree function */ return r; } - local int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z) uInt nl; /* number of literal/length codes */ uInt nd; /* number of distance codes */ @@ -1494,7 +1466,6 @@ z_stream *z; /* for zfree function */ return Z_OK; } - /* build fixed tables only once--keep them here */ local int fixed_lock = 0; local int fixed_built = 0; @@ -1506,7 +1477,6 @@ local uInt fixed_bd; local inflate_huft *fixed_tl; local inflate_huft *fixed_td; - local voidpf falloc(q, n, s) voidpf q; /* opaque pointer (not used) */ uInt n; /* number of items */ @@ -1519,7 +1489,6 @@ uInt s; /* size of item */ return (voidpf)(fixed_mem + fixed_left); } - local void ffree(q, p, n) voidpf q; voidpf p; @@ -1529,7 +1498,6 @@ uInt n; if (q) q = p; /* to make some compilers happy */ } - local int inflate_trees_fixed(bl, bd, tl, td) uIntf *bl; /* literal desired/actual bit depth */ uIntf *bd; /* distance desired/actual bit depth */ @@ -1579,7 +1547,6 @@ inflate_huft * FAR *td; /* distance tree result */ return Z_OK; } - local int inflate_trees_free(t, z) inflate_huft *t; /* table to free */ z_stream *z; /* for zfree function */ @@ -1651,7 +1618,6 @@ struct inflate_codes_state { }; - local inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) uInt bl, bd; inflate_huft *tl, *td; @@ -1672,7 +1638,6 @@ z_stream *z; return c; } - local int inflate_codes(s, z, r) inflate_blocks_statef *s; z_stream *z; @@ -1832,7 +1797,6 @@ int r; } } - local void inflate_codes_free(c, z) inflate_codes_statef *c; z_stream *z; @@ -1913,7 +1877,6 @@ int r; return r; } - /*+++++*/ /* inffast.c -- process literals and length/distance pairs fast * Copyright (C) 1995 Mark Adler @@ -2074,7 +2037,6 @@ z_stream *z; return Z_OK; } - /*+++++*/ /* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995 Jean-loup Gailly. @@ -2095,7 +2057,6 @@ char *z_errmsg[] = { "buffer error", /* Z_BUF_ERROR (-5) */ ""}; - /*+++++*/ /* adler32.c -- compute the Adler-32 checksum of a data stream * Copyright (C) 1995 Mark Adler diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.h b/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.h index 11b040595c..cce54696dc 100644 --- a/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.h +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/zlib.h @@ -274,7 +274,6 @@ extern int inflateInit OF((z_stream *strm)); inflate(). */ - extern int inflate OF((z_stream *strm, int flush)); /* Performs one or both of the following actions: @@ -325,7 +324,6 @@ extern int inflate OF((z_stream *strm, int flush)); when Z_FINISH is used. In the Z_DATA_ERROR case, the application may then call inflateSync to look for a good compression block. */ - extern int inflateEnd OF((z_stream *strm)); /* All dynamically allocated data structures for this stream are freed. diff --git a/c/src/lib/libbsp/powerpc/shared/clock/p_clock.c b/c/src/lib/libbsp/powerpc/shared/clock/p_clock.c index fe90a3d01e..c181d398bb 100644 --- a/c/src/lib/libbsp/powerpc/shared/clock/p_clock.c +++ b/c/src/lib/libbsp/powerpc/shared/clock/p_clock.c @@ -24,7 +24,6 @@ static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER, (rtems_irq_disable)clockOff, (rtems_irq_is_enabled) clockIsOn}; - int BSP_disconnect_clock_handler (void) { return BSP_remove_rtems_irq_handler (&clockIrqData); diff --git a/c/src/lib/libbsp/powerpc/shared/console/console.c b/c/src/lib/libbsp/powerpc/shared/console/console.c index 2a3a1d6c60..510cd6ede5 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/console.c +++ b/c/src/lib/libbsp/powerpc/shared/console/console.c @@ -75,7 +75,6 @@ static TtySTblRec ttyS[]={ }, }; - /*-------------------------------------------------------------------------+ | Console device driver INITIALIZE entry point. +--------------------------------------------------------------------------+ @@ -157,7 +156,6 @@ static int console_first_open(int major, int minor, void *arg) return 0; } - static int console_last_close(int major, int minor, void *arg) { BSP_uart_remove_isr(minor, ttyS[minor].isr); @@ -219,7 +217,6 @@ console_close(rtems_device_major_number major, return res; } /* console_close */ - /*-------------------------------------------------------------------------+ | Console device driver READ entry point. +--------------------------------------------------------------------------+ @@ -234,7 +231,6 @@ console_read(rtems_device_major_number major, return rtems_termios_read (arg); } /* console_read */ - /*-------------------------------------------------------------------------+ | Console device driver WRITE entry point. +--------------------------------------------------------------------------+ @@ -250,8 +246,6 @@ console_write(rtems_device_major_number major, } /* console_write */ - - /* * Handle ioctl request. */ diff --git a/c/src/lib/libbsp/powerpc/shared/console/consoleIo.h b/c/src/lib/libbsp/powerpc/shared/console/consoleIo.h index 98441d22de..02dcaae386 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/consoleIo.h +++ b/c/src/lib/libbsp/powerpc/shared/console/consoleIo.h @@ -13,7 +13,6 @@ #ifndef __CONSOLE_IO_H #define __CONSOLE_IO_H - typedef enum { CONSOLE_LOG = 1, CONSOLE_SERIAL = 2, @@ -38,5 +37,4 @@ extern int debug_getc(void); extern int debug_tstc(void); int kbdreset(void); - #endif diff --git a/c/src/lib/libbsp/powerpc/shared/console/inch.c b/c/src/lib/libbsp/powerpc/shared/console/inch.c index 4b30a22978..42c3cc7df7 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/inch.c +++ b/c/src/lib/libbsp/powerpc/shared/console/inch.c @@ -209,7 +209,6 @@ void _IBMPC_keyboard_isr() } } /* _IBMPC_keyboard_isr */ - /*-------------------------------------------------------------------------+ | Function: _IBMPC_chrdy | Description: Check keyboard ISR buffer and return character if not empty. @@ -233,7 +232,6 @@ _IBMPC_chrdy(char *c) return FALSE; } /* _IBMPC_chrdy */ - /*-------------------------------------------------------------------------+ | Function: _IBMPC_inch | Description: Poll keyboard until a character is ready and return it. @@ -251,7 +249,6 @@ _IBMPC_inch(void) return c; } /* _IBMPC_inch */ - /* * Routine that can be used before interrupt management is initialized. */ diff --git a/c/src/lib/libbsp/powerpc/shared/console/keyboard.h b/c/src/lib/libbsp/powerpc/shared/console/keyboard.h index 72643617fb..4e7e272d80 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/keyboard.h +++ b/c/src/lib/libbsp/powerpc/shared/console/keyboard.h @@ -308,7 +308,6 @@ #define K_F245 K(KT_FN,254) #define K_UNDO K(KT_FN,255) - #define K_HOLE K(KT_SPEC,0) #define K_ENTER K(KT_SPEC,1) #define K_SH_REGS K(KT_SPEC,2) diff --git a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c index 7172e8d222..9d7985be7f 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c +++ b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c @@ -316,9 +316,6 @@ struct kbdiacr accent_table[MAX_DIACR] = { unsigned int accent_table_size = 68; - - - /* These #defines have been copied from drivers/char/pc_keyb.h, by * Martin Mares (mj@ucw.cz). * converted to offsets by Till Straumann <strauman@slac.stanford.edu> @@ -384,7 +381,6 @@ SPR_RO(PVR) #endif /* USE_KBD_SUPPORT */ - /* Early messages after mm init but before console init are kept in log * buffers. */ @@ -411,7 +407,6 @@ static board_memory_map mem_map = { board_memory_map *ptr_mem_map = &mem_map; - struct _console_global_data { console_log *log; int vacuum_sent; @@ -494,7 +489,6 @@ int vacuum_tstc(void) { #define LSR_TEMT 0x40 /* Xmitter empty */ #define LSR_ERR 0x80 /* Error */ - #ifdef STATIC_LOG_ALLOC static int global_index = 0; @@ -510,7 +504,6 @@ static void pfree(void* p) } #endif - void log_putc(const u_char c) { console_log *l; for(l=console_global_data.log; l; l=l->next) { @@ -544,7 +537,6 @@ void puts(const u_char *s) } } - static void flush_log(void) { console_log *p, *next; @@ -884,7 +876,6 @@ int select_console(ioType t) { /* we use this so that we can do without the ctype library */ #define is_digit(c) ((c) >= '0' && (c) <= '9') - /* provide this for the bootloader only; otherwise * use libcpu implementation */ diff --git a/c/src/lib/libbsp/powerpc/shared/console/uart.c b/c/src/lib/libbsp/powerpc/shared/console/uart.c index 7fb5597873..2532bef720 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/uart.c +++ b/c/src/lib/libbsp/powerpc/shared/console/uart.c @@ -167,7 +167,6 @@ BSP_uart_init(int uart, int baud, int hwFlow) /* 8-bit, no parity , 1 stop */ uwrite(uart, LCR, CHR_8_BITS); - /* Set DTR, RTS and OUT2 high */ uwrite(uart, MCR, DTR | RTS | OUT_2); @@ -374,7 +373,6 @@ BSP_uart_polled_status(int uart) return BSP_UART_STATUS_ERROR; } - /* * Polled mode write function */ @@ -489,7 +487,6 @@ BSP_uart_remove_isr(int uart, rtems_irq_hdl handler) return doit(uart, handler, BSP_remove_rtems_irq_handler); } - /* ================ Termios support =================*/ static volatile int termios_stopped_com[2] = {0,0}; @@ -539,7 +536,6 @@ BSP_uart_termios_write_com(int minor, const char *buf, int len) /* If there TX buffer is busy - something is royally screwed up */ /* assert((uread(BSP_UART_COM1, LSR) & THRE) != 0); */ - if(termios_stopped_com[uart]) { /* CTS low */ diff --git a/c/src/lib/libbsp/powerpc/shared/include/bsp.h b/c/src/lib/libbsp/powerpc/shared/include/bsp.h index fb79919160..c2abd385a5 100644 --- a/c/src/lib/libbsp/powerpc/shared/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/shared/include/bsp.h @@ -52,7 +52,6 @@ #include <bsp/openpic.h> #define BSP_PIC_DO_EOI openpic_eoi(0) - #ifndef ASM #define outport_byte(port,value) outb(value,port) #define outport_word(port,value) outw(value,port) @@ -105,7 +104,6 @@ extern int BSP_connect_clock_handler (void); */ extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet); - /* * TM27 stuff */ @@ -137,7 +135,6 @@ void Install_tm27_vector(void (*_handler)()) asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ } while (0) - #define Clear_tm27_intr() \ do { \ uint32_t _clicks = 0xffffffff; \ @@ -154,7 +151,6 @@ void Install_tm27_vector(void (*_handler)()) } while (0) #endif - #endif #endif diff --git a/c/src/lib/libbsp/powerpc/shared/include/nvram.h b/c/src/lib/libbsp/powerpc/shared/include/nvram.h index 3f6f77988a..a822382e51 100644 --- a/c/src/lib/libbsp/powerpc/shared/include/nvram.h +++ b/c/src/lib/libbsp/powerpc/shared/include/nvram.h @@ -13,7 +13,6 @@ #define NVRAM_AS1 0x75 #define NVRAM_DATA 0x77 - /* RTC Offsets */ #define MOTO_RTC_SECONDS 0x1FF9 diff --git a/c/src/lib/libbsp/powerpc/shared/irq/i8259.c b/c/src/lib/libbsp/powerpc/shared/irq/i8259.c index 806a7eb19b..a5090cd18f 100644 --- a/c/src/lib/libbsp/powerpc/shared/irq/i8259.c +++ b/c/src/lib/libbsp/powerpc/shared/irq/i8259.c @@ -107,7 +107,6 @@ int BSP_irq_enabled_at_i8259s (const rtems_irq_symbolic_name irqLine) return (~(i8259s_cache & mask)); } - /*-------------------------------------------------------------------------+ | Function: BSP_irq_ack_at_i8259s | Description: Signal generic End Of Interrupt (EOI) to appropriate PIC. diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq.c b/c/src/lib/libbsp/powerpc/shared/irq/irq.c index 356c7921f9..7cdd46b13f 100644 --- a/c/src/lib/libbsp/powerpc/shared/irq/irq.c +++ b/c/src/lib/libbsp/powerpc/shared/irq/irq.c @@ -76,7 +76,6 @@ static inline int is_processor_irq(const rtems_irq_symbolic_name irqLine) ); } - /* * ------------------------ RTEMS Irq helper functions ---------------- */ @@ -118,7 +117,6 @@ static int isValidInterrupt(int irq) return 1; } - /* * ------------------------ RTEMS Shared Irq Handler Mngt Routines ---------------- */ @@ -153,7 +151,6 @@ int BSP_install_rtems_shared_irq_handler (const rtems_irq_connect_data* irq) /* link chain to new topmost handler */ rtems_hdl_tbl[irq->name].next_handler = (void *)vchain; - if (is_isa_irq(irq->name)) { /* * Enable interrupt at PIC level @@ -183,7 +180,6 @@ int BSP_install_rtems_shared_irq_handler (const rtems_irq_connect_data* irq) return 1; } - /* * ------------------------ RTEMS Single Irq Handler Mngt Routines ---------------- */ @@ -245,7 +241,6 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq) return 1; } - int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* irq) { unsigned int level; @@ -517,7 +512,6 @@ void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum) register unsigned msr; register unsigned new_msr; - if (excNum == ASM_DEC_VECTOR) { _CPU_MSR_GET(msr); new_msr = msr | MSR_EE; @@ -566,7 +560,6 @@ void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum) } } - _CPU_MSR_SET(msr); if (isaIntr) { @@ -586,8 +579,6 @@ void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum) } } - - void _ThreadProcessSignalsFromIrq (BSP_Exception_frame* ctx) { /* diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq.h b/c/src/lib/libbsp/powerpc/shared/irq/irq.h index f2457d36e5..c9b38606a2 100644 --- a/c/src/lib/libbsp/powerpc/shared/irq/irq.h +++ b/c/src/lib/libbsp/powerpc/shared/irq/irq.h @@ -21,7 +21,6 @@ #ifndef LIBBSP_POWERPC_MCP750_IRQ_IRQ_H #define LIBBSP_POWERPC_MCP750_IRQ_IRQ_H - /* * 8259 edge/level control definitions at VIA */ @@ -63,7 +62,6 @@ extern "C" { #endif - /* * Symblolic IRQ names and related definitions. */ @@ -128,9 +126,6 @@ typedef enum { }rtems_irq_symbolic_name; - - - /* * Type definition for RTEMS managed interrupts */ @@ -213,9 +208,6 @@ typedef struct { rtems_irq_prio* irqPrioTbl; }rtems_irq_global_settings; - - - /*-------------------------------------------------------------------------+ | Function Prototypes. +--------------------------------------------------------------------------*/ diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S b/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S index 7eb018d606..dbdfc964c8 100644 --- a/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S +++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S @@ -21,7 +21,6 @@ #include <bsp/vectors.h> #include <libcpu/raw_exception.h> - #define SYNC \ sync; \ isync diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c index f30cfc5d2d..c196228776 100644 --- a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c +++ b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c @@ -12,13 +12,11 @@ * $Id$ */ - #include <bsp/motorola.h> #include <rtems/bspIo.h> #include <libcpu/io.h> #include <string.h> - /* ** Board-specific table that maps interrupt names to onboard pci ** peripherals as well as local pci busses. This table is used at @@ -67,8 +65,6 @@ #define NULL_PINMAP {-1,{-1,-1,-1,-1}} #define NULL_INTMAP {-1,-1,-1,{}} - - static struct _int_map mcp750_intmap[] = { { 0, 16, 0, {{1, {5, 19,-1,-1}}, /* pmc slot */ @@ -85,9 +81,6 @@ static struct _int_map mcp750_intmap[] = { NULL_INTMAP }; - - - static struct _int_map mtx603_intmap[] = { {0, 14, 0, {{1, {10,16,-1,-1}}, /* onboard ethernet */ @@ -116,13 +109,6 @@ static struct _int_map mtx603_intmap[] = { NULL_INTMAP }; - - - - - - - /* * This table represents the standard PCI swizzle defined in the * PCI bus specification. Table taken from Linux 2.4.18, prep_pci.c, @@ -141,14 +127,6 @@ static int prep_pci_swizzle(int slot, int pin) return prep_pci_intpins[ slot % 4 ][ pin-1 ]; } - - - - - - - - typedef struct { /* * 0x100 mask assumes for Raven and Hawk boards @@ -163,7 +141,6 @@ typedef struct { int (*swizzler)(int, int); } mot_info_t; - static const mot_info_t mot_boards[] = { {0x300, 0x00, "MVME 2400", NULL, NULL}, {0x010, 0x00, "Genesis", NULL, NULL}, @@ -188,8 +165,6 @@ static const mot_info_t mot_boards[] = { {0x000, 0x00, ""} }; - - prep_t currentPrepType; motorolaBoard currentBoard; prep_t checkPrepBoardType(RESIDUAL *res) @@ -250,21 +225,18 @@ motorolaBoard getMotorolaBoard() return currentBoard; } - const char* motorolaBoardToString(motorolaBoard board) { if (board == MOTOROLA_UNKNOWN) return "Unknown motorola board"; return (mot_boards[board].name); } - const struct _int_map *motorolaIntMap(motorolaBoard board) { if (board == MOTOROLA_UNKNOWN) return NULL; return mot_boards[board].intmap; } - const void *motorolaIntSwizzle(motorolaBoard board) { if (board == MOTOROLA_UNKNOWN) return NULL; diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h index 11d3fff4c4..f690f9ea24 100644 --- a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h +++ b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h @@ -18,13 +18,6 @@ #include <bsp/residual.h> #include <bsp/pci.h> - - - - - - - typedef enum { PREP_IBM = 0, PREP_Radstone = 1, @@ -72,5 +65,4 @@ extern const char* motorolaBoardToString(motorolaBoard); extern const struct _int_map *motorolaIntMap(motorolaBoard board); extern const void *motorolaIntSwizzle(motorolaBoard board); - #endif /* LIBBSP_POWERPC_SHARED_MOTOROLA_MOTOROLA_H */ diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c index 0a619ba1c2..b7aa4777ce 100644 --- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c +++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c @@ -34,13 +34,11 @@ #define REGISTER_DEBUG #undef REGISTER_DEBUG - volatile struct OpenPIC *OpenPIC = NULL; static unsigned int NumProcessors; static unsigned int NumSources; - /* * Accesses to the current processor's registers */ @@ -48,7 +46,6 @@ static unsigned int NumSources; #define THIS_CPU Processor[cpu] #define CHECK_THIS_CPU check_arg_cpu(cpu) - /* * Sanity checks */ @@ -84,8 +81,6 @@ static unsigned int NumSources; #define check_arg_cpu(cpu) do {} while (0) #endif - - /* * I/O functions */ @@ -109,7 +104,6 @@ static inline void openpic_write(volatile unsigned int *addr, unsigned int val) out_le32(addr, val); } - static inline unsigned int openpic_readfield(volatile unsigned int *addr, unsigned int mask) { unsigned int val = openpic_read(addr); @@ -133,7 +127,6 @@ static inline void openpic_setfield(volatile unsigned int *addr, unsigned int ma openpic_writefield(addr, mask, mask); } - /* * Update a Vector/Priority register in a safe manner. The interrupt will * be disabled. @@ -148,10 +141,8 @@ static void openpic_safe_writefield(volatile unsigned int *addr, unsigned int ma openpic_writefield(addr, mask | OPENPIC_MASK, field | OPENPIC_MASK); } - /* -------- Global Operations ---------------------------------------------- */ - /* * Initialize the OpenPIC * @@ -272,7 +263,6 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses } } - /* * Reset the OpenPIC */ @@ -283,7 +273,6 @@ void openpic_reset(void) OPENPIC_CONFIG_RESET); } - /* * Enable/disable 8259 Pass Through Mode */ @@ -300,7 +289,6 @@ void openpic_disable_8259_pass_through(void) OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE); } - /* * Find out the current interrupt */ @@ -315,7 +303,6 @@ unsigned int openpic_irq(unsigned int cpu) return vec; } - /* * Signal end of interrupt (EOI) processing */ @@ -326,7 +313,6 @@ void openpic_eoi(unsigned int cpu) openpic_write(&OpenPIC->THIS_CPU.EOI, 0); } - /* * Get/set the current task priority */ @@ -363,7 +349,6 @@ void openpic_set_spurious(unsigned int vec) vec); } - /* * Initialize one or more CPUs */ @@ -373,10 +358,8 @@ void openpic_init_processor(unsigned int cpumask) openpic_write(&OpenPIC->Global.Processor_Initialization, cpumask); } - /* -------- Interprocessor Interrupts -------------------------------------- */ - /* * Initialize an interprocessor interrupt (and disable it) * @@ -395,7 +378,6 @@ void openpic_initipi(unsigned int ipi, unsigned int pri, unsigned int vec) (pri << OPENPIC_PRIORITY_SHIFT) | vec); } - /* * Send an IPI to one or more CPUs */ @@ -407,10 +389,8 @@ void openpic_cause_IPI(unsigned int cpu, unsigned int ipi, unsigned int cpumask) openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), cpumask); } - /* -------- Timer Interrupts ----------------------------------------------- */ - /* * Initialize a timer interrupt (and disable it) * @@ -429,7 +409,6 @@ void openpic_inittimer(unsigned int timer, unsigned int pri, unsigned int vec) (pri << OPENPIC_PRIORITY_SHIFT) | vec); } - /* * Map a timer interrupt to one or more CPUs */ @@ -440,10 +419,8 @@ void openpic_maptimer(unsigned int timer, unsigned int cpumask) openpic_write(&OpenPIC->Global.Timer[timer].Destination, cpumask); } - /* -------- Interrupt Sources ---------------------------------------------- */ - /* * Enable/disable an interrupt source */ @@ -466,7 +443,6 @@ unsigned long flags; rtems_interrupt_enable(flags); } - /* * Initialize an interrupt source (and disable it!) * @@ -490,7 +466,6 @@ void openpic_initirq(unsigned int irq, unsigned int pri, unsigned int vec, int p (sense ? OPENPIC_SENSE_LEVEL : 0)); } - /* * Map an interrupt source to one or more CPUs */ diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h index e6b83138db..776b5ec723 100644 --- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h +++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h @@ -37,7 +37,6 @@ #ifndef _RTEMS_OPENPIC_H #define _RTEMS_OPENPIC_H - /* * OpenPIC supports up to 2048 interrupt sources and up to 32 processors */ @@ -50,7 +49,6 @@ #define OPENPIC_NUM_PRI 16 #define OPENPIC_NUM_VECTORS 256 - /* * Vector numbers */ @@ -60,7 +58,6 @@ #define OPENPIC_VEC_IPI 0x50 /* and up */ #define OPENPIC_VEC_SPURIOUS 99 - /* * OpenPIC Registers are 32 bits and aligned on 128 bit boundaries */ @@ -70,7 +67,6 @@ typedef struct _OpenPIC_Reg { char Pad[0xc]; } OpenPIC_Reg; - /* * Per Processor Registers */ @@ -103,7 +99,6 @@ typedef struct _OpenPIC_Processor { char Pad5[0xf40]; } OpenPIC_Processor; - /* * Timer Registers */ @@ -115,7 +110,6 @@ typedef struct _OpenPIC_Timer { OpenPIC_Reg _Destination; /* Read/Write */ } OpenPIC_Timer; - /* * Global Registers */ @@ -159,7 +153,6 @@ typedef struct _OpenPIC_Global { char Pad1[0xee00]; } OpenPIC_Global; - /* * Interrupt Source Registers */ @@ -169,7 +162,6 @@ typedef struct _OpenPIC_Source { OpenPIC_Reg _Destination; /* Read/Write */ } OpenPIC_Source; - /* * OpenPIC Register Map */ @@ -192,7 +184,6 @@ struct OpenPIC { extern volatile struct OpenPIC *OpenPIC; - /* * Current Task Priority Register */ @@ -243,7 +234,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_PRIORITY_SHIFT 16 #define OPENPIC_VECTOR_MASK 0x000000ff - /* * Interrupt Source Registers */ @@ -251,7 +241,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_SENSE_POLARITY 0x00800000 /* Undoc'd */ #define OPENPIC_SENSE_LEVEL 0x00400000 - /* * Timer Registers */ @@ -260,7 +249,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_TIMER_TOGGLE 0x80000000 #define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000 - /* * Aliases to make life simpler */ @@ -293,7 +281,6 @@ extern volatile struct OpenPIC *OpenPIC; #define Vector_Priority _Vector_Priority.Reg #define Destination _Destination.Reg - /* * Vendor and Device IDs */ @@ -301,7 +288,6 @@ extern volatile struct OpenPIC *OpenPIC; #define OPENPIC_VENDOR_ID_APPLE 0x14 #define OPENPIC_DEVICE_ID_APPLE_HYDRA 0x46 - /* * OpenPIC Operations */ diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.c b/c/src/lib/libbsp/powerpc/shared/pci/pci.c index ba5a97d44d..b822100f3d 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/pci.c +++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.c @@ -216,22 +216,9 @@ const pci_config_access_functions pci_direct_functions = { direct_pci_write_config_dword }; - - - - - - - - - - - - #define PRINT_MSG() \ printk("pci : Device %d:%02x routed to interrupt_line %d\n", pbus, pslot, int_name ) - /* ** Validate a test interrupt name and print a warning if its not one of ** the names defined in the routing record. @@ -269,16 +256,11 @@ static int test_intname( return 0; } - - - - struct pcibridge { int bus,slot; }; - static int FindPCIbridge( int mybus, struct pcibridge *pb ) { int pbus, pslot; @@ -321,19 +303,11 @@ static int FindPCIbridge( int mybus, struct pcibridge *pb ) #endif } - } } return -1; } - - - - - - - void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) { unsigned char cvalue; @@ -406,7 +380,6 @@ void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) } } - if( !ismatch ) { /* @@ -444,7 +417,6 @@ void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) */ if( tbus ) int_pin = (*swizzler)(tslot,int_pin); - /* ** int_pin points to the interrupt channel ** this card ends up delivering interrupts @@ -476,7 +448,6 @@ void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) } } - if( !ismatch ) { struct pcibridge pb; @@ -511,27 +482,16 @@ void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) ) } donesearch: - if( !ismatch && int_pin != 0 && int_name == 255 ) { printk("pci : Unable to match device %d:%d with an int routing table entry\n", pbus, pslot ); } - } } } } - - - - - - - - - /* * This routine determines the maximum bus number in the system */ diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.h b/c/src/lib/libbsp/powerpc/shared/pci/pci.h index 4ce74f7307..3385dac78e 100644 --- a/c/src/lib/libbsp/powerpc/shared/pci/pci.h +++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.h @@ -1153,7 +1153,6 @@ pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char func extern unsigned char BusCountPCI(); extern void InitializePCI(); - struct _pin_routes { int pin, int_name[4]; @@ -1166,7 +1165,6 @@ struct _int_map void FixupPCI( const struct _int_map *, int (*swizzler)(int,int) ); - /* scan for a specific device */ /* find a particular PCI device * (currently, only bus0 is scanned for device/fun0) diff --git a/c/src/lib/libbsp/powerpc/shared/residual/residual.c b/c/src/lib/libbsp/powerpc/shared/residual/residual.c index 7d5b1a4aa8..4d5ce41640 100644 --- a/c/src/lib/libbsp/powerpc/shared/residual/residual.c +++ b/c/src/lib/libbsp/powerpc/shared/residual/residual.c @@ -19,7 +19,6 @@ #include <libcpu/io.h> #include <libcpu/byteorder.h> - static int same_DevID(unsigned short vendor, unsigned short Number, char * str) diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S index 8c90a442f0..cf88c54903 100644 --- a/c/src/lib/libbsp/powerpc/shared/start/start.S +++ b/c/src/lib/libbsp/powerpc/shared/start/start.S @@ -28,7 +28,6 @@ li r10,0x63 ; \ sc - .text .globl __rtems_entry_point .type __rtems_entry_point,@function @@ -146,7 +145,6 @@ MMUoff: .globl _return_to_ppcbug .type _return_to_ppcbug,@function - _return_to_ppcbug: mflr r30 bl MMUoff @@ -198,5 +196,4 @@ flush_tlbs: sync blr - .comm environ,4,4 diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c index 82ade603ef..319a37b15b 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c @@ -149,7 +149,6 @@ void bsp_pretasking_hook(void) bsp_libc_init((void *) 0, heap_size, heap_sbrk_spared); - #ifdef RTEMS_DEBUG rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); #endif @@ -319,7 +318,6 @@ void bsp_start( void ) printk("pci : Interrupt routing not available for this bsp\n"); } - #ifdef SHOW_MORE_INIT_SETTINGS printk("Number of PCI buses found is : %d\n", BusCountPCI()); #endif @@ -336,7 +334,6 @@ void bsp_start( void ) __asm__ __volatile ("sc"); #endif - BSP_mem_size = residualCopy.TotalMemory; BSP_bus_frequency = residualCopy.VitalProductData.ProcessorBusHz; BSP_processor_frequency = residualCopy.VitalProductData.ProcessorHz; @@ -348,7 +345,6 @@ void bsp_start( void ) */ _BSP_clear_hostbridge_errors(0 /* enableMCP */, 0/*quiet*/); - /* Allocate and set up the page table mappings * This is only available on >604 CPUs. * @@ -401,7 +397,6 @@ void bsp_start( void ) */ BSP_rtems_irq_mng_init(0); - /* Activate the page table mappings only after * initializing interrupts because the irq_mng_init() * routine needs to modify the text diff --git a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c index 7f957bfc48..67cfe3ad9d 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c @@ -6,7 +6,6 @@ #include <rtems/bspIo.h> #include <libcpu/pte121.h> - /* Default setup of the page tables. This is a weak * alias, so applications may easily override this * default setup. @@ -24,7 +23,6 @@ Triv121PgTbl BSP_pgtbl_setup(unsigned long) __attribute__ (( weak, alias("__BSP_default_pgtbl_setup") )); - Triv121PgTbl __BSP_default_pgtbl_setup(unsigned int *pmemsize) { diff --git a/c/src/lib/libbsp/powerpc/shared/vectors/vectors.S b/c/src/lib/libbsp/powerpc/shared/vectors/vectors.S index 55f990ec33..8d5c76521d 100644 --- a/c/src/lib/libbsp/powerpc/shared/vectors/vectors.S +++ b/c/src/lib/libbsp/powerpc/shared/vectors/vectors.S @@ -8,13 +8,10 @@ * $Id$ */ - - #include <rtems/asm.h> #include <rtems/score/cpu.h> #include <bsp/vectors.h> - #define SYNC \ sync; \ isync diff --git a/c/src/lib/libbsp/powerpc/shared/vectors/vectors.h b/c/src/lib/libbsp/powerpc/shared/vectors/vectors.h index 976af3d7f4..4e5ce04d41 100644 --- a/c/src/lib/libbsp/powerpc/shared/vectors/vectors.h +++ b/c/src/lib/libbsp/powerpc/shared/vectors/vectors.h @@ -135,7 +135,6 @@ typedef struct { unsigned EXC_DAR; }BSP_Exception_frame; - typedef void (*exception_handler_t) (BSP_Exception_frame* excPtr); extern exception_handler_t globalExceptHdl; /* |