Commit Graph

94 Commits (673492a800b14a9aac5d9d1af120334b9578a23c)

Author SHA1 Message Date
Alexander Clouter 673492a800 [ARM] orion5x: ts78xx amend RTC registering to not depend on ifdef's
amend RTC registering to not depend on ifdef's

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Nicolas Pitre <nico@cam.org>
2009-02-25 00:00:14 -05:00
Alexander Clouter f5273fa310 [ARM] orion5x: ts78xx make more bulletproof the RTC load/unload code
Added checks to the platform_device_(register|add) calls so that if
a device failed to load it would then not later be unloaded; also
added the hooks so that it would not try to unload when the RTC
driver support is compiled out.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Nicolas Pitre <nico@cam.org>
2009-02-24 23:59:33 -05:00
Nicolas Pitre 22fc1db125 Merge branch 'for-np' of git://git.wormnet.eu/alex/ts78xx into orion/master 2009-02-19 22:21:57 -05:00
Nicolas Pitre fd4b9b3650 [ARM] 5401/1: Orion: fix edge triggered GPIO interrupt support
The GPIO interrupts can be configured as either level triggered or edge
triggered, with a default of level triggered.  When an edge triggered
interrupt is requested, the gpio_irq_set_type method is called which
currently switches the given IRQ descriptor between two struct irq_chip
instances: orion_gpio_irq_level_chip and orion_gpio_irq_edge_chip. This
happens via __setup_irq() which also calls irq_chip_set_defaults() to
assign default methods to uninitialized ones.  The problem is that
irq_chip_set_defaults() is called before the irq_chip reference is
switched, leaving the new irq_chip (orion_gpio_irq_edge_chip in this
case) with uninitialized methods such as chip->startup() causing a kernel
oops.

Many solutions are possible, such as making irq_chip_set_defaults() global
and calling it from gpio_irq_set_type(), or calling __irq_set_trigger()
before irq_chip_set_defaults() in __setup_irq().  But those require
modifications to the generic IRQ code which might have adverse effect on
other architectures, and that would still be a fragile arrangement.
Manually copying the missing methods from within gpio_irq_set_type()
would be really ugly and it would break again the day new methods with
automatic defaults are added.

A better solution is to have a single irq_chip instance which can deal
with both edge and level triggered interrupts.  It is also a good idea
to switch the IRQ handler instead, as the edge IRQ handler allows for
one edge IRQ event to be queued as the IRQ is actually masked only when
that second IRQ is received, at which point the hardware can queue an
additional IRQ event, making edge triggered interrupts a bit more
reliable.

Tested-by: Martin Michlmayr <tbm@cyrius.com>

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-17 22:37:09 +00:00
Alexander Clouter 39008f959f [ARM] orion5x: TS-78xx support for 'hotplug' of FPGA devices
the FPGA on the TS-7800 provides access to a number of devices
and so we have to be careful when reprogramming it.  As we
are effectively turning a bus off/on we have to inform the
kernel that it should stop using anything provided by the
FPGA (currently only the RTC however the NAND, LCD, etc is
to come) before it's reprogrammed.

Once reprogramed, we can tell the kernel to (re)enable things
by checking the FPGA ID against a lookup table for what a
particular FPGA bitstream can provide.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
2009-02-06 22:16:55 +00:00
Alexander Clouter f54128609c [ARM] orion5x: TS-78xx comment shifting
moved the MPP comments to the mpp area of the platform code

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
2009-02-06 21:59:15 +00:00
Alexander Clouter c3dfdb0823 [ARM] orion5x: remove TS-78xx NOR support as it does not exist
The TS-7800's M25P40 is not available to the kernel, it's used
to load the initial bitstream onto the FPGA and so these hooks
point to nothing and need to be removed.

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
2009-02-06 21:57:13 +00:00
Nicolas Pitre ff89c462df [ARM] 5360/1: Orion: fix compilation error
Commit ba84be2338 broke the build.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-08 16:29:40 +00:00
Lennert Buytenhek 07332318f3 [ARM] Orion: share GPIO IRQ handling code
Split off Orion GPIO IRQ handling code into plat-orion/.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-12-20 12:24:05 -05: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
Russell King 72aaf09fda Merge git://git.marvell.com/orion into devel 2008-12-13 09:12:51 +00:00
Matt Palmer f93e4159b1 [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>
2008-12-11 16:38:56 -05:00
Matt Palmer a93f44c175 [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>
2008-12-11 16:36:59 -05:00
Ronen Shitrit fb6f552930 [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>
2008-12-04 01:28:14 -05:00
Russell King 0560cf5aa5 [ARM] Add a common typesafe __io implementation
As Al did for Versatile in 2ad4f86b60,
add a typesafe __io implementation for platforms to use.  Convert
platforms to use this new simple typesafe implementation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-30 11:45:54 +00:00
Russell King dcea83adc6 [ARM] Hide ISA DMA API when ISA_DMA_API is unset
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code.  Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-29 18:42:40 +00:00
Nicolas Pitre b5ee900258 [ARM] remove a common set of __virt_to_bus definitions
Let's provide an overridable default instead of having every machine
class define __virt_to_bus and __bus_to_virt to the same thing.  What
most platforms are using is bus_addr == phys_addr so such is the default.

One exception is ebsa110 which has no DMA what so ever, so the actual
definition is not important except only for proper compilation.  Also
added a comment about the special footbridge bus translation.

Let's also remove comments alluding to set_dma_addr which is not
(and should not) be commonly used.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-28 15:36:49 +00:00
Uwe Kleine-König 9c6568501c [ARM] gpio_free might sleep, arm architecture
According to the documentation gpio_free should only be called from task
context only.  To make this more explicit add a might sleep to all
implementations.

This patch changes the gpio_free implementations for the arm architecture.
 DaVinci is skipped on purpose to simplify the merge process for patches
switching it over to use gpiolib as per request by David Brownell.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-30 14:41:50 +00:00
Nicolas Pitre c0e1936338 [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
2bec19feab.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-10-19 14:29:05 -04: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
Linus Torvalds 94a9f8ad33 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] orion5x_wdt.c: add spinlocking
  [WATCHDOG] Orion: add hardware watchdog support
  [WATCHDOG] omap_wdt.c: cleanup a bit omap_wdt.c
  [WATCHDOG] omap_wdt.c: another ioremap() fix
  [WATCHDOG] omap_wdt.c: sync linux-omap changes
  [WATCHDOG] Add AT91SAM9X watchdog
  [WATCHDOG] Add driver for winbond w83697ug/uf watchdog feature
  [WATCHDOG] add watchdog driver IT8716 IT8726 IT8712J/K
2008-10-12 11:51:32 -07:00
Linus Torvalds 7cc4e87f91 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (236 commits)
  [ARM] 5300/1: fixup spitz reset during boot
  [ARM] 5295/1: make ZONE_DMA optional
  [ARM] 5239/1: Palm Zire 72 power management support
  [ARM] 5298/1: Drop desc_handle_irq()
  [ARM] 5297/1: [KS8695] Fix two compile-time warnings
  [ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.
  [ARM] pxa: allow multi-machine PCMCIA builds
  [ARM] pxa: add preliminary CPUFREQ support for PXA3xx
  [ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h
  [ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c
  [ARM] pxa/zylonite: add support for USB OHCI
  [ARM] ohci-pxa27x: use ioremap() and offset for register access
  [ARM] ohci-pxa27x: introduce pxa27x_clear_otgph()
  [ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource
  [ARM] ohci-pxa27x: move OHCI controller specific registers into the driver
  [ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers
  [ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c
  [ARM] pxa: simplify DMA register definitions
  [ARM] pxa: make additional DCSR bits valid for PXA3xx
  [ARM] pxa: move i2c register and bit definitions into i2c-pxa.c
  ...

Fixed up conflicts in
	arch/arm/mach-versatile/core.c
	sound/soc/pxa/pxa2xx-ac97.c
	sound/soc/pxa/pxa2xx-i2s.c
manually.
2008-10-11 10:09:45 -07:00
Sylver Bruneau 22ac92322c [WATCHDOG] Orion: add hardware watchdog support
This patch allows the use of the hardware watchdog in the
Marvell Orion series of ARM SoCs.

Signed-off-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-10-10 13:14:17 +00: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
Russell King 3f30a09a61 Merge branch 'pxa-all' into devel
Conflicts:

	arch/arm/mach-pxa/Kconfig
	arch/arm/mach-pxa/corgi.c
	arch/arm/mach-pxa/include/mach/hardware.h
	arch/arm/mach-pxa/spitz.c
2008-10-09 21:33:02 +01:00
Russell King 6a4690c22f Merge branch 'ptebits' into devel
Conflicts:

	arch/arm/Kconfig
2008-10-09 21:31:56 +01:00
Dmitry Baryshkov d8aa0251f1 [ARM] 5298/1: Drop desc_handle_irq()
desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-09 15:00:36 +01:00
Alexey Kopytko 92a5de80e5 [ARM] Orion: Add Buffalo Linkstation Mini power-off method
This patch adds specific power-off method for Buffalo Linkstation Mini
board. The board has a hardware switch which should be monitored from
userspace. When the switch is in OFF position the board should be rebooted
and U-Boot will start in an idle mode and wait for the user to move the
power switch back to ON position.

Signed-off-by: Alexey Kopytko <alexey@kopytko.ru>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-09-25 23:54:19 -04:00
Alexey Kopytko 7b0a26f2ca [ARM] Orion: Add Buffalo Linkstation Mini support
This patch adds support for Buffalo Linkstation Mini board.

Signed-off-by: Alexey Kopytko <alexey@kopytko.ru>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-09-25 17:00:01 -04:00
Albert Aribaud 3d014b01e5 [ARM] EDMINIV2: add support for LED and power button
This patch provides standard GPIO LED control
for the ED Mini V2, with software blinking only
(CPLD hardware blinking capability is not used).

This patch also provides status of the power
button as a standard GPIO input event.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-09-25 16:27:22 -04:00
Lennert Buytenhek 0b0740c3c1 [ARM] Orion: add RD88F6183AP-GE support
The RD88F6183AP-GE is an access point reference design for the
88F6183 SoC, with a 88E6161 six-port gigabit ethernet switch with
five PHYs (providing 1 WAN and 4 LAN ports and an interface to the
CPU), and a mini-PCIe slot for a wireless card.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-25 16:27:21 -04: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
Sylver Bruneau 104ea0781a [ARM] Orion: add Buffalo Terastation Pro II/Live support
This patch adds support for the Buffalo Terastation Pro II/Live.

Signed-off-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-25 16:26:44 -04:00
Christopher Moore 0eb66974c0 [ARM] Orion: add LaCie Ethernet Disk mini V2 support
This patch adds support for the LaCie Ethernet Disk mini V2.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Signed-off-by: Christopher Moore <moore@free.fr>
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
Lennert Buytenhek eeff6d8600 [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>
2008-09-25 16:26:43 -04:00
Russell King fced80c735 [ARM] Convert asm/io.h to linux/io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:10:45 +01:00
Lennert Buytenhek ac840605f3 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>
2008-09-05 06:33:59 +02:00
Martin Michlmayr e45772b2c0 [ARM] Orion: register UART1 on QNAP TS-209 and TS-409
Register UART1 on QNAP TS-209 and TS-409 because the PIC controller
is connected to it.  This fixes a regression from 2.6.26.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -04:00
Martin Michlmayr c0fe819baf [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>
2008-08-21 22:15:17 -04:00
Martin Michlmayr 35228e840a [ARM] Orion: fix MAC detection on QNAP TS-209 and TS-409
Flash needs to be set up before we can try to read the MAC address
from there.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-21 22:15:17 -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
Martin Michlmayr 5cebbd09fc [ARM] Orion: Export the reset button of the QNAP TS-409
The reset button on the QNAP TS-409 is available through gpio.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-09 15:17:28 +02:00
Martin Michlmayr 28ca8c802f [ARM] Orion: use better key codes for the TS-209/TS-409 buttons
Use key codes for the buttons on the TS-209/TS-409 that make more
sense than the current values.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Byron Bradley <byron.bbradley@gmail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-09 15:17:27 +02:00
Martin Michlmayr 4a4e30afef [ARM] Orion: export red SATA lights on TS-409, fix SATA presence/activity
Export the four red SATA LEDs on the QNAP TS-409 that are connected
through gpio.  Since the boot loader apparently sets the SATA LEDs 2-4
to red and the SATA LED can only be red or green (but not both),
exporting the red SATA LEDs (which automatically turns them off upon
boot) makes the green SATA presence/activity indication visible.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-09 15:17:27 +02:00
Lennert Buytenhek ce72e36ed1 [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>
2008-08-09 15:17:27 +02:00
Lennert Buytenhek 6f088f1d21 [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>
2008-08-09 13:44:58 +02:00
Russell King a09e64fbc0 [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>
2008-08-07 09:55:48 +01:00
Russell King 4fb8af10d0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes 2008-08-07 09:55:03 +01:00