Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the FLASH IO for the vme300 boards #163

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -165,7 +165,7 @@ void flashwrite(const char *name, int addrraw, const char *infile)

std::ifstream strm(infile, std::ios_base::in|std::ios_base::binary);
if(strm.fail())
throw std::runtime_error("Unable to open output file");
throw std::runtime_error("Unable to open input file");

strm.seekg(0, std::ios_base::end);
const long fsize = strm.tellg();
Expand Down