Re: [PATCH 5/5 v9] usb: musb: da8xx: Add DT support for the DA8xx driver

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

 



On 09.03.2016 21:00, Bin Liu wrote:
Hi,

On Wed, Mar 09, 2016 at 10:25:27AM +0100, Petr Kulhavy wrote:
+static inline int get_phy_refclk_cfg(struct device_node *np)
+{
+	u32 freq;
+
+	if (of_property_read_u32(np, "ti,usb2-phy-refclock-hz", &freq))
+		return -EINVAL;
+
+	switch (freq) {
+	case 12000000:
+		return CFGCHIP2_REFFREQ_12MHZ;
+	case 13000000:
+		return CFGCHIP2_REFFREQ_13MHZ;
+	case 19200000:
+		return CFGCHIP2_REFFREQ_19_2MHZ;
+	case 20000000:
+		return CFGCHIP2_REFFREQ_20MHZ;
+	case 24000000:
+		return CFGCHIP2_REFFREQ_24MHZ;
+	case 26000000:
+		return CFGCHIP2_REFFREQ_26MHZ;
+	case 38400000:
+		return CFGCHIP2_REFFREQ_38_4MHZ;
+	case 40000000:
+		return CFGCHIP2_REFFREQ_40MHZ;
+	case 48000000:
+		return CFGCHIP2_REFFREQ_48MHZ;
+	default:
+		return -EINVAL;
+	}
+}
Should this be wrapped with CONFIG_OF? Have you tried to build it with
OF disabled?

Hi Bin,

apart of the fact that the ARCH_DAVINCI requires the DT the usb/musb/da8xx.c compiles without errors if CONFIG_OF is disabled.
Other drivers like Ethernet fail however.

Regards
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux