]> Git Repo - J-u-boot.git/blobdiff - boot/bootmeth-uclass.c
Merge patch series "mtd: spi-nor: Remove recently added nor->addr_width == 3 test"
[J-u-boot.git] / boot / bootmeth-uclass.c
index c0abadef97cae87d2df27dd30daa8c0d10ca2ba1..5b5fea39b3b3925375477ab41e2288f4ef4c7358 100644 (file)
@@ -251,6 +251,31 @@ int bootmeth_set_order(const char *order_str)
        return 0;
 }
 
+int bootmeth_set_property(const char *name, const char *property, const char *value)
+{
+       int ret;
+       int len;
+       struct udevice *dev;
+       const struct bootmeth_ops *ops;
+
+       len = strlen(name);
+
+       ret = uclass_find_device_by_namelen(UCLASS_BOOTMETH, name, len,
+                                           &dev);
+       if (ret) {
+               printf("Unknown bootmeth '%s'\n", name);
+               return ret;
+       }
+
+       ops = bootmeth_get_ops(dev);
+       if (!ops->set_property) {
+               printf("set_property not found\n");
+               return -ENODEV;
+       }
+
+       return ops->set_property(dev, property, value);
+}
+
 int bootmeth_setup_fs(struct bootflow *bflow, struct blk_desc *desc)
 {
        int ret;
This page took 0.023264 seconds and 4 git commands to generate.