Skip to content

Commit 2bd2275

Browse files
committed
[crorc] Flush superpages on DMA stop
1 parent a299915 commit 2bd2275

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Crorc/CrorcBar.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ bool CrorcBar::getTimeFrameDetectionEnabled()
227227
return (readRegister(Crorc::Registers::CFG_CONTROL_B.index) >> 12) & 0x1;
228228
}
229229

230+
void CrorcBar::flushSuperpages()
231+
{
232+
modifyRegister(Crorc::Registers::CFG_CONTROL_B.index, 16, 1, 0x1);
233+
}
234+
230235
void CrorcBar::getOpticalPowers(std::map<int, Crorc::Link>& linkMap)
231236
{
232237
for (auto& el : linkMap) {

src/Crorc/CrorcBar.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class CrorcBar final : public BarInterfaceBase
5252
Crorc::ReportInfo report();
5353

5454
void resetDevice(bool withSiu);
55+
void flushSuperpages();
5556
void startDataReceiver(uintptr_t readyFifoBusAddress);
5657
void stopDataReceiver();
5758
void startDataGenerator();

src/Crorc/CrorcDmaChannel.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ void CrorcDmaChannel::startPendingDma()
166166

167167
void CrorcDmaChannel::deviceStopDma()
168168
{
169+
getBar()->flushSuperpages();
169170
if (mGeneratorEnabled) {
170171
getBar()->stopDataGenerator();
171172
} else {

0 commit comments

Comments
 (0)