Return to netif.h CVS log | Up to [local] / sys / lib / libsa |
File: [local] / sys / lib / libsa / netif.h (download)
Revision 1.1.1.1 (vendor branch), Tue Mar 4 16:15:15 2008 UTC (16 years, 6 months ago) by nbrk
Import of OpenBSD 4.2 release kernel tree with initial code to support Jornada 720/728, StrongARM 1110-based handheld PC. At this point kernel roots on NFS and boots into vfs_mountroot() and traps. What is supported: - glass console, Jornada framebuffer (jfb) works in 16bpp direct color mode (needs some palette tweaks for non black/white/blue colors, i think) - saic, SA11x0 interrupt controller (needs cleanup) - sacom, SA11x0 UART (supported only as boot console for now) - SA11x0 GPIO controller fully supported (but can't handle multiple interrupt handlers on one gpio pin) - sassp, SSP port on SA11x0 that attaches spibus - Jornada microcontroller (jmcu) to control kbd, battery, etc throught the SPI bus (wskbd attaches on jmcu, but not tested) - tod functions seem work - initial code for SA-1111 (chip companion) : this is TODO Next important steps, i think: - gpio and intc on sa1111 - pcmcia support for sa11x0 (and sa1111 help logic) - REAL root on nfs when we have PCMCIA support (we may use any of supported pccard NICs) - root on wd0! (using already supported PCMCIA-ATA) |
/* $OpenBSD: netif.h,v 1.5 2003/06/01 17:00:33 deraadt Exp $ */ /* $NetBSD: netif.h,v 1.4 1995/09/14 23:45:30 pk Exp $ */ #ifndef __SYS_LIBNETBOOT_NETIF_H #define __SYS_LIBNETBOOT_NETIF_H #include "iodesc.h" struct netif_driver { char *netif_bname; int (*netif_match)(struct netif *, void *); int (*netif_probe)(struct netif *, void *); void (*netif_init)(struct iodesc *, void *); int (*netif_get)(struct iodesc *, void *, size_t, time_t); int (*netif_put)(struct iodesc *, void *, size_t); void (*netif_end)(struct netif *); struct netif_dif *netif_ifs; int netif_nifs; }; struct netif_dif { int dif_unit; int dif_nsel; struct netif_stats *dif_stats; void *dif_private; /* the following fields are used internally by the netif layer */ u_long dif_used; }; struct netif_stats { int collisions; int collision_error; int missed; int sent; int received; int deferred; int overflow; }; struct netif { struct netif_driver *nif_driver; int nif_unit; int nif_sel; void *nif_devdata; }; extern struct netif_driver *netif_drivers[]; /* machdep */ extern int n_netif_drivers; extern int netif_debug; void netif_init(void); struct netif *netif_select(void *); int netif_probe(struct netif *, void *); void netif_attach(struct netif *, struct iodesc *, void *); void netif_detach(struct netif *); ssize_t netif_get(struct iodesc *, void *, size_t, time_t); ssize_t netif_put(struct iodesc *, void *, size_t); int netif_open(void *); int netif_close(int); struct iodesc *socktodesc(int); #endif /* __SYS_LIBNETBOOT_NETIF_H */