Changeset a0d36f5 in rtems-libbsd


Ignore:
Timestamp:
06/30/22 08:29:02 (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
6-freebsd-12
Children:
63dae71
Parents:
376b240
git-author:
Sebastian Huber <sebastian.huber@…> (06/30/22 08:29:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/06/22 11:22:45)
Message:

arm/lpc: Add option to customize device probes

Location:
rtemsbsd
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/sys/arm/lpc/if_lpe.c

    r376b240 ra0d36f5  
    4343
    4444#include <rtems/bsd/bsd.h>
     45
     46#include <arm/lpc/probe.h>
    4547
    4648#include <bsp.h>
     
    16041606}
    16051607
    1606 int lpc_eth_probe(device_t dev)
    1607 {
    1608   int unit = device_get_unit(dev);
    1609 
     1608__weak_symbol int lpc_eth_probe(int unit)
     1609{
    16101610  if (unit != 0) {
    16111611    return ENXIO;
    16121612  }
    16131613
    1614   return 0;
     1614  return BUS_PROBE_DEFAULT;
     1615}
     1616
     1617static int lpc_eth_do_probe(device_t dev)
     1618{
     1619  device_set_desc(dev, "LPC32x0 Ethernet controller");
     1620  return lpc_eth_probe(device_get_unit(dev));
    16151621}
    16161622
     
    17441750
    17451751static device_method_t lpe_methods[] = {
    1746   DEVMETHOD(device_probe, lpc_eth_probe),
     1752  DEVMETHOD(device_probe, lpc_eth_do_probe),
    17471753  DEVMETHOD(device_attach, lpc_eth_attach),
    17481754  DEVMETHOD(device_detach, lpc_eth_detach),
  • rtemsbsd/sys/dev/usb/controller/ohci_lpc32xx.c

    r376b240 ra0d36f5  
    7272#include <dev/usb/controller/ohcireg.h>
    7373
     74#include <arm/lpc/probe.h>
    7475#include <arm/lpc/lpcreg.h>
    7576#include <arm/lpc/lpcvar.h>
     
    9192    } while (0);
    9293
    93 static int lpc_ohci_probe(device_t dev);
     94static int lpc_ohci_do_probe(device_t dev);
    9495static int lpc_ohci_attach(device_t dev);
    9596static int lpc_ohci_detach(device_t dev);
     
    108109static int lpc_otg_i2c_write(const struct usb_otg_transceiver *self, uint8_t reg_addr, uint8_t value);
    109110
     111__weak_symbol int
     112lpc_ohci_probe(int unit)
     113{
     114
     115        (void)unit;
     116        return (BUS_PROBE_DEFAULT);
     117}
     118
    110119static int
    111 lpc_ohci_probe(device_t dev)
     120lpc_ohci_do_probe(device_t dev)
    112121{
    113122
    114123        device_set_desc(dev, "LPC32x0 USB OHCI controller");
    115         return (BUS_PROBE_DEFAULT);
     124        return (lpc_ohci_probe(device_get_unit(dev)));
    116125}
    117126
     
    474483static device_method_t lpc_ohci_methods[] = {
    475484        /* Device interface */
    476         DEVMETHOD(device_probe,         lpc_ohci_probe),
     485        DEVMETHOD(device_probe,         lpc_ohci_do_probe),
    477486        DEVMETHOD(device_attach,        lpc_ohci_attach),
    478487        DEVMETHOD(device_detach,        lpc_ohci_detach),
Note: See TracChangeset for help on using the changeset viewer.