|
@ -240,23 +240,28 @@ LOCAL struct drvBusFuncs vxbFtSpiVxbFuncs = { |
|
|
vxbFtSpiInstConnect /* devConnect */ |
|
|
vxbFtSpiInstConnect /* devConnect */ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
LOCAL device_method_t vxbFtSpiDeviceMethods[] = { DEVMETHOD(vxbSpiControlGet, vxbFtSpiCtrlGet), |
|
|
/* clang-format off */ |
|
|
DEVMETHOD(busDevShow, vxbFtSpiShow), |
|
|
LOCAL device_method_t vxbFtSpiDeviceMethods[] = { |
|
|
DEVMETHOD(vxbDrvUnlink, vxbFtSpiInstUnlink), DEVMETHOD_END }; |
|
|
DEVMETHOD(vxbSpiControlGet, vxbFtSpiCtrlGet), |
|
|
|
|
|
DEVMETHOD(busDevShow, vxbFtSpiShow), |
|
|
|
|
|
DEVMETHOD(vxbDrvUnlink, vxbFtSpiInstUnlink), |
|
|
|
|
|
DEVMETHOD_END |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
LOCAL struct vxbPlbRegister vxbFtSpiDevRegistration = { |
|
|
LOCAL struct vxbPlbRegister vxbFtSpiDevRegistration = { |
|
|
{ |
|
|
{ |
|
|
NULL, /* pNext */ |
|
|
NULL , /* pNext */ |
|
|
VXB_DEVID_DEVICE, /* devID */ |
|
|
VXB_DEVID_DEVICE , /* devID */ |
|
|
VXB_BUSID_PLB, /* busID = PLB */ |
|
|
VXB_BUSID_PLB , /* busID = PLB */ |
|
|
VXB_VER_4_0_0, /* vxbVersion */ |
|
|
VXB_VER_4_0_0 , /* vxbVersion */ |
|
|
FT_SPI_NAME, /* drvName */ |
|
|
FT_SPI_NAME , /* drvName */ |
|
|
&vxbFtSpiVxbFuncs, /* pDrvBusFuncs */ |
|
|
&vxbFtSpiVxbFuncs , /* pDrvBusFuncs */ |
|
|
&vxbFtSpiDeviceMethods[0], /* pMethods */ |
|
|
&vxbFtSpiDeviceMethods[0] , /* pMethods */ |
|
|
NULL, /* devProbe */ |
|
|
NULL , /* devProbe */ |
|
|
NULL, /* pParamDefaults */ |
|
|
NULL , /* pParamDefaults */ |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
|
|
|
/* clang-format on */ |
|
|
|
|
|
|
|
|
/*
|
|
|
/*
|
|
|
* vxbFtSpiRegister - register with the VxBus subsystem |
|
|
* vxbFtSpiRegister - register with the VxBus subsystem |
|
@ -1048,14 +1053,14 @@ LOCAL STATUS vxbFtSpiTransfer(VXB_DEVICE_ID pDev, /* controller pDev */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
FSpimSetEnable(pDrvCtrl, FALSE); |
|
|
FSpimSetEnable(pDrvCtrl, FALSE); |
|
|
|
|
|
|
|
|
/* FSpimSetChipSelection(pDrvCtrl, TRUE); */ |
|
|
/* FSpimSetChipSelection(pDrvCtrl, TRUE); */ |
|
|
|
|
|
|
|
|
FSpimTransferPollFifo(pDrvCtrl, pPkg->txBuf, pPkg->rxBuf, max(pPkg->txLen, pPkg->rxLen)); |
|
|
FSpimTransferPollFifo(pDrvCtrl, pPkg->txBuf, pPkg->rxBuf, max(pPkg->txLen, pPkg->rxLen)); |
|
|
|
|
|
|
|
|
/* FSpimSetChipSelection(pDrvCtrl, FALSE); */ |
|
|
/* FSpimSetChipSelection(pDrvCtrl, FALSE); */ |
|
|
|
|
|
|
|
|
SPI_DBG(SPI_DBG_ERR," xfer : tx %d bytes, rx %d bytes\n", pPkg->txLen, pPkg->rxLen, 3, 4, 5, 6); |
|
|
SPI_DBG(SPI_DBG_ERR, " xfer : tx %d bytes, rx %d bytes\n", pPkg->txLen, pPkg->rxLen, 3, 4, 5, 6); |
|
|
|
|
|
|
|
|
if (pDrvCtrl->initPhase >= 2) { |
|
|
if (pDrvCtrl->initPhase >= 2) { |
|
|
semGive(pDrvCtrl->muxSem); |
|
|
semGive(pDrvCtrl->muxSem); |
|
|