mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
75 lines
2.0 KiB
Diff
75 lines
2.0 KiB
Diff
From abea9147d22704cdfb68b7161a71dc9fb8fcb0b0 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
|
Date: Fri, 26 Jun 2015 14:25:01 +0200
|
|
Subject: [PATCH] firmware: bcm2835: Support ARCH_BCM270x
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
|
|
firmware: bcm2835: Don't turn on USB power
|
|
|
|
The raspberrypi-power driver is now used to turn on USB power.
|
|
|
|
This partly reverts commit:
|
|
firmware: bcm2835: Support ARCH_BCM270x
|
|
|
|
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
|
---
|
|
drivers/firmware/raspberrypi.c | 17 ++++++++++++++++-
|
|
1 file changed, 16 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/firmware/raspberrypi.c
|
|
+++ b/drivers/firmware/raspberrypi.c
|
|
@@ -32,6 +32,8 @@ struct rpi_firmware {
|
|
struct kref consumers;
|
|
};
|
|
|
|
+static struct platform_device *g_pdev;
|
|
+
|
|
static DEFINE_MUTEX(transaction_lock);
|
|
|
|
static void response_callback(struct mbox_client *cl, void *msg)
|
|
@@ -279,6 +281,7 @@ static int rpi_firmware_probe(struct pla
|
|
kref_init(&fw->consumers);
|
|
|
|
platform_set_drvdata(pdev, fw);
|
|
+ g_pdev = pdev;
|
|
|
|
rpi_firmware_print_firmware_revision(fw);
|
|
rpi_register_hwmon_driver(dev, fw);
|
|
@@ -307,6 +310,7 @@ static int rpi_firmware_remove(struct pl
|
|
rpi_clk = NULL;
|
|
|
|
rpi_firmware_put(fw);
|
|
+ g_pdev = NULL;
|
|
|
|
return 0;
|
|
}
|
|
@@ -381,7 +385,18 @@ static struct platform_driver rpi_firmwa
|
|
.shutdown = rpi_firmware_shutdown,
|
|
.remove = rpi_firmware_remove,
|
|
};
|
|
-module_platform_driver(rpi_firmware_driver);
|
|
+
|
|
+static int __init rpi_firmware_init(void)
|
|
+{
|
|
+ return platform_driver_register(&rpi_firmware_driver);
|
|
+}
|
|
+subsys_initcall(rpi_firmware_init);
|
|
+
|
|
+static void __init rpi_firmware_exit(void)
|
|
+{
|
|
+ platform_driver_unregister(&rpi_firmware_driver);
|
|
+}
|
|
+module_exit(rpi_firmware_exit);
|
|
|
|
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
|
MODULE_DESCRIPTION("Raspberry Pi firmware driver");
|