1300015Sadrian/*- 2300015Sadrian * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org> 3300015Sadrian * All rights reserved. 4300015Sadrian * 5300015Sadrian * Redistribution and use in source and binary forms, with or without 6300015Sadrian * modification, are permitted provided that the following conditions 7300015Sadrian * are met: 8300015Sadrian * 1. Redistributions of source code must retain the above copyright 9300015Sadrian * notice, this list of conditions and the following disclaimer, 10300015Sadrian * without modification. 11300015Sadrian * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12300015Sadrian * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13300015Sadrian * redistribution must be conditioned upon including a substantially 14300015Sadrian * similar Disclaimer requirement for further binary redistribution. 15300015Sadrian * 16300015Sadrian * NO WARRANTY 17300015Sadrian * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18300015Sadrian * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19300015Sadrian * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20300015Sadrian * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21300015Sadrian * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22300015Sadrian * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23300015Sadrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24300015Sadrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25300015Sadrian * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26300015Sadrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27300015Sadrian * THE POSSIBILITY OF SUCH DAMAGES. 28300015Sadrian * 29300015Sadrian * $FreeBSD: releng/11.0/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostbvar.h 300015 2016-05-17 06:52:53Z adrian $ 30300015Sadrian */ 31300015Sadrian 32300015Sadrian#ifndef _BHND_CORES_PCIE2_BHND_PCI_HOSTBVAR_H_ 33300015Sadrian#define _BHND_CORES_PCIE2_BHND_PCI_HOSTBVAR_H_ 34300015Sadrian 35300015Sadrian/* 36300015Sadrian * PCIe-Gen2 Host Bridge definitions. 37300015Sadrian */ 38300015Sadrian 39300015Sadrian#include <sys/param.h> 40300015Sadrian#include <sys/bus.h> 41300015Sadrian 42300015Sadrian#include "bhnd_pcie2_var.h" 43300015Sadrian 44300015SadrianDECLARE_CLASS(bhnd_pcie2_hostb_driver); 45300015Sadrian 46300015Sadrian 47300015Sadrian/* 48300015Sadrian * PCIe-Gen2 endpoint-mode device quirks 49300015Sadrian */ 50300015Sadrianenum { 51300015Sadrian /** 52300015Sadrian * The PCIe SerDes output should be configured with an amplitude of 53300015Sadrian * 1214mVpp and a differential output de-emphasis of -8.46dB. 54300015Sadrian * 55300015Sadrian * The exact issue this workaround resolves is unknown. 56300015Sadrian */ 57300015Sadrian BHND_PCIE2_QUIRK_SERDES_TXDRV_DEEMPH = (1<<0), 58300015Sadrian}; 59300015Sadrian 60300015Sadrian 61300015Sadrian/** 62300015Sadrian * bhnd_pci_hostb driver instance state. 63300015Sadrian */ 64300015Sadrianstruct bhnd_pcie2hb_softc { 65300015Sadrian struct bhnd_pcie2_softc common; /**< common bhnd_pcie2 state */ 66300015Sadrian device_t dev; 67300015Sadrian device_t pci_dev; /**< host PCI device */ 68300015Sadrian uint32_t quirks; /**< hostb device quirks */ 69300015Sadrian}; 70300015Sadrian 71300015Sadrian 72300015Sadrian#endif /* _BHND_CORES_PCIE2_BHND_PCI_HOSTBVAR_H_ */