2 * arch/ppc/platforms/ibm405ep.c
4 * Support for IBM PPC 405EP processors.
6 * Author: SAW (IBM), derived from ibmnp405l.c.
7 * Maintained by MontaVista Software <source@mvista.com>
9 * 2003 (c) MontaVista Softare Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is
11 * licensed "as is" without any warranty of any kind, whether express
15 #include <linux/config.h>
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>
22 #include <asm/ibm4xx.h>
24 #include <asm/ppc4xx_pic.h>
26 #include <platforms/4xx/ibm405ep.h>
28 static struct ocp_func_mal_data ibm405ep_mal0_def
= {
29 .num_tx_chans
= 4, /* Number of TX channels */
30 .num_rx_chans
= 2, /* Number of RX channels */
31 .txeob_irq
= 11, /* TX End Of Buffer IRQ */
32 .rxeob_irq
= 12, /* RX End Of Buffer IRQ */
33 .txde_irq
= 13, /* TX Descriptor Error IRQ */
34 .rxde_irq
= 14, /* RX Descriptor Error IRQ */
35 .serr_irq
= 10, /* MAL System Error IRQ */
39 static struct ocp_func_emac_data ibm405ep_emac0_def
= {
40 .rgmii_idx
= -1, /* No RGMII */
41 .rgmii_mux
= -1, /* No RGMII */
42 .zmii_idx
= -1, /* ZMII device index */
43 .zmii_mux
= 0, /* ZMII input of this EMAC */
44 .mal_idx
= 0, /* MAL device index */
45 .mal_rx_chan
= 0, /* MAL rx channel number */
46 .mal_tx_chan
= 0, /* MAL tx channel number */
47 .wol_irq
= 9, /* WOL interrupt number */
48 .mdio_idx
= 0, /* MDIO via EMAC0 */
49 .tah_idx
= -1, /* No TAH */
52 static struct ocp_func_emac_data ibm405ep_emac1_def
= {
53 .rgmii_idx
= -1, /* No RGMII */
54 .rgmii_mux
= -1, /* No RGMII */
55 .zmii_idx
= -1, /* ZMII device index */
56 .zmii_mux
= 0, /* ZMII input of this EMAC */
57 .mal_idx
= 0, /* MAL device index */
58 .mal_rx_chan
= 1, /* MAL rx channel number */
59 .mal_tx_chan
= 2, /* MAL tx channel number */
60 .wol_irq
= 9, /* WOL interrupt number */
61 .mdio_idx
= 0, /* MDIO via EMAC0 */
62 .tah_idx
= -1, /* No TAH */
66 static struct ocp_func_iic_data ibm405ep_iic0_def
= {
67 .fast_mode
= 0, /* Use standad mode (100Khz) */
71 struct ocp_def core_ocp
[] = {
72 { .vendor
= OCP_VENDOR_IBM
,
73 .function
= OCP_FUNC_OPB
,
79 { .vendor
= OCP_VENDOR_IBM
,
80 .function
= OCP_FUNC_16550
,
82 .paddr
= UART0_IO_BASE
,
86 { .vendor
= OCP_VENDOR_IBM
,
87 .function
= OCP_FUNC_16550
,
89 .paddr
= UART1_IO_BASE
,
93 { .vendor
= OCP_VENDOR_IBM
,
94 .function
= OCP_FUNC_IIC
,
98 .additions
= &ibm405ep_iic0_def
,
99 .show
= &ocp_show_iic_data
101 { .vendor
= OCP_VENDOR_IBM
,
102 .function
= OCP_FUNC_GPIO
,
107 { .vendor
= OCP_VENDOR_IBM
,
108 .function
= OCP_FUNC_MAL
,
109 .paddr
= OCP_PADDR_NA
,
112 .additions
= &ibm405ep_mal0_def
,
113 .show
= &ocp_show_mal_data
115 { .vendor
= OCP_VENDOR_IBM
,
116 .function
= OCP_FUNC_EMAC
,
121 .additions
= &ibm405ep_emac0_def
,
122 .show
= &ocp_show_emac_data
124 { .vendor
= OCP_VENDOR_IBM
,
125 .function
= OCP_FUNC_EMAC
,
130 .additions
= &ibm405ep_emac1_def
,
131 .show
= &ocp_show_emac_data
133 { .vendor
= OCP_VENDOR_INVALID
137 /* Polarity and triggering settings for internal interrupt sources */
138 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg
[] __initdata
= {
139 { .polarity
= 0xffff7f80,
140 .triggering
= 0x00000000,
141 .ext_irq_mask
= 0x0000007f, /* IRQ0 - IRQ6 */