-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> 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 <[email protected]>
- Loading branch information
1 parent
33ef2dd
commit d9c0dd6
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ struct rpi_firmware { | |
u32 enabled; | ||
}; | ||
|
||
static struct platform_device *g_pdev; | ||
|
||
static DEFINE_MUTEX(transaction_lock); | ||
|
||
static void response_callback(struct mbox_client *cl, void *msg) | ||
|
@@ -207,6 +209,7 @@ static int rpi_firmware_probe(struct platform_device *pdev) | |
init_completion(&fw->c); | ||
|
||
platform_set_drvdata(pdev, fw); | ||
g_pdev = pdev; | ||
|
||
rpi_firmware_print_firmware_revision(fw); | ||
|
||
|
@@ -218,6 +221,7 @@ static int rpi_firmware_remove(struct platform_device *pdev) | |
struct rpi_firmware *fw = platform_get_drvdata(pdev); | ||
|
||
mbox_free_channel(fw->chan); | ||
g_pdev = NULL; | ||
|
||
return 0; | ||
} | ||
|
@@ -230,7 +234,7 @@ static int rpi_firmware_remove(struct platform_device *pdev) | |
*/ | ||
struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) | ||
{ | ||
struct platform_device *pdev = of_find_device_by_node(firmware_node); | ||
struct platform_device *pdev = g_pdev; | ||
|
||
if (!pdev) | ||
return NULL; | ||
|
@@ -253,7 +257,18 @@ static struct platform_driver rpi_firmware_driver = { | |
.probe = rpi_firmware_probe, | ||
.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 <[email protected]>"); | ||
MODULE_DESCRIPTION("Raspberry Pi firmware driver"); | ||
|