Changeset a73ebf0 in mainline for boot/arch/sparc32/src/ambapp.c


Ignore:
Timestamp:
2013-10-15T16:34:04Z (11 years ago)
Author:
Jakub Klama <jakub.klama@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d2dba7
Parents:
1f12fab
Message:

Pass AMBA P&P devices and memory size info from loader to kernel
using bootinfo_t structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc32/src/ambapp.c

    r1f12fab ra73ebf0  
    5454void ambapp_scan()
    5555{
     56        amba_fake = false;
     57
    5658        /* Scan for AHB masters & slaves */
    5759        ambapp_scan_area(AMBAPP_AHBMASTER_AREA, 64);
     
    6466
    6567        /* If we found nothing, fake device entries */
    66         ambapp_qemu_fake_scan();
     68        if (amba_devices_found == 0)
     69                ambapp_qemu_fake_scan();
    6770}
    6871
     
    8083                amba_device_t *device = &amba_devices[amba_devices_found];
    8184                device->vendor_id = (amba_vendor_id_t)entry->vendor_id;
    82                 device->device_id = (amba_device_id_t)entry->device_id;
     85        device->device_id = (amba_device_id_t)entry->device_id;
    8386                device->version = entry->version;
    8487                device->irq = entry->irq;
     
    121124        amba_devices[2].bars[0].size = 0x100;
    122125
     126        amba_fake = true;
    123127        amba_devices_found = 3;
     128}
     129
     130bool ambapp_fake()
     131{
     132        return amba_fake;
    124133}
    125134
     
    130139        for (int i = 0; i < amba_devices_found; i++) {
    131140                amba_device_t *dev = &amba_devices[i];
    132                 printf("<%1x:%03x> at 0x%08x, irq %d\n", dev->vendor_id, dev->device_id, dev->bars[0].start, dev->irq);
     141                printf("<%1x:%03x> at 0x%08x ", dev->vendor_id, dev->device_id, dev->bars[0].start);
     142                if (dev->irq == -1)
     143                        printf("\n");
     144                else
     145                        printf("irq %d\n", dev->irq);
    133146        }
    134147}
Note: See TracChangeset for help on using the changeset viewer.