[PATCH linux dev-4.7] arm: aspeed: romulus: Do common setup
Joel Stanley
joel at jms.id.au
Mon Feb 20 11:15:54 AEDT 2017
Hi Lei,
On Sun, Feb 19, 2017 at 12:06 AM, Mine <mine260309 at gmail.com> wrote:
> I thought do_common_setup() is called by default, but actually it's not.
> So Romulus needs to call do_common_setup() as well.
We don't need most of what this is doing on any platform.
> /* Enable LPC FWH cycles, Enable LPC to AHB bridge */
> writel(0x00000500, AST_IO(AST_BASE_LPC | 0x80));
This is performed by the LPC driver that Cyril has written.
> /* Set UART routing */
> writel(0x00000000, AST_IO(AST_BASE_LPC | 0x9c));
This is the default. If we need to change it in the future we might
write a pinmux driver, but for now we could omit this.
> /* Setup scratch registers */
> writel(0x00000042, AST_IO(AST_BASE_LPC | 0x170));
> writel(0x00008000, AST_IO(AST_BASE_LPC | 0x174));
We don't have a driver for this. Andrew was thinking about a UIO
driver. Ben started a discussion[1] upstream about the preferred
approach.
[1] https://lkml.org/lkml/2017/2/17/30
Cheers,
Joel
>
> --
> BRs,
> Lei YU
>
> On Sat, Feb 18, 2017 at 9:33 PM, Lei YU <mine260309 at gmail.com> wrote:
>> Call do_common_setup for romulus.
>> No other romulus specific setup is needed.
>> Consider moving do_common_setup() to a common place.
>>
>> Signed-off-by: Lei YU <mine260309 at gmail.com>
>> ---
>> arch/arm/mach-aspeed/aspeed.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c
>> index 2a11c2e..726b8fa 100644
>> --- a/arch/arm/mach-aspeed/aspeed.c
>> +++ b/arch/arm/mach-aspeed/aspeed.c
>> @@ -218,6 +218,11 @@ static void __init do_witherspoon_setup(void)
>> writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));
>> }
>>
>> +static void __init do_romulus_setup(void)
>> +{
>> + do_common_setup();
>> +}
>> +
>> #define SCU_PASSWORD 0x1688A8A8
>>
>> static void __init aspeed_init_early(void)
>> @@ -253,6 +258,8 @@ static void __init aspeed_init_early(void)
>> do_zaius_setup();
>> if (of_machine_is_compatible("ibm,witherspoon-bmc"))
>> do_witherspoon_setup();
>> + if (of_machine_is_compatible("ibm,romulus-bmc"))
>> + do_romulus_setup();
>> }
>>
>> static void __init aspeed_map_io(void)
>> --
>> 1.9.1
>>
More information about the openbmc
mailing list