]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
9 years agoRevert "ARM: zynq defconfig: Enable debug options" xilinx-v2014.2.01
Michal Simek [Sat, 7 Jun 2014 17:53:39 +0000 (19:53 +0200)]
Revert "ARM: zynq defconfig: Enable debug options"

This reverts commit e8a0f03e48a0b28fb2d8137745bc7dd9da61d724.

Disable debug feature for this defconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
9 years agonet: zynq: gem: Use hardware assisted system time stamping xilinx-v2014.2
Punnaiah Choudary Kalluri [Mon, 19 May 2014 13:55:59 +0000 (19:25 +0530)]
net: zynq: gem: Use hardware assisted system time stamping

Since the hardware frequency adjustment is complex,using software
method to do that.

In this mode, PTP packets are still time stamped by the NIC, but the clock
which is controlled by PTPd is the system time. For this to work, the time
stamps generated inside the NIC are transformed into system time before
feeding them into the normal PTPd machinery: each time a NIC time stamp is
extracted from the NIC, the NIC system time offset is measured and added to
the NIC time stamp to obtain the corresponding system time stamp.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Remove unused global variable
Soren Brinkmann [Tue, 27 May 2014 23:18:42 +0000 (16:18 -0700)]
ARM: zynq: Remove unused global variable

The variable 'zynq_clk_suspended' is no longer used by anybody. Get rid
of it.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoi2c: cadence: Handle > 252 byte transfers
Harini Katakam [Fri, 16 May 2014 11:11:37 +0000 (16:41 +0530)]
i2c: cadence: Handle > 252 byte transfers

The I2C controller sends a NACK to the slave when transfer size register
reaches zero, irrespective of the hold bit. So, in order to handle transfers
greater than 252 bytes, the transfer size register has to be maintained at a
value >= 1. This patch implements the same.
The interrupt status is cleared at the beginning of the isr instead of
the end, to avoid missing any interrupts - this is in sync with the new
transfer handling.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomedia: xilinx: Reordered mutexes initialization
Radhey Shyam Pandey [Mon, 26 May 2014 11:32:43 +0000 (17:02 +0530)]
media: xilinx: Reordered mutexes initialization

Reordered mutexes initialization so that there is no
need of destroying mutex incase media_entity_init()
fails.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomedia: xilinx: Fix error handling
Radhey Shyam Pandey [Mon, 26 May 2014 11:32:29 +0000 (17:02 +0530)]
media: xilinx: Fix error handling

Fix error handling in xvip_graph_dma_init()
Avoid multiple free of vb2 dma context

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomedia: xilinx: Added DMA error handling
Radhey Shyam Pandey [Mon, 26 May 2014 11:32:13 +0000 (17:02 +0530)]
media: xilinx: Added DMA error handling

Validate dma tx descriptor returned from
dmaengine_prep_slave_single() and reports
error if any.
Next dequeue operation fails with -ENODEV

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoRevert "media: xilinx: dma: Workaround for bytesperline"
Radhey Shyam Pandey [Mon, 26 May 2014 11:26:07 +0000 (16:56 +0530)]
Revert "media: xilinx: dma: Workaround for bytesperline"

This reverts commit b4859c939e1febb638e23accc1c3a66b72e10ccc.
Zynq Base TRD LogiCVC DRM integration requires programming
bytesperline field i.e stride is not same as width.
So we need to get rid of this workaround and send mplayer
fix to its mailing list.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: DT: Migrate UART to Cadence binding
Soren Brinkmann [Wed, 14 May 2014 21:43:04 +0000 (14:43 -0700)]
ARM: zynq: DT: Migrate UART to Cadence binding

The Zynq UART is Cadence IP and the driver has been renamed accordingly.
Migrate the DT to use the new binding for the UART driver.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
(cherry picked from commit 271b35d5c200d69d5fb317a976c8f24383c929a7)

10 years agotty: cadence: Document DT binding
Soren Brinkmann [Wed, 14 May 2014 21:43:03 +0000 (14:43 -0700)]
tty: cadence: Document DT binding

Add binding documentation for the Cadence UART.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
(cherry picked from commit 09b6771798f262bedba51bbb66027564b0ff226e)

10 years agotty: xuartps: Rebrand driver as Cadence UART
Soren Brinkmann [Wed, 14 May 2014 21:43:02 +0000 (14:43 -0700)]
tty: xuartps: Rebrand driver as Cadence UART

Zynq's UART is Cadence IP. Make this visible in the prompt in kconfig
and additional comments in the driver.
This also renames functions and symbols, as far as possible without
breaking user space API, to reflect the Cadence origin. This is achieved
through simple search and replace:
 - s/XUARTPS/CDNS_UART/g
 - s/xuartps/cdns_uart/g
The only exceptions are PORT_XUARTPS and the driver name, which stay as is,
due to their exposure to user space. As well as the - no legacy -
compatibility string 'xlnx,xuartps'

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d9bb3fb12685209765fd838bec69d701d7b479e5)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: xuartps: Don't write IRQ disable register to enable interrupts
Soren Brinkmann [Wed, 14 May 2014 21:43:01 +0000 (14:43 -0700)]
tty: xuartps: Don't write IRQ disable register to enable interrupts

A comment states, that, according to the data sheet, to enable
interrupts the disable register should be written, but the enable
register could be left untouched. And it suspsects a HW bug requiring
to write both.
Reviewing the data sheet, these statements seem wrong. Just as one would
expect. Writing to the enable/disable register enables/disables
interrupts.
Hence the misleading comment and needless write to the disable register
are removed from the enable sequence.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b494a5fae452fc43519872565892fa873f6ea4fb)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: xuartps: Refactor read-modify-writes
Soren Brinkmann [Wed, 14 May 2014 21:43:00 +0000 (14:43 -0700)]
tty: xuartps: Refactor read-modify-writes

A lot of read-modify-write sequences used a one-line statement which
nests a readl() within a writel(). Convert this into code sequences that
make the three steps more obvious.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 35dc5a538fb54bc30bdedf4c825da5c970b5ff90)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: xuartps: Print warning in clock notifier
Soren Brinkmann [Wed, 14 May 2014 21:42:59 +0000 (14:42 -0700)]
tty: xuartps: Print warning in clock notifier

Print a warning if the clock notifier rejects a clock frequency change
to facilitate debugging (see:
http://thread.gmane.org/gmane.linux.ports.arm.kernel/304329/focus=304379)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5ce15d2d1efb9cacab9a331c730cc805124ee612)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: xuartps: Clean up
Soren Brinkmann [Wed, 14 May 2014 21:42:58 +0000 (14:42 -0700)]
tty: xuartps: Clean up

This is all white space and comment clean up. Mostly reformatting
comments.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e555a21149806b21ae63ba0b02d42ce100db5639)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: xuartps: Initialize ports according to aliases
Michal Simek [Wed, 14 May 2014 21:42:57 +0000 (14:42 -0700)]
tty: xuartps: Initialize ports according to aliases

Register port numbers according to order in DT aliases.
If aliases are not defined, order in DT is used.
If aliases are defined, register port id based
on that.
This patch ensures proper ttyPS0/1 assignment.

[soren]: Combined integer declarations in probe(), removed warning message
if no alias is found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 928e9263492069eeebb4c867b841508837895e0e)

10 years agotty: xuartps: Fix kernel-doc errors in the driver
Michal Simek [Wed, 14 May 2014 21:42:56 +0000 (14:42 -0700)]
tty: xuartps: Fix kernel-doc errors in the driver

No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 489810a1a6efa08eb8168b96dcc22d71be2867b9)

10 years agoARM: zynq: Fix uart0 early console virtual address
Michal Simek [Wed, 14 May 2014 14:46:00 +0000 (16:46 +0200)]
ARM: zynq: Fix uart0 early console virtual address

Virtual address have to have the same offset within
a 2MB aligned section of virtual/phycial address space.

Fix uart0 virtual address to be align with physical one.
Also remove UART_SIZE which is completely unused.

Reported-by: Russ Smith <russells@google.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotime: Fixup fallout from recent clockevent/tick changes
Thomas Gleixner [Fri, 25 Apr 2014 15:32:12 +0000 (08:32 -0700)]
time: Fixup fallout from recent clockevent/tick changes

Make the stub function static inline instead of static and move the
clockevents related function into the proper ifdeffed section.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
(cherry picked from commit f1689bb7abec8e2e670d8ad11eaa86d54bad8cfd)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: macb: Fix race between HW and driver
Soren Brinkmann [Sun, 4 May 2014 22:43:02 +0000 (15:43 -0700)]
net: macb: Fix race between HW and driver

Under "heavy" RX load, the driver cannot handle the descriptors fast
enough. In detail, when a descriptor is consumed, its used flag is
cleared and once the RX budget is consumed all descriptors with a
cleared used flag are prepared to receive more data. Under load though,
the HW may constantly receive more data and use those descriptors with a
cleared used flag before they are actually prepared for next usage.

The head and tail pointers into the RX-ring should always be valid and
we can omit clearing and checking of the used flag.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: macb: Remove 'unlikely' optimization
Soren Brinkmann [Sun, 4 May 2014 22:43:01 +0000 (15:43 -0700)]
net: macb: Remove 'unlikely' optimization

Coverage data suggests that the unlikely case of receiving data while
the receive handler is running may not be that unlikely.
Coverage data after running iperf for a while:
    91320:  891: work_done = bp->macbgem_ops.mog_rx(bp, budget);
    91320:  892: if (work_done < budget) {
     2362:  893: napi_complete(napi);
        -:  894:
        -:  895: /* Packets received while interrupts were disabled */
     4724:  896: status = macb_readl(bp, RSR);
     2362:  897: if (unlikely(status)) {
      762:  898: if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
      762:  899: macb_writel(bp, ISR, MACB_BIT(RCOMP));
        -:  900: napi_reschedule(napi);
        -:  901: } else {
     1600:  902: macb_writel(bp, IER, MACB_RX_INT_FLAGS);
        -:  903: }
        -:  904: }

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: macb: Re-enable RX interrupt only when RX is done
Soren Brinkmann [Sun, 4 May 2014 22:43:00 +0000 (15:43 -0700)]
net: macb: Re-enable RX interrupt only when RX is done

When data is received during the driver processing received data the
NAPI is re-scheduled. In that case the RX interrupt should not be
re-enabled.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: macb: Clear interrupt flags
Soren Brinkmann [Sun, 4 May 2014 22:42:59 +0000 (15:42 -0700)]
net: macb: Clear interrupt flags

A few interrupt flags were not cleared in the ISR, resulting in a sytem
trapped in the ISR in cases one of those interrupts occurred. Clear all
flags to avoid such situations.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: macb: Pass same size to DMA_UNMAP as used for DMA_MAP
Soren Brinkmann [Sun, 4 May 2014 22:42:58 +0000 (15:42 -0700)]
net: macb: Pass same size to DMA_UNMAP as used for DMA_MAP

Just as commit "net: macb: DMA-unmap full rx-buffer"
(48330e08fa168395b9fd9f369f06cca1df204361), pass the size that
was used for mapping the memory also to the unmap routine to
avoid warnings from the DMA_API.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agousb: gadget: zynq: Fix usb ethernet gadget probe error
Punnaiah Choudary Kalluri [Tue, 13 May 2014 04:42:35 +0000 (10:12 +0530)]
usb: gadget: zynq: Fix usb ethernet gadget probe error

This patch is based on the below commit
"usb: gadget: add "maxpacket_limit" field to struct usb_ep"
(sha1:e117e742d310683b410951faeab4b13b6c3c609f)

Value of "maxpacket_limit" should be set in UDC driver probe function, using
usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
set choosen value to both "maxpacket_limit" and "maxpacket" fields.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Tested-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: defconfig: Enable Xilinx DRM and DP
Michal Simek [Fri, 9 May 2014 05:12:31 +0000 (07:12 +0200)]
ARM: zynq: defconfig: Enable Xilinx DRM and DP

Enable xilinx DRM/DP drivers by default to have
better build coveradge.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: defconfig: Enable CMA support
Michal Simek [Thu, 8 May 2014 05:55:42 +0000 (07:55 +0200)]
ARM: zynq: defconfig: Enable CMA support

Enable CMA support and set limit to 128MB.
Xilinx DRM  driver uses CMA for allocating
contiguous memory blocks.

Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Enable big-endian
Michal Simek [Fri, 11 Apr 2014 13:05:56 +0000 (15:05 +0200)]
ARM: zynq: Enable big-endian

Enable ARCH_SUPPORTS_BIG_ENDIAN in Kconfig.

zynq_secondary_trampoline is the first function
that is called on secondary CPU.
Reference:
"ARM: mcpm: fix big endian issue in mcpm startup code"
(sha1: 519ceb9fd10cd7e836d0aa97b2068cc9e97f463b)

Fix early printk support. Based on:
"ARM: pl01x debug code endian fix"
(sha1: 76e3faf156fa95b6465e747d702b94faf67117fc)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: zynq: gem: Use readl/writel_relaxed instead of __raw
Michal Simek [Fri, 11 Apr 2014 13:36:06 +0000 (15:36 +0200)]
net: zynq: gem: Use readl/writel_relaxed instead of __raw

For supporting ARM big-endian is necessary to use
proper IO endianess accessors.

Based on Ben Dooks BE guide.
Similar conversion is done here:
"mv_xor: use {readl, writel}_relaxed instead of __raw_{readl, writel}"
(sha1: 5733c38ae3473115ac7df3fe19bd2502149d8c51)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoclocksource: cadence_ttc: Use readl/writel_relaxed instead of __raw
Michal Simek [Fri, 11 Apr 2014 13:39:29 +0000 (15:39 +0200)]
clocksource: cadence_ttc: Use readl/writel_relaxed instead of __raw

For supporting ARM big-endian is necessary to use
proper IO endianess accessors.

Based on Ben Dooks BE guide.
Similar conversion is done here:
"mv_xor: use {readl, writel}_relaxed instead of __raw_{readl, writel}"
(sha1: 5733c38ae3473115ac7df3fe19bd2502149d8c51)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xylon: irq: replace DRM_WAKEUP() with wake_up()
Hyun Kwon [Tue, 6 May 2014 02:52:47 +0000 (19:52 -0700)]
drm: xylon: irq: replace DRM_WAKEUP() with wake_up()

DRM_WAKEUP() has been removed, so replace DRM_WAKEUP() call with wake_up().

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDocumentation: devicetree: drm: xilinx: DisplayPort(dp)
Hyun Kwon [Tue, 6 May 2014 02:52:46 +0000 (19:52 -0700)]
Documentation: devicetree: drm: xilinx: DisplayPort(dp)

Add the devicetree bindings documentation for Xilinx DisplayPort driver.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: dp: Add the DisplayPort driver
Hyun Kwon [Tue, 6 May 2014 02:52:45 +0000 (19:52 -0700)]
drm: xilinx: dp: Add the DisplayPort driver

This patch adds a driver for the DisplayPort soft IP core. The DisplayPort
IP core supports transmission of serial-digital video for display devices.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDocumentation: devicetree: bindings: drm: xilinx: Add the plane manager format
Hyun Kwon [Tue, 6 May 2014 02:52:44 +0000 (19:52 -0700)]
Documentation: devicetree: bindings: drm: xilinx: Add the plane manager format

Add the property to specify the format of plane manager. This allows to
configure the format instead of using the fixed value.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: plane: Add the format property in the planes node
Hyun Kwon [Tue, 6 May 2014 02:52:43 +0000 (19:52 -0700)]
drm: xilinx: plane: Add the format property in the planes node

Add the format property in the planes node. This allows to configure
the pixel format properly as the format can differ depending on configuration.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: drv: Fix the format descriptor
Hyun Kwon [Tue, 6 May 2014 02:52:42 +0000 (19:52 -0700)]
drm: xilinx: drv: Fix the format descriptor

Fix the Xilinx RGB format to be 24 bit RGB format, and add one more descriptor
for XRGB format with 24 bit depth and 32 bit pixel.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: drv: Remove explicit call of destroy functions
Hyun Kwon [Tue, 6 May 2014 02:52:41 +0000 (19:52 -0700)]
drm: xilinx: drv: Remove explicit call of destroy functions

drm_mode_config_cleanup() clean up drm objects, so no need to call destroy
functions in the error exit.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDocumentation: devicetree: bindings: drm: xilinx: Add the connector type
Hyun Kwon [Tue, 6 May 2014 02:52:40 +0000 (19:52 -0700)]
Documentation: devicetree: bindings: drm: xilinx: Add the connector type

Add the connector type property in the node. User can specify the type of
connector to use, and the value is used to initialize the drm connector in
the connector driver.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: connector: Configure the type from DT property
Hyun Kwon [Tue, 6 May 2014 02:52:39 +0000 (19:52 -0700)]
drm: xilinx: connector: Configure the type from DT property

The connector can be either HDMI or DisplayPort depending on which encoder
slave is used. Add the struct xilinx_drm_connector_type to have supported
connector types, and decide the type based on DT.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDocumentation: devicetree: bindings: drm: xilinx: Add 'xlnx' prefix
Hyun Kwon [Tue, 6 May 2014 02:52:38 +0000 (19:52 -0700)]
Documentation: devicetree: bindings: drm: xilinx: Add 'xlnx' prefix

Add 'xlnx' prefix to Xilinx IP core specific properties.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: Add the 'xlnx' prefix to dt properties
Hyun Kwon [Tue, 6 May 2014 02:52:37 +0000 (19:52 -0700)]
drm: xilinx: Add the 'xlnx' prefix to dt properties

Add the 'xlnx' prefix to Xilinx IP core specific properties.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: encoder: Initialize the drm encoder before the encoder slave
Hyun Kwon [Tue, 6 May 2014 02:52:36 +0000 (19:52 -0700)]
drm: xilinx: encoder: Initialize the drm encoder before the encoder slave

drm_encoder_init() and drm_encoder_helper_add() need to be called before
initializing the encoder slave. The encoder slave can generate interrupts
right after initalization, which may result in error from not initialized
drm device.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: encoder: Support encoder slaves on a platform bus
Hyun Kwon [Tue, 6 May 2014 02:52:35 +0000 (19:52 -0700)]
drm: xilinx: encoder: Support encoder slaves on a platform bus

The Xilinx display pipeline can have encoder slaves on a platform bus,
so encoder slaves on a platform bus support is added in addition to
i2c encoder slaves.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: encoder: Change the name 'i2c_slave' to 'i2c_slv'
Hyun Kwon [Tue, 6 May 2014 02:52:34 +0000 (19:52 -0700)]
drm: xilinx: encoder: Change the name 'i2c_slave' to 'i2c_slv'

This is needed to improve consistency of naming when 'platform_slv' will
be added, as the name is long.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: platform encoder driver support
Hyun Kwon [Tue, 6 May 2014 02:52:33 +0000 (19:52 -0700)]
drm: platform encoder driver support

Add struct drm_platform_encoder_driver. This structure can be used for
the encoder slave drivers on a platform bus. The i2c specific assumption
better be removed, and other drm encoder slave interfaces would be updated
to be more generic.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xylon: connector: Call the encoder slave's mode_valid() function
Hyun Kwon [Tue, 6 May 2014 02:52:32 +0000 (19:52 -0700)]
drm: xylon: connector: Call the encoder slave's mode_valid() function

Call the mode valid function of the necoder slave, and let the encoder
slave driver check validity of given mode.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: connector: Call the encoder slave's mode_valid() function
Hyun Kwon [Tue, 6 May 2014 02:52:31 +0000 (19:52 -0700)]
drm: xilinx: connector: Call the encoder slave's mode_valid() function

Call the mode valid function of the encoder slave, and let the encoder
slave driver check validity of given mode.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: adv7511: Add adv7511_encoder_mode_valid() function
Hyun Kwon [Tue, 6 May 2014 02:52:30 +0000 (19:52 -0700)]
drm: adv7511: Add adv7511_encoder_mode_valid() function

Add adv7511_encoder_mode_valid() function. This valid check code was
implemented in the drm connector driver, but this check should be done in
the adv7511 driver.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: encoder: Remove dependency on adv7511
Hyun Kwon [Tue, 6 May 2014 02:52:29 +0000 (19:52 -0700)]
drm: xilinx: encoder: Remove dependency on adv7511

The previous adv7511 patch moves the dependency code to inside the adv7511
driver. This makes the xilinx encoder more generic to have other encoders.
Do not call encoder_sfuncs->set_config() when a mode is set, as the adv7511
driver handles it internally.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: adv7511: Configure adv7511 with default values
Hyun Kwon [Tue, 6 May 2014 02:52:28 +0000 (19:52 -0700)]
drm: adv7511: Configure adv7511 with default values

This patch adds adv7511_set_default_config() which configures adv7511 device
with default values. This configuration can be overwritten with custom values
when client driver calls adv7511_set_config() explicitly.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: adv7511: Add the rgb format flag to adv7511_link_config
Hyun Kwon [Tue, 6 May 2014 02:52:27 +0000 (19:52 -0700)]
drm: adv7511: Add the rgb format flag to adv7511_link_config

Add the rgb format boolean flag to struct adv7511_link_config. This was in
the drm encoder driver, but having it in the adv7511 driver would remove
direct dependency. The flag is copied to the struct adv7511 to be used for
the transmitter configuration.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDRM: adv7511: Avoid uneccessary disconnected events
Lars-Peter Clausen [Wed, 16 Oct 2013 12:52:21 +0000 (14:52 +0200)]
DRM: adv7511: Avoid uneccessary disconnected events

Only insert a delayed disconnected event when we transition from connected to
connect. If we transition from disconnected to connected there is no need for
this since the system will already assume that the monitor was disconnected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
10 years agoDRM: adv7511: Properly initialize dpms_mode and status
Lars-Peter Clausen [Wed, 16 Oct 2013 12:50:16 +0000 (14:50 +0200)]
DRM: adv7511: Properly initialize dpms_mode and status

Set dpms_mode to DRM_MODE_DPMS_OFF and status to connector_status_disconnected
to make sure that they match the state of the chip. This fixes an issue where
the monitor was incorrectly reported as disconnected during cold boot.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
10 years agodrm: adv7511: Fix use after free
Lars-Peter Clausen [Wed, 4 Sep 2013 15:35:05 +0000 (17:35 +0200)]
drm: adv7511: Fix use after free

We need to use the free the old edid buffer not the new one.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
10 years agospi: zynq-qspi: Dont write more than requested bytes to rxbuf
Harini Katakam [Mon, 5 May 2014 09:33:14 +0000 (15:03 +0530)]
spi: zynq-qspi: Dont write more than requested bytes to rxbuf

In case of dual parallel odd byte transfer, write even bytes and
read bytes accordingly but write only the requested number of bytes to rxbuf.
Otherwise any user data adjacent to rxbuf might be corrupted.
Improve related comments.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Leave L2 cache enabled during suspend
Soren Brinkmann [Thu, 1 May 2014 16:36:40 +0000 (09:36 -0700)]
ARM: zynq: Leave L2 cache enabled during suspend

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Synchronise zynq_cpu_die/kill
Soren Brinkmann [Thu, 1 May 2014 16:36:39 +0000 (09:36 -0700)]
ARM: zynq: Synchronise zynq_cpu_die/kill

Avoid races and add synchronisation between the arch specific
kill and die routines.

The same synchronisation issue was fixed on IMX platform
by this commit:
"ARM: imx: fix sync issue between imx_cpu_die and imx_cpu_kill"
(sha1: 2f3edfd7e27ad4206acbc2ae99c9df5f46353024)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Rename zynq_platform_cpu_die to zynq_cpu_die
Michal Simek [Thu, 1 May 2014 16:36:38 +0000 (09:36 -0700)]
ARM: zynq: Rename zynq_platform_cpu_die to zynq_cpu_die

Rename zynq_platform_cpu_die() to zynq_cpu_die()
to match the name of the other Zynq SMP ops.
Also use kernel-doc format to document this function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Remove hotplug.c
Soren Brinkmann [Thu, 1 May 2014 16:36:37 +0000 (09:36 -0700)]
ARM: zynq: Remove hotplug.c

Remove hotplug.c and move zynq_platform_cpu_die() to platsmp where all
other SMP ops are defined.
And make zynq_platform_cpu_die static.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Remove redundant code from hotplug
Soren Brinkmann [Thu, 1 May 2014 16:36:36 +0000 (09:36 -0700)]
ARM: zynq: Remove redundant code from hotplug

When secondary cores are hotplugged, their reset gets asserted and cache
operations are handled in the core. Due to most of the Zynq's
arch-specific hotplug code can be removed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Final syncup with mainline driver
Michal Simek [Tue, 6 May 2014 10:33:27 +0000 (12:33 +0200)]
spi: cadence: Final syncup with mainline driver

Trivial changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoDocumentation: devicetree: Update spi cadence bindings doc
Harini Katakam [Tue, 6 May 2014 09:29:12 +0000 (14:59 +0530)]
Documentation: devicetree: Update spi cadence bindings doc

Add xilinx compatible string along with cadence.
Compatible string should be first in the node.
Make num-cs optional property.
Add is-decoded-cs property.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Add ARM dependency
Harini Katakam [Tue, 6 May 2014 09:29:11 +0000 (14:59 +0530)]
spi: cadence: Add ARM dependency

In Kconfig, add ARM dependency because readl/writel_relaxed are used.
Remove dependency on SPI_MASTER as this is already under "if SPI_MASTER".

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Remove MODULE_ALIAS; add xilinx compatible string too
Harini Katakam [Tue, 6 May 2014 09:29:10 +0000 (14:59 +0530)]
spi: cadence: Remove MODULE_ALIAS; add xilinx compatible string too

Remove MODULE_ALIAS.
Add xilinx specific compatible string along with IP compatible string
according to mainline suggestions.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Rename remaining_byte and requested_bytes
Harini Katakam [Tue, 6 May 2014 09:29:09 +0000 (14:59 +0530)]
spi: cadence: Rename remaining_byte and requested_bytes

Rename to tx_bytes and rx_bytes to be clear.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Probe and remove cleanup
Harini Katakam [Tue, 6 May 2014 09:29:08 +0000 (14:59 +0530)]
spi: cadence: Probe and remove cleanup

Remove unbalanced master_put().
Remove unecessary prints.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Chip select related changes
Harini Katakam [Tue, 6 May 2014 09:29:07 +0000 (14:59 +0530)]
spi: cadence: Chip select related changes

Change chip select property name to "num-cs". Use a default value
instead of giving error when num-cs is not found.
Add "is-decoded-cs" property for using extended slave select; make
necessary changes in cdns_spi_chipselect function.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Suspend/Resume cleanup
Harini Katakam [Tue, 6 May 2014 09:29:06 +0000 (14:59 +0530)]
spi: cadence: Suspend/Resume cleanup

Remove use of driver state in probe, suspend, resume and prep_transfer_hw.
Just call master suspend/resume and disable_unprepare or prepare_enable clocks
as required in suspend/resume.
Remove debug prints in suspend/resume.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: setup cleanup
Harini Katakam [Tue, 6 May 2014 09:29:05 +0000 (14:59 +0530)]
spi: cadence: setup cleanup

Make CPOL/CPHA configuration a separate function. Since these dont vary
between transfers and need to be set when preparing hw before enabling spi,
call from prep_transfer_hw.
Remove spi_setup as this is no longer required.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Use transfer_one hook
Harini Katakam [Tue, 6 May 2014 09:29:04 +0000 (14:59 +0530)]
spi: cadence: Use transfer_one hook

Implement transfer_one and set_cs functions. Change initialization, completion
and irq handling accordingly. Remove timeout check as core does this.
Remove reset function as it is no longer used.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Make register read and write operations static inline functions
Harini Katakam [Tue, 6 May 2014 09:29:03 +0000 (14:59 +0530)]
spi: cadence: Make register read and write operations static inline functions

Make cdns_spi_read and cdns_spi_write static inline functions which
take driver instance pointer, offset, data as inputs and perform necessary
read/write operation.
Modify init_hw function to pass instance pointer instead of register base address.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: irq related cleanup
Harini Katakam [Tue, 6 May 2014 09:29:02 +0000 (14:59 +0530)]
spi: cadence: irq related cleanup

Request irq after init_hw in probe.
Check for irq<=0 as 0 is also considered error condition.
Return IRQ_HANDLED only when interrupt is handled, otherwise return IRQ_NONE.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Use bits per word checks in core
Harini Katakam [Tue, 6 May 2014 09:29:01 +0000 (14:59 +0530)]
spi: cadence: Use bits per word checks in core

Set master->bits_per_word_mask. Remove checks in driver.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: cadence: Use max speed checks in the core
Harini Katakam [Tue, 6 May 2014 09:29:00 +0000 (14:59 +0530)]
spi: cadence: Use max speed checks in the core

Set master->max_speed_hz to let core perform necessary checks.
Remove checks in the driver.
If transfer speed is requested as zero after checks in the core,
dont set max speed, default to min speed.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agotty: serial: uartlite: Specify time for sending chars
Michal Simek [Mon, 5 May 2014 14:03:55 +0000 (16:03 +0200)]
tty: serial: uartlite: Specify time for sending chars

Xilinx MDM (Microblaze Debug Module) also contains
uart interface via JTAG which is compatible with
uartlite driver. This interface is really slow
that's why timeout is setup to 1s.

Make this time delay not to be cpu speed dependent.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomicroblaze: Wire-up new system calls sched_setattr/getattr
Michal Simek [Wed, 12 Mar 2014 09:18:30 +0000 (10:18 +0100)]
microblaze: Wire-up new system calls sched_setattr/getattr

Wire-up sched_setattr/getattr syscalls.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: gem: Do not probe phy if phy-handle is not setup
Michal Simek [Thu, 1 May 2014 07:23:08 +0000 (09:23 +0200)]
net: gem: Do not probe phy if phy-handle is not setup

Driver doesn't support automatic phy detection
as macb driver that's why don't crash when phy is not found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Nathan Rossi <nathan.rossi@xilinx.com>
10 years agomedia: xilinx: dma: Stop entity chain walk at the entity with no sink pad
Hyun Kwon [Fri, 25 Apr 2014 02:38:59 +0000 (19:38 -0700)]
media: xilinx: dma: Stop entity chain walk at the entity with no sink pad

When starting or stopping the pipeline, the pipeline driver walks
the entities chain, and starts or stops all of them. When the walk reaches
the entity with no sink pad, walk needs to stop. xvip_get_entity_sink()
returns either the valid sink pad, or NULL when the entity doesn't have any
sink pad. When NULL is returned, stop the walk.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Acked-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: i2c: adv7511: Initialize the DPMS value in adv7511_probe()
Hyun Kwon [Sat, 26 Apr 2014 02:38:42 +0000 (19:38 -0700)]
drm: i2c: adv7511: Initialize the DPMS value in adv7511_probe()

Initialize the DPMS value to DRM_MODE_DPMS_OFF in adv7511_probe() function.
Otherwise, the value is set to DRM_MODE_DPMS_ON(=0) which doesn't reflect
the actual device's DPMS state. This also results in not turning on
the device properly.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: vtc: Return IRQ_NONE for no interrupt
Hyun Kwon [Sat, 26 Apr 2014 02:38:41 +0000 (19:38 -0700)]
drm: xilinx: vtc: Return IRQ_NONE for no interrupt

Return IRQ_NONE in the interrupt handler, when there's no interrupt.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: drv: Set bpp and color depth to drm_framebuffer
Hyun Kwon [Sat, 26 Apr 2014 02:38:40 +0000 (19:38 -0700)]
drm: xilinx: drv: Set bpp and color depth to drm_framebuffer

The drm crtc helper doesn't set bpp and color depth for non RGB format
drm_framebuffer, and that results in not supporting YUV format planes
properly. This patch fixes and the YUV format drm_framebuffer can be allocated
and used for planes.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: drv: Add color depth info to the format descriptor
Hyun Kwon [Sat, 26 Apr 2014 02:38:39 +0000 (19:38 -0700)]
drm: xilinx: drv: Add color depth info to the format descriptor

Add color depth info to the the format descriptor. xilinx_drm_format_depth()
can be used to retrieve the color depth value corresponding to the given drm
format code.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodrm: xilinx: Use the correct drm format code for yuv422 format
Hyun Kwon [Sat, 26 Apr 2014 02:38:38 +0000 (19:38 -0700)]
drm: xilinx: Use the correct drm format code for yuv422 format

Use the correct drm format code, DRM_FORMAT_YUYV, for Xilinx yuv422 format.

Signed-off-by: Hyun Kwon <hyunk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomedia: xilinx: dma: Change vdma configuration to cyclic-mode
Hyun Kwon [Tue, 18 Mar 2014 16:18:13 +0000 (09:18 -0700)]
media: xilinx: dma: Change vdma configuration to cyclic-mode

VDMA in non-cyclic mode doesn't work with fsync enabled. Fsync is needed
to synchronize the pipeline with external input. So VDMA is configured to
cyclic mode in this patch, with fsync enabled at synthesis. This patch is
the only way to run the pipeline with external input, and it will be
revisited after IP level investigation.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agonet: xilinx_emacps: Release receive BDs when there is a resource error
Punnaiah Choudary Kalluri [Tue, 22 Apr 2014 15:28:46 +0000 (20:58 +0530)]
net: xilinx_emacps: Release receive BDs when there is a resource error

Driver should clean/release the BDs when it detects a resource error to
ensure the proper cleanup and allow the controller to recover from rx
lockdown issue.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoclk: zynq: Leave debug clocks in bootup state
Soren Brinkmann [Thu, 17 Apr 2014 18:40:52 +0000 (11:40 -0700)]
clk: zynq: Leave debug clocks in bootup state

Make sure debug clocks stay enabled if the bootloader enabled them.
Otherwise debug HW may crash due to bus-hangs caused by stopped clocks.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Changes to support dual parallel in new driver implementation
Harini Katakam [Fri, 18 Apr 2014 05:42:39 +0000 (11:12 +0530)]
spi: zynq-qspi: Changes to support dual parallel in new driver implementation

This patch implements support for dual parallel on top of the recent changes
to qspi driver which implements transfer->one.
In parallel configuration, all commands are sent to both flash devices but
the data is split into odd and even bits between lower and upper flash.
As a result of this data should be of even length for write/read operations.

For Ex.,
A program operation for 3 bytes will ideally be:
CMD + 3 ADDR BYTES + 3 DATA BYTES
In dual parallel case, this means 8 + 24 + (3*8/2) = 44 clock cycles will be sent.
From the flash perspective, it only received 1 and 1/2 bytes' cycles.
To avoid this error, when odd number of data bytes are asked to be transmitted,
an extra byte is sent to compensate for the nibble flash devices will be expecting.

Checks for bytes_to_receive/transmit < 0 were removed where not required.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomtd: m25p80: Cleanup after merge
Harini Katakam [Fri, 18 Apr 2014 05:42:38 +0000 (11:12 +0530)]
mtd: m25p80: Cleanup after merge

In the changed m25p80.c from mainline, quad read opcode is set based on
flags in device table. This also takes care of dummy bytes. Make use of this.
Added this flag to all devices known to support quad read.

Updated m25p80.c from mainline calls spansion_quad_enable by default
when quad mode is supported. This command is only required (supported)
for spansion and winbond. Even in that case, it's a non-volatile setting.
This implementation is not guaranteed to work when flash devices are
connected in parallel/stacked configuration.
Hence remove it and revisit if required.

Updated m25p80.c from mainline uses "mode" in spi device structure to
select quad read. This, in turn, is set by spi core based on dts properties.
Hence, update tx and rx bus width in dts for above purpose.

The flags M25P80_QUAD_READ and SECT_32 both have the same value - correct this.

Remove unused variables in flash structure.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Dual stacked fixes
Harini Katakam [Fri, 18 Apr 2014 05:42:37 +0000 (11:12 +0530)]
spi: zynq-qspi: Dual stacked fixes

Add configuration of U_PAGE/L_PAGE before asserting chip select.
(This was removed earlier when subsystem workqueue, set_cs and transfer_one
hooks were used)

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: core: Increase timeout value
Harini Katakam [Fri, 11 Apr 2014 06:36:28 +0000 (12:06 +0530)]
spi: core: Increase timeout value

The existing timeout value in wait_for_completion_timeout is
calculated from the transfer length and speed with tolerance of 10msec.
This is too low because this is used for error conditions such as
hardware hang etc.
The xfer->speed_hz considered may not be the actual speed set
because the best clock divisor is chosen from a limited set such that
the actual speed <= requested speed. This will lead to timeout being
less than actual transfer time.
Considering acceptable latencies, this timeout can be set to a
value double the expected transfer plus 100 msecs.
This patch adds the same in the core.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agospi: Add a timeout when waiting for transfers
Mark Brown [Thu, 30 Jan 2014 22:16:41 +0000 (22:16 +0000)]
spi: Add a timeout when waiting for transfers

Don't wait indefinitely for transfers to complete but time out after 10ms
more than we expect the transfer to take on the wire.

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoAPF: Clean up on exit for xilinx-dma-apf
S Mohan [Wed, 9 Apr 2014 00:34:47 +0000 (17:34 -0700)]
APF: Clean up on exit for xilinx-dma-apf

Add an empty release function, and cleanup the remove function
to ensure clean exit

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoclocksource/cadence_ttc: Adjust timer frequency on clock changes
Soren Brinkmann [Fri, 11 Apr 2014 16:24:03 +0000 (09:24 -0700)]
clocksource/cadence_ttc: Adjust timer frequency on clock changes

Implement a clock notifier to handle changes of the timer's input clock
frequency.
This syncs up the driver with mainline squashing the following commits
into this one:

Revert "clocksource/cadence_ttc: Remove clocksource clock notifier"

This reverts commit 1fae768cc7e0f09eb0a173c3c2e8e51acce4e13c.
Remove this work around in order to be able to cherry-pick the updates
for the TTC from mainline.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabled

The timer core takes care of serialization and IRQs. Hence the driver is
no longer required to disable interrupts when calling
clockevents_update_freq().

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
(cherry picked from commit 5f0ba3b462b2d36b3c28748863747fb1050f40d0)

clocksource/cadence_ttc: Overhaul clocksource frequency adjustment

The currently used method adjusting the clocksource to a changing input
frequency does not work on kernels from 3.11 on.
The new approach is to keep the timer frequency as constant as possible.
I.e.
 - due to the TTC's prescaler limitations, allow frequency changes
   only if the frequency scales by a power of 2
 - adjust the counter's divider on the fly when a frequency change
   occurs

This limits cpufreq to scale by certain factors only.
But we may keep the time base somewhat constant, so that sleep() & co
keep working as expected, while supporting cpufreq.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
(cherry picked from commit b3e90722f6f53fa457a88146a877e34ea71d25ea)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoclockevents: Adjust timer interval when frequency changes
Soren Brinkmann [Fri, 11 Apr 2014 16:24:02 +0000 (09:24 -0700)]
clockevents: Adjust timer interval when frequency changes

clockevent devices in periodic mode are not updated when the frequency
of the device changes. Issue a dev->set_mode() callback which forces
the device to reevaluate the timer settings.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Link: http://lkml.kernel.org/r/1391466877-28908-3-git-send-email-soren.brinkmann@xilinx.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit fe79a9ba11962a603fb6af68fcb476e64031e46c)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoclockevents: Serialize calls to clockevents_update_freq() in the core
Thomas Gleixner [Fri, 11 Apr 2014 16:24:01 +0000 (09:24 -0700)]
clockevents: Serialize calls to clockevents_update_freq() in the core

We can identify the broadcast device in the core and serialize all
callers including interrupts on a different CPU against the update.
Also, disabling interrupts is moved into the core allowing callers to
leave interrutps enabled when calling clockevents_update_freq().

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Soeren Brinkmann <soren.brinkmann@xilinx.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Link: http://lkml.kernel.org/r/1391466877-28908-2-git-send-email-soren.brinkmann@xilinx.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 627ee7947e2e83ba565c31c5c9373d6e364b1ecd)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoARM: zynq: Sort Kconfig options
Michal Simek [Fri, 11 Apr 2014 13:10:20 +0000 (15:10 +0200)]
ARM: zynq: Sort Kconfig options

Based on discussion on ARM mailing list options
should be sorted.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agodevicetree: Add devicetree bindings documentation for Zynq QSPI
Harini Katakam [Fri, 11 Apr 2014 10:47:31 +0000 (16:17 +0530)]
devicetree: Add devicetree bindings documentation for Zynq QSPI

Add bindings documentation for Zynq QSPI driver.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Change clock names
Harini Katakam [Fri, 11 Apr 2014 10:47:30 +0000 (16:17 +0530)]
spi: zynq-qspi: Change clock names

Use the name pclk instead of aper_clk and change the variable name accordingly.
Change variable name from devclk to refclk just for clarity.
Changes made in driver and relevant dts.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Reviewed-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Update DT binding documentation
Soren Brinkmann [Thu, 10 Apr 2014 15:04:06 +0000 (08:04 -0700)]
i2c: cadence: Update DT binding documentation

Sync with mainline version.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Fixup style
Soren Brinkmann [Thu, 10 Apr 2014 15:04:05 +0000 (08:04 -0700)]
i2c: cadence: Fixup style

Just a few, minor coding coding style fixes.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>