visionTmdAsmXscale.c
资源名称:ixp425BSP.rar [点击查看]
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:3k
源码类别:
VxWorks
开发平台:
C/C++
- /* visionTmdAsmXscale.c - Wind River visionTMD Interupt routines */
- /* Copyright 1988-2002 Wind River Systems Inc. */
- /*
- modification history
- --------------------
- 01d,26apr01,g_h Fix syntax error from LONG to ULONG
- 01c,21dec01,g_h Rename to visionTmdAsmXscale.c
- 01b,30nov01,g_h Cleaning for T2.2
- 01a,19nov01,g_h Adapted from visionTMDAsmPPC.c ver 01e
- */
- /*
- DESCRIPTION
- These low-level IO interface routines which signal the emulation
- product that we desire to initialize/initiate/complete IO.
- */
- #include "vxWorks.h"
- #include "drv/wdb/vision/visionTmdDrv.h"
- /* externals */
- IMPORT unsigned long txDesc; /* Duplicate location of the XMIT space */
- IMPORT unsigned long rxDesc; /* Duplicate location of the RECV space */
- /* forward declarations */
- LOCAL void tmdXSCALESignalSubDescReady (ULONG lrxDesc, ULONG ltxDesc);
- #if (CPU == XSCALE)
- /***************************************************************************
- *
- * tmdXSCALESignalDescReady - inform emulator the location of Rx/Tx
- * descriptors
- *
- * This routine inform emulator the location of Rx/Tx descriptors.
- *
- * RETURNS: N/A
- */
- void tmdXSCALESignalDescReady
- (
- void
- )
- {
- tmdXSCALESignalSubDescReady (rxDesc, txDesc);
- }
- #endif /* (CPU == XSCALE) */
- #if (CPU == XSCALE)
- /***************************************************************************
- *
- * tmdXSCALEignalTxReady - inform emulator the location of Rx/Tx
- * descriptors.
- *
- * This routine inform emulator the location of Rx/Tx descriptors.
- *
- * RETURNS: N/A
- */
- void tmdXSCALESignalTxReady
- (
- void
- )
- {
- _WRS_ASM("txBdmBgnd: ");
- _WRS_ASM(" .long 0xE1200070 ");
- }
- #endif /* (CPU == XSCALE) */
- #if (CPU == XSCALE)
- /***************************************************************************
- *
- * tmdXSCALESignalRxReady - inform emulator the location of Rx/Tx
- * descriptors.
- *
- * This routine inform emulator the location of Rx/Tx descriptors.
- *
- * RETURNS: N/A
- */
- void tmdXSCALESignalRxReady
- (
- void
- )
- {
- return;
- }
- #endif /* (CPU == XSCALE) */
- #if (CPU == XSCALE)
- /***************************************************************************
- *
- * tmdXSCALESignalSubDescReady - inform emulator the location of Rx/Tx
- * descriptors.
- *
- * This routine inform emulator the location of Rx/Tx descriptors.
- *
- * RETURNS: N/A
- */
- LOCAL void tmdXSCALESignalSubDescReady
- (
- ULONG lrxDesc,
- ULONG ltxDesc
- )
- {
- /* Setup rxDesc Ptr into R2 */
- _WRS_ASM(" MOV r2,r0 ");
- /* Setup txDesc Ptr into R1 */
- _WRS_ASM(" MOV r1,r1 ");
- /* Set R0 to init command (0x5c5c5c5c) */
- _WRS_ASM(" MOV r0,#0x5c ");
- _WRS_ASM(" ADD r0,r0,r0,lsl #0x8 ");
- _WRS_ASM(" ADD r0,r0,r0,lsl #0x10 ");
- /* Setup R3 to point to Tx function */
- _WRS_ASM(" LDR r3,=txBdmBgnd; ");
- /* Notify emulator via software breakpoint */
- _WRS_ASM(" .long 0xE1200070 ");
- _WRS_ASM(" MOV pc, lr ");
- _WRS_ASM(" .ltorg ");
- }
- #endif /* (CPU == XSCALE) */