/* param base XRDC2 peripheral base address. param valid True to valid XRDC2.  */
void XRDC2_SetGlobalValid(XRDC2_Type *base, bool valid)
/* param base XRDC2 peripheral base address. param valid True to valid XRDC2.  */
void XRDC2_SetGlobalValid(XRDC2_Type *base, bool valid)
{
    uint32_t mcr = base->MCR & ~(XRDC2_MCR_GVLDM_MASK | XRDC2_MCR_GVLDC_MASK);
    if (valid)
    {
        mcr |= XRDC2_MCR_GVLDM_MASK;
        base->MCR = mcr;
        (void)base->MCR;
        (void)base->MCR;
        mcr |= XRDC2_MCR_GVLDC_MASK;
        base->MCR = mcr;
    }
    else
    {
        base->MCR = mcr;
    }
}