product/infrasys4/module/infrasys4_ddr_phy500/src/mod_infrasys4_ddr_phy500.c
static int infrasys4_ddr_phy500_config(fwk_id_t element_id)
{
    int status;
    struct mod_infrasys4_ddr_phy500_reg *ddr;
    const struct mod_infrasys4_ddr_phy500_module_config *module_config;
    const struct mod_infrasys4_ddr_phy500_element_config *element_config;

    status = fwk_module_check_call(element_id);
    if (status != FWK_SUCCESS)
        return status;

    module_config = fwk_module_get_data(fwk_module_id_infrasys4_ddr_phy500);
    if (module_config == NULL)
        return FWK_E_DATA;

    element_config = fwk_module_get_data(element_id);
    if (element_config == NULL)
        return FWK_E_DATA;

    ddr = (struct mod_infrasys4_ddr_phy500_reg *)element_config->ddr;

    status = log_api->log(MOD_LOG_GROUP_INFO,
        "[DDR] Initialising PHY at 0x%x\n", (uintptr_t) ddr);
    if (status != FWK_SUCCESS)
        return status;

    ddr->INIT_COMPLETE  = module_config->ddr_reg_val->INIT_COMPLETE;
    ddr->READ_DELAY     = module_config->ddr_reg_val->READ_DELAY;
    ddr->CAPTURE_MASK   = module_config->ddr_reg_val->CAPTURE_MASK;
    ddr->T_CTRL_DELAY   = module_config->ddr_reg_val->T_CTRL_DELAY;
    ddr->T_WRLAT        = module_config->ddr_reg_val->T_WRLAT;
    ddr->T_RDDATA_EN    = module_config->ddr_reg_val->T_RDDATA_EN;
    ddr->T_RDLAT        = module_config->ddr_reg_val->T_RDLAT;
    ddr->DFI_CLP_ACK    = module_config->ddr_reg_val->DFI_CLP_ACK;
    ddr->DFI_WR_PREMBL  = module_config->ddr_reg_val->DFI_WR_PREMBL;
    ddr->DELAY_SEL      = module_config->ddr_reg_val->DELAY_SEL;
    ddr->REF_EN         = module_config->ddr_reg_val->REF_EN;
    ddr->T_CTRL_UPD_MIN = module_config->ddr_reg_val->T_CTRL_UPD_MIN;

    status = log_api->log(MOD_LOG_GROUP_INFO,
        "[DDR] Done initialising PHY at 0x%x\n", (uintptr_t) ddr);
    if (status != FWK_SUCCESS)
        return status;

    return FWK_SUCCESS;
}
/*
 * Functions fulfilling this module's interface
 */
Functions fulfilling this module's interface
Functions fulfilling this module ' s interface
static int infrasys4_ddr_phy500_config(fwk_id_t element_id)
{
    int status;
    struct mod_infrasys4_ddr_phy500_reg *ddr;
    const struct mod_infrasys4_ddr_phy500_module_config *module_config;
    const struct mod_infrasys4_ddr_phy500_element_config *element_config;
    status = fwk_module_check_call(element_id);
    if (status != FWK_SUCCESS)
        return status;
    module_config = fwk_module_get_data(fwk_module_id_infrasys4_ddr_phy500);
    if (module_config == NULL)
        return FWK_E_DATA;
    element_config = fwk_module_get_data(element_id);
    if (element_config == NULL)
        return FWK_E_DATA;
    ddr = (struct mod_infrasys4_ddr_phy500_reg *)element_config->ddr;
    status = log_api->log(MOD_LOG_GROUP_INFO,
        "[DDR] Initialising PHY at 0x%x\n", (uintptr_t) ddr);
    if (status != FWK_SUCCESS)
        return status;
    ddr->INIT_COMPLETE  = module_config->ddr_reg_val->INIT_COMPLETE;
    ddr->READ_DELAY     = module_config->ddr_reg_val->READ_DELAY;
    ddr->CAPTURE_MASK   = module_config->ddr_reg_val->CAPTURE_MASK;
    ddr->T_CTRL_DELAY   = module_config->ddr_reg_val->T_CTRL_DELAY;
    ddr->T_WRLAT        = module_config->ddr_reg_val->T_WRLAT;
    ddr->T_RDDATA_EN    = module_config->ddr_reg_val->T_RDDATA_EN;
    ddr->T_RDLAT        = module_config->ddr_reg_val->T_RDLAT;
    ddr->DFI_CLP_ACK    = module_config->ddr_reg_val->DFI_CLP_ACK;
    ddr->DFI_WR_PREMBL  = module_config->ddr_reg_val->DFI_WR_PREMBL;
    ddr->DELAY_SEL      = module_config->ddr_reg_val->DELAY_SEL;
    ddr->REF_EN         = module_config->ddr_reg_val->REF_EN;
    ddr->T_CTRL_UPD_MIN = module_config->ddr_reg_val->T_CTRL_UPD_MIN;
    status = log_api->log(MOD_LOG_GROUP_INFO,
        "[DDR] Done initialising PHY at 0x%x\n", (uintptr_t) ddr);
    if (status != FWK_SUCCESS)
        return status;
    return FWK_SUCCESS;
}
static int infrasys4_ddr_phy500_config ( fwk_id_t element_id ) { int status ; struct mod_infrasys4_ddr_phy500_reg * ddr ; const struct mod_infrasys4_ddr_phy500_module_config * module_config ; const struct mod_infrasys4_ddr_phy500_element_config * element_config ; status = fwk_module_check_call ( element_id ) ; if ( status != FWK_SUCCESS ) return status ; module_config = fwk_module_get_data ( fwk_module_id_infrasys4_ddr_phy500 ) ; if ( module_config == NULL ) return FWK_E_DATA ; element_config = fwk_module_get_data ( element_id ) ; if ( element_config == NULL ) return FWK_E_DATA ; ddr = ( struct mod_infrasys4_ddr_phy500_reg * ) element_config -> ddr ; status = log_api -> log ( MOD_LOG_GROUP_INFO , " \n " , ( uintptr_t ) ddr ) ; if ( status != FWK_SUCCESS ) return status ; ddr -> INIT_COMPLETE = module_config -> ddr_reg_val -> INIT_COMPLETE ; ddr -> READ_DELAY = module_config -> ddr_reg_val -> READ_DELAY ; ddr -> CAPTURE_MASK = module_config -> ddr_reg_val -> CAPTURE_MASK ; ddr -> T_CTRL_DELAY = module_config -> ddr_reg_val -> T_CTRL_DELAY ; ddr -> T_WRLAT = module_config -> ddr_reg_val -> T_WRLAT ; ddr -> T_RDDATA_EN = module_config -> ddr_reg_val -> T_RDDATA_EN ; ddr -> T_RDLAT = module_config -> ddr_reg_val -> T_RDLAT ; ddr -> DFI_CLP_ACK = module_config -> ddr_reg_val -> DFI_CLP_ACK ; ddr -> DFI_WR_PREMBL = module_config -> ddr_reg_val -> DFI_WR_PREMBL ; ddr -> DELAY_SEL = module_config -> ddr_reg_val -> DELAY_SEL ; ddr -> REF_EN = module_config -> ddr_reg_val -> REF_EN ; ddr -> T_CTRL_UPD_MIN = module_config -> ddr_reg_val -> T_CTRL_UPD_MIN ; status = log_api -> log ( MOD_LOG_GROUP_INFO , " \n " , ( uintptr_t ) ddr ) ; if ( status != FWK_SUCCESS ) return status ; return FWK_SUCCESS ; }
Functions fulfilling this module's interface
Functions fulfilling this module ' s interface