mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Subject: [PATCH v1 01/10] resource: add create_resource() helper function
Date: Wed, 16 May 2018 18:42:24 +0200	[thread overview]
Message-ID: <20180516164233.27581-2-linux@rempel-privat.de> (raw)
In-Reply-To: <20180516164233.27581-1-linux@rempel-privat.de>

From: Antony Pavlov <antonynpavlov@gmail.com>

needed for kexec support

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 common/resource.c      | 15 +++++++++++++++
 include/linux/ioport.h |  2 ++
 2 files changed, 17 insertions(+)

diff --git a/common/resource.c b/common/resource.c
index e4bbe15fd..fa9ffd084 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -150,3 +150,18 @@ struct resource *request_ioport_region(const char *name,
 
 	return res;
 }
+
+struct resource *create_resource(const char *name,
+	resource_size_t start, resource_size_t end)
+{
+	struct resource *t;
+
+	t = xzalloc(sizeof *t);
+	INIT_LIST_HEAD(&t->children);
+	t->parent = NULL;
+	t->name = xstrdup(name);
+	t->start = start;
+	t->end = end;
+
+	return t;
+}
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 3d375a874..2a944cc73 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -140,6 +140,8 @@ struct resource *__request_region(struct resource *parent,
 		resource_size_t size);
 
 int release_region(struct resource *res);
+struct resource *create_resource(const char *name,
+	resource_size_t start, resource_size_t end);
 
 extern struct resource iomem_resource;
 extern struct resource ioport_resource;
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-05-16 16:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 16:42 [PATCH v1 00/10] provide ELF/KEXEC support for MIPS ath79 and malta Oleksij Rempel
2018-05-16 16:42 ` Oleksij Rempel [this message]
2018-05-16 16:42 ` [PATCH v1 02/10] port resource_overlaps() from kernel Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 03/10] filetype: add ELF type Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 04/10] bootm: add kexec ELF support Oleksij Rempel
2018-05-16 21:34   ` Peter Mamonov
2018-05-17  4:52     ` Oleksij Rempel
2018-05-17  7:01       ` Sascha Hauer
2018-05-17  9:51         ` Peter Mamonov
2018-05-16 16:42 ` [PATCH v1 05/10] MIPS: add kexec ELF loading support Oleksij Rempel
2018-05-17  9:56   ` Sascha Hauer
2018-05-17 10:07     ` Oleksij Rempel
2018-05-18  5:46       ` Sascha Hauer
2018-05-16 16:42 ` [PATCH v1 06/10] MIPS: ath79: enable kexec Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 07/10] MIPS: malta: " Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 08/10] MIPS: configs: add KEXEC=y to atheros devices Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 09/10] MIPS: configs: dptechnics-dpt-module: enable watchdog poller Oleksij Rempel
2018-05-16 16:42 ` [PATCH v1 10/10] MIPS: malta: update malta qemu defconfig Oleksij Rempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180516164233.27581-2-linux@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox