diff mbox

[U-Boot,1/5] imx: mx6ul: Refactor common code as mx6ul

Message ID 1472890977-7377-1-git-send-email-jagan@amarulasolutions.com
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Jagan Teki Sept. 3, 2016, 8:22 a.m. UTC
Since most of the board along with the config code used for
mx6ul boards are common and for improving code reusability
refactor or group code as mx6ul notation. Hence for new board
its simply add new defconfig with existing board or related configs.

include/configs/mx6ul_14x14_evk.h -> include/configs/mx6ul.h
board/freescale/mx6ul_14x14_evk -> board/freescale/mx6ul
board/freescale/mx6ul/mx6ul_14x14_evk.c -> board/freescale/mx6ul/board.c

Cc: Stefano Babic <sbabic@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/cpu/armv7/mx6/Kconfig                                       | 2 +-
 board/freescale/{mx6ul_14x14_evk => mx6ul}/Kconfig                   | 4 ++--
 board/freescale/{mx6ul_14x14_evk => mx6ul}/MAINTAINERS               | 4 ++--
 board/freescale/{mx6ul_14x14_evk => mx6ul}/Makefile                  | 2 +-
 board/freescale/{mx6ul_14x14_evk => mx6ul}/README                    | 0
 board/freescale/{mx6ul_14x14_evk/mx6ul_14x14_evk.c => mx6ul/board.c} | 0
 include/configs/{mx6ul_14x14_evk.h => mx6ul.h}                       | 0
 7 files changed, 6 insertions(+), 6 deletions(-)
 rename board/freescale/{mx6ul_14x14_evk => mx6ul}/Kconfig (72%)
 rename board/freescale/{mx6ul_14x14_evk => mx6ul}/MAINTAINERS (64%)
 rename board/freescale/{mx6ul_14x14_evk => mx6ul}/Makefile (76%)
 rename board/freescale/{mx6ul_14x14_evk => mx6ul}/README (100%)
 rename board/freescale/{mx6ul_14x14_evk/mx6ul_14x14_evk.c => mx6ul/board.c} (100%)
 rename include/configs/{mx6ul_14x14_evk.h => mx6ul.h} (100%)

Comments

Fabio Estevam Sept. 4, 2016, 2:27 a.m. UTC | #1
Hi Jagan,

On Sat, Sep 3, 2016 at 5:22 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> Since most of the board along with the config code used for
> mx6ul boards are common and for improving code reusability
> refactor or group code as mx6ul notation. Hence for new board
> its simply add new defconfig with existing board or related configs.
>
> include/configs/mx6ul_14x14_evk.h -> include/configs/mx6ul.h
> board/freescale/mx6ul_14x14_evk -> board/freescale/mx6ul
> board/freescale/mx6ul/mx6ul_14x14_evk.c -> board/freescale/mx6ul/board.c

I think this will be hard to maintain. I still prefer each board to be
added on its own board file/dts.
Jagan Teki Sept. 4, 2016, 2:30 a.m. UTC | #2
Hi Fabio,

On Sun, Sep 4, 2016 at 7:57 AM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Jagan,
>
> On Sat, Sep 3, 2016 at 5:22 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> Since most of the board along with the config code used for
>> mx6ul boards are common and for improving code reusability
>> refactor or group code as mx6ul notation. Hence for new board
>> its simply add new defconfig with existing board or related configs.
>>
>> include/configs/mx6ul_14x14_evk.h -> include/configs/mx6ul.h
>> board/freescale/mx6ul_14x14_evk -> board/freescale/mx6ul
>> board/freescale/mx6ul/mx6ul_14x14_evk.c -> board/freescale/mx6ul/board.c
>
> I think this will be hard to maintain. I still prefer each board to be
> added on its own board file/dts.

Initially I started of doing this, but I find most of the redundant
code board as well in configs, its better follow this kind of notation
because most of the remaining soc board files are so mature like this
sunxi, zynq.

thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 78383f0..0c1bc78 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -216,7 +216,7 @@  source "board/freescale/mx6sabresd/Kconfig"
 source "board/freescale/mx6slevk/Kconfig"
 source "board/freescale/mx6sxsabresd/Kconfig"
 source "board/freescale/mx6sxsabreauto/Kconfig"
-source "board/freescale/mx6ul_14x14_evk/Kconfig"
+source "board/freescale/mx6ul/Kconfig"
 source "board/phytec/pcm058/Kconfig"
 source "board/gateworks/gw_ventana/Kconfig"
 source "board/kosagi/novena/Kconfig"
diff --git a/board/freescale/mx6ul_14x14_evk/Kconfig b/board/freescale/mx6ul/Kconfig
similarity index 72%
rename from board/freescale/mx6ul_14x14_evk/Kconfig
rename to board/freescale/mx6ul/Kconfig
index 8210cd3..f97b905 100644
--- a/board/freescale/mx6ul_14x14_evk/Kconfig
+++ b/board/freescale/mx6ul/Kconfig
@@ -1,12 +1,12 @@ 
 if TARGET_MX6UL_14X14_EVK || TARGET_MX6UL_9X9_EVK
 
 config SYS_BOARD
-	default "mx6ul_14x14_evk"
+	default "mx6ul"
 
 config SYS_VENDOR
 	default "freescale"
 
 config SYS_CONFIG_NAME
-	default "mx6ul_14x14_evk"
+	default "mx6ul"
 
 endif
diff --git a/board/freescale/mx6ul_14x14_evk/MAINTAINERS b/board/freescale/mx6ul/MAINTAINERS
similarity index 64%
rename from board/freescale/mx6ul_14x14_evk/MAINTAINERS
rename to board/freescale/mx6ul/MAINTAINERS
index 7c7a196..20caeee 100644
--- a/board/freescale/mx6ul_14x14_evk/MAINTAINERS
+++ b/board/freescale/mx6ul/MAINTAINERS
@@ -1,7 +1,7 @@ 
 MX6ULEVK BOARD
 M:	Peng Fan <peng.fan@nxp.com>
 S:	Maintained
-F:	board/freescale/mx6ul_14x14_evk/
-F:	include/configs/mx6ul_14x14_evk.h
+F:	board/freescale/mx6ul/
+F:	include/configs/mx6ul.h
 F:	configs/mx6ul_14x14_evk_defconfig
 F:	configs/mx6ul_9x9_evk_defconfig
diff --git a/board/freescale/mx6ul_14x14_evk/Makefile b/board/freescale/mx6ul/Makefile
similarity index 76%
rename from board/freescale/mx6ul_14x14_evk/Makefile
rename to board/freescale/mx6ul/Makefile
index 61f6778..80ab4a5 100644
--- a/board/freescale/mx6ul_14x14_evk/Makefile
+++ b/board/freescale/mx6ul/Makefile
@@ -3,4 +3,4 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-y  := mx6ul_14x14_evk.o
+obj-y  := board.o
diff --git a/board/freescale/mx6ul_14x14_evk/README b/board/freescale/mx6ul/README
similarity index 100%
rename from board/freescale/mx6ul_14x14_evk/README
rename to board/freescale/mx6ul/README
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul/board.c
similarity index 100%
rename from board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
rename to board/freescale/mx6ul/board.c
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul.h
similarity index 100%
rename from include/configs/mx6ul_14x14_evk.h
rename to include/configs/mx6ul.h