Skip to contentSkip to conversation

board: mediatek: rename pumpkin board into mt8516

PATCH New Fabien Parent 2 participants 6 messages Feb 15, 2021 – Mar 20, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 board: mediatek: rename pumpkin board into mt8516

More than one pumpkin board has been made with different MediaTek SoCs. Rename the pumpkin board to follow the naming convention of all other MediaTek boards and also to not be confusing when other pumpkin boards will be added in follow-up commits.

---
 arch/arm/mach-mediatek/Kconfig                              | 2 +-
 board/mediatek/{pumpkin => mt8516}/Kconfig                  | 4 ++--
 board/mediatek/mt8516/MAINTAINERS                           | 6 ++++++
 board/mediatek/{pumpkin => mt8516}/Makefile                 | 2 +-
 .../mediatek/{pumpkin/pumpkin.c => mt8516/mt8516_pumpkin.c} | 0
 board/mediatek/pumpkin/MAINTAINERS                          | 6 ------
 configs/{pumpkin_defconfig => mt8516_pumpkin_defconfig}     | 0
 include/configs/{pumpkin.h => mt8516.h}                     | 4 ++--
 8 files changed, 12 insertions(+), 12 deletions(-)
 rename board/mediatek/{pumpkin => mt8516}/Kconfig (76%)
 create mode 100644 board/mediatek/mt8516/MAINTAINERS
 rename board/mediatek/{pumpkin => mt8516}/Makefile (58%)
 rename board/mediatek/{pumpkin/pumpkin.c => mt8516/mt8516_pumpkin.c} (100%)
 delete mode 100644 board/mediatek/pumpkin/MAINTAINERS
 rename configs/{pumpkin_defconfig => mt8516_pumpkin_defconfig} (100%)
 rename include/configs/{pumpkin.h => mt8516.h} (97%)
arch/arm/mach-mediatek/Kconfig +1 -1
index 7f40ba93190b..2791b3dbda2b 100644
@@ -76,7 +76,7 @@ source "board/mediatek/mt7622/Kconfig"
 source "board/mediatek/mt7623/Kconfig"
 source "board/mediatek/mt7629/Kconfig"
 source "board/mediatek/mt8512/Kconfig"
+source "board/mediatek/mt8516/Kconfig"
 source "board/mediatek/mt8518/Kconfig"
-source "board/mediatek/pumpkin/Kconfig"
 
 endif
board/mediatek/mt8516/Kconfig renamed from board/mediatek/pumpkin/Kconfig +2 -2
similarity index 76%
rename from board/mediatek/pumpkin/Kconfig
rename to board/mediatek/mt8516/Kconfig
index 34b1c0b09d47..a87d3872fe6e 100644
@@ -1,10 +1,10 @@
 if TARGET_MT8516
 
 config SYS_BOARD
-	default "pumpkin"
+	default "mt8516"
 
 config SYS_CONFIG_NAME
-	default "pumpkin"
+	default "mt8516"
 
 config MTK_BROM_HEADER_INFO
 	string
board/mediatek/mt8516/MAINTAINERS new file +6 -0
new file mode 100644
index 000000000000..2f0d8f646498
@@ -0,0 +1,6 @@
+MT8516 Pumpkin
+M:	Fabien Parent <[email protected]>
+S:	Maintained
+F:	board/mediatek/mt8516
+F:	include/configs/mt8516.h
+F:	configs/mt8516_pumpkin_defconfig
board/mediatek/mt8516/Makefile renamed from board/mediatek/pumpkin/Makefile +1 -1
similarity index 58%
rename from board/mediatek/pumpkin/Makefile
rename to board/mediatek/mt8516/Makefile
index 75fce4a393ab..1d4815d1370f 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier:	GPL-2.0
 
-obj-y += pumpkin.o
+obj-y += mt8516_pumpkin.o
board/mediatek/mt8516/mt8516_pumpkin.c renamed from board/mediatek/pumpkin/pumpkin.c +0 -0
similarity index 100%
rename from board/mediatek/pumpkin/pumpkin.c
rename to board/mediatek/mt8516/mt8516_pumpkin.c
board/mediatek/pumpkin/MAINTAINERS deleted +0 -6
deleted file mode 100644
index 16beadc027a1..000000000000
@@ -1,6 +0,0 @@
-Pumpkin
-M:	Fabien Parent <[email protected]>
-S:	Maintained
-F:	board/mediatek/pumpkin
-F:	include/configs/pumpkin.h
-F:	configs/pumpkin_defconfig
configs/mt8516_pumpkin_defconfig renamed from configs/pumpkin_defconfig +0 -0
similarity index 100%
rename from configs/pumpkin_defconfig
rename to configs/mt8516_pumpkin_defconfig
include/configs/mt8516.h renamed from include/configs/pumpkin.h +2 -2
similarity index 97%
rename from include/configs/pumpkin.h
rename to include/configs/mt8516.h
index 9c52cae41d71..e809a9c7e304 100644
@@ -6,8 +6,8 @@
  * Author: Fabien Parent <[email protected]
  */
 
-#ifndef __PUMPKIN_H
-#define __PUMPKIN_H
+#ifndef __MT8516_H
+#define __MT8516_H
 
 #include <linux/sizes.h>
 
Signature · 1 line
2.30.0
#1 lore raw

PATCH 2/3 board: mediatek: mt8516: init USB Ether for pumpkin board

Init USB Ether if CONFIG_USB_ETHER is enabled.

---
 board/mediatek/mt8516/mt8516_pumpkin.c | 4 ++++
 1 file changed, 4 insertions(+)
board/mediatek/mt8516/mt8516_pumpkin.c +4 -0
index 37daf1c51b92..42f3863b92c3 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 
 int board_init(void)
 {
@@ -24,5 +25,8 @@ int board_late_init(void)
 		}
 	}
 
+	if (CONFIG_IS_ENABLED(USB_ETHER))
+		usb_ether_init();
+
 	return 0;
 }
Signature · 1 line
2.30.0
#2 lore raw

PATCH 2/3 board: mediatek: mt8516: init USB Ether for pumpkin board

Quoted 3 lines · Fabien Parent

Init USB Ether if CONFIG_USB_ETHER is enabled.

Applied to u-boot/next, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210320/5e92bda4/attachment.sig>
#3 lore raw

PATCH 3/3 configs: mt8516: use bootcmd from config_distro_bootcmd.h

In reply to Fabien Parent

Instead of redefining our own way to boot, let's just use config_distro_bootcmd.h.

---
 include/configs/mt8516.h | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)
include/configs/mt8516.h +4 -16
index e809a9c7e304..a1c5d8174be7 100644
@@ -31,23 +31,11 @@
 /* Environment settings */
 #include <config_distro_bootcmd.h>
 
-#define MMCBOOT \
-	"mmcdev=0\0" \
-	"kernel_partition=2\0" \
-	"rootfs_partition=3\0" \
-	"mmc_discover_partition=" \
-		"part start mmc ${mmcdev} ${kernel_partition} kernel_part_addr;" \
-		"part size mmc ${mmcdev} ${kernel_partition} kernel_part_size;\0" \
-	"mmcboot=" \
-		"mmc dev ${mmcdev};" \
-		"run mmc_discover_partition;" \
-		"mmc read ${kerneladdr} ${kernel_part_addr} ${kernel_part_size};" \
-		"setenv bootargs ${bootargs} root=/dev/mmcblk${mmcdev}p${rootfs_partition} rootwait; " \
-		"bootm ${kerneladdr}; \0"
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0)
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"kerneladdr=0x4A000000\0" \
-	MMCBOOT \
-	"bootcmd=run mmcboot;\0"
+	"scriptaddr=0x40000000\0" \
+	BOOTENV
 
 #endif
Signature · 1 line
2.30.0
#4 lore raw

PATCH 3/3 configs: mt8516: use bootcmd from config_distro_bootcmd.h

Quoted 4 lines · Fabien Parent

Instead of redefining our own way to boot, let's just use config_distro_bootcmd.h.

Applied to u-boot/next, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210320/d5dec8d7/attachment.sig>
#5 lore raw

PATCH 1/3 board: mediatek: rename pumpkin board into mt8516

In reply to Fabien Parent
Quoted 6 lines · Fabien Parent

More than one pumpkin board has been made with different MediaTek SoCs. Rename the pumpkin board to follow the naming convention of all other MediaTek boards and also to not be confusing when other pumpkin boards will be added in follow-up commits.

Applied to u-boot/next, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210320/154e5435/attachment.sig>