From af19e148be5e2d7acf2d6322cce74e85be87d603 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 29 Oct 2012 17:45:21 +0100 Subject: arm: plat-orion: convert the registration of the xor0 engine to the single driver Instead of registering one 'mv_xor_shared' device for the XOR engine, and then two 'mv_xor' devices for the XOR channels, pass the channels properties as platform_data for the main 'mv_xor_shared' device. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 94 ++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 52 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index b8a688cad4c2..800af19c51c5 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -636,61 +636,43 @@ static struct resource orion_xor0_shared_resources[] = { }, { .name = "xor 0 high", .flags = IORESOURCE_MEM, + }, { + .name = "irq channel 0", + .flags = IORESOURCE_IRQ, + }, { + .name = "irq channel 1", + .flags = IORESOURCE_IRQ, }, }; -static struct platform_device orion_xor0_shared = { - .name = MV_XOR_SHARED_NAME, - .id = 0, - .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), - .resource = orion_xor0_shared_resources, -}; - -static struct resource orion_xor00_resources[] = { - [0] = { - .flags = IORESOURCE_IRQ, - }, -}; - -static struct mv_xor_platform_data orion_xor00_data = { - .shared = &orion_xor0_shared, - .hw_id = 0, - .pool_size = PAGE_SIZE, -}; +static struct platform_device orion_xor0_shared; -static struct platform_device orion_xor00_channel = { - .name = MV_XOR_NAME, - .id = 0, - .num_resources = ARRAY_SIZE(orion_xor00_resources), - .resource = orion_xor00_resources, - .dev = { - .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), - .platform_data = &orion_xor00_data, +static struct mv_xor_platform_data orion_xor0_channels_pdata[2] = { + { + .shared = &orion_xor0_shared, + .hw_id = 0, + .pool_size = PAGE_SIZE, }, -}; - -static struct resource orion_xor01_resources[] = { - [0] = { - .flags = IORESOURCE_IRQ, + { + .shared = &orion_xor0_shared, + .hw_id = 1, + .pool_size = PAGE_SIZE, }, }; -static struct mv_xor_platform_data orion_xor01_data = { - .shared = &orion_xor0_shared, - .hw_id = 1, - .pool_size = PAGE_SIZE, +static struct mv_xor_shared_platform_data orion_xor0_pdata = { + .channels = orion_xor0_channels_pdata, }; -static struct platform_device orion_xor01_channel = { - .name = MV_XOR_NAME, - .id = 1, - .num_resources = ARRAY_SIZE(orion_xor01_resources), - .resource = orion_xor01_resources, - .dev = { - .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), - .platform_data = &orion_xor01_data, +static struct platform_device orion_xor0_shared = { + .name = MV_XOR_SHARED_NAME, + .id = 0, + .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), + .resource = orion_xor0_shared_resources, + .dev = { + .dma_mask = &orion_xor_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(64), + .platform_data = &orion_xor0_pdata, }, }; @@ -704,15 +686,23 @@ void __init orion_xor0_init(unsigned long mapbase_low, orion_xor0_shared_resources[1].start = mapbase_high; orion_xor0_shared_resources[1].end = mapbase_high + 0xff; - orion_xor00_resources[0].start = irq_0; - orion_xor00_resources[0].end = irq_0; - orion_xor01_resources[0].start = irq_1; - orion_xor01_resources[0].end = irq_1; + orion_xor0_shared_resources[2].start = irq_0; + orion_xor0_shared_resources[2].end = irq_0; + orion_xor0_shared_resources[3].start = irq_1; + orion_xor0_shared_resources[3].end = irq_1; - platform_device_register(&orion_xor0_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, orion_xor0_channels_pdata[0].cap_mask); + dma_cap_set(DMA_XOR, orion_xor0_channels_pdata[0].cap_mask); - orion_xor_init_channels(&orion_xor00_data, &orion_xor00_channel, - &orion_xor01_data, &orion_xor01_channel); + dma_cap_set(DMA_MEMSET, orion_xor0_channels_pdata[1].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor0_channels_pdata[1].cap_mask); + dma_cap_set(DMA_XOR, orion_xor0_channels_pdata[1].cap_mask); + + platform_device_register(&orion_xor0_shared); } /***************************************************************************** -- cgit v1.2.3 From dd2c57b822bc0fc999f95c57933e4c597e765b0a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 30 Oct 2012 11:11:36 +0100 Subject: arm: plat-orion: convert the registration of the xor1 engine to the single driver Instead of registering one 'mv_xor_shared' device for the XOR engine, and then two 'mv_xor' devices for the XOR channels, pass the channels properties as platform_data for the main 'mv_xor_shared' device. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 94 ++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 52 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 800af19c51c5..afbbb97937ea 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -715,61 +715,43 @@ static struct resource orion_xor1_shared_resources[] = { }, { .name = "xor 1 high", .flags = IORESOURCE_MEM, + }, { + .name = "irq channel 0", + .flags = IORESOURCE_IRQ, + }, { + .name = "irq channel 1", + .flags = IORESOURCE_IRQ, }, }; -static struct platform_device orion_xor1_shared = { - .name = MV_XOR_SHARED_NAME, - .id = 1, - .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), - .resource = orion_xor1_shared_resources, -}; - -static struct resource orion_xor10_resources[] = { - [0] = { - .flags = IORESOURCE_IRQ, - }, -}; - -static struct mv_xor_platform_data orion_xor10_data = { - .shared = &orion_xor1_shared, - .hw_id = 0, - .pool_size = PAGE_SIZE, -}; +static struct platform_device orion_xor1_shared; -static struct platform_device orion_xor10_channel = { - .name = MV_XOR_NAME, - .id = 2, - .num_resources = ARRAY_SIZE(orion_xor10_resources), - .resource = orion_xor10_resources, - .dev = { - .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), - .platform_data = &orion_xor10_data, +static struct mv_xor_platform_data orion_xor1_channels_pdata[2] = { + { + .shared = &orion_xor1_shared, + .hw_id = 0, + .pool_size = PAGE_SIZE, }, -}; - -static struct resource orion_xor11_resources[] = { - [0] = { - .flags = IORESOURCE_IRQ, + { + .shared = &orion_xor1_shared, + .hw_id = 1, + .pool_size = PAGE_SIZE, }, }; -static struct mv_xor_platform_data orion_xor11_data = { - .shared = &orion_xor1_shared, - .hw_id = 1, - .pool_size = PAGE_SIZE, +static struct mv_xor_shared_platform_data orion_xor1_pdata = { + .channels = orion_xor1_channels_pdata, }; -static struct platform_device orion_xor11_channel = { - .name = MV_XOR_NAME, - .id = 3, - .num_resources = ARRAY_SIZE(orion_xor11_resources), - .resource = orion_xor11_resources, - .dev = { - .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), - .platform_data = &orion_xor11_data, +static struct platform_device orion_xor1_shared = { + .name = MV_XOR_SHARED_NAME, + .id = 1, + .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), + .resource = orion_xor1_shared_resources, + .dev = { + .dma_mask = &orion_xor_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(64), + .platform_data = &orion_xor1_pdata, }, }; @@ -783,15 +765,23 @@ void __init orion_xor1_init(unsigned long mapbase_low, orion_xor1_shared_resources[1].start = mapbase_high; orion_xor1_shared_resources[1].end = mapbase_high + 0xff; - orion_xor10_resources[0].start = irq_0; - orion_xor10_resources[0].end = irq_0; - orion_xor11_resources[0].start = irq_1; - orion_xor11_resources[0].end = irq_1; + orion_xor1_shared_resources[2].start = irq_0; + orion_xor1_shared_resources[2].end = irq_0; + orion_xor1_shared_resources[3].start = irq_1; + orion_xor1_shared_resources[3].end = irq_1; - platform_device_register(&orion_xor1_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, orion_xor1_channels_pdata[0].cap_mask); + dma_cap_set(DMA_XOR, orion_xor1_channels_pdata[0].cap_mask); - orion_xor_init_channels(&orion_xor10_data, &orion_xor10_channel, - &orion_xor11_data, &orion_xor11_channel); + dma_cap_set(DMA_MEMSET, orion_xor1_channels_pdata[1].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor1_channels_pdata[1].cap_mask); + dma_cap_set(DMA_XOR, orion_xor1_channels_pdata[1].cap_mask); + + platform_device_register(&orion_xor1_shared); } /***************************************************************************** -- cgit v1.2.3 From c08f1495c886f70f99af7fdcbabe612b31b97d4a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 30 Oct 2012 11:12:46 +0100 Subject: arm: plat-orion: remove unused orion_xor_init_channels() Now that xor0 and xor1 are registered in a single driver manner, the orion_xor_init_channels() function has become useless. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index afbbb97937ea..c6e6666986ff 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -606,26 +606,6 @@ void __init orion_wdt_init(void) ****************************************************************************/ static u64 orion_xor_dmamask = DMA_BIT_MASK(32); -void __init orion_xor_init_channels( - struct mv_xor_platform_data *orion_xor0_data, - struct platform_device *orion_xor0_channel, - struct mv_xor_platform_data *orion_xor1_data, - struct platform_device *orion_xor1_channel) -{ - /* - * two engines can't do memset simultaneously, this limitation - * satisfied by removing memset support from one of the engines. - */ - dma_cap_set(DMA_MEMCPY, orion_xor0_data->cap_mask); - dma_cap_set(DMA_XOR, orion_xor0_data->cap_mask); - platform_device_register(orion_xor0_channel); - - dma_cap_set(DMA_MEMCPY, orion_xor1_data->cap_mask); - dma_cap_set(DMA_MEMSET, orion_xor1_data->cap_mask); - dma_cap_set(DMA_XOR, orion_xor1_data->cap_mask); - platform_device_register(orion_xor1_channel); -} - /***************************************************************************** * XOR0 ****************************************************************************/ -- cgit v1.2.3 From 2ccc469cfecee291707dd50e5842cbf206bc17d7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 31 Oct 2012 13:24:41 +0100 Subject: dma: mv_xor: remove 'shared' from mv_xor_platform_data This member of the platform_data structure is no longer used, so get rid of it. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index c6e6666986ff..5a66211d523c 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -625,16 +625,12 @@ static struct resource orion_xor0_shared_resources[] = { }, }; -static struct platform_device orion_xor0_shared; - static struct mv_xor_platform_data orion_xor0_channels_pdata[2] = { { - .shared = &orion_xor0_shared, .hw_id = 0, .pool_size = PAGE_SIZE, }, { - .shared = &orion_xor0_shared, .hw_id = 1, .pool_size = PAGE_SIZE, }, @@ -704,16 +700,12 @@ static struct resource orion_xor1_shared_resources[] = { }, }; -static struct platform_device orion_xor1_shared; - static struct mv_xor_platform_data orion_xor1_channels_pdata[2] = { { - .shared = &orion_xor1_shared, .hw_id = 0, .pool_size = PAGE_SIZE, }, { - .shared = &orion_xor1_shared, .hw_id = 1, .pool_size = PAGE_SIZE, }, -- cgit v1.2.3 From e39f6ec1f9c1d6a7011adf6d95d8d80bad0586b1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 30 Oct 2012 11:56:26 +0100 Subject: dma: mv_xor: rename mv_xor_platform_data to mv_xor_channel_data mv_xor_platform_data used to be the platform_data structure associated to the 'mv_xor' driver. This driver no longer exists, and this data structure really contains the properties of each XOR channel part of a given XOR engine. Therefore 'struct mv_xor_channel_data' is a more appropriate name. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 5a66211d523c..7ffbe77c52cb 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -625,7 +625,7 @@ static struct resource orion_xor0_shared_resources[] = { }, }; -static struct mv_xor_platform_data orion_xor0_channels_pdata[2] = { +static struct mv_xor_channel_data orion_xor0_channels_data[2] = { { .hw_id = 0, .pool_size = PAGE_SIZE, @@ -637,7 +637,7 @@ static struct mv_xor_platform_data orion_xor0_channels_pdata[2] = { }; static struct mv_xor_shared_platform_data orion_xor0_pdata = { - .channels = orion_xor0_channels_pdata, + .channels = orion_xor0_channels_data, }; static struct platform_device orion_xor0_shared = { @@ -671,12 +671,12 @@ void __init orion_xor0_init(unsigned long mapbase_low, * two engines can't do memset simultaneously, this limitation * satisfied by removing memset support from one of the engines. */ - dma_cap_set(DMA_MEMCPY, orion_xor0_channels_pdata[0].cap_mask); - dma_cap_set(DMA_XOR, orion_xor0_channels_pdata[0].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[0].cap_mask); + dma_cap_set(DMA_XOR, orion_xor0_channels_data[0].cap_mask); - dma_cap_set(DMA_MEMSET, orion_xor0_channels_pdata[1].cap_mask); - dma_cap_set(DMA_MEMCPY, orion_xor0_channels_pdata[1].cap_mask); - dma_cap_set(DMA_XOR, orion_xor0_channels_pdata[1].cap_mask); + dma_cap_set(DMA_MEMSET, orion_xor0_channels_data[1].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[1].cap_mask); + dma_cap_set(DMA_XOR, orion_xor0_channels_data[1].cap_mask); platform_device_register(&orion_xor0_shared); } @@ -700,7 +700,7 @@ static struct resource orion_xor1_shared_resources[] = { }, }; -static struct mv_xor_platform_data orion_xor1_channels_pdata[2] = { +static struct mv_xor_channel_data orion_xor1_channels_data[2] = { { .hw_id = 0, .pool_size = PAGE_SIZE, @@ -712,7 +712,7 @@ static struct mv_xor_platform_data orion_xor1_channels_pdata[2] = { }; static struct mv_xor_shared_platform_data orion_xor1_pdata = { - .channels = orion_xor1_channels_pdata, + .channels = orion_xor1_channels_data, }; static struct platform_device orion_xor1_shared = { @@ -746,12 +746,12 @@ void __init orion_xor1_init(unsigned long mapbase_low, * two engines can't do memset simultaneously, this limitation * satisfied by removing memset support from one of the engines. */ - dma_cap_set(DMA_MEMCPY, orion_xor1_channels_pdata[0].cap_mask); - dma_cap_set(DMA_XOR, orion_xor1_channels_pdata[0].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[0].cap_mask); + dma_cap_set(DMA_XOR, orion_xor1_channels_data[0].cap_mask); - dma_cap_set(DMA_MEMSET, orion_xor1_channels_pdata[1].cap_mask); - dma_cap_set(DMA_MEMCPY, orion_xor1_channels_pdata[1].cap_mask); - dma_cap_set(DMA_XOR, orion_xor1_channels_pdata[1].cap_mask); + dma_cap_set(DMA_MEMSET, orion_xor1_channels_data[1].cap_mask); + dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[1].cap_mask); + dma_cap_set(DMA_XOR, orion_xor1_channels_data[1].cap_mask); platform_device_register(&orion_xor1_shared); } -- cgit v1.2.3 From 7dde453d628687c0e991cfc55c9fd299a804aee6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 30 Oct 2012 11:58:14 +0100 Subject: dma: mv_xor: rename mv_xor_shared_platform_data to mv_xor_platform_data 'struct mv_xor_shared_platform_data' used to be the platform_data structure for the 'mv_xor_shared', but this driver is going to be renamed simply 'mv_xor', so also rename its platform_data structure accordingly. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 7ffbe77c52cb..edd57a68fa8c 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -636,7 +636,7 @@ static struct mv_xor_channel_data orion_xor0_channels_data[2] = { }, }; -static struct mv_xor_shared_platform_data orion_xor0_pdata = { +static struct mv_xor_platform_data orion_xor0_pdata = { .channels = orion_xor0_channels_data, }; @@ -711,7 +711,7 @@ static struct mv_xor_channel_data orion_xor1_channels_data[2] = { }, }; -static struct mv_xor_shared_platform_data orion_xor1_pdata = { +static struct mv_xor_platform_data orion_xor1_pdata = { .channels = orion_xor1_channels_data, }; -- cgit v1.2.3 From 0dddee7a7d42192267ebef0fe15be8b296b665c8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 30 Oct 2012 11:59:42 +0100 Subject: dma: mv_xor: change the driver name to 'mv_xor' Since we got rid of the per-XOR channel 'mv_xor' driver, now the per-XOR engine driver that used to be called 'mv_xor_shared' can simply be named 'mv_xor'. Signed-off-by: Thomas Petazzoni --- arch/arm/mach-dove/common.c | 9 +++++---- arch/arm/mach-kirkwood/board-dt.c | 5 +++-- arch/arm/mach-kirkwood/common.c | 4 ++-- arch/arm/plat-orion/common.c | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 6a2c4dc413a8..f4ac5b06014b 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -124,8 +125,8 @@ static void __init dove_clk_init(void) orion_clkdev_add(NULL, "mv_crypto", crypto); orion_clkdev_add(NULL, "dove-ac97", ac97); orion_clkdev_add(NULL, "dove-pdma", pdma); - orion_clkdev_add(NULL, "mv_xor_shared.0", xor0); - orion_clkdev_add(NULL, "mv_xor_shared.1", xor1); + orion_clkdev_add(NULL, MV_XOR_NAME ".0", xor0); + orion_clkdev_add(NULL, MV_XOR_NAME ".1", xor1); } /***************************************************************************** @@ -410,11 +411,11 @@ static void __init dove_legacy_clk_init(void) of_clk_get_from_provider(&clkspec)); clkspec.args[0] = CLOCK_GATING_BIT_XOR0; - orion_clkdev_add(NULL, "mv_xor_shared.0", + orion_clkdev_add(NULL, MV_XOR_NAME ".0", of_clk_get_from_provider(&clkspec)); clkspec.args[0] = CLOCK_GATING_BIT_XOR1; - orion_clkdev_add(NULL, "mv_xor_shared.1", + orion_clkdev_add(NULL, MV_XOR_NAME ".1", of_clk_get_from_provider(&clkspec)); } diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 8bdfaa4db091..294ad5a4fd98 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "common.h" @@ -60,11 +61,11 @@ static void __init kirkwood_legacy_clk_init(void) of_clk_get_from_provider(&clkspec)); clkspec.args[0] = CGC_BIT_XOR0; - orion_clkdev_add(NULL, "mv_xor_shared.0", + orion_clkdev_add(NULL, MV_XOR_NAME ".0", of_clk_get_from_provider(&clkspec)); clkspec.args[0] = CGC_BIT_XOR1; - orion_clkdev_add(NULL, "mv_xor_shared.1", + orion_clkdev_add(NULL, MV_XOR_NAME ".1", of_clk_get_from_provider(&clkspec)); clkspec.args[0] = CGC_BIT_PEX1; diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 2c6c218fb79e..401dac1a8d80 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -260,8 +260,8 @@ void __init kirkwood_clk_init(void) orion_clkdev_add(NULL, "orion_nand", runit); orion_clkdev_add(NULL, "mvsdio", sdio); orion_clkdev_add(NULL, "mv_crypto", crypto); - orion_clkdev_add(NULL, MV_XOR_SHARED_NAME ".0", xor0); - orion_clkdev_add(NULL, MV_XOR_SHARED_NAME ".1", xor1); + orion_clkdev_add(NULL, MV_XOR_NAME ".0", xor0); + orion_clkdev_add(NULL, MV_XOR_NAME ".1", xor1); orion_clkdev_add("0", "pcie", pex0); orion_clkdev_add("1", "pcie", pex1); orion_clkdev_add(NULL, "kirkwood-i2s", audio); diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index edd57a68fa8c..31517cef8c4d 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -641,7 +641,7 @@ static struct mv_xor_platform_data orion_xor0_pdata = { }; static struct platform_device orion_xor0_shared = { - .name = MV_XOR_SHARED_NAME, + .name = MV_XOR_NAME, .id = 0, .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), .resource = orion_xor0_shared_resources, @@ -716,7 +716,7 @@ static struct mv_xor_platform_data orion_xor1_pdata = { }; static struct platform_device orion_xor1_shared = { - .name = MV_XOR_SHARED_NAME, + .name = MV_XOR_NAME, .id = 1, .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), .resource = orion_xor1_shared_resources, -- cgit v1.2.3 From 9aedbdbab39c8aa58c0b2a0791fb10df6eebc123 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 15 Nov 2012 15:36:37 +0100 Subject: dma: mv_xor: remove hw_id field from platform_data There is no need for the platform_data to give this ID, it is simply the channel number, so we can compute it inside the driver when registering the channels. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 31517cef8c4d..09d836060bf4 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -627,11 +627,9 @@ static struct resource orion_xor0_shared_resources[] = { static struct mv_xor_channel_data orion_xor0_channels_data[2] = { { - .hw_id = 0, .pool_size = PAGE_SIZE, }, { - .hw_id = 1, .pool_size = PAGE_SIZE, }, }; @@ -702,11 +700,9 @@ static struct resource orion_xor1_shared_resources[] = { static struct mv_xor_channel_data orion_xor1_channels_data[2] = { { - .hw_id = 0, .pool_size = PAGE_SIZE, }, { - .hw_id = 1, .pool_size = PAGE_SIZE, }, }; -- cgit v1.2.3 From b503fa01990f6875640339d8f4ba98dbc068f821 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 15 Nov 2012 15:55:30 +0100 Subject: dma: mv_xor: remove the pool_size from platform_data The pool_size is always PAGE_SIZE, and since it is a software configuration paramter (and not a hardware description parameter), we cannot make it part of the Device Tree binding, so we'd better remove it from the platform_data as well. Signed-off-by: Thomas Petazzoni --- arch/arm/plat-orion/common.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 09d836060bf4..2d4b6414609f 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -625,14 +625,7 @@ static struct resource orion_xor0_shared_resources[] = { }, }; -static struct mv_xor_channel_data orion_xor0_channels_data[2] = { - { - .pool_size = PAGE_SIZE, - }, - { - .pool_size = PAGE_SIZE, - }, -}; +static struct mv_xor_channel_data orion_xor0_channels_data[2]; static struct mv_xor_platform_data orion_xor0_pdata = { .channels = orion_xor0_channels_data, @@ -698,14 +691,7 @@ static struct resource orion_xor1_shared_resources[] = { }, }; -static struct mv_xor_channel_data orion_xor1_channels_data[2] = { - { - .pool_size = PAGE_SIZE, - }, - { - .pool_size = PAGE_SIZE, - }, -}; +static struct mv_xor_channel_data orion_xor1_channels_data[2]; static struct mv_xor_platform_data orion_xor1_pdata = { .channels = orion_xor1_channels_data, -- cgit v1.2.3