![Bartlomiej Zolnierkiewicz](/assets/img/avatar_default.png)
* Now that ide_hwif_t instances are allocated dynamically the difference between MAX_HWIFS == 2 and MAX_HWIFS == 10 is ~100 bytes (x86-32) so use MAX_HWIFS == 10 on all archs except these ones that use MAX_HWIFS == 1. * Define MAX_HWIFS in <linux/ide.h> instead of <asm/ide.h>. [ Please note that avr32/cris/v850 have no <asm/ide.h> and alpha/ia64/sh always define CONFIG_IDE_MAX_HWIFS. ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
62 lines
1.4 KiB
C
62 lines
1.4 KiB
C
/*
|
|
* linux/include/asm-parisc/ide.h
|
|
*
|
|
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
|
*/
|
|
|
|
/*
|
|
* This file contains the PARISC architecture specific IDE code.
|
|
*/
|
|
|
|
#ifndef __ASM_PARISC_IDE_H
|
|
#define __ASM_PARISC_IDE_H
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
|
|
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
|
|
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
|
|
#define ide_release_region(from,extent) release_region((from), (extent))
|
|
/* Generic I/O and MEMIO string operations. */
|
|
|
|
#define __ide_insw insw
|
|
#define __ide_insl insl
|
|
#define __ide_outsw outsw
|
|
#define __ide_outsl outsl
|
|
|
|
static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
|
|
{
|
|
while (count--) {
|
|
*(u16 *)addr = __raw_readw(port);
|
|
addr += 2;
|
|
}
|
|
}
|
|
|
|
static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
|
|
{
|
|
while (count--) {
|
|
*(u32 *)addr = __raw_readl(port);
|
|
addr += 4;
|
|
}
|
|
}
|
|
|
|
static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
|
|
{
|
|
while (count--) {
|
|
__raw_writew(*(u16 *)addr, port);
|
|
addr += 2;
|
|
}
|
|
}
|
|
|
|
static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
|
|
{
|
|
while (count--) {
|
|
__raw_writel(*(u32 *)addr, port);
|
|
addr += 4;
|
|
}
|
|
}
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* __ASM_PARISC_IDE_H */
|