@@ -678,8 +678,6 @@ static void mpc512x_clk_setup_clock_tree(int busfreq)
clk_register_clkdev(clks[MPC512x_CLK_SYS], "sys_clk", NULL);
clk_register_clkdev(clks[MPC512x_CLK_VIU], "viu_clk", NULL);
clk_register_clkdev(clks[MPC512x_CLK_NFC], "nfc_clk", NULL);
- clk_register_clkdev(clks[MPC512x_CLK_USB1], "usb1_clk", NULL);
- clk_register_clkdev(clks[MPC512x_CLK_USB2], "usb2_clk", NULL);
pr_debug("clock tree setup complete\n");
freq = clk_get_rate(clks[MPC512x_CLK_E300]);
@@ -261,19 +261,8 @@ int fsl_usb2_mpc5121_init(struct platform_device *pdev)
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
struct clk *clk;
int err;
- char clk_name[10];
- int base, clk_num;
-
- base = pdev->resource->start & 0xf000;
- if (base == 0x3000)
- clk_num = 1;
- else if (base == 0x4000)
- clk_num = 2;
- else
- return -ENODEV;
- snprintf(clk_name, sizeof(clk_name), "usb%d_clk", clk_num);
- clk = devm_clk_get(&pdev->dev, clk_name);
+ clk = devm_clk_get(&pdev->dev, "per");
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to get clk\n");
return PTR_ERR(clk);
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the component index -- remove the "usb%d_clk" template and unconditionally use "per", remove the clock driver's clkdev registration Signed-off-by: Gerhard Sittig <gsi@denx.de> --- arch/powerpc/platforms/512x/clock-commonclk.c | 2 -- drivers/usb/host/fsl-mph-dr-of.c | 13 +------------ 2 files changed, 1 insertion(+), 14 deletions(-)