/*****************************************************************************/ /* (C) Copyright 1997,1998 by DNA Enterprises, Inc. */ /* All rights reserved */ /*****************************************************************************/ /* PCI.H - S5933 PCI Controller Driver Routines Header */ /* */ /* This module provides routines which configure, control and perform */ /* command and data transfers between the host (PCI side) and the add-on */ /* interface (C6x side). */ /* */ /* MACRO FUNCTIONS: */ /* None. */ /* */ /* FUNCTIONS: */ /* pci_driver_init() - initializes the driver */ /* pci_fifo_open() - opens a channel to the PCI FIFO device */ /* pci_fifo_close() - closes a previously opened channel */ /* pci_fifo_send() - try to send data to the FIFO */ /* pci_fifo_async_send() - begins an asynchronous FIFO send operation */ /* pci_fifo_sync_send() - sends data to the FIFO */ /* pci_fifo_receive() - try to receive data from the FIFO */ /* pci_fifo_async_receive() - begins an asynchronous FIFO receive */ /* pci_fifo_sync_receive() - retrieves data from the FIFO */ /* pci_message_send() - try to send a 32bit message to the host */ /* pci_message_async_send() - begins a send message operation */ /* pci_message_sync_send() - send a 32bit message to the host */ /* pci_message_retrieve() - try to retrieve a message from the host */ /* pci_message_async_retrieve() - begins an asynchronous message retriev*/ /* pci_message_sync_retrieve() - retrieve a 32bit message */ /* amcc_nvram_read() - reads a byte from NVRAM */ /* amcc_nvram_write() - write a byte of data to NVRAM */ /* amcc_mailbox_read() - try to read a mailbox register */ /* amcc_mailbox_write() - try to write to a mailbox register */ /* pci_base_addr - Determines PCI controller base address */ /* */ /* GLOBAL VARIABLES */ /* pciBaseAddr - C6x base address of PCI controller registers */ /* pciFifoAddr - C6x base address of PCI controller FIFOs */ /* */ /*****************************************************************************/ #ifndef _PCI_H_ #define _PCI_H_ /*---------------------------------------------------------------------------*/ /* INCLUDES */ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /* DEFINES AND MACROS */ /*---------------------------------------------------------------------------*/ #define PCI_MAP0_BASE_ADDR 0x01300000 #define PCI_MAP0_FIFO_ADDR 0x01310000 #define PCI_MAP1_BASE_ADDR 0x01700000 #define PCI_MAP1_FIFO_ADDR 0x01710000 /* AMCC S5933 PCI Controller Add-on Register Offsets */ #define AMCC_AIMB1_OFFSET (0x00) /* Add-On Incoming Mailbox 1 register */ #define AMCC_AIMB2_OFFSET (0x04) /* Add-On Incoming Mailbox 2 register */ #define AMCC_AIMB3_OFFSET (0x08) /* Add-On Incoming Mailbox 3 register */ #define AMCC_AIMB4_OFFSET (0x0c) /* Add-On Incoming Mailbox 4 register */ #define AMCC_AOMB1_OFFSET (0x10) /* Add-On Outgoing Mailbox 1 register */ #define AMCC_AOMB2_OFFSET (0x14) /* Add-On Outgoing Mailbox 2 register */ #define AMCC_AOMB3_OFFSET (0x18) /* Add-On Outgoing Mailbox 3 register */ #define AMCC_AOMB4_OFFSET (0x1C) /* Add-On Outgoing Mailbox 4 register */ #define AMCC_AFIFO_OFFSET (0x20) /* Add-On FIFO Port */ #define AMCC_MWAR_OFFSET (0x24) /* Bus Master Write Address Register */ #define AMCC_APTA_OFFSET (0x28) /* Add-On Pass Through Address */ #define AMCC_APTD_OFFSET (0x2C) /* Add-On Pass Through Data */ #define AMCC_MRAR_OFFSET (0x30) /* Bus Master Read Address Register */ #define AMCC_AMBEF_OFFSET (0x34) /* Add-On Mailbox Empty Full Status */ #define AMCC_AINT_OFFSET (0x38) /* Add-On Interrupt Control */ #define AMCC_AGCSTS_OFFSET (0x3C) /* Add-On General Control Status */ #define AMCC_MWTC_OFFSET (0x58) /* Bus Master Write Transfer Count */ #define AMCC_MRTC_OFFSET (0x5C) /* Bus Master Read Transfer Count */ /* AMCC AINT register defines */ #define AMCC_AINT_INT_ASSRTD_BIT (23) /* Interrupt asserted status */ #define AMCC_AINT_INT_ASSRTD_MASK (1<