This repository has been archived on 2025-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
home-assistant-yellow/repos/aimee-os/sys-boot/u-boot/files/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch
Dustin C. Hatch 31d8a98f64 build: Implement CONFIGDIR setting
In effort to support different builds of Aimee OS using the same
scripts, without necessarily having to fork this repository, the build
system now supports a `CONFIGDIR` setting.  When this variable is set,
files defining the target environment, such as the lists of packages to
install, the kernel configuration, the Portage configuration, etc. are
found in the path it specifes.

The reference build, for the Home Assistant Yellow board, is configured
in the `yellow` directory.  To build it, run:

```sh
CONFIGDIR=yellow ./vm-build.sh
```
2023-03-15 21:12:04 -05:00

69 lines
2.2 KiB
Diff

From 921f4b6d8cb3b997dd5c54fd436bb8223046421e Mon Sep 17 00:00:00 2001
Message-Id: <921f4b6d8cb3b997dd5c54fd436bb8223046421e.1668448114.git.stefan@agner.ch>
In-Reply-To: <85fb54b621c1ca79f1ec8634b0597a038338e51d.1668448114.git.stefan@agner.ch>
References: <85fb54b621c1ca79f1ec8634b0597a038338e51d.1668448114.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 14 Apr 2022 12:18:41 +0200
Subject: [PATCH] drivers: bcm283x: allow to spawn any PL011 UART
The current code checks pinmux for the first PL011 only. Raspberry Pi 4
has multiple PL011 UARTs. This code prevents probing of other UARTs in
case the first PL011 UART is not active.
Furthermore, U-Boot supports pinmuxing, hence the pins should be muxed
at this point anyway. Drop the check entirly.
This allows to use other UARTs as stdout paths (e.g. stdout-path =
"serial5:115200n8").
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/serial/serial_bcm283x_pl011.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c
index fcba07f1c5..98628e1ca4 100644
--- a/drivers/serial/serial_bcm283x_pl011.c
+++ b/drivers/serial/serial_bcm283x_pl011.c
@@ -11,37 +11,10 @@
#include <serial.h>
#include "serial_pl01x_internal.h"
-/*
- * Check if this serial device is muxed
- *
- * The serial device will only work properly if it has been muxed to the serial
- * pins by firmware. Check whether that happened here.
- *
- * Return: true if serial device is muxed, false if not
- */
-static bool bcm283x_is_serial_muxed(void)
-{
- int serial_gpio = 15;
- struct udevice *dev;
-
- if (uclass_first_device_err(UCLASS_PINCTRL, &dev))
- return false;
-
- if (pinctrl_get_gpio_mux(dev, 0, serial_gpio) != BCM2835_GPIO_ALT0)
- return false;
-
- return true;
-}
-
static int bcm283x_pl011_serial_probe(struct udevice *dev)
{
- struct pl01x_serial_plat *plat = dev_get_plat(dev);
int ret;
- /* Don't spawn the device if it's not muxed */
- if (!bcm283x_is_serial_muxed())
- return -ENODEV;
-
/*
* Read the ofdata here rather than in an of_to_plat() method
* since we need the soc simple-bus to be probed so that the 'ranges'
--
2.38.1