The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/arm/s3c2xx0/uart_bus_s3c2410.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #include <sys/cdefs.h>
    2 __FBSDID("$FreeBSD: releng/10.0/sys/arm/s3c2xx0/uart_bus_s3c2410.c 256196 2013-10-09 17:05:02Z dim $");
    3 
    4 #include <sys/param.h>
    5 #include <sys/systm.h>
    6 #include <sys/bus.h>
    7 #include <sys/conf.h>
    8 #include <sys/kernel.h>
    9 #include <sys/module.h>
   10 #include <machine/bus.h>
   11 #include <sys/rman.h>
   12 #include <machine/resource.h>
   13 
   14 #include <dev/uart/uart.h>
   15 #include <dev/uart/uart_bus.h>
   16 #include <dev/uart/uart_cpu.h>
   17 
   18 #include <arm/s3c2xx0/s3c24x0reg.h>
   19 
   20 #include "uart_if.h"
   21 
   22 static int uart_s3c2410_probe(device_t dev);
   23 
   24 static device_method_t uart_s3c2410_methods[] = {
   25         /* Device interface */
   26         DEVMETHOD(device_probe,         uart_s3c2410_probe),
   27         DEVMETHOD(device_attach,        uart_bus_attach),
   28         DEVMETHOD(device_detach,        uart_bus_detach),
   29         { 0, 0 }
   30 };
   31 
   32 static driver_t uart_s3c2410_driver = {
   33         uart_driver_name,
   34         uart_s3c2410_methods,
   35         sizeof(struct uart_softc),
   36 };
   37 
   38 extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;
   39 static int
   40 uart_s3c2410_probe(device_t dev)
   41 {
   42         struct uart_devinfo *sysdev;
   43         struct uart_softc *sc;
   44         int unit;
   45 
   46         sc = device_get_softc(dev);
   47         sc->sc_class = &uart_s3c2410_class;
   48 
   49         unit = device_get_unit(dev);
   50         sysdev = SLIST_FIRST(&uart_sysdevs);
   51         if (S3C24X0_UART_BASE(unit) == sysdev->bas.bsh) {
   52                 sc->sc_sysdev = sysdev;
   53                 bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas));
   54         }
   55         return(uart_bus_probe(dev, 0, 0, 0, unit));
   56 }
   57 
   58 DRIVER_MODULE(uart, s3c24x0, uart_s3c2410_driver, uart_devclass, 0, 0);

Cache object: 3d7d425a86da02576f04f10a92db8676


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.