VME device write

Feng, Shuchen feng at bnl.gov
Thu Feb 27 20:32:40 UTC 2003


Till Straumann wrote :

> Why/what did you have to modify vmeUniverse.c? That shouldn't
> be necessary. Unless you found a bug and then I'd ask you
> kindly to contribute your fix.

The following is the result of running 
"diff vmeUniverse.c.kate vmeUniverse.c.org":



106,107d105
< #define __rtems                 /* skf  2/05/03 */
< 
425a424
> volatile LERegister *preg=base;
470d468
< 	volatile LERegister *preg=base; /* skf : should be placed after
vmeUniverseInit() */
472d469
< 	{
555d551
< 	}
737,740c733
<         if (ismaster) 
< 	   *paOut = PCI_TO_LOCAL_ADDR(l.address);  /* skf 2/24/03 */
<         else
< 	  *paOut = l.address;        /* TODO ? */
---
> 	*paOut = l.address;

The "#define __rtems" facilitates the usage of the "VPATH magic"
                                  
The real bug is that "volatile LERegister *preg=base;" of 
cfgUniversePort() routine should be placed after vmeUniverseInit(),
where vmeUniverse0baseAddr found instead of at the beginning of the
routine before the vmeUniverseInit().  You probably 
ran vmeUniverseInit() prior to running the cfgUniversePort() in your
application.


The "*paOut = PCI_TO_LOCAL_ADDR(l.address);" is my attempt to port the 
"vmeUniverseBusToLocalAdrs" command to be compactable with the vxWorks
"sysBusToLocalAdrs" one.


Cheers,
Kate

725D, NSLS
BNL, Upton, NY 11973

feng1 at bnl.gov





More information about the users mailing list