diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-30 18:14:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-05 20:03:01 +0200 |
commit | 5003e4ddc899909c8f9c15978aa53e432b6b3831 (patch) | |
tree | ae45985765a566e952fc76793ac816924618f897 /arch/arm/mach-imx/imx.c | |
parent | 4008d0a34aa495164eadaab66595266286f8f4f4 (diff) | |
download | barebox-5003e4ddc899909c8f9c15978aa53e432b6b3831.tar.gz barebox-5003e4ddc899909c8f9c15978aa53e432b6b3831.tar.xz |
ARM i.MX: streamline imx_silicon_revision
All i.MX SoCs now use the same imx_silicon_revision() function to get
the revision. Add a separate header file for it and a common function
used on all SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/imx.c')
-rw-r--r-- | arch/arm/mach-imx/imx.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c new file mode 100644 index 0000000000..1bc6e23dd8 --- /dev/null +++ b/arch/arm/mach-imx/imx.c @@ -0,0 +1,27 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <common.h> +#include <mach/revision.h> + +static int __imx_silicon_revision = IMX_CHIP_REV_UNKNOWN; + +int imx_silicon_revision(void) +{ + return __imx_silicon_revision; +} + +void imx_set_silicon_revision(int revision) +{ + __imx_silicon_revision = revision; +} |