arm: socfpga: stratix10: Enable EMAC to FPGA bridge based on handoff
Subsystems (3)
PATCH 1/1 arm: socfpga: stratix10: Enable EMAC to FPGA bridge based on handoff
Code checking and setting EMAC use fpga is in populate_sysmgr_fpgaintf_module(). So, call to sysmgr_pinmux_init() instead of populate_sysmgr_pinmux().
In sysmgr_pinmux_init(), it will call to both populate_sysmgr_pinmux() and populate_sysmgr_fpgaintf_module().
--- arch/arm/mach-socfpga/spl_s10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-socfpga/spl_s10.c +1 -1
@@ -136,7 +136,7 @@ void board_init_f(ulong dummy)socfpga_per_reset (SOCFPGA_RESET (OSC1TIMER0 ),0 );timer_init (); -populate_sysmgr_pinmux (); +sysmgr_pinmux_init ();/* configuring the HPS clocks */ cm_basic_init (cm_default_cfg);
Signature · 1 line
2.2.2
PATCH 1/1 arm: socfpga: stratix10: Fix mailbox urgent command with urgent register
According to mailbox spec, software should send urgent command with urgent register instead of COUT location. This patch write urgent command index to urgent register.
--- arch/arm/mach-socfpga/mailbox_s10.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
arch/arm/mach-socfpga/mailbox_s10.c +7 -8
@@ -160,15 +160,15 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,u32 buf_len;int ret; - ret =mbox_prepare_cmd_only (id, cmd, is_indirect, len, arg); -if (ret) -return ret; -if (urgent) {/* Read status because it is toggled */ status =MBOX_READL (MBOX_STATUS ) &MBOX_STATUS_UA_MSK ; -/* Send command as urgent command */ -MBOX_WRITEL (1 ,MBOX_URG ); +/* Write urgent command to urgent register */ +MBOX_WRITEL (cmd,MBOX_URG ); + }else { + ret =mbox_prepare_cmd_only (id, cmd, is_indirect, len, arg); +if (ret) +return ret; }/* write doorbell */
@@ -188,8 +188,7 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,if (urgent) {u32 new_status =MBOX_READL (MBOX_STATUS ); -/* urgent command doesn't have response */ -MBOX_WRITEL (0 ,MBOX_URG ); +/* Urgent ACK is toggled */ if ((new_status &MBOX_STATUS_UA_MSK ) ^ status)return 0 ;
Signature · 1 line
2.2.2
Marek Vasut
AppliedPATCH 1/1 arm: socfpga: stratix10: Fix mailbox urgent command with urgent register
Quoted 37 lines · Ley Foon Tan
According to mailbox spec, software should send urgent command with urgent register instead of COUT location. This patch write urgent command index to urgent register.
Signed-off-by Ley Foon Tan <[email protected]>--- arch/arm/mach-socfpga/mailbox_s10.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)arch/arm/mach-socfpga/mailbox_s10.c +6
-6@@ -160,15 +160,15 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,u32 buf_len;int ret; - ret =mbox_prepare_cmd_only (id, cmd, is_indirect, len, arg); -if (ret) -return ret; -if (urgent) {/* Read status because it is toggled */ status =MBOX_READL (MBOX_STATUS ) &MBOX_STATUS_UA_MSK ; -/* Send command as urgent command */ -MBOX_WRITEL (1 ,MBOX_URG ); +/* Write urgent command to urgent register */ +MBOX_WRITEL (cmd,MBOX_URG ); + }else { + ret =mbox_prepare_cmd_only (id, cmd, is_indirect, len, arg); +if (ret) +return ret; }/* write doorbell */
arch/arm/mach-socfpga/mailbox_s10.c static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect, · line 194
Quoted 9 lines
arch/arm/mach-socfpga/mailbox_s10.c +1
-2@@ -188,8 +188,7 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,if (urgent) {u32 new_status =MBOX_READL (MBOX_STATUS ); -/* urgent command doesn't have response */ -MBOX_WRITEL (0 ,MBOX_URG ); +/* Urgent ACK is toggled */ if ((new_status &MBOX_STATUS_UA_MSK ) ^ status)return 0 ;
Applied, thanks.
Signature · 2 lines
Best regards, Marek Vasut
Marek Vasut
AppliedPATCH 1/1 arm: socfpga: stratix10: Enable EMAC to FPGA bridge based on handoff
In reply to Ley Foon TanQuoted 17 lines · Ley Foon Tan
Code checking and setting EMAC use fpga is in
populate_sysmgr_fpgaintf_module(). So, call tosysmgr_pinmux_init()instead ofpopulate_sysmgr_pinmux().
Insysmgr_pinmux_init(), it will call to bothpopulate_sysmgr_pinmux()andpopulate_sysmgr_fpgaintf_module().Signed-off-by Ley Foon Tan <[email protected]>--- arch/arm/mach-socfpga/spl_s10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-socfpga/spl_s10.c +0
-0
arch/arm/mach-socfpga/spl_s10.c void board_init_f(ulong dummy) · line 142
Quoted 8 lines
arch/arm/mach-socfpga/spl_s10.c +1
-1@@ -136,7 +136,7 @@ void board_init_f(ulong dummy)socfpga_per_reset (SOCFPGA_RESET (OSC1TIMER0 ),0 );timer_init (); -populate_sysmgr_pinmux (); +sysmgr_pinmux_init ();/* configuring the HPS clocks */ cm_basic_init (cm_default_cfg);
Applied, thanks.
Signature · 2 lines
Best regards, Marek Vasut