Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3712 → Rev 3714

/trunk/kernel/kernel.config
40,28 → 40,28
@ "sparc64" Sun UltraSPARC 64-bit
! ARCH (choice)
 
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "icc_native" ICC Native
@ "suncc_native" Sun Studio C Compiler
! [ARCH=amd64|ARCH=ia32|ARCH=ia32xen] COMPILER (choice)
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "icc_native" ICC Native
! [ARCH=ia64] COMPILER (choice)
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "suncc_native" Sun Studio C Compiler
! [ARCH=sparc64] COMPILER (choice)
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "icc_native" ICC Native
@ "suncc_native" Sun Studio C Compiler
! [ARCH=amd64|ARCH=ia32|ARCH=ia32xen] COMPILER (choice)
 
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "icc_native" ICC Native
! [ARCH=ia64] COMPILER (choice)
 
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
@ "suncc_native" Sun Studio C Compiler
! [ARCH=sparc64] COMPILER (choice)
 
# Compiler
@ "gcc_cross" GCC Cross-compiler
@ "gcc_native" GCC Native
! [ARCH=arm32|ARCH=mips32|ARCH=ppc32|ARCH=ppc64] COMPILER (choice)
 
# CPU type
143,7 → 143,7
# Support for Z8530 serial port
! [ARCH=sparc64] CONFIG_Z8530 (y/n)
 
# Support for NS16550 serial port
# Support for NS16550 serial port
! [ARCH=sparc64|(ARCH=ia64&MACHINE!=ski)] CONFIG_NS16550 (n/y)
 
# Support for Serengeti console
/trunk/kernel/genarch/src/kbd/key.c
41,10 → 41,8
#endif
 
#if (defined(sparc64))
#if (defined(CONFIG_Z8530) || defined(CONFIG_NS16550))
#include <genarch/kbd/scanc_sun.h>
#endif
#endif
 
#include <synch/spinlock.h>
#include <console/chardev.h>
/trunk/kernel/arch/sparc64/src/drivers/kbd.c
86,21 → 86,20
*/
uint32_t interrupts;
prop = ofw_tree_getprop(node, "interrupts");
if (!prop || !prop->value)
if ((!prop) || (!prop->value))
panic("Can't find \"interrupts\" property.\n");
interrupts = *((uint32_t *) prop->value);
 
/*
* Read 'reg' property.
*/
prop = ofw_tree_getprop(node, "reg");
if (!prop || !prop->value)
if ((!prop) || (!prop->value))
panic("Can't find \"reg\" property.\n");
uintptr_t pa;
size_t size;
inr_t inr;
devno_t devno = device_assign_devno();
switch (kbd_type) {
case KBD_Z8530:
132,9 → 131,9
return;
};
break;
 
default:
panic("Unexpected type.\n");
panic("Unexpected keyboard type.\n");
}
/*
145,17 → 144,18
*/
aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
offset = pa - aligned_addr;
uintptr_t vaddr = hw_map(aligned_addr, offset + size) + offset;
 
switch (kbd_type) {
#ifdef CONFIG_Z8530
case KBD_Z8530:
z8530_init(devno, vaddr, inr, cir, cir_arg);
z8530_init(device_assign_devno(),
hw_map(aligned_addr, offset + size) + offset, inr, cir, cir_arg);
break;
#endif
#ifdef CONFIG_NS16550
case KBD_NS16550:
ns16550_init(devno, (ioport_t)vaddr, inr, cir, cir_arg);
ns16550_init(device_assign_devno(),
(ioport_t) (hw_map(aligned_addr, offset + size) + offset), inr, cir, cir_arg);
break;
#endif
default: