/******************************************************************************* * hwi_set_busattr * * Unconditionally set the bus attribute parameters for the device corresponding * to <hwi_off> to <clk>. * The API allows for the setting of a specific bus attribute tag in the case * where there could be more than 1 bus attribute per device. * * Returns: true if the specified tag was successfully set, otherwise false * */ int hwitag_set_busattr(unsigned hwi_off, unsigned busattr_idx, struct hwi_busattr *busattr) { hwi_tag *tag = hwi_tag_find(hwi_off, HWI_TAG_NAME_busattr, &busattr_idx); if (tag != NULL) { busattr->prefix = tag->prefix; tag->busattr = *busattr; } return (tag == NULL) ? 0 : 1; }
/******************************************************************************* * hwitag_set_inputclk * * Unconditionally set the clock source parameters for the device corresponding * to <hwi_off> to <clk>. * The API allows for the setting of a specific clock source in the case where * there could be more than 1 clock source per device. * * Returns: true if the specified tag was successfully set, otherwise false * */ int hwitag_set_inputclk(unsigned hwi_off, unsigned clksrc_idx, struct hwi_inputclk *clk) { hwi_tag *tag = hwi_tag_find(hwi_off, HWI_TAG_NAME_inputclk, &clksrc_idx); if (tag != NULL) { clk->prefix = tag->prefix; tag->inputclk = *clk; } return (tag == NULL) ? 0 : 1; }
/******************************************************************************* * hwi_set_errata * * Unconditionally set the <errata_idx> errata attribute corresponding to * <hwi_off> to <errata>. * * Returns: true if the specified tag was successfully set, otherwise false * */ int hwitag_set_errata(unsigned hwi_off, unsigned errata_idx, uint32_t errata) { hwi_tag *tag = hwi_tag_find(hwi_off, HWI_TAG_NAME_errata, &errata_idx); if (tag != NULL) tag->errata.num = errata; return (tag == NULL) ? 0 : 1; }