OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68k/] [atari_SCCserial.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _ATARI_SCCSERIAL_H
2
#define _ATARI_SCCSERIAL_H
3
 
4
/* Special configuration ioctls for the Atari SCC5380 Serial
5
 * Communications Controller
6
 */
7
 
8
/* ioctl command codes */
9
 
10
#define TIOCGATSCC      0x54c0  /* get SCC configuration */
11
#define TIOCSATSCC      0x54c1  /* set SCC configuration */
12
#define TIOCDATSCC      0x54c2  /* reset configuration to defaults */
13
 
14
/* Clock sources */
15
 
16
#define CLK_RTxC        0
17
#define CLK_TRxC        1
18
#define CLK_PCLK        2
19
 
20
/* baud_bases for the common clocks in the Atari. These are the real
21
 * frequencies divided by 16.
22
 */
23
 
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
29
                                                 * clock sources */
30
 
31
/* The SCC configuration structure */
32
 
33
struct atari_SCCserial {
34
        unsigned        RTxC_base;      /* base_baud of RTxC */
35
        unsigned        TRxC_base;      /* base_baud of TRxC */
36
        unsigned        PCLK_base;      /* base_baud of PCLK, for both channels! */
37
        struct {
38
                unsigned clksrc;        /* CLK_RTxC, CLK_TRxC or CLK_PCLK */
39
                unsigned divisor;       /* divisor for base baud, valid values:
40
                                         * see below */
41
        } baud_table[17];               /* For 50, 75, 110, 135, 150, 200, 300,
42
                                         * 600, 1200, 1800, 2400, 4800, 9600,
43
                                         * 19200, 38400, 57600 and 115200 bps. The
44
                                         * last two could be replaced by other
45
                                         * rates > 38400 if they're not possible.
46
                                         */
47
};
48
 
49
/* The following divisors are valid:
50
 *
51
 *   - CLK_RTxC: 1 or even (1, 2 and 4 are the direct modes, > 4 use
52
 *               the BRG)
53
 *
54
 *   - CLK_TRxC: 1, 2 or 4 (no BRG, only direct modes possible)
55
 *
56
 *   - CLK_PCLK: >= 4 and even (no direct modes, only BRG)
57
 *
58
 */
59
 
60
#endif /* _ATARI_SCCSERIAL_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.