80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski/*
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * This file and its contents are supplied under the terms of the
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * Common Development and Distribution License ("CDDL"), version 1.0.
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * You may only use this file in accordance with the terms of version
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * 1.0 of the CDDL.
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski *
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * A full copy of the text of the CDDL should have accompanied this
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * source. A copy of the CDDL is also available via the Internet at
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * http://www.illumos.org/license/CDDL.
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski/*
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#ifndef _CPQARY3_BD_H
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#define _CPQARY3_BD_H
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#ifdef __cplusplus
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowskiextern "C" {
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#endif
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski/*
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * This file collects various info about each supported
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * controller that the driver needs to know in order to
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * properly support the board. during device attach, the
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * driver can use cpqary3_bd_getbybid() to fetch the board
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * definition for the device to which it has attached.
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski *
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * the source for the board definitions themselves is kept
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * in controllers, which is used to generate the c code to
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * define a static array of structs. this array and its
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * search functions are defined in cpqary3_bd.c
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski *
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * NOTE: if new fields are added or if the order of the
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * fields is altered, then the cpqary3_bd.c definitions
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski * must be updated!
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowskistruct cpqary3_bd {
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski char *bd_dispname; /* display name */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski offset_t bd_maplen; /* register map length */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint16_t bd_pci_subvenid; /* PCI subvendor ID */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint16_t bd_pci_subsysid; /* PCI subsystem ID */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_intrpendmask; /* interrupt pending mask */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_flags; /* flags */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_is_e200;
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_intrmask;
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_lockup_intrmask;
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski uint32_t bd_is_ssll;
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski};
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowskitypedef struct cpqary3_bd cpqary3_bd_t;
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski/* bd_flags */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#define SA_BD_SAS 0x00000001 /* board is a sas controller */
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowskiextern cpqary3_bd_t *cpqary3_bd_getbybid(uint32_t);
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#ifdef __cplusplus
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski}
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#endif
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski
80c94ecd7a524eb933a4bb221a9618b9dc490e76Keith M Wesolowski#endif /* _CPQARY3_BD_H */