/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */
#include <iostypes.h>
#include <ios.h>
#include <iop.h>
#include <ioslibc.h>
#include <ahb_fdl_defs.h>

/* Put some AHB blocks into reset for the switch to compat mode. */
void
resetAHBBlocks(void)
{
    u32 val = busRd32(ACR_PROT_REGS_BASE + ACRRSTAHB_OFFSET);
    val &= ~( 
            ACRRSTAHB_RSTB_ELA_MASK
            | ACRRSTAHB_RSTB_AHP_MASK
            | ACRRSTAHB_RSTB_USB_MASK
            | ACRRSTAHB_RSTB_SDI_MASK
            | ACRRSTAHB_RSTB_FLA_MASK
            | ACRRSTAHB_RSTB_SHA_MASK
            | ACRRSTAHB_RSTB_AES_MASK
            );
    busWrt32(ACR_PROT_REGS_BASE + ACRRSTAHB_OFFSET, val);
}
