master/fsm_master.c
changeset 792 3778920f61e4
parent 758 8fa6f825eb7d
child 794 684dea874956
equal deleted inserted replaced
791:3b81d074735c 792:3778920f61e4
   203     // bus topology change?
   203     // bus topology change?
   204     if (datagram->working_counter != fsm->slaves_responding) {
   204     if (datagram->working_counter != fsm->slaves_responding) {
   205         fsm->topology_change_pending = 1;
   205         fsm->topology_change_pending = 1;
   206         fsm->slaves_responding = datagram->working_counter;
   206         fsm->slaves_responding = datagram->working_counter;
   207 
   207 
   208         EC_INFO("%i slave%s responding.\n",
   208         EC_INFO("%u slave%s responding.\n",
   209                 fsm->slaves_responding,
   209                 fsm->slaves_responding,
   210                 fsm->slaves_responding == 1 ? "" : "s");
   210                 fsm->slaves_responding == 1 ? "" : "s");
   211 
   211 
   212         if (master->mode == EC_MASTER_MODE_OPERATION) {
   212         if (master->mode == EC_MASTER_MODE_OPERATION) {
   213             if (fsm->slaves_responding == master->slave_count) {
   213             if (fsm->slaves_responding == master->slave_count) {
   481     ec_slave_t *slave;
   481     ec_slave_t *slave;
   482 
   482 
   483     down(&master->config_sem);
   483     down(&master->config_sem);
   484     if (!master->allow_config) {
   484     if (!master->allow_config) {
   485         up(&master->config_sem);
   485         up(&master->config_sem);
   486     }
   486     } else {
   487     else {
       
   488         master->config_state = EC_REQUEST_IN_PROGRESS;
   487         master->config_state = EC_REQUEST_IN_PROGRESS;
   489         fsm->config_error = 0;
   488         fsm->config_error = 0;
   490         up(&master->config_sem);
   489         up(&master->config_sem);
   491         
   490 
   492         // check for pending slave configurations
   491         // check for pending slave configurations
   493         if (ec_fsm_master_action_configure(fsm))
   492         if (ec_fsm_master_action_configure(fsm))
   494             return;
   493             return;
   495     }
   494     }
   496 
   495 
   909     }
   908     }
   910 
   909 
   911     EC_INFO("Bus scanning completed in %u ms.\n",
   910     EC_INFO("Bus scanning completed in %u ms.\n",
   912             (u32) (jiffies - fsm->scan_jiffies) * 1000 / HZ);
   911             (u32) (jiffies - fsm->scan_jiffies) * 1000 / HZ);
   913 
   912 
       
   913     // Attach slave configurations
       
   914     ec_master_attach_slave_configs(master);
       
   915 
   914 #ifdef EC_EOE
   916 #ifdef EC_EOE
   915     // check if EoE processing has to be started
   917     // check if EoE processing has to be started
   916     ec_master_eoe_start(master);
   918     ec_master_eoe_start(master);
   917 #endif
   919 #endif
   918 
   920