Add Broadcom / Netgear changes from RAXE 1.0.0.48
[project/bcm63xx/u-boot.git] / arch / arm / include / asm / arch-bcm63146 / brom.h
1 /* SPDX-License-Identifier: GPL-2.0+
2 *
3 * Copyright 2019 Broadcom Ltd.
4 */
5
6 #ifndef _63146_BROM_H
7 #define _63146_BROM_H
8
9 #define BROM_GEN_BASE 0xff800600
10
11 /*
12 * BROM_GEN Register Definition .
13 */
14 typedef struct BromGen_ {
15 #define BROM_GEN_SPI_SLV_UNLOCK_MASK 0x1
16 #define BROM_GEN_SPI_SLV_UNLOCK_SHIFT 0x2
17 #define BROM_GEN_TAG_UNLOCK_MASK 0x1
18 #define BROM_GEN_TAG_UNLOCK_SHIFT 0x1
19 uint32_t secBootCfg;
20 uint32_t bromCrcRevIdLow;
21 uint32_t bromCrcRevIdHigh;
22 } BromGen;
23
24 #define BROM_GEN ((volatile BromGen * const) BROM_GEN_BASE)
25 #define BROM_GEN_JTAG_UNLOCK do {BROM_GEN->secBootCfg |= ((BROM_GEN_SPI_SLV_UNLOCK_MASK<<BROM_GEN_SPI_SLV_UNLOCK_SHIFT) | \
26 (BROM_GEN_TAG_UNLOCK_MASK<<BROM_GEN_TAG_UNLOCK_SHIFT)); }while(0)
27
28 #endif