<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 28 Feb 2017 17:49, "Lei YU" <<a href="mailto:mine260309@gmail.com">mine260309@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The PNOR SPI address mapping is the same as Witherspoon.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">This should be handled by the device drivers we now have.</div><div dir="auto"><br></div><div dir="auto">Mbox brains trust, any idea why we would still need this?</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">Joel</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Lei YU <<a href="mailto:mine260309@gmail.com">mine260309@gmail.com</a>><br>
---<br>
 arch/arm/mach-aspeed/aspeed.c | 18 ++++++++++++++++++<br>
 1 file changed, 18 insertions(+)<br>
<br>
diff --git a/arch/arm/mach-aspeed/aspeed.<wbr>c b/arch/arm/mach-aspeed/aspeed.<wbr>c<br>
index 726b8fa..ec9eecf 100644<br>
--- a/arch/arm/mach-aspeed/aspeed.<wbr>c<br>
+++ b/arch/arm/mach-aspeed/aspeed.<wbr>c<br>
@@ -221,6 +221,24 @@ static void __init do_witherspoon_setup(void)<br>
 static void __init do_romulus_setup(void)<br>
 {<br>
        do_common_setup();<br>
+<br>
+       /* Setup PNOR address mapping for 64M flash<br>
+        *<br>
+        *   ADRBASE: 0x3000 (0x30000000)<br>
+        *   HWMBASE: 0x0C00 (0x0C000000)<br>
+        *  ADDRMASK: 0xFC00 (0xFC000000)<br>
+        *   HWNCARE: 0x03FF (0x03FF0000)<br>
+        *<br>
+        * Mapping appears at 0x60300fc000000 on the host<br>
+        */<br>
+       writel(0x30000C00, AST_IO(AST_BASE_LPC | 0x88));<br>
+       writel(0xFC0003FF, AST_IO(AST_BASE_LPC | 0x8C));<br>
+<br>
+       /* Set SPI1 CE1 decoding window to 0x34000000 */<br>
+       writel(0x70680000, AST_IO(AST_BASE_SPI | 0x34));<br>
+<br>
+       /* Set SPI1 CE0 decoding window to 0x30000000 */<br>
+       writel(0x68600000, AST_IO(AST_BASE_SPI | 0x30));<br>
 }<br>
<br>
 #define SCU_PASSWORD   0x1688A8A8<br>
<font color="#888888">--<br>
1.9.1<br>
<br>
</font></blockquote></div><br></div></div></div>