3 * Copyright 2000-2001 MontaVista Software Inc.
4 * Original author: Armin Kuster akuster@mvista.com
6 * Module name: ibm405gp.c
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
16 #include <linux/config.h>
17 #include <linux/init.h>
18 #include <linux/smp.h>
19 #include <linux/threads.h>
20 #include <linux/param.h>
21 #include <linux/string.h>
22 #include <platforms/4xx/ibm405gp.h>
23 #include <asm/ibm4xx.h>
26 static struct ocp_func_emac_data ibm405gp_emac0_def = {
27 .rgmii_idx = -1, /* No RGMII */
28 .rgmii_mux = -1, /* No RGMII */
29 .zmii_idx = -1, /* ZMII device index */
30 .zmii_mux = 0, /* ZMII input of this EMAC */
31 .mal_idx = 0, /* MAL device index */
32 .mal_rx_chan = 0, /* MAL rx channel number */
33 .mal_tx_chan = 0, /* MAL tx channel number */
34 .wol_irq = 9, /* WOL interrupt number */
35 .mdio_idx = -1, /* No shared MDIO */
36 .tah_idx = -1, /* No TAH */
40 static struct ocp_func_mal_data ibm405gp_mal0_def = {
41 .num_tx_chans = 1, /* Number of TX channels */
42 .num_rx_chans = 1, /* Number of RX channels */
43 .txeob_irq = 11, /* TX End Of Buffer IRQ */
44 .rxeob_irq = 12, /* RX End Of Buffer IRQ */
45 .txde_irq = 13, /* TX Descriptor Error IRQ */
46 .rxde_irq = 14, /* RX Descriptor Error IRQ */
47 .serr_irq = 10, /* MAL System Error IRQ */
51 static struct ocp_func_iic_data ibm405gp_iic0_def = {
52 .fast_mode = 0, /* Use standad mode (100Khz) */
56 struct ocp_def core_ocp[] = {
57 { .vendor = OCP_VENDOR_IBM,
58 .function = OCP_FUNC_OPB,
64 { .vendor = OCP_VENDOR_IBM,
65 .function = OCP_FUNC_16550,
67 .paddr = UART0_IO_BASE,
71 { .vendor = OCP_VENDOR_IBM,
72 .function = OCP_FUNC_16550,
74 .paddr = UART1_IO_BASE,
78 { .vendor = OCP_VENDOR_IBM,
79 .function = OCP_FUNC_IIC,
83 .additions = &ibm405gp_iic0_def,
84 .show = &ocp_show_iic_data,
86 { .vendor = OCP_VENDOR_IBM,
87 .function = OCP_FUNC_GPIO,
92 { .vendor = OCP_VENDOR_IBM,
93 .function = OCP_FUNC_MAL,
94 .paddr = OCP_PADDR_NA,
97 .additions = &ibm405gp_mal0_def,
98 .show = &ocp_show_mal_data,
100 { .vendor = OCP_VENDOR_IBM,
101 .function = OCP_FUNC_EMAC,
106 .additions = &ibm405gp_emac0_def,
107 .show = &ocp_show_emac_data,
109 { .vendor = OCP_VENDOR_INVALID