1 /* 2 * Copyright 2014-2015 Cisco Systems, Inc. and/or its affiliates. 3 * All rights reserved. 4 * 5 * This program is free software; you may redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 10 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 12 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 13 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 14 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 15 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 16 * SOFTWARE. 17 */ 18 19 #ifndef M00479_CLK_LOSS_DETECTOR_MEMMAP_PACKAGE_H 20 #define M00479_CLK_LOSS_DETECTOR_MEMMAP_PACKAGE_H 21 22 /******************************************************************* 23 * Register Block 24 * M00479_CLK_LOSS_DETECTOR_MEMMAP_PACKAGE_VHD_REGMAP 25 *******************************************************************/ 26 struct m00479_clk_loss_detector_regmap { 27 /* Control module */ 28 uint32_t ctrl; /* Reg 0x0000, Default=0x0 */ 29 uint32_t status; /* Reg 0x0004 */ 30 /* Number of ref clk cycles before checking the clock under test */ 31 uint32_t ref_clk_cnt_val; /* Reg 0x0008, Default=0xc4 */ 32 /* Number of test clk cycles required in the ref_clk_cnt_val period 33 * to ensure that the test clock is performing as expected */ 34 uint32_t test_clk_cnt_val; /* Reg 0x000c, Default=0xa */ 35 }; 36 37 #define M00479_CLK_LOSS_DETECTOR_REG_CTRL_OFST 0 38 #define M00479_CLK_LOSS_DETECTOR_REG_STATUS_OFST 4 39 #define M00479_CLK_LOSS_DETECTOR_REG_REF_CLK_CNT_VAL_OFST 8 40 #define M00479_CLK_LOSS_DETECTOR_REG_TEST_CLK_CNT_VAL_OFST 12 41 42 /******************************************************************* 43 * Bit Mask for register 44 * M00479_CLK_LOSS_DETECTOR_MEMMAP_PACKAGE_VHD_BITMAP 45 *******************************************************************/ 46 /* ctrl [0:0] */ 47 #define M00479_CTRL_BITMAP_ENABLE_OFST (0) 48 #define M00479_CTRL_BITMAP_ENABLE_MSK (0x1 << M00479_CTRL_BITMAP_ENABLE_OFST) 49 /* status [0:0] */ 50 #define M00479_STATUS_BITMAP_CLOCK_MISSING_OFST (0) 51 #define M00479_STATUS_BITMAP_CLOCK_MISSING_MSK (0x1 << M00479_STATUS_BITMAP_CLOCK_MISSING_OFST) 52 53 #endif /*M00479_CLK_LOSS_DETECTOR_MEMMAP_PACKAGE_H*/ 54