diff options
Diffstat (limited to 'arch/arm/mach-shmobile/intc-sh7372.c')
-rw-r--r-- | arch/arm/mach-shmobile/intc-sh7372.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 739315e30eb9..29cdc0522d9c 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -606,9 +606,16 @@ static void intcs_demux(unsigned int irq, struct irq_desc *desc) | |||
606 | generic_handle_irq(intcs_evt2irq(evtcodeas)); | 606 | generic_handle_irq(intcs_evt2irq(evtcodeas)); |
607 | } | 607 | } |
608 | 608 | ||
609 | static void __iomem *intcs_ffd2; | ||
610 | static void __iomem *intcs_ffd5; | ||
611 | |||
609 | void __init sh7372_init_irq(void) | 612 | void __init sh7372_init_irq(void) |
610 | { | 613 | { |
611 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | 614 | void __iomem *intevtsa; |
615 | |||
616 | intcs_ffd2 = ioremap_nocache(0xffd20000, PAGE_SIZE); | ||
617 | intevtsa = intcs_ffd2 + 0x100; | ||
618 | intcs_ffd5 = ioremap_nocache(0xffd50000, PAGE_SIZE); | ||
612 | 619 | ||
613 | register_intc_controller(&intca_desc); | 620 | register_intc_controller(&intca_desc); |
614 | register_intc_controller(&intcs_desc); | 621 | register_intc_controller(&intcs_desc); |
@@ -617,3 +624,46 @@ void __init sh7372_init_irq(void) | |||
617 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); | 624 | irq_set_handler_data(evt2irq(0xf80), (void *)intevtsa); |
618 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); | 625 | irq_set_chained_handler(evt2irq(0xf80), intcs_demux); |
619 | } | 626 | } |
627 | |||
628 | static unsigned short ffd2[0x200]; | ||
629 | static unsigned short ffd5[0x100]; | ||
630 | |||
631 | void sh7372_intcs_suspend(void) | ||
632 | { | ||
633 | int k; | ||
634 | |||
635 | for (k = 0x00; k <= 0x30; k += 4) | ||
636 | ffd2[k] = __raw_readw(intcs_ffd2 + k); | ||
637 | |||
638 | for (k = 0x80; k <= 0xb0; k += 4) | ||
639 | ffd2[k] = __raw_readb(intcs_ffd2 + k); | ||
640 | |||
641 | for (k = 0x180; k <= 0x188; k += 4) | ||
642 | ffd2[k] = __raw_readb(intcs_ffd2 + k); | ||
643 | |||
644 | for (k = 0x00; k <= 0x3c; k += 4) | ||
645 | ffd5[k] = __raw_readw(intcs_ffd5 + k); | ||
646 | |||
647 | for (k = 0x80; k <= 0x9c; k += 4) | ||
648 | ffd5[k] = __raw_readb(intcs_ffd5 + k); | ||
649 | } | ||
650 | |||
651 | void sh7372_intcs_resume(void) | ||
652 | { | ||
653 | int k; | ||
654 | |||
655 | for (k = 0x00; k <= 0x30; k += 4) | ||
656 | __raw_writew(ffd2[k], intcs_ffd2 + k); | ||
657 | |||
658 | for (k = 0x80; k <= 0xb0; k += 4) | ||
659 | __raw_writeb(ffd2[k], intcs_ffd2 + k); | ||
660 | |||
661 | for (k = 0x180; k <= 0x188; k += 4) | ||
662 | __raw_writeb(ffd2[k], intcs_ffd2 + k); | ||
663 | |||
664 | for (k = 0x00; k <= 0x3c; k += 4) | ||
665 | __raw_writew(ffd5[k], intcs_ffd5 + k); | ||
666 | |||
667 | for (k = 0x80; k <= 0x9c; k += 4) | ||
668 | __raw_writeb(ffd5[k], intcs_ffd5 + k); | ||
669 | } | ||