Skip to content

Commit

Permalink
firmware: bcm2835: Support ARCH_BCM270x
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
notro authored and popcornmix committed Aug 22, 2024
1 parent 068ef79 commit 4033d66
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion drivers/firmware/raspberrypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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)
Expand Down Expand Up @@ -300,6 +302,7 @@ static int rpi_firmware_probe(struct platform_device *pdev)
kref_init(&fw->consumers);

platform_set_drvdata(pdev, fw);
g_pdev = pdev;

rpi_firmware_print_firmware_revision(fw);
rpi_register_hwmon_driver(dev, fw);
Expand Down Expand Up @@ -328,6 +331,7 @@ static void rpi_firmware_remove(struct platform_device *pdev)
rpi_clk = NULL;

rpi_firmware_put(fw);
g_pdev = NULL;
}

static const struct of_device_id rpi_firmware_of_match[] = {
Expand Down Expand Up @@ -407,7 +411,18 @@ static struct platform_driver rpi_firmware_driver = {
.shutdown = rpi_firmware_shutdown,
.remove_new = 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_DESCRIPTION("Raspberry Pi firmware driver");
Expand Down

0 comments on commit 4033d66

Please sign in to comment.