mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-29 10:26:00 -04:00
Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
43 lines
826 B
C
43 lines
826 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Routines common to most mpc86xx-based boards.
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/of_platform.h>
|
|
#include <asm/reg.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;
|
|
}
|