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/9.1/sys/arm/s3c2xx0/uart_bus_s3c2410.c 205354 2010-03-20 03:39:35Z imp $");
    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 struct uart_class uart_s3c2410_class;
   39 extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;
   40 static int
   41 uart_s3c2410_probe(device_t dev)
   42 {
   43         struct uart_devinfo *sysdev;
   44         struct uart_softc *sc;
   45         int unit;
   46 
   47         sc = device_get_softc(dev);
   48         sc->sc_class = &uart_s3c2410_class;
   49 
   50         unit = device_get_unit(dev);
   51         sysdev = SLIST_FIRST(&uart_sysdevs);
   52         if (S3C24X0_UART_BASE(unit) == sysdev->bas.bsh) {
   53                 sc->sc_sysdev = sysdev;
   54                 bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas));
   55         }
   56         return(uart_bus_probe(dev, 0, 0, 0, unit));
   57 }
   58 
   59 DRIVER_MODULE(uart, s3c24x0, uart_s3c2410_driver, uart_devclass, 0, 0);

Cache object: 8ab8f826b6905192090018145a63a13d


[ 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.