mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Updated for not-so-new version of Cyclom-Y PCI boards (with a custom
register for the PLX id). Merge the vendor's modification of the 2.2.* release version into -current for reference. Will be cleaned up in next commit. Obtained from: ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/3.0/cyy30.tar.gz
This commit is contained in:
parent
65c0c7b08e
commit
443f91618b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42540
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy_pci.c,v 1.6 1997/09/02 20:06:24 bde Exp $
|
||||
* $Id: cy_pci.c,v 1.7 1998/12/14 06:32:55 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -82,6 +82,7 @@ cy_attach(config_id, unit)
|
||||
void *vaddr;
|
||||
u_int32_t ioport;
|
||||
int adapter;
|
||||
u_int16_t plx_ver;
|
||||
|
||||
ioport = (u_int32_t) pci_conf_read(config_id, CY_PCI_BASE_ADDR1) & ~0x3;
|
||||
paddr = pci_conf_read(config_id, CY_PCI_BASE_ADDR2) & ~0xf;
|
||||
@ -119,8 +120,23 @@ cy_attach(config_id, unit)
|
||||
* Enable the "local" interrupt input to generate a
|
||||
* PCI interrupt.
|
||||
*/
|
||||
outw(ioport + CY_PLX_ICS, inw(ioport + CY_PLX_ICS) |
|
||||
CY_PLX_ICS_IENABLE | CY_PLX_ICS_LOCAL_IENABLE);
|
||||
plx_ver = (*((char *)vaddr + PLX_VER)) & 0x0f;
|
||||
switch (plx_ver) {
|
||||
case PLX_9050:
|
||||
|
||||
outw(ioport + CY_PLX_9050_ICS,
|
||||
inw(ioport + CY_PLX_9050_ICS) | CY_PLX_9050_ICS_IENABLE |
|
||||
CY_PLX_9050_ICS_LOCAL_IENABLE);
|
||||
break;
|
||||
|
||||
case PLX_9060:
|
||||
case PLX_9080:
|
||||
default: /* Old boards, use PLX_9060 */
|
||||
|
||||
outw(ioport + CY_PLX_9060_ICS, inw(ioport + CY_PLX_9060_ICS) |
|
||||
CY_PLX_9060_ICS_IENABLE | CY_PLX_9060_ICS_LOCAL_IENABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy_pci.c,v 1.6 1997/09/02 20:06:24 bde Exp $
|
||||
* $Id: cy_pci.c,v 1.7 1998/12/14 06:32:55 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -82,6 +82,7 @@ cy_attach(config_id, unit)
|
||||
void *vaddr;
|
||||
u_int32_t ioport;
|
||||
int adapter;
|
||||
u_int16_t plx_ver;
|
||||
|
||||
ioport = (u_int32_t) pci_conf_read(config_id, CY_PCI_BASE_ADDR1) & ~0x3;
|
||||
paddr = pci_conf_read(config_id, CY_PCI_BASE_ADDR2) & ~0xf;
|
||||
@ -119,8 +120,23 @@ cy_attach(config_id, unit)
|
||||
* Enable the "local" interrupt input to generate a
|
||||
* PCI interrupt.
|
||||
*/
|
||||
outw(ioport + CY_PLX_ICS, inw(ioport + CY_PLX_ICS) |
|
||||
CY_PLX_ICS_IENABLE | CY_PLX_ICS_LOCAL_IENABLE);
|
||||
plx_ver = (*((char *)vaddr + PLX_VER)) & 0x0f;
|
||||
switch (plx_ver) {
|
||||
case PLX_9050:
|
||||
|
||||
outw(ioport + CY_PLX_9050_ICS,
|
||||
inw(ioport + CY_PLX_9050_ICS) | CY_PLX_9050_ICS_IENABLE |
|
||||
CY_PLX_9050_ICS_LOCAL_IENABLE);
|
||||
break;
|
||||
|
||||
case PLX_9060:
|
||||
case PLX_9080:
|
||||
default: /* Old boards, use PLX_9060 */
|
||||
|
||||
outw(ioport + CY_PLX_9060_ICS, inw(ioport + CY_PLX_9060_ICS) |
|
||||
CY_PLX_9060_ICS_IENABLE | CY_PLX_9060_ICS_LOCAL_IENABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: cy_pcireg.h,v 1.3 1997/02/22 09:44:01 peter Exp $
|
||||
*/
|
||||
|
||||
#define CY_VENDORID_CYCLADES 0x120e
|
||||
@ -35,6 +35,15 @@
|
||||
#define CY_PCI_BASE_ADDR1 0x14
|
||||
#define CY_PCI_BASE_ADDR2 0x18
|
||||
|
||||
#define CY_PLX_ICS 0x68
|
||||
#define CY_PLX_ICS_IENABLE 0x100
|
||||
#define CY_PLX_ICS_LOCAL_IENABLE 0x800
|
||||
#define CY_PLX_9050_ICS 0x4c
|
||||
#define CY_PLX_9060_ICS 0x68
|
||||
#define CY_PLX_9050_ICS_IENABLE 0x040
|
||||
#define CY_PLX_9050_ICS_LOCAL_IENABLE 0x001
|
||||
#define CY_PLX_9060_ICS_IENABLE 0x100
|
||||
#define CY_PLX_9060_ICS_LOCAL_IENABLE 0x800
|
||||
|
||||
/* Cyclom-Y Custom Register for PLX ID */
|
||||
#define PLX_VER (0x3400)
|
||||
#define PLX_9050 0x0b
|
||||
#define PLX_9060 0x0c
|
||||
#define PLX_9080 0x0d
|
||||
|
Loading…
Reference in New Issue
Block a user