summaryrefslogtreecommitdiffstats
path: root/board/freescale/ls2085a/ls2085a.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/ls2085a/ls2085a.c')
-rw-r--r--board/freescale/ls2085a/ls2085a.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/board/freescale/ls2085a/ls2085a.c b/board/freescale/ls2085a/ls2085a.c
index 163a4c486a..519d61cb1e 100644
--- a/board/freescale/ls2085a/ls2085a.c
+++ b/board/freescale/ls2085a/ls2085a.c
@@ -12,7 +12,7 @@
#include <asm/io.h>
#include <fdt_support.h>
#include <libfdt.h>
-#include <fsl_mc.h>
+#include <fsl-mc/fsl_mc.h>
#include <environment.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -59,8 +59,15 @@ int timer_init(void)
u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR;
u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
- out_le32(cltbenr, 0x1); /* enable cluster0 timebase */
- out_le32(cntcr, 0x1); /* enable clock for timer */
+ /* Enable timebase for all clusters.
+ * It is safe to do so even some clusters are not enabled.
+ */
+ out_le32(cltbenr, 0xf);
+
+ /* Enable clock for timer
+ * This is a global setting.
+ */
+ out_le32(cntcr, 0x1);
return 0;
}
@@ -91,7 +98,21 @@ void fdt_fixup_board_enet(void *fdt)
{
int offset;
- offset = fdt_path_offset(fdt, "/fsl,dprc@0");
+ offset = fdt_path_offset(fdt, "/fsl-mc");
+
+ /*
+ * TODO: Remove this when backward compatibility
+ * with old DT node (fsl,dprc@0) is no longer needed.
+ */
+ if (offset < 0)
+ offset = fdt_path_offset(fdt, "/fsl,dprc@0");
+
+ if (offset < 0) {
+ printf("%s: ERROR: fsl-mc node not found in device tree (error %d)\n",
+ __func__, offset);
+ return;
+ }
+
if (get_mc_boot_status() == 0)
fdt_status_okay(fdt, offset);
else
OpenPOWER on IntegriCloud