source: rtems/c/src/lib/libbsp/arm/altera-cyclone-v/hwlib/include/alt_clock_group.h @ 0b03ca39

4.115
Last change on this file since 0b03ca39 was 0b03ca39, checked in by Ralf Kirchner <ralf.kirchner@…>, on 02/14/14 at 14:00:31

bsp/altera-cyclone-v: Add Alteras hwlib

Add files from Alteras hwlib

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*! \file
2 *  Contains the definition of an opaque data structure that contains raw
3 *  configuration information for a clock group.
4 */
5
6/******************************************************************************
7*
8* Copyright 2013 Altera Corporation. All Rights Reserved.
9*
10* Redistribution and use in source and binary forms, with or without
11* modification, are permitted provided that the following conditions are met:
12*
13* 1. Redistributions of source code must retain the above copyright notice,
14* this list of conditions and the following disclaimer.
15*
16* 2. Redistributions in binary form must reproduce the above copyright notice,
17* this list of conditions and the following disclaimer in the documentation
18* and/or other materials provided with the distribution.
19*
20* 3. The name of the author may not be used to endorse or promote products
21* derived from this software without specific prior written permission.
22*
23* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR
24* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO
26* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32* OF SUCH DAMAGE.
33*
34******************************************************************************/
35
36#ifndef __ALT_CLK_GRP_H__
37#define __ALT_CLK_GRP_H__
38
39#include "hwlib.h"
40#include "socal/alt_clkmgr.h"
41
42#ifdef __cplusplus
43extern "C"
44{
45#endif  /* __cplusplus */
46
47
48/*! This type definition enumerates the clock groups
49*/
50typedef enum ALT_CLK_GRP_e
51{
52        ALT_MAIN_PLL_CLK_GRP,                                   /*!< Main PLL clock group */
53
54        ALT_PERIPH_PLL_CLK_GRP,                                 /*!< Peripheral PLL clock group */
55
56        ALT_SDRAM_PLL_CLK_GRP                                   /*!< SDRAM PLL clock group */
57
58} ALT_CLK_GRP_t;
59
60
61
62/*! This type definition defines an opaque data structure for holding the
63 *  configuration settings for a complete clock group.
64 */
65typedef struct ALT_CLK_GROUP_RAW_CFG_s
66{
67    uint32_t                              verid;                /*!< SoC FPGA version identifier. This field
68                                                                                        *   encapsulates the silicon identifier and
69                                                                                        *   version information associated with this
70                                                                                        *   clock group configuration. It is used to
71                                                                                        *   assert that this clock group configuration
72                                                                                        *   is valid for this device.
73                                                                                        */
74    uint32_t                              siliid2;              /*!< Reserved register - reserved for future
75                                                                                *        device IDs or capability flags/
76                                                                                */
77    ALT_CLK_GRP_t                 clkgrpsel;    /*!< Clock group union discriminator */
78
79
80    /*! This union holds the raw register values for configuration of the set of
81     *  possible clock groups on the SoC FPGA. The \e clkgrpsel discriminator
82     *  identifies the valid clock group union data member.
83     */
84    union ALT_CLK_GROUP_RAW_CFG_u
85    {
86        ALT_CLKMGR_MAINPLL_t  mainpllgrp;   /*!< Raw clock group configuration for Main PLL group */
87        ALT_CLKMGR_PERPLL_t   perpllgrp;    /*!< Raw clock group configuration for Peripheral PLL group */
88        ALT_CLKMGR_SDRPLL_t   sdrpllgrp;    /*!< Raw clock group configuration for SDRAM PLL group */
89    } clkgrp;
90} ALT_CLK_GROUP_RAW_CFG_t;
91
92#ifdef __cplusplus
93}
94#endif  /* __cplusplus */
95#endif  /* __ALT_CLK_GRP_H__ */
Note: See TracBrowser for help on using the repository browser.