Changeset 1410f35 in mainline


Ignore:
Timestamp:
2009-03-12T18:08:04Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91ea7c4
Parents:
b76e51d
Message:

use generic dsrlnin and dsrlnout devices instead of platform specific msim keyboard and console

Location:
kernel/arch/mips32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/console.c

    rb76e51d r1410f35  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    3434
    3535#include <console/console.h>
    36 #include <arch/console.h>
    37 #include <arch/drivers/serial.h>
    38 #include <arch/drivers/msim.h>
    3936#include <genarch/fb/fb.h>
    4037
     
    4744        fb_redraw();
    4845#endif
    49         msim_kbd_grab();
    5046}
    5147
     
    5551void arch_release_console(void)
    5652{
    57         msim_kbd_release();
    5853}
    5954
  • kernel/arch/mips32/src/mips32.c

    rb76e51d r1410f35  
    5353#include <genarch/fb/fb.h>
    5454#include <genarch/fb/visuals.h>
     55#include <genarch/drivers/dsrln/dsrlnin.h>
     56#include <genarch/drivers/dsrln/dsrlnout.h>
     57#include <genarch/srln/srln.h>
    5558#include <macros.h>
    5659#include <ddi/device.h>
     
    134137{
    135138        interrupt_init();
    136         msim_console(device_assign_devno());
     139       
    137140#ifdef CONFIG_FB
    138141        /* GXemul framebuffer */
     
    146149        };
    147150        fb_init(&gxemul_prop);
     151#else
     152#ifdef CONFIG_MIPS_PRN
     153        dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS);
     154#endif /* CONFIG_MIPS_PRN */
     155#endif /* CONFIG_FB */
     156}
     157
     158void arch_post_cpu_init(void)
     159{
     160}
     161
     162void arch_pre_smp_init(void)
     163{
     164}
     165
     166void arch_post_smp_init(void)
     167{
     168#ifdef CONFIG_MIPS_KBD
     169        devno_t devno = device_assign_devno();
     170       
     171        /*
     172         * Initialize the msim/GXemul keyboard port. Then initialize the serial line
     173         * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts.
     174         */
     175        indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, devno, MSIM_KBD_IRQ);
     176        if (kbrdin) {
     177                srln_init(kbrdin);
     178                cp0_unmask_int(MSIM_KBD_IRQ);
     179        }
     180       
     181        /*
     182         * This is the necessary evil until the userspace driver is entirely
     183         * self-sufficient.
     184         */
     185        sysinfo_set_item_val("kbd", NULL, true);
     186        sysinfo_set_item_val("kbd.devno", NULL, devno);
     187        sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ);
     188        sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS);
    148189#endif
    149 
    150 #ifdef MACHINE_msim
    151         sysinfo_set_item_val("machine.msim", NULL, 1);
    152 #endif
    153 
    154 #ifdef MACHINE_simics
    155         sysinfo_set_item_val("machine.simics", NULL, 1);
    156 #endif
    157 
    158 #ifdef MACHINE_bgxemul
    159         sysinfo_set_item_val("machine.bgxemul", NULL, 1);
    160 #endif
    161 
    162 #ifdef MACHINE_lgxemul
    163         sysinfo_set_item_val("machine.lgxemul", NULL, 1);
    164 #endif
    165 }
    166 
    167 void arch_post_cpu_init(void)
    168 {
    169 }
    170 
    171 void arch_pre_smp_init(void)
    172 {
    173 }
    174 
    175 void arch_post_smp_init(void)
    176 {
    177190}
    178191
     
    223236{
    224237        ___halt();
    225        
    226238        while (1);
    227239}
Note: See TracChangeset for help on using the changeset viewer.