Skip to contentSkip to conversation

ARM: mach-imx: Remove board entries in dt_board_compat

PATCH Superseded Fabio Estevam 6 participants 12 messages Jun 17, 2012 – Aug 14, 2012

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

From: Fabio Estevam <[email protected]>

There is no need for adding board related entries into dt_board_compat.

Leave only the SoC entry.

This way we do not need to patch a C file when adding dt support for a new board.

---
 arch/arm/mach-imx/imx51-dt.c   |    1 -
 arch/arm/mach-imx/imx53-dt.c   |    4 ----
 arch/arm/mach-imx/mach-imx6q.c |    3 ---
 3 files changed, 0 insertions(+), 8 deletions(-)
arch/arm/mach-imx/imx51-dt.c +0 -1
index 18e78db..5f10812 100644
@@ -106,7 +106,6 @@ static struct sys_timer imx51_timer = {
 };
 
 static const char *imx51_dt_board_compat[] __initdata = {
-	"fsl,imx51-babbage",
 	"fsl,imx51",
 	NULL
 };
arch/arm/mach-imx/imx53-dt.c +0 -4
index eb04b62..75535f9 100644
@@ -132,10 +132,6 @@ static struct sys_timer imx53_timer = {
 };
 
 static const char *imx53_dt_board_compat[] __initdata = {
-	"fsl,imx53-ard",
-	"fsl,imx53-evk",
-	"fsl,imx53-qsb",
-	"fsl,imx53-smd",
 	"fsl,imx53",
 	NULL
 };
arch/arm/mach-imx/mach-imx6q.c +0 -3
index b47e98b..1796be4 100644
@@ -173,9 +173,6 @@ static struct sys_timer imx6q_timer = {
 };
 
 static const char *imx6q_dt_compat[] __initdata = {
-	"fsl,imx6q-arm2",
-	"fsl,imx6q-sabrelite",
-	"fsl,imx6q-sabresd",
 	"fsl,imx6q",
 	NULL,
 };
Signature · 1 line
1.7.1
author reviewer
#1 lore raw

PATCH 2/2 ARM: mach-mxs: Remove board entries in dt_board_compat

From: Fabio Estevam <[email protected]>

There is no need for adding board related entries into dt_board_compat.

Leave only the SoC entry.

This way we do not need to patch a C file when adding dt support for a new board.

---
 arch/arm/mach-mxs/mach-mxs.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-mxs/mach-mxs.c +0 -2
index 8cac94b..0f36b22 100644
@@ -91,13 +91,11 @@ static void __init mxs_machine_init(void)
 }
 
 static const char *imx23_dt_compat[] __initdata = {
-	"fsl,imx23-evk",
 	"fsl,imx23",
 	NULL,
 };
 
 static const char *imx28_dt_compat[] __initdata = {
-	"fsl,imx28-evk",
 	"fsl,imx28",
 	NULL,
 };
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 ARM: mach-mxs: Remove board entries in dt_board_compat

Dear Fabio Estevam,

Quoted 19 lines

From: Fabio Estevam <[email protected]>

There is no need for adding board related entries into dt_board_compat.

Leave only the SoC entry.

This way we do not need to patch a C file when adding dt support for a new board.

---
 arch/arm/mach-mxs/mach-mxs.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-mxs/mach-mxs.c +0 -0
index 8cac94b..0f36b22 100644

arch/arm/mach-mxs/mach-mxs.c static void __init mxs_machine_init(void) · line 100

Quoted 10 lines
arch/arm/mach-mxs/mach-mxs.c +0 -2
@@ -91,13 +91,11 @@ static void __init mxs_machine_init(void)
 }
 
 static const char *imx23_dt_compat[] __initdata = {
-	"fsl,imx23-evk",
 	"fsl,imx23",
 	NULL,
 };
 
 static const char *imx28_dt_compat[] __initdata = {
-	"fsl,imx28-evk",

Don't you need this one as there's some hook?

arch/arm/mach-mxs/mach-mxs.c static void __init mxs_machine_init(void) · line 101

Quoted 3 lines
arch/arm/mach-mxs/mach-mxs.c +0 -0
 	"fsl,imx28",
 	NULL,
 };

Best regards,
Marek Vasut

maintainer
#3 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

In reply to Fabio Estevam

Shawn,

Is this ok with you?

Sascha

Quoted 60 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

There is no need for adding board related entries into dt_board_compat.

Leave only the SoC entry.

This way we do not need to patch a C file when adding dt support for a new board.

---
 arch/arm/mach-imx/imx51-dt.c   |    1 -
 arch/arm/mach-imx/imx53-dt.c   |    4 ----
 arch/arm/mach-imx/mach-imx6q.c |    3 ---
 3 files changed, 0 insertions(+), 8 deletions(-)
arch/arm/mach-imx/imx51-dt.c +0 -1
index 18e78db..5f10812 100644
@@ -106,7 +106,6 @@ static struct sys_timer imx51_timer = {
 };
 
 static const char *imx51_dt_board_compat[] __initdata = {
-	"fsl,imx51-babbage",
 	"fsl,imx51",
 	NULL
 };
arch/arm/mach-imx/imx53-dt.c +0 -4
index eb04b62..75535f9 100644
@@ -132,10 +132,6 @@ static struct sys_timer imx53_timer = {
 };
 
 static const char *imx53_dt_board_compat[] __initdata = {
-	"fsl,imx53-ard",
-	"fsl,imx53-evk",
-	"fsl,imx53-qsb",
-	"fsl,imx53-smd",
 	"fsl,imx53",
 	NULL
 };
arch/arm/mach-imx/mach-imx6q.c +0 -3
index b47e98b..1796be4 100644
@@ -173,9 +173,6 @@ static struct sys_timer imx6q_timer = {
 };
 
 static const char *imx6q_dt_compat[] __initdata = {
-	"fsl,imx6q-arm2",
-	"fsl,imx6q-sabrelite",
-	"fsl,imx6q-sabresd",
 	"fsl,imx6q",
 	NULL,
 };
Signature · 1 line
1.7.1
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#5 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

Quoted 9 lines · Shawn Guo
Quoted 4 lines · Sascha Hauer

Shawn,

Is this ok with you?

No.

http://thread.gmane.org/gmane.linux.ports.arm.kernel/172558/focus=172703

I change my mind. Though it's really a pity to lose a concentrated place maintaining a full list of compatible strings of all supported board, I'm more concerned by the dt_board_compat matching efficiency when the table gets longer.

So, Fabio, can you please resend the patches against v3.6-rc?

Signature · 2 lines
Regards,
Shawn
#6 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

Dear Shawn Guo,

Quoted 8 lines · Shawn Guo
Quoted 7 lines · Sascha Hauer
Quoted 3 lines

Shawn,

Is this ok with you?

No.

Quoted 8 lines
Quoted 1 line

http://thread.gmane.org/gmane.linux.ports.arm.kernel/172558/focus=172703

I change my mind. Though it's really a pity to lose a concentrated place maintaining a full list of compatible strings of all supported board, I'm more concerned by the dt_board_compat matching efficiency when the table gets longer.

So, Fabio, can you please resend the patches against v3.6-rc?

What about the board quirks that are present there?

Best regards,
Marek Vasut

#7 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

Quoted 12 lines · Marek Vasut

Dear Shawn Guo,

Quoted 10 lines · Shawn Guo
Quoted 8 lines · Sascha Hauer
Quoted 3 lines

Shawn,

Is this ok with you?

No.

http://thread.gmane.org/gmane.linux.ports.arm.kernel/172558/focus=172703

Quoted 8 lines
Quoted 6 lines

I change my mind. Though it's really a pity to lose a concentrated place maintaining a full list of compatible strings of all supported board, I'm more concerned by the dt_board_compat matching efficiency when the table gets longer.

So, Fabio, can you please resend the patches against v3.6-rc?

What about the board quirks that are present there?

They don't need to be done since they're usually driver-specific or unit-specific; DTs should include these at the appropriate places. For the MX51 Babbage entry all it did was set up all the iomux which is now done via pinctrl and DT, so it can go. The rest, well, this is more a quirk of the chip, and what should happen is, if it can be moved to a bootloader, do it, and set up a quirk as a property in that device like fsl,mc13xxx-uses-rtc - although in that particular example I dare say that should be an rtc node under the pmic entry rather than a property, at least for now it shows you can pick up a property that changes the behavior of a device without it being in a mach-specific file.

There may actually be some boards that need some specific, low-level hacks to make work that will need entering but, for now, this doesn't need to be. They can be removed and when those specific hacks appear, their compatibles and new code to support the hacks can be added back in.

Signature · 2 lines
Matt Sealey <[email protected]>
Product Development Analyst, Genesi USA, Inc.
author reviewer
#8 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

In reply to Shawn Guo
Quoted 1 line · Shawn Guo

So, Fabio, can you please resend the patches against v3.6-rc?

Which branch at git.linaro.org should I use it to rebase?

Regards,

Fabio Estevam

#9 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

Quoted 6 lines · Fabio Estevam
Quoted 1 line · Shawn Guo

So, Fabio, can you please resend the patches against v3.6-rc?

Which branch at git.linaro.org should I use it to rebase?

Just against mainline v3.6-rc.

Signature · 2 lines
Regards,
Shawn
#10 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

In reply to Shawn Guo
Quoted 6 lines · Shawn Guo
Quoted 5 lines · Shawn Guo
Quoted 4 lines · Sascha Hauer

Shawn,

Is this ok with you?

Quoted 9 lines
Quoted 4 lines

No.

http://thread.gmane.org/gmane.linux.ports.arm.kernel/172558/focus=172703

I change my mind. Though it's really a pity to lose a concentrated place maintaining a full list of compatible strings of all supported board, I'm more concerned by the dt_board_compat matching efficiency when the table gets longer.

I think this is needless churn. You can't say board entries are never needed. Perhaps we've been overly active in adding all compatible strings before they are needed. When you add a new board, it is fine to match against the soc string without changing the kernel, but the dtb should still have a more specific string. Then if you need to add something board specific later, you can add the match entry and corresponding board specific code.

Rob

#11 lore raw

PATCH 1/2 ARM: mach-imx: Remove board entries in dt_board_compat

Quoted 8 lines · Rob Herring

I think this is needless churn. You can't say board entries are never needed. Perhaps we've been overly active in adding all compatible strings before they are needed. When you add a new board, it is fine to match against the soc string without changing the kernel, but the dtb should still have a more specific string. Then if you need to add something board specific later, you can add the match entry and corresponding board specific code.

I probably haven't made myself clear. What I'm asking for is merely removing the board compatible string from dt_board_compat, not from dtb. Every single board will still have its specific compatible string defined in its dts.

Signature · 2 lines
Regards,
Shawn