| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-mmp/common.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Code common to PXA168 processor lines |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 16 | 13 | #include <asm/mach/map.h> |
|---|
| 17 | 14 | #include <asm/system_misc.h> |
|---|
| 18 | 15 | #include "addr-map.h" |
|---|
| 19 | | -#include "cputype.h" |
|---|
| 16 | +#include <linux/soc/mmp/cputype.h> |
|---|
| 20 | 17 | |
|---|
| 21 | 18 | #include "common.h" |
|---|
| 22 | 19 | |
|---|
| 23 | | -#define MMP_CHIPID (AXI_VIRT_BASE + 0x82c00) |
|---|
| 20 | +#define MMP_CHIPID CIU_REG(0x00) |
|---|
| 24 | 21 | |
|---|
| 25 | 22 | unsigned int mmp_chip_id; |
|---|
| 26 | 23 | EXPORT_SYMBOL(mmp_chip_id); |
|---|
| .. | .. |
|---|
| 39 | 36 | }, |
|---|
| 40 | 37 | }; |
|---|
| 41 | 38 | |
|---|
| 39 | +static struct map_desc mmp2_io_desc[] __initdata = { |
|---|
| 40 | + { |
|---|
| 41 | + .pfn = __phys_to_pfn(PGU_PHYS_BASE), |
|---|
| 42 | + .virtual = (unsigned long)PGU_VIRT_BASE, |
|---|
| 43 | + .length = PGU_PHYS_SIZE, |
|---|
| 44 | + .type = MT_DEVICE, |
|---|
| 45 | + }, |
|---|
| 46 | +}; |
|---|
| 47 | + |
|---|
| 42 | 48 | void __init mmp_map_io(void) |
|---|
| 43 | 49 | { |
|---|
| 44 | 50 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); |
|---|
| .. | .. |
|---|
| 47 | 53 | mmp_chip_id = __raw_readl(MMP_CHIPID); |
|---|
| 48 | 54 | } |
|---|
| 49 | 55 | |
|---|
| 56 | +void __init mmp2_map_io(void) |
|---|
| 57 | +{ |
|---|
| 58 | + mmp_map_io(); |
|---|
| 59 | + iotable_init(mmp2_io_desc, ARRAY_SIZE(mmp2_io_desc)); |
|---|
| 60 | +} |
|---|
| 61 | + |
|---|
| 50 | 62 | void mmp_restart(enum reboot_mode mode, const char *cmd) |
|---|
| 51 | 63 | { |
|---|
| 52 | 64 | soft_restart(0); |
|---|