Changeset c4fb95d3 in mainline for uspace/srv/hw


Ignore:
Timestamp:
2011-02-18T20:04:56Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d011038
Parents:
87e373b (diff), 8b1ea2d4 (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.

Location:
uspace/srv/hw
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r87e373b rc4fb95d3  
    209209
    210210        if (dev_addr < 0) {
    211                 ipc_answer_0(iid, EINVAL);
     211                async_answer_0(iid, EINVAL);
    212212                return;
    213213        }
    214214
    215215        /* Answer the IPC_M_CONNECT_ME_TO call. */
    216         ipc_answer_0(iid, EOK);
     216        async_answer_0(iid, EOK);
    217217
    218218        while (1) {
     
    222222                case IPC_M_PHONE_HUNGUP:
    223223                        /* The other side has hung up. */
    224                         ipc_answer_0(callid, EOK);
     224                        async_answer_0(callid, EOK);
    225225                        return;
    226226                case IPC_M_CONNECT_TO_ME:
     
    245245                        break;
    246246                }
    247                 ipc_answer_0(callid, retval);
     247                async_answer_0(callid, retval);
    248248        }
    249249}
     
    276276        cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_kernel)->ifr;
    277277        async_set_interrupt_received(cuda_irq_handler);
    278         ipc_register_irq(10, device_assign_devno(), 0, &cuda_irq_code);
     278        register_irq(10, device_assign_devno(), 0, &cuda_irq_code);
    279279
    280280        /* Enable SR interrupt. */
  • uspace/srv/hw/char/i8042/i8042.c

    r87e373b rc4fb95d3  
    4040#include <libarch/ddi.h>
    4141#include <devmap.h>
    42 #include <ipc/ipc.h>
    4342#include <async.h>
    4443#include <unistd.h>
     
    199198        i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status;
    200199        i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data;
    201         ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);
    202         ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);
     200        register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);
     201        register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);
    203202        printf("%s: registered for interrupts %" PRIun " and %" PRIun "\n",
    204203            NAME, inr_a, inr_b);
     
    236235
    237236        if (dev_id < 0) {
    238                 ipc_answer_0(iid, EINVAL);
     237                async_answer_0(iid, EINVAL);
    239238                return;
    240239        }
    241240
    242241        /* Answer the IPC_M_CONNECT_ME_TO call. */
    243         ipc_answer_0(iid, EOK);
     242        async_answer_0(iid, EOK);
    244243
    245244        printf(NAME ": accepted connection\n");
     
    251250                case IPC_M_PHONE_HUNGUP:
    252251                        /* The other side has hung up. */
    253                         ipc_answer_0(callid, EOK);
     252                        async_answer_0(callid, EOK);
    254253                        return;
    255254                case IPC_M_CONNECT_TO_ME:
     
    272271                        break;
    273272                }
    274                 ipc_answer_0(callid, retval);
     273                async_answer_0(callid, retval);
    275274        }
    276275}
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    r87e373b rc4fb95d3  
    4040#include <libarch/ddi.h>
    4141#include <devmap.h>
    42 #include <ipc/ipc.h>
    4342#include <ipc/char.h>
    4443#include <async.h>
     
    119118
    120119        /* Answer the IPC_M_CONNECT_ME_TO call. */
    121         ipc_answer_0(iid, EOK);
     120        async_answer_0(iid, EOK);
    122121
    123122        while (1) {
     
    127126                case IPC_M_PHONE_HUNGUP:
    128127                        /* The other side has hung up. */
    129                         ipc_answer_0(callid, EOK);
     128                        async_answer_0(callid, EOK);
    130129                        return;
    131130                case IPC_M_CONNECT_TO_ME:
     
    144143                        break;
    145144                }
    146                 ipc_answer_0(callid, retval);
     145                async_answer_0(callid, retval);
    147146        }
    148147}
     
    191190        async_set_interrupt_received(s3c24xx_uart_irq_handler);
    192191
    193         ipc_register_irq(inr, device_assign_devno(), 0, &uart_irq_code);
     192        register_irq(inr, device_assign_devno(), 0, &uart_irq_code);
    194193
    195194        /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
  • uspace/srv/hw/irc/apic/apic.c

    r87e373b rc4fb95d3  
    3636 */
    3737
    38 #include <ipc/ipc.h>
    3938#include <ipc/services.h>
    4039#include <ipc/irc.h>
     
    7574         * Answer the first IPC_M_CONNECT_ME_TO call.
    7675         */
    77         ipc_answer_0(iid, EOK);
     76        async_answer_0(iid, EOK);
    7877       
    7978        while (true) {
     
    8281                switch (IPC_GET_IMETHOD(call)) {
    8382                case IRC_ENABLE_INTERRUPT:
    84                         ipc_answer_0(callid, apic_enable_irq(IPC_GET_ARG1(call)));
     83                        async_answer_0(callid, apic_enable_irq(IPC_GET_ARG1(call)));
    8584                        break;
    8685                case IRC_CLEAR_INTERRUPT:
    8786                        /* Noop */
    88                         ipc_answer_0(callid, EOK);
     87                        async_answer_0(callid, EOK);
    8988                        break;
    9089                default:
    91                         ipc_answer_0(callid, EINVAL);
     90                        async_answer_0(callid, EINVAL);
    9291                        break;
    9392                }
     
    108107       
    109108        async_set_client_connection(apic_connection);
    110         sysarg_t phonead;
    111         ipc_connect_to_me(PHONE_NS, SERVICE_APIC, 0, 0, &phonead);
     109        service_register(SERVICE_APIC);
    112110       
    113111        return true;
  • uspace/srv/hw/irc/fhc/fhc.c

    r87e373b rc4fb95d3  
    2929/** @addtogroup fhc
    3030 * @{
    31  */ 
     31 */
    3232
    3333/**
    34  * @file        fhc.c
    35  * @brief       FHC bus controller driver.
     34 * @file fhc.c
     35 * @brief FHC bus controller driver.
    3636 */
    3737
    38 #include <ipc/ipc.h>
    3938#include <ipc/services.h>
    4039#include <ipc/irc.h>
     
    7675         * Answer the first IPC_M_CONNECT_ME_TO call.
    7776         */
    78         ipc_answer_0(iid, EOK);
     77        async_answer_0(iid, EOK);
    7978
    8079        while (1) {
     
    8584                case IRC_ENABLE_INTERRUPT:
    8685                        /* Noop */
    87                         ipc_answer_0(callid, EOK);
     86                        async_answer_0(callid, EOK);
    8887                        break;
    8988                case IRC_CLEAR_INTERRUPT:
     
    9291                        case FHC_UART_INR:
    9392                                fhc_uart_virt[FHC_UART_ICLR] = 0;
    94                                 ipc_answer_0(callid, EOK);
     93                                async_answer_0(callid, EOK);
    9594                                break;
    9695                        default:
    97                                 ipc_answer_0(callid, ENOTSUP);
     96                                async_answer_0(callid, ENOTSUP);
    9897                                break;
    9998                        }
    10099                        break;
    101100                default:
    102                         ipc_answer_0(callid, EINVAL);
     101                        async_answer_0(callid, EINVAL);
    103102                        break;
    104103                }
     
    137136       
    138137        async_set_client_connection(fhc_connection);
    139         sysarg_t phonead;
    140         ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, &phonead);
     138        service_register(SERVICE_FHC);
    141139       
    142140        return true;
  • uspace/srv/hw/irc/i8259/i8259.c

    r87e373b rc4fb95d3  
    3636 */
    3737
    38 #include <ipc/ipc.h>
    3938#include <ipc/services.h>
    4039#include <ipc/irc.h>
     
    109108         * Answer the first IPC_M_CONNECT_ME_TO call.
    110109         */
    111         ipc_answer_0(iid, EOK);
     110        async_answer_0(iid, EOK);
    112111       
    113112        while (true) {
     
    116115                switch (IPC_GET_IMETHOD(call)) {
    117116                case IRC_ENABLE_INTERRUPT:
    118                         ipc_answer_0(callid, pic_enable_irq(IPC_GET_ARG1(call)));
     117                        async_answer_0(callid, pic_enable_irq(IPC_GET_ARG1(call)));
    119118                        break;
    120119                case IRC_CLEAR_INTERRUPT:
    121120                        /* Noop */
    122                         ipc_answer_0(callid, EOK);
     121                        async_answer_0(callid, EOK);
    123122                        break;
    124123                default:
    125                         ipc_answer_0(callid, EINVAL);
     124                        async_answer_0(callid, EINVAL);
    126125                        break;
    127126                }
     
    150149       
    151150        async_set_client_connection(i8259_connection);
    152         sysarg_t phonead;
    153         ipc_connect_to_me(PHONE_NS, SERVICE_I8259, 0, 0, &phonead);
     151        service_register(SERVICE_I8259);
    154152       
    155153        return true;
  • uspace/srv/hw/irc/obio/obio.c

    r87e373b rc4fb95d3  
    2727 */
    2828
    29 /** @addtogroup obio 
     29/** @addtogroup obio
    3030 * @{
    31  */ 
     31 */
    3232
    3333/**
    34  * @file        obio.c
    35  * @brief       OBIO driver.
     34 * @file obio.c
     35 * @brief OBIO driver.
    3636 *
    3737 * OBIO is a short for on-board I/O. On UltraSPARC IIi and systems with U2P,
     
    4242 */
    4343
    44 #include <ipc/ipc.h>
    4544#include <ipc/services.h>
    4645#include <ipc/irc.h>
     
    8685         * Answer the first IPC_M_CONNECT_ME_TO call.
    8786         */
    88         ipc_answer_0(iid, EOK);
     87        async_answer_0(iid, EOK);
    8988
    9089        while (1) {
     
    9594                case IRC_ENABLE_INTERRUPT:
    9695                        /* Noop */
    97                         ipc_answer_0(callid, EOK);
     96                        async_answer_0(callid, EOK);
    9897                        break;
    9998                case IRC_CLEAR_INTERRUPT:
    10099                        inr = IPC_GET_ARG1(call);
    101100                        base_virt[OBIO_CIR(inr & INO_MASK)] = 0;
    102                         ipc_answer_0(callid, EOK);
     101                        async_answer_0(callid, EOK);
    103102                        break;
    104103                default:
    105                         ipc_answer_0(callid, EINVAL);
     104                        async_answer_0(callid, EINVAL);
    106105                        break;
    107106                }
     
    138137       
    139138        async_set_client_connection(obio_connection);
    140         sysarg_t phonead;
    141         ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, &phonead);
     139        service_register(SERVICE_OBIO);
    142140       
    143141        return true;
  • uspace/srv/hw/netif/ne2000/ne2000.c

    r87e373b rc4fb95d3  
    4343#include <malloc.h>
    4444#include <sysinfo.h>
    45 #include <ipc/ipc.h>
    4645#include <ipc/services.h>
     46#include <ipc/ns.h>
    4747#include <ipc/irc.h>
    4848#include <net/modules.h>
     
    316316                ne2k_cmds[5].addr = ne2k->port + DP_TSR;
    317317               
    318                 int rc = ipc_register_irq(ne2k->irq, device->device_id,
     318                int rc = register_irq(ne2k->irq, device->device_id,
    319319                    device->device_id, &ne2k_code);
    320320                if (rc != EOK)
     
    323323                rc = ne2k_up(ne2k);
    324324                if (rc != EOK) {
    325                         ipc_unregister_irq(ne2k->irq, device->device_id);
     325                        unregister_irq(ne2k->irq, device->device_id);
    326326                        return rc;
    327327                }
     
    342342               
    343343                ne2k_down(ne2k);
    344                 ipc_unregister_irq(ne2k->irq, device->device_id);
     344                unregister_irq(ne2k->irq, device->device_id);
    345345                change_state(device, NETIF_STOPPED);
    346346        }
     
    389389       
    390390        if (irc_service) {
    391                 while (irc_phone < 0) {
    392                         irc_phone = ipc_connect_me_to_blocking(PHONE_NS, irc_service,
    393                             0, 0);
    394                 }
     391                while (irc_phone < 0)
     392                        irc_phone = service_connect_blocking(irc_service, 0, 0);
    395393        }
    396394       
    397395        async_set_interrupt_received(irq_handler);
    398396       
    399         sysarg_t phonehash;
    400         return ipc_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, &phonehash);
     397        return async_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, NULL);
    401398}
    402399
Note: See TracChangeset for help on using the changeset viewer.