mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2003-04-10 Till Straumann <strauman@slac.stanford.edu>
PR 380/bsps * vmeUniverse/vmeUniverse.c, vmeUniverse/vmeUniverse.h: make printk format strings compliant with libcpu/printk. minor fixes and lazy init bugfix.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2003-04-10 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 380/bsps
|
||||
* vmeUniverse/vmeUniverse.c, vmeUniverse/vmeUniverse.h:
|
||||
make printk format strings compliant with libcpu/printk.
|
||||
minor fixes and lazy init bugfix.
|
||||
|
||||
2003-03-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* vmeUniverse/vmeUniverse.c: Remove CVS-Log (skrews up on
|
||||
|
||||
@@ -179,7 +179,7 @@ return READ_LE0((volatile LERegister *)(((unsigned long)adrs)+off));
|
||||
|
||||
#define UNIV_REV(base) (READ_LE(base,2*sizeof(LERegister)) & 0xff)
|
||||
|
||||
#ifdef __rtems__
|
||||
#if defined(__rtems__) && 0
|
||||
static int
|
||||
uprintk(char *fmt, va_list ap)
|
||||
{
|
||||
@@ -200,11 +200,10 @@ char buf[200];
|
||||
|
||||
|
||||
/* private printing wrapper */
|
||||
static int
|
||||
static void
|
||||
uprintf(FILE *f, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int rval;
|
||||
va_start(ap, fmt);
|
||||
#ifdef __rtems__
|
||||
if (!f || !_impure_ptr->__sdidinit) {
|
||||
@@ -213,14 +212,13 @@ int rval;
|
||||
* There is no vprintk, hence we must assemble
|
||||
* to a buffer.
|
||||
*/
|
||||
rval=uprintk(fmt,ap);
|
||||
vprintk(fmt,ap);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
rval=vfprintf(f,fmt,ap);
|
||||
vfprintf(f,fmt,ap);
|
||||
}
|
||||
va_end(ap);
|
||||
return rval;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -336,7 +334,7 @@ cfgUniversePort(
|
||||
unsigned long length)
|
||||
{
|
||||
#define base vmeUniverse0BaseAddr
|
||||
volatile LERegister *preg=base;
|
||||
volatile LERegister *preg;
|
||||
unsigned long p=port;
|
||||
unsigned long mode=0;
|
||||
|
||||
@@ -372,6 +370,8 @@ unsigned long mode=0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
preg=base;
|
||||
|
||||
/* find out if we have a rev. II chip */
|
||||
if ( UNIV_REV(base) < 2 ) {
|
||||
if (port>3) {
|
||||
@@ -502,10 +502,10 @@ showUniversePort(
|
||||
offst+=start; /* calc start on the other bus */
|
||||
|
||||
if (ismaster) {
|
||||
uprintf(f,"%i: 0x%08lx 0x%08lx 0x%08lx ",
|
||||
uprintf(f,"%d: 0x%08lx 0x%08lx 0x%08lx ",
|
||||
portno,offst,bound-start,start);
|
||||
} else {
|
||||
uprintf(f,"%i: 0x%08lx 0x%08lx 0x%08lx ",
|
||||
uprintf(f,"%d: 0x%08lx 0x%08lx 0x%08lx ",
|
||||
portno,start,bound-start,offst);
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ int rval;
|
||||
if ((rval=vmeUniverseFindPciBase(0,&vmeUniverse0BaseAddr))) {
|
||||
uprintf(stderr,"unable to find the universe in pci config space\n");
|
||||
} else {
|
||||
uprintf(stderr,"Universe II PCI-VME bridge detected at 0x%08x, IRQ %i\n",
|
||||
uprintf(stderr,"Universe II PCI-VME bridge detected at 0x%08x, IRQ %d\n",
|
||||
(unsigned int)vmeUniverse0BaseAddr, vmeUniverse0PciIrqLine);
|
||||
}
|
||||
return rval;
|
||||
@@ -1073,7 +1073,7 @@ rtems_irq_connect_data aarrggh;
|
||||
if (specialOut >=0 && specialIrqPicLine < 0) return -3;
|
||||
/* give them a chance to override buggy PCI info */
|
||||
if (vmeIrqPicLine >= 0) {
|
||||
uprintf(stderr,"Overriding main IRQ line PCI info with %i\n",
|
||||
uprintf(stderr,"Overriding main IRQ line PCI info with %d\n",
|
||||
vmeIrqPicLine);
|
||||
vmeUniverse0PciIrqLine=vmeIrqPicLine;
|
||||
}
|
||||
|
||||
@@ -39,14 +39,14 @@ typedef unsigned long LERegister; /* emphasize contents are little endian */
|
||||
|
||||
/* NOTE: DMA packet descriptors MUST be 32 byte aligned */
|
||||
typedef struct VmeUniverseDMAPacketRec_ {
|
||||
LERegister dctl __attribute__((aligned(32)));
|
||||
LERegister dtbc;
|
||||
LERegister dla;
|
||||
LERegister dummy1;
|
||||
LERegister dva;
|
||||
LERegister dummy2;
|
||||
LERegister dccp;
|
||||
LERegister dummy3;
|
||||
LERegister dctl __attribute__((aligned(32)));
|
||||
LERegister dtbc __attribute__((packed));
|
||||
LERegister dla __attribute__((packed));
|
||||
LERegister dummy1 __attribute__((packed));
|
||||
LERegister dva __attribute__((packed));
|
||||
LERegister dummy2 __attribute__((packed));
|
||||
LERegister dcpp __attribute__((packed));
|
||||
LERegister dummy3 __attribute__((packed));
|
||||
} VmeUniverseDMAPacketRec, *VmeUniverseDMAPacket;
|
||||
|
||||
/* PCI CSR register */
|
||||
@@ -149,8 +149,8 @@ typedef struct VmeUniverseDMAPacketRec_ {
|
||||
*/
|
||||
#define UNIV_REGOFF_DCPP 0x218
|
||||
/* these bits are only used in linked lists */
|
||||
# define UNIV_DCCP_IMG_NULL (1<<0) /* last packet in list */
|
||||
# define UNIV_DCCP_IMG_PROCESSED (1<<1) /* packet processed */
|
||||
# define UNIV_DCPP_IMG_NULL (1<<0) /* last packet in list */
|
||||
# define UNIV_DCPP_IMG_PROCESSED (1<<1) /* packet processed */
|
||||
|
||||
/* DMA Xfer General Control/Status register */
|
||||
#define UNIV_REGOFF_DGCS 0x220
|
||||
|
||||
Reference in New Issue
Block a user