1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2 /* Copyright (C) 2015-2017 Netronome Systems, Inc. */
6 * Author: Jason McMullan <jason.mcmullan@netronome.com>
12 /* For use with NFP6000 Databook "XPB Addressing" section
14 #define NFP_XPB_OVERLAY(island) (((island) & 0x3f) << 24)
16 #define NFP_XPB_ISLAND(island) (NFP_XPB_OVERLAY(island) + 0x60000)
18 #define NFP_XPB_ISLAND_of(offset) (((offset) >> 24) & 0x3F)
20 /* For use with NFP6000 Databook "XPB Island and Device IDs" chapter
22 #define NFP_XPB_DEVICE(island, slave, device) \
23 (NFP_XPB_OVERLAY(island) | \
24 (((slave) & 3) << 22) | \
25 (((device) & 0x3f) << 16))
27 #endif /* NFP6000_XPB_H */