Remove non-working Banana Pi code (#1252)

* Remove non-working Banana Pi code

* Remove SonarQube suppressions which can be resolved by a code update

* Update device detection
This commit is contained in:
Uwe Seimet
2023-10-22 17:29:26 +02:00
committed by GitHub
parent 2acb742043
commit 43088ab3bc
29 changed files with 103 additions and 2890 deletions
+7 -5
View File
@@ -26,6 +26,8 @@ volatile uint32_t *SysTimer_Raspberry::systaddr = nullptr;
volatile uint32_t *SysTimer_Raspberry::armtaddr = nullptr;
volatile uint32_t SysTimer_Raspberry::corefreq = 0;
using namespace std;
//---------------------------------------------------------------------------
//
// Initialize the system timer
@@ -34,7 +36,7 @@ volatile uint32_t SysTimer_Raspberry::corefreq = 0;
void SysTimer_Raspberry::Init()
{
// Get the base address
auto baseaddr = SBC_Version::GetPeripheralAddress();
const auto baseaddr = SBC_Version::GetPeripheralAddress();
// Open /dev/mem
int mem_fd = open("/dev/mem", O_RDWR | O_SYNC);
@@ -63,7 +65,7 @@ void SysTimer_Raspberry::Init()
//
// Clock id
// 0x000000004: CORE
std::array<uint32_t, 32> maxclock = {32, 0, 0x00030004, 8, 0, 4, 0, 0};
const array<uint32_t, 32> maxclock = {32, 0, 0x00030004, 8, 0, 4, 0, 0};
// Save the base address
systaddr = (uint32_t *)map + SYST_OFFSET / sizeof(uint32_t);
@@ -113,7 +115,7 @@ void SysTimer_Raspberry::SleepNsec(uint32_t nsec)
}
// Calculate the timer difference
uint32_t diff = corefreq * nsec / 1000;
const uint32_t diff = corefreq * nsec / 1000;
// Return if the difference in time is too small
if (diff == 0) {
@@ -121,7 +123,7 @@ void SysTimer_Raspberry::SleepNsec(uint32_t nsec)
}
// Start
uint32_t start = armtaddr[ARMT_FREERUN];
const uint32_t start = armtaddr[ARMT_FREERUN];
// Loop until timer has elapsed
while ((armtaddr[ARMT_FREERUN] - start) < diff)
@@ -140,7 +142,7 @@ void SysTimer_Raspberry::SleepUsec(uint32_t usec)
return;
}
uint32_t now = GetTimerLow();
const uint32_t now = GetTimerLow();
while ((GetTimerLow() - now) < usec)
;
}