Symbol: axi_clkgen
drivers/clk/clk-axi-clkgen.c
239
static void axi_clkgen_write(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
242
writel(val, axi_clkgen->base + reg);
drivers/clk/clk-axi-clkgen.c
245
static void axi_clkgen_read(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
248
*val = readl(axi_clkgen->base + reg);
drivers/clk/clk-axi-clkgen.c
251
static int axi_clkgen_wait_non_busy(struct axi_clkgen *axi_clkgen)
drivers/clk/clk-axi-clkgen.c
257
axi_clkgen_read(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_STATUS, &val);
drivers/clk/clk-axi-clkgen.c
266
static int axi_clkgen_mmcm_read(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
272
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
279
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
drivers/clk/clk-axi-clkgen.c
281
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
290
static int axi_clkgen_mmcm_write(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
297
ret = axi_clkgen_wait_non_busy(axi_clkgen);
drivers/clk/clk-axi-clkgen.c
302
axi_clkgen_mmcm_read(axi_clkgen, reg, &reg_val);
drivers/clk/clk-axi-clkgen.c
308
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_DRP_CNTRL, reg_val);
drivers/clk/clk-axi-clkgen.c
313
static void axi_clkgen_mmcm_enable(struct axi_clkgen *axi_clkgen, bool enable)
drivers/clk/clk-axi-clkgen.c
320
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_RESET, val);
drivers/clk/clk-axi-clkgen.c
323
static struct axi_clkgen *clk_hw_to_axi_clkgen(struct clk_hw *clk_hw)
drivers/clk/clk-axi-clkgen.c
325
return container_of(clk_hw, struct axi_clkgen, clk_hw);
drivers/clk/clk-axi-clkgen.c
328
static void axi_clkgen_set_div(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
333
axi_clkgen_mmcm_write(axi_clkgen, reg1,
drivers/clk/clk-axi-clkgen.c
335
axi_clkgen_mmcm_write(axi_clkgen, reg2,
drivers/clk/clk-axi-clkgen.c
340
axi_clkgen_mmcm_write(axi_clkgen, reg3,
drivers/clk/clk-axi-clkgen.c
349
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
350
const struct axi_clkgen_limits *limits = &axi_clkgen->limits;
drivers/clk/clk-axi-clkgen.c
366
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_POWER, power, 0x9800);
drivers/clk/clk-axi-clkgen.c
372
axi_clkgen_set_div(axi_clkgen, MMCM_REG_CLKOUT0_1, MMCM_REG_CLKOUT0_2,
drivers/clk/clk-axi-clkgen.c
376
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_CLK_DIV,
drivers/clk/clk-axi-clkgen.c
381
axi_clkgen_set_div(axi_clkgen, MMCM_REG_CLK_FB1, MMCM_REG_CLK_FB2,
drivers/clk/clk-axi-clkgen.c
384
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK1, lock & 0x3ff, 0x3ff);
drivers/clk/clk-axi-clkgen.c
385
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK2,
drivers/clk/clk-axi-clkgen.c
387
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_LOCK3,
drivers/clk/clk-axi-clkgen.c
389
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_FILTER1, filter >> 16, 0x9900);
drivers/clk/clk-axi-clkgen.c
390
axi_clkgen_mmcm_write(axi_clkgen, MMCM_REG_FILTER2, filter, 0x9900);
drivers/clk/clk-axi-clkgen.c
398
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(hw);
drivers/clk/clk-axi-clkgen.c
399
const struct axi_clkgen_limits *limits = &axi_clkgen->limits;
drivers/clk/clk-axi-clkgen.c
416
static unsigned int axi_clkgen_get_div(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
422
axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
drivers/clk/clk-axi-clkgen.c
426
axi_clkgen_mmcm_read(axi_clkgen, reg1, &val1);
drivers/clk/clk-axi-clkgen.c
446
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
451
dout = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLKOUT0_1,
drivers/clk/clk-axi-clkgen.c
453
m = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLK_FB1,
drivers/clk/clk-axi-clkgen.c
456
axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_DIV, &val);
drivers/clk/clk-axi-clkgen.c
473
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
475
axi_clkgen_mmcm_enable(axi_clkgen, true);
drivers/clk/clk-axi-clkgen.c
482
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
484
axi_clkgen_mmcm_enable(axi_clkgen, false);
drivers/clk/clk-axi-clkgen.c
489
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
491
axi_clkgen_write(axi_clkgen, AXI_CLKGEN_V2_REG_CLKSEL, index);
drivers/clk/clk-axi-clkgen.c
498
struct axi_clkgen *axi_clkgen = clk_hw_to_axi_clkgen(clk_hw);
drivers/clk/clk-axi-clkgen.c
501
axi_clkgen_read(axi_clkgen, AXI_CLKGEN_V2_REG_CLKSEL, &parent);
drivers/clk/clk-axi-clkgen.c
506
static int axi_clkgen_setup_limits(struct axi_clkgen *axi_clkgen,
drivers/clk/clk-axi-clkgen.c
511
axi_clkgen_read(axi_clkgen, ADI_AXI_REG_FPGA_INFO, &reg_value);
drivers/clk/clk-axi-clkgen.c
516
axi_clkgen->limits.fpfd_min = 10000;
drivers/clk/clk-axi-clkgen.c
517
axi_clkgen->limits.fvco_min = 600000;
drivers/clk/clk-axi-clkgen.c
521
axi_clkgen->limits.fvco_max = 1200000;
drivers/clk/clk-axi-clkgen.c
522
axi_clkgen->limits.fpfd_max = 450000;
drivers/clk/clk-axi-clkgen.c
525
axi_clkgen->limits.fvco_max = 1440000;
drivers/clk/clk-axi-clkgen.c
526
axi_clkgen->limits.fpfd_max = 500000;
drivers/clk/clk-axi-clkgen.c
528
axi_clkgen_read(axi_clkgen, ADI_CLKGEN_REG_FPGA_VOLTAGE,
drivers/clk/clk-axi-clkgen.c
531
axi_clkgen->limits.fvco_max = 1200000;
drivers/clk/clk-axi-clkgen.c
532
axi_clkgen->limits.fpfd_max = 450000;
drivers/clk/clk-axi-clkgen.c
537
axi_clkgen->limits.fvco_max = 1600000;
drivers/clk/clk-axi-clkgen.c
538
axi_clkgen->limits.fpfd_max = 550000;
drivers/clk/clk-axi-clkgen.c
547
axi_clkgen->limits.fvco_max = 1600000;
drivers/clk/clk-axi-clkgen.c
548
axi_clkgen->limits.fvco_min = 800000;
drivers/clk/clk-axi-clkgen.c
567
struct axi_clkgen *axi_clkgen;
drivers/clk/clk-axi-clkgen.c
580
axi_clkgen = devm_kzalloc(&pdev->dev, sizeof(*axi_clkgen), GFP_KERNEL);
drivers/clk/clk-axi-clkgen.c
581
if (!axi_clkgen)
drivers/clk/clk-axi-clkgen.c
584
axi_clkgen->base = devm_platform_ioremap_resource(pdev, 0);
drivers/clk/clk-axi-clkgen.c
585
if (IS_ERR(axi_clkgen->base))
drivers/clk/clk-axi-clkgen.c
586
return PTR_ERR(axi_clkgen->base);
drivers/clk/clk-axi-clkgen.c
614
axi_clkgen_read(axi_clkgen, ADI_AXI_REG_VERSION, &pcore_version);
drivers/clk/clk-axi-clkgen.c
617
ret = axi_clkgen_setup_limits(axi_clkgen, &pdev->dev);
drivers/clk/clk-axi-clkgen.c
621
memcpy(&axi_clkgen->limits, dflt_limits,
drivers/clk/clk-axi-clkgen.c
622
sizeof(axi_clkgen->limits));
drivers/clk/clk-axi-clkgen.c
634
axi_clkgen_mmcm_enable(axi_clkgen, false);
drivers/clk/clk-axi-clkgen.c
636
axi_clkgen->clk_hw.init = &init;
drivers/clk/clk-axi-clkgen.c
637
ret = devm_clk_hw_register(&pdev->dev, &axi_clkgen->clk_hw);
drivers/clk/clk-axi-clkgen.c
642
&axi_clkgen->clk_hw);