| /OK3568_Linux_fs/u-boot/arch/arm/mach-imx/mx5/ |
| H A D | clock.c | 7 * SPDX-License-Identifier: GPL-2.0+ 13 #include <asm/arch/imx-regs.h> 70 ((2 * (ref_clk) * (PLL_MFI_MIN - 1)) / PLL_PD_MAX) 78 clrsetbits_le32(&mxc_ccm->cscmr1, in set_usboh3_clk() 81 clrsetbits_le32(&mxc_ccm->cscdr1, in set_usboh3_clk() 92 clrsetbits_le32(&mxc_ccm->CCGR2, in enable_usboh3_clk() 108 return -EINVAL; in enable_i2c_clk() 112 setbits_le32(&mxc_ccm->CCGR1, mask); in enable_i2c_clk() 114 clrbits_le32(&mxc_ccm->CCGR1, mask); in enable_i2c_clk() 121 clrbits_le32(&mxc_ccm->cscmr1, MXC_CCM_CSCMR1_USB_PHY_CLK_SEL); in set_usb_phy_clk() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/cpu/armv8/s32v234/ |
| H A D | generic.c | 2 * (C) Copyright 2013-2016, Freescale Semiconductor, Inc. 4 * SPDX-License-Identifier: GPL-2.0+ 9 #include <asm/arch/imx-regs.h> 21 u32 cpu = readl(&mscmir->cpxtype); in get_cpu_rev() 36 return -1; in get_pllfreq() 58 readl(DFS_DVPORTn(pll, selected_output - 1)); in get_pllfreq() 98 u32 freq = 0; in get_mcu_main_clk() local 108 switch (sysclk_sel) { in get_mcu_main_clk() 110 freq = FIRC_CLK_FREQ; in get_mcu_main_clk() 113 freq = XOSC_CLK_FREQ; in get_mcu_main_clk() [all …]
|
| /OK3568_Linux_fs/kernel/sound/soc/codecs/ |
| H A D | max98090.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max98090.c -- MAX98090 ALSA SoC Audio driver 5 * Copyright 2011-2012 Maxim Integrated Products 253 switch (reg) { in max98090_volatile_register() 266 switch (reg) { in max98090_readable_register() 280 /* Reset the codec by writing to this write-only reset register */ in max98090_reset() 281 ret = regmap_write(max98090->regmap, M98090_REG_SOFTWARE_RESET, in max98090_reset() 284 dev_err(max98090->component->dev, in max98090_reset() 301 -600, 600, 0); 304 0, 3, TLV_DB_SCALE_ITEM(-600, 300, 0), [all …]
|
| H A D | max9867.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright 2013-2015 Maxim Integrated Products 6 // Copyright 2018 Ladislav Michl <ladis@linux-mips.org> 40 "Butterworth/8-24" 53 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in max9867_adc_dac_event() 57 if (!strcmp(w->name, "ADCL")) in max9867_adc_dac_event() 59 else if (!strcmp(w->name, "ADCR")) in max9867_adc_dac_event() 61 else if (!strcmp(w->name, "DACL")) in max9867_adc_dac_event() 63 else if (!strcmp(w->name, "DACR")) in max9867_adc_dac_event() 69 max9867->adc_dac_active |= BIT(adc_dac); in max9867_adc_dac_event() [all …]
|
| H A D | mc13783.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 #include <sound/soc-dapm.h> 97 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_dac() 109 return -EINVAL; in mc13783_pcm_hw_params_dac() 116 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_codec() 120 switch (rate) { in mc13783_pcm_hw_params_codec() 128 return -EINVAL; in mc13783_pcm_hw_params_codec() 141 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mc13783_pcm_hw_params_sync() 150 struct snd_soc_component *component = dai->component; in mc13783_set_fmt() 157 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in mc13783_set_fmt() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/ssb/ |
| H A D | driver_chipcommon_pmu.c | 51 u16 freq; /* Crystal frequency in kHz.*/ member 58 { .freq = 12000, .xf = 1, .wb_int = 73, .wb_frac = 349525, }, 59 { .freq = 13000, .xf = 2, .wb_int = 67, .wb_frac = 725937, }, 60 { .freq = 14400, .xf = 3, .wb_int = 61, .wb_frac = 116508, }, 61 { .freq = 15360, .xf = 4, .wb_int = 57, .wb_frac = 305834, }, 62 { .freq = 16200, .xf = 5, .wb_int = 54, .wb_frac = 336579, }, 63 { .freq = 16800, .xf = 6, .wb_int = 52, .wb_frac = 399457, }, 64 { .freq = 19200, .xf = 7, .wb_int = 45, .wb_frac = 873813, }, 65 { .freq = 19800, .xf = 8, .wb_int = 44, .wb_frac = 466033, }, 66 { .freq = 20000, .xf = 9, .wb_int = 44, .wb_frac = 0, }, [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-at91/armv7/ |
| H A D | clock.c | 2 * [origin: Linux kernel linux/arch/arm/mach-at91/clock.c] 6 * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> 10 * SPDX-License-Identifier: GPL-2.0+ 28 switch (css) { in at91_css_to_rate() 32 return gd->arch.main_clk_rate_hz; in at91_css_to_rate() 34 return gd->arch.plla_rate_hz; in at91_css_to_rate() 40 static u32 at91_pll_rate(u32 freq, u32 reg) in at91_pll_rate() argument 47 freq /= div; in at91_pll_rate() 48 freq *= mul + 1; in at91_pll_rate() 50 freq = 0; in at91_pll_rate() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/cpu/armv7/vf610/ |
| H A D | generic.c | 4 * SPDX-License-Identifier: GPL-2.0+ 9 #include <asm/arch/imx-regs.h> 12 #include <asm/mach-imx/sys_proto.h> 30 reg = readl(&ccm->ccgr6); in enable_ocotp_clk() 35 writel(reg, &ccm->ccgr6); in enable_ocotp_clk() 44 u32 freq = 0; in get_mcu_main_clk() local 46 ccm_ccsr = readl(&ccm->ccsr); in get_mcu_main_clk() 50 ccm_cacrr = readl(&ccm->cacrr); in get_mcu_main_clk() 55 switch (sysclk_sel) { in get_mcu_main_clk() 57 freq = FASE_CLK_FREQ; in get_mcu_main_clk() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| H A D | nv50.c | 34 struct nvkm_device *device = clk->base.subdev.device; in read_div() 35 switch (device->chipset) { in read_div() 54 struct nvkm_subdev *subdev = &clk->base.subdev; in read_pll_src() 55 struct nvkm_device *device = subdev->device; in read_pll_src() 56 u32 coef, ref = nvkm_clk_read(&clk->base, nv_clk_src_crystal); in read_pll_src() 60 switch (device->chipset) { in read_pll_src() 63 switch (base) { in read_pll_src() 91 switch (base) { in read_pll_src() 101 switch (rsel) { in read_pll_src() 103 case 1: return nvkm_clk_read(&clk->base, nv_clk_src_crystal); in read_pll_src() [all …]
|
| H A D | gk104.c | 33 u32 freq; member 52 struct nvkm_device *device = clk->base.subdev.device; in read_vco() 62 struct nvkm_device *device = clk->base.subdev.device; in read_pll() 74 switch (pll) { in read_pll() 77 sclk = device->crystal; in read_pll() 108 struct nvkm_device *device = clk->base.subdev.device; in read_div() 112 switch (ssrc & 0x00000003) { in read_div() 115 return device->crystal; in read_div() 135 struct nvkm_device *device = clk->base.subdev.device; in read_mem() 136 switch (nvkm_rd32(device, 0x1373f4) & 0x0000000f) { in read_mem() [all …]
|
| H A D | gf100.c | 33 u32 freq; member 51 struct nvkm_device *device = clk->base.subdev.device; in read_vco() 54 return nvkm_clk_read(&clk->base, nv_clk_src_sppll0); in read_vco() 55 return nvkm_clk_read(&clk->base, nv_clk_src_sppll1); in read_vco() 61 struct nvkm_device *device = clk->base.subdev.device; in read_pll() 72 switch (pll) { in read_pll() 75 sclk = device->crystal; in read_pll() 79 sclk = nvkm_clk_read(&clk->base, nv_clk_src_mpllsrc); in read_pll() 82 sclk = nvkm_clk_read(&clk->base, nv_clk_src_mpllsrcref); in read_pll() 100 struct nvkm_device *device = clk->base.subdev.device; in read_div() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/tuners/ |
| H A D | tda18271-fe.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 tda18271-fe.c - driver for the Philips / NXP TDA18271 silicon tuner 9 #include "tda18271-priv.h" 17 MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))"); 19 static int tda18271_cal_on_startup = -1; 26 /*---------------------------------------------------------------------*/ 30 struct tda18271_priv *priv = fe->tuner_priv; in tda18271_toggle_output() 33 priv->output_opt & TDA18271_OUTPUT_LT_OFF ? 1 : 0, in tda18271_toggle_output() 34 priv->output_opt & TDA18271_OUTPUT_XT_OFF ? 1 : 0); in tda18271_toggle_output() 41 priv->output_opt & TDA18271_OUTPUT_XT_OFF ? "off" : "on", in tda18271_toggle_output() [all …]
|
| /OK3568_Linux_fs/kernel/net/wireless/ |
| H A D | chan.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * Copyright 2013-2014 Intel Mobile Communications GmbH 9 * Copyright 2018-2020 Intel Corporation 16 #include "rdev-ops.h" 18 static bool cfg80211_valid_60g_freq(u32 freq) in cfg80211_valid_60g_freq() argument 20 return freq >= 58320 && freq <= 70200; in cfg80211_valid_60g_freq() 30 chandef->chan = chan; in cfg80211_chandef_create() 31 chandef->freq1_offset = chan->freq_offset; in cfg80211_chandef_create() 32 chandef->center_freq2 = 0; in cfg80211_chandef_create() 33 chandef->edmg.bw_config = 0; in cfg80211_chandef_create() [all …]
|
| H A D | wext-compat.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * cfg80211 - wext compat code 9 * Copyright 2008-2009 Johannes Berg <johannes@sipsolutions.net> 21 #include <net/cfg80211-wext.h> 22 #include "wext-compat.h" 24 #include "rdev-ops.h" 38 struct wireless_dev *wdev = dev->ieee80211_ptr; in cfg80211_wext_siwmode() 43 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwmode() 45 switch (*mode) { in cfg80211_wext_siwmode() 59 return -EINVAL; in cfg80211_wext_siwmode() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-imx/mx6/ |
| H A D | clock.c | 2 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. 4 * SPDX-License-Identifier: GPL-2.0+ 11 #include <asm/arch/imx-regs.h> 32 reg = __raw_readl(&imx_ccm->CCGR2); in enable_ocotp_clk() 37 __raw_writel(reg, &imx_ccm->CCGR2); in enable_ocotp_clk() 45 clrbits_le32(&imx_ccm->CCGR4, in setup_gpmi_io_clk() 53 clrbits_le32(&imx_ccm->CCGR4, MXC_CCM_CCGR4_QSPI2_ENFC_MASK); in setup_gpmi_io_clk() 55 clrsetbits_le32(&imx_ccm->cs2cdr, in setup_gpmi_io_clk() 61 setbits_le32(&imx_ccm->CCGR4, MXC_CCM_CCGR4_QSPI2_ENFC_MASK); in setup_gpmi_io_clk() 63 clrbits_le32(&imx_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK); in setup_gpmi_io_clk() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/devfreq/ |
| H A D | imx8m-ddrc.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/clk-provider.h> 14 #include <linux/arm-smccc.h> 40 * +----------+ |\ +------+ 41 * | dram_pll |-------|M| dram_core | | 42 * +----------+ |U|---------->| D | 43 * /--|X| | D | 46 * +---------+ | | 48 * +---------+ | | 50 * +----------+ | | | [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-imx/mx7/ |
| H A D | clock.c | 7 * SPDX-License-Identifier: GPL-2.0+ 14 #include <asm/arch/imx-regs.h> 31 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); in get_clocks() 33 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); in get_clocks() 35 gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); in get_clocks() 114 switch (pll) { in decode_pll() 116 reg = readl(&ccm_anatop->pll_arm); in decode_pll() 130 reg = readl(&ccm_anatop->pll_480); in decode_pll() 145 reg = readl(&ccm_anatop->pll_enet); in decode_pll() 156 reg = readl(&ccm_anatop->pll_ddr); in decode_pll() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/i2c/cx25840/ |
| H A D | cx25840-audio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <media/v4l2-common.h> 9 #include <media/drv-intf/cx25840.h> 11 #include "cx25840-core.h" 17 * NTSC Color subcarrier freq * 8 = 4.5 MHz/286 * 455/2 * 8 = 28.63636363... MHz 31 static int cx25840_set_audclk_freq(struct i2c_client *client, u32 freq) in cx25840_set_audclk_freq() argument 35 if (state->aud_input != CX25840_AUDIO_SERIAL) { in cx25840_set_audclk_freq() 36 switch (freq) { in cx25840_set_audclk_freq() 47 * 432 MHz pre-postdivide in cx25840_set_audclk_freq() 53 * 196.6 MHz pre-postdivide in cx25840_set_audclk_freq() [all …]
|
| /OK3568_Linux_fs/kernel/sound/soc/ti/ |
| H A D | omap-dmic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * omap-dmic.c -- OMAP ASoC DMIC DAI driver 5 * Copyright (C) 2010 - 2011 Texas Instruments 30 #include "omap-dmic.h" 31 #include "sdma-pcm.h" 53 writel_relaxed(val, dmic->io_base + reg); in omap_dmic_write() 58 return readl_relaxed(dmic->io_base + reg); in omap_dmic_read() 69 omap_dmic_write(dmic, OMAP_DMIC_CTRL_REG, ctrl | dmic->ch_enabled); in omap_dmic_start() 96 mutex_lock(&dmic->mutex); in omap_dmic_dai_startup() 99 dmic->active = 1; in omap_dmic_dai_startup() [all …]
|
| /OK3568_Linux_fs/kernel/sound/pci/lola/ |
| H A D | lola_clock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Support for Digigram Lola PCI-e boards 17 unsigned int freq; in lola_sample_rate_convert() local 20 switch (coded & 0x3) { in lola_sample_rate_convert() 21 case 0: freq = 48000; break; in lola_sample_rate_convert() 22 case 1: freq = 44100; break; in lola_sample_rate_convert() 23 case 2: freq = 32000; break; in lola_sample_rate_convert() 28 switch (coded & 0x1c) { in lola_sample_rate_convert() 31 case (1 << 2): freq *= 2; break; in lola_sample_rate_convert() 32 case (2 << 2): freq *= 4; break; in lola_sample_rate_convert() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/radio/si470x/ |
| H A D | radio-si470x-common.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * drivers/media/radio/si470x/radio-si470x-common.c 14 * 2008-01-12 Tobias Lorenz <tobias.lorenz@gmx.net> 16 * - First working version 17 * 2008-01-13 Tobias Lorenz <tobias.lorenz@gmx.net> 19 * - Improved error handling, every function now returns errno 20 * - Improved multi user access (start/mute/stop) 21 * - Channel doesn't get lost anymore after start/mute/stop 22 * - RDS support added (polling mode via interrupt EP 1) 23 * - marked default module parameters with *value* [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-keystone/ |
| H A D | clock.c | 4 * (C) Copyright 2012-2014 7 * SPDX-License-Identifier: GPL-2.0+ 47 if (!(pllctl_reg_read(data->pll, stat) & PLLSTAT_GOSTAT_MASK)) in wait_for_completion() 54 pllctl_reg_clrbits(data->pll, ctl, PLLCTL_PLLENSRC_MASK | in bypass_main_pll() 65 pllm = data->pll_m - 1; in configure_mult_div() 66 plld = (data->pll_d - 1) & CFG_PLLCTL0_PLLD_MASK; in configure_mult_div() 69 if (data->pll == MAIN_PLL) in configure_mult_div() 70 pllctl_reg_write(data->pll, mult, pllm & PLLM_MULT_LO_MASK); in configure_mult_div() 72 clrsetbits_le32(keystone_pll_regs[data->pll].reg0, in configure_mult_div() 77 bwadj = (data->pll_m - 1) >> 1; /* Divide pllm by 2 */ in configure_mult_div() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/radio/ |
| H A D | tea575x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 14 #include <media/v4l2-device.h> 15 #include <media/v4l2-dev.h> 16 #include <media/v4l2-fh.h> 17 #include <media/v4l2-ioctl.h> 18 #include <media/v4l2-event.h> 19 #include <media/drv-intf/tea575x.h> 87 if (tea->ops->write_val) in snd_tea575x_write() 88 return tea->ops->write_val(tea, val); in snd_tea575x_write() 90 tea->ops->set_direction(tea, 1); in snd_tea575x_write() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/hwmon/occ/ |
| H A D | common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 #include <linux/hwmon-sysfs.h> 127 u16 checksum = occ->poll_cmd_data + occ->seq_no + 1; in occ_poll() 132 cmd[0] = occ->seq_no++; /* sequence number */ in occ_poll() 136 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll() 142 rc = occ->send_cmd(occ, cmd); in occ_poll() 144 occ->last_error = rc; in occ_poll() 145 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll() 146 occ->error = rc; in occ_poll() 152 occ->error_count = 0; in occ_poll() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/clk/hisilicon/ |
| H A D | clk-hi6220-stub.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/clk-provider.h> 69 unsigned int freq; in hi6220_acpu_get_freq() local 71 regmap_read(stub_clk->dfs_map, ACPU_DFS_CUR_FREQ, &freq); in hi6220_acpu_get_freq() 72 return freq; in hi6220_acpu_get_freq() 76 unsigned int freq) in hi6220_acpu_set_freq() argument 81 regmap_write(stub_clk->dfs_map, ACPU_DFS_FREQ_REQ, freq); in hi6220_acpu_set_freq() 89 mbox_send_message(stub_clk->mbox, &data); in hi6220_acpu_set_freq() 94 unsigned int freq) in hi6220_acpu_round_freq() argument 100 regmap_read(stub_clk->dfs_map, ACPU_DFS_FLAG, &limit_flag); in hi6220_acpu_round_freq() [all …]
|