Unverified Commit a8739ac1 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'imx-soc-6.4' of...

Merge tag 'imx-soc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/arm

i.MX SoC changes for 6.4:

- A couple of changes from Oleksij Rempel which make it possible
  to configure Ethernet refclock from device tree.
- Use common DT helpers to test DT property presence and read boolean
  properties.

* tag 'imx-soc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx: Use of_property_read_bool() for boolean properties
  ARM: mxs: Use of_property_present() for testing DT property presence
  ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite
  ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present

Link: https://lore.kernel.org/r/20230408101928.280271-2-shawnguo@kernel.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 27994cb0 614bef7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ void __init imx_gpc_check_dt(void)
	if (WARN_ON(!np))
		return;

	if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
	if (WARN_ON(!of_property_read_bool(np, "interrupt-controller"))) {
		pr_warn("Outdated DT detected, suspend/resume will NOT work\n");

		/* map GPC, so that at least CPUidle and WARs keep working */
+9 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static void __init imx6q_enet_phy_init(void)
static void __init imx6q_1588_init(void)
{
	struct device_node *np;
	struct clk *ptp_clk;
	struct clk *ptp_clk, *fec_enet_ref;
	struct clk *enet_ref;
	struct regmap *gpr;
	u32 clksel;
@@ -90,6 +90,14 @@ static void __init imx6q_1588_init(void)
		return;
	}

	/*
	 * If enet_clk_ref configured, we assume DT did it properly and .
	 * clk-imx6q.c will do needed configuration.
	 */
	fec_enet_ref = of_clk_get_by_name(np, "enet_clk_ref");
	if (!IS_ERR(fec_enet_ref))
		goto put_node;

	ptp_clk = of_clk_get(np, 2);
	if (IS_ERR(ptp_clk)) {
		pr_warn("%s: failed to get ptp clock\n", __func__);
+0 −20
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@
 */
#include <linux/irqchip.h>
#include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
#include <linux/micrel_phy.h>
#include <linux/of_platform.h>
#include <linux/phy.h>
#include <linux/regmap.h>
@@ -16,30 +14,12 @@
#include "cpuidle.h"
#include "hardware.h"

static void __init imx6ul_enet_clk_init(void)
{
	struct regmap *gpr;

	gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
	if (!IS_ERR(gpr))
		regmap_update_bits(gpr, IOMUXC_GPR1, IMX6UL_GPR1_ENET_CLK_DIR,
				   IMX6UL_GPR1_ENET_CLK_OUTPUT);
	else
		pr_err("failed to find fsl,imx6ul-iomux-gpr regmap\n");
}

static inline void imx6ul_enet_init(void)
{
	imx6ul_enet_clk_init();
}

static void __init imx6ul_init_machine(void)
{
	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
		imx_get_soc_revision());

	of_platform_default_populate(NULL, NULL, NULL);
	imx6ul_enet_init();
	imx_anatop_init();
	imx6ul_pm_init();
}
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui)

		from = np;

		if (of_get_property(np, "local-mac-address", NULL))
		if (of_property_present(np, "local-mac-address"))
			continue;

		newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);