History log of /netbsd/sys/arch/i386/pci/viapcib.c (Results 1 – 19 of 19)
Revision Date Author Comments
# beecddb6 07-Aug-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs2.


# 3bee0c11 24-Apr-2021 thorpej <thorpej@NetBSD.org>

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 a

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?).

show more ...


# 610ff4e3 22-Dec-2019 thorpej <thorpej@NetBSD.org>

Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller driver

Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().

show more ...


# a8a5c538 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# 7f88fa84 14-Feb-2016 chs <chs@NetBSD.org>

zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().


# 840684c3 05-Jul-2011 mrg <mrg@NetBSD.org>

avoid an uninitialised variable warning GCC 4.5 -O3 picks up.


# 413802c8 08-Jun-2011 rmind <rmind@NetBSD.org>

Convert simple_lock to mutex.


# 350f3d2e 02-Oct-2009 jmcneill <jmcneill@NetBSD.org>

match VT8237A


# f3b6f1be 20-Jul-2008 martin <martin@NetBSD.org>

Explicitly add struct pcib_softc to the softc since the pcib functions
we call expect this.


# ed38b748 05-May-2008 xtraeme <xtraeme@NetBSD.org>

device_t/softc split and other related cosmetic changes.


# ee63fe0a 04-Apr-2008 cegger <cegger@NetBSD.org>

use aprint_*_dev and device_xname
OK joerg


# f9814001 09-Mar-2008 joerg <joerg@NetBSD.org>

Fix unaligned pci_conf_read/pci_conf_write.


# 0664a045 04-Jan-2008 ad <ad@NetBSD.org>

Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.


# 168cd830 16-Nov-2006 christos <christos@NetBSD.org>

__unused removal on arguments; approved by core.


# 4a09170d 12-Oct-2006 xtraeme <xtraeme@NetBSD.org>

Use __unused in function arguments where appropiate. (hi christos)


# 4d595fd7 12-Oct-2006 christos <christos@NetBSD.org>

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


# a3464e1d 26-Jun-2006 drochner <drochner@NetBSD.org>

use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args


# 4a4be4e8 17-Mar-2006 xtraeme <xtraeme@NetBSD.org>

Match the VIA VT8237 chipset, too. ok'ed by jmcneill


# 73e1e8a1 17-Mar-2006 jmcneill <jmcneill@NetBSD.org>

Add support for the VIA SMBus controller found on the VT8235 PCI-ISA
bridge.