Home | History | Annotate | Download | only in gemini
History log of /src/sys/arch/arm/gemini/gemini_obio.c
RevisionDateAuthorComments
 1.12  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.11  24-Apr-2021  thorpej branches: 1.11.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.10  01-Jul-2011  dyoung branches: 1.10.68;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.9  17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.8  05-Jan-2010  mbalmer branches: 1.8.4; 1.8.6;
One semicolon is enough.
 1.7  20-Nov-2008  cliff branches: 1.7.4; 1.7.8;
use CFATTACH_DECL_NEW, make device in softc type device_t, etc.
 1.6  13-Nov-2008  cliff add option GEMINI_BUSBASE to define kernel offset between
kernel physical addr and (DMA master) bus addr
 1.5  13-Nov-2008  cliff on the Slave CPU where memory is remaped, use 'struct arm32_dma_range'
to manage kernel physical address unequal to DMA master bus address.

when Slave CPU configures PCI bus, program PCI memory window
to allow only bus addresses into memory owned by the Slave CPU.

Note: this code assumes that the CPU performing
PCI bus configuration has exclusive use of that bus.
 1.4  11-Nov-2008  cliff - add option GEMINI_SINGLE for single-core system model
- add "re" interface to GEMINI configuration
 1.3  10-Nov-2008  cliff in critical_devs[], master cpu gets com0;
slave cpu gets geminilpchc0 (and children)
 1.2  09-Nov-2008  cliff - use #if NPCI > 0 arond pci stuff so we can compile when pci is not configured
- in critical_devs[], divide up timers attachment between master and slave CPUs
and provide icu#1 attachment for slave cpu
 1.1  24-Oct-2008  matt branches: 1.1.2;
Add support for Cortina Systems SL3516 eval board.
 1.1.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.7.8.3  11-Mar-2010  yamt sync with head
 1.7.8.2  04-May-2009  yamt sync with head.
 1.7.8.1  20-Nov-2008  yamt file gemini_obio.c was added on branch yamt-nfs-mp on 2009-05-04 08:10:41 +0000
 1.7.4.2  17-Jan-2009  mjf Sync with HEAD.
 1.7.4.1  20-Nov-2008  mjf file gemini_obio.c was added on branch mjf-devfs2 on 2009-01-17 13:27:52 +0000
 1.8.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.8.4.1  31-May-2011  rmind sync with head
 1.10.68.5  05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.10.68.4  04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.10.68.3  03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.10.68.2  02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.10.68.1  20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.11.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed