[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.
This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.
Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22 20:45:10 +00:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-mv78xx0/irq.c
|
|
|
|
*
|
|
|
|
* MV78xx0 IRQ handling.
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
2011-07-26 09:53:52 +00:00
|
|
|
#include <linux/gpio.h>
|
[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.
This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.
Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22 20:45:10 +00:00
|
|
|
#include <linux/kernel.h>
|
2008-10-19 23:51:04 +00:00
|
|
|
#include <linux/irq.h>
|
2012-09-11 12:27:20 +00:00
|
|
|
#include <linux/io.h>
|
2015-12-02 21:27:04 +00:00
|
|
|
#include <asm/exception.h>
|
2012-08-29 15:16:55 +00:00
|
|
|
#include <plat/orion-gpio.h>
|
2008-08-09 11:44:58 +00:00
|
|
|
#include <plat/irq.h>
|
2015-12-02 21:27:06 +00:00
|
|
|
#include "bridge-regs.h"
|
[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.
This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.
Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22 20:45:10 +00:00
|
|
|
#include "common.h"
|
|
|
|
|
2012-06-27 11:40:04 +00:00
|
|
|
static int __initdata gpio0_irqs[4] = {
|
|
|
|
IRQ_MV78XX0_GPIO_0_7,
|
|
|
|
IRQ_MV78XX0_GPIO_8_15,
|
|
|
|
IRQ_MV78XX0_GPIO_16_23,
|
|
|
|
IRQ_MV78XX0_GPIO_24_31,
|
|
|
|
};
|
2008-10-19 23:51:04 +00:00
|
|
|
|
2015-12-02 21:27:04 +00:00
|
|
|
static void __iomem *mv78xx0_irq_base = IRQ_VIRT_BASE;
|
|
|
|
|
|
|
|
static asmlinkage void
|
|
|
|
__exception_irq_entry mv78xx0_legacy_handle_irq(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
u32 stat;
|
|
|
|
|
|
|
|
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_LOW_OFF);
|
|
|
|
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_LOW_OFF);
|
|
|
|
if (stat) {
|
|
|
|
unsigned int hwirq = __fls(stat);
|
|
|
|
handle_IRQ(hwirq, regs);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_HIGH_OFF);
|
|
|
|
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_HIGH_OFF);
|
|
|
|
if (stat) {
|
|
|
|
unsigned int hwirq = 32 + __fls(stat);
|
|
|
|
handle_IRQ(hwirq, regs);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_ERR_OFF);
|
|
|
|
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_ERR_OFF);
|
|
|
|
if (stat) {
|
|
|
|
unsigned int hwirq = 64 + __fls(stat);
|
|
|
|
handle_IRQ(hwirq, regs);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.
This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.
Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22 20:45:10 +00:00
|
|
|
void __init mv78xx0_init_irq(void)
|
|
|
|
{
|
2012-09-11 12:27:20 +00:00
|
|
|
orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF);
|
|
|
|
orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF);
|
|
|
|
orion_irq_init(64, IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF);
|
2008-10-19 23:51:04 +00:00
|
|
|
|
2015-12-02 21:27:04 +00:00
|
|
|
set_handle_irq(mv78xx0_legacy_handle_irq);
|
|
|
|
|
2008-10-19 23:51:04 +00:00
|
|
|
/*
|
2010-12-14 11:54:03 +00:00
|
|
|
* Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask
|
|
|
|
* registers for core #1 are at an offset of 0x18 from those of
|
|
|
|
* core #0.)
|
2008-10-19 23:51:04 +00:00
|
|
|
*/
|
2012-09-11 12:27:20 +00:00
|
|
|
orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE,
|
2010-12-14 11:54:03 +00:00
|
|
|
mv78xx0_core_index() ? 0x18 : 0,
|
2012-06-27 11:40:04 +00:00
|
|
|
IRQ_MV78XX0_GPIO_START, gpio0_irqs);
|
[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring
(depending on the model) one or two Feroceon CPU cores with 512K of L2
cache and VFP coprocessors running at (depending on the model) between
800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe
interfaces that can each run either in x4 or quad x1 mode, three USB
2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two
TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI
interface, four UARTs, and depending on the model, two or four gigabit
ethernet interfaces.
This patch adds basic support for the platform, and allows booting
on the MV78x00 development board, with functional UARTs, SATA, PCIe,
GigE and USB ports.
Signed-off-by: Stanislav Samsonov <samsonov@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-22 20:45:10 +00:00
|
|
|
}
|