Skip to contentSkip to conversation

ARM: shmobile: Clean up the EMEV2 and KZM9D code base

PATCH In review Magnus Damm 3 participants 15 messages Feb 13, 2014 – Jun 5, 2014

Subsystems (6)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

cover ARM: shmobile: Clean up the EMEV2 and KZM9D code base

ARM: shmobile: Clean up the EMEV2 and KZM9D code base

[PATCH 01/03] ARM: shmobile: Remove legacy EMEV2 SoC support [PATCH 02/03] ARM: shmobile: Remove KZM9D board code [PATCH 03/03] ARM: shmobile: Get rid of legacy KZM9D defconfig

These patches clean up the EMEV2 SoC and the KZM9D board support code.

With these patches applied:
- EMEV2 is enabled for the MULTIPLATFORM case only, making use of CCF
- KZM9D is implemented as DT code only, no C code exists
- The legacy EMEV2 code is gone, so is the legacy clock framework code
- The legacy defconfig is gone, making way for a shared multiplatform defconfig

This means that KZM9D support comes without a Kconfig entry. Also, the load address for u-boot needs to be supplied by hand (0x40008000).

---

Written against renesas.git tag renesas-devel-v3.14-rc1-20140207

 arch/arm/boot/dts/Makefile                     |    3 
 arch/arm/configs/kzm9d_defconfig               |   91 ---------
 arch/arm/mach-shmobile/Kconfig                 |   15 -
 arch/arm/mach-shmobile/Makefile                |    2 
 arch/arm/mach-shmobile/board-kzm9d-reference.c |   47 ----
 arch/arm/mach-shmobile/clock-emev2.c           |  231 ------------------------
 arch/arm/mach-shmobile/include/mach/emev2.h    |    9 
 arch/arm/mach-shmobile/setup-emev2.c           |    7 
 arch/arm/mach-shmobile/smp-emev2.c             |    1 
 9 files changed, 3 insertions(+), 403 deletions(-)
author maintainer
#1 lore raw

PATCH 1/3 ARM: shmobile: Remove legacy EMEV2 SoC support

From: Magnus Damm <[email protected]>

Get rid of legacy EMEV2 SoC code including the legacy clock framework implementation. The multiplatform implementation together with DT board support shall be used instead.

---

 arch/arm/boot/dts/Makefile                  |    3 
 arch/arm/mach-shmobile/Kconfig              |    9 -
 arch/arm/mach-shmobile/Makefile             |    1 
 arch/arm/mach-shmobile/clock-emev2.c        |  231 ---------------------------
 arch/arm/mach-shmobile/include/mach/emev2.h |    1 
 arch/arm/mach-shmobile/setup-emev2.c        |    4 
 6 files changed, 1 insertion(+), 248 deletions(-)
arch/arm/boot/dts/Makefile +1 -2
@@ -242,8 +242,7 @@ dtb-$(CONFIG_ARCH_U8500) += ste-snowball
 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
 dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
 	s3c6410-smdk6410.dtb
-dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
-	r7s72100-genmai.dtb \
+dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
 	r7s72100-genmai-reference.dtb \
 	r8a7740-armadillo800eva.dtb \
 	r8a7778-bockw.dtb \
arch/arm/mach-shmobile/Kconfig +0 -9
@@ -139,15 +139,6 @@ config ARCH_R8A7791
 	select RENESAS_IRQC
 	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 
-config ARCH_EMEV2
-	bool "Emma Mobile EV2"
-	select ARCH_WANT_OPTIONAL_GPIOLIB
-	select ARM_GIC
-	select CPU_V7
-	select MIGHT_HAVE_PCI
-	select USE_OF
-	select AUTO_ZRELADDR
-
 config ARCH_R7S72100
 	bool "RZ/A1H (R7S72100)"
 	select ARCH_WANT_OPTIONAL_GPIOLIB
arch/arm/mach-shmobile/Makefile +0 -1
@@ -31,7 +31,6 @@ obj-$(CONFIG_ARCH_R8A7778)	+= clock-r8a7
 obj-$(CONFIG_ARCH_R8A7779)	+= clock-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= clock-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7791)	+= clock-r8a7791.o
-obj-$(CONFIG_ARCH_EMEV2)	+= clock-emev2.o
 obj-$(CONFIG_ARCH_R7S72100)	+= clock-r7s72100.o
 endif
 
arch/arm/mach-shmobile/clock-emev2.c deleted +0 -231

231 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/emev2.h +0 -1
@@ -3,7 +3,6 @@
 
 extern void emev2_map_io(void);
 extern void emev2_init_delay(void);
-extern void emev2_clock_init(void);
 extern struct smp_operations emev2_smp_ops;
 
 #endif /* __ASM_EMEV2_H__ */
arch/arm/mach-shmobile/setup-emev2.c +0 -4
@@ -50,11 +50,7 @@ void __init emev2_init_delay(void)
 
 static void __init emev2_add_standard_devices_dt(void)
 {
-#ifdef CONFIG_COMMON_CLK
 	of_clk_init(NULL);
-#else
-	emev2_clock_init();
-#endif
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
author maintainer
#6 lore raw

PATCH 2/3 ARM: shmobile: Remove KZM9D board code

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of KZM9D board code written in C. This version of the C board code was used in the case of multiplatform, but these days DT can be used instead, so because of that simply get rid of the C code to simplify and save space.

---

 arch/arm/mach-shmobile/Kconfig                 |    6 ---
 arch/arm/mach-shmobile/Makefile                |    1 
 arch/arm/mach-shmobile/board-kzm9d-reference.c |   47 ------------------------
 arch/arm/mach-shmobile/include/mach/emev2.h    |    8 ----
 arch/arm/mach-shmobile/setup-emev2.c           |    3 +
 arch/arm/mach-shmobile/smp-emev2.c             |    1 
 6 files changed, 2 insertions(+), 64 deletions(-)
arch/arm/mach-shmobile/Kconfig +0 -6
@@ -48,12 +48,6 @@ config MACH_KOELSCH
 	depends on ARCH_R8A7791
 	select MICREL_PHY if SH_ETH
 
-config MACH_KZM9D
-	bool "KZM9D board"
-	depends on ARCH_EMEV2
-	select REGULATOR_FIXED_VOLTAGE if REGULATOR
-	select SMSC_PHY if SMSC911X
-
 config MACH_LAGER
 	bool "Lager board"
 	depends on ARCH_R8A7790
arch/arm/mach-shmobile/Makefile +0 -1
@@ -57,7 +57,6 @@ obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
 obj-$(CONFIG_MACH_GENMAI)	+= board-genmai-reference.o
 obj-$(CONFIG_MACH_KOELSCH)	+= board-koelsch-reference.o
-obj-$(CONFIG_MACH_KZM9D)	+= board-kzm9d-reference.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager-reference.o
 else
 obj-$(CONFIG_MACH_APE6EVM)	+= board-ape6evm.o
arch/arm/mach-shmobile/board-kzm9d-reference.c deleted +0 -47

47 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/emev2.h deleted +0 -8
@@ -1,8 +0,0 @@
-#ifndef __ASM_EMEV2_H__
-#define __ASM_EMEV2_H__
-
-extern void emev2_map_io(void);
-extern void emev2_init_delay(void);
-extern struct smp_operations emev2_smp_ops;
-
-#endif /* __ASM_EMEV2_H__ */
arch/arm/mach-shmobile/setup-emev2.c +2 -1
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <mach/common.h>
-#include <mach/emev2.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -59,6 +58,8 @@ static const char *emev2_boards_compat_d
 	NULL,
 };
 
+extern struct smp_operations emev2_smp_ops;
+
 DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
 	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
arch/arm/mach-shmobile/smp-emev2.c +0 -1
@@ -24,7 +24,6 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 #include <mach/common.h>
-#include <mach/emev2.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 
author maintainer
#10 lore raw

PATCH 3/3 ARM: shmobile: Get rid of legacy KZM9D defconfig

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of the kzm9d_defconfig. The KZM9D is now supported as DT only in case of EMEV2 is selected in the kernel configuration.

---

 arch/arm/configs/kzm9d_defconfig |   91 --------------------------------------
 1 file changed, 91 deletions(-)
arch/arm/configs/kzm9d_defconfig deleted +0 -91
@@ -1,91 +0,0 @@
-# CONFIG_ARM_PATCH_PHYS_VIRT is not set
-CONFIG_EXPERIMENTAL=y
-CONFIG_SYSVIPC=y
-CONFIG_NO_HZ=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_EMBEDDED=y
-CONFIG_PERF_EVENTS=y
-CONFIG_SLAB=y
-# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_SHMOBILE_LEGACY=y
-CONFIG_ARCH_EMEV2=y
-CONFIG_MACH_KZM9D=y
-CONFIG_MEMORY_START=0x40000000
-CONFIG_MEMORY_SIZE=0x10000000
-# CONFIG_SH_TIMER_TMU is not set
-# CONFIG_SWP_EMULATE is not set
-# CONFIG_CACHE_L2X0 is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
-CONFIG_HOTPLUG_CPU=y
-# CONFIG_LOCAL_TIMERS is not set
-CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
-# CONFIG_CROSS_MEMORY_ATTACH is not set
-CONFIG_FORCE_MAX_ZONEORDER=13
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ARM_APPENDED_DTB=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_VFP=y
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_PM_RUNTIME=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
-# CONFIG_INET_DIAG is not set
-# CONFIG_IPV6 is not set
-# CONFIG_WIRELESS is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-# CONFIG_BLK_DEV is not set
-CONFIG_NETDEVICES=y
-# CONFIG_NET_VENDOR_BROADCOM is not set
-# CONFIG_NET_VENDOR_CHELSIO is not set
-# CONFIG_NET_VENDOR_CIRRUS is not set
-# CONFIG_NET_VENDOR_FARADAY is not set
-# CONFIG_NET_VENDOR_INTEL is not set
-# CONFIG_NET_VENDOR_MARVELL is not set
-# CONFIG_NET_VENDOR_MICREL is not set
-# CONFIG_NET_VENDOR_NATSEMI is not set
-# CONFIG_NET_VENDOR_SEEQ is not set
-CONFIG_SMSC911X=y
-# CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_WIZNET is not set
-# CONFIG_WLAN is not set
-# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_DEVKMEM is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_EM=y
-# CONFIG_HW_RANDOM is not set
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_EM=y
-# CONFIG_HWMON is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_IOMMU_SUPPORT is not set
-# CONFIG_DNOTIFY is not set
-CONFIG_TMPFS=y
-# CONFIG_MISC_FILESYSTEMS is not set
-CONFIG_NFS_FS=y
-CONFIG_ROOT_NFS=y
-# CONFIG_FTRACE is not set
#7 lore raw

PATCH 2/3 ARM: shmobile: Remove KZM9D board code

In reply to Magnus Damm

Hi Magnus,

I'm not clear on the motivation for removing emev2_smp_ops from emev2.h only to have to add it as an extern to setup-emev2.c. But if thats how you like to roll then I have no objections.

However, what I would like to ask is that the emev2.h shuffling, that is the changes to emev2.h, setup-emev2.c and smp-emev2.c could be moved into a follow-up patch that I will queue up at a later date.

The reason is that these really seem to be SoC changes but the main portion of this patch is a board change. And as you know the arm-soc people like soc and board changes split into different branches.

Quoted 1 line

DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")

Quoted 133 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of KZM9D board code written in C. This version of the C board code was used in the case of multiplatform, but these days DT can be used instead, so because of that simply get rid of the C code to simplify and save space.

---

 arch/arm/mach-shmobile/Kconfig                 |    6 ---
 arch/arm/mach-shmobile/Makefile                |    1 
 arch/arm/mach-shmobile/board-kzm9d-reference.c |   47 ------------------------
 arch/arm/mach-shmobile/include/mach/emev2.h    |    8 ----
 arch/arm/mach-shmobile/setup-emev2.c           |    3 +
 arch/arm/mach-shmobile/smp-emev2.c             |    1 
 6 files changed, 2 insertions(+), 64 deletions(-)
arch/arm/mach-shmobile/Kconfig +0 -6
@@ -48,12 +48,6 @@ config MACH_KOELSCH
 	depends on ARCH_R8A7791
 	select MICREL_PHY if SH_ETH
 
-config MACH_KZM9D
-	bool "KZM9D board"
-	depends on ARCH_EMEV2
-	select REGULATOR_FIXED_VOLTAGE if REGULATOR
-	select SMSC_PHY if SMSC911X
-
 config MACH_LAGER
 	bool "Lager board"
 	depends on ARCH_R8A7790
arch/arm/mach-shmobile/Makefile +0 -1
@@ -57,7 +57,6 @@ obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
 obj-$(CONFIG_MACH_GENMAI)	+= board-genmai-reference.o
 obj-$(CONFIG_MACH_KOELSCH)	+= board-koelsch-reference.o
-obj-$(CONFIG_MACH_KZM9D)	+= board-kzm9d-reference.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager-reference.o
 else
 obj-$(CONFIG_MACH_APE6EVM)	+= board-ape6evm.o
arch/arm/mach-shmobile/board-kzm9d-reference.c deleted +0 -47
@@ -1,47 +0,0 @@
-/*
- * kzm9d board support - Reference DT implementation
- *
- * Copyright (C) 2013  Renesas Solutions Corp.
- * Copyright (C) 2013  Magnus Damm
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/init.h>
-#include <linux/of_platform.h>
-#include <linux/clk-provider.h>
-#include <mach/emev2.h>
-#include <mach/common.h>
-#include <asm/mach/arch.h>
-
-static void __init kzm9d_add_standard_devices(void)
-{
-	of_clk_init(NULL);
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
-static const char *kzm9d_boards_compat_dt[] __initdata = {
-	"renesas,kzm9d",
-	"renesas,kzm9d-reference",
-	NULL,
-};
-
-DT_MACHINE_START(KZM9D_DT, "kzm9d")
-	.smp		= smp_ops(emev2_smp_ops),
-	.map_io		= emev2_map_io,
-	.init_early	= emev2_init_delay,
-	.init_machine	= kzm9d_add_standard_devices,
-	.init_late	= shmobile_init_late,
-	.dt_compat	= kzm9d_boards_compat_dt,
-MACHINE_END
arch/arm/mach-shmobile/include/mach/emev2.h deleted +0 -8
@@ -1,8 +0,0 @@
-#ifndef __ASM_EMEV2_H__
-#define __ASM_EMEV2_H__
-
-extern void emev2_map_io(void);
-extern void emev2_init_delay(void);
-extern struct smp_operations emev2_smp_ops;
-
-#endif /* __ASM_EMEV2_H__ */
arch/arm/mach-shmobile/setup-emev2.c +2 -1
@@ -21,7 +21,6 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <mach/common.h>
-#include <mach/emev2.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -59,6 +58,8 @@ static const char *emev2_boards_compat_d
 	NULL,
 };
 
+extern struct smp_operations emev2_smp_ops;
+
 	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
arch/arm/mach-shmobile/smp-emev2.c +0 -1
@@ -24,7 +24,6 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 #include <mach/common.h>
-#include <mach/emev2.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 
author maintainer
#8 lore raw

PATCH 2/3 ARM: shmobile: Remove KZM9D board code

Hi Simon,

Quoted 5 lines · Simon Horman

Hi Magnus,

I'm not clear on the motivation for removing emev2_smp_ops from emev2.h only to have to add it as an extern to setup-emev2.c. But if thats how you like to roll then I have no objections.

Hehe, I suppose I felt a sudden urge to remove that particular header file.

Quoted 3 lines

However, what I would like to ask is that the emev2.h shuffling, that is the changes to emev2.h, setup-emev2.c and smp-emev2.c could be moved into a follow-up patch that I will queue up at a later date.

That's fine.

Quoted 4 lines

The reason is that these really seem to be SoC changes but the main portion of this patch is a board change. And as you know the arm-soc people like soc and board changes split into different branches.

Sure. Would you like me to redo 2/3 to break out the header file bits?

Thanks,

/ magnus

#9 lore raw

PATCH 2/3 ARM: shmobile: Remove KZM9D board code

Quoted 15 lines · Magnus Damm

Hi Simon,

Quoted 5 lines · Simon Horman

Hi Magnus,

I'm not clear on the motivation for removing emev2_smp_ops from emev2.h only to have to add it as an extern to setup-emev2.c. But if thats how you like to roll then I have no objections.

Hehe, I suppose I felt a sudden urge to remove that particular header file.

Quoted 3 lines

However, what I would like to ask is that the emev2.h shuffling, that is the changes to emev2.h, setup-emev2.c and smp-emev2.c could be moved into a follow-up patch that I will queue up at a later date.

Quoted 8 lines

That's fine.

Quoted 4 lines

The reason is that these really seem to be SoC changes but the main portion of this patch is a board change. And as you know the arm-soc people like soc and board changes split into different branches.

Sure. Would you like me to redo 2/3 to break out the header file bits?

Ideally, yes.

Alternatively, I can just drop them from 2/3 and you can send a follow-up patch at a later date.

#3 lore raw

PATCH 1/3 ARM: shmobile: Remove legacy EMEV2 SoC support

In reply to Simon Horman
Quoted 10 lines · Simon Horman
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of legacy EMEV2 SoC code including the legacy clock framework implementation. The multiplatform implementation together with DT board support shall be used instead.

Thanks, I have queued this up.

I have dropped this patch for now and plan to deffer it. This is because although this is patch 1 of the series it removes emev2_clock_init() which causes the build of board-kzm9d-reference.c to fail without
"ARM: shmobile: Remove Lager DT reference legacy clock bits".

My current thinking is that the best way to sequence this is to queue up the board and defconfig changes for v3.15 but wait for v3.16 to queue up the SoC changes. This avoids tedious dependencies of SoC patches on board patches in the same release cycle.

author maintainer
#4 lore raw

PATCH 1/3 ARM: shmobile: Remove legacy EMEV2 SoC support

Hi Simon,

Quoted 18 lines · Simon Horman
Quoted 10 lines · Simon Horman
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of legacy EMEV2 SoC code including the legacy clock framework implementation. The multiplatform implementation together with DT board support shall be used instead.

Thanks, I have queued this up.

I have dropped this patch for now and plan to deffer it. This is because although this is patch 1 of the series it removes emev2_clock_init() which causes the build of board-kzm9d-reference.c to fail without
"ARM: shmobile: Remove Lager DT reference legacy clock bits".

Quoted 4 lines

My current thinking is that the best way to sequence this is to queue up the board and defconfig changes for v3.15 but wait for v3.16 to queue up the SoC changes. This avoids tedious dependencies of SoC patches on board patches in the same release cycle.

Thanks, that's of course fine with me!

/ magnus

#5 lore raw

PATCH 1/3 ARM: shmobile: Remove legacy EMEV2 SoC support

Quoted 21 lines · Magnus Damm

Hi Simon,

Quoted 18 lines · Simon Horman
Quoted 10 lines · Simon Horman
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Get rid of legacy EMEV2 SoC code including the legacy clock framework implementation. The multiplatform implementation together with DT board support shall be used instead.

Thanks, I have queued this up.

I have dropped this patch for now and plan to deffer it. This is because although this is patch 1 of the series it removes emev2_clock_init() which causes the build of board-kzm9d-reference.c to fail without
"ARM: shmobile: Remove Lager DT reference legacy clock bits".

Quoted 6 lines
Quoted 4 lines

My current thinking is that the best way to sequence this is to queue up the board and defconfig changes for v3.15 but wait for v3.16 to queue up the SoC changes. This avoids tedious dependencies of SoC patches on board patches in the same release cycle.

Thanks, that's of course fine with me!

I have now queued this up for v3.16.

author maintainer
#12 lore raw

PATCH 3/3 ARM: shmobile: Get rid of redundant EMEV2 mach callbacks

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Update the EMEV2 specific SoC callbacks to get rid of the calls to of_clk_init() and of_platform_populate(). Those calls are by default executed by the functions in the shared ARM code in case the SoC specific mach callbacks are NULL.

---

 arch/arm/mach-shmobile/setup-emev2.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/arm/mach-shmobile/setup-emev2.c +1 -9
@@ -16,10 +16,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#include <linux/clk-provider.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of_platform.h>
+#include <linux/mm.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -42,12 +41,6 @@ static void __init emev2_map_io(void)
 	iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
 }
 
-static void __init emev2_add_standard_devices_dt(void)
-{
-	of_clk_init(NULL);
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 static const char *emev2_boards_compat_dt[] __initconst = {
 	"renesas,emev2",
 	NULL,
@@ -59,7 +52,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma
 	.smp		= smp_ops(emev2_smp_ops),
 	.map_io		= emev2_map_io,
 	.init_early	= shmobile_init_delay,
-	.init_machine	= emev2_add_standard_devices_dt,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= emev2_boards_compat_dt,
 MACHINE_END
#13 lore raw

Re: [PATCH 03/03] ARM: shmobile: Get rid of redundant EMEV2 mach callbacks

In reply to Magnus Damm

Hi Magnus,

arch/arm/mach-shmobile/setup-emev2.c 2014-05-29 17:15:54.000000000 +0900 line 21

Quoted 11 lines · Magnus Damm
arch/arm/mach-shmobile/setup-emev2.c 2014-05-29 17:15:54.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-emev2.c +1 -2
@@ -16,10 +16,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#include <linux/clk-provider.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of_platform.h>
+#include <linux/mm.h>

Why is <linux/mm.h> needed?

Ah, arch/arm/mach-shmobile/include/mach/common.h lacks a forward declaration of "struct task_struct;".

And then you still need to add "#include <asm/page.h>" for PAGE_SHIFT, as <asm/memory.h> uses that in __phys_to_pfn().

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#14 lore raw

Re: [PATCH 03/03] ARM: shmobile: Get rid of redundant EMEV2 mach callbacks

In reply to Magnus Damm

Hi Geert,

Quoted 17 lines · Geert Uytterhoeven

Hi Magnus,

arch/arm/mach-shmobile/setup-emev2.c 2014-05-29 17:15:54.000000000 +0900 line 21

Quoted 11 lines · Magnus Damm
arch/arm/mach-shmobile/setup-emev2.c 2014-05-29 17:15:54.000000000 +0900 renamed from arch/arm/mach-shmobile/setup-emev2.c +1 -2
@@ -16,10 +16,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#include <linux/clk-provider.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of_platform.h>
+#include <linux/mm.h>

Why is <linux/mm.h> needed?

Quoted 5 lines

Ah, arch/arm/mach-shmobile/include/mach/common.h lacks a forward declaration of "struct task_struct;".

And then you still need to add "#include <asm/page.h>" for PAGE_SHIFT, as <asm/memory.h> uses that in __phys_to_pfn().

The current state of the header files is a bit messy, yes. So this should indeed be fixed.

I'd like to fix up the headers in general, but for this kind of stuff I'm currently blocked on the following:

[PATCH 00/08] ARM: shmobile: Rework include path (Try 2, Part 1) [PATCH 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH 02/08] ARM: shmobile: Move dma-register.h
[PATCH 03/08] ARM: shmobile: Move clock.h
[PATCH 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH 05/08] ARM: shmobile: Move common.h
[PATCH 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH 08/08] ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

Do you have any opinion on this series? =)

Thanks,

/ magnus