#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/notifier.h>
#include <asm/hardware.h>
/* Clocks in the DSP domain need api_ck. Just assume bootloader
* has not enabled any DSP clocks */
- if (p->enable_reg == DSP_IDLECT2) {
- printk(KERN_INFO "Skipping reset check for DSP domain clock \"%s\"\n",
- p->name);
+ if ((u32)p->enable_reg == DSP_IDLECT2) {
+ printk(KERN_INFO "Skipping reset check for DSP domain "
+ "clock \"%s\"\n", p->name);
continue;
}
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <asm/hardware.h>
#include <asm/io.h>
# ARM926T
config CPU_ARM926T
- bool "Support ARM926T processor" if ARCH_INTEGRATOR
- depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
+ bool "Support ARM926T processor"
+ 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
select CPU_32v5
select CPU_ABRT_EV5TJ
# ARMv6
config CPU_V6
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_ABRT_EV6
select CPU_CACHE_V6
select CPU_COPY_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.
# This defines the compiler instruction set which depends on the machine type.
config CPU_32v3
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <asm/hardware.h>
#include <asm/io.h>
void (*mem_rel_cb)(void);
};
struct cpustat cpustat = {
- .sem = __MUTEX_INITIALIZER(cpustat.sem),
+ .sem = __SEMAPHORE_INIT(cpustat.sem, 1),
.stat = CPUSTAT_RESET,
.icrmask = 0xffff,
};
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
}
#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) {
- case SUSPEND_NOTIFY:
- case SUSPEND_DISABLE:
- case SUSPEND_SAVE_STATE:
- break;
- case SUSPEND_POWER_DOWN:
- dsp_suspend();
- break;
- }
+ dsp_suspend();
return 0;
}
-static int dsp_drv_resume(struct device *dev, u32 level)
+static int dsp_drv_resume(struct device *dev)
{
- switch(level) {
- case RESUME_POWER_ON:
- dsp_resume();
- break;
- case RESUME_RESTORE_STATE:
- case RESUME_ENABLE:
- break;
- }
+ dsp_resume();
return 0;
}
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/delay.h>
+#include <linux/platform_device.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/ioctls.h>
{
int retval;
int i;
+ struct class_device *cdev;
retval = register_chrdev(OMAP_DSP_CTL_MAJOR, "dspctl",
&dsp_ctl_core_fops);
dsp_ctl_class = class_create(THIS_MODULE, "dspctl");
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,
dev_list[i].minor),
NULL, dev_list[i].devname);
#include <linux/fb.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
+#include <linux/platform_device.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/ioctls.h>
#define KMEM_POOL_INIT(name) \
{ \
- .sem = __MUTEX_INITIALIZER((name).sem), \
+ .sem = __SEMAPHORE_INIT((name).sem, 1), \
}
#define DECLARE_KMEM_POOL(name) \
struct kmem_pool name = KMEM_POOL_INIT(name)
#include <linux/module.h>
#include <linux/sched.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/init.h>
#include <asm/irq.h>
#include <asm/arch/dsp.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/poll.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mm.h>
static int taskdev_init(struct taskdev *dev, char *name, unsigned char minor)
{
+ struct class_device *cdev;
+
taskdev[minor] = dev;
INIT_LIST_HEAD(&dev->proc_list);
device_create_file(&dev->dev, &dev_attr_devname);
device_create_file(&dev->dev, &dev_attr_devstate);
device_create_file(&dev->dev, &dev_attr_proc_list);
- class_device_create(dsp_task_class, MKDEV(OMAP_DSP_TASK_MAJOR, minor),
- NULL, "dsptask%d", minor);
+ cdev = class_device_create(dsp_task_class, NULL,
+ MKDEV(OMAP_DSP_TASK_MAJOR, minor),
+ NULL, "dsptask%d", minor);
init_waitqueue_head(&dev->state_wait_q);
spin_lock_init(&dev->state_lock);
omap_sram_size = 0x4000; /* 16K */
else if (cpu_is_omap1611())
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())
omap_sram_size = 0xa0014; /* 640K */
-#else
- else if (cpu_is_omap24xx())
- omap_sram_size = 0x10000; /* 64K */
-#endif
else {
printk(KERN_ERR "Could not detect SRAM size\n");
omap_sram_size = 0x4000;
}
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
+ }
};
/*
if (cpu_is_omap24xx()) {
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;
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",
- 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);
/*
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#ifdef CONFIG_PM
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 timespec time;
- if (level == SUSPEND_POWER_DOWN)
- {
- time.tv_nsec = 0;
- get_rtc_time(&rtc_tm);
- rtc_tm_to_time(&rtc_tm, &time.tv_sec);
+ time.tv_nsec = 0;
+ 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;
}
-static int rtc_resume(struct device *dev, u32 level)
+static int rtc_resume(struct device *dev)
{
struct rtc_time rtc_tm;
struct timespec time;
- if (level == RESUME_POWER_ON)
- {
- time.tv_nsec = 0;
- get_rtc_time(&rtc_tm);
- rtc_tm_to_time(&rtc_tm, &time.tv_sec);
+ time.tv_nsec = 0;
+ 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;
}
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/err.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/moduleparam.h>
#include <asm/io.h>
* 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();
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_ping();
}
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/interrupt.h>
+#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/hardware/clock.h>
obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o
obj-$(CONFIG_GPIOEXPANDER_OMAP) += gpio_expander_omap.o
obj-$(CONFIG_MENELAUS) += menelaus.o
+obj-$(CONFIG_RTC_X1205_I2C) += x1205.o
ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
EXTRA_CFLAGS += -DDEBUG
#include <linux/poll.h>
#include <linux/string.h>
#include <linux/ioport.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/hardware.h>
/* 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;
-
- switch(level) {
- case SUSPEND_DISABLE:
-
- /*
- * 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.
- */
+ /*
+ * 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)
- printk("ps2 suspend: write_reg REG_PAGENO error\n");
+ if (write_reg(REG_PAGENO, 0) < 0)
+ printk("ps2 suspend: write_reg REG_PAGENO error\n");
- if (read_reg(REG_PM_COMM, &pmcomm) < 0)
- printk("ps2 suspend: read_reg REG_PM_COMM error\n");
+ if (read_reg(REG_PM_COMM, &pmcomm) < 0)
+ printk("ps2 suspend: read_reg REG_PM_COMM error\n");
- if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0)
- printk("ps2 suspend: write_reg REG_PM_COMM error\n");
- break;
- }
+ if (write_reg(REG_PM_COMM, pmcomm | SUS_STATE) < 0)
+ printk("ps2 suspend: write_reg REG_PM_COMM error\n");
return 0;
}
-static int innovator_ps2_resume(struct device *dev, u32 level)
+static int innovator_ps2_resume(struct device *dev)
{
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)
- 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_PAGENO, 0) < 0)
+ printk("ps2 resume: write_reg REG_PAGENO error\n");
- if (write_reg(REG_PM_COMM, pmcomm & ~SUS_STATE) < 0)
- printk("ps2 resume: write_reg REG_PM_COMM error\n");
+ if (read_reg(REG_PM_COMM, &pmcomm) < 0)
+ 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;
}
-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();
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();
return 0;
}
}
#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);
int ret = 0;
spin_lock(&cam->img_lock);
- switch (level) {
- case SUSPEND_POWER_DOWN:
- if (cam->active) {
- cam->cam_hardware->close(cam->hardware_data);
- }
- cam->cam_sensor->power_off(cam->sensor_data);
- break;
+ if (cam->active) {
+ cam->cam_hardware->close(cam->hardware_data);
}
-
+ cam->cam_sensor->power_off(cam->sensor_data);
spin_unlock(&cam->img_lock);
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);
int ret = 0;
spin_lock(&cam->img_lock);
- switch (level) {
- case RESUME_POWER_ON:
- cam->cam_sensor->power_on(cam->sensor_data);
- if (cam->active) {
- cam->capture_completed = 1;
- 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->power_on(cam->sensor_data);
+ if (cam->active) {
+ cam->capture_completed = 1;
+ 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);
+ }
spin_unlock(&cam->img_lock);
+
return ret;
}
#endif /* CONFIG_PM */
obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
obj-$(CONFIG_MMC_PXA) += pxamci.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o
+obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
obj-$(CONFIG_MMC_OMAP) += omap.o
mmc_core-y := mmc.o mmc_queue.o mmc_sysfs.o
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)
{
struct mmc_blk_data *md;
ret = 0;
if ((filp->f_mode & FMODE_WRITE) &&
- mmc_card_readonly(md->queue.card))
+ mmc_blk_readonly(md->queue.card))
ret = -EROFS;
}
printk(KERN_INFO "%s: %s %s %dKiB %s\n",
md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
(card->csd.capacity << card->csd.read_blkbits) / 1024,
- mmc_card_readonly(card)?"(ro)":"");
+ mmc_blk_readonly(card)?"(ro)":"");
mmc_set_drvdata(card, md);
add_disk(md->disk);
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/ioport.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
* for MMC state? */
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 (mmc_mask & 0x1)
printk("XXX card in slot 1\n");
data_addr = io_v2p((void __force *) host->base) + OMAP_MMC_REG_DATA;
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... */
if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) {
}
#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;
struct mmc_omap_host *host = dev_get_drvdata(dev);
return ret;
}
-static int mmc_omap_resume(struct device *dev, u32 level)
+static int mmc_omap_resume(struct device *dev)
{
int ret = 0;
struct mmc_omap_host *host = dev_get_drvdata(dev);
config FB_OMAP
tristate "OMAP frame buffer support (EXPERIMENTAL)"
depends on FB
- select FB_SOFT_CURSOR
help
Frame buffer driver for OMAP based boards.
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <asm/uaccess.h>
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
- .fb_cursor = soft_cursor,
.fb_blank = omapfb_blank,
.fb_ioctl = omapfb_ioctl,
.fb_check_var = omapfb_check_var,
}
/* 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);
}
/* 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);