* [PATCH v2 11/34] media: mx1_camera: remove the driver
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
@ 2012-09-20 6:45 ` Shawn Guo
2012-09-20 12:56 ` Mauro Carvalho Chehab
2012-09-20 6:45 ` [PATCH v2 13/34] dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h Shawn Guo
` (4 subsequent siblings)
5 siblings, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sascha Hauer, Javier Martin, Rob Herring, Arnd Bergmann,
Shawn Guo, Paulius Zaleckas, Guennadi Liakhovetski,
Mauro Carvalho Chehab, linux-media
The mx1_camera driver has been broken for a few release cycles since
commit 6bd0812 (dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c).
It seems there is no one even compile tested it since then, as doing
so will end up with the following error.
CC drivers/media/video/mx1_camera.o
In file included from drivers/media/video/mx1_camera.c:44:0:
arch/arm/mach-imx/include/mach/dma-mx1-mx2.h:8:25: fatal error: mach/dma-v1.h: No such file or directory
It looks that all the related folks have known the breakage [1], but
no one shows the interest to bring it back to work. Thus it becomes
a piece of unmaintained code, so let's remove it.
[1] https://lkml.org/lkml/2012/2/9/171
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media@vger.kernel.org
---
arch/arm/mach-imx/Makefile | 3 -
arch/arm/mach-imx/clk-imx1.c | 1 -
arch/arm/mach-imx/devices/Kconfig | 3 -
arch/arm/mach-imx/devices/Makefile | 1 -
arch/arm/mach-imx/devices/devices-common.h | 10 -
arch/arm/mach-imx/devices/platform-mx1-camera.c | 42 --
arch/arm/mach-imx/mx1-camera-fiq-ksym.c | 18 -
arch/arm/mach-imx/mx1-camera-fiq.S | 35 -
drivers/media/video/Kconfig | 12 -
drivers/media/video/Makefile | 1 -
drivers/media/video/mx1_camera.c | 889 -----------------------
include/linux/platform_data/camera-mx1.h | 35 -
12 files changed, 1050 deletions(-)
delete mode 100644 arch/arm/mach-imx/devices/platform-mx1-camera.c
delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq-ksym.c
delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq.S
delete mode 100644 drivers/media/video/mx1_camera.c
delete mode 100644 include/linux/platform_data/camera-mx1.h
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index fe47b71..538d0ee 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -35,9 +35,6 @@ obj-y += ssi-fiq.o
obj-y += ssi-fiq-ksym.o
endif
-# Support for CMOS sensor interface
-obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
-
# i.MX1 based machines
obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c
index b5f90cc..ebfffd2 100644
--- a/arch/arm/mach-imx/clk-imx1.c
+++ b/arch/arm/mach-imx/clk-imx1.c
@@ -84,7 +84,6 @@ int __init mx1_clocks_init(unsigned long fref)
i, PTR_ERR(clk[i]));
clk_register_clkdev(clk[dma_gate], "ahb", "imx-dma");
- clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
clk_register_clkdev(clk[mma_gate], "mma", NULL);
clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
clk_register_clkdev(clk[per1], "per", "imx-gpt.0");
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
index cb3e3ee..09d796e 100644
--- a/arch/arm/mach-imx/devices/Kconfig
+++ b/arch/arm/mach-imx/devices/Kconfig
@@ -46,9 +46,6 @@ config IMX_HAVE_PLATFORM_IMX_UDC
config IMX_HAVE_PLATFORM_IPU_CORE
bool
-config IMX_HAVE_PLATFORM_MX1_CAMERA
- bool
-
config IMX_HAVE_PLATFORM_MX2_CAMERA
bool
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile
index ff22ed1..3cfdc37 100644
--- a/arch/arm/mach-imx/devices/Makefile
+++ b/arch/arm/mach-imx/devices/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index 9e3e3d8..34419b2 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -199,16 +199,6 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
const struct imx_ipu_core_data *data,
struct mx3fb_platform_data *pdata);
-#include <linux/platform_data/camera-mx1.h>
-struct imx_mx1_camera_data {
- resource_size_t iobase;
- resource_size_t iosize;
- resource_size_t irq;
-};
-struct platform_device *__init imx_add_mx1_camera(
- const struct imx_mx1_camera_data *data,
- const struct mx1_camera_pdata *pdata);
-
#include <linux/platform_data/camera-mx2.h>
struct imx_mx2_camera_data {
resource_size_t iobasecsi;
diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c
deleted file mode 100644
index 756b0e6..0000000
--- a/arch/arm/mach-imx/devices/platform-mx1-camera.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 as published by the
- * Free Software Foundation.
- */
-#include <mach/hardware.h>
-#include "devices-common.h"
-
-#define imx_mx1_camera_data_entry_single(soc, _size) \
- { \
- .iobase = soc ## _CSI ## _BASE_ADDR, \
- .iosize = _size, \
- .irq = soc ## _INT_CSI, \
- }
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
- imx_mx1_camera_data_entry_single(MX1, 10);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-struct platform_device *__init imx_add_mx1_camera(
- const struct imx_mx1_camera_data *data,
- const struct mx1_camera_pdata *pdata)
-{
- struct resource res[] = {
- {
- .start = data->iobase,
- .end = data->iobase + data->iosize - 1,
- .flags = IORESOURCE_MEM,
- }, {
- .start = data->irq,
- .end = data->irq,
- .flags = IORESOURCE_IRQ,
- },
- };
- return imx_add_platform_device_dmamask("mx1-camera", 0,
- res, ARRAY_SIZE(res),
- pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
diff --git a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
deleted file mode 100644
index fb38436..0000000
--- a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Exported ksyms of ARCH_MX1
- *
- * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/platform_device.h>
-#include <linux/module.h>
-
-#include <linux/platform_data/camera-mx1.h>
-
-/* IMX camera FIQ handler */
-EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
-EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
diff --git a/arch/arm/mach-imx/mx1-camera-fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S
deleted file mode 100644
index 9c69aa6..0000000
--- a/arch/arm/mach-imx/mx1-camera-fiq.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- *
- * Based on linux/arch/arm/lib/floppydma.S
- * Copyright (C) 1995, 1996 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-
- .text
- .global mx1_camera_sof_fiq_end
- .global mx1_camera_sof_fiq_start
-mx1_camera_sof_fiq_start:
- @ enable dma
- ldr r12, [r9]
- orr r12, r12, #0x00000001
- str r12, [r9]
- @ unmask DMA interrupt
- ldr r12, [r8]
- bic r12, r12, r13
- str r12, [r8]
- @ disable SOF interrupt
- ldr r12, [r10]
- bic r12, r12, #0x00010000
- str r12, [r10]
- @ clear SOF flag
- mov r12, #0x00010000
- str r12, [r11]
- @ return from FIQ
- subs pc, lr, #4
-mx1_camera_sof_fiq_end:
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index c128fac..e8b89a9 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -1118,18 +1118,6 @@ config SOC_CAMERA_OV9740
help
This is a ov9740 camera driver
-config MX1_VIDEO
- bool
-
-config VIDEO_MX1
- tristate "i.MX1/i.MXL CMOS Sensor Interface driver"
- depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA
- select FIQ
- select VIDEOBUF_DMA_CONTIG
- select MX1_VIDEO
- ---help---
- This is a v4l2 driver for the i.MX1/i.MXL CMOS Sensor Interface
-
config MX3_VIDEO
bool
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index b7da9fa..8624228 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -178,7 +178,6 @@ obj-$(CONFIG_VIDEO_OMAP2) += omap2cam.o
obj-$(CONFIG_SOC_CAMERA) += soc_camera.o soc_mediabus.o
obj-$(CONFIG_SOC_CAMERA_PLATFORM) += soc_camera_platform.o
# soc-camera host drivers have to be linked after camera drivers
-obj-$(CONFIG_VIDEO_MX1) += mx1_camera.o
obj-$(CONFIG_VIDEO_MX2) += mx2_camera.o
obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o
obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
deleted file mode 100644
index bbe7099..0000000
--- a/drivers/media/video/mx1_camera.c
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- * V4L2 Driver for i.MXL/i.MXL camera (CSI) host
- *
- * Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
- *
- * Based on PXA SoC camera driver
- * Copyright (C) 2006, Sascha Hauer, Pengutronix
- * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/clk.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/dma-mapping.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/mutex.h>
-#include <linux/platform_device.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/time.h>
-#include <linux/videodev2.h>
-
-#include <media/soc_camera.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-dev.h>
-#include <media/videobuf-dma-contig.h>
-#include <media/soc_mediabus.h>
-
-#include <asm/dma.h>
-#include <asm/fiq.h>
-#include <mach/dma-mx1-mx2.h>
-#include <mach/hardware.h>
-#include <mach/irqs.h>
-#include <linux/platform_data/camera-mx1.h>
-
-/*
- * CSI registers
- */
-#define CSICR1 0x00 /* CSI Control Register 1 */
-#define CSISR 0x08 /* CSI Status Register */
-#define CSIRXR 0x10 /* CSI RxFIFO Register */
-
-#define CSICR1_RXFF_LEVEL(x) (((x) & 0x3) << 19)
-#define CSICR1_SOF_POL (1 << 17)
-#define CSICR1_SOF_INTEN (1 << 16)
-#define CSICR1_MCLKDIV(x) (((x) & 0xf) << 12)
-#define CSICR1_MCLKEN (1 << 9)
-#define CSICR1_FCC (1 << 8)
-#define CSICR1_BIG_ENDIAN (1 << 7)
-#define CSICR1_CLR_RXFIFO (1 << 5)
-#define CSICR1_GCLK_MODE (1 << 4)
-#define CSICR1_DATA_POL (1 << 2)
-#define CSICR1_REDGE (1 << 1)
-#define CSICR1_EN (1 << 0)
-
-#define CSISR_SFF_OR_INT (1 << 25)
-#define CSISR_RFF_OR_INT (1 << 24)
-#define CSISR_STATFF_INT (1 << 21)
-#define CSISR_RXFF_INT (1 << 18)
-#define CSISR_SOF_INT (1 << 16)
-#define CSISR_DRDY (1 << 0)
-
-#define DRIVER_VERSION "0.0.2"
-#define DRIVER_NAME "mx1-camera"
-
-#define CSI_IRQ_MASK (CSISR_SFF_OR_INT | CSISR_RFF_OR_INT | \
- CSISR_STATFF_INT | CSISR_RXFF_INT | CSISR_SOF_INT)
-
-#define CSI_BUS_FLAGS (V4L2_MBUS_MASTER | V4L2_MBUS_HSYNC_ACTIVE_HIGH | \
- V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_VSYNC_ACTIVE_LOW | \
- V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_PCLK_SAMPLE_FALLING | \
- V4L2_MBUS_DATA_ACTIVE_HIGH | V4L2_MBUS_DATA_ACTIVE_LOW)
-
-#define MAX_VIDEO_MEM 16 /* Video memory limit in megabytes */
-
-/*
- * Structures
- */
-
-/* buffer for one video frame */
-struct mx1_buffer {
- /* common v4l buffer stuff -- must be first */
- struct videobuf_buffer vb;
- enum v4l2_mbus_pixelcode code;
- int inwork;
-};
-
-/*
- * i.MX1/i.MXL is only supposed to handle one camera on its Camera Sensor
- * Interface. If anyone ever builds hardware to enable more than
- * one camera, they will have to modify this driver too
- */
-struct mx1_camera_dev {
- struct soc_camera_host soc_host;
- struct soc_camera_device *icd;
- struct mx1_camera_pdata *pdata;
- struct mx1_buffer *active;
- struct resource *res;
- struct clk *clk;
- struct list_head capture;
-
- void __iomem *base;
- int dma_chan;
- unsigned int irq;
- unsigned long mclk;
-
- spinlock_t lock;
-};
-
-/*
- * Videobuf operations
- */
-static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
- unsigned int *size)
-{
- struct soc_camera_device *icd = vq->priv_data;
-
- *size = icd->sizeimage;
-
- if (!*count)
- *count = 32;
-
- if (*size * *count > MAX_VIDEO_MEM * 1024 * 1024)
- *count = (MAX_VIDEO_MEM * 1024 * 1024) / *size;
-
- dev_dbg(icd->parent, "count=%d, size=%d\n", *count, *size);
-
- return 0;
-}
-
-static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf)
-{
- struct soc_camera_device *icd = vq->priv_data;
- struct videobuf_buffer *vb = &buf->vb;
-
- BUG_ON(in_interrupt());
-
- dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
- vb, vb->baddr, vb->bsize);
-
- /*
- * This waits until this buffer is out of danger, i.e., until it is no
- * longer in STATE_QUEUED or STATE_ACTIVE
- */
- videobuf_waiton(vq, vb, 0, 0);
- videobuf_dma_contig_free(vq, vb);
-
- vb->state = VIDEOBUF_NEEDS_INIT;
-}
-
-static int mx1_videobuf_prepare(struct videobuf_queue *vq,
- struct videobuf_buffer *vb, enum v4l2_field field)
-{
- struct soc_camera_device *icd = vq->priv_data;
- struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
- int ret;
-
- dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
- vb, vb->baddr, vb->bsize);
-
- /* Added list head initialization on alloc */
- WARN_ON(!list_empty(&vb->queue));
-
- BUG_ON(NULL == icd->current_fmt);
-
- /*
- * I think, in buf_prepare you only have to protect global data,
- * the actual buffer is yours
- */
- buf->inwork = 1;
-
- if (buf->code != icd->current_fmt->code ||
- vb->width != icd->user_width ||
- vb->height != icd->user_height ||
- vb->field != field) {
- buf->code = icd->current_fmt->code;
- vb->width = icd->user_width;
- vb->height = icd->user_height;
- vb->field = field;
- vb->state = VIDEOBUF_NEEDS_INIT;
- }
-
- vb->size = icd->sizeimage;
- if (0 != vb->baddr && vb->bsize < vb->size) {
- ret = -EINVAL;
- goto out;
- }
-
- if (vb->state == VIDEOBUF_NEEDS_INIT) {
- ret = videobuf_iolock(vq, vb, NULL);
- if (ret)
- goto fail;
-
- vb->state = VIDEOBUF_PREPARED;
- }
-
- buf->inwork = 0;
-
- return 0;
-
-fail:
- free_buffer(vq, buf);
-out:
- buf->inwork = 0;
- return ret;
-}
-
-static int mx1_camera_setup_dma(struct mx1_camera_dev *pcdev)
-{
- struct videobuf_buffer *vbuf = &pcdev->active->vb;
- struct device *dev = pcdev->icd->parent;
- int ret;
-
- if (unlikely(!pcdev->active)) {
- dev_err(dev, "DMA End IRQ with no active buffer\n");
- return -EFAULT;
- }
-
- /* setup sg list for future DMA */
- ret = imx_dma_setup_single(pcdev->dma_chan,
- videobuf_to_dma_contig(vbuf),
- vbuf->size, pcdev->res->start +
- CSIRXR, DMA_MODE_READ);
- if (unlikely(ret))
- dev_err(dev, "Failed to setup DMA sg list\n");
-
- return ret;
-}
-
-/* Called under spinlock_irqsave(&pcdev->lock, ...) */
-static void mx1_videobuf_queue(struct videobuf_queue *vq,
- struct videobuf_buffer *vb)
-{
- struct soc_camera_device *icd = vq->priv_data;
- struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- struct mx1_camera_dev *pcdev = ici->priv;
- struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
-
- dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
- vb, vb->baddr, vb->bsize);
-
- list_add_tail(&vb->queue, &pcdev->capture);
-
- vb->state = VIDEOBUF_ACTIVE;
-
- if (!pcdev->active) {
- pcdev->active = buf;
-
- /* setup sg list for future DMA */
- if (!mx1_camera_setup_dma(pcdev)) {
- unsigned int temp;
- /* enable SOF irq */
- temp = __raw_readl(pcdev->base + CSICR1) |
- CSICR1_SOF_INTEN;
- __raw_writel(temp, pcdev->base + CSICR1);
- }
- }
-}
-
-static void mx1_videobuf_release(struct videobuf_queue *vq,
- struct videobuf_buffer *vb)
-{
- struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
-#ifdef DEBUG
- struct soc_camera_device *icd = vq->priv_data;
- struct device *dev = icd->parent;
-
- dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
- vb, vb->baddr, vb->bsize);
-
- switch (vb->state) {
- case VIDEOBUF_ACTIVE:
- dev_dbg(dev, "%s (active)\n", __func__);
- break;
- case VIDEOBUF_QUEUED:
- dev_dbg(dev, "%s (queued)\n", __func__);
- break;
- case VIDEOBUF_PREPARED:
- dev_dbg(dev, "%s (prepared)\n", __func__);
- break;
- default:
- dev_dbg(dev, "%s (unknown)\n", __func__);
- break;
- }
-#endif
-
- free_buffer(vq, buf);
-}
-
-static void mx1_camera_wakeup(struct mx1_camera_dev *pcdev,
- struct videobuf_buffer *vb,
- struct mx1_buffer *buf)
-{
- /* _init is used to debug races, see comment in mx1_camera_reqbufs() */
- list_del_init(&vb->queue);
- vb->state = VIDEOBUF_DONE;
- do_gettimeofday(&vb->ts);
- vb->field_count++;
- wake_up(&vb->done);
-
- if (list_empty(&pcdev->capture)) {
- pcdev->active = NULL;
- return;
- }
-
- pcdev->active = list_entry(pcdev->capture.next,
- struct mx1_buffer, vb.queue);
-
- /* setup sg list for future DMA */
- if (likely(!mx1_camera_setup_dma(pcdev))) {
- unsigned int temp;
-
- /* enable SOF irq */
- temp = __raw_readl(pcdev->base + CSICR1) | CSICR1_SOF_INTEN;
- __raw_writel(temp, pcdev->base + CSICR1);
- }
-}
-
-static void mx1_camera_dma_irq(int channel, void *data)
-{
- struct mx1_camera_dev *pcdev = data;
- struct device *dev = pcdev->icd->parent;
- struct mx1_buffer *buf;
- struct videobuf_buffer *vb;
- unsigned long flags;
-
- spin_lock_irqsave(&pcdev->lock, flags);
-
- imx_dma_disable(channel);
-
- if (unlikely(!pcdev->active)) {
- dev_err(dev, "DMA End IRQ with no active buffer\n");
- goto out;
- }
-
- vb = &pcdev->active->vb;
- buf = container_of(vb, struct mx1_buffer, vb);
- WARN_ON(buf->inwork || list_empty(&vb->queue));
- dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
- vb, vb->baddr, vb->bsize);
-
- mx1_camera_wakeup(pcdev, vb, buf);
-out:
- spin_unlock_irqrestore(&pcdev->lock, flags);
-}
-
-static struct videobuf_queue_ops mx1_videobuf_ops = {
- .buf_setup = mx1_videobuf_setup,
- .buf_prepare = mx1_videobuf_prepare,
- .buf_queue = mx1_videobuf_queue,
- .buf_release = mx1_videobuf_release,
-};
-
-static void mx1_camera_init_videobuf(struct videobuf_queue *q,
- struct soc_camera_device *icd)
-{
- struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- struct mx1_camera_dev *pcdev = ici->priv;
-
- videobuf_queue_dma_contig_init(q, &mx1_videobuf_ops, icd->parent,
- &pcdev->lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
- V4L2_FIELD_NONE,
- sizeof(struct mx1_buffer), icd, &icd->video_lock);
-}
-
-static int mclk_get_divisor(struct mx1_camera_dev *pcdev)
-{
- unsigned int mclk = pcdev->mclk;
- unsigned long div;
- unsigned long lcdclk;
-
- lcdclk = clk_get_rate(pcdev->clk);
-
- /*
- * We verify platform_mclk_10khz != 0, so if anyone breaks it, here
- * they get a nice Oops
- */
- div = (lcdclk + 2 * mclk - 1) / (2 * mclk) - 1;
-
- dev_dbg(pcdev->icd->parent,
- "System clock %lukHz, target freq %dkHz, divisor %lu\n",
- lcdclk / 1000, mclk / 1000, div);
-
- return div;
-}
-
-static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
-{
- unsigned int csicr1 = CSICR1_EN;
-
- dev_dbg(pcdev->icd->parent, "Activate device\n");
-
- clk_prepare_enable(pcdev->clk);
-
- /* enable CSI before doing anything else */
- __raw_writel(csicr1, pcdev->base + CSICR1);
-
- csicr1 |= CSICR1_MCLKEN | CSICR1_FCC | CSICR1_GCLK_MODE;
- csicr1 |= CSICR1_MCLKDIV(mclk_get_divisor(pcdev));
- csicr1 |= CSICR1_RXFF_LEVEL(2); /* 16 words */
-
- __raw_writel(csicr1, pcdev->base + CSICR1);
-}
-
-static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev)
-{
- dev_dbg(pcdev->icd->parent, "Deactivate device\n");
-
- /* Disable all CSI interface */
- __raw_writel(0x00, pcdev->base + CSICR1);
-
- clk_disable_unprepare(pcdev->clk);
-}
-
-/*
- * The following two functions absolutely depend on the fact, that
- * there can be only one camera on i.MX1/i.MXL camera sensor interface
- */
-static int mx1_camera_add_device(struct soc_camera_device *icd)
-{
- struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- struct mx1_camera_dev *pcdev = ici->priv;
-
- if (pcdev->icd)
- return -EBUSY;
-
- dev_info(icd->parent, "MX1 Camera driver attached to camera %d\n",
- icd->devnum);
-
- mx1_camera_activate(pcdev);
-
- pcdev->icd = icd;
-
- return 0;
-}
-
-static void mx1_camera_remove_device(struct soc_camera_device *icd)
-{
- struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- struct mx1_camera_dev *pcdev = ici->priv;
- unsigned int csicr1;
-
- BUG_ON(icd != pcdev->icd);
-
- /* disable interrupts */
- csicr1 = __raw_readl(pcdev->base + CSICR1) & ~CSI_IRQ_MASK;
- __raw_writel(csicr1, pcdev->base + CSICR1);
-
- /* Stop DMA engine */
- imx_dma_disable(pcdev->dma_chan);
-
- dev_info(icd->parent, "MX1 Camera driver detached from camera %d\n",
- icd->devnum);
-
- mx1_camera_deactivate(pcdev);
-
- pcdev->icd = NULL;
-}
-
-static int mx1_camera_set_crop(struct soc_camera_device *icd,
- struct v4l2_crop *a)
-{
- struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
-
- return v4l2_subdev_call(sd, video, s_crop, a);
-}
-
-static int mx1_camera_set_bus_param(struct soc_camera_device *icd)
-{
- struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
- struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- struct mx1_camera_dev *pcdev = ici->priv;
- struct v4l2_mbus_config cfg = {.type = V4L2_MBUS_PARALLEL,};
- unsigned long common_flags;
- unsigned int csicr1;
- int ret;
-
- /* MX1 supports only 8bit buswidth */
- ret = v4l2_subdev_call(sd, video, g_mbus_config, &cfg);
- if (!ret) {
- common_flags = soc_mbus_config_compatible(&cfg, CSI_BUS_FLAGS);
- if (!common_flags) {
- dev_warn(icd->parent,
- "Flags incompatible: camera 0x%x, host 0x%x\n",
- cfg.flags, CSI_BUS_FLAGS);
- return -EINVAL;
- }
- } else if (ret != -ENOIOCTLCMD) {
- return ret;
- } else {
- common_flags = CSI_BUS_FLAGS;
- }
-
- /* Make choises, based on platform choice */
- if ((common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) &&
- (common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) {
- if (!pcdev->pdata ||
- pcdev->pdata->flags & MX1_CAMERA_VSYNC_HIGH)
- common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_LOW;
- else
- common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_HIGH;
- }
-
- if ((common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) &&
- (common_flags & V4L2_MBUS_PCLK_SAMPLE_FALLING)) {
- if (!pcdev->pdata ||
- pcdev->pdata->flags & MX1_CAMERA_PCLK_RISING)
- common_flags &= ~V4L2_MBUS_PCLK_SAMPLE_FALLING;
- else
- common_flags &= ~V4L2_MBUS_PCLK_SAMPLE_RISING;
- }
-
- if ((common_flags & V4L2_MBUS_DATA_ACTIVE_HIGH) &&
- (common_flags & V4L2_MBUS_DATA_ACTIVE_LOW)) {
- if (!pcdev->pdata ||
- pcdev->pdata->flags & MX1_CAMERA_DATA_HIGH)
- common_flags &= ~V4L2_MBUS_DATA_ACTIVE_LOW;
- else
- common_flags &= ~V4L2_MBUS_DATA_ACTIVE_HIGH;
- }
-
- cfg.flags = common_flags;
- ret = v4l2_subdev_call(sd, video, s_mbus_config, &cfg);
- if (ret < 0 && ret != -ENOIOCTLCMD) {
- dev_dbg(icd->parent, "camera s_mbus_config(0x%lx) returned %d\n",
- common_flags, ret);
- return ret;
- }
-
- csicr1 = __raw_readl(pcdev->base + CSICR1);
-
- if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
- csicr1 |= CSICR1_REDGE;
- if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
- csicr1 |= CSICR1_SOF_POL;
- if (common_flags & V4L2_MBUS_DATA_ACTIVE_LOW)
- csicr1 |= CSICR1_DATA_POL;
-
- __raw_writel(csicr1, pcdev->base + CSICR1);
-
- return 0;
-}
-
-static int mx1_camera_set_fmt(struct soc_camera_device *icd,
- struct v4l2_format *f)
-{
- struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
- const struct soc_camera_format_xlate *xlate;
- struct v4l2_pix_format *pix = &f->fmt.pix;
- struct v4l2_mbus_framefmt mf;
- int ret, buswidth;
-
- xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat);
- if (!xlate) {
- dev_warn(icd->parent, "Format %x not found\n",
- pix->pixelformat);
- return -EINVAL;
- }
-
- buswidth = xlate->host_fmt->bits_per_sample;
- if (buswidth > 8) {
- dev_warn(icd->parent,
- "bits-per-sample %d for format %x unsupported\n",
- buswidth, pix->pixelformat);
- return -EINVAL;
- }
-
- mf.width = pix->width;
- mf.height = pix->height;
- mf.field = pix->field;
- mf.colorspace = pix->colorspace;
- mf.code = xlate->code;
-
- ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf);
- if (ret < 0)
- return ret;
-
- if (mf.code != xlate->code)
- return -EINVAL;
-
- pix->width = mf.width;
- pix->height = mf.height;
- pix->field = mf.field;
- pix->colorspace = mf.colorspace;
- icd->current_fmt = xlate;
-
- return ret;
-}
-
-static int mx1_camera_try_fmt(struct soc_camera_device *icd,
- struct v4l2_format *f)
-{
- struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
- const struct soc_camera_format_xlate *xlate;
- struct v4l2_pix_format *pix = &f->fmt.pix;
- struct v4l2_mbus_framefmt mf;
- int ret;
- /* TODO: limit to mx1 hardware capabilities */
-
- xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat);
- if (!xlate) {
- dev_warn(icd->parent, "Format %x not found\n",
- pix->pixelformat);
- return -EINVAL;
- }
-
- mf.width = pix->width;
- mf.height = pix->height;
- mf.field = pix->field;
- mf.colorspace = pix->colorspace;
- mf.code = xlate->code;
-
- /* limit to sensor capabilities */
- ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf);
- if (ret < 0)
- return ret;
-
- pix->width = mf.width;
- pix->height = mf.height;
- pix->field = mf.field;
- pix->colorspace = mf.colorspace;
-
- return 0;
-}
-
-static int mx1_camera_reqbufs(struct soc_camera_device *icd,
- struct v4l2_requestbuffers *p)
-{
- int i;
-
- /*
- * This is for locking debugging only. I removed spinlocks and now I
- * check whether .prepare is ever called on a linked buffer, or whether
- * a dma IRQ can occur for an in-work or unlinked buffer. Until now
- * it hadn't triggered
- */
- for (i = 0; i < p->count; i++) {
- struct mx1_buffer *buf = container_of(icd->vb_vidq.bufs[i],
- struct mx1_buffer, vb);
- buf->inwork = 0;
- INIT_LIST_HEAD(&buf->vb.queue);
- }
-
- return 0;
-}
-
-static unsigned int mx1_camera_poll(struct file *file, poll_table *pt)
-{
- struct soc_camera_device *icd = file->private_data;
- struct mx1_buffer *buf;
-
- buf = list_entry(icd->vb_vidq.stream.next, struct mx1_buffer,
- vb.stream);
-
- poll_wait(file, &buf->vb.done, pt);
-
- if (buf->vb.state == VIDEOBUF_DONE ||
- buf->vb.state == VIDEOBUF_ERROR)
- return POLLIN | POLLRDNORM;
-
- return 0;
-}
-
-static int mx1_camera_querycap(struct soc_camera_host *ici,
- struct v4l2_capability *cap)
-{
- /* cap->name is set by the friendly caller:-> */
- strlcpy(cap->card, "i.MX1/i.MXL Camera", sizeof(cap->card));
- cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
-
- return 0;
-}
-
-static struct soc_camera_host_ops mx1_soc_camera_host_ops = {
- .owner = THIS_MODULE,
- .add = mx1_camera_add_device,
- .remove = mx1_camera_remove_device,
- .set_bus_param = mx1_camera_set_bus_param,
- .set_crop = mx1_camera_set_crop,
- .set_fmt = mx1_camera_set_fmt,
- .try_fmt = mx1_camera_try_fmt,
- .init_videobuf = mx1_camera_init_videobuf,
- .reqbufs = mx1_camera_reqbufs,
- .poll = mx1_camera_poll,
- .querycap = mx1_camera_querycap,
-};
-
-static struct fiq_handler fh = {
- .name = "csi_sof"
-};
-
-static int __init mx1_camera_probe(struct platform_device *pdev)
-{
- struct mx1_camera_dev *pcdev;
- struct resource *res;
- struct pt_regs regs;
- struct clk *clk;
- void __iomem *base;
- unsigned int irq;
- int err = 0;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- irq = platform_get_irq(pdev, 0);
- if (!res || (int)irq <= 0) {
- err = -ENODEV;
- goto exit;
- }
-
- clk = clk_get(&pdev->dev, "csi_clk");
- if (IS_ERR(clk)) {
- err = PTR_ERR(clk);
- goto exit;
- }
-
- pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
- if (!pcdev) {
- dev_err(&pdev->dev, "Could not allocate pcdev\n");
- err = -ENOMEM;
- goto exit_put_clk;
- }
-
- pcdev->res = res;
- pcdev->clk = clk;
-
- pcdev->pdata = pdev->dev.platform_data;
-
- if (pcdev->pdata)
- pcdev->mclk = pcdev->pdata->mclk_10khz * 10000;
-
- if (!pcdev->mclk) {
- dev_warn(&pdev->dev,
- "mclk_10khz == 0! Please, fix your platform data. "
- "Using default 20MHz\n");
- pcdev->mclk = 20000000;
- }
-
- INIT_LIST_HEAD(&pcdev->capture);
- spin_lock_init(&pcdev->lock);
-
- /*
- * Request the regions.
- */
- if (!request_mem_region(res->start, resource_size(res), DRIVER_NAME)) {
- err = -EBUSY;
- goto exit_kfree;
- }
-
- base = ioremap(res->start, resource_size(res));
- if (!base) {
- err = -ENOMEM;
- goto exit_release;
- }
- pcdev->irq = irq;
- pcdev->base = base;
-
- /* request dma */
- pcdev->dma_chan = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_HIGH);
- if (pcdev->dma_chan < 0) {
- dev_err(&pdev->dev, "Can't request DMA for MX1 CSI\n");
- err = -EBUSY;
- goto exit_iounmap;
- }
- dev_dbg(&pdev->dev, "got DMA channel %d\n", pcdev->dma_chan);
-
- imx_dma_setup_handlers(pcdev->dma_chan, mx1_camera_dma_irq, NULL,
- pcdev);
-
- imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO,
- IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0);
- /* burst length : 16 words = 64 bytes */
- imx_dma_config_burstlen(pcdev->dma_chan, 0);
-
- /* request irq */
- err = claim_fiq(&fh);
- if (err) {
- dev_err(&pdev->dev, "Camera interrupt register failed \n");
- goto exit_free_dma;
- }
-
- set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end -
- &mx1_camera_sof_fiq_start);
-
- regs.ARM_r8 = (long)MX1_DMA_DIMR;
- regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan);
- regs.ARM_r10 = (long)pcdev->base + CSICR1;
- regs.ARM_fp = (long)pcdev->base + CSISR;
- regs.ARM_sp = 1 << pcdev->dma_chan;
- set_fiq_regs(®s);
-
- mxc_set_irq_fiq(irq, 1);
- enable_fiq(irq);
-
- pcdev->soc_host.drv_name = DRIVER_NAME;
- pcdev->soc_host.ops = &mx1_soc_camera_host_ops;
- pcdev->soc_host.priv = pcdev;
- pcdev->soc_host.v4l2_dev.dev = &pdev->dev;
- pcdev->soc_host.nr = pdev->id;
- err = soc_camera_host_register(&pcdev->soc_host);
- if (err)
- goto exit_free_irq;
-
- dev_info(&pdev->dev, "MX1 Camera driver loaded\n");
-
- return 0;
-
-exit_free_irq:
- disable_fiq(irq);
- mxc_set_irq_fiq(irq, 0);
- release_fiq(&fh);
-exit_free_dma:
- imx_dma_free(pcdev->dma_chan);
-exit_iounmap:
- iounmap(base);
-exit_release:
- release_mem_region(res->start, resource_size(res));
-exit_kfree:
- kfree(pcdev);
-exit_put_clk:
- clk_put(clk);
-exit:
- return err;
-}
-
-static int __exit mx1_camera_remove(struct platform_device *pdev)
-{
- struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
- struct mx1_camera_dev *pcdev = container_of(soc_host,
- struct mx1_camera_dev, soc_host);
- struct resource *res;
-
- imx_dma_free(pcdev->dma_chan);
- disable_fiq(pcdev->irq);
- mxc_set_irq_fiq(pcdev->irq, 0);
- release_fiq(&fh);
-
- clk_put(pcdev->clk);
-
- soc_camera_host_unregister(soc_host);
-
- iounmap(pcdev->base);
-
- res = pcdev->res;
- release_mem_region(res->start, resource_size(res));
-
- kfree(pcdev);
-
- dev_info(&pdev->dev, "MX1 Camera driver unloaded\n");
-
- return 0;
-}
-
-static struct platform_driver mx1_camera_driver = {
- .driver = {
- .name = DRIVER_NAME,
- },
- .remove = __exit_p(mx1_camera_remove),
-};
-
-static int __init mx1_camera_init(void)
-{
- return platform_driver_probe(&mx1_camera_driver, mx1_camera_probe);
-}
-
-static void __exit mx1_camera_exit(void)
-{
- return platform_driver_unregister(&mx1_camera_driver);
-}
-
-module_init(mx1_camera_init);
-module_exit(mx1_camera_exit);
-
-MODULE_DESCRIPTION("i.MX1/i.MXL SoC Camera Host driver");
-MODULE_AUTHOR("Paulius Zaleckas <paulius.zaleckas@teltonika.lt>");
-MODULE_LICENSE("GPL v2");
-MODULE_VERSION(DRIVER_VERSION);
-MODULE_ALIAS("platform:" DRIVER_NAME);
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h
deleted file mode 100644
index 4fd6c70..0000000
--- a/include/linux/platform_data/camera-mx1.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * mx1_camera.h - i.MX1/i.MXL camera driver header file
- *
- * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
- *
- * Based on PXA camera.h file:
- * Copyright (C) 2003, Intel Corporation
- * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_CAMERA_H_
-#define __ASM_ARCH_CAMERA_H_
-
-#define MX1_CAMERA_DATA_HIGH 1
-#define MX1_CAMERA_PCLK_RISING 2
-#define MX1_CAMERA_VSYNC_HIGH 4
-
-extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
-
-/**
- * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
- * @mclk_10khz: master clock frequency in 10kHz units
- * @flags: MX1 camera platform flags
- */
-struct mx1_camera_pdata {
- unsigned long mclk_10khz;
- unsigned long flags;
-};
-
-#endif /* __ASM_ARCH_CAMERA_H_ */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v2 11/34] media: mx1_camera: remove the driver
2012-09-20 6:45 ` [PATCH v2 11/34] media: mx1_camera: remove the driver Shawn Guo
@ 2012-09-20 12:56 ` Mauro Carvalho Chehab
2012-09-20 14:47 ` Shawn Guo
0 siblings, 1 reply; 25+ messages in thread
From: Mauro Carvalho Chehab @ 2012-09-20 12:56 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
Arnd Bergmann, Paulius Zaleckas, Guennadi Liakhovetski,
linux-media
Em 20-09-2012 03:45, Shawn Guo escreveu:
> The mx1_camera driver has been broken for a few release cycles since
> commit 6bd0812 (dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c).
> It seems there is no one even compile tested it since then, as doing
> so will end up with the following error.
>
> CC drivers/media/video/mx1_camera.o
> In file included from drivers/media/video/mx1_camera.c:44:0:
> arch/arm/mach-imx/include/mach/dma-mx1-mx2.h:8:25: fatal error: mach/dma-v1.h: No such file or directory
>
> It looks that all the related folks have known the breakage [1], but
> no one shows the interest to bring it back to work. Thus it becomes
> a piece of unmaintained code, so let's remove it.
It is better to mark it as BROKEN for the next Kernel, and then to
move it to staging, before dropping a broken driver. That gives people
some time to fix it, if someone has interests on fixing the issues.
>
> [1] https://lkml.org/lkml/2012/2/9/171
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-media@vger.kernel.org
> ---
> arch/arm/mach-imx/Makefile | 3 -
> arch/arm/mach-imx/clk-imx1.c | 1 -
> arch/arm/mach-imx/devices/Kconfig | 3 -
> arch/arm/mach-imx/devices/Makefile | 1 -
> arch/arm/mach-imx/devices/devices-common.h | 10 -
> arch/arm/mach-imx/devices/platform-mx1-camera.c | 42 --
> arch/arm/mach-imx/mx1-camera-fiq-ksym.c | 18 -
> arch/arm/mach-imx/mx1-camera-fiq.S | 35 -
> drivers/media/video/Kconfig | 12 -
> drivers/media/video/Makefile | 1 -
> drivers/media/video/mx1_camera.c | 889 -----------------------
Btw, this conflicts with the tree renaming patches already at -staging, as
this driver location is elsewhere.
Regards,
Mauro
> include/linux/platform_data/camera-mx1.h | 35 -
> 12 files changed, 1050 deletions(-)
> delete mode 100644 arch/arm/mach-imx/devices/platform-mx1-camera.c
> delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq-ksym.c
> delete mode 100644 arch/arm/mach-imx/mx1-camera-fiq.S
> delete mode 100644 drivers/media/video/mx1_camera.c
> delete mode 100644 include/linux/platform_data/camera-mx1.h
>
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index fe47b71..538d0ee 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -35,9 +35,6 @@ obj-y += ssi-fiq.o
> obj-y += ssi-fiq-ksym.o
> endif
>
> -# Support for CMOS sensor interface
> -obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
> -
> # i.MX1 based machines
> obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
> obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
> diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c
> index b5f90cc..ebfffd2 100644
> --- a/arch/arm/mach-imx/clk-imx1.c
> +++ b/arch/arm/mach-imx/clk-imx1.c
> @@ -84,7 +84,6 @@ int __init mx1_clocks_init(unsigned long fref)
> i, PTR_ERR(clk[i]));
>
> clk_register_clkdev(clk[dma_gate], "ahb", "imx-dma");
> - clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
> clk_register_clkdev(clk[mma_gate], "mma", NULL);
> clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
> clk_register_clkdev(clk[per1], "per", "imx-gpt.0");
> diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
> index cb3e3ee..09d796e 100644
> --- a/arch/arm/mach-imx/devices/Kconfig
> +++ b/arch/arm/mach-imx/devices/Kconfig
> @@ -46,9 +46,6 @@ config IMX_HAVE_PLATFORM_IMX_UDC
> config IMX_HAVE_PLATFORM_IPU_CORE
> bool
>
> -config IMX_HAVE_PLATFORM_MX1_CAMERA
> - bool
> -
> config IMX_HAVE_PLATFORM_MX2_CAMERA
> bool
>
> diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile
> index ff22ed1..3cfdc37 100644
> --- a/arch/arm/mach-imx/devices/Makefile
> +++ b/arch/arm/mach-imx/devices/Makefile
> @@ -17,7 +17,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o
> -obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
> diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
> index 9e3e3d8..34419b2 100644
> --- a/arch/arm/mach-imx/devices/devices-common.h
> +++ b/arch/arm/mach-imx/devices/devices-common.h
> @@ -199,16 +199,6 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
> const struct imx_ipu_core_data *data,
> struct mx3fb_platform_data *pdata);
>
> -#include <linux/platform_data/camera-mx1.h>
> -struct imx_mx1_camera_data {
> - resource_size_t iobase;
> - resource_size_t iosize;
> - resource_size_t irq;
> -};
> -struct platform_device *__init imx_add_mx1_camera(
> - const struct imx_mx1_camera_data *data,
> - const struct mx1_camera_pdata *pdata);
> -
> #include <linux/platform_data/camera-mx2.h>
> struct imx_mx2_camera_data {
> resource_size_t iobasecsi;
> diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c
> deleted file mode 100644
> index 756b0e6..0000000
> --- a/arch/arm/mach-imx/devices/platform-mx1-camera.c
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -/*
> - * Copyright (C) 2010 Pengutronix
> - * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
> - *
> - * This program is free software; you can redistribute it and/or modify it under
> - * the terms of the GNU General Public License version 2 as published by the
> - * Free Software Foundation.
> - */
> -#include <mach/hardware.h>
> -#include "devices-common.h"
> -
> -#define imx_mx1_camera_data_entry_single(soc, _size) \
> - { \
> - .iobase = soc ## _CSI ## _BASE_ADDR, \
> - .iosize = _size, \
> - .irq = soc ## _INT_CSI, \
> - }
> -
> -#ifdef CONFIG_SOC_IMX1
> -const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
> - imx_mx1_camera_data_entry_single(MX1, 10);
> -#endif /* ifdef CONFIG_SOC_IMX1 */
> -
> -struct platform_device *__init imx_add_mx1_camera(
> - const struct imx_mx1_camera_data *data,
> - const struct mx1_camera_pdata *pdata)
> -{
> - struct resource res[] = {
> - {
> - .start = data->iobase,
> - .end = data->iobase + data->iosize - 1,
> - .flags = IORESOURCE_MEM,
> - }, {
> - .start = data->irq,
> - .end = data->irq,
> - .flags = IORESOURCE_IRQ,
> - },
> - };
> - return imx_add_platform_device_dmamask("mx1-camera", 0,
> - res, ARRAY_SIZE(res),
> - pdata, sizeof(*pdata), DMA_BIT_MASK(32));
> -}
> diff --git a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
> deleted file mode 100644
> index fb38436..0000000
> --- a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/*
> - * Exported ksyms of ARCH_MX1
> - *
> - * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#include <linux/platform_device.h>
> -#include <linux/module.h>
> -
> -#include <linux/platform_data/camera-mx1.h>
> -
> -/* IMX camera FIQ handler */
> -EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
> -EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
> diff --git a/arch/arm/mach-imx/mx1-camera-fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S
> deleted file mode 100644
> index 9c69aa6..0000000
> --- a/arch/arm/mach-imx/mx1-camera-fiq.S
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/*
> - * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> - *
> - * Based on linux/arch/arm/lib/floppydma.S
> - * Copyright (C) 1995, 1996 Russell King
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -#include <linux/linkage.h>
> -#include <asm/assembler.h>
> -
> - .text
> - .global mx1_camera_sof_fiq_end
> - .global mx1_camera_sof_fiq_start
> -mx1_camera_sof_fiq_start:
> - @ enable dma
> - ldr r12, [r9]
> - orr r12, r12, #0x00000001
> - str r12, [r9]
> - @ unmask DMA interrupt
> - ldr r12, [r8]
> - bic r12, r12, r13
> - str r12, [r8]
> - @ disable SOF interrupt
> - ldr r12, [r10]
> - bic r12, r12, #0x00010000
> - str r12, [r10]
> - @ clear SOF flag
> - mov r12, #0x00010000
> - str r12, [r11]
> - @ return from FIQ
> - subs pc, lr, #4
> -mx1_camera_sof_fiq_end:
> diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
> index c128fac..e8b89a9 100644
> --- a/drivers/media/video/Kconfig
> +++ b/drivers/media/video/Kconfig
> @@ -1118,18 +1118,6 @@ config SOC_CAMERA_OV9740
> help
> This is a ov9740 camera driver
>
> -config MX1_VIDEO
> - bool
> -
> -config VIDEO_MX1
> - tristate "i.MX1/i.MXL CMOS Sensor Interface driver"
> - depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA
> - select FIQ
> - select VIDEOBUF_DMA_CONTIG
> - select MX1_VIDEO
> - ---help---
> - This is a v4l2 driver for the i.MX1/i.MXL CMOS Sensor Interface
> -
> config MX3_VIDEO
> bool
>
> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
> index b7da9fa..8624228 100644
> --- a/drivers/media/video/Makefile
> +++ b/drivers/media/video/Makefile
> @@ -178,7 +178,6 @@ obj-$(CONFIG_VIDEO_OMAP2) += omap2cam.o
> obj-$(CONFIG_SOC_CAMERA) += soc_camera.o soc_mediabus.o
> obj-$(CONFIG_SOC_CAMERA_PLATFORM) += soc_camera_platform.o
> # soc-camera host drivers have to be linked after camera drivers
> -obj-$(CONFIG_VIDEO_MX1) += mx1_camera.o
> obj-$(CONFIG_VIDEO_MX2) += mx2_camera.o
> obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o
> obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
> diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
> deleted file mode 100644
> index bbe7099..0000000
> --- a/drivers/media/video/mx1_camera.c
> +++ /dev/null
> @@ -1,889 +0,0 @@
> -/*
> - * V4L2 Driver for i.MXL/i.MXL camera (CSI) host
> - *
> - * Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> - * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
> - *
> - * Based on PXA SoC camera driver
> - * Copyright (C) 2006, Sascha Hauer, Pengutronix
> - * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#include <linux/clk.h>
> -#include <linux/delay.h>
> -#include <linux/device.h>
> -#include <linux/dma-mapping.h>
> -#include <linux/errno.h>
> -#include <linux/fs.h>
> -#include <linux/init.h>
> -#include <linux/interrupt.h>
> -#include <linux/io.h>
> -#include <linux/kernel.h>
> -#include <linux/mm.h>
> -#include <linux/module.h>
> -#include <linux/moduleparam.h>
> -#include <linux/mutex.h>
> -#include <linux/platform_device.h>
> -#include <linux/sched.h>
> -#include <linux/slab.h>
> -#include <linux/time.h>
> -#include <linux/videodev2.h>
> -
> -#include <media/soc_camera.h>
> -#include <media/v4l2-common.h>
> -#include <media/v4l2-dev.h>
> -#include <media/videobuf-dma-contig.h>
> -#include <media/soc_mediabus.h>
> -
> -#include <asm/dma.h>
> -#include <asm/fiq.h>
> -#include <mach/dma-mx1-mx2.h>
> -#include <mach/hardware.h>
> -#include <mach/irqs.h>
> -#include <linux/platform_data/camera-mx1.h>
> -
> -/*
> - * CSI registers
> - */
> -#define CSICR1 0x00 /* CSI Control Register 1 */
> -#define CSISR 0x08 /* CSI Status Register */
> -#define CSIRXR 0x10 /* CSI RxFIFO Register */
> -
> -#define CSICR1_RXFF_LEVEL(x) (((x) & 0x3) << 19)
> -#define CSICR1_SOF_POL (1 << 17)
> -#define CSICR1_SOF_INTEN (1 << 16)
> -#define CSICR1_MCLKDIV(x) (((x) & 0xf) << 12)
> -#define CSICR1_MCLKEN (1 << 9)
> -#define CSICR1_FCC (1 << 8)
> -#define CSICR1_BIG_ENDIAN (1 << 7)
> -#define CSICR1_CLR_RXFIFO (1 << 5)
> -#define CSICR1_GCLK_MODE (1 << 4)
> -#define CSICR1_DATA_POL (1 << 2)
> -#define CSICR1_REDGE (1 << 1)
> -#define CSICR1_EN (1 << 0)
> -
> -#define CSISR_SFF_OR_INT (1 << 25)
> -#define CSISR_RFF_OR_INT (1 << 24)
> -#define CSISR_STATFF_INT (1 << 21)
> -#define CSISR_RXFF_INT (1 << 18)
> -#define CSISR_SOF_INT (1 << 16)
> -#define CSISR_DRDY (1 << 0)
> -
> -#define DRIVER_VERSION "0.0.2"
> -#define DRIVER_NAME "mx1-camera"
> -
> -#define CSI_IRQ_MASK (CSISR_SFF_OR_INT | CSISR_RFF_OR_INT | \
> - CSISR_STATFF_INT | CSISR_RXFF_INT | CSISR_SOF_INT)
> -
> -#define CSI_BUS_FLAGS (V4L2_MBUS_MASTER | V4L2_MBUS_HSYNC_ACTIVE_HIGH | \
> - V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_VSYNC_ACTIVE_LOW | \
> - V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_PCLK_SAMPLE_FALLING | \
> - V4L2_MBUS_DATA_ACTIVE_HIGH | V4L2_MBUS_DATA_ACTIVE_LOW)
> -
> -#define MAX_VIDEO_MEM 16 /* Video memory limit in megabytes */
> -
> -/*
> - * Structures
> - */
> -
> -/* buffer for one video frame */
> -struct mx1_buffer {
> - /* common v4l buffer stuff -- must be first */
> - struct videobuf_buffer vb;
> - enum v4l2_mbus_pixelcode code;
> - int inwork;
> -};
> -
> -/*
> - * i.MX1/i.MXL is only supposed to handle one camera on its Camera Sensor
> - * Interface. If anyone ever builds hardware to enable more than
> - * one camera, they will have to modify this driver too
> - */
> -struct mx1_camera_dev {
> - struct soc_camera_host soc_host;
> - struct soc_camera_device *icd;
> - struct mx1_camera_pdata *pdata;
> - struct mx1_buffer *active;
> - struct resource *res;
> - struct clk *clk;
> - struct list_head capture;
> -
> - void __iomem *base;
> - int dma_chan;
> - unsigned int irq;
> - unsigned long mclk;
> -
> - spinlock_t lock;
> -};
> -
> -/*
> - * Videobuf operations
> - */
> -static int mx1_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
> - unsigned int *size)
> -{
> - struct soc_camera_device *icd = vq->priv_data;
> -
> - *size = icd->sizeimage;
> -
> - if (!*count)
> - *count = 32;
> -
> - if (*size * *count > MAX_VIDEO_MEM * 1024 * 1024)
> - *count = (MAX_VIDEO_MEM * 1024 * 1024) / *size;
> -
> - dev_dbg(icd->parent, "count=%d, size=%d\n", *count, *size);
> -
> - return 0;
> -}
> -
> -static void free_buffer(struct videobuf_queue *vq, struct mx1_buffer *buf)
> -{
> - struct soc_camera_device *icd = vq->priv_data;
> - struct videobuf_buffer *vb = &buf->vb;
> -
> - BUG_ON(in_interrupt());
> -
> - dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
> - vb, vb->baddr, vb->bsize);
> -
> - /*
> - * This waits until this buffer is out of danger, i.e., until it is no
> - * longer in STATE_QUEUED or STATE_ACTIVE
> - */
> - videobuf_waiton(vq, vb, 0, 0);
> - videobuf_dma_contig_free(vq, vb);
> -
> - vb->state = VIDEOBUF_NEEDS_INIT;
> -}
> -
> -static int mx1_videobuf_prepare(struct videobuf_queue *vq,
> - struct videobuf_buffer *vb, enum v4l2_field field)
> -{
> - struct soc_camera_device *icd = vq->priv_data;
> - struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
> - int ret;
> -
> - dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
> - vb, vb->baddr, vb->bsize);
> -
> - /* Added list head initialization on alloc */
> - WARN_ON(!list_empty(&vb->queue));
> -
> - BUG_ON(NULL == icd->current_fmt);
> -
> - /*
> - * I think, in buf_prepare you only have to protect global data,
> - * the actual buffer is yours
> - */
> - buf->inwork = 1;
> -
> - if (buf->code != icd->current_fmt->code ||
> - vb->width != icd->user_width ||
> - vb->height != icd->user_height ||
> - vb->field != field) {
> - buf->code = icd->current_fmt->code;
> - vb->width = icd->user_width;
> - vb->height = icd->user_height;
> - vb->field = field;
> - vb->state = VIDEOBUF_NEEDS_INIT;
> - }
> -
> - vb->size = icd->sizeimage;
> - if (0 != vb->baddr && vb->bsize < vb->size) {
> - ret = -EINVAL;
> - goto out;
> - }
> -
> - if (vb->state == VIDEOBUF_NEEDS_INIT) {
> - ret = videobuf_iolock(vq, vb, NULL);
> - if (ret)
> - goto fail;
> -
> - vb->state = VIDEOBUF_PREPARED;
> - }
> -
> - buf->inwork = 0;
> -
> - return 0;
> -
> -fail:
> - free_buffer(vq, buf);
> -out:
> - buf->inwork = 0;
> - return ret;
> -}
> -
> -static int mx1_camera_setup_dma(struct mx1_camera_dev *pcdev)
> -{
> - struct videobuf_buffer *vbuf = &pcdev->active->vb;
> - struct device *dev = pcdev->icd->parent;
> - int ret;
> -
> - if (unlikely(!pcdev->active)) {
> - dev_err(dev, "DMA End IRQ with no active buffer\n");
> - return -EFAULT;
> - }
> -
> - /* setup sg list for future DMA */
> - ret = imx_dma_setup_single(pcdev->dma_chan,
> - videobuf_to_dma_contig(vbuf),
> - vbuf->size, pcdev->res->start +
> - CSIRXR, DMA_MODE_READ);
> - if (unlikely(ret))
> - dev_err(dev, "Failed to setup DMA sg list\n");
> -
> - return ret;
> -}
> -
> -/* Called under spinlock_irqsave(&pcdev->lock, ...) */
> -static void mx1_videobuf_queue(struct videobuf_queue *vq,
> - struct videobuf_buffer *vb)
> -{
> - struct soc_camera_device *icd = vq->priv_data;
> - struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> - struct mx1_camera_dev *pcdev = ici->priv;
> - struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
> -
> - dev_dbg(icd->parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
> - vb, vb->baddr, vb->bsize);
> -
> - list_add_tail(&vb->queue, &pcdev->capture);
> -
> - vb->state = VIDEOBUF_ACTIVE;
> -
> - if (!pcdev->active) {
> - pcdev->active = buf;
> -
> - /* setup sg list for future DMA */
> - if (!mx1_camera_setup_dma(pcdev)) {
> - unsigned int temp;
> - /* enable SOF irq */
> - temp = __raw_readl(pcdev->base + CSICR1) |
> - CSICR1_SOF_INTEN;
> - __raw_writel(temp, pcdev->base + CSICR1);
> - }
> - }
> -}
> -
> -static void mx1_videobuf_release(struct videobuf_queue *vq,
> - struct videobuf_buffer *vb)
> -{
> - struct mx1_buffer *buf = container_of(vb, struct mx1_buffer, vb);
> -#ifdef DEBUG
> - struct soc_camera_device *icd = vq->priv_data;
> - struct device *dev = icd->parent;
> -
> - dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
> - vb, vb->baddr, vb->bsize);
> -
> - switch (vb->state) {
> - case VIDEOBUF_ACTIVE:
> - dev_dbg(dev, "%s (active)\n", __func__);
> - break;
> - case VIDEOBUF_QUEUED:
> - dev_dbg(dev, "%s (queued)\n", __func__);
> - break;
> - case VIDEOBUF_PREPARED:
> - dev_dbg(dev, "%s (prepared)\n", __func__);
> - break;
> - default:
> - dev_dbg(dev, "%s (unknown)\n", __func__);
> - break;
> - }
> -#endif
> -
> - free_buffer(vq, buf);
> -}
> -
> -static void mx1_camera_wakeup(struct mx1_camera_dev *pcdev,
> - struct videobuf_buffer *vb,
> - struct mx1_buffer *buf)
> -{
> - /* _init is used to debug races, see comment in mx1_camera_reqbufs() */
> - list_del_init(&vb->queue);
> - vb->state = VIDEOBUF_DONE;
> - do_gettimeofday(&vb->ts);
> - vb->field_count++;
> - wake_up(&vb->done);
> -
> - if (list_empty(&pcdev->capture)) {
> - pcdev->active = NULL;
> - return;
> - }
> -
> - pcdev->active = list_entry(pcdev->capture.next,
> - struct mx1_buffer, vb.queue);
> -
> - /* setup sg list for future DMA */
> - if (likely(!mx1_camera_setup_dma(pcdev))) {
> - unsigned int temp;
> -
> - /* enable SOF irq */
> - temp = __raw_readl(pcdev->base + CSICR1) | CSICR1_SOF_INTEN;
> - __raw_writel(temp, pcdev->base + CSICR1);
> - }
> -}
> -
> -static void mx1_camera_dma_irq(int channel, void *data)
> -{
> - struct mx1_camera_dev *pcdev = data;
> - struct device *dev = pcdev->icd->parent;
> - struct mx1_buffer *buf;
> - struct videobuf_buffer *vb;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&pcdev->lock, flags);
> -
> - imx_dma_disable(channel);
> -
> - if (unlikely(!pcdev->active)) {
> - dev_err(dev, "DMA End IRQ with no active buffer\n");
> - goto out;
> - }
> -
> - vb = &pcdev->active->vb;
> - buf = container_of(vb, struct mx1_buffer, vb);
> - WARN_ON(buf->inwork || list_empty(&vb->queue));
> - dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
> - vb, vb->baddr, vb->bsize);
> -
> - mx1_camera_wakeup(pcdev, vb, buf);
> -out:
> - spin_unlock_irqrestore(&pcdev->lock, flags);
> -}
> -
> -static struct videobuf_queue_ops mx1_videobuf_ops = {
> - .buf_setup = mx1_videobuf_setup,
> - .buf_prepare = mx1_videobuf_prepare,
> - .buf_queue = mx1_videobuf_queue,
> - .buf_release = mx1_videobuf_release,
> -};
> -
> -static void mx1_camera_init_videobuf(struct videobuf_queue *q,
> - struct soc_camera_device *icd)
> -{
> - struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> - struct mx1_camera_dev *pcdev = ici->priv;
> -
> - videobuf_queue_dma_contig_init(q, &mx1_videobuf_ops, icd->parent,
> - &pcdev->lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
> - V4L2_FIELD_NONE,
> - sizeof(struct mx1_buffer), icd, &icd->video_lock);
> -}
> -
> -static int mclk_get_divisor(struct mx1_camera_dev *pcdev)
> -{
> - unsigned int mclk = pcdev->mclk;
> - unsigned long div;
> - unsigned long lcdclk;
> -
> - lcdclk = clk_get_rate(pcdev->clk);
> -
> - /*
> - * We verify platform_mclk_10khz != 0, so if anyone breaks it, here
> - * they get a nice Oops
> - */
> - div = (lcdclk + 2 * mclk - 1) / (2 * mclk) - 1;
> -
> - dev_dbg(pcdev->icd->parent,
> - "System clock %lukHz, target freq %dkHz, divisor %lu\n",
> - lcdclk / 1000, mclk / 1000, div);
> -
> - return div;
> -}
> -
> -static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
> -{
> - unsigned int csicr1 = CSICR1_EN;
> -
> - dev_dbg(pcdev->icd->parent, "Activate device\n");
> -
> - clk_prepare_enable(pcdev->clk);
> -
> - /* enable CSI before doing anything else */
> - __raw_writel(csicr1, pcdev->base + CSICR1);
> -
> - csicr1 |= CSICR1_MCLKEN | CSICR1_FCC | CSICR1_GCLK_MODE;
> - csicr1 |= CSICR1_MCLKDIV(mclk_get_divisor(pcdev));
> - csicr1 |= CSICR1_RXFF_LEVEL(2); /* 16 words */
> -
> - __raw_writel(csicr1, pcdev->base + CSICR1);
> -}
> -
> -static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev)
> -{
> - dev_dbg(pcdev->icd->parent, "Deactivate device\n");
> -
> - /* Disable all CSI interface */
> - __raw_writel(0x00, pcdev->base + CSICR1);
> -
> - clk_disable_unprepare(pcdev->clk);
> -}
> -
> -/*
> - * The following two functions absolutely depend on the fact, that
> - * there can be only one camera on i.MX1/i.MXL camera sensor interface
> - */
> -static int mx1_camera_add_device(struct soc_camera_device *icd)
> -{
> - struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> - struct mx1_camera_dev *pcdev = ici->priv;
> -
> - if (pcdev->icd)
> - return -EBUSY;
> -
> - dev_info(icd->parent, "MX1 Camera driver attached to camera %d\n",
> - icd->devnum);
> -
> - mx1_camera_activate(pcdev);
> -
> - pcdev->icd = icd;
> -
> - return 0;
> -}
> -
> -static void mx1_camera_remove_device(struct soc_camera_device *icd)
> -{
> - struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> - struct mx1_camera_dev *pcdev = ici->priv;
> - unsigned int csicr1;
> -
> - BUG_ON(icd != pcdev->icd);
> -
> - /* disable interrupts */
> - csicr1 = __raw_readl(pcdev->base + CSICR1) & ~CSI_IRQ_MASK;
> - __raw_writel(csicr1, pcdev->base + CSICR1);
> -
> - /* Stop DMA engine */
> - imx_dma_disable(pcdev->dma_chan);
> -
> - dev_info(icd->parent, "MX1 Camera driver detached from camera %d\n",
> - icd->devnum);
> -
> - mx1_camera_deactivate(pcdev);
> -
> - pcdev->icd = NULL;
> -}
> -
> -static int mx1_camera_set_crop(struct soc_camera_device *icd,
> - struct v4l2_crop *a)
> -{
> - struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> -
> - return v4l2_subdev_call(sd, video, s_crop, a);
> -}
> -
> -static int mx1_camera_set_bus_param(struct soc_camera_device *icd)
> -{
> - struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> - struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> - struct mx1_camera_dev *pcdev = ici->priv;
> - struct v4l2_mbus_config cfg = {.type = V4L2_MBUS_PARALLEL,};
> - unsigned long common_flags;
> - unsigned int csicr1;
> - int ret;
> -
> - /* MX1 supports only 8bit buswidth */
> - ret = v4l2_subdev_call(sd, video, g_mbus_config, &cfg);
> - if (!ret) {
> - common_flags = soc_mbus_config_compatible(&cfg, CSI_BUS_FLAGS);
> - if (!common_flags) {
> - dev_warn(icd->parent,
> - "Flags incompatible: camera 0x%x, host 0x%x\n",
> - cfg.flags, CSI_BUS_FLAGS);
> - return -EINVAL;
> - }
> - } else if (ret != -ENOIOCTLCMD) {
> - return ret;
> - } else {
> - common_flags = CSI_BUS_FLAGS;
> - }
> -
> - /* Make choises, based on platform choice */
> - if ((common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) &&
> - (common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) {
> - if (!pcdev->pdata ||
> - pcdev->pdata->flags & MX1_CAMERA_VSYNC_HIGH)
> - common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_LOW;
> - else
> - common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_HIGH;
> - }
> -
> - if ((common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) &&
> - (common_flags & V4L2_MBUS_PCLK_SAMPLE_FALLING)) {
> - if (!pcdev->pdata ||
> - pcdev->pdata->flags & MX1_CAMERA_PCLK_RISING)
> - common_flags &= ~V4L2_MBUS_PCLK_SAMPLE_FALLING;
> - else
> - common_flags &= ~V4L2_MBUS_PCLK_SAMPLE_RISING;
> - }
> -
> - if ((common_flags & V4L2_MBUS_DATA_ACTIVE_HIGH) &&
> - (common_flags & V4L2_MBUS_DATA_ACTIVE_LOW)) {
> - if (!pcdev->pdata ||
> - pcdev->pdata->flags & MX1_CAMERA_DATA_HIGH)
> - common_flags &= ~V4L2_MBUS_DATA_ACTIVE_LOW;
> - else
> - common_flags &= ~V4L2_MBUS_DATA_ACTIVE_HIGH;
> - }
> -
> - cfg.flags = common_flags;
> - ret = v4l2_subdev_call(sd, video, s_mbus_config, &cfg);
> - if (ret < 0 && ret != -ENOIOCTLCMD) {
> - dev_dbg(icd->parent, "camera s_mbus_config(0x%lx) returned %d\n",
> - common_flags, ret);
> - return ret;
> - }
> -
> - csicr1 = __raw_readl(pcdev->base + CSICR1);
> -
> - if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
> - csicr1 |= CSICR1_REDGE;
> - if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
> - csicr1 |= CSICR1_SOF_POL;
> - if (common_flags & V4L2_MBUS_DATA_ACTIVE_LOW)
> - csicr1 |= CSICR1_DATA_POL;
> -
> - __raw_writel(csicr1, pcdev->base + CSICR1);
> -
> - return 0;
> -}
> -
> -static int mx1_camera_set_fmt(struct soc_camera_device *icd,
> - struct v4l2_format *f)
> -{
> - struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> - const struct soc_camera_format_xlate *xlate;
> - struct v4l2_pix_format *pix = &f->fmt.pix;
> - struct v4l2_mbus_framefmt mf;
> - int ret, buswidth;
> -
> - xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat);
> - if (!xlate) {
> - dev_warn(icd->parent, "Format %x not found\n",
> - pix->pixelformat);
> - return -EINVAL;
> - }
> -
> - buswidth = xlate->host_fmt->bits_per_sample;
> - if (buswidth > 8) {
> - dev_warn(icd->parent,
> - "bits-per-sample %d for format %x unsupported\n",
> - buswidth, pix->pixelformat);
> - return -EINVAL;
> - }
> -
> - mf.width = pix->width;
> - mf.height = pix->height;
> - mf.field = pix->field;
> - mf.colorspace = pix->colorspace;
> - mf.code = xlate->code;
> -
> - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf);
> - if (ret < 0)
> - return ret;
> -
> - if (mf.code != xlate->code)
> - return -EINVAL;
> -
> - pix->width = mf.width;
> - pix->height = mf.height;
> - pix->field = mf.field;
> - pix->colorspace = mf.colorspace;
> - icd->current_fmt = xlate;
> -
> - return ret;
> -}
> -
> -static int mx1_camera_try_fmt(struct soc_camera_device *icd,
> - struct v4l2_format *f)
> -{
> - struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
> - const struct soc_camera_format_xlate *xlate;
> - struct v4l2_pix_format *pix = &f->fmt.pix;
> - struct v4l2_mbus_framefmt mf;
> - int ret;
> - /* TODO: limit to mx1 hardware capabilities */
> -
> - xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat);
> - if (!xlate) {
> - dev_warn(icd->parent, "Format %x not found\n",
> - pix->pixelformat);
> - return -EINVAL;
> - }
> -
> - mf.width = pix->width;
> - mf.height = pix->height;
> - mf.field = pix->field;
> - mf.colorspace = pix->colorspace;
> - mf.code = xlate->code;
> -
> - /* limit to sensor capabilities */
> - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf);
> - if (ret < 0)
> - return ret;
> -
> - pix->width = mf.width;
> - pix->height = mf.height;
> - pix->field = mf.field;
> - pix->colorspace = mf.colorspace;
> -
> - return 0;
> -}
> -
> -static int mx1_camera_reqbufs(struct soc_camera_device *icd,
> - struct v4l2_requestbuffers *p)
> -{
> - int i;
> -
> - /*
> - * This is for locking debugging only. I removed spinlocks and now I
> - * check whether .prepare is ever called on a linked buffer, or whether
> - * a dma IRQ can occur for an in-work or unlinked buffer. Until now
> - * it hadn't triggered
> - */
> - for (i = 0; i < p->count; i++) {
> - struct mx1_buffer *buf = container_of(icd->vb_vidq.bufs[i],
> - struct mx1_buffer, vb);
> - buf->inwork = 0;
> - INIT_LIST_HEAD(&buf->vb.queue);
> - }
> -
> - return 0;
> -}
> -
> -static unsigned int mx1_camera_poll(struct file *file, poll_table *pt)
> -{
> - struct soc_camera_device *icd = file->private_data;
> - struct mx1_buffer *buf;
> -
> - buf = list_entry(icd->vb_vidq.stream.next, struct mx1_buffer,
> - vb.stream);
> -
> - poll_wait(file, &buf->vb.done, pt);
> -
> - if (buf->vb.state == VIDEOBUF_DONE ||
> - buf->vb.state == VIDEOBUF_ERROR)
> - return POLLIN | POLLRDNORM;
> -
> - return 0;
> -}
> -
> -static int mx1_camera_querycap(struct soc_camera_host *ici,
> - struct v4l2_capability *cap)
> -{
> - /* cap->name is set by the friendly caller:-> */
> - strlcpy(cap->card, "i.MX1/i.MXL Camera", sizeof(cap->card));
> - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
> -
> - return 0;
> -}
> -
> -static struct soc_camera_host_ops mx1_soc_camera_host_ops = {
> - .owner = THIS_MODULE,
> - .add = mx1_camera_add_device,
> - .remove = mx1_camera_remove_device,
> - .set_bus_param = mx1_camera_set_bus_param,
> - .set_crop = mx1_camera_set_crop,
> - .set_fmt = mx1_camera_set_fmt,
> - .try_fmt = mx1_camera_try_fmt,
> - .init_videobuf = mx1_camera_init_videobuf,
> - .reqbufs = mx1_camera_reqbufs,
> - .poll = mx1_camera_poll,
> - .querycap = mx1_camera_querycap,
> -};
> -
> -static struct fiq_handler fh = {
> - .name = "csi_sof"
> -};
> -
> -static int __init mx1_camera_probe(struct platform_device *pdev)
> -{
> - struct mx1_camera_dev *pcdev;
> - struct resource *res;
> - struct pt_regs regs;
> - struct clk *clk;
> - void __iomem *base;
> - unsigned int irq;
> - int err = 0;
> -
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - irq = platform_get_irq(pdev, 0);
> - if (!res || (int)irq <= 0) {
> - err = -ENODEV;
> - goto exit;
> - }
> -
> - clk = clk_get(&pdev->dev, "csi_clk");
> - if (IS_ERR(clk)) {
> - err = PTR_ERR(clk);
> - goto exit;
> - }
> -
> - pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
> - if (!pcdev) {
> - dev_err(&pdev->dev, "Could not allocate pcdev\n");
> - err = -ENOMEM;
> - goto exit_put_clk;
> - }
> -
> - pcdev->res = res;
> - pcdev->clk = clk;
> -
> - pcdev->pdata = pdev->dev.platform_data;
> -
> - if (pcdev->pdata)
> - pcdev->mclk = pcdev->pdata->mclk_10khz * 10000;
> -
> - if (!pcdev->mclk) {
> - dev_warn(&pdev->dev,
> - "mclk_10khz == 0! Please, fix your platform data. "
> - "Using default 20MHz\n");
> - pcdev->mclk = 20000000;
> - }
> -
> - INIT_LIST_HEAD(&pcdev->capture);
> - spin_lock_init(&pcdev->lock);
> -
> - /*
> - * Request the regions.
> - */
> - if (!request_mem_region(res->start, resource_size(res), DRIVER_NAME)) {
> - err = -EBUSY;
> - goto exit_kfree;
> - }
> -
> - base = ioremap(res->start, resource_size(res));
> - if (!base) {
> - err = -ENOMEM;
> - goto exit_release;
> - }
> - pcdev->irq = irq;
> - pcdev->base = base;
> -
> - /* request dma */
> - pcdev->dma_chan = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_HIGH);
> - if (pcdev->dma_chan < 0) {
> - dev_err(&pdev->dev, "Can't request DMA for MX1 CSI\n");
> - err = -EBUSY;
> - goto exit_iounmap;
> - }
> - dev_dbg(&pdev->dev, "got DMA channel %d\n", pcdev->dma_chan);
> -
> - imx_dma_setup_handlers(pcdev->dma_chan, mx1_camera_dma_irq, NULL,
> - pcdev);
> -
> - imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO,
> - IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0);
> - /* burst length : 16 words = 64 bytes */
> - imx_dma_config_burstlen(pcdev->dma_chan, 0);
> -
> - /* request irq */
> - err = claim_fiq(&fh);
> - if (err) {
> - dev_err(&pdev->dev, "Camera interrupt register failed \n");
> - goto exit_free_dma;
> - }
> -
> - set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end -
> - &mx1_camera_sof_fiq_start);
> -
> - regs.ARM_r8 = (long)MX1_DMA_DIMR;
> - regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan);
> - regs.ARM_r10 = (long)pcdev->base + CSICR1;
> - regs.ARM_fp = (long)pcdev->base + CSISR;
> - regs.ARM_sp = 1 << pcdev->dma_chan;
> - set_fiq_regs(®s);
> -
> - mxc_set_irq_fiq(irq, 1);
> - enable_fiq(irq);
> -
> - pcdev->soc_host.drv_name = DRIVER_NAME;
> - pcdev->soc_host.ops = &mx1_soc_camera_host_ops;
> - pcdev->soc_host.priv = pcdev;
> - pcdev->soc_host.v4l2_dev.dev = &pdev->dev;
> - pcdev->soc_host.nr = pdev->id;
> - err = soc_camera_host_register(&pcdev->soc_host);
> - if (err)
> - goto exit_free_irq;
> -
> - dev_info(&pdev->dev, "MX1 Camera driver loaded\n");
> -
> - return 0;
> -
> -exit_free_irq:
> - disable_fiq(irq);
> - mxc_set_irq_fiq(irq, 0);
> - release_fiq(&fh);
> -exit_free_dma:
> - imx_dma_free(pcdev->dma_chan);
> -exit_iounmap:
> - iounmap(base);
> -exit_release:
> - release_mem_region(res->start, resource_size(res));
> -exit_kfree:
> - kfree(pcdev);
> -exit_put_clk:
> - clk_put(clk);
> -exit:
> - return err;
> -}
> -
> -static int __exit mx1_camera_remove(struct platform_device *pdev)
> -{
> - struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
> - struct mx1_camera_dev *pcdev = container_of(soc_host,
> - struct mx1_camera_dev, soc_host);
> - struct resource *res;
> -
> - imx_dma_free(pcdev->dma_chan);
> - disable_fiq(pcdev->irq);
> - mxc_set_irq_fiq(pcdev->irq, 0);
> - release_fiq(&fh);
> -
> - clk_put(pcdev->clk);
> -
> - soc_camera_host_unregister(soc_host);
> -
> - iounmap(pcdev->base);
> -
> - res = pcdev->res;
> - release_mem_region(res->start, resource_size(res));
> -
> - kfree(pcdev);
> -
> - dev_info(&pdev->dev, "MX1 Camera driver unloaded\n");
> -
> - return 0;
> -}
> -
> -static struct platform_driver mx1_camera_driver = {
> - .driver = {
> - .name = DRIVER_NAME,
> - },
> - .remove = __exit_p(mx1_camera_remove),
> -};
> -
> -static int __init mx1_camera_init(void)
> -{
> - return platform_driver_probe(&mx1_camera_driver, mx1_camera_probe);
> -}
> -
> -static void __exit mx1_camera_exit(void)
> -{
> - return platform_driver_unregister(&mx1_camera_driver);
> -}
> -
> -module_init(mx1_camera_init);
> -module_exit(mx1_camera_exit);
> -
> -MODULE_DESCRIPTION("i.MX1/i.MXL SoC Camera Host driver");
> -MODULE_AUTHOR("Paulius Zaleckas <paulius.zaleckas@teltonika.lt>");
> -MODULE_LICENSE("GPL v2");
> -MODULE_VERSION(DRIVER_VERSION);
> -MODULE_ALIAS("platform:" DRIVER_NAME);
> diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h
> deleted file mode 100644
> index 4fd6c70..0000000
> --- a/include/linux/platform_data/camera-mx1.h
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/*
> - * mx1_camera.h - i.MX1/i.MXL camera driver header file
> - *
> - * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> - * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
> - *
> - * Based on PXA camera.h file:
> - * Copyright (C) 2003, Intel Corporation
> - * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#ifndef __ASM_ARCH_CAMERA_H_
> -#define __ASM_ARCH_CAMERA_H_
> -
> -#define MX1_CAMERA_DATA_HIGH 1
> -#define MX1_CAMERA_PCLK_RISING 2
> -#define MX1_CAMERA_VSYNC_HIGH 4
> -
> -extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
> -
> -/**
> - * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
> - * @mclk_10khz: master clock frequency in 10kHz units
> - * @flags: MX1 camera platform flags
> - */
> -struct mx1_camera_pdata {
> - unsigned long mclk_10khz;
> - unsigned long flags;
> -};
> -
> -#endif /* __ASM_ARCH_CAMERA_H_ */
>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH v2 11/34] media: mx1_camera: remove the driver
2012-09-20 12:56 ` Mauro Carvalho Chehab
@ 2012-09-20 14:47 ` Shawn Guo
0 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 14:47 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
Arnd Bergmann, Paulius Zaleckas, Guennadi Liakhovetski,
linux-media
On Thu, Sep 20, 2012 at 09:56:34AM -0300, Mauro Carvalho Chehab wrote:
> It is better to mark it as BROKEN for the next Kernel, and then to
> move it to staging, before dropping a broken driver. That gives people
> some time to fix it, if someone has interests on fixing the issues.
>
Ok. The driver has already been broken, and the patch marking it BROKEN
does not necessarily need to be in this series. I will drop the patch
from this series and send a separate patch based on media tree for that.
> > drivers/media/video/Kconfig | 12 -
> > drivers/media/video/Makefile | 1 -
> > drivers/media/video/mx1_camera.c | 889 -----------------------
>
> Btw, this conflicts with the tree renaming patches already at -staging, as
> this driver location is elsewhere.
>
mx1_camera.c is not a concern any more. However the series touches
mx2_camera.c and mx3_camera.c as well. I just tested to merge the
series with linux-next. Strangely, git does not detect the renaming
for automatically merging changes.
Do you have a stable branch for media patches that I can pull as
dependency?
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 13/34] dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
2012-09-20 6:45 ` [PATCH v2 11/34] media: mx1_camera: remove the driver Shawn Guo
@ 2012-09-20 6:45 ` Shawn Guo
2012-09-20 6:45 ` [PATCH v2 25/34] media: mx2_camera: remove dead code in mx2_camera_add_device Shawn Guo
` (3 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sascha Hauer, Javier Martin, Rob Herring, Arnd Bergmann,
Shawn Guo, Vinod Koul, Florian Tobias Schandinat, linux-media,
linux-fbdev
The header ipu.h really belongs to dma subsystem rather than imx
platform. Rename it to ipu-dma.h and put it into include/linux/dma/.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-media@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
---
drivers/dma/ipu/ipu_idmac.c | 3 +--
drivers/dma/ipu/ipu_irq.c | 3 +--
drivers/media/video/mx3_camera.c | 2 +-
drivers/video/mx3fb.c | 2 +-
.../mach/ipu.h => include/linux/dma/ipu-dma.h | 6 +++---
5 files changed, 7 insertions(+), 9 deletions(-)
rename arch/arm/mach-imx/include/mach/ipu.h => include/linux/dma/ipu-dma.h (97%)
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index c7573e5..6585537 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -22,8 +22,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
-
-#include <mach/ipu.h>
+#include <linux/dma/ipu-dma.h>
#include "../dmaengine.h"
#include "ipu_intern.h"
diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index fa95bcc..a5ee37d 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -15,8 +15,7 @@
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/module.h>
-
-#include <mach/ipu.h>
+#include <linux/dma/ipu-dma.h>
#include "ipu_intern.h"
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c
index 1481b0d..892cba5 100644
--- a/drivers/media/video/mx3_camera.c
+++ b/drivers/media/video/mx3_camera.c
@@ -17,6 +17,7 @@
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
+#include <linux/dma/ipu-dma.h>
#include <media/v4l2-common.h>
#include <media/v4l2-dev.h>
@@ -24,7 +25,6 @@
#include <media/soc_camera.h>
#include <media/soc_mediabus.h>
-#include <mach/ipu.h>
#include <linux/platform_data/camera-mx3.h>
#include <linux/platform_data/dma-imx.h>
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index d738108..3b63ad8 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -26,10 +26,10 @@
#include <linux/console.h>
#include <linux/clk.h>
#include <linux/mutex.h>
+#include <linux/dma/ipu-dma.h>
#include <linux/platform_data/dma-imx.h>
#include <mach/hardware.h>
-#include <mach/ipu.h>
#include <linux/platform_data/video-mx3fb.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-imx/include/mach/ipu.h b/include/linux/dma/ipu-dma.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/ipu.h
rename to include/linux/dma/ipu-dma.h
index 539e559..1803111 100644
--- a/arch/arm/mach-imx/include/mach/ipu.h
+++ b/include/linux/dma/ipu-dma.h
@@ -9,8 +9,8 @@
* published by the Free Software Foundation.
*/
-#ifndef _IPU_H_
-#define _IPU_H_
+#ifndef __LINUX_DMA_IPU_DMA_H
+#define __LINUX_DMA_IPU_DMA_H
#include <linux/types.h>
#include <linux/dmaengine.h>
@@ -174,4 +174,4 @@ struct idmac_channel {
#define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd)
#define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan)
-#endif
+#endif /* __LINUX_DMA_IPU_DMA_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 25/34] media: mx2_camera: remove dead code in mx2_camera_add_device
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
2012-09-20 6:45 ` [PATCH v2 11/34] media: mx1_camera: remove the driver Shawn Guo
2012-09-20 6:45 ` [PATCH v2 13/34] dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h Shawn Guo
@ 2012-09-20 6:45 ` Shawn Guo
2012-09-20 6:45 ` [PATCH v2 26/34] media: mx2_camera: use managed functions to clean up code Shawn Guo
` (2 subsequent siblings)
5 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sascha Hauer, Javier Martin, Rob Herring, Arnd Bergmann,
Shawn Guo, linux-media
This is a piece of code becoming dead since commit 2c9ba37 ([media]
V4L: mx2_camera: remove unsupported i.MX27 DMA mode, make EMMA
mandatory). It should have been removed together with the commit.
Remove it now.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org
---
drivers/media/video/mx2_camera.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 965427f..89c7e28 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -441,11 +441,9 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
csicr1 = CSICR1_MCLKEN;
- if (cpu_is_mx27()) {
+ if (cpu_is_mx27())
csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC |
CSICR1_RXFF_LEVEL(0);
- } else if (cpu_is_mx27())
- csicr1 |= CSICR1_SOF_INTEN | CSICR1_RXFF_LEVEL(2);
pcdev->csicr1 = csicr1;
writel(pcdev->csicr1, pcdev->base_csi + CSICR1);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 26/34] media: mx2_camera: use managed functions to clean up code
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
` (2 preceding siblings ...)
2012-09-20 6:45 ` [PATCH v2 25/34] media: mx2_camera: remove dead code in mx2_camera_add_device Shawn Guo
@ 2012-09-20 6:45 ` Shawn Guo
2012-09-20 6:45 ` [PATCH v2 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id Shawn Guo
2012-09-20 7:39 ` [PATCH v2 00/34] i.MX multi-platform support Arnd Bergmann
5 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sascha Hauer, Javier Martin, Rob Herring, Arnd Bergmann,
Shawn Guo, linux-media
Use managed functions to clean up the error handling code and function
mx2_camera_remove(). Along with the change, a few variables get removed
from struct mx2_camera_dev.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org
---
drivers/media/video/mx2_camera.c | 149 ++++++++++++--------------------------
1 file changed, 45 insertions(+), 104 deletions(-)
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 89c7e28..9bb9e8c 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -274,12 +274,9 @@ struct mx2_camera_dev {
struct soc_camera_device *icd;
struct clk *clk_csi, *clk_emma_ahb, *clk_emma_ipg;
- unsigned int irq_csi, irq_emma;
void __iomem *base_csi, *base_emma;
- unsigned long base_dma;
struct mx2_camera_platform_data *pdata;
- struct resource *res_csi, *res_emma;
unsigned long platform_flags;
struct list_head capture;
@@ -1607,64 +1604,59 @@ static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
return IRQ_HANDLED;
}
-static int __devinit mx27_camera_emma_init(struct mx2_camera_dev *pcdev)
+static int __devinit mx27_camera_emma_init(struct platform_device *pdev)
{
- struct resource *res_emma = pcdev->res_emma;
+ struct mx2_camera_dev *pcdev = platform_get_drvdata(pdev);
+ struct resource *res_emma;
+ int irq_emma;
int err = 0;
- if (!request_mem_region(res_emma->start, resource_size(res_emma),
- MX2_CAM_DRV_NAME)) {
- err = -EBUSY;
+ res_emma = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ irq_emma = platform_get_irq(pdev, 1);
+ if (!res_emma || !irq_emma) {
+ dev_err(pcdev->dev, "no EMMA resources\n");
goto out;
}
- pcdev->base_emma = ioremap(res_emma->start, resource_size(res_emma));
+ pcdev->base_emma = devm_request_and_ioremap(pcdev->dev, res_emma);
if (!pcdev->base_emma) {
- err = -ENOMEM;
- goto exit_release;
+ err = -EADDRNOTAVAIL;
+ goto out;
}
- err = request_irq(pcdev->irq_emma, mx27_camera_emma_irq, 0,
- MX2_CAM_DRV_NAME, pcdev);
+ err = devm_request_irq(pcdev->dev, irq_emma, mx27_camera_emma_irq, 0,
+ MX2_CAM_DRV_NAME, pcdev);
if (err) {
dev_err(pcdev->dev, "Camera EMMA interrupt register failed \n");
- goto exit_iounmap;
+ goto out;
}
- pcdev->clk_emma_ipg = clk_get(pcdev->dev, "emma-ipg");
+ pcdev->clk_emma_ipg = devm_clk_get(pcdev->dev, "emma-ipg");
if (IS_ERR(pcdev->clk_emma_ipg)) {
err = PTR_ERR(pcdev->clk_emma_ipg);
- goto exit_free_irq;
+ goto out;
}
clk_prepare_enable(pcdev->clk_emma_ipg);
- pcdev->clk_emma_ahb = clk_get(pcdev->dev, "emma-ahb");
+ pcdev->clk_emma_ahb = devm_clk_get(pcdev->dev, "emma-ahb");
if (IS_ERR(pcdev->clk_emma_ahb)) {
err = PTR_ERR(pcdev->clk_emma_ahb);
- goto exit_clk_emma_ipg_put;
+ goto exit_clk_emma_ipg;
}
clk_prepare_enable(pcdev->clk_emma_ahb);
err = mx27_camera_emma_prp_reset(pcdev);
if (err)
- goto exit_clk_emma_ahb_put;
+ goto exit_clk_emma_ahb;
return err;
-exit_clk_emma_ahb_put:
+exit_clk_emma_ahb:
clk_disable_unprepare(pcdev->clk_emma_ahb);
- clk_put(pcdev->clk_emma_ahb);
-exit_clk_emma_ipg_put:
+exit_clk_emma_ipg:
clk_disable_unprepare(pcdev->clk_emma_ipg);
- clk_put(pcdev->clk_emma_ipg);
-exit_free_irq:
- free_irq(pcdev->irq_emma, pcdev);
-exit_iounmap:
- iounmap(pcdev->base_emma);
-exit_release:
- release_mem_region(res_emma->start, resource_size(res_emma));
out:
return err;
}
@@ -1672,9 +1664,8 @@ out:
static int __devinit mx2_camera_probe(struct platform_device *pdev)
{
struct mx2_camera_dev *pcdev;
- struct resource *res_csi, *res_emma;
- void __iomem *base_csi;
- int irq_csi, irq_emma;
+ struct resource *res_csi;
+ int irq_csi;
int err = 0;
dev_dbg(&pdev->dev, "initialising\n");
@@ -1687,21 +1678,20 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
goto exit;
}
- pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
+ pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL);
if (!pcdev) {
dev_err(&pdev->dev, "Could not allocate pcdev\n");
err = -ENOMEM;
goto exit;
}
- pcdev->clk_csi = clk_get(&pdev->dev, "ahb");
+ pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb");
if (IS_ERR(pcdev->clk_csi)) {
dev_err(&pdev->dev, "Could not get csi clock\n");
err = PTR_ERR(pcdev->clk_csi);
- goto exit_kfree;
+ goto exit;
}
- pcdev->res_csi = res_csi;
pcdev->pdata = pdev->dev.platform_data;
if (pcdev->pdata) {
long rate;
@@ -1711,11 +1701,11 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
rate = clk_round_rate(pcdev->clk_csi, pcdev->pdata->clk * 2);
if (rate <= 0) {
err = -ENODEV;
- goto exit_dma_free;
+ goto exit;
}
err = clk_set_rate(pcdev->clk_csi, rate);
if (err < 0)
- goto exit_dma_free;
+ goto exit;
}
INIT_LIST_HEAD(&pcdev->capture);
@@ -1723,50 +1713,36 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&pcdev->discard);
spin_lock_init(&pcdev->lock);
- /*
- * Request the regions.
- */
- if (!request_mem_region(res_csi->start, resource_size(res_csi),
- MX2_CAM_DRV_NAME)) {
- err = -EBUSY;
- goto exit_dma_free;
+ pcdev->base_csi = devm_request_and_ioremap(&pdev->dev, res_csi);
+ if (!pcdev->base_csi) {
+ err = -EADDRNOTAVAIL;
+ goto exit;
}
- base_csi = ioremap(res_csi->start, resource_size(res_csi));
- if (!base_csi) {
- err = -ENOMEM;
- goto exit_release;
- }
- pcdev->irq_csi = irq_csi;
- pcdev->base_csi = base_csi;
- pcdev->base_dma = res_csi->start;
pcdev->dev = &pdev->dev;
+ platform_set_drvdata(pdev, pcdev);
if (cpu_is_mx25()) {
- err = request_irq(pcdev->irq_csi, mx25_camera_irq, 0,
- MX2_CAM_DRV_NAME, pcdev);
+ err = devm_request_irq(&pdev->dev, irq_csi, mx25_camera_irq, 0,
+ MX2_CAM_DRV_NAME, pcdev);
if (err) {
dev_err(pcdev->dev, "Camera interrupt register failed \n");
- goto exit_iounmap;
+ goto exit;
}
}
if (cpu_is_mx27()) {
- /* EMMA support */
- res_emma = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- irq_emma = platform_get_irq(pdev, 1);
-
- if (!res_emma || !irq_emma) {
- dev_err(&pdev->dev, "no EMMA resources\n");
- goto exit_free_irq;
- }
-
- pcdev->res_emma = res_emma;
- pcdev->irq_emma = irq_emma;
- if (mx27_camera_emma_init(pcdev))
- goto exit_free_irq;
+ err = mx27_camera_emma_init(pdev);
+ if (err)
+ goto exit;
}
+ /*
+ * We're done with drvdata here. Clear the pointer so that
+ * v4l2 core can start using drvdata on its purpose.
+ */
+ platform_set_drvdata(pdev, NULL);
+
pcdev->soc_host.drv_name = MX2_CAM_DRV_NAME,
pcdev->soc_host.ops = &mx2_soc_camera_host_ops,
pcdev->soc_host.priv = pcdev;
@@ -1793,25 +1769,9 @@ exit_free_emma:
vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx);
eallocctx:
if (cpu_is_mx27()) {
- free_irq(pcdev->irq_emma, pcdev);
clk_disable_unprepare(pcdev->clk_emma_ipg);
- clk_put(pcdev->clk_emma_ipg);
clk_disable_unprepare(pcdev->clk_emma_ahb);
- clk_put(pcdev->clk_emma_ahb);
- iounmap(pcdev->base_emma);
- release_mem_region(pcdev->res_emma->start, resource_size(pcdev->res_emma));
}
-exit_free_irq:
- if (cpu_is_mx25())
- free_irq(pcdev->irq_csi, pcdev);
-exit_iounmap:
- iounmap(base_csi);
-exit_release:
- release_mem_region(res_csi->start, resource_size(res_csi));
-exit_dma_free:
- clk_put(pcdev->clk_csi);
-exit_kfree:
- kfree(pcdev);
exit:
return err;
}
@@ -1821,35 +1781,16 @@ static int __devexit mx2_camera_remove(struct platform_device *pdev)
struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
struct mx2_camera_dev *pcdev = container_of(soc_host,
struct mx2_camera_dev, soc_host);
- struct resource *res;
-
- clk_put(pcdev->clk_csi);
- if (cpu_is_mx25())
- free_irq(pcdev->irq_csi, pcdev);
- if (cpu_is_mx27())
- free_irq(pcdev->irq_emma, pcdev);
soc_camera_host_unregister(&pcdev->soc_host);
vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx);
- iounmap(pcdev->base_csi);
-
if (cpu_is_mx27()) {
clk_disable_unprepare(pcdev->clk_emma_ipg);
- clk_put(pcdev->clk_emma_ipg);
clk_disable_unprepare(pcdev->clk_emma_ahb);
- clk_put(pcdev->clk_emma_ahb);
- iounmap(pcdev->base_emma);
- res = pcdev->res_emma;
- release_mem_region(res->start, resource_size(res));
}
- res = pcdev->res_csi;
- release_mem_region(res->start, resource_size(res));
-
- kfree(pcdev);
-
dev_info(&pdev->dev, "MX2 Camera driver unloaded\n");
return 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
` (3 preceding siblings ...)
2012-09-20 6:45 ` [PATCH v2 26/34] media: mx2_camera: use managed functions to clean up code Shawn Guo
@ 2012-09-20 6:45 ` Shawn Guo
[not found] ` <20120927160321.56420910@redhat.com>
2012-09-20 7:39 ` [PATCH v2 00/34] i.MX multi-platform support Arnd Bergmann
5 siblings, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Sascha Hauer, Javier Martin, Rob Herring, Arnd Bergmann,
Shawn Guo, linux-media
It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.
As the result, mach/hardware.h inclusion gets removed from the driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org
---
arch/arm/mach-imx/clk-imx25.c | 6 +-
arch/arm/mach-imx/clk-imx27.c | 6 +-
arch/arm/mach-imx/devices/devices-common.h | 1 +
arch/arm/mach-imx/devices/platform-mx2-camera.c | 12 +--
drivers/media/video/mx2_camera.c | 95 +++++++++++++++++------
5 files changed, 85 insertions(+), 35 deletions(-)
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index 1aea073..71fe521 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1");
clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1");
clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1");
- clk_register_clkdev(clk[csi_ipg_per], "per", "mx2-camera.0");
- clk_register_clkdev(clk[csi_ipg], "ipg", "mx2-camera.0");
- clk_register_clkdev(clk[csi_ahb], "ahb", "mx2-camera.0");
+ clk_register_clkdev(clk[csi_ipg_per], "per", "imx25-camera.0");
+ clk_register_clkdev(clk[csi_ipg], "ipg", "imx25-camera.0");
+ clk_register_clkdev(clk[csi_ahb], "ahb", "imx25-camera.0");
clk_register_clkdev(clk[dummy], "audmux", NULL);
clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0");
clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1");
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 82cb785..f4ec05e 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[per3_gate], "per", "imx-fb.0");
clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx-fb.0");
clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx-fb.0");
- clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0");
+ clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc");
clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc");
clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc");
@@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1");
clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
- clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0");
- clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0");
+ clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0");
+ clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0");
clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL);
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index 7f2698c..8112a1a 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
#include <linux/platform_data/camera-mx2.h>
struct imx_mx2_camera_data {
+ const char *devid;
resource_size_t iobasecsi;
resource_size_t iosizecsi;
resource_size_t irqcsi;
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c
index 9ad5b2d..b88877d 100644
--- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
+++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
@@ -9,14 +9,16 @@
#include <mach/hardware.h>
#include "devices-common.h"
-#define imx_mx2_camera_data_entry_single(soc) \
+#define imx_mx2_camera_data_entry_single(soc, _devid) \
{ \
+ .devid = _devid, \
.iobasecsi = soc ## _CSI_BASE_ADDR, \
.iosizecsi = SZ_4K, \
.irqcsi = soc ## _INT_CSI, \
}
-#define imx_mx2_camera_data_entry_single_emma(soc) \
+#define imx_mx2_camera_data_entry_single_emma(soc, _devid) \
{ \
+ .devid = _devid, \
.iobasecsi = soc ## _CSI_BASE_ADDR, \
.iosizecsi = SZ_32, \
.irqcsi = soc ## _INT_CSI, \
@@ -27,12 +29,12 @@
#ifdef CONFIG_SOC_IMX25
const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
- imx_mx2_camera_data_entry_single(MX25);
+ imx_mx2_camera_data_entry_single(MX25, "imx25-camera");
#endif /* ifdef CONFIG_SOC_IMX25 */
#ifdef CONFIG_SOC_IMX27
const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
- imx_mx2_camera_data_entry_single_emma(MX27);
+ imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera");
#endif /* ifdef CONFIG_SOC_IMX27 */
struct platform_device *__init imx_add_mx2_camera(
@@ -58,7 +60,7 @@ struct platform_device *__init imx_add_mx2_camera(
.flags = IORESOURCE_IRQ,
},
};
- return imx_add_platform_device_dmamask("mx2-camera", 0,
+ return imx_add_platform_device_dmamask(data->devid, 0,
res, data->iobaseemmaprp ? 4 : 2,
pdata, sizeof(*pdata), DMA_BIT_MASK(32));
}
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
index 9bb9e8c..64c52dc 100644
--- a/drivers/media/video/mx2_camera.c
+++ b/drivers/media/video/mx2_camera.c
@@ -41,7 +41,6 @@
#include <linux/videodev2.h>
#include <linux/platform_data/camera-mx2.h>
-#include <mach/hardware.h>
#include <asm/dma.h>
@@ -121,11 +120,13 @@
#define CSICR1 0x00
#define CSICR2 0x04
-#define CSISR (cpu_is_mx27() ? 0x08 : 0x18)
+#define CSISR_IMX25 0x18
+#define CSISR_IMX27 0x08
#define CSISTATFIFO 0x0c
#define CSIRFIFO 0x10
#define CSIRXCNT 0x14
-#define CSICR3 (cpu_is_mx27() ? 0x1C : 0x08)
+#define CSICR3_IMX25 0x08
+#define CSICR3_IMX27 0x1c
#define CSIDMASA_STATFIFO 0x20
#define CSIDMATA_STATFIFO 0x24
#define CSIDMASA_FB1 0x28
@@ -268,6 +269,11 @@ struct mx2_buffer {
struct mx2_buf_internal internal;
};
+enum mx2_camera_type {
+ IMX25_CAMERA,
+ IMX27_CAMERA,
+};
+
struct mx2_camera_dev {
struct device *dev;
struct soc_camera_host soc_host;
@@ -291,6 +297,9 @@ struct mx2_camera_dev {
struct mx2_buffer *fb2_active;
u32 csicr1;
+ u32 reg_csisr;
+ u32 reg_csicr3;
+ enum mx2_camera_type devtype;
struct mx2_buf_internal buf_discard[2];
void *discard_buffer;
@@ -303,6 +312,29 @@ struct mx2_camera_dev {
struct vb2_alloc_ctx *alloc_ctx;
};
+static struct platform_device_id mx2_camera_devtype[] = {
+ {
+ .name = "imx25-camera",
+ .driver_data = IMX25_CAMERA,
+ }, {
+ .name = "imx27-camera",
+ .driver_data = IMX27_CAMERA,
+ }, {
+ /* sentinel */
+ }
+};
+MODULE_DEVICE_TABLE(platform, mx2_camera_devtype);
+
+static inline int is_imx25_camera(struct mx2_camera_dev *pcdev)
+{
+ return pcdev->devtype == IMX25_CAMERA;
+}
+
+static inline int is_imx27_camera(struct mx2_camera_dev *pcdev)
+{
+ return pcdev->devtype == IMX27_CAMERA;
+}
+
static struct mx2_buffer *mx2_ibuf_to_buf(struct mx2_buf_internal *int_buf)
{
return container_of(int_buf, struct mx2_buffer, internal);
@@ -406,9 +438,9 @@ static void mx2_camera_deactivate(struct mx2_camera_dev *pcdev)
clk_disable_unprepare(pcdev->clk_csi);
writel(0, pcdev->base_csi + CSICR1);
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
writel(0, pcdev->base_emma + PRP_CNTL);
- } else if (cpu_is_mx25()) {
+ } else if (is_imx25_camera(pcdev)) {
spin_lock_irqsave(&pcdev->lock, flags);
pcdev->fb1_active = NULL;
pcdev->fb2_active = NULL;
@@ -438,7 +470,7 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
csicr1 = CSICR1_MCLKEN;
- if (cpu_is_mx27())
+ if (is_imx27_camera(pcdev))
csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC |
CSICR1_RXFF_LEVEL(0);
@@ -514,7 +546,7 @@ out:
static irqreturn_t mx25_camera_irq(int irq_csi, void *data)
{
struct mx2_camera_dev *pcdev = data;
- u32 status = readl(pcdev->base_csi + CSISR);
+ u32 status = readl(pcdev->base_csi + pcdev->reg_csisr);
if (status & CSISR_DMA_TSF_FB1_INT)
mx25_camera_frame_done(pcdev, 1, MX2_STATE_DONE);
@@ -523,7 +555,7 @@ static irqreturn_t mx25_camera_irq(int irq_csi, void *data)
/* FIXME: handle CSISR_RFF_OR_INT */
- writel(status, pcdev->base_csi + CSISR);
+ writel(status, pcdev->base_csi + pcdev->reg_csisr);
return IRQ_HANDLED;
}
@@ -608,7 +640,7 @@ static void mx2_videobuf_queue(struct vb2_buffer *vb)
buf->state = MX2_STATE_QUEUED;
list_add_tail(&buf->internal.queue, &pcdev->capture);
- if (cpu_is_mx25()) {
+ if (is_imx25_camera(pcdev)) {
u32 csicr3, dma_inten = 0;
if (pcdev->fb1_active == NULL) {
@@ -627,20 +659,20 @@ static void mx2_videobuf_queue(struct vb2_buffer *vb)
list_del(&buf->internal.queue);
buf->state = MX2_STATE_ACTIVE;
- csicr3 = readl(pcdev->base_csi + CSICR3);
+ csicr3 = readl(pcdev->base_csi + pcdev->reg_csicr3);
/* Reflash DMA */
writel(csicr3 | CSICR3_DMA_REFLASH_RFF,
- pcdev->base_csi + CSICR3);
+ pcdev->base_csi + pcdev->reg_csicr3);
/* clear & enable interrupts */
- writel(dma_inten, pcdev->base_csi + CSISR);
+ writel(dma_inten, pcdev->base_csi + pcdev->reg_csisr);
pcdev->csicr1 |= dma_inten;
writel(pcdev->csicr1, pcdev->base_csi + CSICR1);
/* enable DMA */
csicr3 |= CSICR3_DMA_REQ_EN_RFF | CSICR3_RXFF_LEVEL(1);
- writel(csicr3, pcdev->base_csi + CSICR3);
+ writel(csicr3, pcdev->base_csi + pcdev->reg_csicr3);
}
}
@@ -684,7 +716,7 @@ static void mx2_videobuf_release(struct vb2_buffer *vb)
*/
spin_lock_irqsave(&pcdev->lock, flags);
- if (cpu_is_mx25() && buf->state == MX2_STATE_ACTIVE) {
+ if (is_imx25_camera(pcdev) && buf->state == MX2_STATE_ACTIVE) {
if (pcdev->fb1_active == buf) {
pcdev->csicr1 &= ~CSICR1_FB1_DMA_INTEN;
writel(0, pcdev->base_csi + CSIDMASA_FB1);
@@ -807,7 +839,7 @@ static int mx2_start_streaming(struct vb2_queue *q, unsigned int count)
unsigned long phys;
int bytesperline;
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
unsigned long flags;
if (count < 2)
return -EINVAL;
@@ -902,7 +934,7 @@ static int mx2_stop_streaming(struct vb2_queue *q)
void *b;
u32 cntl;
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
spin_lock_irqsave(&pcdev->lock, flags);
cntl = readl(pcdev->base_emma + PRP_CNTL);
@@ -1054,11 +1086,11 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd)
if (bytesperline < 0)
return bytesperline;
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
ret = mx27_camera_emma_prp_reset(pcdev);
if (ret)
return ret;
- } else if (cpu_is_mx25()) {
+ } else if (is_imx25_camera(pcdev)) {
writel((bytesperline * icd->user_height) >> 2,
pcdev->base_csi + CSIRXCNT);
writel((bytesperline << 16) | icd->user_height,
@@ -1351,7 +1383,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd,
/* FIXME: implement MX27 limits */
/* limit to MX25 hardware capabilities */
- if (cpu_is_mx25()) {
+ if (is_imx25_camera(pcdev)) {
if (xlate->host_fmt->bits_per_sample <= 8)
width_limit = 0xffff * 4;
else
@@ -1685,6 +1717,20 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
goto exit;
}
+ pcdev->devtype = pdev->id_entry->driver_data;
+ switch (pcdev->devtype) {
+ case IMX25_CAMERA:
+ pcdev->reg_csisr = CSISR_IMX25;
+ pcdev->reg_csicr3 = CSICR3_IMX25;
+ break;
+ case IMX27_CAMERA:
+ pcdev->reg_csisr = CSISR_IMX27;
+ pcdev->reg_csicr3 = CSICR3_IMX27;
+ break;
+ default:
+ break;
+ }
+
pcdev->clk_csi = devm_clk_get(&pdev->dev, "ahb");
if (IS_ERR(pcdev->clk_csi)) {
dev_err(&pdev->dev, "Could not get csi clock\n");
@@ -1722,7 +1768,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
pcdev->dev = &pdev->dev;
platform_set_drvdata(pdev, pcdev);
- if (cpu_is_mx25()) {
+ if (is_imx25_camera(pcdev)) {
err = devm_request_irq(&pdev->dev, irq_csi, mx25_camera_irq, 0,
MX2_CAM_DRV_NAME, pcdev);
if (err) {
@@ -1731,7 +1777,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
}
}
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
err = mx27_camera_emma_init(pdev);
if (err)
goto exit;
@@ -1748,7 +1794,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
pcdev->soc_host.priv = pcdev;
pcdev->soc_host.v4l2_dev.dev = &pdev->dev;
pcdev->soc_host.nr = pdev->id;
- if (cpu_is_mx25())
+ if (is_imx25_camera(pcdev))
pcdev->soc_host.capabilities = SOCAM_HOST_CAP_STRIDE;
pcdev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev);
@@ -1768,7 +1814,7 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
exit_free_emma:
vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx);
eallocctx:
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
clk_disable_unprepare(pcdev->clk_emma_ipg);
clk_disable_unprepare(pcdev->clk_emma_ahb);
}
@@ -1786,7 +1832,7 @@ static int __devexit mx2_camera_remove(struct platform_device *pdev)
vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx);
- if (cpu_is_mx27()) {
+ if (is_imx27_camera(pcdev)) {
clk_disable_unprepare(pcdev->clk_emma_ipg);
clk_disable_unprepare(pcdev->clk_emma_ahb);
}
@@ -1800,6 +1846,7 @@ static struct platform_driver mx2_camera_driver = {
.driver = {
.name = MX2_CAM_DRV_NAME,
},
+ .id_table = mx2_camera_devtype,
.remove = __devexit_p(mx2_camera_remove),
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 6:45 [PATCH v2 00/34] i.MX multi-platform support Shawn Guo
` (4 preceding siblings ...)
2012-09-20 6:45 ` [PATCH v2 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id Shawn Guo
@ 2012-09-20 7:39 ` Arnd Bergmann
2012-09-20 11:41 ` Mark Brown
2012-09-20 14:53 ` Shawn Guo
5 siblings, 2 replies; 25+ messages in thread
From: Arnd Bergmann @ 2012-09-20 7:39 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
Mark Brown, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thursday 20 September 2012, Shawn Guo wrote:
>
> Here is the second post, which should have addressed the comments that
> reviewers put on v1.
>
> It's available on branch below.
>
> git://git.linaro.org/people/shawnguo/linux-2.6.git imx/multi-platform-v2
>
> And it's based on the following branches.
>
> calxeda/multi-plat
> arm-soc/multiplatform/platform-data
> arm-soc/multiplatform/smp_ops
> arm-soc/imx/cleanup
> arm-soc/imx/dt
> sound/for-3.7
>
> Subsystem maintainers,
>
> I plan to send the whole series for 3.7 via arm-soc tree. Please let
> me know if you have problem with that. Thanks.
The first five branches are scheduled to go through the arm-soc tree, so
I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
to expect that hitting mainline. If it always gets in very early during the
merge window, it's probably ok to put the imx/multi-platform patches into
the same branch as the other ones in arm-soc and wait for the sound stuff
to hit mainline first, otherwise I'd suggest we start a second
next/multiplatform-2 branch for imx and send the first part early on
but then wait with the second batch before sound gets in.
Arnd
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 7:39 ` [PATCH v2 00/34] i.MX multi-platform support Arnd Bergmann
@ 2012-09-20 11:41 ` Mark Brown
2012-09-20 11:52 ` Shawn Guo
2012-09-20 14:53 ` Shawn Guo
1 sibling, 1 reply; 25+ messages in thread
From: Mark Brown @ 2012-09-20 11:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Shawn Guo, linux-arm-kernel, Sascha Hauer, Javier Martin,
Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:
> The first five branches are scheduled to go through the arm-soc tree, so
> I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> to expect that hitting mainline. If it always gets in very early during the
> merge window, it's probably ok to put the imx/multi-platform patches into
> the same branch as the other ones in arm-soc and wait for the sound stuff
> to hit mainline first, otherwise I'd suggest we start a second
> next/multiplatform-2 branch for imx and send the first part early on
> but then wait with the second batch before sound gets in.
It's usually pretty early but Takashi will be on holiday this time so
I'm not sure if things might be different (he was going to send the pull
request from holiday). I also didn't guarantee that it'll be stable
yet, can someone please tell me what the depenency is here?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 11:41 ` Mark Brown
@ 2012-09-20 11:52 ` Shawn Guo
2012-09-20 12:47 ` Mark Brown
0 siblings, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 11:52 UTC (permalink / raw)
To: Mark Brown
Cc: Arnd Bergmann, linux-arm-kernel, Sascha Hauer, Javier Martin,
Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:
> It's usually pretty early but Takashi will be on holiday this time so
> I'm not sure if things might be different (he was going to send the pull
> request from holiday). I also didn't guarantee that it'll be stable
> yet, can someone please tell me what the depenency is here?
We need the patch to have all imx drivers mach/* inclusion free,
so that we can enable multi-platform support for imx, which is the
whole point of the series.
If your for-3.7 is not stable anyway, I guess the easiest the way
to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
numbers from platform_data" from your tree and I have it be part of
the series to go via arm-soc tree as a whole. (This is the original
plan that I mentioned in v1 cover letter)
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 11:52 ` Shawn Guo
@ 2012-09-20 12:47 ` Mark Brown
2012-09-20 13:36 ` Shawn Guo
0 siblings, 1 reply; 25+ messages in thread
From: Mark Brown @ 2012-09-20 12:47 UTC (permalink / raw)
To: Shawn Guo
Cc: Arnd Bergmann, linux-arm-kernel, Sascha Hauer, Javier Martin,
Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thu, Sep 20, 2012 at 07:52:15PM +0800, Shawn Guo wrote:
> On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:
> > It's usually pretty early but Takashi will be on holiday this time so
> > I'm not sure if things might be different (he was going to send the pull
> > request from holiday). I also didn't guarantee that it'll be stable
> > yet, can someone please tell me what the depenency is here?
> We need the patch to have all imx drivers mach/* inclusion free,
> so that we can enable multi-platform support for imx, which is the
> whole point of the series.
That doesn't answer the question. What is the dependency - what is it
about this patch that something else depends on? Your cover letters
just say you'd like to do this but don't mention dependencies at all and
when I asked the question last night you said the same thing. I've not
seen the rest of the series...
> If your for-3.7 is not stable anyway, I guess the easiest the way
It probably *is* stable but I'm not enthused about people pulling
unsigned tags. I might rebase, though - I'm going to finalise the tree
in the next few days.
> to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
> numbers from platform_data" from your tree and I have it be part of
> the series to go via arm-soc tree as a whole. (This is the original
> plan that I mentioned in v1 cover letter)
You just mentioned it as a preference (you said it's something you'd
like to do), please if you're doing this sort of cross tree thing be
explicit about what the inter-tree relationships are. If things need to
go in via the same tree say so explicitly (and ideally say way this is).
The main reason I applied it straight away was that Javier mentioned
that it was a bug fix and it's near the merge window and these random
ARM cleanup serieses never seem to go in quickly.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 12:47 ` Mark Brown
@ 2012-09-20 13:36 ` Shawn Guo
0 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 13:36 UTC (permalink / raw)
To: Mark Brown
Cc: Arnd Bergmann, linux-arm-kernel, Sascha Hauer, Javier Martin,
Rob Herring, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thu, Sep 20, 2012 at 08:47:10AM -0400, Mark Brown wrote:
> On Thu, Sep 20, 2012 at 07:52:15PM +0800, Shawn Guo wrote:
> > On Thu, Sep 20, 2012 at 07:41:50AM -0400, Mark Brown wrote:
>
> > > It's usually pretty early but Takashi will be on holiday this time so
> > > I'm not sure if things might be different (he was going to send the pull
> > > request from holiday). I also didn't guarantee that it'll be stable
> > > yet, can someone please tell me what the depenency is here?
>
> > We need the patch to have all imx drivers mach/* inclusion free,
> > so that we can enable multi-platform support for imx, which is the
> > whole point of the series.
>
> That doesn't answer the question. What is the dependency - what is it
> about this patch that something else depends on? Your cover letters
> just say you'd like to do this but don't mention dependencies at all and
> when I asked the question last night you said the same thing. I've not
> seen the rest of the series...
>
Ah, right. You did get copied on the whole series. So the whole point
of patch "ASoC: mx27vis: retrieve gpio numbers from platform_data" is
to get rid of inclusion mach/iomux-mx27.h. This has to be done before
we enable multi-platform support for imx, since mach/* has to be removed
completely for multi-platform build.
> > If your for-3.7 is not stable anyway, I guess the easiest the way
>
> It probably *is* stable but I'm not enthused about people pulling
> unsigned tags. I might rebase, though - I'm going to finalise the tree
> in the next few days.
>
> > to do it might be you drop the patch "ASoC: mx27vis: retrieve gpio
> > numbers from platform_data" from your tree and I have it be part of
> > the series to go via arm-soc tree as a whole. (This is the original
> > plan that I mentioned in v1 cover letter)
>
> You just mentioned it as a preference (you said it's something you'd
> like to do), please if you're doing this sort of cross tree thing be
> explicit about what the inter-tree relationships are. If things need to
> go in via the same tree say so explicitly (and ideally say way this is).
>
Ok, my bad.
> The main reason I applied it straight away was that Javier mentioned
> that it was a bug fix and it's near the merge window and these random
> ARM cleanup serieses never seem to go in quickly.
The series is planned for 3.7 merge window. Is it still possible for
you to drop the patch from your tree to ease the process? Or I will
hold my pull-request to arm-soc until you tell me you have your tree
finalized.
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 7:39 ` [PATCH v2 00/34] i.MX multi-platform support Arnd Bergmann
2012-09-20 11:41 ` Mark Brown
@ 2012-09-20 14:53 ` Shawn Guo
2012-09-20 15:56 ` Arnd Bergmann
1 sibling, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-20 14:53 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
Mark Brown, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:
> The first five branches are scheduled to go through the arm-soc tree, so
> I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> to expect that hitting mainline. If it always gets in very early during the
> merge window, it's probably ok to put the imx/multi-platform patches into
> the same branch as the other ones in arm-soc and wait for the sound stuff
> to hit mainline first, otherwise I'd suggest we start a second
> next/multiplatform-2 branch for imx and send the first part early on
> but then wait with the second batch before sound gets in.
>
It seems that we will have to go with next/multiplatform-2. I just
tried to merge the series with linux-next together, and got some
non-trivial conflicts with media and mtd tree. I might have to rebase
my series on top of these trees to sort out those conflicts. That said,
I will have several dependencies outside arm-soc tree, and have to pend
my series until all those trees get merged into mainline.
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 14:53 ` Shawn Guo
@ 2012-09-20 15:56 ` Arnd Bergmann
2012-09-21 8:01 ` [alsa-devel] " Shawn Guo
0 siblings, 1 reply; 25+ messages in thread
From: Arnd Bergmann @ 2012-09-20 15:56 UTC (permalink / raw)
To: Shawn Guo
Cc: linux-arm-kernel, Sascha Hauer, Javier Martin, Rob Herring,
Mark Brown, alsa-devel, Florian Tobias Schandinat, linux-fbdev,
Chris Ball, linux-mmc, Guennadi Liakhovetski, linux-media,
Andrew Morton, rtc-linux, Artem Bityutskiy, linux-mtd,
Wolfram Sang, linux-i2c, Wim Van Sebroeck, linux-watchdog,
Greg Kroah-Hartman, linux-usb, Vinod Koul, Paulius Zaleckas
On Thursday 20 September 2012, Shawn Guo wrote:
>
> On Thu, Sep 20, 2012 at 07:39:34AM +0000, Arnd Bergmann wrote:
> > The first five branches are scheduled to go through the arm-soc tree, so
> > I'm fine with that. For the sound/for-3.7 branch, I'd like to know when
> > to expect that hitting mainline. If it always gets in very early during the
> > merge window, it's probably ok to put the imx/multi-platform patches into
> > the same branch as the other ones in arm-soc and wait for the sound stuff
> > to hit mainline first, otherwise I'd suggest we start a second
> > next/multiplatform-2 branch for imx and send the first part early on
> > but then wait with the second batch before sound gets in.
> >
> It seems that we will have to go with next/multiplatform-2. I just
> tried to merge the series with linux-next together, and got some
> non-trivial conflicts with media and mtd tree. I might have to rebase
> my series on top of these trees to sort out those conflicts. That said,
> I will have several dependencies outside arm-soc tree, and have to pend
> my series until all those trees get merged into mainline.
Ok, fair enough. I think we can put it in arm-soc/for-next as a staging
branch anyway to give it some exposure to linux-next, and then we can
decide whether a rebase is necessary before sending it to Linus.
Arnd
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-20 15:56 ` Arnd Bergmann
@ 2012-09-21 8:01 ` Shawn Guo
2012-09-21 8:26 ` Olof Johansson
0 siblings, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-21 8:01 UTC (permalink / raw)
To: Arnd Bergmann, Olof Johansson
Cc: alsa-devel, Mark Brown, Artem Bityutskiy, linux-fbdev,
Wim Van Sebroeck, linux-mtd, linux-i2c, Florian Tobias Schandinat,
Paulius Zaleckas, Chris Ball, linux-media, linux-watchdog,
rtc-linux, Sascha Hauer, Rob Herring, linux-arm-kernel,
Vinod Koul, Greg Kroah-Hartman, linux-usb, linux-mmc,
Wolfram Sang, Javier Martin, Andrew Morton, Guennadi Liakhovetski
On Thu, Sep 20, 2012 at 03:56:56PM +0000, Arnd Bergmann wrote:
> Ok, fair enough. I think we can put it in arm-soc/for-next as a staging
> branch anyway to give it some exposure to linux-next, and then we can
> decide whether a rebase is necessary before sending it to Linus.
>
I just saw the announcement from Olof - no more major merge for 3.7
will be accepted from now on. Can this be an exception or should I
plan this for 3.8?
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-21 8:01 ` [alsa-devel] " Shawn Guo
@ 2012-09-21 8:26 ` Olof Johansson
2012-09-21 16:46 ` Shawn Guo
2012-09-22 15:43 ` Mark Brown
0 siblings, 2 replies; 25+ messages in thread
From: Olof Johansson @ 2012-09-21 8:26 UTC (permalink / raw)
To: Shawn Guo
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
On Fri, Sep 21, 2012 at 1:01 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Thu, Sep 20, 2012 at 03:56:56PM +0000, Arnd Bergmann wrote:
>> Ok, fair enough. I think we can put it in arm-soc/for-next as a staging
>> branch anyway to give it some exposure to linux-next, and then we can
>> decide whether a rebase is necessary before sending it to Linus.
>>
> I just saw the announcement from Olof - no more major merge for 3.7
> will be accepted from now on. Can this be an exception or should I
> plan this for 3.8?
I'll take a look at merging it tomorrow after I've dealt with smp_ops;
if it looks reasonably conflict-free I'll pull it in. We need the
sound dependency sorted out (or agreed upon) first though.
-Olof
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-21 8:26 ` Olof Johansson
@ 2012-09-21 16:46 ` Shawn Guo
2012-09-21 16:53 ` Shawn Guo
2012-09-22 15:43 ` Mark Brown
1 sibling, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-21 16:46 UTC (permalink / raw)
To: Olof Johansson
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
Hi Olof,
On Fri, Sep 21, 2012 at 01:26:43AM -0700, Olof Johansson wrote:
> I'll take a look at merging it tomorrow after I've dealt with smp_ops;
> if it looks reasonably conflict-free I'll pull it in. We need the
> sound dependency sorted out (or agreed upon) first though.
>
I just published the branch below with this series rebased on top of
the necessary dependant branches.
git://git.linaro.org/people/shawnguo/linux-2.6.git staging/imx-multiplatform
The dependant branches include:
* arm-soc/multiplatform/platform-data
* arm-soc/multiplatform/smp_ops
* git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
It contains dependant patch "ASoC: mx27vis: retrieve gpio numbers
from platform_data"
* git://git.infradead.org/mtd-2.6.git master
The series is based on this tree to solve some non-trivial conflicts
on mxc_nand driver. Because mtd tree completely missed 3.6 merge
window, having the series base on 3.6-rc actually means 3.5 code base
in term of mtd support. There are currently two cycles changes
accumulated on mtd, and we need to base the series on it to sort out
the conflicts.
* git://linuxtv.org/mchehab/media-next.git master
The media tree renames mx2/mx3 camera drivers twice. I'm not sure
if git merge can detect them, so I just rebased the series on media
tree to solve that. The bonus point is that a number of trivial
conflicts with imx27-coda support on media tree gets solved as well.
I'm not requesting you to pull the branch into arm-soc as a stable
branch but staging one, because the external dependencies which might
not be stable. I attempt to use it for exposing the series on
linux-next, so that we can send it to Linus for 3.7 if there is chance
for us to (e.g. all the dependant branches hit mainline early during
3.7 merge window).
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-21 16:46 ` Shawn Guo
@ 2012-09-21 16:53 ` Shawn Guo
2012-09-22 7:41 ` Olof Johansson
0 siblings, 1 reply; 25+ messages in thread
From: Shawn Guo @ 2012-09-21 16:53 UTC (permalink / raw)
To: Olof Johansson
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
On Sat, Sep 22, 2012 at 12:46:26AM +0800, Shawn Guo wrote:
> I just published the branch below with this series rebased on top of
> the necessary dependant branches.
>
> git://git.linaro.org/people/shawnguo/linux-2.6.git staging/imx-multiplatform
>
> The dependant branches include:
>
Forgot the base:
* arm-soc/next/multiplatform
Shawn
> * arm-soc/multiplatform/platform-data
>
> * arm-soc/multiplatform/smp_ops
>
> * git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
>
> It contains dependant patch "ASoC: mx27vis: retrieve gpio numbers
> from platform_data"
>
> * git://git.infradead.org/mtd-2.6.git master
>
> The series is based on this tree to solve some non-trivial conflicts
> on mxc_nand driver. Because mtd tree completely missed 3.6 merge
> window, having the series base on 3.6-rc actually means 3.5 code base
> in term of mtd support. There are currently two cycles changes
> accumulated on mtd, and we need to base the series on it to sort out
> the conflicts.
>
> * git://linuxtv.org/mchehab/media-next.git master
>
> The media tree renames mx2/mx3 camera drivers twice. I'm not sure
> if git merge can detect them, so I just rebased the series on media
> tree to solve that. The bonus point is that a number of trivial
> conflicts with imx27-coda support on media tree gets solved as well.
>
> I'm not requesting you to pull the branch into arm-soc as a stable
> branch but staging one, because the external dependencies which might
> not be stable. I attempt to use it for exposing the series on
> linux-next, so that we can send it to Linus for 3.7 if there is chance
> for us to (e.g. all the dependant branches hit mainline early during
> 3.7 merge window).
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-21 16:53 ` Shawn Guo
@ 2012-09-22 7:41 ` Olof Johansson
2012-09-22 8:09 ` Olof Johansson
0 siblings, 1 reply; 25+ messages in thread
From: Olof Johansson @ 2012-09-22 7:41 UTC (permalink / raw)
To: Shawn Guo
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
Hi,
On Fri, Sep 21, 2012 at 9:53 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Sat, Sep 22, 2012 at 12:46:26AM +0800, Shawn Guo wrote:
>> I just published the branch below with this series rebased on top of
>> the necessary dependant branches.
>>
>> git://git.linaro.org/people/shawnguo/linux-2.6.git staging/imx-multiplatform
>>
>> The dependant branches include:
>>
>
> Forgot the base:
>
> * arm-soc/next/multiplatform
>
> Shawn
>
>> * arm-soc/multiplatform/platform-data
>>
>> * arm-soc/multiplatform/smp_ops
>>
>> * git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
>>
>> It contains dependant patch "ASoC: mx27vis: retrieve gpio numbers
>> from platform_data"
>>
>> * git://git.infradead.org/mtd-2.6.git master
>>
>> The series is based on this tree to solve some non-trivial conflicts
>> on mxc_nand driver. Because mtd tree completely missed 3.6 merge
>> window, having the series base on 3.6-rc actually means 3.5 code base
>> in term of mtd support. There are currently two cycles changes
>> accumulated on mtd, and we need to base the series on it to sort out
>> the conflicts.
>>
>> * git://linuxtv.org/mchehab/media-next.git master
>>
>> The media tree renames mx2/mx3 camera drivers twice. I'm not sure
>> if git merge can detect them, so I just rebased the series on media
>> tree to solve that. The bonus point is that a number of trivial
>> conflicts with imx27-coda support on media tree gets solved as well.
>>
>> I'm not requesting you to pull the branch into arm-soc as a stable
>> branch but staging one, because the external dependencies which might
>> not be stable. I attempt to use it for exposing the series on
>> linux-next, so that we can send it to Linus for 3.7 if there is chance
>> for us to (e.g. all the dependant branches hit mainline early during
>> 3.7 merge window).
I've pulled this in now as staging/imx-multiplatform.
As you mention, it might or might not make sense to send this up. It
also accrued a few more merge conflicts with other branches in
arm-soc, so we'll see how things play out.
Either way, we'll for sure queue it for 3.8.
-Olof
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-22 7:41 ` Olof Johansson
@ 2012-09-22 8:09 ` Olof Johansson
2012-09-22 9:34 ` Shawn Guo
0 siblings, 1 reply; 25+ messages in thread
From: Olof Johansson @ 2012-09-22 8:09 UTC (permalink / raw)
To: Shawn Guo
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
On Sat, Sep 22, 2012 at 12:41 AM, Olof Johansson <olof@lixom.net> wrote:
> Hi,
>
> On Fri, Sep 21, 2012 at 9:53 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
>> On Sat, Sep 22, 2012 at 12:46:26AM +0800, Shawn Guo wrote:
>>> I just published the branch below with this series rebased on top of
>>> the necessary dependant branches.
>>>
>>> git://git.linaro.org/people/shawnguo/linux-2.6.git staging/imx-multiplatform
>>>
>>> The dependant branches include:
>>>
>>
>> Forgot the base:
>>
>> * arm-soc/next/multiplatform
>>
>> Shawn
>>
>>> * arm-soc/multiplatform/platform-data
>>>
>>> * arm-soc/multiplatform/smp_ops
>>>
>>> * git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
>>>
>>> It contains dependant patch "ASoC: mx27vis: retrieve gpio numbers
>>> from platform_data"
>>>
>>> * git://git.infradead.org/mtd-2.6.git master
>>>
>>> The series is based on this tree to solve some non-trivial conflicts
>>> on mxc_nand driver. Because mtd tree completely missed 3.6 merge
>>> window, having the series base on 3.6-rc actually means 3.5 code base
>>> in term of mtd support. There are currently two cycles changes
>>> accumulated on mtd, and we need to base the series on it to sort out
>>> the conflicts.
>>>
>>> * git://linuxtv.org/mchehab/media-next.git master
>>>
>>> The media tree renames mx2/mx3 camera drivers twice. I'm not sure
>>> if git merge can detect them, so I just rebased the series on media
>>> tree to solve that. The bonus point is that a number of trivial
>>> conflicts with imx27-coda support on media tree gets solved as well.
>>>
>>> I'm not requesting you to pull the branch into arm-soc as a stable
>>> branch but staging one, because the external dependencies which might
>>> not be stable. I attempt to use it for exposing the series on
>>> linux-next, so that we can send it to Linus for 3.7 if there is chance
>>> for us to (e.g. all the dependant branches hit mainline early during
>>> 3.7 merge window).
>
> I've pulled this in now as staging/imx-multiplatform.
>
> As you mention, it might or might not make sense to send this up. It
> also accrued a few more merge conflicts with other branches in
> arm-soc, so we'll see how things play out.
>
> Either way, we'll for sure queue it for 3.8.
Hmm. Pulling it in gives me a few new build errors, in particular on
the configs that Russell use to build test omap3, as well as one of
his vexpress configs. So I dropped it again for now.
Let's have the current contents sit in linux-next for at least one
release before we bring in anything more, especially since it brings
in dependencies on external trees, and it also has a handful of new
merge conflicts. We're already exposing Stephen Rothwell to more merge
conflicts than I'm entirely comfortable with.
-Olof
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-22 8:09 ` Olof Johansson
@ 2012-09-22 9:34 ` Shawn Guo
0 siblings, 0 replies; 25+ messages in thread
From: Shawn Guo @ 2012-09-22 9:34 UTC (permalink / raw)
To: Olof Johansson
Cc: Arnd Bergmann, alsa-devel, Mark Brown, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
On Sat, Sep 22, 2012 at 01:09:27AM -0700, Olof Johansson wrote:
> > I've pulled this in now as staging/imx-multiplatform.
> >
> > As you mention, it might or might not make sense to send this up. It
> > also accrued a few more merge conflicts with other branches in
> > arm-soc, so we'll see how things play out.
> >
> > Either way, we'll for sure queue it for 3.8.
>
> Hmm. Pulling it in gives me a few new build errors, in particular on
> the configs that Russell use to build test omap3, as well as one of
> his vexpress configs. So I dropped it again for now.
>
> Let's have the current contents sit in linux-next for at least one
> release before we bring in anything more, especially since it brings
> in dependencies on external trees, and it also has a handful of new
> merge conflicts. We're already exposing Stephen Rothwell to more merge
> conflicts than I'm entirely comfortable with.
>
Ok. I will rebase the series against 3.7-rc1 and then send you then.
Shawn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [alsa-devel] [PATCH v2 00/34] i.MX multi-platform support
2012-09-21 8:26 ` Olof Johansson
2012-09-21 16:46 ` Shawn Guo
@ 2012-09-22 15:43 ` Mark Brown
1 sibling, 0 replies; 25+ messages in thread
From: Mark Brown @ 2012-09-22 15:43 UTC (permalink / raw)
To: Olof Johansson
Cc: Shawn Guo, Arnd Bergmann, alsa-devel, Artem Bityutskiy,
linux-fbdev, Wim Van Sebroeck, linux-mtd, linux-i2c,
Florian Tobias Schandinat, Paulius Zaleckas, Chris Ball,
linux-media, linux-watchdog, rtc-linux, Sascha Hauer, Rob Herring,
linux-arm-kernel, Vinod Koul, Greg Kroah-Hartman, linux-usb,
linux-mmc, Wolfram Sang, Javier Martin, Andrew Morton,
Guennadi Liakhovetski
On Fri, Sep 21, 2012 at 01:26:43AM -0700, Olof Johansson wrote:
> I'll take a look at merging it tomorrow after I've dealt with smp_ops;
> if it looks reasonably conflict-free I'll pull it in. We need the
> sound dependency sorted out (or agreed upon) first though.
I guess in the light of the rest of the thread it doesn't much matter
for this merge window but I just pushed:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-3.7
which is signed so can happily be merged elsewhere.
^ permalink raw reply [flat|nested] 25+ messages in thread