[linux-yocto] [[PATCH 1/1] x86: Kconfig: add PCI dependency for CONFIG_X86_INTEL_LPSS
chong.yi.chai at intel.com
chong.yi.chai at intel.com
Wed Mar 30 20:17:56 PDT 2016
From: "Chai, Chong Yi" <chong.yi.chai at intel.com>
---
features/soc/baytrail/baytrail.scc | 2 +
...-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch | 31 ++++
...t-enable-board-file-for-BYT-LPSS-PCI-mode.patch | 157 +++++++++++++++++++++
3 files changed, 190 insertions(+)
create mode 100644 features/soc/baytrail/x86-Kconfig-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch
create mode 100644 features/soc/baytrail/x86-byt-enable-board-file-for-BYT-LPSS-PCI-mode.patch
diff --git a/features/soc/baytrail/baytrail.scc b/features/soc/baytrail/baytrail.scc
index 78a3cca..2cd1d68 100644
--- a/features/soc/baytrail/baytrail.scc
+++ b/features/soc/baytrail/baytrail.scc
@@ -77,3 +77,5 @@ patch scsi-add-extended-information-to-MEDIA_CHANGE.patch
patch thermal-Intel-SoC-DTS-thermal.patch
patch thermal-Intel-SoC-DTS-Don-t-do-thermal-zone-update-i.patch
patch watchdog-iTCO_wdt-Fix-checkpatch.pl-warnings.patch
+patch x86-Kconfig-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch
+patch x86-byt-enable-board-file-for-BYT-LPSS-PCI-mode.patch
diff --git a/features/soc/baytrail/x86-Kconfig-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch b/features/soc/baytrail/x86-Kconfig-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch
new file mode 100644
index 0000000..5d7727e
--- /dev/null
+++ b/features/soc/baytrail/x86-Kconfig-add-PCI-dependency-for-CONFIG_X86_INTEL_.patch
@@ -0,0 +1,31 @@
+From bf7db70c030c3c08469acdf5b2bfcc525a76f88f Mon Sep 17 00:00:00 2001
+From: "Chew, Chiau Ee" <chiau.ee.chew at intel.com>
+Date: Fri, 27 Dec 2013 23:22:20 +0800
+Subject: [PATCH 001/164] x86/Kconfig: add PCI dependency for
+ CONFIG_X86_INTEL_LPSS
+
+Allow CONFIG_X86_INTEL_LPSS to be set when ACPI
+or PCI is set.
+
+Signed-off-by: Chew, Chiau Ee <chiau.ee.chew at intel.com>
+Signed-off-by: Maurice Petallo <mauricex.r.petallo at intel.com>
+---
+ arch/x86/Kconfig | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 96e743a..a42c18a 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -465,7 +465,7 @@ config X86_INTEL_MID
+
+ config X86_INTEL_LPSS
+ bool "Intel Low Power Subsystem Support"
+- depends on ACPI
++ depends on ACPI || PCI
+ select COMMON_CLK
+ select PINCTRL
+ ---help---
+--
+1.7.7.6
+
diff --git a/features/soc/baytrail/x86-byt-enable-board-file-for-BYT-LPSS-PCI-mode.patch b/features/soc/baytrail/x86-byt-enable-board-file-for-BYT-LPSS-PCI-mode.patch
new file mode 100644
index 0000000..bfe81e3
--- /dev/null
+++ b/features/soc/baytrail/x86-byt-enable-board-file-for-BYT-LPSS-PCI-mode.patch
@@ -0,0 +1,157 @@
+From f44f8fc10094bd023bdc28a8e8fd445f1ab64a9a Mon Sep 17 00:00:00 2001
+From: "Chew, Chiau Ee" <chiau.ee.chew at intel.com>
+Date: Mon, 13 Jan 2014 00:43:59 +0800
+Subject: [PATCH 002/164] x86/byt: enable board file for BYT LPSS PCI mode
+
+This commit enables the following:
+- setup clock tree for PCI mode SPI, DMA and PWM host
+ as the controller drivers require clock information during
+ device/driver probe
+- register SPI slave
+
+Conflicts:
+ arch/x86/Kconfig
+Modified from byt_3.10.31_dev_ltsi to remove unnecessary change.
+Merge patch: Fix device name string for clkdev registration
+
+Signed-off-by: Chew, Chiau Ee <chiau.ee.chew at intel.com>
+Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
+Signed-off-by: Maurice Petallo <mauricex.r.petallo at intel.com>
+---
+ arch/x86/Kconfig | 7 +++
+ arch/x86/platform/Makefile | 3 +
+ arch/x86/platform/byt/Makefile | 1 +
+ arch/x86/platform/byt/byt-board.c | 84 +++++++++++++++++++++++++++++++++++++
+ 4 files changed, 95 insertions(+), 0 deletions(-)
+ create mode 100644 arch/x86/platform/byt/Makefile
+ create mode 100644 arch/x86/platform/byt/byt-board.c
+
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index a42c18a..e56b9c9 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -474,6 +474,13 @@ config X86_INTEL_LPSS
+ things like clock tree (common clock framework) and pincontrol
+ which are needed by the LPSS peripheral drivers.
+
++config BYT_LPSS_BRD
++ bool "PCI mode LPSS support on BYT"
++ depends on X86_INTEL_LPSS
++ ---help---
++ This option is needed if were to use Intel BayTrail LPSS in
++ PCI mode.
++
+ config X86_RDC321X
+ bool "RDC R-321x SoC"
+ depends on X86_32
+diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
+index 20342d4..a9e83d6 100644
+--- a/arch/x86/platform/Makefile
++++ b/arch/x86/platform/Makefile
+@@ -11,3 +11,6 @@ obj-y += sfi/
+ obj-y += ts5500/
+ obj-y += visws/
+ obj-y += uv/
++ifeq ($(CONFIG_BYT_LPSS_BRD),y)
++obj-y += byt/
++endif
+diff --git a/arch/x86/platform/byt/Makefile b/arch/x86/platform/byt/Makefile
+new file mode 100644
+index 0000000..2d4af86
+--- /dev/null
++++ b/arch/x86/platform/byt/Makefile
+@@ -0,0 +1 @@
++obj-y += byt-board.o
+diff --git a/arch/x86/platform/byt/byt-board.c b/arch/x86/platform/byt/byt-board.c
+new file mode 100644
+index 0000000..e94a377
+--- /dev/null
++++ b/arch/x86/platform/byt/byt-board.c
+@@ -0,0 +1,84 @@
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/clk.h>
++#include <linux/clkdev.h>
++#include <linux/clk-provider.h>
++#include <linux/spi/spidev.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/pxa2xx_spi.h>
++#include <linux/pwm.h>
++
++static struct pxa2xx_spi_chip chip_data = {
++ .gpio_cs = -EINVAL,
++ .dma_burst_size = 32,
++};
++
++static struct spi_board_info byt_spi_slaves[] = {
++ {
++ .modalias = "spidev",
++ .max_speed_hz = 50000000,
++ .bus_num = 0,
++ .chip_select = 0,
++ .controller_data = &chip_data,
++ .mode = SPI_MODE_0,
++ }
++};
++
++static int byt_spi_board_setup(void)
++{
++ int ret = -1;
++
++ /* Register the SPI devices */
++ if (!spi_register_board_info
++ (byt_spi_slaves, ARRAY_SIZE(byt_spi_slaves)))
++ ret = 0;
++
++ return ret;
++}
++
++static int byt_clk_setup(void)
++{
++ struct clk *clk;
++
++ /* Make clock tree required by the SPI/DMA/PWM driver */
++ clk = clk_register_fixed_rate(NULL, "lpss_clk", NULL, CLK_IS_ROOT,
++ 100000000);
++ if (IS_ERR(clk))
++ return PTR_ERR(clk);
++
++ clk_register_clkdev(clk, "hclk", "0000:00:1e.0");
++
++ clk = clk_register_fixed_rate(NULL, "spi_clk", "lpss_clk", 0, 50000000);
++ if (IS_ERR(clk))
++ return PTR_ERR(clk);
++
++ clk_register_clkdev(clk, NULL, "0000:00:1e.5");
++
++ clk = clk_register_fixed_rate(NULL, "pwm_clk", "lpss_clk", 0, 25000000);
++ if (IS_ERR(clk))
++ return PTR_ERR(clk);
++
++ clk_register_clkdev(clk, NULL, "0000:00:1e.1");
++ clk_register_clkdev(clk, NULL, "0000:00:1e.2");
++
++ return 0;
++}
++
++static int __init byt_board_init(void)
++{
++ int ret;
++
++ ret = byt_clk_setup();
++ if (ret)
++ goto exit;
++
++ ret = byt_spi_board_setup();
++ if (ret)
++ goto exit;
++
++exit:
++ return ret;
++}
++arch_initcall(byt_board_init);
++MODULE_LICENSE(GPL);
+--
+1.7.7.6
+
--
1.9.1
More information about the linux-yocto
mailing list