summaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-03-20 14:55:10 -0400
committerTom Rini <trini@ti.com>2013-03-20 14:55:10 -0400
commit8b906a9f0b3fd0d4421e08c4fa62f61a01289611 (patch)
tree049acc34fee9692c0c394b8d1697d97257c0a074 /include/fdtdec.h
parent3c47f2f4871c345c20b9d986b11fec550ef6cc9f (diff)
parent1e7133e99e27c4f02998e7eb87fa43424d48152b (diff)
downloadolio-uboot-2014.01-8b906a9f0b3fd0d4421e08c4fa62f61a01289611.tar.xz
olio-uboot-2014.01-8b906a9f0b3fd0d4421e08c4fa62f61a01289611.zip
Merge branch 'spi' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 21894835d..3b363be03 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -38,11 +38,13 @@
*/
#ifdef CONFIG_PHYS_64BIT
typedef u64 fdt_addr_t;
+typedef u64 fdt_size_t;
#define FDT_ADDR_T_NONE (-1ULL)
#define fdt_addr_to_cpu(reg) be64_to_cpu(reg)
#define fdt_size_to_cpu(reg) be64_to_cpu(reg)
#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)
#define fdt_size_to_cpu(reg) be32_to_cpu(reg)
@@ -84,6 +86,7 @@ enum fdt_compat_id {
COMPAT_SAMSUNG_EXYNOS_EHCI, /* Exynos EHCI controller */
COMPAT_SAMSUNG_EXYNOS_USB_PHY, /* Exynos phy controller for usb2.0 */
COMPAT_MAXIM_MAX77686_PMIC, /* MAX77686 PMIC */
+ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
COMPAT_COUNT,
};
@@ -200,6 +203,19 @@ fdt_addr_t fdtdec_get_addr(const void *blob, int node,
const char *prop_name);
/**
+ * Look up an address property in a node and return it as an address.
+ * The property must hold one address with a length. This is only tested
+ * on 32-bit machines.
+ *
+ * @param blob FDT blob
+ * @param node node to examine
+ * @param prop_name name of property to find
+ * @return address, if found, or FDT_ADDR_T_NONE if not
+ */
+fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
+ const char *prop_name, fdt_size_t *sizep);
+
+/**
* Look up a 32-bit integer property in a node and return it. The property
* must have at least 4 bytes of data. The value of the first cell is
* returned.