# Pastebin m5QuJgkG diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 302c42ba77e4..0f040087c8c8 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2950,9 +2950,22 @@ static int __init s3c2410_early_console_setup(struct earlycon_device *device, OF_EARLYCON_DECLARE(s3c2410, "samsung,s3c2410-uart", s3c2410_early_console_setup); -/* Apple SoCs are close enough to s3c2410 for earlycon */ + +/* Apple SoCs need special page table attributes */ +static int __init apple_s5l_early_console_setup(struct earlycon_device *device, + const char *opt) +{ + device->port.private_data = &s3c2410_early_console_data; +#ifdef CONFIG_ARM64 + /* override the existing fixmap entry as nGnRnE */ + __set_fixmap(FIX_EARLYCON_MEM_BASE, device->mapbase, + __pgprot(PROT_DEVICE_nGnRnE)); +#endif + return samsung_early_console_setup(device, opt); +} + OF_EARLYCON_DECLARE(s5l, "apple,s5l-uart", - s3c2410_early_console_setup); + apple_s5l_early_console_setup); /* S3C2412, S3C2440, S3C64xx */ static struct samsung_early_console_data s3c2440_early_console_data = {