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 */
45 .dcr_base
= DCRN_MAL_BASE
/* MAL0_CFG DCR number */
49 static struct ocp_func_iic_data ibm405gpr_iic0_def
= {
50 .fast_mode
= 0, /* Use standad mode (100Khz) */
55 struct ocp_def core_ocp
[] = {
56 { .vendor
= OCP_VENDOR_IBM
,
57 .function
= OCP_FUNC_OPB
,
63 { .vendor
= OCP_VENDOR_IBM
,
64 .function
= OCP_FUNC_16550
,
66 .paddr
= UART0_IO_BASE
,
70 { .vendor
= OCP_VENDOR_IBM
,
71 .function
= OCP_FUNC_16550
,
73 .paddr
= UART1_IO_BASE
,
77 { .vendor
= OCP_VENDOR_IBM
,
78 .function
= OCP_FUNC_IIC
,
82 .additions
= &ibm405gpr_iic0_def
,
83 .show
= &ocp_show_iic_data
,
85 { .vendor
= OCP_VENDOR_IBM
,
86 .function
= OCP_FUNC_GPIO
,
91 { .vendor
= OCP_VENDOR_IBM
,
92 .function
= OCP_FUNC_MAL
,
93 .paddr
= OCP_PADDR_NA
,
96 .additions
= &ibm405gpr_mal0_def
,
97 .show
= &ocp_show_mal_data
,
99 { .vendor
= OCP_VENDOR_IBM
,
100 .function
= OCP_FUNC_EMAC
,
105 .additions
= &ibm405gpr_emac0_def
,
106 .show
= &ocp_show_emac_data
,
108 { .vendor
= OCP_VENDOR_INVALID
112 /* Polarity and triggering settings for internal interrupt sources */
113 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg
[] __initdata
= {
114 { .polarity
= 0xffffe000,
115 .triggering
= 0x10000000,
116 .ext_irq_mask
= 0x00001fff, /* IRQ7 - IRQ12, IRQ0 - IRQ6 */