]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
7 years agoserial: xuartps: Fix the error handling logic in probe().
Nava kishore Manne [Thu, 6 Apr 2017 07:59:28 +0000 (13:29 +0530)]
serial: xuartps: Fix the error handling logic in probe().

This patch reorder the error handling checks in probe()
to handle the failure conditions properly.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Fix the watchdog clock source
Shubhrajyoti Datta [Wed, 12 Apr 2017 09:25:54 +0000 (14:55 +0530)]
clk: zynqmp: Fix the watchdog clock source

Change the watchdog default clocksource to abp.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Update the phy write sequence
Shubhrajyoti Datta [Fri, 14 Apr 2017 12:01:26 +0000 (17:31 +0530)]
net: macb: Update the phy write sequence

The TRM recommends the below operation

Example: PHY Read/Write Operation
1. Check to see that no MDIO operation is in progress. Read until
gem.net_status[man_done] = 1.
2. Write data to the PHY maintenance register (gem.phy_management). This
initiates the
shift operation over MDIO.
3. Wait for completion of operation. Read until gem.net_status[man_done]
= 1.
4. Read data bits for a read operation.
The PHY register data is available in gem.phy_management
[phy_write_read_data].

Step 1 is missing fix the same.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Move to runtime_put to cut clocks
Shubhrajyoti Datta [Fri, 14 Apr 2017 12:01:25 +0000 (17:31 +0530)]
net: macb: Move to runtime_put to cut clocks

Move to the runtime_put to cut the clocks.
The ethernet interface upo and down doesnot happen
fast enough to justify autosuspend.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Convert the infinite wait loop to a timeout
Shubhrajyoti Datta [Fri, 14 Apr 2017 12:01:24 +0000 (17:31 +0530)]
net: macb: Convert the infinite wait loop to a timeout

The wait for the mdio phy is infinite. This hangs the whole system
when it fails. Convert it to timeout of 1 sec.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Enable clocks for the mdio accesses
Shubhrajyoti Datta [Fri, 14 Apr 2017 12:01:23 +0000 (17:31 +0530)]
net: macb: Enable clocks for the mdio accesses

The mdio calls can called even when the interface is down.
Enable the clocks for it.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Fix unused warning
Shubhrajyoti Datta [Fri, 14 Apr 2017 12:01:22 +0000 (17:31 +0530)]
net: macb: Fix unused warning

Fix the below warning

drivers/net/ethernet/cadence/macb.c:3700:15: warning: unused variable
\u2018bp\u2019 [-Wunused-variable]
  struct macb *bp = netdev_priv(netdev);
               ^~
drivers/net/ethernet/cadence/macb.c: In function
\u2018macb_resume\u2019:
drivers/net/ethernet/cadence/macb.c:3712:15: warning: unused variable
\u2018bp\u2019 [-Wunused-variable]
  struct macb *bp = netdev_priv(netdev);
               ^~

Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoremoteproc: zynqmp_r5: Fix unsigned <0 warning
Wendy Liang [Thu, 13 Apr 2017 16:17:20 +0000 (09:17 -0700)]
remoteproc: zynqmp_r5: Fix unsigned <0 warning

Fix sparse warning of "comparison of unsigned expression < 0
is always false".

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoremoteproc: zynqmp_r5: Allow multiple pd_ids for single mem pool
Wendy Liang [Thu, 13 Apr 2017 16:17:19 +0000 (09:17 -0700)]
remoteproc: zynqmp_r5: Allow multiple pd_ids for single mem pool

When remoteproc in lockstep mode, the TCM memories are viewed
as contiguous. And thus, there should be just a single memory
pool for the 4 TCMs. However, each TCM has its own power domain
ID.

Here is the representation of RPU lockstep TCM in device tree:
r5_tcm: tcm@ffe00000 {
compatible = "mmio-sram";
reg = <0 0xFFE00000 0x0 0x40000>;
pd-handle = <&pd_tcm_0_a
&pd_tcm_0_b
&pd_tcm_1_a
&pd_tcm_1_b>;
};

This patch is to allow a single firmware memory to have multiple
power domain ids.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Adding fix to get correct dma_ops
Michael Gill [Mon, 10 Apr 2017 18:14:39 +0000 (11:14 -0700)]
staging: apf: Adding fix to get correct dma_ops

Arm64 in 17.1 defaults to dummy-ops unless a node is created
off of a device tree note.  We instances DMA nodes dynamically,
which requires us to make the necessary calls to get the correct
dma_ops manually.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Additional formatting fixes
Michael Gill [Fri, 31 Mar 2017 18:50:34 +0000 (11:50 -0700)]
staging: apf: Additional formatting fixes

This patch consists only of a set of formatting fixes to adhere
to coding standards.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Adhere to formatting requirements
Michael Gill [Wed, 22 Mar 2017 17:44:47 +0000 (10:44 -0700)]
staging: apf: Adhere to formatting requirements

This patch resolves some style problems reported by checkpatch.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: xilinx: Fix the NULL pointer access
Shubhrajyoti Datta [Thu, 6 Apr 2017 10:42:00 +0000 (16:12 +0530)]
gpio: xilinx: Fix the NULL pointer access

Prevent the NULL pointer access in the suspend resume.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoxilinx_zynqmp_defconfig: Enable CPU Freq
Will Wong [Fri, 31 Mar 2017 16:58:58 +0000 (09:58 -0700)]
xilinx_zynqmp_defconfig: Enable CPU Freq

Enable CPU Freq by default.

Signed-off-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoxilinx_zynqmp_defconfig: Remove enabling of CONFIG_DMI by default
Sreeja Vadakattu [Tue, 4 Apr 2017 09:28:57 +0000 (14:58 +0530)]
xilinx_zynqmp_defconfig: Remove enabling of CONFIG_DMI by default

DMI is disabled by default.This is being done to avoid the below error:
[ 1.322063] dmi: Firmware registration failed.

Signed-off-by: Sreeja Vadakattu <svadakat@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Fix buffer ID overflow
Michael Gill [Fri, 31 Mar 2017 18:53:36 +0000 (11:53 -0700)]
staging: apf: Fix buffer ID overflow

This moves the hard upper bound on buffers in the apf driver
from 256 to 64K

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Enable the output polling at the end of resume
Hyun Kwon [Tue, 4 Apr 2017 22:12:41 +0000 (15:12 -0700)]
drm: xilinx: drv: Enable the output polling at the end of resume

The output polling needs to be enabled at the end of resume to
ensure all devices are in correct state.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Initialize the phy when resuming
Hyun Kwon [Tue, 4 Apr 2017 22:12:40 +0000 (15:12 -0700)]
drm: xilinx: dp: Initialize the phy when resuming

The phy needs to be initialized / released accordingly when DP goes
into suspend / resume. Add functions for phy initializeiont / release,
and those functions can be shared with probe / remove sequence.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Initialize the DP aux in a separate function
Hyun Kwon [Tue, 4 Apr 2017 22:12:39 +0000 (15:12 -0700)]
drm: xilinx: dp: Initialize the DP aux in a separate function

The same initialization needs to be called for suspend / resume.
Factor the function for the aux initialization, then the function
can be used for suspend / resume.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: crtc: Enable / disable the clock in DPMS callback
Hyun Kwon [Tue, 4 Apr 2017 22:12:38 +0000 (15:12 -0700)]
drm: xilinx: crtc: Enable / disable the clock in DPMS callback

There's no reason to enable clock before the DPMS gets on.
Thus instead of enabling the clock in mode_set, enable it
in the DPMS callback.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Add runtime PM calls in dpms function
Hyun Kwon [Tue, 4 Apr 2017 22:12:37 +0000 (15:12 -0700)]
drm: xilinx: dp: Add runtime PM calls in dpms function

Call the pm_runtime_get/put() based on the requested DPMS.
These calls are translated into PMU FW APIs at the end.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Add shutdown callback
Hyun Kwon [Tue, 4 Apr 2017 22:12:36 +0000 (15:12 -0700)]
drm: xilinx: drv: Add shutdown callback

Shut down the device explicitly when the system shuts down.
The callback will unbind the device.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Reduce min-residency for cpu idle
Davorin Mista [Tue, 4 Apr 2017 01:33:39 +0000 (18:33 -0700)]
arm64: zynqmp: Reduce min-residency for cpu idle

In order to allow CPUs to idle using the default menu governor, the
min-residency value has been lowered to 100ms.

Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoxilinx_zynqmp_defconfig: Enable CPU Idle
Will Wong [Fri, 31 Mar 2017 16:58:57 +0000 (09:58 -0700)]
xilinx_zynqmp_defconfig: Enable CPU Idle

Enable CPU Idle by default.

Signed-off-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoxilinx_zynqmp_defconfig: Enable PM debugfs API
Manjukumar Matha [Mon, 27 Mar 2017 07:16:16 +0000 (00:16 -0700)]
xilinx_zynqmp_defconfig: Enable PM debugfs API

Enable PM debugfs API by default in defconfig. This helps testing
PS-only and System reset while using isolation HDF

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: pm: Notify PM firmware that initialization is completed
Filip Drazic [Wed, 15 Mar 2017 10:43:10 +0000 (11:43 +0100)]
arm64: zynqmp: pm: Notify PM firmware that initialization is completed

PM firmware requires notification when power management is enabled and
when the initialization is completed in order to finalize
system initialization (e.g. power down slaves that will not be used).

Implement PM_INIT_FINALIZE PM API, which is used to inform the PM
firmware that the initialization is completed. This call is made only
if CONFIG_PM is enabled in late_initcall_sync phase of the boot procedure.

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: pm: Rename PM_INIT to PM_INIT_FINALIZE
Filip Drazic [Thu, 16 Mar 2017 15:50:59 +0000 (16:50 +0100)]
arm64: zynqmp: pm: Rename PM_INIT to PM_INIT_FINALIZE

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Enable suspend by default
Will Wong [Mon, 6 Feb 2017 17:33:55 +0000 (09:33 -0800)]
arm64: zynqmp: Enable suspend by default

Enabling support for kernel suspend by default.

Signed-off-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoserial: xuartps: Enable uart loopback mode
Nava kishore Manne [Fri, 31 Mar 2017 12:20:20 +0000 (17:50 +0530)]
serial: xuartps: Enable uart loopback mode

This patch adds xilinx uart loopback support by modifying the
cdns_uart_set_mctrl function to handle the switch to loopback mode.
After this patch, the loopback mode can be enabled/disabled by
setting/clearing the TIOCM_LOOP modem bit via TIOCMBIS/TIOCMBIC
ioctls respectively.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: xilinx: Fix the runtime check
Shubhrajyoti Datta [Tue, 28 Mar 2017 17:35:00 +0000 (23:05 +0530)]
spi: xilinx: Fix the runtime check

the runtime_get_sync returns the device count so it is valid
to have positve values. Correct the check.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Add a module param for aux timeout
Hyun Kwon [Wed, 29 Mar 2017 20:32:18 +0000 (13:32 -0700)]
drm: xilinx: dp: Add a module param for aux timeout

From testing with multiple monitors, the timeout value varies.
The spec describes the 25 msec, but some monitor requires a few
seconds wait time. So, the default timeout is set to 50 msec,
but make it configurable so that the value can be tuned.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Retry the aux transaction when it fails
Hyun Kwon [Wed, 29 Mar 2017 20:32:17 +0000 (13:32 -0700)]
drm: xilinx: dp: Retry the aux transaction when it fails

Retry the aux transaction up to 128 times. Per spec, it needs to
try at least 3 times, but there's some monitor (Viewsonic VX2880ml)
which requires 64 retries. Try up to 128 times to be safe.
Other monitors are more likely to succeed for the first try, so this
patch doesn't hurt other monitors.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Don't suspend if console_suspend_enabled is false
Hyun Kwon [Wed, 29 Mar 2017 17:29:41 +0000 (10:29 -0700)]
drm: xilinx: drv: Don't suspend if console_suspend_enabled is false

When console_suspend_enabled is false, user expects to see the logs
through the display even the system goes into suspend. Thus, check
the console_suspend_enabled flag before going into suspend.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Use drm_helper_resume_force_mode()
Hyun Kwon [Thu, 30 Mar 2017 01:14:52 +0000 (18:14 -0700)]
drm: xilinx: drv: Use drm_helper_resume_force_mode()

This helper function ensures to restore the previous mode
configuration. Use this function for resume, instead of
simply turning on the device.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoiio: adc: xilinx-ams: enable clock before device initialization
Rajnikant Bhojani [Tue, 28 Mar 2017 14:45:43 +0000 (10:45 -0400)]
iio: adc: xilinx-ams: enable clock before device initialization

ams clock needs to be enabled before accessing any registers
not doing so will result into device freeze

Signed-off-by: Rajnikant Bhojani <rajnikant.bhojani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoiio: adc: xilinx-ams: fix module unload crash
Rajnikant Bhojani [Tue, 28 Mar 2017 14:45:42 +0000 (10:45 -0400)]
iio: adc: xilinx-ams: fix module unload crash

set platform device as private data for iio device

Signed-off-by: Rajnikant Bhojani <rajnikant.bhojani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: core: Enable CCI support in dwc3 core driver
Manish Narani [Tue, 28 Mar 2017 10:31:52 +0000 (16:01 +0530)]
usb: dwc3: core: Enable CCI support in dwc3 core driver

This patch adds CCI support in DWC3 driver when CCI is enabled in the
design. There are couple of registers which need to be modified for
making CCI enabled transfers in USB. This patch add the support for
the same.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: of-simple: Enable CCI support in dwc3 driver
Manish Narani [Tue, 28 Mar 2017 10:31:51 +0000 (16:01 +0530)]
usb: dwc3: of-simple: Enable CCI support in dwc3 driver

This patch adds CCI support in DWC3 driver when CCI is enabled in the
design. There are couple of registers which need to be modified for
making CCI enabled transfers in USB. This patch add the support for the
same.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: devicetree: Enabled CCI support for USB
Manish Narani [Mon, 27 Mar 2017 12:17:00 +0000 (17:47 +0530)]
zynqmp: devicetree: Enabled CCI support for USB

This patch adds CCI support for USB when CCI is enabled in design.
This patch also adds 'reg' property for Xilinx USB 3.0 IP. The 'reg'
property is added in order to modify a register in that to enable
coherency in Hardware.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoDocumentation: DT: dwc3: update for CCI support for USB
Manish Narani [Mon, 27 Mar 2017 12:17:01 +0000 (17:47 +0530)]
Documentation: DT: dwc3: update for CCI support for USB

This patch adds documentation in DWC3 device-tree bindings for enabling
the DMA coherency in USB.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: gadget: f_hid: fix: Don't access hidg->req without spinlock held
Krzysztof Opasiak [Tue, 31 Jan 2017 17:12:31 +0000 (18:12 +0100)]
usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held

hidg->req should be accessed only with write_spinlock held as it is
set to NULL when we get disabled by host.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: f_hid: fix: Move IN request allocation to set_alt()
Krzysztof Opasiak [Tue, 24 Jan 2017 02:27:24 +0000 (03:27 +0100)]
usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

Since commit: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
we cannot allocate any requests in bind() as we check if we should
align request buffer based on endpoint descriptor which is assigned
in set_alt().

Allocating request in bind() function causes a NULL pointer
dereference.

This commit moves allocation of IN request from bind() to set_alt()
to prevent this issue.

Fixes: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: f_hid: Use spinlock instead of mutex
Krzysztof Opasiak [Thu, 19 Jan 2017 17:55:29 +0000 (18:55 +0100)]
usb: gadget: f_hid: Use spinlock instead of mutex

As IN request has to be allocated in set_alt() and released in
disable() we cannot use mutex to protect it as we cannot sleep
in those funcitons. Let's replace this mutex with a spinlock.

Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: f_hid: fix: Prevent accessing released memory
Krzysztof Opasiak [Thu, 19 Jan 2017 17:55:28 +0000 (18:55 +0100)]
usb: gadget: f_hid: fix: Prevent accessing released memory

When we unlock our spinlock to copy data to user we may get
disabled by USB host and free the whole list of completed out
requests including the one from which we are copying the data
to user memory.

To prevent from this let's remove our working element from
the list and place it back only if there is sth left when we
finish with it.

Fixes: 99c515005857 ("usb: gadget: hidg: register OUT INT endpoint for SET_REPORT")
Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: f_hid: fix: Free out requests
Krzysztof Opasiak [Thu, 19 Jan 2017 17:55:27 +0000 (18:55 +0100)]
usb: gadget: f_hid: fix: Free out requests

Requests for out endpoint are allocated in bind() function
but never released.

This commit ensures that all pending requests are released
when we disable out endpoint.

Fixes: 99c515005857 ("usb: gadget: hidg: register OUT INT endpoint for SET_REPORT")
Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agousb: gadget: Fix copy/pasted error message
David Lechner [Mon, 2 Jan 2017 23:28:39 +0000 (17:28 -0600)]
usb: gadget: Fix copy/pasted error message

This fixes an error message that was probably copied and pasted. The same
message is used for both the in and out endpoints, so it makes it impossible
to know which one actually failed because both cases say "IN".

Make the out endpoint error message say "OUT".

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agoidr: add ida_is_empty
Matthew Wilcox [Wed, 14 Dec 2016 23:09:13 +0000 (15:09 -0800)]
idr: add ida_is_empty

Two of the USB Gadgets were poking around in the internals of struct ida
in order to determine if it is empty.  Add the appropriate abstraction.

Link: http://lkml.kernel.org/r/1480369871-5271-63-git-send-email-mawilcox@linuxonhyperv.com
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Konstantin Khlebnikov <koct9i@gmail.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agousb: gadget: f_hid add super speed support
Janusz Dziedzic [Thu, 3 Nov 2016 09:27:15 +0000 (10:27 +0100)]
usb: gadget: f_hid add super speed support

Add super speed descriptors to f_hid.

Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
7 years agoclk: Reset the child count
Shubhrajyoti Datta [Tue, 28 Mar 2017 05:57:33 +0000 (11:27 +0530)]
clk: Reset the child count

Reset the clild count before traversing the family tree.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Warn on vpll multiuser conditionally
Shubhrajyoti Datta [Sat, 25 Mar 2017 11:27:20 +0000 (16:57 +0530)]
clk: zynqmp: Warn on vpll multiuser conditionally

Warn on multiuser only when changing rates.
This helps remove the warn in cases where the
dp driver is not there and vpll is used for other
stuff.
Expectation is that DP is using VPLL. Checking generic case where DP
uses different PLL requires additional fix. But as of now recomendation
is to use VPLL for DP.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Cleanup the clock code
Shubhrajyoti Datta [Fri, 24 Mar 2017 10:00:25 +0000 (15:30 +0530)]
net: macb: Cleanup the clock code

The clock enable and disable is taken care in pm runtime calls.
Remove the same from the suspend/resume handlers.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: zynq: Wakeup gpio controller when it is used as IRQ controller
Borsodi Petr [Tue, 21 Mar 2017 13:01:47 +0000 (14:01 +0100)]
gpio: zynq: Wakeup gpio controller when it is used as IRQ controller

There is a problem with GPIO driver when used as IRQ controller.
It is not working because the module is sleeping (clock is disabled).
The patch enables clocks when IP is used as IRQ controller.

Signed-off-by: Borsodi Petr <Petr.Borsodi@i.cz>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: Xilinx NWL: Remove old internal driver
Bharat Kumar Gogada [Thu, 23 Mar 2017 10:54:37 +0000 (16:24 +0530)]
PCI: Xilinx NWL: Remove old internal driver

Removing unused old internal driver.
Upstreamed driver is already present as pcie-xilinx-nwl.c

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: xhci: Set XHCI Light Reset for DWC3_OTG mode
Manish Narani [Thu, 23 Mar 2017 10:26:13 +0000 (15:56 +0530)]
usb: xhci: Set XHCI Light Reset for DWC3_OTG mode

This Patch corrects the XHCI reset for OTG mode. The host cannot
have Hard Reset while in OTG mode because that will affect the
OTG peripheral mode event buffers and it will not function.

The macro for OTG is USB_DWC3_OTG not USB_DWC3_DUAL_ROLE. This patch
corrects the same.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Unset set_busid callback
Hyun Kwon [Thu, 23 Mar 2017 01:07:34 +0000 (18:07 -0700)]
drm: xilinx: drv: Unset set_busid callback

The DRM framework sets the busid by itself when the set_busid
callback is not set by the driver. Applications can use
the busid to differentiate when there are multiple instances,
thus don't register the set_busid callback.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: gadget: Correct usb EP argument for BOT status request
Manish Narani [Mon, 20 Mar 2017 09:09:53 +0000 (14:39 +0530)]
usb: gadget: Correct usb EP argument for BOT status request

This patch corrects the argument in f_tcm as it is mistakenly
set to ep_out. It should be ep_in for status request.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoserial: xuartps: Enable clocks in the pm disable case also
Shubhrajyoti Datta [Thu, 23 Mar 2017 11:42:06 +0000 (17:12 +0530)]
serial: xuartps: Enable clocks in the pm disable case also

When Power management is disabled then the clocks are not getting
enabled. This patch enables it for the !PM case also.
While at it also pm_runtime_set_active is called before
calling pm_runtime_enable.
fixes: 870d6d6 "serial: xilinx_uartps: Add pm runtime support"

Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopinctrl: zynqmp: Fix code and documentation warnings
Chirag Parekh [Wed, 22 Mar 2017 06:33:58 +0000 (23:33 -0700)]
pinctrl: zynqmp: Fix code and documentation warnings

This patch fixes following warnings:
checkpatch.pl
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'.
kernel-doc
warning: No description found for parameter 'ngroups'.
warning: No description found for parameter 'iouaddr'.
warning: Excess struct/union/enum/typedef member 'ngroupos'
 description in 'zynqmp_pinctrl'.

Signed-off-by: Chirag Parekh <chirag.parekh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoiio: adc: xilinx-ams: Disable interrupts at boot up
Tanvi Desai [Mon, 20 Mar 2017 05:40:41 +0000 (22:40 -0700)]
iio: adc: xilinx-ams: Disable interrupts at boot up

This was causing tons of interrupts without anyone asking for them

Signed-off-by: Tanvi Desai <tanvi.desai@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: host: xhci: Correct the log for enabling stream support in XHCI
Anurag Kumar Vulisha [Fri, 17 Mar 2017 11:30:40 +0000 (17:00 +0530)]
usb: host: xhci: Correct the log for enabling stream support in XHCI

HCCPARAMS1 register store the Maximum Primary Stream Array(MAXPSASIZE)
variable which is set to non-zero value if BULK streams are supported
by our USB controller. This variable is checked by xhci-plat.c file
for enabling bulk stream support. Since the logic for checking stream
is wrongly placed, software doesn't enable bulk streaming support even
after hardware has support for BULK streams.

This patch corrects the check for enabling Bulk stream support.

This patch is based on 'commit 5de4e1ea9a73 ("usb: host: xhci: plat:
check hcc_params after add hcd")' from torvalds/linux github repository

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoedac: zynqmp: don't hardcode edac device index
Naga Sureshkumar Relli [Fri, 17 Mar 2017 07:30:14 +0000 (13:00 +0530)]
edac: zynqmp: don't hardcode edac device index

During edac device allocation edac_device_alloc_ctl_info() needs edac
device index to register. but here we are passing 0 as device index.
and if some other edac device controller is already using that 0 index,
then device allocation will fail.

So instead of hardcoding device index use edac_device_alloc_index().
this will return next available device index.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoserial: xuartps: Cleanup the clock enable
Shubhrajyoti Datta [Wed, 15 Mar 2017 15:34:11 +0000 (08:34 -0700)]
serial: xuartps: Cleanup the clock enable

The core handles the clocking now. Remove the clock disable in
suspend. In resume we enable the clocks and disable after register
write.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrivers: ata: Correct the AXI bus configuration for SATA ports
Anurag Kumar Vulisha [Wed, 15 Mar 2017 13:35:45 +0000 (19:05 +0530)]
drivers: ata: Correct the AXI bus configuration for SATA ports

Previously PAXIC register was programmed before configuring PCFG
register. PCFG should be programmed with the address of the port
for which PAXIC should be configured for.
This was not happening before, so only one port PAXIC was written
correctly and the other port was having wrong value.
This patch moves the PXAIC register write after configuring PCFG,
doing so will correct the axi bus settings for sata port0 & port1.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrivers: ata: Add CCI support for SATA if CCI is enabled
Anurag Kumar Vulisha [Wed, 15 Mar 2017 13:35:44 +0000 (19:05 +0530)]
drivers: ata: Add CCI support for SATA if CCI is enabled

This patch adds support for CCI in SATA controller if CCI is
enabled in design. This patch will add CCI settings for SATA
if "dma-coherent" dts property is added.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Define and enable qspi node for DC4 board
Siva Durga Prasad Paladugu [Sat, 4 Mar 2017 06:46:47 +0000 (12:16 +0530)]
arm64: zynqmp: Define and enable qspi node for DC4 board

DC4 board has qspi on it hence define and enable
qspi node for it.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add missing maximum-speed property to usb nodes
Michal Simek [Wed, 8 Mar 2017 08:26:02 +0000 (09:26 +0100)]
arm64: zynqmp: Add missing maximum-speed property to usb nodes

Add missing properties to dt node.

Error log:
ERROR: usb maximum-speed not found

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Remove netfilter connection tracking in defconfig
Harini Katakam [Wed, 15 Mar 2017 07:23:01 +0000 (12:53 +0530)]
arm64: zynqmp: Remove netfilter connection tracking in defconfig

Revert netfilter connection tracking and NAT settings to module
because when included statically they are causing drop in
macb TCP performance.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Enable Zynq remoteproc
Wendy Liang [Wed, 15 Mar 2017 04:02:09 +0000 (21:02 -0700)]
arm: zynq: Enable Zynq remoteproc

Enable Zynq remoteproc as module in the Zynq defconfig

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Enable ZynqMP r5 remoteproc
Wendy Liang [Wed, 15 Mar 2017 04:02:08 +0000 (21:02 -0700)]
arm64: zynqmp: Enable ZynqMP r5 remoteproc

Enable ZynqMP r5 remoteproc driver as module in ZynqMP defconfig

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoremoteproc: Select SRAM for Zynq remoteproc
Wendy Liang [Wed, 15 Mar 2017 04:02:07 +0000 (21:02 -0700)]
remoteproc: Select SRAM for Zynq remoteproc

The Zynq remoteproc driver uses SRAM for firmware
memory, select the SRAM if the remoteproc driver
is selected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoremoteproc: Select SRAM for ZynqMP r5 remoteproc
Wendy Liang [Wed, 15 Mar 2017 04:02:06 +0000 (21:02 -0700)]
remoteproc: Select SRAM for ZynqMP r5 remoteproc

As ZynqMP r5 remoteproc requires SRAM for firmware memory,
select SRAM when the remoteproc driver is selected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Fix the double disable of clocks
Shubhrajyoti Datta [Tue, 14 Mar 2017 12:05:25 +0000 (17:35 +0530)]
net: macb: Fix the double disable of clocks

If the pm is not suspended then we are disabling the
clocks twice in the remove path fix the same.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoserial: xuartps: Fix the early_console junk character issue
Nava kishore Manne [Sat, 11 Mar 2017 06:46:24 +0000 (12:16 +0530)]
serial: xuartps: Fix the early_console junk character issue

In the early_console_setup is trying to access the unregister clock value,
so we are receiving some garbage clk value bacause of this wrong clk value
the early_console_setup is fail to set the required console baud rate.

This path fix this issue.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Enable the VCU Init driver
Dhaval Shah [Mon, 13 Mar 2017 16:10:41 +0000 (09:10 -0700)]
arm64: zynqmp: Enable the VCU Init driver

Enable the VCU Init driver as module by default.

Signed-off-by: Dhaval Shah <dshah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoserial: xilinx_uartps: Add pm runtime support
Shubhrajyoti Datta [Mon, 13 Mar 2017 10:31:25 +0000 (16:01 +0530)]
serial: xilinx_uartps: Add pm runtime support

Adds pm runtime support to xilinx uart ps.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: zynqmp_dma: Fix warning variable 'val' set but not used
Kedareswara rao Appana [Sat, 11 Mar 2017 13:00:38 +0000 (18:30 +0530)]
dma: zynqmp_dma: Fix warning variable 'val' set but not used

This patch fixes the below warning

drivers/dma/xilinx/zynqmp_dma.c: In function 'zynqmp_dma_handle_ovfl_int':
drivers/dma/xilinx/zynqmp_dma.c:522:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp_sub: Clear the audio soft reset register
Hyun Kwon [Sat, 11 Mar 2017 01:32:07 +0000 (17:32 -0800)]
drm: xilinx: dp_sub: Clear the audio soft reset register

The register needs to be programmed as it's an non-reset flop.
Clear the whole register to avoid any nonderterministic behavior.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp-zcu106.dts: Remove si570 from Xilinx_drm node
Madhurkiran Harikrishnan [Fri, 10 Mar 2017 18:05:08 +0000 (10:05 -0800)]
zynqmp-zcu106.dts: Remove si570 from Xilinx_drm node

This patch will remove the si570 clock for xilinx
drm for zcu106 as CCF already takes care of it.

Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodevicetree: dwc3: Uncomment snps,quirk-frame-length-adjustment flag
Anurag Kumar Vulisha [Fri, 10 Mar 2017 13:48:17 +0000 (19:18 +0530)]
devicetree: dwc3: Uncomment snps,quirk-frame-length-adjustment flag

This patch uncomments snps,quirk-frame-length-adjustment which has
the value to adjust the SOF/ITP generated from the controller.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrivers: dwc3: Correct the logic for GFLADJ adjustment
Anurag Kumar Vulisha [Fri, 10 Mar 2017 13:48:16 +0000 (19:18 +0530)]
drivers: dwc3: Correct the logic for GFLADJ adjustment

This patch corrects the logic used for adjusting GFLADJ register

Currently during phy initialization, USB core reset is happening.
Because of reset USB GFLADJ register is getting restored to default
values. This patch updates the GFADJ[21:8] & GFLADJ[5:0] bits if
they are not equal to the requested value from dts.
This patch also removes the WARN_ONCE messages that occur if the
previous register value matches to the current value requested.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomisc: vcu: updated error handling.
Dhaval Shah [Fri, 10 Mar 2017 12:09:57 +0000 (04:09 -0800)]
misc: vcu: updated error handling.

pll_ref clocksource can be a fixed or si570_1 type.
If there is a fixed clock in the pll_ref, we cann't set the
clock in that pll_ref clock source. In this case, we should
bypass the error with the warning only. this will work for
any kind of pll_ref clocksource.

Signed-off-by: Dhaval Shah <dshah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: retain resource index for unforced stops
Tanmay Upadhyay [Sun, 5 Mar 2017 14:09:52 +0000 (19:39 +0530)]
usb: dwc3: retain resource index for unforced stops

all active transfers are stopped with force rm bit false while hibernating
and restarted using resource index on wakeup

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: correct ignoring hibernation event
Tanmay Upadhyay [Sun, 5 Mar 2017 14:09:51 +0000 (19:39 +0530)]
usb: dwc3: correct ignoring hibernation event

- ignore hibernation event if event info doesn't match current USB speed
- dwc->speed holds register value, which isn't the same as USB speed enum

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: hibernation: zero out scratchpad buffer
Tanmay Upadhyay [Sun, 5 Mar 2017 14:09:50 +0000 (19:39 +0530)]
usb: dwc3: hibernation: zero out scratchpad buffer

DWC3 core fails to save in scratchpad buffer area if it's not
initialized with zero

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: hibernation: fix scratch buffer allocation
Tanmay Upadhyay [Sun, 5 Mar 2017 14:09:49 +0000 (19:39 +0530)]
usb: dwc3: hibernation: fix scratch buffer allocation

We would know how many scratch buffers to allocate in core_init. So,
move scratch buffer allocation in core_init. Keep a check to avoid
re-allocation when core_init is called after probe.

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: hibernation: warn if scratch buffer is NULL
Tanmay Upadhyay [Sun, 5 Mar 2017 14:09:48 +0000 (19:39 +0530)]
usb: dwc3: hibernation: warn if scratch buffer is NULL

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: zynqmp_dma: Fix kernel-doc format
Michal Simek [Fri, 10 Mar 2017 09:56:36 +0000 (10:56 +0100)]
dma: zynqmp_dma: Fix kernel-doc format

Fix
drivers/dma/xilinx/zynqmp_dma.c:556: info: Scanning doc for
zynqmp_dma_device_config
drivers/dma/xilinx/zynqmp_dma.c:562: warning: No description found for
return value of 'zynqmp_dma_device_config'
drivers/dma/xilinx/zynqmp_dma.c:653: info: Scanning doc for
zynqmp_dma_free_descriptors
drivers/dma/xilinx/zynqmp_dma.c:657: warning: No description found for
parameter 'chan'
drivers/dma/xilinx/zynqmp_dma.c:657: warning: Excess function parameter
'dchan' description in 'zynqmp_dma_free_descriptors'

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp_sub: Remove unused variable
Michal Simek [Fri, 10 Mar 2017 09:25:45 +0000 (10:25 +0100)]
drm: xilinx: dp_sub: Remove unused variable

Warning log:
drivers/gpu/drm/xilinx/xilinx_drm_dp_sub.c: In function
'xilinx_drm_dp_sub_layer_set_fmt':
drivers/gpu/drm/xilinx/xilinx_drm_dp_sub.c:1202:7: warning: variable
'vid' set but not used [-Wunused-but-set-variable]
  bool vid;

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoi2c: cadence: Fix wording in i2c-cadence driver
Michal Simek [Thu, 9 Mar 2017 16:18:20 +0000 (17:18 +0100)]
i2c: cadence: Fix wording in i2c-cadence driver

Fix wording based on checkpatch.pl

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add access to global general storage registers
Will Wong [Thu, 9 Mar 2017 18:07:46 +0000 (10:07 -0800)]
arm64: zynqmp: Add access to global general storage registers

This provides the proper interface for user applications to access
the PMU Global General Storage registers 0 to 3, and the PMU Persistent
Global General Storage registers 0 to 3.  These registers are commonly
used to track the number of normal and unexpected reboots, system up
times, etc.  Until now, these registers can only be accessed through
the debugfs.  It is desirable to provide a more proper interface for
them.

For example:
To read from persistent global general storage register 0:
cat /sys/devices/platform/firmware/pggs0

To write 1 byte to persistent global general storage register 0:
echo 0x000000FF 0x000000AB > /sys/devices/platform/firmware/pggs0

Signed-off-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodevicetree: Correct typo in zcu102 revA dts TI PHY workaround flag
Harini Katakam [Fri, 10 Mar 2017 11:12:22 +0000 (16:42 +0530)]
devicetree: Correct typo in zcu102 revA dts TI PHY workaround flag

ti,rxctrl-strap-wrka -> ti,rxctrl-strap-worka

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: zynqmp_dma: Add runtime pm support
Kedareswara rao Appana [Fri, 10 Mar 2017 07:24:56 +0000 (12:54 +0530)]
dma: zynqmp_dma: Add runtime pm support

This patch adds runtime pm support in the driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoi2c: cadence: Added slave support
Chirag Parekh [Tue, 7 Mar 2017 07:28:24 +0000 (23:28 -0800)]
i2c: cadence: Added slave support

Added support for I2C slave functionality

Signed-off-by: Chirag Parekh <chirag.parekh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: pm: Fix memory leak
Soren Brinkmann [Fri, 10 Mar 2017 00:32:37 +0000 (16:32 -0800)]
ARM64: zynqmp: pm: Fix memory leak

There is a memory leak issue in the PM driver.
The function processing user input uses strsep on a kzalloc'd memory
pointer and later kfrees the same pointer.
Since every strsep call modifies the string pointer, it eventually
points to NULL, thereby passing a NULL pointer to kfree, thus causing a
leak.
The solution is to copy the address of kzalloc'd memory in another
pointer, and kfree this instead.

Reported-by: Rohit Fule <rohit.fule@gmail.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp_sub: Clear the audio reset
Hyun Kwon [Thu, 9 Mar 2017 16:51:53 +0000 (08:51 -0800)]
drm: xilinx: dp_sub: Clear the audio reset

The audio soft reset register is non-reset flop, and it doesn't get
reset to the default value. So the register needs to be probrammed
explicitly to be specific value. Otherwise, the value varies between
parts, which was resulting in audio not working on specific parts.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: zynq: Add support for suspend resume
Shubhrajyoti Datta [Wed, 8 Mar 2017 04:37:09 +0000 (10:07 +0530)]
gpio: zynq: Add support for suspend resume

Add support for suspend resume. Now that we can lose context across
a suspend/ resume cycle. Add support for the context restore.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: cadence: macb: Fix kernel-doc format
Michal Simek [Fri, 10 Mar 2017 09:11:16 +0000 (10:11 +0100)]
net: cadence: macb: Fix kernel-doc format

Warnings:
drivers/net/ethernet/cadence/macb.c:268: info: Scanning doc for
drivers/net/ethernet/cadence/macb.c:274: warning: No description found
for parameter 'clk'
drivers/net/ethernet/cadence/macb.c:274: warning: No description found
for parameter 'speed'
drivers/net/ethernet/cadence/macb.c:274: warning: No description found
for parameter 'dev'

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Add context loss support
Shubhrajyoti Datta [Wed, 8 Mar 2017 04:37:10 +0000 (10:07 +0530)]
net: macb: Add context loss support

Suspend may lose context close the link in suspend
and open it again to tide over.

Reviewed-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocan: xilinx: Add context loss support
Shubhrajyoti Datta [Wed, 8 Mar 2017 04:37:11 +0000 (10:07 +0530)]
can: xilinx: Add context loss support

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: disable smmu
Naga Sureshkumar Relli [Thu, 9 Mar 2017 14:30:13 +0000 (20:00 +0530)]
arm64: zynqmp: disable smmu

This patch disables the smmu and also removes the mmu-masters

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>