Hi Andrey.
> +
> +/**
> + * __console_get_default - Return default output console
> + *
> + * Internal function used to determine which console to use for early
> + * output. It has the following two use-cases:
> + *
> + * 1. PBL, where it falls back onto console_ll and whatever it is
> + *
Hi Andrey.
On Thu, Jun 14, 2018 at 09:11:10PM -0700, Andrey Smirnov wrote:
> Move all of the shared code into lib/console.c and convert both files
> to use that.
>
> Signed-off-by: Andrey Smirnov
> ---
> +++ b/lib/console.c
> @@ -0,0 +1,130 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +
> +/*
>
Remove what looks like a leftover code that doesn't appear to be
referenced anywhere.
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/psci.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 435ec92cc..f63f66855 100644
---
Introduce a simple inline function to get TTBR and use it in mmu.c and
sm.c
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/mmu.c | 4 +---
arch/arm/cpu/mmu.h | 9 +
arch/arm/cpu/sm.c | 3 +--
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/mmu.c
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/sm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c
index 5808dfd92..b0bf16405 100644
--- a/arch/arm/cpu/sm.c
+++ b/arch/arm/cpu/sm.c
@@ -193,8 +193,7 @@ int
Convert PSCI debug facilities to use shared code in lib/console.c,
similar to what's been done to PBL_CONSOLE.
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/psci.c | 34 +++---
arch/arm/include/asm/psci.h | 11 ---
2 files changed, 7 insertions(+),
Since printf() is just a special case of dprintf(), we can re-arrange
our codebase to share that definition for dprintf() and have printf()
as a simple marcro expanding into appropriate call to dprintf() thus
allowing us to drop a bit of code.
Signed-off-by: Andrey Smirnov
---
Semantics implemented by getc_raw() in CONSOLE_FULL is reasonably
close to what getchar() in CONSOLE_SIMPLE does. Arguably getc_raw() is
bulkier than what CONSOLE_SIMPLE has, but this replacement allows us
to share more code between CONSOLE_SIMPLE and CONSOLE_FULL as well as
reduce our
PBL's implementation of pr_print(), doesn't use its 'level' argument
at all, so it is identical in its behaviour to simple printf(). In
light of that drop the custom code implementing that and convert it to
be a CPP macro that is expanded into simple printf().
Signed-off-by: Andrey Smirnov
---
We already add registered console to global console_list, so there
isn't really a need to have a global console pointer. Now, with
majority of references to console pointer gone, we can easily ditch it
and use console_list directly instead.
Signed-off-by: Andrey Smirnov
---
Semantics implemented by tstc_raw() in CONSOLE_FULL is reasonably
close to what testc() in CONSOLE_SIMPLE does. Arguably tstc_raw() is
bulkier that what CONSOLE_SIMPLE has, but this replacement allows us
to share more code between CONSOLE_SIMPLE and CONSOLE_FULL as well as
reduce our dependencies
Similar to previous commit, consolidate DEBUG_LL and CONSOLE_* puts()
implementations by putting them into a shared macro.
Signed-off-by: Andrey Smirnov
---
include/debug_ll.h | 23 +++
lib/console.c | 13 ++---
2 files changed, 25 insertions(+), 11 deletions(-)
Both implementations of console_flush() should behave the same way.
Arguably CONSOLE_FULL's implementation is a bit bulkier that what
CONSOLE_SIMPLE has, but this replacement allows us to share more code
between CONSOLE_SIMPLE and CONSOLE_FULL as well as reduce our
dependencies on global console
If we change dev_printf() to not print device related info at the
start if NULL is passed as device pointer, we can easliy use that
function to do what pr_print does. With this change we can convert
pr_print to be a simple macro that expands into a dev_printf() and
drop a bit of exctra code.
Signed-off-by: Andrey Smirnov
---
common/console_simple.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/common/console_simple.c b/common/console_simple.c
index 91b6cb6cd..f13f9d71a 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -10,8 +10,7 @@ int
If we declare our default ctrlc() implementation as __weak we should
be easily override it with a platform specific implementation without
needing ARCH_HAS_CTRLC.
Signed-off-by: Andrey Smirnov
---
arch/sandbox/include/asm/common.h | 2 --
include/stdio.h | 9 -
Signed-off-by: Andrey Smirnov
---
common/console.c| 13 -
common/console_simple.c | 11 ---
include/stdio.h | 17 +
lib/console.c | 16 +++-
pbl/console.c | 5 -
5 files changed, 24 insertions(+), 38
In an effort to consolidate various printf re-implementation,
introduce the most generic form of printf() to be used to implement
other flavours of it.
Signed-off-by: Andrey Smirnov
---
common/console_common.c | 18
lib/console.c | 47
Simplify early console code by converting both FIFO output buffering
as well as DEBUG_LL output into dummy console devices that are added
early on and removed as soon as they are not needed.
This change allows us to remove a whole bunch of corner case
handngling from both console_puts() and
Knowing that puts() is just a wrapper around a call to
console_puts(CONSOLE_STDOUT, str) we can simplify the code of
dputs(). While at it, make use of *_FILENO constants to get rid of
magic numbers.
Signed-off-by: Andrey Smirnov
---
common/console_common.c | 18 +-
1 file
PBL, CONSOLE_FULL and CONSOLE_SIMPLE contain almost identical puts()
implementations some of which also perform additional '\n' -> '\n\r'
compensation.
Move all of that code into a central location and share as much of it
as possible.
Signed-off-by: Andrey Smirnov
---
common/console.c|
Consolidate code doing '\n' -> '\n\r' compensation in DEBUG_LL and
CONSOLE_* subsystems. While at it move it from puts_ll() to putc_ll()
in order to match the semantics of other puts()/putc()
implementations.
This is done as a macro in order to avoid putting any restrictions on
the signature of
Signed-off-by: Andrey Smirnov
---
common/console.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/console.c b/common/console.c
index d64a7be25..0c098c5eb 100644
--- a/common/console.c
+++ b/common/console.c
@@ -503,9 +503,7 @@ void console_putc(unsigned int ch,
Both CONSOLE_* and PBL have almost identical implementations of
pritnf(). Move the code to a common location so it can be share
between the two.
Signed-off-by: Andrey Smirnov
---
common/console_common.c | 22 --
lib/console.c | 24 +++-
Fix if condition in console_get_first_active() to actually check that
both bit are set.
Signed-off-by: Andrey Smirnov
---
common/console_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/console_common.c b/common/console_common.c
index 00e020bd3..0131a1190
The only use of dputc() is commands/echo.c and the code there can
easily be converted to dputs(). Do that and drop dputc() to avoid
duplicating fd selection logic already found in dputs().
Signed-off-by: Andrey Smirnov
---
commands/echo.c | 4 ++--
common/console_common.c | 15
CONSOLE_SIMPLE allows only a single console device. Since first
console to be registerd for majority of the boards would be debug
serial, there's no straightforward way to make netconsole work with
CONSOLE_SIMPLE there.
Reflect that by making NET_NETCONSOLE depend on CONSOLE_FULL.
Signed-off-by:
CONSOLE_SIMPLE allows only a single console device. Since first
console to be registerd for majority of the boards would be debug
serial there's no straightforward way to make input framework work
with CONSOLE_SIMPLE there.
Reflect that by making "Input device support" depend on CONSOLE_FULL.
CONSOLE_SIMPLE does not provide implementation of
console_set_active(). Instead of providing a dummy implementation to
cover for that, add dependency on CONSOLE_FULL since RATP would be
severely limited by single console device limitation of
CONSOLE_SIMPLE.
Signed-off-by: Andrey Smirnov
---
To make putchar() work correctly in PBL we need to make sure that '\n'
-> '\r\n' replacement is done in console_putc() instead of
console_puts(). This also allows us to share a bit more code by
moving console_putc() to lib/console.c.
Signed-off-by: Andrey Smirnov
---
common/console_simple.c | 6
Move all of the shared code into lib/console.c and convert both files
to use that.
Signed-off-by: Andrey Smirnov
---
common/console_simple.c | 11 +---
include/console.h | 8 +++
lib/Makefile| 6 +-
lib/console.c | 130
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/psci.c | 4 ++--
include/console.h | 6 --
pbl/console.c | 4 ++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 0a7e48f8f..ad132c0a3 100644
--- a/arch/arm/cpu/psci.c
+++
Everyone:
While debugging the reason behind print_hex_dump() not producing
carriage return properly, when used in PBL, I realised that current
codebase contained:
- at least 5 places where '\n' was replaced with '\n\r'
- at least 3 almost identical implementations of puts()
- at least 3
After being introduced 3 years ago this feature ended up being
"obsoleted by events" and project it was supposed to be a part of
winded down.
Revert this feature due to:
a) Lack of users
b) Existence of better way to make barebox load via SRAM as
intermediary step that does not require
Similar to imx_v7_defconfig, add imx_v8_defconfig as a default
configuration encompassing all ARMv8 based i.MX SoCs.
Signed-off-by: Andrey Smirnov
---
arch/arm/configs/imx_v8_defconfig | 107 ++
1 file changed, 107 insertions(+)
create mode 100644
From: Sascha Hauer
Signed-off-by: Sascha Hauer
Signed-off-by: Andrey Smirnov
---
Documentation/boards/imx.rst | 13 +-
Documentation/boards/imx/nxp-imx8mq-evk.rst | 116 ++
arch/arm/boards/Makefile |1 +
arch/arm/boards/nxp-imx8mq-evk/.gitignore
From: Sascha Hauer
Signed-off-by: Sascha Hauer
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 54 +
scripts/imx/imx.c | 23 --
scripts/imx/imx.h | 2 ++
3 files changed, 66 insertions(+), 13 deletions(-)
diff
Signed-off-by: Andrey Smirnov
---
common/clock.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/common/clock.c b/common/clock.c
index f98176dd5..0c6cb399b 100644
--- a/common/clock.c
+++ b/common/clock.c
@@ -206,9 +206,11 @@ EXPORT_SYMBOL(udelay);
void
Add DDRC PHY support code needed to upload DDR training firwmare as
well as to wait for the training process to complete.
Those are needed to support board specific DDR initialization code.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/Makefile | 1 +
Use a loop to create multiple header copies on i.MX35 to avoid code
duplication.
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 294f51a90..bc1f821bd
Signed-off-by: Andrey Smirnov
---
include/clock.h| 14 +
include/linux/iopoll.h | 69 ++
2 files changed, 83 insertions(+)
create mode 100644 include/linux/iopoll.h
diff --git a/include/clock.h b/include/clock.h
index 5f2f53ab6..58d84b912
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 42 -
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index bc1f821bd..4a08581fb 100644
--- a/scripts/imx/imx-image.c
+++
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
index d889e9afb..2359c56b3 100644
--- a/arch/arm/cpu/Kconfig
+++ b/arch/arm/cpu/Kconfig
@@ -12,6 +12,7 @@ config CPU_32
config CPU_64
From: Sascha Hauer
Provide missing .format_mac for i.MX8MQ to prevent driver from
crashing on start.
Signed-off-by: Andrey Smirnov
---
drivers/nvmem/ocotp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index f3af8620e..c2d2982ee 100644
---
Everyone:
Picking up where Sascha left off, this is the next version of the
patchset that adds support for i.MX8MQ EVK board.
This patchest is also availible at:
https://github.com/ndreys/barebox/tree/imx8m-support-v7
Changes since [v6]:
- Minor misspelling fix
Changes since [v5]:
-
On Thu, Jun 14, 2018 at 3:04 AM Antony Pavlov wrote:
>
> On Wed, 13 Jun 2018 23:27:44 -0700
> Andrey Smirnov wrote:
>
> > Signed-off-by: Andrey Smirnov
> > ---
> > common/clock.c | 8 +---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/common/clock.c
On Wed, 13 Jun 2018 23:27:44 -0700
Andrey Smirnov wrote:
> Signed-off-by: Andrey Smirnov
> ---
> common/clock.c | 8 +---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/common/clock.c b/common/clock.c
> index f98176dd5..dab6e979f 100644
> --- a/common/clock.c
> +++
From: Sascha Hauer
Signed-off-by: Sascha Hauer
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 54 +
scripts/imx/imx.c | 23 --
scripts/imx/imx.h | 2 ++
3 files changed, 66 insertions(+), 13 deletions(-)
diff
From: Sascha Hauer
Signed-off-by: Sascha Hauer
Signed-off-by: Andrey Smirnov
---
Documentation/boards/imx.rst | 13 +-
Documentation/boards/imx/nxp-imx8mq-evk.rst | 116 ++
arch/arm/boards/Makefile |1 +
arch/arm/boards/nxp-imx8mq-evk/.gitignore
Similar to imx_v7_defconfig, add imx_v8_defconfig as a default
configuration encompassing all ARMv8 based i.MX SoCs.
Signed-off-by: Andrey Smirnov
---
arch/arm/configs/imx_v8_defconfig | 107 ++
1 file changed, 107 insertions(+)
create mode 100644
Use a loop to create multiple header copies on i.MX35 to avoid code
duplication.
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 294f51a90..bc1f821bd
Signed-off-by: Andrey Smirnov
---
common/clock.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/common/clock.c b/common/clock.c
index f98176dd5..dab6e979f 100644
--- a/common/clock.c
+++ b/common/clock.c
@@ -206,9 +206,11 @@ EXPORT_SYMBOL(udelay);
void
From: Sascha Hauer
Provide missing .format_mac for i.MX8MQ to prevent driver from
crashing on start.
Signed-off-by: Andrey Smirnov
---
drivers/nvmem/ocotp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index f3af8620e..c2d2982ee 100644
---
Signed-off-by: Andrey Smirnov
---
scripts/imx/imx-image.c | 42 -
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index bc1f821bd..4a08581fb 100644
--- a/scripts/imx/imx-image.c
+++
Signed-off-by: Andrey Smirnov
---
include/clock.h| 14 +
include/linux/iopoll.h | 69 ++
2 files changed, 83 insertions(+)
create mode 100644 include/linux/iopoll.h
diff --git a/include/clock.h b/include/clock.h
index 5f2f53ab6..58d84b912
Signed-off-by: Andrey Smirnov
---
arch/arm/cpu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
index d889e9afb..2359c56b3 100644
--- a/arch/arm/cpu/Kconfig
+++ b/arch/arm/cpu/Kconfig
@@ -12,6 +12,7 @@ config CPU_32
config CPU_64
Everyone:
Picking up where Sascha left off, this is the next version of the
patchset that adds support for i.MX8MQ EVK board.
This patchest is also availible at:
https://github.com/ndreys/barebox/tree/imx8m-support-v6
Changes since [v6]:
- Patchset rebased on latest master, so it is now
Add DDRC PHY support code needed to upload DDR training firwmare as
well as to wait for the training process to complete.
Those are needed to support board specific DDR initialization code.
Signed-off-by: Andrey Smirnov
---
arch/arm/mach-imx/Makefile | 1 +
On Thu, Jun 07, 2018 at 09:55:50PM +0200, Oleksij Rempel wrote:
> From: Oleksij Rempel
>
> this partition contains calibration data for WiFi and
> some board specific data, like MAC address.
>
> For now we care only about MAC.
>
> Signed-off-by: Oleksij Rempel
> ---
Applied, thanks
Sascha
59 matches
Mail list logo