master/master.h
changeset 647 dc556a8c8fed
parent 646 fbbd4e54e031
child 656 370aa8c2d1b1
equal deleted inserted replaced
646:fbbd4e54e031 647:dc556a8c8fed
    43 
    43 
    44 #include <linux/list.h>
    44 #include <linux/list.h>
    45 #include <linux/sysfs.h>
    45 #include <linux/sysfs.h>
    46 #include <linux/timer.h>
    46 #include <linux/timer.h>
    47 #include <linux/wait.h>
    47 #include <linux/wait.h>
    48 #include <asm/atomic.h>
       
    49 #include <asm/semaphore.h>
    48 #include <asm/semaphore.h>
    50 
    49 
    51 #include "device.h"
    50 #include "device.h"
    52 #include "domain.h"
    51 #include "domain.h"
    53 #include "fsm_master.h"
    52 #include "fsm_master.h"
    91    Manages slaves, domains and IO.
    90    Manages slaves, domains and IO.
    92 */
    91 */
    93 
    92 
    94 struct ec_master
    93 struct ec_master
    95 {
    94 {
    96     atomic_t available; /**< zero, if the master is reserved for RT */
    95     struct kobject kobj; /**< kobject */
    97     unsigned int index; /**< master index */
    96     unsigned int index; /**< master index */
    98 
    97     unsigned int reserved; /**< non-zero, if the master is reserved for RT */
    99     struct kobject kobj; /**< kobject */
       
   100 
    98 
   101     ec_device_t main_device; /**< EtherCAT device */
    99     ec_device_t main_device; /**< EtherCAT device */
   102     const uint8_t *main_mac; /**< MAC address of main device */
   100     const uint8_t *main_mac; /**< MAC address of main device */
   103     ec_device_t backup_device; /**< EtherCAT backup device */
   101     ec_device_t backup_device; /**< EtherCAT backup device */
   104     const uint8_t *backup_mac; /**< MAC address of backup device */
   102     const uint8_t *backup_mac; /**< MAC address of backup device */