Merged Komax changes.

This commit is contained in:
Florian Pose
2010-01-08 11:26:07 +01:00
10 changed files with 1382 additions and 325 deletions
+42
View File
@@ -32,6 +32,48 @@ devices/e1000/Kbuild
devices/e1000/Makefile
devices/e1000/Makefile.in
devices/modules.order
documentation/ethercat_doc.aux
documentation/ethercat_doc.idx
documentation/ethercat_doc.lof
documentation/ethercat_doc.log
documentation/ethercat_doc.lot
documentation/ethercat_doc.nlo
documentation/ethercat_doc.out
documentation/ethercat_doc.pdf
documentation/ethercat_doc.toc
documentation/external
documentation/graphs/fsm_change.pdf
documentation/graphs/fsm_change.ps
documentation/graphs/fsm_eoe.pdf
documentation/graphs/fsm_eoe.ps
documentation/graphs/fsm_master.pdf
documentation/graphs/fsm_master.ps
documentation/graphs/fsm_pdo_conf.pdf
documentation/graphs/fsm_pdo_conf.ps
documentation/graphs/fsm_pdo_entry_conf.pdf
documentation/graphs/fsm_pdo_entry_conf.ps
documentation/graphs/fsm_pdo_entry_read.pdf
documentation/graphs/fsm_pdo_entry_read.ps
documentation/graphs/fsm_pdo_read.pdf
documentation/graphs/fsm_pdo_read.ps
documentation/graphs/fsm_sii.pdf
documentation/graphs/fsm_sii.ps
documentation/graphs/fsm_slave_conf.pdf
documentation/graphs/fsm_slave_conf.ps
documentation/graphs/fsm_slave_scan.pdf
documentation/graphs/fsm_slave_scan.ps
documentation/images/app-config.pdf
documentation/images/architecture.pdf
documentation/images/attach.pdf
documentation/images/dc.pdf
documentation/images/fmmus.pdf
documentation/images/fsm-coedown.pdf
documentation/images/fsm-eoe.pdf
documentation/images/interrupt.pdf
documentation/images/master-locks.pdf
documentation/images/masters.pdf
documentation/images/phases.pdf
documentation/images/statetrans.pdf
examples/Kbuild
examples/Makefile
examples/Makefile.in
+8 -5
View File
@@ -14,13 +14,16 @@ General Features:
- Runs as kernel module for Linux 2.6.
- Multiple masters possible on one machine.
* EtherCAT-capable versions of standard Linux drivers for wide-spread
Ethernet devices.
- Interrupt-less operation of Ethernet devices.
- Easy implementation of additional Ethernet drivers through common device
interface.
* Native EtherCAT-capable versions of standard Linux drivers for wide-spread
Ethernet devices, as well as a generic driver for all chips supported by the
Linux kernel.
- Interrupt-less operation of Ethernet devices when using native drivers.
- Easy implementation of additional native Ethernet drivers through common
device interface.
- Operation possible with any device supported by the standard drivers,
including PCMCIA devices.
- For any other hardware, the generic driver can be used. It uses the lower
layers of the Linux network stack.
* Supports any realtime environment through independent architecture.
- RTAI, Xenomai, RT-Preempt, etc.
File diff suppressed because it is too large Load Diff
-1
View File
@@ -6,7 +6,6 @@
FIGS := \
app-config.fig \
architecture.fig \
attach.fig \
dc.fig \
fmmus.fig \
-176
View File
@@ -1,176 +0,0 @@
#FIG 3.2
Portrait
Center
Metric
A4
100.00
Single
-2
1200 2
5 1 0 1 0 7 50 -1 -1 0.000 0 0 0 0 7245.000 5985.000 6975 5985 7245 5715 7515 5985
6 5085 7965 5850 8820
2 3 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 8
5175 7965 5760 7965 5760 8775 5175 8775 5175 8415 5085 8415
5085 7965 5175 7965
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
5490 8190 5670 8190 5670 8370 5490 8370 5490 8190
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
5310 8505 5400 8505 5400 8595 5310 8595 5310 8505
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8055 5085 8055
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8145 5085 8145
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8190 5085 8190
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8280 5085 8280
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8235 5085 8235
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8100 5085 8100
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8010 5085 8010
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8325 5085 8325
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5175 8370 5085 8370
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
5850 8775 5085 8775 5085 8815 5850 8815 5850 8775
-6
6 6435 7965 7200 8820
2 3 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 8
6525 7965 7110 7965 7110 8775 6525 8775 6525 8415 6435 8415
6435 7965 6525 7965
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
6840 8190 7020 8190 7020 8370 6840 8370 6840 8190
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
6660 8505 6750 8505 6750 8595 6660 8595 6660 8505
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8055 6435 8055
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8145 6435 8145
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8190 6435 8190
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8280 6435 8280
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8235 6435 8235
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8100 6435 8100
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8010 6435 8010
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8325 6435 8325
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
6525 8370 6435 8370
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
7200 8775 6435 8775 6435 8815 7200 8815 7200 8775
-6
6 4905 5445 5985 6030
5 1 0 1 0 7 50 -1 -1 0.000 0 0 0 0 5445.000 5985.000 4950 5985 5445 5490 5940 5985
4 1 0 50 -1 16 10 0.0000 4 120 465 5445 5760 Device\001
4 1 0 50 -1 16 10 0.0000 4 120 615 5445 5925 Interface\001
-6
6 3870 4275 4500 5355
5 1 0 1 0 7 50 -1 20 0.000 0 0 0 0 3958.125 4815.000 3915 4320 4455 4815 3915 5310
4 1 0 49 -1 16 10 4.7124 4 150 765 4162 4822 Application\001
4 1 0 49 -1 16 10 4.7124 4 120 615 3997 4822 Interface\001
-6
6 5205 2648 6480 3293
5 1 0 1 0 7 50 -1 -1 0.000 0 0 0 0 5842.000 2655.000 6472 2655 5842 3285 5212 2655
4 1 0 50 -1 16 12 0.0000 4 135 600 5842 3105 Device\001
4 1 0 50 -1 16 12 0.0000 4 135 825 5842 2880 Character\001
-6
6 3870 945 4500 2025
5 1 0 1 0 7 49 -1 -1 0.000 0 0 0 0 3958.125 1485.000 3915 990 4455 1485 3915 1980
4 1 0 48 -1 16 10 4.7124 4 150 765 4162 1492 Application\001
4 1 0 48 -1 16 10 4.7124 4 120 615 3997 1492 Interface\001
-6
6 2160 855 3420 2115
1 3 0 1 0 7 50 -1 20 0.000 1 0.0000 2790 1485 585 585 2790 1485 3375 1485
4 1 0 49 -1 16 12 0.0000 4 180 945 2790 1665 Application\001
4 1 0 49 -1 16 12 0.0000 4 180 885 2790 1440 Userspace\001
-6
1 4 0 1 0 7 50 -1 -1 0.000 1 0.0000 2484 4871 459 459 2025 4860 2944 4882
1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 5445 4815 810 495 4635 4320 6255 5310
1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 7058 1658 495 495 7553 2153 6563 1163
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5445 7965 5445 7425
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
6795 7965 6795 7425
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5445 6885 5445 5985
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
5535 8820 5625 8820 5625 8910 5535 8910 5535 8820
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6885 8820 6975 8820 6975 8910 6885 8910 6885 8820
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
7245 6885 7245 5985
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
7605 7605 7605 6345 4635 6345 4635 7605 7605 7605
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
4905 6885 5985 6885 5985 7425 4905 7425 4905 6885
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6255 6885 7335 6885 7335 7425 6255 7425 6255 6885
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5445 5490 5445 5310
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4635 4815 4455 4815
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3915 4815 3465 4815
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
7605 3645 6885 3645 6885 5985 7605 5985 7605 3645
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
1575 7785 7785 7785
2 4 0 1 0 7 50 -1 -1 0.000 0 0 9 0 0 5
1755 5985 1755 3645 3465 3645 3465 5985 1755 5985
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
7785 8280 7785 2205
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
1575 8280 1575 2205
2 4 0 1 0 7 50 -1 -1 0.000 0 0 8 0 0 5
6435 5985 6435 3645 3915 3645 3915 5985 6435 5985
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
7785 2655 1575 2655
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
5850 3285 5850 3645
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3915 1485 3375 1485
2 4 0 1 0 7 50 -1 20 0.000 0 0 7 0 0 5
5040 2250 3915 2250 3915 720 5040 720 5040 2250
3 2 0 1 0 7 50 -1 -1 0.000 0 0 0 3
5580 8910 5355 9045 4770 9090
0.000 -1.000 0.000
3 2 0 1 0 7 50 -1 -1 0.000 0 0 0 3
6931 8910 6390 9270 4770 9450
0.000 -1.000 0.000
3 2 0 1 0 7 50 -1 -1 0.000 0 0 0 3
6570 1665 6120 1890 5985 2655
0.000 -1.000 0.000
3 2 0 1 0 7 50 -1 -1 0.000 0 0 0 3
5040 1485 5580 1800 5715 2655
0.000 -1.000 0.000
4 1 0 50 -1 16 10 0.0000 4 150 750 5445 7200 net_device\001
4 1 0 50 -1 16 10 0.0000 4 150 750 6795 7200 net_device\001
4 2 0 50 -1 12 10 0.0000 4 105 810 5355 6210 ecdev_*()\001
4 1 0 50 -1 16 12 0.0000 4 135 1545 6345 6570 EtherCAT Network\001
4 1 0 50 -1 16 12 0.0000 4 135 1200 6345 6750 Driver Module\001
4 0 0 50 -1 16 12 0.0000 4 135 2130 4005 3870 EtherCAT Master Module\001
4 1 0 50 -1 16 12 1.5708 4 135 1200 7290 4815 Network Stack\001
4 2 0 50 -1 16 12 0.0000 4 135 810 4725 9135 EtherCAT\001
4 2 0 50 -1 16 12 0.0000 4 135 690 4725 9495 Ethernet\001
4 2 0 50 -1 16 12 0.0000 4 135 315 4995 8100 NIC\001
4 2 0 50 -1 16 12 0.0000 4 135 315 6345 8100 NIC\001
4 0 0 50 -1 16 12 0.0000 4 135 810 1665 8010 Hardware\001
4 2 0 50 -1 12 10 4.7124 4 105 720 3645 4725 ecrt_*()\001
4 0 0 50 -1 16 12 0.0000 4 180 945 1845 3870 Application\001
4 0 0 50 -1 16 12 0.0000 4 135 630 1845 4095 Module\001
4 1 0 50 -1 16 12 0.0000 4 135 390 2475 4950 Task\001
4 0 0 50 -1 16 12 0.0000 4 180 1050 1665 2880 Kernelspace\001
4 0 0 50 -1 16 12 0.0000 4 180 885 1665 2565 Userspace\001
4 1 0 50 -1 16 12 4.7124 4 135 870 4635 1530 libethercat\001
4 2 0 50 -1 12 10 4.7124 4 105 720 3645 1395 ecrt_*()\001
4 2 0 50 -1 12 10 0.0000 4 105 810 7155 6210 netif_*()\001
4 1 0 50 -1 16 12 0.0000 4 135 735 5445 4905 Master 0\001
4 1 0 50 -1 16 12 0.0000 4 135 360 7065 1845 Tool\001
4 1 0 50 -1 16 12 0.0000 4 135 765 7065 1620 'ethercat'\001
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 44 KiB

+2 -6
View File
@@ -208,8 +208,6 @@ typedef struct {
/*****************************************************************************/
#ifndef __KERNEL__
/** Master information.
*
* This is used as an output parameter of ecrt_master().
@@ -246,8 +244,6 @@ typedef struct {
char name[EC_MAX_STRING_LENGTH]; /**< Name of the slave. */
} ec_slave_info_t;
#endif // #ifndef __KERNEL__
/*****************************************************************************/
/** Domain working counter interpretation.
@@ -539,8 +535,6 @@ ec_slave_config_t *ecrt_master_slave_config(
uint32_t product_code /**< Expected product code. */
);
#ifndef __KERNEL__
/** Obtains master information.
*
* No memory is allocated on the heap in
@@ -573,6 +567,8 @@ int ecrt_master_get_slave(
information */
);
#ifndef __KERNEL__
/** Returns the proposed configuration of a slave's sync manager.
*
* Fills a given ec_sync_info_t structure with the attributes of a sync
+1 -1
View File
@@ -156,7 +156,7 @@ int ecrt_master_get_slave(ec_master_t *master, uint16_t slave_position,
slave_info->error_flag = data.error_flag;
slave_info->sync_count = data.sync_count;
slave_info->sdo_count = data.sdo_count;
strncpy(slave_info->name, data.name, EC_IOCTL_STRING_SIZE);
strncpy(slave_info->name, data.name, EC_MAX_STRING_LENGTH);
return 0;
}
+52
View File
@@ -2138,6 +2138,56 @@ ec_slave_config_t *ecrt_master_slave_config(ec_master_t *master,
/*****************************************************************************/
int ecrt_master(ec_master_t *master, ec_master_info_t *master_info)
{
if (master->debug_level)
EC_DBG("ecrt_master(master = 0x%p, master_info = 0x%p)\n",
master, master_info);
master_info->slave_count = master->slave_count;
master_info->link_up = master->main_device.link_state;
master_info->scan_busy = master->scan_busy;
master_info->app_time = master->app_time;
return 0;
}
/*****************************************************************************/
int ecrt_master_get_slave(ec_master_t *master, uint16_t slave_position,
ec_slave_info_t *slave_info)
{
const ec_slave_t *slave;
if (down_interruptible(&master->master_sem)) {
return -EINTR;
}
slave = ec_master_find_slave_const(master, 0, slave_position);
slave_info->position = slave->ring_position;
slave_info->vendor_id = slave->sii.vendor_id;
slave_info->product_code = slave->sii.product_code;
slave_info->revision_number = slave->sii.revision_number;
slave_info->serial_number = slave->sii.serial_number;
slave_info->alias = slave->sii.alias;
slave_info->current_on_ebus = slave->sii.current_on_ebus;
slave_info->al_state = slave->current_state;
slave_info->error_flag = slave->error_flag;
slave_info->sync_count = slave->sii.sync_count;
slave_info->sdo_count = ec_slave_sdo_count(slave);
if (slave->sii.name) {
strncpy(slave_info->name, slave->sii.name, EC_MAX_STRING_LENGTH);
} else {
slave_info->name[0] = 0;
}
up(&master->master_sem);
return 0;
}
/*****************************************************************************/
void ecrt_master_callbacks(ec_master_t *master,
void (*send_cb)(void *), void (*receive_cb)(void *), void *cb_data)
{
@@ -2218,6 +2268,8 @@ EXPORT_SYMBOL(ecrt_master_send);
EXPORT_SYMBOL(ecrt_master_send_ext);
EXPORT_SYMBOL(ecrt_master_receive);
EXPORT_SYMBOL(ecrt_master_callbacks);
EXPORT_SYMBOL(ecrt_master);
EXPORT_SYMBOL(ecrt_master_get_slave);
EXPORT_SYMBOL(ecrt_master_slave_config);
EXPORT_SYMBOL(ecrt_master_state);
EXPORT_SYMBOL(ecrt_master_application_time);
+19
View File
@@ -40,6 +40,7 @@
#include <linux/tty_flip.h>
#include <linux/termios.h>
#include <linux/timer.h>
#include <linux/version.h>
#include "../master/globals.h"
#include "../include/ectty.h"
@@ -379,7 +380,11 @@ static int ec_tty_write(
/*****************************************************************************/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
static int ec_tty_put_char(struct tty_struct *tty, unsigned char ch)
#else
static void ec_tty_put_char(struct tty_struct *tty, unsigned char ch)
#endif
{
ec_tty_t *t = (ec_tty_t *) tty->driver_data;
@@ -390,8 +395,14 @@ static void ec_tty_put_char(struct tty_struct *tty, unsigned char ch)
if (ec_tty_tx_space(t)) {
t->tx_buffer[t->tx_write_idx] = ch;
t->tx_write_idx = (t->tx_write_idx + 1) % EC_TTY_TX_BUFFER_SIZE;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
return 1;
#endif
} else {
printk(KERN_WARNING PFX "%s(): Dropped a byte!\n", __func__);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
return 0;
#endif
}
}
@@ -506,11 +517,19 @@ static void ec_tty_hangup(struct tty_struct *tty)
/*****************************************************************************/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
static int ec_tty_break(struct tty_struct *tty, int break_state)
#else
static void ec_tty_break(struct tty_struct *tty, int break_state)
#endif
{
#if EC_TTY_DEBUG >= 2
printk(KERN_INFO PFX "%s(break_state = %i).\n", __func__, break_state);
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
return -EIO; // not implemented
#endif
}
/*****************************************************************************/