~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/mach-mx5/cpu.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
static int cpu_silicon_rev = -1;
22
22
 
23
23
#define IIM_SREV 0x24
 
24
#define MX50_HW_ADADIG_DIGPROG  0xB0
24
25
 
25
26
static int get_mx51_srev(void)
26
27
{
51
52
}
52
53
EXPORT_SYMBOL(mx51_revision);
53
54
 
 
55
void mx51_display_revision(void)
 
56
{
 
57
        int rev;
 
58
        char *srev;
 
59
        rev = mx51_revision();
 
60
 
 
61
        switch (rev) {
 
62
        case IMX_CHIP_REVISION_2_0:
 
63
                srev = IMX_CHIP_REVISION_2_0_STRING;
 
64
                break;
 
65
        case IMX_CHIP_REVISION_3_0:
 
66
                srev = IMX_CHIP_REVISION_3_0_STRING;
 
67
                break;
 
68
        default:
 
69
                srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
 
70
        }
 
71
        printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev);
 
72
}
 
73
EXPORT_SYMBOL(mx51_display_revision);
 
74
 
54
75
#ifdef CONFIG_NEON
55
76
 
56
77
/*
78
99
        void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR);
79
100
        u32 rev = readl(iim_base + IIM_SREV) & 0xff;
80
101
 
81
 
        if (rev == 0x0)
 
102
        switch (rev) {
 
103
        case 0x0:
82
104
                return IMX_CHIP_REVISION_1_0;
83
 
        else if (rev == 0x10)
 
105
        case 0x2:
84
106
                return IMX_CHIP_REVISION_2_0;
85
 
        return 0;
 
107
        case 0x3:
 
108
                return IMX_CHIP_REVISION_2_1;
 
109
        default:
 
110
                return IMX_CHIP_REVISION_UNKNOWN;
 
111
        }
86
112
}
87
113
 
88
114
/*
102
128
}
103
129
EXPORT_SYMBOL(mx53_revision);
104
130
 
 
131
static int get_mx50_srev(void)
 
132
{
 
133
        void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K);
 
134
        u32 rev;
 
135
 
 
136
        if (!anatop) {
 
137
                cpu_silicon_rev = -EINVAL;
 
138
                return 0;
 
139
        }
 
140
 
 
141
        rev = readl(anatop + MX50_HW_ADADIG_DIGPROG);
 
142
        rev &= 0xff;
 
143
 
 
144
        iounmap(anatop);
 
145
        if (rev == 0x0)
 
146
                return IMX_CHIP_REVISION_1_0;
 
147
        else if (rev == 0x1)
 
148
                return IMX_CHIP_REVISION_1_1;
 
149
        return 0;
 
150
}
 
151
 
 
152
/*
 
153
 * Returns:
 
154
 *      the silicon revision of the cpu
 
155
 *      -EINVAL - not a mx50
 
156
 */
 
157
int mx50_revision(void)
 
158
{
 
159
        if (!cpu_is_mx50())
 
160
                return -EINVAL;
 
161
 
 
162
        if (cpu_silicon_rev == -1)
 
163
                cpu_silicon_rev = get_mx50_srev();
 
164
 
 
165
        return cpu_silicon_rev;
 
166
}
 
167
EXPORT_SYMBOL(mx50_revision);
 
168
 
105
169
static int __init post_cpu_init(void)
106
170
{
107
171
        unsigned int reg;