mach-aspeed: Add missing Firestone setup method and
Subsystems (3)
PATCH 6/16 mach-aspeed: Add missing Firestone setup method and
call
--- arch/arm/mach-aspeed/aspeed.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/mach-aspeed/aspeed.c +14 -0
@@ -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 )); + +/* SCU setup */ +writel (0xD7000000 ,AST_IO (AST_BASE_SCU |0x88 )); +} +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" ))
Signature · 1 line
1.7.9.5
Quoted 15 lines · Timothy Pearson
call
---
arch/arm/mach-aspeed/aspeed.c | 14 ++++++++++++++1 file changed, 14 insertions(+)arch/arm/mach- renamed from arch/arm/mach-aspeed/aspeed.c +0
-0
aspeed/aspeed.c
index 1b0ee11..ecb613d 100644arch/arm/mach-aspeed/aspeed.c +0
-0@@ -119,6 +119,18 @@ static void __init do_palmetto_setup(void) writel(0x01C0007F, AST_IO(AST_BASE_SCU | 0x88)); }
arch/arm/mach-aspeed/aspeed.c static void __init do_palmetto_setup(void) · line 128
Quoted 7 lines
arch/arm/mach-aspeed/aspeed.c +7
-0+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...
arch/arm/mach-aspeed/aspeed.c static void __init do_palmetto_setup(void) · line 131
Quoted 3 lines
arch/arm/mach-aspeed/aspeed.c +3
-0+ +/* 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
Quoted 14 lines
arch/arm/mach-aspeed/aspeed.c +2
-0+} +static void
__initdo_garrison_setup(void)
{
do_common_setup();arch/arm/mach-aspeed/aspeed.c +2
-0@@ -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"))
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 25 lines · Andrew Jeffery
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.
Quoted 3 lines
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.
No, it's not required, at least on Firestone. In fact none of the ROMAnn pins are required; the entire NOR interface is either used for pin straps or is disconnected.
I'm going to say this was bad copypasta from the other _setup functions and delete the line entirely. I'll re-submit this patch shortly.
- --
Timothy Pearson
Raptor Engineering
+1 (415) 727-8645 (direct line)
+1 (512) 690-0200 (switchboard)
https://www.raptorengineering.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJX2/4yAAoJEK+E3vEXDOFbhPMIAJTNTlysdb60wt5igVSyZtZr 0xGwbzmO2hQZsEMqiyNIqCBejGZDKbu6je/GoONqmXPYbKfD5+8b4lB4RQBO8SDj p7DGhXAX9x/ggbcHSjIF+I+PW0YJRep4/vYS1mKWp7M0w3LCku1DaWO8EoLenMZx uj85mFkx8kixZFz2Iskm35PEqr8DlS6paTdIHcTA00+i8WohY9xM0SU1Lp5SfxKd /2+J2Fhpzsg9myyCG5X/4MB0l6I/4cEtXL9litZ9I5XRiB+TuK86fNoAzCuQbno2 gSLGJTRGTYrDlvt7LEqk0s0EeX76z67MQmPexp5oPGMb5Wxa2Nqmnnyo1j8SMQU= =cenu
-----END PGP SIGNATURE-----