]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_RENESAS / TARGET_RZ_A1H / RZ_A1_Init.c
1 /*******************************************************************************
2 * DISCLAIMER
3 * This software is supplied by Renesas Electronics Corporation and is only
4 * intended for use with Renesas products. No other uses are authorized. This
5 * software is owned by Renesas Electronics Corporation and is protected under
6 * all applicable laws, including copyright laws.
7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
16 * Renesas reserves the right, without notice, to make changes to this software
17 * and to discontinue the availability of this software. By using this software,
18 * you agree to the additional terms and conditions found by accessing the
19 * following link:
20 * http://www.renesas.com/disclaimer
21 * Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
22 *******************************************************************************/
23 /**************************************************************************//**
24 * @file RZ_A1_Init.c
25 * $Rev: 624 $
26 * $Date:: 2013-04-24 13:37:48 +0900#$
27 * @brief RZ_A1 Initialize
28 ******************************************************************************/
29
30 /******************************************************************************
31 Includes <System Includes> , "Project Includes"
32 ******************************************************************************/
33 #include "MBRZA1H.h"
34 #include "RZ_A1_Init.h"
35
36 /******************************************************************************
37 Typedef definitions
38 ******************************************************************************/
39
40 /******************************************************************************
41 Macro definitions
42 ******************************************************************************/
43 #define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
44 #define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
45
46 #define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
47
48 /******************************************************************************
49 Imported global variables and functions (from other files)
50 ******************************************************************************/
51
52 /******************************************************************************
53 Exported global variables and functions (to be accessed by other files)
54 ******************************************************************************/
55
56 /******************************************************************************
57 Private global variables and functions
58 ******************************************************************************/
59
60 /**************************************************************************//**
61 * Function Name: RZ_A1_SetSramWriteEnable
62 * @brief Initialize Board settings
63 *
64 * Description:<br>
65 * Set SRAM write enable
66 * @param none
67 * @retval none
68 ******************************************************************************/
69 void RZ_A1_SetSramWriteEnable(void)
70 {
71 /* Enable SRAM write access */
72 CPG.SYSCR3 = 0x0F;
73
74 return;
75 }
76
77 /**************************************************************************//**
78 * Function Name: RZ_A1_InitClock
79 * @brief Initialize Board settings
80 *
81 * Description:<br>
82 * Initialize Clock
83 * @param none
84 * @retval none
85 ******************************************************************************/
86 void RZ_A1_InitClock(void)
87 {
88 /* Cancel L2C standby status before clock change */
89 L2CREG15_POWER_CTRL = 0x00000001;
90
91 /* Clock settings */
92 /* ClockMode0 */
93 CPG.FRQCR = 0x1035; /* CPU Clock =399.99MHz */
94 CPG.FRQCR2 = 0x0001; /* G Clock =266.66MHz */
95
96 return;
97 }
98
99 /**************************************************************************//**
100 * Function Name: RZ_A1_IsClockMode0
101 * @brief Query Clock Mode
102 *
103 * Description:<br>
104 * Answer ClockMode0 or not
105 * @param none
106 * @retval true : clock mode 0
107 * @retval false : clock mode 1
108 ******************************************************************************/
109 int RZ_A1_IsClockMode0(void)
110 {
111 /* ClockMode0 */
112 return true;
113 }
114
115 /**************************************************************************//**
116 * Function Name: RZ_A1_InitBus
117 * @brief Initialize Bus
118 *
119 * Description:<br>
120 * Initialize Pin Setting
121 * @param none
122 * @retval none
123 ******************************************************************************/
124 void RZ_A1_InitBus(void)
125 {
126 /*************************************************************************/
127 /* If need Pin Setting before run program, the setting will be wrote here*/
128 /*************************************************************************/
129
130 return;
131 }
132
133 /******************************************************************************
134 End of file
135 ******************************************************************************/
Imprint / Impressum