2 * arch/ppc/platforms/4xx/ibm440gp.c
4 * PPC440GP I/O descriptions
6 * Matt Porter <mporter@mvista.com>
7 * Copyright 2002-2004 MontaVista Software Inc.
9 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
10 * Copyright (c) 2003, 2004 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/4xx/ibm440gp.h>
23 static struct ocp_func_emac_data ibm440gp_emac0_def
= {
24 .rgmii_idx
= -1, /* No RGMII */
25 .rgmii_mux
= -1, /* No RGMII */
26 .zmii_idx
= 0, /* ZMII device index */
27 .zmii_mux
= 0, /* ZMII input of this EMAC */
28 .mal_idx
= 0, /* MAL device index */
29 .mal_rx_chan
= 0, /* MAL rx channel number */
30 .mal_tx_chan
= 0, /* MAL tx channel number */
31 .wol_irq
= 61, /* WOL interrupt number */
32 .mdio_idx
= -1, /* No shared MDIO */
33 .tah_idx
= -1, /* No TAH */
36 static struct ocp_func_emac_data ibm440gp_emac1_def
= {
37 .rgmii_idx
= -1, /* No RGMII */
38 .rgmii_mux
= -1, /* No RGMII */
39 .zmii_idx
= 0, /* ZMII device index */
40 .zmii_mux
= 1, /* ZMII input of this EMAC */
41 .mal_idx
= 0, /* MAL device index */
42 .mal_rx_chan
= 1, /* MAL rx channel number */
43 .mal_tx_chan
= 2, /* MAL tx channel number */
44 .wol_irq
= 63, /* WOL interrupt number */
45 .mdio_idx
= -1, /* No shared MDIO */
46 .tah_idx
= -1, /* No TAH */
50 static struct ocp_func_mal_data ibm440gp_mal0_def
= {
51 .num_tx_chans
= 4, /* Number of TX channels */
52 .num_rx_chans
= 2, /* Number of RX channels */
53 .txeob_irq
= 10, /* TX End Of Buffer IRQ */
54 .rxeob_irq
= 11, /* RX End Of Buffer IRQ */
55 .txde_irq
= 33, /* TX Descriptor Error IRQ */
56 .rxde_irq
= 34, /* RX Descriptor Error IRQ */
57 .serr_irq
= 32, /* MAL System Error IRQ */
61 static struct ocp_func_iic_data ibm440gp_iic0_def
= {
62 .fast_mode
= 0, /* Use standad mode (100Khz) */
65 static struct ocp_func_iic_data ibm440gp_iic1_def
= {
66 .fast_mode
= 0, /* Use standad mode (100Khz) */
70 struct ocp_def core_ocp
[] = {
71 { .vendor
= OCP_VENDOR_IBM
,
72 .function
= OCP_FUNC_OPB
,
74 .paddr
= 0x0000000140000000ULL
,
78 { .vendor
= OCP_VENDOR_IBM
,
79 .function
= OCP_FUNC_16550
,
81 .paddr
= PPC440GP_UART0_ADDR
,
85 { .vendor
= OCP_VENDOR_IBM
,
86 .function
= OCP_FUNC_16550
,
88 .paddr
= PPC440GP_UART1_ADDR
,
92 { .vendor
= OCP_VENDOR_IBM
,
93 .function
= OCP_FUNC_IIC
,
95 .paddr
= 0x0000000140000400ULL
,
98 .additions
= &ibm440gp_iic0_def
,
99 .show
= &ocp_show_iic_data
101 { .vendor
= OCP_VENDOR_IBM
,
102 .function
= OCP_FUNC_IIC
,
104 .paddr
= 0x0000000140000500ULL
,
107 .additions
= &ibm440gp_iic1_def
,
108 .show
= &ocp_show_iic_data
110 { .vendor
= OCP_VENDOR_IBM
,
111 .function
= OCP_FUNC_GPIO
,
113 .paddr
= 0x0000000140000700ULL
,
117 { .vendor
= OCP_VENDOR_IBM
,
118 .function
= OCP_FUNC_MAL
,
119 .paddr
= OCP_PADDR_NA
,
122 .additions
= &ibm440gp_mal0_def
,
123 .show
= &ocp_show_mal_data
,
125 { .vendor
= OCP_VENDOR_IBM
,
126 .function
= OCP_FUNC_EMAC
,
128 .paddr
= 0x0000000140000800ULL
,
131 .additions
= &ibm440gp_emac0_def
,
132 .show
= &ocp_show_emac_data
,
134 { .vendor
= OCP_VENDOR_IBM
,
135 .function
= OCP_FUNC_EMAC
,
137 .paddr
= 0x0000000140000900ULL
,
140 .additions
= &ibm440gp_emac1_def
,
141 .show
= &ocp_show_emac_data
,
143 { .vendor
= OCP_VENDOR_IBM
,
144 .function
= OCP_FUNC_ZMII
,
145 .paddr
= 0x0000000140000780ULL
,
149 { .vendor
= OCP_VENDOR_INVALID