common: Make sure arch-specific map_sysmem() is defined
In the case where the arch defines a custom map_sysmem(), make sure that
including just mapmem.h is sufficient to have these functions as they
are when the arch does not override it.
Also split the non-arch specific functions out of common.h
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 1cbf84f..45e471c 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -20,6 +20,7 @@
#endif
#include <hash.h>
#include <inttypes.h>
+#include <mapmem.h>
#include <watchdog.h>
#include <asm/io.h>
#include <linux/compiler.h>