diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/media/dvb/mantis | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'drivers/media/dvb/mantis')
44 files changed, 5387 insertions, 0 deletions
diff --git a/drivers/media/dvb/mantis/Kconfig b/drivers/media/dvb/mantis/Kconfig new file mode 100644 index 00000000000..a13a5050313 --- /dev/null +++ b/drivers/media/dvb/mantis/Kconfig | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | config MANTIS_CORE | ||
| 2 | tristate "Mantis/Hopper PCI bridge based devices" | ||
| 3 | depends on PCI && I2C && INPUT && RC_CORE | ||
| 4 | |||
| 5 | help | ||
| 6 | Support for PCI cards based on the Mantis and Hopper PCi bridge. | ||
| 7 | |||
| 8 | Say Y if you own such a device and want to use it. | ||
| 9 | |||
| 10 | config DVB_MANTIS | ||
| 11 | tristate "MANTIS based cards" | ||
| 12 | depends on MANTIS_CORE && DVB_CORE && PCI && I2C | ||
| 13 | select DVB_MB86A16 if !DVB_FE_CUSTOMISE | ||
| 14 | select DVB_ZL10353 if !DVB_FE_CUSTOMISE | ||
| 15 | select DVB_STV0299 if !DVB_FE_CUSTOMISE | ||
| 16 | select DVB_LNBP21 if !DVB_FE_CUSTOMISE | ||
| 17 | select DVB_STB0899 if !DVB_FE_CUSTOMISE | ||
| 18 | select DVB_STB6100 if !DVB_FE_CUSTOMISE | ||
| 19 | select DVB_TDA665x if !DVB_FE_CUSTOMISE | ||
| 20 | select DVB_TDA10021 if !DVB_FE_CUSTOMISE | ||
| 21 | select DVB_TDA10023 if !DVB_FE_CUSTOMISE | ||
| 22 | select DVB_PLL | ||
| 23 | help | ||
| 24 | Support for PCI cards based on the Mantis PCI bridge. | ||
| 25 | Say Y when you have a Mantis based DVB card and want to use it. | ||
| 26 | |||
| 27 | If unsure say N. | ||
| 28 | |||
| 29 | config DVB_HOPPER | ||
| 30 | tristate "HOPPER based cards" | ||
| 31 | depends on MANTIS_CORE && DVB_CORE && PCI && I2C | ||
| 32 | select DVB_ZL10353 if !DVB_FE_CUSTOMISE | ||
| 33 | select DVB_PLL | ||
| 34 | help | ||
| 35 | Support for PCI cards based on the Hopper PCI bridge. | ||
| 36 | Say Y when you have a Hopper based DVB card and want to use it. | ||
| 37 | |||
| 38 | If unsure say N | ||
diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile new file mode 100644 index 00000000000..98dc5cd258a --- /dev/null +++ b/drivers/media/dvb/mantis/Makefile | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | mantis_core-objs := mantis_ioc.o \ | ||
| 2 | mantis_uart.o \ | ||
| 3 | mantis_dma.o \ | ||
| 4 | mantis_pci.o \ | ||
| 5 | mantis_i2c.o \ | ||
| 6 | mantis_dvb.o \ | ||
| 7 | mantis_evm.o \ | ||
| 8 | mantis_hif.o \ | ||
| 9 | mantis_ca.o \ | ||
| 10 | mantis_pcmcia.o \ | ||
| 11 | mantis_input.o | ||
| 12 | |||
| 13 | mantis-objs := mantis_cards.o \ | ||
| 14 | mantis_vp1033.o \ | ||
| 15 | mantis_vp1034.o \ | ||
| 16 | mantis_vp1041.o \ | ||
| 17 | mantis_vp2033.o \ | ||
| 18 | mantis_vp2040.o \ | ||
| 19 | mantis_vp3030.o | ||
| 20 | |||
| 21 | hopper-objs := hopper_cards.o \ | ||
| 22 | hopper_vp3028.o | ||
| 23 | |||
| 24 | obj-$(CONFIG_MANTIS_CORE) += mantis_core.o | ||
| 25 | obj-$(CONFIG_DVB_MANTIS) += mantis.o | ||
| 26 | obj-$(CONFIG_DVB_HOPPER) += hopper.o | ||
| 27 | |||
| 28 | EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ | ||
diff --git a/drivers/media/dvb/mantis/hopper_cards.c b/drivers/media/dvb/mantis/hopper_cards.c new file mode 100644 index 00000000000..1402062f2c8 --- /dev/null +++ b/drivers/media/dvb/mantis/hopper_cards.c | |||
| @@ -0,0 +1,278 @@ | |||
| 1 | /* | ||
| 2 | Hopper PCI bridge driver | ||
| 3 | |||
| 4 | Copyright (C) Manu Abraham (abraham.manu@gmail.com) | ||
| 5 | |||
| 6 | This program is free software; you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/module.h> | ||
| 22 | #include <linux/moduleparam.h> | ||
| 23 | #include <linux/kernel.h> | ||
| 24 | #include <linux/pci.h> | ||
| 25 | #include <linux/slab.h> | ||
| 26 | #include <asm/irq.h> | ||
| 27 | #include <linux/interrupt.h> | ||
| 28 | |||
| 29 | #include "dmxdev.h" | ||
| 30 | #include "dvbdev.h" | ||
| 31 | #include "dvb_demux.h" | ||
| 32 | #include "dvb_frontend.h" | ||
| 33 | #include "dvb_net.h" | ||
| 34 | |||
| 35 | #include "mantis_common.h" | ||
| 36 | #include "hopper_vp3028.h" | ||
| 37 | #include "mantis_dma.h" | ||
| 38 | #include "mantis_dvb.h" | ||
| 39 | #include "mantis_uart.h" | ||
| 40 | #include "mantis_ioc.h" | ||
| 41 | #include "mantis_pci.h" | ||
| 42 | #include "mantis_i2c.h" | ||
| 43 | #include "mantis_reg.h" | ||
| 44 | |||
| 45 | static unsigned int verbose; | ||
| 46 | module_param(verbose, int, 0644); | ||
| 47 | MODULE_PARM_DESC(verbose, "verbose startup messages, default is 0 (no)"); | ||
| 48 | |||
| 49 | #define DRIVER_NAME "Hopper" | ||
| 50 | |||
| 51 | static char *label[10] = { | ||
| 52 | "DMA", | ||
| 53 | "IRQ-0", | ||
| 54 | "IRQ-1", | ||
| 55 | "OCERR", | ||
| 56 | "PABRT", | ||
| 57 | "RIPRR", | ||
| 58 | "PPERR", | ||
| 59 | "FTRGT", | ||
| 60 | "RISCI", | ||
| 61 | "RACK" | ||
| 62 | }; | ||
| 63 | |||
| 64 | static int devs; | ||
| 65 | |||
| 66 | static irqreturn_t hopper_irq_handler(int irq, void *dev_id) | ||
| 67 | { | ||
| 68 | u32 stat = 0, mask = 0, lstat = 0, mstat = 0; | ||
| 69 | u32 rst_stat = 0, rst_mask = 0; | ||
| 70 | |||
| 71 | struct mantis_pci *mantis; | ||
| 72 | struct mantis_ca *ca; | ||
| 73 | |||
