| [312e5ff] | 1 | /*
|
|---|
| 2 | * Copyright (c) 2009 Vineeth Pillai
|
|---|
| 3 | * Copyright (c) 2014 Jiri Svoboda
|
|---|
| 4 | * All rights reserved.
|
|---|
| 5 | *
|
|---|
| 6 | * Redistribution and use in source and binary forms, with or without
|
|---|
| 7 | * modification, are permitted provided that the following conditions
|
|---|
| 8 | * are met:
|
|---|
| 9 | *
|
|---|
| 10 | * - Redistributions of source code must retain the above copyright
|
|---|
| 11 | * notice, this list of conditions and the following disclaimer.
|
|---|
| 12 | * - Redistributions in binary form must reproduce the above copyright
|
|---|
| 13 | * notice, this list of conditions and the following disclaimer in the
|
|---|
| 14 | * documentation and/or other materials provided with the distribution.
|
|---|
| 15 | * - The name of the author may not be used to endorse or promote products
|
|---|
| 16 | * derived from this software without specific prior written permission.
|
|---|
| 17 | *
|
|---|
| 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 28 | */
|
|---|
| 29 |
|
|---|
| [c8ea6eca] | 30 | /** @addtogroup pl050
|
|---|
| 31 | * @{
|
|---|
| 32 | */
|
|---|
| 33 |
|
|---|
| [312e5ff] | 34 | /** @file
|
|---|
| 35 | */
|
|---|
| 36 |
|
|---|
| 37 | #include <assert.h>
|
|---|
| [75fe97b] | 38 | #include <bitops.h>
|
|---|
| [312e5ff] | 39 | #include <stdio.h>
|
|---|
| 40 | #include <errno.h>
|
|---|
| [c1694b6b] | 41 | #include <str_error.h>
|
|---|
| [312e5ff] | 42 | #include <ddf/driver.h>
|
|---|
| 43 | #include <ddf/interrupt.h>
|
|---|
| 44 | #include <ddf/log.h>
|
|---|
| [d51838f] | 45 | #include <device/hw_res.h>
|
|---|
| [312e5ff] | 46 | #include <device/hw_res_parsed.h>
|
|---|
| [75751db6] | 47 | #include <io/chardev_srv.h>
|
|---|
| [312e5ff] | 48 |
|
|---|
| [75fe97b] | 49 | #include "pl050_hw.h"
|
|---|
| [312e5ff] | 50 |
|
|---|
| [75fe97b] | 51 | #define NAME "pl050"
|
|---|
| [312e5ff] | 52 |
|
|---|
| 53 | enum {
|
|---|
| 54 | buffer_size = 64
|
|---|
| 55 | };
|
|---|
| 56 |
|
|---|
| [b7fd2a0] | 57 | static errno_t pl050_dev_add(ddf_dev_t *);
|
|---|
| 58 | static errno_t pl050_fun_online(ddf_fun_t *);
|
|---|
| 59 | static errno_t pl050_fun_offline(ddf_fun_t *);
|
|---|
| [984a9ba] | 60 | static void pl050_char_conn(ipc_call_t *, void *);
|
|---|
| [f2d88f3] | 61 | static errno_t pl050_read(chardev_srv_t *, void *, size_t, size_t *,
|
|---|
| 62 | chardev_flags_t);
|
|---|
| [b7fd2a0] | 63 | static errno_t pl050_write(chardev_srv_t *, const void *, size_t, size_t *);
|
|---|
| [312e5ff] | 64 |
|
|---|
| 65 | static driver_ops_t driver_ops = {
|
|---|
| 66 | .dev_add = &pl050_dev_add,
|
|---|
| 67 | .fun_online = &pl050_fun_online,
|
|---|
| 68 | .fun_offline = &pl050_fun_offline
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | static driver_t pl050_driver = {
|
|---|
| 72 | .name = NAME,
|
|---|
| 73 | .driver_ops = &driver_ops
|
|---|
| 74 | };
|
|---|
| 75 |
|
|---|
| [75751db6] | 76 | static chardev_ops_t pl050_chardev_ops = {
|
|---|
| 77 | .read = pl050_read,
|
|---|
| 78 | .write = pl050_write
|
|---|
| 79 | };
|
|---|
| 80 |
|
|---|
| [312e5ff] | 81 | typedef struct {
|
|---|
| [75751db6] | 82 | async_sess_t *parent_sess;
|
|---|
| [312e5ff] | 83 | ddf_dev_t *dev;
|
|---|
| [75fe97b] | 84 | char *name;
|
|---|
| [75751db6] | 85 |
|
|---|
| [312e5ff] | 86 | ddf_fun_t *fun_a;
|
|---|
| [75751db6] | 87 | chardev_srvs_t cds;
|
|---|
| 88 |
|
|---|
| [312e5ff] | 89 | uintptr_t iobase;
|
|---|
| 90 | size_t iosize;
|
|---|
| [75fe97b] | 91 | kmi_regs_t *regs;
|
|---|
| [312e5ff] | 92 | uint8_t buffer[buffer_size];
|
|---|
| 93 | size_t buf_rp;
|
|---|
| 94 | size_t buf_wp;
|
|---|
| 95 | fibril_condvar_t buf_cv;
|
|---|
| 96 | fibril_mutex_t buf_lock;
|
|---|
| 97 | } pl050_t;
|
|---|
| 98 |
|
|---|
| 99 | static irq_pio_range_t pl050_ranges[] = {
|
|---|
| 100 | {
|
|---|
| 101 | .base = 0,
|
|---|
| 102 | .size = 9,
|
|---|
| 103 | }
|
|---|
| 104 | };
|
|---|
| 105 |
|
|---|
| 106 | static irq_cmd_t pl050_cmds[] = {
|
|---|
| 107 | {
|
|---|
| 108 | .cmd = CMD_PIO_READ_8,
|
|---|
| 109 | .addr = NULL,
|
|---|
| 110 | .dstarg = 1
|
|---|
| 111 | },
|
|---|
| 112 | {
|
|---|
| 113 | .cmd = CMD_AND,
|
|---|
| [75fe97b] | 114 | .value = BIT_V(uint8_t, kmi_stat_rxfull),
|
|---|
| [312e5ff] | 115 | .srcarg = 1,
|
|---|
| 116 | .dstarg = 3
|
|---|
| 117 | },
|
|---|
| 118 | {
|
|---|
| 119 | .cmd = CMD_PREDICATE,
|
|---|
| 120 | .value = 2,
|
|---|
| 121 | .srcarg = 3
|
|---|
| 122 | },
|
|---|
| 123 | {
|
|---|
| 124 | .cmd = CMD_PIO_READ_8,
|
|---|
| 125 | .addr = NULL, /* Will be patched in run-time */
|
|---|
| 126 | .dstarg = 2
|
|---|
| 127 | },
|
|---|
| 128 | {
|
|---|
| 129 | .cmd = CMD_ACCEPT
|
|---|
| 130 | }
|
|---|
| 131 | };
|
|---|
| 132 |
|
|---|
| 133 | static irq_code_t pl050_irq_code = {
|
|---|
| 134 | sizeof(pl050_ranges) / sizeof(irq_pio_range_t),
|
|---|
| 135 | pl050_ranges,
|
|---|
| 136 | sizeof(pl050_cmds) / sizeof(irq_cmd_t),
|
|---|
| 137 | pl050_cmds
|
|---|
| 138 | };
|
|---|
| 139 |
|
|---|
| 140 | static pl050_t *pl050_from_fun(ddf_fun_t *fun)
|
|---|
| 141 | {
|
|---|
| 142 | return (pl050_t *)ddf_dev_data_get(ddf_fun_get_dev(fun));
|
|---|
| 143 | }
|
|---|
| 144 |
|
|---|
| [01c3bb4] | 145 | static void pl050_interrupt(ipc_call_t *call, ddf_dev_t *dev)
|
|---|
| [312e5ff] | 146 | {
|
|---|
| 147 | pl050_t *pl050 = (pl050_t *)ddf_dev_data_get(dev);
|
|---|
| 148 | size_t nidx;
|
|---|
| 149 |
|
|---|
| 150 | fibril_mutex_lock(&pl050->buf_lock);
|
|---|
| 151 | nidx = (pl050->buf_wp + 1) % buffer_size;
|
|---|
| 152 | if (nidx == pl050->buf_rp) {
|
|---|
| 153 | /** Buffer overrunt */
|
|---|
| 154 | ddf_msg(LVL_WARN, "Buffer overrun.");
|
|---|
| 155 | fibril_mutex_unlock(&pl050->buf_lock);
|
|---|
| 156 | return;
|
|---|
| 157 | }
|
|---|
| 158 |
|
|---|
| 159 | pl050->buffer[pl050->buf_wp] = IPC_GET_ARG2(*call);
|
|---|
| 160 | pl050->buf_wp = nidx;
|
|---|
| 161 | fibril_condvar_broadcast(&pl050->buf_cv);
|
|---|
| 162 | fibril_mutex_unlock(&pl050->buf_lock);
|
|---|
| 163 | }
|
|---|
| 164 |
|
|---|
| [b7fd2a0] | 165 | static errno_t pl050_init(pl050_t *pl050)
|
|---|
| [312e5ff] | 166 | {
|
|---|
| 167 | hw_res_list_parsed_t res;
|
|---|
| [75fe97b] | 168 | void *regs;
|
|---|
| [b7fd2a0] | 169 | errno_t rc;
|
|---|
| [312e5ff] | 170 |
|
|---|
| 171 | fibril_mutex_initialize(&pl050->buf_lock);
|
|---|
| 172 | fibril_condvar_initialize(&pl050->buf_cv);
|
|---|
| 173 | pl050->buf_rp = pl050->buf_wp = 0;
|
|---|
| 174 |
|
|---|
| [2fd26bb] | 175 | pl050->parent_sess = ddf_dev_parent_sess_get(pl050->dev);
|
|---|
| [312e5ff] | 176 | if (pl050->parent_sess == NULL) {
|
|---|
| 177 | ddf_msg(LVL_ERROR, "Failed connecitng parent driver.");
|
|---|
| 178 | rc = ENOMEM;
|
|---|
| 179 | goto error;
|
|---|
| 180 | }
|
|---|
| 181 |
|
|---|
| 182 | hw_res_list_parsed_init(&res);
|
|---|
| 183 | rc = hw_res_get_list_parsed(pl050->parent_sess, &res, 0);
|
|---|
| 184 | if (rc != EOK) {
|
|---|
| 185 | ddf_msg(LVL_ERROR, "Failed getting resource list.");
|
|---|
| 186 | goto error;
|
|---|
| 187 | }
|
|---|
| 188 |
|
|---|
| 189 | if (res.mem_ranges.count != 1) {
|
|---|
| 190 | ddf_msg(LVL_ERROR, "Expected exactly one memory range.");
|
|---|
| 191 | rc = EINVAL;
|
|---|
| 192 | goto error;
|
|---|
| 193 | }
|
|---|
| 194 |
|
|---|
| 195 | pl050->iobase = RNGABS(res.mem_ranges.ranges[0]);
|
|---|
| 196 | pl050->iosize = RNGSZ(res.mem_ranges.ranges[0]);
|
|---|
| 197 |
|
|---|
| 198 | pl050_irq_code.ranges[0].base = pl050->iobase;
|
|---|
| [75fe97b] | 199 | kmi_regs_t *regsphys = (kmi_regs_t *) pl050->iobase;
|
|---|
| 200 | pl050_irq_code.cmds[0].addr = ®sphys->stat;
|
|---|
| 201 | pl050_irq_code.cmds[3].addr = ®sphys->data;
|
|---|
| [312e5ff] | 202 |
|
|---|
| 203 | if (res.irqs.count != 1) {
|
|---|
| 204 | ddf_msg(LVL_ERROR, "Expected exactly one IRQ.");
|
|---|
| 205 | rc = EINVAL;
|
|---|
| 206 | goto error;
|
|---|
| 207 | }
|
|---|
| 208 |
|
|---|
| 209 | ddf_msg(LVL_DEBUG, "iobase=%p irq=%d", (void *)pl050->iobase,
|
|---|
| 210 | res.irqs.irqs[0]);
|
|---|
| 211 |
|
|---|
| [75fe97b] | 212 | rc = pio_enable((void *)pl050->iobase, sizeof(kmi_regs_t), ®s);
|
|---|
| 213 | if (rc != EOK) {
|
|---|
| 214 | ddf_msg(LVL_ERROR, "Error enabling PIO");
|
|---|
| 215 | goto error;
|
|---|
| 216 | }
|
|---|
| 217 |
|
|---|
| 218 | pl050->regs = regs;
|
|---|
| 219 |
|
|---|
| [eadaeae8] | 220 | cap_irq_handle_t ihandle;
|
|---|
| [071a1ddb] | 221 | rc = register_interrupt_handler(pl050->dev,
|
|---|
| [eadaeae8] | 222 | res.irqs.irqs[0], pl050_interrupt, &pl050_irq_code, &ihandle);
|
|---|
| [071a1ddb] | 223 | if (rc != EOK) {
|
|---|
| [dd8ab1c] | 224 | ddf_msg(LVL_ERROR, "Failed registering interrupt handler. (%s)",
|
|---|
| 225 | str_error_name(rc));
|
|---|
| [312e5ff] | 226 | goto error;
|
|---|
| 227 | }
|
|---|
| 228 |
|
|---|
| [d51838f] | 229 | rc = hw_res_enable_interrupt(pl050->parent_sess, res.irqs.irqs[0]);
|
|---|
| [75fe97b] | 230 | if (rc != EOK) {
|
|---|
| [c1694b6b] | 231 | ddf_msg(LVL_ERROR, "Failed enabling interrupt: %s", str_error(rc));
|
|---|
| [75fe97b] | 232 | goto error;
|
|---|
| 233 | }
|
|---|
| 234 |
|
|---|
| 235 | pio_write_8(&pl050->regs->cr,
|
|---|
| 236 | BIT_V(uint8_t, kmi_cr_enable) |
|
|---|
| 237 | BIT_V(uint8_t, kmi_cr_rxintr));
|
|---|
| 238 |
|
|---|
| [312e5ff] | 239 | return EOK;
|
|---|
| 240 | error:
|
|---|
| 241 | return rc;
|
|---|
| 242 | }
|
|---|
| 243 |
|
|---|
| [b7fd2a0] | 244 | static errno_t pl050_read(chardev_srv_t *srv, void *buffer, size_t size,
|
|---|
| [f2d88f3] | 245 | size_t *nread, chardev_flags_t flags)
|
|---|
| [312e5ff] | 246 | {
|
|---|
| [75751db6] | 247 | pl050_t *pl050 = (pl050_t *)srv->srvs->sarg;
|
|---|
| [312e5ff] | 248 | uint8_t *bp = buffer;
|
|---|
| [75751db6] | 249 | size_t left;
|
|---|
| [75fe97b] | 250 |
|
|---|
| [312e5ff] | 251 | fibril_mutex_lock(&pl050->buf_lock);
|
|---|
| 252 |
|
|---|
| [75751db6] | 253 | left = size;
|
|---|
| 254 | while (left > 0) {
|
|---|
| [f2d88f3] | 255 | while ((flags & chardev_f_nonblock) == 0 &&
|
|---|
| 256 | left == size && pl050->buf_rp == pl050->buf_wp)
|
|---|
| [312e5ff] | 257 | fibril_condvar_wait(&pl050->buf_cv, &pl050->buf_lock);
|
|---|
| [c657bd7] | 258 | if (pl050->buf_rp == pl050->buf_wp)
|
|---|
| 259 | break;
|
|---|
| [312e5ff] | 260 | *bp++ = pl050->buffer[pl050->buf_rp];
|
|---|
| [75751db6] | 261 | --left;
|
|---|
| [312e5ff] | 262 | pl050->buf_rp = (pl050->buf_rp + 1) % buffer_size;
|
|---|
| 263 | }
|
|---|
| 264 |
|
|---|
| 265 | fibril_mutex_unlock(&pl050->buf_lock);
|
|---|
| 266 |
|
|---|
| [677cad5] | 267 | *nread = size - left;
|
|---|
| 268 | return EOK;
|
|---|
| [312e5ff] | 269 | }
|
|---|
| 270 |
|
|---|
| [b7fd2a0] | 271 | static errno_t pl050_write(chardev_srv_t *srv, const void *data, size_t size,
|
|---|
| [677cad5] | 272 | size_t *nwritten)
|
|---|
| [312e5ff] | 273 | {
|
|---|
| [75fe97b] | 274 | pl050_t *pl050 = (pl050_t *)srv->srvs->sarg;
|
|---|
| 275 | uint8_t *dp = (uint8_t *)data;
|
|---|
| 276 | uint8_t status;
|
|---|
| 277 | size_t i;
|
|---|
| 278 |
|
|---|
| 279 | ddf_msg(LVL_NOTE, "%s/pl050_write(%zu bytes)", pl050->name, size);
|
|---|
| 280 | for (i = 0; i < size; i++) {
|
|---|
| 281 | while (true) {
|
|---|
| 282 | status = pio_read_8(&pl050->regs->stat);
|
|---|
| 283 | if ((status & BIT_V(uint8_t, kmi_stat_txempty)) != 0)
|
|---|
| 284 | break;
|
|---|
| 285 | }
|
|---|
| 286 | pio_write_8(&pl050->regs->data, dp[i]);
|
|---|
| 287 | }
|
|---|
| 288 | ddf_msg(LVL_NOTE, "%s/pl050_write() success", pl050->name);
|
|---|
| 289 |
|
|---|
| [677cad5] | 290 | *nwritten = size;
|
|---|
| 291 | return EOK;
|
|---|
| [312e5ff] | 292 | }
|
|---|
| 293 |
|
|---|
| [984a9ba] | 294 | void pl050_char_conn(ipc_call_t *icall, void *arg)
|
|---|
| [312e5ff] | 295 | {
|
|---|
| 296 | pl050_t *pl050 = pl050_from_fun((ddf_fun_t *)arg);
|
|---|
| 297 |
|
|---|
| [984a9ba] | 298 | chardev_conn(icall, &pl050->cds);
|
|---|
| [312e5ff] | 299 | }
|
|---|
| 300 |
|
|---|
| 301 | /** Add device. */
|
|---|
| [b7fd2a0] | 302 | static errno_t pl050_dev_add(ddf_dev_t *dev)
|
|---|
| [312e5ff] | 303 | {
|
|---|
| 304 | ddf_fun_t *fun_a;
|
|---|
| [75fe97b] | 305 | pl050_t *pl050 = NULL;
|
|---|
| 306 | const char *mname;
|
|---|
| [b7fd2a0] | 307 | errno_t rc;
|
|---|
| [312e5ff] | 308 |
|
|---|
| [af0a2c7] | 309 | ddf_msg(LVL_DEBUG, "pl050_dev_add()");
|
|---|
| [312e5ff] | 310 |
|
|---|
| 311 | pl050 = ddf_dev_data_alloc(dev, sizeof(pl050_t));
|
|---|
| 312 | if (pl050 == NULL) {
|
|---|
| 313 | ddf_msg(LVL_ERROR, "Failed allocating soft state.\n");
|
|---|
| 314 | rc = ENOMEM;
|
|---|
| 315 | goto error;
|
|---|
| 316 | }
|
|---|
| 317 |
|
|---|
| [75fe97b] | 318 | pl050->name = (char *)ddf_dev_get_name(dev);
|
|---|
| 319 | if (pl050->name == NULL) {
|
|---|
| 320 | rc = ENOMEM;
|
|---|
| 321 | goto error;
|
|---|
| 322 | }
|
|---|
| 323 |
|
|---|
| [312e5ff] | 324 | fun_a = ddf_fun_create(dev, fun_inner, "a");
|
|---|
| 325 | if (fun_a == NULL) {
|
|---|
| 326 | ddf_msg(LVL_ERROR, "Failed creating function 'a'.");
|
|---|
| 327 | rc = ENOMEM;
|
|---|
| 328 | goto error;
|
|---|
| 329 | }
|
|---|
| 330 |
|
|---|
| 331 | pl050->fun_a = fun_a;
|
|---|
| 332 | pl050->dev = dev;
|
|---|
| 333 |
|
|---|
| 334 | rc = pl050_init(pl050);
|
|---|
| 335 | if (rc != EOK)
|
|---|
| 336 | goto error;
|
|---|
| [af0a2c7] | 337 |
|
|---|
| [75fe97b] | 338 | if (str_cmp(pl050->name, "kbd") == 0)
|
|---|
| [5012203] | 339 | mname = "char/atkbd";
|
|---|
| [75fe97b] | 340 | else
|
|---|
| 341 | mname = "char/ps2mouse";
|
|---|
| 342 |
|
|---|
| 343 | rc = ddf_fun_add_match_id(fun_a, mname, 10);
|
|---|
| [312e5ff] | 344 | if (rc != EOK) {
|
|---|
| 345 | ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
|
|---|
| 346 | "char/xtkbd");
|
|---|
| 347 | goto error;
|
|---|
| 348 | }
|
|---|
| 349 |
|
|---|
| [75751db6] | 350 | chardev_srvs_init(&pl050->cds);
|
|---|
| 351 | pl050->cds.ops = &pl050_chardev_ops;
|
|---|
| 352 | pl050->cds.sarg = pl050;
|
|---|
| [312e5ff] | 353 |
|
|---|
| [75751db6] | 354 | ddf_fun_set_conn_handler(fun_a, pl050_char_conn);
|
|---|
| [af0a2c7] | 355 |
|
|---|
| [312e5ff] | 356 | rc = ddf_fun_bind(fun_a);
|
|---|
| 357 | if (rc != EOK) {
|
|---|
| [c1694b6b] | 358 | ddf_msg(LVL_ERROR, "Failed binding function 'a': %s", str_error(rc));
|
|---|
| [312e5ff] | 359 | ddf_fun_destroy(fun_a);
|
|---|
| 360 | goto error;
|
|---|
| 361 | }
|
|---|
| 362 |
|
|---|
| 363 | ddf_msg(LVL_DEBUG, "Device added.");
|
|---|
| 364 | return EOK;
|
|---|
| 365 | error:
|
|---|
| [75fe97b] | 366 | if (pl050 != NULL)
|
|---|
| 367 | free(pl050->name);
|
|---|
| [312e5ff] | 368 | return rc;
|
|---|
| 369 | }
|
|---|
| 370 |
|
|---|
| [b7fd2a0] | 371 | static errno_t pl050_fun_online(ddf_fun_t *fun)
|
|---|
| [312e5ff] | 372 | {
|
|---|
| 373 | ddf_msg(LVL_DEBUG, "pl050_fun_online()");
|
|---|
| 374 | return ddf_fun_online(fun);
|
|---|
| 375 | }
|
|---|
| 376 |
|
|---|
| [b7fd2a0] | 377 | static errno_t pl050_fun_offline(ddf_fun_t *fun)
|
|---|
| [312e5ff] | 378 | {
|
|---|
| 379 | ddf_msg(LVL_DEBUG, "pl050_fun_offline()");
|
|---|
| 380 | return ddf_fun_offline(fun);
|
|---|
| 381 | }
|
|---|
| 382 |
|
|---|
| 383 | int main(int argc, char *argv[])
|
|---|
| 384 | {
|
|---|
| [b7fd2a0] | 385 | errno_t rc;
|
|---|
| [312e5ff] | 386 |
|
|---|
| 387 | printf(NAME ": HelenOS pl050 serial device driver\n");
|
|---|
| 388 | rc = ddf_log_init(NAME);
|
|---|
| 389 | if (rc != EOK) {
|
|---|
| 390 | printf(NAME ": Error connecting logging service.");
|
|---|
| 391 | return 1;
|
|---|
| 392 | }
|
|---|
| 393 |
|
|---|
| 394 | return ddf_driver_main(&pl050_driver);
|
|---|
| 395 | }
|
|---|
| 396 |
|
|---|
| [c8ea6eca] | 397 | /** @}
|
|---|
| 398 | */
|
|---|