summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Balagopalakrishnan <anandb@ti.com>2014-12-07 09:44:38 +0300
committerAnand Balagopalakrishnan <anandb@ti.com>2014-12-08 13:19:37 +0300
commit3929a26b32c09be362545af66f07f94a36e0b1e7 (patch)
treeb150bd45b953a6eb1b44d730bc1d323b0139ecba
parentbf8997b894f216261f914f64d33e6e588770da5a (diff)
downloadomap5-sgx-ddk-linux-3929a26b32c09be362545af66f07f94a36e0b1e7.tar.xz
Revert "Add support for a segmented register memory map for SGX"
This reverts commit 70bbb856e74feba2007ba0645ca975730afc9bd6. Anand: K3.14 DTS file has the SGX register map defined as a single continuous region. For K3.8/K3.12, the register map was broken down for individual submodules of SGX
-rw-r--r--eurasia_km/services4/system/omap5/sysconfig.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/eurasia_km/services4/system/omap5/sysconfig.c b/eurasia_km/services4/system/omap5/sysconfig.c
index 1fe26ed..21b4bf3 100644
--- a/eurasia_km/services4/system/omap5/sysconfig.c
+++ b/eurasia_km/services4/system/omap5/sysconfig.c
@@ -149,8 +149,6 @@ static PVRSRV_ERROR SysLocateDevices(SYS_DATA *psSysData)
#if defined(PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO)
struct resource *dev_res;
int dev_irq;
- int nres = 0;
- resource_size_t start_addr=0, end_addr=0;
#endif
#endif
@@ -198,28 +196,14 @@ static PVRSRV_ERROR SysLocateDevices(SYS_DATA *psSysData)
#else /* defined(NO_HARDWARE) */
#if defined(PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO)
- dev_res = platform_get_resource(gpsPVRLDMDev, IORESOURCE_MEM, nres++);
+ /* get the resource and IRQ through platform resource API */
+ dev_res = platform_get_resource(gpsPVRLDMDev, IORESOURCE_MEM, 0);
if (dev_res == NULL)
{
PVR_DPF((PVR_DBG_ERROR, "%s: platform_get_resource failed", __FUNCTION__));
return PVRSRV_ERROR_INVALID_DEVICE;
}
- start_addr = dev_res->start;
- end_addr = dev_res->end;
-
- /* get the resource and IRQ through platform resource API */
- while (NULL != (dev_res = platform_get_resource(gpsPVRLDMDev, IORESOURCE_MEM, nres++)))
- {
- if (dev_res->start < start_addr)
- start_addr = dev_res->start;
-
- if (dev_res->end > end_addr)
- end_addr = dev_res->end;
- }
-
-
-
dev_irq = platform_get_irq(gpsPVRLDMDev, 0);
if (dev_irq < 0)
{
@@ -227,12 +211,12 @@ static PVRSRV_ERROR SysLocateDevices(SYS_DATA *psSysData)
return PVRSRV_ERROR_INVALID_DEVICE;
}
- gsSGXDeviceMap.sRegsSysPBase.uiAddr = start_addr;
+ gsSGXDeviceMap.sRegsSysPBase.uiAddr = dev_res->start;
gsSGXDeviceMap.sRegsCpuPBase =
SysSysPAddrToCpuPAddr(gsSGXDeviceMap.sRegsSysPBase);
PVR_TRACE(("SGX register base: 0x%lx", (unsigned long)gsSGXDeviceMap.sRegsCpuPBase.uiAddr));
- gsSGXDeviceMap.ui32RegsSize = (unsigned int)(end_addr - start_addr);
+ gsSGXDeviceMap.ui32RegsSize = (unsigned int)(dev_res->end - dev_res->start);
PVR_TRACE(("SGX register size: %d",gsSGXDeviceMap.ui32RegsSize));
gsSGXDeviceMap.ui32IRQ = dev_irq;