]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/serial/arm/lpc24xx/v2_0/cdl/ser_arm_lpc24xx.cdl
Initial revision
[karo-tx-redboot.git] / packages / devs / serial / arm / lpc24xx / v2_0 / cdl / ser_arm_lpc24xx.cdl
1 # ====================================================================
2 #
3 #      ser_arm_lpc24xx.cdl
4 #
5 #      eCos serial ARM/LPC24XX configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## Copyright (C) 2004 eCosCentric Limited 
13 ##
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
17 ##
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21 ## for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ##
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
33 ##
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
38 # ====================================================================
39 ######DESCRIPTIONBEGIN####
40 #
41 # Author(s):      Uwe Kindler  
42 # Original data:  gthomas, jskov
43 # Contributors:
44 # Date:           2008-07-06
45 #
46 #####DESCRIPTIONEND####
47 #
48 # ====================================================================
49
50 cdl_package CYGPKG_IO_SERIAL_ARM_LPC24XX {
51     display       "ARM LPC24xx serial device drivers"
52
53     parent        CYGPKG_IO_SERIAL_DEVICES
54     active_if     CYGPKG_IO_SERIAL
55     active_if     CYGPKG_HAL_ARM_LPC24XX
56     implements    CYGINT_IO_SERIAL_GENERIC_16X5X_CHAN_INTPRIO
57     requires      CYGPKG_ERROR
58     include_dir   cyg/io
59
60     description   "
61            This option enables the serial device drivers for the
62            ARM LPC24xx."
63
64     # FIXME: This really belongs in the GENERIC_16X5X package
65     cdl_interface CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED {
66         display   "Generic 16x5x serial driver required"
67     }
68     define_proc {
69         puts $::cdl_header "#define CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP 4"
70     }
71
72
73     define_proc {
74         puts $::cdl_system_header "/***** serial driver proc output start *****/"
75         puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_INL <cyg/io/arm_lpc24xx_ser.inl>"
76         puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_CFG <pkgconf/io_serial_arm_lpc24xx.h>"
77         puts $::cdl_system_header "/*****  serial driver proc output end  *****/"
78     }
79     
80     # Support up to 4 on-chip UART modules. The number may vary between
81     # processor variants so it is easy to update this here
82     for { set ::channel 0 } { $::channel < 4 } { incr ::channel } {
83     
84         cdl_interface CYGINT_IO_SERIAL_LPC24XX_UART[set ::channel] {
85             display     "Platform provides UART [set ::channel]"
86             flavor      bool
87             description "
88                 This interface will be implemented if the specific LPC24xx
89                 processor being used has on-chip UART [set ::channel], and if
90                 that UART is accessible on the target hardware."
91         }
92
93         cdl_component CYGPKG_IO_SERIAL_ARM_LPC24XX_SERIAL[set ::channel] {
94             display       "ARM LPC24cxx UART [set ::channel] driver"
95             flavor        bool
96             active_if     CYGINT_IO_SERIAL_LPC24XX_UART[set ::channel]
97             default_value 1
98
99            implements CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED
100            implements CYGINT_IO_SERIAL_FLOW_CONTROL_HW
101            implements CYGINT_IO_SERIAL_LINE_STATUS_HW
102
103            description   "
104                 This option includes the serial device driver for the ARM
105                 LPC24xx UART [set ::channel]."
106
107             cdl_option CYGDAT_IO_SERIAL_ARM_LPC24XX_SERIAL[set ::channel]_NAME {
108                 display       "Device name for UART [set ::channel]"
109                 flavor        data
110                 default_value   [format {"\"/dev/ser%d\""} $::channel]
111                 description   "
112                     This option specifies the name of the serial device
113                     for the ARM LPC24xx UART [set ::channel]."
114             }
115
116             cdl_option CYGNUM_IO_SERIAL_ARM_LPC24XX_SERIAL[set ::channel]_BAUD {
117                 display       "Baud rate for UART [set ::channel]"
118                 flavor        data
119                 legal_values  { 50 75 110 "134_5" 150 200 300 600 1200 1800 
120                                 2400 3600 4800 7200 9600 14400 19200 38400
121                                 57600 115200 230400 }
122                 default_value 38400
123                 description   "
124                     This option specifies the default baud rate (speed)
125                     for the ARM LPC24xx UART [set ::channel]."
126             }
127
128             cdl_option CYGNUM_IO_SERIAL_ARM_LPC24XX_SERIAL[set ::channel]_BUFSIZE {
129                 display       "Buffer size for the UART [set ::channel]"
130                 flavor        data
131                 legal_values  0 to 8192
132                 default_value 128
133                 description   "
134                     This option specifies the size of the internal buffers
135                     used for the ARM LPC24xx UART [set ::channel]."
136             }
137             
138             cdl_option CYGNUM_IO_SERIAL_ARM_LPC24XX_SERIAL[set ::channel]_INTPRIO {
139                 display       "Interrupt priority of UART [set ::channel]"
140                 flavor        data
141                 legal_values  0 to 15
142                 default_value 15
143                 description   "
144                     This option selects the interupt priority for the
145                     UART [set ::channel] interrupts. There are 16
146                     priority levels corresponding to the values 0
147                     through 15 decimal, of which 15 is the lowest
148                     priority. The reset value of these registers
149                     defaults all interrupt to the lowest priority,
150                     allowing a single write to elevate the priority of
151                     an individual interrupt."
152             }
153         }
154     }
155
156      cdl_component CYGPKG_IO_SERIAL_ARM_LPC24XX_TESTING {
157         display    "Testing parameters"
158         flavor     bool
159         calculated 1
160         active_if  CYGPKG_IO_SERIAL_ARM_LPC24XX_SERIAL0
161
162         implements CYGINT_IO_SERIAL_TEST_SKIP_9600
163         implements CYGINT_IO_SERIAL_TEST_SKIP_115200
164         implements CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN
165         
166         cdl_option CYGPRI_SER_TEST_SER_DEV {
167             display       "Serial device used for testing"
168             flavor        data
169             default_value { CYGDAT_IO_SERIAL_ARM_LPC24XX_SERIAL0_NAME }
170         }
171
172         define_proc {
173             puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"armlpc24xx\""
174             puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV  \"/dev/tty0\""
175         }
176     }
177 }
178
179 # EOF ser_arm_lpc24xx.cdl