diff mbox

[U-Boot,v3,19/62] dm: regmap: Add a dummy implementation for of-platdata

Message ID 1467655123-29441-20-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 4, 2016, 5:57 p.m. UTC
Add a placeholder for now so that this code will compile. It currently does
nothing.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 drivers/core/regmap.c | 9 +++++++++
 include/regmap.h      | 3 +++
 2 files changed, 12 insertions(+)

Comments

Simon Glass July 15, 2016, 3:58 a.m. UTC | #1
On 4 July 2016 at 11:57, Simon Glass <sjg@chromium.org> wrote:
> Add a placeholder for now so that this code will compile. It currently does
> nothing.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  drivers/core/regmap.c | 9 +++++++++
>  include/regmap.h      | 3 +++
>  2 files changed, 12 insertions(+)

Applied to u-boot-dm
diff mbox

Patch

diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 519832f..7e073cf 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -15,6 +15,14 @@ 
 
 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)
 {
diff --git a/include/regmap.h b/include/regmap.h
index eccf770..922b39f 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -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
  *