summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-05-31 09:12:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-02 08:37:22 +0200
commitb9958d497dfd9fc563b198f7233c57388d76cd06 (patch)
treeebe8793df8ec01ce33de9ac5eaf1a38bc440fd20 /include
parent5b4dcc6fdeadf4844852efd7c950614de8525a83 (diff)
downloadbarebox-b9958d497dfd9fc563b198f7233c57388d76cd06.tar.gz
barebox-b9958d497dfd9fc563b198f7233c57388d76cd06.tar.xz
common: memory: allocate all memory devices at once
Follow-up commit will fuse overlapping RAM banks. As all memory is supposed to be registered during mem_initcall or before, we can postpone device creation to mmu_initcall, so we can directly allocate devices spanning the correct region. The mem driver and the devinfo command are the only consumers of these devices, so it's ok to register the devices at mmu_initcall. While at it, drop the struct memory_bank::dev member. It's unused anywhere. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071239.30653-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/memory.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/memory.h b/include/memory.h
index 906d9f7b26..c793bb51ed 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -11,7 +11,6 @@ ulong mem_malloc_end(void);
struct memory_bank {
struct list_head list;
- struct device_d *dev;
unsigned long start;
unsigned long size;
struct resource *res;