Changeset 9693835 in mainline


Ignore:
Timestamp:
2009-03-13T09:00:58Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b16e9d
Parents:
648c9d9
Message:

get back support for framebuffer and keyboard for sparc64 (generic)

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r648c9d9 r9693835  
    330330@ "generic" Keyboard or serial line
    331331@ "none" No input device
    332 ! [PLATFORM=ia32|PLATFORM=arm32|PLATFORM=amd64|PLATFORM=mips32] CONFIG_HID_IN (choice)
     332! [PLATFORM=ia32|PLATFORM=arm32|PLATFORM=amd64|PLATFORM=mips32|PLATFORM=sparc64] CONFIG_HID_IN (choice)
    333333
    334334% Output device class
    335335@ "generic" Monitor or serial line
    336336@ "none" No output device
    337 ! [PLATFORM=ia32|PLATFORM=amd64|(PLATFORM=mips32&MACHINE=msim)] CONFIG_HID_OUT (choice)
     337! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=sparc64|(PLATFORM=mips32&MACHINE=msim)] CONFIG_HID_OUT (choice)
    338338
    339339% Output device class
     
    366366! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32] CONFIG_ARM_PRN (y/n)
    367367
     368% Support for NS16550 controller
     369! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64] CONFIG_NS16550 (y/n)
     370
     371% Support for Z8530 controller
     372! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboardl)&PLATFORM=sparc64] CONFIG_Z8530 (y/n)
     373
    368374% i8042 controller support
    369375! [CONFIG_PC_KBD=y] CONFIG_I8042 (y)
    370376
     377% Sun keyboard support
     378! [PLATFORM=sparc64&(CONFIG_NS16550=y|CONFIG_Z8530=y] CONFIG_SUN_KBD (y)
     379
    371380% Dummy serial line input
    372381! [CONFIG_MIPS_KBD=y|CONFIG_ARM_KBD=y] CONFIG_DSRLNIN (y)
     
    384393#! [(CONFIG_HID_IN=keyboard&PLATFORM=sparc64)|(CONFIG_HID_IN=serial&PLATFORM=ia64)] CONFIG_NS16550 (y/n)
    385394
    386 #% Support for Z8530 controller
    387 #! [(CONFIG_HID_IN!=none|CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=sparc64] CONFIG_Z8530 (y/n)
    388 
    389395#% Support for Serengeti console
    390396#! [(CONFIG_HID_IN=serial|CONFIG_HID_OUT=serial)&MACHINE=serengeti] CONFIG_SGCN (y/n)
     
    393399#! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&MACHINE=i460GX] CONFIG_PC_KBD (y/n)
    394400
    395 #% Sun keyboard support
    396 #! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64] CONFIG_SUN_KBD (y/n)
    397 
    398401% EGA support
    399402! [CONFIG_HID_OUT=generic&(PLATFORM=ia32|PLATFORM=amd64)] CONFIG_EGA (y/n)
     
    409412
    410413% Framebuffer support
    411 ! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=monitor)&PLATFORM=arm32] CONFIG_FB (y/n)
    412 
    413 % Framebuffer support
    414 ! [CONFIG_HID_OUT=none] CONFIG_FB (n)
     414! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=monitor)&(PLATFORM=arm32|PLATFORM=sparc64)] CONFIG_FB (y/n)
    415415
    416416% Framebuffer width
     
    424424@ "1600"
    425425@ "2048"
    426 ! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_FB=y] CONFIG_VESA_WIDTH (choice)
     426! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_HID_OUT!=none&CONFIG_FB=y] CONFIG_VESA_WIDTH (choice)
    427427
    428428% Framebuffer height
     
    437437@ "1200"
    438438@ "1536"
    439 ! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_FB=y] CONFIG_VESA_HEIGHT (choice)
     439! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_HID_OUT!=none&CONFIG_FB=y] CONFIG_VESA_HEIGHT (choice)
    440440
    441441% Framebuffer depth
     
    443443@ "16"
    444444@ "24"
    445 ! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_FB=y] CONFIG_VESA_BPP (choice)
     445! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_HID_OUT!=none&CONFIG_FB=y] CONFIG_VESA_BPP (choice)
    446446
    447447% Start AP processors by the loader
  • kernel/arch/sparc64/Makefile.inc

    r648c9d9 r9693835  
    7777        arch/$(KARCH)/src/drivers/kbd.c \
    7878        arch/$(KARCH)/src/drivers/sgcn.c \
    79         arch/$(KARCH)/src/drivers/pci.c
     79        arch/$(KARCH)/src/drivers/pci.c \
     80        arch/$(KARCH)/src/drivers/fhc.c
    8081
    8182ifeq ($(CONFIG_FB),y)
     
    9495                arch/$(KARCH)/src/mm/tsb.c
    9596endif
    96 
    97 ifdef CONFIG_Z8530
    98         ARCH_SOURCES += \
    99                 arch/$(KARCH)/src/drivers/fhc.c
    100 endif
  • kernel/arch/sparc64/src/console.c

    r648c9d9 r9693835  
    6363{
    6464#ifdef CONFIG_FB
    65         ofw_tree_property_t *prop;
    66         ofw_tree_node_t *screen;
    67         ofw_tree_node_t *keyboard;
     65        ofw_tree_property_t *prop_scr = ofw_tree_getprop(aliases, "screen");
     66        if (!prop_scr)
     67                panic("Cannot find property 'screen'.");
     68        if (!prop_scr->value)
     69                panic("Cannot find screen alias.");
     70        ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value);
     71        if (!screen)
     72                panic("Cannot find %s.", prop_scr->value);
    6873       
    69         prop = ofw_tree_getprop(aliases, "screen");
    70         if (!prop)
    71                 panic("Cannot find property 'screen'.");
    72         if (!prop->value)
    73                 panic("Cannot find screen alias.");
    74         screen = ofw_tree_lookup(prop->value);
    75         if (!screen)
    76                 panic("Cannot find %s.", prop->value);
     74        scr_init(screen);
     75#endif
    7776
    78         scr_init(screen);
    79 
    80         prop = ofw_tree_getprop(aliases, "keyboard");
    81         if (!prop)
     77#ifdef CONFIG_SUN_KBD
     78        ofw_tree_property_t *prop_kbd = ofw_tree_getprop(aliases, "keyboard");
     79        if (!prop_kbd)
    8280                panic("Cannot find property 'keyboard'.");
    83         if (!prop->value)
     81        if (!prop_kbd->value)
    8482                panic("Cannot find keyboard alias.");
    85         keyboard = ofw_tree_lookup(prop->value);
     83        ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value);
    8684        if (!keyboard)
    87                 panic("Cannot find %s.", prop->value);
    88 
     85                panic("Cannot find %s.", prop_kbd->value);
     86       
    8987        kbd_init(keyboard);
    90 #else
    91         panic("Standard console requires FB, "
    92               "but the kernel is not compiled with FB support.");
    9388#endif
    9489}
  • kernel/arch/sparc64/src/drivers/kbd.c

    r648c9d9 r9693835  
    5858kbd_type_t kbd_type = KBD_UNKNOWN;
    5959
    60 #if defined (CONFIG_Z8530) || defined (CONFIG_NS16550)
     60#ifdef CONFIG_SUN_KBD
    6161
    6262/** Initialize keyboard.
     
    169169                    offset;
    170170               
    171                 indev_t *kbrdin = z8530_init(z8530, devno, inr, cir, cir_arg);
    172                 if (kbrdin)
    173                         kbrd_init(kbrdin);
     171                indev_t *kbrdin_z8530 = z8530_init(z8530, devno, inr, cir, cir_arg);
     172                if (kbrdin_z8530)
     173                        kbrd_init(kbrdin_z8530);
    174174               
    175175                /*
     
    192192                    offset;
    193193               
    194                 indev_t *kbrdin = ns16550_init(ns16550, devno, inr, cir, cir_arg);
    195                 if (kbrdin)
    196                         kbrd_init(kbrdin);
     194                indev_t *kbrdin_ns16550 = ns16550_init(ns16550, devno, inr, cir, cir_arg);
     195                if (kbrdin_ns16550)
     196                        kbrd_init(kbrdin_ns16550);
    197197               
    198198                /*
     
    215215}
    216216
    217         #endif
     217#endif
     218
    218219/** @}
    219220 */
  • kernel/genarch/include/drivers/z8530/z8530.h

    r648c9d9 r9693835  
    121121} z8530_instance_t;
    122122
    123 extern devin_t *z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *);
     123extern indev_t *z8530_init(z8530_t *, devno_t, inr_t, cir_t, void *);
    124124
    125125#endif
  • kernel/genarch/src/drivers/dsrln/dsrlnin.c

    r648c9d9 r9693835  
    4040#include <arch/asm.h>
    4141
    42 indev_operations_t kbrdin_ops = {
     42static indev_operations_t kbrdin_ops = {
    4343        .poll = NULL
    4444};
  • kernel/genarch/src/drivers/i8042/i8042.c

    r648c9d9 r9693835  
    4343#include <mm/slab.h>
    4444
    45 indev_operations_t kbrdin_ops = {
     45static indev_operations_t kbrdin_ops = {
    4646        .poll = NULL
    4747};
  • kernel/genarch/src/drivers/ns16550/ns16550.c

    r648c9d9 r9693835  
    4343#define LSR_DATA_READY  0x01
    4444
    45 indev_operations_t kbrdin_ops = {
     45static indev_operations_t kbrdin_ops = {
    4646        .poll = NULL
    4747};
     
    6565        if (pio_read_8(&dev->lsr) & LSR_DATA_READY) {
    6666                uint8_t x = pio_read_8(&dev->rbr);
    67                 chardev_push_character(&instance->kbrdin, x);
     67                indev_push_character(&instance->kbrdin, x);
    6868        }
    6969}
  • kernel/genarch/src/drivers/z8530/z8530.c

    r648c9d9 r9693835  
    4141#include <mm/slab.h>
    4242
    43 indev_operations_t kbrdin_ops = {
     43static indev_operations_t kbrdin_ops = {
    4444        .poll = NULL
    4545};
     
    8383        if (z8530_read(&dev->ctl_a, RR0) & RR0_RCA) {
    8484                uint8_t x = z8530_read(&dev->ctl_a, RR8);
    85                 chardev_push_character(&instance->kbrdin, x);
     85                indev_push_character(&instance->kbrdin, x);
    8686        }
    8787}
Note: See TracChangeset for help on using the changeset viewer.