8 #define DEBINOSWAP 0x000e0000
9 #define DEBISWAB 0x001e0000
10 #define DEBISWAP 0x002e0000
12 #define ARM_WAIT_FREE (HZ)
13 #define ARM_WAIT_SHAKE (HZ/5)
14 #define ARM_WAIT_OSD (HZ)
44 #define SB_OFF SAA7146_GPIO_OUTLO
45 #define SB_ON SAA7146_GPIO_INPUT
46 #define SB_WIDE SAA7146_GPIO_OUTHI
49 #define FB_OFF SAA7146_GPIO_LO
50 #define FB_ON SAA7146_GPIO_OUTHI
51 #define FB_LOOP SAA7146_GPIO_INPUT
62 #define GPMQFull 0x0001
63 #define GPMQOver 0x0002
64 #define HPQFull 0x0004
65 #define HPQOver 0x0008
66 #define OSDQFull 0x0010
67 #define OSDQOver 0x0020
68 #define GPMQBusy 0x0040
69 #define HPQBusy 0x0080
70 #define OSDQBusy 0x0100
73 #define SECTION_EIT 0x01
74 #define SECTION_SINGLE 0x00
75 #define SECTION_CYCLE 0x02
76 #define SECTION_CONTINUOS 0x04
77 #define SECTION_MODE 0x06
78 #define SECTION_IPMPE 0x0C
79 #define SECTION_HIGH_SPEED 0x1C
80 #define DATA_PIPING_FLAG 0x20
82 #define PBUFSIZE_NONE 0x0000
83 #define PBUFSIZE_1P 0x0100
84 #define PBUFSIZE_2P 0x0200
85 #define PBUFSIZE_1K 0x0300
86 #define PBUFSIZE_2K 0x0400
87 #define PBUFSIZE_4K 0x0500
88 #define PBUFSIZE_8K 0x0600
89 #define PBUFSIZE_16K 0x0700
90 #define PBUFSIZE_32K 0x0800
212 #define VID_NONE_PREF 0x00
213 #define VID_PAN_SCAN_PREF 0x01
214 #define VID_VERT_COMP_PREF 0x02
215 #define VID_VC_AND_PS_PREF 0x03
216 #define VID_CENTRE_CUT_PREF 0x05
219 #define AV_VIDEO_CMD_STOP 0x000e
220 #define AV_VIDEO_CMD_PLAY 0x000d
221 #define AV_VIDEO_CMD_FREEZE 0x0102
222 #define AV_VIDEO_CMD_FFWD 0x0016
223 #define AV_VIDEO_CMD_SLOW 0x0022
226 #define AUDIO_CMD_MUTE 0x0001
227 #define AUDIO_CMD_UNMUTE 0x0002
228 #define AUDIO_CMD_PCM16 0x0010
229 #define AUDIO_CMD_STEREO 0x0080
230 #define AUDIO_CMD_MONO_L 0x0100
231 #define AUDIO_CMD_MONO_R 0x0200
232 #define AUDIO_CMD_SYNC_OFF 0x000e
233 #define AUDIO_CMD_SYNC_ON 0x000f
236 #define DATA_NONE 0x00
237 #define DATA_FSECTION 0x01
238 #define DATA_IPMPE 0x02
239 #define DATA_MPEG_RECORD 0x03
240 #define DATA_DEBUG_MESSAGE 0x04
241 #define DATA_COMMON_INTERFACE 0x05
242 #define DATA_MPEG_PLAY 0x06
243 #define DATA_BMP_LOAD 0x07
244 #define DATA_IRCOMMAND 0x08
245 #define DATA_PIPING 0x09
246 #define DATA_STREAMING 0x0a
247 #define DATA_CI_GET 0x0b
248 #define DATA_CI_PUT 0x0c
249 #define DATA_MPEG_VIDEO_EVENT 0x0d
251 #define DATA_PES_RECORD 0x10
252 #define DATA_PES_PLAY 0x11
253 #define DATA_TS_RECORD 0x12
254 #define DATA_TS_PLAY 0x13
258 #define CI_CMD_ERROR 0x00
259 #define CI_CMD_ACK 0x01
260 #define CI_CMD_SYSTEM_READY 0x02
261 #define CI_CMD_KEYPRESS 0x03
262 #define CI_CMD_ON_TUNED 0x04
263 #define CI_CMD_ON_SWITCH_PROGRAM 0x05
264 #define CI_CMD_SECTION_ARRIVED 0x06
265 #define CI_CMD_SECTION_TIMEOUT 0x07
266 #define CI_CMD_TIME 0x08
267 #define CI_CMD_ENTER_MENU 0x09
268 #define CI_CMD_FAST_PSI 0x0a
269 #define CI_CMD_GET_SLOT_INFO 0x0b
271 #define CI_MSG_NONE 0x00
272 #define CI_MSG_CI_INFO 0x01
273 #define CI_MSG_MENU 0x02
274 #define CI_MSG_LIST 0x03
275 #define CI_MSG_TEXT 0x04
276 #define CI_MSG_REQUEST_INPUT 0x05
277 #define CI_MSG_INPUT_COMPLETE 0x06
278 #define CI_MSG_LIST_MORE 0x07
279 #define CI_MSG_MENU_MORE 0x08
280 #define CI_MSG_CLOSE_MMI_IMM 0x09
281 #define CI_MSG_SECTION_REQUEST 0x0a
282 #define CI_MSG_CLOSE_FILTER 0x0b
283 #define CI_PSI_COMPLETE 0x0c
284 #define CI_MODULE_READY 0x0d
285 #define CI_SWITCH_PRG_REPLY 0x0e
286 #define CI_MSG_TEXT_MORE 0x0f
288 #define CI_MSG_CA_PMT 0xe0
289 #define CI_MSG_ERROR 0xf0
295 #define DPRAM_BASE 0x4000
298 #define AV7110_BOOT_STATE (DPRAM_BASE + 0x3F8)
299 #define AV7110_BOOT_SIZE (DPRAM_BASE + 0x3FA)
300 #define AV7110_BOOT_BASE (DPRAM_BASE + 0x3FC)
301 #define AV7110_BOOT_BLOCK (DPRAM_BASE + 0x400)
302 #define AV7110_BOOT_MAX_SIZE 0xc00
305 #define IRQ_STATE (DPRAM_BASE + 0x0F4)
306 #define IRQ_STATE_EXT (DPRAM_BASE + 0x0F6)
307 #define MSGSTATE (DPRAM_BASE + 0x0F8)
308 #define COMMAND (DPRAM_BASE + 0x0FC)
309 #define COM_BUFF (DPRAM_BASE + 0x100)
310 #define COM_BUFF_SIZE 0x20
313 #define BUFF1_BASE (DPRAM_BASE + 0x120)
314 #define BUFF1_SIZE 0xE0
316 #define DATA_BUFF0_BASE (DPRAM_BASE + 0x200)
317 #define DATA_BUFF0_SIZE 0x0800
319 #define DATA_BUFF1_BASE (DATA_BUFF0_BASE+DATA_BUFF0_SIZE)
320 #define DATA_BUFF1_SIZE 0x0800
322 #define DATA_BUFF2_BASE (DATA_BUFF1_BASE+DATA_BUFF1_SIZE)
323 #define DATA_BUFF2_SIZE 0x0800
325 #define DATA_BUFF3_BASE (DATA_BUFF2_BASE+DATA_BUFF2_SIZE)
326 #define DATA_BUFF3_SIZE 0x0400
328 #define Reserved (DPRAM_BASE + 0x1E00)
329 #define Reserved_SIZE 0x1C0
333 #define STATUS_BASE (DPRAM_BASE + 0x1FC0)
334 #define STATUS_LOOPS (STATUS_BASE + 0x08)
336 #define STATUS_MPEG_WIDTH (STATUS_BASE + 0x0C)
338 #define STATUS_MPEG_HEIGHT_AR (STATUS_BASE + 0x0E)
341 #define RX_TYPE (DPRAM_BASE + 0x1FE8)
342 #define RX_LEN (DPRAM_BASE + 0x1FEA)
343 #define TX_TYPE (DPRAM_BASE + 0x1FEC)
344 #define TX_LEN (DPRAM_BASE + 0x1FEE)
346 #define RX_BUFF (DPRAM_BASE + 0x1FF4)
347 #define TX_BUFF (DPRAM_BASE + 0x1FF6)
349 #define HANDSHAKE_REG (DPRAM_BASE + 0x1FF8)
350 #define COM_IF_LOCK (DPRAM_BASE + 0x1FFA)
352 #define IRQ_RX (DPRAM_BASE + 0x1FFC)
353 #define IRQ_TX (DPRAM_BASE + 0x1FFE)
356 #define DRAM_START_CODE 0x2e000404
357 #define DRAM_MAX_CODE_SIZE 0x00100000
361 #define DEBI_DONE_LINE 1
362 #define ARM_IRQ_LINE 0
368 #define FW_CI_LL_SUPPORT(arm_app) ((arm_app) & 0x80000000)
369 #define FW_4M_SDRAM(arm_app) ((arm_app) & 0x40000000)
370 #define FW_VERSION(arm_app) ((arm_app) & 0x0000FFFF)
411 static inline void wdebi(
struct av7110 *av7110,
u32 config,
int addr,
u32 val,
int count)
417 spin_unlock_irqrestore(&av7110->
debilock, flags);
420 static inline u32 rdebi(
struct av7110 *av7110,
u32 config,
int addr,
u32 val,
int count)
427 spin_unlock_irqrestore(&av7110->
debilock, flags);
432 static inline void ARM_ResetMailBox(
struct av7110 *av7110)
439 spin_unlock_irqrestore(&av7110->
debilock, flags);
442 static inline void ARM_ClearMailBox(
struct av7110 *av7110)
447 static inline void ARM_ClearIrq(
struct av7110 *av7110)
456 static inline int SendDAC(
struct av7110 *av7110,
u8 addr,
u8 data)
461 static inline int av7710_set_video_mode(
struct av7110 *av7110,
int mode)
466 static inline int vidcom(
struct av7110 *av7110,
u32 com,
u32 arg)
469 (com>>16), (com&0xffff),
470 (arg>>16), (arg&0xffff));
473 static inline int audcom(
struct av7110 *av7110,
u32 com)
476 (com>>16), (com&0xffff));
479 static inline int Set22K(
struct av7110 *av7110,
int state)
488 #ifdef CONFIG_DVB_AV7110_OSD
489 extern int av7110_osd_cmd(
struct av7110 *av7110,
osd_cmd_t *
dc);
490 extern int av7110_osd_capability(
struct av7110 *av7110,
osd_cap_t *
cap);