Re: [PATCH v3 2/9] clk: ralink: add clock and reset driver for MTMIPS SoCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your quick reply!

>> >+      {
>> >+              .compatible = "ralink,mt7620a-sysc",
>> >+              .data = &mt7620_clk_data,
>> >+      },
>> >+      {
>> >+              .compatible = "ralink,mt7620-sysc",
>> >+              .data = &mt7620_clk_data,
>> >+      },
>> >+      {
>>
>> I am confused about the difference between `ralink,mt7620-sysc` and
>> `ralink,mt7620a-sysc`. Do you mean mt7620n?
>> https://www.mediatek.com/products/home-networking/mt7620n-a
>
>There is no real difference. As you can see both of them use the same
>'mt7620_clk_data' but since both compatible strings already exist
>somewhere I introduced both of them.
>

If they are the same, perhaps `mt7620a` also need to be checked in mtmips_clk_regs_init().
Or just remove compatible string of `mt7620a` and update dtsi files?

>+static void __init mtmips_clk_regs_init(struct device_node *node,
>+					struct mtmips_clk_priv *priv)
>+{
>+	u32 t;
>+
>+	if (!of_device_is_compatible(node, "ralink,mt7620-sysc"))
>+		return;
>+
>+	/*
>+	 * When the CPU goes into sleep mode, the BUS
>+	 * clock will be too low for USB to function properly.
>+	 * Adjust the busses fractional divider to fix this
>+	 */
>+	regmap_read(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, &t);
>+	t &= ~(CLKCFG_FDIV_MASK | CLKCFG_FFRAC_MASK);
>+	t |= CLKCFG_FDIV_USB_VAL | CLKCFG_FFRAC_USB_VAL;
>+	regmap_write(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, t);
>+}
>+

If we choose to update dts file. We can also remove the legacy
"ralink,rt2880-reset" compatible string by the way.

>+static const struct of_device_id mtmips_clk_of_match[] = {
>+	{ .compatible = "ralink,rt2880-reset" },
>+	{ .compatible = "ralink,rt2880-sysc" },
>+	{ .compatible = "ralink,rt3050-sysc" },
>+	{ .compatible = "ralink,rt3050-sysc" },
>+	{ .compatible = "ralink,rt3352-sysc" },
>+	{ .compatible = "ralink,rt3883-sysc" },
>+	{ .compatible = "ralink,rt5350-sysc" },
>+	{ .compatible = "ralink,mt7620a-sysc" },
>+	{ .compatible = "ralink,mt7620-sysc" },
>+	{ .compatible = "ralink,mt7628-sysc" },
>+	{ .compatible = "ralink,mt7688-sysc" },
>+	{}
>+};

Thanks,
    Shiji Yang



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux