Changeset c7a7656 in mainline for arch/mips32/src/drivers/arc.c


Ignore:
Timestamp:
2005-09-12T20:25:21Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1c9b02df
Parents:
72dde3a
Message:

Added more code to arc.
Fixed bad name in byteorder.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/drivers/arc.c

    r72dde3a rc7a7656  
    4646};
    4747
     48static char *ctypes[] = {
     49        "ARC_type",
     50        "CPU_type",
     51        "FPU_type",
     52        "PrimaryICache",
     53        "PrimaryDCache",
     54        "SecondaryICache",
     55        "SecondaryDCache",
     56        "SecondaryCache",
     57        "Memory",
     58        "EISAAdapter",
     59        "TCAdapter",
     60        "SCSIAdapter",
     61        "DTIAdapter",
     62        "MultiFunctionAdapter",
     63        "DiskController",
     64        "TapeController",
     65        "CDROMController",
     66        "WORMController",
     67        "SerialController",
     68        "NetworkController",
     69        "DisplayController",
     70        "ParallelController",
     71        "PointerController",
     72        "KeyboardController",
     73        "AudioController",
     74        "OtherController",
     75        "DiskPeripheral",
     76        "FloppyDiskPeripheral",
     77        "TapePeripheral",
     78        "ModemPeripheral",
     79        "MonitorPeripheral",
     80        "PrinterPeripheral",
     81        "PointerPeripheral",
     82        "KeyboardPeripheral",
     83        "TerminalPeripheral",
     84        "OtherPeripheral",
     85        "LinePeripheral",
     86        "NetworkPeripheral"
     87        "OtherPeripheral",
     88        "XTalkAdapter",
     89        "PCIAdapter",
     90        "GIOAdapter",
     91        "TPUAdapter",
     92        "Anonymous"
     93};
     94
    4895static arc_sbp *sbp = (arc_sbp *)PA2KA(0x1000);
    4996static arc_func_vector_t *arc_entry;
     
    75122}
    76123
     124static void arc_print_component(arc_component *c)
     125{
     126        int i;
     127
     128        printf("%s: ",ctypes[c->type]);
     129        for (i=0;i < c->identifier_len;i++)
     130                putchar(c->identifier[i]);
     131        putchar('\n');
     132}
     133
     134void arc_print_devices(void)
     135{
     136        arc_component *c,*next;
     137
     138        if (!arc_enabled())
     139                return;
     140
     141        c = arc_entry->getchild(NULL);
     142        while (c) {
     143                arc_print_component(c);
     144                next = arc_entry->getchild(c);
     145                while (!next) {
     146                        next = arc_entry->getpeer(c);
     147                        if (!next)
     148                                c = arc_entry->getparent(c);
     149                        if (!c)
     150                                return;
     151                }
     152                c = next;
     153        }
     154}
     155
    77156void arc_print_memory_map(void)
    78157{
    79158        arc_memdescriptor_t *desc;
    80159
    81         if (!sbp) {
     160        if (!arc_enabled()) {
    82161                printf("ARC not enabled.\n");
    83162                return;
Note: See TracChangeset for help on using the changeset viewer.