Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185746
b: refs/heads/master
c: 4ce0e95
h: refs/heads/master
v: v3
  • Loading branch information
Ira Snyder authored and Dan Williams committed Feb 2, 2010
1 parent 24bae0c commit 9e4a9cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 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: 272ca655090978bdaa2630fc44fb2c03da5576fd
refs/heads/master: 4ce0e953f6286777452bf07c83056342d6b9b257
17 changes: 8 additions & 9 deletions trunk/drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ static int __devinit fsl_dma_chan_probe(struct fsl_dma_device *fdev,
struct device_node *node, u32 feature, const char *compatible)
{
struct fsl_dma_chan *new_fsl_chan;
struct resource res;
int err;

/* alloc channel */
Expand All @@ -1083,7 +1084,7 @@ static int __devinit fsl_dma_chan_probe(struct fsl_dma_device *fdev,
}

/* get dma channel register base */
err = of_address_to_resource(node, 0, &new_fsl_chan->reg);
err = of_address_to_resource(node, 0, &res);
if (err) {
dev_err(fdev->dev, "Can't get %s property 'reg'\n",
node->full_name);
Expand All @@ -1101,10 +1102,8 @@ static int __devinit fsl_dma_chan_probe(struct fsl_dma_device *fdev,
WARN_ON(fdev->feature != new_fsl_chan->feature);

new_fsl_chan->dev = fdev->dev;
new_fsl_chan->reg_base = ioremap(new_fsl_chan->reg.start,
new_fsl_chan->reg.end - new_fsl_chan->reg.start + 1);

new_fsl_chan->id = ((new_fsl_chan->reg.start - 0x100) & 0xfff) >> 7;
new_fsl_chan->reg_base = ioremap(res.start, resource_size(&res));
new_fsl_chan->id = ((res.start - 0x100) & 0xfff) >> 7;
if (new_fsl_chan->id >= FSL_DMA_MAX_CHANS_PER_DEVICE) {
dev_err(fdev->dev, "There is no %d channel!\n",
new_fsl_chan->id);
Expand Down Expand Up @@ -1183,6 +1182,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
int err;
struct fsl_dma_device *fdev;
struct device_node *child;
struct resource res;

fdev = kzalloc(sizeof(struct fsl_dma_device), GFP_KERNEL);
if (!fdev) {
Expand All @@ -1193,7 +1193,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
INIT_LIST_HEAD(&fdev->common.channels);

/* get DMA controller register base */
err = of_address_to_resource(dev->node, 0, &fdev->reg);
err = of_address_to_resource(dev->node, 0, &res);
if (err) {
dev_err(&dev->dev, "Can't get %s property 'reg'\n",
dev->node->full_name);
Expand All @@ -1202,9 +1202,8 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,

dev_info(&dev->dev, "Probe the Freescale DMA driver for %s "
"controller at 0x%llx...\n",
match->compatible, (unsigned long long)fdev->reg.start);
fdev->reg_base = ioremap(fdev->reg.start, fdev->reg.end
- fdev->reg.start + 1);
match->compatible, (unsigned long long)res.start);
fdev->reg_base = ioremap(res.start, resource_size(&res));

dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/dma/fsldma.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ struct fsl_desc_sw {
struct list_head node;
struct list_head tx_list;
struct dma_async_tx_descriptor async_tx;
struct list_head *ld;
void *priv;
} __attribute__((aligned(32)));

struct fsl_dma_chan_regs {
Expand All @@ -111,7 +109,6 @@ struct fsl_dma_chan;

struct fsl_dma_device {
void __iomem *reg_base; /* DGSR register base */
struct resource reg; /* Resource for register */
struct device *dev;
struct dma_device common;
struct fsl_dma_chan *chan[FSL_DMA_MAX_CHANS_PER_DEVICE];
Expand All @@ -138,7 +135,6 @@ struct fsl_dma_chan {
struct dma_chan common; /* DMA common channel */
struct dma_pool *desc_pool; /* Descriptors pool */
struct device *dev; /* Channel device */
struct resource reg; /* Resource for register */
int irq; /* Channel IRQ */
int id; /* Raw id of this channel */
struct tasklet_struct tasklet;
Expand Down

0 comments on commit 9e4a9cb

Please sign in to comment.