Merge master.kernel.org:/home/rmk/linux-2.6-arm
[sfrench/cifs-2.6.git] / arch / ppc / platforms / 4xx / ibm440sp.c
1 /*
2  * arch/ppc/platforms/4xx/ibm440sp.c
3  *
4  * PPC440SP I/O descriptions
5  *
6  * Matt Porter <mporter@kernel.crashing.org>
7  * Copyright 2002-2005 MontaVista Software Inc.
8  *
9  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
10  * Copyright (c) 2003, 2004 Zultys Technologies
11  *
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.
16  *
17  */
18 #include <linux/init.h>
19 #include <linux/module.h>
20 #include <platforms/4xx/ibm440sp.h>
21 #include <asm/ocp.h>
22
23 static struct ocp_func_emac_data ibm440sp_emac0_def = {
24         .rgmii_idx      = -1,           /* No RGMII */
25         .rgmii_mux      = -1,           /* No RGMII */
26         .zmii_idx       = -1,           /* No ZMII */
27         .zmii_mux       = -1,           /* No ZMII */
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        = 61,           /* WOL interrupt number */
32         .mdio_idx       = -1,           /* No shared MDIO */
33         .tah_idx        = -1,           /* No TAH */
34         .jumbo          = 1,            /* Jumbo frames supported */
35 };
36 OCP_SYSFS_EMAC_DATA()
37
38 static struct ocp_func_mal_data ibm440sp_mal0_def = {
39         .num_tx_chans   = 1,            /* Number of TX channels */
40         .num_rx_chans   = 1,            /* Number of RX channels */
41         .txeob_irq      = 38,           /* TX End Of Buffer IRQ  */
42         .rxeob_irq      = 39,           /* RX End Of Buffer IRQ  */
43         .txde_irq       = 34,           /* TX Descriptor Error IRQ */
44         .rxde_irq       = 35,           /* RX Descriptor Error IRQ */
45         .serr_irq       = 33,           /* MAL System Error IRQ    */
46         .dcr_base       = DCRN_MAL_BASE /* MAL0_CFG DCR number */
47 };
48 OCP_SYSFS_MAL_DATA()
49
50 static struct ocp_func_iic_data ibm440sp_iic0_def = {
51         .fast_mode      = 0,            /* Use standad mode (100Khz) */
52 };
53
54 static struct ocp_func_iic_data ibm440sp_iic1_def = {
55         .fast_mode      = 0,            /* Use standad mode (100Khz) */
56 };
57 OCP_SYSFS_IIC_DATA()
58
59 struct ocp_def core_ocp[] = {
60         { .vendor       = OCP_VENDOR_IBM,
61           .function     = OCP_FUNC_OPB,
62           .index        = 0,
63           .paddr        = 0x0000000140000000ULL,
64           .irq          = OCP_IRQ_NA,
65           .pm           = OCP_CPM_NA,
66         },
67         { .vendor       = OCP_VENDOR_IBM,
68           .function     = OCP_FUNC_16550,
69           .index        = 0,
70           .paddr        = PPC440SP_UART0_ADDR,
71           .irq          = UART0_INT,
72           .pm           = IBM_CPM_UART0,
73         },
74         { .vendor       = OCP_VENDOR_IBM,
75           .function     = OCP_FUNC_16550,
76           .index        = 1,
77           .paddr        = PPC440SP_UART1_ADDR,
78           .irq          = UART1_INT,
79           .pm           = IBM_CPM_UART1,
80         },
81         { .vendor       = OCP_VENDOR_IBM,
82           .function     = OCP_FUNC_16550,
83           .index        = 2,
84           .paddr        = PPC440SP_UART2_ADDR,
85           .irq          = UART2_INT,
86           .pm           = IBM_CPM_UART2,
87         },
88         { .vendor       = OCP_VENDOR_IBM,
89           .function     = OCP_FUNC_IIC,
90           .index        = 0,
91           .paddr        = 0x00000001f0000400ULL,
92           .irq          = 2,
93           .pm           = IBM_CPM_IIC0,
94           .additions    = &ibm440sp_iic0_def,
95           .show         = &ocp_show_iic_data
96         },
97         { .vendor       = OCP_VENDOR_IBM,
98           .function     = OCP_FUNC_IIC,
99           .index        = 1,
100           .paddr        = 0x00000001f0000500ULL,
101           .irq          = 3,
102           .pm           = IBM_CPM_IIC1,
103           .additions    = &ibm440sp_iic1_def,
104           .show         = &ocp_show_iic_data
105         },
106         { .vendor       = OCP_VENDOR_IBM,
107           .function     = OCP_FUNC_GPIO,
108           .index        = 0,
109           .paddr        = 0x00000001f0000700ULL,
110           .irq          = OCP_IRQ_NA,
111           .pm           = IBM_CPM_GPIO0,
112         },
113         { .vendor       = OCP_VENDOR_IBM,
114           .function     = OCP_FUNC_MAL,
115           .paddr        = OCP_PADDR_NA,
116           .irq          = OCP_IRQ_NA,
117           .pm           = OCP_CPM_NA,
118           .additions    = &ibm440sp_mal0_def,
119           .show         = &ocp_show_mal_data,
120         },
121         { .vendor       = OCP_VENDOR_IBM,
122           .function     = OCP_FUNC_EMAC,
123           .index        = 0,
124           .paddr        = 0x00000001f0000800ULL,
125           .irq          = 60,
126           .pm           = OCP_CPM_NA,
127           .additions    = &ibm440sp_emac0_def,
128           .show         = &ocp_show_emac_data,
129         },
130         { .vendor       = OCP_VENDOR_INVALID
131         }
132 };