From 2ae190a9ddb4b88c996e25cb96ae2ea1b4184dfa Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 19 Feb 2008 15:50:43 +0100 Subject: [i.MX] add function to determine chip revision --- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/imx27.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-imx/imx27.c (limited to 'arch') diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 4d0951a44e..323bffb530 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -1,6 +1,6 @@ obj-y += clocksource.o obj-$(CONFIG_ARCH_IMX1) += speed-imx1.o gpio.o -obj-$(CONFIG_ARCH_IMX27) += speed-imx27.o gpio.o +obj-$(CONFIG_ARCH_IMX27) += speed-imx27.o gpio.o imx27.o obj-$(CONFIG_ARCH_IMX31) += speed-imx31.o gpio-imx31.o obj-y += speed.o diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c new file mode 100644 index 0000000000..7255a77704 --- /dev/null +++ b/arch/arm/mach-imx/imx27.c @@ -0,0 +1,25 @@ +/* + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include + +int imx_silicon_revision(void) +{ + return CID >> 28; +} + -- cgit v1.2.3