Skip to contentSkip to conversation

U-Boot v2015.10-rc4 released

U-Boot Tom Rini 7 participants 23 messages Sep 28, 2015 – Oct 1, 2015

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

Hey all,

I've pushed v2015.10-rc4 out to the repository and tarballs should exist soon.

We're coming up on the release date and I think things are in reasonable shape overall. Please speak up if there's some fixes I'm still overlooking, I thought I grabbed them all by now but I may have still missed something.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150928/283668fd/attachment.sig>
#1 lore raw

Dear Tom,

Quoted 3 lines · In message <20150928210901.GH22966@bill-the-cat> you wrote:

I've pushed v2015.10-rc4 out to the repository and tarballs should exist soon.

Tarballs are both on the FTP server [1] and the ACD [2].

[1] ftp://ftp.denx.de/pub/u-boot/
[2] https://www.amazon.com/clouddrive/share/9JvNre5ZS9KVI3kRyTjEQNYO5x9R5ai-CRXFuHdnWgs?ref_=cd_share_link_copy

Quoted 4 lines

We're coming up on the release date and I think things are in reasonable shape overall. Please speak up if there's some fixes I'm still overlooking, I thought I grabbed them all by now but I may have still missed something.

Thanks a lot!

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Yes, it's a technical challenge, and  you  have  to  kind  of  admire
people  who go to the lengths of actually implementing it, but at the
same time you wonder about their IQ...
         --  Linus Torvalds in <[email protected]>
#2 lore raw
In reply to Tom Rini

Hi Tom,

Quoted 10 lines

Hey all,

I've pushed v2015.10-rc4 out to the repository and tarballs should exist soon.

We're coming up on the release date and I think things are in reasonable shape overall. Please speak up if there's some fixes I'm still overlooking, I thought I grabbed them all by now but I may have still missed something.

I've found more issues with Exynos4 (Trats) regarding changes done in the following commit:

"fdt: add new fdt address parsing functions"
SHA1: 02464e386bb5f0a022c121f95ae75cf583759d95

I'm strive to fix this issue ASAP.

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#3 lore raw
In reply to Tom Rini
Quoted 9 lines · Tom Rini

Hey all,

I've pushed v2015.10-rc4 out to the repository and tarballs should exist soon.

We're coming up on the release date and I think things are in reasonable shape overall. Please speak up if there's some fixes I'm still overlooking, I thought I grabbed them all by now but I may have still missed something.

On ls1021atwr board (LS1021E, Version: 1.0, (0x87081110) with
ls1021atwr_sdcard_defconfig reset hangs on my board :

=> ver

U-Boot 2015.10-rc4 (Sep 30 2015 - 12:29:15 -0400)

arm-linux-gnueabi-gcc (GCC) 4.8.1

GNU ld (GNU Binutils) 2.23.2

=> reset

resetting ...

Is anyone else seeing this ?

Regards
Sinan Akman

#4 lore raw
Quoted 24 lines · Sinan Akman
Quoted 9 lines · Tom Rini

Hey all,

I've pushed v2015.10-rc4 out to the repository and tarballs should exist soon.

We're coming up on the release date and I think things are in reasonable shape overall. Please speak up if there's some fixes I'm still overlooking, I thought I grabbed them all by now but I may have still missed something.

   On ls1021atwr board (LS1021E, Version: 1.0, (0x87081110) with

ls1021atwr_sdcard_defconfig reset hangs on my board :

=> ver

U-Boot 2015.10-rc4 (Sep 30 2015 - 12:29:15 -0400)

arm-linux-gnueabi-gcc (GCC) 4.8.1

Quoted 9 lines

GNU ld (GNU Binutils) 2.23.2

=> reset

resetting ...

Is anyone else seeing this ?

The board maintainer will take a look. Unfortunately she is on holiday vacation. Let me try to find someone else familiar with this board.

York

#5 lore raw

Hi York

Quoted 2 lines

The board maintainer will take a look. Unfortunately she is on holiday vacation. Let me try to find someone else familiar with this board.

No worries, I will also bisect and see what's going on.
Just wanted to make sure I don't work on it if someone is already taking care. I'll take a look at in the coming days.

Regards
Sinan Akman

#6 lore raw
Quoted 11 lines · Sinan Akman

Hi York

Quoted 3 lines

The board maintainer will take a look. Unfortunately she is on holiday vacation.
Let me try to find someone else familiar with this board.

No worries, I will also bisect and see what's going on.
Just wanted to make sure I don't work on it if someone is already taking care. I'll take a look at in the coming days.

FYI,

git revert 623d96e89aca64c2762150087f4e872c55481f13

fixes the reset issue. I don't know yet why. I am cc'ing
to Peng as well.

There are some other i2c warnings with this built,
"The regulator (MC34VR500) does not exist" .. etc. but they are probably unrelated, I will take a look at them later.

Regards
Sinan Akman

reviewer
#7 lore raw

Hi Sinan,

Quoted 18 lines · Sinan Akman
Quoted 9 lines · Sinan Akman

Hi York

Quoted 3 lines

The board maintainer will take a look. Unfortunately she is on holiday vacation.
Let me try to find someone else familiar with this board.

Quoted 4 lines

No worries, I will also bisect and see what's going on.
Just wanted to make sure I don't work on it if someone is already taking care. I'll take a look at in the coming days.

Quoted 6 lines

FYI,

git revert 623d96e89aca64c2762150087f4e872c55481f13

fixes the reset issue. I don't know yet why. I am cc'ing
to Peng as well.

Does this fix the reset issue?

drivers/watchdog/imx_watchdog.c +1 -1
@@ -55,7 +55,7 @@ void reset_cpu(ulong addr)
 {
        struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
 
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       setbits_le16(&wdog->wcr, WCR_WDE);
 
        writew(0x5555, &wdog->wsr);
        writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */
#8 lore raw

Hi Fabio

Quoted 9 lines · Fabio Estevam

Hi Sinan,
[...]

Does this fix the reset issue?

drivers/watchdog/imx_watchdog.c void reset_cpu(ulong addr) · line 61

Quoted 8 lines
drivers/watchdog/imx_watchdog.c +1 -1
@@ -55,7 +55,7 @@ void reset_cpu(ulong addr)
 {
        struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
 
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       setbits_le16(&wdog->wcr, WCR_WDE);
 
        writew(0x5555, &wdog->wsr);
        writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */

Nope, AFAICS it doesn't make any difference.

Regards
Sinan Akman

reviewer
#9 lore raw
Quoted 1 line · Sinan Akman

Nope, AFAICS it doesn't make any difference.

Ok, the issue is due to endianness: on LS1021 the watchdog is big-endian, so that's why we can't use clrsetbits_le16().

Please check:
http://git.freescale.com/git/cgit.cgi/layerscape/ls1021a/linux.git/commit/?id=b53a344d20f6ffdc383d990a9636efb53ce272a9

What about this?

drivers/watchdog/imx_watchdog.c +4 -1
@@ -54,8 +54,11 @@ void hw_watchdog_init(void)
 void reset_cpu(ulong addr)
 {
        struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
+       int reg;
 
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       reg = readw(&wdog->wcr);
+       reg |= WCR_WDE;
+       writew(reg, &wdog->wcr);
 
        writew(0x5555, &wdog->wsr);
        writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */
reviewer
#10 lore raw
Quoted 15 lines · Fabio Estevam
Quoted 1 line · Sinan Akman

Nope, AFAICS it doesn't make any difference.

Ok, the issue is due to endianness: on LS1021 the watchdog is big-endian, so that's why we can't use clrsetbits_le16().

Please check:
http://git.freescale.com/git/cgit.cgi/layerscape/ls1021a/linux.git/commit/?id=b53a344d20f6ffdc383d990a9636efb53ce272a9

What about this?

drivers/watchdog/imx_watchdog.c void hw_watchdog_init(void) · line 57

Quoted 4 lines
drivers/watchdog/imx_watchdog.c +1 -0
@@ -54,8 +54,11 @@ void hw_watchdog_init(void)
 void reset_cpu(ulong addr)
 {
        struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
+       int reg;

ops, this should be u16 instead.

Quoted 8 lines
drivers/watchdog/imx_watchdog.c +3 -1
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       reg = readw(&wdog->wcr);
+       reg |= WCR_WDE;
+       writew(reg, &wdog->wcr);
 
        writew(0x5555, &wdog->wsr);
        writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */
#11 lore raw
Quoted 12 lines · Fabio Estevam
Quoted 11 lines · Fabio Estevam
Quoted 1 line · Sinan Akman

Nope, AFAICS it doesn't make any difference.

Ok, the issue is due to endianness: on LS1021 the watchdog is big-endian, so that's why we can't use clrsetbits_le16().

Please check:
http://git.freescale.com/git/cgit.cgi/layerscape/ls1021a/linux.git/commit/?id=b53a344d20f6ffdc383d990a9636efb53ce272a9

What about this?

Quoted 18 lines

drivers/watchdog/imx_watchdog.c void hw_watchdog_init(void) · line 57

Quoted 7 lines
drivers/watchdog/imx_watchdog.c +1 -0
@@ -54,8 +54,11 @@ void hw_watchdog_init(void)
 void reset_cpu(ulong addr)
 {
        struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
+       int reg;

ops, this should be u16 instead.

Quoted 7 lines
drivers/watchdog/imx_watchdog.c +3 -1
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       reg = readw(&wdog->wcr);
+       reg |= WCR_WDE;
+       writew(reg, &wdog->wcr);
 
        writew(0x5555, &wdog->wsr);
        writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */

OK, this will probably work, as I tried writew earlier and it worked,
I agree it seems an endianness issue, do we not want to address all common accesses in a way that takes endianness into account ?

I'll test the above as well (with u16 reg) to make sure.

Regards
Sinan Akman

reviewer
#12 lore raw
Quoted 3 lines · Sinan Akman

OK, this will probably work, as I tried writew earlier and it worked,
I agree it seems an endianness issue, do we not want to address all common accesses in a way that takes endianness into account ?

Yes, that would be nice. I don't have access to ls1021 hardware, so can't do it myself.

Quoted 1 line

I'll test the above as well (with u16 reg) to make sure.

Ok, great. Please let us know how it goes.

Thanks

#13 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

In reply to Fabio Estevam

Hi Fabio

Quoted 9 lines · Fabio Estevam
Quoted 9 lines

[...]
Ok, the issue is due to endianness: on LS1021 the watchdog is big-endian, so that's why we can't use clrsetbits_le16().

Please check:
http://git.freescale.com/git/cgit.cgi/layerscape/ls1021a/linux.git/commit/?id=b53a344d20f6ffdc383d990a9636efb53ce272a9

What about this?

Quoted 16 lines

drivers/watchdog/imx_watchdog.c void hw_watchdog_init(void) · line 57

Quoted 7 lines
drivers/watchdog/imx_watchdog.c +1 -0
@@ -54,8 +54,11 @@ void hw_watchdog_init(void)
  void reset_cpu(ulong addr)
  {
         struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
+       int reg;

ops, this should be u16 instead.

Quoted 7 lines
drivers/watchdog/imx_watchdog.c +3 -1
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       reg = readw(&wdog->wcr);
+       reg |= WCR_WDE;
+       writew(reg, &wdog->wcr);
 
         writew(0x5555, &wdog->wsr);
         writew(0xaaaa, &wdog->wsr);     /* load minimum 1/2 second timeout */

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Does this make sense to everyone ?

Regards
Sinan Akman

reviewer
#14 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 5 lines · Sinan Akman

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

The imx platforms do not use dts in U-boot yet.

Quoted 20 lines

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Quoted 1 line

Does this make sense to everyone ?

Looks good. 2015.10 release is only a few days away: do you think you could implement your proposal for the upcoming release?

Regards,

Fabio Estevam

author
#15 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 29 lines · Fabio Estevam
Quoted 5 lines · Sinan Akman

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

The imx platforms do not use dts in U-boot yet.

Quoted 20 lines

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Quoted 4 lines
Quoted 1 line

Does this make sense to everyone ?

Looks good. 2015.10 release is only a few days away: do you think you could implement your proposal for the upcoming release?

That seems rather large. Is there something we can revert today so that:
a) All boards in v2015.07 continue to work in v2015.10 as well as before
b) Any new boards are not introduced in a totally broken state?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151001/d26c4ff9/attachment.sig>
#16 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 32 lines · Tom Rini
Quoted 31 lines · Fabio Estevam
Quoted 5 lines · Sinan Akman

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

The imx platforms do not use dts in U-boot yet.

Quoted 21 lines

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Does this make sense to everyone ?

Quoted 7 lines
Quoted 2 lines

Looks good. 2015.10 release is only a few days away: do you think you could implement your proposal for the upcoming release?

That seems rather large. Is there something we can revert today so that:
a) All boards in v2015.07 continue to work in v2015.10 as well as before
b) Any new boards are not introduced in a totally broken state?

Agreed; I prefer to revert the watchdog changes and break ls102x than introduce such big change.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#17 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 30 lines · Otavio Salvador
Quoted 29 lines · Tom Rini
Quoted 28 lines · Fabio Estevam
Quoted 5 lines · Sinan Akman

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

The imx platforms do not use dts in U-boot yet.

Quoted 20 lines

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Does this make sense to everyone ?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Looks good. 2015.10 release is only a few days away: do you think you could implement your proposal for the upcoming release?

That seems rather large. Is there something we can revert today so that:
a) All boards in v2015.07 continue to work in v2015.10 as well as before
b) Any new boards are not introduced in a totally broken state?

Agreed; I prefer to revert the watchdog changes and break ls102x than introduce such big change.

Otavio, please note that the watchdog changes that are committed that
we are referring
to broke ls102x. So if you revert those as you suggest here you would have ls102x working
again but it would break imx6 which the commit was for.

Perhaps what you meant is, let's leave ls1021atwr broken and not
change anything for now.
I think this is something Tom will probably have to decide. I would prefer we don't have anything
known broken before the main release.

Regards
Sinan Akman

reviewer
#18 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 5 lines · Sinan Akman

Otavio, please note that the watchdog changes that are committed that we
are referring
to broke ls102x. So if you revert those as you suggest here you would have ls102x working
again but it would break imx6 which the commit was for.

Just to clarify: reverting 623d96e89aca does not break i.MX.

623d96e89aca has been introduced in v2015.10-rc4. It is safe to revert it.

#19 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 10 lines · Fabio Estevam
Quoted 5 lines · Sinan Akman

Otavio, please note that the watchdog changes that are committed that we
are referring
to broke ls102x. So if you revert those as you suggest here you would have ls102x working
again but it would break imx6 which the commit was for.

Just to clarify: reverting 623d96e89aca does not break i.MX.

623d96e89aca has been introduced in v2015.10-rc4. It is safe to revert it.

OK

Regards
Sinan Akman

#20 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

In reply to Tom Rini
Quoted 28 lines · Tom Rini
Quoted 27 lines · Fabio Estevam
Quoted 5 lines · Sinan Akman

I took a further look at this. I believe this won't work as readw
will now return the data in the wrong endianness. I think Wolfgang also already pointed out at this. We would need to use the macro with correct endianness for different platforms (ls1021atwr would need big endian) and control this based on the watchdog endian setting in dts.

The imx platforms do not use dts in U-boot yet.

Quoted 19 lines

However, there seems to be other problems here. The original
fix was intending to preserve the current set bits in wcr and enable DTE. But in the case of ls1021atwr, the watcdog is not initialized and out of reset we have SRS bit is set. This would disable wdog_rst and prevent reset from working. Before the fix it was actually the accidental setting of SRS to zero made the reset working because a writew(WCR_WDE, &wdog->wcr) would clear that bit, setting WDE alone would not generate wdog_rst.

So I believe a proper fix would have the following steps :
- move watchdog driver to DM so that we can make use of endian type
- use macros with the endian type for accessing the registers
- enable hw_watchdog for the board so that it gets initialized to
a known value
- reset SRS to enable generation of wdog_rst, this will reset immediately
with 0x00 default WT value.
- or program the timeout and enable WDE so the board
resets after a longer timeout value if desired

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Does this make sense to everyone ?

Looks good. 2015.10 release is only a few days away: do you think you could implement your proposal for the upcoming release?

That seems rather large. Is there something we can revert today so that:
a) All boards in v2015.07 continue to work in v2015.10 as well as before
b) Any new boards are not introduced in a totally broken state?

I agree, this is something needs to be done in steps and not in rush. For coming out of rc4 and making sure ls1021atwr reset works, all
we need is to make sure that SRS bit is set and that this bit is written properly with big endian. We could add that specifically for ls1021atw. Still there is something not nice about the current implementation that is kinda assumes hw_watchdog is enabled and _init is called but it doesn't check for this. I will come up with something to have ls1021atwr working and see if it feels clean enough.

Regards
Sinan Akman

reviewer
#21 lore raw

[U-Boot] ls1021atwr reset issue (was [ANN] U-Boot v2015.10-rc4 released)

Quoted 4 lines · Sinan Akman

I agree, this is something needs to be done in steps and not in rush. For coming out of rc4 and making sure ls1021atwr reset works, all
we need is to make sure that SRS bit is set and that this bit is written properly with big endian. We could add that specifically for ls1021atw.

Safest approach would be to revert 623d96e89, right?

#22 lore raw
In reply to Fabio Estevam

Dear Fabio,

Quoted 3 lines · In message <CAOMZO5ATtUjk_TVS94N6evTKndozVRH9nXyE0UHPJ3sCQ906Zg@mail.gmail.com>…

Ok, the issue is due to endianness: on LS1021 the watchdog is big-endian, so that's why we can't use clrsetbits_le16().

...

drivers/watchdog/imx_watchdog.c void hw_watchdog_init(void) · line 61

Quoted 6 lines
drivers/watchdog/imx_watchdog.c +4 -1
+       int reg;
 
-       clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
+       reg = readw(&wdog->wcr);
+       reg |= WCR_WDE;
+       writew(reg, &wdog->wcr);

But this is broken. We have the clrsetbits() [*] macros exactly to avoid such code.

[*] resp. setbits() - using clrsetbits*() with 0 as clear mask is a stupid thing to do anyway.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is wrong always, everywhere and for everyone to  believe  anything
upon  insufficient  evidence.  - W. K. Clifford, British philosopher,
circa 1876