Commit 74ad7274 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Misc changes to compile after sync with mainline

Misc changes to compile after sync with mainline
parent 18a45ee8
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -607,9 +607,9 @@ static int __init omap1_late_clk_reset(void) ...@@ -607,9 +607,9 @@ static int __init omap1_late_clk_reset(void)
/* Clocks in the DSP domain need api_ck. Just assume bootloader /* Clocks in the DSP domain need api_ck. Just assume bootloader
* has not enabled any DSP clocks */ * has not enabled any DSP clocks */
if (p->enable_reg == DSP_IDLECT2) { if ((u32)p->enable_reg == DSP_IDLECT2) {
printk(KERN_INFO "Skipping reset check for DSP domain clock \"%s\"\n", printk(KERN_INFO "Skipping reset check for DSP domain "
p->name); "clock \"%s\"\n", p->name);
continue; continue;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -120,8 +120,8 @@ config CPU_ARM925T ...@@ -120,8 +120,8 @@ config CPU_ARM925T
# ARM926T # ARM926T
config CPU_ARM926T config CPU_ARM926T
bool "Support ARM926T processor" if ARCH_INTEGRATOR bool "Support ARM926T processor"
depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB
default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
select CPU_32v5 select CPU_32v5
select CPU_ABRT_EV5TJ select CPU_ABRT_EV5TJ
...@@ -242,7 +242,7 @@ config CPU_XSCALE ...@@ -242,7 +242,7 @@ config CPU_XSCALE
# ARMv6 # ARMv6
config CPU_V6 config CPU_V6
bool "Support ARM V6 processor" bool "Support ARM V6 processor"
depends on ARCH_INTEGRATOR || ARCH_OMAP2 depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2
select CPU_32v6 select CPU_32v6
select CPU_ABRT_EV6 select CPU_ABRT_EV6
select CPU_CACHE_V6 select CPU_CACHE_V6
...@@ -250,6 +250,18 @@ config CPU_V6 ...@@ -250,6 +250,18 @@ config CPU_V6
select CPU_COPY_V6 select CPU_COPY_V6
select CPU_TLB_V6 select CPU_TLB_V6
# ARMv6k
config CPU_32v6K
bool "Support ARM V6K processor extensions" if !SMP
depends on CPU_V6
default y if SMP
help
Say Y here if your ARMv6 processor supports the 'K' extension.
This enables the kernel to use some instructions not present
on previous processors, and as such a kernel build with this
enabled will not boot on processors with do not support these
instructions.
# Figure out what processor architecture version we should be using. # Figure out what processor architecture version we should be using.
# This defines the compiler instruction set which depends on the machine type. # This defines the compiler instruction set which depends on the machine type.
config CPU_32v3 config CPU_32v3
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -58,7 +58,7 @@ struct cpustat { ...@@ -58,7 +58,7 @@ struct cpustat {
void (*mem_rel_cb)(void); void (*mem_rel_cb)(void);
}; };
struct cpustat cpustat = { struct cpustat cpustat = {
.sem = __MUTEX_INITIALIZER(cpustat.sem), .sem = __SEMAPHORE_INIT(cpustat.sem, 1),
.stat = CPUSTAT_RESET, .stat = CPUSTAT_RESET,
.icrmask = 0xffff, .icrmask = 0xffff,
}; };
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -696,31 +696,16 @@ static int dsp_drv_remove(struct device *dev) ...@@ -696,31 +696,16 @@ static int dsp_drv_remove(struct device *dev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int dsp_drv_suspend(struct device *dev, pm_message_t state, u32 level) static int dsp_drv_suspend(struct device *dev, pm_message_t state)
{ {
switch(level) { dsp_suspend();
case SUSPEND_NOTIFY:
case SUSPEND_DISABLE:
case SUSPEND_SAVE_STATE:
break;
case SUSPEND_POWER_DOWN:
dsp_suspend();
break;
}
return 0; return 0;
} }
static int dsp_drv_resume(struct device *dev, u32 level) static int dsp_drv_resume(struct device *dev)
{ {
switch(level) { dsp_resume();
case RESUME_POWER_ON:
dsp_resume();
break;
case RESUME_RESTORE_STATE:
case RESUME_ENABLE:
break;
}
return 0; return 0;
} }
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/ioctls.h> #include <asm/ioctls.h>
......
...@@ -86,6 +86,7 @@ int __init dsp_ctl_core_init(void) ...@@ -86,6 +86,7 @@ int __init dsp_ctl_core_init(void)
{ {
int retval; int retval;
int i; int i;
struct class_device *cdev;
retval = register_chrdev(OMAP_DSP_CTL_MAJOR, "dspctl", retval = register_chrdev(OMAP_DSP_CTL_MAJOR, "dspctl",
&dsp_ctl_core_fops); &dsp_ctl_core_fops);
...@@ -98,7 +99,7 @@ int __init dsp_ctl_core_init(void) ...@@ -98,7 +99,7 @@ int __init dsp_ctl_core_init(void)
dsp_ctl_class = class_create(THIS_MODULE, "dspctl"); dsp_ctl_class = class_create(THIS_MODULE, "dspctl");
for (i = 0; i < ARRAY_SIZE(dev_list); i++) { for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
class_device_create(dsp_ctl_class, cdev = class_device_create(dsp_ctl_class, NULL,
MKDEV(OMAP_DSP_CTL_MAJOR, MKDEV(OMAP_DSP_CTL_MAJOR,
dev_list[i].minor), dev_list[i].minor),
NULL, dev_list[i].devname); NULL, dev_list[i].devname);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/ioctls.h> #include <asm/ioctls.h>
...@@ -187,7 +188,7 @@ struct kmem_pool { ...@@ -187,7 +188,7 @@ struct kmem_pool {
#define KMEM_POOL_INIT(name) \ #define KMEM_POOL_INIT(name) \
{ \ { \
.sem = __MUTEX_INITIALIZER((name).sem), \ .sem = __SEMAPHORE_INIT((name).sem, 1), \
} }
#define DECLARE_KMEM_POOL(name) \ #define DECLARE_KMEM_POOL(name) \
struct kmem_pool name = KMEM_POOL_INIT(name) struct kmem_pool name = KMEM_POOL_INIT(name)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/arch/dsp.h> #include <asm/arch/dsp.h>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <linux/major.h> #include <linux/major.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -1738,6 +1738,8 @@ static void dsptask_dev_release(struct device *dev) ...@@ -1738,6 +1738,8 @@ static void dsptask_dev_release(struct device *dev)
static int taskdev_init(struct taskdev *dev, char *name, unsigned char minor) static int taskdev_init(struct taskdev *dev, char *name, unsigned char minor)
{ {
struct class_device *cdev;
taskdev[minor] = dev; taskdev[minor] = dev;
INIT_LIST_HEAD(&dev->proc_list); INIT_LIST_HEAD(&dev->proc_list);
...@@ -1765,8 +1767,9 @@ static int taskdev_init(struct taskdev *dev, char *name, unsigned char minor) ...@@ -1765,8 +1767,9 @@ static int taskdev_init(struct taskdev *dev, char *name, unsigned char minor)
device_create_file(&dev->dev, &dev_attr_devname); device_create_file(&dev->dev, &dev_attr_devname);
device_create_file(&dev->dev, &dev_attr_devstate); device_create_file(&dev->dev, &dev_attr_devstate);
device_create_file(&dev->dev, &dev_attr_proc_list); device_create_file(&dev->dev, &dev_attr_proc_list);
class_device_create(dsp_task_class, MKDEV(OMAP_DSP_TASK_MAJOR, minor), cdev = class_device_create(dsp_task_class, NULL,
NULL, "dsptask%d", minor); MKDEV(OMAP_DSP_TASK_MAJOR, minor),
NULL, "dsptask%d", minor);
init_waitqueue_head(&dev->state_wait_q); init_waitqueue_head(&dev->state_wait_q);
spin_lock_init(&dev->state_lock); spin_lock_init(&dev->state_lock);
......
...@@ -54,15 +54,8 @@ void __init omap_detect_sram(void) ...@@ -54,15 +54,8 @@ void __init omap_detect_sram(void)
omap_sram_size = 0x4000; /* 16K */ omap_sram_size = 0x4000; /* 16K */
else if (cpu_is_omap1611()) else if (cpu_is_omap1611())
omap_sram_size = 0x3e800; /* 250K */ omap_sram_size = 0x3e800; /* 250K */
#if 0 /* FIXME: Enable after adding 24xx cpu detection */
else if (cpu_is_omap2410())
omap_sram_size = 0x10000; /* 64K */
else if (cpu_is_omap2420()) else if (cpu_is_omap2420())
omap_sram_size = 0xa0014; /* 640K */ omap_sram_size = 0xa0014; /* 640K */
#else
else if (cpu_is_omap24xx())
omap_sram_size = 0x10000; /* 64K */
#endif
else { else {
printk(KERN_ERR "Could not detect SRAM size\n"); printk(KERN_ERR "Could not detect SRAM size\n");
omap_sram_size = 0x4000; omap_sram_size = 0x4000;
...@@ -72,7 +65,11 @@ void __init omap_detect_sram(void) ...@@ -72,7 +65,11 @@ void __init omap_detect_sram(void)
} }
static struct map_desc omap_sram_io_desc[] __initdata = { static struct map_desc omap_sram_io_desc[] __initdata = {
{ OMAP1_SRAM_VA, OMAP1_SRAM_PA, 0, MT_DEVICE } { /* .length gets filled in at runtime */
.virtual = OMAP1_SRAM_VA,
.pfn = __phys_to_pfn(OMAP1_SRAM_PA),
.type = MT_DEVICE
}
}; };
/* /*
...@@ -87,7 +84,7 @@ void __init omap_map_sram(void) ...@@ -87,7 +84,7 @@ void __init omap_map_sram(void)
if (cpu_is_omap24xx()) { if (cpu_is_omap24xx()) {
omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA; omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA;
omap_sram_io_desc[0].physical = OMAP2_SRAM_PA; omap_sram_io_desc[0].pfn = __phys_to_pfn(OMAP2_SRAM_PA);
} }
omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE; omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE;
...@@ -95,7 +92,7 @@ void __init omap_map_sram(void) ...@@ -95,7 +92,7 @@ void __init omap_map_sram(void)
iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n",
omap_sram_io_desc[0].physical, omap_sram_io_desc[0].virtual, omap_sram_io_desc[0].pfn, omap_sram_io_desc[0].virtual,
omap_sram_io_desc[0].length); omap_sram_io_desc[0].length);
/* /*
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/bcd.h> #include <linux/bcd.h>
...@@ -709,36 +709,30 @@ static void set_rtc_irq_bit(unsigned char bit) ...@@ -709,36 +709,30 @@ static void set_rtc_irq_bit(unsigned char bit)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static struct timespec rtc_delta; static struct timespec rtc_delta;
static int rtc_suspend(struct device *dev, pm_message_t message, u32 level) static int rtc_suspend(struct device *dev, pm_message_t state)
{ {
struct rtc_time rtc_tm; struct rtc_time rtc_tm;
struct timespec time; struct timespec time;
if (level == SUSPEND_POWER_DOWN) time.tv_nsec = 0;
{ get_rtc_time(&rtc_tm);
time.tv_nsec = 0; rtc_tm_to_time(&rtc_tm, &time.tv_sec);
get_rtc_time(&rtc_tm);
rtc_tm_to_time(&rtc_tm, &time.tv_sec);
save_time_delta(&rtc_delta, &time); save_time_delta(&rtc_delta, &time);
}
return 0; return 0;
} }
static int rtc_resume(struct device *dev, u32 level) static int rtc_resume(struct device *dev)
{ {
struct rtc_time rtc_tm; struct rtc_time rtc_tm;
struct timespec time; struct timespec time;
if (level == RESUME_POWER_ON) time.tv_nsec = 0;
{ get_rtc_time(&rtc_tm);
time.tv_nsec = 0; rtc_tm_to_time(&rtc_tm, &time.tv_sec);
get_rtc_time(&rtc_tm);
rtc_tm_to_time(&rtc_tm, &time.tv_sec);
restore_time_delta(&rtc_delta, &time); restore_time_delta(&rtc_delta, &time);
}
return 0; return 0;
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -335,16 +335,16 @@ static int __exit omap_wdt_remove(struct device *dev) ...@@ -335,16 +335,16 @@ static int __exit omap_wdt_remove(struct device *dev)
* may not play well enough with NOWAYOUT... * may not play well enough with NOWAYOUT...
*/ */
static int omap_wdt_suspend(struct device *dev, pm_message_t mesg, u32 level) static int omap_wdt_suspend(struct device *dev, pm_message_t state)
{ {
if (level == SUSPEND_POWER_DOWN && omap_wdt_users) if (omap_wdt_users)
omap_wdt_disable(); omap_wdt_disable();
return 0; return 0;
} }
static int omap_wdt_resume(struct device *dev, u32 level) static int omap_wdt_resume(struct device *dev)
{ {
if (level == RESUME_POWER_ON && omap_wdt_users) { if (omap_wdt_users) {
omap_wdt_enable(); omap_wdt_enable();
omap_wdt_ping(); omap_wdt_ping();
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h> #include <asm/hardware/clock.h>
......
...@@ -16,6 +16,7 @@ obj-$(CONFIG_TPS65010) += tps65010.o ...@@ -16,6 +16,7 @@ obj-$(CONFIG_TPS65010) += tps65010.o
obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o
obj-$(CONFIG_GPIOEXPANDER_OMAP) += gpio_expander_omap.o obj-$(CONFIG_GPIOEXPANDER_OMAP) += gpio_expander_omap.o
obj-$(CONFIG_MENELAUS) += menelaus.o obj-$(CONFIG_MENELAUS) += menelaus.o
obj-$(CONFIG_RTC_X1205_I2C) += x1205.o
ifeq ($(CONFIG_I2C_DEBUG_CHIP),y) ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
EXTRA_CFLAGS += -DDEBUG EXTRA_CFLAGS += -DDEBUG
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware.h> #include <asm/hardware.h>
...@@ -1148,57 +1148,45 @@ static void innovator_ps2_device_release(struct device *dev) ...@@ -1148,57 +1148,45 @@ static void innovator_ps2_device_release(struct device *dev)
/* Nothing */ /* Nothing */
} }
static int innovator_ps2_suspend(struct device *dev, u32 state, u32 level) static int innovator_ps2_suspend(struct device *dev, pm_message_t state)
{ {
u8 pmcomm; u8 pmcomm;
/*
switch(level) { * Set SUS_STATE in REG_PM_COMM (Page 0 R0). This will cause
case SUSPEND_DISABLE: * PM_MOD bits of REG_PM_STATUS to show suspended state,
* but the SUS_STAT bit of REG_PM_STATUS will continue to
/* * reflect the state of the _HSUS pin.
* Set SUS_STATE in REG_PM_COMM (Page 0 R0). This will cause */
* PM_MOD bits of REG_PM_STATUS to show suspended state,
* but the SUS_STAT bit of REG_PM_STATUS will continue to
* reflect the state of the _HSUS pin.
*/
if (write_reg(REG_PAGENO, 0) < 0) if (write_reg(REG_PAGENO, 0) < 0)
printk("ps2 suspend: write_reg REG_PAGENO error\n"); printk("ps2 suspend: write_reg REG_PAGENO error\n");
if (read_reg(REG_PM_COMM, &pmcomm) < 0) if (read_reg(REG_PM_COMM, &pmcomm) < 0)
printk("ps2 suspend: read_reg REG_PM_COMM error\n"); printk("ps2 suspend: read_reg REG_PM_COMM error\n");
if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0) if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0)
printk("ps2 suspend: write_reg REG_PM_COMM error\n"); printk("ps2 suspend: write_reg REG_PM_COMM error\n");
break;
}
return 0; return 0;
} }
static int innovator_ps2_resume(struct device *dev, u32 level) static int innovator_ps2_resume(struct device *dev)
{ {
u8 pmcomm; u8 pmcomm;
switch(level) { /*
case RESUME_ENABLE: * Clear SUS_STATE from REG_PM_COMM (Page 0 R0).
*/
/*
* Clear SUS_STATE from REG_PM_COMM (Page 0 R0).
*/
if (write_reg(REG_PAGENO, 0) < 0) if (write_reg(REG_PAGENO, 0) < 0)
printk("ps2 resume: write_reg REG_PAGENO error\n"); printk("ps2 resume: write_reg REG_PAGENO error\n");
if (read_reg(REG_PM_COMM, &pmcomm) < 0)
printk("ps2 resume: read_reg REG_PM_COMM error\n");
if (write_reg(REG_PM_COMM, pmcomm & ~SUS_STATE) < 0) if (read_reg(REG_PM_COMM, &pmcomm) < 0)
printk("ps2 resume: write_reg REG_PM_COMM error\n"); printk("ps2 resume: read_reg REG_PM_COMM error\n");
break; if (write_reg(REG_PM_COMM, pmcomm & ~SUS_STATE) < 0)
} printk("ps2 resume: write_reg REG_PM_COMM error\n");
return 0; return 0;
} }
......
...@@ -196,22 +196,14 @@ static int __exit omap_ts_remove(struct device *dev) ...@@ -196,22 +196,14 @@ static int __exit omap_ts_remove(struct device *dev)
return 0; return 0;
} }
static int omap_ts_suspend(struct device *dev, pm_message_t mesg, u32 level) static int omap_ts_suspend(struct device *dev, pm_message_t state)
{ {
if (level != SUSPEND_POWER_DOWN) {
return 0;
}
ts_omap.dev->disable(); ts_omap.dev->disable();
return 0; return 0;
} }
static int omap_ts_resume(struct device *dev, u32 level) static int omap_ts_resume(struct device *dev)
{ {
if (level != RESUME_POWER_ON) {
return 0;
}
ts_omap.dev->enable(); ts_omap.dev->enable();
return 0; return 0;
} }
......
...@@ -914,48 +914,39 @@ camera_core_open(struct inode *inode, struct file *file) ...@@ -914,48 +914,39 @@ camera_core_open(struct inode *inode, struct file *file)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int camera_core_suspend(struct device *dev, u32 state, u32 level) static int camera_core_suspend(struct device *dev, pm_message_t state)
{ {
struct camera_device *cam = dev_get_drvdata(dev); struct camera_device *cam = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
spin_lock(&cam->img_lock); spin_lock(&cam->img_lock);
switch (level) { if (cam->active) {
case SUSPEND_POWER_DOWN: cam->cam_hardware->close(cam->hardware_data);
if (cam->active) {
cam->cam_hardware->close(cam->hardware_data);
}
cam->cam_sensor->power_off(cam->sensor_data);
break;
} }
cam->cam_sensor->power_off(cam->sensor_data);
spin_unlock(&cam->img_lock); spin_unlock(&cam->img_lock);
return ret; return ret;
} }
static int camera_core_resume(struct device *dev, u32 level) static int camera_core_resume(struct device *dev)
{ {
struct camera_device *cam = dev_get_drvdata(dev); struct camera_device *cam = dev_get_drvdata(dev);
int ret = 0; int ret = 0;
spin_lock(&cam->img_lock); spin_lock(&cam->img_lock);
switch (level) { cam->cam_sensor->power_on(cam->sensor_data);
case RESUME_POWER_ON: if (cam->active) {
cam->cam_sensor->power_on(cam->sensor_data); cam->capture_completed = 1;
if (cam->active) { cam->cam_hardware->open(cam->hardware_data);
cam->capture_completed = 1; cam->cam_hardware->set_xclk(cam->xclk, cam->hardware_data);
cam->cam_hardware->open(cam->hardware_data);
cam->cam_hardware->set_xclk(cam->xclk, cam->hardware_data);
cam->cam_sensor->configure(&cam->pix, cam->xclk,
&cam->cparm.timeperframe, cam->sensor_data);
camera_core_sgdma_process(cam);
}
break;
}
cam->cam_sensor->configure(&cam->pix, cam->xclk,
&cam->cparm.timeperframe,
cam->sensor_data);
camera_core_sgdma_process(cam);
}
spin_unlock(&cam->img_lock); spin_unlock(&cam->img_lock);
return ret; return ret;
} }
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
......
...@@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_BLOCK) += mmc_block.o ...@@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
obj-$(CONFIG_MMC_ARMMMCI) += mmci.o obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
obj-$(CONFIG_MMC_PXA) += pxamci.o obj-$(CONFIG_MMC_PXA) += pxamci.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_WBSD) += wbsd.o
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
obj-$(CONFIG_MMC_OMAP) += omap.o obj-$(CONFIG_MMC_OMAP) += omap.o
mmc_core-y := mmc.o mmc_queue.o mmc_sysfs.o mmc_core-y := mmc.o mmc_queue.o mmc_sysfs.o
...@@ -87,6 +87,12 @@ static void mmc_blk_put(struct mmc_blk_data *md) ...@@ -87,6 +87,12 @@ static void mmc_blk_put(struct mmc_blk_data *md)
up(&open_lock); up(&open_lock);
} }
static inline int mmc_blk_readonly(struct mmc_card *card)
{
return mmc_card_readonly(card) ||
!(card->csd.cmdclass & CCC_BLOCK_WRITE);
}
static int mmc_blk_open(struct inode *inode, struct file *filp) static int mmc_blk_open(struct inode *inode, struct file *filp)
{ {
struct mmc_blk_data *md; struct mmc_blk_data *md;
...@@ -99,7 +105,7 @@ static int mmc_blk_open(struct inode *inode, struct file *filp) ...@@ -99,7 +105,7 @@ static int mmc_blk_open(struct inode *inode, struct file *filp)
ret = 0; ret = 0;
if ((filp->f_mode & FMODE_WRITE) && if ((filp->f_mode & FMODE_WRITE) &&
mmc_card_readonly(md->queue.card)) mmc_blk_readonly(md->queue.card))
ret = -EROFS; ret = -EROFS;
} }
...@@ -496,7 +502,7 @@ static int mmc_blk_probe(struct mmc_card *card) ...@@ -496,7 +502,7 @@ static int mmc_blk_probe(struct mmc_card *card)
printk(KERN_INFO "%s: %s %s %dKiB %s\n", printk(KERN_INFO "%s: %s %s %dKiB %s\n",
md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
(card->csd.capacity << card->csd.read_blkbits) / 1024, (card->csd.capacity << card->csd.read_blkbits) / 1024,
mmc_card_readonly(card)?"(ro)":""); mmc_blk_readonly(card)?"(ro)":"");
mmc_set_drvdata(card, md); mmc_set_drvdata(card, md);
add_disk(md->disk); add_disk(md->disk);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -618,8 +618,6 @@ static void mmc_omap_switch_timer(unsigned long arg) ...@@ -618,8 +618,6 @@ static void mmc_omap_switch_timer(unsigned long arg)
* for MMC state? */ * for MMC state? */
static void mmc_omap_switch_callback(unsigned long data, u8 mmc_mask) static void mmc_omap_switch_callback(unsigned long data, u8 mmc_mask)
{ {
struct mmc_omap_host *host = (struct mmc_omap_host *) data;
if (machine_is_omap_h4()) { if (machine_is_omap_h4()) {
if (mmc_mask & 0x1) if (mmc_mask & 0x1)
printk("XXX card in slot 1\n"); printk("XXX card in slot 1\n");
...@@ -683,7 +681,7 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data) ...@@ -683,7 +681,7 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data)
data_addr = io_v2p((void __force *) host->base) + OMAP_MMC_REG_DATA; data_addr = io_v2p((void __force *) host->base) + OMAP_MMC_REG_DATA;
frame = 1 << data->blksz_bits; frame = 1 << data->blksz_bits;
count = sg_dma_len(sg); count = (u32)sg_dma_len(sg);
/* the MMC layer is confused about single block writes... */ /* the MMC layer is confused about single block writes... */
if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) { if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) {
...@@ -1367,7 +1365,7 @@ static int __exit mmc_omap_remove(struct device *dev) ...@@ -1367,7 +1365,7 @@ static int __exit mmc_omap_remove(struct device *dev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int mmc_omap_suspend(struct device *dev, pm_message_t mesg, u32 level) static int mmc_omap_suspend(struct device *dev, pm_message_t mesg)
{ {
int ret = 0; int ret = 0;
struct mmc_omap_host *host = dev_get_drvdata(dev); struct mmc_omap_host *host = dev_get_drvdata(dev);
...@@ -1386,7 +1384,7 @@ static int mmc_omap_suspend(struct device *dev, pm_message_t mesg, u32 level) ...@@ -1386,7 +1384,7 @@ static int mmc_omap_suspend(struct device *dev, pm_message_t mesg, u32 level)
return ret; return ret;
} }
static int mmc_omap_resume(struct device *dev, u32 level) static int mmc_omap_resume(struct device *dev)
{ {
int ret = 0; int ret = 0;
struct mmc_omap_host *host = dev_get_drvdata(dev); struct mmc_omap_host *host = dev_get_drvdata(dev);
......
config FB_OMAP config FB_OMAP
tristate "OMAP frame buffer support (EXPERIMENTAL)" tristate "OMAP frame buffer support (EXPERIMENTAL)"
depends on FB depends on FB
select FB_SOFT_CURSOR
help help
Frame buffer driver for OMAP based boards. Frame buffer driver for OMAP based boards.
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/device.h> #include <linux/platform_device.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -873,7 +873,6 @@ static struct fb_ops omapfb_ops = { ...@@ -873,7 +873,6 @@ static struct fb_ops omapfb_ops = {
.fb_fillrect = cfb_fillrect, .fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea, .fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_cursor = soft_cursor,
.fb_blank = omapfb_blank, .fb_blank = omapfb_blank,
.fb_ioctl = omapfb_ioctl, .fb_ioctl = omapfb_ioctl,
.fb_check_var = omapfb_check_var, .fb_check_var = omapfb_check_var,
...@@ -1365,7 +1364,7 @@ static int omapfb_remove(struct device *dev) ...@@ -1365,7 +1364,7 @@ static int omapfb_remove(struct device *dev)
} }
/* PM suspend */ /* PM suspend */
static int omapfb_suspend(struct device *dev, pm_message_t mesg, u32 level) static int omapfb_suspend(struct device *dev, pm_message_t mesg)
{ {
struct omapfb_device *fbdev = dev_get_drvdata(dev); struct omapfb_device *fbdev = dev_get_drvdata(dev);
...@@ -1379,7 +1378,7 @@ static int omapfb_suspend(struct device *dev, pm_message_t mesg, u32 level) ...@@ -1379,7 +1378,7 @@ static int omapfb_suspend(struct device *dev, pm_message_t mesg, u32 level)
} }
/* PM resume */ /* PM resume */
static int omapfb_resume(struct device *dev, u32 level) static int omapfb_resume(struct device *dev)
{ {
struct omapfb_device *fbdev = dev_get_drvdata(dev); struct omapfb_device *fbdev = dev_get_drvdata(dev);
......
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