ide: use PIO/MMIO operations directly where possible (v2)
This results in smaller/faster/simpler code and allows future optimizations. Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}. v2: * updated for scc_pata Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
@@ -49,11 +49,6 @@ static void ide_insw (unsigned long port, void *addr, u32 count)
|
||||
insw(port, addr, count);
|
||||
}
|
||||
|
||||
static u32 ide_inl (unsigned long port)
|
||||
{
|
||||
return (u32) inl(port);
|
||||
}
|
||||
|
||||
static void ide_insl (unsigned long port, void *addr, u32 count)
|
||||
{
|
||||
insl(port, addr, count);
|
||||
@@ -79,11 +74,6 @@ static void ide_outsw (unsigned long port, void *addr, u32 count)
|
||||
outsw(port, addr, count);
|
||||
}
|
||||
|
||||
static void ide_outl (u32 val, unsigned long port)
|
||||
{
|
||||
outl(val, port);
|
||||
}
|
||||
|
||||
static void ide_outsl (unsigned long port, void *addr, u32 count)
|
||||
{
|
||||
outsl(port, addr, count);
|
||||
@@ -94,12 +84,10 @@ void default_hwif_iops (ide_hwif_t *hwif)
|
||||
hwif->OUTB = ide_outb;
|
||||
hwif->OUTBSYNC = ide_outbsync;
|
||||
hwif->OUTW = ide_outw;
|
||||
hwif->OUTL = ide_outl;
|
||||
hwif->OUTSW = ide_outsw;
|
||||
hwif->OUTSL = ide_outsl;
|
||||
hwif->INB = ide_inb;
|
||||
hwif->INW = ide_inw;
|
||||
hwif->INL = ide_inl;
|
||||
hwif->INSW = ide_insw;
|
||||
hwif->INSL = ide_insl;
|
||||
}
|
||||
@@ -123,11 +111,6 @@ static void ide_mm_insw (unsigned long port, void *addr, u32 count)
|
||||
__ide_mm_insw((void __iomem *) port, addr, count);
|
||||
}
|
||||
|
||||
static u32 ide_mm_inl (unsigned long port)
|
||||
{
|
||||
return (u32) readl((void __iomem *) port);
|
||||
}
|
||||
|
||||
static void ide_mm_insl (unsigned long port, void *addr, u32 count)
|
||||
{
|
||||
__ide_mm_insl((void __iomem *) port, addr, count);
|
||||
@@ -153,11 +136,6 @@ static void ide_mm_outsw (unsigned long port, void *addr, u32 count)
|
||||
__ide_mm_outsw((void __iomem *) port, addr, count);
|
||||
}
|
||||
|
||||
static void ide_mm_outl (u32 value, unsigned long port)
|
||||
{
|
||||
writel(value, (void __iomem *) port);
|
||||
}
|
||||
|
||||
static void ide_mm_outsl (unsigned long port, void *addr, u32 count)
|
||||
{
|
||||
__ide_mm_outsl((void __iomem *) port, addr, count);
|
||||
@@ -170,12 +148,10 @@ void default_hwif_mmiops (ide_hwif_t *hwif)
|
||||
this one is controller specific! */
|
||||
hwif->OUTBSYNC = ide_mm_outbsync;
|
||||
hwif->OUTW = ide_mm_outw;
|
||||
hwif->OUTL = ide_mm_outl;
|
||||
hwif->OUTSW = ide_mm_outsw;
|
||||
hwif->OUTSL = ide_mm_outsl;
|
||||
hwif->INB = ide_mm_inb;
|
||||
hwif->INW = ide_mm_inw;
|
||||
hwif->INL = ide_mm_inl;
|
||||
hwif->INSW = ide_mm_insw;
|
||||
hwif->INSL = ide_mm_insl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user