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.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <linux/config.h>
31 #include <linux/init.h>
32 #include <linux/smp.h>
33 #include <linux/threads.h>
34 #include <linux/param.h>
35 #include <linux/string.h>
36 #include <platforms/ibm405gp.h>
37 #include <asm/ibm4xx.h>
40 static struct ocp_func_emac_data ibm405gp_emac0_def = {
41 .zmii_idx = -1, /* ZMII device index */
42 .zmii_mux = 0, /* ZMII input of this EMAC */
43 .mal_idx = 0, /* MAL device index */
44 .mal_rx_chan = 0, /* MAL rx channel number */
45 .mal_tx1_chan = 0, /* MAL tx channel 1 number */
46 .mal_tx2_chan = 1, /* MAL tx channel 2 number */
47 .wol_irq = BL_MAC_WOL, /* WOL interrupt number */
48 .mdio_idx = -1, /* No shared MDIO */
51 static struct ocp_func_mal_data ibm405gp_mal0_def = {
52 .num_tx_chans = 2*EMAC_NUMS, /* Number of TX channels */
53 .num_rx_chans = EMAC_NUMS, /* Number of RX channels */
56 struct ocp_def core_ocp[] __initdata = {
57 { .vendor = OCP_VENDOR_IBM,
58 .function = OCP_FUNC_OPB,
60 .paddr = OPB_BASE_START,
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,
84 { .vendor = OCP_VENDOR_IBM,
85 .function = OCP_FUNC_GPIO,
90 { .vendor = OCP_VENDOR_IBM,
91 .function = OCP_FUNC_MAL,
92 .paddr = OCP_PADDR_NA,
95 .additions = &ibm405gp_mal0_def,
97 { .vendor = OCP_VENDOR_IBM,
98 .function = OCP_FUNC_EMAC,
103 .additions = &ibm405gp_emac0_def,
105 { .vendor = OCP_VENDOR_INVALID