From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: lst@pengutronix.de
Subject: [RFC PATCH 1/5] pbl: add block I/O API
Date: Mon, 6 Jan 2020 18:35:36 +0100 [thread overview]
Message-ID: <20200106173540.20367-2-ahmad@a3f.at> (raw)
In-Reply-To: <20200106173540.20367-1-ahmad@a3f.at>
We already have some PBL MCI implementations in barebox, but none
are used for chainloading a barebox from a file system.
In preparation for supporting first stage boot on SoCs where it's
customary for both the BootROM and first stage bootloader to load the
follow-up stage from FAT, add a very basic block I/O API that MCI
drivers can implement.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
include/pbl.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/pbl.h b/include/pbl.h
index 787bd8293ff1..7cc162dfd039 100644
--- a/include/pbl.h
+++ b/include/pbl.h
@@ -7,6 +7,8 @@
#ifndef __PBL_H__
#define __PBL_H__
+#include <linux/types.h>
+
extern unsigned long free_mem_ptr;
extern unsigned long free_mem_end_ptr;
@@ -14,6 +16,10 @@ void pbl_barebox_uncompress(void *dest, void *compressed_start, unsigned int len
#ifdef __PBL__
#define IN_PBL 1
+struct pbl_bio {
+ void *priv;
+ int (*read)(struct pbl_bio *bio, off_t block_off, void *buf, unsigned int nblocks);
+};
#else
#define IN_PBL 0
#endif
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-01-06 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 17:35 [RFC PATCH 0/5] fs: fat: extend for in-PBL support Ahmad Fatoum
2020-01-06 17:35 ` Ahmad Fatoum [this message]
2020-01-06 17:35 ` [RFC PATCH 2/5] " Ahmad Fatoum
2020-01-08 11:14 ` Sascha Hauer
2020-01-06 17:35 ` [RFC PATCH 3/5] mci: add first-stage at91-sdhci driver Ahmad Fatoum
2020-01-08 11:23 ` Sascha Hauer
2020-01-06 17:35 ` [RFC PATCH 4/5] ARM: at91: add helpers for MCI barebox chain-loading Ahmad Fatoum
2020-01-06 17:35 ` [RFC PATCH 5/5] [WIP] ARM: at91: sama5d27-som1: add first stage entry point Ahmad Fatoum
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=20200106173540.20367-2-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
--cc=lst@pengutronix.de \
/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