Merge tag 'xilinx-for-v2023.01-rc3' of https://source.denx.de/u-boot/custodians/u...
[platform/kernel/u-boot.git] / drivers / core / read.c
index 14fd121..3e5fea8 100644 (file)
 #include <asm/io.h>
 #include <linux/ioport.h>
 
+int dev_read_u8(const struct udevice *dev, const char *propname, u8 *outp)
+{
+       return ofnode_read_u8(dev_ofnode(dev), propname, outp);
+}
+
+u8 dev_read_u8_default(const struct udevice *dev, const char *propname, u8 def)
+{
+       return ofnode_read_u8_default(dev_ofnode(dev), propname, def);
+}
+
+int dev_read_u16(const struct udevice *dev, const char *propname, u16 *outp)
+{
+       return ofnode_read_u16(dev_ofnode(dev), propname, outp);
+}
+
+u16 dev_read_u16_default(const struct udevice *dev, const char *propname,
+                        u16 def)
+{
+       return ofnode_read_u16_default(dev_ofnode(dev), propname, def);
+}
+
 int dev_read_u32(const struct udevice *dev, const char *propname, u32 *outp)
 {
        return ofnode_read_u32(dev_ofnode(dev), propname, outp);
@@ -205,6 +226,12 @@ int dev_read_string_count(const struct udevice *dev, const char *propname)
        return ofnode_read_string_count(dev_ofnode(dev), propname);
 }
 
+int dev_read_string_list(const struct udevice *dev, const char *propname,
+                        const char ***listp)
+{
+       return ofnode_read_string_list(dev_ofnode(dev), propname, listp);
+}
+
 int dev_read_phandle_with_args(const struct udevice *dev, const char *list_name,
                               const char *cells_name, int cell_count,
                               int index, struct ofnode_phandle_args *out_args)
@@ -260,18 +287,18 @@ const void *dev_read_prop(const struct udevice *dev, const char *propname,
 
 int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop)
 {
-       return ofnode_get_first_property(dev_ofnode(dev), prop);
+       return ofnode_first_property(dev_ofnode(dev), prop);
 }
 
 int dev_read_next_prop(struct ofprop *prop)
 {
-       return ofnode_get_next_property(prop);
+       return ofnode_next_property(prop);
 }
 
 const void *dev_read_prop_by_prop(struct ofprop *prop,
                                  const char **propname, int *lenp)
 {
-       return ofnode_get_property_by_prop(prop, propname, lenp);
+       return ofprop_get_property(prop, propname, lenp);
 }
 
 int dev_read_alias_seq(const struct udevice *dev, int *devnump)
@@ -341,6 +368,12 @@ u64 dev_translate_dma_address(const struct udevice *dev, const fdt32_t *in_addr)
        return ofnode_translate_dma_address(dev_ofnode(dev), in_addr);
 }
 
+int dev_get_dma_range(const struct udevice *dev, phys_addr_t *cpu,
+                     dma_addr_t *bus, u64 *size)
+{
+       return ofnode_get_dma_range(dev_ofnode(dev), cpu, bus, size);
+}
+
 int dev_read_alias_highest_id(const char *stem)
 {
        if (of_live_active())
@@ -386,3 +419,13 @@ int dev_decode_display_timing(const struct udevice *dev, int index,
 {
        return ofnode_decode_display_timing(dev_ofnode(dev), index, config);
 }
+
+ofnode dev_get_phy_node(const struct udevice *dev)
+{
+       return ofnode_get_phy_node(dev_ofnode(dev));
+}
+
+phy_interface_t dev_read_phy_mode(const struct udevice *dev)
+{
+       return ofnode_read_phy_mode(dev_ofnode(dev));
+}