diff mbox

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

Message ID 20140605053212.19066.45533.sendpatchset@w520 (mailing list archive)
State Accepted
Commit af164ca33dcb3c1e6a2e723f24542d1278a8bef8
Headers show

Commit Message

Magnus Damm June 5, 2014, 5:32 a.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

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.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 arch/arm/mach-shmobile/setup-emev2.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Geert Uytterhoeven June 5, 2014, 8:13 a.m. UTC | #1
Hi Magnus,

On Thu, Jun 5, 2014 at 7:32 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> --- 0003/arch/arm/mach-shmobile/setup-emev2.c
> +++ work/arch/arm/mach-shmobile/setup-emev2.c   2014-05-29 17:15:54.000000000 +0900
> @@ -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 -- geert@linux-m68k.org

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm June 5, 2014, 9:40 p.m. UTC | #2
Hi Geert,

On Thu, Jun 5, 2014 at 5:13 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Thu, Jun 5, 2014 at 7:32 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> --- 0003/arch/arm/mach-shmobile/setup-emev2.c
>> +++ work/arch/arm/mach-shmobile/setup-emev2.c   2014-05-29 17:15:54.000000000 +0900
>> @@ -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().

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 0003/arch/arm/mach-shmobile/setup-emev2.c
+++ work/arch/arm/mach-shmobile/setup-emev2.c	2014-05-29 17:15:54.000000000 +0900
@@ -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