diff options
author | Olof Johansson <olof@lixom.net> | 2014-01-04 00:09:51 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-01-04 00:09:51 -0500 |
commit | 11b35a352521b740944455b45dbee190e9c893a4 (patch) | |
tree | aa5bc9a24cb6290aaed5476990f0e5a05442ff38 /drivers/clocksource | |
parent | 5631e7f4e29b1ebf3d856614c0b5876463857da6 (diff) | |
parent | b652896b02df3dfde3a68957cce01f2aa4585842 (diff) |
Merge tag 'renesas-dt3-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
From Simon Horman:
Third Round of Renesas ARM Based SoC DT Updates for v3.14
* r8a7791 (R-Car M2) and r8a7790 (R-Car H2) SoCSs
- Add SSI, QSPI and MSIOF clocks in device tree
r8a7791 (R-Car M2) based Koelsch and r8a7790 (R-Car H2) based Lager boards
- Remove reference DTS
- Specify external clock frequency in DT
- Sync non-reference DTS with referene DTS
- Add clocks to DTS
* r8a7740 (R-Mobile A1) based Armadillo board
- Add gpio-keys device
- Add PWM backlight enable GPIO
- Add PWM backlight power supply
* r8a73a0 (SH-Mobile AG5), r8a7740 (R-Mobile A1) and
r8a73a4 (SH-Mobile APE6) SoCs
- Specify PFC interrupts in DT
* tag 'renesas-dt3-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (72 commits)
ARM: shmobile: r8a7791: Add SSI clocks in device tree
ARM: shmobile: r8a7790: Add SSI clocks in device tree
ARM: shmobile: r8a7791: Add QSPI module clock in device tree
ARM: shmobile: r8a7790: Add QSPI module clock in device tree
ARM: shmobile: r8a7791: Add MSIOF clocks in device tree
ARM: shmobile: r8a7790: Add MSIOF clocks in device tree
ARM: shmobile: Remove Koelsch reference DTS
ARM: shmobile: Remove Lager reference DTS
ARM: shmobile: koelsch: Specify external clock frequency in DT
ARM: shmobile: lager: Specify external clock frequency in DT
ARM: shmobile: Sync Koelsch DTS with Koelsch reference DTS
ARM: shmobile: Sync Lager DTS with Lager reference DTS
ARM: shmobile: r8a7791: Add clocks
ARM: shmobile: r8a7790: Reference clocks
ARM: shmobile: r8a7790: Add clocks
ARM: shmobile: armadillo: dts: Add gpio-keys device
ARM: shmobile: sh73a0: Specify PFC interrupts in DT
ARM: shmobile: r8a7740: Specify PFC interrupts in DT
ARM: shmobile: r8a73a4: Specify PFC interrupts in DT
ARM: shmobile: armadillo: dts: Add PWM backlight enable GPIO
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 0965e9848b3d..940341a185d7 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -634,12 +634,18 @@ static int sh_cmt_clock_event_next(unsigned long delta, | |||
634 | 634 | ||
635 | static void sh_cmt_clock_event_suspend(struct clock_event_device *ced) | 635 | static void sh_cmt_clock_event_suspend(struct clock_event_device *ced) |
636 | { | 636 | { |
637 | pm_genpd_syscore_poweroff(&ced_to_sh_cmt(ced)->pdev->dev); | 637 | struct sh_cmt_priv *p = ced_to_sh_cmt(ced); |
638 | |||
639 | pm_genpd_syscore_poweroff(&p->pdev->dev); | ||
640 | clk_unprepare(p->clk); | ||
638 | } | 641 | } |
639 | 642 | ||
640 | static void sh_cmt_clock_event_resume(struct clock_event_device *ced) | 643 | static void sh_cmt_clock_event_resume(struct clock_event_device *ced) |
641 | { | 644 | { |
642 | pm_genpd_syscore_poweron(&ced_to_sh_cmt(ced)->pdev->dev); | 645 | struct sh_cmt_priv *p = ced_to_sh_cmt(ced); |
646 | |||
647 | clk_prepare(p->clk); | ||
648 | pm_genpd_syscore_poweron(&p->pdev->dev); | ||
643 | } | 649 | } |
644 | 650 | ||
645 | static void sh_cmt_register_clockevent(struct sh_cmt_priv *p, | 651 | static void sh_cmt_register_clockevent(struct sh_cmt_priv *p, |
@@ -737,6 +743,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
737 | goto err2; | 743 | goto err2; |
738 | } | 744 | } |
739 | 745 | ||
746 | ret = clk_prepare(p->clk); | ||
747 | if (ret < 0) | ||
748 | goto err3; | ||
749 | |||
740 | if (res2 && (resource_size(res2) == 4)) { | 750 | if (res2 && (resource_size(res2) == 4)) { |
741 | /* assume both CMSTR and CMCSR to be 32-bit */ | 751 | /* assume both CMSTR and CMCSR to be 32-bit */ |
742 | p->read_control = sh_cmt_read32; | 752 | p->read_control = sh_cmt_read32; |
@@ -773,19 +783,21 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
773 | cfg->clocksource_rating); | 783 | cfg->clocksource_rating); |
774 | if (ret) { | 784 | if (ret) { |
775 | dev_err(&p->pdev->dev, "registration failed\n"); | 785 | dev_err(&p->pdev->dev, "registration failed\n"); |
776 | goto err3; | 786 | goto err4; |
777 | } | 787 | } |
778 | p->cs_enabled = false; | 788 | p->cs_enabled = false; |
779 | 789 | ||
780 | ret = setup_irq(irq, &p->irqaction); | 790 | ret = setup_irq(irq, &p->irqaction); |
781 | if (ret) { | 791 | if (ret) { |
782 | dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); | 792 | dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); |
783 | goto err3; | 793 | goto err4; |
784 | } | 794 | } |
785 | 795 | ||
786 | platform_set_drvdata(pdev, p); | 796 | platform_set_drvdata(pdev, p); |
787 | 797 | ||
788 | return 0; | 798 | return 0; |
799 | err4: | ||
800 | clk_unprepare(p->clk); | ||
789 | err3: | 801 | err3: |
790 | clk_put(p->clk); | 802 | clk_put(p->clk); |
791 | err2: | 803 | err2: |