Skip to content

Commit 1303231

Browse files
committed
Merge branches 'clk-rohm', 'clk-hisilicon', 'clk-marvell', 'clk-unused' and 'clk-devm-ioremap-resource' into clk-next
- Prepare Armada 3700 for suspend to RAM by moving suspend/resume priority for PCIe - Drop unused variables, enums, etc. in various clk drivers - Convert various drivers to use devm_platform_ioremap_resource() * clk-rohm: clk: bd718x7: Add MODULE_ALIAS() * clk-hisilicon: clk: hisilicon: fix sparse warnings in clk-hi3660.c clk: hisilicon: fix sparse warnings in clk-hi3670.c * clk-marvell: dt-bindings: clk: armada3700: document the PCIe clock dt-bindings: clk: armada3700: fix typo in SoC name clk: mvebu: armada-37xx-periph: change suspend/resume time clk: mvebu: armada-37xx-periph: add PCIe gated clock * clk-unused: clk: armada-xp: remove unused code clk: imx: imx8mn: drop unused pll enum clk: ast2600: remove unused variable 'eclk_parent_names' * clk-devm-ioremap-resource: clk: sprd: Change to use devm_platform_ioremap_resource() clk: s3c2410: use devm_platform_ioremap_resource() to simplify code clk: axs10x: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt6797: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt7629: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt7622: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt8183: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt6779: use devm_platform_ioremap_resource() to simplify code clk: mediatek: mt2712: use devm_platform_ioremap_resource() to simplify code clk: davinci: use devm_platform_ioremap_resource() to simplify code clk: hisilicon: use devm_platform_ioremap_resource() to simplify code clk: bcm2835: use devm_platform_ioremap_resource() to simplify code
5 parents 8ad1193 + 9999157 + 06aeb3f + 3bdf364 + 793ee79 commit 1303231

File tree

22 files changed

+133
-201
lines changed

22 files changed

+133
-201
lines changed

Documentation/devicetree/bindings/clock/armada3700-periph-clock.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ bridge.
99
The peripheral clock consumer should specify the desired clock by
1010
having the clock ID in its "clocks" phandle cell.
1111

12-
The following is a list of provided IDs for Armada 370 North bridge clocks:
12+
The following is a list of provided IDs for Armada 3700 North bridge clocks:
1313
ID Clock name Description
1414
-----------------------------------
1515
0 mmc MMC controller
@@ -30,7 +30,7 @@ ID Clock name Description
3030
15 eip97 EIP 97
3131
16 cpu CPU
3232

33-
The following is a list of provided IDs for Armada 370 South bridge clocks:
33+
The following is a list of provided IDs for Armada 3700 South bridge clocks:
3434
ID Clock name Description
3535
-----------------------------------
3636
0 gbe-50 50 MHz parent clock for Gigabit Ethernet
@@ -46,6 +46,7 @@ ID Clock name Description
4646
10 sdio SDIO
4747
11 usb32-sub2-sys USB 2 clock
4848
12 usb32-ss-sys USB 3 clock
49+
13 pcie PCIe controller
4950

5051
Required properties:
5152

drivers/clk/axs10x/i2s_pll_clock.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,12 @@ static int i2s_pll_clk_probe(struct platform_device *pdev)
172172
struct clk *clk;
173173
struct i2s_pll_clk *pll_clk;
174174
struct clk_init_data init;
175-
struct resource *mem;
176175

177176
pll_clk = devm_kzalloc(dev, sizeof(*pll_clk), GFP_KERNEL);
178177
if (!pll_clk)
179178
return -ENOMEM;
180179

181-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
182-
pll_clk->base = devm_ioremap_resource(dev, mem);
180+
pll_clk->base = devm_platform_ioremap_resource(pdev, 0);
183181
if (IS_ERR(pll_clk->base))
184182
return PTR_ERR(pll_clk->base);
185183

drivers/clk/axs10x/pll_clock.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,18 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev)
221221
struct device *dev = &pdev->dev;
222222
const char *parent_name;
223223
struct axs10x_pll_clk *pll_clk;
224-
struct resource *mem;
225224
struct clk_init_data init = { };
226225
int ret;
227226

228227
pll_clk = devm_kzalloc(dev, sizeof(*pll_clk), GFP_KERNEL);
229228
if (!pll_clk)
230229
return -ENOMEM;
231230

232-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
233-
pll_clk->base = devm_ioremap_resource(dev, mem);
231+
pll_clk->base = devm_platform_ioremap_resource(pdev, 0);
234232
if (IS_ERR(pll_clk->base))
235233
return PTR_ERR(pll_clk->base);
236234

237-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
238-
pll_clk->lock = devm_ioremap_resource(dev, mem);
235+
pll_clk->lock = devm_platform_ioremap_resource(pdev, 1);
239236
if (IS_ERR(pll_clk->lock))
240237
return PTR_ERR(pll_clk->lock);
241238

drivers/clk/bcm/clk-bcm2835-aux.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ static int bcm2835_aux_clk_probe(struct platform_device *pdev)
1919
struct clk_hw_onecell_data *onecell;
2020
const char *parent;
2121
struct clk *parent_clk;
22-
struct resource *res;
2322
void __iomem *reg, *gate;
2423

2524
parent_clk = devm_clk_get(dev, NULL);
2625
if (IS_ERR(parent_clk))
2726
return PTR_ERR(parent_clk);
2827
parent = __clk_get_name(parent_clk);
2928

30-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
31-
reg = devm_ioremap_resource(dev, res);
29+
reg = devm_platform_ioremap_resource(pdev, 0);
3230
if (IS_ERR(reg))
3331
return PTR_ERR(reg);
3432

drivers/clk/bcm/clk-bcm2835.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,6 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
21922192
struct device *dev = &pdev->dev;
21932193
struct clk_hw **hws;
21942194
struct bcm2835_cprman *cprman;
2195-
struct resource *res;
21962195
const struct bcm2835_clk_desc *desc;
21972196
const size_t asize = ARRAY_SIZE(clk_desc_array);
21982197
const struct cprman_plat_data *pdata;
@@ -2211,8 +2210,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
22112210

22122211
spin_lock_init(&cprman->regs_lock);
22132212
cprman->dev = dev;
2214-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2215-
cprman->regs = devm_ioremap_resource(dev, res);
2213+
cprman->regs = devm_platform_ioremap_resource(pdev, 0);
22162214
if (IS_ERR(cprman->regs))
22172215
return PTR_ERR(cprman->regs);
22182216

drivers/clk/clk-ast2600.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ static const struct aspeed_gate_data aspeed_g6_gates[] = {
116116
[ASPEED_CLK_GATE_FSICLK] = { 62, 59, "fsiclk-gate", NULL, 0 }, /* FSI */
117117
};
118118

119-
static const char * const eclk_parent_names[] = { "mpll", "hpll", "dpll" };
120-
121119
static const struct clk_div_table ast2600_eclk_div_table[] = {
122120
{ 0x0, 2 },
123121
{ 0x1, 2 },

drivers/clk/davinci/pll.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,6 @@ static int davinci_pll_probe(struct platform_device *pdev)
910910
struct davinci_pll_platform_data *pdata;
911911
const struct of_device_id *of_id;
912912
davinci_pll_init pll_init = NULL;
913-
struct resource *res;
914913
void __iomem *base;
915914

916915
of_id = of_match_device(davinci_pll_of_match, dev);
@@ -930,8 +929,7 @@ static int davinci_pll_probe(struct platform_device *pdev)
930929
return -EINVAL;
931930
}
932931

933-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
934-
base = devm_ioremap_resource(dev, res);
932+
base = devm_platform_ioremap_resource(pdev, 0);
935933
if (IS_ERR(base))
936934
return PTR_ERR(base);
937935

drivers/clk/davinci/psc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ static int davinci_psc_probe(struct platform_device *pdev)
531531
struct device *dev = &pdev->dev;
532532
const struct of_device_id *of_id;
533533
const struct davinci_psc_init_data *init_data = NULL;
534-
struct resource *res;
535534
void __iomem *base;
536535
int ret;
537536

@@ -546,8 +545,7 @@ static int davinci_psc_probe(struct platform_device *pdev)
546545
return -EINVAL;
547546
}
548547

549-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
550-
base = devm_ioremap_resource(dev, res);
548+
base = devm_platform_ioremap_resource(pdev, 0);
551549
if (IS_ERR(base))
552550
return PTR_ERR(base);
553551

drivers/clk/hisilicon/clk-hi3660.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -333,49 +333,49 @@ static const struct hisi_mux_clock hi3660_crgctrl_mux_clks[] = {
333333

334334
static const struct hisi_divider_clock hi3660_crgctrl_divider_clks[] = {
335335
{ HI3660_CLK_DIV_UART0, "clk_div_uart0", "clk_andgt_uart0",
336-
CLK_SET_RATE_PARENT, 0xb0, 4, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
336+
CLK_SET_RATE_PARENT, 0xb0, 4, 4, CLK_DIVIDER_HIWORD_MASK, },
337337
{ HI3660_CLK_DIV_UART1, "clk_div_uart1", "clk_andgt_uart1",
338-
CLK_SET_RATE_PARENT, 0xb0, 8, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
338+
CLK_SET_RATE_PARENT, 0xb0, 8, 4, CLK_DIVIDER_HIWORD_MASK, },
339339
{ HI3660_CLK_DIV_UARTH, "clk_div_uarth", "clk_andgt_uarth",
340-
CLK_SET_RATE_PARENT, 0xb0, 12, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
340+
CLK_SET_RATE_PARENT, 0xb0, 12, 4, CLK_DIVIDER_HIWORD_MASK, },
341341
{ HI3660_CLK_DIV_MMC, "clk_div_mmc", "clk_andgt_mmc",
342-
CLK_SET_RATE_PARENT, 0xb4, 3, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
342+
CLK_SET_RATE_PARENT, 0xb4, 3, 4, CLK_DIVIDER_HIWORD_MASK, },
343343
{ HI3660_CLK_DIV_SD, "clk_div_sd", "clk_andgt_sd",
344-
CLK_SET_RATE_PARENT, 0xb8, 0, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
344+
CLK_SET_RATE_PARENT, 0xb8, 0, 4, CLK_DIVIDER_HIWORD_MASK, },
345345
{ HI3660_CLK_DIV_EDC0, "clk_div_edc0", "clk_andgt_edc0",
346-
CLK_SET_RATE_PARENT, 0xbc, 0, 6, CLK_DIVIDER_HIWORD_MASK, 0, },
346+
CLK_SET_RATE_PARENT, 0xbc, 0, 6, CLK_DIVIDER_HIWORD_MASK, },
347347
{ HI3660_CLK_DIV_LDI0, "clk_div_ldi0", "clk_andgt_ldi0",
348-
CLK_SET_RATE_PARENT, 0xbc, 10, 6, CLK_DIVIDER_HIWORD_MASK, 0, },
348+
CLK_SET_RATE_PARENT, 0xbc, 10, 6, CLK_DIVIDER_HIWORD_MASK, },
349349
{ HI3660_CLK_DIV_SDIO, "clk_div_sdio", "clk_andgt_sdio",
350-
CLK_SET_RATE_PARENT, 0xc0, 0, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
350+
CLK_SET_RATE_PARENT, 0xc0, 0, 4, CLK_DIVIDER_HIWORD_MASK, },
351351
{ HI3660_CLK_DIV_LDI1, "clk_div_ldi1", "clk_andgt_ldi1",
352-
CLK_SET_RATE_PARENT, 0xc0, 8, 6, CLK_DIVIDER_HIWORD_MASK, 0, },
352+
CLK_SET_RATE_PARENT, 0xc0, 8, 6, CLK_DIVIDER_HIWORD_MASK, },
353353
{ HI3660_CLK_DIV_SPI, "clk_div_spi", "clk_andgt_spi",
354-
CLK_SET_RATE_PARENT, 0xc4, 12, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
354+
CLK_SET_RATE_PARENT, 0xc4, 12, 4, CLK_DIVIDER_HIWORD_MASK, },
355355
{ HI3660_CLK_DIV_VENC, "clk_div_venc", "clk_andgt_venc",
356-
CLK_SET_RATE_PARENT, 0xc8, 6, 5, CLK_DIVIDER_HIWORD_MASK, 0, },
356+
CLK_SET_RATE_PARENT, 0xc8, 6, 5, CLK_DIVIDER_HIWORD_MASK, },
357357
{ HI3660_CLK_DIV_VDEC, "clk_div_vdec", "clk_andgt_vdec",
358-
CLK_SET_RATE_PARENT, 0xcc, 0, 5, CLK_DIVIDER_HIWORD_MASK, 0, },
358+
CLK_SET_RATE_PARENT, 0xcc, 0, 5, CLK_DIVIDER_HIWORD_MASK, },
359359
{ HI3660_CLK_DIV_VIVOBUS, "clk_div_vivobus", "clk_vivobus_andgt",
360-
CLK_SET_RATE_PARENT, 0xd0, 7, 5, CLK_DIVIDER_HIWORD_MASK, 0, },
360+
CLK_SET_RATE_PARENT, 0xd0, 7, 5, CLK_DIVIDER_HIWORD_MASK, },
361361
{ HI3660_CLK_DIV_I2C, "clk_div_i2c", "clk_div_320m",
362-
CLK_SET_RATE_PARENT, 0xe8, 4, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
362+
CLK_SET_RATE_PARENT, 0xe8, 4, 4, CLK_DIVIDER_HIWORD_MASK, },
363363
{ HI3660_CLK_DIV_UFSPHY, "clk_div_ufsphy_cfg", "clk_gate_ufsphy_gt",
364-
CLK_SET_RATE_PARENT, 0xe8, 9, 2, CLK_DIVIDER_HIWORD_MASK, 0, },
364+
CLK_SET_RATE_PARENT, 0xe8, 9, 2, CLK_DIVIDER_HIWORD_MASK, },
365365
{ HI3660_CLK_DIV_CFGBUS, "clk_div_cfgbus", "clk_div_sysbus",
366-
CLK_SET_RATE_PARENT, 0xec, 0, 2, CLK_DIVIDER_HIWORD_MASK, 0, },
366+
CLK_SET_RATE_PARENT, 0xec, 0, 2, CLK_DIVIDER_HIWORD_MASK, },
367367
{ HI3660_CLK_DIV_MMC0BUS, "clk_div_mmc0bus", "autodiv_emmc0bus",
368-
CLK_SET_RATE_PARENT, 0xec, 2, 1, CLK_DIVIDER_HIWORD_MASK, 0, },
368+
CLK_SET_RATE_PARENT, 0xec, 2, 1, CLK_DIVIDER_HIWORD_MASK, },
369369
{ HI3660_CLK_DIV_MMC1BUS, "clk_div_mmc1bus", "clk_div_sysbus",
370-
CLK_SET_RATE_PARENT, 0xec, 3, 1, CLK_DIVIDER_HIWORD_MASK, 0, },
370+
CLK_SET_RATE_PARENT, 0xec, 3, 1, CLK_DIVIDER_HIWORD_MASK, },
371371
{ HI3660_CLK_DIV_UFSPERI, "clk_div_ufsperi", "clk_gate_ufs_subsys",
372-
CLK_SET_RATE_PARENT, 0xec, 14, 1, CLK_DIVIDER_HIWORD_MASK, 0, },
372+
CLK_SET_RATE_PARENT, 0xec, 14, 1, CLK_DIVIDER_HIWORD_MASK, },
373373
{ HI3660_CLK_DIV_AOMM, "clk_div_aomm", "clk_aomm_andgt",
374-
CLK_SET_RATE_PARENT, 0x100, 7, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
374+
CLK_SET_RATE_PARENT, 0x100, 7, 4, CLK_DIVIDER_HIWORD_MASK, },
375375
{ HI3660_CLK_DIV_ISP_SNCLK, "clk_isp_snclk_div", "clk_isp_snclk_fac",
376-
CLK_SET_RATE_PARENT, 0x108, 0, 2, CLK_DIVIDER_HIWORD_MASK, 0, },
376+
CLK_SET_RATE_PARENT, 0x108, 0, 2, CLK_DIVIDER_HIWORD_MASK, },
377377
{ HI3660_CLK_DIV_IOPERI, "clk_div_ioperi", "clk_mux_ioperi",
378-
CLK_SET_RATE_PARENT, 0x108, 11, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
378+
CLK_SET_RATE_PARENT, 0x108, 11, 4, CLK_DIVIDER_HIWORD_MASK, },
379379
};
380380

381381
/* clk_pmuctrl */
@@ -420,13 +420,13 @@ static const struct hisi_gate_clock hi3660_sctrl_gate_clks[] = {
420420
{ HI3660_PCLK_MMBUF_ANDGT, "pclk_mmbuf_andgt", "clk_sw_mmbuf",
421421
CLK_SET_RATE_PARENT, 0x258, 7, CLK_GATE_HIWORD_MASK, },
422422
{ HI3660_CLK_MMBUF_PLL_ANDGT, "clk_mmbuf_pll_andgt", "clk_ppll0",
423-
CLK_SET_RATE_PARENT, 0x260, 11, CLK_DIVIDER_HIWORD_MASK, 0, },
423+
CLK_SET_RATE_PARENT, 0x260, 11, CLK_DIVIDER_HIWORD_MASK, },
424424
{ HI3660_CLK_FLL_MMBUF_ANDGT, "clk_fll_mmbuf_andgt", "clk_fll_src",
425-
CLK_SET_RATE_PARENT, 0x260, 12, CLK_DIVIDER_HIWORD_MASK, 0, },
425+
CLK_SET_RATE_PARENT, 0x260, 12, CLK_DIVIDER_HIWORD_MASK, },
426426
{ HI3660_CLK_SYS_MMBUF_ANDGT, "clk_sys_mmbuf_andgt", "clkin_sys",
427-
CLK_SET_RATE_PARENT, 0x260, 13, CLK_DIVIDER_HIWORD_MASK, 0, },
427+
CLK_SET_RATE_PARENT, 0x260, 13, CLK_DIVIDER_HIWORD_MASK, },
428428
{ HI3660_CLK_GATE_PCIEPHY_GT, "clk_gate_pciephy_gt", "clk_ppll0",
429-
CLK_SET_RATE_PARENT, 0x268, 11, CLK_DIVIDER_HIWORD_MASK, 0, },
429+
CLK_SET_RATE_PARENT, 0x268, 11, CLK_DIVIDER_HIWORD_MASK, },
430430
};
431431

432432
static const char *const
@@ -446,13 +446,13 @@ static const struct hisi_mux_clock hi3660_sctrl_mux_clks[] = {
446446

447447
static const struct hisi_divider_clock hi3660_sctrl_divider_clks[] = {
448448
{ HI3660_CLK_DIV_AOBUS, "clk_div_aobus", "clk_ppll0",
449-
CLK_SET_RATE_PARENT, 0x254, 0, 6, CLK_DIVIDER_HIWORD_MASK, 0, },
449+
CLK_SET_RATE_PARENT, 0x254, 0, 6, CLK_DIVIDER_HIWORD_MASK, },
450450
{ HI3660_PCLK_DIV_MMBUF, "pclk_div_mmbuf", "pclk_mmbuf_andgt",
451-
CLK_SET_RATE_PARENT, 0x258, 10, 2, CLK_DIVIDER_HIWORD_MASK, 0, },
451+
CLK_SET_RATE_PARENT, 0x258, 10, 2, CLK_DIVIDER_HIWORD_MASK, },
452452
{ HI3660_ACLK_DIV_MMBUF, "aclk_div_mmbuf", "clk_mmbuf_pll_andgt",
453-
CLK_SET_RATE_PARENT, 0x258, 12, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
453+
CLK_SET_RATE_PARENT, 0x258, 12, 4, CLK_DIVIDER_HIWORD_MASK, },
454454
{ HI3660_CLK_DIV_PCIEPHY, "clk_div_pciephy", "clk_gate_pciephy_gt",
455-
CLK_SET_RATE_PARENT, 0x268, 12, 4, CLK_DIVIDER_HIWORD_MASK, 0, },
455+
CLK_SET_RATE_PARENT, 0x268, 12, 4, CLK_DIVIDER_HIWORD_MASK, },
456456
};
457457

458458
/* clk_iomcu */

0 commit comments

Comments
 (0)