Commit b5ccf78a authored by Russell King's avatar Russell King

[ARM] Make PXA compile.

Fix up several errors in the PXA code preventing it from building.
parent 6018f7ed
......@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <asm/system.h>
......@@ -92,7 +93,7 @@ void pxa_free_dma (int dma_ch)
local_irq_restore(flags);
}
static void dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
{
int i, dint = DINT;
......@@ -111,6 +112,7 @@ static void dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
}
}
}
return IRQ_HANDLED;
}
static int __init pxa_dma_init (void)
......
......@@ -103,7 +103,7 @@ EXPORT_SYMBOL(get_lclk_frequency_10khz);
void pxa_gpio_mode(int gpio_mode)
{
long flags;
unsigned long flags;
int gpio = gpio_mode & GPIO_MD_MASK_NR;
int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
int gafr;
......
......@@ -11,12 +11,6 @@
* modify it under the terms of the GNU General Public License.
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
#include <linux/errno.h>
#include <asm/hardware.h>
......@@ -81,7 +75,7 @@ int pm_do_suspend(void)
/*
* Temporary solution. This won't be necessary once
* we move pxa support into the serial/* driver
* we move pxa support into the serial driver
* Save the FF UART
*/
SAVE(FFIER);
......@@ -175,7 +169,7 @@ int pm_do_suspend(void)
/*
* Temporary solution. This won't be necessary once
* we move pxa support into the serial/* driver.
* we move pxa support into the serial driver.
* Restore the FF UART.
*/
RESTORE(FFMCR);
......@@ -207,58 +201,3 @@ unsigned long sleep_phys_sp(void *sp)
{
return virt_to_phys(sp);
}
#ifdef CONFIG_SYSCTL
/*
* ARGH! ACPI people defined CTL_ACPI in linux/acpi.h rather than
* linux/sysctl.h.
*
* This means our interface here won't survive long - it needs a new
* interface. Quick hack to get this working - use sysctl id 9999.
*/
#warning ACPI broke the kernel, this interface needs to be fixed up.
#define CTL_ACPI 9999
#define ACPI_S1_SLP_TYP 19
/*
* Send us to sleep.
*/
static int sysctl_pm_do_suspend(void)
{
int retval;
retval = pm_send_all(PM_SUSPEND, (void *)3);
if (retval == 0) {
retval = pm_do_suspend();
pm_send_all(PM_RESUME, (void *)0);
}
return retval;
}
static struct ctl_table pm_table[] =
{
{ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, (proc_handler *)&sysctl_pm_do_suspend},
{0}
};
static struct ctl_table pm_dir_table[] =
{
{CTL_ACPI, "pm", NULL, 0, 0555, pm_table},
{0}
};
/*
* Initialize power interface
*/
static int __init pm_init(void)
{
register_sysctl_table(pm_dir_table, 1);
return 0;
}
__initcall(pm_init);
#endif
......@@ -48,7 +48,7 @@ ENTRY(pxa_cpu_suspend)
str r0, [r1]
@ clean data cache
bl cpu_xscale_cache_clean_invalidate_all
bl xscale_flush_kern_cache_all
@ Put the processor to sleep
@ (also workaround for sighting 28071)
......@@ -101,7 +101,7 @@ ENTRY(pxa_cpu_suspend)
.data
.align 5
ENTRY(pxa_cpu_resume)
mov r0, #I_BIT | F_BIT | MODE_SVC @ set SVC, irqs off
mov r0, #PSR_I_BIT | PSR_F_BIT | MODE_SVC @ set SVC, irqs off
msr cpsr_c, r0
ldr r0, sleep_save_sp @ stack phys addr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment