-
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.
mailbox: bcm2835: Support ARCH_BCM270x
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 <[email protected]>
- Loading branch information
1 parent
b748db8
commit cfa9467
Showing
3 changed files
with
29 additions
and
4 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
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 |
---|---|---|
|
@@ -51,12 +51,15 @@ | |
#define MAIL1_WRT (ARM_0_MAIL1 + 0x00) | ||
#define MAIL1_STA (ARM_0_MAIL1 + 0x18) | ||
|
||
/* On ARCH_BCM270x these come through <linux/interrupt.h> (arm_control.h ) */ | ||
#ifndef ARM_MS_FULL | ||
/* Status register: FIFO state. */ | ||
#define ARM_MS_FULL BIT(31) | ||
#define ARM_MS_EMPTY BIT(30) | ||
|
||
/* Configuration register: Enable interrupts. */ | ||
#define ARM_MC_IHAVEDATAIRQEN BIT(0) | ||
#endif | ||
|
||
struct bcm2835_mbox { | ||
void __iomem *regs; | ||
|
@@ -151,7 +154,7 @@ static int bcm2835_mbox_probe(struct platform_device *pdev) | |
return -ENOMEM; | ||
spin_lock_init(&mbox->lock); | ||
|
||
ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0), | ||
ret = devm_request_irq(dev, platform_get_irq(pdev, 0), | ||
bcm2835_mbox_irq, 0, dev_name(dev), mbox); | ||
if (ret) { | ||
dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n", | ||
|
@@ -209,7 +212,18 @@ static struct platform_driver bcm2835_mbox_driver = { | |
.probe = bcm2835_mbox_probe, | ||
.remove = bcm2835_mbox_remove, | ||
}; | ||
module_platform_driver(bcm2835_mbox_driver); | ||
|
||
static int __init bcm2835_mbox_init(void) | ||
{ | ||
return platform_driver_register(&bcm2835_mbox_driver); | ||
} | ||
arch_initcall(bcm2835_mbox_init); | ||
|
||
static void __init bcm2835_mbox_exit(void) | ||
{ | ||
platform_driver_unregister(&bcm2835_mbox_driver); | ||
} | ||
module_exit(bcm2835_mbox_exit); | ||
|
||
MODULE_AUTHOR("Lubomir Rintel <[email protected]>"); | ||
MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); | ||
|
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