mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
firmware: bcm2835: Support ARCH_BCM270x
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>
This commit is contained in:
committed by
Dom Cobley
parent
9b8d23cdf2
commit
726792cd8d
@@ -34,6 +34,8 @@ struct rpi_firmware {
|
|||||||
struct kref consumers;
|
struct kref consumers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct platform_device *g_pdev;
|
||||||
|
|
||||||
static DEFINE_MUTEX(transaction_lock);
|
static DEFINE_MUTEX(transaction_lock);
|
||||||
|
|
||||||
static void response_callback(struct mbox_client *cl, void *msg)
|
static void response_callback(struct mbox_client *cl, void *msg)
|
||||||
@@ -301,6 +303,7 @@ static int rpi_firmware_probe(struct platform_device *pdev)
|
|||||||
kref_init(&fw->consumers);
|
kref_init(&fw->consumers);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, fw);
|
platform_set_drvdata(pdev, fw);
|
||||||
|
g_pdev = pdev;
|
||||||
|
|
||||||
rpi_firmware_print_firmware_revision(fw);
|
rpi_firmware_print_firmware_revision(fw);
|
||||||
rpi_register_hwmon_driver(dev, fw);
|
rpi_register_hwmon_driver(dev, fw);
|
||||||
@@ -329,6 +332,7 @@ static void rpi_firmware_remove(struct platform_device *pdev)
|
|||||||
rpi_clk = NULL;
|
rpi_clk = NULL;
|
||||||
|
|
||||||
rpi_firmware_put(fw);
|
rpi_firmware_put(fw);
|
||||||
|
g_pdev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id rpi_firmware_of_match[] = {
|
static const struct of_device_id rpi_firmware_of_match[] = {
|
||||||
@@ -408,7 +412,18 @@ static struct platform_driver rpi_firmware_driver = {
|
|||||||
.shutdown = rpi_firmware_shutdown,
|
.shutdown = rpi_firmware_shutdown,
|
||||||
.remove = rpi_firmware_remove,
|
.remove = rpi_firmware_remove,
|
||||||
};
|
};
|
||||||
module_platform_driver(rpi_firmware_driver);
|
|
||||||
|
static int __init rpi_firmware_init(void)
|
||||||
|
{
|
||||||
|
return platform_driver_register(&rpi_firmware_driver);
|
||||||
|
}
|
||||||
|
core_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_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||||
MODULE_DESCRIPTION("Raspberry Pi firmware driver");
|
MODULE_DESCRIPTION("Raspberry Pi firmware driver");
|
||||||
|
|||||||
Reference in New Issue
Block a user