>>> + if (np) { >>> + clk = of_clk_get(np, 0); >>> + if (!IS_ERR(clk)) { >>> + /* >>> + * esdhc->peripheral_clock would be assigned a value >>> + * which is eSDHC base clock when use periperal clock. >>> + * For ls1046a, the clock value got by common clk API is >>> + * peripheral clock while the eSDHC base clock is 1/2 >>> + * peripheral clock. >>> + */ >>> + if (of_device_is_compatible(np, "fsl,ls1046a-esdhc")) >>> + esdhc->peripheral_clock = clk_get_rate(clk) / 2; >>> + else >>> + esdhc->peripheral_clock = clk_get_rate(clk); >>> + clk_put(clk); >>> + } >>> + } else { >>> + device_property_read_u32(&pdev->dev, "clock-frequency", >>> + >>> + &esdhc->peripheral_clock); >>> } >> >> Not sure the "if (np) {}" really serves a purpose since of_clk_get(() will return an >> error in that case anyway. > > Looks this is something, I need to rework, in internal review I got the feedback > There are two clocks one esdhc->peripheral_clock and another is pltfm_host->clock. > As ACPI does not have clock frame work like of DT. > Therefore I have here 2 option > 1) expose a sort of new driver with CLK in acpi tables and have reference here like ^SB0.CLK > 2) use fixed clock > Please suggest if you have some preference in either of I am not aware of any ACPI options, but you should ask on the ACPI mailing list and the APCI maintainers.