ARM: rockchip: cpu.c support export cpu version
author黄涛 <huangtao@rock-chips.com>
Mon, 27 Oct 2014 10:39:14 +0000 (18:39 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 27 Oct 2014 10:39:50 +0000 (18:39 +0800)
arch/arm/mach-rockchip/cpu.c

index d9aaa12a07d1e2b76afb4bff11cf6cfb956668f2..a8b4c226a52de297a8b77127ee1eb4eb21217404 100644 (file)
@@ -28,6 +28,10 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr, char
        else
                type = "";
 
+       if (rockchip_get_cpu_version())
+               return sprintf(buf, "%sv%lu\n", type,
+                              rockchip_get_cpu_version());
+
        return sprintf(buf, "%s\n", type);
 }