From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 22 Mar 2017 07:05:47 -0600 Subject: [U-Boot] Why is ns16550 guarded by !OF_PLATDATA ? In-Reply-To: <901f1d0a-604e-ec8a-a3ad-c06fb9901dfc@adaptrum.com> References: <901f1d0a-604e-ec8a-a3ad-c06fb9901dfc@adaptrum.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 16 March 2017 at 15:00, Alexandru Gagniuc wrote: > I'm trying to use the ns16550 DM driver in a platform where havind a dtb in > SPL is not plausible, so we're using platdata. > > Now for ns16550 The U_BOOT_DRIVER is guarded by !OF_PLATDATA, so the driver > is not compiled in SPL. This seems inconsistent with other U_BOOT_DRIVERs. > This was introduced in the following commit [1]: > > * b2927fb dm: serial: ns16550: Update to support of-platdata > > The reasoning was that the platdata structure is unknown, but one would have > to provide a 'struct ns16550_platdata' when using platdata, and that is the > case with the boards that use this driver with platdata. > > Is this a misguided change, or am I missing something deeper? I can prepare > a patch to resolve this, if this is the consensus. You could take it out of the #ifdef, but be careful not to call and fdt functions when OF_PLATDATA is defined. You'll have to drop the of_match and compatible strings too. > > Alex > > [1] https://lists.denx.de/pipermail/u-boot/2016-July/259744.html Regards, Simon