mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 16:05:34 +07:00
ad1d7d7c10
Based on 1 normalized pattern(s): this is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190113.515971893@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 lines
781 B
C
41 lines
781 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Routines common to most mpc86xx-based boards.
|
|
*/
|
|
|
|
#include <linux/of_platform.h>
|
|
#include <asm/synch.h>
|
|
|
|
#include "mpc86xx.h"
|
|
|
|
static const struct of_device_id mpc86xx_common_ids[] __initconst = {
|
|
{ .type = "soc", },
|
|
{ .compatible = "soc", },
|
|
{ .compatible = "simple-bus", },
|
|
{ .name = "localbus", },
|
|
{ .compatible = "gianfar", },
|
|
{ .compatible = "fsl,mpc8641-pcie", },
|
|
{},
|
|
};
|
|
|
|
int __init mpc86xx_common_publish_devices(void)
|
|
{
|
|
return of_platform_bus_probe(NULL, mpc86xx_common_ids, NULL);
|
|
}
|
|
|
|
long __init mpc86xx_time_init(void)
|
|
{
|
|
unsigned int temp;
|
|
|
|
/* Set the time base to zero */
|
|
mtspr(SPRN_TBWL, 0);
|
|
mtspr(SPRN_TBWU, 0);
|
|
|
|
temp = mfspr(SPRN_HID0);
|
|
temp |= HID0_TBEN;
|
|
mtspr(SPRN_HID0, temp);
|
|
isync();
|
|
|
|
return 0;
|
|
}
|