Symbol: axi_clkgen
drivers/clk/clk-axi-clkgen.c
238
static void axi_clkgen_write(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
241
writel(val, axi_clkgen->base + reg);
drivers/clk/clk-axi-clkgen.c
244
static void axi_clkgen_read(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
247
*val = readl(axi_clkgen->base + reg);
drivers/clk/clk-axi-clkgen.c
250
static int axi_clkgen_wait_non_busy(struct axi_clkgen *axi_clkgen)
drivers/clk/clk-axi-clkgen.c
256
axi_clkgen_read(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_STATUS, &val);
drivers/clk/clk-axi-clkgen.c
265
static int axi_clkgen_mmcm_read(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
271
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
278
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
drivers/clk/clk-axi-clkgen.c
280
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
289
static int axi_clkgen_mmcm_write(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
296
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
301
axi_clkgen_mmcm_read(axi_clkgen, reg, &reg_val);
drivers/clk/clk-axi-clkgen.c
307
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
drivers/clk/clk-axi-clkgen.c
312
static void axi_clkgen_mmcm_enable(struct axi_clkgen *axi_clkgen, bool enable)
drivers/clk/clk-axi-clkgen.c
319
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_RESET, val);
drivers/clk/clk-axi-clkgen.c
322
static struct axi_clkgen *clk_hw_to_axi_clkgen(struct clk_hw *clk_hw)
drivers/clk/clk-axi-clkgen.c
324
return container_of(clk_hw, struct axi_clkgen, clk_hw);
drivers/clk/clk-axi-clkgen.c
327
static void axi_clkgen_set_div(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
332
axi_clkgen_mmcm_write(axi_clkgen, reg1,
drivers/clk/clk-axi-clkgen.c
334
axi_clkgen_mmcm_write(axi_clkgen, reg2,
drivers/clk/clk-axi-clkgen.c
339
axi_clkgen_mmcm_write(axi_clkgen, reg3,
drivers/clk/clk-axi-clkgen.c
348
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
349
const struct axi_clkgen_limits *limits = &axi_clkgen->limits;
drivers/clk/clk-axi-clkgen.c
365
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_POWER, power, 0x9800);
drivers/clk/clk-axi-clkgen.c
371
axi_clkgen_set_div(axi_clkgen, MMCM_REG_CLKOUT0_1, MMCM_REG_CLKOUT0_2,
drivers/clk/clk-axi-clkgen.c
375
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_CLK_DIV,
drivers/clk/clk-axi-clkgen.c
380
axi_clkgen_set_div(axi_clkgen, MMCM_REG_CLK_FB1, MMCM_REG_CLK_FB2,
drivers/clk/clk-axi-clkgen.c
383
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK1, lock & 0x3ff, 0x3ff);
drivers/clk/clk-axi-clkgen.c
384
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK2,
drivers/clk/clk-axi-clkgen.c
386
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK3,
drivers/clk/clk-axi-clkgen.c
388
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_FILTER1, filter >> 16, 0x9900);
drivers/clk/clk-axi-clkgen.c
389
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_FILTER2, filter, 0x9900);
drivers/clk/clk-axi-clkgen.c
397
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(hw);
drivers/clk/clk-axi-clkgen.c
398
const struct axi_clkgen_limits *limits = &axi_clkgen->limits;
drivers/clk/clk-axi-clkgen.c
415
static unsigned int axi_clkgen_get_div(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
421
axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
drivers/clk/clk-axi-clkgen.c
425
axi_clkgen_mmcm_read(axi_clkgen, reg1, &val1);
drivers/clk/clk-axi-clkgen.c
445
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
450
dout = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLKOUT0_1,
drivers/clk/clk-axi-clkgen.c
452
m = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLK_FB1,
drivers/clk/clk-axi-clkgen.c
455
axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_DIV, &val);
drivers/clk/clk-axi-clkgen.c
472
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
474
axi_clkgen_mmcm_enable(axi_clkgen, true);
drivers/clk/clk-axi-clkgen.c
481
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
483
axi_clkgen_mmcm_enable(axi_clkgen, false);
drivers/clk/clk-axi-clkgen.c
488
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
490
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_CLKSEL, index);
drivers/clk/clk-axi-clkgen.c
497
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
500
axi_clkgen_read(axi_clkgen, AXI_CLKGEN_V2_REG_CLKSEL, &parent);
drivers/clk/clk-axi-clkgen.c
505
static int axi_clkgen_setup_limits(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
510
axi_clkgen_read(axi_clkgen, ADI_AXI_REG_FPGA_INFO, &reg_value);
drivers/clk/clk-axi-clkgen.c
515
axi_clkgen->limits.fpfd_min = 10000;
drivers/clk/clk-axi-clkgen.c
516
axi_clkgen->limits.fvco_min = 600000;
drivers/clk/clk-axi-clkgen.c
520
axi_clkgen->limits.fvco_max = 1200000;
drivers/clk/clk-axi-clkgen.c
521
axi_clkgen->limits.fpfd_max = 450000;
drivers/clk/clk-axi-clkgen.c
524
axi_clkgen->limits.fvco_max = 1440000;
drivers/clk/clk-axi-clkgen.c
525
axi_clkgen->limits.fpfd_max = 500000;
drivers/clk/clk-axi-clkgen.c
527
axi_clkgen_read(axi_clkgen, ADI_CLKGEN_REG_FPGA_VOLTAGE,
drivers/clk/clk-axi-clkgen.c
530
axi_clkgen->limits.fvco_max = 1200000;
drivers/clk/clk-axi-clkgen.c
531
axi_clkgen->limits.fpfd_max = 450000;
drivers/clk/clk-axi-clkgen.c
536
axi_clkgen->limits.fvco_max = 1600000;
drivers/clk/clk-axi-clkgen.c
537
axi_clkgen->limits.fpfd_max = 550000;
drivers/clk/clk-axi-clkgen.c
546
axi_clkgen->limits.fvco_max = 1600000;
drivers/clk/clk-axi-clkgen.c
547
axi_clkgen->limits.fvco_min = 800000;
drivers/clk/clk-axi-clkgen.c
549
axi_clkgen->limits.fvco_max = 4320000;
drivers/clk/clk-axi-clkgen.c
550
axi_clkgen->limits.fvco_min = 2160000;
drivers/clk/clk-axi-clkgen.c
569
struct axi_clkgen *axi_clkgen;
drivers/clk/clk-axi-clkgen.c
582
axi_clkgen = devm_kzalloc(&pdev->dev, sizeof(*axi_clkgen), GFP_KERNEL);
drivers/clk/clk-axi-clkgen.c
583
if (!axi_clkgen)
drivers/clk/clk-axi-clkgen.c
586
axi_clkgen->base = devm_platform_ioremap_resource(pdev, 0);
drivers/clk/clk-axi-clkgen.c
587
if (IS_ERR(axi_clkgen->base))
drivers/clk/clk-axi-clkgen.c
588
return PTR_ERR(axi_clkgen->base);
drivers/clk/clk-axi-clkgen.c
616
axi_clkgen_read(axi_clkgen, ADI_AXI_REG_VERSION, &pcore_version);
drivers/clk/clk-axi-clkgen.c
619
ret = axi_clkgen_setup_limits(axi_clkgen, &pdev->dev);
drivers/clk/clk-axi-clkgen.c
623
memcpy(&axi_clkgen->limits, dflt_limits,
drivers/clk/clk-axi-clkgen.c
624
sizeof(axi_clkgen->limits));
drivers/clk/clk-axi-clkgen.c
636
axi_clkgen_mmcm_enable(axi_clkgen, false);
drivers/clk/clk-axi-clkgen.c
638
axi_clkgen->clk_hw.init = &init;
drivers/clk/clk-axi-clkgen.c
639
ret = devm_clk_hw_register(&pdev->dev, &axi_clkgen->clk_hw);
drivers/clk/clk-axi-clkgen.c
644
&axi_clkgen->clk_hw);