Skip to content

platform: refactor: move clock, interrupt and timer to drivers - #285

Merged
lgirdwood merged 6 commits into
thesofproject:masterfrom
jajanusz:drivers-refactor
Aug 31, 2018
Merged

lgirdwood merged 6 commits into
thesofproject:masterfrom
jajanusz:drivers-refactor

Conversation

@jajanusz

Copy link
Copy Markdown
Contributor

As in: #233
Next branch was deleted and I couldn't reopen old PR.

Split in commit, so you can easily see steps done in this refactor.
Had to be done in one pull request because separate commits will cause a lot more chaos for others while merging/rebasing.

Next we will have to deduplicate code in mentioned functions.
From now on all shared code should go to intel/cavs folders and all platform specific code will go to folder for that platform (so we will be able to get rid of ifdefs).

Signed-off-by: Janusz Jankowski janusz.jankowski@linux.intel.com

@jajanusz
jajanusz requested a review from mmaka1 August 30, 2018 18:56
@lgirdwood

Copy link
Copy Markdown
Member

@jajanusz will this PR break bisect ?

@jajanusz

Copy link
Copy Markdown
Contributor Author

It's just moving/renaming/deduplicating, no stricte logic was added.
It's split into many commits and for every each commit it builds and passes unit tests.
So it shouldn't break git bisect, when you'll be looking for bugs introduced by recent merging they should be before these commits.

Please talk to @mmaka1 if you want to delay it anyway and want to ensure stability 1st. We need it not only for just sake of refactor but to make adding new platforms easier (that we want to do in few next days).

@jajanusz

Copy link
Copy Markdown
Contributor Author

I'd be good to have #283 merged before this one, so I can apply fixes for host build (what I couldn't do cos was waiting for host buidl fix), so @singalsu will not have unnecessary work

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure about the drivers_ prefix since we are using platform_ to signify the implementation is platform specific. i.e. you can easily tell that this code needs to be checked if a bug only impacts one platform only.

All the rest is fine though, just one minor comment on a variable declaration.

Comment thread src/drivers/intel/dw-dma.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

len should be declared at the start of the function, to follow misra rules.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok. I don't like it because I have to declare unnecessary variable in function scope just to satisfy checkpatch (80 chars limit), so I wanted to limit scope at least, but if it has to be on top then it will be ;)

Comment thread src/arch/xtensa/smp/include/arch/idc.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the name change ? It's a platform specific interrupt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll revert all drivers_* names changes back to platform_* names. Thanks for review

@jajanusz

jajanusz commented Aug 31, 2018 •

Copy link
Copy Markdown
Contributor Author

@lgirdwood
Updated as requested.
Also about bisect: i think all mv are recorded as renames in git so it shouldn't break bisect because change in file X.c that was moved to some/other/path/X.c is properly tracked in new file

So please merge PR if you have no more requests, because we need it for adding new platforms.
Thanks

Split files into appropriate folders.
Added makefiles to not break build.
Fixed checkpatch errors in dw-dma and baytrail/ssp.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Moved platform_interrupt_* functions from platform.c to interrupt.c
to match CNL&APL. Updated headers for BYT&HSW to have the same functions
declarations as CNL&APL.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
For cnl&apl removed platform_timer_register from public api
and made it static.
For byt&hsw moved platform_timer to platform.h
(just like it is for cnl&apl).

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
+ Indents for 'CHECK: Alignment should match open parenthesis'

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
@lgirdwood

Copy link
Copy Markdown
Member

@jajanusz ok, looks good. We have a small conflict in dmic, can you fix and I'll merge. Thanks !

@jajanusz

Copy link
Copy Markdown
Contributor Author

@lgirdwood
rebased

@lgirdwood
lgirdwood merged commit 35ed394 into thesofproject:master Aug 31, 2018
@jajanusz
jajanusz deleted the drivers-refactor branch August 31, 2018 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants