Skip to content

Commit a8739ac

Browse files
committed
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/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 27994cb + 614bef7 commit a8739ac

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

arch/arm/mach-imx/gpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void __init imx_gpc_check_dt(void)
275275
if (WARN_ON(!np))
276276
return;
277277

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

281281
/* map GPC, so that at least CPUidle and WARs keep working */

arch/arm/mach-imx/mach-imx6q.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static void __init imx6q_enet_phy_init(void)
7979
static void __init imx6q_1588_init(void)
8080
{
8181
struct device_node *np;
82-
struct clk *ptp_clk;
82+
struct clk *ptp_clk, *fec_enet_ref;
8383
struct clk *enet_ref;
8484
struct regmap *gpr;
8585
u32 clksel;
@@ -90,6 +90,14 @@ static void __init imx6q_1588_init(void)
9090
return;
9191
}
9292

93+
/*
94+
* If enet_clk_ref configured, we assume DT did it properly and .
95+
* clk-imx6q.c will do needed configuration.
96+
*/
97+
fec_enet_ref = of_clk_get_by_name(np, "enet_clk_ref");
98+
if (!IS_ERR(fec_enet_ref))
99+
goto put_node;
100+
93101
ptp_clk = of_clk_get(np, 2);
94102
if (IS_ERR(ptp_clk)) {
95103
pr_warn("%s: failed to get ptp clock\n", __func__);

arch/arm/mach-imx/mach-imx6ul.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
*/
55
#include <linux/irqchip.h>
66
#include <linux/mfd/syscon.h>
7-
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
8-
#include <linux/micrel_phy.h>
97
#include <linux/of_platform.h>
108
#include <linux/phy.h>
119
#include <linux/regmap.h>
@@ -16,30 +14,12 @@
1614
#include "cpuidle.h"
1715
#include "hardware.h"
1816

19-
static void __init imx6ul_enet_clk_init(void)
20-
{
21-
struct regmap *gpr;
22-
23-
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
24-
if (!IS_ERR(gpr))
25-
regmap_update_bits(gpr, IOMUXC_GPR1, IMX6UL_GPR1_ENET_CLK_DIR,
26-
IMX6UL_GPR1_ENET_CLK_OUTPUT);
27-
else
28-
pr_err("failed to find fsl,imx6ul-iomux-gpr regmap\n");
29-
}
30-
31-
static inline void imx6ul_enet_init(void)
32-
{
33-
imx6ul_enet_clk_init();
34-
}
35-
3617
static void __init imx6ul_init_machine(void)
3718
{
3819
imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
3920
imx_get_soc_revision());
4021

4122
of_platform_default_populate(NULL, NULL, NULL);
42-
imx6ul_enet_init();
4323
imx_anatop_init();
4424
imx6ul_pm_init();
4525
}

arch/arm/mach-mxs/mach-mxs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui)
174174

175175
from = np;
176176

177-
if (of_get_property(np, "local-mac-address", NULL))
177+
if (of_property_present(np, "local-mac-address"))
178178
continue;
179179

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

0 commit comments

Comments
 (0)