forked from Imagelibrary/rtems
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* shared/vme/vme_universe.c: must set DMA ops pointer during init.
This commit is contained in:
@@ -133,7 +133,7 @@ static VMEOpsRec uniOpsRec = {
|
|||||||
|
|
||||||
static int uniVecs[] = { UNIV_DMA_INT_VEC };
|
static int uniVecs[] = { UNIV_DMA_INT_VEC };
|
||||||
|
|
||||||
static DmaOpsRec uniDmaOps = {
|
static DmaOpsRec uniDmaOpsRec = {
|
||||||
setup: vmeUniverseDmaSetup,
|
setup: vmeUniverseDmaSetup,
|
||||||
start: vmeUniverseDmaStart,
|
start: vmeUniverseDmaStart,
|
||||||
status: vmeUniverseDmaStatus,
|
status: vmeUniverseDmaStatus,
|
||||||
@@ -164,7 +164,7 @@ static int tsiVecs[] = {
|
|||||||
TSI_DMA1_INT_VEC,
|
TSI_DMA1_INT_VEC,
|
||||||
};
|
};
|
||||||
|
|
||||||
static DmaOpsRec tsiDmaOps = {
|
static DmaOpsRec tsiDmaOpsRec = {
|
||||||
setup: vmeTsi148DmaSetup,
|
setup: vmeTsi148DmaSetup,
|
||||||
start: vmeTsi148DmaStart,
|
start: vmeTsi148DmaStart,
|
||||||
status: vmeTsi148DmaStatus,
|
status: vmeTsi148DmaStatus,
|
||||||
@@ -284,10 +284,11 @@ BSP_VMEDmaListDescriptorSetup(
|
|||||||
uint32_t n_bytes)
|
uint32_t n_bytes)
|
||||||
{
|
{
|
||||||
VMEDmaListClass pc;
|
VMEDmaListClass pc;
|
||||||
|
|
||||||
if ( !d ) {
|
if ( !d ) {
|
||||||
if ( ! (pc = theDmaOps->listClass) ) {
|
|
||||||
pc = (theDmaOps = selectOps())->listClass;
|
pc = theDmaOps->listClass;
|
||||||
}
|
|
||||||
return BSP_VMEDmaListDescriptorNewTool(
|
return BSP_VMEDmaListDescriptorNewTool(
|
||||||
pc,
|
pc,
|
||||||
attr_mask,
|
attr_mask,
|
||||||
@@ -297,6 +298,7 @@ VMEDmaListClass pc;
|
|||||||
n_bytes);
|
n_bytes);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BSP_VMEDmaListDescriptorSetupTool(d, attr_mask, xfer_mode, pci_addr, vme_addr, n_bytes);
|
return BSP_VMEDmaListDescriptorSetupTool(d, attr_mask, xfer_mode, pci_addr, vme_addr, n_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,7 +368,8 @@ int BSP_VMEInit()
|
|||||||
{
|
{
|
||||||
#if defined(_VME_DRIVER_UNIVERSE)
|
#if defined(_VME_DRIVER_UNIVERSE)
|
||||||
if ( 0 == vmeUniverseInit() ) {
|
if ( 0 == vmeUniverseInit() ) {
|
||||||
theOps = &uniOpsRec;
|
theOps = &uniOpsRec;
|
||||||
|
theDmaOps = &uniDmaOpsRec;
|
||||||
vmeUniverseReset();
|
vmeUniverseReset();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -375,8 +378,9 @@ int BSP_VMEInit()
|
|||||||
#endif
|
#endif
|
||||||
#if defined(_VME_DRIVER_TSI148)
|
#if defined(_VME_DRIVER_TSI148)
|
||||||
if ( 0 == vmeUniverseInit() ) {
|
if ( 0 == vmeUniverseInit() ) {
|
||||||
theOps = &tsiOpsRec;
|
theOps = &tsiOpsRec;
|
||||||
vmeUniverseReset();
|
theDmaOps = &tsiDmaOpsRec;
|
||||||
|
vmeTsi148Reset();
|
||||||
#ifdef VME_CLEAR_BRIDGE_ERRORS
|
#ifdef VME_CLEAR_BRIDGE_ERRORS
|
||||||
{
|
{
|
||||||
extern unsigned short (*_BSP_clear_vmebridge_errors)();
|
extern unsigned short (*_BSP_clear_vmebridge_errors)();
|
||||||
|
|||||||
Reference in New Issue
Block a user