[PATCH 2/2] arm: aspeed: Set SPI master strap for all boards

Xo Wang xow at google.com
Thu Nov 3 03:40:55 AEDT 2016


On Wed, Nov 2, 2016 at 5:11 AM, Andrew Jeffery <andrew at aj.id.au> wrote:
> 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>
>

Reviewed-by: Xo Wang <xow at google.com>

>> ---
>>  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));


More information about the openbmc mailing list