Skip to contentSkip to conversation

ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

PATCH Superseded Uwe Kleine-König 4 participants 8 messages Dec 10, 2013 – Dec 18, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards
Uwe

 arch/arm/Kconfig                               |  19 ++++-
 arch/arm/Makefile                              |   1 +
 arch/arm/configs/efm32_defconfig               | 102 +++++++++++++++++++++++++
 arch/arm/mach-efm32/Makefile                   |   1 +
 arch/arm/mach-efm32/Makefile.boot              |   3 +
 arch/arm/mach-efm32/dtmachine.c                |  15 ++++
 arch/arm/mach-efm32/include/mach/entry-macro.S |   4 +
 arch/arm/mach-efm32/include/mach/timex.h       |   3 +
 8 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/configs/efm32_defconfig
 create mode 100644 arch/arm/mach-efm32/Makefile
 create mode 100644 arch/arm/mach-efm32/Makefile.boot
 create mode 100644 arch/arm/mach-efm32/dtmachine.c
 create mode 100644 arch/arm/mach-efm32/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-efm32/include/mach/timex.h
arch/arm/Kconfig +18 -1
index c1f1a7e..38ed5a9 100644
@@ -410,6 +410,23 @@ config ARCH_EBSA110
 	  Ethernet interface, two PCMCIA sockets, two serial ports and a
 	  parallel port.
 
+config ARCH_EFM32
+	bool "Energy Micro efm32"
+	depends on !MMU
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_NVIC
+	select CLKSRC_OF
+	select COMMON_CLK
+	select CPU_V7M
+	select GENERIC_CLOCKEVENTS
+	select NO_DMA
+	select NO_IOPORT
+	select SPARSE_IRQ
+	select USE_OF
+	help
+	  Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
+	  processors.
+
 config ARCH_EP93XX
 	bool "EP93xx-based"
 	select ARCH_HAS_HOLES_MEMORYMODEL
@@ -1799,7 +1816,7 @@ config FORCE_MAX_ZONEORDER
 	int "Maximum zone order" if ARCH_SHMOBILE
 	range 11 64 if ARCH_SHMOBILE
 	default "12" if SOC_AM33XX
-	default "9" if SA1111
+	default "9" if SA1111 || ARCH_EFM32
 	default "11"
 	help
 	  The kernel memory allocator divides physically contiguous memory
arch/arm/Makefile +1 -0
index c99b108..6da9abb 100644
@@ -153,6 +153,7 @@ machine-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx
 machine-$(CONFIG_ARCH_DAVINCI)		+= davinci
 machine-$(CONFIG_ARCH_DOVE)		+= dove
 machine-$(CONFIG_ARCH_EBSA110)		+= ebsa110
+machine-$(CONFIG_ARCH_EFM32)		+= efm32
 machine-$(CONFIG_ARCH_EP93XX)		+= ep93xx
 machine-$(CONFIG_ARCH_EXYNOS)		+= exynos
 machine-$(CONFIG_ARCH_GEMINI)		+= gemini
arch/arm/configs/efm32_defconfig new file +102 -0

102 lines not on this page · raw message

arch/arm/mach-efm32/Makefile new file +1 -0
new file mode 100644
index 0000000..3a74af7
@@ -0,0 +1 @@
+obj-y += dtmachine.o
arch/arm/mach-efm32/Makefile.boot new file +3 -0
new file mode 100644
index 0000000..eacfc3f
@@ -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 .
arch/arm/mach-efm32/dtmachine.c new file +15 -0
new file mode 100644
index 0000000..2367495
@@ -0,0 +1,15 @@
+#include <linux/kernel.h>
+
+#include <asm/v7m.h>
+
+#include <asm/mach/arch.h>
+
+static const char *const efm32gg_compat[] __initconst = {
+	"efm32,dk3750",
+	NULL
+};
+
+DT_MACHINE_START(EFM32DT, "EFM32 (Device Tree Support)")
+	.dt_compat = efm32gg_compat,
+	.restart = armv7m_restart,
+MACHINE_END
arch/arm/mach-efm32/include/mach/entry-macro.S new file +4 -0
new file mode 100644
index 0000000..322159d
@@ -0,0 +1,4 @@
+/*
+ * Empty file waiting for deletion once <mach/entry-macro.S> isn't needed any
+ * more. Patch "ARM: v7-M: drop using mach/entry-macro.S" sitting in next.
+ */
arch/arm/mach-efm32/include/mach/timex.h new file +3 -0
new file mode 100644
index 0000000..7a8b26d
@@ -0,0 +1,3 @@
+/*
+ * Empty file waiting for deletion once <mach/timex.h> isn't needed any more.
+ */
Signature · 1 line
1.8.4.4
#2 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

In reply to Uwe Kleine-König
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

-Olof

#3 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

Quoted 35 lines · Olof Johansson
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 6 lines
Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

Thanks, but I wonder if it's a problem that the commit doesn't build? (i.e.

	git checkout f9b9cef1329c74607f33a20dce3f26e9a1f4ae96
	make efm32_defconfig
	make 

fails in

- arch/arm/kernel/sigreturn_codes.S with
"Error: selected processor does not support ARM opcodes" and a few variations.
- drivers/clocksource/time-efm32.o fails to link, because next/soc isn't a decendant of 4ff3774e451f.

You can fix the latter by adding "select CLKSRC_MMIO" to ARCH_EFM32 if you want. I don't remember what is the current state of the first problem.)

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#4 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

Quoted 56 lines · Uwe Kleine-K?nig
Quoted 35 lines · Olof Johansson
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 6 lines
Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

Thanks, but I wonder if it's a problem that the commit doesn't build? (i.e.

        git checkout f9b9cef1329c74607f33a20dce3f26e9a1f4ae96
        make efm32_defconfig
        make

fails in

- arch/arm/kernel/sigreturn_codes.S with
"Error: selected processor does not support ARM opcodes" and a few variations.
- drivers/clocksource/time-efm32.o fails to link, because next/soc isn't a decendant of 4ff3774e451f.

Quoted 3 lines

You can fix the latter by adding "select CLKSRC_MMIO" to ARCH_EFM32 if you want. I don't remember what is the current state of the first problem.)

Ok, dropped the patch again. Please let us know when the former has been resolved.

-Olof

#5 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

Hello,

Quoted 58 lines · Olof Johansson
Quoted 56 lines · Uwe Kleine-K?nig
Quoted 35 lines · Olof Johansson
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 6 lines
Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

Thanks, but I wonder if it's a problem that the commit doesn't build? (i.e.

        git checkout f9b9cef1329c74607f33a20dce3f26e9a1f4ae96
        make efm32_defconfig
        make

fails in

- arch/arm/kernel/sigreturn_codes.S with
"Error: selected processor does not support ARM opcodes" and a few variations.
- drivers/clocksource/time-efm32.o fails to link, because next/soc isn't a decendant of 4ff3774e451f.

Quoted 6 lines
Quoted 3 lines

You can fix the latter by adding "select CLKSRC_MMIO" to ARCH_EFM32 if you want. I don't remember what is the current state of the first problem.)

Ok, dropped the patch again. Please let us know when the former has been resolved.

The former problem is fixed in 5091333 (ARM: 7895/1: signal: fix armv7-m build issue in sigreturn_codes.S) which is in v3.13-rc3, but next/soc is based on v3.13-rc1.

I suggest to wait until 4ff3774e451f hits Linus T.'s tree and then reapply the patch.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#6 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

In reply to Olof Johansson
Quoted 58 lines · Olof Johansson
Quoted 56 lines · Uwe Kleine-K?nig
Quoted 35 lines · Olof Johansson
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 6 lines
Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

Thanks, but I wonder if it's a problem that the commit doesn't build? (i.e.

        git checkout f9b9cef1329c74607f33a20dce3f26e9a1f4ae96
        make efm32_defconfig
        make

fails in

- arch/arm/kernel/sigreturn_codes.S with
"Error: selected processor does not support ARM opcodes" and a few variations.
- drivers/clocksource/time-efm32.o fails to link, because next/soc isn't a decendant of 4ff3774e451f.

Quoted 6 lines
Quoted 3 lines

You can fix the latter by adding "select CLKSRC_MMIO" to ARCH_EFM32 if you want. I don't remember what is the current state of the first problem.)

Ok, dropped the patch again. Please let us know when the former has been resolved.

You did drop it, but when fetching today from armsoc, commit f9b9cef1329c74607f made it back into next/soc. There is only a single commit on top of it made by khilman (added to Cc:).

Hint: There is an open pull request that you can substitute f9b9cef1329c74607f with.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#7 lore raw

PATCH v5 1/1 ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs

Quoted 63 lines · Uwe Kleine-K?nig
Quoted 62 lines · Olof Johansson
Quoted 59 lines · Uwe Kleine-K?nig
Quoted 35 lines · Olof Johansson
Quoted 34 lines · Uwe Kleine-K?nig

There are still some missing parts (e.g. board support, device trees), but with these bits added on top of this patch I can successfully boot a EFM32GG-DK3750 board that uses an EFM32GG990F1024.

---
Hello,

I'd like to get this patch in for 3.14. The latest submission (v4, Message-Id:1383562853-17202-4-git-send-email-u.kleine-koenig at pengutronix.de) had some strict dependencies:
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1
to be able to drop Makefile.boot, this is still in Status=Incoming in rmk's patch tracker.
- http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7890/1
to be able to drop the unused <mach/entry-macro.S>. This is already applied by rmk in his for-next branch, so it's not stable yet.
- My series to drop <mach/timex.h> for !MULTI_PLATFORM. I'll send a pull request for that soon.
- Patch "clocksource: time-efm32: Select CLKSRC_MMIO". This is part of a pull request by Daniel Lezcano that is expected to hit Linus T.'s tree for the next -rc. It currently sits as 4ff3774e451fefb1781638c76230b3cf9a206b92 in Daniel's tree at
git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/fixes .

To make application a bit easier I added dummy files to drop the dependencies on the first three items of the list above.

So it would be great if you could apply this patch when 4ff3774e4 went in. (In case you want to apply it already now, this last dependency could be work arounded, too, by adding a "select CLKSRC_MMIO" to ARCH_EFM32.)

Quoted 6 lines
Quoted 4 lines

Other than that the only change since v4 is that I mention the exact board/processor combo in the changelog now.

Thanks for considering this patch, best regards

Applied to next/soc with a slightly tweaked patch subject.

Thanks, but I wonder if it's a problem that the commit doesn't build? (i.e.

        git checkout f9b9cef1329c74607f33a20dce3f26e9a1f4ae96
        make efm32_defconfig
        make

fails in

- arch/arm/kernel/sigreturn_codes.S with
"Error: selected processor does not support ARM opcodes" and a few variations.
- drivers/clocksource/time-efm32.o fails to link, because next/soc isn't a decendant of 4ff3774e451f.

You can fix the latter by adding "select CLKSRC_MMIO" to ARCH_EFM32 if you want. I don't remember what is the current state of the first problem.)

Quoted 5 lines
Quoted 2 lines

Ok, dropped the patch again. Please let us know when the former has been resolved.

You did drop it, but when fetching today from armsoc, commit f9b9cef1329c74607f made it back into next/soc. There is only a single commit on top of it made by khilman (added to Cc:).

OK, I rebuild next/soc with it *really* dropped this time. :)

Quoted 2 lines

Hint: There is an open pull request that you can substitute f9b9cef1329c74607f with.

Yeah, it's in the queue.

Kevin