projects/modsched/linux.git
7 years agonet: xilinx_emacps: Fixed accessing NULL pointer error when local-mac-address is... digilent-v3.6
Tinghui WANG (Steven) [Wed, 16 Jan 2013 23:49:04 +0000 (15:49 -0800)]
net: xilinx_emacps: Fixed accessing NULL pointer error when local-mac-address is not available in device tree

7 years agonet: xilinx_emacps: Obtain MAC Address from Device Tree if available
Tinghui WANG (Steven) [Wed, 16 Jan 2013 00:13:31 +0000 (16:13 -0800)]
net: xilinx_emacps: Obtain MAC Address from Device Tree if available

xilinx_emacps will obtain MAC address from local-mac-address property in device tree first.
If the property is not set, it will try to obtain mac address from EMACPS hardware registers.
If the mac hardware address from EMACPS registers is not valid, it will generate a random mac address.

7 years agoARM: Makefile: Temporary Fix for an error when using Make 3.82 v3.6-digilent-13.01
Tinghui WANG (Steven) [Thu, 3 Jan 2013 21:51:15 +0000 (13:51 -0800)]
ARM: Makefile: Temporary Fix for an error when using Make 3.82

Some Linux distribution upgraded GNU Make from v3.81 to v3.82
For those who use v3.82, an error may occur during compilation which goes as follows:
  .../arch/arm/Makefile:296: *** mixed implicit and normal rules. Stop

This temporarily fixes the error.

7 years agoZedBoard: Add restart functions to support reboot
Tinghui WANG (Steven) [Thu, 3 Jan 2013 21:29:44 +0000 (13:29 -0800)]
ZedBoard: Add restart functions to support reboot

7 years agoDTS: ZedBoard: enable mounting devtmpfs to /dev
Tinghui WANG (Steven) [Thu, 3 Jan 2013 21:24:47 +0000 (13:24 -0800)]
DTS: ZedBoard: enable mounting devtmpfs to /dev

devtmpfs contains all the device nodes for all devices known to the kernel.
It needs to be mounted to access SD card partition via corresponding device nodes under /dev.

7 years agoDTS: Update Default DTS file for ZedBoard: digilent_zed.dts
Tinghui WANG (Steven) [Mon, 31 Dec 2012 23:12:42 +0000 (15:12 -0800)]
DTS: Update Default DTS file for ZedBoard: digilent_zed.dts

Remove other ZedBoard related device tree source file to avoid confusion.

7 years agoConfig: Update ZedBoard Default Configuration File: digilent_zed_defconfig
Tinghui WANG (Steven) [Mon, 31 Dec 2012 23:05:29 +0000 (15:05 -0800)]
Config: Update ZedBoard Default Configuration File: digilent_zed_defconfig

7 years agoADV7511: Kconfig: Auto select DRM_ANALOG for ADV7511 in configuration
Tinghui WANG (Steven) [Sun, 30 Dec 2012 22:37:01 +0000 (14:37 -0800)]
ADV7511: Kconfig: Auto select DRM_ANALOG for ADV7511 in configuration

DRM_ANALOG is needed for ADV7511 driver to compile.
I2C is removed from the dependency checking as
selecting DRM guarantees I2C selected.

7 years agoXILINX: DMA: Fix merge error in xilinx dma driver.
Tinghui WANG (Steven) [Sun, 30 Dec 2012 22:30:55 +0000 (14:30 -0800)]
XILINX: DMA: Fix merge error in xilinx dma driver.

Keep consistent with the dma driver in ADI's tree.
Certain functionalities in the driver are crucial for ADV7511 and sound drivers.

7 years agoZedBoard: Fix mach-type to XILINX_EP107
Tinghui WANG (Steven) [Sun, 30 Dec 2012 22:27:56 +0000 (14:27 -0800)]
ZedBoard: Fix mach-type to XILINX_EP107

7 years agoMerge branch 'xcomm_zynq' of ../linux-adi into dev-3.6
Tinghui WANG (Steven) [Wed, 26 Dec 2012 20:45:33 +0000 (12:45 -0800)]
Merge branch 'xcomm_zynq' of ../linux-adi into dev-3.6

Conflicts:
Documentation/devicetree/bindings/i2c/xiic.txt
Documentation/pmods/pmodoled.txt
Makefile
arch/arm/boot/dts/zynq-zc702-adv7511.dts
arch/arm/boot/dts/zynq-zed-adv7511.dts
arch/arm/mach-zynq/Makefile
arch/arm/mach-zynq/board_zc702.c
arch/arm/mach-zynq/slcr.c
drivers/Kconfig
drivers/Makefile
drivers/base/regmap/regcache-rbtree.c
drivers/dma/xilinx_dma.c
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/analog/Kconfig
drivers/gpu/drm/analog/Makefile
drivers/gpu/drm/analog/analog_drm_crtc.c
drivers/gpu/drm/analog/analog_drm_drv.c
drivers/gpu/drm/analog/analog_drm_drv.h
drivers/gpu/drm/analog/analog_drm_encoder.c
drivers/gpu/drm/i2c/Makefile
drivers/gpu/drm/i2c/adv7511.h
drivers/gpu/drm/i2c/adv7511_audio.c
drivers/gpu/drm/i2c/adv7511_core.c
drivers/net/ethernet/xilinx/xilinx_emacps.c
drivers/of/of_i2c.c
drivers/pmods/Kconfig
drivers/pmods/Makefile
drivers/pmods/pmodoled-gpio.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-xilinx-usbps.c
drivers/usb/host/ehci.h
drivers/usb/otg/ulpi.c
include/linux/dmaengine.h
include/linux/of.h
include/linux/of_i2c.h
include/sound/dmaengine_pcm.h
sound/soc/Kconfig
sound/soc/Makefile
sound/soc/soc-dmaengine-pcm.c
sound/soc/xlnx/Kconfig
sound/soc/xlnx/Makefile
sound/soc/xlnx/adv7511_hdmi.c
sound/soc/xlnx/xilinx-pcm.c

7 years agoASoC:xlnx:axi-i2s: Fix bit-clock divider
Lars-Peter Clausen [Mon, 3 Dec 2012 09:53:29 +0000 (10:53 +0100)]
ASoC:xlnx:axi-i2s: Fix bit-clock divider

Also remove a debug printk.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC:xlnx:zed_adau1761: Change MCLK frequency to 12288000
Lars-Peter Clausen [Mon, 3 Dec 2012 09:52:34 +0000 (10:52 +0100)]
ASoC:xlnx:zed_adau1761: Change MCLK frequency to 12288000

The bitstream contains a clock generator which generates a 12.288 MHz clock for
the audio codec MCLK.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: xilinx-pcm: Reduce preallocated memory area
Lars-Peter Clausen [Mon, 29 Oct 2012 12:49:07 +0000 (13:49 +0100)]
ASoC: xilinx-pcm: Reduce preallocated memory area

We are running a little tight on DMAable memory otherwise if we have all three
audio, video and xcomm running.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: axi-spdif: Set frequency in SPDIF status word
Lars-Peter Clausen [Tue, 7 Aug 2012 13:05:23 +0000 (15:05 +0200)]
ASoC: axi-spdif: Set frequency in SPDIF status word

The the sampling frequency in the SPDIF status word.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: ADAU1761 hardcode ZED platform data
Lars-Peter Clausen [Wed, 25 Jul 2012 15:11:56 +0000 (17:11 +0200)]
ASoC: ADAU1761 hardcode ZED platform data

This is a temporary hack for the ZED tree until we have proper device tree
support in the ADAU1761 driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: Add ZED ADAU1761 board file
Lars-Peter Clausen [Wed, 13 Jun 2012 15:29:57 +0000 (17:29 +0200)]
ASoC: Add ZED ADAU1761 board file

Add support for the ADAU1761 found on the ZED board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: Add AXI I2S driver
Lars-Peter Clausen [Wed, 13 Jun 2012 15:29:20 +0000 (17:29 +0200)]
ASoC: Add AXI I2S driver

Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: xilinx_pcm: Add support for individual subchannels
Lars-Peter Clausen [Wed, 13 Jun 2012 14:03:57 +0000 (16:03 +0200)]
ASoC: xilinx_pcm: Add support for individual subchannels

A DAI may support both capture and playback or just one of the two. Thus we need
to be able to specify DMA channels for capture and playback independently of each
other. Do this by adding a per direction subnode to the PCM device's node.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: Add ADAU1X61 codec support
Lars-Peter Clausen [Mon, 31 Oct 2011 10:47:48 +0000 (11:47 +0100)]
ASoC: Add ADAU1X61 codec support

This patch adds support for the Ananlog Devices ADAU1361 and ADAU1761 codecs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: Add ADAU1X61 and ADAU1X81 CODECs common code
Lars-Peter Clausen [Thu, 3 Nov 2011 13:04:25 +0000 (14:04 +0100)]
ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code

The ADAU1X61 and ADAU1X81 are very similar in the digital domain of the CODECs,
but are quite different in the analog domain. This patch adds support for the
common parts of the ADAU161 and ADAU181 CODECs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: dmaengine-pcm: Add support for querying stream position from DMA driver
Lars-Peter Clausen [Wed, 13 Jun 2012 15:37:37 +0000 (17:37 +0200)]
ASoC: dmaengine-pcm: Add support for querying stream position from DMA driver

Currently the sound dmaengine pcm helper functions implement the pcm_pointer
callback by trying to count the number of elapsed periods. This is done by
advancing the stream position in the dmaengine callback by one period.
Unfortunately there is no guarantee that the callback will be called for each
elapsed period. It may be possible that under high system load it is only called
once for multiple elapsed periods. This patch addresses the issue by
implementing support for querying the current stream position directly from the
dmaengine driver. Since not all dmaengine drivers support reporting the stream
position yet the old period counting implementation is kept for now.

Furthermore the new mechanism allows to report the stream position with a
sub-period granularity, given that the dmaengine driver supports this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tinghui WANG (Steven) <steven.wang@digilentinc.com>
7 years agoASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointer
Lars-Peter Clausen [Mon, 11 Jun 2012 16:46:39 +0000 (18:46 +0200)]
ASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointer

Currently the sound dmaengine pcm helper functions implement the pcm_pointer
callback by trying to count the number of elapsed periods. This is done by
advancing the stream position in the dmaengine callback by one period.
Unfortunately there is no guarantee that the callback will be called for each
elapsed period. It may be possible that under high system load it is only called
once for multiple elapsed periods. This patch renames the current implementation
and documents its shortcomings and that it should not be used anymore in new
drivers.

The next patch will introduce a new snd_dmaengine_pcm_pointer which will be
implemented based on querying the current stream position from the dma device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agozynq-zc702-adv7511.dts: Update device tree
Michael Hennerich [Thu, 20 Dec 2012 13:19:07 +0000 (14:19 +0100)]
zynq-zc702-adv7511.dts: Update device tree

Likewise Commit abdb1e4419a1b4d3ac4032491c9e7a522dab8acd
ASoC: adv7511_hdmi: Get codec adapter from devicetree

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoPMOD: GPL License Header Added
Tinghui WANG (Steven) [Tue, 18 Dec 2012 20:15:47 +0000 (12:15 -0800)]
PMOD: GPL License Header Added

7 years agoplatform: zynq zed xcomm: fix cal eeprom slave addr
Michael Hennerich [Thu, 6 Dec 2012 17:17:11 +0000 (18:17 +0100)]
platform: zynq zed xcomm: fix cal eeprom slave addr

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoMerge remote-tracking branch 'github/xcomm_zynq' into xcomm_zynq_3_6
Lars-Peter Clausen [Thu, 6 Dec 2012 15:33:18 +0000 (16:33 +0100)]
Merge remote-tracking branch 'github/xcomm_zynq' into xcomm_zynq_3_6

Conflicts:
drivers/clk/clkdev.c
include/linux/clk.h

7 years agoxcomm_adv7511_defconfig: Update to v3.6
Lars-Peter Clausen [Thu, 6 Dec 2012 15:27:15 +0000 (16:27 +0100)]
xcomm_adv7511_defconfig: Update to v3.6

Update the zync_xcomm_adv7511_defconfig to v3.6.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agousb: ehci: Fix ulpi type in the ehci_hcd struct
Lars-Peter Clausen [Thu, 6 Dec 2012 13:37:19 +0000 (14:37 +0100)]
usb: ehci: Fix ulpi type in the ehci_hcd struct

Looks like this was missed during earlier conversions of the ZED USB fixes to
usb_phy.

Fixes the follow warnings:
drivers/usb/host/ehci-hcd.c: In function 'ehci_run':
drivers/usb/host/ehci-hcd.c:676:25: warning: initialization from incompatible pointer type
In file included from drivers/usb/host/ehci-hcd.c:1300:0:
drivers/usb/host/ehci-xilinx-usbps.c: In function 'usb_hcd_xusbps_probe':
drivers/usb/host/ehci-xilinx-usbps.c:204:15: warning: assignment from incompatible pointer type

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agoxilinx-usbps: Initialize ehci hcd before using it
Lars-Peter Clausen [Thu, 6 Dec 2012 11:35:25 +0000 (12:35 +0100)]
xilinx-usbps: Initialize ehci hcd before using it

In ehci_xusbps_setup ehci_halt is called before ehci_init. This means that the
initial ehci_halt call is working on a not completely initialized ehci hcd
struct, which might cause undefined behavior. So make sure to call ehci_init
before calling ehci_halt.

This fixes also the following lockdep warning:

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
[<c001355c>] (unwind_backtrace+0x0/0xe0) from [<c005c6c0>] (__lock_acquire+0x1ac/0x19c0)
[<c005c6c0>] (__lock_acquire+0x1ac/0x19c0) from [<c005e394>] (lock_acquire+0x60/0x74)
[<c005e394>] (lock_acquire+0x60/0x74) from [<c034843c>] (_raw_spin_lock_irq+0x50/0x60)
[<c034843c>] (_raw_spin_lock_irq+0x50/0x60) from [<c02202e8>] (ehci_halt+0x14/0xd8)
[<c02202e8>] (ehci_halt+0x14/0xd8) from [<c022532c>] (ehci_xusbps_setup+0x58/0x41c)
[<c022532c>] (ehci_xusbps_setup+0x58/0x41c) from [<c020f828>] (usb_add_hcd+0x194/0x5c0)
[<c020f828>] (usb_add_hcd+0x194/0x5c0) from [<c0223e28>] (ehci_xusbps_drv_probe+0x158/0x1e0)
[<c0223e28>] (ehci_xusbps_drv_probe+0x158/0x1e0) from [<c01c84dc>] (platform_drv_probe+0x14/0x18)
...

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agoMerge remote-tracking branch 'xilinx/master-next' into xcomm_zynq_3_6
Lars-Peter Clausen [Thu, 6 Dec 2012 13:14:37 +0000 (14:14 +0100)]
Merge remote-tracking branch 'xilinx/master-next' into xcomm_zynq_3_6

7 years agoRevert "DMA: Xilinx: Separation of DMA driver into three drivers"
Lars-Peter Clausen [Thu, 6 Dec 2012 12:30:41 +0000 (13:30 +0100)]
Revert "DMA: Xilinx: Separation of DMA driver into three drivers"

This reverts commit 60ea42affdc49e30cc41a12ff50b53c4871714fe.

7 years agoMerge remote-tracking branch 'xilinx/master' into xcomm_zynq_3_6
Lars-Peter Clausen [Thu, 6 Dec 2012 12:25:52 +0000 (13:25 +0100)]
Merge remote-tracking branch 'xilinx/master' into xcomm_zynq_3_6

Conflicts:
arch/arm/mach-zynq/board_zc702.c
arch/arm/mach-zynq/common.c
drivers/gpio/gpio-xilinxps.c
drivers/iio/adc/Makefile
drivers/iio/frequency/Kconfig
drivers/iio/frequency/Makefile
drivers/iio/frequency/adf4350.c
drivers/iio/light/Kconfig
drivers/iio/light/Makefile
drivers/iio/light/lm3533-als.c
drivers/spi/Kconfig
drivers/spi/spi-xcomm.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-xilinx-usbps.c
drivers/usb/host/ehci.h

7 years agoDigilent: Pmods: Added PmodAD1 driver and documentation
Cristian Fatu [Thu, 6 Dec 2012 05:06:42 +0000 (21:06 -0800)]
Digilent: Pmods: Added PmodAD1 driver and documentation

7 years agoDigilent: Pmods: Added PmodDA1 driver and documentation
Cristian Fatu [Thu, 6 Dec 2012 05:04:03 +0000 (21:04 -0800)]
Digilent: Pmods: Added PmodDA1 driver and documentation

7 years agoDigilent: Pmods: Added PmodCLP driver and documentation
Cristian Fatu [Thu, 6 Dec 2012 04:58:07 +0000 (20:58 -0800)]
Digilent: Pmods: Added PmodCLP driver and documentation

7 years agoDigilent: Pmods: Added PmodCLS driver and documentation
Cristian Fatu [Thu, 6 Dec 2012 04:45:15 +0000 (20:45 -0800)]
Digilent: Pmods: Added PmodCLS driver and documentation

7 years agoarch: microblaze: add support for AD9250-FMC-250EBZ
Michael Hennerich [Tue, 4 Dec 2012 13:19:47 +0000 (14:19 +0100)]
arch: microblaze: add support for AD9250-FMC-250EBZ

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoiio: adc: AD9250: clocks must be present and stable before device init.
Michael Hennerich [Tue, 4 Dec 2012 12:44:40 +0000 (13:44 +0100)]
iio: adc: AD9250: clocks must be present and stable before device init.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoiio: adc: Analog Devices AXI-JESD204B Interface Module add clk support
Michael Hennerich [Tue, 4 Dec 2012 12:43:34 +0000 (13:43 +0100)]
iio: adc: Analog Devices AXI-JESD204B Interface Module add clk support

Clocks must be present and stable before the interface is setup.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agospi: of_register_spi_devices: add support for SPI_3WIRE
Michael Hennerich [Tue, 4 Dec 2012 12:42:06 +0000 (13:42 +0100)]
spi: of_register_spi_devices: add support for SPI_3WIRE

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agospi: New Analog Devices AD9250-FMC-250EBZ SPI-SPI-bridge driver
Michael Hennerich [Tue, 4 Dec 2012 12:41:31 +0000 (13:41 +0100)]
spi: New Analog Devices AD9250-FMC-250EBZ SPI-SPI-bridge driver

This driver adds support for the SPI-SPI bridge CPLD found on the
Analog Devices AD9250-FMC-250EBZ and 4DSP FMC176 and FMX230 FMC cards.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoiio: frequency: New driver AD9517 SPI Clock Generator with integrated VCO
Michael Hennerich [Tue, 4 Dec 2012 12:38:01 +0000 (13:38 +0100)]
iio: frequency: New driver AD9517 SPI Clock Generator with integrated VCO

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoiio: frequency: cf_axi_dds miscellaneous changes
Michael Hennerich [Tue, 4 Dec 2012 12:21:43 +0000 (13:21 +0100)]
iio: frequency: cf_axi_dds miscellaneous changes

Remove mem init and wave data. (no longer supported by HDL)
Add debugfs access to PCORE registers.
Add support for 3x HW interpolation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoiio: adc: avoid possible false trigger and simplify dco calibrate routine
Michael Hennerich [Tue, 4 Dec 2012 12:17:41 +0000 (13:17 +0100)]
iio: adc: avoid possible false trigger and simplify dco calibrate routine

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoarch: mb: enable COMMOM_CLK infrastructure
Michael Hennerich [Tue, 4 Dec 2012 14:16:41 +0000 (15:16 +0100)]
arch: mb: enable COMMOM_CLK infrastructure

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoclk: add DT fixed-clock binding support
Grant Likely [Sun, 8 Apr 2012 02:39:39 +0000 (21:39 -0500)]
clk: add DT fixed-clock binding support

Add support for DT "fixed-clock" binding to the common fixed rate clock
support.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[Rob Herring] Rework and move into common clock infrastructure
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
7 years agoclk: add DT clock binding support
Grant Likely [Mon, 9 Apr 2012 19:50:06 +0000 (14:50 -0500)]
clk: add DT clock binding support

Based on work 1st by Ben Herrenschmidt and Jeremy Kerr, then by Grant
Likely, this patch adds support to clk_get to allow drivers to retrieve
clock data from the device tree.

Platforms scan for clocks in DT with of_clk_init and a match table, and
the register a provider through of_clk_add_provider. The provider's
clk_src_get function will be called when a device references the
provider's OF node for a clock reference.

v6 (Rob Herring):
    - Return error values instead of NULL to match clock framework
      expectations

v5 (Rob Herring):
    - Move from drivers/of into common clock subsystem
    - Squashed "dt/clock: add a simple provider get function" and
      "dt/clock: add function to get parent clock name"
    - Rebase to 3.4-rc1
    - Drop CONFIG_OF_CLOCK and just use CONFIG_OF
    - Add missing EXPORT_SYMBOL to various functions
    - s/clock-output-name/clock-output-names/
    - Define that fixed-clock binding is a single output

v4 (Rob Herring):
    - Rework for common clk subsystem
    - Add of_clk_get_parent_name function

v3: - Clarified documentation

v2: - fixed errant ';' causing compile error
    - Editorial fixes from Shawn Guo
    - merged in adding lookup to clkdev
    - changed property names to match established convention. After
      working with the binding a bit it really made more sense to follow the
      lead of 'reg', 'gpios' and 'interrupts' by making the input simply
      'clocks' & 'clock-names' instead of 'clock-input-*', and to only use
      clock-output* for the producer nodes. (Sorry Shawn, this will mean
      you need to change some code, but it should be trivial)
    - Add ability to inherit clocks from parent nodes by using an empty
      'clock-ranges' property.  Useful for busses.  I could use some feedback
      on the new property name, 'clock-ranges' doesn't feel right to me.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Shawn Guo <shawn.guo@freescale.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
7 years agoarch: microblaze: update ML605 xcomm settings
Michael Hennerich [Tue, 4 Dec 2012 13:40:50 +0000 (14:40 +0100)]
arch: microblaze: update ML605 xcomm settings

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
7 years agoRevert "Increase DMA memory region"
Lars-Peter Clausen [Mon, 3 Dec 2012 17:41:10 +0000 (18:41 +0100)]
Revert "Increase DMA memory region"

This reverts commit 8a797e461986eddfb15757a1f01284d4e63c5259.

Now that we have CMA we do not need this anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agozync_xcomm_adv7511_defconfig: Enable CMA
Lars-Peter Clausen [Mon, 3 Dec 2012 17:39:01 +0000 (18:39 +0100)]
zync_xcomm_adv7511_defconfig: Enable CMA

Enable CMA and reserve a memory region of 40MB. This allows us to allocate all
the different DMA buffers we need for both XCOMM and HDMI.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agousb: ehci-xilinx-usbps: Fix reboot issue in OTG mode
Michal Simek [Mon, 26 Nov 2012 09:12:46 +0000 (10:12 +0100)]
usb: ehci-xilinx-usbps: Fix reboot issue in OTG mode

This patch fix the reboot issue when OTG mode is used
and reset is performed without using OTG-host mode.

The reason is not initializaed ehci->caps/regs which
are initialized in ehci_xusbps_setup but this function
is called when host mode is used.
But uninitialization depends on these values.

Path: usb_hcd_platform_shutdown -> ehci_shutdown ->
ehci_silence_controller -> ehci_halt
where code expect filled ehci->regs value.

Change ehci behavior in OTG mode to add and remove hcd
which ensure that all structure are initialized
and ehci can be shutdown.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: otg: usbps_otg: Do not initialized retval
Michal Simek [Thu, 22 Nov 2012 14:16:00 +0000 (15:16 +0100)]
usb: otg: usbps_otg: Do not initialized retval

Not necessary to initialized retval because it is
always setup later in the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: otg: usbps_otg: Remove if condition
Michal Simek [Thu, 22 Nov 2012 14:12:14 +0000 (15:12 +0100)]
usb: otg: usbps_otg: Remove if condition

the_transceiver is always initialized and xusbps_otg_remove
is called all the time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: otg: usbps_otg: Simplify returning path in otg driver
Michal Simek [Thu, 22 Nov 2012 14:07:53 +0000 (15:07 +0100)]
usb: otg: usbps_otg: Simplify returning path in otg driver

Return directly from driver and do not use done label.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: otg: ulpi: Add IDs from SMSC USB3320
Michal Simek [Thu, 22 Nov 2012 13:13:09 +0000 (14:13 +0100)]
usb: otg: ulpi: Add IDs from SMSC USB3320

This ulpi phy is placed on zc702 board and maybe
on others too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: host: Remove OF dependency in USB_EHCI_XUSBPS
Michal Simek [Thu, 22 Nov 2012 13:11:00 +0000 (14:11 +0100)]
usb: host: Remove OF dependency in USB_EHCI_XUSBPS

USB_EHCI_XUSBPS depends on ARCH_ZYNQ which has always
OF on. That's why another OF dependency was removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: spi-xilinx: Run run-time endian detection
Michal Simek [Wed, 28 Nov 2012 08:29:45 +0000 (09:29 +0100)]
spi: spi-xilinx: Run run-time endian detection

Do not load endian value from platform data
and rather autodetect it.
The problem is with using this platform in PL on Zynq
when little endian arm IO function should be used but
there is no description in DTS which suggest this
and also platform_data doesn't contain this information.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
CC: Srikanth Vemula <svemula@xilinx.com>
7 years agozynq: pcie: AXI PCIE Initialize pci when IP is available
Michal Simek [Fri, 30 Nov 2012 20:39:29 +0000 (21:39 +0100)]
zynq: pcie: AXI PCIE Initialize pci when IP is available

Do not initialize pci device when it is not available
in the system.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinxps: Enable clock for non PM mode
Soren Brinkmann [Thu, 29 Nov 2012 19:37:45 +0000 (11:37 -0800)]
gpio: xilinxps: Enable clock for non PM mode

Assuming the device clock would be enabled through RUNTIME_PM,
the clock was disabled in the driver's probe routine.
Obviously, this did break functionality in case the kernel is
compiled without CONFIG_PM_RUNTIME.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinxps: Remove not reachable code
Michal Simek [Wed, 28 Nov 2012 17:30:58 +0000 (18:30 +0100)]
gpio: xilinxps: Remove not reachable code

The second return in the same function can't be used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinx_gpiops: Correct minor style issues
Soren Brinkmann [Thu, 29 Nov 2012 17:47:26 +0000 (09:47 -0800)]
gpio: xilinx_gpiops: Correct minor style issues

Removing/adding braces where appropriate.
Remove unnecessary line breaks.
Remove unnecessary casts of void pointers.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xlilinx_gpiops: Migrate to 'to_platform_device'
Soren Brinkmann [Thu, 29 Nov 2012 17:47:25 +0000 (09:47 -0800)]
gpio: xlilinx_gpiops: Migrate to 'to_platform_device'

Replacing usage of the 'container_of' macro with the simpler
'to_platform_device' macro where appropriate.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinx_gpiops: Remove unnecessary #include
Soren Brinkmann [Thu, 29 Nov 2012 17:47:24 +0000 (09:47 -0800)]
gpio: xilinx_gpiops: Remove unnecessary #include

linux/errno.h is not required by the driver and thus removed
from the included files.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinx_gpiops: Sort #includes alphabetically
Soren Brinkmann [Thu, 29 Nov 2012 17:47:23 +0000 (09:47 -0800)]
gpio: xilinx_gpiops: Sort #includes alphabetically

Just sorting for easier maintenance.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agogpio: xilinxps: Fix interrupts
Soren Brinkmann [Thu, 29 Nov 2012 17:45:15 +0000 (09:45 -0800)]
gpio: xilinxps: Fix interrupts

This patch makes the GPIO interrupts work and they can be
used to resume from suspend.

Also we have to adjust the numbers of interrupts for zynq
because several subsystems - e.g. GPIO, PCIe
use virtual IRQs beyond 128, thus this number must be increased.

Let's allocate IRQs 128-256 for PCIe
and IRQs 256-512(ARCH_NR_GPIOS) for GPIOs.
Also chnage XGPIOPS_IRQBASE to reflect this.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: ethernet: emacps: Do no use emac power management
Michal Simek [Thu, 29 Nov 2012 16:12:38 +0000 (17:12 +0100)]
net: ethernet: emacps: Do no use emac power management

This is workaround for problem with busybox udhcp client
which is not able to obtain IP address when PM is on.
But on the other hand we need PM in menuconfig for
others driver that's why I am blocking PM code in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynq: pcie: AXI PCIE Fix section mismatch
Michal Simek [Fri, 30 Nov 2012 21:00:21 +0000 (22:00 +0100)]
zynq: pcie: AXI PCIE Fix section mismatch

Fix section mismatch because of section warnings.

Warning:
WARNING: arch/arm/mach-zynq/built-in.o(.text+0x2c5c):
 Section mismatch in reference from the function xaxi_pcie_setup()
 to the function .devinit.text:xaxi_pcie_set_bridge_resource()
The function xaxi_pcie_setup() references
the function __devinit xaxi_pcie_set_bridge_resource().
This is often because xaxi_pcie_setup lacks a __devinit
annotation or the annotation of xaxi_pcie_set_bridge_resource is wrong.

WARNING: arch/arm/mach-zynq/built-in.o(.text+0x2c68):
 Section mismatch in reference from the function xaxi_pcie_setup()
 to the function .devinit.text:xaxi_pcie_process_bridge_OF_ranges()
The function xaxi_pcie_setup() references
the function __devinit xaxi_pcie_process_bridge_OF_ranges().
This is often because xaxi_pcie_setup lacks a __devinit
annotation or the annotation of xaxi_pcie_process_bridge_OF_ranges is wrong.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynq: pcie: AXI PCIE Root Port driver
Srikanth Thokala [Fri, 30 Nov 2012 10:36:42 +0000 (16:06 +0530)]
zynq: pcie: AXI PCIE Root Port driver

This patch implements Zynq version of AXI PCIe Root Port functionality.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: xilinx_gpiops: Fix gpio_request() return value
Lars-Peter Clausen [Wed, 28 Nov 2012 18:24:21 +0000 (10:24 -0800)]
gpio: xilinx_gpiops: Fix gpio_request() return value

Commit bb1bff3c ("Xilinx: ARM: xgpiops: Adding PM support") added runtime power
management for the gpio driver. The gpio chip's request callback calls
pm_runtime_get() and passes the return value on, but pm_runtime_get() may either
return 0 or 1 on success, but the gpio request callback should only ever return
0 on success. This patch modifies the code to return 0 if the return value of
pm_runtime_get() is >= 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Remove mach/smc.h
Soren Brinkmann [Thu, 29 Nov 2012 01:09:53 +0000 (17:09 -0800)]
arm: zynq: Remove mach/smc.h

The only user of mach/smc.h is the Zynq nandps driver. Required
content is moved from the header to the actual driver and the
redundant header is removed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Remove mach/nand.h
Soren Brinkmann [Thu, 29 Nov 2012 01:09:52 +0000 (17:09 -0800)]
arm: zynq: Remove mach/nand.h

The only user of mach/nand.h is the Zynq nandps driver. Required
content is moved from the header to the actual driver and the
redundant header is removed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Move of_match table to proper location
Michal Simek [Wed, 28 Nov 2012 16:13:19 +0000 (17:13 +0100)]
mtd: xilinx_nandps: Move of_match table to proper location

match table should be close to platform_driver function
where all expect it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
7 years agomtd: xilinx_nandps: Fix probe function
Michal Simek [Wed, 28 Nov 2012 16:13:18 +0000 (17:13 +0100)]
mtd: xilinx_nandps: Fix probe function

Do not check if device matches because it does
because of driver OF initialization.

No reason to share platform data through static variable.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
7 years agomtd: xilinx_nandps: Clean coding style issue
Michal Simek [Wed, 28 Nov 2012 16:13:17 +0000 (17:13 +0100)]
mtd: xilinx_nandps: Clean coding style issue

Split testing cases from not good looking if else structures.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
7 years agoxilinx: Remove unused xspi_platform_data structure
Michal Simek [Wed, 28 Nov 2012 16:12:02 +0000 (17:12 +0100)]
xilinx: Remove unused xspi_platform_data structure

spi-xilinx is using the same structure name but
it is defined in include/linux/spi/xilinx_spi.h.
It is historical relic that it wasn't removed when
spi driver went to mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
7 years agoarm: zynq: Add support for Zed Board
John Linn [Wed, 28 Nov 2012 00:11:19 +0000 (16:11 -0800)]
arm: zynq: Add support for Zed Board

Basic testing has been done with ethernet, usb host,
QSPI (16MB) and SD. The device tree was generated using the
merged device tree generator.

The QSPI partitions are setup assuming a new memory map
that is going to be supported in u-boot also.

Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agoSync devicetree to latest bitstream
Lars-Peter Clausen [Tue, 30 Oct 2012 09:01:00 +0000 (10:01 +0100)]
Sync devicetree to latest bitstream

The hardware fft and it's dma have been removed from the bitstream.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agoarm: zynq: Remove gpio function references
Michal Simek [Tue, 27 Nov 2012 14:42:48 +0000 (15:42 +0100)]
arm: zynq: Remove gpio function references

These two functions are completely unused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: gpio-xilinx: Remove CONFIG_OF conditionals
Michal Simek [Tue, 27 Nov 2012 14:40:47 +0000 (15:40 +0100)]
gpio: gpio-xilinx: Remove CONFIG_OF conditionals

CONFIG_OF is mandatory for all Xilinx platforms. For this reason
all conditional compiling regarding this option can be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: xilinx_sdhcips: Implement custom supend/resume callbacks
Soren Brinkmann [Tue, 27 Nov 2012 18:02:30 +0000 (10:02 -0800)]
mmc: xilinx_sdhcips: Implement custom supend/resume callbacks

The generic suspend/resume callbacks for the sdhci subsystem do not
support clock gating. Therefore Zynq specific callbacks are implemented.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agommc: xilinx_sdhcips: Port driver to COMMON_CLK
Soren Brinkmann [Tue, 27 Nov 2012 18:02:29 +0000 (10:02 -0800)]
mmc: xilinx_sdhcips: Port driver to COMMON_CLK

Use the common clock framework to manage device clocks.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
7 years agomtd: xilinx_nandps: Remove unused struct member
Soren Brinkmann [Tue, 27 Nov 2012 18:22:49 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Remove unused struct member

Removing the unused pdev member of struct xnandps_info.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Remove redundant callback assignments
Soren Brinkmann [Tue, 27 Nov 2012 18:22:48 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Remove redundant callback assignments

The platform_driver's 'suspend' and 'resume' members were assigned NULL.
Thus, those statements can be removed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Correct minor style issues
Soren Brinkmann [Tue, 27 Nov 2012 18:22:47 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Correct minor style issues

Removing/adding braces where appropriate.
Removing a couple of empty statements.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Sort #includes alphabetically
Soren Brinkmann [Tue, 27 Nov 2012 18:22:46 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Sort #includes alphabetically

Just sorting for easier maintenance.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Remove CONFIG_OF conditionals
Soren Brinkmann [Tue, 27 Nov 2012 18:22:45 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Remove CONFIG_OF conditionals

CONFIG_OF is mandatory for the Zynq platform. For this reason
all conditional compiling regarding this option can be removed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Simplify driver initialization
Soren Brinkmann [Tue, 27 Nov 2012 18:22:44 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Simplify driver initialization

Use module_platform_driver macro which creates
init and exit functions.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: xilinx_nandps: Rename driver to nandps
Soren Brinkmann [Tue, 27 Nov 2012 18:22:43 +0000 (10:22 -0800)]
mtd: xilinx_nandps: Rename driver to nandps

The acronym PSS is no longer used in favor of PS. The driver is
renamed accordingly. All ocurrences of PSS/pss are replaced by
PS/ps. The kernel configuration option is now named MTD_NAND_XILINX_PS.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio:xilinxps: Fix gpio_request() return value
Lars-Peter Clausen [Tue, 27 Nov 2012 16:02:43 +0000 (17:02 +0100)]
gpio:xilinxps: Fix gpio_request() return value

Commit bb1bff3c ("Xilinx: ARM: xgpiops: Adding PM support") added runtime power
management for the gpio driver. The gpio chip's request callback calls
pm_runtime_get() and passes the return value on, but pm_runtime_get() may either
return 0 or 1 on success, but the gpio request callback should only ever return
0 on success. This patch modifies the code to return 0 if the return value of
pm_runtime_get() is >= 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 years agonet: xilinx_emacps: Fixes indentation and style issues
Anirudha Sarangi [Tue, 27 Nov 2012 15:25:05 +0000 (20:55 +0530)]
net: xilinx_emacps: Fixes indentation and style issues

This patch fixes the indentation/style issues in the driver
that has been present from the beginning. This patch corrects
one wrong comment.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: xilinx_emacps: Corrects Rx/Tx error reporting
Anirudha Sarangi [Tue, 27 Nov 2012 15:25:04 +0000 (20:55 +0530)]
net: xilinx_emacps: Corrects Rx/Tx error reporting

The existing driver reports wrong Rx/Tx error count (ifconfig).
The Rx/Tx error counters get incremented twice for most of.
the error cases. This patch fixes it.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Clean coding style
Michal Simek [Tue, 27 Nov 2012 12:47:28 +0000 (13:47 +0100)]
arm: zynq: Clean coding style

Clean trailing white spaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoi2c: xilinx_i2cps: Implement supend/resume callbacks
Soren Brinkmann [Mon, 26 Nov 2012 17:28:46 +0000 (09:28 -0800)]
i2c: xilinx_i2cps: Implement supend/resume callbacks

In order to support system suspend the corresponding callbacks
are implemented.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: xilinx_sdhcips: Reformatting error message
Soren Brinkmann [Tue, 27 Nov 2012 01:31:51 +0000 (17:31 -0800)]
mmc: xilinx_sdhcips: Reformatting error message

Using 'dev_err' macro instead of 'printk'.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: xilinx_sdhcips: Add __devinitconst attribute
Soren Brinkmann [Tue, 27 Nov 2012 01:31:50 +0000 (17:31 -0800)]
mmc: xilinx_sdhcips: Add __devinitconst attribute

Adding the attribute '__devinitconst' to the driver's struct of_device_id.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: xilinx_sdhcips: Correct minor style issues
Soren Brinkmann [Tue, 27 Nov 2012 01:31:49 +0000 (17:31 -0800)]
mmc: xilinx_sdhcips: Correct minor style issues

Removing/adding braces where appropriate.
Remove unnecessary line continuation using '\'.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: xilinx_sdhcips: Sort #includes alphabetically
Soren Brinkmann [Tue, 27 Nov 2012 01:31:48 +0000 (17:31 -0800)]
mmc: xilinx_sdhcips: Sort #includes alphabetically

Just sorting for easier maintenance.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: xilinx_emacps: Cleaned up the interrupt handling routine
Anirudha Sarangi [Tue, 27 Nov 2012 10:32:19 +0000 (16:02 +0530)]
net: xilinx_emacps: Cleaned up the interrupt handling routine

The existing interrupt routine was looking unnecessarily
complex with too many barriers and checks. This patch
addresses them.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: xilinx_emacps: Fix driver issue under heavy Rx traffic
Anirudha Sarangi [Tue, 27 Nov 2012 10:32:18 +0000 (16:02 +0530)]
net: xilinx_emacps: Fix driver issue under heavy Rx traffic

The existing driver misbehaves when subjected to heavy traffic
on the Rx path. Under heavy traffic (with a inter packet gap
in the range of 2-5 microseconds) the Rx path of the driver
becomes unresponsive. Under such heavy traffic load it is
natural for the driver to get overwhelmed on Rx path and drop
some packets (as per IEEE specs it is OK), but it should never
become completely unresponsive after the heavy Rx traffic is
taken off. The issue with the existing driver is, under heavy
Rx load, it starts getting lots of error interrupts (buffer not
available) and it does not process them properly. As a result,
at some point the driver consumes all BDs for Rx and does not
free any ensuring a complete lock up.
This patch fixes it by ensuring that even for error cases there
is a constant effort to free up any available BDs.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>