[linux-yocto] [PATCH 3/3] features: Create mfd-intel-lpss feature and use where appropriate

2016-08-17 Thread California Sullivan
No need to have these similar configurations spread all around. Also
solves a warning where skylake tried to set MFD_INTEL_LPSS to build as
a module, but MFD_INTEL_LPSS_PCI in broxton hits a select and forces it
to built in.

Signed-off-by: California Sullivan 
---
 features/mfd/mfd-intel-lpss.cfg  | 3 +++
 features/mfd/mfd-intel-lpss.scc  | 4 
 features/soc/broxton/broxton.cfg | 4 
 features/soc/broxton/broxton.scc | 3 +++
 features/soc/skylake/skylake.cfg | 5 +
 features/soc/skylake/skylake.scc | 3 +++
 6 files changed, 14 insertions(+), 8 deletions(-)
 create mode 100644 features/mfd/mfd-intel-lpss.cfg
 create mode 100644 features/mfd/mfd-intel-lpss.scc

diff --git a/features/mfd/mfd-intel-lpss.cfg b/features/mfd/mfd-intel-lpss.cfg
new file mode 100644
index 000..ad7e6a5
--- /dev/null
+++ b/features/mfd/mfd-intel-lpss.cfg
@@ -0,0 +1,3 @@
+CONFIG_MFD_INTEL_LPSS=y
+CONFIG_MFD_INTEL_LPSS_PCI=y
+CONFIG_MFD_INTEL_LPSS_ACPI=y
diff --git a/features/mfd/mfd-intel-lpss.scc b/features/mfd/mfd-intel-lpss.scc
new file mode 100644
index 000..f1e18b1
--- /dev/null
+++ b/features/mfd/mfd-intel-lpss.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Intel LPSS support for Skylake and Broxton"
+define KFEATURE_COMPATIBILITY board
+
+kconf hardware mfd-intel-lpss.cfg
diff --git a/features/soc/broxton/broxton.cfg b/features/soc/broxton/broxton.cfg
index 0b4e824..446bd54 100644
--- a/features/soc/broxton/broxton.cfg
+++ b/features/soc/broxton/broxton.cfg
@@ -9,10 +9,6 @@ CONFIG_MMC_SDHCI_PCI=y
 CONFIG_MMC_SDHCI_ACPI=y
 CONFIG_MMC_SDHCI_PLTFM=y
 
-# Skylake/Broxton LPSS support
-CONFIG_MFD_INTEL_LPSS_ACPI=y
-CONFIG_MFD_INTEL_LPSS_PCI=y
-
 # LPSS DMA support
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 CONFIG_INTEL_IDMA64=y
diff --git a/features/soc/broxton/broxton.scc b/features/soc/broxton/broxton.scc
index 2951b7d..b80ee80 100644
--- a/features/soc/broxton/broxton.scc
+++ b/features/soc/broxton/broxton.scc
@@ -17,4 +17,7 @@ include features/usb/usb-typec.scc
 
 include features/mei/mei-me.scc
 
+# Enable Skylake/Broxton LPSS support
+include features/mfd/mfd-intel-lpss.scc
+
 kconf hardware broxton.cfg
diff --git a/features/soc/skylake/skylake.cfg b/features/soc/skylake/skylake.cfg
index 77f0efa..954c9f8 100644
--- a/features/soc/skylake/skylake.cfg
+++ b/features/soc/skylake/skylake.cfg
@@ -1,7 +1,4 @@
-# Skylake/Broxton LPSS support
-CONFIG_MFD_INTEL_LPSS=m
-CONFIG_MFD_INTEL_LPSS_ACPI=m
-CONFIG_MFD_INTEL_LPSS_PCI=m
+# IDMA support for LPSS
 CONFIG_INTEL_IDMA64=m
 
 # Additional power management support
diff --git a/features/soc/skylake/skylake.scc b/features/soc/skylake/skylake.scc
index bc59f22..4961901 100644
--- a/features/soc/skylake/skylake.scc
+++ b/features/soc/skylake/skylake.scc
@@ -9,4 +9,7 @@ include features/i2c/i2c.scc
 # Enable mac 80211 + WLAN support
 include features/mac80211/mac80211.scc
 
+# Enable Skylake/Broxton LPSS support
+include features/mfd/mfd-intel-lpss.scc
+
 kconf hardware skylake.cfg
-- 
2.5.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 2/3] features/iio: Set IIO_BUFFER_CB to =m instead of =y

2016-08-17 Thread California Sullivan
CONFIG_IIO_BUFFER_CB is a tristate and CONFIG_IIO is set to =m, so
CONFIG_IIO_BUFFER_CB gets forced to =m anyway. Fixes a
kernel_configcheck warning we get with the new tools.

Signed-off-by: California Sullivan 
---
 features/iio/iio.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/features/iio/iio.cfg b/features/iio/iio.cfg
index 6ddc452..89b881d 100644
--- a/features/iio/iio.cfg
+++ b/features/iio/iio.cfg
@@ -29,7 +29,7 @@ CONFIG_HID_SENSOR_HUB=m
 
 CONFIG_IIO=m
 CONFIG_IIO_BUFFER=y
-CONFIG_IIO_BUFFER_CB=y
+CONFIG_IIO_BUFFER_CB=m
 CONFIG_IIO_KFIFO_BUF=m
 CONFIG_IIO_TRIGGERED_BUFFER=m
 CONFIG_IIO_TRIGGER=y
-- 
2.5.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 0/3] Fix kernel_configcheck warnings

2016-08-17 Thread California Sullivan
Hi Bruce,

This set of patches should fix the warnings we see with the new kernel
tools. Please apply them to 4.4 and master branches of the
yocto-kernel-cache.

Thanks,
Cal Sullivan

California Sullivan (3):
  features: Add 6lowpan feature and add it where necessary
  features/iio: Set IIO_BUFFER_CB to =m instead of =y
  features: Create mfd-intel-lpss feature and use where appropriate

 features/6lowpan/6lowpan.cfg   | 7 +++
 features/6lowpan/6lowpan.scc   | 5 +
 features/bluetooth/bluetooth.scc   | 2 ++
 features/ieee802154/ieee802154.scc | 2 ++
 features/iio/iio.cfg   | 2 +-
 features/mfd/mfd-intel-lpss.cfg| 3 +++
 features/mfd/mfd-intel-lpss.scc| 4 
 features/soc/broxton/broxton.cfg   | 4 
 features/soc/broxton/broxton.scc   | 3 +++
 features/soc/skylake/skylake.cfg   | 5 +
 features/soc/skylake/skylake.scc   | 3 +++
 11 files changed, 31 insertions(+), 9 deletions(-)
 create mode 100644 features/6lowpan/6lowpan.cfg
 create mode 100644 features/6lowpan/6lowpan.scc
 create mode 100644 features/mfd/mfd-intel-lpss.cfg
 create mode 100644 features/mfd/mfd-intel-lpss.scc

-- 
2.5.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 1/3] features: Add 6lowpan feature and add it where necessary

2016-08-17 Thread California Sullivan
For now just add the minimum configuration necessary to support other
6LoWPAN options we are already trying to enable. Fixes some
configuration warnings that occur due to missing dependencies.

Signed-off-by: California Sullivan 
---
 features/6lowpan/6lowpan.cfg   | 7 +++
 features/6lowpan/6lowpan.scc   | 5 +
 features/bluetooth/bluetooth.scc   | 2 ++
 features/ieee802154/ieee802154.scc | 2 ++
 4 files changed, 16 insertions(+)
 create mode 100644 features/6lowpan/6lowpan.cfg
 create mode 100644 features/6lowpan/6lowpan.scc

diff --git a/features/6lowpan/6lowpan.cfg b/features/6lowpan/6lowpan.cfg
new file mode 100644
index 000..abac6b1
--- /dev/null
+++ b/features/6lowpan/6lowpan.cfg
@@ -0,0 +1,7 @@
+# Dependencies
+CONFIG_NET=y
+CONFIG_INET=y
+CONFIG_IPV6=y
+
+# Feature
+CONFIG_6LOWPAN=m
diff --git a/features/6lowpan/6lowpan.scc b/features/6lowpan/6lowpan.scc
new file mode 100644
index 000..9601396
--- /dev/null
+++ b/features/6lowpan/6lowpan.scc
@@ -0,0 +1,5 @@
+define KFEATURE_DESCRIPTION "Enable 6LoWPAN support"
+define KFEATURE_COMPATIBILITY board
+
+kconf hardware 6lowpan.cfg
+
diff --git a/features/bluetooth/bluetooth.scc b/features/bluetooth/bluetooth.scc
index 53d000e..55a4ba9 100644
--- a/features/bluetooth/bluetooth.scc
+++ b/features/bluetooth/bluetooth.scc
@@ -1 +1,3 @@
 kconf hardware bluetooth.cfg
+
+include features/6lowpan/6lowpan.scc
diff --git a/features/ieee802154/ieee802154.scc 
b/features/ieee802154/ieee802154.scc
index 2f40044..f8f18f8 100644
--- a/features/ieee802154/ieee802154.scc
+++ b/features/ieee802154/ieee802154.scc
@@ -1 +1,3 @@
 kconf hardware ieee802154.cfg
+
+include features/6lowpan/6lowpan.scc
-- 
2.5.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH] x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

2016-08-17 Thread Nilesh Bacchewar
Backport: Submitted upstream [v2].
[https://patchwork.kernel.org/patch/9284339/]

On some newer Intel x86 processors/SoCs the TSC frequency can be directly
calculated by factors read from specific MSR registers or from a cpuid
leaf (0x15). TSC frequency calculated by native msr/cpuid is absolutely
accurate so we should always skip calibrating TSC aginst another clock,
e.g. PIT, HPET, etc. So we want to skip the refined calibration by setting
the X86_FEATURE_TSC_RELIABLE flag. Existing code setting the flag by
set_cpu_cap() doesn't work as the flag is cleared later in identify_cpu().
A cpu caps flag is not cleared only if it's set by setup_force_cpu_cap().
This patch converted set_cpu_cap() to setup_force_cpu_cap() to ensure
refined calibration is skipped.

We had a test on Intel CherryTrail platform: the 24 hours time drift is
3.6 seconds if refined calibration was not skipped while the drift is less
than 0.6 second when refined calibration was skipped.

Correctly setting the X86_FEATURE_TSC_RELIABLE flag also guarantees TSC is
not monitored by timekeeping watchdog because on most of these system TSC
is the only reliable clocksource. HPET, for instance, works but may not
be reliable. So kernel may report a physically reliable TSC is not reliable
just because a physically not reliable HPET is acting as timekeeping
watchdog.

Signed-off-by: Bin Gao 
Signed-off-by: Nilesh Bacchewar 
---
 arch/x86/kernel/tsc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index dd85b3c..71c8463 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -696,6 +696,7 @@ unsigned long native_calibrate_tsc(void)
}
}
 
+   setup_force_cpu_cap(X86_FEATURE_TSC_RELIABLE);
return crystal_khz * ebx_numerator / eax_denominator;
 }
 
-- 
1.9.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH] x86/tsc patch backport on linux-yocto-4.4 bxt-rebase branch

2016-08-17 Thread Nilesh Bacchewar
This patchset backports x86/tsc patch on linux-yocto-4.4 from 4.8-rcX. This 
patch 
has been submitted upstream and the approval is in progress, hence may not 
be final. Patch has been rebased on bxt-rebase branch.

Nilesh Bacchewar (1):
  x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration

 arch/x86/kernel/tsc.c | 1 +
 1 file changed, 1 insertion(+)

-- 
1.9.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto