clk: agilex/stratix10: add support for the 2nd bypass
authorDinh Nguyen <dinguyen@kernel.org>
Fri, 11 Jun 2021 02:52:00 +0000 (21:52 -0500)
committerStephen Boyd <sboyd@kernel.org>
Sun, 27 Jun 2021 23:39:59 +0000 (16:39 -0700)
commitc2c9c5661a48bf2e67dcb4e989003144304acd6a
treeecf6cd99a5031c2dcf5f48220f8f6ec70ca88542
parent6855ee839699bdabb4b16cf942557fd763bcb1fa
clk: agilex/stratix10: add support for the 2nd bypass

The EMAC clocks on Stratix10/Agilex/N5X have an additional bypass that
was not being accounted for. The bypass selects between
emaca_clk/emacb_clk and boot_clk.

Because the bypass register offset is different between Stratix10 and
Agilex/N5X, it's best to create a new function to calculate the bypass.

Fixes: 80c6b7a0894f ("clk: socfpga: agilex: add clock driver for the Agilex platform")
Cc: stable@vger.kernel.org
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20210611025201.118799-3-dinguyen@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/socfpga/clk-agilex.c
drivers/clk/socfpga/clk-gate-s10.c
drivers/clk/socfpga/stratix10-clk.h