]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
11 years agoXilinx: ARM: DMA: Code Cleanup xilinx-14.3-build1
SrikanthT [Mon, 10 Sep 2012 05:43:14 +0000 (11:13 +0530)]
Xilinx: ARM: DMA: Code Cleanup

Minor clean up of the code.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: DMA: Updated to latest kernel changes.
SrikanthT [Sun, 9 Sep 2012 17:53:43 +0000 (23:23 +0530)]
Xilinx: ARM: DMA: Updated to latest kernel changes.

In the latest kernel, there are some API changes and also
there is a new enum defined. This patch is created to
update these changes. The changes are in brief,
1. API 'prep_slave_sg' is modified to take an additional
   argument 'void *context'.
2. A new enum 'dma_transfer_direction' has been added.
   This replaces 'dma_data_direction' enum.
All the files which need this changes are updated.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: DMA: Support for External Frame Sync feature.
SrikanthT [Sun, 9 Sep 2012 17:24:11 +0000 (22:54 +0530)]
Xilinx: ARM: DMA: Support for External Frame Sync feature.

There is a new feature in VDMA IP v5.02a, which needs
support from the driver. This patch has been created
to configure this external frame sync feature.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: MTD: m25p80: fix dual qspi bug in flash
John Linn [Wed, 19 Sep 2012 20:55:57 +0000 (13:55 -0700)]
Xilinx: ARM: MTD: m25p80: fix dual qspi bug in flash

The last change that was done to make the dual QSPI
work from device tree only without a kernel config
change had a bug which was preventing the 2nd 16 MB
of flash from working on the ZC706.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: cpuidle: Disable C1 state
Soren Brinkmann [Mon, 10 Sep 2012 07:07:50 +0000 (00:07 -0700)]
Xilinx: ARM: cpuidle: Disable C1 state

The present C1 state is just a placeholder. We disable
it until it has its proposed functionality.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: SWDT: Support to read watchdog timeout value from device-tree
SrikanthT [Tue, 18 Sep 2012 12:32:52 +0000 (18:02 +0530)]
Xilinx: ARM: SWDT: Support to read watchdog timeout value from device-tree

This patch adds support to read the watchdog timeout value
from device-tree.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: update zynq defconfig to remove DMA test
John Linn [Wed, 5 Sep 2012 22:46:48 +0000 (15:46 -0700)]
Xilinx: ARM: update zynq defconfig to remove DMA test

Somehow in the last update DMA test on boot got turned
on, so turn it off.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: cpufreq: Fix potential NULL ptr dereference
Soren Brinkmann [Tue, 4 Sep 2012 12:57:01 +0000 (05:57 -0700)]
Xilinx: ARM: cpufreq: Fix potential NULL ptr dereference

If no OPPs exist, creating the freq_table fails. Error
handling in this case worked for the first core to
execute the cpufreq init routine. But a following core
would have unconditionally called
cpufreq_frequency_table_cpuinfo() causing a NULL pointer
dereference.

A corresponding fix for OMAP had been applied to mainline:
1b8652142334a8c0729c5c4536a22cfc6fc49297

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xi2cps: Error handling
Soren Brinkmann [Thu, 30 Aug 2012 11:24:52 +0000 (04:24 -0700)]
Xilinx: ARM: xi2cps: Error handling

Using clk_prepare_enable() and clk_disable_unprepare() in favor of
calling (un)prepare and dis/enable routines individually.
Honoring clk_prepare_enable() return code to recognize an error.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Error handling
Soren Brinkmann [Thu, 30 Aug 2012 10:02:55 +0000 (03:02 -0700)]
Xilinx: ARM: xemacps: Error handling

Using clk_prepare_enable() and clk_disable_unprepare() in favor of
calling (un)prepare and dis/enable routines individually.
Honoring clk_prepare_enable() return code to recognize an error.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Enable clocks before accessing HW
Soren Brinkmann [Mon, 3 Sep 2012 14:36:26 +0000 (07:36 -0700)]
Xilinx: ARM: xemacps: Enable clocks before accessing HW

This patch fixes an issue where hardware registers may be
accessed before the device clocks are enabled.
Also, error handling is improved in the questionable code
section.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Make driver depend on ARCH_ZYNQ
Soren Brinkmann [Thu, 30 Aug 2012 13:41:27 +0000 (06:41 -0700)]
Xilinx: ARM: xuartps: Make driver depend on ARCH_ZYNQ

The Zynq PS UART driver can only be used with Zynq
devices.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Error handling
Soren Brinkmann [Thu, 30 Aug 2012 08:53:30 +0000 (01:53 -0700)]
Xilinx: ARM: xuartps: Error handling

Using clk_prepare_enable() and clk_disable_unprepare() in favor of
calling (un)prepare and dis/enable routines individually.
Honoring clk_prepare_enable() return code to recognize an error.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Fix calling order of clk routines
Soren Brinkmann [Thu, 30 Aug 2012 08:03:12 +0000 (01:03 -0700)]
Xilinx: ARM: xuartps: Fix calling order of clk routines

In the probe() error path clk_disable() was called _after_
clk_unprepare(). The correct order is to call clk_disable()
first and then clk_unprepare().

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xgpiops: Error handling
Soren Brinkmann [Thu, 30 Aug 2012 07:51:38 +0000 (00:51 -0700)]
Xilinx: ARM: xgpiops: Error handling

Using clk_prepare_enable() and clk_disable_unprepare() in favor of
calling (un)prepare and dis/enable routines individually.
Honoring clk_prepare_enable() return code to recognize an error.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: timer: Correct error handling
Soren Brinkmann [Wed, 29 Aug 2012 14:03:35 +0000 (07:03 -0700)]
Xilinx: ARM: timer: Correct error handling

With this patch timer init falls back
to device tree information if the timer clock is not found through
the clock framework. The DT path in turn falls back to hard
coded defaults if no matching node and property is found.
The behavior in case the clock lookup fails is the same as the
pre-common_clk behavior.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: timer: Remove useless conditionals
Soren Brinkmann [Wed, 29 Aug 2012 13:45:02 +0000 (06:45 -0700)]
Xilinx: ARM: timer: Remove useless conditionals

When porting the timer to use the common clock framework
it was assumed it is possible to compile a Zynq kernel
w/ or w/o COMMON_CLK defined and conditional compilation had
been added accordingly.
Turns out this assumption was wrong and building for Zynq always
defines COMMON_CLK rendering the associated conditionals useless.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: DT: Add PS_CLK frequency to ep107
Soren Brinkmann [Wed, 5 Sep 2012 12:50:04 +0000 (05:50 -0700)]
Xilinx: ARM: DT: Add PS_CLK frequency to ep107

This patch provides a PS_CLK frequency through the DT
for the ep107 platform. The provided frequency is far too
high and may brake a lot of subsystems. But on the other hand,
it results in a working UART, which enables to boot into a
somewhat usable system.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: clk: Providing PS_CLK through DT
Soren Brinkmann [Wed, 29 Aug 2012 13:17:51 +0000 (06:17 -0700)]
Xilinx: ARM: clk: Providing PS_CLK through DT

This patch adds a 'soc' node providing the PS_CLK frequency
to all Zynq device trees.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: clk: Obtain PS_CLK frequency from DT
Soren Brinkmann [Wed, 29 Aug 2012 12:40:02 +0000 (05:40 -0700)]
Xilinx: ARM: clk: Obtain PS_CLK frequency from DT

Clock init searches for a compatible 'soc' node in the DT
which provides the clock-frequency property, which is then used
as PS_CLK frequency.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: BSP: Add ext4 support to defconfig
Soren Brinkmann [Wed, 29 Aug 2012 07:41:52 +0000 (00:41 -0700)]
Xilinx: ARM: BSP: Add ext4 support to defconfig

Adding support for the ext4 filesystem to the Zynq
default configuration.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Copying gic.c from mainline.
Soren Brinkmann [Wed, 13 Jun 2012 12:01:44 +0000 (05:01 -0700)]
Xilinx: ARM: Copying gic.c from mainline.

gic_set_cpu caused compilation warnings regarding type mismatches between a
raw_spin_lock used with spin_lock functions.
The function does not seem to be called from anywhere and is not present in
mainline.
This patch simply overwrites arch/arm/common/gic.c with the version from
mainline.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: Microblaze: GPIO: Fixed compilation error.
Naveen Mamindlapalli [Fri, 31 Aug 2012 14:41:29 +0000 (20:11 +0530)]
Xilinx: Microblaze: GPIO: Fixed compilation error.

Fixed compilation error by including module.h

11 years agoMicroblaze: PCI: Fixed compilation issue with io_offset variable.
Naveen Mamindlapalli [Fri, 31 Aug 2012 14:37:45 +0000 (20:07 +0530)]
Microblaze: PCI: Fixed compilation issue with io_offset variable.

Fixed compilation issue with multiple io_offset variable declaration.

11 years agoXilinx: ARM: I2C: Modified clock divisor calculation logic
Suneel [Thu, 30 Aug 2012 15:04:16 +0000 (20:34 +0530)]
Xilinx: ARM: I2C: Modified clock divisor calculation logic

Modified the calculation of clock divisor logic to achieve
minimum deviation from the required i2c clock frequency.

Signed-off-by: Suneel <suneelg@xilinx.com>
11 years agoXilinx: ARM: I2C: Support for TI PMBus Controllers on ZC702
Suneel [Thu, 30 Aug 2012 11:57:05 +0000 (17:27 +0530)]
Xilinx: ARM: I2C: Support for TI PMBus Controllers on ZC702

This patch adds support for I2C_M_RECV_LEN flag and
SMBUS Block Read call in I2C Controller driver.
This support is required by TI PMBus controller driver.

Signed-off-by: Suneel <suneelg@xilinx.com>
11 years agoMicroblaze: AXIPCIE: Moved support to 1.05a IP core
Naveen Mamindlapalli [Wed, 29 Aug 2012 16:01:37 +0000 (21:31 +0530)]
Microblaze: AXIPCIE: Moved support to 1.05a IP core

Modified the driver with CR#657412 and CR#662845 fix.

Removed byte swapping when reading remote config space.
This driver supports AXI PCI core from version 1.05.a onwards.

For supporting the versions below 1.05.a, please revert this patch.

11 years agoXilinx: ARM: BSP: update zynq defconfig for cpu freq scaling
John Linn [Tue, 28 Aug 2012 20:28:11 +0000 (13:28 -0700)]
Xilinx: ARM: BSP: update zynq defconfig for cpu freq scaling

This turns on new power management features which include
CPU frequency scaling. The feature works as documented in
Documentation/cpu-freq.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: BSP: update DC4 (XM013) SPI eeprom
John Linn [Tue, 28 Aug 2012 19:56:12 +0000 (12:56 -0700)]
Xilinx: ARM: BSP: update DC4 (XM013) SPI eeprom

Move to slave select 2 and use a conservative speed
to help get more consistent results.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: clk: Remove unsupported leaf clocks
Soren Brinkmann [Fri, 24 Aug 2012 09:07:04 +0000 (02:07 -0700)]
Xilinx: ARM: clk: Remove unsupported leaf clocks

Removing leaf clocks from the clock framework for which the
current drivers lack support for the common clock framework.
The original approach was to add the complete clock tree and call
clk_prepare() and clk_enable() in the clock init routine, if the
driver does not yet do this.
The drawback of this approach is, that we also enable clocks, which
may be inactive on default (e.g. the peripheral is not connected on a
board and would be disabled by the bootloader). This may lead
to unnecessary power consumption.

With this patch all leaf clocks for which the driver does not
call clk_prepare() and clk_enable() are removed from the clock
framework leaving their gates untouched. Once a driver is ported
to use the common clock framework its leaf clocks must be readded.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: update interrupts in device trees
John Linn [Thu, 23 Aug 2012 22:02:22 +0000 (15:02 -0700)]
Xilinx: ARM: update interrupts in device trees

The interrupt properties were using the wrong trigger type
and this corrects them. Most should be active high level.
The SCU devices are leading edge triggered and also have a
mask for the CPUs that can accept the interrupts.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: QSPI: Remove Mode Fault Interrupt logic
Suneel [Thu, 23 Aug 2012 04:19:20 +0000 (09:49 +0530)]
Xilinx: ARM: QSPI: Remove Mode Fault Interrupt logic

Removed the definition and logic related to mode fault
interrupt bit.

Signed-off-by: Suneel <suneelg@xilinx.com>
11 years agoXilinx: ARM: Skip delay calibration in hotplug path
Soren Brinkmann [Thu, 23 Aug 2012 07:53:29 +0000 (00:53 -0700)]
Xilinx: ARM: Skip delay calibration in hotplug path

Changing the CPU frequency while one core is offline
taints the offline CPU's loops per jiffy value.
With this patch delay calibration is skipped when returning
from hotplug and the correct lpj value from the master CPU
is used.

This change is the same as commit
a279561879a795966336fb78186ee7435b6bb050 in
https://github.com/jcrigby/linaro-ci-kernels.git.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: devcfg: Added support for partial bitstreams
Suneel [Thu, 23 Aug 2012 13:22:09 +0000 (18:52 +0530)]
Xilinx: ARM: devcfg: Added support for partial bitstreams

This patch creates a syfs entry is_partial_bitstream to
indicate whether bitstream is partial or not. Based on the
value of is_partial_bitstream, PROG_B is asserted and
slcr_init_preload_fpga and slcr_init_postload_fpga functions
are invoked.

Signed-off-by: Suneel <suneelg@xilinx.com>
11 years agoXilinx: ARM: cpuidle: Update cpuidle driver
Soren Brinkmann [Tue, 10 Jul 2012 07:48:48 +0000 (00:48 -0700)]
Xilinx: ARM: cpuidle: Update cpuidle driver

Registering a cpudile device for each core to allow both cores
to enter idle state.
Extending C1 state. C1 and C0 have the same functionality, but C1
implies more overhead and should be further extended to the proposed
sleep mode with RAM self-refresh.
Static initialization of the driver structure.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Port timer to COMMON_CLK
Soren Brinkmann [Tue, 3 Jul 2012 13:48:09 +0000 (06:48 -0700)]
Xilinx: ARM: Port timer to COMMON_CLK

Timer uses common clock framework, which implies the following:
Timer init is done early during boot. To make clocks available through
COMMON_CLK clock init is called from irq_init() which is called with slab up
and before time_init(). Ugly, but works.

CPU frequency scaling messes up the time base. E.g. 'sleep x' does not sleep x
secionds but x scaled up by the factor the CPU is scaled down from its initial
frequency. I cannot find a way to adjust the clocksource/timekeeping to the
changing timer frequency. For this reason the clocksource in unregistered and
re-registered on frequency changes. See the comments in timer.c for more
details.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Adding cpufreq support.
Soren Brinkmann [Wed, 27 Jun 2012 13:37:00 +0000 (06:37 -0700)]
Xilinx: ARM: Adding cpufreq support.

Adding cpufreq and OPP to mach-zynq in preparation for DVFS.
The current driver provides very simple frequency scaling functionality.
The whole code is based on OMAP's cpufreq driver.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xi2cps: Port driver to COMMON_CLK
Soren Brinkmann [Fri, 10 Aug 2012 13:01:41 +0000 (06:01 -0700)]
Xilinx: ARM: xi2cps: Port driver to COMMON_CLK

Use common clock framework to enable/disable i2c clocks in probe/remove
functions.
Add a clock notifier callback to adjust the i2c frequency when the i2c
input clock frequency changes due to cpu frequency scaling.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Add RUNTIME_PM support.
Soren Brinkmann [Fri, 13 Jul 2012 10:01:10 +0000 (03:01 -0700)]
Xilinx: ARM: xemacps: Add RUNTIME_PM support.

Adding support for runtime suspend and resume. If the ethernet interface is shut
down its clocks get gated off.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Migrating to dev_pm_ops
Soren Brinkmann [Thu, 12 Jul 2012 11:31:31 +0000 (04:31 -0700)]
Xilinx: ARM: xemacps: Migrating to dev_pm_ops

Migration to the new PM API.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Clock notifier skeleton.
Soren Brinkmann [Tue, 26 Jun 2012 09:26:08 +0000 (02:26 -0700)]
Xilinx: ARM: xemacps: Clock notifier skeleton.

Added a skeleton implementation for reacting on clock rate changes.
Though, no real functionality and no good idea for making it work, yet.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xemacps: Use COMMON_CLK framework.
Soren Brinkmann [Mon, 25 Jun 2012 12:17:03 +0000 (05:17 -0700)]
Xilinx: ARM: xemacps: Use COMMON_CLK framework.

The drivers uses the COMMON_CLK framework for gating/ungating GEM clocks as
needed and set clock dividers according to the link speed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Migration to dev_pm_ops
Soren Brinkmann [Thu, 12 Jul 2012 11:01:27 +0000 (04:01 -0700)]
Xilinx: ARM: xuartps: Migration to dev_pm_ops

Migrating to the new PM API.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Use COMMON_CLK framework.
Soren Brinkmann [Mon, 25 Jun 2012 11:16:40 +0000 (04:16 -0700)]
Xilinx: ARM: xuartps: Use COMMON_CLK framework.

The UART drivers uses the COMMON_CLK framework to gate/ungate UART clocks as
needed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xuartps: Updating set_baud_rate()
Soren Brinkmann [Fri, 22 Jun 2012 13:48:15 +0000 (06:48 -0700)]
Xilinx: ARM: xuartps: Updating set_baud_rate()

The original algorithm to find the best baud rate dividers does not necessarily
find the best set of dividers. And in the worst case may even write illegal
values to the hardware.
The new function should make better use of the hardware capabilities and be able
to provide valid settings for a wider range of baud rates and also input clocks.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xgpiops: Adding PM support
Soren Brinkmann [Wed, 11 Jul 2012 15:00:54 +0000 (08:00 -0700)]
Xilinx: ARM: xgpiops: Adding PM support

Migrating to dev_pm_ops to register PM handlers.
Adding RUNTIME_PM support.
Implementing gpio request and free hooks to wake/suspend the gpio device.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: xgpiops: Use COMMON_CLK framework.
Soren Brinkmann [Mon, 25 Jun 2012 11:51:50 +0000 (04:51 -0700)]
Xilinx: ARM: xgpiops: Use COMMON_CLK framework.

The gpios driver gates/ungates the GPIO APER clock as needed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Zynq: Adding support for COMMON_CLK
Soren Brinkmann [Thu, 9 Aug 2012 12:51:07 +0000 (05:51 -0700)]
Xilinx: ARM: Zynq: Adding support for COMMON_CLK

Initial support for the common clock framework.
Added implemenatations modelling the PLLs and some of the peripheral clocks
in Zynq.
These implementations do not yet provide full functionality

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Prepare Kconfig for COMMON_CLK
Soren Brinkmann [Wed, 6 Jun 2012 13:47:09 +0000 (06:47 -0700)]
Xilinx: ARM: Prepare Kconfig for COMMON_CLK

Selecting Zynq as target architecture adds the common clock framework.
Selecting Zynq as target architecture was dependent on plat-versatile, which
lead to compile errors in combination with COMMON_CLK. Removing this dependency
fixes this issue.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Make L2 cache init early_initcall.
Soren Brinkmann [Fri, 29 Jun 2012 10:55:26 +0000 (03:55 -0700)]
Xilinx: ARM: Make L2 cache init early_initcall.

Enable the caches as early as possible to decrease boot time.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoXilinx: ARM: Remove duplicated header includes.
Soren Brinkmann [Fri, 15 Jun 2012 08:47:29 +0000 (01:47 -0700)]
Xilinx: ARM: Remove duplicated header includes.

linux/spi/spi.h was included multiple times in the board_*.c files.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agoRevert "Xilinx: ARM: added Ethernet reset via GPIO on zc770 DC4."
John Linn [Mon, 20 Aug 2012 19:59:56 +0000 (12:59 -0700)]
Revert "Xilinx: ARM: added Ethernet reset via GPIO on zc770 DC4."

This reverts commit 1a59d97fda8d838b4d2a4f034ab75fc3669a3d26.

Ethernet is not working well on DC4 with this change, it appears
to be working fine without this change.

11 years agoXilinx: ARM: fixed board compatible in zc770 DC2 devicetree.
Bryce Kellogg [Wed, 15 Aug 2012 21:24:56 +0000 (14:24 -0700)]
Xilinx: ARM: fixed board compatible in zc770 DC2 devicetree.

The DC2 device tree was declaring itself compatible with zc770
DC1. This is no longer true due to USB reset changes. The
compatible line has therefore been changed to the more generic
zynq-zc770.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: added Ethernet reset via GPIO on zc770 DC4.
Bryce Kellogg [Wed, 15 Aug 2012 21:18:21 +0000 (14:18 -0700)]
Xilinx: ARM: added Ethernet reset via GPIO on zc770 DC4.

The ethernet was being reset on DC4 the same way the USB was
being reset on zc70x and zc770 DC1. This fixes the ethernet by
toggling MIO7 in the boardfile.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: added USB reset via GPIO to zc770 and zc702.
Bryce Kellogg [Wed, 15 Aug 2012 17:34:19 +0000 (10:34 -0700)]
Xilinx: ARM: added USB reset via GPIO to zc770 and zc702.

A GPIO is toggled during board setup to reset the USB on the zc702
and zc770 DC1 boards. Because the same MIO is used for other things
on the other zc770 daughter cards, the zc770 board file contains
a check for the DC1 devicetree compatible string before toggling.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: GPIO: Moved gpio initcall earlier.
Bryce Kellogg [Tue, 14 Aug 2012 22:49:40 +0000 (15:49 -0700)]
Xilinx: ARM: GPIO: Moved gpio initcall earlier.

The gpio initcall has been moved forward from subsys to postcore.
This allows the use of gpios in board setup for things like
usb reset, etc.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: BSP: unlock SLCR in SMP boot
John Linn [Tue, 14 Aug 2012 21:07:25 +0000 (14:07 -0700)]
Xilinx: ARM: BSP: unlock SLCR in SMP boot

For now, the SLCR is being unlocked to allow power
management code to work. This should be reverted
once SLCR unlock/lock is centralized so that it is
locked by default and only unlocked when accessed.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: added twd timer to zc706 devicetree.
Bryce Kellogg [Tue, 14 Aug 2012 16:46:56 +0000 (09:46 -0700)]
Xilinx: ARM: added twd timer to zc706 devicetree.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: updated zc706 devicetree for 666 MHz CPU clk.
Bryce Kellogg [Tue, 14 Aug 2012 15:41:44 +0000 (08:41 -0700)]
Xilinx: ARM: updated zc706 devicetree for 666 MHz CPU clk.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: move to 14.3 build 1
John Linn [Fri, 10 Aug 2012 22:28:52 +0000 (15:28 -0700)]
Xilinx: ARM: move to 14.3 build 1

Update extra version info to reflect start of 14.3 work.

Signed-off-by John Linn <john.linn@xilinx.com>

11 years agoXilinx: ARM: added SCU WDT to device trees
Bryce Kellogg [Wed, 8 Aug 2012 20:50:11 +0000 (13:50 -0700)]
Xilinx: ARM: added SCU WDT to device trees

This allows the SCU WDT to be used.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: BSP: clean up hotplug code
John Linn [Tue, 7 Aug 2012 20:28:10 +0000 (13:28 -0700)]
Xilinx: ARM: BSP: clean up hotplug code

This is based on a patch from Soren during his clean
up. Change to the DSB instruction for clarity over CP15
operations. Use the correct bit for SMP in the Aux Control
Register. Use an explicit WFI also for clariy.

This allows the while hack to be removed such that it's
now working correctly.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: SPI: Lowered spi eeprom max frequency in DC4 board file.
Bryce Kellogg [Tue, 7 Aug 2012 17:53:54 +0000 (10:53 -0700)]
Xilinx: SPI: Lowered spi eeprom max frequency in DC4 board file.

The max frequency was out of spec, it has been lowered from
40 MHz to 10 MHz.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoMerge branch 'master' of git://git-dev.xilinx.com/linux-2.6-xlnx
John Linn [Tue, 7 Aug 2012 17:22:16 +0000 (10:22 -0700)]
Merge branch 'master' of git://git-dev.xilinx.com/linux-2.6-xlnx

11 years agoXilinx: ARM: cleanup of DC4 (XM013) device tree
John Linn [Fri, 3 Aug 2012 21:58:27 +0000 (14:58 -0700)]
Xilinx: ARM: cleanup of DC4 (XM013) device tree

The device tree had some duplicate entries after the merge
of the 3.5 kernel into the master branch.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: fixed spi partition name for 770 DC1
John Linn [Fri, 3 Aug 2012 18:51:57 +0000 (11:51 -0700)]
Xilinx: ARM: fixed spi partition name for 770 DC1

The parition name had got changed so that automated
tests were failing. This changes it back so that
tests don't need to change.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoMerge branch 'master-3.5'
John Linn [Fri, 3 Aug 2012 17:36:37 +0000 (10:36 -0700)]
Merge branch 'master-3.5'

11 years agoXilinx: ARM: move SPI from BSP to device tree for DC1
John Linn [Fri, 3 Aug 2012 16:12:17 +0000 (09:12 -0700)]
Xilinx: ARM: move SPI from BSP to device tree for DC1

This is the last platform data being moved to the device
tree for DC1 on ZC770 (XM010).

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: move QSPI partitions from BSP to device tree
John Linn [Thu, 2 Aug 2012 20:26:00 +0000 (13:26 -0700)]
Xilinx: ARM: move QSPI partitions from BSP to device tree

Now that the MTD layer is using the device tree to determine
if the parent has dual turned on, the partitions need to be
in the device tree.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: remove initrd from device tree boot args
John Linn [Thu, 2 Aug 2012 00:53:22 +0000 (17:53 -0700)]
Xilinx: ARM: remove initrd from device tree boot args

Now that bootm is being used in u-boot these are i
no longer needed and cause problems. The initrd is
needed if you are not booting the kernel from u-boot
(like from XMD) so you may need to add it back
in.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: change to non-fixed device tree address
John Linn [Wed, 1 Aug 2012 21:25:37 +0000 (14:25 -0700)]
Xilinx: ARM: change to non-fixed device tree address

This changes the zynq defconfig to not use a fixed device
tree address as u-boot bootm is working now.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: change 3.3 to non-fixed device tree address
John Linn [Wed, 1 Aug 2012 21:21:05 +0000 (14:21 -0700)]
Xilinx: ARM: change 3.3 to non-fixed device tree address

This changes the zynq defconfig to not use a fixed device
tree address as u-boot bootm is working now.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: MTD: Clean up of QSPI dual support
John Linn [Tue, 31 Jul 2012 23:20:46 +0000 (16:20 -0700)]
Xilinx: ARM: MTD: Clean up of QSPI dual support

The dual support was based on kernel configuration
which forced unique kernels for the 702 and 706
boards. Now it's only based on the device tree.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoXilinx: ARM: QSPI: remove conditional comp for dual mode
John Linn [Tue, 31 Jul 2012 23:15:04 +0000 (16:15 -0700)]
Xilinx: ARM: QSPI: remove conditional comp for dual mode

It now no longer has any kernel configuration needed for
dual mode support as it's being pulled from the device
tree only.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoRevert "Xilinx: ARM: EmacPs: Made changes to move/add proper spin_locks"
John Linn [Tue, 31 Jul 2012 15:49:41 +0000 (08:49 -0700)]
Revert "Xilinx: ARM: EmacPs: Made changes to move/add proper spin_locks"

This reverts commit f8267e4ddf3706ae0af499da6e2ef4d78dec5316.

This commit was causing the 3.5 kernel to crash such that it needs to
be revisited again.

11 years agoMerge branch 'master-3.5-release' into master-3.5
John Linn [Tue, 31 Jul 2012 00:37:23 +0000 (17:37 -0700)]
Merge branch 'master-3.5-release' into master-3.5

11 years agoXilinx: ARM: added interrupts to swdt in DC3 and zc702 devicetrees.
Bryce Kellogg [Mon, 30 Jul 2012 22:31:30 +0000 (15:31 -0700)]
Xilinx: ARM: added interrupts to swdt in DC3 and zc702 devicetrees.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: SWDT: fixed driver crash when interrupt not specified.
Bryce Kellogg [Mon, 30 Jul 2012 22:28:39 +0000 (15:28 -0700)]
Xilinx: ARM: SWDT: fixed driver crash when interrupt not specified.

Previously the driver was not checking if the optional interrupt
parameters were in the devicetree and was trying to register
an interrupt handler no matter what. The driver has been changed
to only register an interrupt handler if the interrupt information
is present.

Signed-off-by: Bryce Kellogg <bryce.kellogg@xilinx.com>
11 years agoXilinx: ARM: DMA: Handled Recoverable Errors in VDMA
SrikanthT [Mon, 30 Jul 2012 13:06:21 +0000 (18:36 +0530)]
Xilinx: ARM: DMA: Handled Recoverable Errors in VDMA

There are some recoverable errors in AXI-VDMA, which are
DMA Internal Error, FSize Less Mismatch, LSize Less
Mismatch, FSize More Mismatch errors. When detected,
these errors need to be cleared (Write-on-Clear).  And
these are only recoverable when C_FLUSH_ON_FSYNC is
enabled in hardware system.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fix interrupt handler issues
Anirudha Sarangi [Tue, 17 Jul 2012 07:35:14 +0000 (13:05 +0530)]
Xilinx: ARM: EmacPs: Fix interrupt handler issues

This patch makes changes in the EmacPs interrupt handler to
clear the EmacPs interrupt status after processing a queued packet.
The status was getting cleared earlier immediately after entering
the interrupt handler. But since we try to process all available
BDs during processing of Txed/Rxed packets, it is better to clear
the interrupt status only after the BD processing is over. This
patch also puts appropriate barriers for reading/writing to registers.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to move/add proper spin_locks
Anirudha Sarangi [Tue, 17 Jul 2012 07:23:36 +0000 (12:53 +0530)]
Xilinx: ARM: EmacPs: Made changes to move/add proper spin_locks

The existing code had some potential issues for SMP case with
regards to spin lock handling. This patch fixes all such issues
and puts proper spin_locks (and unlocks) at appropriate places.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Ignore collisions for half duplex mode
Anirudha Sarangi [Tue, 17 Jul 2012 06:55:14 +0000 (12:25 +0530)]
Xilinx: ARM: EmacPs: Ignore collisions for half duplex mode

For half duplex mode the collisions were being reported as errors.
For half duplex mode collisions are expected to occur for heavy
traffic and it is not an error case. Only when number of retries
exceeds the limit, then only it should be reported as an error.
This patch fixes the issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fix a potential bug for multi-BD packets
Anirudha Sarangi [Tue, 17 Jul 2012 06:47:54 +0000 (12:17 +0530)]
Xilinx: ARM: EmacPs: Fix a potential bug for multi-BD packets

For multi-BD packets the clearing of BD fields and freeing of BDs
 was not happening properly. This patch fixes this issue.

Also the patch makes minor changes to read and use the length field
of BD appropriately.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to fix the PHY initialization issues
Anirudha Sarangi [Tue, 17 Jul 2012 06:25:42 +0000 (11:55 +0530)]
Xilinx: ARM: EmacPs: Made changes to fix the PHY initialization issues

A wrong PHY address in the device tree was crashing the kernel. The patch
fixes this issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fixed issues in Tx Timeout callback
Anirudha Sarangi [Tue, 17 Jul 2012 06:18:33 +0000 (11:48 +0530)]
Xilinx: ARM: EmacPs: Fixed issues in Tx Timeout callback

The existing Tx timeout was not initializing the MAC with
correct speed and duplex settings. Because of this after
the Tx Timeout the MAC was failing to transmit and receive
ethernet traffic. This patch fixes this issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to reflect actual hardware registers
Anirudha Sarangi [Tue, 17 Jul 2012 06:06:06 +0000 (11:36 +0530)]
Xilinx: ARM: EmacPs: Made changes to reflect actual hardware registers

This patch removes hash defines for some of the register bit
fields that does not exist anymore with the current version
of hardware. This also makes changes in the code in view of the same.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings
Anirudha Sarangi [Tue, 17 Jul 2012 05:50:41 +0000 (11:20 +0530)]
Xilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings

This patch increases the allocated buffer descriptors for Rx
and Tx DMA rings from 32 to 128.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Modified file header comments
Anirudha Sarangi [Tue, 17 Jul 2012 05:26:22 +0000 (10:56 +0530)]
Xilinx: ARM: EmacPs: Modified file header comments

The patch modifies the file header comments for TODO list.
It also removes unused code from the file (put under #if 0).

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: DMA: Handled Recoverable Errors in VDMA xilinx-14.2-build1-trd
SrikanthT [Mon, 30 Jul 2012 13:06:21 +0000 (18:36 +0530)]
Xilinx: ARM: DMA: Handled Recoverable Errors in VDMA

There are some recoverable errors in AXI-VDMA, which are
DMA Internal Error, FSize Less Mismatch, LSize Less
Mismatch, FSize More Mismatch errors. When detected,
these errors need to be cleared (Write-on-Clear).  And
these are only recoverable when C_FLUSH_ON_FSYNC is
enabled in hardware system.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fix interrupt handler issues
Anirudha Sarangi [Tue, 17 Jul 2012 07:35:14 +0000 (13:05 +0530)]
Xilinx: ARM: EmacPs: Fix interrupt handler issues

This patch makes changes in the EmacPs interrupt handler to
clear the EmacPs interrupt status after processing a queued packet.
The status was getting cleared earlier immediately after entering
the interrupt handler. But since we try to process all available
BDs during processing of Txed/Rxed packets, it is better to clear
the interrupt status only after the BD processing is over. This
patch also puts appropriate barriers for reading/writing to registers.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to move/add proper spin_locks
Anirudha Sarangi [Tue, 17 Jul 2012 07:23:36 +0000 (12:53 +0530)]
Xilinx: ARM: EmacPs: Made changes to move/add proper spin_locks

The existing code had some potential issues for SMP case with
regards to spin lock handling. This patch fixes all such issues
and puts proper spin_locks (and unlocks) at appropriate places.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Ignore collisions for half duplex mode
Anirudha Sarangi [Tue, 17 Jul 2012 06:55:14 +0000 (12:25 +0530)]
Xilinx: ARM: EmacPs: Ignore collisions for half duplex mode

For half duplex mode the collisions were being reported as errors.
For half duplex mode collisions are expected to occur for heavy
traffic and it is not an error case. Only when number of retries
exceeds the limit, then only it should be reported as an error.
This patch fixes the issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fix a potential bug for multi-BD packets
Anirudha Sarangi [Tue, 17 Jul 2012 06:47:54 +0000 (12:17 +0530)]
Xilinx: ARM: EmacPs: Fix a potential bug for multi-BD packets

For multi-BD packets the clearing of BD fields and freeing of BDs
 was not happening properly. This patch fixes this issue.

Also the patch makes minor changes to read and use the length field
of BD appropriately.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to fix the PHY initialization issues
Anirudha Sarangi [Tue, 17 Jul 2012 06:25:42 +0000 (11:55 +0530)]
Xilinx: ARM: EmacPs: Made changes to fix the PHY initialization issues

A wrong PHY address in the device tree was crashing the kernel. The patch
fixes this issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Fixed issues in Tx Timeout callback
Anirudha Sarangi [Tue, 17 Jul 2012 06:18:33 +0000 (11:48 +0530)]
Xilinx: ARM: EmacPs: Fixed issues in Tx Timeout callback

The existing Tx timeout was not initializing the MAC with
correct speed and duplex settings. Because of this after
the Tx Timeout the MAC was failing to transmit and receive
ethernet traffic. This patch fixes this issue.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Made changes to reflect actual hardware registers
Anirudha Sarangi [Tue, 17 Jul 2012 06:06:06 +0000 (11:36 +0530)]
Xilinx: ARM: EmacPs: Made changes to reflect actual hardware registers

This patch removes hash defines for some of the register bit
fields that does not exist anymore with the current version
of hardware. This also makes changes in the code in view of the same.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings
Anirudha Sarangi [Tue, 17 Jul 2012 05:50:41 +0000 (11:20 +0530)]
Xilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings

This patch increases the allocated buffer descriptors for Rx
and Tx DMA rings from 32 to 128.

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: EmacPs: Modified file header comments
Anirudha Sarangi [Tue, 17 Jul 2012 05:26:22 +0000 (10:56 +0530)]
Xilinx: ARM: EmacPs: Modified file header comments

The patch modifies the file header comments for TODO list.
It also removes unused code from the file (put under #if 0).

Signed-off-by: Anirudha <anirudh@xilinx.com>
11 years agoXilinx: ARM: Exported Kernel Symbols for High Performance Xilinx DMA driver
SrikanthT [Wed, 18 Jul 2012 12:39:27 +0000 (18:09 +0530)]
Xilinx: ARM: Exported Kernel Symbols for High Performance Xilinx DMA driver

Exported Kernel Symbols for high performance Xilinx
DMA driver module. The list of symbols and files are:
1. "init_mm"  (mm/init-mm.c)
2. "in_gate_area_no_mm" (mm/memory.c)
3. "__flush_anon_page" (arch/arm/mm/flush.c)
4. "follow_page"     (mm/memory.c)
5. "kmap_high_get"   (mm/highmem.c)
6. "vm_normal_page"  (mm/memory.c)
7. "get_gate_vma"    (mm/memory.c)
8. "handle_mm_fault" (mm/memory.c)
9. "find_extend_vma" (mm/mmap.c)

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: BSP: update memory initialization
John Linn [Wed, 18 Jul 2012 21:53:58 +0000 (14:53 -0700)]
Xilinx: ARM: BSP: update memory initialization

This removes the reserving of memory for video and
also adds conditional compilation for the case where
the memory is not at 0 so as not to hang the kernel.

Signed-off-by: John Linn <john.linn@xilinx.com>