diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 4eaf2a962914..149393c02c3f 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/mod_devicetable.h> | ||
31 | #include <linux/of_platform.h> | ||
30 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
31 | #include <asm/page.h> | 33 | #include <asm/page.h> |
32 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
@@ -647,3 +649,35 @@ unsigned int qe_get_num_of_snums(void) | |||
647 | return num_of_snums; | 649 | return num_of_snums; |
648 | } | 650 | } |
649 | EXPORT_SYMBOL(qe_get_num_of_snums); | 651 | EXPORT_SYMBOL(qe_get_num_of_snums); |
652 | |||
653 | #if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) | ||
654 | static int qe_resume(struct of_device *ofdev) | ||
655 | { | ||
656 | if (!qe_alive_during_sleep()) | ||
657 | qe_reset(); | ||
658 | return 0; | ||
659 | } | ||
660 | |||
661 | static int qe_probe(struct of_device *ofdev, const struct of_device_id *id) | ||
662 | { | ||
663 | return 0; | ||
664 | } | ||
665 | |||
666 | static const struct of_device_id qe_ids[] = { | ||
667 | { .compatible = "fsl,qe", }, | ||
668 | { }, | ||
669 | }; | ||
670 | |||
671 | static struct of_platform_driver qe_driver = { | ||
672 | .driver.name = "fsl-qe", | ||
673 | .match_table = qe_ids, | ||
674 | .probe = qe_probe, | ||
675 | .resume = qe_resume, | ||
676 | }; | ||
677 | |||
678 | static int __init qe_drv_init(void) | ||
679 | { | ||
680 | return of_register_platform_driver(&qe_driver); | ||
681 | } | ||
682 | device_initcall(qe_drv_init); | ||
683 | #endif /* defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) */ | ||