]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - drivers/net/ethernet/realtek/r8169.c
r8169: Get and enable optional ether_clk clock
authorHans de Goede <hdegoede@redhat.com>
Wed, 12 Sep 2018 09:34:55 +0000 (11:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Sep 2018 01:47:58 +0000 (18:47 -0700)
commitc2f6f3ee7f22521fabc3295f51149bc3f4dd9202
treea16480d3416240f44b2a9885458079876ecd3bb9
parentb1e3454d39f992e5409cd19f97782185950df6e7
r8169: Get and enable optional ether_clk clock

On some boards a platform clock is used as clock for the r8169 chip,
this commit adds support for getting and enabling this clock (assuming
it has an "ether_clk" alias set on it).

This is related to commit d31fd43c0f9a ("clk: x86: Do not gate clocks
enabled by the firmware") which is a previous attempt to fix this for some
x86 boards, but this causes all Cherry Trail SoC using boards to not reach
there lowest power states when suspending.

This commit (together with an atom-pmc-clk driver commit adding the alias)
fixes things properly by making the r8169 get the clock and enable it when
it needs it.

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=193891#c102
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=196861
Cc: Johannes Stezenbach <js@sig21.net>
Cc: Carlo Caione <carlo@endlessm.com>
Reported-by: Johannes Stezenbach <js@sig21.net>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c