diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-07 19:14:20 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-07 19:14:20 -0500 |
commit | 24bfb00123e82a2e70bd115277d922438813515b (patch) | |
tree | 27328b8a5718e16d64e2d101f4b7ddcad5930aed /arch/ppc/platforms | |
parent | c6135234550ed89a6fd0e8cb229633967e41d649 (diff) | |
parent | 3f00d3e8fb963968a922d821a9a53b503b687e81 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'arch/ppc/platforms')
-rw-r--r-- | arch/ppc/platforms/4xx/Kconfig | 19 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/bubinga.c | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/bubinga.h | 64 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/ebony.h | 4 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/ppc440spe.c | 148 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/ppc440spe.h | 66 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/sycamore.c | 7 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/sycamore.h | 67 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/walnut.c | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/walnut.h | 67 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/yucca.c | 395 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/yucca.h | 111 | ||||
-rw-r--r-- | arch/ppc/platforms/85xx/mpc85xx_ads_common.c | 10 | ||||
-rw-r--r-- | arch/ppc/platforms/85xx/stx_gp3.c | 14 | ||||
-rw-r--r-- | arch/ppc/platforms/ev64360.c | 12 |
16 files changed, 856 insertions, 134 deletions
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index 76f4476cab44..d8837911bbc6 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -82,6 +82,12 @@ config LUAN | |||
82 | help | 82 | help |
83 | This option enables support for the IBM PPC440SP evaluation board. | 83 | This option enables support for the IBM PPC440SP evaluation board. |
84 | 84 | ||
85 | config YUCCA | ||
86 | bool "Yucca" | ||
87 | select WANT_EARLY_SERIAL | ||
88 | help | ||
89 | This option enables support for the AMCC PPC440SPe evaluation board. | ||
90 | |||
85 | config OCOTEA | 91 | config OCOTEA |
86 | bool "Ocotea" | 92 | bool "Ocotea" |
87 | select WANT_EARLY_SERIAL | 93 | select WANT_EARLY_SERIAL |
@@ -124,9 +130,14 @@ config 440SP | |||
124 | depends on LUAN | 130 | depends on LUAN |
125 | default y | 131 | default y |
126 | 132 | ||
133 | config 440SPE | ||
134 | bool | ||
135 | depends on YUCCA | ||
136 | default y | ||
137 | |||
127 | config 440 | 138 | config 440 |
128 | bool | 139 | bool |
129 | depends on 440GP || 440SP || 440EP | 140 | depends on 440GP || 440SP || 440SPE || 440EP |
130 | default y | 141 | default y |
131 | 142 | ||
132 | config 440A | 143 | config 440A |
@@ -158,7 +169,7 @@ config BOOKE | |||
158 | 169 | ||
159 | config IBM_OCP | 170 | config IBM_OCP |
160 | bool | 171 | bool |
161 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 172 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT |
162 | default y | 173 | default y |
163 | 174 | ||
164 | config XILINX_OCP | 175 | config XILINX_OCP |
@@ -168,7 +179,7 @@ config XILINX_OCP | |||
168 | 179 | ||
169 | config IBM_EMAC4 | 180 | config IBM_EMAC4 |
170 | bool | 181 | bool |
171 | depends on 440GX || 440SP | 182 | depends on 440GX || 440SP || 440SPE |
172 | default y | 183 | default y |
173 | 184 | ||
174 | config BIOS_FIXUP | 185 | config BIOS_FIXUP |
@@ -214,7 +225,7 @@ config EMBEDDEDBOOT | |||
214 | 225 | ||
215 | config IBM_OPENBIOS | 226 | config IBM_OPENBIOS |
216 | bool | 227 | bool |
217 | depends on ASH || BUBINGA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 228 | depends on ASH || REDWOOD_5 || REDWOOD_6 |
218 | default y | 229 | default y |
219 | 230 | ||
220 | config PPC4xx_DMA | 231 | config PPC4xx_DMA |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index 1dd6d7fd6a9a..c9bb61170954 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -7,6 +7,7 @@ obj-$(CONFIG_EBONY) += ebony.o | |||
7 | obj-$(CONFIG_EP405) += ep405.o | 7 | obj-$(CONFIG_EP405) += ep405.o |
8 | obj-$(CONFIG_BUBINGA) += bubinga.o | 8 | obj-$(CONFIG_BUBINGA) += bubinga.o |
9 | obj-$(CONFIG_LUAN) += luan.o | 9 | obj-$(CONFIG_LUAN) += luan.o |
10 | obj-$(CONFIG_YUCCA) += yucca.o | ||
10 | obj-$(CONFIG_OCOTEA) += ocotea.o | 11 | obj-$(CONFIG_OCOTEA) += ocotea.o |
11 | obj-$(CONFIG_REDWOOD_5) += redwood5.o | 12 | obj-$(CONFIG_REDWOOD_5) += redwood5.o |
12 | obj-$(CONFIG_REDWOOD_6) += redwood6.o | 13 | obj-$(CONFIG_REDWOOD_6) += redwood6.o |
@@ -22,6 +23,7 @@ obj-$(CONFIG_440EP) += ibm440ep.o | |||
22 | obj-$(CONFIG_440GP) += ibm440gp.o | 23 | obj-$(CONFIG_440GP) += ibm440gp.o |
23 | obj-$(CONFIG_440GX) += ibm440gx.o | 24 | obj-$(CONFIG_440GX) += ibm440gx.o |
24 | obj-$(CONFIG_440SP) += ibm440sp.o | 25 | obj-$(CONFIG_440SP) += ibm440sp.o |
26 | obj-$(CONFIG_440SPE) += ppc440spe.o | ||
25 | obj-$(CONFIG_405EP) += ibm405ep.o | 27 | obj-$(CONFIG_405EP) += ibm405ep.o |
26 | obj-$(CONFIG_405GPR) += ibm405gpr.o | 28 | obj-$(CONFIG_405GPR) += ibm405gpr.o |
27 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o | 29 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o |
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c index 3678abf86313..8110f55668c5 100644 --- a/arch/ppc/platforms/4xx/bubinga.c +++ b/arch/ppc/platforms/4xx/bubinga.c | |||
@@ -89,7 +89,7 @@ bubinga_early_serial_map(void) | |||
89 | * by 16. | 89 | * by 16. |
90 | */ | 90 | */ |
91 | uart_div = (mfdcr(DCRN_CPC0_UCR_BASE) & DCRN_CPC0_UCR_U0DIV); | 91 | uart_div = (mfdcr(DCRN_CPC0_UCR_BASE) & DCRN_CPC0_UCR_U0DIV); |
92 | uart_clock = __res.bi_pllouta_freq / uart_div; | 92 | uart_clock = __res.bi_procfreq / uart_div; |
93 | 93 | ||
94 | /* Setup serial port access */ | 94 | /* Setup serial port access */ |
95 | memset(&port, 0, sizeof(port)); | 95 | memset(&port, 0, sizeof(port)); |
diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h index b1df856f8e22..b5380cfaf5c0 100644 --- a/arch/ppc/platforms/4xx/bubinga.h +++ b/arch/ppc/platforms/4xx/bubinga.h | |||
@@ -1,52 +1,34 @@ | |||
1 | /* | 1 | /* |
2 | * Support for IBM PPC 405EP evaluation board (Bubinga). | 2 | * arch/ppc/platforms/4xx/bubinga.h |
3 | * | 3 | * |
4 | * Author: SAW (IBM), derived from walnut.h. | 4 | * Bubinga board definitions |
5 | * Maintained by MontaVista Software <source@mvista.com> | 5 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | ||
7 | * Stefan Roese <sr@denx.de> | ||
8 | * | ||
9 | * Based on original work by | ||
10 | * SAW (IBM) | ||
11 | * 2003 (c) MontaVista Softare Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
6 | * | 17 | * |
7 | * 2003 (c) MontaVista Softare Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is | ||
9 | * licensed "as is" without any warranty of any kind, whether express | ||
10 | * or implied. | ||
11 | */ | 18 | */ |
12 | 19 | ||
13 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
14 | #ifndef __BUBINGA_H__ | 21 | #ifndef __BUBINGA_H__ |
15 | #define __BUBINGA_H__ | 22 | #define __BUBINGA_H__ |
16 | 23 | ||
17 | /* 405EP */ | 24 | #include <linux/config.h> |
18 | #include <platforms/4xx/ibm405ep.h> | 25 | #include <platforms/4xx/ibm405ep.h> |
19 | 26 | #include <asm/ppcboot.h> | |
20 | #ifndef __ASSEMBLY__ | ||
21 | /* | ||
22 | * Data structure defining board information maintained by the boot | ||
23 | * ROM on IBM's evaluation board. An effort has been made to | ||
24 | * keep the field names consistent with the 8xx 'bd_t' board info | ||
25 | * structures. | ||
26 | */ | ||
27 | |||
28 | typedef struct board_info { | ||
29 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
30 | unsigned char bi_r_version[30]; /* Version of the IBM ROM */ | ||
31 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
32 | unsigned char bi_enetaddr[2][6]; /* Local Ethernet MAC address */ unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */ | ||
33 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
34 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
35 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
36 | unsigned int bi_opb_busfreq; /* OPB Bus speed, in Hz */ | ||
37 | unsigned int bi_pllouta_freq; /* PLL OUTA speed, in Hz */ | ||
38 | } bd_t; | ||
39 | |||
40 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
41 | */ | ||
42 | #define bi_tbfreq bi_intfreq | ||
43 | |||
44 | 27 | ||
45 | /* Memory map for the Bubinga board. | 28 | /* Memory map for the Bubinga board. |
46 | * Generic 4xx plus RTC. | 29 | * Generic 4xx plus RTC. |
47 | */ | 30 | */ |
48 | 31 | ||
49 | extern void *bubinga_rtc_base; | ||
50 | #define BUBINGA_RTC_PADDR ((uint)0xf0000000) | 32 | #define BUBINGA_RTC_PADDR ((uint)0xf0000000) |
51 | #define BUBINGA_RTC_VADDR BUBINGA_RTC_PADDR | 33 | #define BUBINGA_RTC_VADDR BUBINGA_RTC_PADDR |
52 | #define BUBINGA_RTC_SIZE ((uint)8*1024) | 34 | #define BUBINGA_RTC_SIZE ((uint)8*1024) |
@@ -58,12 +40,18 @@ extern void *bubinga_rtc_base; | |||
58 | * for typical configurations at various CPU speeds. | 40 | * for typical configurations at various CPU speeds. |
59 | * The base baud is calculated as (FWDA / EXT UART DIV / 16) | 41 | * The base baud is calculated as (FWDA / EXT UART DIV / 16) |
60 | */ | 42 | */ |
61 | #define BASE_BAUD 0 | 43 | #define BASE_BAUD 0 |
62 | 44 | ||
63 | #define BUBINGA_FPGA_BASE 0xF0300000 | 45 | /* Flash */ |
46 | #define PPC40x_FPGA_BASE 0xF0300000 | ||
47 | #define PPC40x_FPGA_REG_OFFS 1 /* offset to flash map reg */ | ||
48 | #define PPC40x_FLASH_ONBD_N(x) (x & 0x02) | ||
49 | #define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01) | ||
50 | #define PPC40x_FLASH_LOW 0xFFF00000 | ||
51 | #define PPC40x_FLASH_HIGH 0xFFF80000 | ||
52 | #define PPC40x_FLASH_SIZE 0x80000 | ||
64 | 53 | ||
65 | #define PPC4xx_MACHINE_NAME "IBM Bubinga" | 54 | #define PPC4xx_MACHINE_NAME "IBM Bubinga" |
66 | 55 | ||
67 | #endif /* !__ASSEMBLY__ */ | ||
68 | #endif /* __BUBINGA_H__ */ | 56 | #endif /* __BUBINGA_H__ */ |
69 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h index d08faa46a0ae..b91ad4272dfe 100644 --- a/arch/ppc/platforms/4xx/ebony.h +++ b/arch/ppc/platforms/4xx/ebony.h | |||
@@ -24,8 +24,8 @@ | |||
24 | #define PPC44x_EMAC0_MR0 0xE0000800 | 24 | #define PPC44x_EMAC0_MR0 0xE0000800 |
25 | 25 | ||
26 | /* Where to find the MAC info */ | 26 | /* Where to find the MAC info */ |
27 | #define EBONY_OPENBIOS_MAC_BASE 0xfffffe0c | 27 | #define OPENBIOS_MAC_BASE 0xfffffe0c |
28 | #define EBONY_OPENBIOS_MAC_OFFSET 0x0c | 28 | #define OPENBIOS_MAC_OFFSET 0x0c |
29 | 29 | ||
30 | /* Default clock rates for Rev. B and Rev. C silicon */ | 30 | /* Default clock rates for Rev. B and Rev. C silicon */ |
31 | #define EBONY_440GP_RB_SYSCLK 33000000 | 31 | #define EBONY_440GP_RB_SYSCLK 33000000 |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.c b/arch/ppc/platforms/4xx/ppc440spe.c new file mode 100644 index 000000000000..6139a0b3393e --- /dev/null +++ b/arch/ppc/platforms/4xx/ppc440spe.c | |||
@@ -0,0 +1,148 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/ppc440spe.c | ||
3 | * | ||
4 | * PPC440SPe I/O descriptions | ||
5 | * | ||
6 | * Roland Dreier <rolandd@cisco.com> | ||
7 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
8 | * | ||
9 | * Matt Porter <mporter@kernel.crashing.org> | ||
10 | * Copyright 2002-2005 MontaVista Software Inc. | ||
11 | * | ||
12 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
13 | * Copyright (c) 2003, 2004 Zultys Technologies | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | * | ||
20 | */ | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <platforms/4xx/ppc440spe.h> | ||
24 | #include <asm/ocp.h> | ||
25 | #include <asm/ppc4xx_pic.h> | ||
26 | |||
27 | static struct ocp_func_emac_data ppc440spe_emac0_def = { | ||
28 | .rgmii_idx = -1, /* No RGMII */ | ||
29 | .rgmii_mux = -1, /* No RGMII */ | ||
30 | .zmii_idx = -1, /* No ZMII */ | ||
31 | .zmii_mux = -1, /* No ZMII */ | ||
32 | .mal_idx = 0, /* MAL device index */ | ||
33 | .mal_rx_chan = 0, /* MAL rx channel number */ | ||
34 | .mal_tx_chan = 0, /* MAL tx channel number */ | ||
35 | .wol_irq = 61, /* WOL interrupt number */ | ||
36 | .mdio_idx = -1, /* No shared MDIO */ | ||
37 | .tah_idx = -1, /* No TAH */ | ||
38 | }; | ||
39 | OCP_SYSFS_EMAC_DATA() | ||
40 | |||
41 | static struct ocp_func_mal_data ppc440spe_mal0_def = { | ||
42 | .num_tx_chans = 1, /* Number of TX channels */ | ||
43 | .num_rx_chans = 1, /* Number of RX channels */ | ||
44 | .txeob_irq = 38, /* TX End Of Buffer IRQ */ | ||
45 | .rxeob_irq = 39, /* RX End Of Buffer IRQ */ | ||
46 | .txde_irq = 34, /* TX Descriptor Error IRQ */ | ||
47 | .rxde_irq = 35, /* RX Descriptor Error IRQ */ | ||
48 | .serr_irq = 33, /* MAL System Error IRQ */ | ||
49 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
50 | }; | ||
51 | OCP_SYSFS_MAL_DATA() | ||
52 | |||
53 | static struct ocp_func_iic_data ppc440spe_iic0_def = { | ||
54 | .fast_mode = 0, /* Use standad mode (100Khz) */ | ||
55 | }; | ||
56 | |||
57 | static struct ocp_func_iic_data ppc440spe_iic1_def = { | ||
58 | .fast_mode = 0, /* Use standad mode (100Khz) */ | ||
59 | }; | ||
60 | OCP_SYSFS_IIC_DATA() | ||
61 | |||
62 | struct ocp_def core_ocp[] = { | ||
63 | { .vendor = OCP_VENDOR_IBM, | ||
64 | .function = OCP_FUNC_16550, | ||
65 | .index = 0, | ||
66 | .paddr = PPC440SPE_UART0_ADDR, | ||
67 | .irq = UART0_INT, | ||
68 | .pm = IBM_CPM_UART0, | ||
69 | }, | ||
70 | { .vendor = OCP_VENDOR_IBM, | ||
71 | .function = OCP_FUNC_16550, | ||
72 | .index = 1, | ||
73 | .paddr = PPC440SPE_UART1_ADDR, | ||
74 | .irq = UART1_INT, | ||
75 | .pm = IBM_CPM_UART1, | ||
76 | }, | ||
77 | { .vendor = OCP_VENDOR_IBM, | ||
78 | .function = OCP_FUNC_16550, | ||
79 | .index = 2, | ||
80 | .paddr = PPC440SPE_UART2_ADDR, | ||
81 | .irq = UART2_INT, | ||
82 | .pm = IBM_CPM_UART2, | ||
83 | }, | ||
84 | { .vendor = OCP_VENDOR_IBM, | ||
85 | .function = OCP_FUNC_IIC, | ||
86 | .index = 0, | ||
87 | .paddr = 0x00000004f0000400ULL, | ||
88 | .irq = 2, | ||
89 | .pm = IBM_CPM_IIC0, | ||
90 | .additions = &ppc440spe_iic0_def, | ||
91 | .show = &ocp_show_iic_data | ||
92 | }, | ||
93 | { .vendor = OCP_VENDOR_IBM, | ||
94 | .function = OCP_FUNC_IIC, | ||
95 | .index = 1, | ||
96 | .paddr = 0x00000004f0000500ULL, | ||
97 | .irq = 3, | ||
98 | .pm = IBM_CPM_IIC1, | ||
99 | .additions = &ppc440spe_iic1_def, | ||
100 | .show = &ocp_show_iic_data | ||
101 | }, | ||
102 | { .vendor = OCP_VENDOR_IBM, | ||
103 | .function = OCP_FUNC_GPIO, | ||
104 | .index = 0, | ||
105 | .paddr = 0x00000004f0000700ULL, | ||
106 | .irq = OCP_IRQ_NA, | ||
107 | .pm = IBM_CPM_GPIO0, | ||
108 | }, | ||
109 | { .vendor = OCP_VENDOR_IBM, | ||
110 | .function = OCP_FUNC_MAL, | ||
111 | .paddr = OCP_PADDR_NA, | ||
112 | .irq = OCP_IRQ_NA, | ||
113 | .pm = OCP_CPM_NA, | ||
114 | .additions = &ppc440spe_mal0_def, | ||
115 | .show = &ocp_show_mal_data, | ||
116 | }, | ||
117 | { .vendor = OCP_VENDOR_IBM, | ||
118 | .function = OCP_FUNC_EMAC, | ||
119 | .index = 0, | ||
120 | .paddr = 0x00000004f0000800ULL, | ||
121 | .irq = 60, | ||
122 | .pm = OCP_CPM_NA, | ||
123 | .additions = &ppc440spe_emac0_def, | ||
124 | .show = &ocp_show_emac_data, | ||
125 | }, | ||
126 | { .vendor = OCP_VENDOR_INVALID | ||
127 | } | ||
128 | }; | ||
129 | |||
130 | /* Polarity and triggering settings for internal interrupt sources */ | ||
131 | struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = { | ||
132 | { .polarity = 0xffffffff, | ||
133 | .triggering = 0x010f0004, | ||
134 | .ext_irq_mask = 0x00000000, | ||
135 | }, | ||
136 | { .polarity = 0xffffffff, | ||
137 | .triggering = 0x001f8040, | ||
138 | .ext_irq_mask = 0x00007c30, /* IRQ6 - IRQ7, IRQ8 - IRQ12 */ | ||
139 | }, | ||
140 | { .polarity = 0xffffffff, | ||
141 | .triggering = 0x00000000, | ||
142 | .ext_irq_mask = 0x000000fc, /* IRQ0 - IRQ5 */ | ||
143 | }, | ||
144 | { .polarity = 0xffffffff, | ||
145 | .triggering = 0x00000000, | ||
146 | .ext_irq_mask = 0x00000000, | ||
147 | }, | ||
148 | }; | ||
diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h new file mode 100644 index 000000000000..2216846973b8 --- /dev/null +++ b/arch/ppc/platforms/4xx/ppc440spe.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/ibm440spe.h | ||
3 | * | ||
4 | * PPC440SPe definitions | ||
5 | * | ||
6 | * Roland Dreier <rolandd@cisco.com> | ||
7 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
8 | * | ||
9 | * Matt Porter <mporter@kernel.crashing.org> | ||
10 | * Copyright 2004-2005 MontaVista Software, Inc. | ||
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 | #ifdef __KERNEL__ | ||
19 | #ifndef __PPC_PLATFORMS_PPC440SPE_H | ||
20 | #define __PPC_PLATFORMS_PPC440SPE_H | ||
21 | |||
22 | #include <linux/config.h> | ||
23 | |||
24 | #include <asm/ibm44x.h> | ||
25 | |||
26 | /* UART */ | ||
27 | #define PPC440SPE_UART0_ADDR 0x00000004f0000200ULL | ||
28 | #define PPC440SPE_UART1_ADDR 0x00000004f0000300ULL | ||
29 | #define PPC440SPE_UART2_ADDR 0x00000004f0000600ULL | ||
30 | #define UART0_INT 0 | ||
31 | #define UART1_INT 1 | ||
32 | #define UART2_INT 37 | ||
33 | |||
34 | /* Clock and Power Management */ | ||
35 | #define IBM_CPM_IIC0 0x80000000 /* IIC interface */ | ||
36 | #define IBM_CPM_IIC1 0x40000000 /* IIC interface */ | ||
37 | #define IBM_CPM_PCI 0x20000000 /* PCI bridge */ | ||
38 | #define IBM_CPM_CPU 0x02000000 /* processor core */ | ||
39 | #define IBM_CPM_DMA 0x01000000 /* DMA controller */ | ||
40 | #define IBM_CPM_BGO 0x00800000 /* PLB to OPB bus arbiter */ | ||
41 | #define IBM_CPM_BGI 0x00400000 /* OPB to PLB bridge */ | ||
42 | #define IBM_CPM_EBC 0x00200000 /* External Bux Controller */ | ||
43 | #define IBM_CPM_EBM 0x00100000 /* Ext Bus Master Interface */ | ||
44 | #define IBM_CPM_DMC 0x00080000 /* SDRAM peripheral controller */ | ||
45 | #define IBM_CPM_PLB 0x00040000 /* PLB bus arbiter */ | ||
46 | #define IBM_CPM_SRAM 0x00020000 /* SRAM memory controller */ | ||
47 | #define IBM_CPM_PPM 0x00002000 /* PLB Performance Monitor */ | ||
48 | #define IBM_CPM_UIC1 0x00001000 /* Universal Interrupt Controller */ | ||
49 | #define IBM_CPM_GPIO0 0x00000800 /* General Purpose IO (??) */ | ||
50 | #define IBM_CPM_GPT 0x00000400 /* General Purpose Timers */ | ||
51 | #define IBM_CPM_UART0 0x00000200 /* serial port 0 */ | ||
52 | #define IBM_CPM_UART1 0x00000100 /* serial port 1 */ | ||
53 | #define IBM_CPM_UART2 0x00000100 /* serial port 1 */ | ||
54 | #define IBM_CPM_UIC0 0x00000080 /* Universal Interrupt Controller */ | ||
55 | #define IBM_CPM_TMRCLK 0x00000040 /* CPU timers */ | ||
56 | #define IBM_CPM_EMAC0 0x00000020 /* EMAC 0 */ | ||
57 | |||
58 | #define DFLT_IBM4xx_PM ~(IBM_CPM_UIC | IBM_CPM_UIC1 | IBM_CPM_CPU \ | ||
59 | | IBM_CPM_EBC | IBM_CPM_SRAM | IBM_CPM_BGO \ | ||
60 | | IBM_CPM_EBM | IBM_CPM_PLB | IBM_CPM_OPB \ | ||
61 | | IBM_CPM_TMRCLK | IBM_CPM_DMA | IBM_CPM_PCI \ | ||
62 | | IBM_CPM_TAHOE0 | IBM_CPM_TAHOE1 \ | ||
63 | | IBM_CPM_EMAC0 | IBM_CPM_EMAC1 \ | ||
64 | | IBM_CPM_EMAC2 | IBM_CPM_EMAC3 ) | ||
65 | #endif /* __PPC_PLATFORMS_PPC440SP_H */ | ||
66 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index d8019eec4704..281b4a2ffb96 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c | |||
@@ -88,9 +88,6 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
88 | void __init | 88 | void __init |
89 | sycamore_setup_arch(void) | 89 | sycamore_setup_arch(void) |
90 | { | 90 | { |
91 | #define SYCAMORE_PS2_BASE 0xF0100000 | ||
92 | #define SYCAMORE_FPGA_BASE 0xF0300000 | ||
93 | |||
94 | void *fpga_brdc; | 91 | void *fpga_brdc; |
95 | unsigned char fpga_brdc_data; | 92 | unsigned char fpga_brdc_data; |
96 | void *fpga_enable; | 93 | void *fpga_enable; |
@@ -100,7 +97,7 @@ sycamore_setup_arch(void) | |||
100 | 97 | ||
101 | ppc4xx_setup_arch(); | 98 | ppc4xx_setup_arch(); |
102 | 99 | ||
103 | ibm_ocp_set_emac(0, 1); | 100 | ibm_ocp_set_emac(0, 0); |
104 | 101 | ||
105 | kb_data = ioremap(SYCAMORE_PS2_BASE, 8); | 102 | kb_data = ioremap(SYCAMORE_PS2_BASE, 8); |
106 | if (!kb_data) { | 103 | if (!kb_data) { |
@@ -111,7 +108,7 @@ sycamore_setup_arch(void) | |||
111 | 108 | ||
112 | kb_cs = kb_data + 1; | 109 | kb_cs = kb_data + 1; |
113 | 110 | ||
114 | fpga_status = ioremap(SYCAMORE_FPGA_BASE, 8); | 111 | fpga_status = ioremap(PPC40x_FPGA_BASE, 8); |
115 | if (!fpga_status) { | 112 | if (!fpga_status) { |
116 | printk(KERN_CRIT | 113 | printk(KERN_CRIT |
117 | "sycamore_setup_arch() fpga_status ioremap failed\n"); | 114 | "sycamore_setup_arch() fpga_status ioremap failed\n"); |
diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h index 3e7b4e2c8c57..1cd6c824fd62 100644 --- a/arch/ppc/platforms/4xx/sycamore.h +++ b/arch/ppc/platforms/4xx/sycamore.h | |||
@@ -1,67 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.h | 2 | * arch/ppc/platforms/4xx/sycamore.h |
3 | * | 3 | * |
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 4 | * Sycamore board definitions |
5 | * 405GPr "Sycamore" evaluation board. | ||
6 | * | 5 | * |
7 | * Author: Armin Kuster <akuster@mvista.com> | 6 | * Copyright (c) 2005 DENX Software Engineering |
7 | * Stefan Roese <sr@denx.de> | ||
8 | * | ||
9 | * Based on original work by | ||
10 | * Armin Kuster <akuster@mvista.com> | ||
11 | * 2000 (c) MontaVista, Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
8 | * | 17 | * |
9 | * 2000 (c) MontaVista, Software, Inc. This file is licensed under | ||
10 | * the terms of the GNU General Public License version 2. This program | ||
11 | * is licensed "as is" without any warranty of any kind, whether express | ||
12 | * or implied. | ||
13 | */ | 18 | */ |
14 | 19 | ||
15 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
16 | #ifndef __ASM_SYCAMORE_H__ | 21 | #ifndef __ASM_SYCAMORE_H__ |
17 | #define __ASM_SYCAMORE_H__ | 22 | #define __ASM_SYCAMORE_H__ |
18 | 23 | ||
24 | #include <linux/config.h> | ||
19 | #include <platforms/4xx/ibm405gpr.h> | 25 | #include <platforms/4xx/ibm405gpr.h> |
26 | #include <asm/ppcboot.h> | ||
20 | 27 | ||
21 | #ifndef __ASSEMBLY__ | 28 | /* Memory map for the IBM "Sycamore" 405GPr evaluation board. |
22 | /* | ||
23 | * Data structure defining board information maintained by the boot | ||
24 | * ROM on IBM's "Sycamore" evaluation board. An effort has been made to | ||
25 | * keep the field names consistent with the 8xx 'bd_t' board info | ||
26 | * structures. | ||
27 | */ | ||
28 | |||
29 | typedef struct board_info { | ||
30 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
31 | unsigned char bi_r_version[30]; /* Version of the IBM ROM */ | ||
32 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
33 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
34 | unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */ | ||
35 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
36 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
37 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
38 | } bd_t; | ||
39 | |||
40 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
41 | */ | ||
42 | #define bi_tbfreq bi_intfreq | ||
43 | |||
44 | |||
45 | /* Memory map for the IBM "Sycamore" 405GP evaluation board. | ||
46 | * Generic 4xx plus RTC. | 29 | * Generic 4xx plus RTC. |
47 | */ | 30 | */ |
48 | 31 | ||
49 | extern void *sycamore_rtc_base; | ||
50 | #define SYCAMORE_RTC_PADDR ((uint)0xf0000000) | 32 | #define SYCAMORE_RTC_PADDR ((uint)0xf0000000) |
51 | #define SYCAMORE_RTC_VADDR SYCAMORE_RTC_PADDR | 33 | #define SYCAMORE_RTC_VADDR SYCAMORE_RTC_PADDR |
52 | #define SYCAMORE_RTC_SIZE ((uint)8*1024) | 34 | #define SYCAMORE_RTC_SIZE ((uint)8*1024) |
53 | 35 | ||
54 | #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK | ||
55 | #define BASE_BAUD 201600 | ||
56 | #else | ||
57 | #define BASE_BAUD 691200 | 36 | #define BASE_BAUD 691200 |
58 | #endif | ||
59 | 37 | ||
60 | #define SYCAMORE_PS2_BASE 0xF0100000 | 38 | #define SYCAMORE_PS2_BASE 0xF0100000 |
61 | #define SYCAMORE_FPGA_BASE 0xF0300000 | 39 | |
40 | /* Flash */ | ||
41 | #define PPC40x_FPGA_BASE 0xF0300000 | ||
42 | #define PPC40x_FPGA_REG_OFFS 5 /* offset to flash map reg */ | ||
43 | #define PPC40x_FLASH_ONBD_N(x) (x & 0x02) | ||
44 | #define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01) | ||
45 | #define PPC40x_FLASH_LOW 0xFFF00000 | ||
46 | #define PPC40x_FLASH_HIGH 0xFFF80000 | ||
47 | #define PPC40x_FLASH_SIZE 0x80000 | ||
62 | 48 | ||
63 | #define PPC4xx_MACHINE_NAME "IBM Sycamore" | 49 | #define PPC4xx_MACHINE_NAME "IBM Sycamore" |
64 | 50 | ||
65 | #endif /* !__ASSEMBLY__ */ | ||
66 | #endif /* __ASM_SYCAMORE_H__ */ | 51 | #endif /* __ASM_SYCAMORE_H__ */ |
67 | #endif /* __KERNEL__ */ | 52 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index a33eda4b7489..74cb33182d9f 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c | |||
@@ -90,7 +90,7 @@ walnut_setup_arch(void) | |||
90 | 90 | ||
91 | kb_cs = kb_data + 1; | 91 | kb_cs = kb_data + 1; |
92 | 92 | ||
93 | fpga_status = ioremap(WALNUT_FPGA_BASE, 8); | 93 | fpga_status = ioremap(PPC40x_FPGA_BASE, 8); |
94 | if (!fpga_status) { | 94 | if (!fpga_status) { |
95 | printk(KERN_CRIT | 95 | printk(KERN_CRIT |
96 | "walnut_setup_arch() fpga_status ioremap failed\n"); | 96 | "walnut_setup_arch() fpga_status ioremap failed\n"); |
diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h index 04cfbf3696b9..dcf2691698c0 100644 --- a/arch/ppc/platforms/4xx/walnut.h +++ b/arch/ppc/platforms/4xx/walnut.h | |||
@@ -1,72 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.h | 2 | * arch/ppc/platforms/4xx/walnut.h |
3 | * | 3 | * |
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 4 | * Walnut board definitions |
5 | * 405GP "Walnut" evaluation board. | ||
6 | * | 5 | * |
7 | * Authors: Grant Erickson <grant@lcse.umn.edu>, Frank Rowand | 6 | * Copyright (c) 2005 DENX Software Engineering |
8 | * <frank_rowand@mvista.com>, Debbie Chu <debbie_chu@mvista.com> or | 7 | * Stefan Roese <sr@denx.de> |
9 | * source@mvista.com | ||
10 | * | 8 | * |
11 | * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu> | 9 | * Based on original work by |
10 | * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu> | ||
11 | * Frank Rowand <frank_rowand@mvista.com> | ||
12 | * Debbie Chu <debbie_chu@mvista.com> | ||
13 | * 2000 (c) MontaVista, Software, Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
12 | * | 19 | * |
13 | * 2000 (c) MontaVista, Software, Inc. This file is licensed under | ||
14 | * the terms of the GNU General Public License version 2. This program | ||
15 | * is licensed "as is" without any warranty of any kind, whether express | ||
16 | * or implied. | ||
17 | */ | 20 | */ |
18 | 21 | ||
19 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
20 | #ifndef __ASM_WALNUT_H__ | 23 | #ifndef __ASM_WALNUT_H__ |
21 | #define __ASM_WALNUT_H__ | 24 | #define __ASM_WALNUT_H__ |
22 | 25 | ||
23 | /* We have a 405GP core */ | 26 | #include <linux/config.h> |
24 | #include <platforms/4xx/ibm405gp.h> | 27 | #include <platforms/4xx/ibm405gp.h> |
25 | 28 | #include <asm/ppcboot.h> | |
26 | #ifndef __ASSEMBLY__ | ||
27 | /* | ||
28 | * Data structure defining board information maintained by the boot | ||
29 | * ROM on IBM's "Walnut" evaluation board. An effort has been made to | ||
30 | * keep the field names consistent with the 8xx 'bd_t' board info | ||
31 | * structures. | ||
32 | */ | ||
33 | |||
34 | typedef struct board_info { | ||
35 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
36 | unsigned char bi_r_version[30]; /* Version of the IBM ROM */ | ||
37 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
38 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
39 | unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */ | ||
40 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
41 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
42 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
43 | } bd_t; | ||
44 | |||
45 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
46 | */ | ||
47 | #define bi_tbfreq bi_intfreq | ||
48 | |||
49 | 29 | ||
50 | /* Memory map for the IBM "Walnut" 405GP evaluation board. | 30 | /* Memory map for the IBM "Walnut" 405GP evaluation board. |
51 | * Generic 4xx plus RTC. | 31 | * Generic 4xx plus RTC. |
52 | */ | 32 | */ |
53 | 33 | ||
54 | extern void *walnut_rtc_base; | ||
55 | #define WALNUT_RTC_PADDR ((uint)0xf0000000) | 34 | #define WALNUT_RTC_PADDR ((uint)0xf0000000) |
56 | #define WALNUT_RTC_VADDR WALNUT_RTC_PADDR | 35 | #define WALNUT_RTC_VADDR WALNUT_RTC_PADDR |
57 | #define WALNUT_RTC_SIZE ((uint)8*1024) | 36 | #define WALNUT_RTC_SIZE ((uint)8*1024) |
58 | 37 | ||
59 | #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK | ||
60 | #define BASE_BAUD 201600 | ||
61 | #else | ||
62 | #define BASE_BAUD 691200 | 38 | #define BASE_BAUD 691200 |
63 | #endif | ||
64 | 39 | ||
65 | #define WALNUT_PS2_BASE 0xF0100000 | 40 | #define WALNUT_PS2_BASE 0xF0100000 |
66 | #define WALNUT_FPGA_BASE 0xF0300000 | 41 | |
42 | /* Flash */ | ||
43 | #define PPC40x_FPGA_BASE 0xF0300000 | ||
44 | #define PPC40x_FPGA_REG_OFFS 5 /* offset to flash map reg */ | ||
45 | #define PPC40x_FLASH_ONBD_N(x) (x & 0x02) | ||
46 | #define PPC40x_FLASH_SRAM_SEL(x) (x & 0x01) | ||
47 | #define PPC40x_FLASH_LOW 0xFFF00000 | ||
48 | #define PPC40x_FLASH_HIGH 0xFFF80000 | ||
49 | #define PPC40x_FLASH_SIZE 0x80000 | ||
50 | #define WALNUT_FPGA_BASE PPC40x_FPGA_BASE | ||
67 | 51 | ||
68 | #define PPC4xx_MACHINE_NAME "IBM Walnut" | 52 | #define PPC4xx_MACHINE_NAME "IBM Walnut" |
69 | 53 | ||
70 | #endif /* !__ASSEMBLY__ */ | ||
71 | #endif /* __ASM_WALNUT_H__ */ | 54 | #endif /* __ASM_WALNUT_H__ */ |
72 | #endif /* __KERNEL__ */ | 55 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c new file mode 100644 index 000000000000..e60f4bd437ec --- /dev/null +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -0,0 +1,395 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/yucca.c | ||
3 | * | ||
4 | * Yucca board specific routines | ||
5 | * | ||
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) | ||
7 | * | ||
8 | * Copyright 2004-2005 MontaVista Software Inc. | ||
9 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/stddef.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/errno.h> | ||
22 | #include <linux/reboot.h> | ||
23 | #include <linux/pci.h> | ||
24 | #include <linux/kdev_t.h> | ||
25 | #include <linux/types.h> | ||
26 | #include <linux/major.h> | ||
27 | #include <linux/blkdev.h> | ||
28 | #include <linux/console.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/ide.h> | ||
31 | #include <linux/initrd.h> | ||
32 | #include <linux/seq_file.h> | ||
33 | #include <linux/root_dev.h> | ||
34 | #include <linux/tty.h> | ||
35 | #include <linux/serial.h> | ||
36 | #include <linux/serial_core.h> | ||
37 | |||
38 | #include <asm/system.h> | ||
39 | #include <asm/pgtable.h> | ||
40 | #include <asm/page.h> | ||
41 | #include <asm/dma.h> | ||
42 | #include <asm/io.h> | ||
43 | #include <asm/machdep.h> | ||
44 | #include <asm/ocp.h> | ||
45 | #include <asm/pci-bridge.h> | ||
46 | #include <asm/time.h> | ||
47 | #include <asm/todc.h> | ||
48 | #include <asm/bootinfo.h> | ||
49 | #include <asm/ppc4xx_pic.h> | ||
50 | #include <asm/ppcboot.h> | ||
51 | |||
52 | #include <syslib/ibm44x_common.h> | ||
53 | #include <syslib/ibm440gx_common.h> | ||
54 | #include <syslib/ibm440sp_common.h> | ||
55 | #include <syslib/ppc440spe_pcie.h> | ||
56 | |||
57 | extern bd_t __res; | ||
58 | |||
59 | static struct ibm44x_clocks clocks __initdata; | ||
60 | |||
61 | static void __init | ||
62 | yucca_calibrate_decr(void) | ||
63 | { | ||
64 | unsigned int freq; | ||
65 | |||
66 | if (mfspr(SPRN_CCR1) & CCR1_TCS) | ||
67 | freq = YUCCA_TMR_CLK; | ||
68 | else | ||
69 | freq = clocks.cpu; | ||
70 | |||
71 | ibm44x_calibrate_decr(freq); | ||
72 | } | ||
73 | |||
74 | static int | ||
75 | yucca_show_cpuinfo(struct seq_file *m) | ||
76 | { | ||
77 | seq_printf(m, "vendor\t\t: AMCC\n"); | ||
78 | seq_printf(m, "machine\t\t: PPC440SPe EVB (Yucca)\n"); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static enum { | ||
84 | HOSE_UNKNOWN, | ||
85 | HOSE_PCIX, | ||
86 | HOSE_PCIE0, | ||
87 | HOSE_PCIE1, | ||
88 | HOSE_PCIE2 | ||
89 | } hose_type[4]; | ||
90 | |||
91 | static inline int | ||
92 | yucca_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
93 | { | ||
94 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | ||
95 | |||
96 | if (hose_type[hose->index] == HOSE_PCIX) { | ||
97 | static char pci_irq_table[][4] = | ||
98 | /* | ||
99 | * PCI IDSEL/INTPIN->INTLINE | ||
100 | * A B C D | ||
101 | */ | ||
102 | { | ||
103 | { 81, -1, -1, -1 }, /* IDSEL 1 - PCIX0 Slot 0 */ | ||
104 | }; | ||
105 | const long min_idsel = 1, max_idsel = 1, irqs_per_slot = 4; | ||
106 | return PCI_IRQ_TABLE_LOOKUP; | ||
107 | } else if (hose_type[hose->index] == HOSE_PCIE0) { | ||
108 | static char pci_irq_table[][4] = | ||
109 | /* | ||
110 | * PCI IDSEL/INTPIN->INTLINE | ||
111 | * A B C D | ||
112 | */ | ||
113 | { | ||
114 | { 96, 97, 98, 99 }, | ||
115 | }; | ||
116 | const long min_idsel = 1, max_idsel = 1, irqs_per_slot = 4; | ||
117 | return PCI_IRQ_TABLE_LOOKUP; | ||
118 | } else if (hose_type[hose->index] == HOSE_PCIE1) { | ||
119 | static char pci_irq_table[][4] = | ||
120 | /* | ||
121 | * PCI IDSEL/INTPIN->INTLINE | ||
122 | * A B C D | ||
123 | */ | ||
124 | { | ||
125 | { 100, 101, 102, 103 }, | ||
126 | }; | ||
127 | const long min_idsel = 1, max_idsel = 1, irqs_per_slot = 4; | ||
128 | return PCI_IRQ_TABLE_LOOKUP; | ||
129 | } else if (hose_type[hose->index] == HOSE_PCIE2) { | ||
130 | static char pci_irq_table[][4] = | ||
131 | /* | ||
132 | * PCI IDSEL/INTPIN->INTLINE | ||
133 | * A B C D | ||
134 | */ | ||
135 | { | ||
136 | { 104, 105, 106, 107 }, | ||
137 | }; | ||
138 | const long min_idsel = 1, max_idsel = 1, irqs_per_slot = 4; | ||
139 | return PCI_IRQ_TABLE_LOOKUP; | ||
140 | } | ||
141 | return -1; | ||
142 | } | ||
143 | |||
144 | static void __init yucca_set_emacdata(void) | ||
145 | { | ||
146 | struct ocp_def *def; | ||
147 | struct ocp_func_emac_data *emacdata; | ||
148 | |||
149 | /* Set phy_map, phy_mode, and mac_addr for the EMAC */ | ||
150 | def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); | ||
151 | emacdata = def->additions; | ||
152 | emacdata->phy_map = 0x00000001; /* Skip 0x00 */ | ||
153 | emacdata->phy_mode = PHY_MODE_GMII; | ||
154 | memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6); | ||
155 | } | ||
156 | |||
157 | static int __init yucca_pcie_card_present(int port) | ||
158 | { | ||
159 | void __iomem *pcie_fpga_base; | ||
160 | u16 reg; | ||
161 | |||
162 | pcie_fpga_base = ioremap64(YUCCA_FPGA_REG_BASE, YUCCA_FPGA_REG_SIZE); | ||
163 | reg = in_be16(pcie_fpga_base + FPGA_REG1C); | ||
164 | iounmap(pcie_fpga_base); | ||
165 | |||
166 | switch(port) { | ||
167 | case 0: return !(reg & FPGA_REG1C_PE0_PRSNT); | ||
168 | case 1: return !(reg & FPGA_REG1C_PE1_PRSNT); | ||
169 | case 2: return !(reg & FPGA_REG1C_PE2_PRSNT); | ||
170 | default: return 0; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * For the given slot, set rootpoint mode, send power to the slot, | ||
176 | * turn on the green LED and turn off the yellow LED, enable the clock | ||
177 | * and turn off reset. | ||
178 | */ | ||
179 | static void __init yucca_setup_pcie_fpga_rootpoint(int port) | ||
180 | { | ||
181 | void __iomem *pcie_reg_fpga_base; | ||
182 | u16 power, clock, green_led, yellow_led, reset_off, rootpoint, endpoint; | ||
183 | |||
184 | pcie_reg_fpga_base = ioremap64(YUCCA_FPGA_REG_BASE, YUCCA_FPGA_REG_SIZE); | ||
185 | |||
186 | switch(port) { | ||
187 | case 0: | ||
188 | rootpoint = FPGA_REG1C_PE0_ROOTPOINT; | ||
189 | endpoint = 0; | ||
190 | power = FPGA_REG1A_PE0_PWRON; | ||
191 | green_led = FPGA_REG1A_PE0_GLED; | ||
192 | clock = FPGA_REG1A_PE0_REFCLK_ENABLE; | ||
193 | yellow_led = FPGA_REG1A_PE0_YLED; | ||
194 | reset_off = FPGA_REG1C_PE0_PERST; | ||
195 | break; | ||
196 | case 1: | ||
197 | rootpoint = 0; | ||
198 | endpoint = FPGA_REG1C_PE1_ENDPOINT; | ||
199 | power = FPGA_REG1A_PE1_PWRON; | ||
200 | green_led = FPGA_REG1A_PE1_GLED; | ||
201 | clock = FPGA_REG1A_PE1_REFCLK_ENABLE; | ||
202 | yellow_led = FPGA_REG1A_PE1_YLED; | ||
203 | reset_off = FPGA_REG1C_PE1_PERST; | ||
204 | break; | ||
205 | case 2: | ||
206 | rootpoint = 0; | ||
207 | endpoint = FPGA_REG1C_PE2_ENDPOINT; | ||
208 | power = FPGA_REG1A_PE2_PWRON; | ||
209 | green_led = FPGA_REG1A_PE2_GLED; | ||
210 | clock = FPGA_REG1A_PE2_REFCLK_ENABLE; | ||
211 | yellow_led = FPGA_REG1A_PE2_YLED; | ||
212 | reset_off = FPGA_REG1C_PE2_PERST; | ||
213 | break; | ||
214 | |||
215 | default: | ||
216 | return; | ||
217 | } | ||
218 | |||
219 | out_be16(pcie_reg_fpga_base + FPGA_REG1A, | ||
220 | ~(power | clock | green_led) & | ||
221 | (yellow_led | in_be16(pcie_reg_fpga_base + FPGA_REG1A))); | ||
222 | out_be16(pcie_reg_fpga_base + FPGA_REG1C, | ||
223 | ~(endpoint | reset_off) & | ||
224 | (rootpoint | in_be16(pcie_reg_fpga_base + FPGA_REG1C))); | ||
225 | |||
226 | /* | ||
227 | * Leave device in reset for a while after powering on the | ||
228 | * slot to give it a chance to initialize. | ||
229 | */ | ||
230 | mdelay(250); | ||
231 | |||
232 | out_be16(pcie_reg_fpga_base + FPGA_REG1C, | ||
233 | reset_off | in_be16(pcie_reg_fpga_base + FPGA_REG1C)); | ||
234 | |||
235 | iounmap(pcie_reg_fpga_base); | ||
236 | } | ||
237 | |||
238 | static void __init | ||
239 | yucca_setup_hoses(void) | ||
240 | { | ||
241 | struct pci_controller *hose; | ||
242 | char name[20]; | ||
243 | int i; | ||
244 | |||
245 | if (0 && ppc440spe_init_pcie()) { | ||
246 | printk(KERN_WARNING "PPC440SPe PCI Express initialization failed\n"); | ||
247 | return; | ||
248 | } | ||
249 | |||
250 | for (i = 0; i <= 2; ++i) { | ||
251 | if (!yucca_pcie_card_present(i)) | ||
252 | continue; | ||
253 | |||
254 | printk(KERN_INFO "PCIE%d: card present\n", i); | ||
255 | yucca_setup_pcie_fpga_rootpoint(i); | ||
256 | if (ppc440spe_init_pcie_rootport(i)) { | ||
257 | printk(KERN_WARNING "PCIE%d: initialization failed\n", i); | ||
258 | continue; | ||
259 | } | ||
260 | |||
261 | hose = pcibios_alloc_controller(); | ||
262 | if (!hose) | ||
263 | return; | ||
264 | |||
265 | sprintf(name, "PCIE%d host bridge", i); | ||
266 | pci_init_resource(&hose->io_resource, | ||
267 | YUCCA_PCIX_LOWER_IO, | ||
268 | YUCCA_PCIX_UPPER_IO, | ||
269 | IORESOURCE_IO, | ||
270 | name); | ||
271 | |||
272 | hose->mem_space.start = YUCCA_PCIE_LOWER_MEM + | ||
273 | i * YUCCA_PCIE_MEM_SIZE; | ||
274 | hose->mem_space.end = hose->mem_space.start + | ||
275 | YUCCA_PCIE_MEM_SIZE - 1; | ||
276 | |||
277 | pci_init_resource(&hose->mem_resources[0], | ||
278 | hose->mem_space.start, | ||
279 | hose->mem_space.end, | ||
280 | IORESOURCE_MEM, | ||
281 | name); | ||
282 | |||
283 | hose->first_busno = 0; | ||
284 | hose->last_busno = 15; | ||
285 | hose_type[hose->index] = HOSE_PCIE0 + i; | ||
286 | |||
287 | ppc440spe_setup_pcie(hose, i); | ||
288 | hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); | ||
289 | } | ||
290 | |||
291 | ppc_md.pci_swizzle = common_swizzle; | ||
292 | ppc_md.pci_map_irq = yucca_map_irq; | ||
293 | } | ||
294 | |||
295 | TODC_ALLOC(); | ||
296 | |||
297 | static void __init | ||
298 | yucca_early_serial_map(void) | ||
299 | { | ||
300 | struct uart_port port; | ||
301 | |||
302 | /* Setup ioremapped serial port access */ | ||
303 | memset(&port, 0, sizeof(port)); | ||
304 | port.membase = ioremap64(PPC440SPE_UART0_ADDR, 8); | ||
305 | port.irq = UART0_INT; | ||
306 | port.uartclk = clocks.uart0; | ||
307 | port.regshift = 0; | ||
308 | port.iotype = SERIAL_IO_MEM; | ||
309 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | ||
310 | port.line = 0; | ||
311 | |||
312 | if (early_serial_setup(&port) != 0) { | ||
313 | printk("Early serial init of port 0 failed\n"); | ||
314 | } | ||
315 | |||
316 | port.membase = ioremap64(PPC440SPE_UART1_ADDR, 8); | ||
317 | port.irq = UART1_INT; | ||
318 | port.uartclk = clocks.uart1; | ||
319 | port.line = 1; | ||
320 | |||
321 | if (early_serial_setup(&port) != 0) { | ||
322 | printk("Early serial init of port 1 failed\n"); | ||
323 | } | ||
324 | |||
325 | port.membase = ioremap64(PPC440SPE_UART2_ADDR, 8); | ||
326 | port.irq = UART2_INT; | ||
327 | port.uartclk = BASE_BAUD; | ||
328 | port.line = 2; | ||
329 | |||
330 | if (early_serial_setup(&port) != 0) { | ||
331 | printk("Early serial init of port 2 failed\n"); | ||
332 | } | ||
333 | } | ||
334 | |||
335 | static void __init | ||
336 | yucca_setup_arch(void) | ||
337 | { | ||
338 | yucca_set_emacdata(); | ||
339 | |||
340 | #if !defined(CONFIG_BDI_SWITCH) | ||
341 | /* | ||
342 | * The Abatron BDI JTAG debugger does not tolerate others | ||
343 | * mucking with the debug registers. | ||
344 | */ | ||
345 | mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM)); | ||
346 | #endif | ||
347 | |||
348 | /* | ||
349 | * Determine various clocks. | ||
350 | * To be completely correct we should get SysClk | ||
351 | * from FPGA, because it can be changed by on-board switches | ||
352 | * --ebs | ||
353 | */ | ||
354 | /* 440GX and 440SPe clocking is the same - rd */ | ||
355 | ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200); | ||
356 | ocp_sys_info.opb_bus_freq = clocks.opb; | ||
357 | |||
358 | /* init to some ~sane value until calibrate_delay() runs */ | ||
359 | loops_per_jiffy = 50000000/HZ; | ||
360 | |||
361 | /* Setup PCIXn host bridges */ | ||
362 | yucca_setup_hoses(); | ||
363 | |||
364 | #ifdef CONFIG_BLK_DEV_INITRD | ||
365 | if (initrd_start) | ||
366 | ROOT_DEV = Root_RAM0; | ||
367 | else | ||
368 | #endif | ||
369 | #ifdef CONFIG_ROOT_NFS | ||
370 | ROOT_DEV = Root_NFS; | ||
371 | #else | ||
372 | ROOT_DEV = Root_HDA1; | ||
373 | #endif | ||
374 | |||
375 | yucca_early_serial_map(); | ||
376 | |||
377 | /* Identify the system */ | ||
378 | printk("Yucca port (Roland Dreier <rolandd@cisco.com>)\n"); | ||
379 | } | ||
380 | |||
381 | void __init platform_init(unsigned long r3, unsigned long r4, | ||
382 | unsigned long r5, unsigned long r6, unsigned long r7) | ||
383 | { | ||
384 | ibm44x_platform_init(r3, r4, r5, r6, r7); | ||
385 | |||
386 | ppc_md.setup_arch = yucca_setup_arch; | ||
387 | ppc_md.show_cpuinfo = yucca_show_cpuinfo; | ||
388 | ppc_md.find_end_of_memory = ibm440sp_find_end_of_memory; | ||
389 | ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */ | ||
390 | |||
391 | ppc_md.calibrate_decr = yucca_calibrate_decr; | ||
392 | #ifdef CONFIG_KGDB | ||
393 | ppc_md.early_serial_map = yucca_early_serial_map; | ||
394 | #endif | ||
395 | } | ||
diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h new file mode 100644 index 000000000000..01a4afea1514 --- /dev/null +++ b/arch/ppc/platforms/4xx/yucca.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/yucca.h | ||
3 | * | ||
4 | * Yucca board definitions | ||
5 | * | ||
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) | ||
7 | * | ||
8 | * Copyright 2004-2005 MontaVista Software Inc. | ||
9 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifdef __KERNEL__ | ||
19 | #ifndef __ASM_YUCCA_H__ | ||
20 | #define __ASM_YUCCA_H__ | ||
21 | |||
22 | #include <linux/config.h> | ||
23 | #include <platforms/4xx/ppc440spe.h> | ||
24 | |||
25 | /* F/W TLB mapping used in bootloader glue to reset EMAC */ | ||
26 | #define PPC44x_EMAC0_MR0 0xa0000800 | ||
27 | |||
28 | /* Location of MAC addresses in PIBS image */ | ||
29 | #define PIBS_FLASH_BASE 0xffe00000 | ||
30 | #define PIBS_MAC_BASE (PIBS_FLASH_BASE+0x1b0400) | ||
31 | |||
32 | /* External timer clock frequency */ | ||
33 | #define YUCCA_TMR_CLK 25000000 | ||
34 | |||
35 | /* | ||
36 | * FPGA registers | ||
37 | */ | ||
38 | #define YUCCA_FPGA_REG_BASE 0x00000004e2000000ULL | ||
39 | #define YUCCA_FPGA_REG_SIZE 0x24 | ||
40 | |||
41 | #define FPGA_REG1A 0x1a | ||
42 | |||
43 | #define FPGA_REG1A_PE0_GLED 0x8000 | ||
44 | #define FPGA_REG1A_PE1_GLED 0x4000 | ||
45 | #define FPGA_REG1A_PE2_GLED 0x2000 | ||
46 | #define FPGA_REG1A_PE0_YLED 0x1000 | ||
47 | #define FPGA_REG1A_PE1_YLED 0x0800 | ||
48 | #define FPGA_REG1A_PE2_YLED 0x0400 | ||
49 | #define FPGA_REG1A_PE0_PWRON 0x0200 | ||
50 | #define FPGA_REG1A_PE1_PWRON 0x0100 | ||
51 | #define FPGA_REG1A_PE2_PWRON 0x0080 | ||
52 | #define FPGA_REG1A_PE0_REFCLK_ENABLE 0x0040 | ||
53 | #define FPGA_REG1A_PE1_REFCLK_ENABLE 0x0020 | ||
54 | #define FPGA_REG1A_PE2_REFCLK_ENABLE 0x0010 | ||
55 | #define FPGA_REG1A_PE_SPREAD0 0x0008 | ||
56 | #define FPGA_REG1A_PE_SPREAD1 0x0004 | ||
57 | #define FPGA_REG1A_PE_SELSOURCE_0 0x0002 | ||
58 | #define FPGA_REG1A_PE_SELSOURCE_1 0x0001 | ||
59 | |||
60 | #define FPGA_REG1C 0x1c | ||
61 | |||
62 | #define FPGA_REG1C_PE0_ROOTPOINT 0x8000 | ||
63 | #define FPGA_REG1C_PE1_ENDPOINT 0x4000 | ||
64 | #define FPGA_REG1C_PE2_ENDPOINT 0x2000 | ||
65 | #define FPGA_REG1C_PE0_PRSNT 0x1000 | ||
66 | #define FPGA_REG1C_PE1_PRSNT 0x0800 | ||
67 | #define FPGA_REG1C_PE2_PRSNT 0x0400 | ||
68 | #define FPGA_REG1C_PE0_WAKE 0x0080 | ||
69 | #define FPGA_REG1C_PE1_WAKE 0x0040 | ||
70 | #define FPGA_REG1C_PE2_WAKE 0x0020 | ||
71 | #define FPGA_REG1C_PE0_PERST 0x0010 | ||
72 | #define FPGA_REG1C_PE1_PERST 0x0008 | ||
73 | #define FPGA_REG1C_PE2_PERST 0x0004 | ||
74 | |||
75 | /* | ||
76 | * Serial port defines | ||
77 | */ | ||
78 | #define RS_TABLE_SIZE 3 | ||
79 | |||
80 | /* PIBS defined UART mappings, used before early_serial_setup */ | ||
81 | #define UART0_IO_BASE 0xa0000200 | ||
82 | #define UART1_IO_BASE 0xa0000300 | ||
83 | #define UART2_IO_BASE 0xa0000600 | ||
84 | |||
85 | #define BASE_BAUD 11059200 | ||
86 | #define STD_UART_OP(num) \ | ||
87 | { 0, BASE_BAUD, 0, UART##num##_INT, \ | ||
88 | (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ | ||
89 | iomem_base: (void*)UART##num##_IO_BASE, \ | ||
90 | io_type: SERIAL_IO_MEM}, | ||
91 | |||
92 | #define SERIAL_PORT_DFNS \ | ||
93 | STD_UART_OP(0) \ | ||
94 | STD_UART_OP(1) \ | ||
95 | STD_UART_OP(2) | ||
96 | |||
97 | /* PCI support */ | ||
98 | #define YUCCA_PCIX_LOWER_IO 0x00000000 | ||
99 | #define YUCCA_PCIX_UPPER_IO 0x0000ffff | ||
100 | #define YUCCA_PCIX_LOWER_MEM 0x80000000 | ||
101 | #define YUCCA_PCIX_UPPER_MEM 0x8fffffff | ||
102 | #define YUCCA_PCIE_LOWER_MEM 0x90000000 | ||
103 | #define YUCCA_PCIE_MEM_SIZE 0x10000000 | ||
104 | |||
105 | #define YUCCA_PCIX_MEM_SIZE 0x10000000 | ||
106 | #define YUCCA_PCIX_MEM_OFFSET 0x00000000 | ||
107 | #define YUCCA_PCIE_MEM_SIZE 0x10000000 | ||
108 | #define YUCCA_PCIE_MEM_OFFSET 0x00000000 | ||
109 | |||
110 | #endif /* __ASM_YUCCA_H__ */ | ||
111 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index bd3ac0136756..16ad092d8a06 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c | |||
@@ -45,6 +45,8 @@ | |||
45 | 45 | ||
46 | #include <mm/mmu_decl.h> | 46 | #include <mm/mmu_decl.h> |
47 | 47 | ||
48 | #include <syslib/ppc85xx_rio.h> | ||
49 | |||
48 | #include <platforms/85xx/mpc85xx_ads_common.h> | 50 | #include <platforms/85xx/mpc85xx_ads_common.h> |
49 | 51 | ||
50 | #ifndef CONFIG_PCI | 52 | #ifndef CONFIG_PCI |
@@ -189,3 +191,11 @@ mpc85xx_exclude_device(u_char bus, u_char devfn) | |||
189 | } | 191 | } |
190 | 192 | ||
191 | #endif /* CONFIG_PCI */ | 193 | #endif /* CONFIG_PCI */ |
194 | |||
195 | #ifdef CONFIG_RAPIDIO | ||
196 | void platform_rio_init(void) | ||
197 | { | ||
198 | /* 512MB RIO LAW at 0xc0000000 */ | ||
199 | mpc85xx_rio_setup(0xc0000000, 0x20000000); | ||
200 | } | ||
201 | #endif /* CONFIG_RAPIDIO */ | ||
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 1e1b85f8193a..15ce9d070634 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/fsl_devices.h> | 38 | #include <linux/fsl_devices.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/rio.h> | ||
40 | 41 | ||
41 | #include <asm/system.h> | 42 | #include <asm/system.h> |
42 | #include <asm/pgtable.h> | 43 | #include <asm/pgtable.h> |
@@ -57,6 +58,7 @@ | |||
57 | 58 | ||
58 | #include <syslib/cpm2_pic.h> | 59 | #include <syslib/cpm2_pic.h> |
59 | #include <syslib/ppc85xx_common.h> | 60 | #include <syslib/ppc85xx_common.h> |
61 | #include <syslib/ppc85xx_rio.h> | ||
60 | 62 | ||
61 | 63 | ||
62 | unsigned char __res[sizeof(bd_t)]; | 64 | unsigned char __res[sizeof(bd_t)]; |
@@ -273,6 +275,18 @@ int mpc85xx_exclude_device(u_char bus, u_char devfn) | |||
273 | } | 275 | } |
274 | #endif /* CONFIG_PCI */ | 276 | #endif /* CONFIG_PCI */ |
275 | 277 | ||
278 | #ifdef CONFIG_RAPIDIO | ||
279 | void | ||
280 | platform_rio_init(void) | ||
281 | { | ||
282 | /* | ||
283 | * The STx firmware configures the RapidIO Local Access Window | ||
284 | * at 0xc0000000 with a size of 512MB. | ||
285 | */ | ||
286 | mpc85xx_rio_setup(0xc0000000, 0x20000000); | ||
287 | } | ||
288 | #endif /* CONFIG_RAPIDIO */ | ||
289 | |||
276 | void __init | 290 | void __init |
277 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 291 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
278 | unsigned long r6, unsigned long r7) | 292 | unsigned long r6, unsigned long r7) |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index b1324564456e..b9d844f88c2b 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -52,6 +52,8 @@ static u32 ev64360_bus_frequency; | |||
52 | 52 | ||
53 | unsigned char __res[sizeof(bd_t)]; | 53 | unsigned char __res[sizeof(bd_t)]; |
54 | 54 | ||
55 | TODC_ALLOC(); | ||
56 | |||
55 | static int __init | 57 | static int __init |
56 | ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 58 | ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
57 | { | 59 | { |
@@ -182,6 +184,9 @@ ev64360_setup_peripherals(void) | |||
182 | EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0); | 184 | EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0); |
183 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); | 185 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); |
184 | 186 | ||
187 | TODC_INIT(TODC_TYPE_DS1501, 0, 0, | ||
188 | ioremap(EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE), 8); | ||
189 | |||
185 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, | 190 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, |
186 | EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); | 191 | EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); |
187 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); | 192 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); |
@@ -496,6 +501,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
496 | ppc_md.power_off = ev64360_power_off; | 501 | ppc_md.power_off = ev64360_power_off; |
497 | ppc_md.halt = ev64360_halt; | 502 | ppc_md.halt = ev64360_halt; |
498 | ppc_md.find_end_of_memory = ev64360_find_end_of_memory; | 503 | ppc_md.find_end_of_memory = ev64360_find_end_of_memory; |
504 | ppc_md.init = NULL; | ||
505 | |||
506 | ppc_md.time_init = todc_time_init; | ||
507 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
508 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
509 | ppc_md.nvram_read_val = todc_direct_read_val; | ||
510 | ppc_md.nvram_write_val = todc_direct_write_val; | ||
499 | ppc_md.calibrate_decr = ev64360_calibrate_decr; | 511 | ppc_md.calibrate_decr = ev64360_calibrate_decr; |
500 | 512 | ||
501 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) | 513 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) |