DECLARE_GLOBAL_DATA_PTR;
-fdt_addr_t devfdt_get_addr_index(struct udevice *dev, int index)
+fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index)
{
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
fdt_addr_t addr;
#endif
}
-fdt_addr_t devfdt_get_addr_size_index(struct udevice *dev, int index,
- fdt_size_t *size)
+fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
+ fdt_size_t *size)
{
#if CONFIG_IS_ENABLED(OF_CONTROL)
/*
#endif
}
-fdt_addr_t devfdt_get_addr_name(struct udevice *dev, const char *name)
+fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name)
{
#if CONFIG_IS_ENABLED(OF_CONTROL)
int index;
#endif
}
-fdt_addr_t devfdt_get_addr_size_name(struct udevice *dev, const char *name,
- fdt_size_t *size)
+fdt_addr_t devfdt_get_addr_size_name(const struct udevice *dev,
+ const char *name, fdt_size_t *size)
{
#if CONFIG_IS_ENABLED(OF_CONTROL)
int index;
#endif
}
-fdt_addr_t devfdt_get_addr(struct udevice *dev)
+fdt_addr_t devfdt_get_addr(const struct udevice *dev)
{
return devfdt_get_addr_index(dev, 0);
}
-void *devfdt_get_addr_ptr(struct udevice *dev)
+void *devfdt_get_addr_ptr(const struct udevice *dev)
{
return (void *)(uintptr_t)devfdt_get_addr_index(dev, 0);
}
-void *devfdt_remap_addr_index(struct udevice *dev, int index)
+void *devfdt_remap_addr_index(const struct udevice *dev, int index)
{
fdt_addr_t addr = devfdt_get_addr_index(dev, index);
return map_physmem(addr, 0, MAP_NOCACHE);
}
-void *devfdt_remap_addr_name(struct udevice *dev, const char *name)
+void *devfdt_remap_addr_name(const struct udevice *dev, const char *name)
{
fdt_addr_t addr = devfdt_get_addr_name(dev, name);
return map_physmem(addr, 0, MAP_NOCACHE);
}
-void *devfdt_remap_addr(struct udevice *dev)
+void *devfdt_remap_addr(const struct udevice *dev)
{
return devfdt_remap_addr_index(dev, 0);
}
-void *devfdt_map_physmem(struct udevice *dev, unsigned long size)
+void *devfdt_map_physmem(const struct udevice *dev, unsigned long size)
{
fdt_addr_t addr = devfdt_get_addr(dev);
return map_physmem(addr, size, MAP_NOCACHE);
}
-fdt_addr_t devfdt_get_addr_pci(struct udevice *dev)
+fdt_addr_t devfdt_get_addr_pci(const struct udevice *dev)
{
ulong addr;
*
* @return addr
*/
-fdt_addr_t devfdt_get_addr(struct udevice *dev);
+fdt_addr_t devfdt_get_addr(const struct udevice *dev);
/**
* devfdt_get_addr_ptr() - Return pointer to the address of the reg property
*
* @return Pointer to addr, or NULL if there is no such property
*/
-void *devfdt_get_addr_ptr(struct udevice *dev);
+void *devfdt_get_addr_ptr(const struct udevice *dev);
/**
* devfdt_remap_addr() - Return pointer to the memory-mapped I/O address
*
* @return Pointer to addr, or NULL if there is no such property
*/
-void *devfdt_remap_addr(struct udevice *dev);
+void *devfdt_remap_addr(const struct udevice *dev);
/**
* devfdt_remap_addr_index() - Return indexed pointer to the memory-mapped
*
* @return Pointer to addr, or NULL if there is no such property
*/
-void *devfdt_remap_addr_index(struct udevice *dev, int index);
+void *devfdt_remap_addr_index(const struct udevice *dev, int index);
/**
* devfdt_remap_addr_name() - Get the reg property of a device, indexed by
*
* @return Pointer to addr, or NULL if there is no such property
*/
-void *devfdt_remap_addr_name(struct udevice *dev, const char *name);
+void *devfdt_remap_addr_name(const struct udevice *dev, const char *name);
/**
* devfdt_map_physmem() - Read device address from reg property of the
* @return mapped address, or NULL if the device does not have reg
* property.
*/
-void *devfdt_map_physmem(struct udevice *dev, unsigned long size);
+void *devfdt_map_physmem(const struct udevice *dev, unsigned long size);
/**
* devfdt_get_addr_index() - Get the indexed reg property of a device
*
* @return addr
*/
-fdt_addr_t devfdt_get_addr_index(struct udevice *dev, int index);
+fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index);
/**
* devfdt_get_addr_size_index() - Get the indexed reg property of a device
*
* @return addr
*/
-fdt_addr_t devfdt_get_addr_size_index(struct udevice *dev, int index,
- fdt_size_t *size);
+fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
+ fdt_size_t *size);
/**
* devfdt_get_addr_name() - Get the reg property of a device, indexed by name
*
* @return addr
*/
-fdt_addr_t devfdt_get_addr_name(struct udevice *dev, const char *name);
+fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name);
/**
* devfdt_get_addr_size_name() - Get the reg property and its size for a device,
*
* @return addr
*/
-fdt_addr_t devfdt_get_addr_size_name(struct udevice *dev, const char *name,
- fdt_size_t *size);
+fdt_addr_t devfdt_get_addr_size_name(const struct udevice *dev,
+ const char *name, fdt_size_t *size);
/**
* devfdt_get_addr_pci() - Read an address and handle PCI address translation
* @dev: Device to read from
* @return address or FDT_ADDR_T_NONE if not found
*/
-fdt_addr_t devfdt_get_addr_pci(struct udevice *dev);
+fdt_addr_t devfdt_get_addr_pci(const struct udevice *dev);
#endif