pre-2.3.4..
[davej-history.git] / include / asm-m68k / mac_psc.h
blobde22bbefe590c282741adfec872cde7c97e68532
1 /*
2 * Apple Peripheral System Controller (PSC)
4 * The PSC is used on the AV Macs to control IO functions not handled
5 * by the VIAs (Ethernet, DSP, SCC).
6 */
8 #define PSCBASE 0x50F31000
11 * The IER/IFR registers work like the VIA, except that it has 4
12 * of them each on different interrupt levels.
15 #define pIFR3 0x130
16 #define pIFR4 0x140
17 #define pIFR5 0x150
18 #define pIFR6 0x160
20 #define pIER3 0x134
21 #define pIER4 0x144
22 #define pIER5 0x154
23 #define pIER6 0x164
26 * Ethernet Control Registers
29 #define PSC_ENETRD_CTL 0xc10
30 #define PSC_ENETWR_CTL 0xc20
33 * Receive DMA channel (add +0x10 for 2nd channel)
36 #define PSC_ENETRD_ADDR 0x1020
37 #define PSC_ENETRD_LEN 0x1024
38 #define PSC_ENETRD_CMD 0x1028
41 * Transmit DMA channel (add +0x10 for 2nd channel)
44 #define PSC_ENETWR_ADDR 0x1040
45 #define PSC_ENETWR_LEN 0x1044
46 #define PSC_ENETWR_CMD 0x1048
49 * Access functions
52 extern volatile unsigned char *psc;
54 extern inline void psc_write_word(int offset, u16 data)
56 *((volatile u16 *)(psc+offset)) = data;
59 extern inline void psc_write_long(int offset, u32 data)
61 *((volatile u32 *)(psc+offset)) = data;
64 extern inline u16 psc_read_word(int offset)
66 return *((volatile u16 *)(psc+offset));
69 extern inline u32 psc_read_long(int offset)
71 return *((volatile u32 *)(psc+offset));