[PATCH 06/16] mach-aspeed: Add missing Firestone setup method and

Andrew Jeffery andrew at aj.id.au
Fri Sep 16 11:22:38 AEST 2016


On Thu, 2016-09-15 at 15:35 -0500, Timothy Pearson wrote:
>  call
> 
> ---
>  arch/arm/mach-aspeed/aspeed.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-
> aspeed/aspeed.c
> index 1b0ee11..ecb613d 100644
> --- a/arch/arm/mach-aspeed/aspeed.c
> +++ b/arch/arm/mach-aspeed/aspeed.c
> @@ -119,6 +119,18 @@ static void __init do_palmetto_setup(void)
>  	writel(0x01C0007F, AST_IO(AST_BASE_SCU | 0x88));
>  }
>  
> +static void __init do_firestone_setup(void)
> +{
> +	do_common_setup();
> +
> +	/* Setup PNOR address mapping for 64M flash */
> +	writel(0x30000C00, AST_IO(AST_BASE_LPC | 0x88));
> +	writel(0xFC0003FF, AST_IO(AST_BASE_LPC | 0x8C));

Joel: Hmm, that LPC driver sure would be handy...

> +
> +	/* SCU setup */
> +	writel(0xD7000000, AST_IO(AST_BASE_SCU | 0x88));

Can you please document exactly what this is (de)configuring and why?
That way when we come to remove the hack we have some context.

Better yet, according to `bitfield`:

$ bitfield SCU88 0xD7000000
decoding as SCU Multi-function Pin Control #3
0xd7000000 [3607101440]
                                    Enable MAC#1 MDIO1: 0x1
                                     Enable MAC#1 MDC1: 0x1
                               Enable NOR flash ROMA25: 0x0
                               Enable NOR flash ROMA24: 0x1
                                  Enable flash ROMCS4#: 0x0
                                  Enable flash ROMCS3#: 0x1
                                  Enable flash ROMCS2#: 0x1
                                  Enable flash ROMCS1#: 0x1
                                  ...

And as such each of these can be configured through the devicetree via
pinmux functions MDIO1, ROM16, ROMCS[321]. However, looking at the
pinmux driver, whilst ROMCS[321] are defined for the relevant pins they
don't look to have been added to the list of exported functions in dev-
4.7. I'll have to dig further into that, but it's probably an oversight
on my part.

Out of interest, what are you doing with ROMA24? Is that actually
required, and if so, is it meant to be independent of ROMA25? I may
have to rethink my approach there.

Cheers,

Andrew

> +}
> +
>  static void __init do_garrison_setup(void)
>  {
>  	do_common_setup();
> @@ -196,6 +208,8 @@ static void __init aspeed_init_early(void)
>  		do_barreleye_setup();
>  	if (of_machine_is_compatible("tyan,palmetto-bmc"))
>  		do_palmetto_setup();
> +	if (of_machine_is_compatible("ibm,firestone-bmc"))
> +		do_firestone_setup();
>  	if (of_machine_is_compatible("ibm,garrison-bmc"))
>  		do_garrison_setup();
>  	if (of_machine_is_compatible("aspeed,ast2500-evb"))
-------------- 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/20160916/df161cfd/attachment-0001.sig>


More information about the openbmc mailing list