Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pi: add skip-init flag to disable-bt overlay #3731

Closed
wants to merge 1 commit into from

Conversation

fwjavox
Copy link

@fwjavox fwjavox commented Jul 17, 2020

If this flag is not set, u-boot will fail while trying to (re)init the
uart devices when the disable-bt overlay is used.

Signed-off-by: Florian Wickert [email protected]

If this flag is not set, u-boot will fail while trying to (re)init the
uart devices when the disable-bt overlay is used.

Signed-off-by: Florian Wickert <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Jul 17, 2020

I'm not against this PR in principle, but it needs more explanation of how U-boot fails and why this is the right solution. In particular, I have a few questions:

  1. Why is the skip-init flag needed for a disabled UART?
  2. Using dtoverlay=disable-bt on a Bluetooth-equipped Pi should leave the UARTs in the same state as they would be on a non-Bluetooth Pi, so why haven't we been asked to add skip-init before?

@fwjavox
Copy link
Author

fwjavox commented Jul 17, 2020

The skip-init Flag is evaluated by u-boot and helps to prevent double initialization of the hardware.

  1. uart0 is the more important part because uart0 is enabled by default. But the line dtparam=uart1=on in config.txt is enough to trigger the same problem for uart1.
  2. This bug only applies to RPi4 because u-boot treats it very differently. There is no u-boot specific device-tree for the RPi4 anymore (while RPi<=3 do have them), so it reads the already existing device-tree from memory. Before this, u-boot did not care about config.txt and the overlays at all.

@pelwell
Copy link
Contributor

pelwell commented Jul 17, 2020

Is there any situation where you would want U-boot to initialise either of the UARTs? If not, it would be cleaner to patch the Pi 4 dtb.

@fwjavox
Copy link
Author

fwjavox commented Jul 17, 2020

For the older RPIs a similar fix was applied to the u-boot internal device-tree: https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

@fwjavox
Copy link
Author

fwjavox commented Jul 17, 2020

Is there any situation where you would want U-boot to initialise either of the UARTs? If not, it would be cleaner to patch the Pi 4 dtb.

Good question, I cannot think of any reason.

pelwell added a commit to pelwell/linux that referenced this pull request Jul 17, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: raspberrypi#3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Jul 17, 2020

See #3733 - it would be great if you could test it to confirm it has the desired effect.

pelwell added a commit that referenced this pull request Jul 28, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Jul 28, 2020

#3733 is now merged.

@fwjavox fwjavox closed this Jul 28, 2020
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jul 29, 2020
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jul 29, 2020
pelwell added a commit that referenced this pull request Aug 12, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Aug 12, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit that referenced this pull request Aug 18, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Aug 19, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Aug 19, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Sep 1, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Sep 1, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Sep 11, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
paul-1 pushed a commit to piCorePlayer/linux that referenced this pull request Sep 13, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: raspberrypi#3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Sep 15, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Sep 28, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Oct 2, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Oct 7, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Oct 16, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Oct 19, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this pull request Nov 4, 2020
U-boot can get stuck trying to initialise UARTs that aren't mapped
to the pin header. There is no reason for U-boot not to rely on the
initialisation by the firmware, so tag both UARTs with the u-boot
magic boolean property "skip-init".

See: #3731
     https://lists.denx.de/pipermail/u-boot/2017-April/285606.html

Signed-off-by: Phil Elwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants