Commit ae49e807 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Arnd Bergmann

asm-generic: add legacy I/O header files

The dma.h, hw_irq.h, serial.h and timex.h files originally
described PC-style i8237, i8259A, i8250, i8253 and i8255 chips
as well as the VGA style text mode graphics.

Modern architectures live happily without these specific
interfaces, but a few definitions from these headers keep
getting used in common code.

The new generic headers are what most architectures use
anyway nowadays, just implementing the minimal definitions.
Signed-off-by: default avatarRemis Lima Baima <>
Signed-off-by: default avatarArnd Bergmann <>
parent aafe4dbe
* This file traditionally describes the i8237 PC style DMA controller.
* Most architectures don't have these any more and can get the minimal
* implementation from kernel/dma.c by not defining MAX_DMA_CHANNELS.
* Some code relies on seeing MAX_DMA_ADDRESS though.
extern int request_dma(unsigned int dmanr, const char *device_id);
extern void free_dma(unsigned int dmanr);
#endif /* __ASM_GENERIC_DMA_H */
* hw_irq.h has internal declarations for the low-level interrupt
* controller, like the original i8259A.
* In general, this is not needed for new architectures.
#endif /* __ASM_GENERIC_HW_IRQ_H */
* An ISA bus may have i8255 parallel ports at well-known
* locations in the I/O space, which are scanned by
* parport_pc_find_isa_ports.
* Without ISA support, the driver will only attach
* to devices on the PCI bus.
static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma);
static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma)
return parport_pc_find_isa_ports(autoirq, autodma);
return 0;
#endif /* __ASM_GENERIC_PARPORT_H */
* This should not be an architecture specific #define, oh well.
* Traditionally, it just describes i8250 and related serial ports
* that have this clock rate.
#define BASE_BAUD (1843200 / 16)
#endif /* __ASM_GENERIC_SERIAL_H */
* If you have a cycle counter, return the value here.
typedef unsigned long cycles_t;
#ifndef get_cycles
static inline cycles_t get_cycles(void)
return 0;
* Architectures are encouraged to implement read_current_timer
* and define this in order to avoid the expensive delay loop
* calibration during boot.
#endif /* __ASM_GENERIC_TIMEX_H */
* Access to VGA videoram
* (c) 1998 Martin Mares <>
* On most architectures that support VGA, we can just
* recalculate addresses and then access the videoram
* directly without any black magic.
* Everyone else needs to ioremap the address and use
* proper I/O accesses.
#ifndef VGA_MAP_MEM
#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x)
#define vga_readb(x) (*(x))
#define vga_writeb(x, y) (*(y) = (x))
#endif /* _ASM_GENERIC_VGA_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment