Skip to contentSkip to conversation

clk: versaclock: Remove xlate function

PATCH Applied Sean Anderson 2 participants 3 messages Dec 1, 2021 – Jan 15, 2022 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: versaclock: Remove xlate function

This function is the same as the default xlate. Remove it.

---

 drivers/clk/clk_versaclock.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/clk/clk_versaclock.c +0 -19
index 578668bcf8..26c014cc4f 100644
@@ -618,24 +618,6 @@ static int vc5_clk_out_set_parent(struct vc5_driver_data *vc, u8 num, u8 index)
 	return vc5_update_bits(vc->i2c, VC5_OUT_DIV_CONTROL(num), mask, src);
 }
 
-/*
- * The device references to the Versaclock point to the head, so xlate needs to
- * redirect it to clk_out[idx]
- */
-static int vc5_clk_out_xlate(struct clk *hw, struct ofnode_phandle_args *args)
-{
-	unsigned int idx = args->args[0];
-
-	if (args->args_count != 1) {
-		debug("Invaild args_count: %d\n", args->args_count);
-		return -EINVAL;
-	}
-
-	hw->id = idx;
-
-	return 0;
-}
-
 static unsigned long vc5_clk_out_set_rate(struct clk *hw, unsigned long rate)
 {
 	struct udevice *dev;
@@ -671,7 +653,6 @@ static const struct clk_ops vc5_clk_out_sel_ops = {
 static const struct clk_ops vc5_clk_ops = {
 	.enable	= vc5_clk_out_prepare,
 	.disable	= vc5_clk_out_unprepare,
-	.of_xlate	= vc5_clk_out_xlate,
 	.set_rate	= vc5_clk_out_set_rate,
 	.get_rate	= vc5_clk_out_get_rate,
 };
Signature · 1 line
2.33.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Sean Anderson

This function is the same as the default xlate. Remove it.

I compared 'clk dump' before and after this patch, and they both appear to show the same clock tree and rates for the versaclock and the USB scan appears to identify the attached USB thumb drive for me.

Quoted 46 lines

---

 drivers/clk/clk_versaclock.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/clk/clk_versaclock.c +0 -20
index 578668bcf8..26c014cc4f 100644
@@ -618,24 +618,6 @@ static int vc5_clk_out_set_parent(struct vc5_driver_data *vc, u8 num, u8 index)
        return vc5_update_bits(vc->i2c, VC5_OUT_DIV_CONTROL(num), mask, src);
 }
 
-/*
- * The device references to the Versaclock point to the head, so xlate needs to
- * redirect it to clk_out[idx]
- */
-static int vc5_clk_out_xlate(struct clk *hw, struct ofnode_phandle_args *args)
-{
-       unsigned int idx = args->args[0];
-
-       if (args->args_count != 1) {
-               debug("Invaild args_count: %d\n", args->args_count);
-               return -EINVAL;
-       }
-
-       hw->id = idx;
-
-       return 0;
-}
-
 static unsigned long vc5_clk_out_set_rate(struct clk *hw, unsigned long rate)
 {
        struct udevice *dev;
@@ -671,7 +653,6 @@ static const struct clk_ops vc5_clk_out_sel_ops = {
 static const struct clk_ops vc5_clk_ops = {
        .enable = vc5_clk_out_prepare,
        .disable        = vc5_clk_out_unprepare,
-       .of_xlate       = vc5_clk_out_xlate,
        .set_rate       = vc5_clk_out_set_rate,
        .get_rate       = vc5_clk_out_get_rate,
 };
--

2.33.0

author Applied
#2 lore raw
In reply to Sean Anderson
Quoted 3 lines · Sean Anderson

This function is the same as the default xlate. Remove it.

Applied, thanks!

[1/1] clk: versaclock: Remove xlate function

      commit: e4e8e01a194e256f2b85b9f97b52d93dde5238f5

Best regards,

Signature · 1 line
Sean Anderson <[email protected]>