Ignore:
Timestamp:
2011-05-12T16:49:44Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f36787d7
Parents:
e80329d6 (diff), 750636a (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 changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    re80329d6 rb5e68c8  
    4040#include <libarch/ddi.h>
    4141#include <devmap.h>
    42 #include <ipc/ipc.h>
    4342#include <ipc/char.h>
    4443#include <async.h>
     
    4847#include <sysinfo.h>
    4948#include <errno.h>
     49#include <inttypes.h>
    5050
    5151#include "s3c24xx_uart.h"
     
    9292                return -1;
    9393
    94         rc = devmap_device_register(NAMESPACE "/" NAME, &uart->dev_handle);
     94        rc = devmap_device_register(NAMESPACE "/" NAME, &uart->devmap_handle);
    9595        if (rc != EOK) {
    96                 devmap_hangup_phone(DEVMAP_DRIVER);
    97                 printf(NAME ": Unable to register device %s.\n");
     96                printf(NAME ": Unable to register device %s.\n",
     97                    NAMESPACE "/" NAME);
    9898                return -1;
    9999        }
     
    114114        ipc_callid_t callid;
    115115        ipc_call_t call;
    116         ipcarg_t method;
     116        sysarg_t method;
    117117        int retval;
    118118
    119119        /* Answer the IPC_M_CONNECT_ME_TO call. */
    120         ipc_answer_0(iid, EOK);
     120        async_answer_0(iid, EOK);
    121121
    122122        while (1) {
    123123                callid = async_get_call(&call);
    124                 method = IPC_GET_METHOD(call);
     124                method = IPC_GET_IMETHOD(call);
    125125                switch (method) {
    126126                case IPC_M_PHONE_HUNGUP:
    127127                        /* The other side has hung up. */
    128                         ipc_answer_0(callid, EOK);
     128                        async_answer_0(callid, EOK);
    129129                        return;
    130130                case IPC_M_CONNECT_TO_ME:
     
    134134                        break;
    135135                case CHAR_WRITE_BYTE:
    136                         printf(NAME ": write %d to device\n",
     136                        printf(NAME ": write %" PRIun " to device\n",
    137137                            IPC_GET_ARG1(call));
    138138                        s3c24xx_uart_sendb(uart, (uint8_t) IPC_GET_ARG1(call));
     
    143143                        break;
    144144                }
    145                 ipc_answer_0(callid, retval);
     145                async_answer_0(callid, retval);
    146146        }
    147147}
     
    185185        uart->client_phone = -1;
    186186
    187         printf(NAME ": device at physical address 0x%x, inr %d.\n",
    188             uart->paddr, inr);
     187        printf(NAME ": device at physical address %p, inr %" PRIun ".\n",
     188            (void *) uart->paddr, inr);
    189189
    190190        async_set_interrupt_received(s3c24xx_uart_irq_handler);
    191191
    192         ipc_register_irq(inr, device_assign_devno(), 0, &uart_irq_code);
     192        register_irq(inr, device_assign_devno(), 0, &uart_irq_code);
    193193
    194194        /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
Note: See TracChangeset for help on using the changeset viewer.