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>
22 #include <asm/ppc4xx_pic.h>
24 static struct ocp_func_emac_data ibm440gp_emac0_def = {
25 .rgmii_idx = -1, /* No RGMII */
26 .rgmii_mux = -1, /* No RGMII */
27 .zmii_idx = 0, /* ZMII device index */
28 .zmii_mux = 0, /* ZMII input of this EMAC */
29 .mal_idx = 0, /* MAL device index */
30 .mal_rx_chan = 0, /* MAL rx channel number */
31 .mal_tx_chan = 0, /* MAL tx channel number */
32 .wol_irq = 61, /* WOL interrupt number */
33 .mdio_idx = -1, /* No shared MDIO */
34 .tah_idx = -1, /* No TAH */
37 static struct ocp_func_emac_data ibm440gp_emac1_def = {
38 .rgmii_idx = -1, /* No RGMII */
39 .rgmii_mux = -1, /* No RGMII */
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_tx_chan = 2, /* MAL tx channel number */
45 .wol_irq = 63, /* WOL interrupt number */
46 .mdio_idx = -1, /* No shared MDIO */
47 .tah_idx = -1, /* No TAH */
51 static struct ocp_func_mal_data ibm440gp_mal0_def = {
52 .num_tx_chans = 4, /* Number of TX channels */
53 .num_rx_chans = 2, /* Number of RX channels */
54 .txeob_irq = 10, /* TX End Of Buffer IRQ */
55 .rxeob_irq = 11, /* RX End Of Buffer IRQ */
56 .txde_irq = 33, /* TX Descriptor Error IRQ */
57 .rxde_irq = 34, /* RX Descriptor Error IRQ */
58 .serr_irq = 32, /* MAL System Error IRQ */
59 .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */
63 static struct ocp_func_iic_data ibm440gp_iic0_def = {
64 .fast_mode = 0, /* Use standad mode (100Khz) */
67 static struct ocp_func_iic_data ibm440gp_iic1_def = {
68 .fast_mode = 0, /* Use standad mode (100Khz) */
72 struct ocp_def core_ocp[] = {
73 { .vendor = OCP_VENDOR_IBM,
74 .function = OCP_FUNC_OPB,
76 .paddr = 0x0000000140000000ULL,
80 { .vendor = OCP_VENDOR_IBM,
81 .function = OCP_FUNC_16550,
83 .paddr = PPC440GP_UART0_ADDR,
87 { .vendor = OCP_VENDOR_IBM,
88 .function = OCP_FUNC_16550,
90 .paddr = PPC440GP_UART1_ADDR,
94 { .vendor = OCP_VENDOR_IBM,
95 .function = OCP_FUNC_IIC,
97 .paddr = 0x0000000140000400ULL,
100 .additions = &ibm440gp_iic0_def,
101 .show = &ocp_show_iic_data
103 { .vendor = OCP_VENDOR_IBM,
104 .function = OCP_FUNC_IIC,
106 .paddr = 0x0000000140000500ULL,
109 .additions = &ibm440gp_iic1_def,
110 .show = &ocp_show_iic_data
112 { .vendor = OCP_VENDOR_IBM,
113 .function = OCP_FUNC_GPIO,
115 .paddr = 0x0000000140000700ULL,
119 { .vendor = OCP_VENDOR_IBM,
120 .function = OCP_FUNC_MAL,
121 .paddr = OCP_PADDR_NA,
124 .additions = &ibm440gp_mal0_def,
125 .show = &ocp_show_mal_data,
127 { .vendor = OCP_VENDOR_IBM,
128 .function = OCP_FUNC_EMAC,
130 .paddr = 0x0000000140000800ULL,
133 .additions = &ibm440gp_emac0_def,
134 .show = &ocp_show_emac_data,
136 { .vendor = OCP_VENDOR_IBM,
137 .function = OCP_FUNC_EMAC,
139 .paddr = 0x0000000140000900ULL,
142 .additions = &ibm440gp_emac1_def,
143 .show = &ocp_show_emac_data,
145 { .vendor = OCP_VENDOR_IBM,
146 .function = OCP_FUNC_ZMII,
147 .paddr = 0x0000000140000780ULL,
151 { .vendor = OCP_VENDOR_INVALID
155 /* Polarity and triggering settings for internal interrupt sources */
156 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
157 { .polarity = 0xfffffe03,
158 .triggering = 0x01c00000,
159 .ext_irq_mask = 0x000001fc, /* IRQ0 - IRQ6 */
161 { .polarity = 0xffffc0ff,
162 .triggering = 0x00ff8000,
163 .ext_irq_mask = 0x00003f00, /* IRQ7 - IRQ12 */