2 * Qualcomm/Atheros WiSoCs common/helper functions
4 * Copyright (C) 2016 Piotr Dymacz <piotr@dymacz.pl>
6 * SPDX-License-Identifier: GPL-2.0
11 #include <asm/addrspace.h>
12 #include <soc/qca_soc_common.h>
15 * Returns 1 if reference clock is 40 MHz
17 inline u32 qca_xtal_is_40mhz(void)
19 return ((qca_soc_reg_read(QCA_RST_BOOTSTRAP_REG) &
20 QCA_RST_BOOTSTRAP_REF_CLK_MASK) >> QCA_RST_BOOTSTRAP_REF_CLK_SHIFT);
24 * Performs full chip reset
26 void qca_full_chip_reset(void)
31 qca_soc_reg_write(QCA_RST_RESET_REG,
32 QCA_RST_RESET_FULL_CHIP_RST_MASK
33 | QCA_RST_RESET_DDR_RST_MASK);