]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt_support: Remove FDT_STATUS_FAIL_ERROR_CODE
authorMarek Behún <marek.behun@nic.cz>
Fri, 26 Nov 2021 13:57:08 +0000 (14:57 +0100)
committerStefan Roese <sr@denx.de>
Sun, 19 Dec 2021 08:50:47 +0000 (09:50 +0100)
Since no one uses this feature and I am not aware of any parsers of this
in Linux, remove it.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/armv7/ls102xa/fdt.c
board/gateworks/gw_ventana/common.c
board/kontron/sl28/sl28.c
common/fdt_support.c
drivers/pci/pcie_layerscape_fixup.c
drivers/pci/pcie_layerscape_gen4_fixup.c
include/fdt_support.h

index 0daf8234fb1495bf9af8b7111706887e61e79185..bf6cc6d4e76ac772d92020c0d518144eebbe4be7 100644 (file)
@@ -184,13 +184,13 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
        off = fdt_node_offset_by_compat_reg(blob, FSL_IFC_COMPAT,
                                            CONFIG_SYS_IFC_ADDR);
-       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 #else
        off = fdt_node_offset_by_compat_reg(blob, FSL_QSPI_COMPAT,
                                            QSPI0_BASE_ADDR);
-       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
        off = fdt_node_offset_by_compat_reg(blob, FSL_DSPI_COMPAT,
                                            DSPI1_BASE_ADDR);
-       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+       fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 #endif
 }
index 2be921f47a811b620297e6527fff21aab4b0bed3..7ec931c8a83129ffce0ab2e31917053e8a770d68 100644 (file)
@@ -1681,8 +1681,7 @@ void ft_early_fixup(void *blob, int board_type)
                 * disable serial2 node for GW54xx for compatibility with older
                 * 3.10.x kernel that improperly had this node enabled in the DT
                 */
-               fdt_set_status_by_alias(blob, "serial2", FDT_STATUS_DISABLED,
-                                       0);
+               fdt_set_status_by_alias(blob, "serial2", FDT_STATUS_DISABLED);
 
                /* GW54xx-E adds WDOG2_B external reset */
                if (rev < 'E')
index c8ed7ac81abe43f0f83a55be996b1aca3430e22b..e84b35691865dbb6234f921b845f6e7de9393373 100644 (file)
@@ -75,7 +75,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
        if (CONFIG_IS_ENABLED(SL28_SPL_LOADS_OPTEE_BL32)) {
                node = fdt_node_offset_by_compatible(blob, -1, "linaro,optee-tz");
                if (node)
-                       fdt_set_node_status(blob, node, FDT_STATUS_OKAY, 0);
+                       fdt_set_node_status(blob, node, FDT_STATUS_OKAY);
        }
 
        return 0;
index be03a87d427874037e1f024e5dbadc42144ec8d9..8ac905011cc2df514191ff235814b455ceb400ec 100644 (file)
@@ -1541,14 +1541,10 @@ unsigned int fdt_create_phandle(void *fdt, int nodeoffset)
  *
  * @fdt: ptr to device tree
  * @nodeoffset: node to update
- * @status: FDT_STATUS_OKAY, FDT_STATUS_DISABLED,
- *         FDT_STATUS_FAIL, FDT_STATUS_FAIL_ERROR_CODE
- * @error_code: optional, only used if status is FDT_STATUS_FAIL_ERROR_CODE
+ * @status: FDT_STATUS_OKAY, FDT_STATUS_DISABLED, FDT_STATUS_FAIL
  */
-int fdt_set_node_status(void *fdt, int nodeoffset,
-                       enum fdt_status status, unsigned int error_code)
+int fdt_set_node_status(void *fdt, int nodeoffset, enum fdt_status status)
 {
-       char buf[16];
        int ret = 0;
 
        if (nodeoffset < 0)
@@ -1564,10 +1560,6 @@ int fdt_set_node_status(void *fdt, int nodeoffset,
        case FDT_STATUS_FAIL:
                ret = fdt_setprop_string(fdt, nodeoffset, "status", "fail");
                break;
-       case FDT_STATUS_FAIL_ERROR_CODE:
-               sprintf(buf, "fail-%d", error_code);
-               ret = fdt_setprop_string(fdt, nodeoffset, "status", buf);
-               break;
        default:
                printf("Invalid fdt status: %x\n", status);
                ret = -1;
@@ -1582,16 +1574,14 @@ int fdt_set_node_status(void *fdt, int nodeoffset,
  *
  * @fdt: ptr to device tree
  * @alias: alias of node to update
- * @status: FDT_STATUS_OKAY, FDT_STATUS_DISABLED,
- *         FDT_STATUS_FAIL, FDT_STATUS_FAIL_ERROR_CODE
- * @error_code: optional, only used if status is FDT_STATUS_FAIL_ERROR_CODE
+ * @status: FDT_STATUS_OKAY, FDT_STATUS_DISABLED, FDT_STATUS_FAIL
  */
 int fdt_set_status_by_alias(void *fdt, const char* alias,
-                           enum fdt_status status, unsigned int error_code)
+                           enum fdt_status status)
 {
        int offset = fdt_path_offset(fdt, alias);
 
-       return fdt_set_node_status(fdt, offset, status, error_code);
+       return fdt_set_node_status(fdt, offset, status);
 }
 
 #if defined(CONFIG_VIDEO) || defined(CONFIG_LCD)
index 8a2a0e1f4a906a957137fae0eca0742d460c3e24..a47c9ef7c2f7d8dd3e2d5d271fe054b846431cd0 100644 (file)
@@ -584,9 +584,9 @@ static void ft_pcie_rc_fix(void *blob, struct ls_pcie_rc *pcie_rc)
                return;
 
        if (pcie_rc->enabled && pcie->mode == PCI_HEADER_TYPE_BRIDGE)
-               fdt_set_node_status(blob, off, FDT_STATUS_OKAY, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_OKAY);
        else
-               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 }
 
 static void ft_pcie_ep_fix(void *blob, struct ls_pcie_rc *pcie_rc)
@@ -600,9 +600,9 @@ static void ft_pcie_ep_fix(void *blob, struct ls_pcie_rc *pcie_rc)
                return;
 
        if (pcie_rc->enabled && pcie->mode == PCI_HEADER_TYPE_NORMAL)
-               fdt_set_node_status(blob, off, FDT_STATUS_OKAY, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_OKAY);
        else
-               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 }
 
 static void ft_pcie_ls_setup(void *blob, struct ls_pcie_rc *pcie_rc)
index 7d1123410616b703c99aa02739566beda29a0e3d..b2a45bf105c84c2e2fa801f3efdba6177a53302d 100644 (file)
@@ -193,9 +193,9 @@ static void ft_pcie_ep_layerscape_gen4_fix(void *blob, struct ls_pcie_g4 *pcie)
        }
 
        if (pcie->enabled && pcie->mode == PCI_HEADER_TYPE_NORMAL)
-               fdt_set_node_status(blob, off, FDT_STATUS_OKAY, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_OKAY);
        else
-               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 }
 
 static void ft_pcie_rc_layerscape_gen4_fix(void *blob, struct ls_pcie_g4 *pcie)
@@ -214,9 +214,9 @@ static void ft_pcie_rc_layerscape_gen4_fix(void *blob, struct ls_pcie_g4 *pcie)
        }
 
        if (pcie->enabled && pcie->mode == PCI_HEADER_TYPE_BRIDGE)
-               fdt_set_node_status(blob, off, FDT_STATUS_OKAY, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_OKAY);
        else
-               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
+               fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
 }
 
 static void ft_pcie_layerscape_gen4_setup(void *blob, struct ls_pcie_g4 *pcie)
index 90f5a4c28ca268004fb33ba152f492546ee2077c..850c860bd4293076e8b73100c8becf09028de953 100644 (file)
@@ -299,36 +299,34 @@ enum fdt_status {
        FDT_STATUS_OKAY,
        FDT_STATUS_DISABLED,
        FDT_STATUS_FAIL,
-       FDT_STATUS_FAIL_ERROR_CODE,
 };
-int fdt_set_node_status(void *fdt, int nodeoffset,
-                       enum fdt_status status, unsigned int error_code);
+int fdt_set_node_status(void *fdt, int nodeoffset, enum fdt_status status);
 static inline int fdt_status_okay(void *fdt, int nodeoffset)
 {
-       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_OKAY, 0);
+       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_OKAY);
 }
 static inline int fdt_status_disabled(void *fdt, int nodeoffset)
 {
-       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_DISABLED, 0);
+       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_DISABLED);
 }
 static inline int fdt_status_fail(void *fdt, int nodeoffset)
 {
-       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_FAIL, 0);
+       return fdt_set_node_status(fdt, nodeoffset, FDT_STATUS_FAIL);
 }
 
 int fdt_set_status_by_alias(void *fdt, const char *alias,
-                           enum fdt_status status, unsigned int error_code);
+                           enum fdt_status status);
 static inline int fdt_status_okay_by_alias(void *fdt, const char *alias)
 {
-       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_OKAY, 0);
+       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_OKAY);
 }
 static inline int fdt_status_disabled_by_alias(void *fdt, const char *alias)
 {
-       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_DISABLED, 0);
+       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_DISABLED);
 }
 static inline int fdt_status_fail_by_alias(void *fdt, const char *alias)
 {
-       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_FAIL, 0);
+       return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_FAIL);
 }
 
 /* Helper to read a big number; size is in cells (not bytes) */