Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / arm / mach-mmp / common.c
index 6684abc..e94349d 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 #include "addr-map.h"
-#include "cputype.h"
+#include <linux/soc/mmp/cputype.h>
 
 #include "common.h"
 
-#define MMP_CHIPID     (AXI_VIRT_BASE + 0x82c00)
+#define MMP_CHIPID     CIU_REG(0x00)
 
 unsigned int mmp_chip_id;
 EXPORT_SYMBOL(mmp_chip_id);
@@ -36,6 +36,15 @@ static struct map_desc standard_io_desc[] __initdata = {
        },
 };
 
+static struct map_desc mmp2_io_desc[] __initdata = {
+       {
+               .pfn            = __phys_to_pfn(PGU_PHYS_BASE),
+               .virtual        = (unsigned long)PGU_VIRT_BASE,
+               .length         = PGU_PHYS_SIZE,
+               .type           = MT_DEVICE,
+       },
+};
+
 void __init mmp_map_io(void)
 {
        iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
@@ -44,6 +53,12 @@ void __init mmp_map_io(void)
        mmp_chip_id = __raw_readl(MMP_CHIPID);
 }
 
+void __init mmp2_map_io(void)
+{
+       mmp_map_io();
+       iotable_init(mmp2_io_desc, ARRAY_SIZE(mmp2_io_desc));
+}
+
 void mmp_restart(enum reboot_mode mode, const char *cmd)
 {
        soft_restart(0);