History log of /arch/arm/mach-orion5x/dns323-setup.c
Revision Date Author Comments
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
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>
5166793feb688a884832ca656f161f683be8f04c 01-Aug-2011 Paul Gortmaker <paul.gortmaker@windriver.com> arm: fix compile failure in orion5x/dns323-setup.c

Upstream commit d5341942d784134f2997b3ff82cd63cf71d1f932 "PCI: Make the
struct pci_dev * argument of pci_fixup_irqs const." leaked an extra
"const" into an actual call site (vs a proto/decl) which causes this:

arch/arm/mach-orion5x/dns323-setup.c: In function 'dns323_pci_map_irq':
arch/arm/mach-orion5x/dns323-setup.c:80: error: expected expression before 'const'
arch/arm/mach-orion5x/dns323-setup.c:80: error: too few arguments to function 'orion5x_pci_map_irq'
make[3]: *** [arch/arm/mach-orion5x/dns323-setup.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
65aa1b1ea499a75c9920c1ebadacec0a0b8a79a6 06-Jul-2011 Nicolas Pitre <nicolas.pitre@linaro.org> ARM: mach-orion5x: convert boot_params to atag_offset

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2f8163baada3dbd0ce891c35bc59ae46e773487a 26-Jul-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: gpio: convert includes of mach/gpio.h and asm/gpio.h to linux/gpio.h

Convert arch/arm includes of mach/gpio.h and asm/gpio.h to linux/gpio.h
before we start consolidating the individual platform implementations
of the gpio header files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
d5341942d784134f2997b3ff82cd63cf71d1f932 10-Jun-2011 Ralf Baechle <ralf@linux-mips.org> 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>
554cdaefd1cf7bb54b209c4e68c7cec87ce442a9 15-May-2011 Andrew Lunn <andrew@lunn.ch> ARM: orion5x: Refactor mpp code to use common orion platform mpp.

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>
6451d7783ba5ff24eb1a544eaa6665b890f30466 15-Oct-2010 Nicolas Pitre <nicolas.pitre@linaro.org> arm: remove machine_desc.io_pg_offst and .phys_io

Since we're now using addruart to establish the debug mapping, we can
remove the io_pg_offst and phys_io members of struct machine_desc.

The various declarations were removed using the following script:

grep -rl MACHINE_START arch/arm | xargs \
sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }'

[ Initial patch was from Jeremy Kerr, example script from Russell King ]

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Eric Miao <eric.miao at canonical.com>
6e2daa49420777190c133d7097dd8d5c05b475ac 21-Jun-2010 Benjamin Herrenschmidt <benh@kernel.crashing.org> [ARM] orion5x: Base support for DNS-323 rev C1

This patch adds the base support for this new HW revision to the existing
dns323-setup.c file. The SoC seems to be the same as rev B1, the GPIOs
are all wired differently though and the fan control isn't i2c based
anymore.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
f8e00530a04f384f96445cf03f203862caeb507f 26-Mar-2010 Martin Michlmayr <tbm@cyrius.com> [ARM] orion5x: Set links to solid on D-Link DNS-323

Among other changes, commit b2a731aa ("D-link DNS-323 revision A1 power
LED") changed the default behaviour of the power LED from solid to
blinking. This was done to match the original DNS-323 firmware which
blinks during the boot process and sets the LED to solid when booting
has completed. However, the downside of this behaviour is that it
requires userland code to change the LED, even for those who don't
care about the behaviour of the original firmware. Therefore, change
it to solid again and let those who care about the original behaviour
change the behaviour from userland.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2146325df2c2640059a9e064890c30c6e259b458 22-May-2010 Benjamin Herrenschmidt <benh@kernel.crashing.org> leds: leds-gpio: Change blink_set callback to be able to turn off blinking

The leds-gpio blink_set() callback follows the same prototype as the
main leds subsystem blink_set() one.

The problem is that to stop blink, normally, a leds driver does it
in the brightness_set() callback when asked to set a new fixed value.

However, with leds-gpio, the platform has no hook to do so, as this
later callback results in a standard GPIO manipulation.

This changes the leds-gpio specific callback to take a new argument
that indicates whether the LED should be blinking or not and in what
state it should be set if not. We also update the dns323 platform
which seems to be the only user of this so far.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
5ccc8dab611fcd1d0961b73e22d6c2d108967862 03-Apr-2010 Arnaud Patard <arnaud.patard@rtp-net.org> [ARM] dns323-setup.c: fix WARN() when booting

Since commit b2a731aa5cbca7e0252da75e16de7ae5feb1313a, dns323_init() is
setting the power led gpio direction with gpio_direction_output() but
doesn't request the gpio before (which is not permitted by the gpio
layer afaik). This behaviour is triggering a WARN() at boot time.

Tested-by: Christian Samsel <csamsel@gmxpro.de>
Cc: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
[ Part 2: "Attached Text" ]
b2a731aa5cbca7e0252da75e16de7ae5feb1313a 10-Feb-2010 Laurie Bradshaw <bradshaw.laurie@googlemail.com> [ARM] orion5x: D-link DNS-323 revision A1 power LED

This patch fixes the power LED on DNS-323 revision A1, and adds timer
support for (hopefully) both A1 and B1 revisions.

Power LED on revision A1 is active low and also requires GPIO 4 to be
low to work.

Tested on my DNS-323 revision A1.

I have set the default trigger to timer as that replicates the
behaviour of the original firmware, userspace can change the trigger
at the end of the boot process providing a useful indication that
booting has completed.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
cf11052a95275c942c1f45ea5fde43ce45bbba6d 24-Jan-2010 Erik Benada <erikbenada@yahoo.ca> [ARM] orion5x: D-link DNS-323 rev. B1 power-off

This patch fixes power LED blinking and power-off on DNS-323 rev. B1.

GPIO pin 3 has to be set to 1 to stop power LED blinking and to allow the LED to be controlled via leds-gpio. This pin has to be also set to 1 for power-off to work.
To power-off the rev. B1 machine, pin 8 has to be set to 1 and then set to 0 to do actual power-off.

Tested on my DNS-323 rev. B1

Signed-off-by: Erik Benada <erikbenada@yahoo.ca>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
ace14b82633960a2b6bf6a0b2640c63872a65562 10-Mar-2009 Martin Michlmayr <tbm@cyrius.com> [ARM] Orion: Fix some typos in the DNS-323 support code

Fix some typos in the DNS-323 support code.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
f93e4159b14c5edbaae9916d42ad685aa2f927d1 22-Oct-2008 Matt Palmer <mpalmer@hezmatt.org> [ARM] DNS323: Initialise 88F5182 correctly

The 88F5182 found in the DNS-323 rev B1 (and some other devices, such
as the CH3SNAS) require different initialisation of the SATA
controller and MPP registers.

Tested on a DNS-323 rev B1.

Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
a93f44c1751ef1afddd4b76058fb3a2f55fe774c 18-Oct-2008 Matt Palmer <mpalmer@hezmatt.org> [ARM] DNS323: Read MAC address from flash

Based on similar code from the tsx09 series of machines, just rips the MAC
address out of flash and stuffs it into the NIC. Tested on a DNS323 rev B1.
It's possible (though unlikely) that an A1 will have the MAC in a different
location in flash.

Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
ac840605f3b1d9b99e1e6629a54994f8e003ff91 26-Aug-2008 Lennert Buytenhek <buytenh@wantstofly.org> mv643xx_eth: remove force_phy_addr field

Currently, there are two different fields in the
mv643xx_eth_platform_data struct that together describe the PHY
address -- one field (phy_addr) has the address of the PHY, but if
that address is zero, a second field (force_phy_addr) needs to be
set to distinguish the actual address zero from a zero due to not
having filled in the PHY address explicitly (which should mean
'use the default PHY address').

If we are a bit smarter about the encoding of the phy_addr field,
we can avoid the need for a second field -- this patch does that.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
c0fe819baf86979a5801387ccd7d8df0dc2f34e2 11-Aug-2008 Martin Michlmayr <tbm@cyrius.com> [ARM] Orion: activate lm75 driver on DNS-323

The lm75 driver was recently converted to the new-style binding,
so now it can be loaded from the DNS-323 support code.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Tested-by: Tobias Poschwatta <tp@fonz.de>
Acked-by: Ben Dooks <ben-linux@fluff.org>
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>
79e90dd5aa95adfdc3117db8a559da3d0195ba58 28-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: nuke orion5x_{read,write}

Nuke the Orion-specific orion5x_{read,write} wrappers.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2850a037734eac0af2e6abc4e8be986c3edfd834 28-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: avoid setting ->force_phy_addr

The mv643xx_eth platform data field ->force_phy_addr only needs
to be set if the passed-in ->phy_addr field is zero (to distinguish
the case of not having specified a phy address
(force_phy_addr = 0) from the case where a phy address of zero needs
to be used (force_phy_addr = 1.))

Also, the ->force_phy_addr field will hopefully disappear in a
future mv643xx_eth reorganisation.

Therefore, this patch deletes the ->force_phy_addr field initialiser
from all Orion board code.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
b206ed0462b7112d07bb9f245bf49f5e95ff174a 06-Jun-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: remove error printks in ->map_irq() implementations

If all PCI devices are working as expected, the error printks in the
various implementations of ->map_irq() doesn't really provide any
useful info. And if something is not working as expected, turning
on pci=debug gives you more useful information than the printk calls
in ->map_irq(), since the former also tells you which devices _did_
get IRQs successfully assigned. Therefore, delete these printks
entirely.

Spotted by Russell King.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
19cfd5c09f780ac870fd9d89201c4ebc0b22be81 10-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [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>
386a048a1ea42ff9ac87ffa344c4c19a5cc59678 10-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] Orion: move setting up PCIe WA window into PCIe setup path

It makes no sense to do PCIe WA window setup in the individual
board support files while the decision whether or not to use the
PCIe WA access method is made in a different place, in the PCIe
support code.

This patch moves the configuration of a PCIe WA window from the
individual Orion board support files to the central Orion PCIe
support code.

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>
bbdf1c1e58f215940243bedc235e48ed7e8d6f2d 15-May-2008 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 5037/1: Orion: fix DNS323/Kurobox Pro PCI initialisation

Whereas most Orion 5x machine support code would initialise the PCI
subsystem with nr_controllers in their struct hw_pci set to 2, the
DNS323 and Kurobox Pro machine support code had nr_controllers set
to 1.

This was presumably done because on those two machines, the PCI(-X)
controller (nr == 1) isn't used, requiring initialisation of only
the PCIe controller (nr == 0.) However, not initialising the PCI(-X)
controller on boards that don't use it leads to a situation where
both the PCIe and the PCI(-X) controller think that their root bus is
zero, and it messes up IRQ assignment.

This patch changes the DNS323 and Kurobox Pro support code to always
use nr_controllers == 2.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
3760f736716f74bdc62a4ba5406934338da93eb2 29-Apr-2008 Jean Delvare <khali@linux-fr.org> i2c: Convert most new-style drivers to use module aliasing

Based on earlier work by Jon Smirl and Jochen Friedrich.

Update most new-style i2c drivers to use standard module aliasing
instead of the old driver_name/type driver matching scheme. I've
left the video drivers apart (except for SoC camera drivers) as
they're a bit more diffcult to deal with, they'll have their own
patch later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jon Smirl <jonsmirl@gmail.com>
Cc: Jochen Friedrich <jochen@scram.de>
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>
92b913b08b18faa487b0c744282fafd944446ade 25-Apr-2008 Lennert Buytenhek <buytenh@wantstofly.org> [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>
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>