From ae5778afce65d379151113a6343ce8b0683bfcb0 Mon Sep 17 00:00:00 2001 From: Jamie Honan Date: Mon, 13 Oct 2003 03:37:35 +0000 Subject: 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. --- linux/drivers/media/dvb/bt8xx/bt878.h | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/dvb/bt8xx/bt878.h') 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 -- cgit v1.2.3