1 #ifndef _ATARI_SCCSERIAL_H
2 #define _ATARI_SCCSERIAL_H
4 /* Special configuration ioctls for the Atari SCC5380 Serial
5 * Communications Controller
8 /* ioctl command codes */
10 #define TIOCGATSCC 0x54c0 /* get SCC configuration */
11 #define TIOCSATSCC 0x54c1 /* set SCC configuration */
12 #define TIOCDATSCC 0x54c2 /* reset configuration to defaults */
20 /* baud_bases for the common clocks in the Atari. These are the real
21 * frequencies divided by 16.
24 #define SCC_BAUD_BASE_TIMC 19200 /* 0.3072 MHz from TT-MFP, Timer C */
25 #define SCC_BAUD_BASE_BCLK 153600 /* 2.4576 MHz */
26 #define SCC_BAUD_BASE_PCLK4 229500 /* 3.6720 MHz */
27 #define SCC_BAUD_BASE_PCLK 503374 /* 8.0539763 MHz */
28 #define SCC_BAUD_BASE_NONE 0 /* for not connected or unused
31 #define SCC_BAUD_BASE_M147_PCLK 312500 /* 5 MHz */
32 #define SCC_BAUD_BASE_M147 312500 /* 5 MHz */
33 #define SCC_BAUD_BASE_MVME_PCLK 781250 /* 12.5 MHz */
34 #define SCC_BAUD_BASE_MVME 625000 /* 10.000 MHz */
35 #define SCC_BAUD_BASE_BVME_PCLK 781250 /* 12.5 MHz */ /* XXX ??? */
36 #define SCC_BAUD_BASE_BVME 460800 /* 7.3728 MHz */
38 /* The SCC configuration structure */
40 struct atari_SCCserial
{
41 unsigned RTxC_base
; /* base_baud of RTxC */
42 unsigned TRxC_base
; /* base_baud of TRxC */
43 unsigned PCLK_base
; /* base_baud of PCLK, for both channels! */
45 unsigned clksrc
; /* CLK_RTxC, CLK_TRxC or CLK_PCLK */
46 unsigned divisor
; /* divisor for base baud, valid values:
48 } baud_table
[17]; /* For 50, 75, 110, 135, 150, 200, 300,
49 * 600, 1200, 1800, 2400, 4800, 9600,
50 * 19200, 38400, 57600 and 115200 bps. The
51 * last two could be replaced by other
52 * rates > 38400 if they're not possible.
56 /* The following divisors are valid:
58 * - CLK_RTxC: 1 or even (1, 2 and 4 are the direct modes, > 4 use
61 * - CLK_TRxC: 1, 2 or 4 (no BRG, only direct modes possible)
63 * - CLK_PCLK: >= 4 and even (no direct modes, only BRG)
67 #endif /* _ATARI_SCCSERIAL_H */