The NetBSD Project

CVS log for src/sys/arch/arm/broadcom/bcm2835_spi.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / arm / broadcom

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Sep 3 11:36:52 2023 UTC (15 months ago) by tnn
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -2 lines
bcm2835_spi: guard against too large clock divider and clamp if necessary

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat May 7 07:26:27 2022 UTC (2 years, 6 months ago) by skrll
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -5 lines
Remove unnecessary gotos and label.  Same code before and after.

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 9 00:30:06 2021 UTC (3 years, 3 months ago) by thorpej
Branches: thorpej-i2c-spi-conf2
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +7 -7 lines
Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Aug 7 16:18:43 2021 UTC (3 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base
Branch point for: thorpej-i2c-spi-conf2
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3 lines
Merge thorpej-cfargs2.

Revision 1.10.8.1: download - view: text, markup, annotated - select for diffs
Wed Aug 4 16:51:26 2021 UTC (3 years, 4 months ago) by thorpej
Branches: thorpej-cfargs2
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +3 -3 lines
Adapt to CFARGS().

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Tue May 18 23:30:55 2021 UTC (3 years, 6 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +8 -7 lines
Pass the controller devhandle along to the "spi" instance.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Apr 24 23:36:26 2021 UTC (3 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf, thorpej-cfargs2
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
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?).

Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:28:16 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +10 -9 lines
Sync with HEAD.

Revision 1.9.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 23 07:14:43 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +3 -3 lines
Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Jan 29 14:11:14 2021 UTC (3 years, 10 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4 lines
fdtbus_intr_establish -> fdtbus_intr_establish_xname

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jan 27 03:10:19 2021 UTC (3 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -7 lines
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.

Revision 1.5.8.1: download - view: text, markup, annotated - select for diffs
Tue Aug 11 19:13:43 2020 UTC (4 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +10 -7 lines
Pull up following revision(s) (requested by 1043):

	sys/dev/spi/spivar.h: revision 1.10
	sys/arch/arm/broadcom/bcm2835_spi.c: revision 1.7
	sys/dev/spi/spi.c: revision 1.15

Use mutex for lwp/interrupt coordination. using splX() simply does not work
on multiprocessor systems.

fixes PR kern/55506

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Aug 4 13:20:45 2020 UTC (4 years, 4 months ago) by kardel
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +10 -7 lines
Use mutex for lwp/interrupt coordination. using splX() simply does not work
on multiprocessor systems.

fixes PR kern/55506

Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:33 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +3 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Aug 13 17:03:10 2019 UTC (5 years, 3 months ago) by tnn
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -2 lines
ensure spibus_attach_args is zero'ed

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Dec 10 21:38:26 2017 UTC (6 years, 11 months ago) by skrll
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi, netbsd-9
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +32 -18 lines
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

Revision 1.1.8.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:35:52 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.1.8.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.8.2: +1 -1 lines
update from HEAD

Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:05:37 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2: +3 -3 lines
Sync with HEAD

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Jul 29 14:22:49 2015 UTC (9 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3 lines
When expanding an inline function make sure you get the argument order
correct!

Now there's no functional change to expanding bcm2835_intr_establish

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jul 29 10:47:58 2015 UTC (9 years, 4 months ago) by skrll
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
Expand the bcm2835_intr_establish inline.

No functional change.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Oct 7 06:44:38 2014 UTC (10 years, 2 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
IPL_BIO -> IPL_VM

No functional change. No code change... It's the same thing!

Revision 1.1.8.2: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:28:25 2013 UTC (11 years, 9 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.1.8.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.8.1: +303 -0 lines
resync with head

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Wed Feb 13 01:36:14 2013 UTC (11 years, 9 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.1: +303 -0 lines
Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl					1.160
etc/etc.evbarm/MAKEDEV.conf				1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom	1.1
external/broadcom/rpi-firmware/dist/bootcode.bin	1.1
external/broadcom/rpi-firmware/dist/bootcode.bin	1.2
external/broadcom/rpi-firmware/dist/fixup.dat		1.1
external/broadcom/rpi-firmware/dist/fixup.dat		1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat	1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat	1.2
external/broadcom/rpi-firmware/dist/start.elf		1.1
external/broadcom/rpi-firmware/dist/start.elf		1.2
external/broadcom/rpi-firmware/dist/start_cd.elf	1.1
external/broadcom/rpi-firmware/dist/start_cd.elf	1.2
sys/arch/arm/broadcom/bcm2835_bsc.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c			1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c			1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c		1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h		1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c			1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h			1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c			1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c			1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c			1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c			1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h			1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c			1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h			1.10 via patch
sys/arch/arm/broadcom/files.bcm2835			1.14 via patch
sys/arch/evbarm/conf/RPI				1.23 via patch
sys/arch/evbarm/conf/files.rpi				1.3 via patch
sys/arch/evbarm/conf/mk.rpi				1.2 via patch
sys/arch/evbarm/conf/std.rpi				1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c			1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S				1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c			1.2 via patch
sys/arch/evbarm/rpi/vcio.h				1.1 via patch
sys/arch/evbarm/rpi/vcprop.h				1.7 via patch
sys/conf/files						patch
sys/dev/sdmmc/sdhc.c					1.43
sys/dev/sdmmc/sdhcvar.h					1.13
sys/dev/usb/dwc_otg.c					1.45 via patch
sys/dev/usb/dwc_otgreg.h				1.5 via patch
sys/dev/usb/dwc_otgvar.h				1.11 via patch
sys/dev/usb/files.usb					1.126 via patch
sys/dev/usb/if_smsc.c					1.7 via patch
sys/dev/usb/if_smscreg.h				1.1 via patch
sys/dev/usb/if_smscvar.h				1.1 via patch
sys/dev/usb/usbdevices.config				patch
sys/dev/usb/usbdevs					1.633 via patch
sys/dev/usb/usbdevs.h					regen
sys/dev/usb/usbdevs_data.h				regen
sys/dev/wscons/wsconsio.h				1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h				1.50
sys/dev/wscons/wsdisplay_util.c				1.2
sys/dev/videomode/edid.c				1.12 via patch

	Greatly improved Raspberry Pi support.  USB and onboard
	Ethernet should work.
	[skrll, ticket #813]

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:05:41 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.1: +303 -0 lines
sync with head

Revision 1.1.8.1
Sat Jan 5 20:31:23 2013 UTC (11 years, 11 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.1: +0 -303 lines
file bcm2835_spi.c was added on branch tls-maxphys on 2013-02-25 00:28:25 +0000

Revision 1.1.4.1
Sat Jan 5 20:31:23 2013 UTC (11 years, 11 months ago) by riz
Branches: netbsd-6
FILE REMOVED
Changes since revision 1.1: +0 -303 lines
file bcm2835_spi.c was added on branch netbsd-6 on 2013-02-13 01:36:14 +0000

Revision 1.1.2.1
Sat Jan 5 20:31:23 2013 UTC (11 years, 11 months ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.1: +0 -303 lines
file bcm2835_spi.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jan 5 20:31:23 2013 UTC (11 years, 11 months ago) by jakllsch
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, khorben-n900, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys, netbsd-6
Add driver for BCM2835 SPI0 controller.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>