Changeset b5e68c8 in mainline for uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
re80329d6 rb5e68c8 40 40 #include <libarch/ddi.h> 41 41 #include <devmap.h> 42 #include <ipc/ipc.h>43 42 #include <ipc/char.h> 44 43 #include <async.h> … … 48 47 #include <sysinfo.h> 49 48 #include <errno.h> 49 #include <inttypes.h> 50 50 51 51 #include "s3c24xx_uart.h" … … 92 92 return -1; 93 93 94 rc = devmap_device_register(NAMESPACE "/" NAME, &uart->dev _handle);94 rc = devmap_device_register(NAMESPACE "/" NAME, &uart->devmap_handle); 95 95 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); 98 98 return -1; 99 99 } … … 114 114 ipc_callid_t callid; 115 115 ipc_call_t call; 116 ipcarg_t method;116 sysarg_t method; 117 117 int retval; 118 118 119 119 /* Answer the IPC_M_CONNECT_ME_TO call. */ 120 ipc_answer_0(iid, EOK);120 async_answer_0(iid, EOK); 121 121 122 122 while (1) { 123 123 callid = async_get_call(&call); 124 method = IPC_GET_ METHOD(call);124 method = IPC_GET_IMETHOD(call); 125 125 switch (method) { 126 126 case IPC_M_PHONE_HUNGUP: 127 127 /* The other side has hung up. */ 128 ipc_answer_0(callid, EOK);128 async_answer_0(callid, EOK); 129 129 return; 130 130 case IPC_M_CONNECT_TO_ME: … … 134 134 break; 135 135 case CHAR_WRITE_BYTE: 136 printf(NAME ": write % dto device\n",136 printf(NAME ": write %" PRIun " to device\n", 137 137 IPC_GET_ARG1(call)); 138 138 s3c24xx_uart_sendb(uart, (uint8_t) IPC_GET_ARG1(call)); … … 143 143 break; 144 144 } 145 ipc_answer_0(callid, retval);145 async_answer_0(callid, retval); 146 146 } 147 147 } … … 185 185 uart->client_phone = -1; 186 186 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); 189 189 190 190 async_set_interrupt_received(s3c24xx_uart_irq_handler); 191 191 192 ipc_register_irq(inr, device_assign_devno(), 0, &uart_irq_code);192 register_irq(inr, device_assign_devno(), 0, &uart_irq_code); 193 193 194 194 /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
Note:
See TracChangeset
for help on using the changeset viewer.