01 Aug, 2016

1 commit

  • Pull MMC updates from Ulf Hansson:
    "MMC core:
    - A couple of changes to improve the support for erase/discard/trim cmds
    - Add eMMC HS400 enhanced strobe support
    - Show OCR and DSR registers in SYSFS for MMC/SD cards
    - Correct and improve busy detection logic for MMC switch (CMD6) cmds
    - Disable HPI cmds for certain broken Hynix eMMC cards
    - Allow MMC hosts to specify non-support for SD and MMC cmds
    - Some minor additional fixes

    MMC host:
    - sdhci: Re-works, fixes and clean-ups
    - sdhci: Add HW auto re-tuning support
    - sdhci: Re-factor code to prepare for adding support for eMMC CMDQ
    - sdhci-esdhc-imx: Fixes and clean-ups
    - sdhci-esdhc-imx: Update system PM support
    - sdhci-esdhc-imx: Enable HW auto re-tuning
    - sdhci-bcm2835: Remove driver as sdhci-iproc is used instead
    - sdhci-brcmstb: Add new driver for Broadcom BRCMSTB SoCs
    - sdhci-msm: Add support for UHS cards
    - sdhci-tegra: Improve support for UHS cards
    - sdhci-of-arasan: Update phy support for Rockchip SoCs
    - sdhci-of-arasan: Deploy enhanced strobe support
    - dw_mmc: Some fixes and clean-ups
    - dw_mmc: Enable support for erase/discard/trim cmds
    - dw_mmc: Enable CMD23 support
    - mediatek: Some fixes related to the eMMC HS400 support
    - sh_mmcif: Improve support for HW busy detection
    - rtsx_pci: Enable support for erase/discard/trim cmds"

    * tag 'mmc-v4.8' of git://git.linaro.org/people/ulf.hansson/mmc: (135 commits)
    mmc: rtsx_pci: Remove deprecated create_singlethread_workqueue
    mmc: rtsx_pci: Enable MMC_CAP_ERASE to allow erase/discard/trim requests
    mmc: rtsx_pci: Use the provided busy timeout from the mmc core
    mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS
    mmc: sdhci-pltfm: Convert to use the SET_SYSTEM_SLEEP_PM_OPS
    mmc: sdhci-pltfm: Make sdhci_pltfm_suspend|resume() static
    mmc: sdhci-esdhc-imx: Use common sdhci_suspend|resume_host()
    mmc: sdhci-esdhc-imx: Assign system PM ops within #ifdef CONFIG_PM_SLEEP
    mmc: sdhci-sirf: Remove non needed #ifdef CONFIG_PM* for dev_pm_ops
    mmc: sdhci-s3c: Remove non needed #ifdef CONFIG_PM for dev_pm_ops
    mmc: sdhci-pxav3: Remove non needed #ifdef CONFIG_PM for dev_pm_ops
    mmc: sdhci-of-esdhc: Simplify code by using SIMPLE_DEV_PM_OPS
    mmc: sdhci-acpi: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS
    mmc: sdhci-pci-core: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS
    mmc: Change the max discard sectors and erase response when HW busy detect
    phy: rockchip-emmc: Wait even longer for the DLL to lock
    phy: rockchip-emmc: Be tolerant to card clock of 0 in power on
    mmc: sdhci-of-arasan: Revert: Always power the PHY off/on when clock changes
    mmc: sdhci-msm: Add support for UHS cards
    mmc: sdhci-msm: Add set_uhs_signaling() implementation
    ...

    Linus Torvalds
     

28 Jul, 2016

1 commit

  • Pull networking updates from David Miller:

    1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

    2) Make DSA binding more sane, from Andrew Lunn.

    3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

    4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

    5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface. From Brenden Blanco and
    others.

    6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

    7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

    8) Simplify netlink conntrack entry layout, from Florian Westphal.

    9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

    10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

    11) Support qdisc packet injection in pktgen, from John Fastabend.

    12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

    13) Add NV congestion control support to TCP, from Lawrence Brakmo.

    14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

    15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

    16) Support MPLS over IPV4, from Simon Horman.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
    xgene: Fix build warning with ACPI disabled.
    be2net: perform temperature query in adapter regardless of its interface state
    l2tp: Correctly return -EBADF from pppol2tp_getname.
    net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
    net: ipmr/ip6mr: update lastuse on entry change
    macsec: ensure rx_sa is set when validation is disabled
    tipc: dump monitor attributes
    tipc: add a function to get the bearer name
    tipc: get monitor threshold for the cluster
    tipc: make cluster size threshold for monitoring configurable
    tipc: introduce constants for tipc address validation
    net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
    MAINTAINERS: xgene: Add driver and documentation path
    Documentation: dtb: xgene: Add MDIO node
    dtb: xgene: Add MDIO node
    drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
    drivers: net: xgene: Use exported functions
    drivers: net: xgene: Enable MDIO driver
    drivers: net: xgene: Add backward compatibility
    drivers: net: phy: xgene: Add MDIO driver
    ...

    Linus Torvalds
     

27 Jul, 2016

1 commit

  • Pull libata updates from Tejun Heo:
    "libata saw quite a bit of activities in this cycle:

    - SMR drive support still being worked on

    - bug fixes and improvements to misc SCSI command emulation

    - some low level driver updates"

    * 'for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (39 commits)
    libata-scsi: better style in ata_msense_*()
    AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
    ata: sata_dwc_460ex: remove redundant dev_err call
    ata: define ATA_PROT_* in terms of ATA_PROT_FLAG_*
    libata: remove ATA_PROT_FLAG_DATA
    libata: remove ata_is_nodata
    ata: make lba_{28,48}_ok() use ATA_MAX_SECTORS{,_LBA48}
    libata-scsi: minor cleanup for ata_scsi_zbc_out_xlat
    libata-scsi: Fix ZBC management out command translation
    libata-scsi: Fix translation of REPORT ZONES command
    ata: Handle ATA NCQ NO-DATA commands correctly
    libata-eh: decode all taskfile protocols
    ata: fixup ATA_PROT_NODATA
    libsas: use ata_is_ncq() and ata_has_dma() accessors
    libata: use ata_is_ncq() accessors
    libata: return boolean values from ata_is_*
    libata-scsi: avoid repeated calculation of number of TRIM ranges
    libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit
    libata-scsi: rename ata_msense_ctl_mode() to ata_msense_control()
    libata-scsi: fix D_SENSE bit relection in control mode page
    ...

    Linus Torvalds
     

25 Jul, 2016

9 commits

  • Two times out of 2000 reboots I ran into the error message
    "rockchip_emmc_phy_power: dllrdy timeout". Presumably there is some
    corner case where the DLL just takes a little longer to timeout. Let's
    give it even more time to handle these corner cases.

    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • It's possible that there are some reasons to turn the PHY on while the
    clock is 0. In this case we just won't wait for the DLL to lock.

    This is a bit of a stopgap until we figure out exactly when we're
    supposed to wait for the DLL to lock and when we're supposed to power
    cycle the PHY.

    Note: this patch should help with suspend/resume where the system will
    try to turn the PHY back on when the clock is 0.

    Signed-off-by: Douglas Anderson
    Reviewed-by: Kishon Vijay Abraham I
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • The "phyctrl_frqsel" is described in the Arasan datasheet [1] as "the
    frequency range of DLL operation". Although the Rockchip variant of
    this PHY has different ranges than the reference Arasan PHY it appears
    as if the functionality is similar. We should set this phyctrl field
    properly.

    Note: as per Rockchip engineers, apparently the "phyctrl_frqsel" is
    actually only useful in HS200 / HS400 modes even though the DLL itself
    it used for some purposes in all modes. See the discussion in the
    earlier change in this series: ("mmc: sdhci-of-arasan: Always power the
    PHY off/on when clock changes"). In any case, it shouldn't hurt to set
    this always.

    Note that this change should allow boards to run at HS200 / HS400 speed
    modes while running at 100 MHz or 150 MHz. In fact, running HS400 at
    150 MHz (giving 300 MB/s) is the main motivation of this series, since
    performance is still good but signal integrity problems are less
    prevelant at 150 MHz.

    [1]: https://arasan.com/wp-content/media/eMMC-5-1-Total-Solution_Rev-1-3.pdf

    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • There's no reason to store the return value of rockchip_emmc_phy_power()
    in a variable nor to check it. Just return it.

    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Reviewed-by: Shawn Lin
    Tested-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • Previous PHY code waited a fixed amount of time for the DLL to lock at
    power on time. Unfortunately, the time for the DLL to lock is actually
    a bit more dynamic and can be longer if the card clock is slower.

    Instead of waiting a fixed 30 us, let's now dynamically wait until the
    lock bit gets set. We'll wait up to 10 ms which should be OK even if
    the card clock is at the super slow 100 kHz.

    On its own, this change makes the PHY power on code a little more
    robust. Before this change the PHY was relying on the eMMC code to make
    sure the PHY was only powered on when the card clock was set to at least
    50 MHz before, though this reliance wasn't documented anywhere.

    This change will be even more useful in future changes where we actually
    need to be able to wait for a DLL lock at slower clock speeds.

    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Reviewed-by: Shawn Lin
    Tested-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • Some of the spacing was wrong (spaces instead of tabs), and due to
    longer entries added later, the columns weren't aligned. Let's get
    everything consistent.

    Signed-off-by: Brian Norris
    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Brian Norris
     
  • The output tap delay controls helps maintain the hold requirements for
    eMMC. The exact value is dependent on the SoC and other factors, though
    it isn't really an exact science. But the default of 0 is not very good,
    as it doesn't give the eMMC much hold time, so let's bump up to 4
    (approx 90 degree phase?). If we need to configure this any further
    (e.g., based on board or speed factors), we may need to consider a
    device tree representation.

    Suggested-by: Shawn Lin
    Signed-off-by: Brian Norris
    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Tested-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Brian Norris
     
  • Signal integrity analysis has suggested we set these values. Do this in
    power_on(), so that they get reconfigured after suspend/resume.

    Signed-off-by: Shawn Lin
    Signed-off-by: Brian Norris
    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Tested-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Shawn Lin
     
  • According to the databook, 10.2us is the max time for dll to be ready to
    work. However in testing, some chips need 20us for dll to be ready. This
    patch adds some extra margin for dllrdy to be ready, fixing our
    -ETIMEDOUT issues.

    Signed-off-by: Shawn Lin
    Signed-off-by: Brian Norris
    Signed-off-by: Douglas Anderson
    Acked-by: Kishon Vijay Abraham I
    Tested-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Shawn Lin
     

14 Jul, 2016

1 commit


07 Jul, 2016

1 commit


04 Jul, 2016

11 commits

  • We want the USB fixes in here as well.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch fixes an issue that the extcon_set_cable_state_() is possible
    to cause "BUG: scheduling while atomic" because this driver calls
    extcon_set_cable_state_() in the interrupt handler and mutex_lock()
    is possible to be called by like the following call trace.
    So, this patch adds a workqueue function to resolve this issue.

    [ 9.706504] BUG: scheduling while atomic: systemd-journal/25893/0x00010303
    [ 9.714569] Modules linked in:
    [ 9.717629] CPU: 0 PID: 25893 Comm: systemd-journal Not tainted 4.7.0-rc4+ #86
    [ 9.724844] Hardware name: Renesas Salvator-X board based on r8a7795 (DT)
    [ 9.731624] Call trace:
    [ 9.734077] [] dump_backtrace+0x0/0x1a8
    [ 9.739470] [] show_stack+0x14/0x20
    [ 9.744520] [] dump_stack+0x94/0xb8
    [ 9.749568] [] __schedule_bug+0x44/0x58
    [ 9.754966] [] __schedule+0x4e4/0x598
    [ 9.760185] [] schedule+0x3c/0xa8
    [ 9.765057] [] schedule_preempt_disabled+0x20/0x38
    [ 9.771408] [] mutex_optimistic_spin+0x18c/0x1d0
    [ 9.777583] [] __mutex_lock_slowpath+0x38/0x140
    [ 9.783669] [] mutex_lock+0x44/0x60
    [ 9.788717] [] kobject_uevent_env+0x250/0x500
    [ 9.794634] [] extcon_update_state+0x220/0x298
    [ 9.800634] [] extcon_set_cable_state_+0x78/0x88
    [ 9.806812] [] rcar_gen3_device_recognition+0x5c/0xe0
    [ 9.813420] [] rcar_gen3_phy_usb2_irq+0x3c/0x48
    [ 9.819509] [] handle_irq_event_percpu+0x94/0x140
    [ 9.825769] [] handle_irq_event+0x48/0x78
    [ 9.831334] [] handle_fasteoi_irq+0xb8/0x1b0
    [ 9.837162] [] generic_handle_irq+0x24/0x38
    [ 9.842900] [] __handle_domain_irq+0x5c/0xb8
    [ 9.848727] [] gic_handle_irq+0x58/0xb0

    Reported-by: Simon Horman
    Fixes: 2b38543c8db1 ("phy: rcar-gen3-usb2: add extcon support")
    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Kishon Vijay Abraham I

    Yoshihiro Shimoda
     
  • If devm_add_action() fails we are explicitly calling the cleanup to free
    the resources allocated. Lets use the helper devm_add_action_or_reset()
    and return directly in case of error, as we know that the cleanup function
    has been already called by the helper if there was any error.

    Signed-off-by: Sudip Mukherjee
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Kishon Vijay Abraham I

    Sudip Mukherjee
     
  • The A31 companion pmic (axp221) does not generate vbus change interrupts
    when the board is driving vbus, so we must poll when using the pmic for
    vbus-det _and_ we're driving vbus.

    Signed-off-by: Hans de Goede
    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Kishon Vijay Abraham I

    Hans de Goede
     
  • kzalloc will issue its own error message including a dump_stack()
    so remote the site specific message.

    Signed-off-by: Peter Griffin
    Signed-off-by: Kishon Vijay Abraham I

    Peter Griffin
     
  • kzalloc will issue its own error message including a dump_stack()
    so remote the site specific message.

    Signed-off-by: Peter Griffin
    Signed-off-by: Kishon Vijay Abraham I

    Peter Griffin
     
  • The usb-phy is fully enclosed in the general register files (GRF).
    Therefore as seen from the device-tree it shouldn't be a separate
    platform-device but instead a sub-device of the GRF - using the
    simply-mfd mechanism.

    As the usb-phy is part of the kernel for some releases now, we keep
    the old (and now deprecated) binding for compatibility purposes.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Kishon Vijay Abraham I

    Heiko Stuebner
     
  • This is a new phy driver for the SoC USB controllers on the TI DA8xx
    family of microcontrollers. The USB 1.1 PHY is just a simple on/off.
    The USB 2.0 PHY also allows overriding the VBUS and ID pins.

    Signed-off-by: David Lechner
    Signed-off-by: Kishon Vijay Abraham I

    David Lechner
     
  • …hon/linux-phy into next

    Add new set_mode phy ops

    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

    Kishon Vijay Abraham I
     
  • The initial use for this is for PHYs that have a mode related to USB OTG.
    There are several SoCs (e.g. TI OMAP and DA8xx) that have a mode setting
    in the USB PHY to override OTG VBUS and ID signals.

    Of course, the enum can be expaned in the future to include modes for
    other types of PHYs as well.

    Suggested-by: Kishon Vijay Abraham I
    Signed-off-by: David Lechner

    David Lechner
     
  • No functional change. Rename "enum phy_mode" to
    "enum xgene_phy_mode" in xgene phy driver in
    preparation for adding set_mode callback in
    phy core.

    Signed-off-by: Kishon Vijay Abraham I
    Reviewed-by: Loc Ho

    Kishon Vijay Abraham I
     

02 Jul, 2016

2 commits

  • Pull more MFD fixes from Lee Jones:
    "Apologies for missing these from the first pull request.

    Final patches fixing Reset API change"

    * tag 'mfd-fixes-4.7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
    usb: dwc3: st: Use explicit reset_control_get_exclusive() API
    phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API
    phy: miphy28lp: Inform the reset framework that our reset line may be shared

    Linus Torvalds
     
  • Pull USB and PHY fixes from Greg KH:
    "Here are a number of small USB and PHY driver fixes for 4.7-rc6.

    Nothing major here, all are described in the shortlog below. All have
    been in linux-next with no reported issues"

    * tag 'usb-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: don't free bandwidth_mutex too early
    USB: EHCI: declare hostpc register as zero-length array
    phy-sun4i-usb: Fix irq free conditions to match request conditions
    phy: bcm-ns-usb2: checking the wrong variable
    phy-sun4i-usb: fix missing __iomem *
    phy: phy-sun4i-usb: Fix optional gpios failing probe
    phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
    phy: rcar-gen3-usb2: fix unexpected repeat interrupts of VBUS change
    usb: common: otg-fsm: add license to usb-otg-fsm

    Linus Torvalds
     

01 Jul, 2016

3 commits

  • We're making all reset line users specify whether their lines are
    shared with other IP or they operate them exclusively. In this case
    the line is exclusively used only by this IP, so use the *_exclusive()
    API accordingly.

    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Lee Jones

    Lee Jones
     
  • On the STiH410 B2120 development board the MiPHY28lp shares its reset
    line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
    (DRD). New functionality in the reset subsystems forces consumers to
    be explicit when requesting shared/exclusive reset lines.

    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Lee Jones

    Lee Jones
     
  • Pull MFD fixes from Lee Jones:
    "Contained are some standard fixes and unusually an extension to the
    Reset API. Some of those changes are required to fix a bug introduced
    in -rc1, which introduces extra 'reset line checks' i.e. whether the
    line is shared or not. If a line is shared and the new *_shared() API
    is not used, the request fails with an error. This breaks USB in v4.7
    for ST's platforms.

    Admittedly, there are some patches contained in our (MFD/Reset)
    immutable branch which are not true -fixes, but there isn't anything I
    can do about that. Rest assured though, there aren't any API
    'changes'. Everything is the same from the consumer's perspective.

    - Use new reset_*_get_shared() variant to prevent reset line
    obtainment failure (Fixes commit 0b52297f2288: "reset: Add support
    for shared reset controls")

    - Fix unintentional switch() fall-through into error path

    - Fix uninitialised variable compiler warning"

    * tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
    mfd: da9053: Fix compiler warning message for uninitialised variable
    mfd: max77620: Fix FPS switch statements
    phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared
    usb: dwc3: st: Inform the reset framework that our reset line may be shared
    usb: host: ehci-st: Inform the reset framework that our reset line may be shared
    usb: host: ohci-st: Inform the reset framework that our reset line may be shared
    reset: TRIVIAL: Add line break at same place for similar APIs
    reset: Supply *_shared variant calls when using *_optional APIs
    reset: Supply *_shared variant calls when using of_* API
    reset: Ensure drivers are explicit when requesting reset lines
    reset: Reorder inline reset_control_get*() wrappers

    Linus Torvalds
     

30 Jun, 2016

2 commits


25 Jun, 2016

1 commit


22 Jun, 2016

1 commit

  • commit 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing
    probe")
    changed the condition under which irqs are requested, but omitted matching
    changes to sun4i_usb_phy_remove(). This commit fixes this.

    Fixes: 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing probe")
    Signed-off-by: Hans de Goede
    Signed-off-by: Kishon Vijay Abraham I

    Hans de Goede
     

21 Jun, 2016

1 commit

  • instead of defining all functions as static inlines,
    let's move them to udc-core and export them with
    EXPORT_SYMBOL_GPL, that way we can make sure that
    only GPL drivers will use them.

    As a side effect, it'll be nicer to add tracepoints
    to the gadget API.

    While at that, also fix Kconfig dependencies to
    avoid randconfig build failures.

    Acked-By: Sebastian Reichel
    Acked-by: Peter Chen
    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

17 Jun, 2016

5 commits

  • We intended to test "usb2->phy" here instead of "dev".

    Fixes: d3feb4067335 ('phy: bcm-ns-usb2: new driver for USB 2.0 PHY on Northstar')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Kishon Vijay Abraham I

    Dan Carpenter
     
  • Fix the missing __iomem attribute in sun4i_usb_phy_write()
    function. This fixes the following sparse warnings:

    drivers/phy/phy-sun4i-usb.c:178:39: warning: incorrect type in initializer (different address spaces)
    drivers/phy/phy-sun4i-usb.c:178:39: expected void *phyctl
    drivers/phy/phy-sun4i-usb.c:178:39: got void [noderef] *
    drivers/phy/phy-sun4i-usb.c:185:17: warning: incorrect type in argument 2 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:185:17: expected void volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:185:17: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:189:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:189:24: expected void const volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:189:24: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:196:17: warning: incorrect type in argument 2 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:196:17: expected void volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:196:17: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:199:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:199:24: expected void const volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:199:24: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:205:17: warning: incorrect type in argument 2 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:205:17: expected void volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:205:17: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:208:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:208:24: expected void const volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:208:24: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:210:17: warning: incorrect type in argument 2 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:210:17: expected void volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:210:17: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:212:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:212:24: expected void const volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:212:24: got void *phyctl
    drivers/phy/phy-sun4i-usb.c:214:17: warning: incorrect type in argument 2 (different address spaces)
    drivers/phy/phy-sun4i-usb.c:214:17: expected void volatile [noderef] *addr
    drivers/phy/phy-sun4i-usb.c:214:17: got void *phyctl

    Signed-off-by: Ben Dooks
    Acked-by: Hans de Goede
    Signed-off-by: Kishon Vijay Abraham I

    Ben Dooks
     
  • The interrupt 0 is not a valid interrupt number. In the event where the
    retrieval of the vbus-det gpio would return null, the gpiod_to_irq
    callback would return 0, while the current code makes the assumption
    that it is a valid interrupt, and would go on calling request_irq.
    Obviously, this would fail, preventing the driver from probing properly,
    while the vbus and id gpios are optional.

    Signed-off-by: Quentin Schulz
    Signed-off-by: Kishon Vijay Abraham I

    Quentin Schulz
     
  • In case of error, the function devm_kzalloc() returns NULL pointer
    not ERR_PTR(). The IS_ERR() test in the return value check should
    be replaced with NULL test.

    Signed-off-by: Wei Yongjun
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Kishon Vijay Abraham I

    Wei Yongjun
     
  • This patch fixes an issue that the driver is possible to cause
    unexpected repeat interrupts if a board condition is wrong
    (e.g. even if the ID pin is as function, a board supplies the VBUS.)

    The reason why unexpected repeat interrupts happen is:
    1) The driver changed the mode to function if it detected the ID pin
    is high and the VBUS is high.
    2) After the driver changed function mode, it disabled the "VBUS control"
    feature. Then, the VBUS signal will be low.
    3) Since the VBUS change interruption happened, the driver checked
    the ID pin and VBUS.
    4) Since VBUS was low, the driver changed the mode to host and enabled
    the "VBUS control" feature. Then the VBUS signal will be high.
    5) Since the VBUS change interruption happened, the driver did 1) above.

    So, this patch modified the condition in rcar_gen3_device_recognition()
    to check the ID pin only.

    Fixes: 1114e2d (phy: rcar-gen3-usb2: change the mode to OTG on the combined channel)
    Cc: # v4.5+
    Reported-by: Simon Horman
    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Kishon Vijay Abraham I

    Yoshihiro Shimoda