Skip to content

Commit

Permalink
Add the FLASH IO for the vme300 boards
Browse files Browse the repository at this point in the history
  • Loading branch information
rhong committed Jun 13, 2024
1 parent 0a07c88 commit 12a0158
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions evgMrmApp/src/evgMrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ evgMrm::evgMrm(const std::string& id,

scanIoInit(&ioScanTimestamp);

if((busConfig.busType==busType_pci) || (info.board==MRF_VME_EVM300_BID))
if(busConfig.busType==busType_pci || (busConfig.busType==busType_vme && version()>=MRFVersion(2, 0, 0)))
mrf::SPIDevice::registerDev(id+":FLASH", mrf::SPIDevice(this, 1));

if((pciDevice->id.sub_device==PCI_DEVICE_ID_MRF_MTCA_EVM_300) || (info.board==MRF_VME_EVM300_BID)) {
Expand All @@ -210,7 +210,7 @@ evgMrm::evgMrm(const std::string& id,
}

evgMrm::~evgMrm() {
if(getBusConfiguration()->busType==busType_pci)
if(getBusConfiguration()->busType==busType_pci || (getBusConfiguration()->busType==busType_vme && version()>=MRFVersion(2, 0, 0)))
mrf::SPIDevice::unregisterDev(name()+":FLASH");

for(size_t i = 0; i < m_trigEvt.size(); i++)
Expand Down
4 changes: 2 additions & 2 deletions evrMrmApp/src/drvem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ try{

drain_fifo_task.start();

if(busConfig.busType==busType_pci)
if(busConfig.busType==busType_pci || (busConfig.busType==busType_vme && version()>=MRFVersion(2, 0, 0)))
mrf::SPIDevice::registerDev(n+":FLASH", mrf::SPIDevice(this, 1));

#ifndef DBR_UTAG
Expand All @@ -369,7 +369,7 @@ try{

EVRMRM::~EVRMRM()
{
if(getBusConfiguration()->busType==busType_pci)
if(getBusConfiguration()->busType==busType_pci || (getBusConfiguration()->busType==busType_vme && version()>=MRFVersion(2, 0, 0)))
mrf::SPIDevice::unregisterDev(name()+":FLASH");
cleanup();
}
Expand Down
2 changes: 1 addition & 1 deletion mrfCommon/src/flashiocsh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void flashread(const char *name, int addrraw, int countraw, const char *outfile)
if(outfile) {
fstrm.open(outfile, std::ios_base::out|std::ios_base::binary);
if(fstrm.fail())
throw std::runtime_error("Unable to open output file");
throw std::runtime_error("Unable to open input file");
strm = &fstrm;
}

Expand Down

0 comments on commit 12a0158

Please sign in to comment.