Exemplo n.º 1
0
/*
 * System-dependent processes (before start_system)
 */
EXPORT void sysdepend_patch1( void )
{
    T_DINT	dint;

    /* register an empty handler to ignore stray interrupts */
    dint.intatr = TA_HLNG;
    dint.inthdr = ignore_interrupt;
    tk_def_int(DINTNO(IV_IRQ(95)), &dint);
}
Exemplo n.º 2
0
#include "clkdrv.h"
#include <tk/util.h>
#include <device/em1d512_iic.h>

#ifdef	DEBUG
#define	DP(x)	printf x
#else
#define	DP(x)	/* do nothing */
#endif

#define	IICMAX		2
LOCAL	FastLock	IICLock[IICMAX];
LOCAL	ID		IICTskID[IICMAX];
LOCAL	const UW	IICBase[IICMAX] = {0x50040000, 0x50030000};
LOCAL	const UW	IICVec[IICMAX] = {IV_IRQ(33), IV_IRQ(39)};

#define	IIC_IIC(x)	(IICBase[x] + 0x0000)
#define	IIC_IICC(x)	(IICBase[x] + 0x0008)
#define	IIC_SVA(x)	(IICBase[x] + 0x000c)
#define	IIC_IICCL(x)	(IICBase[x] + 0x0010)
#define	IIC_IICSE(x)	(IICBase[x] + 0x001c)
#define	IIC_IICF(x)	(IICBase[x] + 0x0028)

#define	IICC_IICE	(1 << 7)
#define	IICC_LREL	(1 << 6)
#define	IICC_WREL	(1 << 5)
#define	IICC_SPIE	(1 << 4)
#define	IICC_WTIM	(1 << 3)
#define	IICC_ACKE	(1 << 2)
#define	IICC_STT	(1 << 1)