Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
arm
mach-imx
cpu-imx25.c
Go to the documentation of this file.
1
/*
2
* MX25 CPU type detection
3
*
4
* Copyright (c) 2009 Daniel Mack <
[email protected]
>
5
* Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*/
12
#include <linux/module.h>
13
#include <
linux/io.h
>
14
#include <mach/hardware.h>
15
#include <
mach/iim.h
>
16
17
static
int
mx25_cpu_rev = -1;
18
19
static
int
mx25_read_cpu_rev(
void
)
20
{
21
u32
rev
;
22
23
rev =
__raw_readl
(
MX25_IO_ADDRESS
(
MX25_IIM_BASE_ADDR
+
MXC_IIMSREV
));
24
switch
(rev) {
25
case
0x00:
26
return
IMX_CHIP_REVISION_1_0
;
27
case
0x01:
28
return
IMX_CHIP_REVISION_1_1
;
29
default
:
30
return
IMX_CHIP_REVISION_UNKNOWN
;
31
}
32
}
33
34
int
mx25_revision
(
void
)
35
{
36
if
(mx25_cpu_rev == -1)
37
mx25_cpu_rev = mx25_read_cpu_rev();
38
39
return
mx25_cpu_rev;
40
}
41
EXPORT_SYMBOL
(
mx25_revision
);
Generated on Thu Jan 10 2013 12:59:13 for Linux Kernel by
1.8.2