Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344283
b: refs/heads/master
c: b503fa0
h: refs/heads/master
i:
  344281: 5ca33e3
  344279: 05df438
v: v3
  • Loading branch information
Thomas Petazzoni committed Nov 20, 2012
1 parent 8d80d77 commit fe7bd1d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9aedbdbab39c8aa58c0b2a0791fb10df6eebc123
refs/heads/master: b503fa01990f6875640339d8f4ba98dbc068f821
18 changes: 2 additions & 16 deletions trunk/arch/arm/plat-orion/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/dma/mv_xor.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
int idx;
struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
struct mv_xor_desc_slot *slot = NULL;
int num_descs_in_pool = mv_chan->pool_size/MV_XOR_SLOT_SIZE;
int num_descs_in_pool = MV_XOR_POOL_SIZE/MV_XOR_SLOT_SIZE;

/* Allocate descriptor slots */
idx = mv_chan->slots_allocated;
Expand Down Expand Up @@ -1074,7 +1074,7 @@ static int mv_xor_channel_remove(struct mv_xor_chan *mv_chan)

dma_async_device_unregister(&mv_chan->dmadev);

dma_free_coherent(dev, mv_chan->pool_size,
dma_free_coherent(dev, MV_XOR_POOL_SIZE,
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);

list_for_each_entry_safe(chan, _chan, &mv_chan->dmadev.channels,
Expand All @@ -1088,8 +1088,7 @@ static int mv_xor_channel_remove(struct mv_xor_chan *mv_chan)
static struct mv_xor_chan *
mv_xor_channel_add(struct mv_xor_device *xordev,
struct platform_device *pdev,
int idx, dma_cap_mask_t cap_mask,
size_t pool_size, int irq)
int idx, dma_cap_mask_t cap_mask, int irq)
{
int ret = 0;
struct mv_xor_chan *mv_chan;
Expand All @@ -1109,9 +1108,8 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
* note: writecombine gives slightly better performance, but
* requires that we explicitly flush the writes
*/
mv_chan->pool_size = pool_size;
mv_chan->dma_desc_pool_virt =
dma_alloc_writecombine(&pdev->dev, mv_chan->pool_size,
dma_alloc_writecombine(&pdev->dev, MV_XOR_POOL_SIZE,
&mv_chan->dma_desc_pool, GFP_KERNEL);
if (!mv_chan->dma_desc_pool_virt)
return ERR_PTR(-ENOMEM);
Expand Down Expand Up @@ -1193,7 +1191,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
return mv_chan;

err_free_dma:
dma_free_coherent(&pdev->dev, pool_size,
dma_free_coherent(&pdev->dev, MV_XOR_POOL_SIZE,
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
return ERR_PTR(ret);
}
Expand Down Expand Up @@ -1296,8 +1294,7 @@ static int mv_xor_probe(struct platform_device *pdev)

xordev->channels[i] =
mv_xor_channel_add(xordev, pdev, i,
cd->cap_mask,
cd->pool_size, irq);
cd->cap_mask, irq);
if (IS_ERR(xordev->channels[i])) {
ret = PTR_ERR(xordev->channels[i]);
goto err_channel_add;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/dma/mv_xor.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/interrupt.h>

#define USE_TIMER
#define MV_XOR_POOL_SIZE PAGE_SIZE
#define MV_XOR_SLOT_SIZE 64
#define MV_XOR_THRESHOLD 1
#define MV_XOR_MAX_CHANNELS 2
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/platform_data/dma-mv_xor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

struct mv_xor_channel_data {
dma_cap_mask_t cap_mask;
size_t pool_size;
};

struct mv_xor_platform_data {
Expand Down

0 comments on commit fe7bd1d

Please sign in to comment.