9
0
Fork 0

[i.MX] add function to determine chip revision

This commit is contained in:
Sascha Hauer 2008-02-19 15:50:43 +01:00
parent bb6d50805a
commit 2ae190a9dd
3 changed files with 30 additions and 1 deletions

View File

@ -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

25
arch/arm/mach-imx/imx27.c Normal file
View File

@ -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 <common.h>
#include <asm/arch/imx-regs.h>
int imx_silicon_revision(void)
{
return CID >> 28;
}

View File

@ -0,0 +1,4 @@
int imx_silicon_revision(void);
#define IMX27_CHIP_REVISION_1_0 0
#define IMX27_CHIP_REVISION_2_0 1