Sheetal Tigadoli | ad0943e | 2019-12-18 19:44:43 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019-2020, Broadcom |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef BOARD_FAMILY_H |
| 8 | #define BOARD_FAMILY_H |
| 9 | |
| 10 | #if defined(DRIVER_SPD_ENABLE) && !defined(DRIVER_SPD_SPOOF) |
| 11 | #include <spd.h> |
| 12 | #endif |
| 13 | |
| 14 | #ifdef USE_GPIO |
| 15 | /* max number of supported GPIOs to construct the bitmap for board detection */ |
| 16 | #define MAX_NR_GPIOS 4 |
| 17 | |
| 18 | /* max GPIO bitmap value */ |
| 19 | #define MAX_GPIO_BITMAP_VAL (BIT(MAX_NR_GPIOS) - 1) |
| 20 | #endif |
| 21 | |
| 22 | struct mcb_ref_group { |
| 23 | uint32_t mcb_ref; |
| 24 | unsigned int *mcb_cfg; |
| 25 | }; |
| 26 | |
| 27 | #define MCB_REF_GROUP(ref) \ |
| 28 | { \ |
| 29 | .mcb_ref = 0x ## ref, \ |
| 30 | .mcb_cfg = mcb_ ## ref, \ |
| 31 | } |
| 32 | |
| 33 | #endif |