~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/arm/common/it8152.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
 * ITE8152 chip can address up to 64MByte, so all the devices
244
244
 * connected to ITE8152 (PCI and USB) should have limited DMA window
245
245
 */
 
246
static int it8152_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
 
247
{
 
248
        dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
 
249
                __func__, dma_addr, size);
 
250
        return (dma_addr + size - PHYS_OFFSET) >= SZ_64M;
 
251
}
246
252
 
247
253
/*
248
254
 * Setup DMA mask to 64MB on devices connected to ITE8152. Ignore all
254
260
                if (dev->dma_mask)
255
261
                        *dev->dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
256
262
                dev->coherent_dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
257
 
                dmabounce_register_dev(dev, 2048, 4096);
 
263
                dmabounce_register_dev(dev, 2048, 4096, it8152_needs_bounce);
258
264
        }
259
265
        return 0;
260
266
}
267
273
        return 0;
268
274
}
269
275
 
270
 
int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
271
 
{
272
 
        dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
273
 
                __func__, dma_addr, size);
274
 
        return (dev->bus == &pci_bus_type) &&
275
 
                ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
276
 
}
277
 
 
278
276
int dma_set_coherent_mask(struct device *dev, u64 mask)
279
277
{
280
278
        if (mask >= PHYS_OFFSET + SZ_64M - 1)