Rework the codebase to avoid unnecessary differences with upstream
Port 0e445ebb13 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
0e445ebb13