[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 16:45:10 -04: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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/pci.h>
|
2008-10-19 19:51:04 -04:00
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <asm/gpio.h>
|
2009-04-22 15:08:17 -04:00
|
|
|
#include <mach/bridge-regs.h>
|
2008-08-09 07:44:58 -04:00
|
|
|
#include <plat/irq.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 16:45:10 -04:00
|
|
|
#include "common.h"
|
|
|
|
|
2008-10-19 19:51:04 -04:00
|
|
|
static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|
|
|
{
|
|
|
|
BUG_ON(irq < IRQ_MV78XX0_GPIO_0_7 || irq > IRQ_MV78XX0_GPIO_24_31);
|
|
|
|
|
|
|
|
orion_gpio_irq_handler((irq - IRQ_MV78XX0_GPIO_0_7) << 3);
|
|
|
|
}
|
|
|
|
|
[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 16:45:10 -04:00
|
|
|
void __init mv78xx0_init_irq(void)
|
|
|
|
{
|
2008-10-19 19:51:04 -04:00
|
|
|
int i;
|
|
|
|
|
[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 16:45:10 -04:00
|
|
|
orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
|
|
|
|
orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
|
2008-08-26 10:04:05 -04:00
|
|
|
orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF));
|
2008-10-19 19:51:04 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Mask and clear GPIO IRQ interrupts.
|
|
|
|
*/
|
|
|
|
writel(0, GPIO_LEVEL_MASK(0));
|
|
|
|
writel(0, GPIO_EDGE_MASK(0));
|
|
|
|
writel(0, GPIO_EDGE_CAUSE(0));
|
|
|
|
|
|
|
|
for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) {
|
2009-02-17 14:45:50 -05:00
|
|
|
set_irq_chip(i, &orion_gpio_irq_chip);
|
2008-10-19 19:51:04 -04:00
|
|
|
set_irq_handler(i, handle_level_irq);
|
|
|
|
irq_desc[i].status |= IRQ_LEVEL;
|
|
|
|
set_irq_flags(i, IRQF_VALID);
|
|
|
|
}
|
|
|
|
set_irq_chained_handler(IRQ_MV78XX0_GPIO_0_7, gpio_irq_handler);
|
|
|
|
set_irq_chained_handler(IRQ_MV78XX0_GPIO_8_15, gpio_irq_handler);
|
|
|
|
set_irq_chained_handler(IRQ_MV78XX0_GPIO_16_23, gpio_irq_handler);
|
|
|
|
set_irq_chained_handler(IRQ_MV78XX0_GPIO_24_31, gpio_irq_handler);
|
[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 16:45:10 -04:00
|
|
|
}
|