[meego-commits] 9471: Changes to MeeGo:1.1:Core:Update:Testing/kernel

Brian Harring no_reply at build.meego.com
Sun Nov 14 05:13:40 UTC 2010


Hi,
I have made the following changes to kernel in project MeeGo:1.1:Core:Update:Testing. Please review and accept ASAP.

Thank You,
Brian Harring

[This message was auto-generated]

---

Request #9471:

  submit:   home:ferringb:branches:MeeGo:1.1:Core:Update:Testing/kernel(r4)(cleanup) -> MeeGo:1.1:Core:Update:Testing/kernel


Message:
    Current version of the upstreamed patches; could stand some collapsing down.

* Sat Oct 16 2010 Brian Harring <brian.harring at intel.com> - 2.6.35.3
- IVI: BMC #8411, restore timberdale video-in support.
- IVI: BMC #8410, restore timberdale secondary audio controller.
- IVI: BMC #8407, fix ks8842 driver, restoring networking.

State:   new          2010-11-13T21:13:39 ferringb
Comment: None



changes files:
--------------
--- kernel.changes
+++ kernel.changes
@@ -0,0 +1,5 @@
+* Sat Oct 16 2010 Brian Harring <brian.harring at intel.com> - 2.6.35.3
+- IVI: BMC #8411, restore timberdale video-in support.
+- IVI: BMC #8410, restore timberdale secondary audio controller.
+- IVI: BMC #8407, fix ks8842 driver, restoring networking.
+

new:
----
  linux-2.6.35-timblogiw-compat.patch
  linux-2.6.36-add-timberdale-video-in.patch
  linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
  linux-2.6.36-ks8842-dma-support.patch
  linux-2.6.36-snd-timbi2s-support.patch
  linux-2.6.36-timberdale-enable-devices.patch
  linux-2.6.36-timblogiw-support.patch

spec files:
-----------
--- kernel-ivi.spec
+++ kernel-ivi.spec
@@ -328,6 +328,14 @@
 Patch500: linux-2.6.35-tsc2007-fix.patch
 Patch501: linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+Patch502: linux-2.6.36-add-timberdale-video-in.patch
+Patch503: linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+Patch504: linux-2.6.36-ks8842-dma-support.patch
+Patch505: linux-2.6.36-snd-timbi2s-support.patch
+Patch506: linux-2.6.36-timberdale-enable-devices.patch
+Patch507: linux-2.6.36-timblogiw-support.patch
+Patch508: linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #
@@ -758,6 +766,21 @@
 # linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 %patch501 -p1
 
+# linux-2.6.36-add-timberdale-video-in.patch
+%patch502 -p1
+# linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+%patch503 -p1
+# linux-2.6.36-ks8842-dma-support.patch
+%patch504 -p1
+# linux-2.6.36-snd-timbi2s-support.patch
+%patch505 -p1
+# linux-2.6.36-timberdale-enable-devices.patch
+%patch506 -p1
+# linux-2.6.36-timblogiw-support.patch
+%patch507 -p1
+# linux-2.6.35-timblogiw-compat.patch
+%patch508 -p1
+
 #
 # End of the IVI hardware patches
 #
--- kernel-mrst.spec
+++ kernel-mrst.spec
@@ -329,6 +329,14 @@
 Patch500: linux-2.6.35-tsc2007-fix.patch
 Patch501: linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+Patch502: linux-2.6.36-add-timberdale-video-in.patch
+Patch503: linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+Patch504: linux-2.6.36-ks8842-dma-support.patch
+Patch505: linux-2.6.36-snd-timbi2s-support.patch
+Patch506: linux-2.6.36-timberdale-enable-devices.patch
+Patch507: linux-2.6.36-timblogiw-support.patch
+Patch508: linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #
@@ -759,6 +767,21 @@
 # linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 %patch501 -p1
 
+# linux-2.6.36-add-timberdale-video-in.patch
+%patch502 -p1
+# linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+%patch503 -p1
+# linux-2.6.36-ks8842-dma-support.patch
+%patch504 -p1
+# linux-2.6.36-snd-timbi2s-support.patch
+%patch505 -p1
+# linux-2.6.36-timberdale-enable-devices.patch
+%patch506 -p1
+# linux-2.6.36-timblogiw-support.patch
+%patch507 -p1
+# linux-2.6.35-timblogiw-compat.patch
+%patch508 -p1
+
 #
 # End of the IVI hardware patches
 #
--- kernel-n900.spec
+++ kernel-n900.spec
@@ -328,6 +328,14 @@
 Patch500: linux-2.6.35-tsc2007-fix.patch
 Patch501: linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+Patch502: linux-2.6.36-add-timberdale-video-in.patch
+Patch503: linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+Patch504: linux-2.6.36-ks8842-dma-support.patch
+Patch505: linux-2.6.36-snd-timbi2s-support.patch
+Patch506: linux-2.6.36-timberdale-enable-devices.patch
+Patch507: linux-2.6.36-timblogiw-support.patch
+Patch508: linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #
@@ -758,6 +766,21 @@
 # linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 %patch501 -p1
 
+# linux-2.6.36-add-timberdale-video-in.patch
+%patch502 -p1
+# linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+%patch503 -p1
+# linux-2.6.36-ks8842-dma-support.patch
+%patch504 -p1
+# linux-2.6.36-snd-timbi2s-support.patch
+%patch505 -p1
+# linux-2.6.36-timberdale-enable-devices.patch
+%patch506 -p1
+# linux-2.6.36-timblogiw-support.patch
+%patch507 -p1
+# linux-2.6.35-timblogiw-compat.patch
+%patch508 -p1
+
 #
 # End of the IVI hardware patches
 #
--- kernel-netbook.spec
+++ kernel-netbook.spec
@@ -328,6 +328,14 @@
 Patch500: linux-2.6.35-tsc2007-fix.patch
 Patch501: linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+Patch502: linux-2.6.36-add-timberdale-video-in.patch
+Patch503: linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+Patch504: linux-2.6.36-ks8842-dma-support.patch
+Patch505: linux-2.6.36-snd-timbi2s-support.patch
+Patch506: linux-2.6.36-timberdale-enable-devices.patch
+Patch507: linux-2.6.36-timblogiw-support.patch
+Patch508: linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #
@@ -758,6 +766,21 @@
 # linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 %patch501 -p1
 
+# linux-2.6.36-add-timberdale-video-in.patch
+%patch502 -p1
+# linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+%patch503 -p1
+# linux-2.6.36-ks8842-dma-support.patch
+%patch504 -p1
+# linux-2.6.36-snd-timbi2s-support.patch
+%patch505 -p1
+# linux-2.6.36-timberdale-enable-devices.patch
+%patch506 -p1
+# linux-2.6.36-timblogiw-support.patch
+%patch507 -p1
+# linux-2.6.35-timblogiw-compat.patch
+%patch508 -p1
+
 #
 # End of the IVI hardware patches
 #
--- kernel.spec
+++ kernel.spec
@@ -340,6 +340,14 @@
 Patch500: linux-2.6.35-tsc2007-fix.patch
 Patch501: linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+Patch502: linux-2.6.36-add-timberdale-video-in.patch
+Patch503: linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+Patch504: linux-2.6.36-ks8842-dma-support.patch
+Patch505: linux-2.6.36-snd-timbi2s-support.patch
+Patch506: linux-2.6.36-timberdale-enable-devices.patch
+Patch507: linux-2.6.36-timblogiw-support.patch
+Patch508: linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #
@@ -800,6 +808,21 @@
 # linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 %patch501 -p1
 
+# linux-2.6.36-add-timberdale-video-in.patch
+%patch502 -p1
+# linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+%patch503 -p1
+# linux-2.6.36-ks8842-dma-support.patch
+%patch504 -p1
+# linux-2.6.36-snd-timbi2s-support.patch
+%patch505 -p1
+# linux-2.6.36-timberdale-enable-devices.patch
+%patch506 -p1
+# linux-2.6.36-timblogiw-support.patch
+%patch507 -p1
+# linux-2.6.35-timblogiw-compat.patch
+%patch508 -p1
+
 #
 # End of the IVI hardware patches
 #

other changes:
--------------

++++++ linux-2.6.35-timblogiw-compat.patch (new)
--- linux-2.6.35-timblogiw-compat.patch
+++ linux-2.6.35-timblogiw-compat.patch
+
+
+From: Brian Harring <ferringb at gmail.com>
+
+
+---
+ drivers/media/video/timblogiw.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
+index 549c0be..9504c39 100644
+--- a/drivers/media/video/timblogiw.c
++++ b/drivers/media/video/timblogiw.c
+@@ -626,7 +626,7 @@ static int timblogiw_open(struct file *file)
+ 		/* now find the encoder */
+ 		lw->sd_enc = v4l2_i2c_new_subdev_board(&lw->v4l2_dev, adapt,
+ 			lw->pdata.encoder.module_name, lw->pdata.encoder.info,
+-			NULL);
++			NULL, 0);
+ 
+ 		i2c_put_adapter(adapt);
+ 

++++++ linux-2.6.36-add-timberdale-video-in.patch (new)
--- linux-2.6.36-add-timberdale-video-in.patch
+++ linux-2.6.36-add-timberdale-video-in.patch
+This patch defines platform data for the video-in driver
+
+From: Brian Harring <ferringb at gmail.com>
+
+and adds it to all configurations of timberdale.
+
+Signed-off-by: Richard Röjfors <richard.rojfors at pelagicore.com>
+---
+ drivers/mfd/timberdale.c |   60 +++++++++++++++++++++++++++++++++++++++++++++-
+ drivers/mfd/timberdale.h |    2 +-
+ 2 files changed, 60 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
+index 6270d86..b864d17 100644
+--- a/drivers/mfd/timberdale.c
++++ b/drivers/mfd/timberdale.c
+@@ -40,6 +40,7 @@
+ #include <linux/spi/mc33880.h>
+ 
+ #include <media/timb_radio.h>
++#include <media/timb_video.h>
+ 
+ #include <linux/timb_dma.h>
+ 
+@@ -238,7 +239,24 @@ static const __devinitconst struct resource timberdale_uartlite_resources[] = {
+ 	},
+ };
+ 
+-static const __devinitconst struct resource timberdale_radio_resources[] = {
++static __devinitdata struct i2c_board_info timberdale_adv7180_i2c_board_info = {
++	/* Requires jumper JP9 to be off */
++	I2C_BOARD_INFO("adv7180", 0x42 >> 1),
++	.irq = IRQ_TIMBERDALE_ADV7180
++};
++
++static __devinitdata struct timb_video_platform_data
++	timberdale_video_platform_data = {
++	.dma_channel = DMA_VIDEO_RX,
++	.i2c_adapter = 0,
++	.encoder = {
++		.module_name = "adv7180",
++		.info = &timberdale_adv7180_i2c_board_info
++	}
++};
++
++static const __devinitconst struct resource
++timberdale_radio_resources[] = {
+ 	{
+ 		.start	= RDSOFFSET,
+ 		.end	= RDSEND,
+@@ -272,6 +290,18 @@ static __devinitdata struct timb_radio_platform_data
+ 	}
+ };
+ 
++static const __devinitconst struct resource timberdale_video_resources[] = {
++	{
++		.start	= LOGIWOFFSET,
++		.end	= LOGIWEND,
++		.flags	= IORESOURCE_MEM,
++	},
++	/*
++	note that the "frame buffer" is located in DMA area
++	starting at 0x1200000
++	*/
++};
++
+ static __devinitdata struct timb_dma_platform_data timb_dma_platform_data = {
+ 	.nr_channels = 10,
+ 	.channels = {
+@@ -372,6 +402,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
+ 		.data_size = sizeof(timberdale_gpio_platform_data),
+ 	},
+ 	{
++		.name = "timb-video",
++		.num_resources = ARRAY_SIZE(timberdale_video_resources),
++		.resources = timberdale_video_resources,
++		.platform_data = &timberdale_video_platform_data,
++		.data_size = sizeof(timberdale_video_platform_data),
++	},
++	{
+ 		.name = "timb-radio",
+ 		.num_resources = ARRAY_SIZE(timberdale_radio_resources),
+ 		.resources = timberdale_radio_resources,
+@@ -430,6 +467,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
+ 		.resources = timberdale_mlogicore_resources,
+ 	},
+ 	{
++		.name = "timb-video",
++		.num_resources = ARRAY_SIZE(timberdale_video_resources),
++		.resources = timberdale_video_resources,
++		.platform_data = &timberdale_video_platform_data,
++		.data_size = sizeof(timberdale_video_platform_data),
++	},
++	{
+ 		.name = "timb-radio",
+ 		.num_resources = ARRAY_SIZE(timberdale_radio_resources),
+ 		.resources = timberdale_radio_resources,
+@@ -478,6 +522,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
+ 		.data_size = sizeof(timberdale_gpio_platform_data),
+ 	},
+ 	{
++		.name = "timb-video",
++		.num_resources = ARRAY_SIZE(timberdale_video_resources),
++		.resources = timberdale_video_resources,
++		.platform_data = &timberdale_video_platform_data,
++		.data_size = sizeof(timberdale_video_platform_data),
++	},
++	{
+ 		.name = "timb-radio",
+ 		.num_resources = ARRAY_SIZE(timberdale_radio_resources),
+ 		.resources = timberdale_radio_resources,
+@@ -521,6 +572,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
+ 		.data_size = sizeof(timberdale_gpio_platform_data),
+ 	},
+ 	{
++		.name = "timb-video",
++		.num_resources = ARRAY_SIZE(timberdale_video_resources),
++		.resources = timberdale_video_resources,
++		.platform_data = &timberdale_video_platform_data,
++		.data_size = sizeof(timberdale_video_platform_data),
++	},
++	{
+ 		.name = "timb-radio",
+ 		.num_resources = ARRAY_SIZE(timberdale_radio_resources),
+ 		.resources = timberdale_radio_resources,
+diff --git a/drivers/mfd/timberdale.h b/drivers/mfd/timberdale.h
+index c11bf6e..4412acd 100644
+--- a/drivers/mfd/timberdale.h
++++ b/drivers/mfd/timberdale.h
+@@ -23,7 +23,7 @@
+ #ifndef MFD_TIMBERDALE_H
+ #define MFD_TIMBERDALE_H
+ 
+-#define DRV_VERSION		"0.2"
++#define DRV_VERSION		"0.3"
+ 
+ /* This driver only support versions >= 3.8 and < 4.0  */
+ #define TIMB_SUPPORTED_MAJOR	3

++++++ linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch (new)
--- linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+++ linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+This patch makes sure that the ADV7180 is configured correctly for NTSC using
+
+From: Brian Harring <ferringb at gmail.com>
+
+the timberdale framegrabber
+
+Signed-off-by: Richard Röjfors <richard.rojfors at pelagicore.com>
+---
+ drivers/media/video/adv7180.c |   11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/media/video/adv7180.c b/drivers/media/video/adv7180.c
+index 23e610f..35bed99 100644
+--- a/drivers/media/video/adv7180.c
++++ b/drivers/media/video/adv7180.c
+@@ -91,6 +91,9 @@
+ #define ADV7180_IMR3_ADI	0x4C
+ #define ADV7180_IMR4_ADI	0x50
+ 
++#define ADV7180_NTSC_V_BIT_END_REG	0xE6
++#define ADV7180_NTSC_V_BIT_END_MANUAL_NVEND	0x4F
++
+ struct adv7180_state {
+ 	struct v4l2_subdev	sd;
+ 	struct work_struct	work;
+@@ -349,6 +352,14 @@ static __devinit int adv7180_probe(struct i2c_client *client,
+ 	if (ret < 0)
+ 		goto err_unreg_subdev;
+ 
++
++	/* Manually set V bit end position in NTSC mode */
++	ret = i2c_smbus_write_byte_data(client,
++		ADV7180_NTSC_V_BIT_END_REG,
++		ADV7180_NTSC_V_BIT_END_MANUAL_NVEND);
++	if (ret < 0)
++		goto err_unreg_subdev;
++
+ 	/* read current norm */
+ 	__adv7180_status(client, NULL, &state->curr_norm);
+ 

++++++ linux-2.6.36-ks8842-dma-support.patch (new)
--- linux-2.6.36-ks8842-dma-support.patch
+++ linux-2.6.36-ks8842-dma-support.patch
+This backports the DMA support for ks8842 which is in the 2.6.36 kernel
+
+From: Brian Harring <ferringb at gmail.com>
+
+Signed-off-by: Richard Röjfors <richard.rojfors at pelagicore.com>
+---
+ drivers/net/ks8842.c   |  706 ++++++++++++++++++++++++++++++++++++++++++------
+ include/linux/ks8842.h |    4 
+ 2 files changed, 618 insertions(+), 92 deletions(-)
+
+diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c
+index f852ab3..928b2b8 100644
+--- a/drivers/net/ks8842.c
++++ b/drivers/net/ks8842.c
+@@ -18,6 +18,7 @@
+ 
+ /* Supports:
+  * The Micrel KS8842 behind the timberdale FPGA
++ * The genuine Micrel KS8841/42 device with ISA 16/32bit bus interface
+  */
+ 
+ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+@@ -29,11 +30,19 @@
+ #include <linux/etherdevice.h>
+ #include <linux/ethtool.h>
+ #include <linux/ks8842.h>
++#include <linux/dmaengine.h>
++#include <linux/dma-mapping.h>
++#include <linux/scatterlist.h>
+ 
+ #define DRV_NAME "ks8842"
+ 
+ /* Timberdale specific Registers */
+-#define REG_TIMB_RST	0x1c
++#define REG_TIMB_RST		0x1c
++#define REG_TIMB_FIFO		0x20
++#define REG_TIMB_ISR		0x24
++#define REG_TIMB_IER		0x28
++#define REG_TIMB_IAR		0x2C
++#define REQ_TIMB_DMA_RESUME	0x30
+ 
+ /* KS8842 registers */
+ 
+@@ -76,6 +85,15 @@
+ #define IRQ_RX_ERROR	0x0080
+ #define ENABLED_IRQS	(IRQ_LINK_CHANGE | IRQ_TX | IRQ_RX | IRQ_RX_STOPPED | \
+ 		IRQ_TX_STOPPED | IRQ_RX_OVERRUN | IRQ_RX_ERROR)
++/* When running via timberdale in DMA mode, the RX interrupt should be
++   enabled in the KS8842, but not in the FPGA IP, since the IP handles
++   RX DMA internally.
++   TX interrupts are not needed it is handled by the FPGA the driver is
++   notified via DMA callbacks.
++*/
++#define ENABLED_IRQS_DMA_IP	(IRQ_LINK_CHANGE | IRQ_RX_STOPPED | \
++	IRQ_TX_STOPPED | IRQ_RX_OVERRUN | IRQ_RX_ERROR)
++#define ENABLED_IRQS_DMA	(ENABLED_IRQS_DMA_IP | IRQ_RX)
+ #define REG_ISR		0x02
+ #define REG_RXSR	0x04
+ #define RXSR_VALID	0x8000
+@@ -114,14 +132,53 @@
+ #define REG_P1CR4		0x02
+ #define REG_P1SR		0x04
+ 
++/* flags passed by platform_device for configuration */
++#define	MICREL_KS884X		0x01	/* 0=Timeberdale(FPGA), 1=Micrel */
++#define	KS884X_16BIT		0x02	/*  1=16bit, 0=32bit */
++
++#define DMA_BUFFER_SIZE		2048
++
++struct ks8842_tx_dma_ctl {
++	struct dma_chan *chan;
++	struct dma_async_tx_descriptor *adesc;
++	void *buf;
++	struct scatterlist sg;
++	int channel;
++};
++
++struct ks8842_rx_dma_ctl {
++	struct dma_chan *chan;
++	struct dma_async_tx_descriptor *adesc;
++	struct sk_buff  *skb;
++	struct scatterlist sg;
++	struct tasklet_struct tasklet;
++	int channel;
++};
++
++#define KS8842_USE_DMA(adapter) (((adapter)->dma_tx.channel != -1) && \
++	 ((adapter)->dma_rx.channel != -1))
++
+ struct ks8842_adapter {
+ 	void __iomem	*hw_addr;
+ 	int		irq;
++	unsigned long	conf_flags;	/* copy of platform_device config */
+ 	struct tasklet_struct	tasklet;
+ 	spinlock_t	lock; /* spinlock to be interrupt safe */
+-	struct platform_device *pdev;
++	struct work_struct timeout_work;
++	struct net_device *netdev;
++	struct device *dev;
++	struct ks8842_tx_dma_ctl	dma_tx;
++	struct ks8842_rx_dma_ctl	dma_rx;
+ };
+ 
++static void ks8842_dma_rx_cb(void *data);
++static void ks8842_dma_tx_cb(void *data);
++
++static inline void ks8842_resume_dma(struct ks8842_adapter *adapter)
++{
++	iowrite32(1, adapter->hw_addr + REQ_TIMB_DMA_RESUME);
++}
++
+ static inline void ks8842_select_bank(struct ks8842_adapter *adapter, u16 bank)
+ {
+ 	iowrite16(bank, adapter->hw_addr + REG_SELECT_BANK);
+@@ -191,16 +248,21 @@ static inline u32 ks8842_read32(struct ks8842_adapter *adapter, u16 bank,
+ 
+ static void ks8842_reset(struct ks8842_adapter *adapter)
+ {
+-	/* The KS8842 goes haywire when doing softare reset
+-	 * a work around in the timberdale IP is implemented to
+-	 * do a hardware reset instead
+-	ks8842_write16(adapter, 3, 1, REG_GRR);
+-	msleep(10);
+-	iowrite16(0, adapter->hw_addr + REG_GRR);
+-	*/
+-	iowrite16(32, adapter->hw_addr + REG_SELECT_BANK);
+-	iowrite32(0x1, adapter->hw_addr + REG_TIMB_RST);
+-	msleep(20);
++	if (adapter->conf_flags & MICREL_KS884X) {
++		ks8842_write16(adapter, 3, 1, REG_GRR);
++		msleep(10);
++		iowrite16(0, adapter->hw_addr + REG_GRR);
++	} else {
++		/* The KS8842 goes haywire when doing softare reset
++		* a work around in the timberdale IP is implemented to
++		* do a hardware reset instead
++		ks8842_write16(adapter, 3, 1, REG_GRR);
++		msleep(10);
++		iowrite16(0, adapter->hw_addr + REG_GRR);
++		*/
++		iowrite32(0x1, adapter->hw_addr + REG_TIMB_RST);
++		msleep(20);
++	}
+ }
+ 
+ static void ks8842_update_link_status(struct net_device *netdev,
+@@ -269,8 +331,6 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter)
+ 
+ 	/* restart port auto-negotiation */
+ 	ks8842_enable_bits(adapter, 49, 1 << 13, REG_P1CR4);
+-	/* only advertise 10Mbps */
+-	ks8842_clear_bits(adapter, 49, 3 << 2, REG_P1CR4);
+ 
+ 	/* Enable the transmitter */
+ 	ks8842_enable_tx(adapter);
+@@ -282,8 +342,19 @@ static void ks8842_reset_hw(struct ks8842_adapter *adapter)
+ 	ks8842_write16(adapter, 18, 0xffff, REG_ISR);
+ 
+ 	/* enable interrupts */
+-	ks8842_write16(adapter, 18, ENABLED_IRQS, REG_IER);
+-
++	if (KS8842_USE_DMA(adapter)) {
++		/* When running in DMA Mode the RX interrupt is not enabled in
++		   timberdale because RX data is received by DMA callbacks
++		   it must still be enabled in the KS8842 because it indicates
++		   to timberdale when there is RX data for it's DMA FIFOs */
++		iowrite16(ENABLED_IRQS_DMA_IP, adapter->hw_addr + REG_TIMB_IER);
++		ks8842_write16(adapter, 18, ENABLED_IRQS_DMA, REG_IER);
++	} else {
++		if (!(adapter->conf_flags & MICREL_KS884X))
++			iowrite16(ENABLED_IRQS,
++				adapter->hw_addr + REG_TIMB_IER);
++		ks8842_write16(adapter, 18, ENABLED_IRQS, REG_IER);
++	}
+ 	/* enable the switch */
+ 	ks8842_write16(adapter, 32, 0x1, REG_SW_ID_AND_ENABLE);
+ }
+@@ -296,13 +367,28 @@ static void ks8842_read_mac_addr(struct ks8842_adapter *adapter, u8 *dest)
+ 	for (i = 0; i < ETH_ALEN; i++)
+ 		dest[ETH_ALEN - i - 1] = ks8842_read8(adapter, 2, REG_MARL + i);
+ 
+-	/* make sure the switch port uses the same MAC as the QMU */
+-	mac = ks8842_read16(adapter, 2, REG_MARL);
+-	ks8842_write16(adapter, 39, mac, REG_MACAR1);
+-	mac = ks8842_read16(adapter, 2, REG_MARM);
+-	ks8842_write16(adapter, 39, mac, REG_MACAR2);
+-	mac = ks8842_read16(adapter, 2, REG_MARH);
+-	ks8842_write16(adapter, 39, mac, REG_MACAR3);
++	if (adapter->conf_flags & MICREL_KS884X) {
++		/*
++		the sequence of saving mac addr between MAC and Switch is
++		different.
++		*/
++
++		mac = ks8842_read16(adapter, 2, REG_MARL);
++		ks8842_write16(adapter, 39, mac, REG_MACAR3);
++		mac = ks8842_read16(adapter, 2, REG_MARM);
++		ks8842_write16(adapter, 39, mac, REG_MACAR2);
(802 more lines skipped)

++++++ linux-2.6.36-snd-timbi2s-support.patch (new)
--- linux-2.6.36-snd-timbi2s-support.patch
+++ linux-2.6.36-snd-timbi2s-support.patch
+add timberdale i2s audio support
+
+From: Brian Harring <ferringb at gmail.com>
+
+
+---
+ include/sound/timbi2s.h |   33 ++
+ sound/drivers/Kconfig   |   13 +
+ sound/drivers/Makefile  |    2 
+ sound/drivers/timbi2s.c |  763 +++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 811 insertions(+), 0 deletions(-)
+ create mode 100644 include/sound/timbi2s.h
+ create mode 100644 sound/drivers/timbi2s.c
+
+diff --git a/include/sound/timbi2s.h b/include/sound/timbi2s.h
+new file mode 100644
+index 0000000..ebfecfe
+--- /dev/null
++++ b/include/sound/timbi2s.h
+@@ -0,0 +1,33 @@
++/*
++ * timbi2s.h timberdale FPGA I2S platform data
++ * Copyright (c) 2009 Intel Corporation
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++#ifndef __INCLUDE_SOUND_TIMBI2S_H
++#define __INCLUDE_SOUND_TIMBI2S_H
++
++struct timbi2s_bus_data {
++	u8	rx;
++	u16	sample_rate;
++	const char *name;
++};
++
++struct timbi2s_platform_data {
++	const struct timbi2s_bus_data	*busses;
++	int				num_busses;
++	u32				main_clk;
++};
++
++#endif
+diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig
+index 84714a6..54ad4e7 100644
+--- a/sound/drivers/Kconfig
++++ b/sound/drivers/Kconfig
+@@ -182,4 +182,17 @@ config SND_AC97_POWER_SAVE_DEFAULT
+ 	  The default time-out value in seconds for AC97 automatic
+ 	  power-save mode.  0 means to disable the power-save mode.
+ 
++config SND_TIMBERDALE_I2S
++	tristate "The timberdale FPGA I2S driver"
++	depends on MFD_TIMBERDALE && HAS_IOMEM
++	default y
++	help
++	  Say Y here to enable driver for the I2S block found within the
++	  Timberdale FPGA.
++	  There is support for up to 8 I2S channels, in either transmitter
++	  or receiver mode.
++
++	  To compile this driver as a module, choose M here: the module
++	  will be called snd-timbi2s.
++
+ endif	# SND_DRIVERS
+diff --git a/sound/drivers/Makefile b/sound/drivers/Makefile
+index d4a07f9..dea2eed 100644
+--- a/sound/drivers/Makefile
++++ b/sound/drivers/Makefile
+@@ -10,6 +10,7 @@ snd-portman2x4-objs := portman2x4.o
+ snd-serial-u16550-objs := serial-u16550.o
+ snd-virmidi-objs := virmidi.o
+ snd-ml403-ac97cr-objs := ml403-ac97cr.o pcm-indirect2.o
++snd-timbi2s-objs := timbi2s.o
+ 
+ # Toplevel Module Dependency
+ obj-$(CONFIG_SND_DUMMY) += snd-dummy.o
+@@ -19,5 +20,6 @@ obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o
+ obj-$(CONFIG_SND_MTS64) += snd-mts64.o
+ obj-$(CONFIG_SND_PORTMAN2X4) += snd-portman2x4.o
+ obj-$(CONFIG_SND_ML403_AC97CR) += snd-ml403-ac97cr.o
++obj-$(CONFIG_SND_TIMBERDALE_I2S) += snd-timbi2s.o
+ 
+ obj-$(CONFIG_SND) += opl3/ opl4/ mpu401/ vx/ pcsp/
+diff --git a/sound/drivers/timbi2s.c b/sound/drivers/timbi2s.c
+new file mode 100644
+index 0000000..284cbe0
+--- /dev/null
++++ b/sound/drivers/timbi2s.c
+@@ -0,0 +1,763 @@
++/*
++ * timbi2s.c timberdale FPGA I2S driver
++ * Copyright (c) 2009 Intel Corporation
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++/* Supports:
++ * Timberdale FPGA I2S
++ *
++ */
++
++#include <linux/io.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/initval.h>
++#include <sound/timbi2s.h>
++
++static int index = SNDRV_DEFAULT_IDX1;
++module_param(index, int, 0444);
++MODULE_PARM_DESC(index, "Index value for Timberdale I2S.");
++
++#define DRIVER_NAME "timb-i2s"
++
++#define MAX_BUSSES	10
++
++#define TIMBI2S_REG_VER	0x00
++#define TIMBI2S_REG_UIR	0x04
++
++#define TIMBI2S_BUS_PRESCALE	0x00
++#define TIMBI2S_BUS_ICLR	0x04
++#define TIMBI2S_BUS_IPR		0x08
++#define TIMBI2S_BUS_ISR		0x0c
++#define TIMBI2S_BUS_IER		0x10
++
++
++#define TIMBI2S_IRQ_TX_FULL		0x01
++#define TIMBI2S_IRQ_TX_ALMOST_FULL	0x02
++#define TIMBI2S_IRQ_TX_ALMOST_EMPTY	0x04
++#define TIMBI2S_IRQ_TX_EMPTY		0x08
++
++#define TIMBI2S_IRQ_RX_FULL		0x01
++#define TIMBI2S_IRQ_RX_ALMOST_FULL	0x02
++#define TIMBI2S_IRQ_RX_ALMOST_EMPTY	0x04
++#define TIMBI2S_IRQ_RX_NOT_EMPTY	0x08
++
++#define TIMBI2S_BUS_ICOR	0x14
++#define TIMBI2S_ICOR_TX_ENABLE	0x00000001
++#define TIMBI2S_ICOR_RX_ENABLE	0x00000002
++#define TIMBI2S_ICOR_LFIFO_RST	0x00000004
++#define TIMBI2S_ICOR_RFIFO_RST	0x00000008
++#define TIMBI2S_ICOR_FIFO_RST (TIMBI2S_ICOR_LFIFO_RST | TIMBI2S_ICOR_RFIFO_RST)
++#define TIMBI2S_ICOR_SOFT_RST	0x00000010
++#define TIMBI2S_ICOR_WORD_SEL_LEFT_SHIFT	8
++#define TIMBI2S_ICOR_WORD_SEL_LEFT_MASK		(0xff << 8)
++#define TIMBI2S_ICOR_WORD_SEL_RIGHT_SHIFT	16
++#define TIMBI2S_ICOR_WORD_SEL_RIGHT_MASK	(0xff << 16)
++#define TIMBI2S_ICOR_CLK_MASTER	0x10000000
++#define TIMBI2S_ICOR_RX_ID	0x20000000
++#define TIMBI2S_ICOR_TX_ID	0x40000000
++#define TIMBI2S_ICOR_WORD_SEL	0x80000000
++#define TIMBI2S_BUS_FIFO	0x18
++
++#define TIMBI2S_BUS_REG_AREA_SIZE	(TIMBI2S_BUS_FIFO - \
++	TIMBI2S_BUS_PRESCALE + 4)
++#define TIMBI2S_FIRST_BUS_AREA_OFS	0x08
++
++struct timbi2s_bus {
++	u32 flags;
++	u32 prescale;
++	struct snd_pcm	*pcm;
++	struct snd_card *card;
++	struct snd_pcm_substream *substream;
++	unsigned	buf_pos;
++	spinlock_t	lock; /* mutual exclusion */
++	u16		sample_rate;
++};
++
++#define BUS_RX		0x200
++#define BUS_MASTER	0x100
++#define BUS_INDEX_MASK	0xff
++#define BUS_INDEX(b) ((b)->flags & BUS_INDEX_MASK)
++#define BUS_IS_MASTER(b) ((b)->flags & BUS_MASTER)
++#define BUS_IS_RX(b) ((b)->flags & BUS_RX)
(665 more lines skipped)

++++++ linux-2.6.36-timberdale-enable-devices.patch (new)
--- linux-2.6.36-timberdale-enable-devices.patch
+++ linux-2.6.36-timberdale-enable-devices.patch
+timberdale-add-video-and-sound
+
+From: Brian Harring <ferringb at gmail.com>
+
+
+---
+ drivers/mfd/timberdale.c |   64 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 64 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
+index 52a651b..356ddd0 100644
+--- a/drivers/mfd/timberdale.c
++++ b/drivers/mfd/timberdale.c
+@@ -42,6 +42,10 @@
+ #include <media/timb_radio.h>
+ #include <media/timb_video.h>
+ 
++#include <sound/timbi2s.h>
++
++#include <linux/ks8842.h>
++
+ #include <linux/timb_dma.h>
+ 
+ #include "timberdale.h"
+@@ -162,6 +166,12 @@ static const __devinitconst struct resource timberdale_spi_resources[] = {
+ 	},
+ };
+ 
++static __devinitdata struct ks8842_platform_data
++	timberdale_ks8842_platform_data = {
++	.rx_dma_channel = DMA_ETH_RX,
++	.tx_dma_channel = DMA_ETH_TX
++};
++
+ static const __devinitconst struct resource timberdale_eth_resources[] = {
+ 	{
+ 		.start	= ETHOFFSET,
+@@ -277,6 +287,40 @@ static __devinitdata struct i2c_board_info timberdale_saa7706_i2c_board_info = {
+ 	I2C_BOARD_INFO("saa7706h", 0x1C)
+ };
+ 
++static __devinitdata struct timbi2s_bus_data timbi2s_bus_data[] = {
++  {
++      .rx = 0,
++      .sample_rate = 8000,
++  },
++  {
++      .rx = 1,
++      .sample_rate = 8000,
++  },
++  {
++      .rx = 1,
++      .sample_rate = 44100,
++  },
++};
++
++static __devinitdata struct timbi2s_platform_data timbi2s_platform_data = {
++  .busses = timbi2s_bus_data,
++  .num_busses = ARRAY_SIZE(timbi2s_bus_data),
++  .main_clk = 62500000,
++};
++
++static const __devinitconst struct resource timberdale_i2s_resources[] = {
++  {
++      .start  = I2SOFFSET,
++      .end    = I2SEND,
++      .flags  = IORESOURCE_MEM,
++  },
++  {
++      .start  = IRQ_TIMBERDALE_I2S,
++      .end    = IRQ_TIMBERDALE_I2S,
++      .flags  = IORESOURCE_IRQ,
++  },
++};
++
+ static __devinitdata struct timb_radio_platform_data
+ 	timberdale_radio_platform_data = {
+ 	.i2c_adapter = 0,
+@@ -402,6 +446,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
+ 		.data_size = sizeof(timberdale_gpio_platform_data),
+ 	},
+ 	{
++		.name = "timb-i2s",
++		.num_resources = ARRAY_SIZE(timberdale_i2s_resources),
++		.resources = timberdale_i2s_resources,
++		.platform_data = &timbi2s_platform_data,
++		.data_size = sizeof(timbi2s_platform_data),
++	},
++	{
+ 		.name = "timb-video",
+ 		.num_resources = ARRAY_SIZE(timberdale_video_resources),
+ 		.resources = timberdale_video_resources,
+@@ -426,6 +477,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
+ 		.name = "ks8842",
+ 		.num_resources = ARRAY_SIZE(timberdale_eth_resources),
+ 		.resources = timberdale_eth_resources,
++		.platform_data = &timberdale_ks8842_platform_data,
++		.data_size = sizeof(timberdale_ks8842_platform_data)
+ 	},
+ };
+ 
+@@ -491,6 +544,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
+ 		.name = "ks8842",
+ 		.num_resources = ARRAY_SIZE(timberdale_eth_resources),
+ 		.resources = timberdale_eth_resources,
++		.platform_data = &timberdale_ks8842_platform_data,
++		.data_size = sizeof(timberdale_ks8842_platform_data)
+ 	},
+ };
+ 
+@@ -572,6 +627,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
+ 		.data_size = sizeof(timberdale_gpio_platform_data),
+ 	},
+ 	{
++		.name = "timb-i2s",
++		.num_resources = ARRAY_SIZE(timberdale_i2s_resources),
++		.resources = timberdale_i2s_resources,
++		.platform_data = &timbi2s_platform_data,
++		.data_size = sizeof(timbi2s_platform_data),
++	},
++	{
+ 		.name = "timb-video",
+ 		.num_resources = ARRAY_SIZE(timberdale_video_resources),
+ 		.resources = timberdale_video_resources,
+@@ -596,6 +658,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
+ 		.name = "ks8842",
+ 		.num_resources = ARRAY_SIZE(timberdale_eth_resources),
+ 		.resources = timberdale_eth_resources,
++		.platform_data = &timberdale_ks8842_platform_data,
++		.data_size = sizeof(timberdale_ks8842_platform_data)
+ 	},
+ };
+ 

++++++ linux-2.6.36-timblogiw-support.patch (new)
--- linux-2.6.36-timblogiw-support.patch
+++ linux-2.6.36-timblogiw-support.patch
+This patch adds the timberdale video-in driver.
+
+From: Brian Harring <ferringb at gmail.com>
+
+The video IP of timberdale delivers the video data via DMA.
+The driver uses the DMA api to handle DMA transfers, and make use
+of the V4L2 video buffers to handle buffers against user space.
+
+If available the driver uses an encoder to get/set the video standard
+
+Signed-off-by: Richard Röjfors <richard.rojfors at pelagicore.com>
+---
+ drivers/media/video/Kconfig     |    9 
+ drivers/media/video/Makefile    |    1 
+ drivers/media/video/timblogiw.c |  881 +++++++++++++++++++++++++++++++++++++++
+ include/media/timb_video.h      |   33 +
+ 4 files changed, 924 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/media/video/timblogiw.c
+ create mode 100644 include/media/timb_video.h
+
+diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
+index 1cd06a2..12d1d7a 100644
+--- a/drivers/media/video/Kconfig
++++ b/drivers/media/video/Kconfig
+@@ -844,6 +844,15 @@ config VIDEO_HEXIUM_GEMINI
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called hexium_gemini.
+ 
++config VIDEO_TIMBERDALE
++	tristate "Support for timberdale Video In/LogiWIN"
++	depends on VIDEO_V4L2 && I2C
++	select TIMB_DMA
++	select VIDEO_ADV7180
++	select VIDEOBUF_DMA_CONTIG
++	---help---
++	Add support for the Video In peripherial of the timberdale FPGA.
++
+ source "drivers/media/video/cx88/Kconfig"
+ 
+ source "drivers/media/video/cx23885/Kconfig"
+diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
+index 9c02678..ef5f43e 100644
+--- a/drivers/media/video/Makefile
++++ b/drivers/media/video/Makefile
+@@ -111,6 +111,7 @@ obj-$(CONFIG_VIDEO_CPIA2) += cpia2/
+ obj-$(CONFIG_VIDEO_MXB) += mxb.o
+ obj-$(CONFIG_VIDEO_HEXIUM_ORION) += hexium_orion.o
+ obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o
++obj-$(CONFIG_VIDEO_TIMBERDALE)	+= timblogiw.o
+ 
+ obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
+ obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
+diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
+new file mode 100644
+index 0000000..549c0be
+--- /dev/null
++++ b/drivers/media/video/timblogiw.c
+@@ -0,0 +1,881 @@
++/*
++ * timblogiw.c timberdale FPGA LogiWin Video In driver
++ * Copyright (c) 2009-2010 Intel Corporation
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++/* Supports:
++ * Timberdale FPGA LogiWin Video In
++ */
++
++#include <linux/version.h>
++#include <linux/platform_device.h>
++#include <linux/slab.h>
++#include <linux/dmaengine.h>
++#include <linux/scatterlist.h>
++#include <linux/interrupt.h>
++#include <linux/list.h>
++#include <linux/i2c.h>
++#include <media/v4l2-ioctl.h>
++#include <media/v4l2-device.h>
++#include <media/videobuf-dma-contig.h>
++#include <media/timb_video.h>
++
++#define DRIVER_NAME			"timb-video"
++
++#define TIMBLOGIWIN_NAME		"Timberdale Video-In"
++#define TIMBLOGIW_VERSION_CODE		0x04
++
++#define TIMBLOGIW_LINES_PER_DESC	44
++#define TIMBLOGIW_MAX_VIDEO_MEM		16
++
++#define TIMBLOGIW_HAS_DECODER(lw)	(lw->pdata.encoder.module_name)
++
++
++struct timblogiw {
++	struct video_device		video_dev;
++	struct v4l2_device		v4l2_dev; /* mutual exclusion */
++	struct mutex			lock;
++	struct device			*dev;
++	struct timb_video_platform_data pdata;
++	struct v4l2_subdev		*sd_enc;	/* encoder */
++	bool				opened;
++};
++
++struct timblogiw_tvnorm {
++	v4l2_std_id std;
++	u16     width;
++	u16     height;
++	u8	fps;
++};
++
++struct timblogiw_fh {
++	struct videobuf_queue		vb_vidq;
++	struct timblogiw_tvnorm const	*cur_norm;
++	struct list_head		capture;
++	struct dma_chan			*chan;
++	spinlock_t			queue_lock; /* mutual exclusion */
++	unsigned int			frame_count;
++};
++
++struct timblogiw_buffer {
++	/* common v4l buffer stuff -- must be first */
++	struct videobuf_buffer	vb;
++	struct scatterlist	sg[16];
++	dma_cookie_t		cookie;
++	struct timblogiw_fh	*fh;
++};
++
++const struct timblogiw_tvnorm timblogiw_tvnorms[] = {
++	{
++		.std			= V4L2_STD_PAL,
++		.width			= 720,
++		.height			= 576,
++		.fps			= 25
++	},
++	{
++		.std			= V4L2_STD_NTSC,
++		.width			= 720,
++		.height			= 480,
++		.fps			= 30
++	}
++};
++
++static int timblogiw_bytes_per_line(const struct timblogiw_tvnorm *norm)
++{
++	return norm->width * 2;
++}
++
++
++static int timblogiw_frame_size(const struct timblogiw_tvnorm *norm)
++{
++	return norm->height * timblogiw_bytes_per_line(norm);
++}
++
++static const struct timblogiw_tvnorm *timblogiw_get_norm(const v4l2_std_id std)
++{
++	int i;
++	for (i = 0; i < ARRAY_SIZE(timblogiw_tvnorms); i++)
++		if (timblogiw_tvnorms[i].std & std)
++			return timblogiw_tvnorms + i;
++
++	/* default to first element */
++	return timblogiw_tvnorms;
++}
++
++static void timblogiw_dma_cb(void *data)
++{
++	struct timblogiw_buffer *buf = data;
++	struct timblogiw_fh *fh = buf->fh;
++	struct videobuf_buffer *vb = &buf->vb;
++
++	spin_lock(&fh->queue_lock);
++
++	/* mark the transfer done */
++	buf->cookie = -1;
++
++	fh->frame_count++;
++
++	if (vb->state != VIDEOBUF_ERROR) {
++		list_del(&vb->queue);
++		do_gettimeofday(&vb->ts);
++		vb->field_count = fh->frame_count * 2;
++		vb->state = VIDEOBUF_DONE;
++
++		wake_up(&vb->done);
++	}
++
++	if (!list_empty(&fh->capture)) {
(780 more lines skipped)

++++++ series
--- series
+++ series
@@ -173,6 +173,14 @@
 linux-2.6.35-tsc2007-fix.patch
 linux-2.6.35-add-platform_data-only-if-non-NULL.patch
 
+linux-2.6.36-add-timberdale-video-in.patch
+linux-2.6.36-adjust-adv7180-timblogiw-to-be-NTSC.patch
+linux-2.6.36-ks8842-dma-support.patch
+linux-2.6.36-snd-timbi2s-support.patch
+linux-2.6.36-timberdale-enable-devices.patch
+linux-2.6.36-timblogiw-support.patch
+linux-2.6.35-timblogiw-compat.patch
+
 #
 # End of the IVI hardware patches
 #




More information about the MeeGo-commits mailing list