History log of /arch/arm/mach-orion5x/common.c
Revision Date Author Comments
1c2f87c22566cd057bc8cde10c37ae9da1a1bb76 13-Apr-2014 Laura Abbott <lauraa@codeaurora.org> ARM: 8025/1: Get rid of meminfo

memblock is now fully integrated into the kernel and is the prefered
method for tracking memory. Rather than reinvent the wheel with
meminfo, migrate to using memblock directly instead of meminfo as
an intermediate.

Acked-by: Jason Cooper <jason@lakedaemon.net>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
5e51fe5d079ec0fd2fb1d8708ecc1ef82599c6d8 04-Nov-2013 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> ARM: orion5x: drop unused include from common.c

asm/times.h only defines CLOCK_TICK_RATE, cycles_t and get_cycles. All
three are not used in this file.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
4236666688e9dbc38d0c7a98b7cfa16c8961f752 23-Oct-2013 Andrew Lunn <andrew@lunn.ch> ARM: Orion5x: Fix warnings when using C=1.

Add missing include files, missing static keyword, and use NULL instead
of 0, in order to fix warnings when compiling with C=1.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
4ca2c04085a1caa903e92a5fc0da25362150aac2 26-Jul-2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ARM: orion5x: Move to ID based window creation

With the introduction of the ID based MBus API, it's better
to switch to use it instead of the current name based scheme.

This will allow to deprecate the name based API, once every
user is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
7b6d864b48d95e6ea1df7df64475b9cb9616dcf9 09-Jul-2013 Robin Holt <holt@sgi.com> reboot: arm: change reboot_mode to use enum reboot_mode

Preparing to move the parsing of reboot= to generic kernel code forces
the change in reboot_mode handling to use the enum.

[akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c]
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
49ed97f751bfaea133ae5c44f1247db09b9ca144 13-May-2013 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Remove redundant init_dma_coherent_pool_size()

The patch:

387870f mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

makes these calls on Kirkwood and Orion5x redundant. The drivers are
not making atomic requests for coherent memory and hence the default
pool size is now sufficient.

Jason Cooper added mach-mvebu/ hunk, and corrected minor typos in commit
message.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
6d31727a0b6fe7206725c93508e6d2065f16ff03 13-May-2013 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Remove redundant init_dma_coherent_pool_size()

The patch:

387870f mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

makes these calls on Kirkwood and Orion5x redundant. The drivers are
not making atomic requests for coherent memory and hence the default
pool size is now sufficient.

Jason Cooper added mach-mvebu/ hunk, and corrected minor typos in commit
message.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
7b2fea1ca77fdfd5154ce0f39fca3f6f335505e8 25-Apr-2013 Arnd Bergmann <arnd@arndb.de> ARM: orion5x: include linux/cpu.h

The linux/cpu.h header is no longer implictly included in this
file, so we need to an #include statement to avoid this build
warning:

arch/arm/mach-orion5x/common.c:339:3: error: implicit declaration of function 'cpu_idle_poll_ctrl' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
5d1190ea69cd158835518d4132b3d98774073092 21-Mar-2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> arm: mach-orion5x: convert to use mvebu-mbus driver

This commit migrates the mach-orion5x platforms to use the mvebu-mbus
driver and therefore removes the Orion5x-specific addr-map code.

The dove_init_early() function now initializes the mvebu-mbus driver
by calling mvebu_mbus_init().

We also convert a number of orion5x_setup_xyz_win() calls to the
appropriate mvebu_mbus_add_window() calls, as each board was doing its
own setup for the NOR window or other devices. Ultimately, those
devices will be probed from the DT.

The common address decoding windows are now registered in the
orion5x_setup_wins() function. It is worth noting that the four PCIe
address decoding windows will ultimately no longer have to be
registered here: it will be done automatically by the PCIe driver once
Dove has been migrated to use the upcoming mvebu PCIe driver.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
f7b861b7a6d9d1838cbbb5f4053e61578b86d134 21-Mar-2013 Thomas Gleixner <tglx@linutronix.de> arm: Use generic idle loop

Use the generic idle loop and replace enable/disable_hlt with the
respective core functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Tested-by: Kevin Hilman <khilman@linaro.org> # OMAP
Link: http://lkml.kernel.org/r/20130321215233.826238797@linutronix.de
6bb27d7349db51b50c40534710fe164ca0d58902 08-Nov-2012 Stephen Warren <swarren@nvidia.com> ARM: delete struct sys_timer

Now that the only field in struct sys_timer is .init, delete the struct,
and replace the machine descriptor .timer field with the initialization
function itself.

This will enable moving timer drivers into drivers/clocksource without
having to place a public prototype of each struct sys_timer object into
include/linux; the intent is to create a single of_clocksource_init()
function that determines which timer driver to initialize by scanning
the device dtree, much like the proposed irqchip_init() at:
http://www.spinics.net/lists/arm-kernel/msg203686.html

Includes mach-omap2 fixes from Igor Grinberg.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
1bffb4a8729838f5ee27364803406416459c3252 16-Nov-2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> arm: orion5x: basic Device Tree support

This commit adds basic DT support for the Orion5x SoC family. It adds
an orion5x.dtsi description of the Orion5x SoC as well as the needed
DT_MACHINE structure to support boards converted to DT in the future.

So far, the Device Tree contains the interrupt controller, the GPIO
bank, the UART controllers, the SPI controller, the watchdog, the SATA
controller, the I2C controller and the cryptographic engine.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested by: Maxime Hadjinlian <mhadjinlian@lacie.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
84d5dfbf09be6be71d6dda63d99a8303e85663c7 24-Sep-2012 Andrew Lunn <andrew@lunn.ch> ARM: Orion5x: Fix too small coherent pool.

Some Orion5x devices allocate their coherent buffers from atomic
context. Increase size of atomic coherent pool to make sure such the
allocations won't fail during boot.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Olof Johansson <olof@lixom.net>
e96a0309f8545d539c1bf4acd5b58727a8f39818 11-Sep-2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> arm: plat-orion: use void __iomem pointers for time functions

The functions for time management now take void __iomem pointers, so
we remove the temporary "unsigned long" casts from the mach-*/common.c
files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
d19beac1d9358bb4a2a303f4327bf2d40ba88464 11-Sep-2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> arm: plat-orion: use void __iomem pointers for UART registration functions

The registration functions for UARTs now take void __iomem pointers,
so we remove the temporary "unsigned long" casts from the
mach-*/common.c files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
3904a39321422d424f790d18a4746b99e1aed0e9 11-Sep-2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> arm: mach-orion5x: use IOMEM() for base address definitions

We now define all virtual base address constants using IOMEM() so that
those are naturally typed as void __iomem pointers, and we do the
necessary adjustements in the mach-orion5x code.

Note that we introduce a few temporary additional "unsigned long"
casts when calling into plat-orion functions. Those are removed by
followup patches converting plat-orion functions to void __iomem
pointers as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
c02cecb92ed49f36196ee9e29d29c4cfcbad05ae 24-Aug-2012 Arnd Bergmann <arnd@arndb.de> ARM: orion: move platform_data definitions

Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the orion include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
58569aee5a1a5dcc25c34a0a2ed9a377874e6b05 26-Jul-2012 Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> ARM: Orion: Set eth packet size csum offload limit

The mv643xx ethernet controller limits the packet size for the TX
checksum offloading. This patch sets this limits for Kirkwood and
Dove which have smaller limits that the default.

As a side note, this patch is an updated version of a patch sent some years
ago: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017320.html
which seems to have been lost.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Cc: <stable@vger.kernel.org>
0a4b8c654615be5dd12d67e951446095bef8b565 06-Jul-2012 Rob Herring <rob.herring@calxeda.com> ARM: orion5x: use fixed PCI i/o mapping

Move orion5x PCI to fixed i/o mapping and remove io.h.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
d2621b82c2e8d2e37100797448143bf6ae88d89f 10-May-2012 Andrew Lunn <andrew@lunn.ch> Orion5x: Fix Section mismatch warnings

Wrongly placed __initdata, and missing __init caused these warnings.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
74c335761acdfd94736d28ba0b941a2efb9c81f0 24-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: UART: Get the clock rate via clk_get_rate().

Let the machine pass to the platform which clock is used by the uart.
Enable the clock and use clk_get_rate() to determine its rate.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
4f04be62af95119d258b8035f498100e43c8c527 04-Mar-2012 Andrew Lunn <andrew@lunn.ch> ARM: Orion: WDT: Add clk/clkdev support

Remove tclk from platform data. This makes the platform data
structure empty, so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
452503ebc7cc4cce5b9e52cf2f03255365a53234 24-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Eth: Add clk/clkdev support.

The t_clk is moved from the shared part of the ethernet driver into
the per port section. Each port can have its own gated clock, which it
needs to enable/disable, as oppossed to there being one clock shared
by all ports. In practice, only kirkwood supports this at the moment.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
4574b886698dfad6209102fed6136622b5fe1c21 06-Apr-2012 Andrew Lunn <andrew@lunn.ch> ARM: Orion: SPI: Add clk/clkdev support.

Remove now redundant tclk from SPI platform data. This makes the platform
data empty, so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2f129bf4aab684bef1e82e747b709a5025ecb698 15-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Add clocks using the generic clk infrastructure.

Add tclk as a fixed rate clock for all platforms. In addition, on
kirkwood, add a gated clock for most of the clocks which can be gated.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
[mturquette@linaro.org: removed redundant CLKDEV_LOOKUP from Kconfig]
[mturquette@linaro.org: removed redundant clk.h from mach-dove/common.c]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
9f97da78bf018206fb623cd351d454af2f105fe0 28-Mar-2012 David Howells <dhowells@redhat.com> Disintegrate asm/system.h for ARM

Disintegrate asm/system.h for ARM.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Russell King <linux@arm.linux.org.uk>
cc: linux-arm-kernel@lists.infradead.org
72053353583230952c4b187e110e9da00dfc3afb 08-Feb-2012 Andrew Lunn <andrew@lunn.ch> ARM: orion: Fix USB phy for orion5x.

The patch "ARM: orion: Consolidate USB platform setup code.", commit
4fcd3f374a928081d391cd9a570afe3b2c692fdc broke USB on TS-7800 and
other orion5x boards, because the wrong type of PHY was being passed
to the EHCI driver in the platform data. Orion5x needs EHCI_PHY_ORION
and all the others want EHCI_PHY_NA.

Allow the mach- code to tell the generic plat-orion code which USB PHY
enum to place into the platform data.

Version 2: Rebase to v3.3-rc2.

Reported-by: Ambroz Bizjak <ambrop7@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Ambroz Bizjak <ambrop7@gmail.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
764cbcc2e3fa444c205b20b3d7908b06b60716ab 05-Nov-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: restart: orion5x: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

In addition, convert calls to arm_machine_restart() to orion5x_restart()
to ensure that they continue to work as intended.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
db33f4de9952af112b0d4f2436ce931ae632aba0 07-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Remove address map info from all platform data structures

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
45173d5ed4c9a397db31623bf6469efbd3a239cd 07-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: mbus_dram_info consolidation

Move the *_mbus_dram_info structure into the orion platform and call it
orion_mbus_dram_info everywhere.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
b6d1c33a31deb1784c1d34070db6e84fd6f9d870 07-Dec-2011 Andrew Lunn <andrew@lunn.ch> ARM: Orion: Consolidate the address map setup

Compile tested on Dove, orion5x, mv78xx0. Boot tested on Kirkwood.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
0744a3ee37784dfda0025963716a36c3f1e3adcc 20-Dec-2010 Russell King <rmk+kernel@arm.linux.org.uk> ARM: platform fixups: remove mdesc argument to fixup function

Get rid of the mdesc pointer in the fixup function call. No one uses
the mdesc pointer, it shouldn't be modified anyway, and we can't wrap
it, so let's remove it.

Platform files found by:

$ regexp=$(git grep -h '\.fixup.*=' arch/arm |
sed 's!.*= *\([^,]*\),* *!\1!' | sort -u |
tr '\n' '|' | sed 's,|$,,;s,|,\\|,g')
$ git grep $regexp arch/arm

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
44350061905b2a502579d3827eacaf8efa393aad 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate setup of the crypto engine.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
9e613f8a7904f2b7516eed08f413463c579325bd 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate SATA platform setup.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
4fcd3f374a928081d391cd9a570afe3b2c692fdc 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate USB platform setup code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
ee9627234dae8d1b8059b2ac39c961ee0932b803 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate the XOR platform setup code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
5e00d3783dd362a34c9816bb582103c9833e4643 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate the platform data setup for the watchdog.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
980f9f601ad456dc5a699bf526b6bd894957bad3 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate SPI initialization.

This change removes the interrupt resource. The driver does not use
it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
aac7ffa3ed121846b61347028828617c5dd1ce46 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate I2C initialization.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
7e3819d820c9aa3536d15fe7310c054bef1f5f04 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate ethernet platform data

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
28a2b45054f2e3f3671e36a6e9efc82756afa31a 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Consolidate the creation of the uart platform data.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
5c60255149eece2a36ec9f5c99817b85f96fe8ec 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion: Rename some constants to macros to make code more identical

Changing eg 0xffffffff to DMA_BIT_MASK(32) etc allows easier
side by side comparision of identical code which can be consolidated.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
4ee1f6b574765a6c97f945e6b0277e5ccac38cb5 15-Oct-2010 Lennert Buytenhek <buytenh@wantstofly.org> ARM: Remove dependency of plat-orion time code on mach directory includes.

This patch makes the various mach dirs that use the plat-orion time
code pass in timer and bridge addresses explicitly, instead of having
plat-orion get those values by including a mach dir include file --
the latter mechanism is problematic if you want to support multiple
ARM platforms in the same kernel image.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
ef4a6777cf33c4a7a76e74ecd593f74a1df30b96 29-Jan-2010 H Hartley Sweeten <hartleys@visionengravers.com> mach-orion5x/common.c: remove unnecessary (void *) casts

The (void *) cast is not needed when setting dev.platform_data to the
address of the data. Remove the casts.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
3fade49b734cca2d8c4f1bcd7c3023302b557f3b 11-Jun-2009 Nicolas Pitre <nico@cam.org> [ARM] orion5x: register the crypto device on SOCs that support it

Not all Orion variants do implement the crypto unit.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
3a8f744169ebcb0064c46a755d9e3e27233f048a 07-May-2009 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> [ARM] orion5x: add sram support for crypto

The security accelerator which can act as a puppet player for the crypto
engine requires its commands in the sram. This patch adds support for the
phys mapping and creates a platform device for the actual driver.

[ nico: renamed device name from "mv,orion5x-crypto" to "mv_crypto"
so to match the module name and be more generic for Kirkwood use ]

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
3b937a7dbddbedd9457b33fcc8fa369c0c229c6e 01-Jun-2009 Nicolas Pitre <nico@cam.org> [ARM] Orion/Kirkwood: rename orion5x_wdt to orion_wdt

The Orion watchdog driver is also used on Kirkwood.

Convention is to use orion5x for stuff specific to 88F5xxx Orion chips
and simply "orion" for shared stuff across SoCs including Kirkwood.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
a49a018a6ea6d73742a81d673fe5ec4a7d2137b3 22-May-2009 Nicolas Pitre <nico@cam.org> [ARM] add coherent DMA mask for mv643xx_eth

Since commit eb0519b5a1cf, mv643xx_eth is non functional on ARM because
the platform device declaration does not include any coherent DMA mask
and coherent memory allocations fail.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
85bc26211c6a2c6e82c2403697f8ce44e9587215 19-May-2009 Martin Michlmayr <tbm@cyrius.com> [ARM] Orion: Remove explicit name for platform device resources

Remove explicit names from platform device resources since they will
automatically be named after the platform device they're associated
with.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
284901a90a9e0b812ca3f5f852cbbfb60d10249d 07-Apr-2009 Yang Hongyang <yanghy@cn.fujitsu.com> dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6a35528a8346f6e6fd32ed7e51f04d1fa4ca2c01 07-Apr-2009 Yang Hongyang <yanghy@cn.fujitsu.com> dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9e058d4f57751daa008b764735f97fdfccfeab6c 24-Feb-2009 Thomas Reitmayr <treitmayr@devbase.at> [WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data

The orion5x-wdt driver is now registered as a platform device and
receives the tclk value as platform data. This fixes a compile issue
cause by a previously removed define "ORION5X_TCLK".

Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Kristof Provost <kristof@sigsegv.be>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Martin Michlmayr <tbm@cyrius.com>
Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Cc: Kunihiko IMAI <bak@d2.dion.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
e84665c9cb4db963393fafad6fefe5efdd7e4a09 20-Mar-2009 Lennert Buytenhek <buytenh@wantstofly.org> dsa: add switch chip cascading support

The initial version of the DSA driver only supported a single switch
chip per network interface, while DSA-capable switch chips can be
interconnected to form a tree of switch chips. This patch adds support
for multiple switch chips on a network interface.

An example topology for a 16-port device with an embedded CPU is as
follows:

+-----+ +--------+ +--------+
| |eth0 10| switch |9 10| switch |
| CPU +----------+ +-------+ |
| | | chip 0 | | chip 1 |
+-----+ +---++---+ +---++---+
|| ||
|| ||
||1000baseT ||1000baseT
||ports 1-8 ||ports 9-16

This requires a couple of interdependent changes in the DSA layer:

- The dsa platform driver data needs to be extended: there is still
only one netdevice per DSA driver instance (eth0 in the example
above), but each of the switch chips in the tree needs its own
mii_bus device pointer, MII management bus address, and port name
array. (include/net/dsa.h) The existing in-tree dsa users need
some small changes to deal with this. (arch/arm)

- The DSA and Ethertype DSA tagging modules need to be extended to
use the DSA device ID field on receive and demultiplex the packet
accordingly, and fill in the DSA device ID field on transmit
according to which switch chip the packet is heading to.
(net/dsa/tag_{dsa,edsa}.c)

- The concept of "CPU port", which is the switch chip port that the
CPU is connected to (port 10 on switch chip 0 in the example), needs
to be extended with the concept of "upstream port", which is the
port on the switch chip that will bring us one hop closer to the CPU
(port 10 for both switch chips in the example above).

- The dsa platform data needs to specify which ports on which switch
chips are links to other switch chips, so that we can enable DSA
tagging mode on them. (For inter-switch links, we always use
non-EtherType DSA tagging, since it has lower overhead. The CPU
link uses dsa or edsa tagging depending on what the 'root' switch
chip supports.) This is done by specifying "dsa" for the given
port in the port array.

- The dsa platform data needs to be extended with information on via
which port to reach any given switch chip from any given switch chip.
This info is specified via the per-switch chip data struct ->rtable[]
array, which gives the nexthop ports for each of the other switches
in the tree.

For the example topology above, the dsa platform data would look
something like this:

static struct dsa_chip_data sw[2] = {
{
.mii_bus = &foo,
.sw_addr = 1,
.port_names[0] = "p1",
.port_names[1] = "p2",
.port_names[2] = "p3",
.port_names[3] = "p4",
.port_names[4] = "p5",
.port_names[5] = "p6",
.port_names[6] = "p7",
.port_names[7] = "p8",
.port_names[9] = "dsa",
.port_names[10] = "cpu",
.rtable = (s8 []){ -1, 9, },
}, {
.mii_bus = &foo,
.sw_addr = 2,
.port_names[0] = "p9",
.port_names[1] = "p10",
.port_names[2] = "p11",
.port_names[3] = "p12",
.port_names[4] = "p13",
.port_names[5] = "p14",
.port_names[6] = "p15",
.port_names[7] = "p16",
.port_names[10] = "dsa",
.rtable = (s8 []){ 10, -1, },
},
},

static struct dsa_platform_data pd = {
.netdev = &foo,
.nr_switches = 2,
.sw = sw,
};

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f45964ed6971db2e7ae6cb9b164def1d23b46612 02-Mar-2009 Saeed Bishara <saeed@marvell.com> [ARM] orion5x: pass dram mbus data to xor driver

This data should be passed to the xor driver in order to initialize
the address decoding windows of the xor unit. without this patch, the
self tests of the xor will fail unless the address decoding windows were
initialized by the boot loader.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
fb6f552930e52699c8ac452c5a79ec3e97e6fc73 17-Sep-2008 Ronen Shitrit <rshitrit@marvell.com> [ARM] Orion: add the option to support different ehci phy initialization

The Orion ehci driver serves the Orion, kirkwood and DD Soc families.
Since each of those integrate a different USB phy we should have the
ability to use few initialization sequences or to leave the boot loader
phy settings as is.

Signed-off-by: Ronen Shitrit <rshitrit@marvell.com>
c0e1936338a11ea252d11370ff62e40db334f646 19-Oct-2008 Nicolas Pitre <nico@cam.org> [ARM] Orion: activate workaround for 88f6183 SPI clock erratum

Commit 2ede90ca78500ca0ffeee19d7812d345f8ad152d adds 6183 support,
but the SPI support in there doesn't work since it depends on a
6183 SPI unit erratum fix that only just went upstream, via commit
2bec19feabd53cba75e9dab0e79afbe868a37113.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
dcf1cece143d95b48676cf607a21ee0805daa55a 25-Sep-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: instantiate the dsa switch driver

This adds DSA switch instantiation hooks to the orion5x and the
kirkwood ARM SoC platform code, and instantiates the DSA switch
driver on the 88F5181L FXO RD, the 88F5181L GE RD, the 6183 AP GE
RD, the Linksys WRT350n v2, and the 88F6281 RD boards.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Peter van Valderen <linux@ddcrew.com>
Tested-by: Dirk Teurlings <dirk@upexia.nl>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
d323ade13b959dfcf14bf18902b600c5cc711dea 29-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: add 88F6183 (Orion-1-90) support

The Orion-1-90 (88F6183) is another member of the Orion SoC family,
which has a 16 bit DDR2 interface, one x1 PCIe port (configurable as
Root Complex or Endpoint), one 10/100/1000 ethernet interface, one
USB 2.0 port with PHY, one SPDIF/I2S interface, one SDIO interface,
one TWSI interface, two UARTs, one SPI interface, a NAND controller,
a crypto engine, and a 4-channel DMA engine.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
ebe35aff883496c07248df82c8576c3b6e84bbbe 29-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: prepare for runtime-determined timer tick rate

Currently, orion5x uses a hardcoded timer tick rate of 166 MHz, but
the actual timer tick rate varies between different members of the SoC
family (and can vary based on strap pin settings).

This patch prepares for runtime determination of the timer tick rate.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
eeff6d8600afa69fa06ef69a6ffe427b1189cef4 26-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: wire up ethernet error interrupt

Wire up the ethernet port's error interrupt so that the
mv643xx_eth driver can sleep for SMI event completion instead of
having to busy-wait for it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
1d5a1a6e92abb1ecb011a673e637146c4e232f1e 17-Jun-2008 Saeed Bishara <saeed@marvell.com> [ARM] Orion: Instantiate mv_xor driver for 5182

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
ce72e36ed1a57ba086270039c7d6fac9bf1c5fbc 09-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: support D0 5281 silicon

On D0 5281 SoCs, we need to disable the wait-for-interrupt
instruction due to an erratum.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Martin Michlmayr <tbm@cyrius.com>
6f088f1d215be5250582b974f83f0e3aa6ad3a28 09-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Move include/asm-arm/plat-orion to arch/arm/plat-orion/include/plat

This patch performs the equivalent include directory shuffle for
plat-orion, and fixes up all users.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
a09e64fbc0094e3073dbb09c3b4bfe4ab669244b 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
d2b2a6bbc020e5a9a244f318d28515081e922882 31-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: add 88F5181L (Orion-VoIP) support

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
044f6c7c449ae8ba0353b032706b098a7ad5e304 22-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: move EHCI/I2C/UART peripheral init into board code

This patch moves initialisation of EHCI/I2C/UART platform devices
from the common orion5x_init() into the board support code.

The rationale behind this is that only the board support code knows
whether certain peripherals have been brought out on the board, and
not initialising peripherals that haven't been brought out is
desirable for example:
- to reduce user confusion (e.g. seeing both 'eth0' and 'eth1'
appear while there is only one ethernet port on the board); and
- to allow for future power savings (peripherals that have not
been brought out can be clock gated off entirely).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
e7068ad337a991fba627148a4a57939fdc1e6a2d 10-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: fix various whitespace and coding style issues

More cosmetic cleanup:
- Replace 8-space indents by proper tab indents.
- In structure initialisers, use a trailing comma for every member.
- Collapse "},\n{" in structure initialiers to "}, {".

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
b8c15a6084e84497e31e75c9cededb73af768632 26-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: pass proper t_clk into mv643xx_eth

Pass the Orion TCLK tick rate into the ethernet driver.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
d236f5a5f77183c270223e8816804e7763463282 26-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: use mv643xx_eth driver mbus window handling

Make the Orion 5x platform code use the mbus window handling code
that's in the mv643xx_eth driver, instead of programming the GigE
block's mbus window registers by hand.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
fa3959f457109cc7d082b86ea6daae927982815b 24-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> mv643xx_eth: get rid of static variables, allow multiple instances

Move mv643xx_eth's static state (ethernet register block base address
and MII management interface spinlock) into a struct hanging off the
shared platform device. This is necessary to support chips that
contain multiple mv643xx_eth silicon blocks.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
b46926bb2d9977799c88aef17a4386ee02c326d8 25-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: catch a couple more alternative spellings of PCIe

Unify a couple more spellings of "PCIe" ("PCI-E", "PCIE".)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
994cab846422bc9c636cc780a48b7370e837a3bb 25-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: fix orion-ehci platform resource end addresses

End addresses in 'struct resource' are inclusive -- fix the common
orion5x code to pass in the proper end addresses when instantiating
the two on-chip EHCI controllers.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
9dd0b194bf6804b1998f0fe261b2606ec7b58d72 27-Mar-2008 Lennert Buytenhek <buytenh@wantstofly.org> Orion: orion -> orion5x rename

Do a global s/orion/orion5x/ of the Orion 5x-specific bits (i.e.
not the plat-orion bits.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Acked-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>