]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: regmap: Add a dummy implementation for of-platdata
authorSimon Glass <sjg@chromium.org>
Mon, 4 Jul 2016 17:57:59 +0000 (11:57 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Jul 2016 02:40:24 +0000 (20:40 -0600)
Add a placeholder for now so that this code will compile. It currently does
nothing.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/regmap.c
include/regmap.h

index 519832f173307e95a9862e33679c9f0707218696..7e073cf9c0f6a8310786020f399cf0def6c3374b 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+int regmap_init_mem_platdata(struct udevice *dev, fdt32_t *reg, int size,
+                            struct regmap **mapp)
+{
+       /* TODO(sjg@chromium.org): Implement this when needed */
+       return 0;
+}
+#else
 int regmap_init_mem(struct udevice *dev, struct regmap **mapp)
 {
        const void *blob = gd->fdt_blob;
@@ -64,6 +72,7 @@ int regmap_init_mem(struct udevice *dev, struct regmap **mapp)
 
        return 0;
 }
+#endif
 
 void *regmap_get_range(struct regmap *map, unsigned int range_num)
 {
index eccf7707f456568de6cd371d6d971e71bd403ee6..922b39fad060df13be1226a56b957c094abf3d33 100644 (file)
@@ -56,6 +56,9 @@ int regmap_read(struct regmap *map, uint offset, uint *valp);
  */
 int regmap_init_mem(struct udevice *dev, struct regmap **mapp);
 
+int regmap_init_mem_platdata(struct udevice *dev, fdt32_t *reg, int size,
+                            struct regmap **mapp);
+
 /**
  * regmap_get_range() - Obtain the base memory address of a regmap range
  *