diff options
Diffstat (limited to 'arch/arm/mach-mmp/common.c')
| -rw-r--r-- | arch/arm/mach-mmp/common.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c index 685a0993cff6..b3c1a248db31 100644 --- a/arch/arm/mach-mmp/common.c +++ b/arch/arm/mach-mmp/common.c @@ -1,11 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/arm/mach-mmp/common.c * * Code common to PXA168 processor lines - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #include <linux/init.h> @@ -16,11 +13,11 @@ #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); @@ -39,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)); @@ -47,7 +53,8 @@ void __init mmp_map_io(void) mmp_chip_id = __raw_readl(MMP_CHIPID); } -void mmp_restart(enum reboot_mode mode, const char *cmd) +void __init mmp2_map_io(void) { - soft_restart(0); + mmp_map_io(); + iotable_init(mmp2_io_desc, ARRAY_SIZE(mmp2_io_desc)); } |
