Commit 99c537d1 authored by Tony Lindgren's avatar Tony Lindgren

Merge source.mvista.com:/home/git/linux-omap-2.6

parents cfd483b1 d3c38d7d
...@@ -1368,7 +1368,8 @@ static struct clk mcbsp5_fck = { ...@@ -1368,7 +1368,8 @@ static struct clk mcbsp5_fck = {
}; };
static struct clk mcspi1_ick = { static struct clk mcspi1_ick = {
.name = "mcspi1_ick", .name = "mcspi_ick",
.id = 1,
.parent = &l4_ck, .parent = &l4_ck,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
...@@ -1377,7 +1378,8 @@ static struct clk mcspi1_ick = { ...@@ -1377,7 +1378,8 @@ static struct clk mcspi1_ick = {
}; };
static struct clk mcspi1_fck = { static struct clk mcspi1_fck = {
.name = "mcspi1_fck", .name = "mcspi_fck",
.id = 1,
.parent = &func_48m_ck, .parent = &func_48m_ck,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
...@@ -1386,7 +1388,8 @@ static struct clk mcspi1_fck = { ...@@ -1386,7 +1388,8 @@ static struct clk mcspi1_fck = {
}; };
static struct clk mcspi2_ick = { static struct clk mcspi2_ick = {
.name = "mcspi2_ick", .name = "mcspi_ick",
.id = 2,
.parent = &l4_ck, .parent = &l4_ck,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE,
...@@ -1395,7 +1398,8 @@ static struct clk mcspi2_ick = { ...@@ -1395,7 +1398,8 @@ static struct clk mcspi2_ick = {
}; };
static struct clk mcspi2_fck = { static struct clk mcspi2_fck = {
.name = "mcspi2_fck", .name = "mcspi_fck",
.id = 2,
.parent = &func_48m_ck, .parent = &func_48m_ck,
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE,
...@@ -1404,7 +1408,8 @@ static struct clk mcspi2_fck = { ...@@ -1404,7 +1408,8 @@ static struct clk mcspi2_fck = {
}; };
static struct clk mcspi3_ick = { static struct clk mcspi3_ick = {
.name = "mcspi3_ick", .name = "mcspi_ick",
.id = 3,
.parent = &l4_ck, .parent = &l4_ck,
.flags = CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_ICLKEN2_CORE, .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE,
...@@ -1413,7 +1418,8 @@ static struct clk mcspi3_ick = { ...@@ -1413,7 +1418,8 @@ static struct clk mcspi3_ick = {
}; };
static struct clk mcspi3_fck = { static struct clk mcspi3_fck = {
.name = "mcspi3_fck", .name = "mcspi_fck",
.id = 3,
.parent = &func_48m_ck, .parent = &func_48m_ck,
.flags = CLOCK_IN_OMAP243X, .flags = CLOCK_IN_OMAP243X,
.enable_reg = (void __iomem *)&CM_FCLKEN2_CORE, .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE,
......
This diff is collapsed.
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o
obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o
objs-yy := camera_core.o objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o camera_core.o
objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o
objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o
objs-y$(CONFIG_MACH_OMAP_H4) += h4_sensor_power.o objs-y$(CONFIG_MACH_OMAP_H4) += h4_sensor_power.o
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include "camera_core.h" #include "camera_core.h"
struct camera_device *camera_dev; struct camera_device *camera_dev;
extern struct camera_sensor camera_sensor_if; extern struct omap_camera_sensor camera_sensor_if;
extern struct camera_hardware camera_hardware_if; extern struct camera_hardware camera_hardware_if;
static void camera_core_sgdma_process(struct camera_device *cam); static void camera_core_sgdma_process(struct camera_device *cam);
...@@ -324,7 +324,7 @@ static void ...@@ -324,7 +324,7 @@ static void
camera_core_vbq_release(struct videobuf_queue *q, struct videobuf_buffer *vb) camera_core_vbq_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{ {
videobuf_waiton(vb, 0, 0); videobuf_waiton(vb, 0, 0);
videobuf_dma_pci_unmap(NULL, &vb->dma); videobuf_dma_unmap(q, &vb->dma);
videobuf_dma_free(&vb->dma); videobuf_dma_free(&vb->dma);
vb->state = STATE_NEEDS_INIT; vb->state = STATE_NEEDS_INIT;
...@@ -374,7 +374,7 @@ camera_core_vbq_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, ...@@ -374,7 +374,7 @@ camera_core_vbq_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
spin_unlock(&cam->img_lock); spin_unlock(&cam->img_lock);
if (vb->state == STATE_NEEDS_INIT) if (vb->state == STATE_NEEDS_INIT)
err = videobuf_iolock(NULL, vb, NULL); err = videobuf_iolock(q, vb, NULL);
if (!err) if (!err)
vb->state = STATE_PREPARED; vb->state = STATE_PREPARED;
...@@ -1054,7 +1054,7 @@ static int __init camera_core_probe(struct platform_device *pdev) ...@@ -1054,7 +1054,7 @@ static int __init camera_core_probe(struct platform_device *pdev)
cam->xclk = cam->cam_hardware->set_xclk(cam->xclk, cam->hardware_data); cam->xclk = cam->cam_hardware->set_xclk(cam->xclk, cam->hardware_data);
/* initialize the sensor and define a default capture format cam->pix */ /* initialize the sensor and define a default capture format cam->pix */
cam->sensor_data = cam->cam_sensor->init(&cam->pix, &cam->pix2); cam->sensor_data = cam->cam_sensor->init(&cam->pix);
if (!cam->sensor_data) { if (!cam->sensor_data) {
cam->cam_hardware->disable(cam->hardware_data); cam->cam_hardware->disable(cam->hardware_data);
printk(KERN_ERR CAM_NAME ": cannot initialize sensor\n"); printk(KERN_ERR CAM_NAME ": cannot initialize sensor\n");
......
...@@ -90,7 +90,7 @@ struct camera_device { ...@@ -90,7 +90,7 @@ struct camera_device {
unsigned long xclk; unsigned long xclk;
/* Pointer to the sensor interface ops */ /* Pointer to the sensor interface ops */
struct camera_sensor *cam_sensor; struct omap_camera_sensor *cam_sensor;
void *sensor_data; void *sensor_data;
/* Pointer to the camera interface hardware ops */ /* Pointer to the camera interface hardware ops */
......
/* /*
* drivers/media/video/omap/sensor_if.h * drivers/media/video/omap/sensor_if.h
* *
...@@ -18,12 +17,12 @@ ...@@ -18,12 +17,12 @@
#ifndef OMAP_SENSOR_IF_H #ifndef OMAP_SENSOR_IF_H
#define OMAP_SENSOR_IF_H #define OMAP_SENSOR_IF_H
#define LEN_SENSOR_NAME 31
struct camera_sensor { #define OMAP_SENSOR_NAME_LEN 31
struct omap_camera_sensor {
unsigned int version; unsigned int version;
char name[LEN_SENSOR_NAME + 1]; char name[OMAP_SENSOR_NAME_LEN + 1];
void *(*init)(struct v4l2_pix_format *); void *(*init)(struct v4l2_pix_format *);
int (*cleanup)(void *); int (*cleanup)(void *);
...@@ -32,17 +31,17 @@ struct camera_sensor { ...@@ -32,17 +31,17 @@ struct camera_sensor {
int (*power_off)(void *); int (*power_off)(void *);
int (*enum_pixformat)(struct v4l2_fmtdesc *, void *); int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
int (*try_format) (struct v4l2_pix_format *, void *); int (*try_format)(struct v4l2_pix_format *, void *);
unsigned long (*calc_xclk) (struct v4l2_pix_format *, unsigned long (*calc_xclk)(struct v4l2_pix_format *,
struct v4l2_fract *, void *); struct v4l2_fract *, void *);
int (*configure) (struct v4l2_pix_format *, unsigned long, int (*configure)(struct v4l2_pix_format *, unsigned long,
struct v4l2_fract *, void *); struct v4l2_fract *, void *);
int (*query_control) (struct v4l2_queryctrl *, void *); int (*query_control) (struct v4l2_queryctrl *, void *);
int (*get_control) (struct v4l2_control *, void *); int (*get_control)(struct v4l2_control *, void *);
int (*set_control) (struct v4l2_control *, void *); int (*set_control)(struct v4l2_control *, void *);
}; };
......
...@@ -1143,7 +1143,7 @@ static struct i2c_driver ov9640sensor_i2c_driver = { ...@@ -1143,7 +1143,7 @@ static struct i2c_driver ov9640sensor_i2c_driver = {
* initialization is successful. * initialization is successful.
*/ */
static void * static void *
ov9640sensor_init(struct v4l2_pix_format *pix, struct v4l2_pix_format *pix2) ov9640sensor_init(struct v4l2_pix_format *pix)
{ {
struct ov9640_sensor *sensor = &ov9640; struct ov9640_sensor *sensor = &ov9640;
int err; int err;
...@@ -1177,7 +1177,7 @@ ov9640sensor_init(struct v4l2_pix_format *pix, struct v4l2_pix_format *pix2) ...@@ -1177,7 +1177,7 @@ ov9640sensor_init(struct v4l2_pix_format *pix, struct v4l2_pix_format *pix2)
return (void *)sensor; return (void *)sensor;
} }
struct camera_sensor camera_sensor_if = { struct omap_camera_sensor camera_sensor_if = {
.version = 0x01, .version = 0x01,
.name = "OV9640", .name = "OV9640",
.parallel_mode = PAR_MODE_NOBT8, .parallel_mode = PAR_MODE_NOBT8,
......
This diff is collapsed.
#ifndef DRIVERS_MEDIA_MMC_OMAP_H
#define DRIVERS_MEDIA_MMC_OMAP_H
#define OMAP_MMC_REG_CMD 0x00
#define OMAP_MMC_REG_ARGL 0x04
#define OMAP_MMC_REG_ARGH 0x08
#define OMAP_MMC_REG_CON 0x0c
#define OMAP_MMC_REG_STAT 0x10
#define OMAP_MMC_REG_IE 0x14
#define OMAP_MMC_REG_CTO 0x18
#define OMAP_MMC_REG_DTO 0x1c
#define OMAP_MMC_REG_DATA 0x20
#define OMAP_MMC_REG_BLEN 0x24
#define OMAP_MMC_REG_NBLK 0x28
#define OMAP_MMC_REG_BUF 0x2c
#define OMAP_MMC_REG_SDIO 0x34
#define OMAP_MMC_REG_REV 0x3c
#define OMAP_MMC_REG_RSP0 0x40
#define OMAP_MMC_REG_RSP1 0x44
#define OMAP_MMC_REG_RSP2 0x48
#define OMAP_MMC_REG_RSP3 0x4c
#define OMAP_MMC_REG_RSP4 0x50
#define OMAP_MMC_REG_RSP5 0x54
#define OMAP_MMC_REG_RSP6 0x58
#define OMAP_MMC_REG_RSP7 0x5c
#define OMAP_MMC_REG_IOSR 0x60
#define OMAP_MMC_REG_SYSC 0x64
#define OMAP_MMC_REG_SYSS 0x68
#define OMAP_MMC_STAT_CARD_ERR (1 << 14)
#define OMAP_MMC_STAT_CARD_IRQ (1 << 13)
#define OMAP_MMC_STAT_OCR_BUSY (1 << 12)
#define OMAP_MMC_STAT_A_EMPTY (1 << 11)
#define OMAP_MMC_STAT_A_FULL (1 << 10)
#define OMAP_MMC_STAT_CMD_CRC (1 << 8)
#define OMAP_MMC_STAT_CMD_TOUT (1 << 7)
#define OMAP_MMC_STAT_DATA_CRC (1 << 6)
#define OMAP_MMC_STAT_DATA_TOUT (1 << 5)
#define OMAP_MMC_STAT_END_BUSY (1 << 4)
#define OMAP_MMC_STAT_END_OF_DATA (1 << 3)
#define OMAP_MMC_STAT_CARD_BUSY (1 << 2)
#define OMAP_MMC_STAT_END_OF_CMD (1 << 0)
#define OMAP_MMC_READ(base, reg) __raw_readw((base) + OMAP_MMC_REG_##reg)
#define OMAP_MMC_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MMC_REG_##reg)
/*
* Command types
*/
#define OMAP_MMC_CMDTYPE_BC 0
#define OMAP_MMC_CMDTYPE_BCR 1
#define OMAP_MMC_CMDTYPE_AC 2
#define OMAP_MMC_CMDTYPE_ADTC 3
#endif
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
...@@ -84,6 +86,8 @@ struct omap2_mcspi { ...@@ -84,6 +86,8 @@ struct omap2_mcspi {
spinlock_t lock; spinlock_t lock;
struct list_head msg_queue; struct list_head msg_queue;
struct spi_master *master; struct spi_master *master;
struct clk *ick;
struct clk *fck;
}; };
struct omap2_mcspi_cs { struct omap2_mcspi_cs {
...@@ -456,7 +460,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) ...@@ -456,7 +460,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
master = spi_alloc_master(&pdev->dev, sizeof *mcspi); master = spi_alloc_master(&pdev->dev, sizeof *mcspi);
if (!master) { if (master == NULL) {
dev_err(&pdev->dev, "master allocation failed\n"); dev_err(&pdev->dev, "master allocation failed\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -485,28 +489,56 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) ...@@ -485,28 +489,56 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
spin_lock_init(&mcspi->lock); spin_lock_init(&mcspi->lock);
INIT_LIST_HEAD(&mcspi->msg_queue); INIT_LIST_HEAD(&mcspi->msg_queue);
mcspi->ick = clk_get(&pdev->dev, "mcspi_ick");
if (IS_ERR(mcspi->ick)) {
dev_err(&pdev->dev, "can't get mcspi_ick\n");
status = PTR_ERR(mcspi->ick);
goto err1;
}
clk_enable(mcspi->ick);
mcspi->fck = clk_get(&pdev->dev, "mcspi_fck");
if (IS_ERR(mcspi->fck)) {
dev_err(&pdev->dev, "can't get mcspi_fck\n");
status = PTR_ERR(mcspi->fck);
goto err2;
}
clk_enable(mcspi->fck);
if (omap2_mcspi_reset(master) < 0) if (omap2_mcspi_reset(master) < 0)
goto err1; goto err3;
status = spi_register_master(master); status = spi_register_master(master);
if (status < 0) if (status < 0)
goto err1; goto err3;
return status; return status;
err1: err3:
clk_disable(mcspi->fck);
clk_put(mcspi->fck);
err2:
clk_disable(mcspi->ick);
clk_put(mcspi->ick);
err1:
class_device_put(&master->cdev); class_device_put(&master->cdev);
err0: err0:
return status; return status;
} }
static int __devexit omap2_mcspi_remove(struct platform_device *pdev) static int __devexit omap2_mcspi_remove(struct platform_device *pdev)
{ {
struct spi_master *master; struct spi_master *master;
struct omap2_mcspi *mcspi;
master = dev_get_drvdata(&pdev->dev); master = dev_get_drvdata(&pdev->dev);
spi_unregister_master(master); spi_unregister_master(master);
mcspi = class_get_devdata(&master->cdev);
clk_disable(mcspi->fck);
clk_put(mcspi->fck);
clk_disable(mcspi->ick);
clk_put(mcspi->ick);
class_device_put(&master->cdev);
return 0; return 0;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#define OMAP_TAG_UART 0x4f07 #define OMAP_TAG_UART 0x4f07
#define OMAP_TAG_FBMEM 0x4f08 #define OMAP_TAG_FBMEM 0x4f08
#define OMAP_TAG_STI_CONSOLE 0x4f09 #define OMAP_TAG_STI_CONSOLE 0x4f09
#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
#define OMAP_TAG_BOOT_REASON 0x4f80 #define OMAP_TAG_BOOT_REASON 0x4f80
#define OMAP_TAG_FLASH_PART 0x4f81 #define OMAP_TAG_FLASH_PART 0x4f81
...@@ -62,6 +63,12 @@ struct omap_sti_console_config { ...@@ -62,6 +63,12 @@ struct omap_sti_console_config {
u8 channel; u8 channel;
}; };
struct omap_camera_sensor_config {
u16 reset_gpio;
int (*power_on)(void * data);
int (*power_off)(void * data);
};
struct omap_usb_config { struct omap_usb_config {
/* Configure drivers according to the connectors on your board: /* Configure drivers according to the connectors on your board:
* - "A" connector (rectagular) * - "A" connector (rectagular)
......
...@@ -7,10 +7,13 @@ ...@@ -7,10 +7,13 @@
#ifndef __ASM_ARCH_MENELAUS_H #ifndef __ASM_ARCH_MENELAUS_H
#define __ASM_ARCH_MENELAUS_H #define __ASM_ARCH_MENELAUS_H
extern void menelaus_mmc_register(void (*callback)(unsigned long data, u8 card_mask), extern int menelaus_mmc_register(void (*callback)(unsigned long data, u8 card_mask),
unsigned long data); unsigned long data);
extern void menelaus_mmc_remove(void); extern int menelaus_mmc_remove(void);
extern void menelaus_mmc_opendrain(int enable); extern int menelaus_mmc_opendrain(int enable);
extern int menelaus_set_vmem(unsigned int mV);
extern int menelaus_set_vio(unsigned int mV);
#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS) #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
#define omap_has_menelaus() 1 #define omap_has_menelaus() 1
......
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