]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
11 years agousb: gadget: Remove ARCH_XILINX reference
Michal Simek [Tue, 13 Nov 2012 09:49:44 +0000 (10:49 +0100)]
usb: gadget: Remove ARCH_XILINX reference

Remove old unused ARCH_XILINX platform name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
11 years agousb: ehci: Remove ARCH_XILINX reference
Michal Simek [Tue, 13 Nov 2012 09:50:31 +0000 (10:50 +0100)]
usb: ehci: Remove ARCH_XILINX reference

Remove old unused ARCH_XILINX platform name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
11 years agoarm: zynq: Migrate I2C slaves to DT
Soren Brinkmann [Sat, 10 Nov 2012 02:00:52 +0000 (18:00 -0800)]
arm: zynq: Migrate I2C slaves to DT

Use the device tree to describe the I2C bus for the zc702/zc706 platform.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Fix dts file names in Makefile.boot
Soren Brinkmann [Mon, 12 Nov 2012 22:46:32 +0000 (14:46 -0800)]
arm: zynq: Fix dts file names in Makefile.boot

The filenames of several dts files have changed and needed
to be adjusted in Makefile.boot.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: xilinx_emacps: Use dev_err with proper device link
Michal Simek [Tue, 13 Nov 2012 13:15:00 +0000 (14:15 +0100)]
net: xilinx_emacps: Use dev_err with proper device link

Warning log:
drivers/net/ethernet/xilinx/xilinx_emacps.c: In function 'xemacps_mii_init':
drivers/net/ethernet/xilinx/xilinx_emacps.c:934:1: warning:
label 'err_out_unregister_bus' defined but not used [-Wunused-label]

This patch should be the part of this commit:
net: xilinx_emacps: Use dev_ prefix over pr_
(sha1: 6e9d94cc5d3245616f4b4155590fd7140baa23b1)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoARM: highbank: add coherent DMA setup
Rob Herring [Mon, 5 Nov 2012 18:13:15 +0000 (10:13 -0800)]
ARM: highbank: add coherent DMA setup

Some highbank DMA masters can support coherent (ACP) or non-coherent DMA.
This sets up dma_map_ops for masters which are configured for coherent DMA.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agoARM: kill off arch_is_coherent
Rob Herring [Mon, 5 Nov 2012 18:13:14 +0000 (10:13 -0800)]
ARM: kill off arch_is_coherent

With ixp2xxx removed, there are no platforms that define arch_is_coherent,
so the last occurrences of arch_is_coherent can be removed. Any new
platform with coherent i/o should use coherent dma mapping functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agoARM: add coherent iommu dma ops
Rob Herring [Mon, 5 Nov 2012 18:13:13 +0000 (10:13 -0800)]
ARM: add coherent iommu dma ops

Remove arch_is_coherent() from iommu dma ops and implement separate
coherent ops functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agoARM: add coherent dma ops
Rob Herring [Mon, 5 Nov 2012 18:13:12 +0000 (10:13 -0800)]
ARM: add coherent dma ops

arch_is_coherent is problematic as it is a global symbol. This
doesn't work for multi-platform kernels or platforms which can support
per device coherent DMA.

This adds arm_coherent_dma_ops to be used for devices which connected
coherently (i.e. to the ACP port on Cortex-A9 or A15). The arm_dma_ops
are modified at boot when arch_is_coherent is true.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
11 years agowatchdog: xilinx_wdtps: Fix section mismatch
Michal Simek [Mon, 12 Nov 2012 15:23:35 +0000 (16:23 +0100)]
watchdog: xilinx_wdtps: Fix section mismatch

Warning log:
WARNING: drivers/built-in.o(.data+0x9bd8): Section mismatch in reference from
the variable xwdtps_driver to the function .init.text:xwdtps_probe()
The variable xwdtps_driver references
the function __init xwdtps_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agousb: gadget: usbps_udc: Fix section mismatch
Michal Simek [Mon, 12 Nov 2012 10:32:55 +0000 (11:32 +0100)]
usb: gadget: usbps_udc: Fix section mismatch

Warning log:
WARNING: vmlinux.o(.data+0x12dc8): Section mismatch in reference from
the variable xwdtps_driver to the function .init.text:xwdtps_probe()
The variable xwdtps_driver references
the function __init xwdtps_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agopmods: Fix section mismatch
Michal Simek [Mon, 12 Nov 2012 10:32:27 +0000 (11:32 +0100)]
pmods: Fix section mismatch

Warning log:
WARNING: drivers/pmods/built-in.o(.devinit.text+0x1bc): Section mismatch in reference from
the function gpio_pmodoled_of_probe() to the function .init.text:add_gpio_pmodoled_device_to_bus()
The function __devinit gpio_pmodoled_of_probe() references
a function __init add_gpio_pmodoled_device_to_bus().
If add_gpio_pmodoled_device_to_bus is only used by gpio_pmodoled_of_probe then
annotate add_gpio_pmodoled_device_to_bus with a matching annotation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agogpio: xilinx_gpiops: Fix section mismatch
Michal Simek [Mon, 12 Nov 2012 10:30:41 +0000 (11:30 +0100)]
gpio: xilinx_gpiops: Fix section mismatch

Warning log:
WARNING: vmlinux.o(.data+0x91f0): Section mismatch in reference from
the variable xgpiops_driver to the function .init.text:xgpiops_probe()
The variable xgpiops_driver references
the function __init xgpiops_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agousb: gadget: Select xps gadget driver for Microblaze and PowerPC
Michal Simek [Mon, 12 Nov 2012 15:17:48 +0000 (16:17 +0100)]
usb: gadget: Select xps gadget driver for Microblaze and PowerPC

Do not select it for Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: xilinx_ps: Simplify driver initialization
Michal Simek [Mon, 12 Nov 2012 10:36:21 +0000 (11:36 +0100)]
i2c: xilinx_ps: Simplify driver initialization

Use module_platform_driver macro which creates
init and exit functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: xilinx_emacps: Remove CONFIG_COMMON_CLK conditionals
Soren Brinkmann [Mon, 12 Nov 2012 22:36:09 +0000 (14:36 -0800)]
net: xilinx_emacps: Remove CONFIG_COMMON_CLK conditionals

CONFIG_COMMON_CLK 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>
11 years agonet: xilinx_emacps: Remove CONFIG_OF conditionals
Soren Brinkmann [Mon, 12 Nov 2012 22:36:08 +0000 (14:36 -0800)]
net: xilinx_emacps: 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>
11 years agonet: xilinx_emacps: Use dev_ prefix over pr_
Soren Brinkmann [Mon, 12 Nov 2012 22:36:07 +0000 (14:36 -0800)]
net: xilinx_emacps: Use dev_ prefix over pr_

Replacing uses of pr_err through dev_err
and pr_info over dev_info
and pr_warn over dev_warn.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: xilinx_emacps: Don't disable clocks if suspended
Soren Brinkmann [Mon, 12 Nov 2012 22:36:06 +0000 (14:36 -0800)]
net: xilinx_emacps: Don't disable clocks if suspended

When entering suspend the device clocks were disabled, even
when they were already gated off due to RUNTIME_PM. Triggering
a kernel warning.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: xilinx_i2cps: Remove CONFIG_COMMON_CLK conditionals
Soren Brinkmann [Mon, 12 Nov 2012 18:49:57 +0000 (10:49 -0800)]
i2c: xilinx_i2cps: Remove CONFIG_COMMON_CLK conditionals

CONFIG_COMMON_CLK 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: John Linn <john.linn@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: xilinx_i2cps: Remove CONFIG_OF conditionals
Soren Brinkmann [Mon, 12 Nov 2012 18:49:56 +0000 (10:49 -0800)]
i2c: xilinx_i2cps: 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: John Linn <john.linn@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoi2c: xilinx_i2cps: Use dev_err over pr_err
Soren Brinkmann [Mon, 12 Nov 2012 18:49:55 +0000 (10:49 -0800)]
i2c: xilinx_i2cps: Use dev_err over pr_err

Replacing uses of pr_err through dev_err.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: John Linn <john.linn@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agogpio: xilinx_gpiops: Remove CONFIG_COMMON_CLK conditionals
Soren Brinkmann [Mon, 12 Nov 2012 21:15:26 +0000 (13:15 -0800)]
gpio: xilinx_gpiops: Remove CONFIG_COMMON_CLK conditionals

CONFIG_COMMON_CLK 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>
11 years agoserial: xilinx_uartps: Remove CONFIG_COMMON_CLK conditionals
Soren Brinkmann [Mon, 12 Nov 2012 19:58:46 +0000 (11:58 -0800)]
serial: xilinx_uartps: Remove CONFIG_COMMON_CLK conditionals

CONFIG_COMMON_CLK 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>
11 years agoserial: xilinx_uartps: Remove CONFIG_OF conditionals
Soren Brinkmann [Mon, 12 Nov 2012 19:58:45 +0000 (11:58 -0800)]
serial: xilinx_uartps: 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>
11 years agoserial: xilinx_uartps: Fix suspend functionality
Soren Brinkmann [Mon, 12 Nov 2012 19:58:44 +0000 (11:58 -0800)]
serial: xilinx_uartps: Fix suspend functionality

The driver's suspend/resume functions were buggy and
lacking some steps to successfully get through a suspend
and resume cycle.
The port argument passed to uart_(suspend|resume)_port() was
invalid.
The resume function now resets the hardware. There is probably a
less brutal way of getting the UART back up, but this one does
work.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoserial: xilinx_uartps: Use dev_err over pr_err
Soren Brinkmann [Mon, 12 Nov 2012 19:58:43 +0000 (11:58 -0800)]
serial: xilinx_uartps: Use dev_err over pr_err

Replacing uses of pr_err through dev_err.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agogpio: xilinx_gpiops: Clean coding style
Michal Simek [Mon, 12 Nov 2012 10:29:59 +0000 (11:29 +0100)]
gpio: xilinx_gpiops: Clean coding style

Remove trailing whitespaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agogpio: xilinx_gpiops: Remove CONFIG_OF conditionals
Soren Brinkmann [Fri, 9 Nov 2012 02:32:55 +0000 (18:32 -0800)]
gpio: xilinx_gpiops: 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: Michal Simek <michal.simek@xilinx.com>

11 years agogpio: xilinx_gpiops: Update PM support
Soren Brinkmann [Fri, 9 Nov 2012 02:32:53 +0000 (18:32 -0800)]
gpio: xilinx_gpiops: Update PM support

- The PM state of the device was incorrectly initialized to be
active in the probe function.
- Use the sync variants of the pm_runtime_(get|put) functions.
- Provide different functions for PM_SLEEP and PM_RUNTIME

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked: Michal Simek <michal.simek@xilinx.com>

11 years agogpio: xilinx_gpiops: Use dev_err over pr_err
Soren Brinkmann [Fri, 9 Nov 2012 02:32:52 +0000 (18:32 -0800)]
gpio: xilinx_gpiops: Use dev_err over pr_err

Replacing uses of pr_err through dev_err.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked: Michal Simek <michal.simek@xilinx.com>

11 years agogpio: xilinx_gpiops: Don't disable clocks if suspended
Soren Brinkmann [Fri, 9 Nov 2012 02:32:51 +0000 (18:32 -0800)]
gpio: xilinx_gpiops: Don't disable clocks if suspended

When entering suspend the device clocks were disabled, even
when they were already gated off due to RUNTIME_PM. Triggering
a kernel warning.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked: Michal Simek <michal.simek@xilinx.com>

11 years agoarm: zynq: Add ucd9248 hwmon to zc702
Soren Brinkmann [Sat, 10 Nov 2012 02:00:50 +0000 (18:00 -0800)]
arm: zynq: Add ucd9248 hwmon to zc702

The zc702 has several ucd9248 PWM controllers connected to the
PMBUS. This patch registers those devices with the driver framework,
if the corresponding driver is selected in the kernel configuration.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agomisc: si570: Use only 32 bit DT accessors
Soren Brinkmann [Sat, 10 Nov 2012 02:00:51 +0000 (18:00 -0800)]
misc: si570: Use only 32 bit DT accessors

The DT data for the si570 uses 32 bit wide data. To obtain data
from the DT only the 32 bit variants of the DT accessor routines
can be used.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: Add dtb targets to Makefile.boot
Soren Brinkmann [Thu, 8 Nov 2012 16:37:24 +0000 (08:37 -0800)]
arm: zynq: Add dtb targets to Makefile.boot

Adding dtb targets to let the kernel build system
automatically build Zynq DT blobs.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
11 years agonet: xilinx_emacps: Correct license to GPL v2
Soren Brinkmann [Thu, 8 Nov 2012 21:41:47 +0000 (13:41 -0800)]
net: xilinx_emacps: Correct license to GPL v2

The file header stated the file was licensed under - the
non-existent - GPL v2.1. The correct license is GPL v2.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: zynq: timer: Remove unnecessary register write
Soren Brinkmann [Thu, 8 Nov 2012 01:05:24 +0000 (17:05 -0800)]
arm: zynq: timer: Remove unnecessary register write

Acknowedging an interrupt requires to read the interrupt register
only. The write was only required to work around a bug in
the QEMU implementation of the TTC, which is fixed.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
11 years agoi2c: Flagged race condition for fixing.
Peter Crosthwaite [Wed, 7 Nov 2012 00:31:58 +0000 (10:31 +1000)]
i2c: Flagged race condition for fixing.

The I2C controller read-modify-writes the XFER_SIZE register when the DATA
interrupt occurs. If my understanding of the hardware operation is correct, the
hardware is still recieving data at this time so this register is not stable
at this point. The read modify write will update the new value based on some
arithmetic done on the old value which will cause the hardware to try and read
an extra byte.

This bug is a freak occurance, so you cant replicate it (at least on real
hardware), but with a large volume of I2C transfers with a busy kernel you will
get a non trivial MTTF.

See comments added to code.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
11 years agoxilinx: Remove convert_vmlinux.sh
Michal Simek [Tue, 6 Nov 2012 12:44:25 +0000 (13:44 +0100)]
xilinx: Remove convert_vmlinux.sh

This helper script is not used anymore.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoxilinx: afx: Add AFX nand module device tree support
Jagannadha Sutradharudu Teki [Tue, 6 Nov 2012 11:06:06 +0000 (16:36 +0530)]
xilinx: afx: Add AFX nand module device tree support

This patch adds device tree support for AFX NAND module assuming
NAND module is preset on the AFX board.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoxilinx: afx: Renamed zynq-afx.dts with zynq-afx-nor.dts
Jagannadha Sutradharudu Teki [Tue, 6 Nov 2012 11:06:05 +0000 (16:36 +0530)]
xilinx: afx: Renamed zynq-afx.dts with zynq-afx-nor.dts

Renamed afx device tree file.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoxilinx: afx: Add nor support to device tree
Jagannadha Sutradharudu Teki [Tue, 6 Nov 2012 11:06:04 +0000 (16:36 +0530)]
xilinx: afx: Add nor support to device tree

This patch adds support for NOR on AFX device tree assuming
NOR module is preset on the AFX board.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoxilinx: afx: Removed ip option from kernel bootargs
Jagannadha Sutradharudu Teki [Tue, 6 Nov 2012 11:06:03 +0000 (16:36 +0530)]
xilinx: afx: Removed ip option from kernel bootargs

There is no ethernet support on AFX boards, hence removed it
from kernel bootargs.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agoxilinx: afx: Update the memory amount on device tree
Jagannadha Sutradharudu Teki [Tue, 6 Nov 2012 11:06:02 +0000 (16:36 +0530)]
xilinx: afx: Update the memory amount on device tree

Update the actual memory amount present on afx ddr module (CFG-114).

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
11 years agomicroblaze: Fix intc_enable_or_unmask function
Michal Simek [Mon, 5 Nov 2012 10:51:13 +0000 (11:51 +0100)]
microblaze: Fix intc_enable_or_unmask function

Xilinx crs: CR 677091

Intc_enable_or_unmask() is called at the last stage of handle_level_irq().

This function enables the irq first (Write INTC.SIE) and clear ISR next (Write INTC.IAR).

Here¿s the code in arch/microblaze/kernel/intc.c

static void intc_enable_or_unmask(unsigned int irq)
{
                unsigned long mask = 1 << irq;
                pr_debug("enable_or_unmask: %d\n", irq);
                out_be32(INTC_BASE + SIE, mask);

                /* ack level irqs because they can't be acked during
                 * ack function since the handle_level_irq function
                 * acks the irq before calling the interrupt handler
                 */
                if (irq_desc[irq].status & IRQ_LEVEL)
                                out_be32(INTC_BASE + IAR, mask);
}

This would create problems that processor will get into a new interrupt as soon as SIE is written because the previous level interrupt has been captured by INTC.

If the description bring some puzzles, here¿s the details of how interrupt is handled for MicroBlaze after Interrupt signal is detected:
1. disable INTC (INTC.CIE = 1)
2. Acknowledge INTC (INTC.IAR = 1)
3. gets into interrupt source¿s handler, for example, timer¿s handler
4. Timer¿s interrupt handler acknowledge Timer¿s Interrupt Status (Timer.TCSR0[23] = 1), and return
5. Enable INTC (INTC.SIE = 1)
6. Acknowledge INTC (INTC.IAR = 1)

INTC continue to capture source inputs even if INTC is disabled (INTC.IER == 1).
So between the gap of step 2 and step 3, the level interrupt from source makes INTC captures a new interrupt and thus the INTC.ISR = 1 during step 3, 4, and 5.
When INTC is enabled in step 5, INTC¿s interrupt output will go high immediately.

In summary, the driver should issue step 6 before step 5.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: xilinx_emacps: Fix mdio name initialization
Michal Simek [Mon, 5 Nov 2012 17:04:33 +0000 (18:04 +0100)]
net: xilinx_emacps: Fix mdio name initialization

We are using this mdio bus description which
requires properly setup additional device level.
lp->mii_bus->id is address of device itself
but ethernet device itself is
of_get_parent(of_get_parent(lp->phy_node));

ps7_ethernet_0: ps7-ethernet@e000b000 {
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@7 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
reg = <7>;
} ;
} ;
} ;

This patch fix the problem with several emacps drivers.

Reported-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: John Linn <john.linn@xilinx.com>
11 years agoarm: zynq: Remove moduleparam.h from pl330
Michal Simek [Fri, 2 Nov 2012 12:29:40 +0000 (13:29 +0100)]
arm: zynq: Remove moduleparam.h from pl330

It is already included by module.h.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
11 years agozynq: smp: Fix CONFIG_PHYS_OFFSET=0 option
Michal Simek [Fri, 2 Nov 2012 10:58:51 +0000 (11:58 +0100)]
zynq: smp: Fix CONFIG_PHYS_OFFSET=0 option

The problem was when CONFIG_PHYS_OFFSET=0 because
CONFIG option was defined but this code shouldn't be called.
Fix this wrong config option.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agozynq: Fix conding style in platsmp
Michal Simek [Fri, 2 Nov 2012 10:57:53 +0000 (11:57 +0100)]
zynq: Fix conding style in platsmp

Remove traling white space.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoMerge branch 'master-next' into master
John Linn [Sat, 3 Nov 2012 16:25:07 +0000 (09:25 -0700)]
Merge branch 'master-next' into master

This is the result of merging Petalinux and Xilinx OSL together
to get the best of both.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agonet: ethernet: emaclite: Fix compilation error with Zynq
Jason Wu [Thu, 1 Nov 2012 10:15:58 +0000 (20:15 +1000)]
net: ethernet: emaclite: Fix compilation error with Zynq

Currently Zynq is not aware of in_be32 and out_be32 functions. So if
emaclite driver is enabled, it will get compilation error.
e.g implicit declaration of function 'in_be32'
[-Werror=implicit-function-declaration]

Signed-off-by: Jason Wu <huanyu@xilinx.com>
11 years agonet: ethernet: emaclite: Fix of_irq_to_resource compilation error
Jason Wu [Thu, 1 Nov 2012 10:15:57 +0000 (20:15 +1000)]
net: ethernet: emaclite: Fix of_irq_to_resource compilation error

Include of_irq.h header to fix implicit declaration of function
'of_irq_to_resource' compilation error when target machine is Zynq

Signed-off-by: Jason Wu <huanyu@xilinx.com>
11 years agonet: ethernet: axi_emac: Fix compilation error with Zynq
Jason Wu [Thu, 1 Nov 2012 10:15:56 +0000 (20:15 +1000)]
net: ethernet: axi_emac: Fix compilation error with Zynq

Currently Zynq is not aware of in_be32 and out_be32 functions. So if
axi_emac driver is enabled, it will get compilation error.
e.g implicit declaration of function 'in_be32'
[-Werror=implicit-function-declaration]

Signed-off-by: Jason Wu <huanyu@xilinx.com>
11 years agonet: ethernet: axi_emac: Fix of_irq_to_resource compilation error
Jason Wu [Thu, 1 Nov 2012 10:15:55 +0000 (20:15 +1000)]
net: ethernet: axi_emac: Fix of_irq_to_resource compilation error

Include of_irq.h header to fix implicit declaration of function
'of_irq_to_resource' compilation error when target machine is Zynq

Signed-off-by: Jason Wu <huanyu@xilinx.com>
11 years agoserial: xilinx_uartps: Fix bad register write in console_write
John Linn [Fri, 26 Oct 2012 19:35:16 +0000 (12:35 -0700)]
serial: xilinx_uartps: Fix bad register write in console_write

The commit:
serial: xilinx_uartps: Force enable the UART in xuartps_console_write
(sha1: d21aec67c1c782314d20b3d619e76cf8aae593dc)
caused  a new bug as the write to the control register had
the offset and the value to write reversed.

Reported-by: Jason Andrews <jasona@cadence.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoRevert "net: xilinx_emacps: Remove default lp->board_type setup"
Michal Simek [Fri, 26 Oct 2012 07:36:16 +0000 (09:36 +0200)]
Revert "net: xilinx_emacps: Remove default lp->board_type setup"

This reverts commit 82038ad7e4cf5a8a83c93d1fed09af35e8e7be0b.

This really smells bad. Setup lp->board_type before register_netdev
is weird. It is probably because of xemacps_mii_probe or xemacps_init_hw
function. register_netdev should be probably at different place.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: xilinx: Update device trees for emac driver change
John Linn [Fri, 26 Oct 2012 18:20:16 +0000 (11:20 -0700)]
arm: xilinx: Update device trees for emac driver change

The driver was updated during the merge of trees such that the
device trees must match.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoserial: xilinx_uartps: fix bad register write in console_write
John Linn [Fri, 26 Oct 2012 19:35:16 +0000 (12:35 -0700)]
serial: xilinx_uartps: fix bad register write in console_write

The last commit to fix xuartps_console_write caused a new
bug as the write to the control register had the offset and
the value to write reversed.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agousb: host: ehci-xilinx-usbps: Convert old otg function to new usb_phy
Michal Simek [Fri, 26 Oct 2012 10:09:39 +0000 (12:09 +0200)]
usb: host: ehci-xilinx-usbps: Convert old otg function to new usb_phy

This should be the part of merge commit but zed board support
wasn't tested.

It is based on this mainline patch
"usb: Convert all users to new usb_phy"
(sha1: b96d3b08365f5a9603f50f3aadca6012f7eaffa1)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoarm: xilinx: update zynq defconfig for 3.6 kernel
John Linn [Thu, 25 Oct 2012 22:21:42 +0000 (15:21 -0700)]
arm: xilinx: update zynq defconfig for 3.6 kernel

The 3.6 kernel needs CONFIG_ARM_PATCH_PHYS_VIRT turned on.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agospi-xilinx: Remove ISR race condition
Peter Crosthwaite [Sat, 29 Sep 2012 01:45:36 +0000 (11:45 +1000)]
spi-xilinx: Remove ISR race condition

The ISR currently consumes the rx buffer data and re-enables transmission
from within interrupt context. This is bad because if the interrupt
occurs again before the ISR exits, the new interrupt will be erroneously
cleared by the still completing ISR.

Simplified the ISR by just setting the completion variable and exiting with
no action. Then just looped the transmit functionality in
xilinx_spi_txrx_bufs().

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
11 years agoxilinx: Clean coding style for zynq device tree files
Michal Simek [Thu, 25 Oct 2012 14:12:22 +0000 (16:12 +0200)]
xilinx: Clean coding style for zynq device tree files

Coding style cleanup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agonet: xilinx_emacps: Synchronization with PetaLinux tree
Michal Simek [Thu, 25 Oct 2012 13:41:41 +0000 (15:41 +0200)]
net: xilinx_emacps: Synchronization with PetaLinux tree

Use this fragment for specifying phy.

eth@e000b000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy-handle = <&phy0>;
...
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@7 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
reg = <7>;
} ;
} ;
};

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agoserial: xilinx_uartps: Force enable the UART in xuartps_console_write
Lars-Peter Clausen [Mon, 22 Oct 2012 12:39:15 +0000 (14:39 +0200)]
serial: xilinx_uartps: Force enable the UART in xuartps_console_write

It is possible that under certain circumstances xuartps_console_write is entered
while the UART disabled. When this happens the code will busy loop in
xuartps_console_putchar, since the character is never written and the TXEMPTY
flag is never set. The result is a system lockup. This patch force enables the
UART for the duration of xuartps_console_write to avoid this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agogpio: xilinxps: Add missing spin_lock_init
Lars-Peter Clausen [Mon, 22 Oct 2012 12:39:51 +0000 (14:39 +0200)]
gpio: xilinxps: Add missing spin_lock_init

Initialize the device's spinlock. Otherwise lockdep will complain.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoXilinx: ARM: NAND: Removed ClearNAND support
Naveen Mamindlapalli [Mon, 22 Oct 2012 10:47:23 +0000 (16:17 +0530)]
Xilinx: ARM: NAND: Removed ClearNAND support

Removed ClearNAND support (CR# 673348).

11 years agoXilinx: ARM: Frame buffer driver fix for compilation error.
Pallav Joshi [Wed, 17 Oct 2012 09:37:11 +0000 (15:07 +0530)]
Xilinx: ARM: Frame buffer driver fix for compilation error.

Fixed xylonfb-pixclk.c file for the compilation error while
    using other flags than CONFIG_FB_XYLON_ZC702_PIXCLK.
    Added appropriate header files to xylonfb-pixclk.c

Signed-off-by: Pallav Joshi <pallavj@xilinx.com>
11 years agonet: xilinx_axienet: Removed compile error
John Linn [Wed, 24 Oct 2012 23:50:32 +0000 (16:50 -0700)]
net: xilinx_axienet: Removed compile error

There was an undefined variable. It now builds and runs at least
with ping.

Signed-off-by: John Linn <john.linn@xilinx.com>
11 years agoserial: xilinx_uartps: Force enable the UART in xuartps_console_write
Lars-Peter Clausen [Mon, 22 Oct 2012 12:39:15 +0000 (14:39 +0200)]
serial: xilinx_uartps: Force enable the UART in xuartps_console_write

It is possible that under certain circumstances xuartps_console_write is entered
while the UART disabled. When this happens the code will busy loop in
xuartps_console_putchar, since the character is never written and the TXEMPTY
flag is never set. The result is a system lockup. This patch force enables the
UART for the duration of xuartps_console_write to avoid this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agogpio: xilinxps: Add missing spin_lock_init
Lars-Peter Clausen [Mon, 22 Oct 2012 12:39:51 +0000 (14:39 +0200)]
gpio: xilinxps: Add missing spin_lock_init

Initialize the device's spinlock. Otherwise lockdep will complain.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoXilinx: ARM: NAND: Removed ClearNAND support
Naveen Mamindlapalli [Mon, 22 Oct 2012 10:47:23 +0000 (16:17 +0530)]
Xilinx: ARM: NAND: Removed ClearNAND support

Removed ClearNAND support (CR# 673348).

11 years agoXilinx: ARM: Frame buffer driver fix for compilation error.
Pallav Joshi [Wed, 17 Oct 2012 09:37:11 +0000 (15:07 +0530)]
Xilinx: ARM: Frame buffer driver fix for compilation error.

Fixed xylonfb-pixclk.c file for the compilation error while
    using other flags than CONFIG_FB_XYLON_ZC702_PIXCLK.
    Added appropriate header files to xylonfb-pixclk.c

Signed-off-by: Pallav Joshi <pallavj@xilinx.com>
11 years agoRevert "Xilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings"
John Linn [Tue, 23 Oct 2012 00:20:02 +0000 (17:20 -0700)]
Revert "Xilinx: ARM: EmacPs: Increased allocated BDs for Tx/Rx rings"

This reverts commit 765c687b4ec9b40264b891ae3eb6f05942b14e07.

11 years agoXilinx: ARM: Update Zynq defconfig to enable USB errata.
Naveen Mamindlapalli [Fri, 19 Oct 2012 12:38:10 +0000 (18:08 +0530)]
Xilinx: ARM: Update Zynq defconfig to enable USB errata.

Update Zynq defconfig to enable USB errata.

11 years agoXilinx: ARM: USB: Added workaround for DT# 654401.
Naveen Mamindlapalli [Fri, 19 Oct 2012 12:32:03 +0000 (18:02 +0530)]
Xilinx: ARM: USB: Added workaround for DT# 654401.

Added workaround for USB errata described in DT# 654401.
This workaround is applicable to Zynq silicon versions < 3.0.

11 years agoXilinx: ARM: DMA: Modified VDMA config param disable_intr logic
SrikanthT [Fri, 12 Oct 2012 19:16:56 +0000 (00:46 +0530)]
Xilinx: ARM: DMA: Modified VDMA config param disable_intr logic

The VDMA configuration parameter 'disable_intr' currently used
to enable specific interrupts, which does not denote the name
'disable_intr'.  This patch modifies the logic.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: DMA: Flush-on-fsync value do not update correctly
SrikanthT [Fri, 12 Oct 2012 19:36:39 +0000 (01:06 +0530)]
Xilinx: ARM: DMA: Flush-on-fsync value do not update correctly

This patch updates the flush-on-fsync values correctly.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: DMA: Fixed issue with VDMA when operating in circular mode
SrikanthT [Fri, 12 Oct 2012 18:59:55 +0000 (00:29 +0530)]
Xilinx: ARM: DMA: Fixed issue with VDMA when operating in circular mode

Parameters 'direction' & 'park_frm' of DMA configuration structure
are uninitialized, as a result, it looks for park pointer update
when operating in circular mode.  They are now initialized to fix
this issue.

Signed-off-by: SrikanthT <sthokal@xilinx.com>
11 years agoXilinx: ARM: USB: Fixed kernel crash with OTG driver.
Naveen Mamindlapalli [Thu, 11 Oct 2012 13:25:16 +0000 (18:55 +0530)]
Xilinx: ARM: USB: Fixed kernel crash with OTG driver.

Fixed the kernel crash with 3.5 changes.

11 years agoMicroblaze: AXIPCIE: Added support for configuring 2 RC BARs.
Naveen Mamindlapalli [Wed, 3 Oct 2012 13:50:44 +0000 (19:20 +0530)]
Microblaze: AXIPCIE: Added support for configuring 2 RC BARs.

Added support for configuring 2 RC local BARs at offset 0x10 and
0x14.

11 years agoxilinx: Remove old amp defconfigs
Michal Simek [Wed, 24 Oct 2012 11:09:02 +0000 (13:09 +0200)]
xilinx: Remove old amp defconfigs

Cleanup repository.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoxilinx: Use proper permission 644 for files
Michal Simek [Wed, 24 Oct 2012 10:56:42 +0000 (12:56 +0200)]
xilinx: Use proper permission 644 for files

Fix permissions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agommc: sdhci-of-xilinxps: Coding style cleanup
Michal Simek [Wed, 24 Oct 2012 10:51:35 +0000 (12:51 +0200)]
mmc: sdhci-of-xilinxps: Coding style cleanup

Remove spaces before tab.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agomtd: m25p80: Enable four byte mode for PS_QSPI
Jason Wu [Wed, 24 Oct 2012 07:03:10 +0000 (17:03 +1000)]
mtd: m25p80: Enable four byte mode for PS_QSPI

Enable mtd 4 byte mode if the mtd.size is larger than 16MB for PS_QSPI
controller

This hack bypass the 4 byte mode configuration for the qspi flash chip.
It sets mtd to 4 byte mode but leave the qspi flash in 3 byte mode (or
flash default mode). This can be issue when two 32MB flash is configured
as dual mode, it will not work if the qspi flash chip is configured in 3
byte mode as it require 4 byte addressing to access the entire 32MB.

Signed-off-by: Jason Wu <huanyu@xilinx.com>
11 years agonet: xilinx_emacps: Use skb_frag_size inline function
Michal Simek [Mon, 22 Oct 2012 13:50:57 +0000 (15:50 +0200)]
net: xilinx_emacps: Use skb_frag_size inline function

It is always better to use prepared functions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agonet: xilinx_emacps: More printk can't hurt
Michal Simek [Mon, 22 Oct 2012 13:45:22 +0000 (15:45 +0200)]
net: xilinx_emacps: More printk can't hurt

Synchronize with PetaLinux.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agomtd: nand: Coding style cleanup
Michal Simek [Mon, 22 Oct 2012 13:37:37 +0000 (15:37 +0200)]
mtd: nand: Coding style cleanup

Remove trailing white space.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: All low level Kconfig option has nothing to do with modules
Michal Simek [Mon, 22 Oct 2012 13:17:12 +0000 (15:17 +0200)]
arm: zynq: All low level Kconfig option has nothing to do with modules

Setup bool instead of tristate.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Synchronize with PetaLinux
Michal Simek [Mon, 22 Oct 2012 13:09:34 +0000 (15:09 +0200)]
arm: zynq: Synchronize with PetaLinux

Remove unused addresses and synchronize comment.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Using 1:1 mapping for SCU should be fine
Michal Simek [Mon, 22 Oct 2012 13:08:29 +0000 (15:08 +0200)]
arm: zynq: Using 1:1 mapping for SCU should be fine

PetaLinux uses 1:1 mapping without any problem.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Enable debug uart to be also uart1
Michal Simek [Mon, 22 Oct 2012 13:04:21 +0000 (15:04 +0200)]
arm: zynq: Enable debug uart to be also uart1

Extend debug option for debug uart.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Remove old non OF gic addresses
Michal Simek [Mon, 22 Oct 2012 13:00:06 +0000 (15:00 +0200)]
arm: zynq: Remove old non OF gic addresses

None uses these symbols.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Remove OCM addresses
Michal Simek [Mon, 22 Oct 2012 12:47:52 +0000 (14:47 +0200)]
arm: zynq: Remove OCM addresses

SMP bootup is done in different way.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Remove additional empty lines
Michal Simek [Mon, 22 Oct 2012 12:43:46 +0000 (14:43 +0200)]
arm: zynq: Remove additional empty lines

Coding style cleanup.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Do not enable FIXED_DEVTREE_ADDR by default
Michal Simek [Mon, 22 Oct 2012 12:13:19 +0000 (14:13 +0200)]
arm: zynq: Do not enable FIXED_DEVTREE_ADDR by default

The main reason is that hardcoding any address
is wrong.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Rename xilinx_dt_irq_match to zynq_dt_irq_match
Michal Simek [Mon, 22 Oct 2012 11:56:40 +0000 (13:56 +0200)]
arm: zynq: Rename xilinx_dt_irq_match to zynq_dt_irq_match

Corrent name.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Remove secondary_startup from common.h
Michal Simek [Mon, 22 Oct 2012 11:54:14 +0000 (13:54 +0200)]
arm: zynq: Remove secondary_startup from common.h

Probably no reason to have it here.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Remove xttcpss_sys_timer declaration
Michal Simek [Mon, 22 Oct 2012 11:46:35 +0000 (13:46 +0200)]
arm: zynq: Remove xttcpss_sys_timer declaration

It is already done in common.h.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: Setup system reset
Michal Simek [Mon, 22 Oct 2012 11:44:50 +0000 (13:44 +0200)]
arm: zynq: Setup system reset

Setup xilinx_system_reset as restart function.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agoarm: zynq: io_desc is used only in common.c file
Michal Simek [Mon, 22 Oct 2012 11:44:13 +0000 (13:44 +0200)]
arm: zynq: io_desc is used only in common.c file

That's why it should be static.

Signed-off-by: Michal Simek <monstr@monstr.eu>