arm: aspeed: Add Romulus BMC-specific early setup
Subsystems (3)
Joel Stanley
maintainerPATCH 1/2 arm: aspeed: Add Romulus BMC-specific early setup
--- arch/arm/mach-aspeed/aspeed.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-aspeed/aspeed.c +6 -0
@@ -214,6 +214,10 @@ static void __init do_zaius_setup(void) } } +static void __init do_romulus_setup (void ) +{ +do_ast2500_common_setup (); +}#define SCU_PASSWORD 0x1688A8A8
@@ -262,6 +266,8 @@ static void __init aspeed_init_early(void)do_witherspoon_setup ();if (of_machine_is_compatible ("ingrasys,zaius-bmc" ))do_zaius_setup (); +if (of_machine_is_compatible ("ibm,romulus-bmc" )) +do_romulus_setup (); }static void __init aspeed_map_io (void )
Signature · 1 line
2.9.3
Joel Stanley
maintainerPATCH 2/2 arm: aspeed: Set SPI master strap for all boards
All of the ast2500 systems that we support have incorrect strapping for SPI. This commit moves the Zaius specific strapping change to the common ast2500 setup, so that Witherspoon, Romulus and the EVB can benefit.
This moves the strapping change out from the Zaius board version check. I don't see an issue there, as the will still be correct for future boards.
--- arch/arm/mach-aspeed/aspeed.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/mach-aspeed/aspeed.c +6 -6
@@ -152,6 +152,12 @@ static void __init do_ast2500_common_setup(void) reg =readl (AST_IO (AST_BASE_MAC0 |0x40 )); reg &= ~0x80000000 ;writel (reg,AST_IO (AST_BASE_MAC0 |0x40 )); + +/* Set strap[13:12] to 01, Enable SPI master */ +/* Set bits in writes to SCU7C are cleared from SCU70 */ +writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); +/* SCU70 is set-only, so no read-modify-write needed */ +writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); }static void __init do_ast2500evb_setup (void )
@@ -190,12 +196,6 @@ static void __init do_zaius_setup(void)/* D3 in GPIOA/B/C/D direction and data registers */ unsigned long phy_reset_mask =BIT (27 ); -/* Set strap[13:12] to 01, Enable SPI master */ -/* Set bits in writes to SCU7C are cleared from SCU70 */ -writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); -/* SCU70 is set-only, so no read-modify-write needed */ -writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); -/* Disable GPIO I, G/AB pulldowns due to weak driving buffers */ reg =readl (AST_IO (AST_BASE_SCU |0x8C ));writel (reg |BIT (24 ) |BIT (22 ),AST_IO (AST_BASE_SCU |0x8C ));
Signature · 1 line
2.9.3
Quoted 1 line · Joel Stanley
Signed-off-by Joel Stanley <[email protected]>
Quoted 29 lines
---
arch/arm/mach-aspeed/aspeed.c | 6 ++++++1 file changed, 6 insertions(+)arch/arm/mach- renamed from arch/arm/mach-aspeed/aspeed.c +0
-0
aspeed/aspeed.c
indexebb2224dcd13..0a4578290d5e100644arch/arm/mach-aspeed/aspeed.c +0
-0@@ -214,6 +214,10 @@ static void __init do_zaius_setup(void) } }arch/arm/mach-aspeed/aspeed.c +4
-0+static void __init do_romulus_setup (void ) +{ +do_ast2500_common_setup (); +}
#defineSCU_PASSWORD0x1688A8A8arch/arm/mach-aspeed/aspeed.c +2
-0@@ -262,6 +266,8 @@ static void __init aspeed_init_early(void) do_witherspoon_setup(); if (of_machine_is_compatible("ingrasys,zaius-bmc")) do_zaius_setup(); +if (of_machine_is_compatible ("ibm,romulus-bmc" )) +do_romulus_setup (); }
static void__initaspeed_map_io(void)
Re: [PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
In reply to Joel StanleyQuoted 9 lines · Joel Stanley
All of the ast2500 systems that we support have incorrect strapping for SPI. This commit moves the Zaius specific strapping change to the common ast2500 setup, so that Witherspoon, Romulus and the EVB can benefit.
This moves the strapping change out from the Zaius board version check. I don't see an issue there, as the will still be correct for future boards.
Signed-off-by Joel Stanley <[email protected]>
Quoted 34 lines
---
arch/arm/mach-aspeed/aspeed.c | 12 ++++++------1 file changed, 6 insertions(+), 6 deletions(-)arch/arm/mach-aspeed/aspeed.c +6
-0@@ -152,6 +152,12 @@ static void __init do_ast2500_common_setup(void) reg = readl(AST_IO(AST_BASE_MAC0 | 0x40)); reg &= ~0x80000000; writel(reg, AST_IO(AST_BASE_MAC0 | 0x40)); + +/* Set strap[13:12] to 01, Enable SPI master */ +/* Set bits in writes to SCU7C are cleared from SCU70 */ +writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); +/* SCU70 is set-only, so no read-modify-write needed */ +writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); }
static void__initdo_ast2500evb_setup(void)arch/arm/mach-aspeed/aspeed.c +0
-0@@ -190,12 +196,6 @@ static void __init do_zaius_setup(void) /* D3 in GPIOA/B/C/D direction and data registers */ unsigned long phy_reset_mask = BIT(27);arch/arm/mach-aspeed/aspeed.c +0
-6-/* Set strap[13:12] to 01, Enable SPI master */ -/* Set bits in writes to SCU7C are cleared from SCU70 */ -writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); -/* SCU70 is set-only, so no read-modify-write needed */ -writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); -/* Disable GPIO I, G/AB pulldowns due to weak driving buffers */ reg =
readl(AST_IO(AST_BASE_SCU | 0x8C));writel(reg | BIT(24) | BIT(22), AST_IO(AST_BASE_SCU | 0x8C));
Xo Wang
Reviewed-byRe: [PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
Quoted 5 lines · Andrew Jeffery
Quoted 4 lines · Joel Stanley
All of the ast2500 systems that we support have incorrect strapping for SPI. This commit moves the Zaius specific strapping change to the common ast2500 setup, so that Witherspoon, Romulus and the EVB can benefit.
Quoted 8 lines
Quoted 5 lines
This moves the strapping change out from the Zaius board version check. I don't see an issue there, as the will still be correct for future boards.
Signed-off-by Joel Stanley <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>
Quoted 34 lines
Quoted 34 lines
--- arch/arm/mach-aspeed/aspeed.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)arch/arm/mach-aspeed/aspeed.c +6
-6@@ -152,6 +152,12 @@ static void __init do_ast2500_common_setup(void) reg =readl (AST_IO (AST_BASE_MAC0 |0x40 )); reg &= ~0x80000000 ;writel (reg,AST_IO (AST_BASE_MAC0 |0x40 )); + +/* Set strap[13:12] to 01, Enable SPI master */ +/* Set bits in writes to SCU7C are cleared from SCU70 */ +writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); +/* SCU70 is set-only, so no read-modify-write needed */ +writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); }static void __init do_ast2500evb_setup (void )@@ -190,12 +196,6 @@ static void __init do_zaius_setup(void)/* D3 in GPIOA/B/C/D direction and data registers */ unsigned long phy_reset_mask =BIT (27 ); -/* Set strap[13:12] to 01, Enable SPI master */ -/* Set bits in writes to SCU7C are cleared from SCU70 */ -writel (BIT (13 ),AST_IO (AST_BASE_SCU |0x7C )); -/* SCU70 is set-only, so no read-modify-write needed */ -writel (BIT (12 ),AST_IO (AST_BASE_SCU |0x70 )); -/* Disable GPIO I, G/AB pulldowns due to weak driving buffers */ reg =readl (AST_IO (AST_BASE_SCU |0x8C ));writel (reg |BIT (24 ) |BIT (22 ),AST_IO (AST_BASE_SCU |0x8C ));
Re: [PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
Quoted 10 lines · Xo Wang
Quoted 9 lines · Andrew Jeffery
Quoted 8 lines · Joel Stanley
All of the ast2500 systems that we support have incorrect strapping for SPI. This commit moves the Zaius specific strapping change to the common ast2500 setup, so that Witherspoon, Romulus and the EVB can benefit.
This moves the strapping change out from the Zaius board version check. I don't see an issue there, as the will still be correct for future boards.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Joel Stanley <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>Reviewed-by Xo Wang <[email protected]>
Thank you both for the prompt review.
Applied to dev-4.7.
Cheers,
Joel
Quoted 4 lines · Andrew Jeffery
Quoted 1 line · Joel Stanley
Signed-off-by Joel Stanley <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>
Thank you.
Applied to dev-4.7.
Cheers,
Joel
Re: [PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
In reply to Joel StanleyQuoted 14 lines · Joel Stanley
Quoted 13 lines · Xo Wang
Quoted 11 lines · Andrew Jeffery
Quoted 9 lines · Joel Stanley
All of the ast2500 systems that we support have incorrect strapping for SPI. This commit moves the Zaius specific strapping change to the common ast2500 setup, so that Witherspoon, Romulus and the EVB can benefit.
This moves the strapping change out from the Zaius board version check. I don't see an issue there, as the will still be correct for future boards.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Joel Stanley <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>Reviewed-by Xo Wang <[email protected]>Thank you both for the prompt review.
Applied to dev-4.7.
Just noting that a this will likely be backed out in favour of Kun Yi's patch[1]. That way we can configure it in the devicetree in spite of the platform's strapping.
Andrew
[1] https://lists.ozlabs.org/pipermail/openbmc/2016-November/005393.html
Quoted 4 lines
Cheers,
Joel
Joel Stanley
maintainerRe: [PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
Quoted 7 lines · Andrew Jeffery
Quoted 3 lines
Thank you both for the prompt review.
Applied to dev-4.7.
Just noting that a this will likely be backed out in favour of Kun Yi's patch[1]. That way we can configure it in the devicetree in spite of the platform's strapping.
Yup. Unapplied! Wheeee
Cheers,
Joel