Changeset 00287cc in mainline for kernel/arch/arm32/src/arm32.c


Ignore:
Timestamp:
2009-03-12T23:26:32Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
648c9d9
Parents:
3b122e9
Message:

arm32: update for the new scheme of device drivers and keyboard/serial modules
streamline arm32 port (as GXemul is still the only machine supported), more cleanup is needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/arm32.c

    r3b122e9 r00287cc  
    4040#include <genarch/fb/fb.h>
    4141#include <genarch/fb/visuals.h>
     42#include <genarch/drivers/dsrln/dsrlnin.h>
     43#include <genarch/drivers/dsrln/dsrlnout.h>
     44#include <genarch/srln/srln.h>
     45#include <sysinfo/sysinfo.h>
    4246#include <ddi/irq.h>
    43 #include <arch/debug/print.h>
     47#include <arch/drivers/gxemul.h>
    4448#include <print.h>
    4549#include <config.h>
    4650#include <interrupt.h>
    4751#include <arch/regutils.h>
    48 #include <arch/machine.h>
    4952#include <userspace.h>
    5053#include <macros.h>
     
    7679void arch_post_mm_init(void)
    7780{
    78         machine_hw_map_init();
    79 
     81        gxemul_init();
     82       
    8083        /* Initialize exception dispatch table */
    8184        exception_init();
    82 
    8385        interrupt_init();
    8486       
    85         machine_console_init(device_assign_devno());
    86 
    8787#ifdef CONFIG_FB
    8888        fb_properties_t prop = {
    89                 .addr = machine_get_fb_address(),
     89                .addr = GXEMUL_FB_ADDRESS,
    9090                .offset = 0,
    9191                .x = 640,
     
    9595        };
    9696        fb_init(&prop);
    97 #endif
     97#else
     98#ifdef CONFIG_ARM_PRN
     99        dsrlnout_init((ioport8_t *) gxemul_kbd);
     100#endif /* CONFIG_ARM_PRN */
     101#endif /* CONFIG_FB */
    98102}
    99103
     
    124128void arch_post_smp_init(void)
    125129{
     130#ifdef CONFIG_ARM_KBD
     131        devno_t devno = device_assign_devno();
     132       
     133        /*
     134         * Initialize the msim/GXemul keyboard port. Then initialize the serial line
     135         * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts.
     136         */
     137        indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) gxemul_kbd, devno, GXEMUL_KBD_IRQ);
     138        if (kbrdin)
     139                srln_init(kbrdin);
     140       
     141        /*
     142         * This is the necessary evil until the userspace driver is entirely
     143         * self-sufficient.
     144         */
     145        sysinfo_set_item_val("kbd", NULL, true);
     146        sysinfo_set_item_val("kbd.devno", NULL, devno);
     147        sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ);
     148        sysinfo_set_item_val("kbd.address.virtual", NULL, (unative_t) gxemul_kbd);
     149#endif
    126150}
    127151
     
    157181void cpu_halt(void)
    158182{
    159         machine_cpu_halt();
     183        *((char *) (gxemul_kbd + GXEMUL_HALT_OFFSET))
     184                = 0;
    160185}
    161186
Note: See TracChangeset for help on using the changeset viewer.