From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>, "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
Priyanka Jain <priyanka.jain@nxp.com>,
Qiang Zhao <qiang.zhao@nxp.com>,
Shengzhou Liu <Shengzhou.Liu@nxp.com>,
Sinan Akman <sinan@writeme.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH v3] board: freescale: p1_p2_rdb_pc: Fix parsing inverted bits from boot input data
Date: Fri, 8 Jul 2022 19:10:26 -0400 [thread overview]
Message-ID: <20220708231026.GZ1146598@bill-the-cat> (raw)
In-Reply-To: <20220708224927.3hoh764atqijpngd@pali>
[-- Attachment #1: Type: text/plain, Size: 3168 bytes --]
On Sat, Jul 09, 2022 at 12:49:27AM +0200, Pali Rohár wrote:
> PING?
>
> How many times you would ask me to again rebase this patch??
>
> On Sunday 03 July 2022 14:39:13 Pali Rohár wrote:
> > On Thursday 23 June 2022 15:04:08 Pali Rohár wrote:
> > > On Thursday 16 June 2022 14:37:07 Pali Rohár wrote:
> > > > On some boards upper 4 bits of i2c boot input data (register 0) are
> > > > inverted. Information which bits are inverted is stored in register 2.
> > > >
> > > > So invert read input data back according to register 2 prior processing
> > > > them. This fixes printing "rom_loc: value" line during booting.
> > > >
> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > > ---
> > > > Changes in v3:
> > > > * Rebased on top of the U-Boot next branch, commit a87a6fcd20c0e29fe55bfbb6917c4aa1f1bbce74
> > >
> > > PING?
> >
> > PING?
> >
> > > > Changes in v2:
> > > > * Use register 2 for detecting which bits needs to be inverted
> > > > ---
> > > > board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 6 ++++--
> > > > 1 file changed, 4 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
> > > > index 6665aa4ba94e..d36306f35427 100644
> > > > --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
> > > > +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
> > > > @@ -174,7 +174,7 @@ int checkboard(void)
> > > > {
> > > > struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
> > > > ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
> > > > - u8 in, out, io_config, val;
> > > > + u8 in, out, invert, io_config, val;
> > > > int bus_num = CONFIG_SYS_SPD_BUS_NUM;
> > > >
> > > > /* FIXME: This should just use the model from the device tree or similar */
> > > > @@ -198,6 +198,7 @@ int checkboard(void)
> > > >
> > > > if (dm_i2c_read(dev, 0, &in, 1) < 0 ||
> > > > dm_i2c_read(dev, 1, &out, 1) < 0 ||
> > > > + dm_i2c_read(dev, 2, &invert, 1) < 0 ||
> > > > dm_i2c_read(dev, 3, &io_config, 1) < 0) {
> > > > printf("Error reading i2c boot information!\n");
> > > > return 0; /* Don't want to hang() on this error */
> > > > @@ -207,13 +208,14 @@ int checkboard(void)
> > > >
> > > > if (i2c_read(CONFIG_SYS_I2C_PCA9557_ADDR, 0, 1, &in, 1) < 0 ||
> > > > i2c_read(CONFIG_SYS_I2C_PCA9557_ADDR, 1, 1, &out, 1) < 0 ||
> > > > + i2c_read(CONFIG_SYS_I2C_PCA9557_ADDR, 2, 1, &invert, 1) < 0 ||
> > > > i2c_read(CONFIG_SYS_I2C_PCA9557_ADDR, 3, 1, &io_config, 1) < 0) {
> > > > printf("Error reading i2c boot information!\n");
> > > > return 0; /* Don't want to hang() on this error */
> > > > }
> > > > #endif
> > > >
> > > > - val = (in & io_config) | (out & (~io_config));
> > > > + val = ((in ^ invert) & io_config) | (out & (~io_config));
> > > >
> > > > puts("rom_loc: ");
> > > > if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
Peng, this patch doesn't apply currently but also looks fairly obvious
to adapt to top of tree. Please just make it apply when you pick this
up, thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-07-08 23:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 10:16 [PATCH 00/11] board: freescale: p1_p2_rdb_pc: Various cleanups and fixes Pali Rohár
2022-04-07 10:16 ` [PATCH 01/11] board: freescale: p1_p2_rdb_pc: Do not hang in checkboard() Pali Rohár
2022-04-07 10:16 ` [PATCH 02/11] board: freescale: p1_p2_rdb_pc: Detect both P2020 SD switch configurations Pali Rohár
2022-04-07 10:16 ` [PATCH 03/11] board: freescale: p1_p2_rdb_pc: Fix parsing negated upper 4 bits from boot input data Pali Rohár
2022-04-25 14:12 ` [PATCH v2] board: freescale: p1_p2_rdb_pc: Fix parsing inverted " Pali Rohár
2022-06-16 9:00 ` Peng Fan (OSS)
2022-06-16 12:37 ` [PATCH v3] " Pali Rohár
2022-06-23 13:04 ` Pali Rohár
2022-07-03 12:39 ` Pali Rohár
2022-07-08 22:49 ` Pali Rohár
2022-07-08 23:10 ` Tom Rini [this message]
2022-07-23 9:48 ` Pali Rohár
2022-04-07 10:16 ` [PATCH 04/11] board: freescale: p1_p2_rdb_pc: Do not set MPC85xx_PMUXCR_SDHC_WP bit when SDHC_WP is used as GPIO Pali Rohár
2022-04-07 10:16 ` [PATCH 05/11] board: freescale: p1_p2_rdb_pc: Fix page attributes for second 1G SDRAM map Pali Rohár
2022-04-07 10:16 ` [PATCH 06/11] board: freescale: p1_p2_rdb_pc: Move ifdef for USB/eLBC check to correct place Pali Rohár
2022-04-07 10:16 ` [PATCH 07/11] board: freescale: p1_p2_rdb_pc: Fix env $vscfw_addr Pali Rohár
2022-04-07 10:16 ` [PATCH 08/11] board: freescale: p1_p2_rdb_pc: Use named macros for i2c bus num and address Pali Rohár
2022-04-07 10:16 ` [PATCH 09/11] board: freescale: p1_p2_rdb_pc: Define SW macros for lower and upper NOR banks Pali Rohár
2022-04-07 10:16 ` [PATCH 10/11] board: freescale: p1_p2_rdb_pc: Move BootROM change source macros to p1_p2_bootrom.h Pali Rohár
2022-04-25 14:48 ` [PATCH v2] board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h Pali Rohár
2022-05-26 6:08 ` Priyanka Jain (OSS)
2022-05-26 8:32 ` Pali Rohár
2022-05-26 8:52 ` [PATCH v3] " Pali Rohár
2022-06-02 22:02 ` Pali Rohár
2022-04-07 10:16 ` [PATCH 11/11] board: freescale: p1_p2_rdb_pc: Add env commands norlowerboot, norupperboot, sd2boot and defboot Pali Rohár
2022-04-25 14:50 ` [PATCH v2] " Pali Rohár
2022-06-16 9:01 ` Peng Fan (OSS)
2022-06-23 13:43 ` Pali Rohár
2022-07-03 12:38 ` Pali Rohár
[not found] ` <20220708224344.jswbjxp3tdnfnmlp@pali>
2022-07-08 23:12 ` Tom Rini
2022-07-21 22:20 ` Pali Rohár
2022-08-01 13:01 ` Pali Rohár
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=20220708231026.GZ1146598@bill-the-cat \
--to=trini@konsulko.com \
--cc=Shengzhou.Liu@nxp.com \
--cc=pali@kernel.org \
--cc=peng.fan@oss.nxp.com \
--cc=priyanka.jain@nxp.com \
--cc=qiang.zhao@nxp.com \
--cc=sinan@writeme.com \
--cc=u-boot@lists.denx.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