Message ID | 1409934969-11584-1-git-send-email-nicolas.ferre@atmel.com |
---|---|
State | New |
Headers | show |
On Friday 05 September 2014, Nicolas Ferre wrote: > Arnd, Olof, Kevin, > > This pull-request is focused on the work that Maxime did for migrating our timer > (PIT) to the clocksource sub-system. A big cleanup happened which allows us to > be even closer to the point when we have only the bare minimum in our formerly > crowded mach-at91 directory. > > This pull-request goes on top of the "drivers" one already sent to you on Sept. > 01st. Hmm, I'm not too happy to see more uses of early_platform_*, I was hoping we could kill that off in the long run. This is only used for the legacy board files, not for DT, right? Do you have a timeline for getting rid of the board files completely? Arnd
On Friday 05 September 2014 23:25:11 Arnd Bergmann wrote: > On Friday 05 September 2014, Nicolas Ferre wrote: > > Arnd, Olof, Kevin, > > > > This pull-request is focused on the work that Maxime did for migrating our timer > > (PIT) to the clocksource sub-system. A big cleanup happened which allows us to > > be even closer to the point when we have only the bare minimum in our formerly > > crowded mach-at91 directory. > > > > This pull-request goes on top of the "drivers" one already sent to you on Sept. > > 01st. > > Hmm, I'm not too happy to see more uses of early_platform_*, I was hoping > we could kill that off in the long run. This is only used for the legacy > board files, not for DT, right? > > Do you have a timeline for getting rid of the board files completely? > I've looked more closely, and I think a good way to solve this would be to revert or remove "ARM: at91: PIT: Convert to an early_platform_device", and add declarations for the two global functions to include/clocksource/at91.h and passing the interrupt number as an argument to at91sam926x_pit_init. I understand it's not the goal you had in mind here, but it's far simpler and it gives me hope that we can eventually kill that early platform code. Arnd
Hi Arnd, On Fri, Sep 05, 2014 at 11:25:11PM +0200, Arnd Bergmann wrote: > On Friday 05 September 2014, Nicolas Ferre wrote: > > Arnd, Olof, Kevin, > > > > This pull-request is focused on the work that Maxime did for migrating our timer > > (PIT) to the clocksource sub-system. A big cleanup happened which allows us to > > be even closer to the point when we have only the bare minimum in our formerly > > crowded mach-at91 directory. > > > > This pull-request goes on top of the "drivers" one already sent to you on Sept. > > 01st. > > Hmm, I'm not too happy to see more uses of early_platform_*, I was hoping > we could kill that off in the long run. This is only used for the legacy > board files, not for DT, right? Yes, the DT uses the usual CLOCKSOURCE_OF_DECLARE mechanism. I wasn't aware that early_platform drivers were in the killzone, but I'm definitely aware that global custom exported functions are, hence why I went this way. > Do you have a timeline for getting rid of the board files completely? I don't, but it would be great if we could kill these in the next couple releases. Maxime
On Monday 08 September 2014 11:26:42 Maxime Ripard wrote: > On Fri, Sep 05, 2014 at 11:25:11PM +0200, Arnd Bergmann wrote: > > On Friday 05 September 2014, Nicolas Ferre wrote: > > > Arnd, Olof, Kevin, > > > > > > This pull-request is focused on the work that Maxime did for migrating our timer > > > (PIT) to the clocksource sub-system. A big cleanup happened which allows us to > > > be even closer to the point when we have only the bare minimum in our formerly > > > crowded mach-at91 directory. > > > > > > This pull-request goes on top of the "drivers" one already sent to you on Sept. > > > 01st. > > > > Hmm, I'm not too happy to see more uses of early_platform_*, I was hoping > > we could kill that off in the long run. This is only used for the legacy > > board files, not for DT, right? > > Yes, the DT uses the usual CLOCKSOURCE_OF_DECLARE mechanism. > > I wasn't aware that early_platform drivers were in the killzone, but > I'm definitely aware that global custom exported functions are, hence > why I went this way. I don't think it has been discussed much on the mailing list or IRC. The early platform devices have not been used much outside of arch/sh and arch/arm/mach-shmobile, and those only use it for clocksource and serial. Now we have a new method for both of these, at least with DT, so my impression is that we won't need the early_platform support in the future. One of the problems with the current interface is that it requires statically declaring platform_device structures, which is something that has been on Greg's list of device model antipatterns for a long time. > > Do you have a timeline for getting rid of the board files completely? > > I don't, but it would be great if we could kill these in the next > couple releases. Ok, good. Arnd
On Mon, Sep 08, 2014 at 11:52:35AM +0200, Arnd Bergmann wrote: > On Monday 08 September 2014 11:26:42 Maxime Ripard wrote: > > On Fri, Sep 05, 2014 at 11:25:11PM +0200, Arnd Bergmann wrote: > > > On Friday 05 September 2014, Nicolas Ferre wrote: > > > > Arnd, Olof, Kevin, > > > > > > > > This pull-request is focused on the work that Maxime did for migrating our timer > > > > (PIT) to the clocksource sub-system. A big cleanup happened which allows us to > > > > be even closer to the point when we have only the bare minimum in our formerly > > > > crowded mach-at91 directory. > > > > > > > > This pull-request goes on top of the "drivers" one already sent to you on Sept. > > > > 01st. > > > > > > Hmm, I'm not too happy to see more uses of early_platform_*, I was hoping > > > we could kill that off in the long run. This is only used for the legacy > > > board files, not for DT, right? > > > > Yes, the DT uses the usual CLOCKSOURCE_OF_DECLARE mechanism. > > > > I wasn't aware that early_platform drivers were in the killzone, but > > I'm definitely aware that global custom exported functions are, hence > > why I went this way. > > I don't think it has been discussed much on the mailing list or IRC. > The early platform devices have not been used much outside of arch/sh > and arch/arm/mach-shmobile, and those only use it for clocksource and > serial. That's what I found, yes. > Now we have a new method for both of these, at least with DT, so > my impression is that we won't need the early_platform support in > the future. I agree with that. I only see the early platform stuff as a temporary measure for board files, before they're removed. > One of the problems with the current interface is that it requires > statically declaring platform_device structures, which is something > that has been on Greg's list of device model antipatterns for a long > time. I didn't find any difference with how you declare platform_devices compared to the old-usual way in board files, or was it something on the list too ? :) Maxime
On Tuesday 09 September 2014 11:15:20 Maxime Ripard wrote: > > > One of the problems with the current interface is that it requires > > statically declaring platform_device structures, which is something > > that has been on Greg's list of device model antipatterns for a long > > time. > > I didn't find any difference with how you declare platform_devices > compared to the old-usual way in board files, or was it something on > the list too ? Yes. We never really bothered with cleaning up the existing static platform_device instances, because the plan is to move away from board files to DT anyway, but in short, if you ever need to add a platform device to a legacy board file, do it like pdev = platform_device_alloc(...); platform_device_register(dev); or platform_device_register_simple(...); or static const struct platform_device_info info __initconst = { ... }; platform_device_register_full(&info); but not static struct platform_device pdev = { ... }; platform_device_register(&pdev); Unfortunately, the early platform_device only allows the last type. Arnd