Home | History | Annotate | Download | only in broadcom
History log of /src/sys/arch/arm/broadcom/bcm2835_gpio.c
RevisionDateAuthorComments
 1.24  17-Jan-2022  thorpej Pass the controller devhandle along to the GPIO layer.
 1.23  21-Aug-2021  andvar fix mainly same typos as in my previous commit but outside sys/dev/dm.
 1.22  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.21  24-Jul-2021  andvar branches: 1.21.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.20  24-Apr-2021  thorpej branches: 1.20.2;
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.19  29-Jan-2021  skrll branches: 1.19.2;
fdtbus_intr_establish -> fdtbus_intr_establish_xname
 1.18  27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.17  15-Jan-2021  jmcneill Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish
 1.16  12-Oct-2019  mlelstv branches: 1.16.8;
off by one
 1.15  03-Oct-2019  mlelstv remove debug printfs, add more compat strings.
 1.14  01-Oct-2019  jmcneill Add support for devices with separate "init" and "default" pinctrl states.
 1.13  28-Sep-2019  mlelstv Handle BCM2838 (bcm2711) SoC pecularities.
 1.12  10-May-2019  skrll branches: 1.12.2;
Take a lead from sys/dev/gpio/gpio.c:gpio_intr_str and report edge vs
level. etc interrupt type.

From yarl-baudig
 1.11  03-Mar-2019  skrll Trailing whitespace
 1.10  07-Feb-2019  mlelstv Support configuration of alternate functions.
 1.9  26-Jan-2019  thorpej Define constants for representing the standard interrupt types
({pos,neg,double}-edge, {high,low}-level) from the FDT "interrupts"
bindings. Use these defined constants rather than magic numbers.
 1.8  28-Sep-2018  jmcneill Fix previous; follow the binding spec for this device when decoding
interrupt specifiers.
 1.7  19-May-2018  thorpej branches: 1.7.2;
Add support for interrupts on GPIO pins. We support both FDT-driven
interrupt registration as well as the new GPIO interrupt interface.

Based on initial work by Brad Spencer.
PR kern/51676
 1.6  10-Dec-2017  skrll branches: 1.6.2;
FDTise RapberryPI support. Thanks for jmcneill for a lot of help with this.

The kernel image that the RPI firmware boots is now netbsd.img in the
kernel build directory.

XXX fdtbus_get_reg needs reworking
 1.5  09-Nov-2017  skrll Trailing whitespace
 1.4  21-Sep-2017  skrll spaces to tabs
 1.3  02-Feb-2016  skrll Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.2  19-May-2014  skrll branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Build fix for when there is no gpio in the kernel.

PR/48816: Compile fix for src/sys/arch/arm/broadcom/bcm2835_gpio.c
 1.1  22-Apr-2014  kardel branches: 1.1.2;
add a driver for BCM2835 obio gpio
 1.1.2.2  18-May-2014  rmind sync with head
 1.1.2.1  22-Apr-2014  rmind file bcm2835_gpio.c was added on branch rmind-smpnet on 2014-05-18 17:44:57 +0000
 1.2.10.1  19-Mar-2016  skrll Sync with HEAD
 1.2.8.3  03-Dec-2017  jdolecek update from HEAD
 1.2.8.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1  19-May-2014  tls file bcm2835_gpio.c was added on branch tls-maxphys on 2014-08-20 00:02:45 +0000
 1.2.6.1  26-Feb-2016  snj Pull up following revision(s) (requested by skrll in ticket #1107):
external/broadcom/rpi-firmware/dist/LICENCE.broadcom: revision 1.2
external/broadcom/rpi-firmware/dist/bootcode.bin: revision 1.8
external/broadcom/rpi-firmware/dist/fixup.dat: revision 1.8
external/broadcom/rpi-firmware/dist/fixup_cd.dat: revision 1.8
external/broadcom/rpi-firmware/dist/start.elf: revision 1.8
external/broadcom/rpi-firmware/dist/start_cd.elf: revision 1.8
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.29
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_gpio_subr.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_space.c: revision 1.9, 1.10
sys/arch/arm/broadcom/bcm2835reg.h: patch
sys/arch/arm/cortex/a9_mpsubr.S: revisions 1.45, 1.46
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.45
sys/arch/evbarm/conf/std.awin: revision 1.9
sys/arch/evbarm/rpi/rpi2_start.S: revision 1.3
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.68
Check for hypervisor mode in cortex_init and exit if the cpu started
there.
Needed by latest RPI firmware.
--
Fix up bus_space_map for latest RPI firmware which now passes the FB
address in the mailbox properties as a bus address.
--
Update RPI firmware to version after the following commit
commit 224c75602b8bae1a9e942b4f1c7ed3aa8e0f0ec8
Author: popcornmix<popcornmix@gmail.com>
Date: Tue Dec 8 14:48:57 2015 +0000
--
Deal with kernel builds where virtualisation isn't available
--
Tweak CPUFLAGS to cover all CPUs
--
Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc
Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
 1.2.4.2  10-Aug-2014  tls Rebase.
 1.2.4.1  19-May-2014  tls file bcm2835_gpio.c was added on branch tls-earlyentropy on 2014-08-10 06:53:51 +0000
 1.2.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.2.2.1  19-May-2014  yamt file bcm2835_gpio.c was added on branch yamt-pagecache on 2014-05-22 11:39:31 +0000
 1.6.2.3  26-Jan-2019  pgoyette Sync with HEAD
 1.6.2.2  30-Sep-2018  pgoyette Ssync with HEAD
 1.6.2.1  21-May-2018  pgoyette Sync with HEAD
 1.7.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.1  10-Jun-2019  christos Sync with HEAD
 1.12.2.1  03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #276):

sys/arch/arm/samsung/exynos_pinctrl.c: revision 1.14
sys/arch/arm/rockchip/rk3399_iomux.c: revision 1.6
sys/dev/fdt/fdtvar.h: revision 1.54
sys/arch/arm/broadcom/bcm2835_gpio.c: revision 1.14
sys/dev/i2c/axppmic.c: revision 1.26
sys/arch/arm/nvidia/tegra_pinmux.c: revision 1.4
sys/arch/arm/rockchip/rk3328_iomux.c: revision 1.3
sys/dev/fdt/fdt_pinctrl.c: revision 1.10
sys/arch/arm/amlogic/meson_pinctrl.c: revision 1.6
sys/dev/fdt/fdtbus.c: revision 1.30
sys/arch/arm/sunxi/sunxi_gpio.c: revision 1.27

Add support for devices with separate "init" and "default" pinctrl states.
 1.16.8.1  03-Apr-2021  thorpej Sync with HEAD.
 1.19.2.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.20.2.1  01-Aug-2021  thorpej Sync with HEAD.
 1.21.2.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed