1/* 2 * HND SiliconBackplane PCI core software interface. 3 * 4 * $Id: hndpci.h 270062 2011-07-01 00:27:12Z $ 5 * Copyright (C) 2013, Broadcom Corporation. All Rights Reserved. 6 * 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. 10 * 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. 18 */ 19 20#ifndef _hndpci_h_ 21#define _hndpci_h_ 22 23#define SI_PCI_MAXCORES 2 24 25extern int hndpci_read_config(si_t *sih, uint bus, uint dev, uint func, 26 uint off, void *buf, int len); 27extern int extpci_read_config(si_t *sih, uint bus, uint dev, uint func, 28 uint off, void *buf, int len); 29extern int hndpci_write_config(si_t *sih, uint bus, uint dev, uint func, 30 uint off, void *buf, int len); 31extern int extpci_write_config(si_t *sih, uint bus, uint dev, uint func, 32 uint off, void *buf, int len); 33extern uint8 hndpci_find_pci_capability(si_t *sih, uint bus, uint dev, uint func, 34 uint8 req_cap_id, uchar *buf, uint32 *buflen); 35extern void hndpci_ban(uint16 core); 36extern int hndpci_init(si_t *sih); 37extern int hndpci_init_pci(si_t *sih, uint coreunit); 38extern void hndpci_init_cores(si_t *sih); 39extern void hndpci_arb_park(si_t *sih, uint parkid); 40extern bool hndpci_is_hostbridge(uint bus, uint dev); 41extern uint32 hndpci_get_membase(uint bus); 42extern void hndpci_deinit(si_t *sih); /*borg, for 4706 reboot issue*/ 43extern int hndpci_deinit_pci(si_t *sih, uint coreunit); 44 45#define PCI_PARK_NVRAM 0xff 46 47#endif /* _hndpci_h_ */ 48