Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'renesas-soc-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Updates for v4.6" from Simon Horman:

* Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
* Move emev2_smp_ops to emev2
* Remove legacy map_io callbacks on r8a7740 and emev2 SoCs
* Migrate to generic l2c OF initialization on r8a7740

* tag 'renesas-soc-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h
ARM: shmobile: emev2: Remove legacy machine_desc.map_io() callback
ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback
ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers
ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization

+20 -62
+8 -5
arch/arm/mach-shmobile/Kconfig
··· 6 6 7 7 config PM_RCAR 8 8 bool 9 - select PM_GENERIC_DOMAINS if PM 9 + select PM 10 + select PM_GENERIC_DOMAINS 10 11 11 12 config PM_RMOBILE 12 13 bool 14 + select PM 13 15 select PM_GENERIC_DOMAINS 14 16 15 17 config ARCH_RCAR_GEN1 16 18 bool 17 - select PM_RCAR if PM || SMP 19 + select PM_RCAR 18 20 select RENESAS_INTC_IRQPIN 19 21 select SYS_SUPPORTS_SH_TMU 20 22 21 23 config ARCH_RCAR_GEN2 22 24 bool 23 - select PM_RCAR if PM || SMP 25 + select PM_RCAR 24 26 select RENESAS_IRQC 25 27 select SYS_SUPPORTS_SH_CMT 26 28 select PCI_DOMAINS if PCI 27 29 28 30 config ARCH_RMOBILE 29 31 bool 30 - select PM_RMOBILE if PM 32 + select PM_RMOBILE 31 33 select SYS_SUPPORTS_SH_CMT 32 34 select SYS_SUPPORTS_SH_TMU 33 35 ··· 57 55 58 56 config ARCH_R7S72100 59 57 bool "RZ/A1H (R7S72100)" 60 - select PM_GENERIC_DOMAINS if PM 58 + select PM 59 + select PM_GENERIC_DOMAINS 61 60 select SYS_SUPPORTS_SH_MTU2 62 61 63 62 config ARCH_R8A73A4
+6
arch/arm/mach-shmobile/emev2.h
··· 1 + #ifndef __ASM_EMEV2_H__ 2 + #define __ASM_EMEV2_H__ 3 + 4 + extern const struct smp_operations emev2_smp_ops; 5 + 6 + #endif /* __ASM_EMEV2_H__ */
+2 -20
arch/arm/mach-shmobile/setup-emev2.c
··· 18 18 #include <asm/mach-types.h> 19 19 #include <asm/mach/arch.h> 20 20 #include <asm/mach/map.h> 21 + 21 22 #include "common.h" 22 - 23 - static struct map_desc emev2_io_desc[] __initdata = { 24 - #ifdef CONFIG_SMP 25 - /* 2M mapping for SCU + L2 controller */ 26 - { 27 - .virtual = 0xf0000000, 28 - .pfn = __phys_to_pfn(0x1e000000), 29 - .length = SZ_2M, 30 - .type = MT_DEVICE 31 - }, 32 - #endif 33 - }; 34 - 35 - static void __init emev2_map_io(void) 36 - { 37 - iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); 38 - } 23 + #include "emev2.h" 39 24 40 25 static const char *const emev2_boards_compat_dt[] __initconst = { 41 26 "renesas,emev2", 42 27 NULL, 43 28 }; 44 29 45 - extern const struct smp_operations emev2_smp_ops; 46 - 47 30 DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") 48 31 .smp = smp_ops(emev2_smp_ops), 49 - .map_io = emev2_map_io, 50 32 .init_early = shmobile_init_delay, 51 33 .init_late = shmobile_init_late, 52 34 .dt_compat = emev2_boards_compat_dt,
+2 -37
arch/arm/mach-shmobile/setup-r8a7740.c
··· 23 23 #include <asm/mach/map.h> 24 24 #include <asm/mach/arch.h> 25 25 #include <asm/mach/time.h> 26 - #include <asm/hardware/cache-l2x0.h> 27 26 28 27 #include "common.h" 29 - 30 - static struct map_desc r8a7740_io_desc[] __initdata = { 31 - /* 32 - * for CPGA/INTC/PFC 33 - * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff 34 - */ 35 - { 36 - .virtual = 0xe6000000, 37 - .pfn = __phys_to_pfn(0xe6000000), 38 - .length = 160 << 20, 39 - .type = MT_DEVICE_NONSHARED 40 - }, 41 - #ifdef CONFIG_CACHE_L2X0 42 - /* 43 - * for l2x0_init() 44 - * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000 45 - */ 46 - { 47 - .virtual = 0xf0002000, 48 - .pfn = __phys_to_pfn(0xf0100000), 49 - .length = PAGE_SIZE, 50 - .type = MT_DEVICE_NONSHARED 51 - }, 52 - #endif 53 - }; 54 - 55 - static void __init r8a7740_map_io(void) 56 - { 57 - debug_ll_io_init(); 58 - iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); 59 - } 60 28 61 29 /* 62 30 * r8a7740 chip has lasting errata on MERAM buffer. ··· 78 110 { 79 111 r8a7740_meram_workaround(); 80 112 81 - #ifdef CONFIG_CACHE_L2X0 82 - /* Shared attribute override enable, 32K*8way */ 83 - l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff); 84 - #endif 85 113 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 86 114 } 87 115 ··· 87 123 }; 88 124 89 125 DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)") 90 - .map_io = r8a7740_map_io, 126 + .l2c_aux_val = 0, 127 + .l2c_aux_mask = ~0, 91 128 .init_early = shmobile_init_delay, 92 129 .init_irq = r8a7740_init_irq_of, 93 130 .init_machine = r8a7740_generic_init,
+2
arch/arm/mach-shmobile/smp-emev2.c
··· 21 21 #include <linux/delay.h> 22 22 #include <asm/smp_plat.h> 23 23 #include <asm/smp_scu.h> 24 + 24 25 #include "common.h" 26 + #include "emev2.h" 25 27 26 28 #define EMEV2_SCU_BASE 0x1e000000 27 29 #define EMEV2_SMU_BASE 0xe0110000