MIPS: BCM63XX: add external irq support for non 6348 CPUs. (diff to previous)

On Wed, 2011-11-16 at 11:33 +0000, Ralf Baechle wrote:

> I've queued this one for 3.3 as is but could you take care of Jonas'
> complaints?  You can either send me a replacement for this patch or
> an incremental patch, whatever is easier for you.

updated patch attached, please also update upcoming patch 11/11

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
MIPS: BCM63XX: add support for bcm6368 CPU (diff).

On Wed, 2011-11-16 at 11:33 +0000, Ralf Baechle wrote:

> Queued for 3.3.  Thanks,

updated patch v3

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
MIPS: BCM63XX: fix platform_devices id

There is only one watchdog and VoIP DSP platform devices per board, use
-1 as the platform_device id accordingly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: be consistent in clock bits enable naming

Remove the _CLK suffix from the BCM6368 clock bits definitions to be
consistent with what is already present.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add IRQ_SPI and CPU specific SPI IRQ values

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: define BCM6358 SPI base address

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add BCM6368 SPI clock mask

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: define SPI register sizes.

There are two distinct sizes for the SPI register depending on the SoC
generation (6338 & 6348 vs 6358 & 6368).

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: remove SPI2 register

This register was introduced with the support of the BCM6368 CPU in the idea
that its internal layout was different from the other CPUs SPI controller.
The controller is actually the same as the one present on BCM6358 so we can
remove this register and use the usual SPI register instead.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: define internal registers offsets of the SPI controller

BCM6338, BCM6348, BCM6358 and BCM6368 basically use the same SPI controller
though the internal registers are shuffled, which still allows a common
driver to drive that IP block.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add stub to register the SPI platform driver

This patch adds the necessary stub to register the SPI platform driver.
Since the registers are shuffled between the 4 BCM63xx CPUs supported by
this SPI driver we also need to generate the internal register layout and
export this layout for the driver to use it properly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: make board setup code register the spi platform device

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: fix BCM6368 IPSec clock bit

The IPsec clock bit is 18 and not 17.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add support for "ipsec" clock

This module is only available on BCM6368 so far and does not require
resetting the block.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add TRNG peripheral definitions

Signed-off-by: Florian Fainelli <florian@openwrt.org>
MIPS: BCM63XX: add RNG driver platform_device stub

Signed-off-by: Florian Fainelli <florian@openwrt.org>
hw_random: add Broadcom BCM63xx RNG driver

Signed-off-by: Florian Fainelli <florian@openwrt.org>
NET: bcm63xx_enet: move phy_(dis)connect into probe/remove

Only connect/disconnect the phy during probe and remove, not during open
and close. The phy seldom changes during the runtime, and disconnecting
the phy during close will prevent the phy driver from keeping any
configuration over a down/up cycle.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Revert "MIPS: BCM63XX: Call board_register_device from device_initcall()"

This commit causes a race between PCI scan and SSB fallback SPROM handler
registration, causing the wifi to not work on slower systems. The only
subsystem touched from board_register_device is platform device
registration, which should be safe as an arch init call.

This reverts commit d64ed7ada2f689d2c62af1892ca55e47d3653e36.
MTD: bcm63xxpart: remove unused variable

namelen is never used, so drop it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>