/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2015 Landon Fuller <[email protected]>4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer,11* without modification.12* 2. Redistributions in binary form must reproduce at minimum a disclaimer13* similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any14* redistribution must be conditioned upon including a substantially15* similar Disclaimer requirement for further binary redistribution.16*17* NO WARRANTY18* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS19* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT20* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY21* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL22* THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,23* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF24* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS25* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER26* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)27* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF28* THE POSSIBILITY OF SUCH DAMAGES.29*30*/3132#ifndef _BCMA_BCMA_EROMVAR_H_33#define _BCMA_BCMA_EROMVAR_H_3435#include <dev/bhnd/bhnd.h>36#include <dev/bhnd/bhnd_erom.h>3738#include "bcmavar.h"3940struct bcma_erom;4142int bcma_erom_next_corecfg(struct bcma_erom *sc,43struct bcma_corecfg **result);4445/** EROM core descriptor. */46struct bcma_erom_core {47uint16_t vendor; /**< core's designer */48uint16_t device; /**< core's device identifier */49uint16_t rev; /**< core's hardware revision */50u_long num_mport; /**< number of master port descriptors */51u_long num_dport; /**< number of slave port descriptors */52u_long num_mwrap; /**< number of master wrapper slave port descriptors */53u_long num_swrap; /**< number of slave wrapper slave port descriptors */54};5556/** EROM master port descriptor. */57struct bcma_erom_mport {58uint8_t port_num; /**< the port number (bus-unique) */59uint8_t port_vid; /**< the port VID. A single physical60master port may have multiple VIDs;61the canonical port address is62composed of the port number + the63port VID */64};6566/** EROM slave port region descriptor. */67struct bcma_erom_sport_region {68uint8_t region_port; /**< the slave port mapping this region */69uint8_t region_type; /**< the mapping port's type */70bhnd_addr_t base_addr; /**< region base address */71bhnd_addr_t size; /**< region size */72};7374#endif /* _BCMA_BCMA_EROMVAR_H_ */757677