WIP FPC-III support
[linux/fpc-iii.git] / arch / powerpc / platforms / 86xx / common.c
blob0069d38263e70c2567cbcd463dfdb0ce96ba1160
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Routines common to most mpc86xx-based boards.
4 */
6 #include <linux/of_platform.h>
7 #include <asm/synch.h>
9 #include "mpc86xx.h"
11 static const struct of_device_id mpc86xx_common_ids[] __initconst = {
12 { .type = "soc", },
13 { .compatible = "soc", },
14 { .compatible = "simple-bus", },
15 { .name = "localbus", },
16 { .compatible = "gianfar", },
17 { .compatible = "fsl,mpc8641-pcie", },
18 {},
21 int __init mpc86xx_common_publish_devices(void)
23 return of_platform_bus_probe(NULL, mpc86xx_common_ids, NULL);
26 long __init mpc86xx_time_init(void)
28 unsigned int temp;
30 /* Set the time base to zero */
31 mtspr(SPRN_TBWL, 0);
32 mtspr(SPRN_TBWU, 0);
34 temp = mfspr(SPRN_HID0);
35 temp |= HID0_TBEN;
36 mtspr(SPRN_HID0, temp);
37 isync();
39 return 0;