aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/anbernic-rgxx3-rk3566.h12
-rw-r--r--include/dm/fdtaddr.h17
-rw-r--r--include/dm/ofnode.h16
-rw-r--r--include/fdtdec.h13
-rw-r--r--include/regmap.h5
-rw-r--r--include/syscon.h13
6 files changed, 48 insertions, 28 deletions
diff --git a/include/configs/anbernic-rgxx3-rk3566.h b/include/configs/anbernic-rgxx3-rk3566.h
new file mode 100644
index 00000000000..3c4ea4e7d84
--- /dev/null
+++ b/include/configs/anbernic-rgxx3-rk3566.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __ANBERNIC_RGXX3_RK3566_H
+#define __ANBERNIC_RGXX3_RK3566_H
+
+#include <configs/rk3568_common.h>
+
+#define ROCKCHIP_DEVICE_SETTINGS \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
+
+#endif
diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h
index c9d2b27ba6e..dcdc19137cc 100644
--- a/include/dm/fdtaddr.h
+++ b/include/dm/fdtaddr.h
@@ -111,7 +111,7 @@ void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index);
* @dev: Pointer to a device
* @index: the 'reg' property can hold a list of <addr, size> pairs
* and @index is used to select which one is required
- * @size: Pointer to size varible - this function returns the size
+ * @size: Pointer to size variable - this function returns the size
* specified in the 'reg' property here
*
* Return: addr
@@ -120,6 +120,21 @@ fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index,
fdt_size_t *size);
/**
+ * devfdt_get_addr_size_index_ptr() - Return indexed pointer to the address of the
+ * reg property of a device
+ *
+ * @dev: Pointer to a device
+ * @index: the 'reg' property can hold a list of <addr, size> pairs
+ * and @index is used to select which one is required
+ * @size: Pointer to size variable - this function returns the size
+ * specified in the 'reg' property here
+ *
+ * Return: Pointer to addr, or NULL if there is no such property
+ */
+void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index,
+ fdt_size_t *size);
+
+/**
* devfdt_get_addr_name() - Get the reg property of a device, indexed by name
*
* @dev: Pointer to a device
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index c00677275ee..443db6252dd 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -678,8 +678,8 @@ int ofnode_read_size(ofnode node, const char *propname);
* @size: Pointer to size of the address
* Return: address, or FDT_ADDR_T_NONE if not present or invalid
*/
-phys_addr_t ofnode_get_addr_size_index(ofnode node, int index,
- fdt_size_t *size);
+fdt_addr_t ofnode_get_addr_size_index(ofnode node, int index,
+ fdt_size_t *size);
/**
* ofnode_get_addr_size_index_notrans() - get an address/size from a node
@@ -695,8 +695,8 @@ phys_addr_t ofnode_get_addr_size_index(ofnode node, int index,
* @size: Pointer to size of the address
* Return: address, or FDT_ADDR_T_NONE if not present or invalid
*/
-phys_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index,
- fdt_size_t *size);
+fdt_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index,
+ fdt_size_t *size);
/**
* ofnode_get_addr_index() - get an address from a node
@@ -707,7 +707,7 @@ phys_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index,
* @index: Index of address to read (0 for first)
* Return: address, or FDT_ADDR_T_NONE if not present or invalid
*/
-phys_addr_t ofnode_get_addr_index(ofnode node, int index);
+fdt_addr_t ofnode_get_addr_index(ofnode node, int index);
/**
* ofnode_get_addr() - get an address from a node
@@ -717,7 +717,7 @@ phys_addr_t ofnode_get_addr_index(ofnode node, int index);
* @node: node to read from
* Return: address, or FDT_ADDR_T_NONE if not present or invalid
*/
-phys_addr_t ofnode_get_addr(ofnode node);
+fdt_addr_t ofnode_get_addr(ofnode node);
/**
* ofnode_get_size() - get size from a node
@@ -1067,8 +1067,8 @@ const void *ofprop_get_property(const struct ofprop *prop,
* @sizep: place to put size value (on success)
* Return: address value, or FDT_ADDR_T_NONE on error
*/
-phys_addr_t ofnode_get_addr_size(ofnode node, const char *propname,
- phys_size_t *sizep);
+fdt_addr_t ofnode_get_addr_size(ofnode node, const char *propname,
+ fdt_size_t *sizep);
/**
* ofnode_read_u8_array_ptr() - find an 8-bit array
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 6716da9c659..bd1149f46d0 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -18,15 +18,18 @@
#include <pci.h>
/*
- * A typedef for a physical address. Note that fdt data is always big
+ * Support for 64bit fdt addresses.
+ * This can be used not only for 64bit SoCs, but also
+ * for large address extensions on 32bit SoCs.
+ * Note that fdt data is always big
* endian even on a litle endian machine.
*/
-typedef phys_addr_t fdt_addr_t;
-typedef phys_size_t fdt_size_t;
#define FDT_SIZE_T_NONE (-1U)
-#ifdef CONFIG_PHYS_64BIT
+#ifdef CONFIG_FDT_64BIT
+typedef u64 fdt_addr_t;
+typedef u64 fdt_size_t;
#define FDT_ADDR_T_NONE ((ulong)(-1))
#define fdt_addr_to_cpu(reg) be64_to_cpu(reg)
@@ -35,6 +38,8 @@ typedef phys_size_t fdt_size_t;
#define cpu_to_fdt_size(reg) cpu_to_be64(reg)
typedef fdt64_t fdt_val_t;
#else
+typedef u32 fdt_addr_t;
+typedef u32 fdt_size_t;
#define FDT_ADDR_T_NONE (-1U)
#define fdt_addr_to_cpu(reg) be32_to_cpu(reg)
diff --git a/include/regmap.h b/include/regmap.h
index e81a3602aea..22b043408ac 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -378,17 +378,18 @@ int regmap_init_mem(ofnode node, struct regmap **mapp);
*
* @dev: Device that uses this map
* @reg: List of address, size pairs
+ * @size: Size of one reg array item
* @count: Number of pairs (e.g. 1 if the regmap has a single entry)
* @mapp: Returns allocated map
* Return: 0 if OK, -ve on error
*
* This creates a new regmap with a list of regions passed in, rather than
- * using the device tree. It only supports 32-bit machines.
+ * using the device tree.
*
* Use regmap_uninit() to free it.
*
*/
-int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,
+int regmap_init_mem_plat(struct udevice *dev, void *reg, int size, int count,
struct regmap **mapp);
int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index);
diff --git a/include/syscon.h b/include/syscon.h
index f5e6cc1a4b1..7a5ee3fa26b 100644
--- a/include/syscon.h
+++ b/include/syscon.h
@@ -25,19 +25,6 @@ struct syscon_ops {
#define syscon_get_ops(dev) ((struct syscon_ops *)(dev)->driver->ops)
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
-/*
- * We don't support 64-bit machines. If they are so resource-contrained that
- * they need to use OF_PLATDATA, something is horribly wrong with the
- * education of our hardware engineers.
- *
- * Update: 64-bit is now supported and we have an education crisis.
- */
-struct syscon_base_plat {
- fdt_val_t reg[2];
-};
-#endif
-
/**
* syscon_get_regmap() - Get access to a register map
*