/* $NetBSD: cache_mipsNN.h,v 1.6 2020/07/26 08:08:41 simonb Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by Simon Burge for Wasabi Systems, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for the NetBSD Project by
* Wasabi Systems, Inc.
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
* or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _MIPS_CACHE_MIPSNN_H_
#define _MIPS_CACHE_MIPSNN_H_
void mipsNN_cache_init(uint32_t, uint32_t);
void mipsNN_picache_sync_all(void);
void mipsNN_picache_sync_range(register_t, vsize_t);
void mipsNN_picache_sync_range_index(vaddr_t, vsize_t);
void mipsNN_pdcache_wbinv_all(void);
void mipsNN_pdcache_wbinv_range_index(vaddr_t, vsize_t);
void mipsNN_sdcache_wbinv_all(void);
void mipsNN_sdcache_wbinv_range_index(vaddr_t, vsize_t);
#endif /* _MIPS_CACHE_MIPSNN_H_ */
sage (Collapse)
Author |
|
|
|
|
|
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?).
|
|
- Teach sdmmc_add_task to queue it only if not already queued.
- Remove now-redundant logic to avoid repeated queueing elsewhere.
- Teach sdmmc_del_task to wait until task has completed.
- Call sdmmc_del_task in various needful places.
- Replace abuse of pcq by a lock and a tailq.
(pcq is multi-producer, _single_-consumer, but there are potentially
multiple consumers here and really only one producer.)
- Teach ld_sdmmc to abort xfers on detach.
(Mechanism is kinda kludgey but it'll do for now; any effort one is
tempted to spend overhauling this should be spent overhauling sdmmc
to support proper asynchronous commands.)
- Make sure ld_sdmmc_discard either returns failure or eventually calls
ldenddiscard.
XXX Currently ld_sdmmc_detach aborts xfers _before_ ldbegindetach has
has committed to detaching or not. This is currently necessary to
avoid a deadlock because ldbegindetach waits for xfers to drain --
which strikes me as wrong; ldbegindetach shouldn't wait for anything,
and should only make the decision to commit to detaching or not so
the caller can decide whether to abort xfers before we actually wait
for them in ldenddetach.
XXX pullup -- although this changes some kernel symbols (sdmmc_add_task
and sdmmc_del_task), it shouldn't affect any existing modules; the only
module that uses sdmmc is ld_sdmmc.kmod, which is `.if 0' in the build
so there shouldn't be any of them floating around.
|
|
Add sdio abort function.
Additional error messages.
Print parameters for SDIO devices.
Minor cosmetics.
|
|
+ SDHC_FLAG_BROKEN_ADMA2_ZEROLEN
Broken ADMA2 Zero length descriptor.
Can't 64K Byte data transfer.
+ SDHC_FLAG_NO_1_8_V
Support no 1.8V Supply.
Disable UHS-I bus speed mode (SDR50, DDR50, SDR104).
|
|
- support block length per function
- add functions to read/write regions
Decode (but not use) SDIO tuple in CIS.
Fix locking.
Add more SDIO defines (partially from version 3.0).
|
|
|
|
|
|
|
|
|
|
|
|
in multi-sector I/O.
The SDHC spec has a complex flowchart describing when an explicit
CMD12 is necessary, so we probably use it too often.
|
|
|
|
|
|
|
|
|
|
in KERNEL_LOCK/KERNEL_UNLOCK_ONE, remove KTHREAD_MPSAFE. While here, use
PRI_BIO instead of PRI_NONE for the task thread priority. Since this is
how all transfers are queued, and we have a 1 second timeout on the task
being picked up off the queue (!), better not to rely on a PRI_NONE thread.
|
|
|
|
|
|
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
|
|
Ported from OpenBSD.
|
|
|
|
it can issue commands, and some host drivers have interrupt-driven
command completion. Prevents assertion (or deadlock) upon detach
of sdhc(4) with inserted card.
|
|
It seems to have caused regressions to detaching drivers from cards at
the appropriate time.
DETACH_FORCE to sdmmc_card_detach really means the SD/SDIO card is gone,
and can not be abused to mean that the host controller disappered.
|
|
host controller has disappeared or is detaching.
XXX should pass flags from sdmmc_detach through to the task thread ending
to differentiate host controller disappearance from mere detachment.
|
|
|
|
|
|
SD_IO_SFIC_NO_STANDARD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Only check EXT_CSD STRUCTURE version when CSD version is 3.
- initialize width at sdmmc_function_alloc().
|
|
|
|
|
|
|
|
of host controllers do not support to two or more segments.
|
|
|
|
- support SD 4bit bus width mode.
|
|
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.
|