summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/bt8xx/bt878.h
diff options
context:
space:
mode:
authorJamie Honan <devnull@localhost>2003-10-13 03:37:35 +0000
committerJamie Honan <devnull@localhost>2003-10-13 03:37:35 +0000
commitae5778afce65d379151113a6343ce8b0683bfcb0 (patch)
tree1dc649926e72343aafbb5c19a8fcc6380f05ef32 /linux/drivers/media/dvb/bt8xx/bt878.h
parent1bec03e1fe0e1ee258feda72fb76d01bc859405f (diff)
downloadmediapointer-dvb-s2-ae5778afce65d379151113a6343ce8b0683bfcb0.tar.gz
mediapointer-dvb-s2-ae5778afce65d379151113a6343ce8b0683bfcb0.tar.bz2
Changes to support dst and bttv > 0.9.12 and for kernel >= 2.6.0-test7
This has support for i2c doen by bttv. Tested and working in 2.4, clean compile 2.6. Expect changes to get working under 2.6. Patches directory no longer needed.
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx/bt878.h')
-rw-r--r--linux/drivers/media/dvb/bt8xx/bt878.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/bt878.h b/linux/drivers/media/dvb/bt8xx/bt878.h
index 2f3afc77d..e929a062d 100644
--- a/linux/drivers/media/dvb/bt8xx/bt878.h
+++ b/linux/drivers/media/dvb/bt8xx/bt878.h
@@ -74,7 +74,19 @@
#define BT878_ARISC_PC 0x120
+/* BT878 FUNCTION 0 REGISTERS */
+#define BT878_GPIO_DMA_CTL 0x10c
+
+/* Interrupt register */
+#define BT878_INT_STAT 0x100
+#define BT878_INT_MASK 0x104
+#define BT878_I2CRACK (1<<25)
+#define BT878_I2CDONE (1<<8)
+
#define BT878_MAX 4
+
+#define BT878_RISC_SYNC_MASK (1 << 15)
+
extern int bt878_num;
extern struct bt878 bt878[BT878_MAX];
@@ -86,7 +98,7 @@ struct bt878 {
unsigned char revision;
unsigned int irq;
unsigned long bt878_adr;
- unsigned char *bt878_mem;
+ unsigned char *bt878_mem; /* function 1 */
volatile u32 finished_block;
volatile u32 last_block;
@@ -108,6 +120,23 @@ struct bt878 {
int shutdown;
};
-void bt878_start(struct bt878 *bt, u32 controlreg);
+void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin,
+ u32 irq_err_ignore);
void bt878_stop(struct bt878 *bt);
+
+#if defined(__powerpc__) /* big-endian */
+extern __inline__ void io_st_le32(volatile unsigned *addr, unsigned val)
+{
+ __asm__ __volatile__("stwbrx %1,0,%2":"=m"(*addr):"r"(val),
+ "r"(addr));
+ __asm__ __volatile__("eieio":::"memory");
+}
+
+#define bmtwrite(dat,adr) io_st_le32((unsigned *)(adr),(dat))
+#define bmtread(adr) ld_le32((unsigned *)(adr))
+#else
+#define bmtwrite(dat,adr) writel((dat), (char *) (adr))
+#define bmtread(adr) readl(adr)
+#endif
+
#endif