]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
9 years agoaxidma: xilinx: Fix compilation errors xilinx-v2014.3
Kedareswara rao Appana [Thu, 9 Oct 2014 11:34:18 +0000 (17:04 +0530)]
axidma: xilinx: Fix compilation errors

This patch fixes the compilation errors in the axidma test
client driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agocdma: xilinx: Fix compilation errors
Kedareswara rao Appana [Thu, 9 Oct 2014 11:34:17 +0000 (17:04 +0530)]
cdma: xilinx: Fix compilation errors

This patch fixes the compilation errors in the cdma test
client driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agovdma: xilinx: Fix compilation errors
Kedareswara rao Appana [Thu, 9 Oct 2014 11:34:16 +0000 (17:04 +0530)]
vdma: xilinx: Fix compilation errors

This patch fixes the compilation errors in the vdma test
client driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dts: Remove Xilinx specific scuwatchdog
Michal Simek [Thu, 2 Oct 2014 13:05:08 +0000 (15:05 +0200)]
ARM: dts: Remove Xilinx specific scuwatchdog

There is no driver for this node in the tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodefconfig: zynq: Enable CAN drivers by default
Michal Simek [Thu, 2 Oct 2014 07:42:48 +0000 (09:42 +0200)]
defconfig: zynq: Enable CAN drivers by default

Enable CAN drivers for xilinx.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Fix CAN nodes
Michal Simek [Thu, 2 Oct 2014 07:50:43 +0000 (09:50 +0200)]
ARM: zynq: Fix CAN nodes

- Add missing tx/rx-for-depth
- Fix incorrect clock specification

Synchronization with the mainline driver changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: ll_temac: Remove unnecessary ether_setup after alloc_etherdev
Michal Simek [Wed, 1 Oct 2014 05:53:25 +0000 (07:53 +0200)]
net: ll_temac: Remove unnecessary ether_setup after alloc_etherdev

Based on:
"net: axienet: Remove unnecessary ether_setup after alloc_etherdev"
(sha1: 9441a44b7c870e55d1aee0c85d225ffe478f6027)

Calling ether_setup is redundant since alloc_etherdev calls it.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: axienet: Remove unnecessary ether_setup after alloc_etherdev
Subbaraya Sundeep Bhatta [Tue, 30 Sep 2014 09:18:10 +0000 (14:48 +0530)]
net: axienet: Remove unnecessary ether_setup after alloc_etherdev

Calling ether_setup is redundant since alloc_etherdev calls it.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Enable all FCLKs by default
Christian Kohn [Mon, 29 Sep 2014 18:42:41 +0000 (11:42 -0700)]
ARM: zynq: DT: Enable all FCLKs by default

The fclk-enable property is set to 0 which disables all FCLKs.
Enable all FCLKs so they can be used as clock sources in the
programmable logic.

Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: emacps: Fix dependencies
Soren Brinkmann [Mon, 29 Sep 2014 20:12:23 +0000 (13:12 -0700)]
net: emacps: Fix dependencies

Commit 'net: emacps: Add missing dependency for PTP'
(355605acc45567a76ae5d8f5a151e72c8edc51c8) adds PTP_1588_CLOCK to the
driver's dependencies, but only the HW timestamping feature, which has a
dedicated entry in Kconfig, depends on it.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoiio: adc: xilinx-xadc: Assign auxiliary channels address correctly
Subbaraya Sundeep Bhatta [Sun, 9 Nov 2014 09:55:00 +0000 (09:55 +0000)]
iio: adc: xilinx-xadc: Assign auxiliary channels address correctly

This patch fixes incorrect logic for assigning address
to auxiliary channels of xilinx xadc.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoARM: zynq: DT: Remove 222 MHz OPP
Soren Brinkmann [Tue, 23 Sep 2014 18:55:20 +0000 (11:55 -0700)]
ARM: zynq: DT: Remove 222 MHz OPP

Due to dependencies between timer and CPU frequency, only changes by
powers of two are allowed. The clocksource driver prevents other
changes, but with cpufreq and its governors it can result in being
spammed with error messages constantly. Hence, remove the 222 MHz OPP.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: emacps: Add missing dependency for PTP
Michal Simek [Thu, 18 Sep 2014 05:27:41 +0000 (07:27 +0200)]
net: emacps: Add missing dependency for PTP

Error log:
  drivers/built-in.o: In function `xemacps_init_hw':
  :(.text+0xf8720): undefined reference to `ptp_clock_register'
  :(.text+0xf873c): undefined reference to `ptp_clock_index'
  drivers/built-in.o: In function `xemacps_close':
  :(.text+0xf8e78): undefined reference to `ptp_clock_unregister'
  make: *** [vmlinux] Error 1

Reported-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq_defconfig: Enable LED support by default
Michal Simek [Thu, 18 Sep 2014 04:34:20 +0000 (06:34 +0200)]
ARM: zynq_defconfig: Enable LED support by default

zc702 has one gpio led in DTS that's why enable
LED support in default defconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dts: Add missing phy-handle property
Michal Simek [Wed, 17 Sep 2014 13:01:24 +0000 (15:01 +0200)]
ARM: dts: Add missing phy-handle property

phy-handle property is required for getting phy to work.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dts: zynq: Use our ps-emac driver instead of macb
Michal Simek [Tue, 16 Sep 2014 13:10:31 +0000 (15:10 +0200)]
ARM: dts: zynq: Use our ps-emac driver instead of macb

Need more time for getting the same performance numbers
on macb.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
v2:
- Tested on zc702
- Change reg size to 0x1000 as was indicated by Soren

9 years agoARM: dts: Fix uart clocks binding
Michal Simek [Wed, 17 Sep 2014 11:48:54 +0000 (13:48 +0200)]
ARM: dts: Fix uart clocks binding

Use the latest binding not to show deprecated messages.
xuartps e0001000.serial: clock name 'aper_clk' is deprecated.
xuartps e0001000.serial: clock name 'ref_clk' is deprecated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agogpu: drm: xylon: Fixed compile error for kernel version 3.15
Davor Joja [Mon, 15 Sep 2014 10:24:49 +0000 (12:24 +0200)]
gpu: drm: xylon: Fixed compile error for kernel version 3.15

Missing drm_framebuffer member in drm_crtc structure.

Error log:
drivers/gpu/drm/xylon/xylon_crtc.c: In function
'xylon_drm_crtc_mode_set':
drivers/gpu/drm/xylon/xylon_crtc.c:193:55: error: 'struct drm_crtc'
has no member named 'fb'
  ret = xylon_drm_plane_fb_set(crtc->private, base_crtc->fb,
                                                       ^
drivers/gpu/drm/xylon/xylon_crtc.c: In function
'xylon_drm_crtc_mode_set_base':
drivers/gpu/drm/xylon/xylon_crtc.c:211:55: error:
'struct drm_crtc' has no member named 'fb'
  ret = xylon_drm_plane_fb_set(crtc->private, base_crtc->fb,
                                                       ^
drivers/gpu/drm/xylon/xylon_crtc.c: In function
'xylon_drm_crtc_page_flip':
drivers/gpu/drm/xylon/xylon_crtc.c:308:11: error:
'struct drm_crtc' has no member named 'fb'
  base_crtc->fb = fb;
           ^
drivers/gpu/drm/xylon/xylon_crtc.c: In function
'xylon_drm_crtc_set_property':
drivers/gpu/drm/xylon/xylon_crtc.c:385:54: error:
'struct drm_crtc' has no member named 'fb'
   if (xylon_drm_plane_fb_set(crtc->private, base_crtc->fb,

Signed-off-by: Davor Joja <davorjoja@logicbricks.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: sctp: inherit auth_capable on INIT collisions
Daniel Borkmann [Tue, 22 Jul 2014 13:22:45 +0000 (15:22 +0200)]
net: sctp: inherit auth_capable on INIT collisions

Jason reported an oops caused by SCTP on his ARM machine with
SCTP authentication enabled:

Internal error: Oops: 17 [#1] ARM
CPU: 0 PID: 104 Comm: sctp-test Not tainted 3.13.0-68744-g3632f30c9b20-dirty #1
task: c6eefa40 ti: c6f52000 task.ti: c6f52000
PC is at sctp_auth_calculate_hmac+0xc4/0x10c
LR is at sg_init_table+0x20/0x38
pc : [<c024bb80>]    lr : [<c00f32dc>]    psr: 40000013
sp : c6f538e8  ip : 00000000  fp : c6f53924
r10: c6f50d80  r9 : 00000000  r8 : 00010000
r7 : 00000000  r6 : c7be4000  r5 : 00000000  r4 : c6f56254
r3 : c00c8170  r2 : 00000001  r1 : 00000008  r0 : c6f1e660
Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005397f  Table: 06f28000  DAC: 00000015
Process sctp-test (pid: 104, stack limit = 0xc6f521c0)
Stack: (0xc6f538e8 to 0xc6f54000)
[...]
Backtrace:
[<c024babc>] (sctp_auth_calculate_hmac+0x0/0x10c) from [<c0249af8>] (sctp_packet_transmit+0x33c/0x5c8)
[<c02497bc>] (sctp_packet_transmit+0x0/0x5c8) from [<c023e96c>] (sctp_outq_flush+0x7fc/0x844)
[<c023e170>] (sctp_outq_flush+0x0/0x844) from [<c023ef78>] (sctp_outq_uncork+0x24/0x28)
[<c023ef54>] (sctp_outq_uncork+0x0/0x28) from [<c0234364>] (sctp_side_effects+0x1134/0x1220)
[<c0233230>] (sctp_side_effects+0x0/0x1220) from [<c02330b0>] (sctp_do_sm+0xac/0xd4)
[<c0233004>] (sctp_do_sm+0x0/0xd4) from [<c023675c>] (sctp_assoc_bh_rcv+0x118/0x160)
[<c0236644>] (sctp_assoc_bh_rcv+0x0/0x160) from [<c023d5bc>] (sctp_inq_push+0x6c/0x74)
[<c023d550>] (sctp_inq_push+0x0/0x74) from [<c024a6b0>] (sctp_rcv+0x7d8/0x888)

While we already had various kind of bugs in that area
ec0223ec48a9 ("net: sctp: fix sctp_sf_do_5_1D_ce to verify if
we/peer is AUTH capable") and b14878ccb7fa ("net: sctp: cache
auth_enable per endpoint"), this one is a bit of a different
kind.

Giving a bit more background on why SCTP authentication is
needed can be found in RFC4895:

  SCTP uses 32-bit verification tags to protect itself against
  blind attackers. These values are not changed during the
  lifetime of an SCTP association.

  Looking at new SCTP extensions, there is the need to have a
  method of proving that an SCTP chunk(s) was really sent by
  the original peer that started the association and not by a
  malicious attacker.

To cause this bug, we're triggering an INIT collision between
peers; normal SCTP handshake where both sides intent to
authenticate packets contains RANDOM; CHUNKS; HMAC-ALGO
parameters that are being negotiated among peers:

  ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->
  <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------
  -------------------- COOKIE-ECHO -------------------->
  <-------------------- COOKIE-ACK ---------------------

RFC4895 says that each endpoint therefore knows its own random
number and the peer's random number *after* the association
has been established. The local and peer's random number along
with the shared key are then part of the secret used for
calculating the HMAC in the AUTH chunk.

Now, in our scenario, we have 2 threads with 1 non-blocking
SEQ_PACKET socket each, setting up common shared SCTP_AUTH_KEY
and SCTP_AUTH_ACTIVE_KEY properly, and each of them calling
sctp_bindx(3), listen(2) and connect(2) against each other,
thus the handshake looks similar to this, e.g.:

  ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->
  <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------
  <--------- INIT[RANDOM; CHUNKS; HMAC-ALGO] -----------
  -------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] -------->
  ...

Since such collisions can also happen with verification tags,
the RFC4895 for AUTH rather vaguely says under section 6.1:

  In case of INIT collision, the rules governing the handling
  of this Random Number follow the same pattern as those for
  the Verification Tag, as explained in Section 5.2.4 of
  RFC 2960 [5]. Therefore, each endpoint knows its own Random
  Number and the peer's Random Number after the association
  has been established.

In RFC2960, section 5.2.4, we're eventually hitting Action B:

  B) In this case, both sides may be attempting to start an
     association at about the same time but the peer endpoint
     started its INIT after responding to the local endpoint's
     INIT. Thus it may have picked a new Verification Tag not
     being aware of the previous Tag it had sent this endpoint.
     The endpoint should stay in or enter the ESTABLISHED
     state but it MUST update its peer's Verification Tag from
     the State Cookie, stop any init or cookie timers that may
     running and send a COOKIE ACK.

In other words, the handling of the Random parameter is the
same as behavior for the Verification Tag as described in
Action B of section 5.2.4.

Looking at the code, we exactly hit the sctp_sf_do_dupcook_b()
case which triggers an SCTP_CMD_UPDATE_ASSOC command to the
side effect interpreter, and in fact it properly copies over
peer_{random, hmacs, chunks} parameters from the newly created
association to update the existing one.

Also, the old asoc_shared_key is being released and based on
the new params, sctp_auth_asoc_init_active_key() updated.
However, the issue observed in this case is that the previous
asoc->peer.auth_capable was 0, and has *not* been updated, so
that instead of creating a new secret, we're doing an early
return from the function sctp_auth_asoc_init_active_key()
leaving asoc->asoc_shared_key as NULL. However, we now have to
authenticate chunks from the updated chunk list (e.g. COOKIE-ACK).

That in fact causes the server side when responding with ...

  <------------------ AUTH; COOKIE-ACK -----------------

... to trigger a NULL pointer dereference, since in
sctp_packet_transmit(), it discovers that an AUTH chunk is
being queued for xmit, and thus it calls sctp_auth_calculate_hmac().

Since the asoc->active_key_id is still inherited from the
endpoint, and the same as encoded into the chunk, it uses
asoc->asoc_shared_key, which is still NULL, as an asoc_key
and dereferences it in ...

  crypto_hash_setkey(desc.tfm, &asoc_key->data[0], asoc_key->len)

... causing an oops. All this happens because sctp_make_cookie_ack()
called with the *new* association has the peer.auth_capable=1
and therefore marks the chunk with auth=1 after checking
sctp_auth_send_cid(), but it is *actually* sent later on over
the then *updated* association's transport that didn't initialize
its shared key due to peer.auth_capable=0. Since control chunks
in that case are not sent by the temporary association which
are scheduled for deletion, they are issued for xmit via
SCTP_CMD_REPLY in the interpreter with the context of the
*updated* association. peer.auth_capable was 0 in the updated
association (which went from COOKIE_WAIT into ESTABLISHED state),
since all previous processing that performed sctp_process_init()
was being done on temporary associations, that we eventually
throw away each time.

The correct fix is to update to the new peer.auth_capable
value as well in the collision case via sctp_assoc_update(),
so that in case the collision migrated from 0 -> 1,
sctp_auth_asoc_init_active_key() can properly recalculate
the secret. This therefore fixes the observed server panic.

Fixes: 730fc3d05cd4 ("[SCTP]: Implete SCTP-AUTH parameter processing")
Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotrafgen: Document sysfs entries
Kedareswara rao Appana [Wed, 10 Sep 2014 09:44:42 +0000 (15:14 +0530)]
trafgen: Document sysfs entries

This patch adds the documentaion for the sysfs entries in the driver.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotrafgen: Fix sysfs macros
Kedareswara rao Appana [Wed, 10 Sep 2014 09:44:41 +0000 (15:14 +0530)]
trafgen: Fix sysfs macros

This patch updates the driver to use DEVICE_ATTR_RO/WO/RW
macros. Modified the driver api names to make compatilble with the
DEVICE_ATTR_RO/WO/RW macros.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotrafgen: Use snprintf instead of sprintf
Kedareswara rao Appana [Wed, 10 Sep 2014 09:44:40 +0000 (15:14 +0530)]
trafgen: Use snprintf instead of sprintf

This patch updates the driver to use snprintf
instead of sprintf based on Documentation/filesystems/sysfs.txt.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq_defconfig: Support xz-compressed ramdisks
Soren Brinkmann [Wed, 10 Sep 2014 05:34:00 +0000 (22:34 -0700)]
ARM: zynq_defconfig: Support xz-compressed ramdisks

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Add LEDs to zc702 DT
Ezra Savard [Fri, 29 Aug 2014 14:38:37 +0000 (07:38 -0700)]
ARM: zynq: DT: Add LEDs to zc702 DT

Adds LEDs to the zc702 devicetree for use with the leds-gpio driver.

Signed-off-by: Ezra Savard <ezra.savard@xilinx.com>
Reviewed-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: pm: Don't have DDR self-refresh always on
Soren Brinkmann [Tue, 2 Sep 2014 19:07:00 +0000 (12:07 -0700)]
ARM: zynq: pm: Don't have DDR self-refresh always on

Apparently, having self-refresh enabled at all times negatively affects
memory performance. Hence, only enable clock-stop at boot and limit
self-refresh to suspend.

Probably related: http://www.xilinx.com/support/answers/47514.htm

Reported-by: Lars-Peter Clausen <lars-peter.clausen@analog.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoof/platform: Fix microblaze build failure
Guenter Roeck [Tue, 10 Jun 2014 18:59:14 +0000 (11:59 -0700)]
of/platform: Fix microblaze build failure

Commit bf5db2f (microblaze: Use generic device.h) removes the
microblaze specific pdev_archdata and dma_mask.

At the same time, commit 591c1ee (of: configure the platform
device dma parameters) initializes the just removed field.
This causes all microblaze builds to fail.

Drop the unnecessary initialization.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Rob Herring <robh@kernel.org>
9 years agomicroblaze: Use generic device.h
Michal Simek [Fri, 16 May 2014 11:16:49 +0000 (13:16 +0200)]
microblaze: Use generic device.h

pdev_archdata dma_mask is completely unused.
Use generic device.h

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Do not setup empty unmap_sg function
Michal Simek [Fri, 16 May 2014 11:12:25 +0000 (13:12 +0200)]
microblaze: Do not setup empty unmap_sg function

No reason to setup empty function. Core is checking
if this function should be called or not.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Remove device_to_mask
Michal Simek [Fri, 16 May 2014 11:08:44 +0000 (13:08 +0200)]
microblaze: Remove device_to_mask

Completely unused function - remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Clean device dma_ops structure
Michal Simek [Fri, 16 May 2014 11:36:54 +0000 (13:36 +0200)]
microblaze: Clean device dma_ops structure

No code is setting up dma_operation for device.
Use dma_direct_ops for all cases.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Cleanup PCI_DRAM_OFFSET handling
Michal Simek [Fri, 16 May 2014 11:37:02 +0000 (13:37 +0200)]
microblaze: Cleanup PCI_DRAM_OFFSET handling

PCI_DRAM_OFFSET/pci_dram_offset is 0 all the time and there
is no difference for PCI and !PCI cases.
Also remove the whole code which setup archdata.dma_data
which is completely unused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Do not setup pci_dma_ops
Michal Simek [Fri, 16 May 2014 11:29:45 +0000 (13:29 +0200)]
microblaze: Do not setup pci_dma_ops

pci_dma_ops are dma_direct_ops which are setup
by default that's why not setup it again.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Return default dma operations
Michal Simek [Fri, 16 May 2014 10:56:53 +0000 (12:56 +0200)]
microblaze: Return default dma operations

Return Microblaze default dma operations
and remove bus notifier which setups the same dma operations
by default when device is added to the system.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Enable SERIAL_OF_PLATFORM
Michal Simek [Thu, 15 May 2014 07:11:49 +0000 (09:11 +0200)]
microblaze: Enable SERIAL_OF_PLATFORM

SERIAL_OF_PLATFORM is required for getting 8250 to work.

Reported-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dtses: Remove all compatible string from phy node
Michal Simek [Fri, 29 Aug 2014 14:16:49 +0000 (16:16 +0200)]
ARM: dtses: Remove all compatible string from phy node

Compatible string is not listed anywhere and it is even
not used by the kernel. Autodetection is done automatically.
If you want to specify exact PHYID please use compatible string
in this format.
compatible = "ethernet-phy-id0141.0e40", "ethernet-phy-ieee802.3-c22";

For more information look at here:
Documentation/devicetree/bindings/net/phy.txt

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 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>
9 years agoARM: zynq_defconfig: Remove debug UART
Soren Brinkmann [Fri, 29 Aug 2014 00:18:21 +0000 (17:18 -0700)]
ARM: zynq_defconfig: Remove debug UART

As the help text points out:
"Note that selecting this option will limit the kernel to a single
UART definition, as specified below. Attempting to boot the kernel
image on a different platform *will not work*, so this option should
not be enabled for kernels that are intended to be portable."

To avoid hangs on systems that don't use the expected UART, remove this
from the defconfig.

Reported-by: Andrei Simion <andreis@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: dt: Sync coding style in all dtses
Michal Simek [Thu, 21 Aug 2014 11:57:21 +0000 (13:57 +0200)]
ARM: zynq: dt: Sync coding style in all dtses

Created by:
sed -i 's/}\ ;/};/g' arch/arm/boot/dts/zynq-*

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Clean smcc/nand/nor nodes
Michal Simek [Thu, 21 Aug 2014 11:56:28 +0000 (13:56 +0200)]
ARM: zynq: dt: Clean smcc/nand/nor nodes

Simplify board description.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move qspi mode from dtses to dtsi
Michal Simek [Thu, 21 Aug 2014 11:41:03 +0000 (13:41 +0200)]
ARM: zynq: dt: Move qspi mode from dtses to dtsi

Unfortunately the most of description have to stay in board file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Use spi nodes from dtsi
Michal Simek [Thu, 21 Aug 2014 11:20:55 +0000 (13:20 +0200)]
ARM: zynq: dt: Use spi nodes from dtsi

Sync with mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: dts: zynq: Add SPI
Andreas Färber [Fri, 25 Jul 2014 11:12:31 +0000 (13:12 +0200)]
ARM: dts: zynq: Add SPI

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: dt: Synchronize usb nodes in board dtses
Michal Simek [Thu, 21 Aug 2014 11:16:08 +0000 (13:16 +0200)]
ARM: zynq: dt: Synchronize usb nodes in board dtses

Move nodes from board files to dtsi.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move zynq watchdog to dtsi
Michal Simek [Thu, 21 Aug 2014 10:58:21 +0000 (12:58 +0200)]
ARM: zynq: dt: Move zynq watchdog to dtsi

Here is the proposed binding for mainline.

watchdog@f8005000 {
compatible = "cdns,wdt-r1p2";
clocks = <&clkc 45>;
interrupt-parent = <&intc>;
interrupts = <0 9 1>;
reg = <0xf8005000 0x1000>;
reset-on-timeout;
timeout-sec = <10>;
};

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Remove qspi-linear node
Michal Simek [Thu, 21 Aug 2014 10:54:04 +0000 (12:54 +0200)]
ARM: zynq: dt: Remove qspi-linear node

There is no driver for this node that's why remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move scuwdt out of board dtses
Michal Simek [Thu, 21 Aug 2014 10:44:06 +0000 (12:44 +0200)]
ARM: zynq: dt: Move scuwdt out of board dtses

Move it to generic location.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Fix coding style issues in dtsi
Michal Simek [Thu, 21 Aug 2014 10:45:05 +0000 (12:45 +0200)]
ARM: zynq: dt: Fix coding style issues in dtsi

Remove space before semicolon.
sed -i 's/}\ ;/};/g' arch/arm/boot/dts/zynq-*

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Synchronize gpio nodes
Michal Simek [Thu, 21 Aug 2014 11:08:46 +0000 (13:08 +0200)]
ARM: zynq: dt: Synchronize gpio nodes

Remove gpio node from board dtses and move it to dtsi.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Synchronize can nodes
Michal Simek [Thu, 21 Aug 2014 10:33:41 +0000 (12:33 +0200)]
ARM: zynq: dt: Synchronize can nodes

Current driver is not fully compatible with mainline one.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move ocmc from dtses to dtsi
Michal Simek [Thu, 21 Aug 2014 09:57:58 +0000 (11:57 +0200)]
ARM: zynq: dt: Move ocmc from dtses to dtsi

Cleanup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move ddrc node from dtses to dtsi
Michal Simek [Thu, 21 Aug 2014 11:06:59 +0000 (13:06 +0200)]
ARM: zynq: dt: Move ddrc node from dtses to dtsi

Also change node name to be compatible with ePAPR

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move adc from dtses to dtsi
Michal Simek [Thu, 21 Aug 2014 09:43:03 +0000 (11:43 +0200)]
ARM: zynq: dt: Move adc from dtses to dtsi

Synchronize dtses with mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: dts: zynq: Add DMAC for zynq boards
Michal Simek [Thu, 21 Aug 2014 09:39:47 +0000 (11:39 +0200)]
ARM: dts: zynq: Add DMAC for zynq boards

Based on mainline patch:
"ARM: dts: zynq: Add DMAC for Parallella"
(sha1: fbb4add88c7d1240c75129c1442ec8dbed3182ae)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Move devcfg from board dtses to dtsi
Michal Simek [Thu, 21 Aug 2014 09:32:08 +0000 (11:32 +0200)]
ARM: zynq: dt: Move devcfg from board dtses to dtsi

devcfg is used in mainline for SOC_BUS. Let's added
and simplify others dtses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: dt: Add a fixed regulator for CPU voltage
Soren Brinkmann [Fri, 2 May 2014 21:07:32 +0000 (14:07 -0700)]
ARM: zynq: dt: Add a fixed regulator for CPU voltage

To silence the warning
cpufreq_cpu0: failed to get cpu0 regulator: -19
from the cpufreq driver regarding a missing regulator,
add a fixed regulator to the DT.
Zynq does not support voltage scaling and the CPU rail should always be
supplied with 1 V, hence it is added in the SOC-level dtsi.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: dt: Clean up device tree
Soren Brinkmann [Mon, 5 May 2014 17:16:08 +0000 (10:16 -0700)]
ARM: zynq: dt: Clean up device tree

 - Use generic node names
 - Fix up some weird formatting and white spaces
 - Update copyright info

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dts: zynq: drop address cells from GIC node
Lucas Stach [Fri, 11 Apr 2014 14:59:37 +0000 (16:59 +0200)]
ARM: dts: zynq: drop address cells from GIC node

This is likely a copy-and-paste error from the
ARM GIC documentation, that has already been fixed.

address-cells should have been set to 0, as with the size
cells. As having those properties set to 0 is the
same thing as not specifying them, drop them completely.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: DT: Remove ps7-afi and ps7-iop-bus-config nodes
Michal Simek [Thu, 21 Aug 2014 09:11:09 +0000 (11:11 +0200)]
ARM: zynq: DT: Remove ps7-afi and ps7-iop-bus-config nodes

There are no drivers for these nodes - remove them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: DT: Synchronize DTSes with the mainline kernel
Michal Simek [Thu, 21 Aug 2014 08:58:50 +0000 (10:58 +0200)]
ARM: zynq: DT: Synchronize DTSes with the mainline kernel

- fix licenses
- compatible nodes/models
- memory/chosen order
- remove amba bus setting

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoARM: zynq: DT: Migrate to dtsi usage
Soren Brinkmann [Wed, 20 Aug 2014 17:51:33 +0000 (10:51 -0700)]
ARM: zynq: DT: Migrate to dtsi usage

Use the zynq-7000.dtsi for Zynq device trees.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoxilinx: Remove .owner field for drivers
Michal Simek [Wed, 13 Aug 2014 10:52:19 +0000 (12:52 +0200)]
xilinx: Remove .owner field for drivers

All drivers using module_platform_driver or platform_driver_register
don't need to to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agowatchdog: xilinx: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:14:51 +0000 (13:14 +0200)]
watchdog: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agospi: cadence: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:46:16 +0000 (13:46 +0200)]
spi: cadence: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agospi: xilinx: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:45:56 +0000 (13:45 +0200)]
spi: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotty: serial: uartlite: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:43:16 +0000 (13:43 +0200)]
tty: serial: uartlite: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotty: serial: xuartps: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:41:05 +0000 (13:41 +0200)]
tty: serial: xuartps: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: xilinx: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:40:26 +0000 (13:40 +0200)]
net: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoi2c: i2c-xiic: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:39:29 +0000 (13:39 +0200)]
i2c: i2c-xiic: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoi2c: cadence: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:38:35 +0000 (13:38 +0200)]
i2c: cadence: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodma: xilinx: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:37:57 +0000 (13:37 +0200)]
dma: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoblock: systemace: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:30:29 +0000 (13:30 +0200)]
block: systemace: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoiio: adc: xilinx: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:35:47 +0000 (13:35 +0200)]
iio: adc: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agogpio: zynq: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:35:19 +0000 (13:35 +0200)]
gpio: zynq: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: cpuidle: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:33:56 +0000 (13:33 +0200)]
ARM: zynq: cpuidle: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agochar: xilinx_hwicap: Remove .owner field for driver
Michal Simek [Wed, 13 Aug 2014 11:32:11 +0000 (13:32 +0200)]
char: xilinx_hwicap: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: emacps: Use generic eth_mac_addr instead of private one
Michal Simek [Mon, 11 Aug 2014 11:33:13 +0000 (13:33 +0200)]
net: emacps: Use generic eth_mac_addr instead of private one

Use predefined ethernet function for changing mac address.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
9 years agonet: xilinx_emacps: Make MTU of 1500 possible
Stefan Eichenberger [Mon, 11 Aug 2014 12:46:01 +0000 (14:46 +0200)]
net: xilinx_emacps: Make MTU of 1500 possible

The current driver limits the MTU to  (1500 - hard_header_len). If the kernel
boots the MTU is set to 1500 but if once changed to < 1500 it is not possible
to set it back to 1500 again.

After this fix it is possible to set the MTU back to 1500.

The specific change MTU function is replaced by the standard eth_change_mtu
one.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoremoteproc: xilinx: Fix IRQ error testing
Michal Simek [Mon, 11 Aug 2014 09:57:56 +0000 (11:57 +0200)]
remoteproc: xilinx: Fix IRQ error testing

Use logical OR || instead of bitwise OR assignment.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoremoteproc: mb: Fix error return path
Michal Simek [Mon, 11 Aug 2014 09:44:33 +0000 (11:44 +0200)]
remoteproc: mb: Fix error return path

Call dma_release_declared_memory when the driver fails.
Also use ERR_PTR where possible.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoremoteproc: mb: Return correct error instead of 0 - success
Michal Simek [Mon, 11 Aug 2014 08:55:54 +0000 (10:55 +0200)]
remoteproc: mb: Return correct error instead of 0 - success

Fix incorrect error return value when dma_declare_coherent_memory()
fails.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoremoteproc: zynq: added missing DMA error handling
Kian Karas [Mon, 11 Aug 2014 08:01:18 +0000 (10:01 +0200)]
remoteproc: zynq: added missing DMA error handling

Two seperate issues is fixed in the driver's probe function with this
patch:
a) If dma_declare_coherent_memory() fails, an error value is returned
   instead of 0 (success).
b) In case of an error, the declared DMA coherent memory is released
   again.

Signed-off-by: Kian Karas <kian.karas@cobham.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoremoteproc: zynq: allow arbitrary firmware bootaddr
Kian Karas [Fri, 8 Aug 2014 15:10:54 +0000 (17:10 +0200)]
remoteproc: zynq: allow arbitrary firmware bootaddr

Signed-off-by: Kian Karas <kian.karas@cobham.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agospi: xilinx: Use pdev->id instead of pdev->dev.id for the SPI bus number
Lars-Peter Clausen [Thu, 10 Jul 2014 08:30:20 +0000 (10:30 +0200)]
spi: xilinx: Use pdev->id instead of pdev->dev.id for the SPI bus number

The Xilinx SPI driver initializes the bus_num field of the SPI master to
pdev->dev.id. pdev->dev.id is always 0 for platform devices which causes bus
number conflicts for the SPI controller when creating multiple device instances
of the driver. Instead use pdev->id which will have the assignt platform device
id. If the device is instantiated via devicetree pdev->id is -1 which will cause
the SPI core to dynamically assign a id (or use the id defined via a alias in
the devicetree).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
9 years agoxilinx_axienet: Free mdio bus in error path
Michal Simek [Fri, 8 Aug 2014 08:46:34 +0000 (10:46 +0200)]
xilinx_axienet: Free mdio bus in error path

If register_netdev failed also free registered mdio bus.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoxilinx_axienet: Fix devm_ioremap_resource errors
Michal Simek [Fri, 8 Aug 2014 08:45:59 +0000 (10:45 +0200)]
xilinx_axienet: Fix devm_ioremap_resource errors

devm_ioremap_resource already print message on error
that's why having another is the driver is useless.

Error message from devm_ioremap_resource:
xilinx_axienet 44a00000.network: can't request region for resource [mem
0x41e00000-0x41e0ffff]

Errors should be taken from PTR_ERR setup by devm_ioremap_resource.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Fix issue with msi compilation
Michal Simek [Tue, 5 Aug 2014 09:21:13 +0000 (11:21 +0200)]
microblaze: Fix issue with msi compilation

There are some missing references to linux/irq.h.

Warning log:
arch/microblaze/pci/msi.c: In function 'create_irq':
arch/microblaze/pci/msi.c:59:2: error: implicit declaration of function
'dynamic_irq_init' [-Werror=implicit-function-declaration]
  dynamic_irq_init(irq);
  ^
arch/microblaze/pci/msi.c: In function 'destroy_irq':
arch/microblaze/pci/msi.c:76:2: error: implicit declaration of function
'dynamic_irq_cleanup' [-Werror=implicit-function-declaration]
  dynamic_irq_cleanup(irq);
  ^
arch/microblaze/pci/msi.c: At top level:
arch/microblaze/pci/msi.c:107:15: error: variable 'xilinx_msi_chip' has
initializer but incomplete type
 static struct irq_chip xilinx_msi_chip = {
               ^
arch/microblaze/pci/msi.c:108:3: error: unknown field 'name' specified
in initializer
   .name = "PCI-MSI",
   ^
arch/microblaze/pci/msi.c:108:3: warning: excess elements in struct
initializer [enabled by default]
arch/microblaze/pci/msi.c:108:3: warning: (near initialization for
'xilinx_msi_chip') [enabled by default]
arch/microblaze/pci/msi.c:109:3: error: unknown field 'irq_ack'
specified in initializer
   .irq_ack = xilinx_msi_nop,
   ^
arch/microblaze/pci/msi.c:109:3: warning: excess elements in struct
initializer [enabled by default]
arch/microblaze/pci/msi.c:109:3: warning: (near initialization for
'xilinx_msi_chip') [enabled by default]
arch/microblaze/pci/msi.c:110:3: error: unknown field 'irq_enable'
specified in initializer
   .irq_enable = unmask_msi_irq,
   ^
...

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agotrafgen: Add support for zynq
Kedareswara rao Appana [Fri, 1 Aug 2014 09:45:57 +0000 (15:15 +0530)]
trafgen: Add support for zynq

Currently the trafgen driver can only be enabled if target
architecutre is Microblaze. This patch adds ARCH_ZYNQ
option to the kconfig so that users can test this on
zynq platform also.
Also enable this driver for default zynq defconfig.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: pm: Trivial clean up
Soren Brinkmann [Wed, 30 Jul 2014 16:13:09 +0000 (09:13 -0700)]
ARM: zynq: pm: Trivial clean up

 - remove redundant #includes
 - update copyright info

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Refactor PM code
Soren Brinkmann [Wed, 30 Jul 2014 16:13:08 +0000 (09:13 -0700)]
ARM: zynq: Refactor PM code

Some PM features are enabled in zynq_pm_late_init() that are independent
of suspend support. Hence the code is refactored to always do the common
PM init.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Enable A9 clock gating feature
Soren Brinkmann [Wed, 30 Jul 2014 16:13:07 +0000 (09:13 -0700)]
ARM: zynq: Enable A9 clock gating feature

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Remove SCU standby from platform code
Soren Brinkmann [Wed, 30 Jul 2014 16:13:06 +0000 (09:13 -0700)]
ARM: zynq: Remove SCU standby from platform code

Enabling SCU standby mode is done in common code now. There is no longer
a need to change the SCU configuration from platform code.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Have DDR self-refresh and clock stop always on
Soren Brinkmann [Wed, 30 Jul 2014 16:13:05 +0000 (09:13 -0700)]
ARM: zynq: Have DDR self-refresh and clock stop always on

Those features are controlled by HW and they can be always on. If the
DDR becomes idle it will leverage those low-power modes automatically
and also resume operation on new requests.
Latency penalties should be negligible.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Don't copy suspend stub to OCM on every suspend
Soren Brinkmann [Wed, 30 Jul 2014 16:13:04 +0000 (09:13 -0700)]
ARM: zynq: Don't copy suspend stub to OCM on every suspend

With the migration to the OCM allocator, the suspend code allocates and
holds OCM space throughout the whole run-time. Hence, copying the OCM
stub to OCM can be reduced to being done once only.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Wire-up renameat2 syscall
Michal Simek [Wed, 9 Jul 2014 11:27:07 +0000 (13:27 +0200)]
microblaze: Wire-up renameat2 syscall

Add new renameat2 syscall.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: smp_scu: enable SCU standby support
Shawn Guo [Fri, 25 Jul 2014 08:09:50 +0000 (16:09 +0800)]
ARM: smp_scu: enable SCU standby support

With SCU standby enabled, SCU CLK will be turned off when all processors
are in WFI mode.  And the clock will be turned on when any processor
leaves WFI mode.

This behavior should be preferable in terms of power efficiency of
system idle.  So let's set the SCU standby bit to enable the support in
function scu_enable().

Cortex-A9 earlier than r2p0 has no standby bit in SCU, so we need to
skip setting the bit for those.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: smp_scu: use macro for SCU enable bit
Shawn Guo [Fri, 25 Jul 2014 08:09:49 +0000 (16:09 +0800)]
ARM: smp_scu: use macro for SCU enable bit

Use macro instead of magic number for SCU enable bit.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: Remove legacy comment
Soren Brinkmann [Wed, 9 Jul 2014 19:49:23 +0000 (12:49 -0700)]
ARM: zynq: Remove legacy comment

Commit 'zynq: Add OCM driver' (f3bde737e1c39d09ea645ddfd118a3a0628ad8a6)
migrated to use the OCM allocator, making a comment no longer
applicable.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
9 years agoMerge tag 'v3.15' into master-next
Michal Simek [Wed, 30 Jul 2014 10:55:08 +0000 (12:55 +0200)]
Merge tag 'v3.15' into master-next

- Fix xilinx-dma.c
  Rename vb2_queue.timestamp field as timestamp_flags
Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
- Test RPMSG drivers
- Sync drivers from mainline

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoRevert "rpmsg: add OMX driver"
Michal Simek [Tue, 29 Jul 2014 13:39:09 +0000 (15:39 +0200)]
Revert "rpmsg: add OMX driver"

This reverts commit f87cc04afa137a5d30127a878d685c9ebe2c0eb5.
Remove unused OMX driver from the tree. None is using it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoRevert "rpmsg: add omap host backend"
Michal Simek [Tue, 29 Jul 2014 13:36:59 +0000 (15:36 +0200)]
Revert "rpmsg: add omap host backend"

This reverts commit c4b7c1c6933ac16fd69d305f554cd91db574a8c8.
None is using this driver - revert it.
It was just example in the tree from the beginning.

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