source: mainline/uspace/drv/infrastructure/rootamdm37x/cm/mpu.h@ 9c0eba6

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 9c0eba6 was 0c12dfe, checked in by Jan Vesely <jano.vesely@…>, 13 years ago

typos and comments

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2 * Copyright (c) 2012 Jan Vesely
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup amdm37xdrvcm
30 * @{
31 */
32/** @file
33 * @brief MPU Clock Management IO register structure.
34 */
35#ifndef AMDM37x_MPU_CM_H
36#define AMDM37x_MPU_CM_H
37#include <sys/types.h>
38#include <macros.h>
39
40/* AM/DM37x TRM p.455 */
41#define MPU_CM_BASE_ADDRESS 0x48004900
42#define MPU_CM_SIZE 8192
43
44typedef struct {
45 PADD32;
46 ioport32_t clken_pll;
47#define MPU_CM_CLKEN_PLL_EN_MPU_DPLL_LP_MODE_FLAG (1 << 10)
48#define MPU_CM_CLKEN_PLL_EN_MPU_DPLL_DRIFTGUARD (1 << 3)
49#define MPU_CM_CLKEN_PLL_EN_MPU_DPLL_EN_MPU_DPLL_MASK (0x7)
50#define MPU_CM_CLKEN_PLL_EN_MPU_DPLL_EN_MPU_DPLL_LP_BYPASS (0x5)
51#define MPU_CM_CLKEN_PLL_EN_MPU_DPLL_EN_MPU_DPLL_LOCKED (0x7)
52
53 PADD32[6];
54 const ioport32_t idlest;
55#define MPU_CM_IDLEST_ST_MPU_STANDBY_FLAG (1 << 0)
56
57 const ioport32_t idlest_pll;
58#define MPU_CM_IDLEST_PLL_ST_MPU_CLK_LOCKED_FLAG (1 << 0)
59
60 PADD32[3];
61 ioport32_t autoidle_pll;
62#define MPU_CM_AUTOIDLE_PLL_AUTO_MPU_DPLL_MASK (0x7)
63#define MPU_CM_AUTOIDLE_PLL_AUTO_MPU_DPLL_DISABLED (0x0)
64#define MPU_CM_AUTOIDLE_PLL_AUTO_MPU_DPLL_ENABLED (0x1)
65
66 PADD32[2];
67 ioport32_t clksel1_pll;
68#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_MASK (0x7 << 19)
69#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_SHIFT (19)
70#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_VAL(x) ((x >> 19) & 0x7)
71#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_CORE_DIV_1 (0x1 << 19)
72#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_CORE_DIV_2 (0x2 << 19)
73#define MPU_CM_CLKSEL1_PLL_MPU_CLK_SRC_CORE_DIV_4 (0x4 << 19)
74#define MPU_CM_CLKSEL1_PLL_MPU_DPLL_MULT_MASK (0x7ff << 8)
75#define MPU_CM_CLKSEL1_PLL_MPU_DPLL_MULT_SHIFT (8)
76#define MPU_CM_CLKSEL1_PLL_MPU_DPLL_DIV_MASK (0x7f << 0)
77#define MPU_CM_CLKSEL1_PLL_MPU_DPLL_DIV_SHIFT (0)
78
79 ioport32_t clksel2_pll;
80#define MPU_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV_MASK (0x1f)
81
82 ioport32_t clkstctrl;
83#define MPU_CM_CLKSCTRL_CLKTRCTRL_MPU_MASK (0x3)
84#define MPU_CM_CLKSCTRL_CLKTRCTRL_MPU_DISABLED (0x0)
85#define MPU_CM_CLKSCTRL_CLKTRCTRL_MPU_START_WAKEUP (0x2)
86#define MPU_CM_CLKSCTRL_CLKTRCTRL_MPU_AUTOMATIC (0x3)
87
88 const ioport32_t clkstst;
89#define MPU_CM_CLKSTST_CLKACTIVITY_MPU_ACTIVE_FLAG (1 << 0)
90
91} mpu_cm_regs_t;
92
93#endif
94/**
95 * @}
96 */
97
Note: See TracBrowser for help on using the repository browser.