Alex Zeffertt wrote: > > > > > A link to an 8xx driver would be almost as good. The only one I've found > > so far has been SPI over a PC's parallel port. heh >
Kevin, Sorry, I forgot to add that you need to make the following mods to arch/ppc/8xx_io/commproc.h Alex diff -u linux-2.4.4-2001-11-24/arch/ppc/8xx_io/commproc.h linux-2.4.4-2001-11-24.new/arch/ppc/8xx_io/commproc.h --- linux-2.4.4-2001-11-24/arch/ppc/8xx_io/commproc.h Mon Sep 10 16:29:33 2001 +++ linux-2.4.4-2001-11-24.new/arch/ppc/8xx_io/commproc.h Fri Dec 7 11:54:58 2001 @@ -37,6 +37,7 @@ #define CPM_CR_RESTART_TX ((ushort)0x0006) #define CPM_CR_SET_GADDR ((ushort)0x0008) #define CPM_CR_SET_TIMER CPM_CR_SET_GADDR +#define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) /* Channel numbers. */ @@ -93,7 +94,9 @@ #define BD_SC_PR ((ushort)0x0008) /* Parity error */ #define BD_SC_NAK ((ushort)0x0004) /* NAK - did not respond */ #define BD_SC_OV ((ushort)0x0002) /* Overrun */ +#define BD_SC_UN ((ushort)0x0002) /* Underrun */ #define BD_SC_CD ((ushort)0x0001) /* ?? */ +#define BD_SC_CL ((ushort)0x0001) /* Collision */ /* Parameter RAM offsets. */ @@ -704,7 +707,11 @@ #define SICR_ENET_MASK ((uint)0x0000ff00) #define SICR_ENET_CLKRT ((uint)0x00003E00) -#undef USE_IIC_PATCH /* We need the I?C ?Code Patch */ +#ifdef CONFIG_UCODE_PATCH +# define USE_IIC_PATCH +#else +# undef USE_IIC_PATCH /* We need the I?C ?Code Patch */ +#endif #endif /* CONFIG_LWMON */ @@ -962,6 +969,16 @@ #define SPMODE_EN ((ushort)0x0100) /* Enable */ #define SPMODE_LENMSK ((ushort)0x00f0) /* character length */ #define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */ +#define SPMODE_MASTER ((ushort)0x0200) /* Am SPI master */ +#define SPMODE_LEN_SHIFT 4 /* shift of character length field */ +#define SPMODE_PM_SHIFT 0 /* shift of Prescale Modulus field */ + +/* SPIE fields */ +#define SPIE_MME 0x20 +#define SPIE_TXE 0x10 +#define SPIE_BSY 0x04 +#define SPIE_TXB 0x02 +#define SPIE_RXB 0x01 /* CPM interrupts. There are nearly 32 interrupts generated by CPM * channels or devices. All of these are presented to the PPC core ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
