DMA engine driver for Marvell XOR engine
svn path=/dists/trunk/linux-2.6/; revision=11862
This commit is contained in:
parent
abf70d883f
commit
f60681d948
|
@ -78,6 +78,7 @@ linux-2.6 (2.6.26-1~experimental.1) UNRELEASED; urgency=low
|
|||
- support for 5281 D0 stepping
|
||||
- cache align destination pointer when copying memory for some processors
|
||||
- cache align memset and memzero
|
||||
- DMA engine driver for Marvell XOR engine
|
||||
* [arm/orion5x] Enable NETCONSOLE.
|
||||
* [arm/orion5x] Disable more SCSI drivers.
|
||||
* [arm/ixp4xx] Disable most ATA and more SCSI and network drivers.
|
||||
|
|
|
@ -492,3 +492,8 @@ CONFIG_AX25=m
|
|||
CONFIG_NETROM=m
|
||||
CONFIG_ROSE=m
|
||||
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_MV_XOR=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
# CONFIG_NET_DMA is not set
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,178 @@
|
|||
[ARM] Orion: Instantiate mv_xor driver for 5182
|
||||
author Saeed Bishara <saeed@marvell.com>
|
||||
Tue, 17 Jun 2008 10:25:12 +0000 (23:25 -1100)
|
||||
|
||||
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
|
||||
index 4f13fd0..8a00d62 100644
|
||||
--- a/arch/arm/mach-orion5x/common.c
|
||||
+++ b/arch/arm/mach-orion5x/common.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <asm/arch/orion5x.h>
|
||||
#include <asm/plat-orion/ehci-orion.h>
|
||||
#include <asm/plat-orion/orion_nand.h>
|
||||
+#include <asm/plat-orion/mv_xor.h>
|
||||
#include <asm/plat-orion/time.h>
|
||||
#include "common.h"
|
||||
|
||||
@@ -310,6 +311,103 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
+ * XOR engine
|
||||
+ ****************************************************************************/
|
||||
+static struct resource orion5x_xor_shared_resources[] = {
|
||||
+ {
|
||||
+ .name = "xor low",
|
||||
+ .start = ORION5X_XOR_PHYS_BASE,
|
||||
+ .end = ORION5X_XOR_PHYS_BASE + 0xff,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ }, {
|
||||
+ .name = "xor high",
|
||||
+ .start = ORION5X_XOR_PHYS_BASE + 0x200,
|
||||
+ .end = ORION5X_XOR_PHYS_BASE + 0x2ff,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct platform_device orion5x_xor_shared = {
|
||||
+ .name = MV_XOR_SHARED_NAME,
|
||||
+ .id = 0,
|
||||
+ .num_resources = ARRAY_SIZE(orion5x_xor_shared_resources),
|
||||
+ .resource = orion5x_xor_shared_resources,
|
||||
+};
|
||||
+
|
||||
+static u64 orion5x_xor_dmamask = DMA_32BIT_MASK;
|
||||
+
|
||||
+static struct resource orion5x_xor0_resources[] = {
|
||||
+ [0] = {
|
||||
+ .start = IRQ_ORION5X_XOR0,
|
||||
+ .end = IRQ_ORION5X_XOR0,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct mv_xor_platform_data orion5x_xor0_data = {
|
||||
+ .shared = &orion5x_xor_shared,
|
||||
+ .hw_id = 0,
|
||||
+ .pool_size = PAGE_SIZE,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device orion5x_xor0_channel = {
|
||||
+ .name = MV_XOR_NAME,
|
||||
+ .id = 0,
|
||||
+ .num_resources = ARRAY_SIZE(orion5x_xor0_resources),
|
||||
+ .resource = orion5x_xor0_resources,
|
||||
+ .dev = {
|
||||
+ .dma_mask = &orion5x_xor_dmamask,
|
||||
+ .coherent_dma_mask = DMA_64BIT_MASK,
|
||||
+ .platform_data = (void *)&orion5x_xor0_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct resource orion5x_xor1_resources[] = {
|
||||
+ [0] = {
|
||||
+ .start = IRQ_ORION5X_XOR1,
|
||||
+ .end = IRQ_ORION5X_XOR1,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct mv_xor_platform_data orion5x_xor1_data = {
|
||||
+ .shared = &orion5x_xor_shared,
|
||||
+ .hw_id = 1,
|
||||
+ .pool_size = PAGE_SIZE,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device orion5x_xor1_channel = {
|
||||
+ .name = MV_XOR_NAME,
|
||||
+ .id = 1,
|
||||
+ .num_resources = ARRAY_SIZE(orion5x_xor1_resources),
|
||||
+ .resource = orion5x_xor1_resources,
|
||||
+ .dev = {
|
||||
+ .dma_mask = &orion5x_xor_dmamask,
|
||||
+ .coherent_dma_mask = DMA_64BIT_MASK,
|
||||
+ .platform_data = (void *)&orion5x_xor1_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+void __init orion5x_xor_init(void)
|
||||
+{
|
||||
+ platform_device_register(&orion5x_xor_shared);
|
||||
+
|
||||
+ /*
|
||||
+ * two engines can't do memset simultaneously, this limitation
|
||||
+ * satisfied by removing memset support from one of the engines.
|
||||
+ */
|
||||
+ dma_cap_set(DMA_MEMCPY, orion5x_xor0_data.cap_mask);
|
||||
+ dma_cap_set(DMA_XOR, orion5x_xor0_data.cap_mask);
|
||||
+ platform_device_register(&orion5x_xor0_channel);
|
||||
+
|
||||
+ dma_cap_set(DMA_MEMCPY, orion5x_xor1_data.cap_mask);
|
||||
+ dma_cap_set(DMA_MEMSET, orion5x_xor1_data.cap_mask);
|
||||
+ dma_cap_set(DMA_XOR, orion5x_xor1_data.cap_mask);
|
||||
+ platform_device_register(&orion5x_xor1_channel);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*****************************************************************************
|
||||
* Time handling
|
||||
****************************************************************************/
|
||||
|
||||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
|
||||
index bd0f05d..10bf422 100644
|
||||
--- a/arch/arm/mach-orion5x/common.h
|
||||
+++ b/arch/arm/mach-orion5x/common.h
|
||||
@@ -23,6 +23,8 @@ void orion5x_setup_dev1_win(u32 base, u32 size);
|
||||
void orion5x_setup_dev2_win(u32 base, u32 size);
|
||||
void orion5x_setup_pcie_wa_win(u32 base, u32 size);
|
||||
|
||||
+void orion5x_xor_init(void);
|
||||
+
|
||||
/*
|
||||
* Shared code used internally by other Orion core functions.
|
||||
* (/mach-orion/pci.c)
|
||||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
|
||||
index 81abc10..8db21f8 100644
|
||||
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
|
||||
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
|
||||
@@ -299,6 +299,7 @@ static void __init rd88f5182_init(void)
|
||||
i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
|
||||
orion5x_eth_init(&rd88f5182_eth_data);
|
||||
orion5x_sata_init(&rd88f5182_sata_data);
|
||||
+ orion5x_xor_init();
|
||||
}
|
||||
|
||||
MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
|
||||
--- a/include/asm-arm/arch-orion5x/orion5x.h 2008-07-14 10:46:57.000000000 +0000
|
||||
+++ b/include/asm-arm/arch-orion5x/orion5x.h 2008-07-14 10:46:59.000000000 +0000
|
||||
@@ -104,6 +104,10 @@
|
||||
#define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000)
|
||||
#define ORION5X_USB0_REG(x) (ORION5X_USB0_VIRT_BASE | (x))
|
||||
|
||||
+#define ORION5X_XOR_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x60900)
|
||||
+#define ORION5X_XOR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x60900)
|
||||
+#define ORION5X_XOR_REG(x) (ORION5X_XOR_VIRT_BASE | (x))
|
||||
+
|
||||
#define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000)
|
||||
#define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000)
|
||||
#define ORION5X_ETH_REG(x) (ORION5X_ETH_VIRT_BASE | (x))
|
||||
--- a/arch/arm/mach-orion5x/ts209-setup.c 2008-07-14 10:43:22.000000000 +0000
|
||||
+++ b/arch/arm/mach-orion5x/ts209-setup.c 2008-07-14 10:44:01.000000000 +0000
|
||||
@@ -315,6 +315,7 @@
|
||||
orion5x_eth_init(&qnap_tsx09_eth_data);
|
||||
|
||||
orion5x_sata_init(&qnap_ts209_sata_data);
|
||||
+ orion5x_xor_init();
|
||||
}
|
||||
|
||||
MACHINE_START(TS209, "QNAP TS-109/TS-209")
|
||||
--- a/arch/arm/mach-orion5x/mv2120-setup.c 2008-07-14 10:43:27.000000000 +0000
|
||||
+++ b/arch/arm/mach-orion5x/mv2120-setup.c 2008-07-14 10:43:50.000000000 +0000
|
||||
@@ -228,6 +228,7 @@
|
||||
|
||||
orion5x_eth_init(&mv2120_eth_data);
|
||||
orion5x_sata_init(&mv2120_sata_data);
|
||||
+ orion5x_xor_init();
|
||||
}
|
||||
|
||||
/* Warning: HP uses a wrong mach-type (=526) in their bootloader */
|
|
@ -43,6 +43,8 @@
|
|||
+ features/arm/led-pca9532-n2100.patch
|
||||
+ features/arm/ts409-mv2120-support.patch
|
||||
+ features/arm/ixp4xx-4874-fsg-board-support.patch
|
||||
+ features/arm/mv_dma_engine.patch
|
||||
+ features/arm/orion_use_mv_xor.patch
|
||||
+ features/mips/ip32_sound.patch
|
||||
+ features/all/at76.patch
|
||||
+ bugfix/fix-hifn_795X-divdi3.patch
|
||||
|
|
Loading…
Reference in New Issue