/*
 *               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>

/* Bring some AHB blocks out of reset, after they have been put into reset
 * for switch to compat mode. The POR values are such that these resets 
 * are normally de-asserted.
 */
void
enableAHBBlocks(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);
}
