Changeset 03936831 in mainline for uspace/drv/bus


Ignore:
Timestamp:
2017-10-20T09:16:55Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1252e81
Parents:
fe1c48d (diff), 04efacc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline to fix build

Location:
uspace/drv/bus
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.c

    rfe1c48d r03936831  
    453453}
    454454
     455static void isa_fun_add_mem_range(isa_fun_t *fun, uintptr_t addr, size_t len)
     456{
     457        size_t count = fun->hw_resources.count;
     458        hw_resource_t *resources = fun->hw_resources.resources;
     459
     460        isa_bus_t *isa = isa_bus(ddf_fun_get_dev(fun->fnode));
     461
     462        if (count < ISA_MAX_HW_RES) {
     463                resources[count].type = MEM_RANGE;
     464                resources[count].res.mem_range.address = addr;
     465                resources[count].res.mem_range.address += isa->pio_win.mem.base;
     466                resources[count].res.mem_range.size = len;
     467                resources[count].res.mem_range.relative = true;
     468                resources[count].res.mem_range.endianness = LITTLE_ENDIAN;
     469
     470                fun->hw_resources.count++;
     471
     472                ddf_msg(LVL_NOTE, "Added mem range (addr=0x%zx, size=0x%x) to "
     473                    "function %s", (uintptr_t) addr, (unsigned int) len,
     474                    ddf_fun_get_name(fun->fnode));
     475        }
     476}
     477
    455478static void fun_parse_irq(isa_fun_t *fun, const char *val)
    456479{
     
    496519}
    497520
     521static void fun_parse_mem_range(isa_fun_t *fun, const char *val)
     522{
     523        uintptr_t addr;
     524        size_t len;
     525        char *end = NULL;
     526
     527        val = skip_spaces(val);
     528        addr = strtoul(val, &end, 0x10);
     529
     530        if (val == end)
     531                return;
     532
     533        val = skip_spaces(end);
     534        len = strtol(val, &end, 0x10);
     535
     536        if (val == end)
     537                return;
     538
     539        isa_fun_add_mem_range(fun, addr, len);
     540}
     541
    498542static void get_match_id(char **id, const char *val)
    499543{
     
    564608
    565609        if (!prop_parse(fun, line, "io_range", &fun_parse_io_range) &&
     610            !prop_parse(fun, line, "mem_range", &fun_parse_mem_range) &&
    566611            !prop_parse(fun, line, "irq", &fun_parse_irq) &&
    567612            !prop_parse(fun, line, "dma", &fun_parse_dma) &&
  • uspace/drv/bus/isa/isa.dev

    rfe1c48d r03936831  
     1i8259:
     2        match 100 isa/i8259
     3        mem_range 0x20 2
     4        mem_range 0xa0 2
     5
     6apic:
     7        match 100 isa/apic
     8        mem_range 0xfec00000 0x14
    19com1:
    210        match 100 isa/ns8250
  • uspace/drv/bus/pci/pciintel/pci.c

    rfe1c48d r03936831  
    293293        const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg);
    294294        pci_bus_t *bus = pci_bus_from_fun(fun);
    295         uint32_t val;
     295        uint32_t val = 0;
    296296       
    297297        fibril_mutex_lock(&bus->conf_mutex);
Note: See TracChangeset for help on using the changeset viewer.