revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-amiga / boot / amiga_hwreg.h
blobc886f56d6cca7a83626785b8a39f3ff0abc12c53
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: m68k-amiga hardware registers
6 Lang: english
7 */
9 #ifndef AMIGA_HWREG_H
10 #define AMIGA_HWREG_H
12 #include <exec/types.h>
14 /** Interrupts */
15 #define INTENAR 0x1c
16 #define INTREQR 0x1e
17 #define INTENA 0x9a
18 #define INTREQ 0x9c
20 /** Screen/Serial Debug **/
22 #define SERPER_BASE_PAL 3546895
23 #define SERPER_BASE_NTSC 3579545
24 #define SERPER 0x32
25 #define SERPER_BAUD(base, x) ((((base + (x)/2))/(x)-1) & 0x7fff) /* Baud rate */
26 #define SERDATR 0x18
27 #define SERDATR_OVRUN (1 << 15) /* Overrun */
28 #define SERDATR_RBF (1 << 14) /* Rx Buffer Full */
29 #define SERDATR_TBE (1 << 13) /* Tx Buffer Empty */
30 #define SERDATR_TSRE (1 << 12) /* Tx Shift Empty */
31 #define SERDATR_RXD (1 << 11) /* Rx Pin */
32 #define SERDATR_STP9 (1 << 9) /* Stop bit (if 9 data) */
33 #define SERDATR_STP8 (1 << 8) /* Stop bit (if 8 data) */
34 #define SERDATR_DB9_of(x) ((x) & 0x1ff) /* 9-bit data */
35 #define SERDATR_DB8_of(x) ((x) & 0xff) /* 8-bit data */
36 #define ADKCON 0x9e
37 #define ADKCON_SETCLR (1 << 15)
38 #define ADKCON_UARTBRK (1 << 11) /* Force break */
39 #define SERDAT 0x30
40 #define SERDAT_STP9 (1 << 9)
41 #define SERDAT_STP8 (1 << 8)
42 #define SERDAT_DB9(x) ((x) & 0x1ff)
43 #define SERDAT_DB8(x) ((x) & 0xff)
45 #define BPLCON0 0x100
46 #define BPL1DAT 0x110
47 #define COLOR00 0x180
49 static inline void reg_w(ULONG reg, UWORD val)
51 volatile UWORD *r = (void *)(0xdff000 + reg);
53 *r = val;
56 static inline UWORD reg_r(ULONG reg)
58 volatile UWORD *r = (void *)(0xdff000 + reg);
60 return *r;
63 #endif /* AMIGA_HWREG_H */