Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/timer/hpet.c: migrate to devicetree #19091

Merged
merged 2 commits into from Sep 17, 2019
Merged

drivers/timer/hpet.c: migrate to devicetree #19091

merged 2 commits into from Sep 17, 2019

Conversation

ghost
Copy link

@ghost ghost commented Sep 11, 2019

This driver was still using CONFIG_* values to determine its address,
IRQ, etc. Add a binding for an "intel,hpet" device and migrate this
driver to devicetree.

Fixes: #18657

Signed-off-by: Charles E. Youse charles.youse@intel.com

This driver was still using CONFIG_* values to determine its address,
IRQ, etc. Add a binding for an "intel,hpet" device and migrate this
driver to devicetree.

Fixes: #18657

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
@zephyrbot zephyrbot added area: Devicetree area: Timer Timer area: Boards area: Tests Issues related to a particular existing or missing test area: Kernel labels Sep 11, 2019
@ghost
Copy link
Author

ghost commented Sep 12, 2019

Whoops. I guess I need to make x86_64 work with devicetree.

x86_64 doesn't use devicetree, so put some hand-coded definitions
into arch.h to allow it to use the DT-enabled HPET driver.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
@ghost ghost requested review from carlescufi and MaureenHelm as code owners September 12, 2019 14:16
Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uugh, I'd prefer we don't hack in DT_ defines. Can you just ifdef the driver or something?

@galak
Copy link
Collaborator

galak commented Sep 12, 2019

Uugh, I'd prefer we don't hack in DT_ defines. Can you just ifdef the driver or something?

or even better add dts support for x86_64. Should be pretty trivial to get a simple dts going.

@ghost
Copy link
Author

ghost commented Sep 12, 2019

Uugh, I'd prefer we don't hack in DT_ defines. Can you just ifdef the driver or something?
or even better add dts support for x86_64. Should be pretty trivial to get a simple dts going.

Which do you prefer? I was trying to AVOID doing it "properly" because x86_64 is being retired.

@galak
Copy link
Collaborator

galak commented Sep 12, 2019

Which do you prefer? I was trying to AVOID doing it "properly" because x86_64 is being retired.

If x86_64 is being retired, than I'd say ifdef the driver for now. Will the new intel64 use DTS?

@zephyrbot zephyrbot added the area: API Changes to public APIs label Sep 12, 2019
@ghost
Copy link
Author

ghost commented Sep 12, 2019

If x86_64 is being retired, than I'd say ifdef the driver for now.

How is this a better solution than the current one? Why pollute global code when I can merely put the fix in the area affected?

Will the new intel64 use DTS?

Yes. It already does.

@ghost
Copy link
Author

ghost commented Sep 17, 2019

@galak Do you want to +1 this or should I shelve this until x86_64 is retired?

@galak
Copy link
Collaborator

galak commented Sep 17, 2019

@galak Do you want to +1 this or should I shelve this until x86_64 is retired?

when is x86_64 going away?

@ghost
Copy link
Author

ghost commented Sep 17, 2019

when is x86_64 going away?

I believe the plan is to pull it once SMP and memory protection are implemented in the Intel64 subarch stuff in x86, so I would think before the 2.1 release.

@nashif nashif merged commit 03bf8ab into zephyrproject-rtos:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Boards area: Devicetree area: Kernel area: Tests Issues related to a particular existing or missing test area: Timer Timer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

drivers/timer/hpet.c should use devicetree, not CONFIG_* for MMIO/IRQ data
6 participants