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

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

Pull ARM SoC fixes from Kevin Hilman:
"About 10 days worth of small bug fixes, and the (hopefully) final
round fixes for from arm-soc land for the -rc cycle. Nothing special
to note, but here's a brief summary of fixes by SoC type:

- OMAP:
small set of misc DT fixes; boot fix for THUMB2 kernel

- mediatek:
PMIC fixes; DT fix for model name

- exynos:
wakeup interupt fixes for 3250

- mvebu:
revert mbus patch which broke DMA masters

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage
ARM: dts: AM35xx: fix system control module clocks
arm64: dts: mt8173-evb: fix model name
ARM: exynos: Fix wake-up interrupts for Exynos3250
ARM: dts: Fix n900 dts file to work around 4.1 touchscreen regression on n900
ARM: dts: Fix dm816x to use right compatible flag for MUSB
ARM: OMAP3: Fix booting with thumb2 kernel
Revert "bus: mvebu-mbus: make sure SDRAM CS for DMA don't overlap the MBus bridge window"
bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms.
ARM: mvebu: armada-xp-linksys-mamba: Disable internal RTC
soc: mediatek: Add compile dependency to pmic-wrapper
soc: mediatek: PMIC wrap: Fix register state machine handling
soc: mediatek: PMIC wrap: Fix clock rate handling

+72 -171
+2 -2
Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
··· 32 32 touchscreen-fuzz-x = <4>; 33 33 touchscreen-fuzz-y = <7>; 34 34 touchscreen-fuzz-pressure = <2>; 35 - touchscreen-max-x = <4096>; 36 - touchscreen-max-y = <4096>; 35 + touchscreen-size-x = <4096>; 36 + touchscreen-size-y = <4096>; 37 37 touchscreen-max-pressure = <2048>; 38 38 39 39 ti,x-plate-ohms = <280>;
+19
arch/arm/boot/dts/am335x-bone-common.dtsi
··· 223 223 /include/ "tps65217.dtsi" 224 224 225 225 &tps { 226 + /* 227 + * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only 228 + * mode") at poweroff. Most BeagleBone versions do not support RTC-only 229 + * mode and risk hardware damage if this mode is entered. 230 + * 231 + * For details, see linux-omap mailing list May 2015 thread 232 + * [PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller 233 + * In particular, messages: 234 + * http://www.spinics.net/lists/linux-omap/msg118585.html 235 + * http://www.spinics.net/lists/linux-omap/msg118615.html 236 + * 237 + * You can override this later with 238 + * &tps { /delete-property/ ti,pmic-shutdown-controller; } 239 + * if you want to use RTC-only mode and made sure you are not affected 240 + * by the hardware problems. (Tip: double-check by performing a current 241 + * measurement after shutdown: it should be less than 1 mA.) 242 + */ 243 + ti,pmic-shutdown-controller; 244 + 226 245 regulators { 227 246 dcdc1_reg: regulator@0 { 228 247 regulator-name = "vdds_dpr";
+7 -7
arch/arm/boot/dts/am35xx-clocks.dtsi
··· 12 12 #clock-cells = <0>; 13 13 compatible = "ti,am35xx-gate-clock"; 14 14 clocks = <&ipss_ick>; 15 - reg = <0x059c>; 15 + reg = <0x032c>; 16 16 ti,bit-shift = <1>; 17 17 }; 18 18 ··· 20 20 #clock-cells = <0>; 21 21 compatible = "ti,gate-clock"; 22 22 clocks = <&rmii_ck>; 23 - reg = <0x059c>; 23 + reg = <0x032c>; 24 24 ti,bit-shift = <9>; 25 25 }; 26 26 ··· 28 28 #clock-cells = <0>; 29 29 compatible = "ti,am35xx-gate-clock"; 30 30 clocks = <&ipss_ick>; 31 - reg = <0x059c>; 31 + reg = <0x032c>; 32 32 ti,bit-shift = <2>; 33 33 }; 34 34 ··· 36 36 #clock-cells = <0>; 37 37 compatible = "ti,gate-clock"; 38 38 clocks = <&pclk_ck>; 39 - reg = <0x059c>; 39 + reg = <0x032c>; 40 40 ti,bit-shift = <10>; 41 41 }; 42 42 ··· 44 44 #clock-cells = <0>; 45 45 compatible = "ti,am35xx-gate-clock"; 46 46 clocks = <&ipss_ick>; 47 - reg = <0x059c>; 47 + reg = <0x032c>; 48 48 ti,bit-shift = <0>; 49 49 }; 50 50 ··· 52 52 #clock-cells = <0>; 53 53 compatible = "ti,gate-clock"; 54 54 clocks = <&sys_ck>; 55 - reg = <0x059c>; 55 + reg = <0x032c>; 56 56 ti,bit-shift = <8>; 57 57 }; 58 58 ··· 60 60 #clock-cells = <0>; 61 61 compatible = "ti,am35xx-gate-clock"; 62 62 clocks = <&sys_ck>; 63 - reg = <0x059c>; 63 + reg = <0x032c>; 64 64 ti,bit-shift = <3>; 65 65 }; 66 66 };
+5
arch/arm/boot/dts/armada-xp-linksys-mamba.dts
··· 95 95 96 96 internal-regs { 97 97 98 + rtc@10300 { 99 + /* No crystal connected to the internal RTC */ 100 + status = "disabled"; 101 + }; 102 + 98 103 /* J10: VCC, NC, RX, NC, TX, GND */ 99 104 serial@12000 { 100 105 status = "okay";
+2 -2
arch/arm/boot/dts/dm816x.dtsi
··· 382 382 ti,hwmods = "usb_otg_hs"; 383 383 384 384 usb0: usb@47401000 { 385 - compatible = "ti,musb-am33xx"; 385 + compatible = "ti,musb-dm816"; 386 386 reg = <0x47401400 0x400 387 387 0x47401000 0x200>; 388 388 reg-names = "mc", "control"; ··· 422 422 }; 423 423 424 424 usb1: usb@47401800 { 425 - compatible = "ti,musb-am33xx"; 425 + compatible = "ti,musb-dm816"; 426 426 reg = <0x47401c00 0x400 427 427 0x47401800 0x200>; 428 428 reg-names = "mc", "control";
+2 -2
arch/arm/boot/dts/omap3-n900.dts
··· 832 832 touchscreen-fuzz-x = <4>; 833 833 touchscreen-fuzz-y = <7>; 834 834 touchscreen-fuzz-pressure = <2>; 835 - touchscreen-max-x = <4096>; 836 - touchscreen-max-y = <4096>; 835 + touchscreen-size-x = <4096>; 836 + touchscreen-size-y = <4096>; 837 837 touchscreen-max-pressure = <2048>; 838 838 839 839 ti,x-plate-ohms = <280>;
+2 -2
arch/arm/mach-exynos/suspend.c
··· 87 87 static u32 exynos_irqwake_intmask = 0xffffffff; 88 88 89 89 static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { 90 - { 105, BIT(1) }, /* RTC alarm */ 91 - { 106, BIT(2) }, /* RTC tick */ 90 + { 73, BIT(1) }, /* RTC alarm */ 91 + { 74, BIT(2) }, /* RTC tick */ 92 92 { /* sentinel */ }, 93 93 }; 94 94
+2 -20
arch/arm/mach-omap2/sleep34xx.S
··· 203 203 */ 204 204 ldr r1, kernel_flush 205 205 blx r1 206 - /* 207 - * The kernel doesn't interwork: v7_flush_dcache_all in particluar will 208 - * always return in Thumb state when CONFIG_THUMB2_KERNEL is enabled. 209 - * This sequence switches back to ARM. Note that .align may insert a 210 - * nop: bx pc needs to be word-aligned in order to work. 211 - */ 212 - THUMB( .thumb ) 213 - THUMB( .align ) 214 - THUMB( bx pc ) 215 - THUMB( nop ) 216 - .arm 217 - 218 206 b omap3_do_wfi 219 - 220 - /* 221 - * Local variables 222 - */ 207 + ENDPROC(omap34xx_cpu_suspend) 223 208 omap3_do_wfi_sram_addr: 224 209 .word omap3_do_wfi_sram 225 210 kernel_flush: ··· 349 364 * =================================== 350 365 */ 351 366 ldmfd sp!, {r4 - r11, pc} @ restore regs and return 352 - 353 - /* 354 - * Local variables 355 - */ 367 + ENDPROC(omap3_do_wfi) 356 368 sdrc_power: 357 369 .word SDRC_POWER_V 358 370 cm_idlest1_core:
+2 -1
arch/arm64/boot/dts/mediatek/mt8173-evb.dts
··· 16 16 #include "mt8173.dtsi" 17 17 18 18 / { 19 - model = "mediatek,mt8173-evb"; 19 + model = "MediaTek MT8173 evaluation board"; 20 + compatible = "mediatek,mt8173-evb", "mediatek,mt8173"; 20 21 21 22 aliases { 22 23 serial0 = &uart0;
+19 -90
drivers/bus/mvebu-mbus.c
··· 58 58 #include <linux/debugfs.h> 59 59 #include <linux/log2.h> 60 60 #include <linux/syscore_ops.h> 61 - #include <linux/memblock.h> 62 61 63 62 /* 64 63 * DDR target is the same on all platforms. ··· 69 70 */ 70 71 #define WIN_CTRL_OFF 0x0000 71 72 #define WIN_CTRL_ENABLE BIT(0) 73 + /* Only on HW I/O coherency capable platforms */ 72 74 #define WIN_CTRL_SYNCBARRIER BIT(1) 73 75 #define WIN_CTRL_TGT_MASK 0xf0 74 76 #define WIN_CTRL_TGT_SHIFT 4 ··· 102 102 103 103 /* Relative to mbusbridge_base */ 104 104 #define MBUS_BRIDGE_CTRL_OFF 0x0 105 - #define MBUS_BRIDGE_SIZE_MASK 0xffff0000 106 105 #define MBUS_BRIDGE_BASE_OFF 0x4 107 - #define MBUS_BRIDGE_BASE_MASK 0xffff0000 108 106 109 107 /* Maximum number of windows, for all known platforms */ 110 108 #define MBUS_WINS_MAX 20 ··· 321 323 ctrl = ((size - 1) & WIN_CTRL_SIZE_MASK) | 322 324 (attr << WIN_CTRL_ATTR_SHIFT) | 323 325 (target << WIN_CTRL_TGT_SHIFT) | 324 - WIN_CTRL_SYNCBARRIER | 325 326 WIN_CTRL_ENABLE; 327 + if (mbus->hw_io_coherency) 328 + ctrl |= WIN_CTRL_SYNCBARRIER; 326 329 327 330 writel(base & WIN_BASE_LOW, addr + WIN_BASE_OFF); 328 331 writel(ctrl, addr + WIN_CTRL_OFF); ··· 576 577 return MVEBU_MBUS_NO_REMAP; 577 578 } 578 579 579 - /* 580 - * Use the memblock information to find the MBus bridge hole in the 581 - * physical address space. 582 - */ 583 - static void __init 584 - mvebu_mbus_find_bridge_hole(uint64_t *start, uint64_t *end) 585 - { 586 - struct memblock_region *r; 587 - uint64_t s = 0; 588 - 589 - for_each_memblock(memory, r) { 590 - /* 591 - * This part of the memory is above 4 GB, so we don't 592 - * care for the MBus bridge hole. 593 - */ 594 - if (r->base >= 0x100000000) 595 - continue; 596 - 597 - /* 598 - * The MBus bridge hole is at the end of the RAM under 599 - * the 4 GB limit. 600 - */ 601 - if (r->base + r->size > s) 602 - s = r->base + r->size; 603 - } 604 - 605 - *start = s; 606 - *end = 0x100000000; 607 - } 608 - 609 580 static void __init 610 581 mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus) 611 582 { 612 583 int i; 613 584 int cs; 614 - uint64_t mbus_bridge_base, mbus_bridge_end; 615 585 616 586 mvebu_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; 617 587 618 - mvebu_mbus_find_bridge_hole(&mbus_bridge_base, &mbus_bridge_end); 619 - 620 588 for (i = 0, cs = 0; i < 4; i++) { 621 - u64 base = readl(mbus->sdramwins_base + DDR_BASE_CS_OFF(i)); 622 - u64 size = readl(mbus->sdramwins_base + DDR_SIZE_CS_OFF(i)); 623 - u64 end; 624 - struct mbus_dram_window *w; 625 - 626 - /* Ignore entries that are not enabled */ 627 - if (!(size & DDR_SIZE_ENABLED)) 628 - continue; 589 + u32 base = readl(mbus->sdramwins_base + DDR_BASE_CS_OFF(i)); 590 + u32 size = readl(mbus->sdramwins_base + DDR_SIZE_CS_OFF(i)); 629 591 630 592 /* 631 - * Ignore entries whose base address is above 2^32, 632 - * since devices cannot DMA to such high addresses 593 + * We only take care of entries for which the chip 594 + * select is enabled, and that don't have high base 595 + * address bits set (devices can only access the first 596 + * 32 bits of the memory). 633 597 */ 634 - if (base & DDR_BASE_CS_HIGH_MASK) 635 - continue; 598 + if ((size & DDR_SIZE_ENABLED) && 599 + !(base & DDR_BASE_CS_HIGH_MASK)) { 600 + struct mbus_dram_window *w; 636 601 637 - base = base & DDR_BASE_CS_LOW_MASK; 638 - size = (size | ~DDR_SIZE_MASK) + 1; 639 - end = base + size; 640 - 641 - /* 642 - * Adjust base/size of the current CS to make sure it 643 - * doesn't overlap with the MBus bridge hole. This is 644 - * particularly important for devices that do DMA from 645 - * DRAM to a SRAM mapped in a MBus window, such as the 646 - * CESA cryptographic engine. 647 - */ 648 - 649 - /* 650 - * The CS is fully enclosed inside the MBus bridge 651 - * area, so ignore it. 652 - */ 653 - if (base >= mbus_bridge_base && end <= mbus_bridge_end) 654 - continue; 655 - 656 - /* 657 - * Beginning of CS overlaps with end of MBus, raise CS 658 - * base address, and shrink its size. 659 - */ 660 - if (base >= mbus_bridge_base && end > mbus_bridge_end) { 661 - size -= mbus_bridge_end - base; 662 - base = mbus_bridge_end; 602 + w = &mvebu_mbus_dram_info.cs[cs++]; 603 + w->cs_index = i; 604 + w->mbus_attr = 0xf & ~(1 << i); 605 + if (mbus->hw_io_coherency) 606 + w->mbus_attr |= ATTR_HW_COHERENCY; 607 + w->base = base & DDR_BASE_CS_LOW_MASK; 608 + w->size = (size | ~DDR_SIZE_MASK) + 1; 663 609 } 664 - 665 - /* 666 - * End of CS overlaps with beginning of MBus, shrink 667 - * CS size. 668 - */ 669 - if (base < mbus_bridge_base && end > mbus_bridge_base) 670 - size -= end - mbus_bridge_base; 671 - 672 - w = &mvebu_mbus_dram_info.cs[cs++]; 673 - w->cs_index = i; 674 - w->mbus_attr = 0xf & ~(1 << i); 675 - if (mbus->hw_io_coherency) 676 - w->mbus_attr |= ATTR_HW_COHERENCY; 677 - w->base = base; 678 - w->size = size; 679 610 } 680 611 mvebu_mbus_dram_info.num_cs = cs; 681 612 }
+1
drivers/soc/mediatek/Kconfig
··· 4 4 config MTK_PMIC_WRAP 5 5 tristate "MediaTek PMIC Wrapper Support" 6 6 depends on ARCH_MEDIATEK 7 + depends on RESET_CONTROLLER 7 8 select REGMAP 8 9 help 9 10 Say yes here to add support for MediaTek PMIC Wrapper found
+9 -45
drivers/soc/mediatek/mtk-pmic-wrap.c
··· 443 443 static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata) 444 444 { 445 445 int ret; 446 - u32 val; 447 - 448 - val = pwrap_readl(wrp, PWRAP_WACS2_RDATA); 449 - if (PWRAP_GET_WACS_FSM(val) == PWRAP_WACS_FSM_WFVLDCLR) 450 - pwrap_writel(wrp, 1, PWRAP_WACS2_VLDCLR); 451 446 452 447 ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle); 453 448 if (ret) ··· 457 462 static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) 458 463 { 459 464 int ret; 460 - u32 val; 461 - 462 - val = pwrap_readl(wrp, PWRAP_WACS2_RDATA); 463 - if (PWRAP_GET_WACS_FSM(val) == PWRAP_WACS_FSM_WFVLDCLR) 464 - pwrap_writel(wrp, 1, PWRAP_WACS2_VLDCLR); 465 465 466 466 ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle); 467 467 if (ret) ··· 469 479 return ret; 470 480 471 481 *rdata = PWRAP_GET_WACS_RDATA(pwrap_readl(wrp, PWRAP_WACS2_RDATA)); 482 + 483 + pwrap_writel(wrp, 1, PWRAP_WACS2_VLDCLR); 472 484 473 485 return 0; 474 486 } ··· 555 563 556 564 static int pwrap_init_reg_clock(struct pmic_wrapper *wrp) 557 565 { 558 - unsigned long rate_spi; 559 - int ck_mhz; 560 - 561 - rate_spi = clk_get_rate(wrp->clk_spi); 562 - 563 - if (rate_spi > 26000000) 564 - ck_mhz = 26; 565 - else if (rate_spi > 18000000) 566 - ck_mhz = 18; 567 - else 568 - ck_mhz = 0; 569 - 570 - switch (ck_mhz) { 571 - case 18: 572 - if (pwrap_is_mt8135(wrp)) 573 - pwrap_writel(wrp, 0xc, PWRAP_CSHEXT); 574 - pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_WRITE); 575 - pwrap_writel(wrp, 0xc, PWRAP_CSHEXT_READ); 576 - pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START); 577 - pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END); 578 - break; 579 - case 26: 580 - if (pwrap_is_mt8135(wrp)) 581 - pwrap_writel(wrp, 0x4, PWRAP_CSHEXT); 566 + if (pwrap_is_mt8135(wrp)) { 567 + pwrap_writel(wrp, 0x4, PWRAP_CSHEXT); 582 568 pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE); 583 569 pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ); 584 570 pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START); 585 571 pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END); 586 - break; 587 - case 0: 588 - if (pwrap_is_mt8135(wrp)) 589 - pwrap_writel(wrp, 0xf, PWRAP_CSHEXT); 590 - pwrap_writel(wrp, 0xf, PWRAP_CSHEXT_WRITE); 591 - pwrap_writel(wrp, 0xf, PWRAP_CSHEXT_READ); 592 - pwrap_writel(wrp, 0xf, PWRAP_CSLEXT_START); 593 - pwrap_writel(wrp, 0xf, PWRAP_CSLEXT_END); 594 - break; 595 - default: 596 - return -EINVAL; 572 + } else { 573 + pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE); 574 + pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ); 575 + pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START); 576 + pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END); 597 577 } 598 578 599 579 return 0;