Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/amiga/dev/gayle_pcmcia.c
RevisionDateAuthorComments
 1.34  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33  24-Apr-2021  thorpej branches: 1.33.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.32  02-Mar-2020  is branches: 1.32.8;
The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin Åberg.

Tested on formerly working hardware

- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:

- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.31  08-Feb-2015  jandberg branches: 1.31.10; 1.31.18; 1.31.22;
Add a delay between the recently added new PCMCIA reset method and the old
reset method to get the card reset work reliably on my A1200 model and network
cards.

Discussed on port-amiga.
 1.30  07-Sep-2014  phx branches: 1.30.2;
According to http://eab.abime.net/showpost.php?p=782840&postcount=115
there are two methods for a Gayle PCMCIA soft-reset.
pccard_attach() only implemented a method with works on A600 and some
older (?) A1200 models. I added the second method as well, to make the
reset work in any case. Tested on the latest A1200 model, which failed before.
 1.29  22-Jan-2014  christos branches: 1.29.4;
gcc-4.8.x unused variable fixes
 1.28  03-Jan-2014  rkujawa Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce
proper bus_space accesses and some abstraction layer. All drivers that utilised
Gayle also had to be refactored.

I tried not to break anything more, but this clearly needs more testing...
 1.27  23-Sep-2013  jandberg Fix interrupt handler arg (needs to be softc instead of device_t)
 1.26  27-Oct-2012  chs branches: 1.26.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25  26-Jul-2011  dyoung branches: 1.25.2; 1.25.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.24  13-Jan-2011  phx Recognize Amiga 600 model.
Patch submited by Radoslaw Kujawa.
 1.23  17-Oct-2007  garbled branches: 1.23.42;
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.22  09-Jul-2007  ad branches: 1.22.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.21  22-Feb-2007  thorpej branches: 1.21.4; 1.21.6; 1.21.12;
TRUE -> true, FALSE -> false
 1.20  30-Mar-2006  chs branches: 1.20.14;
use uvm_km_alloc() instead of uvm_map().
 1.19  05-Mar-2006  aymeric branches: 1.19.2; 1.19.4;
. free VM if attach fails
. many small cleanups
No functional improvement
 1.18  11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8;
merge ktrace-lwp.
 1.17  13-Sep-2004  drochner branches: 1.17.12;
use config_found() instead of config_found_sm() if no submatch
function is used
 1.16  22-Aug-2004  jandberg pcf_io_map() was returning invalid bus space handles.
Generate them with bus_space_map() like suggested by <aymeric>.
 1.15  16-Aug-2004  aymeric add a noop settype() method to the pcmcia_chip_functions to cope with the
recent changes in the PCMCIA code.
This is only compile-tested, but should work because we only support IO cards
on the A1200 for now.
 1.14  02-Oct-2002  thorpej branches: 1.14.6;
Use CFATTACH_DECL().
 1.13  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.12  28-Jan-2002  aymeric add __KERNEL_RCSID as suggested by Luke Mewburn
 1.11  26-Jan-2002  aymeric - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10  10-Sep-2001  chris branches: 1.10.4;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
 1.9  24-Apr-2001  thorpej branches: 1.9.2; 1.9.4;
Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.
 1.8  15-Mar-2001  chs eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>
 1.7  11-Feb-2001  is branches: 1.7.2;
Be a bit more helpful in the error case.
 1.6  27-Sep-2000  aymeric branches: 1.6.2;
minor aesthetic changes, plus explicitly state this is public domain
 1.5  13-Sep-2000  thorpej Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
 1.4  29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.3  26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.2  21-Feb-2000  aymeric fix a couple of things to handle interrupts more cleanly on the A1200
 1.1  23-Jan-2000  aymeric add PCMCIA generic support
 1.6.2.4  27-Mar-2001  bouyer Sync with HEAD.
 1.6.2.3  11-Feb-2001  bouyer Sync with HEAD.
 1.6.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

I updated the amiga SCSI drivers, but completely untested yet (may not even
compile)
 1.6.2.1  27-Sep-2000  bouyer file gayle_pcmcia.c was added on branch thorpej_scsipi on 2000-11-20 19:58:33 +0000
 1.7.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.7.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.9.4.1  01-Oct-2001  fvdl Catch up with -current.
 1.9.2.3  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.9.2.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.9.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.4.3  18-Oct-2002  nathanw Catch up to -current.
 1.10.4.2  28-Feb-2002  nathanw Catch up to -current.
 1.10.4.1  10-Sep-2001  nathanw file gayle_pcmcia.c was added on branch nathanw_sa on 2002-02-28 04:06:37 +0000
 1.14.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1  25-Aug-2004  skrll Sync with HEAD.
 1.17.12.3  03-Sep-2007  yamt sync with head.
 1.17.12.2  26-Feb-2007  yamt sync with head.
 1.17.12.1  21-Jun-2006  yamt sync with head.
 1.18.8.2  01-Apr-2006  yamt sync with head.
 1.18.8.1  13-Mar-2006  yamt sync with head.
 1.18.6.1  22-Apr-2006  simonb Sync with head.
 1.18.4.1  09-Sep-2006  rpaulo sync with head
 1.19.4.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.19.2.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.20.14.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.21.12.1  03-Oct-2007  garbled Sync with HEAD
 1.21.6.1  11-Jul-2007  mjf Sync with head.
 1.21.4.1  15-Jul-2007  ad Sync with head.
 1.22.10.1  06-Nov-2007  matt sync with HEAD
 1.23.42.1  05-Mar-2011  rmind sync with head
 1.25.12.3  03-Dec-2017  jdolecek update from HEAD
 1.25.12.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.1  30-Oct-2012  yamt sync with head
 1.26.2.1  18-May-2014  rmind sync with head
 1.29.4.3  08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #1724):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.29.4.2  16-Feb-2015  martin Pull up following revision(s) (requested by jandberg in ticket #516):
sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.31
Add a delay between the recently added new PCMCIA reset method and
the old reset method to get the card reset work reliably on my
A1200 model and network cards.
Discussed on port-amiga.
 1.29.4.1  11-Sep-2014  martin Pull up following revision(s) (requested by phx in ticket #85):
sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.30
Add support for newer A1200 models.
 1.30.2.1  06-Apr-2015  skrll Sync with HEAD
 1.31.22.1  08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #760):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32
sys/arch/amigappc/include/bus_defs.h: revision 1.8

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)

-

gayle wants stride_1swap now, so declare the rest of the bus methods since
we already define them anyway.
 1.31.18.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.10.1  08-Mar-2020  martin Pull up following revision(s) (requested by is in ticket #1517):

sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32

The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin �berg.

Tested on formerly working hardware
- by Jukka Andberg with Dlink DE-660+ (ne)
- by Frank Wille with D-Link DFE-670TXD (ne)

Tested on formerly not working hardware:
- by Martin with 3Com 3c589 Etherling III (ep)
- by Martin and Frank with CompactFlash cards (wdc)
 1.32.8.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.33.8.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed