x86: baytrail: Change lpe/lpss-sio/scc FSP properties to integer
authorBin Meng <bmeng.cn@gmail.com>
Wed, 31 May 2017 08:04:15 +0000 (01:04 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 5 Jun 2017 00:55:22 +0000 (08:55 +0800)
At present lpe/lpss-sio/scc FSP properties are all boolean, but in
fact for "enable-lpe" it has 3 possible options. This adds macros
for these options and change the property from a boolean type to
an integer type, and change their names to explicitly indicate what
the property is really for.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/baytrail/fsp_configs.c
arch/x86/dts/bayleybay.dts
arch/x86/dts/baytrail_som-db5800-som-6867.dts
arch/x86/dts/conga-qeval20-qa3-e3845.dts
arch/x86/dts/dfi-bt700.dtsi
arch/x86/dts/minnowmax.dts
arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h
arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h
doc/device-tree-bindings/misc/intel,baytrail-fsp.txt

index c48ac0738575789841b7f993258ba91e21522208..45f9bf95da54af7240c0a537f4050e81adff3a53 100644 (file)
@@ -175,9 +175,10 @@ void update_fsp_configs(struct fsp_config_data *config,
        fsp_upd->enable_azalia = fdtdec_get_bool(blob, node,
                                                 "fsp,enable-azalia");
        fsp_upd->enable_xhci = fdtdec_get_bool(blob, node, "fsp,enable-xhci");
-       fsp_upd->enable_lpe = fdtdec_get_bool(blob, node, "fsp,enable-lpe");
-       fsp_upd->lpss_sio_enable_pci_mode = fdtdec_get_bool(blob, node,
-                       "fsp,lpss-sio-enable-pci-mode");
+       fsp_upd->lpe_mode = fdtdec_get_int(blob, node, "fsp,lpe-mode",
+                                          LPE_MODE_PCI);
+       fsp_upd->lpss_sio_mode = fdtdec_get_int(blob, node, "fsp,lpss-sio-mode",
+                                          LPSS_SIO_MODE_PCI);
        fsp_upd->enable_dma0 = fdtdec_get_bool(blob, node, "fsp,enable-dma0");
        fsp_upd->enable_dma1 = fdtdec_get_bool(blob, node, "fsp,enable-dma1");
        fsp_upd->enable_i2_c0 = fdtdec_get_bool(blob, node, "fsp,enable-i2c0");
@@ -199,8 +200,8 @@ void update_fsp_configs(struct fsp_config_data *config,
        fsp_upd->mrc_debug_msg = fdtdec_get_bool(blob, node,
                                                 "fsp,mrc-debug-msg");
        fsp_upd->isp_enable = fdtdec_get_bool(blob, node, "fsp,isp-enable");
-       fsp_upd->scc_enable_pci_mode = fdtdec_get_bool(blob, node,
-                       "fsp,scc-enable-pci-mode");
+       fsp_upd->scc_mode = fdtdec_get_int(blob, node, "fsp,scc-mode",
+                                          SCC_MODE_PCI);
        fsp_upd->igd_render_standby = fdtdec_get_bool(blob, node,
                                                      "fsp,igd-render-standby");
        fsp_upd->txe_uma_enable = fdtdec_get_bool(blob, node,
index a577b9371b9d2e88bdc40edf5aeb7eaa57ae651f..0c314e068875e8901193c23e4af64904f3b7ae18 100644 (file)
                fsp,enable-spi;
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
-               fsp,enable-lpe;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpe-mode = <LPE_MODE_PCI>;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-i2c0;
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,emmc45-ddr50-enabled;
                fsp,emmc45-retune-timer-value = <8>;
index 3fc36f19c339d955d63813d0b179a26e8c72258d..171e7ffee63f49176985c7f9fce7cfa44c93a7cc 100644 (file)
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
                fsp,enable-azalia;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-i2c0;
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,enable-igd;
        };
index 369cea6b588b426966cdf0d947ae179c8ae216b6..ae11ccc25ab0ac7e7aaaf7833023ae0b6b873a43 100644 (file)
                fsp,enable-spi;
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
-               fsp,enable-lpe;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpe-mode = <LPE_MODE_PCI>;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-pwm0;
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,emmc45-ddr50-enabled;
                fsp,emmc45-retune-timer-value = <8>;
index 33f2a9c7a2dcea05f3d6577a91d6ded330e05e4e..04aa95ad52f0018800e952ca2aa276f67926154a 100644 (file)
                fsp,enable-spi;
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
-               fsp,enable-lpe;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpe-mode = <LPE_MODE_PCI>;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-i2c0;
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,emmc45-ddr50-enabled;
                fsp,emmc45-retune-timer-value = <8>;
index a4e2fa211c43fb80a8b62879509a446401b8f489..4c0a8fe26f2df8ee2b20788cdd4e5f81d423fa94 100644 (file)
                fsp,enable-spi;
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
-               fsp,enable-lpe;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpe-mode = <LPE_MODE_PCI>;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-i2c0;
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,emmc45-ddr50-enabled;
                fsp,emmc45-retune-timer-value = <8>;
index 382cb7970052ae3b32c546363c1cb7b871d24627..1c6c2479f0872c25cf307eff2d1f41de53b60a1d 100644 (file)
@@ -93,4 +93,14 @@ struct fspinit_rtbuf {
 #define DIMM_SIDES_1RANKS              0
 #define DIMM_SIDES_2RANKS              1
 
+#define LPE_MODE_DISABLED              0
+#define LPE_MODE_PCI                   1
+#define LPE_MODE_ACPI                  2
+
+#define LPSS_SIO_MODE_ACPI             0
+#define LPSS_SIO_MODE_PCI              1
+
+#define SCC_MODE_ACPI                  0
+#define SCC_MODE_PCI                   1
+
 #endif /* __FSP_CONFIGS_H__ */
index b083b6e5ec396aed89135f40caddd62d41586cee..8c07b3747fae0a07e03489715a784d68e60f5b41 100644 (file)
@@ -47,8 +47,8 @@ struct __packed upd_region {
        uint8_t enable_azalia;                  /* Offset 0x002f */
        uint32_t azalia_config_ptr;             /* Offset 0x0030 */
        uint8_t enable_xhci;                    /* Offset 0x0034 */
-       uint8_t enable_lpe;                     /* Offset 0x0035 */
-       uint8_t lpss_sio_enable_pci_mode;       /* Offset 0x0036 */
+       uint8_t lpe_mode;                       /* Offset 0x0035 */
+       uint8_t lpss_sio_mode;                  /* Offset 0x0036 */
        uint8_t enable_dma0;                    /* Offset 0x0037 */
        uint8_t enable_dma1;                    /* Offset 0x0038 */
        uint8_t enable_i2_c0;                   /* Offset 0x0039 */
@@ -67,7 +67,7 @@ struct __packed upd_region {
        uint8_t reserved2[5];                   /* Offset 0x0046 */
        uint8_t mrc_debug_msg;                  /* Offset 0x004b */
        uint8_t isp_enable;                     /* Offset 0x004c */
-       uint8_t scc_enable_pci_mode;            /* Offset 0x004d */
+       uint8_t scc_mode;                       /* Offset 0x004d */
        uint8_t igd_render_standby;             /* Offset 0x004e */
        uint8_t txe_uma_enable;                 /* Offset 0x004f */
        uint8_t os_selection;                   /* Offset 0x0050 */
index 691ae53b65cf08f37b5d82643a37c023784cb3fc..929ae88c58325068ffd3bc2f5d0a69ab31710dd5 100644 (file)
@@ -19,8 +19,6 @@ is matched up to Intel's E3800 FSPv4 release.
 - fsp,enable-sata
 - fsp,enable-azalia
 - fsp,enable-xhci
-- fsp,enable-lpe
-- fsp,lpss-sio-enable-pci-mode
 - fsp,enable-dma0
 - fsp,enable-dma1
 - fsp,enable-i2-c0
@@ -35,7 +33,6 @@ is matched up to Intel's E3800 FSPv4 release.
 - fsp,enable-hsi
 - fsp,mrc-debug-msg
 - fsp,isp-enable
-- fsp,scc-enable-pci-mode
 - fsp,igd-render-standby
 - fsp,txe-uma-enable
 - fsp,emmc45-ddr50-enabled
@@ -57,9 +54,12 @@ discovered by the FSP and used to setup main memory.
 - fsp,mrc-init-spd-addr2
 - fsp,emmc-boot-mode
 - fsp,sata-mode
+- fsp,lpe-mode
+- fsp,lpss-sio-mode
 - fsp,igd-dvmt50-pre-alloc
 - fsp,aperture-size
 - fsp,gtt-size
+- fsp,scc-mode
 - fsp,os-selection
 - fsp,emmc45-retune-timer-value
 
@@ -110,8 +110,8 @@ Example (from MinnowMax Dual Core):
                fsp,enable-spi;
                fsp,enable-sata;
                fsp,sata-mode = <SATA_MODE_AHCI>;
-               fsp,enable-lpe;
-               fsp,lpss-sio-enable-pci-mode;
+               fsp,lpe-mode = <LPE_MODE_PCI>;
+               fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
                fsp,enable-dma0;
                fsp,enable-dma1;
                fsp,enable-i2c0;
@@ -126,7 +126,7 @@ Example (from MinnowMax Dual Core):
                fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
                fsp,aperture-size = <APERTURE_SIZE_256MB>;
                fsp,gtt-size = <GTT_SIZE_2MB>;
-               fsp,scc-enable-pci-mode;
+               fsp,scc-mode = <SCC_MODE_PCI>;
                fsp,os-selection = <OS_SELECTION_LINUX>;
                fsp,emmc45-ddr50-enabled;
                fsp,emmc45-retune-timer-value = <8>;