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


Default branch: MAIN


Revision 1.13 / (download) - annotate - [select for diffs], Sun Sep 3 11:36:52 2023 UTC (5 months, 4 weeks ago) by tnn
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

bcm2835_spi: guard against too large clock divider and clamp if necessary

Revision 1.12 / (download) - annotate - [select for diffs], Sat May 7 07:26:27 2022 UTC (21 months, 3 weeks ago) by skrll
Branch: MAIN
CVS Tags: netbsd-10-base, 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
Changes since 1.11: +2 -5 lines
Diff to previous 1.11 (colored)

Remove unnecessary gotos and label.  Same code before and after.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Aug 9 00:30:06 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-i2c-spi-conf2
Changes since 1.11: +7 -7 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

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) - annotate - [select for diffs], Sat Aug 7 16:18:43 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base
Branch point for: thorpej-i2c-spi-conf2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Merge thorpej-cfargs2.

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 16:51:26 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Adapt to CFARGS().

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue May 18 23:30:55 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.10: +8 -7 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Pass the controller devhandle along to the "spi" instance.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:26 2021 UTC (2 years, 10 months ago) by thorpej
Branch: 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
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

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) - annotate - [select for diffs], Sat Apr 3 22:28:16 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.7: +10 -9 lines
Diff to previous 1.7 (colored) next main 1.8 (colored)

Sync with HEAD.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Tue Mar 23 07:14:43 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 29 14:11:14 2021 UTC (3 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

fdtbus_intr_establish -> fdtbus_intr_establish_xname

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jan 27 03:10:19 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.7: +8 -7 lines
Diff to previous 1.7 (colored)

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) - annotate - [select for diffs], Tue Aug 11 19:13:43 2020 UTC (3 years, 6 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.5: +10 -7 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

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) - annotate - [select for diffs], Tue Aug 4 13:20:45 2020 UTC (3 years, 6 months ago) by kardel
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.6: +10 -7 lines
Diff to previous 1.6 (colored)

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) - annotate - [select for diffs], Mon Apr 13 08:03:33 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.6 / (download) - annotate - [select for diffs], Tue Aug 13 17:03:10 2019 UTC (4 years, 6 months ago) by tnn
Branch: 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
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

ensure spibus_attach_args is zero'ed

Revision 1.5 / (download) - annotate - [select for diffs], Sun Dec 10 21:38:26 2017 UTC (6 years, 2 months ago) by skrll
Branch: 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
Changes since 1.4: +32 -18 lines
Diff to previous 1.4 (colored)

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) - annotate - [select for diffs], Sun Dec 3 11:35:52 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.1.8.2: +1 -1 lines
Diff to previous 1.1.8.2 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

update from HEAD

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:05:37 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 29 14:22:49 2015 UTC (8 years, 7 months ago) by skrll
Branch: 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-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
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

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) - annotate - [select for diffs], Wed Jul 29 10:47:58 2015 UTC (8 years, 7 months ago) by skrll
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Expand the bcm2835_intr_establish inline.

No functional change.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 7 06:44:38 2014 UTC (9 years, 4 months ago) by skrll
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

IPL_BIO -> IPL_VM

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

Revision 1.1.8.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:28:25 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.1.8.1: +303 -0 lines
Diff to previous 1.1.8.1 (colored) to branchpoint 1.1 (colored)

resync with head

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Wed Feb 13 01:36:14 2013 UTC (11 years ago) by riz
Branch: 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
Changes since 1.1.4.1: +303 -0 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

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) - annotate - [select for diffs], Wed Jan 23 00:05:41 2013 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.1.2.1: +303 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head

Revision 1.1.8.1, Sat Jan 5 20:31:23 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.1: +0 -303 lines
FILE REMOVED

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, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.1: +0 -303 lines
FILE REMOVED

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, 1 month ago) by yamt
Branch: yamt-pagecache
Changes since 1.1: +0 -303 lines
FILE REMOVED

file bcm2835_spi.c was added on branch yamt-pagecache on 2013-01-23 00:05:41 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jan 5 20:31:23 2013 UTC (11 years, 1 month ago) by jakllsch
Branch: 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.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>