2 * arch/ppc/platforms/4xx/ibm405gpr.c
4 * Author: Armin Kuster <akuster@mvista.com>
6 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
12 #include <linux/config.h>
13 #include <linux/init.h>
14 #include <linux/smp.h>
15 #include <linux/threads.h>
16 #include <linux/param.h>
17 #include <linux/string.h>
18 #include <platforms/4xx/ibm405gpr.h>
19 #include <asm/ibm4xx.h>
21 #include <asm/ppc4xx_pic.h>
23 static struct ocp_func_emac_data ibm405gpr_emac0_def = {
24 .rgmii_idx = -1, /* No RGMII */
25 .rgmii_mux = -1, /* No RGMII */
26 .zmii_idx = -1, /* 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 = 9, /* WOL interrupt number */
32 .mdio_idx = -1, /* No shared MDIO */
33 .tah_idx = -1, /* No TAH */
37 static struct ocp_func_mal_data ibm405gpr_mal0_def = {
38 .num_tx_chans = 1, /* Number of TX channels */
39 .num_rx_chans = 1, /* Number of RX channels */
40 .txeob_irq = 11, /* TX End Of Buffer IRQ */
41 .rxeob_irq = 12, /* RX End Of Buffer IRQ */
42 .txde_irq = 13, /* TX Descriptor Error IRQ */
43 .rxde_irq = 14, /* RX Descriptor Error IRQ */
44 .serr_irq = 10, /* MAL System Error IRQ */
48 static struct ocp_func_iic_data ibm405gpr_iic0_def = {
49 .fast_mode = 0, /* Use standad mode (100Khz) */
54 struct ocp_def core_ocp[] = {
55 { .vendor = OCP_VENDOR_IBM,
56 .function = OCP_FUNC_OPB,
62 { .vendor = OCP_VENDOR_IBM,
63 .function = OCP_FUNC_16550,
65 .paddr = UART0_IO_BASE,
69 { .vendor = OCP_VENDOR_IBM,
70 .function = OCP_FUNC_16550,
72 .paddr = UART1_IO_BASE,
76 { .vendor = OCP_VENDOR_IBM,
77 .function = OCP_FUNC_IIC,
81 .additions = &ibm405gpr_iic0_def,
82 .show = &ocp_show_iic_data,
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 = &ibm405gpr_mal0_def,
96 .show = &ocp_show_mal_data,
98 { .vendor = OCP_VENDOR_IBM,
99 .function = OCP_FUNC_EMAC,
104 .additions = &ibm405gpr_emac0_def,
105 .show = &ocp_show_emac_data,
107 { .vendor = OCP_VENDOR_INVALID
111 /* Polarity and triggering settings for internal interrupt sources */
112 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
113 { .polarity = 0xffffe000,
114 .triggering = 0x10000000,
115 .ext_irq_mask = 0x00001fff, /* IRQ7 - IRQ12, IRQ0 - IRQ6 */