* [PATCH 0/4] arm/versatile: no-MMU support
@ 2016-09-26 0:52 Greg Ungerer
2016-09-26 0:52 ` [PATCH 1/4] arm/versatile: support no-MMU mode addressing Greg Ungerer
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Greg Ungerer @ 2016-09-26 0:52 UTC (permalink / raw)
To: linux-arm-kernel
The following patches support configuring and building the versatile
machine with a no-MMU kernel.
There is only a minor few changes required. It was previously possible
in older kernels to build for versatile with CONFIG_MMU disabled, but
the change to devicetree lost that capability. These changes make it
possible again.
One patch is a fix for address translation (broken on older kernels too),
two are build problems when CONFIG_MMU is disabled, and the last is the
actuall configuration changes needed.
The motivation for this is that the versatile machine is well supported
in qemu. And this provides an excellent platform for development and
testing no-MMU support on ARM in general. With these patches applied
it is possible to build and run a kernel with MMU disabled on qemu.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/Kconfig | 10 ++++++++++
arch/arm/Kconfig.debug | 3 ++-
arch/arm/include/asm/mach/map.h | 1 +
arch/arm/mach-versatile/Kconfig | 3 ++-
arch/arm/mach-versatile/Makefile.boot | 3 +++
arch/arm/mach-versatile/versatile_dt.c | 4 ++++
6 files changed, 22 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] arm/versatile: support no-MMU mode addressing
2016-09-26 0:52 [PATCH 0/4] arm/versatile: no-MMU support Greg Ungerer
@ 2016-09-26 0:52 ` Greg Ungerer
2016-09-26 0:52 ` [PATCH 2/4] arm/versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2016-09-26 0:52 UTC (permalink / raw)
To: linux-arm-kernel
Currently for the versatile boards the IO_ADDRESS() macro applies static
virtual address mapping for built-in IO devices. When operating without
the MMU enabled IO devices are accessed at their physical address, no
address translation is required.
For the !CONFIG_MMU case then define the IO_ADDRESS() macro to return the
physical address.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/mach-versatile/versatile_dt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index 3c8d39c..8cfa05a 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -37,7 +37,11 @@
#include <asm/mach/map.h>
/* macro to get at MMIO space when running virtually */
+#ifdef CONFIG_MMU
#define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
+#else
+#define IO_ADDRESS(x) (x)
+#endif
#define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
/*
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] arm/versatile: define empty debug_ll_io_init() for no-MMU
2016-09-26 0:52 [PATCH 0/4] arm/versatile: no-MMU support Greg Ungerer
2016-09-26 0:52 ` [PATCH 1/4] arm/versatile: support no-MMU mode addressing Greg Ungerer
@ 2016-09-26 0:52 ` Greg Ungerer
2016-09-26 0:52 ` [PATCH 3/4] arm/versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2016-09-26 0:52 ` [PATCH 4/4] arm/versatile: support configuring versatile machine for no-MMU Greg Ungerer
3 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2016-09-26 0:52 UTC (permalink / raw)
To: linux-arm-kernel
No-MMU configured targets have no definition for debug_ll_io_init().
Not all machines use this and it will only be required if CONFIG_DEBUG_LL
is enabled.
But when compiling for a target that uses it and it is configured for
no-MMU (!CONFIG_MMU), for example the versatile machine, you will get:
CC arch/arm/mach-versatile/versatile_dt.o
arch/arm/mach-versatile/versatile_dt.c: In function ?versatile_map_io?:
arch/arm/mach-versatile/versatile_dt.c:283:2: error: implicit declaration of function ?debug_ll_io_init? [-Werror=implicit-function-declaration]
debug_ll_io_init();
^
Fix by adding a macro for it to the !CONFIG_MMU path in map.h.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/include/asm/mach/map.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index 9b7c328..b1fe9c8 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -62,6 +62,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys,
#else
#define iotable_init(map,num) do { } while (0)
#define vm_reserve_area_early(a,s,c) do { } while (0)
+#define debug_ll_io_init() do { } while (0)
#endif
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] arm/versatile: empty Makefile.boot needed for no-MMU compile
2016-09-26 0:52 [PATCH 0/4] arm/versatile: no-MMU support Greg Ungerer
2016-09-26 0:52 ` [PATCH 1/4] arm/versatile: support no-MMU mode addressing Greg Ungerer
2016-09-26 0:52 ` [PATCH 2/4] arm/versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
@ 2016-09-26 0:52 ` Greg Ungerer
2016-09-26 0:52 ` [PATCH 4/4] arm/versatile: support configuring versatile machine for no-MMU Greg Ungerer
3 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2016-09-26 0:52 UTC (permalink / raw)
To: linux-arm-kernel
To compile the arm versatile board with the MMU disabled (!CONFIG_MMU)
a Makefile.boot is required. Without it you get:
SYSMAP System.map
arch/arm/boot/Makefile:15: arch/arm/mach-versatile//Makefile.boot: No such file or directory
make[2]: *** No rule to make target `arch/arm/mach-versatile//Makefile.boot'. Stop.
Create an empty Makefile.boot for the versatile machine. This is a
copy of the other empty machine Makefile.boot files. (A few have this
same commented empty file: stm32, ep93xx, lpc18xx, efm32 and vexpress).
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/mach-versatile/Makefile.boot | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 arch/arm/mach-versatile/Makefile.boot
diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
new file mode 100644
index 0000000..eacfc3f
--- /dev/null
+++ b/arch/arm/mach-versatile/Makefile.boot
@@ -0,0 +1,3 @@
+# Empty file waiting for deletion once Makefile.boot isn't needed any more.
+# Patch waits for application at
+# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] arm/versatile: support configuring versatile machine for no-MMU
2016-09-26 0:52 [PATCH 0/4] arm/versatile: no-MMU support Greg Ungerer
` (2 preceding siblings ...)
2016-09-26 0:52 ` [PATCH 3/4] arm/versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
@ 2016-09-26 0:52 ` Greg Ungerer
3 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2016-09-26 0:52 UTC (permalink / raw)
To: linux-arm-kernel
Allow the arm versatile machine to be configured for no-MMU operation.
The approach taken is similar to the support for no-MMU arm v7 machines.
A new define, CONFIG_ARM_SINGLE_ARMV5, is used to enable a class of v5
core based machines that are supported for building with !CONFIG_MMU.
Currently only the versatile machine is configured to support this.
Older kernels had the ability to build the versatile machine with the MMU
disabled (!CONFIG_MMU). Recent changes to convert the versatile machine
to device tree lost this ability. (Although older kernels could be built
they did not run due to a bug in the IO_ADDRESS() mapping on this machine).
The motivation for this is that the versatile machine is well supported
in qemu. And this provides an excellent platform for development and
testing no-MMU support on ARM in general.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/arm/Kconfig | 10 ++++++++++
arch/arm/Kconfig.debug | 3 ++-
arch/arm/mach-versatile/Kconfig | 3 ++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a9c4e48..f44fe7b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -353,6 +353,16 @@ config ARM_SINGLE_ARMV7M
select SPARSE_IRQ
select USE_OF
+config ARM_SINGLE_ARMV5
+ bool "ARMv5 based platforms (ARM926T)"
+ depends on !MMU
+ select AUTO_ZRELADDR
+ select CLKSRC_OF
+ select COMMON_CLK
+ select GENERIC_CLOCKEVENTS
+ select SPARSE_IRQ
+ select USE_OF
+
config ARCH_GEMINI
bool "Cortina Systems Gemini"
select CLKSRC_MMIO
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index a9693b6..9897348 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1712,7 +1712,8 @@ config DEBUG_UNCOMPRESS
config UNCOMPRESS_INCLUDE
string
default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
- PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
+ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
+ ARM_SINGLE_ARMV5
default "mach/uncompress.h"
config EARLY_PRINTK
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index b0cc262..904a012 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -1,6 +1,6 @@
config ARCH_VERSATILE
bool "ARM Ltd. Versatile family"
- depends on ARCH_MULTI_V5
+ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARMV5
select ARM_AMBA
select ARM_TIMER_SP804
select ARM_VIC
@@ -14,6 +14,7 @@ config ARCH_VERSATILE
select POWER_RESET
select POWER_RESET_VERSATILE
select VERSATILE_FPGA_IRQ
+ select GPIOLIB
help
This enables support for ARM Ltd Versatile board.
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-26 0:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26 0:52 [PATCH 0/4] arm/versatile: no-MMU support Greg Ungerer
2016-09-26 0:52 ` [PATCH 1/4] arm/versatile: support no-MMU mode addressing Greg Ungerer
2016-09-26 0:52 ` [PATCH 2/4] arm/versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
2016-09-26 0:52 ` [PATCH 3/4] arm/versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2016-09-26 0:52 ` [PATCH 4/4] arm/versatile: support configuring versatile machine for no-MMU Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).