From 807c54488b9e02c9c32c769376bc4cbf79f3586d Mon Sep 17 00:00:00 2001 From: Luotao Fu Date: Tue, 12 Jan 2010 10:25:14 +0100 Subject: fixed up sytem revsion to mx27 original fsl code used to look into /proc/cpuinfo for cpu version and revison. It doesn't work on a mainline mxc kernel though. For now we fix the system revision to mx27 rev. 0x20 since we only have the microcode for mx27 anyway. Signed-off-by: Luotao Fu --- src/vpu_io.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/vpu_io.c b/src/vpu_io.c index fa0067f..7bafc02 100644 --- a/src/vpu_io.c +++ b/src/vpu_io.c @@ -52,38 +52,8 @@ int isVpuInitialized(void) static int get_system_rev() { - FILE *fp; - char buf[1024]; - int nread; - char *tmp, *rev; - int ret = -1; - - fp = fopen("/proc/cpuinfo", "r"); - if (fp == NULL) { - perror("/proc/cpuinfo\n"); - return ret; - } - - nread = fread(buf, 1, sizeof(buf), fp); - fclose(fp); - if ((nread == 0) || (nread == sizeof(buf))) { - fclose(fp); - return ret; - } - - buf[nread] = '\0'; - - tmp = strstr(buf, "Revision"); - if (tmp != NULL) { - rev = index(tmp, ':'); - if (rev != NULL) { - rev++; - system_rev = strtoul(rev, NULL, 16); - ret = 0; - } - } - - return ret; + system_rev = 0x27020; + return 0; } /* make consideration for both register and physical mem access */ -- cgit v1.2.3