x86: apl: Adjust how the UART gets its platform data
authorSimon Glass <sjg@chromium.org>
Sat, 19 Dec 2020 17:40:05 +0000 (10:40 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:41 +0000 (12:24 -0700)
commit21303d1de7cabe1e2d4ebfe82425ca816a1394a6
tree3dc8118769ec6ce8f14fbaa22fdd6c22fed6f512
parent6a2350f8c9d60f318b3ffff3231b4ca891957da4
x86: apl: Adjust how the UART gets its platform data

At present this driver calls malloc() to start a new platform data
structure, fills it in and tells driver model to use it.

We want to avoid malloc, particularly with the new version of of-platdata.
Create a new struct which encompasses both the dtd struct and the ns16550
one, to avoid this. Unfortunately we must copy the data into the right
place for the ns16550 driver. Add some comments about this.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/apollolake/uart.c
arch/x86/include/asm/arch-apollolake/uart.h