Enable DM_SERIAL for Marvell Kirkwood Synology DS109.
Subsystems (2)
cover Enable DM_SERIAL for Marvell Kirkwood Synology DS109.
Many Synology boards (Kirkwood, Armada 37x, and Armada 38x SoCs) use the PIC16F1829 connecting to UART1 to provide certain functions. Mainly for LEDs control, but it can also perform hard reset, power off, and sending beeps.
See dts/upstream/src/arm/marvell/armada-385-synology-ds116.dts for full description.
The Synology reset is not really needed in u-boot. In
several Synology board u-boots such as DS116, and out-of-tree DS211, DS411, and DS112, the generic reset function provided by u-boot works fine without any board specific implementation. So reset_misc() can safey be removed
Tony Dinh (2):
arm: kirkwood: Convert to DM_SERIAL for Synology DS109 board
arm: kirkwood: Remove Synology DS109 board reset_misc
arch/arm/mach-kirkwood/Kconfig | 1 + board/Synology/ds109/ds109.c | 18 ------------------ configs/ds109_defconfig | 2 -- 3 files changed, 1 insertion(+), 20 deletions(-)
Signature · 4 lines
2.39.5 base-commit: 0a3d2bde55e521352771c1c347b89e7848ceb744 branch: master
PATCH 1/2 arm: kirkwood: Convert to DM_SERIAL for Synology DS109 board
Enable DM_SERIAL for Marvell Kirkwood Synology DS109.
Note that this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
---
arch/arm/mach-kirkwood/Kconfig | 1 + configs/ds109_defconfig | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-kirkwood/Kconfig +1 -0
@@ -50,6 +50,7 @@ config TARGET_DS109 bool "Synology DS109" select KW88F6281 select SHEEVA_88SV131 + select KIRKWOOD_COMMON config TARGET_GURUPLUG bool "GuruPlug Board"
configs/ds109_defconfig +0 -2
@@ -54,8 +54,6 @@ CONFIG_MVGBE=y CONFIG_MII=y CONFIG_DM_RTC=y CONFIG_RTC_MV=y -CONFIG_SYS_NS16550_SERIAL=y -CONFIG_SYS_NS16550_REG_SIZE=-4 CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_KIRKWOOD_SPI=y
Signature · 1 line
2.39.5
Re: [PATCH 1/2] arm: kirkwood: Convert to DM_SERIAL for Synology DS109 board
Quoted 6 lines · Tony Dinh
Enable
DM_SERIALfor Marvell Kirkwood Synology DS109.Note that this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/Signed-off-by Tony Dinh <[email protected]>
Thanks,
Stefan
Quoted 23 lines
---
arch/arm/mach-kirkwood/Kconfig | 1 + configs/ds109_defconfig | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)arch/arm/mach-kirkwood/Kconfig +1
-0@@ -50,6 +50,7 @@ config TARGET_DS109 bool "Synology DS109" select KW88F6281 select SHEEVA_88SV131 + select KIRKWOOD_COMMON config TARGET_GURUPLUG bool "GuruPlug Board"configs/ds109_defconfig +0
-0
configs/ds109_defconfig CONFIG_MVGBE=y · line 59
Quoted 8 lines
configs/ds109_defconfig +0
-2@@ -54,8 +54,6 @@ CONFIG_MVGBE=y CONFIG_MII=y CONFIG_DM_RTC=y CONFIG_RTC_MV=y -CONFIG_SYS_NS16550_SERIAL=y -CONFIG_SYS_NS16550_REG_SIZE=-4 CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_KIRKWOOD_SPI=y
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
PATCH 2/2 arm: kirkwood: Remove Synology DS109 board reset_misc
In reply to Tony DinhRemove DS109 board reset_misc() function. U-Boot generic reset is enough.
---
board/Synology/ds109/ds109.c | 18 ------------------ 1 file changed, 18 deletions(-)
board/Synology/ds109/ds109.c +0 -18
@@ -97,24 +97,6 @@ int board_init(void)return 0 ; } -/* Synology reset uses UART */ -#include <ns16550.h> -#define SOFTWARE_SHUTDOWN 0x31 -#define SOFTWARE_REBOOT 0x43 -#define CFG_SYS_NS16550_COM2 KW_UART1_BASE -void reset_misc (void ) -{ -int b_d; -printf ("Synology reset..." ); -udelay (50000 ); - - b_d =ns16550_calc_divisor ((struct ns16550 *)CFG_SYS_NS16550_COM2 , -CFG_SYS_NS16550_CLK ,9600 ); -ns16550_init ((struct ns16550 *)CFG_SYS_NS16550_COM2 , b_d); -ns16550_putc ((struct ns16550 *)CFG_SYS_NS16550_COM2 , -SOFTWARE_REBOOT ); -} -#ifdef CONFIG_RESET_PHY_R /* Configure and enable MV88E1116 PHY */ void reset_phy (void )
Signature · 1 line
2.39.5
Re: [PATCH 2/2] arm: kirkwood: Remove Synology DS109 board reset_misc
Quoted 3 lines · Tony Dinh
Remove DS109 board
reset_misc()function. U-Boot generic reset is enough.Signed-off-by Tony Dinh <[email protected]>
Thanks,
Stefan
Quoted 24 lines
---
board/Synology/ds109/ds109.c | 18 ------------------ 1 file changed, 18 deletions(-)board/Synology/ds109/ds109.c +0
-11@@ -97,24 +97,6 @@ int board_init(void)return 0 ; } -/* Synology reset uses UART */ -#include <ns16550.h> -#define SOFTWARE_SHUTDOWN 0x31 -#define SOFTWARE_REBOOT 0x43 -#define CFG_SYS_NS16550_COM2 KW_UART1_BASE -void reset_misc (void ) -{ -int b_d; -printf ("Synology reset..." ); -udelay (50000 ); -
board/Synology/ds109/ds109.c int board_init(void) · line 102
Quoted 10 lines
board/Synology/ds109/ds109.c +0
-7- b_d =ns16550_calc_divisor ((struct ns16550 *)CFG_SYS_NS16550_COM2 , -CFG_SYS_NS16550_CLK ,9600 ); -ns16550_init ((struct ns16550 *)CFG_SYS_NS16550_COM2 , b_d); -ns16550_putc ((struct ns16550 *)CFG_SYS_NS16550_COM2 , -SOFTWARE_REBOOT ); -} -#ifdef CONFIG_RESET_PHY_R /* Configure and enable MV88E1116 PHY */ void reset_phy (void )
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 15 lines · Tony Dinh
Many Synology boards (Kirkwood, Armada 37x, and Armada 38x SoCs) use the PIC16F1829 connecting to UART1 to provide certain functions. Mainly for LEDs control, but it can also perform hard reset, power off, and sending beeps.
Seedts/upstream/src/arm/marvell/armada-385-synology-ds116.dtsfor full description.The Synology reset is not really needed in u-boot. In
several Synology board u-boots such as DS116, and out-of-tree DS211, DS411, and DS112, the generic reset function provided by u-boot works fine without any board specific implementation. Soreset_misc()can safey be removed
Quoted 9 lines
Tony Dinh (2):
arm: kirkwood: Convert toDM_SERIALfor Synology DS109 board
arm: kirkwood: Remove Synology DS109 boardreset_miscarch/arm/mach-kirkwood/Kconfig | 1 + board/Synology/ds109/ds109.c | 18 ------------------ configs/ds109_defconfig | 2 -- 3 files changed, 1 insertion(+), 20 deletions(-)
Applied to u-boot-marvell/master
Thanks,
Stefan