diff options
Diffstat (limited to 'include/asm-arm/arch-nexuspci')
-rw-r--r-- | include/asm-arm/arch-nexuspci/a.out.h | 16 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/dma.h | 100 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/hardware.h | 40 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/irq.h | 46 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/irqs.h | 14 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/mmap.h | 10 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/mmu.h | 16 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/processor.h | 31 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/serial.h | 41 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/shmparam.h | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/system.h | 18 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/time.h | 29 | ||||
-rw-r--r-- | include/asm-arm/arch-nexuspci/uncompress.h | 17 |
13 files changed, 383 insertions, 0 deletions
diff --git a/include/asm-arm/arch-nexuspci/a.out.h b/include/asm-arm/arch-nexuspci/a.out.h new file mode 100644 index 000000000..b8e278074 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/a.out.h @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-ebsa/a.out.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#ifdef __KERNEL__ +#define STACK_TOP (0xc0000000) +#define LIBRARY_START_TEXT (0x00c00000) +#endif + +#endif + diff --git a/include/asm-arm/arch-nexuspci/dma.h b/include/asm-arm/arch-nexuspci/dma.h new file mode 100644 index 000000000..73340527a --- /dev/null +++ b/include/asm-arm/arch-nexuspci/dma.h @@ -0,0 +1,100 @@ +/* + * linux/include/asm-arm/arch-ebsa110/dma.h + * + * Architecture DMA routes + * + * Copyright (C) 1997.1998 Russell King + */ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +#ifdef KERNEL_ARCH_DMA + +static inline void arch_disable_dma (int dmanr) +{ + printk (dma_str, "arch_disable_dma", dmanr); +} + +static inline void arch_enable_dma (int dmanr) +{ + printk (dma_str, "arch_enable_dma", dmanr); +} + +static inline void arch_set_dma_addr (int dmanr, unsigned int addr) +{ + printk (dma_str, "arch_set_dma_addr", dmanr); +} + +static inline void arch_set_dma_count (int dmanr, unsigned int count) +{ + printk (dma_str, "arch_set_dma_count", dmanr); +} + +static inline void arch_set_dma_mode (int dmanr, char mode) +{ + printk (dma_str, "arch_set_dma_mode", dmanr); +} + +static inline int arch_dma_count (int dmanr) +{ + printk (dma_str, "arch_dma_count", dmanr); + return 0; +} + +#endif + +/* enable/disable a specific DMA channel */ +extern void enable_dma(unsigned int dmanr); + +static __inline__ void disable_dma(unsigned int dmanr) +{ + printk (dma_str, "disable_dma", dmanr); +} + +/* Clear the 'DMA Pointer Flip Flop'. + * Write 0 for LSB/MSB, 1 for MSB/LSB access. + * Use this once to initialize the FF to a known state. + * After that, keep track of it. :-) + * --- In order to do that, the DMA routines below should --- + * --- only be used while interrupts are disabled! --- + */ +static __inline__ void clear_dma_ff(unsigned int dmanr) +{ + printk (dma_str, "clear_dma_ff", dmanr); +} + +/* set mode (above) for a specific DMA channel */ +extern void set_dma_mode(unsigned int dmanr, char mode); + +/* Set only the page register bits of the transfer address. + * This is used for successive transfers when we know the contents of + * the lower 16 bits of the DMA current address register, but a 64k boundary + * may have been crossed. + */ +static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) +{ + printk (dma_str, "set_dma_page", dmanr); +} + + +/* Set transfer address & page bits for specific DMA channel. + * Assumes dma flipflop is clear. + */ +extern void set_dma_addr(unsigned int dmanr, unsigned int addr); + +/* Set transfer size for a specific DMA channel. + */ +extern void set_dma_count(unsigned int dmanr, unsigned int count); + +/* Get DMA residue count. After a DMA transfer, this + * should return zero. Reading this while a DMA transfer is + * still in progress will return unpredictable results. + * If called before the channel has been used, it may return 1. + * Otherwise, it returns the number of _bytes_ left to transfer. + * + * Assumes DMA flip-flop is clear. + */ +extern int get_dma_residue(unsigned int dmanr); + +#endif /* _ASM_ARCH_DMA_H */ + diff --git a/include/asm-arm/arch-nexuspci/hardware.h b/include/asm-arm/arch-nexuspci/hardware.h new file mode 100644 index 000000000..154bce9df --- /dev/null +++ b/include/asm-arm/arch-nexuspci/hardware.h @@ -0,0 +1,40 @@ +/* + * linux/include/asm-arm/arch-nexuspci/hardware.h + * + * Copyright (C) 1997 Philip Blundell + * + * This file contains the hardware definitions of the Nexus PCI card. + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +/* + * What hardware must be present + */ + +#ifndef __ASSEMBLER__ + +/* + * Mapping areas + */ +#define IO_END 0xffffffff +#define IO_BASE 0xd0000000 +#define IO_SIZE (IO_END - IO_BASE) +#define IO_START 0xd0000000 + +/* + * RAM definitions + */ +#define RAM_BASE 0x40000000 +#define MAPTOPHYS(a) ((unsigned long)(a) - PAGE_OFFSET + RAM_BASE) +#define KERNTOPHYS(a) ((unsigned long)(&a)) +#define KERNEL_BASE (0xc0008000) + +#else + +#define IO_BASE 0 + +#endif +#endif + diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h new file mode 100644 index 000000000..18ddf053b --- /dev/null +++ b/include/asm-arm/arch-nexuspci/irq.h @@ -0,0 +1,46 @@ +/* + * include/asm-arm/arch-ebsa110/irq.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +#define IRQ_MCLR ((volatile unsigned char *)0xf3000000) +#define IRQ_MSET ((volatile unsigned char *)0xf2c00000) +#define IRQ_MASK ((volatile unsigned char *)0xf2c00000) + +static __inline__ void mask_and_ack_irq(unsigned int irq) +{ + if (irq < 8) + *IRQ_MCLR = 1 << irq; +} + +static __inline__ void mask_irq(unsigned int irq) +{ + if (irq < 8) + *IRQ_MCLR = 1 << irq; +} + +static __inline__ void unmask_irq(unsigned int irq) +{ + if (irq < 8) + *IRQ_MSET = 1 << irq; +} + +static __inline__ unsigned long get_enabled_irqs(void) +{ + return 0; +} + +static __inline__ void irq_init_irq(void) +{ + unsigned long flags; + + save_flags_cli (flags); + *IRQ_MCLR = 0xff; + *IRQ_MSET = 0x55; + *IRQ_MSET = 0x00; + if (*IRQ_MASK != 0x55) + while (1); + *IRQ_MCLR = 0xff; /* clear all interrupt enables */ + restore_flags (flags); +} diff --git a/include/asm-arm/arch-nexuspci/irqs.h b/include/asm-arm/arch-nexuspci/irqs.h new file mode 100644 index 000000000..661af14a1 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/irqs.h @@ -0,0 +1,14 @@ +/* + * linux/include/asm-arm/arch-nexuspci/irqs.h + * + * Copyright (C) 1997 Philip Blundell + */ + +#define IRQ_DUART 0 +#define IRQ_TIMER0 0 /* timer is part of the DUART */ +#define IRQ_PLX 1 +#define IRQ_PCI_D 2 +#define IRQ_PCI_C 3 +#define IRQ_PCI_B 4 +#define IRQ_PCI_A 5 +#define IRQ_SYSERR 6 /* must ask JB about this one */ diff --git a/include/asm-arm/arch-nexuspci/mmap.h b/include/asm-arm/arch-nexuspci/mmap.h new file mode 100644 index 000000000..2ba0c2a27 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/mmap.h @@ -0,0 +1,10 @@ +/* + * linux/include/asm-arm/arch-ebsa110/mmap.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +/* + * Use SRAM for cache flushing + */ +#define SAFE_ADDR 0x40000000 diff --git a/include/asm-arm/arch-nexuspci/mmu.h b/include/asm-arm/arch-nexuspci/mmu.h new file mode 100644 index 000000000..6e21320d3 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/mmu.h @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-nexuspci/mmu.h + * + * Copyright (c) 1997 Philip Blundell. + * + */ +#ifndef __ASM_ARCH_MMU_H +#define __ASM_ARCH_MMU_H + +/* + * On NexusPCI, the dram is contiguous + */ +#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + 0x40000000) +#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - 0x40000000) + +#endif diff --git a/include/asm-arm/arch-nexuspci/processor.h b/include/asm-arm/arch-nexuspci/processor.h new file mode 100644 index 000000000..b54085946 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/processor.h @@ -0,0 +1,31 @@ +/* + * linux/include/asm-arm/arch-ebsa110/processor.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +#ifndef __ASM_ARCH_PROCESSOR_H +#define __ASM_ARCH_PROCESSOR_H + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* + * User space: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#define INIT_MMAP \ +{ &init_mm, 0xc0000000, 0xc2000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } + +#endif diff --git a/include/asm-arm/arch-nexuspci/serial.h b/include/asm-arm/arch-nexuspci/serial.h new file mode 100644 index 000000000..1d41a7c1d --- /dev/null +++ b/include/asm-arm/arch-nexuspci/serial.h @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-ebsa110/serial.h + * + * Copyright (c) 1996,1997,1998 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + */ +#ifndef __ASM_ARCH_SERIAL_H +#define __ASM_ARCH_SERIAL_H + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD (1843200 / 16) + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + + /* UART CLK PORT IRQ FLAGS */ +#define RS_UARTS \ + { 0, BASE_BAUD, 0x3F8, 1, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 2, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ + +#endif + diff --git a/include/asm-arm/arch-nexuspci/shmparam.h b/include/asm-arm/arch-nexuspci/shmparam.h new file mode 100644 index 000000000..9c36489cb --- /dev/null +++ b/include/asm-arm/arch-nexuspci/shmparam.h @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-ebsa110/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h new file mode 100644 index 000000000..7a2957cae --- /dev/null +++ b/include/asm-arm/arch-nexuspci/system.h @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/arch-ebsa110/system.h + * + * Copyright (c) 1996,1997,1998 Russell King. + */ +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_hard_reset (void) +{ + /* + * loop endlessly + */ + cli(); + while (1); +} + +#endif diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h new file mode 100644 index 000000000..ddbee82db --- /dev/null +++ b/include/asm-arm/arch-nexuspci/time.h @@ -0,0 +1,29 @@ +/* + * linux/include/asm-arm/arch-nexuspci/time.h + * + * Copyright (c) 1997 Phil Blundell. + * + * Nexus PCI card has no real-time clock. + * + */ + +extern __inline__ unsigned long gettimeoffset (void) +{ + return 0; +} + +extern __inline__ int reset_timer (void) +{ + return 0; +} + +extern __inline__ unsigned long setup_timer (void) +{ + reset_timer (); + /* + * Default the date to 1 Jan 1970 0:0:0 + * You will have to run a time daemon to set the + * clock correctly at bootup + */ + return mktime(1970, 1, 1, 0, 0, 0); +} diff --git a/include/asm-arm/arch-nexuspci/uncompress.h b/include/asm-arm/arch-nexuspci/uncompress.h new file mode 100644 index 000000000..16daee5b9 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/uncompress.h @@ -0,0 +1,17 @@ +/* + * linux/include/asm-arm/arch-ebsa110/uncompress.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ +} + +/* + * nothing to do + */ +#define arch_decomp_setup() |