diff options
Diffstat (limited to 'arch/ppc/platforms/4xx/ibm440sp.c')
-rw-r--r-- | arch/ppc/platforms/4xx/ibm440sp.c | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c new file mode 100644 index 000000000000..a203efb47aba --- /dev/null +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -0,0 +1,131 @@ | |||
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 = 4, /* Number of TX channels */ | ||
40 | .num_rx_chans = 4, /* 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 | }; | ||
47 | OCP_SYSFS_MAL_DATA() | ||
48 | |||
49 | static struct ocp_func_iic_data ibm440sp_iic0_def = { | ||
50 | .fast_mode = 0, /* Use standad mode (100Khz) */ | ||
51 | }; | ||
52 | |||
53 | static struct ocp_func_iic_data ibm440sp_iic1_def = { | ||
54 | .fast_mode = 0, /* Use standad mode (100Khz) */ | ||
55 | }; | ||
56 | OCP_SYSFS_IIC_DATA() | ||
57 | |||
58 | struct ocp_def core_ocp[] = { | ||
59 | { .vendor = OCP_VENDOR_IBM, | ||
60 | .function = OCP_FUNC_OPB, | ||
61 | .index = 0, | ||
62 | .paddr = 0x0000000140000000ULL, | ||
63 | .irq = OCP_IRQ_NA, | ||
64 | .pm = OCP_CPM_NA, | ||
65 | }, | ||
66 | { .vendor = OCP_VENDOR_IBM, | ||
67 | .function = OCP_FUNC_16550, | ||
68 | .index = 0, | ||
69 | .paddr = PPC440SP_UART0_ADDR, | ||
70 | .irq = UART0_INT, | ||
71 | .pm = IBM_CPM_UART0, | ||
72 | }, | ||
73 | { .vendor = OCP_VENDOR_IBM, | ||
74 | .function = OCP_FUNC_16550, | ||
75 | .index = 1, | ||
76 | .paddr = PPC440SP_UART1_ADDR, | ||
77 | .irq = UART1_INT, | ||
78 | .pm = IBM_CPM_UART1, | ||
79 | }, | ||
80 | { .vendor = OCP_VENDOR_IBM, | ||
81 | .function = OCP_FUNC_16550, | ||
82 | .index = 2, | ||
83 | .paddr = PPC440SP_UART2_ADDR, | ||
84 | .irq = UART2_INT, | ||
85 | .pm = IBM_CPM_UART2, | ||
86 | }, | ||
87 | { .vendor = OCP_VENDOR_IBM, | ||
88 | .function = OCP_FUNC_IIC, | ||
89 | .index = 0, | ||
90 | .paddr = 0x00000001f0000400ULL, | ||
91 | .irq = 2, | ||
92 | .pm = IBM_CPM_IIC0, | ||
93 | .additions = &ibm440sp_iic0_def, | ||
94 | .show = &ocp_show_iic_data | ||
95 | }, | ||
96 | { .vendor = OCP_VENDOR_IBM, | ||
97 | .function = OCP_FUNC_IIC, | ||
98 | .index = 1, | ||
99 | .paddr = 0x00000001f0000500ULL, | ||
100 | .irq = 3, | ||
101 | .pm = IBM_CPM_IIC1, | ||
102 | .additions = &ibm440sp_iic1_def, | ||
103 | .show = &ocp_show_iic_data | ||
104 | }, | ||
105 | { .vendor = OCP_VENDOR_IBM, | ||
106 | .function = OCP_FUNC_GPIO, | ||
107 | .index = 0, | ||
108 | .paddr = 0x00000001f0000700ULL, | ||
109 | .irq = OCP_IRQ_NA, | ||
110 | .pm = IBM_CPM_GPIO0, | ||
111 | }, | ||
112 | { .vendor = OCP_VENDOR_IBM, | ||
113 | .function = OCP_FUNC_MAL, | ||
114 | .paddr = OCP_PADDR_NA, | ||
115 | .irq = OCP_IRQ_NA, | ||
116 | .pm = OCP_CPM_NA, | ||
117 | .additions = &ibm440sp_mal0_def, | ||
118 | .show = &ocp_show_mal_data, | ||
119 | }, | ||
120 | { .vendor = OCP_VENDOR_IBM, | ||
121 | .function = OCP_FUNC_EMAC, | ||
122 | .index = 0, | ||
123 | .paddr = 0x00000001f0000800ULL, | ||
124 | .irq = 60, | ||
125 | .pm = OCP_CPM_NA, | ||
126 | .additions = &ibm440sp_emac0_def, | ||
127 | .show = &ocp_show_emac_data, | ||
128 | }, | ||
129 | { .vendor = OCP_VENDOR_INVALID | ||
130 | } | ||
131 | }; | ||