Commit Graph

27 Commits (fae30dd6698ecaa93cb50213266c224bc550c32c)

Author SHA1 Message Date
Stephen Warren 6bb27d7349 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>
2012-12-24 09:36:38 -07:00
Thomas Petazzoni 07f645df9f arm: orion5x: convert 'LaCie Ethernet Disk mini v2' to Device Tree
This commit converts the 'LaCie Ethernet Disk mini v2' board to the
Device Tree. All devices that have existing Device Tree bindings are
converted over to the Device Tree, the other devices remain
instantiated in the old way, until the respective drivers get the
needed Device Tree bindings.

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>
2012-11-21 21:00:51 +00:00
Thomas Petazzoni 1bffb4a872 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>
2012-11-21 21:00:45 +00:00
Andrew Lunn 6ed272f245 Orion5x: Fix warning: struct pci_dev declared inside paramter list
Orion5x board files which don't have PCI give warnings:

arch/arm/mach-orion5x/common.h:54:38: warning: 'struct pci_dev' declared
inside parameter list.

Add a forward declaration in the header file, which is the pattern
used for other PCI structures.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2012-05-14 18:12:36 +02:00
Rob Herring 8a52dd4f94 ARM: orion5x: clean-up mach/io.h
Move orion5x specific mach/io.h parts into common.h.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
2012-03-06 21:34:40 -06:00
Linus Torvalds 5ede3ceb7b New feature development
This adds support for new features, and contains stuff from most
 platforms. A number of these patches could have fit into other
 branches, too, but were small enough not to cause too much
 confusion here.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATwtYgGCrR//JCVInAQKzRRAAybELlfOIT1fyVlzkzIgw0/OKxS75Vqda
 v5mNYUfQ001WxGjwbFGgFphrQgyhulmLj6gN5l1rwaBjEZlwLe5uk3sReeqeDMLk
 bERLbpg22ymka4JVhvugq5qh9UP2ptlvZV/cAZC0u2JBq+CaarFIJsrzbOyXAngf
 4kUkaMhKi8DDZTqrwwACaLxR7qtf3ddiSxNLZ93X4fDh4a3qs/EJErVg/xCFlfM3
 YTzTjKuqLV2cGT34E9YTJieN9o94G+PiqvbDsP3kOwG2dSElpRWsZwX/0hDoyCxN
 cWbqPfrrdzt/kDcNnNd8MZ16AJlPc4ElVVEWPF71tKP3HfKqtZ0vMlpzsldioFz6
 8AKvaXJXRkRddY4KqNcXeEQHcDxO0uniG/3lhZY8NlzO/1PnPQ4hGl8fhw+e/2z0
 nAQFUsCVIXacsxamPk/fFBUhYzyK7JrnH4pB3b7SPcCj7X9MVyWK+pbT5LA+VGOL
 Ys8tv3NtTWEObyW1s3NT+BEy9FkkRu4EG3TxPwHUXk4BTwa6nDmJBPjk7Hv7q4cn
 T58lPet8Aylhht2aZx+0dxK3MHtMOmgsJ5jQF0OAi48Kmx8kXPZ1AeXObROncbZL
 aI7qfuGTzps7MlUBYlmrMdceTfYLeOqIEoVyFX8N4xLE33alk8DMKc37QoTJVuxQ
 KrY8sCVMkK0=
 =N2B4
 -----END PGP SIGNATURE-----

Merge tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

New feature development

This adds support for new features, and contains stuff from most
platforms. A number of these patches could have fit into other
branches, too, but were small enough not to cause too much
confusion here.

* tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  mfd/db8500-prcmu: remove support for early silicon revisions
  ARM: ux500: fix the smp_twd clock calculation
  ARM: ux500: remove support for early silicon revisions
  ARM: ux500: update register files
  ARM: ux500: register DB5500 PMU dynamically
  ARM: ux500: update ASIC detection for U5500
  ARM: ux500: support DB8520
  ARM: picoxcell: implement watchdog restart
  ARM: OMAP3+: hwmod data: Add the default clockactivity for I2C
  ARM: OMAP3: hwmod data: disable multiblock reads on MMC1/2 on OMAP34xx/35xx <= ES2.1
  ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP4
  ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP3
  ARM: OMAP: hwmod data: Add support for AM35xx UART4/ttyO3
  ARM: Orion: Remove address map info from all platform data structures
  ARM: Orion: Get address map from plat-orion instead of via platform_data
  ARM: Orion: mbus_dram_info consolidation
  ARM: Orion: Consolidate the address map setup
  ARM: Kirkwood: Add configuration for MPP12 as GPIO
  ARM: Kirkwood: Recognize A1 revision of 6282 chip
  ARM: ux500: update the MOP500 GPIO assignments
  ...
2012-01-09 14:38:51 -08:00
Russell King 764cbcc2e3 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>
2012-01-05 12:57:16 +00:00
Andrew Lunn 45173d5ed4 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>
2011-12-13 18:46:55 -05:00
Andrew Lunn b6d1c33a31 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>
2011-12-13 18:46:20 -05:00
Russell King 0744a3ee37 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>
2011-10-17 09:13:41 +01:00
Ralf Baechle d5341942d7 PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.
Aside of the usual motivation for constification,  this function has a
history of being abused a hook for interrupt and other fixups so I turned
this function const ages ago in the MIPS code but it should be done
treewide.

Due to function pointer passing in varous places a few other functions
had to be constified as well.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
To: Anton Vorontsov <avorontsov@mvista.com>
To: Chris Metcalf <cmetcalf@tilera.com>
To: Colin Cross <ccross@android.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
To: Eric Miao <eric.y.miao@gmail.com>
To: Erik Gilling <konkers@android.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
To: "H. Peter Anvin" <hpa@zytor.com>
To: Imre Kaloz <kaloz@openwrt.org>
To: Ingo Molnar <mingo@redhat.com>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Krzysztof Halasa <khc@pm.waw.pl>
To: Lennert Buytenhek <kernel@wantstofly.org>
To: Matt Turner <mattst88@gmail.com>
To: Nicolas Pitre <nico@fluxnic.net>
To: Olof Johansson <olof@lixom.net>
Acked-by: Paul Mundt <lethal@linux-sh.org>
To: Richard Henderson <rth@twiddle.net>
To: Russell King <linux@arm.linux.org.uk>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-pci@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: x86@kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-22 08:26:06 -07:00
Lennert Buytenhek 4ee1f6b574 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>
2011-03-03 16:27:01 -05:00
Nicolas Pitre 3fade49b73 [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>
2009-06-15 00:37:08 -04:00
Sebastian Andrzej Siewior 3a8f744169 [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>
2009-06-08 13:05:01 -04:00
Lennert Buytenhek 9569dae75f [ARM] Orion: share GPIO handling code
Split off Orion GPIO handling code into plat-orion/, and add
support for multiple sets of (32) GPIO pins.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-12-20 12:21:02 -05:00
Lennert Buytenhek dcf1cece14 [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>
2008-10-19 14:29:05 -04:00
Russell King 6defd90433 Merge branch 'for-rmk' of git://git.marvell.com/orion
Merge branch 'orion-devel' into devel
2008-10-09 21:33:07 +01:00
Lennert Buytenhek d323ade13b [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>
2008-09-25 16:26:44 -04:00
Lennert Buytenhek ebe35aff88 [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>
2008-09-25 16:26:44 -04:00
Per Andersson 7a6bb26226 [ARM] Orion: Fix boot crash on Kurobox Pro
The Kurobox Pro crashes when any of the PCI controller registers
are accessed.  This patch adds a function to the Orion PCI handling
code that board support code can call to disable enumerating the
PCI bus entirely, and makes the Kurobox Pro PCI-related init code
call this function.

Signed-off-by: Per Andersson <avtobiff@gmail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Saeed Bishara 1d5a1a6e92 [ARM] Orion: Instantiate mv_xor driver for 5182
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-09 15:17:28 +02:00
Lennert Buytenhek da01bba3cb [ARM] Orion: make PCI handling code deal with Cardbus slots
The Cardbus connector does not have an IDSEL signal, and Cardbus
cards are always the intended target of configuration transactions
on their local PCI bus.  This means that if the Orion's PCI bus
signals are hooked up to a Cardbus slot, the same set of PCI
functions will will appear 31 times, for each of the PCI device
IDs 1-31 (ID 0 is the host bridge).

This patch adds a function to the Orion PCI handling code that board
support code can call to enable Cardbus mode.  When Cardbus mode is
enabled, configuration transactions on the PCI local bus are only
allowed to PCI IDs 0 (host bridge) and 1 (cardbus device).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-30 16:04:44 -04:00
Lennert Buytenhek 19cfd5c09f [ARM] Orion: rework MPP handling
Instead of having board code poke directly into the MPP configuration
registers, and separately calling orion5x_gpio_set_valid_pins() to
indicate which MPP pins can be used as GPIO pins, introduce a helper
function for configuring the roles of each of the MPP pins, and have
that helper function handle gpio validity internally.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
2008-06-22 22:44:47 +02:00
Lennert Buytenhek 044f6c7c44 [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>
2008-06-22 22:44:45 +02:00
Lennert Buytenhek d236f5a5f7 [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>
2008-05-09 10:39:34 -04:00
Lennert Buytenhek 92b913b08b [ARM] Orion: fix ->map_irq() PCIe bus number check
The current orion5x board ->map_irq() routines check whether a
given bus number lives on the PCIe controller by comparing it with
the PCIe controller's primary bus number.  This doesn't work in
case there are multiple buses in the PCIe domain, i.e. if there
exists a PCIe bridge on the primary PCIe bus.

This patch adds a helper function (orion5x_pci_map_irq()) that
returns the IRQ number for the given PCI device if that device has
a hard-wired IRQ, or -1 otherwise, and makes each board's
->map_irq() function use this helper function.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-04-28 15:58:23 -04:00
Lennert Buytenhek 9dd0b194bf 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>
2008-03-27 14:51:41 -04:00