arm-trusted-firmware/plat/imx/common/include/imx_snvs.h
Samuel Holland e8bb1c2caa imx: Fix missing inclusion of cdefs.h
This was found by compiling with -fno-common:

./build/picopi/release/bl2/imx_snvs.o:(.bss.__packed+0x0): multiple definition of `__packed';
./build/picopi/release/bl2/imx_caam.o:(.bss.__packed+0x0): first defined here

__packed was intended to be the attribute macro from cdefs.h, not an
object of the structure type.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Id02fac3f098be2d71c35c6b4a18012515532f32a
2019-12-04 02:58:41 -06:00

84 lines
1.7 KiB
C

/*
* Copyright (C) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef IMX_SNVS_H
#define IMX_SNVS_H
#include <cdefs.h>
#include <stdint.h>
#include <arch.h>
struct snvs {
uint32_t hplr;
uint32_t hpcomr;
uint32_t hpcr;
uint32_t hpsicr;
uint32_t hpsvcr;
uint32_t hpsr;
uint32_t hpsvsr;
uint32_t hphacivr;
uint32_t hphacr;
uint32_t hprtcmr;
uint32_t hprtclr;
uint32_t hptamr;
uint32_t hptalr;
uint32_t lplr;
uint32_t lpcr;
uint32_t lpmkcr;
uint32_t lpsvcr;
uint32_t lptgfcr;
uint32_t lptdcr;
uint32_t lpsr;
uint32_t lpsrtcmr;
uint32_t lpsrtclr;
uint32_t lptar;
uint32_t lpsmcmr;
uint32_t lpsmclr;
uint32_t lppgdr;
uint32_t lpgpr0_alias;
uint8_t lpzmkr[32];
uint16_t res0;
uint32_t lpgpr0[4];
uint32_t lptdc2r;
uint32_t lptdsr;
uint32_t lptgf1cr;
uint32_t lptgf2cr;
uint32_t res1[4];
uint32_t lpat1cr;
uint32_t lpat2cr;
uint32_t lpat3cr;
uint32_t lpat4cr;
uint32_t lpat5cr;
uint32_t res2[3];
uint32_t lpatctlr;
uint32_t lpatclkr;
uint32_t lpatrc1r;
uint32_t lpatrc2r;
uint32_t res3[706];
uint32_t hpvidr1;
uint32_t hpvidr2;
} __packed;
/* Define the HPCOMR bits */
#define HPCOMR_NPSWA_EN BIT(31)
#define HPCOMR_HAC_STOP BIT(19)
#define HPCOMR_HAC_CLEAR BIT(18)
#define HPCOMR_HAC_LOAD BIT(17)
#define HPCOMR_HAC_EN BIT(16)
#define HPCOMR_MKS_EN BIT(13)
#define HPCOMR_PROG_ZMK BIT(12)
#define HPCOMR_SW_LPSV BIT(10)
#define HPCOMR_SW_FSV BIT(9)
#define HPCOMR_SW_SV BIT(8)
#define HPCOMR_LP_SWR_DIS BIT(5)
#define HPCOMR_LP_SWR BIT(4)
#define HPCOMR_SSM_SFNS_DIS BIT(2)
#define HPCOMR_SSM_ST_DIS BIT(1)
#define HPCOMR_SSM_ST BIT(0)
void imx_snvs_init(void);
#endif /* IMX_SNVS_H */