URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/rtos/ecos-2.0/packages/devs/serial/arm/pid/v2_0
- from Rev 27 to Rev 174
- ↔ Reverse comparison
Rev 27 → Rev 174
/cdl/ser_arm_pid.cdl
0,0 → 1,196
# ==================================================================== |
# |
# ser_arm_pid.cdl |
# |
# eCos serial ARM/PID configuration data |
# |
# ==================================================================== |
#####ECOSGPLCOPYRIGHTBEGIN#### |
## ------------------------------------------- |
## This file is part of eCos, the Embedded Configurable Operating System. |
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
## |
## eCos is free software; you can redistribute it and/or modify it under |
## the terms of the GNU General Public License as published by the Free |
## Software Foundation; either version 2 or (at your option) any later version. |
## |
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
## WARRANTY; without even the implied warranty of MERCHANTABILITY or |
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
## for more details. |
## |
## You should have received a copy of the GNU General Public License along |
## with eCos; if not, write to the Free Software Foundation, Inc., |
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
## |
## As a special exception, if other files instantiate templates or use macros |
## or inline functions from this file, or you compile this file and link it |
## with other works to produce a work based on this file, this file does not |
## by itself cause the resulting work to be covered by the GNU General Public |
## License. However the source code for this file must still be made available |
## in accordance with section (3) of the GNU General Public License. |
## |
## This exception does not invalidate any other reasons why a work based on |
## this file might be covered by the GNU General Public License. |
## |
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
## at http://sources.redhat.com/ecos/ecos-license/ |
## ------------------------------------------- |
#####ECOSGPLCOPYRIGHTEND#### |
# ==================================================================== |
######DESCRIPTIONBEGIN#### |
# |
# Author(s): jskov |
# Original data: gthomas |
# Contributors: |
# Date: 1999-07-07 |
# |
#####DESCRIPTIONEND#### |
# |
# ==================================================================== |
|
|
cdl_package CYGPKG_IO_SERIAL_ARM_PID { |
display "ARM PID serial device drivers" |
|
parent CYGPKG_IO_SERIAL_DEVICES |
active_if CYGPKG_IO_SERIAL |
active_if CYGPKG_HAL_ARM_PID |
|
requires CYGPKG_ERROR |
include_dir cyg/io |
|
description " |
This option enables the serial device drivers for the |
ARM PID." |
|
# FIXME: This really belongs in the GENERIC_16X5X package |
cdl_interface CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED { |
display "Generic 16x5x serial driver required" |
} |
define_proc { |
puts $::cdl_header "#define CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP 4" |
} |
|
|
define_proc { |
puts $::cdl_system_header "/***** serial driver proc output start *****/" |
puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_INL <cyg/io/arm_arm7_pid_ser.inl>" |
puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_CFG <pkgconf/io_serial_arm_pid.h>" |
puts $::cdl_system_header "/***** serial driver proc output end *****/" |
} |
|
cdl_component CYGPKG_IO_SERIAL_ARM_PID_SERIAL0 { |
display "ARM PID serial port 0 driver" |
flavor bool |
default_value 1 |
|
implements CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED |
implements CYGINT_IO_SERIAL_FLOW_CONTROL_HW |
implements CYGINT_IO_SERIAL_LINE_STATUS_HW |
|
description " |
This option includes the serial device driver for the ARM |
PID port 0." |
|
cdl_option CYGDAT_IO_SERIAL_ARM_PID_SERIAL0_NAME { |
display "Device name for ARM PID serial port 0 driver" |
flavor data |
default_value {"\"/dev/ser0\""} |
description " |
This option specifies the name of the serial device |
for the ARM PID port 0." |
} |
|
cdl_option CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BAUD { |
display "Baud rate for the ARM PID serial port 0 driver" |
flavor data |
legal_values { 50 75 110 "134_5" 150 200 300 600 1200 1800 2400 |
3600 4800 7200 9600 14400 19200 38400 |
57600 115200 230400 } |
default_value 38400 |
description " |
This option specifies the default baud rate (speed) |
for the ARM PID port 0." |
} |
|
cdl_option CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BUFSIZE { |
display "Buffer size for the ARM PID serial port 0 driver" |
flavor data |
legal_values 0 to 8192 |
default_value 128 |
description " |
This option specifies the size of the internal buffers |
used for the ARM PID port 0." |
} |
} |
|
cdl_component CYGPKG_IO_SERIAL_ARM_PID_SERIAL1 { |
display "ARM PID serial port 1 driver" |
flavor bool |
default_value 1 |
|
implements CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED |
implements CYGINT_IO_SERIAL_FLOW_CONTROL_HW |
implements CYGINT_IO_SERIAL_LINE_STATUS_HW |
|
description " |
This option includes the serial device driver for the ARM |
PID port 1." |
|
cdl_option CYGDAT_IO_SERIAL_ARM_PID_SERIAL1_NAME { |
display "Device name for ARM PID serial port 1 driver" |
flavor data |
default_value {"\"/dev/ser1\""} |
description " |
This option specifies the name of the serial device |
for the ARM PID port 1." |
} |
|
cdl_option CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BAUD { |
display "Baud rate for the ARM PID serial port 1 driver" |
flavor data |
legal_values { 50 75 110 "134_5" 150 200 300 600 1200 1800 2400 |
3600 4800 7200 9600 14400 19200 38400 |
57600 115200 230400 } |
default_value 38400 |
description " |
This option specifies the default baud rate (speed) |
for the ARM PID port 1." |
} |
|
cdl_option CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BUFSIZE { |
display "Buffer size for the ARM PID serial port 1 driver" |
flavor data |
legal_values 0 to 8192 |
default_value 128 |
description " |
This option specifies the size of the internal |
buffers used for the ARM PID port 1." |
} |
} |
|
cdl_component CYGPKG_IO_SERIAL_ARM_PID_TESTING { |
display "Testing parameters" |
flavor bool |
calculated 1 |
active_if CYGPKG_IO_SERIAL_ARM_PID_SERIAL0 |
|
implements CYGINT_IO_SERIAL_TEST_SKIP_9600 |
implements CYGINT_IO_SERIAL_TEST_SKIP_115200 |
implements CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN |
|
cdl_option CYGPRI_SER_TEST_SER_DEV { |
display "Serial device used for testing" |
flavor data |
default_value { CYGDAT_IO_SERIAL_ARM_PID_SERIAL0_NAME } |
} |
|
define_proc { |
puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"armpid\"" |
puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV \"/dev/tty0\"" |
} |
} |
} |
|
# EOF ser_arm_pid.cdl |
/include/arm_arm7_pid_ser.inl
0,0 → 1,163
//========================================================================== |
// |
// io/serial/arm/arm_arm7_pid_ser.inl |
// |
// ARM PID Serial I/O definitions |
// |
//========================================================================== |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos is free software; you can redistribute it and/or modify it under |
// the terms of the GNU General Public License as published by the Free |
// Software Foundation; either version 2 or (at your option) any later version. |
// |
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
// WARRANTY; without even the implied warranty of MERCHANTABILITY or |
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
// for more details. |
// |
// You should have received a copy of the GNU General Public License along |
// with eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//========================================================================== |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): gthomas |
// Contributors: gthomas, jlarmour |
// Date: 1999-02-04 |
// Purpose: PID Serial I/O module (interrupt driven version) |
// Description: |
// |
//####DESCRIPTIONEND#### |
// |
//========================================================================== |
|
#include <cyg/hal/hal_intr.h> |
|
//----------------------------------------------------------------------------- |
// Baud rate specification |
|
static unsigned short select_baud[] = { |
0, // Unused |
0, // 50 |
0, // 75 |
1047, // 110 |
0, // 134.5 |
768, // 150 |
0, // 200 |
384, // 300 |
192, // 600 |
96, // 1200 |
24, // 1800 |
48, // 2400 |
0, // 3600 |
24, // 4800 |
16, // 7200 |
12, // 9600 |
8, // 14400 |
6, // 19200 |
3, // 38400 |
2, // 57600 |
1, // 115200 |
0, // 230400 |
}; |
|
#ifdef CYGPKG_IO_SERIAL_ARM_PID_SERIAL0 |
static pc_serial_info pid_serial_info0 = {0x0D800000, |
CYGNUM_HAL_INTERRUPT_SERIALA}; |
#if CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BUFSIZE > 0 |
static unsigned char pid_serial_out_buf0[CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BUFSIZE]; |
static unsigned char pid_serial_in_buf0[CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BUFSIZE]; |
|
static SERIAL_CHANNEL_USING_INTERRUPTS(pid_serial_channel0, |
pc_serial_funs, |
pid_serial_info0, |
CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BAUD), |
CYG_SERIAL_STOP_DEFAULT, |
CYG_SERIAL_PARITY_DEFAULT, |
CYG_SERIAL_WORD_LENGTH_DEFAULT, |
CYG_SERIAL_FLAGS_DEFAULT, |
&pid_serial_out_buf0[0], sizeof(pid_serial_out_buf0), |
&pid_serial_in_buf0[0], sizeof(pid_serial_in_buf0) |
); |
#else |
static SERIAL_CHANNEL(pid_serial_channel0, |
pc_serial_funs, |
pid_serial_info0, |
CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_PID_SERIAL0_BAUD), |
CYG_SERIAL_STOP_DEFAULT, |
CYG_SERIAL_PARITY_DEFAULT, |
CYG_SERIAL_WORD_LENGTH_DEFAULT, |
CYG_SERIAL_FLAGS_DEFAULT |
); |
#endif |
|
DEVTAB_ENTRY(pid_serial_io0, |
CYGDAT_IO_SERIAL_ARM_PID_SERIAL0_NAME, |
0, // Does not depend on a lower level interface |
&cyg_io_serial_devio, |
pc_serial_init, |
pc_serial_lookup, // Serial driver may need initializing |
&pid_serial_channel0 |
); |
#endif // CYGPKG_IO_SERIAL_ARM_PID_SERIAL0 |
|
#ifdef CYGPKG_IO_SERIAL_ARM_PID_SERIAL1 |
static pc_serial_info pid_serial_info1 = {0x0D800020, |
CYGNUM_HAL_INTERRUPT_SERIALB}; |
#if CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BUFSIZE > 0 |
static unsigned char pid_serial_out_buf1[CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BUFSIZE]; |
static unsigned char pid_serial_in_buf1[CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BUFSIZE]; |
|
static SERIAL_CHANNEL_USING_INTERRUPTS(pid_serial_channel1, |
pc_serial_funs, |
pid_serial_info1, |
CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BAUD), |
CYG_SERIAL_STOP_DEFAULT, |
CYG_SERIAL_PARITY_DEFAULT, |
CYG_SERIAL_WORD_LENGTH_DEFAULT, |
CYG_SERIAL_FLAGS_DEFAULT, |
&pid_serial_out_buf1[0], sizeof(pid_serial_out_buf1), |
&pid_serial_in_buf1[0], sizeof(pid_serial_in_buf1) |
); |
#else |
static SERIAL_CHANNEL(pid_serial_channel1, |
pc_serial_funs, |
pid_serial_info1, |
CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_PID_SERIAL1_BAUD), |
CYG_SERIAL_STOP_DEFAULT, |
CYG_SERIAL_PARITY_DEFAULT, |
CYG_SERIAL_WORD_LENGTH_DEFAULT, |
CYG_SERIAL_FLAGS_DEFAULT |
); |
#endif |
|
DEVTAB_ENTRY(pid_serial_io1, |
CYGDAT_IO_SERIAL_ARM_PID_SERIAL1_NAME, |
0, // Does not depend on a lower level interface |
&cyg_io_serial_devio, |
pc_serial_init, |
pc_serial_lookup, // Serial driver may need initializing |
&pid_serial_channel1 |
); |
#endif // CYGPKG_IO_SERIAL_ARM_PID_SERIAL1 |
|
// EOF arm_arm7_pid_ser.inl |
/ChangeLog
0,0 → 1,224
2003-02-24 Jonathan Larmour <jifl@eCosCentric.com> |
|
* cdl/ser_arm_pid.cdl: Remove irrelevant doc link. |
|
2001-09-10 Jonathan Larmour <jlarmour@redhat.com> |
|
* cdl/ser_arm_pid.cdl: |
Fix 234000->230400 typo. |
|
2000-09-18 Jesper Skov <jskov@redhat.com> |
|
* src/pid_serial.h: [removed] |
* src/pid_serial_with_ints.c: [removed] Moved driver to generic |
16x5x package. |
* include/arm_arm7_pid_ser.inl: [added] Make use of generic |
driver. |
* cdl/ser_arm_pid.cdl: Matching changes. |
|
* ChangeLog: Cleaned out non-pid entries. |
|
2000-08-24 Jonathan Larmour <jlarmour@redhat.co.uk> |
|
* src/pid_serial_with_ints.c (pid_serial_DSR): Remove accidental |
OVERRUNERR check duplication |
|
2000-08-01 Jonathan Larmour <jlarmour@redhat.co.uk> |
|
* src/pid_serial_with_ints.c: Throughout, add support for line status |
and modem status callbacks, hardware RTS/CTS and DSR/DTR flow control |
(pid_serial_set_config): Now use keys to make |
more flexible. |
|
* src/pid_serial.h: Add more line status, interrupt status and modem |
status register definitions |
|
* cdl/ser_arm_pid.cdl: Implements flow control and line status |
interfaces |
|
2000-06-22 Hugo Tyson <hmt@cygnus.co.uk> |
|
* cdl/<yournamehere>.cdl: Remove the comment on the empty |
include_files directive; the tools now support this correctly. |
This keeps internal include files internal. |
|
2000-06-09 Jesper Skov <jskov@redhat.com> |
|
* src/pid_serial_with_ints.c: |
* src/pid_serial.h: |
Cleaned up defines and made DSR handle all received characters. |
(Dave Airlie (airlied at parthus dot com)) |
|
2000-04-11 Hugo Tyson <hmt@cygnus.co.uk> |
|
* cdl/ser_arm_pid.cdl: Change the parent from CYGPKG_IO_SERIAL |
(which is enabled most of the time) to CYGPKG_IO_SERIAL_DEVICES |
(which is not...) thus allowing convenient control independent of |
platform. Also enable all individual devices by default, now, so |
that they can be enabled simply by enabling the above new parent. |
|
2000-04-07 Hugo Tyson <hmt@cygnus.co.uk> |
|
* ecos.db: Re-organize device packages. This is a massive change |
involving deleting all the sources for serial and ethernet drivers |
from where they used to live in |
packages/io/serial/current/src/ARCH/PLATFORM.[ch] |
packages/net/drivers/eth/PLATFORM/current/src/... |
and reinstating them in |
packages/devs/serial/ARCH/PLATFORM/current/src/... |
packages/devs/eth/ARCH/PLATFORM/current/src/... |
|
All these new packages are properly defined in ecos.db, and are |
all of type "hardware" so that a "target" can grab them. |
|
This directory layout is descriptive of the devices we have right |
now, arch and platform are separate levels just to make it easier |
to navigate in the filesystem and similar to the HAL structure in |
the filesystem. |
|
It is *not* prescriptive of future work; for example, the mythical |
common highly-portable 16550 serial driver which works on many |
targets would be called "devs/serial/s16550/current", or a serial |
device for a particular board (cogent springs to mind) that can |
work with different CPUs fitted is "devs/serial/cogent/current". |
|
Changelogs have been preserved and replicated over all the new |
packages, so that no history is lost. |
|
The contents of individual source files are unchanged; they build |
in just the same emvironment except for a very few cases where the |
config file name changed in this movement. |
|
Targets in ecos.db have been redefined to bring in all relevant |
hardware packages including net and serial drivers (but the newly |
included packages are only active if their desired parent is |
available.) |
|
The names of CDL options (and their #defines of course) stay the |
same for the serial drivers, for backward compatibility. |
|
* templates/*/current.ect: these have had CYGPKG_IO_SERIAL added |
rather than it being in (almost) all target definitions. |
|
2000-01-03 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Fix namespace pollution - |
serial_devio => cyg_io_serial_devio |
|
1999-12-06 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c (pid_serial_DSR): Add loop to handle |
case where an interrupt represents multiple events. |
|
1999-10-26 Jesper Skov <jskov@cygnus.co.uk> |
|
* src/arm/pid_serial.h: Added BE support. |
|
1999-10-25 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial.h (ISR_RxTO): Define - character received but |
not handled "promptly". |
|
* src/arm/pid_serial_with_ints.c (pid_serial_DSR): Handle rcv |
interrupts properly (can't ignore them even with TO bit set). |
|
1999-06-20 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Use #include to get 'diag_printf()' |
prototypes. |
|
1999-05-14 Jesper Skov <jskov@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: |
* src/arm/pid_serial.h: |
Check for receive interrupt before reading. |
|
1999-04-20 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Fix default baud rate if unbuffered. |
|
1999-03-25 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: |
Update CDL to follow naming conventions. |
|
* src/arm/pid_serial_with_ints.c (pid_serial_config_port): Change |
so that the physical port is not modified unless the provided |
configuration is valid. |
|
* src/arm/pid_serial_with_ints.c: |
Add configury for baud rate and buffer size. |
|
1999-03-24 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c (pid_serial_stop_xmit): Fix typo |
in comment. |
|
1999-03-22 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Use CDL configured device names. |
|
1999-03-19 Jesper Skov <jskov@lassi.cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: |
Moved include statement to avoid warnings. |
|
1999-03-18 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: |
Update device names to match CDL. |
|
1999-03-17 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Conditionalize based on CDL. |
|
1999-03-15 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Add 'CYGDBG_IO_INIT' for control |
of init messages. |
|
* src/arm/pid_serial_with_ints.c: Don't include <cyg/kernel/kapi.h> |
|
1999-03-05 Gary Thomas <gthomas@cygnus.co.uk> |
|
* src/arm/pid_serial_with_ints.c: Fix interrupt vectors. |
|
1999-03-03 Gary Thomas <gthomas@cygnus.co.uk> |
|
* serial/current/src/arm/pid_serial_with_ints.c: |
New [somewhat] configurable drivers for PID. |
|
//=========================================================================== |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos is free software; you can redistribute it and/or modify it under |
// the terms of the GNU General Public License as published by the Free |
// Software Foundation; either version 2 or (at your option) any later version. |
// |
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
// WARRANTY; without even the implied warranty of MERCHANTABILITY or |
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
// for more details. |
// |
// You should have received a copy of the GNU General Public License along |
// with eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//=========================================================================== |