2 * arch/ppc/platforms/ibm440gp.c
4 * PPC440GP I/O descriptions
6 * Matt Porter <mporter@mvista.com>
7 * Copyright 2002-2003 MontaVista Software Inc.
9 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
10 * Copyright (c) 2003 Zultys Technologies
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
18 #include <linux/init.h>
19 #include <linux/module.h>
20 #include <platforms/ibm440gp.h>
23 #if defined(EMAC_NUMS) && EMAC_NUMS > 0
24 u32 emac_phy_map[EMAC_NUMS];
25 EXPORT_SYMBOL(emac_phy_map);
28 static struct ocp_func_emac_data ibm440gp_emac0_def = {
29 .zmii_idx = 0, /* 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_tx1_chan = 0, /* MAL tx channel 1 number */
34 .mal_tx2_chan = 1, /* MAL tx channel 2 number */
35 .wol_irq = BL_MAC_WOL, /* WOL interrupt number */
36 .mdio_idx = -1, /* No shared MDIO */
39 static struct ocp_func_emac_data ibm440gp_emac1_def = {
40 .zmii_idx = 0, /* ZMII device index */
41 .zmii_mux = 1, /* ZMII input of this EMAC */
42 .mal_idx = 0, /* MAL device index */
43 .mal_rx_chan = 1, /* MAL rx channel number */
44 .mal_tx1_chan = 2, /* MAL tx channel 1 number */
45 .mal_tx2_chan = 3, /* MAL tx channel 2 number */
46 .wol_irq = BL_MAC_WOL1, /* WOL interrupt number */
47 .mdio_idx = -1, /* No shared MDIO */
50 static struct ocp_func_mal_data ibm440gp_mal0_def = {
51 .num_tx_chans = 2*EMAC_NUMS, /* Number of TX channels */
52 .num_rx_chans = EMAC_NUMS, /* Number of RX channels */
55 struct ocp_def core_ocp[] __initdata = {
56 { .vendor = OCP_VENDOR_IBM,
57 .function = OCP_FUNC_OPB,
59 .paddr = PPC440GP_OPB_BASE_START,
63 { .vendor = OCP_VENDOR_IBM,
64 .function = OCP_FUNC_16550,
66 .paddr = PPC440GP_UART0_ADDR,
70 { .vendor = OCP_VENDOR_IBM,
71 .function = OCP_FUNC_16550,
73 .paddr = PPC440GP_UART1_ADDR,
77 { .vendor = OCP_VENDOR_IBM,
78 .function = OCP_FUNC_IIC,
80 .paddr = PPC440GP_IIC0_ADDR,
84 { .vendor = OCP_VENDOR_IBM,
85 .function = OCP_FUNC_IIC,
87 .paddr = PPC440GP_IIC1_ADDR,
91 { .vendor = OCP_VENDOR_IBM,
92 .function = OCP_FUNC_GPIO,
94 .paddr = PPC440GP_GPIO0_ADDR,
98 { .vendor = OCP_VENDOR_IBM,
99 .function = OCP_FUNC_MAL,
100 .paddr = OCP_PADDR_NA,
103 .additions = &ibm440gp_mal0_def,
105 { .vendor = OCP_VENDOR_IBM,
106 .function = OCP_FUNC_EMAC,
108 .paddr = PPC440GP_EMAC0_ADDR,
111 .additions = &ibm440gp_emac0_def,
113 { .vendor = OCP_VENDOR_IBM,
114 .function = OCP_FUNC_EMAC,
116 .paddr = PPC440GP_EMAC1_ADDR,
119 .additions = &ibm440gp_emac1_def,
121 { .vendor = OCP_VENDOR_IBM,
122 .function = OCP_FUNC_ZMII,
123 .paddr = PPC440GP_ZMII_ADDR,
127 { .vendor = OCP_VENDOR_INVALID