src/occ_gpe1/gpe_centaur_scom.c
// Write all configured centaur with the same data
Write all configured centaur with the same data
Write all configured centaur with the same data
int centaur_put_scom_all(CentaurConfiguration_t* i_config,
                         uint32_t i_scom_address,
                         uint64_t i_data)
{
    int rc = 0;
    int pba_rc = 0;
    int access_rc = 0;
    int instance = 0;
    uint64_t pba_slvctln_save;
    pbaslvctl_reset(&(i_config->scomParms));
    pba_slvctln_save = pbaslvctl_setup(&(i_config->scomParms));
    for(instance = 0; instance < OCCHW_NCENTAUR; ++instance)
    {
        if( CHIP_CONFIG_CENTAUR(instance) & (i_config->config))
        {
            uint32_t oci_addr;
            pba_rc = centaur_scom_setup(i_config,
                                    instance,
                                    i_scom_address,
                                    &oci_addr);
            if(pba_rc)
            {
                rc = pba_rc;
            }
            access_rc = centaur_access(i_config,
                                       instance,
                                       oci_addr,
                                       &i_data,
                                       CENTAUR_ACCESS_WRITE);
            if(!rc && access_rc)
            {
                rc = access_rc;
            }
        }
    }
    pbaslvctl_reset(&(i_config->scomParms));
    PPE_STVD((i_config->scomParms).slvctl_address, pba_slvctln_save);
    return rc;
}
int centaur_put_scom_all ( CentaurConfiguration_t * i_config , uint32_t i_scom_address , uint64_t i_data ) { int rc = 0 ; int pba_rc = 0 ; int access_rc = 0 ; int instance = 0 ; uint64_t pba_slvctln_save ; pbaslvctl_reset ( & ( i_config -> scomParms ) ) ; pba_slvctln_save = pbaslvctl_setup ( & ( i_config -> scomParms ) ) ; for ( instance = 0 ; instance < OCCHW_NCENTAUR ; ++ instance ) { if ( CHIP_CONFIG_CENTAUR ( instance ) & ( i_config -> config ) ) { uint32_t oci_addr ; pba_rc = centaur_scom_setup ( i_config , instance , i_scom_address , & oci_addr ) ; if ( pba_rc ) { rc = pba_rc ; } access_rc = centaur_access ( i_config , instance , oci_addr , & i_data , CENTAUR_ACCESS_WRITE ) ; if ( ! rc && access_rc ) { rc = access_rc ; } } } pbaslvctl_reset ( & ( i_config -> scomParms ) ) ; PPE_STVD ( ( i_config -> scomParms ) . slvctl_address , pba_slvctln_save ) ; return rc ; }
Write all configured centaur with the same data
Write all configured centaur with the same data
// Already traced in centaur_scom_setup // Trumps access_rc // centaur scom // Centaur won't be touched again. // continue // reset pba slave