diff options
author | Scott Wood <scottwood@freescale.com> | 2007-11-25 05:09:31 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-12-13 23:45:35 -0500 |
commit | 0b5cf10691eb2c95a9126bf25f5e084d83d5d743 (patch) | |
tree | 5b3e861e4247b080067070d11d238705c03e38ed /arch/powerpc/platforms/8xx | |
parent | 77d4309e19b1a7ab3286cd741e924894fc329986 (diff) |
[POWERPC] 8xx: Convert mpc866ads to the new device binding.
Verified on mpc866ads. This version has muram and brg nodes added to dts
to get the things work.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/8xx')
-rw-r--r-- | arch/powerpc/platforms/8xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/8xx/mpc86xads.h | 44 | ||||
-rw-r--r-- | arch/powerpc/platforms/8xx/mpc86xads_setup.c | 289 |
3 files changed, 81 insertions, 253 deletions
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig index bd28655043a0..91fbe4241918 100644 --- a/arch/powerpc/platforms/8xx/Kconfig +++ b/arch/powerpc/platforms/8xx/Kconfig | |||
@@ -18,6 +18,7 @@ config MPC8XXFADS | |||
18 | config MPC86XADS | 18 | config MPC86XADS |
19 | bool "MPC86XADS" | 19 | bool "MPC86XADS" |
20 | select CPM1 | 20 | select CPM1 |
21 | select PPC_CPM_NEW_BINDING | ||
21 | help | 22 | help |
22 | MPC86x Application Development System by Freescale Semiconductor. | 23 | MPC86x Application Development System by Freescale Semiconductor. |
23 | The MPC86xADS is meant to serve as a platform for s/w and h/w | 24 | The MPC86xADS is meant to serve as a platform for s/w and h/w |
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h index cffa194ccf1f..17b1fe75e0b2 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/arch/powerpc/platforms/8xx/mpc86xads.h | |||
@@ -15,27 +15,6 @@ | |||
15 | #ifndef __ASM_MPC86XADS_H__ | 15 | #ifndef __ASM_MPC86XADS_H__ |
16 | #define __ASM_MPC86XADS_H__ | 16 | #define __ASM_MPC86XADS_H__ |
17 | 17 | ||
18 | #include <sysdev/fsl_soc.h> | ||
19 | |||
20 | /* U-Boot maps BCSR to 0xff080000 */ | ||
21 | #define BCSR_ADDR ((uint)0xff080000) | ||
22 | #define BCSR_SIZE ((uint)32) | ||
23 | #define BCSR0 ((uint)(BCSR_ADDR + 0x00)) | ||
24 | #define BCSR1 ((uint)(BCSR_ADDR + 0x04)) | ||
25 | #define BCSR2 ((uint)(BCSR_ADDR + 0x08)) | ||
26 | #define BCSR3 ((uint)(BCSR_ADDR + 0x0c)) | ||
27 | #define BCSR4 ((uint)(BCSR_ADDR + 0x10)) | ||
28 | |||
29 | #define CFG_PHYDEV_ADDR ((uint)0xff0a0000) | ||
30 | #define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300)) | ||
31 | |||
32 | #define MPC8xx_CPM_OFFSET (0x9c0) | ||
33 | #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) | ||
34 | #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver | ||
35 | |||
36 | #define PCMCIA_MEM_ADDR ((uint)0xff020000) | ||
37 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) | ||
38 | |||
39 | /* Bits of interest in the BCSRs. | 18 | /* Bits of interest in the BCSRs. |
40 | */ | 19 | */ |
41 | #define BCSR1_ETHEN ((uint)0x20000000) | 20 | #define BCSR1_ETHEN ((uint)0x20000000) |
@@ -64,28 +43,5 @@ | |||
64 | #define BCSR5_MII1_EN 0x02 | 43 | #define BCSR5_MII1_EN 0x02 |
65 | #define BCSR5_MII1_RST 0x01 | 44 | #define BCSR5_MII1_RST 0x01 |
66 | 45 | ||
67 | /* Interrupt level assignments */ | ||
68 | #define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */ | ||
69 | #define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */ | ||
70 | #define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */ | ||
71 | |||
72 | /* We don't use the 8259 */ | ||
73 | #define NR_8259_INTS 0 | ||
74 | |||
75 | /* CPM Ethernet through SCC1 */ | ||
76 | #define PA_ENET_RXD ((ushort)0x0001) | ||
77 | #define PA_ENET_TXD ((ushort)0x0002) | ||
78 | #define PA_ENET_TCLK ((ushort)0x0100) | ||
79 | #define PA_ENET_RCLK ((ushort)0x0200) | ||
80 | #define PB_ENET_TENA ((uint)0x00001000) | ||
81 | #define PC_ENET_CLSN ((ushort)0x0010) | ||
82 | #define PC_ENET_RENA ((ushort)0x0020) | ||
83 | |||
84 | /* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to | ||
85 | * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. | ||
86 | */ | ||
87 | #define SICR_ENET_MASK ((uint)0x000000ff) | ||
88 | #define SICR_ENET_CLKRT ((uint)0x0000002c) | ||
89 | |||
90 | #endif /* __ASM_MPC86XADS_H__ */ | 46 | #endif /* __ASM_MPC86XADS_H__ */ |
91 | #endif /* __KERNEL__ */ | 47 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index 49012835f453..d2927a434aef 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c | |||
@@ -6,264 +6,134 @@ | |||
6 | * | 6 | * |
7 | * Copyright 2005 MontaVista Software Inc. | 7 | * Copyright 2005 MontaVista Software Inc. |
8 | * | 8 | * |
9 | * Heavily modified by Scott Wood <scottwood@freescale.com> | ||
10 | * Copyright 2007 Freescale Semiconductor, Inc. | ||
11 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | 12 | * This file is licensed under the terms of the GNU General Public License |
10 | * version 2. This program is licensed "as is" without any warranty of any | 13 | * version 2. This program is licensed "as is" without any warranty of any |
11 | * kind, whether express or implied. | 14 | * kind, whether express or implied. |
12 | */ | 15 | */ |
13 | 16 | ||
14 | #include <linux/init.h> | 17 | #include <linux/init.h> |
15 | #include <linux/module.h> | 18 | #include <linux/of_platform.h> |
16 | #include <linux/param.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/device.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/root_dev.h> | ||
22 | |||
23 | #include <linux/fs_enet_pd.h> | ||
24 | #include <linux/fs_uart_pd.h> | ||
25 | #include <linux/mii.h> | ||
26 | 19 | ||
27 | #include <asm/delay.h> | ||
28 | #include <asm/io.h> | 20 | #include <asm/io.h> |
29 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
30 | #include <asm/page.h> | ||
31 | #include <asm/processor.h> | ||
32 | #include <asm/system.h> | 22 | #include <asm/system.h> |
33 | #include <asm/time.h> | 23 | #include <asm/time.h> |
34 | #include <asm/mpc8xx.h> | 24 | #include <asm/mpc8xx.h> |
35 | #include <asm/8xx_immap.h> | 25 | #include <asm/8xx_immap.h> |
36 | #include <asm/commproc.h> | 26 | #include <asm/commproc.h> |
37 | #include <asm/fs_pd.h> | 27 | #include <asm/fs_pd.h> |
38 | #include <asm/prom.h> | 28 | #include <asm/udbg.h> |
39 | 29 | ||
40 | #include <sysdev/commproc.h> | 30 | #include <sysdev/commproc.h> |
41 | 31 | ||
42 | static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi); | 32 | #include "mpc86xads.h" |
43 | static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi); | ||
44 | static void init_scc1_ioports(struct fs_platform_info* ptr); | ||
45 | |||
46 | void __init mpc86xads_board_setup(void) | ||
47 | { | ||
48 | cpm8xx_t *cp; | ||
49 | unsigned int *bcsr_io; | ||
50 | u8 tmpval8; | ||
51 | |||
52 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
53 | cp = (cpm8xx_t *)immr_map(im_cpm); | ||
54 | |||
55 | if (bcsr_io == NULL) { | ||
56 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
57 | return; | ||
58 | } | ||
59 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
60 | clrbits32(bcsr_io, BCSR1_RS232EN_1); | ||
61 | clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */ | ||
62 | tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX); | ||
63 | out_8(&(cp->cp_smc[0].smc_smcm), tmpval8); | ||
64 | clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); | ||
65 | #else | ||
66 | setbits32(bcsr_io,BCSR1_RS232EN_1); | ||
67 | out_be16(&cp->cp_smc[0].smc_smcmr, 0); | ||
68 | out_8(&cp->cp_smc[0].smc_smce, 0); | ||
69 | #endif | ||
70 | |||
71 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
72 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
73 | clrbits32(&cp->cp_simode, 0xe0000000 >> 1); | ||
74 | setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ | ||
75 | tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX); | ||
76 | out_8(&(cp->cp_smc[1].smc_smcm), tmpval8); | ||
77 | clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN); | ||
78 | 33 | ||
79 | init_smc2_uart_ioports(0); | 34 | struct cpm_pin { |
80 | #else | 35 | int port, pin, flags; |
81 | setbits32(bcsr_io,BCSR1_RS232EN_2); | 36 | }; |
82 | out_be16(&cp->cp_smc[1].smc_smcmr, 0); | ||
83 | out_8(&cp->cp_smc[1].smc_smce, 0); | ||
84 | #endif | ||
85 | immr_unmap(cp); | ||
86 | iounmap(bcsr_io); | ||
87 | } | ||
88 | 37 | ||
38 | static struct cpm_pin mpc866ads_pins[] = { | ||
39 | /* SMC1 */ | ||
40 | {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */ | ||
41 | {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ | ||
42 | |||
43 | /* SMC2 */ | ||
44 | {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */ | ||
45 | {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ | ||
46 | |||
47 | /* SCC1 */ | ||
48 | {CPM_PORTA, 6, CPM_PIN_INPUT}, /* CLK1 */ | ||
49 | {CPM_PORTA, 7, CPM_PIN_INPUT}, /* CLK2 */ | ||
50 | {CPM_PORTA, 14, CPM_PIN_INPUT}, /* TX */ | ||
51 | {CPM_PORTA, 15, CPM_PIN_INPUT}, /* RX */ | ||
52 | {CPM_PORTB, 19, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */ | ||
53 | {CPM_PORTC, 10, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */ | ||
54 | {CPM_PORTC, 11, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */ | ||
55 | |||
56 | /* MII */ | ||
57 | {CPM_PORTD, 3, CPM_PIN_OUTPUT}, | ||
58 | {CPM_PORTD, 4, CPM_PIN_OUTPUT}, | ||
59 | {CPM_PORTD, 5, CPM_PIN_OUTPUT}, | ||
60 | {CPM_PORTD, 6, CPM_PIN_OUTPUT}, | ||
61 | {CPM_PORTD, 7, CPM_PIN_OUTPUT}, | ||
62 | {CPM_PORTD, 8, CPM_PIN_OUTPUT}, | ||
63 | {CPM_PORTD, 9, CPM_PIN_OUTPUT}, | ||
64 | {CPM_PORTD, 10, CPM_PIN_OUTPUT}, | ||
65 | {CPM_PORTD, 11, CPM_PIN_OUTPUT}, | ||
66 | {CPM_PORTD, 12, CPM_PIN_OUTPUT}, | ||
67 | {CPM_PORTD, 13, CPM_PIN_OUTPUT}, | ||
68 | {CPM_PORTD, 14, CPM_PIN_OUTPUT}, | ||
69 | {CPM_PORTD, 15, CPM_PIN_OUTPUT}, | ||
70 | }; | ||
89 | 71 | ||
90 | static void init_fec1_ioports(struct fs_platform_info* ptr) | 72 | static void __init init_ioports(void) |
91 | { | 73 | { |
92 | iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); | 74 | int i; |
93 | 75 | ||
94 | /* configure FEC1 pins */ | 76 | for (i = 0; i < ARRAY_SIZE(mpc866ads_pins); i++) { |
77 | struct cpm_pin *pin = &mpc866ads_pins[i]; | ||
78 | cpm1_set_pin(pin->port, pin->pin, pin->flags); | ||
79 | } | ||
95 | 80 | ||
96 | setbits16(&io_port->iop_pdpar, 0x1fff); | 81 | cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX); |
97 | setbits16(&io_port->iop_pddir, 0x1fff); | 82 | cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX); |
83 | cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK1, CPM_CLK_TX); | ||
84 | cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK2, CPM_CLK_RX); | ||
98 | 85 | ||
99 | immr_unmap(io_port); | 86 | /* Set FEC1 and FEC2 to MII mode */ |
87 | clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180); | ||
100 | } | 88 | } |
101 | 89 | ||
102 | void init_fec_ioports(struct fs_platform_info *fpi) | 90 | static void __init mpc86xads_setup_arch(void) |
103 | { | 91 | { |
104 | int fec_no = fs_get_fec_index(fpi->fs_no); | 92 | struct device_node *np; |
93 | u32 __iomem *bcsr_io; | ||
94 | |||
95 | cpm_reset(); | ||
96 | init_ioports(); | ||
105 | 97 | ||
106 | switch (fec_no) { | 98 | np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr"); |
107 | case 0: | 99 | if (!np) { |
108 | init_fec1_ioports(fpi); | 100 | printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n"); |
109 | break; | ||
110 | default: | ||
111 | printk(KERN_ERR "init_fec_ioports: invalid FEC number\n"); | ||
112 | return; | 101 | return; |
113 | } | 102 | } |
114 | } | ||
115 | 103 | ||
116 | static void init_scc1_ioports(struct fs_platform_info* fpi) | 104 | bcsr_io = of_iomap(np, 0); |
117 | { | 105 | of_node_put(np); |
118 | unsigned *bcsr_io; | ||
119 | iop8xx_t *io_port; | ||
120 | cpm8xx_t *cp; | ||
121 | |||
122 | bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
123 | io_port = (iop8xx_t *)immr_map(im_ioport); | ||
124 | cp = (cpm8xx_t *)immr_map(im_cpm); | ||
125 | 106 | ||
126 | if (bcsr_io == NULL) { | 107 | if (bcsr_io == NULL) { |
127 | printk(KERN_CRIT "Could not remap BCSR\n"); | 108 | printk(KERN_CRIT "Could not remap BCSR\n"); |
128 | return; | 109 | return; |
129 | } | 110 | } |
130 | 111 | ||
131 | /* Configure port A pins for Txd and Rxd. | 112 | clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN); |
132 | */ | ||
133 | setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
134 | clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
135 | clrbits16(&io_port->iop_paodr, PA_ENET_TXD); | ||
136 | |||
137 | /* Configure port C pins to enable CLSN and RENA. | ||
138 | */ | ||
139 | clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
140 | clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
141 | setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
142 | |||
143 | /* Configure port A for TCLK and RCLK. | ||
144 | */ | ||
145 | setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); | ||
146 | clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); | ||
147 | clrbits32(&cp->cp_pbpar, PB_ENET_TENA); | ||
148 | clrbits32(&cp->cp_pbdir, PB_ENET_TENA); | ||
149 | |||
150 | /* Configure Serial Interface clock routing. | ||
151 | * First, clear all SCC bits to zero, then set the ones we want. | ||
152 | */ | ||
153 | clrbits32(&cp->cp_sicr, SICR_ENET_MASK); | ||
154 | setbits32(&cp->cp_sicr, SICR_ENET_CLKRT); | ||
155 | |||
156 | /* In the original SCC enet driver the following code is placed at | ||
157 | the end of the initialization */ | ||
158 | setbits32(&cp->cp_pbpar, PB_ENET_TENA); | ||
159 | setbits32(&cp->cp_pbdir, PB_ENET_TENA); | ||
160 | |||
161 | clrbits32(bcsr_io+1, BCSR1_ETHEN); | ||
162 | iounmap(bcsr_io); | 113 | iounmap(bcsr_io); |
163 | immr_unmap(cp); | ||
164 | immr_unmap(io_port); | ||
165 | } | ||
166 | |||
167 | void init_scc_ioports(struct fs_platform_info *fpi) | ||
168 | { | ||
169 | int scc_no = fs_get_scc_index(fpi->fs_no); | ||
170 | |||
171 | switch (scc_no) { | ||
172 | case 0: | ||
173 | init_scc1_ioports(fpi); | ||
174 | break; | ||
175 | default: | ||
176 | printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); | ||
177 | return; | ||
178 | } | ||
179 | } | 114 | } |
180 | 115 | ||
181 | 116 | static int __init mpc86xads_probe(void) | |
182 | |||
183 | static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr) | ||
184 | { | 117 | { |
185 | unsigned *bcsr_io; | 118 | unsigned long root = of_get_flat_dt_root(); |
186 | cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); | 119 | return of_flat_dt_is_compatible(root, "fsl,mpc866ads"); |
187 | |||
188 | setbits32(&cp->cp_pbpar, 0x000000c0); | ||
189 | clrbits32(&cp->cp_pbdir, 0x000000c0); | ||
190 | clrbits16(&cp->cp_pbodr, 0x00c0); | ||
191 | immr_unmap(cp); | ||
192 | |||
193 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
194 | |||
195 | if (bcsr_io == NULL) { | ||
196 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
197 | return; | ||
198 | } | ||
199 | clrbits32(bcsr_io,BCSR1_RS232EN_1); | ||
200 | iounmap(bcsr_io); | ||
201 | } | 120 | } |
202 | 121 | ||
203 | static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi) | 122 | static struct of_device_id __initdata of_bus_ids[] = { |
204 | { | 123 | { .name = "soc", }, |
205 | unsigned *bcsr_io; | 124 | { .name = "cpm", }, |
206 | cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); | 125 | { .name = "localbus", }, |
207 | 126 | {}, | |
208 | setbits32(&cp->cp_pbpar, 0x00000c00); | 127 | }; |
209 | clrbits32(&cp->cp_pbdir, 0x00000c00); | ||
210 | clrbits16(&cp->cp_pbodr, 0x0c00); | ||
211 | immr_unmap(cp); | ||
212 | |||
213 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
214 | |||
215 | if (bcsr_io == NULL) { | ||
216 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
217 | return; | ||
218 | } | ||
219 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
220 | iounmap(bcsr_io); | ||
221 | } | ||
222 | 128 | ||
223 | void init_smc_ioports(struct fs_uart_platform_info *data) | 129 | static int __init declare_of_platform_devices(void) |
224 | { | 130 | { |
225 | int smc_no = fs_uart_id_fsid2smc(data->fs_no); | 131 | if (machine_is(mpc86x_ads)) |
132 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
226 | 133 | ||
227 | switch (smc_no) { | ||
228 | case 0: | ||
229 | init_smc1_uart_ioports(data); | ||
230 | data->brg = data->clk_rx; | ||
231 | break; | ||
232 | case 1: | ||
233 | init_smc2_uart_ioports(data); | ||
234 | data->brg = data->clk_rx; | ||
235 | break; | ||
236 | default: | ||
237 | printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); | ||
238 | return; | ||
239 | } | ||
240 | } | ||
241 | |||
242 | int platform_device_skip(const char *model, int id) | ||
243 | { | ||
244 | return 0; | 134 | return 0; |
245 | } | 135 | } |
246 | 136 | device_initcall(declare_of_platform_devices); | |
247 | static void __init mpc86xads_setup_arch(void) | ||
248 | { | ||
249 | cpm_reset(); | ||
250 | |||
251 | mpc86xads_board_setup(); | ||
252 | |||
253 | ROOT_DEV = Root_NFS; | ||
254 | } | ||
255 | |||
256 | static int __init mpc86xads_probe(void) | ||
257 | { | ||
258 | char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), | ||
259 | "model", NULL); | ||
260 | if (model == NULL) | ||
261 | return 0; | ||
262 | if (strcmp(model, "MPC866ADS")) | ||
263 | return 0; | ||
264 | |||
265 | return 1; | ||
266 | } | ||
267 | 137 | ||
268 | define_machine(mpc86x_ads) { | 138 | define_machine(mpc86x_ads) { |
269 | .name = "MPC86x ADS", | 139 | .name = "MPC86x ADS", |
@@ -275,4 +145,5 @@ define_machine(mpc86x_ads) { | |||
275 | .calibrate_decr = mpc8xx_calibrate_decr, | 145 | .calibrate_decr = mpc8xx_calibrate_decr, |
276 | .set_rtc_time = mpc8xx_set_rtc_time, | 146 | .set_rtc_time = mpc8xx_set_rtc_time, |
277 | .get_rtc_time = mpc8xx_get_rtc_time, | 147 | .get_rtc_time = mpc8xx_get_rtc_time, |
148 | .progress = udbg_progress, | ||
278 | }; | 149 | }; |