mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
clk: zynqmp: Fixed the same if/else part error reported by coverity
This patch fixed the same if/else part error by adding the required source select on the basis of is_pre_src check. Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
6da4f67ad0
commit
b4f015845a
1 changed files with 4 additions and 2 deletions
|
@ -103,6 +103,8 @@ static const resource_size_t zynqmp_crl_apb_clkc_base = 0xff5e0020;
|
||||||
#define PLLCTRL_BYPASS_SHFT 3
|
#define PLLCTRL_BYPASS_SHFT 3
|
||||||
#define PLLCTRL_POST_SRC_SHFT 24
|
#define PLLCTRL_POST_SRC_SHFT 24
|
||||||
#define PLLCTRL_POST_SRC_MASK (0x7 << PLLCTRL_POST_SRC_SHFT)
|
#define PLLCTRL_POST_SRC_MASK (0x7 << PLLCTRL_POST_SRC_SHFT)
|
||||||
|
#define PLLCTRL_PRE_SRC_SHFT 20
|
||||||
|
#define PLLCTRL_PRE_SRC_MASK (0x7 << PLLCTRL_PRE_SRC_SHFT)
|
||||||
|
|
||||||
|
|
||||||
#define NUM_MIO_PINS 77
|
#define NUM_MIO_PINS 77
|
||||||
|
@ -310,8 +312,8 @@ static ulong zynqmp_clk_get_pll_src(ulong clk_ctrl,
|
||||||
u32 src_sel;
|
u32 src_sel;
|
||||||
|
|
||||||
if (is_pre_src)
|
if (is_pre_src)
|
||||||
src_sel = (clk_ctrl & PLLCTRL_POST_SRC_MASK) >>
|
src_sel = (clk_ctrl & PLLCTRL_PRE_SRC_MASK) >>
|
||||||
PLLCTRL_POST_SRC_SHFT;
|
PLLCTRL_PRE_SRC_SHFT;
|
||||||
else
|
else
|
||||||
src_sel = (clk_ctrl & PLLCTRL_POST_SRC_MASK) >>
|
src_sel = (clk_ctrl & PLLCTRL_POST_SRC_MASK) >>
|
||||||
PLLCTRL_POST_SRC_SHFT;
|
PLLCTRL_POST_SRC_SHFT;
|
||||||
|
|
Loading…
Reference in a new issue