Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b80ec7c0 authored by Stefan Wahren's avatar Stefan Wahren
Browse files

firmware: raspberrypi: notify VC4 firmware of a reboot



The firmware-owned GPIO expander on RPi 3 B+ must be in same state
after a reboot as initial power on. Otherwise this would cause a
network boot failure of the BOOTROM. So inform the VC4 firmware to restore
the expander before doing a reboot.

Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Tested-by: default avatarPhil Elwell <phil@raspberrypi.org>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
parent c6275e4b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -238,6 +238,16 @@ static int rpi_firmware_probe(struct platform_device *pdev)
	return 0;
}

static void rpi_firmware_shutdown(struct platform_device *pdev)
{
	struct rpi_firmware *fw = platform_get_drvdata(pdev);

	if (!fw)
		return;

	rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_REBOOT, NULL, 0);
}

static int rpi_firmware_remove(struct platform_device *pdev)
{
	struct rpi_firmware *fw = platform_get_drvdata(pdev);
@@ -278,6 +288,7 @@ static struct platform_driver rpi_firmware_driver = {
		.of_match_table = rpi_firmware_of_match,
	},
	.probe		= rpi_firmware_probe,
	.shutdown	= rpi_firmware_shutdown,
	.remove		= rpi_firmware_remove,
};
module_platform_driver(rpi_firmware_driver);