[svn-commits] sruffell: tag linux/2.2.1.2 r8666 - /linux/tags/2.2.1.2/drivers/dahdi/voicebus/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue May 18 12:12:49 CDT 2010
Author: sruffell
Date: Tue May 18 12:12:47 2010
New Revision: 8666
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8666
Log:
wcte12xp, wctdm24xxp: Use memory mapped IO instead of port IO
Back ports r8176 and r8560 onto 2.2.1.1. DAHDI-625.
Modified:
linux/tags/2.2.1.2/drivers/dahdi/voicebus/voicebus.c
Modified: linux/tags/2.2.1.2/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/tags/2.2.1.2/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=8666&r1=8665&r2=8666
==============================================================================
--- linux/tags/2.2.1.2/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/tags/2.2.1.2/drivers/dahdi/voicebus/voicebus.c Tue May 18 12:12:47 2010
@@ -169,8 +169,8 @@
#else
struct kmem_cache *buffer_cache;
#endif
- /*! Base address of the VoiceBus interface registers in I/O space. */
- u32 iobase;
+ /*! Base address of the VoiceBus interface registers in memory space. */
+ void __iomem *iobase;
/*! The IRQ line for this VoiceBus interface. */
unsigned int irq;
#if VOICEBUS_DEFERRED == WORKQUEUE
@@ -482,7 +482,7 @@
static inline u32
__vb_getctl(struct voicebus *vb, u32 addr)
{
- return le32_to_cpu(inl(vb->iobase + addr));
+ return readl(vb->iobase + addr);
}
/*!
@@ -599,7 +599,8 @@
__vb_setctl(struct voicebus *vb, u32 addr, u32 val)
{
wmb();
- outl(cpu_to_le32(val), vb->iobase + addr);
+ writel(val, vb->iobase + addr);
+ readl(vb->iobase + addr);
}
/*!
@@ -1233,7 +1234,9 @@
vb->idle_vbb, vb->idle_vbb_dma_addr);
}
kmem_cache_destroy(vb->buffer_cache);
- release_region(vb->iobase, 0xff);
+ release_mem_region(pci_resource_start(vb->pdev, 1),
+ pci_resource_len(vb->pdev, 1));
+ pci_iounmap(vb->pdev, vb->iobase);
pci_disable_device(vb->pdev);
kfree(vb);
}
@@ -1790,8 +1793,9 @@
retval = -EIO;
goto cleanup;
}
- vb->iobase = pci_resource_start(pdev, 0);
- if (NULL == request_region(vb->iobase, 0xff, board_name)) {
+ vb->iobase = pci_iomap(vb->pdev, 1, 0);
+ if (!request_mem_region(pci_resource_start(vb->pdev, 1),
+ pci_resource_len(vb->pdev, 1), board_name)) {
dev_err(&vb->pdev->dev, "IO Registers are in use by another "
"module.\n");
retval = -EIO;
@@ -1813,7 +1817,8 @@
Configure the hardware interface.
---------------------------------------------------------------- */
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
- release_region(vb->iobase, 0xff);
+ release_mem_region(pci_resource_start(vb->pdev, 1),
+ pci_resource_len(vb->pdev, 1));
dev_warn(&vb->pdev->dev, "No suitable DMA available.\n");
goto cleanup;
}
@@ -1859,7 +1864,7 @@
kmem_cache_destroy(vb->buffer_cache);
if (vb->iobase)
- release_region(vb->iobase, 0xff);
+ pci_iounmap(vb->pdev, vb->iobase);
if (vb->pdev)
pci_disable_device(vb->pdev);
More information about the svn-commits
mailing list