summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
diff options
context:
space:
mode:
authorAhmed Mansour <ahmed.mansour@nxp.com>2016-11-10 16:26:50 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2018-01-09 04:27:46 (GMT)
commit0ad76d551c2130d08195abdd7bc1c193d815a6f6 (patch)
tree49c2a713e62651a2fcffcbead43fc68fc3bd1924 /arch/arm/cpu/armv8/fsl-layerscape/fdt.c
parent87c73aa96f21b81ef3201ab1cf0b29d357854113 (diff)
downloadu-boot-0ad76d551c2130d08195abdd7bc1c193d815a6f6.tar.xz
drivers/misc: Share qbman init between archs
This patch adds changes necessary to move functionality present in PowerPC folders with ARM architectures that have DPAA1 QBMan hardware - Create new board/freescale/common/fsl_portals.c to house shared device tree fixups for DPAA1 devices with ARM and PowerPC cores - Add new header file to top includes directory to allow files in both architectures to grab the function prototypes - Port inhibit_portals() from PowerPC to ARM. This function is used in setup to disable interrupts on all QMan and BMan portals. It is needed because the interrupts are enabled by default for all portals including unused/uninitialised portals. When the kernel attempts to go to deep sleep the unused portals prevent it from doing so Signed-off-by: Ahmed Mansour <ahmed.mansour@nxp.com> Series-changes: 2 - Add get_qman_freq() to replace get_sys_info() for readability - Correct the copyright year in new files - Replace !ARM with PPC to wall off PowerPC SOCs specific qman setup - Rename portals.c -> fsl_portals.c for clarity Series-changes: 3 - Add freescale old copyright in new file since it is a modified copy - Add ifdef QBMAN guard around get_qman_freq() - Return freq_qman instead of freq_systembus. More readable and robust - Add white space before return line in get_qman_freq() Series-changes: 4 - Update function name setup_portals() to setup_qbman_portals() in files that were missed the first time Series-changes: 5 - Include <fsl_qbman.h> to fix missing prototype in p1023rdb.c
Diffstat (limited to 'arch/arm/cpu/armv8/fsl-layerscape/fdt.c')
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fdt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 39ffe1a..80af318 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -26,6 +26,8 @@
#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
#include <asm/armv8/sec_firmware.h>
#endif
+#include <asm/arch/speed.h>
+#include <fsl_qbman.h>
int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc)
{
@@ -442,6 +444,13 @@ void ft_cpu_setup(void *blob, bd_t *bd)
fdt_fixup_esdhc(blob, bd);
#endif
+#ifdef CONFIG_SYS_DPAA_QBMAN
+ fdt_fixup_bportals(blob);
+ fdt_fixup_qportals(blob);
+ do_fixup_by_compat_u32(blob, "fsl,qman",
+ "clock-frequency", get_qman_freq(), 1);
+#endif
+
#ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_firmware(blob);
#endif