forked from Imagelibrary/rtems
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>
|
2003-03-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* vmeUniverse/vmeUniverse.c: Remove CVS-Log (skrews up on
|
* 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)
|
#define UNIV_REV(base) (READ_LE(base,2*sizeof(LERegister)) & 0xff)
|
||||||
|
|
||||||
#ifdef __rtems__
|
#if defined(__rtems__) && 0
|
||||||
static int
|
static int
|
||||||
uprintk(char *fmt, va_list ap)
|
uprintk(char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
@@ -200,11 +200,10 @@ char buf[200];
|
|||||||
|
|
||||||
|
|
||||||
/* private printing wrapper */
|
/* private printing wrapper */
|
||||||
static int
|
static void
|
||||||
uprintf(FILE *f, char *fmt, ...)
|
uprintf(FILE *f, char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int rval;
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifdef __rtems__
|
#ifdef __rtems__
|
||||||
if (!f || !_impure_ptr->__sdidinit) {
|
if (!f || !_impure_ptr->__sdidinit) {
|
||||||
@@ -213,14 +212,13 @@ int rval;
|
|||||||
* There is no vprintk, hence we must assemble
|
* There is no vprintk, hence we must assemble
|
||||||
* to a buffer.
|
* to a buffer.
|
||||||
*/
|
*/
|
||||||
rval=uprintk(fmt,ap);
|
vprintk(fmt,ap);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
rval=vfprintf(f,fmt,ap);
|
vfprintf(f,fmt,ap);
|
||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return rval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -336,7 +334,7 @@ cfgUniversePort(
|
|||||||
unsigned long length)
|
unsigned long length)
|
||||||
{
|
{
|
||||||
#define base vmeUniverse0BaseAddr
|
#define base vmeUniverse0BaseAddr
|
||||||
volatile LERegister *preg=base;
|
volatile LERegister *preg;
|
||||||
unsigned long p=port;
|
unsigned long p=port;
|
||||||
unsigned long mode=0;
|
unsigned long mode=0;
|
||||||
|
|
||||||
@@ -372,6 +370,8 @@ unsigned long mode=0;
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preg=base;
|
||||||
|
|
||||||
/* find out if we have a rev. II chip */
|
/* find out if we have a rev. II chip */
|
||||||
if ( UNIV_REV(base) < 2 ) {
|
if ( UNIV_REV(base) < 2 ) {
|
||||||
if (port>3) {
|
if (port>3) {
|
||||||
@@ -502,10 +502,10 @@ showUniversePort(
|
|||||||
offst+=start; /* calc start on the other bus */
|
offst+=start; /* calc start on the other bus */
|
||||||
|
|
||||||
if (ismaster) {
|
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);
|
portno,offst,bound-start,start);
|
||||||
} else {
|
} else {
|
||||||
uprintf(f,"%i: 0x%08lx 0x%08lx 0x%08lx ",
|
uprintf(f,"%d: 0x%08lx 0x%08lx 0x%08lx ",
|
||||||
portno,start,bound-start,offst);
|
portno,start,bound-start,offst);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +754,7 @@ int rval;
|
|||||||
if ((rval=vmeUniverseFindPciBase(0,&vmeUniverse0BaseAddr))) {
|
if ((rval=vmeUniverseFindPciBase(0,&vmeUniverse0BaseAddr))) {
|
||||||
uprintf(stderr,"unable to find the universe in pci config space\n");
|
uprintf(stderr,"unable to find the universe in pci config space\n");
|
||||||
} else {
|
} 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);
|
(unsigned int)vmeUniverse0BaseAddr, vmeUniverse0PciIrqLine);
|
||||||
}
|
}
|
||||||
return rval;
|
return rval;
|
||||||
@@ -1073,7 +1073,7 @@ rtems_irq_connect_data aarrggh;
|
|||||||
if (specialOut >=0 && specialIrqPicLine < 0) return -3;
|
if (specialOut >=0 && specialIrqPicLine < 0) return -3;
|
||||||
/* give them a chance to override buggy PCI info */
|
/* give them a chance to override buggy PCI info */
|
||||||
if (vmeIrqPicLine >= 0) {
|
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);
|
vmeIrqPicLine);
|
||||||
vmeUniverse0PciIrqLine=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 */
|
/* NOTE: DMA packet descriptors MUST be 32 byte aligned */
|
||||||
typedef struct VmeUniverseDMAPacketRec_ {
|
typedef struct VmeUniverseDMAPacketRec_ {
|
||||||
LERegister dctl __attribute__((aligned(32)));
|
LERegister dctl __attribute__((aligned(32)));
|
||||||
LERegister dtbc;
|
LERegister dtbc __attribute__((packed));
|
||||||
LERegister dla;
|
LERegister dla __attribute__((packed));
|
||||||
LERegister dummy1;
|
LERegister dummy1 __attribute__((packed));
|
||||||
LERegister dva;
|
LERegister dva __attribute__((packed));
|
||||||
LERegister dummy2;
|
LERegister dummy2 __attribute__((packed));
|
||||||
LERegister dccp;
|
LERegister dcpp __attribute__((packed));
|
||||||
LERegister dummy3;
|
LERegister dummy3 __attribute__((packed));
|
||||||
} VmeUniverseDMAPacketRec, *VmeUniverseDMAPacket;
|
} VmeUniverseDMAPacketRec, *VmeUniverseDMAPacket;
|
||||||
|
|
||||||
/* PCI CSR register */
|
/* PCI CSR register */
|
||||||
@@ -149,8 +149,8 @@ typedef struct VmeUniverseDMAPacketRec_ {
|
|||||||
*/
|
*/
|
||||||
#define UNIV_REGOFF_DCPP 0x218
|
#define UNIV_REGOFF_DCPP 0x218
|
||||||
/* these bits are only used in linked lists */
|
/* these bits are only used in linked lists */
|
||||||
# define UNIV_DCCP_IMG_NULL (1<<0) /* last packet in list */
|
# define UNIV_DCPP_IMG_NULL (1<<0) /* last packet in list */
|
||||||
# define UNIV_DCCP_IMG_PROCESSED (1<<1) /* packet processed */
|
# define UNIV_DCPP_IMG_PROCESSED (1<<1) /* packet processed */
|
||||||
|
|
||||||
/* DMA Xfer General Control/Status register */
|
/* DMA Xfer General Control/Status register */
|
||||||
#define UNIV_REGOFF_DGCS 0x220
|
#define UNIV_REGOFF_DGCS 0x220
|
||||||
|
|||||||
Reference in New Issue
Block a user