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.
16 #include <linux/init.h>
17 #include <linux/smp.h>
18 #include <linux/threads.h>
19 #include <linux/param.h>
20 #include <linux/string.h>
21 #include <platforms/4xx/ibm405gp.h>
22 #include <asm/ibm4xx.h>
24 #include <asm/ppc4xx_pic.h>
26 static struct ocp_func_emac_data ibm405gp_emac0_def = {
27 .rgmii_idx = -1, /* No RGMII */
28 .rgmii_mux = -1, /* No RGMII */
29 .zmii_idx = -1, /* 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_tx_chan = 0, /* MAL tx channel number */
34 .wol_irq = 9, /* WOL interrupt number */
35 .mdio_idx = -1, /* No shared MDIO */
36 .tah_idx = -1, /* No TAH */
40 static struct ocp_func_mal_data ibm405gp_mal0_def = {
41 .num_tx_chans = 1, /* Number of TX channels */
42 .num_rx_chans = 1, /* Number of RX channels */
43 .txeob_irq = 11, /* TX End Of Buffer IRQ */
44 .rxeob_irq = 12, /* RX End Of Buffer IRQ */
45 .txde_irq = 13, /* TX Descriptor Error IRQ */
46 .rxde_irq = 14, /* RX Descriptor Error IRQ */
47 .serr_irq = 10, /* MAL System Error IRQ */
48 .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */
52 static struct ocp_func_iic_data ibm405gp_iic0_def = {
53 .fast_mode = 0, /* Use standad mode (100Khz) */
57 struct ocp_def core_ocp[] = {
58 { .vendor = OCP_VENDOR_IBM,
59 .function = OCP_FUNC_OPB,
65 { .vendor = OCP_VENDOR_IBM,
66 .function = OCP_FUNC_16550,
68 .paddr = UART0_IO_BASE,
72 { .vendor = OCP_VENDOR_IBM,
73 .function = OCP_FUNC_16550,
75 .paddr = UART1_IO_BASE,
79 { .vendor = OCP_VENDOR_IBM,
80 .function = OCP_FUNC_IIC,
84 .additions = &ibm405gp_iic0_def,
85 .show = &ocp_show_iic_data,
87 { .vendor = OCP_VENDOR_IBM,
88 .function = OCP_FUNC_GPIO,
93 { .vendor = OCP_VENDOR_IBM,
94 .function = OCP_FUNC_MAL,
95 .paddr = OCP_PADDR_NA,
98 .additions = &ibm405gp_mal0_def,
99 .show = &ocp_show_mal_data,
101 { .vendor = OCP_VENDOR_IBM,
102 .function = OCP_FUNC_EMAC,
107 .additions = &ibm405gp_emac0_def,
108 .show = &ocp_show_emac_data,
110 { .vendor = OCP_VENDOR_INVALID
114 /* Polarity and triggering settings for internal interrupt sources */
115 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
116 { .polarity = 0xffffff80,
117 .triggering = 0x10000000,
118 .ext_irq_mask = 0x0000007f, /* IRQ0 - IRQ6 */