Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/platform/sun4v/sun4v.c

    rf4cfd271 rb7fd2a0  
    4141#include <ddf/log.h>
    4242#include <errno.h>
     43#include <str_error.h>
    4344#include <ops/hw_res.h>
    4445#include <ops/pio_window.h>
     
    5455} sun4v_fun_t;
    5556
    56 static int sun4v_dev_add(ddf_dev_t *dev);
     57static errno_t sun4v_dev_add(ddf_dev_t *dev);
    5758
    5859static driver_ops_t sun4v_ops = {
     
    113114}
    114115
    115 static int sun4v_enable_interrupt(ddf_fun_t *fun, int irq)
    116 {
    117         return true;
     116static errno_t sun4v_enable_interrupt(ddf_fun_t *fun, int irq)
     117{
     118        return EOK;
    118119}
    119120
     
    137138static ddf_dev_ops_t sun4v_fun_ops;
    138139
    139 static int sun4v_add_fun(ddf_dev_t *dev, const char *name,
     140static errno_t sun4v_add_fun(ddf_dev_t *dev, const char *name,
    140141    const char *str_match_id, sun4v_fun_t *fun_proto)
    141142{
     
    143144
    144145        ddf_fun_t *fnode = NULL;
    145         int rc;
     146        errno_t rc;
    146147
    147148        /* Create new device. */
     
    187188}
    188189
    189 static int sun4v_add_functions(ddf_dev_t *dev)
    190 {
    191         int rc;
     190static errno_t sun4v_add_functions(ddf_dev_t *dev)
     191{
     192        errno_t rc;
    192193
    193194        rc = sun4v_add_fun(dev, "console", "sun4v/console", &console_data);
     
    199200
    200201/** Add device. */
    201 static int sun4v_dev_add(ddf_dev_t *dev)
     202static errno_t sun4v_dev_add(ddf_dev_t *dev)
    202203{
    203204        ddf_msg(LVL_DEBUG, "sun4v_dev_add, device handle = %d",
     
    212213}
    213214
    214 static int sun4v_init(void)
    215 {
    216         int rc;
     215static errno_t sun4v_init(void)
     216{
     217        errno_t rc;
    217218        sysarg_t paddr;
    218219
     
    228229        rc = sysinfo_get_value("niagara.inbuf.address", &paddr);
    229230        if (rc != EOK) {
    230                 ddf_msg(LVL_ERROR, "niagara.inbuf.address not set (%d)", rc);
     231                ddf_msg(LVL_ERROR, "niagara.inbuf.address not set: %s", str_error(rc));
    231232                return rc;
    232233        }
     
    236237        rc = sysinfo_get_value("niagara.outbuf.address", &paddr);
    237238        if (rc != EOK) {
    238                 ddf_msg(LVL_ERROR, "niagara.outbuf.address not set (%d)", rc);
     239                ddf_msg(LVL_ERROR, "niagara.outbuf.address not set: %s", str_error(rc));
    239240                return rc;
    240241        }
     
    246247int main(int argc, char *argv[])
    247248{
    248         int rc;
     249        errno_t rc;
    249250
    250251        printf(NAME ": Sun4v platform driver\n");
Note: See TracChangeset for help on using the changeset viewer.