diff options
Diffstat (limited to 'include/asm-arm/arch-arc')
-rw-r--r-- | include/asm-arm/arch-arc/a.out.h | 1 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/dma.h | 23 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/hardware.h | 52 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/ide.h | 60 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/io.h | 32 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/keyboard.h | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/processor.h | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-arc/system.h | 16 |
8 files changed, 89 insertions, 102 deletions
diff --git a/include/asm-arm/arch-arc/a.out.h b/include/asm-arm/arch-arc/a.out.h index a8ef7645f..e00511463 100644 --- a/include/asm-arm/arch-arc/a.out.h +++ b/include/asm-arm/arch-arc/a.out.h @@ -10,7 +10,6 @@ #ifdef __KERNEL__ #define STACK_TOP (0x01a00000) -#define LIBRARY_START_TEXT (0x00c00000) #endif #endif diff --git a/include/asm-arm/arch-arc/dma.h b/include/asm-arm/arch-arc/dma.h index 3420d7d6d..49e184769 100644 --- a/include/asm-arm/arch-arc/dma.h +++ b/include/asm-arm/arch-arc/dma.h @@ -16,22 +16,19 @@ #define MAX_DMA_ADDRESS 0x03000000 -/* - * DMA modes - we have two, IN and OUT - */ -typedef enum { - DMA_MODE_READ, - DMA_MODE_WRITE -} dmamode_t; - -#define MAX_DMA_CHANNELS 4 +#ifdef CONFIG_ARCH_ARC +#define MAX_DMA_CHANNELS 3 -#define DMA_0 0 -#define DMA_1 1 -#define DMA_VIRTUAL_FLOPPY 2 -#define DMA_VIRTUAL_SOUND 3 +#define DMA_VIRTUAL_FLOPPY0 0 +#define DMA_VIRTUAL_FLOPPY1 1 +#define DMA_VIRTUAL_SOUND 2 +#endif #ifdef CONFIG_ARCH_A5K +#define MAX_DMA_CHANNELS 2 + +#define DMA_VIRTUAL_FLOPPY 0 +#define DMA_VIRTUAL_SOUND 1 #define DMA_FLOPPY DMA_VIRTUAL_FLOPPY #endif diff --git a/include/asm-arm/arch-arc/hardware.h b/include/asm-arm/arch-arc/hardware.h index 4990ca132..c59007f3c 100644 --- a/include/asm-arm/arch-arc/hardware.h +++ b/include/asm-arm/arch-arc/hardware.h @@ -20,33 +20,51 @@ * source. */ #define HAS_IOC +#include <asm/ioc.h> #define HAS_MEMC +#include <asm/memc.h> #define HAS_MEMC1A #define HAS_VIDC -#ifdef CONFIG_ARCH_A5K -#define HAS_PCIO -#endif - /* * Optional hardware */ #define HAS_EXPMASK +/* Hardware addresses of major areas. + * *_START is the physical address + * *_SIZE is the size of the region + * *_BASE is the virtual address + */ +#define IO_START 0x03000000 +#define IO_SIZE 0x01000000 +#define IO_BASE 0x03000000 + +/* + * Screen mapping information + */ +#define SCREEN_START 0x02000000 +#define SCREEN2_END 0x02078000 +#define SCREEN2_BASE 0x02000000 +#define SCREEN1_END 0x02000000 +#define SCREEN1_BASE 0x01f88000 + + #ifndef __ASSEMBLER__ /* * for use with inb/outb */ -#define VIDC_BASE 0x80100000 -#define IOCEC4IO_BASE 0x8009c000 +#define IO_VIDC_BASE 0x80100000 #ifdef CONFIG_ARCH_ARC #define LATCHAADDR 0x80094010 #define LATCHBADDR 0x80094006 #endif -#define IOCECIO_BASE 0x80090000 #define IOC_BASE 0x80080000 -#define MEMCECIO_BASE 0x80000000 + +#define IO_EC_IOC4_BASE 0x8009c000 +#define IO_EC_IOC_BASE 0x80090000 +#define IO_EC_MEMC_BASE 0x80000000 /* * IO definitions @@ -57,23 +75,6 @@ #define PCIO_BASE 0x03010000 /* - * Mapping areas - */ -#define IO_END 0x03ffffff -#define IO_BASE 0x03000000 -#define IO_SIZE (IO_END - IO_BASE) -#define IO_START 0x03000000 - -/* - * Screen mapping information - */ -#define SCREEN2_END 0x02078000 -#define SCREEN2_BASE 0x02000000 -#define SCREEN1_END SCREEN2_BASE -#define SCREEN1_BASE 0x01f88000 -#define SCREEN_START 0x02000000 - -/* * RAM definitions */ #define MAPTOPHYS(a) (((unsigned long)a & 0x007fffff) + PAGE_OFFSET) @@ -88,7 +89,6 @@ #define IOC_BASE 0x03200000 #define PCIO_FLOPPYDMABASE 0x0302a000 #define PCIO_BASE 0x03010000 -#define IO_BASE 0x03000000 #endif #endif diff --git a/include/asm-arm/arch-arc/ide.h b/include/asm-arm/arch-arc/ide.h index 24bc4899d..2fc6ce282 100644 --- a/include/asm-arm/arch-arc/ide.h +++ b/include/asm-arm/arch-arc/ide.h @@ -8,50 +8,44 @@ * * Modifications: * 04-04-1998 PJB Merged `arc' and `a5k' versions + * 01-07-1998 RMK Added new ide_ioregspec_t + * 29-07-1998 RMK Major re-work of IDE architecture specific code */ #include <linux/config.h> #include <asm/irq.h> -static __inline__ int -ide_default_irq(ide_ioreg_t base) +/* + * Set up a hw structure for a specified data port, control port and IRQ. + * This should follow whatever the default interface uses. + */ +static __inline__ void +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) { -#ifdef CONFIG_ARCH_A5K - if (base == 0x1f0) - return IRQ_HARDDISK; -#endif - return 0; -} + ide_ioreg_t reg = (ide_ioreg_t) data_port; + int i; -static __inline__ ide_ioreg_t -ide_default_io_base(int index) -{ -#ifdef CONFIG_ARCH_A5K - if (index == 0) - return 0x1f0; -#endif - return 0; -} + memset(hw, 0, sizeof(*hw)); -static __inline__ int -ide_default_stepping(int index) -{ - return 0; + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; + hw->irq = irq; } +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ static __inline__ void -ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int stepping, int *irq) +ide_init_default_hwifs(void) { - ide_ioreg_t port = base; - ide_ioreg_t ctrl = base + 0x206; - int i; +#ifdef CONFIG_ARCH_A5K + hw_regs_t hw; - i = 8; - while (i--) { - *p++ = port; - port += 1 << stepping; - } - *p++ = ctrl; - if (irq != NULL) - *irq = 0; + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK); + ide_register_hw(&hw, NULL); +#endif } diff --git a/include/asm-arm/arch-arc/io.h b/include/asm-arm/arch-arc/io.h index 0b77060c5..4e984bd3c 100644 --- a/include/asm-arm/arch-arc/io.h +++ b/include/asm-arm/arch-arc/io.h @@ -35,7 +35,7 @@ extern __inline__ void __outb (unsigned int value, unsigned int port) "tst %2, #0x80000000\n\t" "mov %0, %4\n\t" "addeq %0, %0, %3\n\t" - "strb %1, [%0, %2, lsl #2]" + "strb %1, [%0, %2, lsl #2] @ outb" : "=&r" (temp) : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) : "cc"); @@ -48,7 +48,7 @@ extern __inline__ void __outw (unsigned int value, unsigned int port) "tst %2, #0x80000000\n\t" "mov %0, %4\n\t" "addeq %0, %0, %3\n\t" - "str %1, [%0, %2, lsl #2]" + "str %1, [%0, %2, lsl #2] @ outw" : "=&r" (temp) : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) : "cc"); @@ -61,7 +61,7 @@ extern __inline__ void __outl (unsigned int value, unsigned int port) "tst %2, #0x80000000\n\t" "mov %0, %4\n\t" "addeq %0, %0, %3\n\t" - "str %1, [%0, %2, lsl #2]" + "str %1, [%0, %2, lsl #2] @ outl" : "=&r" (temp) : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) : "cc"); @@ -75,7 +75,7 @@ extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \ "tst %2, #0x80000000\n\t" \ "mov %0, %4\n\t" \ "addeq %0, %0, %3\n\t" \ - "ldr" ##instr## " %1, [%0, %2, lsl #2]" \ + "ldr" ##instr## " %1, [%0, %2, lsl #2] @ in"###fnsuffix \ : "=&r" (temp), "=r" (value) \ : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ : "cc"); \ @@ -110,11 +110,11 @@ DECLARE_IO(long,l,"") ({ \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "strb %0, [%1, %2]" \ + "strb %0, [%1, %2] @ outbc" \ : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "strb %0, [%1, %2]" \ + "strb %0, [%1, %2] @ outbc" \ : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ }) @@ -123,11 +123,11 @@ DECLARE_IO(long,l,"") unsigned char result; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "ldrb %0, [%1, %2]" \ + "ldrb %0, [%1, %2] @ inbc" \ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "ldrb %0, [%1, %2]" \ + "ldrb %0, [%1, %2] @ inbc" \ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ result; \ }) @@ -137,11 +137,11 @@ DECLARE_IO(long,l,"") unsigned long v = value; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "str %0, [%1, %2]" \ + "str %0, [%1, %2] @ outwc" \ : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "str %0, [%1, %2]" \ + "str %0, [%1, %2] @ outwc" \ : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ }) @@ -150,11 +150,11 @@ DECLARE_IO(long,l,"") unsigned short result; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "ldr %0, [%1, %2]" \ + "ldr %0, [%1, %2] @ inwc" \ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "ldr %0, [%1, %2]" \ + "ldr %0, [%1, %2] @ inwc" \ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ result & 0xffff; \ }) @@ -164,11 +164,11 @@ DECLARE_IO(long,l,"") unsigned long v = value; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "str %0, [%1, %2]" \ + "str %0, [%1, %2] @ outlc" \ : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "str %0, [%1, %2]" \ + "str %0, [%1, %2] @ outlc" \ : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ }) @@ -177,11 +177,11 @@ DECLARE_IO(long,l,"") unsigned long result; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ - "ldr %0, [%1, %2]" \ + "ldr %0, [%1, %2] @ inlc" \ : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ - "ldr %0, [%1, %2]" \ + "ldr %0, [%1, %2] @ inlc" \ : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ result; \ }) diff --git a/include/asm-arm/arch-arc/keyboard.h b/include/asm-arm/arch-arc/keyboard.h index 59272e269..388014703 100644 --- a/include/asm-arm/arch-arc/keyboard.h +++ b/include/asm-arm/arch-arc/keyboard.h @@ -35,3 +35,5 @@ extern unsigned char a5kkbd_sysrq_xlate[NR_SCANCODES]; #define kbd_sysrq_xlate a5kkbd_sysrq_xlate #define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) #define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) + +#define SYSRQ_KEY 13 diff --git a/include/asm-arm/arch-arc/processor.h b/include/asm-arm/arch-arc/processor.h index 314525eef..cb63936e4 100644 --- a/include/asm-arm/arch-arc/processor.h +++ b/include/asm-arm/arch-arc/processor.h @@ -26,12 +26,7 @@ /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ -#if 0 -#define TASK_UNMAPPED_BASE(off) (TASK_SIZE / 3) -#else #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) -#endif -#define TASK_UNMAPPED_ALIGN(addr, off) PAGE_ALIGN(addr) #define INIT_MMAP \ { &init_mm, 0, 0, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } diff --git a/include/asm-arm/arch-arc/system.h b/include/asm-arm/arch-arc/system.h index 3becc7b2f..9e2e99cfd 100644 --- a/include/asm-arm/arch-arc/system.h +++ b/include/asm-arm/arch-arc/system.h @@ -23,25 +23,25 @@ #endif -extern __inline__ void arch_hard_reset (void) +extern __inline__ void arch_reset(char mode) { - extern void ecard_reset (int card); + extern void ecard_reset(int card); + + /* + * Do any cleanups that the processor may require + */ + processor._proc_fin(); /* * Reset all expansion cards. */ - ecard_reset (-1); + ecard_reset(-1); /* * copy branch instruction to reset location and call it */ *(unsigned long *)0 = *(unsigned long *)0x03800000; ((void(*)(void))0)(); - - /* - * If that didn't work, loop endlessly - */ - while (1); } #endif |