summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-04serial: sh-sci: Add device tree support for r8a7779Simon Horman2-1/+10
According to the platform data for the legacy-C initialisation of sh-sci for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of scscr needs to be set. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit fcbee4d49f30eb0eaa83a62e6a3cab5a892ed93f) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: sh-pfc: r8a73a4: Allow Multiplatform BuildMagnus Damm1-0/+3
Add #ifdefs to allow r8a73a4 Multiplatform build. Needed to enable r8a73a4 Multiplatform support. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit f39d8a72feb073c4ef6296f1d12cedf2ed572bfb) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: sh-pfc: sh73a0: Allow Multiplatform BuildMagnus Damm1-0/+2
Add #ifdefs to allow sh73a0 Multiplatform build. Needed to enable sh73a0 Multiplatform support. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 672d32377494b84d6af483ce46eda07baba4e3ea) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: sh-pfc: r8a7740: Allow Multiplatform BuildMagnus Damm1-0/+2
Add #ifdefs to allow r8a7740 Multiplatform build. Needed to enable r8a7740 Multiplatform support. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit b6c996a295620b67e4033f2eb07e5a5cf9e7a48f) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: sh-pfc: Don't set the pinmux_irq irq field for multiplatformLaurent Pinchart1-0/+5
In the multiplatform kernel case the IRQs associated with the PFC GPIOs are specified through DT. The pinmux_irq irq field is thus ignored by the code, and doesn't need to be set. This will allow removing the mach/irq.h include from pfc-*.c files that was required for the irq_pin() macro used to initialize the irq field. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 0e26e8dfb9dddb0559fb7cd7b53a8b497a8d4121) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: pfc: r8a7790: add mux data for IIC(B) coresWolfram Sang1-2/+116
Signed-off-by: Wolfram Sang <wsa@sang-engineering.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit a16b81dcbfc5889c37dac5f8e836136e4740fc18) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: pfc: r8a7790: add i2c0 muxingWolfram Sang1-1/+21
Add the muxing for the last missing i2c rcar core. Fix the sorting for SH_PFC_PIN_NAMED while we are here. Signed-off-by: Wolfram Sang <wsa@sang-engineering.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 35a493de0daf4955b6d15d488b3f8754d4637a04) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04sh-pfc: r8a7791: Add Audio pin supportKuninori Morimoto1-0/+61
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit c57a05b0eb0ee0205b34f2694b035afc75fa71e4) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04sh-pfc: r8a7791: Add SSI pin supportKuninori Morimoto1-0/+314
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit b664cd1f020211d8e4480c2937b82fe513a9c757) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04pinctrl: sh-pfc: r8a7791: Split the DU sync and cde/disp groupsLaurent Pinchart1-10/+27
The DU parallel interface ODDF signal is optional, move it out of the HSYNC/VSYNC group into a group of its down. The CDE and DISP signals are independent, split them to two different groups. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit d10046e25c73e6150677b1b5360f20bb631181a7) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. [dlezcano] : refreshed against latest modifications: kmalloc -> kzalloc Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> (cherry picked from commit c77a565b2966567b97d589e90a6b9ce725bb15b1) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Sort headers alphabeticallyLaurent Pinchart1-9/+9
This helps locating duplicates and inserting new headers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 346f5e76b3822a2530a03f33b00ee89dfc463326) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Remove FSF mail address from GPL noticeLaurent Pinchart1-4/+0
Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 24c8f71707087eb177b45f4a24faedaa0d8f0287) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy caseLaurent Pinchart1-1/+1
The sh_mtu2 driver gets the MTU2 functional clock using a connection ID of "mtu2_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "mtu2_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 6dc9693bb3997cb324a2ffb39deaa72081a9bd0d) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Add support for multiple channels per deviceLaurent Pinchart1-54/+130
MTU2 hardware devices can support multiple channels, with global registers and per-channel registers. The sh_mtu2 driver currently models the hardware with one Linux device per channel. This model makes it difficult to handle global registers in a clean way. Add support for a new model that uses one Linux device per timer with multiple channels per device. This requires changes to platform data, add new channel configuration fields. Support for the legacy model is kept and will be removed after all platforms switch to the new model. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit faf3f4f8c805f5f8a786ba544c94bf3e01838388) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200Laurent Pinchart1-6/+6
All boards use clock event ratings of 200 for the MTU2, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 207e21a9732a27f58843ccae1c9644f3a1636b66) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Set cpumask to cpu_possible_maskLaurent Pinchart1-1/+1
The MTU2 is not tied to CPU0, make it usable on any CPU. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 3cc950479891040366629247357512f1cc928da3) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Replace hardcoded register values with macrosLaurent Pinchart1-6/+92
Define symbolic macros for all used registers bits. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit f992c2410bd31b7c80ba8cc8b989d91b9cac3c30) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Allocate channels dynamicallyLaurent Pinchart1-7/+20
This prepares the driver for multi-channel support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit c54ccb431ce6ce813bb850e8659991fc4c5bc6bc) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Replace kmalloc + memset with kzallocLaurent Pinchart1-5/+1
One kzalloc a day keeps the bugs away. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 810c651369b343618d949826e0acd0df1b8b06eb) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Add index to struct sh_mtu2_channelLaurent Pinchart1-9/+13
Use the index as the timer start/stop bit and when printing messages to identify the channel. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit d2b93177065fd8e1e18f4f42880326e0881ff457) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structureLaurent Pinchart1-14/+18
The channel memory base is channel-specific, add it to the channel structure in preparation for support of multiple channels per device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit da90a1c67751a412499a9f5698c3bf0bf80f65a6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Constify name argument to sh_mtu2_register()Laurent Pinchart1-3/+3
The name argument is assigned to const structure fields only, constify it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit aa83804af705731d2802b80fb4b94a79045d31a3) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Split channel setup to separate functionLaurent Pinchart1-10/+19
Move the channel setup code from sh_mtu2_setup to a new sh_mtu2_setup_channel function and call it from sh_mtu2_setup. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 2e1a53265d550002fdd1658778854d56ae4cadc1) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_deviceLaurent Pinchart1-32/+33
Channel data is private as well, rename priv to device to make the distrinction between the core device and the channels clearer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 7dad72de1b475d02935e5c79c218637b6c63108b) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Split channel fields from sh_mtu2_privLaurent Pinchart1-56/+69
Create a new sh_mtu2_channel structure to hold the channel-specific fields in preparation for multiple channels per device support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 42752cc619c0ee619b56f86932ce42b00adb5052) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variablesLaurent Pinchart1-5/+5
The rate and periodic fields are used in a single function only, as local variables. Remove them from the structure. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit f92d62f53973466cccb25900c2597ff6df950d74) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_mtu2: Use request_irq() instead of setup_irq()Laurent Pinchart1-14/+8
The driver claims it needs to register an interrupt handler too early for request_irq(). This might have been true in the past, but the only meaningful difference between request_irq() and setup_irq() today is an additional kzalloc() call in request_irq(). As the driver calls kmalloc() itself we know that the slab allocator is available, we can thus switch to request_irq(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com> (cherry picked from commit 276bee05d8b72e98d530b55161e0a2131da99f58) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. [dlezcano] : refreshed against latest modifications: kmalloc -> kzalloc Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> (cherry picked from commit 0178f41d3d35b63ed25a066d90e7dda380018c06) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Request IRQ for clock event device onlyLaurent Pinchart1-24/+27
Clock sources don't need an IRQ, request the IRQ only for channels used as clock event devices. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit bfa76bb12f23ecf0c6d07c302f4571a6fe9bc3e3) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Sort headers alphabeticallyLaurent Pinchart1-10/+10
This helps locating duplicates and inserting new headers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit e7a9bcc2372b0e62443569c63a369cfd528db4f4) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Remove FSF mail address from GPL noticeLaurent Pinchart1-4/+0
Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 1cd89c568c057a13ca11acf0eb3a78121513e2b6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Rename clock to "fck" in the non-legacy caseLaurent Pinchart1-1/+1
The sh_cmt driver gets the CMT functional clock using a connection ID of "cmt_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "cmt_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 24b4e07df54b7bf7739fb3dd193f639a8f274ad6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Add support for multiple channels per deviceLaurent Pinchart2-68/+237
CMT hardware devices can support multiple channels, with global registers and per-channel registers. The sh_cmt driver currently models the hardware with one Linux device per channel. This model makes it difficult to handle global registers in a clean way. Add support for a new model that uses one Linux device per timer with multiple channels per device. This requires changes to platform data, add new channel configuration fields. Support for the legacy model is kept and will be removed after all platforms switch to the new model. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 81b3b2711072b6047d5f332cd8751a1c5c9a3fb2) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Hardcode CMT clock source rating to 125Laurent Pinchart1-6/+6
All boards use or should use a clock source rating of 125 for the CMT, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit fb28a659813084365eced5c2876c6383da52e634) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Hardcode CMT clock event rating to 125Laurent Pinchart1-7/+6
All boards use or should use a clock event rating of 125 for the CMT, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit b7fcbb0f830e6cccc9d358c24f8463e5d8018649) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Set cpumask to cpu_possible_maskLaurent Pinchart1-1/+1
The CMT is a global timer not restricted to a single CPU. It has a lower rating than the TMU or ARM architected timer, but is still useful on systems where the other timers are stopped during CPU sleep. When multiple timers are available the timers core selects which timer to use based on timer ratings. On SMP systems where timer broadcasting is required, one dummy timer is instantiated per CPU with a rating of 100. On those systems the CMT timer has a rating of 80, which makes the dummy timer selected by default on all CPUs. The CMT is then available, and will be used as a broadcast timer. On UP systems no dummy timer is instantiated. The CMT timer has a rating of 125 on those systems and is used directly as a clock event device for CPU0 without broadcasting. The CMT rating shouldn't depend on whether we boot a UP or SMP system. We can't raise the CMT rating to 125 on SMP systems. This would select CMT as the clock event device for CPU0 as its rating is higher than the dummy timer rating, and would leave the system without a broadcast timer. We could instead lower the rating to 80 on all systems, but that wouldn't reflect reality as ratings between 1 and 99 are documented as "unfit for real use". We should raise the rating above 99 and still have the CMT selected as a broadcast timer. This can be done by changing the cpumask from cpumask_of(0) to cpu_possible_mask. In that case the timer selection logic will prefer the previously probed and already selected dummy timer for all CPUs based on the fact that already selected per-cpu timers are preferred over new global timers, regardless of their respective ratings. This also better reflects reality, as the CMT is not tied to the boot CPU. Ideally the timer selection logic should realize that the CMT needs to be used as a broadcast timer on SMP systems as no other broadcast timer is available, regardless of the cpumask and rating. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit f1ebe1e47e1979393a8492bfe751176908a830ae) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Replace hardcoded register values with macrosLaurent Pinchart1-12/+44
Define symbolic macros for all used registers bits. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit d14be99b7e3fe52bc9921caa30953d49f499f121) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Split static information from sh_cmt_deviceLaurent Pinchart1-70/+122
Create a new sh_cmt_info structure to hold static information about the device model and reference that structure from the sh_cmt_device structure. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 2cda3ac49d5744432e9ebffb8ba47bef6eca053d) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Allocate channels dynamicallyLaurent Pinchart1-2/+12
This prepares the driver for multi-channel support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit f5ec9b194a93c05e2ccdb3e90d9061cfedc806d9) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Replace kmalloc + memset with kzallocLaurent Pinchart1-5/+1
One kzalloc a day keeps the bugs away. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit b262bc74dcfd77355720342cbcf89cc8ec12e86b) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Add index to struct sh_cmt_channelLaurent Pinchart1-13/+24
Use the index when printing messages to identify the channel. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 740a95184dd61eb0481f75ced05ea5e01b7ce6ac) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Add memory base to sh_cmt_channel structureLaurent Pinchart1-5/+8
The channel memory base is channel-specific, add it to the channel structure in preparation for support of multiple channels per device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit c924d2d2a964715b55b6601be338b3bd05a1ced5) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Rename mapbase/mapbase_str to mapbase_ch/mapbaseLaurent Pinchart1-17/+17
The mapbase variable points to the mapped base address of the channel, rename it to mapbase_sh. mapbase_str points to the mapped base address of the CMT device, rename it to mapbase. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 36f1ac982d94cd3cce8ae24abd0676b79dec6126) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Constify name argument to sh_cmt_register()Laurent Pinchart1-4/+4
The name argument is assigned to const structure fields only, constify it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 1d053e1d8eb28f42b7ec57d1c11ce70b8fba45ff) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Split channel setup to separate functionLaurent Pinchart1-32/+47
Move the channel setup code from sh_cmt_setup to a new sh_cmt_setup_channel function and call it from sh_cmt_setup. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit b882e7b13bc12b3d6b00e4ea2fe374413ddcdd2d) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Rename struct sh_cmt_priv to sh_cmt_deviceLaurent Pinchart1-58/+58
Channel data is private as well, rename priv to device to make the distrinction between the core device and the channels clearer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 2653caf4381f9adeec8c18dfec21ec3c855d801c) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Split channel fields from sh_cmt_privLaurent Pinchart1-186/+199
Create a new sh_cmt_channel structure to hold the channel-specific field in preparation for multiple channels per device support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit 7269f9333292586f2378c5321b40a8d3779c4653) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04clocksource: sh_cmt: Use request_irq() instead of setup_irq()Laurent Pinchart1-7/+3
The driver claims it needs to register an interrupt handler too early for request_irq(). This might have been true in the past, but the only meaningful difference between request_irq() and setup_irq() today is an additional kzalloc() call in request_irq(). As the driver calls kmalloc() itself we know that the slab allocator is available, we can thus switch to request_irq(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> (cherry picked from commit dc2eadece70089430f12e4ed6bb1a4421cf3d6f4) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-02-04ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host driversBartlomiej Zolnierkiewicz60-120/+113
This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable. Benefits of this change: * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n and CONFIG_PM_RUNTIME=y configurations * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in the future * more consistent code (there are host drivers which are using the correct CONFIG_PM_SLEEP checks already) The patch leaves the core libata code and ->port_[suspend,resume] support in sata_[inic162x,nv,sil24].c alone for now. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org> (cherry picked from commit 58eb8cd565af4a104395e3c10443951c1f73dafe) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>