Skip to contentSkip to conversation

Initial commit to support NetUP Dual DVB-T/C CI RF card.

PATCH In review Igor M. Liplianin 1 participant 1 message Dec 31, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 5/18 Initial commit to support NetUP Dual DVB-T/C CI RF card.

The card based on cx23885 PCI-e brige. Altera FPGA for CI, multistandard demods stv0367 from STM for QAM & OFDM, Xcieve xc5000 tuners and additional cx25840 for second analog input.

---
 drivers/media/video/cx23885/Kconfig         |    3 +-
 drivers/media/video/cx23885/cx23885-cards.c |  103 ++++++++++++++++-
 drivers/media/video/cx23885/cx23885-core.c  |   24 +++--
 drivers/media/video/cx23885/cx23885-dvb.c   |  172 +++++++++++++++++++++++++-
 drivers/media/video/cx23885/cx23885.h       |    4 +-
 5 files changed, 288 insertions(+), 18 deletions(-)
drivers/media/video/cx23885/Kconfig +2 -1
index 5e5faad..3b6e7f2 100644
@@ -1,6 +1,7 @@
 config VIDEO_CX23885
 	tristate "Conexant cx23885 (2388x successor) support"
-	depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT
+	depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && SND
+	select SND_PCM
 	select I2C_ALGOBIT
 	select VIDEO_BTCX
 	select VIDEO_TUNER
drivers/media/video/cx23885/cx23885-cards.c +102 -1

167 lines not on this page · raw message

drivers/media/video/cx23885/cx23885-core.c +16 -8
index 3598824..7c6f08e 100644
@@ -29,9 +29,11 @@
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <asm/div64.h>
+#include <linux/firmware.h>
 
 #include "cx23885.h"
 #include "cimax2.h"
+#include "altera-ci.h"
 #include "cx23888-ir.h"
 #include "cx23885-ir.h"
 #include "cx23885-av.h"
@@ -902,9 +904,13 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
 	dev->pci_bus  = dev->pci->bus->number;
 	dev->pci_slot = PCI_SLOT(dev->pci->devfn);
 	cx23885_irq_add(dev, 0x001f00);
-	if (cx23885_boards[dev->board].cimax > 0)
+	if (cx23885_boards[dev->board].ci_type == 1)
 		cx23885_irq_add(dev, 0x01800000); /* for CiMaxes */
 
+	if (cx23885_boards[dev->board].ci_type == 2)
+		cx23885_irq_add(dev, 0x00800000); /* for FPGA */
+
+
 	/* External Master 1 Bus */
 	dev->i2c_bus[0].nr = 0;
 	dev->i2c_bus[0].dev = dev;
@@ -1822,14 +1828,13 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id)
 				PCI_MSK_IR);
 	}
 
-	if (cx23885_boards[dev->board].cimax > 0 &&
-		((pci_status & PCI_MSK_GPIO0) ||
-			(pci_status & PCI_MSK_GPIO1))) {
+	if (cx23885_boards[dev->board].ci_type == 1 &&
+			(pci_status & (PCI_MSK_GPIO1 | PCI_MSK_GPIO0)))
+		handled += netup_ci_slot_status(dev, pci_status);
 
-		if (cx23885_boards[dev->board].cimax > 0)
-			handled += netup_ci_slot_status(dev, pci_status);
-
-	}
+	if (cx23885_boards[dev->board].ci_type == 2 &&
+			(pci_status & PCI_MSK_GPIO0))
+		handled += altera_ci_irq(dev);
 
 	if (ts1_status) {
 		if (cx23885_boards[dev->board].portb == CX23885_MPEG_DVB)
@@ -2066,6 +2071,9 @@ static int __devinit cx23885_initdev(struct pci_dev *pci_dev,
 	case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
 		cx23885_irq_add_enable(dev, 0x01800000); /* for NetUP */
 		break;
+	case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF:
+		cx23885_irq_add_enable(dev, 0x00800000);
+		break;
 	}
 
 	/*
drivers/media/video/cx23885/cx23885-dvb.c +165 -7

245 lines not on this page · raw message

drivers/media/video/cx23885/cx23885.h +3 -1
index 62e41ab..a427f7c 100644
@@ -85,6 +85,7 @@
 #define CX23885_BOARD_MYGICA_X8558PRO          27
 #define CX23885_BOARD_LEADTEK_WINFAST_PXTV1200 28
 #define CX23885_BOARD_GOTVIEW_X5_3D_HYBRID     29
+#define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002
@@ -220,7 +221,7 @@ struct cx23885_board {
 	 */
 	u32			clk_freq;
 	struct cx23885_input    input[MAX_CX23885_INPUT];
-	int			cimax; /* for NetUP */
+	int			ci_type; /* for NetUP */
 };
 
 struct cx23885_subid {
@@ -303,6 +304,7 @@ struct cx23885_tsport {
 
 	/* Allow a single tsport to have multiple frontends */
 	u32                        num_frontends;
+	void                       (*gate_ctrl)(struct cx23885_tsport *port, int open);
 	void                       *port_priv;
 };
 
Signature · 1 line
1.7.1