2 * arch/ppc/platforms/4xx/ibm405gpr.c
4 * Author: Armin Kuster <akuster@mvista.com>
6 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
12 #include <linux/config.h>
13 #include <linux/init.h>
14 #include <linux/smp.h>
15 #include <linux/threads.h>
16 #include <linux/param.h>
17 #include <linux/string.h>
18 #include <platforms/4xx/ibm405gpr.h>
19 #include <asm/ibm4xx.h>
22 static struct ocp_func_emac_data ibm405gpr_emac0_def = {
23 .rgmii_idx = -1, /* No RGMII */
24 .rgmii_mux = -1, /* No RGMII */
25 .zmii_idx = -1, /* ZMII device index */
26 .zmii_mux = 0, /* ZMII input of this EMAC */
27 .mal_idx = 0, /* MAL device index */
28 .mal_rx_chan = 0, /* MAL rx channel number */
29 .mal_tx_chan = 0, /* MAL tx channel number */
30 .wol_irq = 9, /* WOL interrupt number */
31 .mdio_idx = -1, /* No shared MDIO */
32 .tah_idx = -1, /* No TAH */
36 static struct ocp_func_mal_data ibm405gpr_mal0_def = {
37 .num_tx_chans = 1, /* Number of TX channels */
38 .num_rx_chans = 1, /* Number of RX channels */
39 .txeob_irq = 11, /* TX End Of Buffer IRQ */
40 .rxeob_irq = 12, /* RX End Of Buffer IRQ */
41 .txde_irq = 13, /* TX Descriptor Error IRQ */
42 .rxde_irq = 14, /* RX Descriptor Error IRQ */
43 .serr_irq = 10, /* MAL System Error IRQ */
47 static struct ocp_func_iic_data ibm405gpr_iic0_def = {
48 .fast_mode = 0, /* Use standad mode (100Khz) */
53 struct ocp_def core_ocp[] = {
54 { .vendor = OCP_VENDOR_IBM,
55 .function = OCP_FUNC_OPB,
61 { .vendor = OCP_VENDOR_IBM,
62 .function = OCP_FUNC_16550,
64 .paddr = UART0_IO_BASE,
68 { .vendor = OCP_VENDOR_IBM,
69 .function = OCP_FUNC_16550,
71 .paddr = UART1_IO_BASE,
75 { .vendor = OCP_VENDOR_IBM,
76 .function = OCP_FUNC_IIC,
80 .additions = &ibm405gpr_iic0_def,
81 .show = &ocp_show_iic_data,
83 { .vendor = OCP_VENDOR_IBM,
84 .function = OCP_FUNC_GPIO,
89 { .vendor = OCP_VENDOR_IBM,
90 .function = OCP_FUNC_MAL,
91 .paddr = OCP_PADDR_NA,
94 .additions = &ibm405gpr_mal0_def,
95 .show = &ocp_show_mal_data,
97 { .vendor = OCP_VENDOR_IBM,
98 .function = OCP_FUNC_EMAC,
103 .additions = &ibm405gpr_emac0_def,
104 .show = &ocp_show_emac_data,
106 { .vendor = OCP_VENDOR_INVALID