2 * HND SiliconBackplane PCI core software interface.
4 * $Id: hndpci.h,v 13.10.110.1 2010-11-16 21:15:41 Exp $
5 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 #define SI_PCI_MAXCORES 2
25 extern int hndpci_read_config(si_t
*sih
, uint bus
, uint dev
, uint func
,
26 uint off
, void *buf
, int len
);
27 extern int extpci_read_config(si_t
*sih
, uint bus
, uint dev
, uint func
,
28 uint off
, void *buf
, int len
);
29 extern int hndpci_write_config(si_t
*sih
, uint bus
, uint dev
, uint func
,
30 uint off
, void *buf
, int len
);
31 extern int extpci_write_config(si_t
*sih
, uint bus
, uint dev
, uint func
,
32 uint off
, void *buf
, int len
);
33 extern uint8
hndpci_find_pci_capability(si_t
*sih
, uint bus
, uint dev
, uint func
,
34 uint8 req_cap_id
, uchar
*buf
, uint32
*buflen
);
35 extern void hndpci_ban(uint16 core
);
36 extern int hndpci_init(si_t
*sih
);
37 extern int hndpci_init_pci(si_t
*sih
, uint coreunit
);
38 extern void hndpci_init_cores(si_t
*sih
);
39 extern void hndpci_arb_park(si_t
*sih
, uint parkid
);
40 extern bool hndpci_is_hostbridge(uint bus
, uint dev
);
41 extern uint32
hndpci_get_membase(uint bus
);
42 extern void hndpci_deinit(si_t
*sih
);
43 extern int hndpci_deinit_pci(si_t
*sih
, uint coreunit
);
45 #define PCI_PARK_NVRAM 0xff
47 #endif /* _hndpci_h_ */