support all OMAP3s with single build
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 10 Feb 2013 22:49:58 +0000 (00:49 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 12 Feb 2013 22:17:39 +0000 (00:17 +0200)
Makefile
services4/system/omap3/sysconfig.c
services4/system/omap3/sysconfig.h
services4/system/omap3/sysutils_linux.c

index ba1ce41..899e158 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ export KERNEL_SRC=$(KERNELDIR)
 export KDIR=$(KERNELDIR)
 
 export BUILD = release
+export TI_PLATFORM ?= omap3
+export OMAPES ?= 3.x
 
 export KBUILD_EXTRA_SYMBOLS = `pwd`/services4/srvkm/env/linux/kbuild/Module.symvers
 
index 1513950..7de860b 100644 (file)
@@ -326,7 +326,7 @@ PVRSRV_ERROR SysInitialise(IMG_VOID)
 #if !defined(SGX_DYNAMIC_TIMING_INFO)
        
        psTimingInfo = &gsSGXDeviceMap.sTimingInfo;
-       psTimingInfo->ui32CoreClockSpeed = SYS_SGX_CLOCK_SPEED;
+       psTimingInfo->ui32CoreClockSpeed = cpu_is_omap3630() ? 200000000 : 110666666;
        psTimingInfo->ui32HWRecoveryFreq = SYS_SGX_HWRECOVERY_TIMEOUT_FREQ; 
 #if defined(SUPPORT_ACTIVE_POWER_MANAGEMENT)
        psTimingInfo->bEnableActivePM = IMG_TRUE;
index 8dd1efe..e04857c 100644 (file)
@@ -42,7 +42,7 @@
 
 #define SYS_OMAP3430_SGX_REGS_SYS_PHYS_BASE  0x50000000
 
-#define SYS_OMAP3430_SGX_REGS_SIZE           0x4000
+#define SYS_OMAP3430_SGX_REGS_SIZE           0x10000
 
 #define SYS_OMAP3430_SGX_IRQ                            21
 
index e6b0644..df7cbf1 100644 (file)
@@ -55,6 +55,10 @@ extern struct platform_device *gpsPVRLDMDev;
 #endif
 
 
+#undef SYS_SGX_CLOCK_SPEED
+#define SYS_SGX_CLOCK_SPEED sgx_clock_speed
+static int sgx_clock_speed;
+
 static PVRSRV_ERROR PowerLockWrap(SYS_SPECIFIC_DATA *psSysSpecData, IMG_BOOL bTryLock)
 {
         if (!in_interrupt())
@@ -208,6 +212,16 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData)
                 PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: SGX Functional Clock is %dMhz", HZ_TO_MHZ(rate)));
         }
 #endif
+#if 1
+       {
+               static int logged;
+               IMG_UINT32 rate = clk_get_rate(psSysSpecData->psSGX_FCK);
+               if (!logged) {
+                       printk(KERN_INFO "SGX clock rate: %u\n", rate);
+                       logged = 1;
+               }
+       }
+#endif
 
 
 
@@ -521,6 +535,8 @@ PVRSRV_ERROR EnableSystemClocks(SYS_DATA *psSysData)
 
                atomic_set(&psSysSpecData->sSGXClocksEnabled, 0);
 
+               SYS_SGX_CLOCK_SPEED = cpu_is_omap3630() ? 200000000 : 110666666;
+
                 psCLK = clk_get(NULL, SGX_PARENT_CLOCK);
                 if (IS_ERR(psCLK))
                 {