[U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Jul 9 00:50:33 UTC 2018


On Thu, Jul 05, 2018 at 04:12:59PM +0900, AKASHI Takahiro wrote:
> On Wed, Jul 04, 2018 at 02:35:19PM +0300, Tuomas Tynkkynen wrote:
> > Hi Akashi,
> > 
> > Thank you for the DM conversion.
> > 
> > On 07/04/2018 10:36 AM, AKASHI Takahiro wrote:
> > <..snip..>
> > >diff --git a/include/dm/platform_data/rtc_pl031.h b/include/dm/platform_data/rtc_pl031.h
> > >new file mode 100644
> > >index 0000000000..8e4ba1ce69
> > >--- /dev/null
> > >+++ b/include/dm/platform_data/rtc_pl031.h
> > >@@ -0,0 +1,12 @@
> > >+/* SPDX-License-Identifier: GPL-2.0+ */
> > >+
> > >+#ifndef __rtc_pl031_h
> > >+#define __rtc_pl031_h
> > >+
> > >+#include <asm/types.h>
> > >+
> > >+struct pl031_rtc_platdata {
> > >+	phys_addr_t base;
> > >+};
> > >+
> > >+#endif
> > >
> > 
> > I think this file won't be necessary, the structure can stay private to pl031.c.
> > PL031 is an ARM IP block and U-Boot on ARM uses the device tree to locate devices.
> 
> I think that you are suggesting we would use udevice.priv instead of
> udevice.platdata, right? That will be fine with device-tree based devices.
> But don't we have to take care of no-device-tree (probably legacy)
> devices here?

Does anybody have a comment on this?
I will be able to go either with priv or platdata once agreed.

> Thanks,
> -Takhairo AKASHI


More information about the U-Boot mailing list