* [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines
@ 2026-02-04 15:10 Marco Felsch
2026-02-04 15:10 ` [PATCH v2 2/2] lib: hexdump: make use of pr_print Marco Felsch
2026-02-09 14:20 ` [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Marco Felsch @ 2026-02-04 15:10 UTC (permalink / raw)
To: barebox
Add defines like already done for i.MX8MP and i.MX8MQ.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
- no changes
include/mach/imx/iomux-mx8mm.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/mach/imx/iomux-mx8mm.h b/include/mach/imx/iomux-mx8mm.h
index ee0240f53832..693eb67b9602 100644
--- a/include/mach/imx/iomux-mx8mm.h
+++ b/include/mach/imx/iomux-mx8mm.h
@@ -691,6 +691,16 @@ enum {
IMX8MM_PAD_UART4_TXD_GPIO5_IO29 = IOMUX_PAD(0x04B8, 0x0250, 5, 0x0000, 0, 0),
};
+#define MX8MM_PAD_CTL_DSE1 (0 << 1)
+#define MX8MM_PAD_CTL_DSE2 (2 << 1)
+#define MX8MM_PAD_CTL_DSE4 (1 << 1)
+#define MX8MM_PAD_CTL_DSE6 (3 << 1)
+#define MX8MM_PAD_CTL_FSEL BIT(4)
+#define MX8MM_PAD_CTL_ODE BIT(5)
+#define MX8MM_PAD_CTL_PUE BIT(6)
+#define MX8MM_PAD_CTL_HYS BIT(7)
+#define MX8MM_PAD_CTL_PE BIT(8)
+
static inline void imx8mm_setup_pad(iomux_v3_cfg_t pad)
{
void __iomem *iomux = IOMEM(MX8MM_IOMUXC_BASE_ADDR);
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] lib: hexdump: make use of pr_print
2026-02-04 15:10 [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Marco Felsch
@ 2026-02-04 15:10 ` Marco Felsch
2026-02-09 14:20 ` [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2026-02-04 15:10 UTC (permalink / raw)
To: barebox
The hexdump library was ported from Linux which supports different
printk() level. Because the barebox print* facility is different
compared to the one from Linux the barebox printk() doesn't support
levels. Therefore the level is always set to an empty string.
Furthermore all barebox printk() calls aren't recorded by the internal
barebox_logbuf because they are mostly used for command prints. Linux on
the other hand record each printk() print.
Not recording the output can be an issue on systems which don't have a
hw-console but a USB-ACM console, because the hexdump call may already
occurred before the console was ready.
Make use of pr_print() instead to record the output within the
barebox_logbuf to be available later on via dmesg. With that the hexdump
API changes from a string based loglevel to a integer based loglevel
parameter.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v2:
- change API to int based loglevel and make use of pr_print()
commands/ethlog.c | 4 ++--
drivers/mtd/ubi/attach.c | 2 +-
fs/ubifs/debug.c | 4 ++--
include/linux/printk.h | 4 ++--
include/printf.h | 2 +-
include/soc/ti/cppi5.h | 2 +-
lib/hexdump.c | 13 +++++--------
7 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/commands/ethlog.c b/commands/ethlog.c
index 21d88bf1cbfb..d641fd90ddb8 100644
--- a/commands/ethlog.c
+++ b/commands/ethlog.c
@@ -12,7 +12,7 @@
static void ethlog_rx_monitor(struct eth_device *edev, void *packet,
int length)
{
- dev_print_hex_dump(&edev->dev, KERN_DEBUG, "rx data <: ",
+ dev_print_hex_dump(&edev->dev, MSG_DEBUG, "rx data <: ",
DUMP_PREFIX_OFFSET, 16, 1, packet, length, true);
printk("\n");
}
@@ -20,7 +20,7 @@ static void ethlog_rx_monitor(struct eth_device *edev, void *packet,
static void ethlog_tx_monitor(struct eth_device *edev, void *packet,
int length)
{
- dev_print_hex_dump(&edev->dev, KERN_DEBUG, "tx data >: ",
+ dev_print_hex_dump(&edev->dev, MSG_DEBUG, "tx data >: ",
DUMP_PREFIX_OFFSET, 16, 1, packet, length, true);
printk("\n");
}
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 44fe435e4163..e49ceb8690d8 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -897,7 +897,7 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
ubi_dump_vid_hdr(vid_hdr);
pr_err("hexdump of PEB %d offset %d, length %d\n",
pnum, ubi->leb_start, ubi->leb_size);
- ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
+ ubi_dbg_print_hex_dump(MSG_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
ubi->peb_buf, ubi->leb_size, 1);
err = 1;
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index a4cffe84df71..2aae47b3b7d8 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -224,7 +224,7 @@ void ubifs_dump_node(const struct ubifs_info *c, const void *node)
/* If the magic is incorrect, just hexdump the first bytes */
if (le32_to_cpu(ch->magic) != UBIFS_NODE_MAGIC) {
pr_err("Not a node, first %zu bytes:", UBIFS_CH_SZ);
- print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 32, 1,
+ print_hex_dump(MSG_ERR, "", DUMP_PREFIX_OFFSET, 32, 1,
(void *)node, UBIFS_CH_SZ, 1);
return;
}
@@ -400,7 +400,7 @@ void ubifs_dump_node(const struct ubifs_info *c, const void *node)
(int)le16_to_cpu(dn->compr_type));
pr_err("\tdata size %d\n", dlen);
pr_err("\tdata:\n");
- print_hex_dump(KERN_ERR, "\t", DUMP_PREFIX_OFFSET, 32, 1,
+ print_hex_dump(MSG_ERR, "\t", DUMP_PREFIX_OFFSET, 32, 1,
(void *)&dn->data, dlen, 0);
break;
}
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 0d7180f0ebbc..6c071af5158b 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -202,7 +202,7 @@ struct va_format {
#if LOGLEVEL >= MSG_DEBUG
#define print_hex_dump_debug(prefix_str, prefix_type, rowsize, \
groupsize, buf, len, ascii) \
- print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize, \
+ print_hex_dump(MSG_DEBUG, prefix_str, prefix_type, rowsize, \
groupsize, buf, len, ascii)
#else
static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
@@ -221,7 +221,7 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
* @buf: data blob to dump
* @len: number of bytes in the @buf
*
- * Calls print_hex_dump(), with log level of KERN_DEBUG,
+ * Calls print_hex_dump(), with log level of MSG_DEBUG,
* rowsize of 16, groupsize of 1, and ASCII output included.
*/
#define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \
diff --git a/include/printf.h b/include/printf.h
index 3503b72c9e5e..92d6e18728f5 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -52,7 +52,7 @@ enum {
extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
int groupsize, char *linebuf, size_t linebuflen,
bool ascii);
-extern void dev_print_hex_dump(struct device *dev, const char *level,
+extern void dev_print_hex_dump(struct device *dev, int level,
const char *prefix_str, int prefix_type,
int rowsize, int groupsize, const void *buf,
size_t len, bool ascii);
diff --git a/include/soc/ti/cppi5.h b/include/soc/ti/cppi5.h
index 34e118fff25a..6331a38a85f0 100644
--- a/include/soc/ti/cppi5.h
+++ b/include/soc/ti/cppi5.h
@@ -150,7 +150,7 @@ struct cppi5_monolithic_desc_t {
static inline void cppi5_desc_dump(void *desc, u32 size)
{
- print_hex_dump(KERN_ERR, "dump udmap_desc: ", DUMP_PREFIX_NONE,
+ print_hex_dump(MSG_ERR, "dump udmap_desc: ", DUMP_PREFIX_NONE,
32, 4, desc, size, false);
}
diff --git a/lib/hexdump.c b/lib/hexdump.c
index 940c4eec64e9..d98a4e6100d6 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -228,7 +228,7 @@ EXPORT_SYMBOL(hex_dump_to_buffer);
/**
* print_hex_dump - print a text hex dump to syslog for a binary blob of data
- * @level: kernel log level (e.g. KERN_DEBUG)
+ * @level: barebox log level (e.g. MSG_DEBUG)
* @prefix_str: string to prefix each line with;
* caller supplies trailing spaces for alignment if desired
* @prefix_type: controls whether prefix of an offset, address, or none
@@ -257,7 +257,7 @@ EXPORT_SYMBOL(hex_dump_to_buffer);
* Example output using %DUMP_PREFIX_ADDRESS and 4-byte mode:
* ffffffff88089af0: 73727170 77767574 7b7a7978 7f7e7d7c pqrstuvwxyz{|}~.
*/
-void dev_print_hex_dump(struct device *dev, const char *level,
+void dev_print_hex_dump(struct device *dev, int level,
const char *prefix_str, int prefix_type, int rowsize,
int groupsize, const void *buf, size_t len, bool ascii)
{
@@ -284,16 +284,13 @@ void dev_print_hex_dump(struct device *dev, const char *level,
switch (prefix_type) {
case DUMP_PREFIX_ADDRESS:
- printk("%s%s%s%p: %s\n", level, name, prefix_str,
- ptr + i, linebuf);
+ pr_print(level, "%s%s%p: %s\n", name, prefix_str, ptr + i, linebuf);
break;
case DUMP_PREFIX_OFFSET:
- printk("%s%s%s%.8x: %s\n", level, name, prefix_str,
- i, linebuf);
+ pr_print(level, "%s%s%.8x: %s\n", name, prefix_str, i, linebuf);
break;
default:
- printk("%s%s%s%s\n", level, name, prefix_str,
- linebuf);
+ pr_print(level, "%s%s%s\n", name, prefix_str, linebuf);
break;
}
}
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines
2026-02-04 15:10 [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Marco Felsch
2026-02-04 15:10 ` [PATCH v2 2/2] lib: hexdump: make use of pr_print Marco Felsch
@ 2026-02-09 14:20 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-02-09 14:20 UTC (permalink / raw)
To: barebox, Marco Felsch
On Wed, 04 Feb 2026 16:10:52 +0100, Marco Felsch wrote:
> Add defines like already done for i.MX8MP and i.MX8MQ.
>
>
Applied, thanks!
[1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines
https://git.pengutronix.de/cgit/barebox/commit/?id=b9f27457e70e (link may not be stable)
[2/2] lib: hexdump: make use of pr_print
https://git.pengutronix.de/cgit/barebox/commit/?id=b337210d859a (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-09 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04 15:10 [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Marco Felsch
2026-02-04 15:10 ` [PATCH v2 2/2] lib: hexdump: make use of pr_print Marco Felsch
2026-02-09 14:20 ` [PATCH v2 1/2] ARM: i.MX8MM: add MX8MM_PAD_CTL defines Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox