summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2003-08-30 19:43:40 +0000
committerHolger Waechtler <devnull@localhost>2003-08-30 19:43:40 +0000
commitf0d43dae89980e6d875a6ff5e1c499a379a16ae9 (patch)
tree646f9896c743371509b7e55576250a75dc2252eb
parent33321b60411e4d912ea8f1f55f073fe9b4e2ec61 (diff)
downloadmediapointer-dvb-s2-f0d43dae89980e6d875a6ff5e1c499a379a16ae9.tar.gz
mediapointer-dvb-s2-f0d43dae89980e6d875a6ff5e1c499a379a16ae9.tar.bz2
applied 64bit fixes by Pedro Miguel Teixeira <pmsjt@warner.homeip.net>
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 67ff91c36..d2bac0f11 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -40,9 +40,9 @@
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/timer.h>
+#include <linux/poll.h>
#include <linux/unistd.h>
#include <linux/byteorder/swabb.h>
-#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <stdarg.h>
@@ -197,17 +197,22 @@ static u32 debiread(struct av7110 *av7110, u32 config, int addr, int count)
return result;
}
-/* DEBI during interrupt */
-/* fixme: val can be a pointer to a memory or an u32 value -- this
- won't work on 64bit platforms! */
+/* DEBI during interrupt */
+/* single word writes */
static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
{
- if (count>4 && val)
- memcpy(av7110->debi_virt, (char *) val, count);
debiwrite(av7110, config, addr, val, count);
}
+/* buffer writes */
+static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, char *val, int count)
+{
+ memcpy(av7110->debi_virt, val, count);
+ debiwrite(av7110, config, addr, 0, count);
+}
+
+
static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
{
u32 res;
@@ -218,6 +223,7 @@ static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, i
return res;
}
+
/* DEBI outside interrupts, only for count<=4! */
static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
@@ -1916,8 +1922,8 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
return -1;
DEB_D(("Writing DRAM block %d\n",i));
- iwdebi(av7110, DEBISWAB, bootblock,
- i*(BOOT_MAX_SIZE)+(u32)data,
+ mwdebi(av7110, DEBISWAB, bootblock,
+ ((char*)data) + i*(BOOT_MAX_SIZE),
BOOT_MAX_SIZE);
bootblock^=0x1400;
iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4);
@@ -1930,9 +1936,9 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
return -1;
if (rest>4)
- iwdebi(av7110, DEBISWAB, bootblock, i*(BOOT_MAX_SIZE)+(u32)data, rest);
+ mwdebi(av7110, DEBISWAB, bootblock, ((char*)data) + i*(BOOT_MAX_SIZE), rest);
else
- iwdebi(av7110, DEBISWAB, bootblock, i*(BOOT_MAX_SIZE)-4+(u32)data, rest+4);
+ mwdebi(av7110, DEBISWAB, bootblock, ((char*)data) + i*(BOOT_MAX_SIZE) - 4, rest+4);
iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4);
iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, rest, 2);
@@ -2016,7 +2022,7 @@ static int bootarm(struct av7110 *av7110)
//saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT);
//saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);
- iwdebi(av7110, DEBISWAB, DPRAM_BASE, (u32) bootcode, sizeof(bootcode));
+ mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode));
iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
wait_for_debi_done(av7110);
@@ -2034,7 +2040,7 @@ static int bootarm(struct av7110 *av7110)
DEB_D(("bootarm: load dpram code\n"));
- iwdebi(av7110, DEBISWAB, DPRAM_BASE, (u32) Dpram, sizeof(Dpram));
+ mwdebi(av7110, DEBISWAB, DPRAM_BASE, Dpram, sizeof(Dpram));
wait_for_debi_done(av7110);
@@ -4724,6 +4730,7 @@ MAKE_AV7110_INFO(unkwn0, "Technotrend/Hauppauge PCI rev?(unknown0)?");
MAKE_AV7110_INFO(unkwn1, "Technotrend/Hauppauge PCI rev?(unknown1)?");
MAKE_AV7110_INFO(unkwn2, "Technotrend/Hauppauge PCI rev?(unknown2)?");
MAKE_AV7110_INFO(nexus, "Technotrend/Hauppauge Nexus PCI DVB-S");
+MAKE_AV7110_INFO(dvboc11,"Octal/Technotrend DVB-C for iTV");
static struct pci_device_id pci_tbl[] = {
MAKE_EXTENSION_PCI(fs_1_5, 0x110a, 0xffff),
@@ -4740,6 +4747,7 @@ static struct pci_device_id pci_tbl[] = {
MAKE_EXTENSION_PCI(unkwn1, 0xffc2, 0x0000),
MAKE_EXTENSION_PCI(unkwn2, 0x00a1, 0x00a1),
MAKE_EXTENSION_PCI(nexus, 0x00a1, 0xa1a0),
+ MAKE_EXTENSION_PCI(dvboc11,0x13c2, 0x000a),
{
.vendor = 0,
}