1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - MI
3   File:     mi_init.c
4 
5   Copyright 2005-2008 Nintendo.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-12-01#$
14   $Rev: 9448 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 
18 #include <nitro.h>
19 
20 #ifdef SDK_TWL
21 #include <twl/mi/common/dma.h>
22 #endif
23 
24 /*---------------------------------------------------------------------------*
25   Name:         MI_Init
26 
27   Description:  initialize MI functions
28 
29   Arguments:    None
30 
31   Returns:      None
32  *---------------------------------------------------------------------------*/
MI_Init(void)33 void MI_Init(void)
34 {
35 #ifdef SDK_ARM9
36     //---- Init Work RAM (allocate both wram (block0/1) to ARM7)
37     MI_SetWramBank(MI_WRAM_ARM7_ALL);
38 #endif
39 
40     if ( OS_IsRunOnTwl() )
41     {
42 #ifdef SDK_TWL
43         MI_InitNDma();
44 #endif
45     }
46 
47     //---- dummy DMA
48     MI_StopDma(0);
49 }
50