Home | History | Annotate | Download | only in xscale
History log of /src/sys/arch/arm/xscale/i80321.c
RevisionDateAuthorComments
 1.26  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25  24-Apr-2021  thorpej branches: 1.25.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.24  18-Sep-2012  matt branches: 1.24.52;
Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.23  12-Feb-2012  matt branches: 1.23.6;
Change old-stlye-defintions to C89 prototypes.
Switch to CFATTACH_DECL_NEW/device_t/cfdata_t
Defer attaching interrupt evcnts.

Approved by releng.
 1.22  01-Jul-2011  dyoung branches: 1.22.2; 1.22.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.21  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.20  17-Oct-2007  garbled branches: 1.20.42; 1.20.48;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19  12-May-2007  gavan branches: 1.19.10; 1.19.12;
Implement ATU Direct Window in order to increase available PCI address
space.
 1.18  25-Feb-2006  wiz branches: 1.18.20; 1.18.24; 1.18.26; 1.18.32;
Fix some typos.
 1.17  11-Dec-2005  christos branches: 1.17.2; 1.17.4; 1.17.6;
merge ktrace-lwp.
 1.16  30-Aug-2004  drochner branches: 1.16.12;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.15  06-Oct-2003  thorpej Add support for the i80312 and i80321 I2C controllers.
 1.14  15-Jul-2003  lukem __KERNEL_RCSID()
 1.13  15-Jun-2003  fvdl branches: 1.13.2;
Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.12  06-Feb-2003  briggs Define the iopmu (even though it's not being used yet).
Export i80321_local_dma_init().
Make !sc->sc_is_host configuration a little more friendly.
Go back to using IABAR2 instead of IABAR3 for inbound SDRAM access.
 1.11  23-Jan-2003  briggs Use iwin[3] instead of iwin[2] for RAM access and leave iwin[2] unused.
 1.10  23-Jan-2003  briggs Program the BARs after the limit regs. When the BARs are written, the
value actually stored in the BAR is masked by the limit register.
 1.9  01-Jan-2003  thorpej * Use a device node for each DMA channel.
* Use aprint_normal() for cfprint routines.
 1.8  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.7  17-Aug-2002  thorpej Use separate function pointers for dmamap_sync pre- vs post- operations.
Change the bus_dmamap_sync() macro to test the ops argument against pre-
and post- constants. The compiler will optimize out dead code because
of the constants. Since post- operations are not needed on ARM (except
for ISA bounce buffers), this eliminate a large number of function calls
which are noops, each of which cost at least 6 cycles just in the call
and return overhead (not to mention whatever other useless work the
compiler decides to do in the callee).
 1.6  01-Aug-2002  thorpej Move the DMA tag initialization functions into i80321.c.
 1.5  31-Jul-2002  thorpej Overhaul how DMA ranges work in the ARM bus_dma implementation.

A new "arm32_dma_range" structure now describes a DMA window, with
a system address base, bus address base, and length. In addition to
providing info about which memory regions are legal for DMA, the new
structure provides address translation support, as well.

As before, if a tag does not list any ranges, then all addresses are
considered valid, and no DMA address translation is performed.

This allows us to remove a large chunk of code which was duplicated and
tweaked slightly (to do the address translation) from the stock ARM
bus_dma in the XScale IOP and ARM Integrator ports.

Test compiled on all ARM platforms, test booted on Intel IQ80321 and Shark.
 1.4  29-Jul-2002  thorpej Add support for attaching IOP built-in sub-devices (aau, dma, ssp,
watchdog, etc.)
 1.3  25-Jul-2002  thorpej Add support for DMA to/from the on-chip devices of the i80321 (no
PCI window translation).

XXX This would be better done by overhauling the shared ARM bus_dma code.
 1.2  16-May-2002  thorpej branches: 1.2.2; 1.2.4;
* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses. For busses behind a bridge, it points to
a persistent copy of the bridge's pcitag_t. This can be very useful
for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
uses OFW device nodes to enumerate the bus. When a PCI bus that is
behind a bridge is attached, pci_attach_hook() allocates a new PCI
chipset tag for the new bus and sets it's "curnode" to the OFW node
of the bridge. This is used as a starting point when enumerating
that bus. Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
 1.1  27-Mar-2002  thorpej branches: 1.1.2; 1.1.4;
Basic support for the Intel i80321 I/O Processor (Xscale core).

Note: This is a snapshot of work-in-progress; there are still some
bugs to be shaken out.
 1.1.4.2  30-Aug-2002  gehenna catch up with -current.
 1.1.4.1  30-May-2002  gehenna Catch up with -current.
 1.1.2.8  03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.7  18-Oct-2002  nathanw Catch up to -current.
 1.1.2.6  19-Aug-2002  thorpej Partial (ARM only) sync with trunk -- significant performance improvements
for XScale-based systems.
 1.1.2.5  13-Aug-2002  nathanw Catch up to -current.
 1.1.2.4  01-Aug-2002  nathanw Catch up to -current.
 1.1.2.3  20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1  27-Mar-2002  nathanw file i80321.c was added on branch nathanw_sa on 2002-04-01 07:39:16 +0000
 1.2.4.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1  16-May-2002  jdolecek file i80321.c was added on branch kqueue on 2002-06-23 17:34:57 +0000
 1.2.2.2  07-Dec-2002  he Pull up revision 1.3 (requested by thorpej in ticket #568):
Add support for DMA to/from the on-chip devices of the
i80321.
 1.2.2.1  11-Nov-2002  he Pull up revision 1.4 (requested by thorpej in ticket #571):
Add support for attaching IOP built-in sub-devices (aau,
dma, ssp, watchdog, etc.)
 1.13.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.13.2.2  03-Sep-2004  skrll Sync with HEAD
 1.13.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.12.2  03-Sep-2007  yamt sync with head.
 1.16.12.1  21-Jun-2006  yamt sync with head.
 1.17.6.1  22-Apr-2006  simonb Sync with head.
 1.17.4.1  09-Sep-2006  rpaulo sync with head
 1.17.2.1  01-Mar-2006  yamt sync with head.
 1.18.32.1  22-May-2007  matt Update to HEAD.
 1.18.26.1  11-Jul-2007  mjf Sync with head.
 1.18.24.1  27-May-2007  ad Sync with head.
 1.18.20.1  17-May-2007  yamt sync with head.
 1.19.12.1  06-Nov-2007  matt sync with HEAD
 1.19.10.1  01-Jan-2008  chris Sync with HEAD.
 1.20.48.1  06-Jun-2011  jruoho Sync with HEAD.
 1.20.42.1  31-May-2011  rmind sync with head
 1.22.6.1  18-Feb-2012  mrg merge to -current.
 1.22.2.2  30-Oct-2012  yamt sync with head
 1.22.2.1  17-Apr-2012  yamt sync with head
 1.23.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.52.1  02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.25.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed