While we generally attempt to get rid of board specific files and replace
them with device tree based descriptions, a lot of platforms have not
come that far:
In shmobile, we add two new board files because their recently started
effort to add DT support has not proceeded enough to use it for all of
the important hardware.
In Kirkwood, we are adding support for new boards with a combination of
DT and board file contents in multiple cases.
pxa/mmp and imx are extending support for existing board files but not
adding new ones.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPueuIAAoJEIwa5zzehBx3VvAP/32RkCrrLCQoibsczjwDPQir
ryyT/lom005tlkXFOz9SFirlyNAn0kpDuj0xZ/HL2KgZ0FPlG0OUSRBJJvLZF2vT
qlhf3PqnM1d2Ui6+/QdU/EJyzNkMAtajgTSvp4zDZayoNomO/VTZhW0feRYChUIl
bJx7hnFA9VXnkhORzh9+HhKwVcdhU2R1/LMDUlYxKNnFdF0/kFgw4Gkj4MnmFlyy
NpeLP4H95SeFhKPvmXB/2lZroaRn6wCxhPhUCHShxsH3YFy0J7zaEnmHMFSOX24n
++6fyb0mqiJtZPwJVbF+snb/5hP4epbmkrU5+mqtDdK8HHowAsV0ScKki0wGGmka
Im5ryCMB+NZOD57XGajkpeQGZT+m0S8NilsZ5dy75o7el7WxnMLuUMyjlIbtnfet
3KRF22XnsyPuvldoej/RM1Eiz86qUFl3LPO63cYT+/c9aSw0+luMp+JZp+iOcAr3
xqyiciwOTu6CIP+DnYV72CuFa2IvLA06Eb3pgtpRUwATzS9weQ33X4Q80RaUVKxX
VfXxCcDFl7dfGwqO6HujbxI6oHmEmvBEF9eGmFW2ocVrKnWUmjlC6y9tQxfReQDV
SZkXKEkWPo/MLFl/AM+hTjGyu88ofOG4Vos0t3YmVyTuXekpPFb2DbPCvwnFdv8N
kX/bfsxWPBDl3EdCQU8y
=wkmj
-----END PGP SIGNATURE-----
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc board specific changes from Olof Johansson:
"While we generally attempt to get rid of board specific files and
replace them with device tree based descriptions, a lot of platforms
have not come that far:
In shmobile, we add two new board files because their recently started
effort to add DT support has not proceeded enough to use it for all of
the important hardware.
In Kirkwood, we are adding support for new boards with a combination
of DT and board file contents in multiple cases.
pxa/mmp and imx are extending support for existing board files but not
adding new ones."
Fix up trivial conflicts in arch/arm/mach-{mmp/ttc_dkb.c,shmobile/{Kconfig,Makefile}}
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (94 commits)
ARM: shmobile: fix smp build
ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using devicetree
kirkwood: Add iconnect support
orion/kirkwood: create a generic function for gpio led blinking
kirkwood/orion: fix orion_gpio_set_blink
ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt
kirkwood: Allow nand to be configured via. devicetree
mtd: Add orion_nand devicetree bindings
ARM: kirkwood: Basic support for DNS-320 and DNS-325
ARM: mach-shmobile: Use DT_MACHINE for armadillo 800 eva
ARM: mach-shmobile: Use DT_MACHINE for KZM9G
ARM: pxa: hx4700: Add Synaptics NavPoint touchpad
ARM: pxa: Use REGULATOR_SUPPLY macro
ARM: mach-shmobile: kzm9g: enable SMP boot
ARM: mach-shmobile: kzm9g: defconfig update
ARM: mach-shmobile: kzm9g: add PCF8757 gpio-key
ARM: mach-shmobile: kzm9g: add SDHI support
ARM: mach-shmobile: kzm9g: add MMCIF support
ARM: mach-shmobile: kzm9g: correct screen direction
ARM: mach-shmobile: sh73a0.h: add GPIO_NR
...
dns323 and (at least) iconnect platforms are using hw led blinking, so,
instead of having 2 identicals .gpio_blink_set gpio-led hooks, move
dns323 code into gpio.c
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Tested-By: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Most PCI implementations use the standard PCI swizzle function, which
handles the well defined behaviour of PCI-to-PCI bridges which can be
found on cards (eg, four port ethernet cards.)
Rather than having almost every platform specify the standard swizzle
function, make this the default when no swizzle function is supplied.
Therefore, a swizzle function only needs to be provided when there is
something exceptional which needs to be handled.
This gets rid of the swizzle initializer from 47 files, and leaves us
with just two platforms specifying a swizzle function: ARM Integrator
and Chalice CATS.
Acked-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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
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>
Upstream commit d5341942d7 "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>
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>
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>
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>
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>
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>
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>
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>
Since commit b2a731aa5c, 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" ]
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>