Ignore:
Timestamp:
2017-11-26T10:22:30Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
474c68b
Parents:
5f4c41b2
Message:

Sun4v-con should get output buffer address via hw_res, too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/sun4v-con/sun4v-con.c

    r5f4c41b2 rf4cfd271  
    3838#include <io/chardev_srv.h>
    3939#include <stdbool.h>
    40 #include <sysinfo.h>
    4140
    4241#include "sun4v-con.h"
     
    115114        ddf_fun_set_conn_handler(fun, sun4v_con_connection);
    116115
    117         rc = physmem_map(res->base, 1, AS_AREA_READ | AS_AREA_WRITE,
     116        rc = physmem_map(res->in_base, 1, AS_AREA_READ | AS_AREA_WRITE,
    118117            (void *) &input_buffer);
    119118        if (rc != EOK) {
     
    122121        }
    123122
    124         sysarg_t paddr;
    125         rc = sysinfo_get_value("niagara.outbuf.address", &paddr);
    126         if (rc != EOK) {
    127                 ddf_msg(LVL_ERROR, "Outbuf address information not found");
    128                 return rc;
    129         }
    130 
    131123        output_fifo = (output_fifo_t *) AS_AREA_ANY;
    132124
    133         rc = physmem_map(paddr, 1, AS_AREA_READ | AS_AREA_WRITE,
     125        rc = physmem_map(res->out_base, 1, AS_AREA_READ | AS_AREA_WRITE,
    134126            (void *) &output_fifo);
    135127        if (rc != EOK) {
     
    150142        if (input_buffer != (input_buffer_t) AS_AREA_ANY)
    151143                physmem_unmap((void *) input_buffer);
     144
     145        if (output_fifo != (output_fifo_t *) AS_AREA_ANY)
     146                physmem_unmap((void *) output_fifo);
    152147
    153148        if (fun != NULL)
Note: See TracChangeset for help on using the changeset viewer.