Srikanth Thokala [Fri, 13 Dec 2013 09:07:35 +0000 (14:37 +0530)]
vdmatest: xilinx: Add support to read number of frame stores from device node
This patch adds support to read number of frame stores from the vdmatest
device node. And it documents this new node member to device tree bindings
documentation.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Fri, 13 Dec 2013 09:07:34 +0000 (14:37 +0530)]
vdma: xilinx: Use of_dma framework in vdma test client
This patch does following things:
- Uses of_dma framework in vdma test client
- Document the device node for vdma test client
- Add the above node as an example to existing vdma
device binding documentation
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Fri, 13 Dec 2013 09:07:33 +0000 (14:37 +0530)]
vdma: xilinx: Reorganise tasklet related calls
It is more appropriate to call tasklet_init() during allocating
channel resources and also this patch adds code to kill the
initialized tasklet when freeing up resources.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Fri, 13 Dec 2013 09:07:26 +0000 (14:37 +0530)]
vdma: xilinx: Code cleanup in the driver
This patch does code cleanup in the driver:
- Use u32 to maintain sychronization throughout driver
- Use operators (conditional/boolean) on the previous line
after a line-break
- And removes redundant code
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Soren Brinkmann [Wed, 11 Dec 2013 04:57:57 +0000 (20:57 -0800)]
net: macb: Fix build warning
When adjusting the link speed, the target frequency is determined by a
'swith (LINK_SPEED)' statement, that assigns the target rate only for
valid and expected LINK_SPEED values. This incomplete switch statement
leads to the following build warning:
drivers/net/ethernet/cadence/macb.c: In function 'macb_handle_link_change':
>> drivers/net/ethernet/cadence/macb.c:241:14: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
netdev_warn(dev, "unable to generate target frequency: %ld Hz\n",
^
drivers/net/ethernet/cadence/macb.c:215:13: note: 'rate' was declared here
long ferr, rate, rate_rounded;
Fixing this by bailing out of that function in the switch's default case
before the rate variable is used.
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers
There are no specific interrupts for the PONG buffer on both
transmit and receive side, same interrupt is valid for both
buffers. So, this patch removes this code.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Reviewed-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 11 Dec 2013 16:42:41 +0000 (17:42 +0100)]
arm: zynq: Clean-up zynq Kconfig
Based on Rob Herring's patch
"ARM: clean-up common multi-platform kconfig options"
cleanup our Kconfig file.
This patch has been also sent to mainline.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Disable napi when xemacps_mii_probe fails
In xemacps_open(), call napi_disable() when the xemacps_mii_probe() fails.
This change is needed to undo the napi_enable() which called before the
xemacps_mii_probe().
Soren Brinkmann [Thu, 28 Nov 2013 20:05:10 +0000 (12:05 -0800)]
usb: phy-zynq: Fix devm_kzalloc() calls
The calls to devm_kzalloc had several issues:
- missing struct device pointer
- sizeof argument should be within parentheses
- sizeof argument should use variable identifier opposed to a type
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Soren Brinkmann [Wed, 27 Nov 2013 19:49:28 +0000 (11:49 -0800)]
clk/zynq/clkc: Fix fclk-enable logic
Commit 'clk/zynq/clkc: Add 'fclk-enable' functionality'
(d0b69caa6c963ed23f7bd725fcc68670dd2ed257) introduced the fclk-enable
feature and DT property. And commit 'clk: zynq: Change handling of FCLK
default state' (48461c50475550328e02c7bb46d7f5d53f5bdecb) changed the
fclk handling during boot. Unfortunately the logic to enable/disable
fclks was buggy, not implementing the intended behavior.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Add PTP hardware clock support
This patch adds timestamping and PTP hardware clock support to the
emacps driver.
Removed the existing timestamp implementation as the support for this
implementation is deprecated in kernel and causing the compilation errors.
With new implementation, Hardware frequency adjustment algorithm is not working
properly and this will be fixed in future versions.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Apply the spinlock to the required critical section
Applied the spinlock to the required critical sections in xemacps_tx_poll
and xemacps_start_xmit function. Removed the barrier instructions that exist
just before the spinlock calls and the places where the usage of barrier
instrcution is not relevant.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
usb: xusbps: Clear the endpoint complete event after each dTD processing
Clear the endpoint complete event status after prcoessing the dTDs that are
marked as completed in the current queue. This change is required to reduce
the false interrupts that may occur due to processing the all the completed
dTDs in the ISR though the isr is meant for the single dTD complete event.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
The following sequence is used to keep spi bus busy and transfer rate
1. Configure the Rx threshold register with optimum value
2. Fill the complete Tx fifo
3. Wait for the Rx fifo not empty or Tx fifo empty condition
4. Read data from the Rx fifo for Rx threshold entries or requested
no of bytes if the outstanding bytes are less than the threshold
5. Fill the Tx fifo with Rx threshold entries or requested no of
bytes if the outstanding bytes are less than the threshold
6. Repeat step 2
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: zynq-qspi: Avoid temp variables used in fifo read/write operations
For better throughput, Avoid temporary variable for storing the fifo data and
copying to user buffer and vice versa, Instead of that use the buffer directly
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: zynq-qspi: Use readl_/writel_relaxed functions instead of readl/writel
Since the qspi register space configured as device memory and the order of
accesses arriving at Device memory is guaranteed to correspond to the program
order of instructions which access Strongly-ordered or Device memory.
The readl/writel function contains a barrier and adding more delay while
accessing the data from the fifo registers
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Wed, 27 Nov 2013 14:26:23 +0000 (19:56 +0530)]
vdmatest: xilinx: Zero out the configuration fields before configuring VDMA
The existing VDMA test client is failing to work with latest VDMA driver,
as some of the configuration fields of configuration structure are non-zero
and hence VDMA engine is not configured properly. So this patch fixes
the issue.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Wed, 27 Nov 2013 14:26:40 +0000 (19:56 +0530)]
axivdma: Documentation: devicetree: Updated device tree bindings with mandatory entries
As 'xlnx,num-fstores' and 'xlnx,device-id' are mandatory device tree
properties the driver is expecting, these entries should be listed
in the bindings.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 25 Nov 2013 19:05:17 +0000 (20:05 +0100)]
zynq: Add OCM driver
The driver provide memory allocator which can
be used by others drivers to allocate memory inside OCM.
All location for 64kB blocks are supported
and driver is trying to allocate the largest continuous
block of memory.
Checking mpcore addressing filterring is not done here
but could be added in future.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Srikanth Thokala [Mon, 25 Nov 2013 14:20:43 +0000 (19:50 +0530)]
axivdma: xilinx: Remove irq_dispose_mapping() as it is not required
This patch removes the call irq_dispose_mapping() as in the code
we are not mapping the interrupt using create_mapping(). This
patch fixes the kernel crash when unloading this driver module.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Soren Brinkmann [Sat, 23 Nov 2013 01:45:30 +0000 (17:45 -0800)]
tty: xuartps: Remove duplicate variable
In the probe() function the variables 'rc' and 'ret' have been used to
store return values. One is obviously redundant and neither needs to be
initialized.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Fri, 22 Nov 2013 18:10:21 +0000 (10:10 -0800)]
drm: xilinx: Merge 3.12 and fix conflicts
Merge 3.12 and fix conflicts. Fix the prototype of
xilinx_drm_crtc_page_flip(), remove deprecated function call(drm_fasync),
change drm_gem_cma_dumb_destroy() with drm_gem_dumb_destroy(), and
remove #include <linux/of_i2c.h>.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 22 Nov 2013 08:17:32 +0000 (09:17 +0100)]
microblaze: extable: Sort the exception table at build time
Sort the exception table at build-time rather than during boot.
Microblaze is the same case as AARCH64 that's why
EM_MICROBLAZE conditional check was added to allow
cross-compilation on machines which are not running
the latest libc-dev.
Michal Simek [Fri, 22 Nov 2013 07:28:56 +0000 (08:28 +0100)]
microblaze: Fix BS=1 case
There was bug introduced by
"microblaze: Fix compilation error for BS=0"
(sha1: 50ef4f1128a880ea24c55b515125fc27cc489cf9)
which break compilation for BS=1 case.
Fixing is done in more generic way.
On systems without barrel shifter is bsrli replaced
by macro at build-time and replaced by srl instructions.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 20 Nov 2013 13:06:39 +0000 (14:06 +0100)]
microblaze: Permit pcibios_set_master override
This function is also available in pcie driver
and it is causing compilation failure where both
functions are defined.
Use weak attribute and override this default one.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Error message:
arch/microblaze/kernel/setup.c: In function 'machine_early_init':
arch/microblaze/kernel/setup.c:177:3: error: 'pr_cont'
undeclared (first use in this function)
arch/microblaze/kernel/setup.c:177:3: note: each undeclared
identifier is reported only once for each function it appears in
arch/microblaze/kernel/setup.c:177:10: error: expected ';'
before string constant
arch/microblaze/kernel/setup.c:177:33: error: expected statement
before ')' token
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 6 Nov 2013 15:36:08 +0000 (16:36 +0100)]
microblaze: Calculate kernel pad automatically
The kernel needs to setup the first two tlbs with pad
which is used for early page allocation which is used
by mapin_ram() to allocate tables for lowmem memory
before memory initialisation is done.
Calculate pad directly from lowmem size.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 10 Oct 2013 09:59:46 +0000 (11:59 +0200)]
ARM: mm: Fix ECC mem policy printk
ECC policy can be applied to the whole system
when this bit is implemented by SoC vendor
(IMP - bit 9 - in L1 page table entry format).
When this bit is not implemented by SoC vendor
it doesn't mean that system has no other way
how to do ECC.
This patch ensures to show this message only when ECC
is requested via cmd line ecc=on and runs on
appropriate ARM core.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 18 Nov 2013 12:54:16 +0000 (13:54 +0100)]
zynq: Remove DMA_ENGINE=y from zynq Kconfig
There is no reason to enable DMA_ENGINE by default.
Every dma driver enables it if uses it.
Symbol was introduced by this commit
"arm: zynq: Move pl330 driver to the drivers/dma"
(sha1: dcd3488987548b15f8b9d0dfc703a3c19d109f69)
but this xilinx pl330 specific driver it is not longer
in the tree.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Thu, 14 Nov 2013 20:16:31 +0000 (12:16 -0800)]
drm: xilinx: drv: Add xilinx_drm_format_by_name()
xilinx_drm_format_by_name() translates the xilinx format name into
the drm format code. This function can be used by subdevice drivers
with format names in DTS descriptions.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Thu, 14 Nov 2013 20:16:30 +0000 (12:16 -0800)]
drm: xilinx: plane: Add the 'planes' dts node
Add the 'planes' dts node under xilinx_drm. The IP instances for each plane
can be specified using this node, and this enables to have the same IPs
in 2 locations: 1 before OSD(for plane), and 1 after OSD(for crtc).
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Add xilinx_drm_plane_check_format(), and replace
xilinx_drm_plane_get_format() with it. When fb is allocated, the requested
format is checked by calling this function. This function checks
if the given format is supported by available planes.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Thu, 14 Nov 2013 20:16:28 +0000 (12:16 -0800)]
drm: xilinx: cresample: Add input/output video format dts prop
Add input/output video format dts prop. It requires to detect
formats of IP and provide proper information to users.
xilinx_cresample_get_input/output_format() functions are added.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Thu, 14 Nov 2013 20:16:27 +0000 (12:16 -0800)]
drm: xilinx: drv: Replace xilinx_drm_format() with xilinx_drm_format_by_code()
Add xilinx_drm_format_by_code() which utilizes the Xilinx format descriptor,
then replace previous xilinx_drm_format() with xilinx_drm_format_by_code().
xilinx_drm_format_by_code() converts the Xilinx format code to the drm format.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hyun Kwon [Thu, 14 Nov 2013 20:16:26 +0000 (12:16 -0800)]
drm: xilinx: Add Xilinx video format descriptors
Add Xilinx video format descriptors which have a Xilinx format name,
a Xilinx format code, and a drm format code. This descriptor can be
used to convert between format codes/name.
Signed-off-by: Hyun Kwon <hyunk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>