equal
deleted
inserted
replaced
51 int __init ec_init_module(void); |
51 int __init ec_init_module(void); |
52 void __exit ec_cleanup_module(void); |
52 void __exit ec_cleanup_module(void); |
53 |
53 |
54 /*****************************************************************************/ |
54 /*****************************************************************************/ |
55 |
55 |
56 /** |
|
57 Compile version info. |
|
58 */ |
|
59 |
|
60 #define COMPILE_INFO EC_STR(EC_MASTER_VERSION_MAIN) \ |
|
61 "." EC_STR(EC_MASTER_VERSION_SUB) \ |
|
62 " (" EC_MASTER_VERSION_EXTRA ")" \ |
|
63 " - rev. " EC_STR(SVNREV) \ |
|
64 ", compiled by " EC_STR(USER) \ |
|
65 " at " __DATE__ " " __TIME__ |
|
66 |
|
67 /*****************************************************************************/ |
|
68 |
|
69 static int ec_master_count = 1; /**< parameter value, number of masters */ |
56 static int ec_master_count = 1; /**< parameter value, number of masters */ |
70 static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */ |
57 static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */ |
71 static struct list_head ec_masters; /**< list of masters */ |
58 static struct list_head ec_masters; /**< list of masters */ |
72 |
59 |
73 /*****************************************************************************/ |
60 /*****************************************************************************/ |
78 module_param(ec_eoeif_count, int, S_IRUGO); |
65 module_param(ec_eoeif_count, int, S_IRUGO); |
79 |
66 |
80 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
67 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
81 MODULE_DESCRIPTION("EtherCAT master driver module"); |
68 MODULE_DESCRIPTION("EtherCAT master driver module"); |
82 MODULE_LICENSE("GPL"); |
69 MODULE_LICENSE("GPL"); |
83 MODULE_VERSION(COMPILE_INFO); |
70 MODULE_VERSION(EC_COMPILE_INFO); |
84 MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize"); |
71 MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize"); |
85 MODULE_PARM_DESC(ec_eoeif_count, "number of EoE interfaces per master"); |
72 MODULE_PARM_DESC(ec_eoeif_count, "number of EoE interfaces per master"); |
86 |
73 |
87 /** \endcond */ |
74 /** \endcond */ |
88 |
75 |
97 int __init ec_init_module(void) |
84 int __init ec_init_module(void) |
98 { |
85 { |
99 unsigned int i; |
86 unsigned int i; |
100 ec_master_t *master, *next; |
87 ec_master_t *master, *next; |
101 |
88 |
102 EC_INFO("Master driver, %s\n", COMPILE_INFO); |
89 EC_INFO("Master driver, %s\n", EC_COMPILE_INFO); |
103 |
90 |
104 if (ec_master_count < 1) { |
91 if (ec_master_count < 1) { |
105 EC_ERR("Error - Invalid ec_master_count: %i\n", ec_master_count); |
92 EC_ERR("Error - Invalid ec_master_count: %i\n", ec_master_count); |
106 goto out_return; |
93 goto out_return; |
107 } |
94 } |