]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
7 years agommc: arasan: Add ADMA broken quirk based on DT parameter xilinx-v2016.3
Sai Krishna Potthuri [Thu, 13 Oct 2016 10:01:06 +0000 (15:31 +0530)]
mmc: arasan: Add ADMA broken quirk based on DT parameter

This patch adds 'SDHCI_QUIRK_BROKEN_ADMA' quirk to the
sdhci arasan controller based on the DT property.
With 4.6 kernel, ADMA2 is broken. So added this quirk as
a workaround and can be reverted once kernel is upgraded
or actual solution is found.
Issue with ADMA2 can be seen with the following three steps
done in regression.
1. mount SD card.
2. Read and write some random data ~1MB.
3. reboot the board.
Issue is visible after running 15 to 20mins with 4.6 kernel
and there might be a chance that issue might occur very
frequently depending on the application.
So, using the above workaround to force the controller to
use SDMA.
The performance difference between SDMA and ADMA2 is around
10-15%.
ADMA2 can be used by removing the 'broken-adma2' property
from devicetree.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM: dts: Add broken-adma2 property to SD node
Sai Krishna Potthuri [Thu, 13 Oct 2016 10:01:05 +0000 (15:31 +0530)]
ARM: dts: Add broken-adma2 property to SD node

This patch adds 'broken-adma2' property to SD node.
By adding this property controller will use SDMA
by default. This property can be removed to use ADMA2.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoDocumentation: mmc: Add broken-adma2 property
Sai Krishna Potthuri [Thu, 13 Oct 2016 10:01:04 +0000 (15:31 +0530)]
Documentation: mmc: Add broken-adma2 property

This patch adds 'broken-adma2' property which indicates
ADMA2 functionality is broken and force the controller to use
SDMA.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: Add mask for Control register 10Mbps speed
Appana Durga Kedareswara Rao [Wed, 10 Aug 2016 05:50:06 +0000 (11:20 +0530)]
net: Add mask for Control register 10Mbps speed

This patch adds mask for the Control register
10Mbps speed.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agomedia: adv7604: automatic "default-input" selection
Ulrich Hecht [Fri, 23 Sep 2016 12:32:28 +0000 (18:02 +0530)]
media: adv7604: automatic "default-input" selection

Documentation states that the "default-input" property should reside
directly in the node of the device.  This adjusts the parsing to make the
implementation consistent with the documentation.

Based on patch by William Towle <william.towle@codethink.co.uk>.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomedia: adv7604: fix bindings inconsistency for default-input
Ulrich Hecht [Fri, 23 Sep 2016 12:32:05 +0000 (18:02 +0530)]
media: adv7604: fix bindings inconsistency for default-input

The text states that default-input is an endpoint property, but in the
example it is a device property.

The default input is a property of the chip, not of a particular port, so
the example makes more sense.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Change serdes calibraton logic to ICM_CFG1
Anurag Kumar Vulisha [Fri, 16 Sep 2016 11:30:00 +0000 (17:00 +0530)]
phy: zynqmp: Change serdes calibraton logic to ICM_CFG1

Because of functional issues in Silicon 1.0 (XCZU9EG) which doesn't
do PMOS calibration properly, software needs to implement work around.

As a software sequence of work around, need to programe any lane to a
valid protocol. Currently serdes driver configures lane 0 (ICM_CFG0) to
PCIe for fixing the above said calibration logic issue.

Currently PCIe doesn't use serdes driver, instead it depends on fsbl for
GT lane initialization. Since serdes driver is reintializing ICM_CFG0,
PCIe is facing link down issues once linux boots.

This patch fixes the above said issue by using ICM_CFG1 instead of ICM_CFG0
for fixing the PMOS calibration issue

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodefconfig: zynq: microblaze: Enabling CONFIG_BRIDGE
Vineeth Chowdary Karumanchi [Mon, 19 Sep 2016 09:32:44 +0000 (15:02 +0530)]
defconfig: zynq: microblaze: Enabling CONFIG_BRIDGE

This patch enables CONFIG_BRIDGE=m.
Petalinux has bridge utils enabled by default, this flag
is required to enable in kernel for it to work.

Signed-off-by: Vineeth Chowdary Karumanchi <vineethchowz.chowdary@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: of-simple: Fix kernel hang during unbind
Anurag Kumar Vulisha [Wed, 14 Sep 2016 13:57:12 +0000 (19:27 +0530)]
usb: dwc3: of-simple: Fix kernel hang during unbind

In dwc3_of_simple_remove() we call of_platform_depopulate() after
disabling the clocks. Since of_platform_depopulate() calls xhci_stop()
which internally stop the controller by programming the USB registers.
Since we already disabled the USB clock, kernel hangs when try to unbind.

This patch corrects the above said issue by calling of_platform_depopulate
before clock disabling.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Tested-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: of-simple: Fix warning during unbind
Anurag Kumar Vulisha [Wed, 14 Sep 2016 13:57:11 +0000 (19:27 +0530)]
usb: dwc3: of-simple: Fix warning during unbind

In dwc3_of_simple_remove() we are using clk_unprepare() before
doing any clk_disable(). Because of this we see kernel warning
during unbind if we enable Common CLK framework(CCF).
This patch fixes this kernel warning by using clk_disable_unprepare
instead of clk_unprepare().

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Tested-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: phy: Add gmiitorgmii converter support
Kedareswara rao Appana [Thu, 8 Sep 2016 04:17:39 +0000 (09:47 +0530)]
net: phy: Add gmiitorgmii converter support

This patch adds support for gmiitorgmii converter.

The GMII to RGMII IP core provides the Reduced Gigabit Media
Independent Interface (RGMII) between Ethernet physical media
Devices and the Gigabit Ethernet controller. This core can
Switch dynamically between the three different speed modes of
Operation by configuring the converter register through mdio write.

MDIO interface is used to set operating speed of Ethernet MAC.

This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agonet: macb: add support for mdio phy nodes
Kedareswara rao Appana [Fri, 19 Aug 2016 13:01:13 +0000 (18:31 +0530)]
net: macb: add support for mdio phy nodes

This patch adds support for mdio phy nodes.

With this patch the macb driver first tries to find
the mdio node.
If it is available will create the phy/mdio devices for the
phy/mdio nodes available in the mdio.

If the mdio node is not available it will try to probe the phy nodes
available in the mac nodes as the driver does earlier.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agonet: ethernet: xilinx: Fix kernel crash on 64-bit platform
Kedareswara rao Appana [Fri, 9 Sep 2016 06:57:35 +0000 (12:27 +0530)]
net: ethernet: xilinx: Fix kernel crash on 64-bit platform

In the driver ptp_tx_skb variable stores the skb address
This variable is of type u32. On 64-bit platform it is causing a kernel
crash when trying to access this variable.

Crash log:
[   58.675430] Unable to handle kernel paging request at virtual address 6e882cc8
[   58.682583] pgd = ffffffc0018d7000
[   58.685956] [6e882cc8] *pgd=0000000000000000, *pud=0000000000000000
[   58.692206] Internal error: Oops: 96000005 [#1] SMP
[   58.697067] Modules linked in:
[   58.700106] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0 #195
[   58.706095] Hardware name: ZynqMP ZCU102 (DT)
[   58.710435] task: ffffffc00180a8c0 ti: ffffffc0017fc000 task.ti: ffffffc0017fc000
[   58.717912] PC is at axienet_tx_irq+0x1f4/0x3fc
[   58.722416] LR is at handle_irq_event_percpu+0x94/0x13c
[   58.727622] pc : [<ffffffc00051d54c>] lr : [<ffffffc0000d1194>] pstate: 000001c5
[   58.735005] sp : ffffffc0017ffc30
[   58.738296] x29: ffffffc0017ffc30 x28: ffffff8000279a00
[   58.743589] x27: ffffffc071bed700 x26: ffffffc000913b70
[   58.748884] x25: ffffffc0007e7130 x24: ffffffc071afbe00
[   58.754179] x23: ffffffc071bed000 x22: 0000000000000000
[   58.759473] x21: 0000000000000000 x20: ffffffc071bed000
[   58.764768] x19: 0000000080000056 x18: 0000007fef55a510
[   58.770063] x17: 0000007f8f15d0c0 x16: ffffffc00017d4ec
[   58.775358] x15: ffffffffffffffff x14: ffffffffffffff00
[   58.780653] x13: ffffffffffffffff x12: 0000000000000008
[   58.785948] x11: 0101010101010101 x10: 00000000000006e0
[   58.791242] x9 : ffffffc0017ffe70 x8 : ffffffc071400768
[   58.796537] x7 : ffffffc0714006c8 x6 : 0000000000000000
[   58.801832] x5 : 00000000fffffffa x4 : 00000000767af000
[   58.807126] x3 : 0000000000000000 x2 : ffffff80001c0000
[   58.812421] x1 : ffffffc071bed000 x0 : 000000006e882c00
[   58.817715]
[   58.819194] Process swapper/0 (pid: 0, stack limit = 0xffffffc0017fc020)
[   58.825880] Stack: (0xffffffc0017ffc30 to 0xffffffc001800000)
[   58.831609] fc20:                                   ffffffc0017ffca0 ffffffc0000d1194
[   58.839428] fc40: ffffffc06e881280 ffffffc001835580 0000000000000000 0000000000000000
[   58.847240] fc60: 00000000000000cf ffffffc071afbe00 ffffffc00187c3cb ffffffc000913b70
[   58.855052] fc80: ffffffc000913b98 0000000000000000 ffffffc00187c3cb ffffffc0009799f0
[   58.862864] fca0: ffffffc0017ffd00 ffffffc0000d1280 ffffffc071afbe00 ffffffc001835580
[   58.870676] fcc0: ffffffc071afbe9c ffffffc001805040 ffffff8000014010 ffffff8000015000
[   58.878488] fce0: ffffffc000766cd0 ffffffc00187c000 0000000000000000 ffffffc0000eeb4c
[   58.886300] fd00: ffffffc0017ffd30 ffffffc0000d461c ffffffc071afbe00 ffffffc001835580
[   58.894112] fd20: 0000000000000000 ffffffc00009b18c ffffffc0017ffd50 ffffffc0000d07a0
[   58.901924] fd40: ffffffc0017e5000 0000000000000000 ffffffc0017ffd60 ffffffc0000d0ab8
[   58.909736] fd60: ffffffc0017ffda0 ffffffc000080cec ffffff800001400c ffffffc001835000
[   58.917548] fd80: ffffffc0017ffde0 ffffffc07132c1e0 ffffffc071808000 0000007900757990
[   58.925360] fda0: ffffffc0017fff00 ffffffc000083da8 ffffffc0017fc000 ffffffc001802000
[   58.933172] fdc0: ffffffc0017fff00 ffffffc000084e70 0000000060000145 ffffffc0017e6c78
[   58.940983] fde0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   58.948796] fe00: 0000000000000000 00000000767af000 ffffffc001802ad0 00000000ffff1452
[   58.956608] fe20: ffffffc00180b000 ffffffc0017ffe70 00000000000006e0 0101010101010101
[   58.964420] fe40: 0000000000000008 ffffffffffffffff ffffffffffffff00 ffffffffffffffff
[   58.972232] fe60: ffffffc00017d4ec 0000007f8f15d0c0 0000007fef55a510 ffffffc0017fc000
[   58.980044] fe80: ffffffc001802000 ffffffc001802ad0 ffffffc0017e39c0 ffffffc0017fff20
[   58.987856] fea0: ffffffc0017e6c78 ffffffc000766cd0 ffffffc00187c000 0000000000000000
[   58.995668] fec0: 0000000000000000 ffffffc0017fff00 ffffffc000084e6c ffffffc0017fff00
[   59.003480] fee0: ffffffc000084e70 0000000060000145 ffffffc000766cd0 ffffffc000757ca8
[   59.011292] ff00: ffffffc0017fff10 ffffffc0000c99f8 ffffffc0017fff20 ffffffc0000c9b30
[   59.019104] ff20: ffffffc0017fff90 ffffffc000754f08 ffffffc00187f000 ffffffc00187f000
[   59.026916] ff40: ffffffc00187f000 ffffffc001802000 ffffffc077fd0000 ffffffc000a462c8
[   59.034728] ff60: 00000000018d4000 00000000018d7000 ffffffc0000801d8 000000007df4ae40
[   59.042540] ff80: ffffffc0017fff90 ffffffc000754f00 ffffffc0017fffa0 ffffffc000a1594c
[   59.050352] ffa0: 0000000000000000 000000000075c000 0000000000000400 0000000000000e12
[   59.058163] ffc0: 0000000007ff5000 0000000000000003 000000007df47c88 0000000000000000
[   59.065975] ffe0: 0000000000000000 ffffffc000a462c8 0000000000000000 0000000000000000
[   59.073785] Call trace:
[   59.076211] [<ffffffc00051d54c>] axienet_tx_irq+0x1f4/0x3fc
[   59.081767] [<ffffffc0000d1194>] handle_irq_event_percpu+0x94/0x13c
[   59.088017] [<ffffffc0000d1280>] handle_irq_event+0x44/0x74
[   59.093573] [<ffffffc0000d461c>] handle_fasteoi_irq+0xac/0x19c
[   59.099387] [<ffffffc0000d07a0>] generic_handle_irq+0x24/0x38
[   59.105116] [<ffffffc0000d0ab8>] __handle_domain_irq+0x60/0xac
[   59.110932] [<ffffffc000080cec>] gic_handle_irq+0x60/0xb4
[   59.116312] Exception stack(0xffffffc0017ffdb0 to 0xffffffc0017ffed0)
[   59.122736] fda0:                                   ffffffc0017fc000 ffffffc001802000
[   59.130555] fdc0: ffffffc0017fff00 ffffffc000084e70 0000000060000145 ffffffc0017e6c78
[   59.138366] fde0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   59.146179] fe00: 0000000000000000 00000000767af000 ffffffc001802ad0 00000000ffff1452
[   59.153991] fe20: ffffffc00180b000 ffffffc0017ffe70 00000000000006e0 0101010101010101
[   59.161803] fe40: 0000000000000008 ffffffffffffffff ffffffffffffff00 ffffffffffffffff
[   59.169615] fe60: ffffffc00017d4ec 0000007f8f15d0c0 0000007fef55a510 ffffffc0017fc000
[   59.177427] fe80: ffffffc001802000 ffffffc001802ad0 ffffffc0017e39c0 ffffffc0017fff20
[   59.185239] fea0: ffffffc0017e6c78 ffffffc000766cd0 ffffffc00187c000 0000000000000000
[   59.193050] fec0: 0000000000000000 ffffffc0017fff00
[   59.197905] [<ffffffc000083da8>] el1_irq+0x68/0xc0
[   59.202680] [<ffffffc0000c99f8>] default_idle_call+0x1c/0x30
[   59.208322] [<ffffffc0000c9b30>] cpu_startup_entry+0x124/0x1dc
[   59.214138] [<ffffffc000754f08>] rest_init+0x74/0x7c
[   59.219086] [<ffffffc000a1594c>] start_kernel+0x394/0x3a8
[   59.224465] [<000000000075c000>] 0x75c000
[   59.228459] Code: b9404380 34fffb60 2a0003e0 f944a2e2 (b940c818)

This patch fixes this issue.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoDocumentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding document...
Kedareswara rao Appana [Wed, 10 Aug 2016 05:40:23 +0000 (11:10 +0530)]
Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation

Device-tree binding documentation for xilinx gmiitorgmii converter.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agodma: xilinx: Check for channel idle state before submitting dma descriptor
Radhey Shyam Pandey [Tue, 13 Sep 2016 05:55:14 +0000 (11:25 +0530)]
dma: xilinx: Check for channel idle state before submitting dma descriptor

Add channel idle state to ensure that dma descriptor is not
submitted when VDMA engine is in progress.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoARM64: zynqmp: Support for multiple PM IDs assigned to a PM domain
Filip Drazic [Mon, 29 Aug 2016 17:32:59 +0000 (19:32 +0200)]
ARM64: zynqmp: Support for multiple PM IDs assigned to a PM domain

Previously, it was assumed that there is a 1:1 mapping between
PM ID defined in the platform firmware and a PM domain. However, there
can be a situation where multiple PM IDs belong to a single PM domain
(e.g. PM IDs for GPU and two pixel processors correspond to a single
PM domain).

This patch adds support for assigning more than one PM ID to
a single PM domain.

Updated documentation accordingly.

Assigned pixel processors PM IDs to GPU PM domain.

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoARM64: zynqmp: DT: Add PM domains for GPU and PCIE
Filip Drazic [Mon, 29 Aug 2016 17:32:56 +0000 (19:32 +0200)]
ARM64: zynqmp: DT: Add PM domains for GPU and PCIE

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agodrm: xilinx: Remove runtime pm ops
Hyun Kwon [Mon, 29 Aug 2016 16:50:22 +0000 (09:50 -0700)]
drm: xilinx: Remove runtime pm ops

The runtime pm ops are not used, so don't set runtime pm callbacks.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoDocumentation: DT: dma: Correct binding doc for single dma channel
Kedareswara rao Appana [Thu, 8 Sep 2016 15:57:51 +0000 (21:27 +0530)]
Documentation: DT: dma: Correct binding doc for single dma channel

This patch corrects the binding doc dma client section
in case of h/w is configured for 1 channel for AXI VDMA/DMA Controllers.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agofpga: Add firmware store function
Michal Simek [Wed, 27 Jul 2016 08:06:40 +0000 (10:06 +0200)]
fpga: Add firmware store function

For testing purpose.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nava kishore Manne <navam@xilinx.com>
7 years agoARM64: zynqmp: DT: Remove unused PM domains for PLL
Filip Drazic [Thu, 25 Aug 2016 16:58:51 +0000 (18:58 +0200)]
ARM64: zynqmp: DT: Remove unused PM domains for PLL

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoARM64: zynqmp: DT: Remove unused DDR PM domain
Filip Drazic [Thu, 25 Aug 2016 16:58:49 +0000 (18:58 +0200)]
ARM64: zynqmp: DT: Remove unused DDR PM domain

DDR power states are handled by the PM firmware, so this domain is
redundant. Also, since there is no device using this PM domain,
it will be powered off during boot, which is wrong.

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agoARM: zynq: Add support for Zynq-7000S devices
Michal Simek [Wed, 27 Jul 2016 07:13:13 +0000 (09:13 +0200)]
ARM: zynq: Add support for Zynq-7000S devices

Patch adds detection of Zynq-7000 base silicon configuration,
namely Dual or Single CPU. Device trees attempting to enable DUAL CORE
behavior on SINGLE CPU Zynq-7000S devices are prevented from corrupting
system behavior.

Detection of Dual or Single CPU is done via eFuses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
7 years agoPCI: Xilinx NWL PCIe: Adding prefetchable memory space to device tree
Bharat Kumar Gogada [Tue, 2 Aug 2016 15:04:13 +0000 (20:34 +0530)]
PCI: Xilinx NWL PCIe: Adding prefetchable memory space to device tree

Adding prefetchable memory space to pcie device tree node.
Shifting configuration space to 64-bit address space.
Removing pcie device tree node from amba as it requires size-cells=<2>
in order to access 64-bit address space.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Use 64bit size cell format for main amba bus
Michal Simek [Thu, 11 Feb 2016 06:19:06 +0000 (07:19 +0100)]
ARM64: zynqmp: Use 64bit size cell format for main amba bus

Use 64bit size cell for main amba bus instead of 32bit because PCIe
node requires it Change 64bit sizes also for all others IPs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Add support for zynqmp fpga manager
Nava kishore Manne [Sat, 20 Aug 2016 18:47:52 +0000 (00:17 +0530)]
ARM64: zynqmp: Add support for zynqmp fpga manager

Add support for zynqmp fpga manager.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM: dt: fpga: Added binding docs for Xilinx zynqmp FPGA manager
Nava kishore Manne [Sat, 20 Aug 2016 18:47:51 +0000 (00:17 +0530)]
ARM: dt: fpga: Added binding docs for Xilinx zynqmp FPGA manager

New bindings document for zynqmp fpga manager.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agofpga manager: Adding FPGA Manager support for Xilinx zynqmp
Nava kishore Manne [Sat, 20 Aug 2016 18:47:50 +0000 (00:17 +0530)]
fpga manager: Adding FPGA Manager support for Xilinx zynqmp

This commit adds FPGA Manager support for the Xilinx
ZynqMp chip.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodma: xilinx: Remove unnecessay file from the tree
Kedareswara rao Appana [Tue, 23 Aug 2016 06:26:50 +0000 (11:56 +0530)]
dma: xilinx: Remove unnecessay file from the tree

Support for all 3 Soft IP DMA's (AXI DMA/CDMA/VDMA)
got added into a single driver xilinx_dma.c.

During merge the xilinx_vdma.c got added to this tree
which is no longer required.

This patch removes the same.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: defconfig: enable softIP DMAs in the zynqmp defconfig
Kedareswara rao Appana [Tue, 23 Aug 2016 06:26:49 +0000 (11:56 +0530)]
arm64: defconfig: enable softIP DMAs in the zynqmp defconfig

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: defconfig: enable softIP DMAs in the zynq defconfig
Kedareswara rao Appana [Tue, 23 Aug 2016 06:26:48 +0000 (11:56 +0530)]
arm: defconfig: enable softIP DMAs in the zynq defconfig

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: PM: Removed unused pm API functions
Nava kishore Manne [Tue, 23 Aug 2016 07:05:45 +0000 (12:35 +0530)]
zynqmp: PM: Removed unused pm API functions

This patch removes fpga_pcap_init() and fpga_pcap_done()
API's from pm.c.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agotty: serial: of_serial: Do not allocate greater space than required
Michal Simek [Tue, 23 Aug 2016 15:21:26 +0000 (17:21 +0200)]
tty: serial: of_serial: Do not allocate greater space than required

The patch fixes the problem when there is another IP on higher addresses
which require allocation.
For example:
uart16550: 0x44a00000 - 0x44a10000 (reg offset: 0x1000)
IP: 0x44a10000 - 0x44aX0000

Current code is shifting base address with reg-offset value
(0x44a01000) but the size is the same that's why requested memory
region for ioremap is from 0x44a01000 with 0x10000 size which overlap
the next IP where requesting memory region is failing because the part
of region is already mapped.

The patch decreases mapped size with reg-offset not to overlap selected
memory address ranges.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: PM: Implemented pm API functions to load the bitstream into PL
Nava kishore Manne [Tue, 16 Aug 2016 10:45:12 +0000 (16:15 +0530)]
zynqmp: PM: Implemented pm API functions to load the bitstream into PL

This patch adds PM API's to provide the Access to the xilfpga
library to load the bitstream into the zynqmp PL region.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: drv: Enable universal plane for control client
Hyun Kwon [Fri, 19 Aug 2016 23:07:26 +0000 (16:07 -0700)]
drm: xilinx: drv: Enable universal plane for control client

This allows control applications to access all layer.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add initial ccf clkc support
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:46 +0000 (01:06 +0530)]
clk: zynqmp: Add initial ccf clkc support

Adds initial ccf clock support largely based on the zynq
ccf driver

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: add mux changes for zynqmp
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:45 +0000 (01:06 +0530)]
clk: zynqmp: add mux changes for zynqmp

Add the mux changes for zynqmp
Based on the common mux driver with the IO accessors customized This is
needed so as to not break multi-platform support.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add zynqmp divider support
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:44 +0000 (01:06 +0530)]
clk: zynqmp: Add zynqmp divider support

Add zynqmp divider support.
Based on the common divider with the IO accessors customized
This is needed so as to not break multi-platform support.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add zynqmp ultrascale gate support
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:43 +0000 (01:06 +0530)]
clk: zynqmp: Add zynqmp ultrascale gate support

Add zynqmp ultrascale gate support
Based on the common gate with the IO accessors customized This is
needed so as to not break multi-platform support.
Also spinlocking is removed as it is taken care by firmware.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add the pll driver
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:42 +0000 (01:06 +0530)]
clk: zynqmp: Add the pll driver

Add pll driver support.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add basic clk read/ write functions
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:41 +0000 (01:06 +0530)]
clk: zynqmp: Add basic clk read/ write functions

Add the basic clk read and write apis.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Add device tree binding for clocks
Shubhrajyoti Datta [Fri, 19 Aug 2016 19:36:40 +0000 (01:06 +0530)]
clk: zynqmp: Add device tree binding for clocks

Add documentation for zynqmp for clocks.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: zynqmp: Add tapdelay support
Naga Sureshkumar Relli [Thu, 18 Aug 2016 10:44:46 +0000 (16:14 +0530)]
spi: zynqmp: Add tapdelay support

This patch adds tapdelay support to ZynqMP GQSPI.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: zynqmp: Don't change spi clock frequency for every transfer
Naga Sureshkumar Relli [Thu, 18 Aug 2016 10:44:45 +0000 (16:14 +0530)]
spi: zynqmp: Don't change spi clock frequency for every transfer

We need to set the spi clock frequency, when there is a change
in the speed of transfer i.e if transfer->speed_hz is changed
then change the clock accordingly.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Add initial support for ZCU100
Michal Simek [Wed, 17 Aug 2016 11:45:14 +0000 (13:45 +0200)]
ARM64: zynqmp: Add initial support for ZCU100

Board has 1GB.
uart0 is not connected. uart1 is connected to MIO 8/9.

USB GT lines should be commented because ULPI phy reset is causing
reset also for spi/wlan/bt which is breaking functionality for
these devices.

GT description for USBs and DP. Reference input clock for USB is commit
from CLK lane 0 and for DP from lane 1 that's why LANE_NUM reflects that.
Lane 0 - PS_MGTREFCLK0, Lane 1 - PS_MGTREFCLK1.

usb5744 is removed because of missing configuration via SMBUS.

For 24aa02e48, the low 3 bits of address are "don't care". Use 0 for our
dts, to prevent confusion with the other EEPROMs in the system where they
do use 0x54.

DP is setup to use fixed freq for LG monitor because si570 is not
present on the board that's why CLK is generated in PL.

Power regulator is accessible via I2C but it hasn't been tested yet
that's why it is commented.

SD0 has broken CD pin. CD works but it has to be forced by
"mwr 0xFF18035C 0x1"

wl1831 is using max-freq setup based on
http://www.ti.com/lit/ug/swru437/swru437.pdf - page 13

Power up sequence is using pwrseq-simple inspired by
"ARM: dts: omap3-igep0020: Use MMC pwrseq to init SDIO WiFi"
(sha1: fd7e118c80d43496c49a4260712cd1c499a0f1b3)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Enable I2C character device
Michal Simek [Wed, 17 Aug 2016 11:12:25 +0000 (13:12 +0200)]
ARM64: zynqmp: Enable I2C character device

It is useful for handling i2c devices from user space.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Enable fixed regulators with gpio for WIFI
Michal Simek [Thu, 21 Apr 2016 14:57:56 +0000 (16:57 +0200)]
ARM64: zynqmp: Enable fixed regulators with gpio for WIFI

Wifi requires to handle GPIO and using fixed regulators with gpio is
interesting workaround.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Enable zcu100 power chip
Michal Simek [Thu, 21 Apr 2016 14:56:49 +0000 (16:56 +0200)]
ARM64: zynqmp: Enable zcu100 power chip

For doing power off via ltc2952 chip.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Enable support for led triggers
Michal Simek [Thu, 21 Apr 2016 14:47:12 +0000 (16:47 +0200)]
ARM64: zynqmp: Enable support for led triggers

For zcu100 will use these triggers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomedia: xilinx: cresample: Fix video-format property in dt example
Christian Kohn [Wed, 17 Aug 2016 01:38:52 +0000 (18:38 -0700)]
media: xilinx: cresample: Fix video-format property in dt example

Fix example in dt bindings documentation.

Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: revert commit 7e34a8f631a6a491c6b5a30443f2e0743c812d41
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:36 +0000 (14:41 +0530)]
mmc: revert commit 7e34a8f631a6a491c6b5a30443f2e0743c812d41

Implemented the new workaround for auto tuning based on
zynqmp compatible string, so removed the 'broken-tuning'
property.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: change sdhci compatible string.
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:35 +0000 (14:41 +0530)]
ARM64: zynqmp: change sdhci compatible string.

This patch changes the compatible string for sdhci node,
adds "xlnx,device_id" and "xlnx,mio_bank" property to sdhci node.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci-of-arasan: Added workaround for auto tuning.
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:34 +0000 (14:41 +0530)]
mmc: sdhci-of-arasan: Added workaround for auto tuning.

This patch adds new workaround for auto tuning and
removed existing workaround.
New workaround:
1.The "execute tuning" clears the host controller tuning
circuit and resets the tap values to zero.
2.This reset of the tap value takes a few clock cycles so
wait for few cycles ~60 cycles.
3.Reset the DLL to load an newly updated zero tap value.
4.Send CMD19/CMD21 as a part of the auto tuning process.
5.Once the auto tuning process gets completed.
6.Reset the DLL to load the newly obtained SDHC tuned tap value.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: revert commit 5cc0549fbbf7c9b4eca2015fdde47974df37d01a
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:33 +0000 (14:41 +0530)]
mmc: revert commit 5cc0549fbbf7c9b4eca2015fdde47974df37d01a

Implementing new workaround for auto tuning mode, so
removing the older workaround.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci-of-arasan: Add support for tapdelay programming
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:32 +0000 (14:41 +0530)]
mmc: sdhci-of-arasan: Add support for tapdelay programming

This patch adds support for Tap delay programming accordingly
to different SD/eMMC operating modes.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agosoc: zynqmp: Add mmc tap delay programming
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:31 +0000 (14:41 +0530)]
soc: zynqmp: Add mmc tap delay programming

This patch adds support for programming the
tap delays required for mmc driver.
'arasan_zynqmp_set_tap_delay' and 'zynqmp_dll_reset'
API's are exported so that mmc driver will use these
API's for tap delay programming.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci-of-arasan: Added new compatible string for ZynqMP.
P L Sai Krishna [Tue, 16 Aug 2016 09:11:30 +0000 (14:41 +0530)]
mmc: sdhci-of-arasan: Added new compatible string for ZynqMP.

This patch adds new compatible string "xlnx,zynqmp-8.9a"
for xilinx ZynqMP.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoDocumentation: mmc: revert commit 2c741b34a96958b75909dc0b0fb297b48746ea39
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:29 +0000 (14:41 +0530)]
Documentation: mmc: revert commit 2c741b34a96958b75909dc0b0fb297b48746ea39

As we are implementing the new workaround based on
the zynqmp compatible string, removing the 'broken-tuning'
property.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci-of-arasan: Add compatible string for ZynqMP SoC
Sai Krishna Potthuri [Tue, 16 Aug 2016 09:11:28 +0000 (14:41 +0530)]
mmc: sdhci-of-arasan: Add compatible string for ZynqMP SoC

This patch adds the xlnx,zynqmp-8.9a compatible string
to be used for ZynqMP SoC, and adds documentation for
"xlnx,device_id" and "xlnx,mio_bank" properties.

Signed-off-by: Sai Krishna Potthuri <lakshmis@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonand: arasan: Add runtime support
Shubhrajyoti Datta [Tue, 16 Aug 2016 09:18:45 +0000 (14:48 +0530)]
nand: arasan: Add runtime support

Clocks are enabled before transaction and disabled
at chip deselect. Also add the suspend and resume hooks.
Also adapt to runtime.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Reviewed-by: Punnaiah Choudary Kalluri<punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonand: arasan: balance the select and delect
Shubhrajyoti Datta [Tue, 16 Aug 2016 09:18:44 +0000 (14:48 +0530)]
nand: arasan: balance the select and delect

balance the select and de-select.
this is to aid the power gating at deselect.

Acked-by: Punnaiah Choudary Kalluri<punnaia@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agotty: serial: xuartps: Wait for rx and tx reset done status
Punnaiah Choudary Kalluri [Tue, 16 Aug 2016 06:39:50 +0000 (12:09 +0530)]
tty: serial: xuartps: Wait for rx and tx reset done status

After issuing the reset, driver is not checking the rx and tx reset
done status. So, modified driver to wait for the reset done status.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: spi-nor: fix merge issue in spi-nor driver
Naga Sureshkumar Relli [Fri, 12 Aug 2016 10:39:56 +0000 (16:09 +0530)]
mtd: spi-nor: fix merge issue in spi-nor driver

During merge tag 'v4.6' into master, one of the argument in spi-nor drivers's
erase function was changed.This patch fixes that.

Since ZynqMP GQSPI controller supports dual parallel mode configuration, as
per configuration we need to send divide by 2 offset to erase or write apis
of spi-nor.
spi_nor_erase_sector(nor, addr); here addr is actual address
spi_nor_erase_sector(nor, offset); here offset is addr/2.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Fix kernel-doc format for xpsgtr_set_rxwidth
Michal Simek [Fri, 12 Aug 2016 10:40:29 +0000 (12:40 +0200)]
phy: zynqmp: Fix kernel-doc format for xpsgtr_set_rxwidth

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Add missing header to declare exported functions
Michal Simek [Fri, 12 Aug 2016 10:33:05 +0000 (12:33 +0200)]
phy: zynqmp: Add missing header to declare exported functions

This patch removes sparse warnings:
drivers/phy/phy-zynqmp.c:311:5: warning: symbol 'xpsgtr_override_deemph'
was not declared. Should it be static?
drivers/phy/phy-zynqmp.c:328:5: warning: symbol
'xpsgtr_margining_factor' was not declared. Should it be static?
drivers/phy/phy-zynqmp.c:647:5: warning: symbol 'xpsgtr_wait_pll_lock'
was not declared. Should it be static?

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Add SGMII support to serdes driver
Anurag Kumar Vulisha [Wed, 10 Aug 2016 16:15:41 +0000 (21:45 +0530)]
phy: zynqmp: Add SGMII support to serdes driver

This patch adds The SGMII support for GEM controllers.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: use scrambler/descrambler and encoder/decoder functions for sata
Anurag Kumar Vulisha [Wed, 10 Aug 2016 16:15:40 +0000 (21:45 +0530)]
phy: zynqmp: use scrambler/descrambler and encoder/decoder functions for sata

This patch make sata misc settings to use scrambler/descrambler and
encoder/decoder functions.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agophy: zynqmp: Add scrambler/descrambler and 8b/10b encoder/decoder bypass routines
Anurag Kumar Vulisha [Wed, 10 Aug 2016 16:15:39 +0000 (21:45 +0530)]
phy: zynqmp: Add scrambler/descrambler and 8b/10b encoder/decoder bypass routines

This patch adds separate function for bypassing scrambler/descrambler and
encoder/decoder feature.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: Xilinx NWL PCIe: Updating device tree documentation with prefetchable memory...
Bharat Kumar Gogada [Tue, 9 Aug 2016 14:00:09 +0000 (19:30 +0530)]
PCI: Xilinx NWL PCIe: Updating device tree documentation with prefetchable memory space

Updating device tree documentation with prefetchable memory
sapce.
Configuration space shifted to 64-bit address space.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agostaging: apf: Modifications to migrate to kernel v4.6
Michael Gill [Wed, 10 Aug 2016 23:24:39 +0000 (16:24 -0700)]
staging: apf: Modifications to migrate to kernel v4.6

This patch adapts to minor API changes introduces as a result
of the move from v4.4 to v4.6.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Add support for 64 bit addressing
Harini Katakam [Thu, 28 Jul 2016 11:37:30 +0000 (17:07 +0530)]
net: macb: Add support for 64 bit addressing

This patch adds support for 64 bit addressing and BDs.
-> Enable 64 bit addressing in DMACFG register.
-> Set DMA mask when design config register shows support for 64 bit addr.
-> Add new BD words for higher address when 64 bit DMA support is present.
-> Add and update TBQPH and RBQPH for MSB of BD pointers.
-> Change extraction and updation of buffer addresses to use
64 bit address.
-> In gem_rx extract address in one place insted of two and use a
separate flag for RXUSED.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM64: zynqmp: Remove xlnx,id property
Michal Simek [Tue, 9 Aug 2016 13:06:58 +0000 (15:06 +0200)]
ARM64: zynqmp: Remove xlnx,id property

Remove unused xlnx,id property because it is not the part of
DT binding.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodevicetree: ARM: zynq: Add DT binding for eFuse controller
Michal Simek [Wed, 27 Jul 2016 12:16:44 +0000 (14:16 +0200)]
devicetree: ARM: zynq: Add DT binding for eFuse controller

Add DT binding for eFuse controller available at Xilinx Zynq
SoC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
7 years agomicroblaze: Modify pci specific code to support multidomain
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:54 +0000 (18:33 +0530)]
microblaze: Modify pci specific code to support multidomain

Proc entries will be created for every pci bus.
With current implementation,in multidomain same bus number
will repaeat but in different domain, which causes kernel crash
as already same bus number exists.

Return domain number when kernel requests while creating proc
entries for each bus.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: Xilinx: Read more than one function per device
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:53 +0000 (18:33 +0530)]
PCI: Xilinx: Read more than one function per device

AXI PCIe supports multifunciton device.
Removing unneccessary condition.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: Xilinx: Clear correct msi set bit
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:52 +0000 (18:33 +0530)]
PCI: Xilinx: Clear correct msi set bit

Kernel provides virtual irq number at teardown.
Get hwirq number from virtual irq and clear correct
MSI set bit and dispose virtual irq.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: Xilinx : Clear interrupt register for invalid interrupt
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:51 +0000 (18:33 +0530)]
PCI: Xilinx : Clear interrupt register for invalid interrupt

The interrupt decode register is not being cleared if
an invalid interrupt arises.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoPCI: xilinx: Keep both IRQ domains
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:50 +0000 (18:33 +0530)]
PCI: xilinx: Keep both IRQ domains

When built with MSI support the legacy domain reference is being
overwritten with MSI.
Instead creating two seperate domains for MSI and legacy, to
handle both MSI and legacy interrupts parallely.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomicroblaze: Removing PCIe Xilinx MSI dependency.
Bharat Kumar Gogada [Mon, 1 Aug 2016 13:03:49 +0000 (18:33 +0530)]
microblaze: Removing PCIe Xilinx MSI dependency.

Removing number of MSI dependecy in irq.h as
it is not required for in new upstreamed driver.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Correct CAPS masks
Harini Katakam [Fri, 29 Jul 2016 09:46:43 +0000 (15:16 +0530)]
net: macb: Correct CAPS masks

USRIO and JUMBO have the same capability mask.
Correct this and re-arrange the definitions to be in order.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: xilinx: Use readl/writel for ARM64
Michal Simek [Thu, 28 Jul 2016 12:59:50 +0000 (14:59 +0200)]
gpio: xilinx: Use readl/writel for ARM64

Use readl/writel for ARM64 instead of __raw versions.
This patch also remove compilation warnings:
drivers/gpio/gpio-xilinx.c: In function ‘xgpio_irq_mask’:
drivers/gpio/gpio-xilinx.c:300:12: warning: large integer implicitly
truncated to unsigned type [-Woverflow]
            ~XGPIO_GIER_IE);
            ^
drivers/gpio/gpio-xilinx.c:48:51: note: in definition of macro
‘xgpio_writereg’
 # define xgpio_writereg(offset, val) __raw_writel(val, offset)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Update TX and RX EXT BD registers only when required
Harini Katakam [Thu, 28 Jul 2016 11:37:18 +0000 (17:07 +0530)]
net: macb: Update TX and RX EXT BD registers only when required

TXBDEXT and RXBDEXT are related to PTP timestamping.
Use a check when updating these registers.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: emaclite: Fix arm64 compilation warnings
Michal Simek [Thu, 28 Jul 2016 13:11:48 +0000 (15:11 +0200)]
net: emaclite: Fix arm64 compilation warnings

Recast pointers with ulong instead of u32 for arm64.
This patch fixes these compilation warnings:
drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function
‘xemaclite_send_data’:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:335:35: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
   addr = (void __iomem __force *)((u32 __force)addr ^
                                   ^
drivers/net/ethernet/xilinx/xilinx_emaclite.c:335:10: warning: cast to
pointer from integer of different size [-Wint-to-pointer-cast]
   addr = (void __iomem __force *)((u32 __force)addr ^
          ^
drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function
‘xemaclite_recv_data’:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:393:36: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
    addr = (void __iomem __force *)((u32 __force)addr ^
                                    ^
drivers/net/ethernet/xilinx/xilinx_emaclite.c:393:11: warning: cast to
pointer from integer of different size [-Wint-to-pointer-cast]
    addr = (void __iomem __force *)((u32 __force)addr ^
           ^
drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function
‘xemaclite_rx_handler’:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:101:42: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
 #define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u32) adr)) % ALIGNMENT)
                                          ^
drivers/net/ethernet/xilinx/xilinx_emaclite.c:600:10: note: in expansion
of macro ‘BUFFER_ALIGN’
  align = BUFFER_ALIGN(skb->data);
          ^
In file included from include/linux/dmaengine.h:20:0,
                 from include/linux/netdevice.h:38,
                 from drivers/net/ethernet/xilinx/xilinx_emaclite.c:17:
drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function
‘xemaclite_of_probe’:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:1169:4: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
    (unsigned int __force)lp->base_addr, ndev->irq);
    ^
include/linux/device.h:1197:58: note: in definition of macro ‘dev_info’
 #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Fixed mixed declaration and code warnings
Michal Simek [Thu, 28 Jul 2016 13:39:42 +0000 (15:39 +0200)]
net: macb: Fixed mixed declaration and code warnings

This patch fixes these warnings:
drivers/net/ethernet/cadence/macb.c: In function ‘macb_handle_txtstamp’:
drivers/net/ethernet/cadence/macb.c:683:2: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
  struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
  ^
drivers/net/ethernet/cadence/macb.c: In function ‘macb_handle_rxtstamp’:
drivers/net/ethernet/cadence/macb.c:866:2: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
  struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
  ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: Add missing parentheses in comparison
Michal Simek [Thu, 28 Jul 2016 13:33:11 +0000 (15:33 +0200)]
usb: dwc3: Add missing parentheses in comparison

This patch fixes compilation warning:
drivers/usb/dwc3/core.c: In function ‘dwc3_frame_length_adjustment’:
drivers/usb/dwc3/core.c:156:64: warning: suggest parentheses around
comparison in operand of ‘&’ [-Wparentheses]
   if (!dev_WARN_ONCE(dwc->dev, (reg & DWC3_GFLADJ_REFCLK_FLADJ ==
                                                                ^
include/asm-generic/bug.h:128:27: note: in definition of macro
‘WARN_ONCE’
  int __ret_warn_once = !!(condition);   \
                           ^
drivers/usb/dwc3/core.c:156:8: note: in expansion of macro
‘dev_WARN_ONCE’
   if (!dev_WARN_ONCE(dwc->dev, (reg & DWC3_GFLADJ_REFCLK_FLADJ ==

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agosoc: xilinx: Guard code which is called only for debugfs
Michal Simek [Thu, 28 Jul 2016 13:06:21 +0000 (15:06 +0200)]
soc: xilinx: Guard code which is called only for debugfs

Some functions are called only when debugfs for PM is enabled.
This patch removes compilation warnings:
drivers/soc/xilinx/zynqmp/pm.c:251:12: warning: ‘zynqmp_pm_self_suspend’
defined but not used [-Wunused-function]
 static int zynqmp_pm_self_suspend(const u32 node,
            ^
drivers/soc/xilinx/zynqmp/pm.c:300:12: warning:
‘zynqmp_pm_abort_suspend’ defined but not used [-Wunused-function]
 static int zynqmp_pm_abort_suspend(const enum zynqmp_pm_abort_reason
reason)
            ^
drivers/soc/xilinx/zynqmp/pm.c:494:12: warning:
‘zynqmp_pm_register_notifier’ defined but not used [-Wunused-function]
 static int zynqmp_pm_register_notifier(const u32 node, const u32 event,

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agotty: serial: Initialized rxbs_status
Michal Simek [Thu, 28 Jul 2016 13:02:44 +0000 (15:02 +0200)]
tty: serial: Initialized rxbs_status

This patch removes compilation warning:
drivers/tty/serial/xilinx_uartps.c: In function ‘cdns_uart_isr’:
drivers/tty/serial/xilinx_uartps.c:313:21: warning: ‘rxbs_status’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
    if ((rxbs_status & CDNS_UART_RXBS_FRAMING)
                     ^
drivers/tty/serial/xilinx_uartps.c:245:15: note: ‘rxbs_status’ was
declared here
  unsigned int rxbs_status;

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: spi-nor: Fix flash_info assignments
Michal Simek [Thu, 28 Jul 2016 12:34:18 +0000 (14:34 +0200)]
mtd: spi-nor: Fix flash_info assignments

Because of changes in the code several compilation warnings were
generated. Fix all assignments which generate warning:
drivers/mtd/spi-nor/spi-nor.c: In function 'spi_nor_scan':
drivers/mtd/spi-nor/spi-nor.c:1836:8: warning: assignment discards
'const' qualifier from pointer target type
   info = spi_nor_match_id(name);
        ^
drivers/mtd/spi-nor/spi-nor.c:1839:8: warning: assignment discards
'const' qualifier from pointer target type
   info = spi_nor_read_id(nor);
        ^
drivers/mtd/spi-nor/spi-nor.c:1863:9: warning: assignment discards
'const' qualifier from pointer target type
    info = jinfo;
         ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agovirtio: Comment vring_map_one_sg() unused function
Michal Simek [Thu, 28 Jul 2016 11:19:22 +0000 (13:19 +0200)]
virtio: Comment vring_map_one_sg() unused function

This patch removes compilation warning caused that one internal function
is not called.

Warning:
drivers/virtio/virtio_ring.c:165:19: warning: 'vring_map_one_sg' defined
but not used [-Wunused-function]
 static dma_addr_t vring_map_one_sg(const struct vring_virtqueue *vq,

Comment this function for now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoARM: Add local tick_receive_broadcast_local()
Michal Simek [Thu, 28 Jul 2016 11:15:28 +0000 (13:15 +0200)]
ARM: Add local tick_receive_broadcast_local()

Handler function is defined as void (*handler)(void)

tick_receive_broadcast is returning int instead of void
which is showed by compilation error:
arch/arm/kernel/smp.c:509:2: warning: initialization from incompatible
pointer type
  S(IPI_TIMER, tick_receive_broadcast),
  ^
arch/arm/kernel/smp.c:509:2: warning: (near initialization for
'ipi_types[1].handler')

This patch creates local version of this function to avoid
compilation warning.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoinput: gpio_keys: Remove unused variable
Michal Simek [Thu, 28 Jul 2016 11:14:53 +0000 (13:14 +0200)]
input: gpio_keys: Remove unused variable

This patch remove compilation warning:
drivers/input/keyboard/gpio_keys.c: In function
'gpio_keys_get_devtree_pdata':
drivers/input/keyboard/gpio_keys.c:652:22: warning: unused variable
'flags' [-Wunused-variable]
   enum of_gpio_flags flags;

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: zynqmp: Add support for 44-bit address space on AXI in DMA mode
Naga Sureshkumar Relli [Thu, 28 Jul 2016 09:46:42 +0000 (15:16 +0530)]
spi: zynqmp: Add support for 44-bit address space on AXI in DMA mode

Added dma_set_mask API with supported mask as 44bit, since GQSPI supports
maximum of 44-bit address space. With out this API, dma mapping will fail when
the memory map is beyond 32-bit address space.

Signed-off-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agosoc: zynqmp: delete the .remove routine
Shubhrajyoti Datta [Tue, 26 Jul 2016 08:17:20 +0000 (13:47 +0530)]
soc: zynqmp: delete the .remove routine

The .remove would never be called as the pm.c
is a bool. Delete the .remove code as it is uncallable.
Also move it to builtin_platform driver.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agosoc: zynqmp: Compile pm.c always for zynqmp
Shubhrajyoti Datta [Tue, 26 Jul 2016 08:17:18 +0000 (13:47 +0530)]
soc: zynqmp: Compile pm.c always for zynqmp

The pm.c is actually the plat support.
All the secure transaction go through it.
The clocks, power domains and reset need it so
lets compile it always for zynqmp.

Also remove the ZYNQMP_PM_API dependency for reset controller.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agosoc: zynqmp: Add early support for the pm.c functions
Shubhrajyoti Datta [Tue, 26 Jul 2016 08:17:17 +0000 (13:47 +0530)]
soc: zynqmp: Add early support for the pm.c functions

Splits the current pm.c to have a init function that can be
called early and the existing probe.
This should help drivers that need the platform management
functions early

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodrm: xilinx: dp: Use signed type as the value can be negative
Hyun Kwon [Wed, 27 Jul 2016 16:46:06 +0000 (09:46 -0700)]
drm: xilinx: dp: Use signed type as the value can be negative

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
7 years agofix platform_no_drv_owner.cocci warnings
Julia Lawall [Wed, 27 Jul 2016 16:46:05 +0000 (09:46 -0700)]
fix platform_no_drv_owner.cocci warnings

No need to set .owner here. The core will do it.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
7 years agoARM64: zynqmp: pci: Updating device tree as per upstream
Bharat Kumar Gogada [Tue, 19 Jul 2016 15:19:29 +0000 (20:49 +0530)]
ARM64: zynqmp: pci: Updating device tree as per upstream

Updating required device tree changes as per mainlined driver
from 4.6 kernel.

Signed-off-by: Bharat Kumar Gogada <bharatku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: of-simple: Add missing platform_set_drvdata
Filip Drazic [Fri, 10 Jun 2016 14:53:53 +0000 (16:53 +0200)]
usb: dwc3: of-simple: Add missing platform_set_drvdata

Device driver data is accessed in driver's remove method.
This fixes the following error when trying to unbind device from
this driver:

Unable to handle kernel NULL pointer dereference at virtual address 00000010

Signed-off-by: Filip Drazic <filip.drazic@aggios.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: macb: Handle HRESP error
Harini Katakam [Mon, 18 Jul 2016 06:40:08 +0000 (12:10 +0530)]
net: macb: Handle HRESP error

Handle HRESP error by doing a SW reset of RX and TX and
re-initializing the descriptors, RX and TX queue pointers.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>