-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
powerpc/86xx: Consolidate common platform code
Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Scott Wood <oss@buserror.net>
- Loading branch information
Alessio Igor Bogani
authored and
Scott Wood
committed
Mar 12, 2016
1 parent
737b01f
commit 4f9d6e9
Showing
9 changed files
with
53 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Routines common to most mpc86xx-based boards. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters