Changeset 336d2f52 in mainline for kernel


Ignore:
Timestamp:
2011-07-02T21:16:24Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e944e4c
Parents:
d2fac08c
Message:

Remove support for Sun hardware for which we have no test plan.

This includes the removal of the following functionality only available
via the Simics simulator, for which we have been unable to secure a
license:

  • FHC bus and interrupt controller
  • Zilog 8530 serial controller attached to Sun keyboard
  • Serengeti and SGCN support
Location:
kernel
Files:
8 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/Makefile.inc

    rd2fac08c r336d2f52  
    8484        arch/$(KARCH)/src/drivers/tick.c \
    8585        arch/$(KARCH)/src/drivers/kbd.c \
    86         arch/$(KARCH)/src/drivers/sgcn.c \
    8786        arch/$(KARCH)/src/drivers/pci.c \
    88         arch/$(KARCH)/src/drivers/fhc.c \
    8987        arch/$(KARCH)/src/trap/$(USARCH)/interrupt.c
    9088
  • kernel/arch/sparc64/src/console.c

    rd2fac08c r336d2f52  
    3838#include <arch/drivers/scr.h>
    3939#include <arch/drivers/kbd.h>
    40 #include <arch/drivers/sgcn.h>
    4140#include <genarch/srln/srln.h>
    4241#include <console/chardev.h>
     
    8988}
    9089
    91 /** Initilize I/O on the Serengeti machine. */
    92 static void serengeti_init(void)
    93 {
    94 #ifdef CONFIG_SGCN_KBD
    95         sgcn_instance_t *sgcn_instance = sgcnin_init();
    96         if (sgcn_instance) {
    97                 srln_instance_t *srln_instance = srln_init();
    98                 if (srln_instance) {
    99                         indev_t *sink = stdin_wire();
    100                         indev_t *srln = srln_wire(srln_instance, sink);
    101                         sgcnin_wire(sgcn_instance, srln);
    102                 }
    103         }
    104 #endif
    105        
    106 #ifdef CONFIG_SGCN_PRN
    107         outdev_t *sgcndev = sgcnout_init();
    108         if (sgcndev)
    109                 stdout_wire(sgcndev);
    110 #endif
    111 }
    112 
    11390/**
    11491 * Initialize input/output. Auto-detects the type of machine
     
    127104        prop = ofw_tree_getprop(aliases, "def-cn");
    128105       
    129         if ((!prop) || (!prop->value) || (str_cmp(prop->value, "/sgcn") != 0)) {
     106        if ((!prop) || (!prop->value))
    130107                standard_console_init(aliases);
    131         } else {
    132                 serengeti_init();
    133         }
    134108}
    135109
  • kernel/arch/sparc64/src/drivers/kbd.c

    rd2fac08c r336d2f52  
    3535#include <arch/drivers/kbd.h>
    3636#include <genarch/ofw/ofw_tree.h>
    37 #include <genarch/ofw/fhc.h>
    3837#include <genarch/ofw/ebus.h>
    3938#include <console/console.h>
     
    5150#endif
    5251
    53 #ifdef CONFIG_Z8530
    54 #include <genarch/drivers/z8530/z8530.h>
    55 #endif
    56 
    5752#ifdef CONFIG_NS16550
    5853#include <genarch/drivers/ns16550/ns16550.h>
     
    6055
    6156#ifdef CONFIG_SUN_KBD
    62 
    63 #ifdef CONFIG_Z8530
    64 
    65 static bool kbd_z8530_init(ofw_tree_node_t *node)
    66 {
    67         const char *name = ofw_tree_node_name(node);
    68        
    69         if (str_cmp(name, "zs") != 0)
    70                 return false;
    71        
    72         /*
    73          * Read 'interrupts' property.
    74          */
    75         ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts");
    76         if ((!prop) || (!prop->value)) {
    77                 printf("z8530: Unable to find interrupts property\n");
    78                 return false;
    79         }
    80        
    81         uint32_t interrupts = *((uint32_t *) prop->value);
    82        
    83         /*
    84          * Read 'reg' property.
    85          */
    86         prop = ofw_tree_getprop(node, "reg");
    87         if ((!prop) || (!prop->value)) {
    88                 printf("z8530: Unable to find reg property\n");
    89                 return false;
    90         }
    91        
    92         size_t size = ((ofw_fhc_reg_t *) prop->value)->size;
    93        
    94         uintptr_t pa;
    95         if (!ofw_fhc_apply_ranges(node->parent,
    96             ((ofw_fhc_reg_t *) prop->value), &pa)) {
    97                 printf("z8530: Failed to determine address\n");
    98                 return false;
    99         }
    100        
    101         inr_t inr;
    102         cir_t cir;
    103         void *cir_arg;
    104         if (!ofw_fhc_map_interrupt(node->parent,
    105             ((ofw_fhc_reg_t *) prop->value), interrupts, &inr, &cir,
    106             &cir_arg)) {
    107                 printf("z8530: Failed to determine interrupt\n");
    108                 return false;
    109         }
    110        
    111         /*
    112          * We need to pass aligned address to hw_map().
    113          * However, the physical keyboard address can
    114          * be pretty much unaligned, depending on the
    115          * underlying controller.
    116          */
    117         uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
    118         size_t offset = pa - aligned_addr;
    119        
    120         z8530_t *z8530 = (z8530_t *)
    121             (hw_map(aligned_addr, offset + size) + offset);
    122        
    123         z8530_instance_t *z8530_instance = z8530_init(z8530, inr, cir, cir_arg);
    124         if (z8530_instance) {
    125                 kbrd_instance_t *kbrd_instance = kbrd_init();
    126                 if (kbrd_instance) {
    127                         indev_t *sink = stdin_wire();
    128                         indev_t *kbrd = kbrd_wire(kbrd_instance, sink);
    129                         z8530_wire(z8530_instance, kbrd);
    130                 }
    131         }
    132        
    133         /*
    134          * This is the necessary evil until the userspace drivers are
    135          * entirely self-sufficient.
    136          */
    137         sysinfo_set_item_val("kbd", NULL, true);
    138         sysinfo_set_item_val("kbd.inr", NULL, inr);
    139         sysinfo_set_item_val("kbd.address.kernel", NULL,
    140             (uintptr_t) z8530);
    141         sysinfo_set_item_val("kbd.address.physical", NULL, pa);
    142         sysinfo_set_item_val("kbd.type.z8530", NULL, true);
    143        
    144         return true;
    145 }
    146 
    147 #endif /* CONFIG_Z8530 */
    14857
    14958#ifdef CONFIG_NS16550
     
    243152void kbd_init(ofw_tree_node_t *node)
    244153{
    245 #ifdef CONFIG_Z8530
    246         kbd_z8530_init(node);
    247 #endif
    248        
    249154#ifdef CONFIG_NS16550
    250155        kbd_ns16550_init(node);
  • kernel/genarch/Makefile.inc

    rd2fac08c r336d2f52  
    100100endif
    101101
    102 ifeq ($(CONFIG_Z8530),y)
    103         GENARCH_SOURCES += \
    104                 genarch/src/drivers/z8530/z8530.c
    105 endif
    106 
    107102ifeq ($(CONFIG_VIA_CUDA),y)
    108103        GENARCH_SOURCES += \
     
    141136        GENARCH_SOURCES += \
    142137                genarch/src/ofw/ebus.c \
    143                 genarch/src/ofw/fhc.c \
    144138                genarch/src/ofw/pci.c  \
    145139                genarch/src/ofw/sbus.c \
Note: See TracChangeset for help on using the changeset viewer.