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

Merge tag 'arm-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC updates from Arnd Bergmann:
"These are updates for SoC specific code, mostly in the 32-bit
architecture:

- A rework for handling MMIO accesses in Renesas SoCs in a more
portable way

- Updates to SoC version detection in NXP i.MX SoCs.

- Smaller bug fixes for OMAP, Samsung, Marvell, Amlogic"

* tag 'arm-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits)
arm64: Kconfig: meson: drop pinctrl
ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs
MAINTAINERS: switch mvebu tree to kernel.org
MAINTAINERS: Add an entry for MikroTik CRS3xx 98DX3236 boards
ARM: shmobile: Stop using __raw_*() I/O accessors
ARM: shmobile: sh73a0: Remove obsolete static mapping
ARM: shmobile: sh73a0: Use ioremap() to map SMP registers
ARM: shmobile: sh73a0: Use ioremap() to map L2C registers
ARM: shmobile: r8a7779: Remove obsolete static mappings
ARM: shmobile: r8a7779: Use ioremap() to map SMP registers
ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers
ARM: shmobile: r8a7778: Introduce HPBREG_BASE
ARM: OMAP1: clock: Use IS_ERR_OR_NULL() to clean code
ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
ARM: OMAP2+: Remove redundant assignment to variable ret
ARM: OMAP2+: Fix kfree NULL pointer in omap2xxx_clkt_vps_init
ARM: OMAP2+: Fix memleak in omap2xxx_clkt_vps_init
ARM: exynos: extend cpuidle support to P4 Note boards
ARM: imx: mach-imx6q: correctly identify i.MX6QP SoCs
ARM: imx: imx7ulp: Add a comment explaining the B2 silicon version
...

+125 -108
+13 -2
MAINTAINERS
··· 2026 2026 M: Gregory Clement <gregory.clement@bootlin.com> 2027 2027 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2028 2028 S: Maintained 2029 - T: git git://git.infradead.org/linux-mvebu.git 2029 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git 2030 2030 F: Documentation/devicetree/bindings/soc/dove/ 2031 2031 F: arch/arm/boot/dts/dove* 2032 2032 F: arch/arm/boot/dts/orion5x* ··· 2042 2042 M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 2043 2043 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2044 2044 S: Maintained 2045 - T: git git://git.infradead.org/linux-mvebu.git 2045 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git 2046 2046 F: arch/arm/boot/dts/armada* 2047 2047 F: arch/arm/boot/dts/kirkwood* 2048 2048 F: arch/arm/configs/mvebu_*_defconfig ··· 11779 11779 M: Oliver Neukum <oliver@neukum.org> 11780 11780 S: Maintained 11781 11781 F: drivers/usb/image/microtek.* 11782 + 11783 + MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT 11784 + M: Luka Kovacic <luka.kovacic@sartura.hr> 11785 + M: Luka Perkov <luka.perkov@sartura.hr> 11786 + S: Maintained 11787 + F: arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dts 11788 + F: arch/arm/boot/dts/armada-xp-crs305-1g-4s.dts 11789 + F: arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dts 11790 + F: arch/arm/boot/dts/armada-xp-crs326-24g-2s.dts 11791 + F: arch/arm/boot/dts/armada-xp-crs328-4c-20s-4s-bit.dts 11792 + F: arch/arm/boot/dts/armada-xp-crs328-4c-20s-4s.dts 11782 11793 11783 11794 MIPI CCS, SMIA AND SMIA++ IMAGE SENSOR DRIVER 11784 11795 M: Sakari Ailus <sakari.ailus@linux.intel.com>
+4 -3
arch/arm/mach-exynos/exynos.c
··· 177 177 if (of_machine_is_compatible("samsung,exynos4210") || 178 178 (of_machine_is_compatible("samsung,exynos4412") && 179 179 (of_machine_is_compatible("samsung,trats2") || 180 - of_machine_is_compatible("samsung,midas"))) || 180 + of_machine_is_compatible("samsung,midas") || 181 + of_machine_is_compatible("samsung,p4note"))) || 181 182 of_machine_is_compatible("samsung,exynos3250") || 182 183 of_machine_is_compatible("samsung,exynos5250")) 183 184 platform_device_register(&exynos_cpuidle); ··· 207 206 } 208 207 209 208 DT_MACHINE_START(EXYNOS_DT, "Samsung Exynos (Flattened Device Tree)") 210 - .l2c_aux_val = 0x38400000, 211 - .l2c_aux_mask = 0xc60fffff, 209 + .l2c_aux_val = 0x08400000, 210 + .l2c_aux_mask = 0xf60fffff, 212 211 .smp = smp_ops(exynos_smp_ops), 213 212 .map_io = exynos_init_io, 214 213 .init_early = exynos_firmware_init,
+1 -1
arch/arm/mach-exynos/platsmp.c
··· 215 215 unsigned int timeout = 16; 216 216 u32 val; 217 217 218 - if (!of_machine_is_compatible("samsung,exynos3250")) 218 + if (!soc_is_exynos3250()) 219 219 return; 220 220 221 221 while (timeout && !pmu_raw_readl(S5P_PMU_SPARE2)) {
+7 -2
arch/arm/mach-imx/mach-imx6q.c
··· 245 245 246 246 static void __init imx6q_init_machine(void) 247 247 { 248 - if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_2_0) 249 - imx_print_silicon_rev("i.MX6QP", IMX_CHIP_REVISION_1_0); 248 + if (cpu_is_imx6q() && imx_get_soc_revision() >= IMX_CHIP_REVISION_2_0) 249 + /* 250 + * SoCs that identify as i.MX6Q >= rev 2.0 are really i.MX6QP. 251 + * Quirk: i.MX6QP revision = i.MX6Q revision - (1, 0), 252 + * e.g. i.MX6QP rev 1.1 identifies as i.MX6Q rev 2.1. 253 + */ 254 + imx_print_silicon_rev("i.MX6QP", imx_get_soc_revision() - 0x10); 250 255 else 251 256 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", 252 257 imx_get_soc_revision());
+4
arch/arm/mach-imx/mach-imx7ulp.c
··· 37 37 * bit[31:28] of JTAG_ID register defines revision as below from B0: 38 38 * 0001 B0 39 39 * 0010 B1 40 + * 0011 B2 40 41 */ 41 42 switch (revision >> 28) { 42 43 case 1: ··· 45 44 break; 46 45 case 2: 47 46 imx_set_soc_revision(IMX_CHIP_REVISION_2_1); 47 + break; 48 + case 3: 49 + imx_set_soc_revision(IMX_CHIP_REVISION_2_2); 48 50 break; 49 51 default: 50 52 imx_set_soc_revision(IMX_CHIP_REVISION_1_0);
+19
arch/arm/mach-mxs/mach-mxs.c
··· 22 22 #include <asm/mach/arch.h> 23 23 #include <asm/mach/map.h> 24 24 #include <asm/mach/time.h> 25 + #include <asm/system_info.h> 25 26 #include <asm/system_misc.h> 26 27 27 28 #include "pm.h" ··· 51 50 #define MXS_SET_ADDR 0x4 52 51 #define MXS_CLR_ADDR 0x8 53 52 #define MXS_TOG_ADDR 0xc 53 + 54 + #define HW_OCOTP_OPS2 19 /* offset 0x150 */ 55 + #define HW_OCOTP_OPS3 20 /* offset 0x160 */ 54 56 55 57 static u32 chipid; 56 58 static u32 socid; ··· 383 379 struct device *parent; 384 380 struct soc_device *soc_dev; 385 381 struct soc_device_attribute *soc_dev_attr; 382 + u64 soc_uid = 0; 383 + const u32 *ocotp = mxs_get_ocotp(); 386 384 int ret; 387 385 388 386 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); ··· 400 394 soc_dev_attr->soc_id = mxs_get_soc_id(); 401 395 soc_dev_attr->revision = mxs_get_revision(); 402 396 397 + if (socid == HW_DIGCTL_CHIPID_MX23) { 398 + soc_uid = system_serial_low = ocotp[HW_OCOTP_OPS3]; 399 + } else if (socid == HW_DIGCTL_CHIPID_MX28) { 400 + soc_uid = system_serial_high = ocotp[HW_OCOTP_OPS2]; 401 + soc_uid <<= 32; 402 + system_serial_low = ocotp[HW_OCOTP_OPS3]; 403 + soc_uid |= system_serial_low; 404 + } 405 + 406 + if (soc_uid) 407 + soc_dev_attr->serial_number = kasprintf(GFP_KERNEL, "%016llX", soc_uid); 408 + 403 409 soc_dev = soc_device_register(soc_dev_attr); 404 410 if (IS_ERR(soc_dev)) { 411 + kfree(soc_dev_attr->serial_number); 405 412 kfree(soc_dev_attr->revision); 406 413 kfree(soc_dev_attr); 407 414 return;
+7 -7
arch/arm/mach-omap1/clock.c
··· 612 612 unsigned long flags; 613 613 int ret; 614 614 615 - if (clk == NULL || IS_ERR(clk)) 615 + if (IS_ERR_OR_NULL(clk)) 616 616 return -EINVAL; 617 617 618 618 spin_lock_irqsave(&clockfw_lock, flags); ··· 627 627 { 628 628 unsigned long flags; 629 629 630 - if (clk == NULL || IS_ERR(clk)) 630 + if (IS_ERR_OR_NULL(clk)) 631 631 return; 632 632 633 633 spin_lock_irqsave(&clockfw_lock, flags); ··· 650 650 unsigned long flags; 651 651 unsigned long ret; 652 652 653 - if (clk == NULL || IS_ERR(clk)) 653 + if (IS_ERR_OR_NULL(clk)) 654 654 return 0; 655 655 656 656 spin_lock_irqsave(&clockfw_lock, flags); ··· 670 670 unsigned long flags; 671 671 long ret; 672 672 673 - if (clk == NULL || IS_ERR(clk)) 673 + if (IS_ERR_OR_NULL(clk)) 674 674 return 0; 675 675 676 676 spin_lock_irqsave(&clockfw_lock, flags); ··· 686 686 unsigned long flags; 687 687 int ret = -EINVAL; 688 688 689 - if (clk == NULL || IS_ERR(clk)) 689 + if (IS_ERR_OR_NULL(clk)) 690 690 return ret; 691 691 692 692 spin_lock_irqsave(&clockfw_lock, flags); ··· 791 791 792 792 int clk_register(struct clk *clk) 793 793 { 794 - if (clk == NULL || IS_ERR(clk)) 794 + if (IS_ERR_OR_NULL(clk)) 795 795 return -EINVAL; 796 796 797 797 /* ··· 817 817 818 818 void clk_unregister(struct clk *clk) 819 819 { 820 - if (clk == NULL || IS_ERR(clk)) 820 + if (IS_ERR_OR_NULL(clk)) 821 821 return; 822 822 823 823 mutex_lock(&clocks_mutex);
+7 -4
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
··· 235 235 236 236 hw = kzalloc(sizeof(*hw), GFP_KERNEL); 237 237 if (!hw) 238 - goto cleanup; 238 + return; 239 239 init.name = "virt_prcm_set"; 240 240 init.ops = &virt_prcm_set_ops; 241 241 init.parent_names = &parent_name; ··· 244 244 hw->hw.init = &init; 245 245 246 246 clk = clk_register(NULL, &hw->hw); 247 + if (IS_ERR(clk)) { 248 + printk(KERN_ERR "Failed to register clock\n"); 249 + kfree(hw); 250 + return; 251 + } 252 + 247 253 clkdev_create(clk, "cpufreq_ck", NULL); 248 - return; 249 - cleanup: 250 - kfree(hw); 251 254 } 252 255 #endif
+2 -4
arch/arm/mach-omap2/display.c
··· 385 385 } 386 386 387 387 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 388 - if (oc->_clk) 389 - clk_prepare_enable(oc->_clk); 388 + clk_prepare_enable(oc->_clk); 390 389 391 390 dispc_disable_outputs(); 392 391 ··· 411 412 pr_debug("dss_core: softreset done\n"); 412 413 413 414 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 414 - if (oc->_clk) 415 - clk_disable_unprepare(oc->_clk); 415 + clk_disable_unprepare(oc->_clk); 416 416 417 417 r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; 418 418
+2 -3
arch/arm/mach-omap2/omap_device.c
··· 334 334 struct omap_hwmod **hwmods; 335 335 336 336 od = kzalloc(sizeof(struct omap_device), GFP_KERNEL); 337 - if (!od) { 338 - ret = -ENOMEM; 337 + if (!od) 339 338 goto oda_exit1; 340 - } 339 + 341 340 od->hwmods_cnt = oh_cnt; 342 341 343 342 hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
+1 -1
arch/arm/mach-shmobile/platsmp-scu.c
··· 64 64 { 65 65 unsigned long mask = SCU_PM_POWEROFF << (cpu * 8); 66 66 67 - if ((__raw_readl(shmobile_scu_base + 8) & mask) == mask) 67 + if ((readl(shmobile_scu_base + 8) & mask) == mask) 68 68 return 1; 69 69 70 70 return 0;
+7 -5
arch/arm/mach-shmobile/setup-r8a7778.c
··· 14 14 15 15 #include "common.h" 16 16 17 + #define HPBREG_BASE 0xfe700000 18 + 17 19 #define INT2SMSKCR0 0x82288 /* 0xfe782288 */ 18 20 #define INT2SMSKCR1 0x8228c /* 0xfe78228c */ 19 21 ··· 24 22 25 23 static void __init r8a7778_init_irq_dt(void) 26 24 { 27 - void __iomem *base = ioremap(0xfe700000, 0x00100000); 25 + void __iomem *base = ioremap(HPBREG_BASE, 0x00100000); 28 26 29 27 BUG_ON(!base); 30 28 31 29 irqchip_init(); 32 30 33 31 /* route all interrupts to ARM */ 34 - __raw_writel(0x73ffffff, base + INT2NTSR0); 35 - __raw_writel(0xffffffff, base + INT2NTSR1); 32 + writel(0x73ffffff, base + INT2NTSR0); 33 + writel(0xffffffff, base + INT2NTSR1); 36 34 37 35 /* unmask all known interrupts in INTCS2 */ 38 - __raw_writel(0x08330773, base + INT2SMSKCR0); 39 - __raw_writel(0x00311110, base + INT2SMSKCR1); 36 + writel(0x08330773, base + INT2SMSKCR0); 37 + writel(0x00311110, base + INT2SMSKCR1); 40 38 41 39 iounmap(base); 42 40 }
+19 -37
arch/arm/mach-shmobile/setup-r8a7779.c
··· 15 15 #include "common.h" 16 16 #include "r8a7779.h" 17 17 18 - static struct map_desc r8a7779_io_desc[] __initdata = { 19 - /* 2M identity mapping for 0xf0000000 (MPCORE) */ 20 - { 21 - .virtual = 0xf0000000, 22 - .pfn = __phys_to_pfn(0xf0000000), 23 - .length = SZ_2M, 24 - .type = MT_DEVICE_NONSHARED 25 - }, 26 - /* 16M identity mapping for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ 27 - { 28 - .virtual = 0xfe000000, 29 - .pfn = __phys_to_pfn(0xfe000000), 30 - .length = SZ_16M, 31 - .type = MT_DEVICE_NONSHARED 32 - }, 33 - }; 34 - 35 - static void __init r8a7779_map_io(void) 36 - { 37 - debug_ll_io_init(); 38 - iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); 39 - } 18 + #define HPBREG_BASE 0xfe700000 40 19 41 20 /* IRQ */ 42 - #define INT2SMSKCR0 IOMEM(0xfe7822a0) 43 - #define INT2SMSKCR1 IOMEM(0xfe7822a4) 44 - #define INT2SMSKCR2 IOMEM(0xfe7822a8) 45 - #define INT2SMSKCR3 IOMEM(0xfe7822ac) 46 - #define INT2SMSKCR4 IOMEM(0xfe7822b0) 21 + #define INT2SMSKCR0 0x822a0 /* Interrupt Submask Clear Register 0 */ 22 + #define INT2SMSKCR1 0x822a4 /* Interrupt Submask Clear Register 1 */ 23 + #define INT2SMSKCR2 0x822a8 /* Interrupt Submask Clear Register 2 */ 24 + #define INT2SMSKCR3 0x822ac /* Interrupt Submask Clear Register 3 */ 25 + #define INT2SMSKCR4 0x822b0 /* Interrupt Submask Clear Register 4 */ 47 26 48 - #define INT2NTSR0 IOMEM(0xfe700060) 49 - #define INT2NTSR1 IOMEM(0xfe700064) 27 + #define INT2NTSR0 0x00060 /* Interrupt Notification Select Register 0 */ 28 + #define INT2NTSR1 0x00064 /* Interrupt Notification Select Register 1 */ 50 29 51 30 static void __init r8a7779_init_irq_dt(void) 52 31 { 32 + void __iomem *base = ioremap(HPBREG_BASE, 0x00100000); 33 + 53 34 irqchip_init(); 54 35 55 36 /* route all interrupts to ARM */ 56 - __raw_writel(0xffffffff, INT2NTSR0); 57 - __raw_writel(0x3fffffff, INT2NTSR1); 37 + writel(0xffffffff, base + INT2NTSR0); 38 + writel(0x3fffffff, base + INT2NTSR1); 58 39 59 40 /* unmask all known interrupts in INTCS2 */ 60 - __raw_writel(0xfffffff0, INT2SMSKCR0); 61 - __raw_writel(0xfff7ffff, INT2SMSKCR1); 62 - __raw_writel(0xfffbffdf, INT2SMSKCR2); 63 - __raw_writel(0xbffffffc, INT2SMSKCR3); 64 - __raw_writel(0x003fee3f, INT2SMSKCR4); 41 + writel(0xfffffff0, base + INT2SMSKCR0); 42 + writel(0xfff7ffff, base + INT2SMSKCR1); 43 + writel(0xfffbffdf, base + INT2SMSKCR2); 44 + writel(0xbffffffc, base + INT2SMSKCR3); 45 + writel(0x003fee3f, base + INT2SMSKCR4); 46 + 47 + iounmap(base); 65 48 } 66 49 67 50 static const char *const r8a7779_compat_dt[] __initconst = { ··· 54 71 55 72 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") 56 73 .smp = smp_ops(r8a7779_smp_ops), 57 - .map_io = r8a7779_map_io, 58 74 .init_irq = r8a7779_init_irq_dt, 59 75 .init_late = shmobile_init_late, 60 76 .dt_compat = r8a7779_compat_dt,
+1 -20
arch/arm/mach-shmobile/setup-sh73a0.c
··· 22 22 #include "common.h" 23 23 #include "sh73a0.h" 24 24 25 - static struct map_desc sh73a0_io_desc[] __initdata = { 26 - /* create a 1:1 identity mapping for 0xe6xxxxxx 27 - * used by CPGA, INTC and PFC. 28 - */ 29 - { 30 - .virtual = 0xe6000000, 31 - .pfn = __phys_to_pfn(0xe6000000), 32 - .length = 256 << 20, 33 - .type = MT_DEVICE_NONSHARED 34 - }, 35 - }; 36 - 37 - static void __init sh73a0_map_io(void) 38 - { 39 - debug_ll_io_init(); 40 - iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); 41 - } 42 - 43 25 static void __init sh73a0_generic_init(void) 44 26 { 45 27 #ifdef CONFIG_CACHE_L2X0 46 28 /* Shared attribute override enable, 64K*8way */ 47 - l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff); 29 + l2x0_init(ioremap(0xf0100000, PAGE_SIZE), 0x00400000, 0xc20f0fff); 48 30 #endif 49 31 } 50 32 ··· 37 55 38 56 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") 39 57 .smp = smp_ops(sh73a0_smp_ops), 40 - .map_io = sh73a0_map_io, 41 58 .init_machine = sh73a0_generic_init, 42 59 .init_late = shmobile_init_late, 43 60 .dt_compat = sh73a0_boards_compat_dt,
+9 -3
arch/arm/mach-shmobile/smp-r8a7779.c
··· 20 20 #include "common.h" 21 21 #include "r8a7779.h" 22 22 23 - #define AVECR IOMEM(0xfe700040) 24 - #define R8A7779_SCU_BASE 0xf0000000 23 + #define HPBREG_BASE 0xfe700000 24 + #define AVECR 0x0040 /* ARM Reset Vector Address Register */ 25 + 26 + #define R8A7779_SCU_BASE 0xf0000000 25 27 26 28 static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle) 27 29 { ··· 38 36 39 37 static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) 40 38 { 39 + void __iomem *base = ioremap(HPBREG_BASE, 0x1000); 40 + 41 41 /* Map the reset vector (in headsmp-scu.S, headsmp.S) */ 42 - __raw_writel(__pa(shmobile_boot_vector), AVECR); 42 + writel(__pa(shmobile_boot_vector), base + AVECR); 43 43 44 44 /* setup r8a7779 specific SCU bits */ 45 45 shmobile_smp_scu_prepare_cpus(R8A7779_SCU_BASE, max_cpus); 46 + 47 + iounmap(base); 46 48 } 47 49 48 50 #ifdef CONFIG_HOTPLUG_CPU
+22 -11
arch/arm/mach-shmobile/smp-sh73a0.c
··· 16 16 #include "common.h" 17 17 #include "sh73a0.h" 18 18 19 - #define WUPCR IOMEM(0xe6151010) 20 - #define SRESCR IOMEM(0xe6151018) 21 - #define PSTR IOMEM(0xe6151040) 22 - #define SBAR IOMEM(0xe6180020) 23 - #define APARMBAREA IOMEM(0xe6f10020) 19 + #define CPG_BASE2 0xe6151000 20 + #define WUPCR 0x10 /* System-CPU Wake Up Control Register */ 21 + #define SRESCR 0x18 /* System-CPU Software Reset Control Register */ 22 + #define PSTR 0x40 /* System-CPU Power Status Register */ 23 + 24 + #define SYSC_BASE 0xe6180000 25 + #define SBAR 0x20 /* SYS Boot Address Register */ 26 + 27 + #define AP_BASE 0xe6f10000 28 + #define APARMBAREA 0x20 /* Address Translation Area Register */ 24 29 25 30 #define SH73A0_SCU_BASE 0xf0000000 26 31 27 32 static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle) 28 33 { 29 34 unsigned int lcpu = cpu_logical_map(cpu); 35 + void __iomem *cpg2 = ioremap(CPG_BASE2, PAGE_SIZE); 30 36 31 - if (((__raw_readl(PSTR) >> (4 * lcpu)) & 3) == 3) 32 - __raw_writel(1 << lcpu, WUPCR); /* wake up */ 37 + if (((readl(cpg2 + PSTR) >> (4 * lcpu)) & 3) == 3) 38 + writel(1 << lcpu, cpg2 + WUPCR); /* wake up */ 33 39 else 34 - __raw_writel(1 << lcpu, SRESCR); /* reset */ 35 - 40 + writel(1 << lcpu, cpg2 + SRESCR); /* reset */ 41 + iounmap(cpg2); 36 42 return 0; 37 43 } 38 44 39 45 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) 40 46 { 47 + void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE); 48 + void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE); 49 + 41 50 /* Map the reset vector (in headsmp.S) */ 42 - __raw_writel(0, APARMBAREA); /* 4k */ 43 - __raw_writel(__pa(shmobile_boot_vector), SBAR); 51 + writel(0, ap + APARMBAREA); /* 4k */ 52 + writel(__pa(shmobile_boot_vector), sysc + SBAR); 53 + iounmap(sysc); 54 + iounmap(ap); 44 55 45 56 /* setup sh73a0 specific SCU bits */ 46 57 shmobile_smp_scu_prepare_cpus(SH73A0_SCU_BASE, max_cpus);
-5
arch/arm64/Kconfig.platforms
··· 152 152 153 153 config ARCH_MESON 154 154 bool "Amlogic Platforms" 155 - select PINCTRL 156 - select PINCTRL_MESON 157 - select COMMON_CLK_GXBB 158 - select COMMON_CLK_AXG 159 - select COMMON_CLK_G12A 160 155 select MESON_IRQ_GPIO 161 156 help 162 157 This enables support for the arm64 based Amlogic SoCs