| 1 |
1276 |
phoenix |
/*
|
| 2 |
|
|
* FILE NAME: ocp_ids.h
|
| 3 |
|
|
*
|
| 4 |
|
|
* BRIEF MODULE DESCRIPTION:
|
| 5 |
|
|
* OCP device ids based on the ideas from PCI
|
| 6 |
|
|
*
|
| 7 |
|
|
* The numbers below are almost completely arbitrary, and in fact
|
| 8 |
|
|
* strings might work better. -- paulus
|
| 9 |
|
|
*
|
| 10 |
|
|
*
|
| 11 |
|
|
* This program is free software; you can redistribute it and/or modify it
|
| 12 |
|
|
* under the terms of the GNU General Public License as published by the
|
| 13 |
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
| 14 |
|
|
* option) any later version.
|
| 15 |
|
|
*
|
| 16 |
|
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
| 17 |
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 18 |
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
| 19 |
|
|
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
| 20 |
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
| 21 |
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
| 22 |
|
|
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
| 23 |
|
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 24 |
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
| 25 |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 26 |
|
|
*
|
| 27 |
|
|
* You should have received a copy of the GNU General Public License along
|
| 28 |
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
| 29 |
|
|
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
| 30 |
|
|
*
|
| 31 |
|
|
*/
|
| 32 |
|
|
|
| 33 |
|
|
/*
|
| 34 |
|
|
* Vender device
|
| 35 |
|
|
* [xxxx] [xxxx]
|
| 36 |
|
|
*
|
| 37 |
|
|
* Keep in order, please
|
| 38 |
|
|
*/
|
| 39 |
|
|
|
| 40 |
|
|
/* Vendor IDs 0x0001 - 0xFFFF copied from pci_ids.h */
|
| 41 |
|
|
|
| 42 |
|
|
#define OCP_VENDOR_INVALID 0x0000
|
| 43 |
|
|
#define OCP_VENDOR_ARM 0x0004
|
| 44 |
|
|
#define OCP_VENDOR_IBM 0x1014
|
| 45 |
|
|
#define OCP_VENDOR_MOTOROLA 0x1057
|
| 46 |
|
|
#define OCP_VENDOR_XILINX 0x10ee
|
| 47 |
|
|
#define OCP_VENDOR_UNKNOWN 0xFFFF
|
| 48 |
|
|
|
| 49 |
|
|
/* device identification */
|
| 50 |
|
|
|
| 51 |
|
|
/* define type */
|
| 52 |
|
|
#define OCP_FUNC_INVALID 0x0000
|
| 53 |
|
|
|
| 54 |
|
|
/* system 0x0001 - 0x001F */
|
| 55 |
|
|
|
| 56 |
|
|
/* Timers 0x0020 - 0x002F */
|
| 57 |
|
|
|
| 58 |
|
|
/* Serial 0x0030 - 0x006F*/
|
| 59 |
|
|
#define OCP_FUNC_16550 0x0031
|
| 60 |
|
|
#define OCP_FUNC_IIC 0x0032
|
| 61 |
|
|
#define OCP_FUNC_USB 0x0033
|
| 62 |
|
|
|
| 63 |
|
|
/* Memory devices 0x0090 - 0x009F */
|
| 64 |
|
|
#define OCP_FUNC_MAL 0x0090
|
| 65 |
|
|
#define OCP_FUNC_DMA 0x0091
|
| 66 |
|
|
|
| 67 |
|
|
/* Additional data */
|
| 68 |
|
|
struct ocp_func_mal_data {
|
| 69 |
|
|
int num_tx_chans; /* Number of TX channels */
|
| 70 |
|
|
int num_rx_chans; /* Number of RX channels */
|
| 71 |
|
|
};
|
| 72 |
|
|
|
| 73 |
|
|
/* Display 0x00A0 - 0x00AF */
|
| 74 |
|
|
|
| 75 |
|
|
/* Sound 0x00B0 - 0x00BF */
|
| 76 |
|
|
|
| 77 |
|
|
/* Mass Storage 0x00C0 - 0xxCF */
|
| 78 |
|
|
#define OCP_FUNC_IDE 0x00C0
|
| 79 |
|
|
|
| 80 |
|
|
/* Misc 0x00D0 - 0x00DF*/
|
| 81 |
|
|
#define OCP_FUNC_GPIO 0x00D0
|
| 82 |
|
|
#define OCP_FUNC_ZMII 0x00D1
|
| 83 |
|
|
#define OCP_FUNC_PERFMON 0x00D2 /* Performance Monitor */
|
| 84 |
|
|
|
| 85 |
|
|
/* Network 0x0200 - 0x02FF */
|
| 86 |
|
|
#define OCP_FUNC_EMAC 0x0200
|
| 87 |
|
|
#define OCP_FUNC_GFAR 0x0201 /* TSEC & FEC */
|
| 88 |
|
|
|
| 89 |
|
|
/* Additional data
|
| 90 |
|
|
*
|
| 91 |
|
|
* Note about mdio_idx: When you have a zmii, it's usually
|
| 92 |
|
|
* not necessary, it covers the case of the 405EP which has
|
| 93 |
|
|
* the MDIO lines on EMAC0 only
|
| 94 |
|
|
*/
|
| 95 |
|
|
struct ocp_func_emac_data {
|
| 96 |
|
|
int zmii_idx; /* ZMII device index or -1 */
|
| 97 |
|
|
int zmii_mux; /* ZMII input of this EMAC */
|
| 98 |
|
|
int mal_idx; /* MAL device index */
|
| 99 |
|
|
int mal_rx_chan; /* MAL rx channel number */
|
| 100 |
|
|
int mal_tx1_chan; /* MAL tx channel 1 number */
|
| 101 |
|
|
int mal_tx2_chan; /* MAL tx channel 2 number */
|
| 102 |
|
|
int wol_irq; /* WOL interrupt */
|
| 103 |
|
|
int mdio_idx; /* EMAC idx of MDIO master or -1 */
|
| 104 |
|
|
};
|
| 105 |
|
|
|
| 106 |
|
|
/* Bridge devices 0xE00 - 0xEFF */
|
| 107 |
|
|
#define OCP_FUNC_OPB 0x0E00
|
| 108 |
|
|
|
| 109 |
|
|
#define OCP_FUNC_UNKNOWN 0xFFFF
|