NAME | SYNOPSIS | FEATURES | DESCRIPTION | RESTRICTIONS | SEE ALSO
drv/src/uart/z8530/z8530.h - z85x30 hardware related constants drv/src/uart/z8530/z8530.c - driver code drv/src/uart/z8530/z8530PROP.h - driver specific properties
DRV
The z85x30 duart driver implements the uart device driver interface. The driver works on duart device which is software compatible with the z85x30 chip.
The driver uses the common bus driver interface provided by a parent bus driver. Thus, the driver may be applied to any bus providing such an interface.
The z85x30 driver does not provide the drv_probe() routine. In other words, the z85x30 driver does not enumerate the bus, nor does it detect a z85x30 device or create an associated device node. When the z85x30 driver is used, associated device nodes should be created either statically by a boot program or dynamically by a separate bus enumerator driver. Such an enumerator driver could be developed for this particular bus architecture.
The driver does not provide the drv_bind() routine. In other words, the driver does not support dynamic driver-to-device binding. When the z85x30 driver is used, the driver should be explicitly bound to the device using the PROP_DRIVER property. It is assumed that the device-to-driver binding is done either by a device node creator or by a separate binder driver. Such a driver-to-device binder could be developed for this particular bus architecture
The driver provides the drv_unload() entry and supports driver component unloading. This allows the driver component to be unloaded if it is no longer being used and if it has been dynamically loaded at run time.
Because the z85x30 controller provides two serial interfaces (channel A and B), the z85x30 device node creator should specify channels supported by the driver instance. The supported channels are specified as child device nodes (with respect to the parent z85x30 node) with predefined names. The node names are shown in the Table below:
Table 1
child node name |
alias |
description |
"a" |
Z8530_CHAN_A_NAME |
z85x30 channel A supported |
"b" |
Z8530_CHAN_B_NAME |
z85x30 channel B supported |
The driver instance will support a channel if, and only if, a corresponding channel (child) node is attached to the z85x30 device node.
The driver implements the drv_unload() entry which allows the unloading of the driver component when it is dynamically loaded at run time.
The driver supports all bus events specified by the common bus driver interface. As a consequence, the driver may be used with a hot-pluggable bus (for example, PCMCIA).
The Table below summarizes characteristics of the z85x30 duart driver.
driver name: | "sun:bus-z85x30--uart"" |
---|---|
hardware: | z85x30 compatible DUART chip |
exported interface: | "uart" (UART_CLASS) |
exported interface version: | 0 (UART_VERSION_INITIAL) |
imported parent interface: | "bus" (BUS_CLASS) |
minimal parent interface version: | 0 (BUS_VERSION_INITIAL) |
device probing (auto-detection): | not supported |
driver unloading: | supported |
system (emergency) shut-down: | supported |
normal device shut-down: | supported |
hot-plug (surprise) device removal: | supported |
The table below lists device node properties used by the z85x30 driver. Note that the column "m/o" specifies whether a given property is mandatory or optional. For optional properties, the column "default value" shows a default value which is used by the driver when a given property is not specified.
Name | Alias | Type | m/o | Default value |
---|---|---|---|---|
"io-regs" | BUS_PROP_IO_REGS | <bus class specific> | m | |
"intr" | BUS_PROP_INTR | <bus class specific> | m | |
"clock-freq" | PROP_CLOCK_FREQ | PropClockFreq | o | 10000000 |
The BUS_PROP_IO_REGS property specifies the z85x30 I/O registers range. The property value is bus class specific.
The BUS_PROP_INTR property specifies the z85x30 interrupt source. The property value is bus class specific.
The PROP_CLOCK_FREQ property specifies the input clock frequency in Hz. By default, the input clock frequency is 10 MHz. Note that, programming the time constant for a given baud rate, the driver assumes the 16x clock factor. The formula relating the baud rate to the time constant is shown below.
<time-constant> = ((<clock-freq>/16) + (baud-rate>)/(<baud-rate>*2))
Only a subset of modem signals is supported by the z85x30 controller. The current version of the z85x30 driver supports only modem signals provided by the z85x30 chip:
RTS (request to send)
CTS (clear to send)
CD (carrier detect)
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RESTRICTIONS | SEE ALSO