1
0
Fork 0
forked from len0rd/rockbox

regtools: make qeditor aware of PP

Change-Id: I3b4fa625499aa66bb5617971445fa3c1c209134e
This commit is contained in:
Amaury Pouly 2014-05-05 23:18:04 +02:00
parent d8071221c5
commit 4fef1834e2
2 changed files with 16 additions and 0 deletions

View file

@ -223,6 +223,12 @@ bool HWStubDevice::Probe()
if(ret != sizeof(m_hwdev_stmp))
goto Lerr;
}
else if(m_hwdev_target.dID == HWSTUB_TARGET_PP)
{
ret = hwstub_get_desc(m_hwdev, HWSTUB_DT_PP, &m_hwdev_pp, sizeof(m_hwdev_pp));
if(ret != sizeof(m_hwdev_pp))
goto Lerr;
}
Close();
return true;
@ -300,6 +306,14 @@ HWStubIoBackend::HWStubIoBackend(HWStubDevice *dev)
}
else if(target.dID == HWSTUB_TARGET_RK27)
m_soc = "rk27x";
else if(target.dID == HWSTUB_TARGET_PP)
{
struct hwstub_pp_desc_t pp = m_dev->GetPPInfo();
if(pp.wChipID == 0x6110 )
m_soc = "pp6110";
else
m_soc = QString("pp%1").arg(pp.wChipID, 4, 16, QChar('0'));
}
else
m_soc = target.bName;
}

View file

@ -123,6 +123,7 @@ public:
inline struct hwstub_version_desc_t GetVersionInfo() { return m_hwdev_ver; }
inline struct hwstub_target_desc_t GetTargetInfo() { return m_hwdev_target; }
inline struct hwstub_stmp_desc_t GetSTMPInfo() { return m_hwdev_stmp; }
inline struct hwstub_pp_desc_t GetPPInfo() { return m_hwdev_pp; }
/* Calls below require the device to be opened */
bool ReadMem(soc_addr_t addr, size_t length, void *buffer);
bool WriteMem(soc_addr_t addr, size_t length, void *buffer);
@ -137,6 +138,7 @@ protected:
struct hwstub_version_desc_t m_hwdev_ver;
struct hwstub_target_desc_t m_hwdev_target;
struct hwstub_stmp_desc_t m_hwdev_stmp;
struct hwstub_pp_desc_t m_hwdev_pp;
};
/** NOTE the HWStub backend is never dirty: all writes are immediately committed */