~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to arch/arm/mach-pxa/pxa3xx.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 * it under the terms of the GNU General Public License version 2 as
13
13
 * published by the Free Software Foundation.
14
14
 */
15
 
 
16
15
#include <linux/module.h>
17
16
#include <linux/kernel.h>
18
17
#include <linux/init.h>
24
23
#include <linux/i2c/pxa-i2c.h>
25
24
 
26
25
#include <asm/mach/map.h>
 
26
#include <asm/suspend.h>
27
27
#include <mach/hardware.h>
28
 
#include <mach/gpio.h>
 
28
#include <mach/gpio-pxa.h>
29
29
#include <mach/pxa3xx-regs.h>
30
30
#include <mach/reset.h>
31
31
#include <mach/ohci.h>
32
32
#include <mach/pm.h>
33
33
#include <mach/dma.h>
34
 
#include <mach/regs-intc.h>
35
34
#include <mach/smemc.h>
36
35
 
37
36
#include "generic.h"
141
140
{
142
141
        volatile unsigned long *p = (volatile void *)0xc0000000;
143
142
        unsigned long saved_data = *p;
144
 
 
145
 
        extern void pxa3xx_cpu_suspend(long);
 
143
#ifndef CONFIG_IWMMXT
 
144
        u64 acc0;
 
145
 
 
146
        asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
 
147
#endif
 
148
 
 
149
        extern int pxa3xx_finish_suspend(unsigned long);
146
150
 
147
151
        /* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
148
152
        CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM);
162
166
        /* overwrite with the resume address */
163
167
        *p = virt_to_phys(cpu_resume);
164
168
 
165
 
        pxa3xx_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET);
 
169
        cpu_suspend(0, pxa3xx_finish_suspend);
166
170
 
167
171
        *p = saved_data;
168
172
 
169
173
        AD3ER = 0;
 
174
 
 
175
#ifndef CONFIG_IWMMXT
 
176
        asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0));
 
177
#endif
170
178
}
171
179
 
172
180
static void pxa3xx_cpu_pm_enter(suspend_state_t state)
328
336
 
329
337
static void pxa_mask_ext_wakeup(struct irq_data *d)
330
338
{
331
 
        ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f));
 
339
        pxa_mask_irq(d);
332
340
        PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0);
333
341
}
334
342
 
335
343
static void pxa_unmask_ext_wakeup(struct irq_data *d)
336
344
{
337
 
        ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f);
 
345
        pxa_unmask_irq(d);
338
346
        PECR |= PECR_IE(d->irq - IRQ_WAKEUP0);
339
347
}
340
348
 
385
393
 
386
394
static struct map_desc pxa3xx_io_desc[] __initdata = {
387
395
        {       /* Mem Ctl */
388
 
                .virtual        = SMEMC_VIRT,
 
396
                .virtual        = (unsigned long)SMEMC_VIRT,
389
397
                .pfn            = __phys_to_pfn(PXA3XX_SMEMC_BASE),
390
398
                .length         = 0x00200000,
391
399
                .type           = MT_DEVICE