Eurotech COM-1270

From EnneEnneWiki

Jump to: navigation, search
Eurotech's COM-1270


Contents


This driver implements the serial support for Linux 2.6.x of the Eurotech COM-1270. This board is equipped with 8 serial lines.

The driver should support at most 4 boards (32 serial lines) and it has been tested on a Linux 2.6.19.

This manual will show how to compile the driver and how to use it in normal operations or in test stages.

References

The board's main references are at Eurotech's site.

The stable driver's source code is available on my gitweb as unofficial site or at Eurotech's site. An older, obsolete and deprecated version is at EnneEnne's projects site.

To download the code you need the GIT tools and then using the following command:

giometti@zaigor:~$ git clone git://git.enneenne.com/com1270_ser

after the clone is finished into directory com1270_ser you can find the code.

Compilation

To compile the driver simply give the command:

giometti@jeeg:~/com1270_ser$ make

If you have a special kernel configuration or you have trouble into compilation stage please take a look at the Makefile and check the following configuration varibales:

  • TTY_MAJOR

Define the TTY devices' major number.

Default: 30

  • EEPROM

If you don't need the auto configuration support provided by the com1270.o module you should set this variable to n (or leave it undefined). Set it to y elsewhere.

Default: y

  • IO_PORTS

Define the base IO ports for each device (use the C language syntax to specify vectors)

Default: "{ 0x110, 0x150, 0x1a0, 0x1e0 }"

  • DEBUG

Set to y if you want to enable the debug mode. Don't use this beaviour for normal operation.

Default: n

  • PROCFS

Set to y if you want to enable the procfs support.

Default: y

  • KERNELDIR

Set this variable to point to the directory where your (already configured) kernel source code is. For instance use:

giometti@jeeg:~/com1270_ser$ make KERNELDIR=/usr/src/linux-2.6.19/

Default: /lib/modules/$(shell uname -r)/build/


Installation

After compilation stage you'll end up with a file called com1270_ser.ko and then you can use the script load to load automatically the driver into the system:

giometti@jeeg:~/com1270_ser$ ./load


FAQ

Compiling

Q1.1)

How I can compile the driver for my Fedora Core 3?

A1.1)

Fedora Core 3 doesn't install the kernel source files by default so you need download them from Fedora's site. Package is named as kernel-2.6.9-1.667.src.rpm.

Then install the kernel source with the commands:

[techsupp@eurotech ~] rpm -ivh kernel-2.6.9-1.667.src.rpm
[techsupp@eurotech ~] rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

After that you should get kernel source files into directory /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/.

Now you can compile the driver using command:

[techsupp@eurotech com1270-current/] make KERNELDIR=/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/

Misfunctioning

Q2.1)

I compiled the driver and loeded it.

Using dmesg I can see several messages from the driver and everything seems ok, but using the testing utility or another program I cannot get data from the serial ports!

A2.1)

Verify that the interrupt line used by the COM-1270 is not assigned to the PCI system or shared with another device. In such cases you should remap the interrupt line in order to have an unique usage by the COM-1270 and that the interrupt line is assigned to the ISA bus.

Q2.2)

When I load the module I get:

com1270_ser: trying port 110:
com1270_ser:   none
com1270_ser: trying port 150:
com1270_ser:   none
com1270_ser: trying port 1a8:
com1270_ser:   none
com1270_ser: trying port 1e8:
com1270_ser:   none
com1270_ser: no devices found
insmod: error inserting './com1270_ser.ko': -1 No such device

Which could be the problem?

A2.2)

Looking at driver messages it seems the board is not recognized. A possible cause may be that the used hardware is not properly initialized. On some Eurotech's CPU boards (as CPU-145X) with a PCI to ISA bridge this one needs to be properly initialized in order to open the ISA resources needed (please, refere to the CPU's Application Note provided with your CPU board).

Personal tools
Google AdSense