On 11/19/2013 05:47 AM, Hanjun Guo wrote:
On 2013-11-18 21:09, Hanjun Guo wrote:
On 16 November 2013 07:51, Al Stone <al.stone@linaro.org mailto:al.stone@linaro.org> wrote:
On 11/15/2013 03:04 AM, Hanjun Guo wrote:
[...]
I have no objection to this patch but I am curious: why is it that the ACPI code seems so much larger? I understand there's some more code needed to replace arch_timer_detect_rate() and it looks like the rest is to replace irq_of_parse_and_map(); do I have that right?
Yes, you are right :)
If that's the case, would it be possible (or even make any sense) to create an irq_parse_and_map() that reads either DT or ACPI in this case? What I'm thinking, I guess, is that what I'd really like to do is minimize the differences between arch_timer_of_init() and arch_timer_acpi_init() somehow such that the only real change in the driver is in how the config info is retrieved (from DT or ACPI) and everything above that stays the same.
This will need some update for GIC converting patch. Ok, I will figure out how to do that.
I was trying to do as you said, but I found that it's too complicated to implement irq_parse_and_map() both for ACPI and DT, so I give up and sent a new version of converting arch timer to ACPI with minor changes :)
Thanks for your guidance.
-Hanjun
No worries. Thanks for trying :).