-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add firmware driver #1037
Add firmware driver #1037
Conversation
I have rebased and removed the one-process-at-a-time restriction on opening /dev/vcio. |
With the PR: |
You're right. This change:
gave me:
|
When we have changed all the mailbox clients and can remove bcm2708_vcio, I beleive we can add a MODULE_ALIAS("bcm2708_vcio"); to the vcio module to keep it from breaking userspace until it's fixed there. |
So can the MODULE_ALIAS("bcm2708_vcio") be added to this PR? |
c80d54f
to
9f70667
Compare
Sorry, I didn't know what I was talking about. MODULE_ALIAS can't be used for this. - /* create sysfs entries */
- vcio.class = class_create(THIS_MODULE, "vcio");
+ /*
+ * Create sysfs entries
+ * 'bcm2708_vcio' is used for backwards compatibility so we don't break
+ * userspace. Raspian has a udev rule that changes the permissions.
+ */
+ vcio.class = class_create(THIS_MODULE, "bcm2708_vcio"); |
Can you rebase. We've bumped to 4.1.1 and the configs commit is already in. |
This mailbox driver provides a single mailbox channel to write 32-bit values to the VPU and get a 32-bit response. The Raspberry Pi firmware uses this mailbox channel to implement firmware calls, while Roku 2 (despite being derived from the same firmware tree) doesn't. The driver was originally submitted by Lubomir, based on the out-of-tree 2708 mailbox driver. Eric Anholt fixed it up for upstreaming, with the major functional change being that it now has no notion of multiple channels (since that is a firmware-dependent concept) and instead the raspberrypi-firmware driver will do that bit-twiddling in its own messages. [Jassi: made the 'mbox_chan_ops' struct as const and removed a redundant variable] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au> Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
With the VC reader blocked and the ARM writing, MAIL0_STA reads empty permanently while MAIL1_STA goes from empty (0x40000000) to non-empty (0x00000001-0x00000007) to full (0x80000008). This bug ended up having no effect on us, because all of our transactions in the client driver were synchronous and under a mutex. Suggested-by: Phil Elwell <phil@raspberrypi.org> Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Make it possible to use bcm2835-mailbox without Device Tree. Load driver early because of lacking support for deferred probing in many drivers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Lee Jones <lee@kernel.org> (previous version with pm-domains) Acked-by: Stephen Warren <swarren@wwwdotorg.org> [Rebased on rpi-4.1.y] Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Support booting without Device Tree. Turn on USB power. Load driver early because of lacking support for deferred probing in many drivers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Add support for the bcm_mailbox_*() functions. This is temporary until all drivers have been converted to the firmware API (rpi_firmware_property*()). Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Add module for accessing the mailbox property channel through /dev/vcio. Was previously in bcm2708-vcio. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
defconfig: enable BCM2835_MBOX, RASPBERRYPI_FIRMWARE and BCM_VCIO. Add firmware node and change mailbox node in Device Tree. Add/update platform file for firmware and mailbox. Strip bcm2708-vcio of everything except the legacy API and hook it up with the firmware driver. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
defconfig: enable BCM2835_MBOX, RASPBERRYPI_FIRMWARE and BCM_VCIO. Add firmware node and change mailbox node in Device Tree. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
This reverts commit 081ebd4. This driver is not necessary now that the firmware driver turns on USB power. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Rebased |
From here: http://marklomas.net/ch-egg/native/native.htm
(there is a build script but it seems a little broken). |
I only get a blank display:
strace log: https://gist.githubusercontent.com/notro/fb0b2a960b6c83197edd/raw/gistfile1.txt |
Yes, something is broken, I'll have a look... |
- add CONFIG_SND_SOC_WM8804_I2C=m see raspberrypi/linux@d478458 - enable mailbox and firmware drivers, disable power driver CONFIG_BCM_VCIO=y CONFIG_BCM2835_MBOX=y CONFIG_RASPBERRYPI_FIRMWARE=y remove CONFIG_BCM2708_POWER=y see raspberrypi/linux#1037
- add CONFIG_SND_SOC_WM8804_I2C=m see raspberrypi/linux@d478458 - enable mailbox and firmware drivers, disable power driver CONFIG_BCM_VCIO=y CONFIG_BCM2835_MBOX=y CONFIG_RASPBERRYPI_FIRMWARE=y remove CONFIG_BCM2708_POWER=y see raspberrypi/linux#1037
….c:367 [ Upstream commit 73cb4a2 ] Use irq*_rcu() functions to fix this kernel warning: WARNING: CPU: 0 PID: 0 at kernel/context_tracking.c:367 ct_irq_enter+0xa0/0xd0 Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.7.0-rc3-64bit+ raspberrypi#1037 Hardware name: 9000/785/C3700 IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000412cd758 00000000412cd75c IIR: 03ffe01f ISR: 0000000000000000 IOR: 0000000043c20c20 CPU: 0 CR30: 0000000041caa000 CR31: 0000000000000000 ORIG_R28: 0000000000000005 IAOQ[0]: ct_irq_enter+0xa0/0xd0 IAOQ[1]: ct_irq_enter+0xa4/0xd0 RP(r2): irq_enter+0x34/0x68 Backtrace: [<000000004034a3ec>] irq_enter+0x34/0x68 [<000000004030dc48>] do_cpu_irq_mask+0xc0/0x450 [<0000000040303070>] intr_return+0x0/0xc Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This makes the new firmware driver API available that will replace the old mailbox API.
bcm2835-mailbox will land in v4.2, and the firmware driver will probably land in v4.3
Tested on Pi1 and Pi2 with and without Device Tree + ARCH_BCM2835.