2 * arch/powerpc/platforms/83xx/mpc837x_rdb.c
4 * Copyright (C) 2007 Freescale Semicondutor, Inc. All rights reserved.
6 * MPC837x RDB board specific routines
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
14 #include <linux/pci.h>
15 #include <linux/of_platform.h>
20 #include <sysdev/fsl_soc.h>
21 #include <sysdev/fsl_pci.h>
25 static void mpc837x_rdb_sd_cfg(void)
29 im
= ioremap(get_immrbase(), 0x1000);
36 * On RDB boards (in contrast to MDS) USBB pins are used for SD only,
37 * so we can safely mux them away from the USB block.
39 clrsetbits_be32(im
+ MPC83XX_SICRL_OFFS
, MPC837X_SICRL_USBB_MASK
,
41 clrsetbits_be32(im
+ MPC83XX_SICRH_OFFS
, MPC837X_SICRH_SPI_MASK
,
46 /* ************************************************************************
48 * Setup the architecture
51 static void __init
mpc837x_rdb_setup_arch(void)
54 struct device_node
*np
;
58 ppc_md
.progress("mpc837x_rdb_setup_arch()", 0);
61 for_each_compatible_node(np
, "pci", "fsl,mpc8349-pci")
62 mpc83xx_add_bridge(np
);
63 for_each_compatible_node(np
, "pci", "fsl,mpc8314-pcie")
64 mpc83xx_add_bridge(np
);
70 static struct of_device_id mpc837x_ids
[] = {
72 { .compatible
= "soc", },
73 { .compatible
= "simple-bus", },
74 { .compatible
= "gianfar", },
75 { .compatible
= "gpio-leds", },
79 static int __init
mpc837x_declare_of_platform_devices(void)
81 /* Publish platform_device */
82 of_platform_bus_probe(NULL
, mpc837x_ids
, NULL
);
86 machine_device_initcall(mpc837x_rdb
, mpc837x_declare_of_platform_devices
);
88 static void __init
mpc837x_rdb_init_IRQ(void)
90 struct device_node
*np
;
92 np
= of_find_compatible_node(NULL
, NULL
, "fsl,ipic");
98 /* Initialize the default interrupt mapping priorities,
99 * in case the boot rom changed something on us.
101 ipic_set_default_priority();
104 static const char *board
[] __initdata
= {
113 * Called very early, MMU is off, device-tree isn't unflattened
115 static int __init
mpc837x_rdb_probe(void)
117 return of_flat_dt_match(of_get_flat_dt_root(), board
);
120 define_machine(mpc837x_rdb
) {
121 .name
= "MPC837x RDB/WLAN",
122 .probe
= mpc837x_rdb_probe
,
123 .setup_arch
= mpc837x_rdb_setup_arch
,
124 .init_IRQ
= mpc837x_rdb_init_IRQ
,
125 .get_irq
= ipic_get_irq
,
126 .restart
= mpc83xx_restart
,
127 .time_init
= mpc83xx_time_init
,
128 .calibrate_decr
= generic_calibrate_decr
,
129 .progress
= udbg_progress
,