Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1841 → Rev 1842

/trunk/kernel/arch/sparc64/include/drivers/z8530.h
36,6 → 36,7
#define KERN_sparc64_Z8530_H_
 
#include <arch/types.h>
#include <arch/drivers/kbd.h>
 
#define STATUS_REG 4
#define COMMAND_REG 4
43,8 → 44,6
 
#define LAST_REG DATA_REG
 
extern volatile uint8_t *kbd_virt_address;
 
static inline void z8530_data_write(uint8_t data)
{
kbd_virt_address[DATA_REG] = data;
65,8 → 64,6
kbd_virt_address[COMMAND_REG] = command;
}
 
extern void kbd_init(void);
 
#endif
 
/** @}
/trunk/kernel/arch/sparc64/include/drivers/kbd.h
0,0 → 1,47
/*
* Copyright (C) 2006 Jakub Jermar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup sparc64
* @{
*/
/** @file
*/
 
#ifndef KERN_sparc64_KBD_H_
#define KERN_sparc64_KBD_H_
 
#include <arch/types.h>
 
extern volatile uint8_t *kbd_virt_address;
 
extern void kbd_init(void);
 
#endif
 
/** @}
*/
/trunk/kernel/arch/sparc64/Makefile.inc
64,8 → 64,7
#
 
CONFIG_Z8530 = y
CONFIG_KBD_SUN = y
DEFS += -DCONFIG_KBD_SUN
DEFS += -DCONFIG_Z8530
 
ARCH_SOURCES = \
arch/$(ARCH)/src/cpu/cpu.c \
/trunk/kernel/arch/sparc64/src/console.c
37,8 → 37,15
#include <typedefs.h>
#include <genarch/fb/fb.h>
#include <arch/drivers/fb.h>
#include <arch/drivers/i8042.h>
#include <genarch/i8042/i8042.h>
 
#include <arch/drivers/kbd.h>
#ifdef CONFIG_Z8530
#include <genarch/kbd/z8530.h>
#endif
#ifdef CONFIG_16550A
#include <genarch/kbd/16550a.h>
#endif
 
#include <console/chardev.h>
#include <console/console.h>
#include <arch/asm.h>
71,7 → 78,12
return;
while (1) {
i8042_poll();
#ifdef CONFIG_Z8530
z8530_poll();
#endif
#ifdef CONFIG_16550A
16550a_poll();
#endif
thread_usleep(KEYBOARD_POLL_PAUSE);
}
}
/trunk/kernel/arch/sparc64/src/mm/tlb.c
47,9 → 47,6
#include <arch/asm.h>
#include <symtab.h>
 
#include <arch/drivers/fb.h>
#include <arch/drivers/i8042.h>
 
char *context_encoding[] = {
"Primary",
"Secondary",
60,8 → 57,7
void tlb_arch_init(void)
{
/*
* TLBs are actually initialized by
* take_over_tlb_and_tt() early
* TLBs are actually initialized early
* in start.S.
*/
}
/trunk/kernel/arch/sparc64/src/drivers/kbd.c
32,6 → 32,7
/** @file
*/
 
#include <arch/drivers/kbd.h>
#ifdef CONFIG_Z8530
#include <genarch/kbd/z8530.h>
#endif
38,10 → 39,12
#ifdef CONFIG_16650A
#include <genarch/kbd/16650a.h>
#endif
 
#include <arch/boot/boot.h>
#include <arch/mm/page.h>
#include <arch/types.h>
#include <typedefs.h>
#include <align.h>
 
volatile uint8_t *kbd_virt_address = NULL;
 
50,6 → 53,9
size_t offset;
uintptr_t aligned_addr;
 
/* FIXME: supply value read from OpenFirmware */
bootinfo.keyboard.size = 8;
 
/*
* We need to pass aligned address to hw_map().
* However, the physical keyboard address can
/trunk/kernel/arch/amd64/Makefile.inc
61,8 → 61,6
#
 
CONFIG_I8042 = y
CONFIG_I8042_PC = y
DEFS += -DCONFIG_I8042_PC
 
## Accepted configuration directives
#
/trunk/kernel/arch/amd64/src/amd64.c
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup amd64
/** @addtogroup amd64
* @{
*/
/** @file
41,7 → 41,7
#include <proc/thread.h>
#include <arch/drivers/ega.h>
#include <arch/drivers/vesa.h>
#include <genarch/i8042/i8042.h>
#include <genarch/kbd/i8042.h>
#include <arch/drivers/i8254.h>
#include <arch/drivers/i8259.h>
 
208,6 → 208,5
i8042_release();
}
 
/** @}
/** @}
*/
 
/trunk/kernel/arch/ia32/Makefile.inc
80,8 → 80,6
#
 
CONFIG_I8042 = y
CONFIG_I8042_PC = y
DEFS += -DCONFIG_I8042_PC
 
## Accepted configuration directives
#
/trunk/kernel/arch/ia32/src/ia32.c
41,7 → 41,7
 
#include <arch/drivers/ega.h>
#include <arch/drivers/vesa.h>
#include <genarch/i8042/i8042.h>
#include <genarch/kbd/i8042.h>
#include <arch/drivers/i8254.h>
#include <arch/drivers/i8259.h>