Return to pxa2x0_apm.h CVS log | Up to [local] / sys / arch / arm / xscale |
File: [local] / sys / arch / arm / xscale / pxa2x0_apm.h (download)
Revision 1.1.1.1 (vendor branch), Tue Mar 4 16:05:18 2008 UTC (16 years, 3 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: pxa2x0_apm.h,v 1.7 2005/04/13 05:40:07 uwe Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _PXA2X0_APM_H_ #define _PXA2X0_APM_H_ #include <sys/event.h> #include <machine/bus.h> #include <machine/apmvar.h> struct pxa2x0_apm_softc { struct device sc_dev; struct proc *sc_thread; struct lock sc_lock; struct klist sc_note; int sc_flags; int sc_wakeon; /* enabled wakeup sources */ int sc_batt_life; bus_space_tag_t sc_iot; bus_space_handle_t sc_pm_ioh; bus_space_handle_t sc_memctl_ioh; int (*sc_get_event)(struct pxa2x0_apm_softc *, u_int *); void (*sc_power_info)(struct pxa2x0_apm_softc *, struct apm_power_info *); void (*sc_suspend)(struct pxa2x0_apm_softc *); int (*sc_resume)(struct pxa2x0_apm_softc *); }; void pxa2x0_apm_attach_sub(struct pxa2x0_apm_softc *); void pxa2x0_apm_sleep(struct pxa2x0_apm_softc *); #define PXA2X0_WAKEUP_POWERON (1<<0) #define PXA2X0_WAKEUP_GPIORST (1<<1) #define PXA2X0_WAKEUP_SD (1<<2) #define PXA2X0_WAKEUP_RC (1<<3) #define PXA2X0_WAKEUP_SYNC (1<<4) #define PXA2X0_WAKEUP_KEYNS0 (1<<5) #define PXA2X0_WAKEUP_KEYNS1 (1<<6) #define PXA2X0_WAKEUP_KEYNS2 (1<<7) #define PXA2X0_WAKEUP_KEYNS3 (1<<8) #define PXA2X0_WAKEUP_KEYNS4 (1<<9) #define PXA2X0_WAKEUP_KEYNS5 (1<<10) #define PXA2X0_WAKEUP_KEYNS6 (1<<11) #define PXA2X0_WAKEUP_CF0 (1<<12) #define PXA2X0_WAKEUP_CF1 (1<<13) #define PXA2X0_WAKEUP_USBD (1<<14) #define PXA2X0_WAKEUP_LOCKSW (1<<15) #define PXA2X0_WAKEUP_JACKIN (1<<16) #define PXA2X0_WAKEUP_CHRGFULL (1<<17) #define PXA2X0_WAKEUP_RTC (1<<18) #define PXA2X0_WAKEUP_KEYNS_ALL (PXA2X0_WAKEUP_KEYNS0| \ PXA2X0_WAKEUP_KEYNS1|PXA2X0_WAKEUP_KEYNS2|PXA2X0_WAKEUP_KEYNS3| \ PXA2X0_WAKEUP_KEYNS4|PXA2X0_WAKEUP_KEYNS5|PXA2X0_WAKEUP_KEYNS6) #define PXA2X0_WAKEUP_CF_ALL (PXA2X0_WAKEUP_CF0|PXA2X0_WAKEUP_CF1) #define PXA2X0_WAKEUP_ALL (PXA2X0_WAKEUP_POWERON| \ PXA2X0_WAKEUP_GPIORST|PXA2X0_WAKEUP_SD|PXA2X0_WAKEUP_RC| \ PXA2X0_WAKEUP_SYNC|PXA2X0_WAKEUP_KEYNS_ALL|PXA2X0_WAKEUP_CF_ALL| \ PXA2X0_WAKEUP_USBD|PXA2X0_WAKEUP_LOCKSW|PXA2X0_WAKEUP_JACKIN| \ PXA2X0_WAKEUP_CHRGFULL|PXA2X0_WAKEUP_RTC) void pxa2x0_wakeup_config(u_int, int); u_int pxa2x0_wakeup_status(void); #endif