new file mode 100644
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * PlayStation 2 input/output processor (IOP)
+ *
+ * Copyright (C) 2019 Fredrik Noring
+ */
+
+#ifndef __ASM_MACH_PS2_IOP_H
+#define __ASM_MACH_PS2_IOP_H
+
+#define IOP_RAM_BASE 0x1c000000
+#define IOP_RAM_SIZE 0x200000
+
+#define IOP_OHCI_BASE 0x1f801600
+
+/**
+ * iop_addr_t - I/O processor (IOP) bus address
+ */
+typedef u32 iop_addr_t;
+
+#endif /* __ASM_MACH_PS2_IOP_H */
@@ -13,11 +13,13 @@
#include <asm/bootinfo.h>
#include <asm/io.h>
+#include <asm/mach-ps2/iop.h>
#include <asm/mach-ps2/rom.h>
int valid_phys_addr_range(phys_addr_t addr, size_t size)
{
return addr + size <= __pa(high_memory) ||
+ (IOP_RAM_BASE <= addr && addr + size <= IOP_RAM_BASE + IOP_RAM_SIZE) ||
(ROM0_BASE <= addr && addr + size <= ROM0_BASE + ROM0_SIZE) ||
(ROM1_BASE <= addr && addr + size <= ROM1_BASE + ROM1_SIZE);
}
Signed-off-by: Fredrik Noring <noring@nocrew.org> --- arch/mips/include/asm/mach-ps2/iop.h | 21 +++++++++++++++++++++ arch/mips/ps2/memory.c | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 arch/mips/include/asm/mach-ps2/iop.h