[PATCH 2/2] arm: aspeed: Set SPI master strap for all boards
Andrew Jeffery
andrew at aj.id.au
Wed Nov 2 23:11:02 AEDT 2016
On Wed, 2016-11-02 at 16:25 +1030, Joel Stanley wrote:
> 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 <joel at jms.id.au>
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
> ---
> arch/arm/mach-aspeed/aspeed.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
> index 0a4578290d5e..57c32ff0fa83 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161102/9b49b0b0/attachment.sig>
More information about the openbmc
mailing list