add support for PC-9800 architecture (4/26) core #1
RFC PATCH 1/1 add support for PC-9800 architecture (4/26) core #1
This is part 4/26 of patchset for add support NEC PC-9800 architecture, against 2.5.43.
Summary:
i386 core modules
- IO port address change
- IRQ number change
- adapted to hardware memory mapping.
- CLOCK_TICK_RATE constat to variable.
some PC-9800 can change base clock by hardware switch!
diffstat:
arch/i386/Makefile | 17 + arch/i386/config.in | 19 + arch/i386/kernel/Makefile | 4 arch/i386/kernel/cpu/proc.c | 2 arch/i386/kernel/i8259.c | 100 ++++---- arch/i386/kernel/pc9800_debug.c | 362 ++++++++++++++++++++++++++++++++ arch/i386/kernel/reboot.c | 11 arch/i386/kernel/setup.c | 93 ++++++++ arch/i386/kernel/time.c | 128 +++++++++++ arch/i386/kernel/timers/timer_pit.c | 23 +- arch/i386/kernel/timers/timer_tsc.c | 42 +++ arch/i386/kernel/traps.c | 22 + arch/i386/kernel/vm86.c | 21 + arch/i386/mach-generic/io_ports.h | 20 + arch/i386/mach-pc9800/Makefile | 15 + arch/i386/mach-pc9800/do_timer.h | 80 +++++++ arch/i386/mach-pc9800/entry_arch.h | 34 +++ arch/i386/mach-pc9800/io_ports.h | 20 + arch/i386/mach-pc9800/irq_vectors.h | 85 +++++++ arch/i386/mach-pc9800/mach_apic.h | 46 ++++ arch/i386/mach-pc9800/setup.c | 113 +++++++++ arch/i386/mach-pc9800/setup_arch_post.h | 29 ++ arch/i386/mach-pc9800/setup_arch_pre.h | 36 +++ arch/i386/mach-pc9800/smpboot_hooks.h | 33 ++ arch/i386/mach-summit/io_ports.h | 20 + arch/i386/mach-visws/io_ports.h | 20 + 26 files changed, 1325 insertions(+), 70 deletions(-)
patch:
arch/i386/Makefile +17 -0
@@ -46,8 +46,14 @@ ifdef CONFIG_VISWS MACHINE := mach-visws else +ifdef CONFIG_PC9800 +MACHINE := mach-pc9800 +else +ifndef MACHINE MACHINE := mach-generic endif +endif +endif HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
@@ -63,15 +69,25 @@ CFLAGS += -Iarch/i386/$(MACHINE) AFLAGS += -Iarch/i386/$(MACHINE) +makeboot98 = $(call descend,arch/i386/boot98,$(1)) +ifndef CONFIG_PC9800 makeboot = $(call descend,arch/i386/boot,$(1)) +else +makeboot = $(makeboot98) +endif .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \ clean archclean archmrproper all: bzImage +ifndef CONFIG_PC9800 BOOTIMAGE=arch/i386/boot/bzImage zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot/zImage +else +BOOTIMAGE=arch/i386/boot98/bzImage +zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot98/zImage +endif zImage bzImage: vmlinux +@$(call makeboot,$(BOOTIMAGE))
@@ -89,5 +105,6 @@ archclean: +@$(call makeboot,clean) + +@$(call makeboot98,clean) archmrproper:
arch/i386/config.in +18 -1
@@ -267,6 +267,7 @@ mainmenu_option next_comment comment 'Bus options (PCI, PCMCIA, EISA, MCA, ISA)' +bool 'NEC PC-9801/PC-9821 support' CONFIG_PC9800 # Visual Workstation support is utterly broken. # If you want to see it working mail an VW540 to [email protected] 8) #bool 'SGI Visual Workstation support' CONFIG_VISWS
@@ -299,9 +300,13 @@ source drivers/pci/Config.in bool 'ISA support' CONFIG_ISA +if [ "$CONFIG_PC9800" != "y" ]; then dep_bool 'EISA support' CONFIG_EISA $CONFIG_ISA +else + define_bool CONFIG_EISA n +fi -if [ "$CONFIG_VISWS" != "y" ]; then +if [ "$CONFIG_VISWS" != "y" -a "$CONFIG_PC9800" != "y" ]; then bool 'MCA support' CONFIG_MCA else define_bool CONFIG_MCA n
@@ -421,11 +426,20 @@ if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' + if [ "$CONFIG_PC9800" = "y" ]; then + bool 'PC-9800 GDC text console' CONFIG_GDC_CONSOLE + dep_bool ' Enable 32-bit access to text video RAM' CONFIG_GDC_32BITACCESS $CONFIG_GDC_CONSOLE + else bool 'VGA text console' CONFIG_VGA_CONSOLE bool 'Video mode selection support' CONFIG_VIDEO_SELECT if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE + fi + fi + if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + if [ "$CONFIG_PC9800" != "y" -o "$CONFIG_GDC_CONSOLE" = "y" ]; then source drivers/video/Config.in + fi fi endmenu fi
@@ -461,6 +475,9 @@ bool ' Highmem debugging' CONFIG_DEBUG_HIGHMEM fi bool ' Load all symbols for debugging/kksymoops' CONFIG_KALLSYMS + if [ "$CONFIG_PC9800" = "y" ]; then + bool ' Save kernel messages into UCG-RAM' CONFIG_PC9800_UCGLOG + fi fi if [ "$CONFIG_X86_LOCAL_APIC" = "y" ]; then
arch/i386/kernel/Makefile +4 -0
@@ -10,6 +10,10 @@ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o bluesmoke.o dmi_scan.o \ bootflag.o +ifeq ($(CONFIG_PC9800),y) +export-objs += pc9800_debug.o +obj-$(CONFIG_PC9800) += pc9800_debug.o +endif obj-y += cpu/ obj-y += timers/
arch/i386/kernel/cpu/proc.c +1 -1
@@ -76,7 +76,7 @@seq_printf (m,"cache size\t: %d KB\n" , c->x86_cache_size);/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */ - fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu); + fpu_exception = c->hard_math && (ignore_fpu_irq || cpu_has_fpu);seq_printf (m,"fdiv_bug\t: %s\n" "hlt_bug\t\t: %s\n" "f00f_bug\t: %s\n"
arch/i386/kernel/i8259.c +55 -45
190 lines not on this page · raw message
arch/i386/kernel/pc9800_debug.c +362 -0
362 lines not on this page · raw message
arch/i386/kernel/reboot.c +11 -0
@@ -125,6 +125,7 @@0xea ,0x00 ,0x00 ,0xff ,0xff /* ljmp $0xffff,$0x0000 */ }; +#ifndef CONFIG_PC9800 static inline void kb_wait (void ) {int i;
@@ -133,6 +134,7 @@if ((inb_p (0x64 ) &0x02 ) ==0 ) break; } +#endif /* !CONFIG_PC9800 */ /* * Switch to real mode and then execute the code
@@ -141,7 +143,9 @@*/ void machine_real_restart (unsigned char *code,int length) { +#ifndef CONFIG_PC9800 unsigned long flags; +#endif local_irq_disable ();
@@ -155,9 +159,11 @@safe side. (Yes, CMOS_WRITE does outb_p's. - Paul G.) */ +#ifndef CONFIG_PC9800 spin_lock_irqsave (&rtc_lock, flags);CMOS_WRITE (0x00 ,0x8f );spin_unlock_irqrestore (&rtc_lock, flags); +#endif /* Remap the kernel at virtual address zero, as well as offset zero from the kernel segment. This assumes the kernel segment starts at
@@ -264,6 +270,7 @@/* rebooting needs to touch the page at absolute addr 0 */ *((unsigned short *)__va (0x472 )) = reboot_mode;for (;;) { +#ifndef CONFIG_PC9800 int i;for (i=0 ; i<100 ; i++) {kb_wait ();
@@ -271,6 +278,10 @@outb (0xfe ,0x64 );/* pulse reset low */ udelay(50); } +#else /* CONFIG_PC9800 */ +outb (0 ,0xf0 );/* signal CPU reset */ +mdelay (1 ); +#endif /* !CONFIG_PC9800 */ /* That didn't work - force a triple fault.. */ __asm__ __volatile__("lidt %0" : :"m" (no_idt)); __asm__ __volatile__("int3" );
arch/i386/kernel/setup.c +92 -1
177 lines not on this page · raw message
arch/i386/kernel/time.c +125 -3
216 lines not on this page · raw message
arch/i386/kernel/timers/timer_pit.c +16 -7
@@ -3,6 +3,7 @@* See comments there for proper credits. */ +#include <linux/config.h> #include <linux/spinlock.h> #include <linux/module.h> #include <linux/device.h>
@@ -13,6 +14,7 @@extern spinlock_t i8259A_lock;extern spinlock_t i8253_lock;#include "do_timer.h" +#include "io_ports.h" static int init_pit (void ) {
@@ -61,7 +63,8 @@ {int count; -static int count_p =LATCH ;/* for the first call after boot */ +static int count_p; +static int is_1st_boot =1 ;/* for the first call after boot */ static unsigned long jiffies_p =0 ;/*
@@ -69,12 +72,18 @@*/ unsigned long jiffies_t; +/* on NEC PC-9801, LATCH in not constant */ +if (is_1st_boot) { + is_1st_boot =0 ; + count_p =LATCH ; + } +/* gets recalled with irq locally disabled */ spin_lock (&i8253_lock);/* timer count may underflow right here */ -outb_p (0x00 ,0x43 );/* latch the count ASAP */ +outb_p (0x00 ,PIT_MODE );/* latch the count ASAP */ - count =inb_p (0x40 );/* read the latched count */ + count =inb_p (PIT_CH0 );/* read the latched count */ /* * We do this guaranteed double memory access instead of a _p
@@ -82,13 +91,13 @@*/ jiffies_t = jiffies; - count |=inb_p (0x40 ) <<8 ; + count |=inb_p (PIT_CH0 ) <<8 ;/* VIA686a test code... reset the latch if count > max + 1 */ if (count >LATCH ) { -outb_p (0x34 ,0x43 ); -outb_p (LATCH &0xff ,0x40 ); -outb (LATCH >>8 ,0x40 ); +outb_p (0x34 ,PIT_MODE ); +outb_p (LATCH &0xff ,PIT_CH0 ); +outb (LATCH >>8 ,PIT_CH0 ); count =LATCH -1 ; }
arch/i386/kernel/timers/timer_tsc.c +36 -6
96 lines not on this page · raw message
arch/i386/kernel/traps.c +20 -2
@@ -448,11 +448,14 @@printk ("Uhhuh. NMI received. Dazed and confused, but trying to continue\n" );printk ("You probably have a hardware problem with your RAM chips\n" ); +#ifndef CONFIG_PC9800 /* Clear and disable the memory parity error line. */ reason = (reason &0xf ) |4 ;outb (reason,0x61 ); +#endif } +#ifndef CONFIG_PC9800 static void io_check_error (unsigned char reason,struct pt_regs * regs) {unsigned long i;
@@ -468,6 +471,7 @@ reason &= ~8 ; outb(reason, 0x61); } +#endif /* CONFIG_PC9800 */ static void unknown_nmi_error (unsigned char reason,struct pt_regs * regs) {
@@ -487,7 +491,11 @@static void default_do_nmi (struct pt_regs * regs) { +#ifndef CONFIG_PC9800 unsigned char reason =inb (0x61 ); +#else +unsigned char reason =inb (0x33 ) <<5 ; +#endif if (!(reason &0xc0 )) {#if CONFIG_X86_LOCAL_APIC
@@ -506,6 +514,7 @@if (reason &0x80 )mem_parity_error (reason, regs); if (reason & 0x40) +#ifndef CONFIG_PC9800 io_check_error (reason, regs);/* * Reassert NMI in case it became active meanwhile
@@ -515,6 +524,15 @@inb (0x71 );/* dummy */ outb (0x0f ,0x70 );inb (0x71 );/* dummy */ +#else +mem_parity_error (reason, regs); + +/* clear memory error flags */ +outb (0x08 ,0x37 ); +outb (0x09 ,0x37 ); +outb (0x09 ,0x50 );/* disable NMI once */ +outb (0x09 ,0x52 );/* re-enable it */ +#endif }static int dummy_nmi_callback (struct pt_regs * regs,int cpu)
@@ -697,7 +715,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code) { - ignore_irq13 =1 ; + ignore_fpu_irq =1 ;math_error ((void *)regs->eip); }
@@ -754,7 +772,7 @@ {if (cpu_has_xmm) {/* Handle SIMD FPU exceptions on PIII+ processors. */ - ignore_irq13 =1 ; + ignore_fpu_irq =1 ;simd_math_error ((void *)regs->eip); }else {/*
arch/i386/kernel/vm86.c +17 -4
@@ -30,6 +30,7 @@* */ +#include <linux/config.h> #include <linux/errno.h> #include <linux/sched.h> #include <linux/kernel.h>
@@ -732,10 +733,22 @@free_vm86_irq (i); } +#ifndef CONFIG_PC9800 +# define ILLEGAL_IRQ (irq) ((irq) < 3 || (irq) > 15) +# define FIRST_VM86_IRQ 3 +#else +/* +* On PC-9800, slave PIC is wired master PIC's IR7, +* so that we don't allow vm86 to grab IRQ7. +*/ +# define ILLEGAL_IRQ (irq) ((irq) < 2 || (irq) == 7 || (irq) > 15) +# define FIRST_VM86_IRQ 2 +#endif +static inline void handle_irq_zombies (void ) {int i; -for (i=3 ; i<16 ; i++) { +for (i=FIRST_VM86_IRQ ; i<16 ; i++) {if (vm86_irqs[i].tsk) {if (task_valid (vm86_irqs[i].tsk))continue ;free_vm86_irq (i);
@@ -748,7 +761,7 @@int bit;unsigned long flags; -if ( (irqnumber<3 ) || (irqnumber>15 ) )return 0 ; +if (ILLEGAL_IRQ (irqnumber))return 0 ;if (vm86_irqs[irqnumber].tsk != current)return 0 ;spin_lock_irqsave (&irqbits_lock, flags); bit = irqbits & (1 << irqnumber);
@@ -774,7 +787,7 @@handle_irq_zombies ();if (!capable (CAP_SYS_ADMIN ))return -EPERM ;if (!((1 << sig) &ALLOWED_SIGS ))return -EPERM ; -if ( (irq<3 ) || (irq>15 ) )return -EPERM ; +if (ILLEGAL_IRQ (irq))return -EPERM ;if (vm86_irqs[irq].tsk)return -EPERM ; ret =request_irq (irq, &irq_handler,0 ,VM86_IRQNAME ,0 );if (ret)return ret;
@@ -784,7 +797,7 @@ }case VM86_FREE_IRQ : {handle_irq_zombies (); -if ( (irqnumber<3 ) || (irqnumber>15 ) )return -EPERM ; +if (ILLEGAL_IRQ (irqnumber))return -EPERM ;if (!vm86_irqs[irqnumber].tsk)return 0 ;if (vm86_irqs[irqnumber].tsk != current)return -EPERM ;free_vm86_irq (irqnumber);
arch/i386/mach-generic/io_ports.h +20 -0
@@ -0,0 +1,20 @@ +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +/* i8259A PIC registers */ +#define PIC_MASTER_CMD 0x20 +#define PIC_MASTER_IMR 0x21 +#define PIC_MASTER_ISR PIC_MASTER_CMD +#define PIC_MASTER_POLL PIC_MASTER_ISR +#define PIC_MASTER_OCW3 PIC_MASTER_ISR +#define PIC_SLAVE_CMD 0xa0 +#define PIC_SLAVE_IMR 0xa1 + +/* i8259A PIC related value */ +#define PIC_CASCADE_IR 2 +#define MASTER_ICW4_DEFAULT 0x01 +#define SLAVE_ICW4_DEFAULT 0x01 +#define PIC_ICW4_AEOI 2 +
arch/i386/mach-pc9800/Makefile +15 -0
@@ -0,0 +1,15 @@ +# +# Makefile for the linux kernel. +# +# Note! Dependencies are done automagically by 'make dep', which also +# removes any old dependencies. DON'T put your own dependencies here +# unless it's something special (ie not a .c file). +# +# Note 2! The CFLAGS definitions are now in the main makefile... + +EXTRA_CFLAGS += -I../kernel +export-objs := + +obj-y := setup.o + +include $(TOPDIR)/Rules.make
arch/i386/mach-pc9800/do_timer.h +80 -0
80 lines not on this page · raw message
arch/i386/mach-pc9800/entry_arch.h +34 -0
@@ -0,0 +1,34 @@ +/* +* This file is designed to contain the BUILD_INTERRUPT specifications for +* all of the extra named interrupt vectors used by the architecture. +* Usually this is the Inter Process Interrupts (IPIs) +*/ + +/* +* The following vectors are part of the Linux architecture, there +* is no hardware IRQ pin equivalent for them, they are triggered +* through the ICC by us (IPIs) +*/ +#ifdef CONFIG_X86_SMP +BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) +BUILD_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR) +BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) +#endif + +/* +* every pentium local APIC has two 'local interrupts', with a +* soft-definable vector attached to both interrupts, one of +* which is a timer interrupt, the other one is error counter +* overflow. Linux uses the local APIC timer interrupt to get +* a much simpler SMP time architecture: +*/ +#ifdef CONFIG_X86_LOCAL_APIC +BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) +BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) +BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) + +#ifdef CONFIG_X86_MCE_P4THERMAL +BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) +#endif + +#endif
arch/i386/mach-pc9800/io_ports.h +20 -0
@@ -0,0 +1,20 @@ +/* i8253A PIT registers */ +#define PIT_MODE 0x77 +#define PIT_CH0 0x71 +#define PIT_CH2 0x75 + +/* i8259A PIC registers */ +#define PIC_MASTER_CMD 0x00 +#define PIC_MASTER_IMR 0x02 +#define PIC_MASTER_ISR PIC_MASTER_CMD +#define PIC_MASTER_POLL PIC_MASTER_ISR +#define PIC_MASTER_OCW3 PIC_MASTER_ISR +#define PIC_SLAVE_CMD 0x08 +#define PIC_SLAVE_IMR 0x0a + +/* i8259A PIC related values */ +#define PIC_CASCADE_IR 7 +#define MASTER_ICW4_DEFAULT 0x1d +#define SLAVE_ICW4_DEFAULT 0x09 +#define PIC_ICW4_AEOI 0x02 +
arch/i386/mach-pc9800/irq_vectors.h +85 -0
85 lines not on this page · raw message
arch/i386/mach-pc9800/mach_apic.h +46 -0
46 lines not on this page · raw message
arch/i386/mach-pc9800/setup.c +113 -0
113 lines not on this page · raw message
arch/i386/mach-pc9800/setup_arch_post.h +29 -0
@@ -0,0 +1,29 @@ +/** +* machine_specific_memory_setup - Hook for machine specific memory setup. +* +* Description: +* This is included late in kernel/setup.c so that it can make +* use of all of the static functions. +**/ + +static inline char *__init machine_specific_memory_setup (void ) +{ +char *who; +unsigned long low_mem_size, lower_high, higher_high; + + + who ="BIOS (common area)" ; + + low_mem_size = ((*(unsigned char *)__va (PC9800SCA_BIOS_FLAG ) &7 ) +1 ) <<17 ; +add_memory_region (0 , low_mem_size,1 ); + lower_high = (__u32) *(__u8 *)bus_to_virt (PC9800SCA_EXPMMSZ ) <<17 ; + higher_high = (__u32) *(__u16 *)bus_to_virt (PC9800SCA_MMSZ16M ) <<20 ; +if (lower_high !=0x00f00000UL ) { +add_memory_region (HIGH_MEMORY , lower_high,1 ); +add_memory_region (0x01000000UL , higher_high,1 ); + } +else +add_memory_region (HIGH_MEMORY , lower_high + higher_high,1 ); + +return who; +}
arch/i386/mach-pc9800/setup_arch_pre.h +36 -0
@@ -0,0 +1,36 @@ +/* Hook to call BIOS initialisation function */ + +/* no action for generic */ + +#define ARCH_SETUP arch_setup_pc9800(); + +#include <linux/timex.h> +#include <asm/io.h> +#include <asm/pc9800.h> +#include <asm/pc9800_sca.h> + +int CLOCK_TICK_RATE ; +unsigned long tick_usec;/* ACTHZ period (usec) */ +unsigned long tick_nsec;/* USER_HZ period (nsec) */ +unsigned char pc9800_misc_flags; +/* (bit 0) 1:High Address Video ram exists 0:otherwise */ + +#ifdef CONFIG_SMP +#define MPC_TABLE_SIZE 512 +#define MPC_TABLE ((char *) (PARAM+0x400)) +char mpc_table[MPC_TABLE_SIZE ]; +#endif + +static inline void arch_setup_pc9800 (void ) +{ +CLOCK_TICK_RATE =PC9800_8MHz_P () ?1996800 :2457600 ; +printk (KERN_DEBUG "CLOCK_TICK_RATE = %d\n" ,CLOCK_TICK_RATE ); + tick_usec =TICK_USEC ;/* ACTHZ period (usec) */ + tick_nsec =TICK_NSEC (TICK_USEC );/* USER_HZ period (nsec) */ + + pc9800_misc_flags =PC9800_MISC_FLAGS ; +#ifdef CONFIG_SMP +if ((*(u32 *)(MPC_TABLE )) ==0x504d4350 ) +memcpy (mpc_table,MPC_TABLE , *(u16 *)(MPC_TABLE +4 )); +#endif /* CONFIG_SMP */ +}
arch/i386/mach-pc9800/smpboot_hooks.h +33 -0
@@ -0,0 +1,33 @@ +/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws +* which needs to alter them. */ + +static inline void smpboot_clear_io_apic_irqs (void ) +{ + io_apic_irqs =0 ; +} + +static inline void smpboot_setup_warm_reset_vector (void ) +{ +/* +* Install writable page 0 entry to set BIOS data area. +*/ +local_flush_tlb (); + +/* +* Paranoid: Set warm reset code and vector here back +* to default values. +*/ +outb (0x0f ,0x37 );/* SHUT0 = 1 */ + + *((volatile long *)phys_to_virt (0x404 )) =0 ; +} + +static inline void smpboot_setup_io_apic (void ) +{ +/* +* Here we can be sure that there is an IO-APIC in the system. Let's +* go and set it up: +*/ +if (!skip_ioapic_setup && nr_ioapics) +setup_IO_APIC (); +}
arch/i386/mach-summit/io_ports.h +20 -0
@@ -0,0 +1,20 @@ +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +/* i8259A PIC registers */ +#define PIC_MASTER_CMD 0x20 +#define PIC_MASTER_IMR 0x21 +#define PIC_MASTER_ISR PIC_MASTER_CMD +#define PIC_MASTER_POLL PIC_MASTER_ISR +#define PIC_MASTER_OCW3 PIC_MASTER_ISR +#define PIC_SLAVE_CMD 0xa0 +#define PIC_SLAVE_IMR 0xa1 + +/* i8259A PIC related value */ +#define PIC_CASCADE_IR 2 +#define MASTER_ICW4_DEFAULT 0x01 +#define SLAVE_ICW4_DEFAULT 0x01 +#define PIC_ICW4_AEOI 2 +
arch/i386/mach-visws/io_ports.h +20 -0
@@ -0,0 +1,20 @@ +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +/* i8259A PIC registers */ +#define PIC_MASTER_CMD 0x20 +#define PIC_MASTER_IMR 0x21 +#define PIC_MASTER_ISR PIC_MASTER_CMD +#define PIC_MASTER_POLL PIC_MASTER_ISR +#define PIC_MASTER_OCW3 PIC_MASTER_ISR +#define PIC_SLAVE_CMD 0xa0 +#define PIC_SLAVE_IMR 0xa1 + +/* i8259A PIC related value */ +#define PIC_CASCADE_IR 2 +#define MASTER_ICW4_DEFAULT 0x01 +#define SLAVE_ICW4_DEFAULT 0x01 +#define PIC_ICW4_AEOI 2 +