]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
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>
10 years agoi2c: cadence: Revise constants
Soren Brinkmann [Thu, 10 Apr 2014 15:04:04 +0000 (08:04 -0700)]
i2c: cadence: Revise constants

Revise some #defines to get rid of magic numbers.

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

Timeouts are purely handled in SW using completions. All accesses to the
timeout register and the timeout IRQ can be removed.
Also, sync the timeout durations with mainline.

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

Let the core handle retries in case arbitration is lost.

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

Initialize completion once during probe and use reinit_completion()
during transfers.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Change default bus speed to 100 kHz
Soren Brinkmann [Thu, 10 Apr 2014 15:04:00 +0000 (08:04 -0700)]
i2c: cadence: Change default bus speed to 100 kHz

Normal mode is the safer option.

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

Let the core handle adapter numbering.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Remove CONFIG_PM #ifdefs
Soren Brinkmann [Thu, 10 Apr 2014 15:03:58 +0000 (08:03 -0700)]
i2c: cadence: Remove CONFIG_PM #ifdefs

Remove the CONFIG_PM-related #ifdefs and annotate affected functions
with __maybe_unused.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Let the core handle bus busy condition
Soren Brinkmann [Thu, 10 Apr 2014 15:03:57 +0000 (08:03 -0700)]
i2c: cadence: Let the core handle bus busy condition

Return -EAGAIN if the bus is busy and let the I2C core handle retries.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Report NACK errors with correct error code
Soren Brinkmann [Thu, 10 Apr 2014 15:03:56 +0000 (08:03 -0700)]
i2c: cadence: Report NACK errors with correct error code

Report NACK properly using -ENXIO instead of -EIO error code.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Only report IRQ_HANDLED when an IRQ was actually handled
Soren Brinkmann [Thu, 10 Apr 2014 15:03:55 +0000 (08:03 -0700)]
i2c: cadence: Only report IRQ_HANDLED when an IRQ was actually handled

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Use (read|write)l_relaxed IO helpers
Soren Brinkmann [Thu, 10 Apr 2014 15:03:54 +0000 (08:03 -0700)]
i2c: cadence: Use (read|write)l_relaxed IO helpers

Also update driver dependencies accordingly. The relaxed IO helpers are
only provided on ARM.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoi2c: cadence: Clean up kernel doc and white spaces
Soren Brinkmann [Thu, 10 Apr 2014 15:03:53 +0000 (08:03 -0700)]
i2c: cadence: Clean up kernel doc and white spaces

Sync with version in mainline.

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

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agozynq: ocm: Fix IRQ handler return value
Michal Simek [Thu, 10 Apr 2014 12:37:02 +0000 (14:37 +0200)]
zynq: ocm: Fix IRQ handler return value

Return IRQ_HANDLED only when interrupt is handled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agozynq: ocm: Fix kernel-doc format
Michal Simek [Thu, 10 Apr 2014 12:36:32 +0000 (14:36 +0200)]
zynq: ocm: Fix kernel-doc format

Fix kernel-doc format.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Comment and alignment cleanup
Harini Katakam [Mon, 7 Apr 2014 14:17:00 +0000 (19:47 +0530)]
spi: zynq-qspi: Comment and alignment cleanup

- Update comments.
- Declare varibales of same type on same line.
- Correct multi-line comments.
- Correct alignment.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Remove MODULE_ALIAS
Harini Katakam [Mon, 7 Apr 2014 14:16:59 +0000 (19:46 +0530)]
spi: zynq-qspi: Remove MODULE_ALIAS

Remove MODULE_ALIAS as there is DT dependency.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Probe and remove cleanup
Harini Katakam [Mon, 7 Apr 2014 14:16:58 +0000 (19:46 +0530)]
spi: zynq-qspi: Probe and remove cleanup

Request irq after init_hw is done. Check for irq <= 0 as error condition.
Remove unecessary prints in probe and remove.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Set TX threshold
Harini Katakam [Mon, 7 Apr 2014 14:16:57 +0000 (19:46 +0530)]
spi: zynq-qspi: Set TX threshold

In init_hw, dont assume TX threshold is 1 by default, set it.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Check for busy in setup and call setup_transfer
Harini Katakam [Mon, 7 Apr 2014 14:16:56 +0000 (19:46 +0530)]
spi: zynq-qspi: Check for busy in setup and call setup_transfer

In setup, call setup transfer to ensure clock configuration is done
before spi is enabled.
Check for busy so as to not interrupt existing transfer with this config.
This is necessary as clock config needs to happen before when disabled.
The current transfer_one hook used will not allow the earlier flow of
disabling and enabling.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: num-chipselect property cleanup
Harini Katakam [Mon, 7 Apr 2014 14:16:55 +0000 (19:46 +0530)]
spi: zynq-qspi: num-chipselect property cleanup

Rename num-chipselect property to the commonly used num-cs.
When reading num-cs read into temporary u32 variable and then
copy to master->num_chipselect which is u16.
When num-cs is not present, use a default value instead of
returning error.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Use static inline function for read/write register
Harini Katakam [Mon, 7 Apr 2014 14:16:54 +0000 (19:46 +0530)]
spi: zynq-qspi: Use static inline function for read/write register

Use static inline functions to which driver structure and offset are
passed and the addition to base address is done inside.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Remove unused macros and avoid magic numbers
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:53 +0000 (19:46 +0530)]
spi: zynq-qspi: Remove unused macros and avoid magic numbers

Remove unused macros and avoid magic numbers

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Update the mode_bits with quad and dual support
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:52 +0000 (19:46 +0530)]
spi: zynq-qspi: Update the mode_bits with quad and dual support

Update the mode_bits with quad and dual support

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Removed dead code
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:51 +0000 (19:46 +0530)]
spi: zynq-qspi: Removed dead code

Remove check for byte_to_receive < 0 as this is unecessary.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Clean up isr
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:50 +0000 (19:46 +0530)]
spi: zynq-qspi: Clean up isr

Cleanup ISR for readability.
Dont disable interrupts and re-enable again.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Clean up zynq_qspi_read/copy_data functions
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:49 +0000 (19:46 +0530)]
spi: zynq-qspi: Clean up zynq_qspi_read/copy_data functions

Use memcpy to simplify qspi_read/copy_data funcitons.
Part of these changes were done by Thomas Betker but are also
included in this series as there were futher changes done on top of it.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Use prepare/unprepare transfer_hardware
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:48 +0000 (19:46 +0530)]
spi: zynq-qspi: Use prepare/unprepare transfer_hardware

Define prepare and unprepare hardware functions.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Cleanup
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:47 +0000 (19:46 +0530)]
spi: zynq-qspi: Cleanup

Add space after /* end of table */.
Correct alignment .

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Configure BPW mask and remove unecessary BPW checks
Harini Katakam [Mon, 7 Apr 2014 14:16:46 +0000 (19:46 +0530)]
spi: zynq-qspi: Configure BPW mask and remove unecessary BPW checks

Configure master->bits_per_word_mask so that core can perform checks.
Remove bits_per_work checks in the driver as they wont be necessary.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Return IRQ_HANDLED for interrupts that are processed
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:45 +0000 (19:46 +0530)]
spi: zynq-qspi: Return IRQ_HANDLED for interrupts that are processed

Return IRQ_HANDLED only when interrupts are processed and IRQ_NONE
otherwise.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Removed flash command table
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:44 +0000 (19:46 +0530)]
spi: zynq-qspi: Removed flash command table

Remove flash command table as driver need not check for the command
and write to TXD based on that.
This was fixed by Thomas Betker in his patches but the same was also
included in this series as further changes were made on top.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Let framework know the controller max supported freq
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:43 +0000 (19:46 +0530)]
spi: zynq-qspi: Let framework know the controller max supported freq

Set master->max_frequency so that core can perform checks.
Revise logic to set speed accordingly.
Remove unecessary prints.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Remove CONFIG_PM_SLEEP and use __maybe_unused
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:42 +0000 (19:46 +0530)]
spi: zynq-qspi: Remove CONFIG_PM_SLEEP and use __maybe_unused

Remove #ifdef CONFIG_PM_SLEEP and use __maybe_unused

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Remove spinlocks
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:41 +0000 (19:46 +0530)]
spi: zynq-qspi: Remove spinlocks

The current design flow doesnt need spinlocks so, removed the spinlocks

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agospi: zynq-qspi: Use spi core framework workqueue and message processing
Punnaiah Choudary Kalluri [Mon, 7 Apr 2014 14:16:40 +0000 (19:46 +0530)]
spi: zynq-qspi: Use spi core framework workqueue and message processing

- Use spi core framework workqueue and message processing
- Remove redundant code
- Modified suspend/resume functions to sync with new implementtaion

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoAPF: Cleanup on exit of xlnk_eng driver
S Mohan [Fri, 4 Apr 2014 16:35:55 +0000 (09:35 -0700)]
APF: Cleanup on exit of xlnk_eng driver

Implement the xlnk_eng_remove and xlnk_eng_release functions
and modify xlnk_eng_probe to enable this

Signed-off-by: S Mohan <s.mohan@xilinx.com>
10 years agogpu: drm: xylon: Changed variable name
Davor Joja [Fri, 4 Apr 2014 13:48:30 +0000 (15:48 +0200)]
gpu: drm: xylon: Changed variable name

Changed Xylon DRM crtc structure variable name which contains private
plane id to be named in the same style as drm_plane structure private plane
pointer.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Fixed variable and function argument types
Davor Joja [Fri, 4 Apr 2014 13:48:29 +0000 (15:48 +0200)]
gpu: drm: xylon: Fixed variable and function argument types

Fixed Xylon DRM logicvc main structure variable types according to its usage
and sorted accordingly.
Fixed function argument type to be as hw register width.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Removed unneeded structure and its use
Davor Joja [Fri, 4 Apr 2014 13:48:28 +0000 (15:48 +0200)]
gpu: drm: xylon: Removed unneeded structure and its use

Removed unneeded structure in Xylon DRM logicvc.
Replaced removed structure variable with plain integer variable.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Changed plane operation defines to enums
Davor Joja [Thu, 3 Apr 2014 17:05:13 +0000 (19:05 +0200)]
gpu: drm: xylon: Changed plane operation defines to enums

Replaced Xylon DRM plane operation defines with enum types.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Changed logicvc define to enum
Davor Joja [Thu, 3 Apr 2014 17:04:58 +0000 (19:04 +0200)]
gpu: drm: xylon: Changed logicvc define to enum

Replaced Xylon DRM logicvc various hw defines with enum types.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Updated top driver get bpp functionality
Davor Joja [Thu, 3 Apr 2014 16:24:50 +0000 (18:24 +0200)]
gpu: drm: xylon: Updated top driver get bpp functionality

Changed bpp variable type in Xylon DRM driver.
Updated getting of bpp value with new functionality.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Updated crtc get parameter function
Davor Joja [Thu, 3 Apr 2014 16:24:49 +0000 (18:24 +0200)]
gpu: drm: xylon: Updated crtc get parameter function

Xylon DRM crtc get param function is updated to provide all buffer
parameters.
Header file defines replaced with enum type.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Removed crtc get bpp function
Davor Joja [Thu, 3 Apr 2014 16:24:48 +0000 (18:24 +0200)]
gpu: drm: xylon: Removed crtc get bpp function

Removed crtc get bpp function.
Moved crtc check format function to different place to keep functionality
grouping within Xylon DRM crtc.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Fixed function return type
Davor Joja [Thu, 3 Apr 2014 16:24:47 +0000 (18:24 +0200)]
gpu: drm: xylon: Fixed function return type

Fixed structure member and function return type in Xylon DRM plane.
Bpp value can only be zero or positive value.
Reported by Xilinx review.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Fixed function return type
Davor Joja [Thu, 3 Apr 2014 16:24:46 +0000 (18:24 +0200)]
gpu: drm: xylon: Fixed function return type

Fixed function return type in Xylon DRM logicvc.
Bpp value can only be zero or positive value.
Reported by Xilinx review.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agogpu: drm: xylon: Removed unused header
Davor Joja [Thu, 3 Apr 2014 15:40:09 +0000 (17:40 +0200)]
gpu: drm: xylon: Removed unused header

Removed unused adv7511 header from Xylon DRM connector.

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agohwmon: Remove ancient xadc driver
Michal Simek [Thu, 3 Apr 2014 16:19:54 +0000 (18:19 +0200)]
hwmon: Remove ancient xadc driver

There is new in in drivers/iio/adc/xilinx-xadc*.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agoiio:adc: Add Xilinx XADC driver
Lars-Peter Clausen [Mon, 17 Feb 2014 14:10:00 +0000 (14:10 +0000)]
iio:adc: Add Xilinx XADC driver

The Xilinx XADC is a ADC that can be found in the series 7 FPGAs from Xilinx.
The XADC has a DRP interface for communication. Currently two different
frontends for the DRP interface exist. One that is only available on the ZYNQ
family as a hardmacro in the SoC portion of the ZYNQ. The other one is available
on all series 7 platforms and is a softmacro with a AXI interface. This driver
supports both interfaces and internally has a small abstraction layer that hides
the specifics of these interfaces from the main driver logic.

The ADC has a couple of internal channels which are used for voltage and
temperature monitoring of the FPGA as well as one primary and up to 16 channels
auxiliary channels for measuring external voltages. The external auxiliary
channels can either be directly connected each to one physical pin on the FPGA
or they can make use of an external multiplexer which is responsible for
multiplexing the external signals onto one pair of physical pins.

The voltage and temperature monitoring channels also have an event capability
which allows to generate a interrupt when their value falls below or raises
above a set threshold.

Buffered sampling mode is supported by the driver, but only for AXI-XADC since
the ZYNQ XADC interface does not have capabilities for supporting buffer mode
(no end-of-conversion interrupt). If buffered mode is supported the driver will
register two triggers. One "xadc-samplerate" trigger which will generate samples
with the configured samplerate. And one "xadc-convst" trigger which will
generate one sample each time the CONVST (conversion start) signal is asserted.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>