bhnd_pcibvar.h revision 296077
1296077Sadrian/*-
2296077Sadrian * Copyright (c) 2015 Landon Fuller <landon@landonf.org>
3296077Sadrian * All rights reserved.
4296077Sadrian *
5296077Sadrian * Redistribution and use in source and binary forms, with or without
6296077Sadrian * modification, are permitted provided that the following conditions
7296077Sadrian * are met:
8296077Sadrian * 1. Redistributions of source code must retain the above copyright
9296077Sadrian *    notice, this list of conditions and the following disclaimer,
10296077Sadrian *    without modification.
11296077Sadrian * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12296077Sadrian *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
13296077Sadrian *    redistribution must be conditioned upon including a substantially
14296077Sadrian *    similar Disclaimer requirement for further binary redistribution.
15296077Sadrian *
16296077Sadrian * NO WARRANTY
17296077Sadrian * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18296077Sadrian * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19296077Sadrian * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
20296077Sadrian * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21296077Sadrian * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22296077Sadrian * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23296077Sadrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24296077Sadrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25296077Sadrian * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26296077Sadrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27296077Sadrian * THE POSSIBILITY OF SUCH DAMAGES.
28296077Sadrian *
29296077Sadrian * $FreeBSD: head/sys/dev/bhnd/cores/pci/bhnd_pcibvar.h 296077 2016-02-26 03:34:08Z adrian $
30296077Sadrian */
31296077Sadrian
32296077Sadrian#ifndef _BHND_CORES_PCI_BHND_PCIBVAR_H_
33296077Sadrian#define _BHND_CORES_PCI_BHND_PCIBVAR_H_
34296077Sadrian
35296077Sadrian#include "bhnd_pcivar.h"
36296077Sadrian
37296077Sadrian/* PCI bridge driver-specific state */
38296077Sadrian#define	BHND_PCIB_MAX_RES	2
39296077Sadrian#define	BHND_PCIB_MAX_RSPEC	(BHND_PCIB_MAX_RES+1)
40296077Sadrianstruct bhnd_pcib_softc {
41296077Sadrian	device_t		 dev;		/**< pci device */
42296077Sadrian	struct bhnd_resource	*core;		/**< core registers. */
43296077Sadrian	bhnd_pci_regfmt_t	 regfmt;	/**< device register format */
44296077Sadrian
45296077Sadrian	struct resource_spec	 rspec[BHND_PCIB_MAX_RSPEC];
46296077Sadrian	struct bhnd_resource	*res[BHND_PCIB_MAX_RES];
47296077Sadrian
48296077Sadrian};
49296077Sadrian
50296077Sadrian#endif /* _BHND_CORES_PCI_BHND_PCIBVAR_H_ */