When booting kernels that have both the upstream and out-of-tree audio
drivers for Tegra present the following errors are observed ...
Error: Driver 'tegra210-ahub' is already registered, aborting...
Error: Driver 'tegra210-amx' is already registered, aborting...
Error: Driver 'tegra186-dspk' is already registered, aborting...
Error: Driver 'tegra210-mvc' is already registered, aborting...
Error: Driver 'tegra210-adx' is already registered, aborting...
Error: Driver 'tegra210-ahub' is already registered, aborting...
Error: Driver 'tegra210_mixer' is already registered, aborting...
Error: Driver 'tegra186-asrc' is already registered, aborting...
Error: Driver 'tegra210-dmic' is already registered, aborting...
Error: Driver 'tegra210-i2s' is already registered, aborting...
Error: Driver 'tegra210-admaif' is already registered, aborting...
The problem is that the upstream Tegra audio drivers are loaded first
and then the kernel attempts to load the out-of-tree variants because
they have a different name. The out-of-tree are installed under the
'updates' directory in the file-system and by dropping the 'oot' suffix
from the driver name, then depmod will not attempt to load both variants
of the audio drivers and prioritise loading the drivers in the 'updates'
directory.
Bug 4590647
Change-Id: I6c6fe1eb84bc9fdfa4a8f4abf1ce3a75f3bfba8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110266
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Enabling the aud_mclk clock during initialization of drivers
was done for T30 chip due to some external dependencies, now
it is not required for latest version of chips and also due
to this aud_mclk is kept always ON. Add check to avoid enabling
aud_mclk clock other than T30
Bug 4373898
Change-Id: If341b1b73051c5572c5551bf6d4659fab7a116d2
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015891
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
Note that the function snd_soc_dai_init_dma_data() has been present
in the Linux kernel since v3.13 and so use this for all kernel versions.
In Linux v6.3, the 'playback_dma_data' and 'capture_dma_data' members of
the snd_soc_dai_driver structure were replaced and so these could no
longer be set directly. However, the arguments to
snd_soc_dai_init_dma_data() have not changed and so can be used for
older kernels and well has the current.
This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.
Bug 4221847
Change-Id: Ibac0c6bab78e93f03981dfe3d1b2025ea19d4c92
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.5, the arguments to the function snd_soc_of_get_dai_name()
were updated and this is causing the Tegra ASoC machine driver build to
fail. Add a new test to the conftest script to check the arguments for
snd_soc_of_get_dai_name() and use the definition generated by the
conftest script accordingly.
Bug 4221847
Change-Id: I32772da12ab59eb09e2f9d8bc66471d859201f8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990531
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.4, the 'params' member of the snd_soc_dai_link was replaced
with the 'c2c_params' member. Add a new test to the conftest script that
checks if the 'c2c_params' structure member is present and use the
definition created by conftest to select which structure member is used.
Bug 4221847
Change-Id: I7ebb4187fd1cd70097bf65409bda3b2a6830a303
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989731
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
It is nice to have downstream DTB working well with upstream kernel
drivers. This gives a flexibile option for users to choose between
out-of-tree and upstream audio drivers by selectively adding either
of these to deny list.
For clock PLLA_OUT0, upstream DT uses 'plla_out0' clock name where
as downstream uses 'pll_a_out0'. So aligning with upstream DT makes
probe to fail. Thus update the clock name in driver to match upstream
DT bindings.
The sound DT supports compatibles to either work with upstream or
downstream machine drivers. Earlier the source 'tegra_codecs.c' was
modified to make it potentially usable for upstream machine driver
as well and thus it has upstream compatible checks. This check is
now replaced with a flag which is known to be set only during
upstream machine driver probe.
Bug 4119612
Change-Id: Icd5d97343029e35a5702ff4dc527881fb9277346
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948525
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Kernel OOT audio support uses different compatibles to pick specific
OOT drivers for audio. This method requires additional compatible
overrides in the DT overlay which is not a very flexible way to pick
driver modules.
It is possible to pick specific driver modules by adding the not
needed ones to the denylist in the configuration files in the
'/etc/modprobe.d/'. This means different compatibles are not
necessary and modules can be filtered based on the name in
configuration files. With this it will be easier to switch between
driver modules and also will reduce the overrides in the overlay.
Thus remove all 'oot' reference from the driver compatibles.
Bug 4119612
Change-Id: I9496a7daf8b9c75c68b83557198a59f7d3903522
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927028
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When building the out-of-tree drivers with virtualization support
disabled, symbols for some of the virtualization functions are not found
...
nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2)
nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2)
nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2)
nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2)
mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
Update the hv-ivc.h header to ensure that these function stubs are
defined when virtualization support is disabled and only build the
hv-ivc driver if virtualization is enabled.
Finally, move populating the ccflags to the top-level Makefile and use
the subdir-ccflags directive to ensure the ccflags are passed to all
sub-directories.
Bug 4159372
Bug 4170085
Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Upstream Linux commit ("3653480c6812 ASoC: soc-dai.h: cleanup
Playback/Capture data for snd_soc_dai") removes the capture_dma_data
and playback_dma_data variables from snd_soc_dai structure and this
breaks building the Tegra210 ADMAIF driver. Fix this by using the
appropriate API for Linux v6.3.
Bug 4014315
Change-Id: I76c8401571130a3d7ebaecacdfc299d59c1eaf8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867123
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The index of the override arrays is related to stream direction.
The variable used to read these array index is not initialized
and is reported by coverity scan. The variable assignment code
is misplaced. Fix this by moving this code to make sure that
the array index read happens after the variable assignment.
CID 10162269
Bug 3952896
Change-Id: I7e8d000860e799a93437d6eb9d1b788cda118c14
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860609
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
- Change the Mixer, AMX, ADX, ASRC, OPE, MVC and SFC dai names
as per upstream.
- Split Mixer, ASRC, OPE, MVC and SFC input and output names to
RX and TX
Note -
As per downstream kernel code there will be routing issue
if DAI names are updated for SFC, MVC and OPE input and
output. Due to that added those modules output DAIs just to keep
similar to upstream kernel. Single DAI is used for input and
output for SFC, MVC and OPE.
Bug 3592105
Bug 3896761
Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I1bcc141627b9123c4c3921c87c279dbd41f757bc
(cherry picked from commit ae0f5a2b7cfc56b5c53f05aca50fb5f32bac7eca)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2835313
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856573
Tested-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Upstream Linux kernel commit 3989ade2d1e7 ("ASoC: soc.h: remove
num_cpus/codecs") removes the 'num_cpus' member from the
'snd_soc_pcm_runtime' structure because this is also available under the
dai_link structure. This breaks building the Tegra ASoC drivers for
Linux v6.1 and so update the Tegra ASoC drivers to align the latest
mainline.
Bug 3772918
Bug 3890034
Change-Id: If436222ec9e9a97acf82d50c5f9ce80e08ca1f1c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819691
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Starting with Linux kernel v5.17, the 'slave_id' member is removed from
the DMA Engine 'dma_slave_config' structure. Building the Tegra Safety
Audio driver against Linux v5.17, v5.18 and v5.19 breaks because this
filed is not defined. There are already comments in the driver to not
used the 'slave_id' field and move to using device-tree to get this
information. For now, fix the build by not using the 'slave_id' field
for Linux v5.17+.
Bug 3820317
Bug 3735757
Change-Id: I2fb8317604b0a797f4e1b22a53994ec0085ea584
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2796900
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
DAI links are getting parsed in a reverse order with Kernel OOT,
where the DAI link nodes are now defined in overlays which gets
applied to the upstream DTB. Due to this PCM and compress devices
get a very large number which makes existing applications fail.
This seems to be expected as the overlay subnodes are merged just
after the parent properties. Each subnode comes just after the
properties. Because of this the later merged subnodes come before
the earlier merged nodes and eventually the DAI link nodes, in
this case, get reversed.
Given above it would be better to not assume DAI link node order.
To fix this use full name of DAI link nodes and identify the DAI
link index from it during parsing in kernel. The DAI link nodes
are named as 'nvidia-audio-card,dai-link@<xxx>', where <xxx>
signifies link index. Parse this info and store it under DAI link
ID. With this the PCM and Compress device IDs do not depend anymore
on the parsing order of DAI links.
Bug 3583581
Change-Id: I3d0e7ed9fb0edfe1f066e12527b44a85c2716df0
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2776061
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Upstream Linux kernel commit 3989ade2d1e7 ("ASoC: soc.h: remove
num_cpus/codecs") removes the 'num_cpus' member from the
'snd_soc_pcm_runtime' structure because this is also available under the
dai_link structure. This breaks building the Tegra ASoC drivers for
Linux v6.1 and so update the Tegra ASoC drivers to align the latest
mainline. Note that this also works for earlier kernel versions and so
no need to check for kernel version.
Bug 3835208
Change-Id: Ib846e937d761b65276ace73f7817ef8bd21c21d8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2795754
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Build errors seen in following contexts with kstable:
- The 'non_legacy_dai_naming' flag is not available in struct
'snd_soc_component_driver' in v6.0. Instead it is replaced
with flag 'legacy_dai_naming' and default value works fine.
To fix build error on kstable exclude the removed flag for
kernel v6.0 onward.
- Signature of snd_soc_card_jack_new() has changed in v5.19
which drops struct 'snd_soc_jack_pins' related members. These
were unused for Tegra and is safe to just update the funcion
call. Fix this by using correct function signature based on
kernel version checks.
With above fixed now, remove workaround from Makefile and enable
Audio OOT driver builds again with kstable.
Bug 3831575
Change-Id: I7b65c89e8140f6e085528fb827d47c3909233db1
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793430
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
PEQ and MBDRC are sub blocks of OPE module. So far, these sub blocks
were not represented by separate device nodes in DT. This has changed
now where PEQ and MBDRC are children of OPE block. For now the driver
structure is maintained as it is and explicitly parse PEQ and MBDRC
nodes to create corresponding regmap interfaces. With this there is
flexibility now to create separate device drivers for PEQ and MBDRC
if necessary in future.
Bug 3583581
Change-Id: I16ceb9b1a30b4ddb1a57fdef28db20c554c58b03
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2783022
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The struct 'snd_dmaengine_dai_dma_data' no more has 'slave_id'
member in newer kernels. This presently causes build failure
in GVS for 'linux-stable'.
Remove access to this member to fix build issue with OOT driver.
Also upstream ADMA driver does not depend on it anymore, so
commit 32de4745e20a ("dmaengine: tegra210-adma: Override ADMA FIFO
size") needs to be backported to avoid related functional issue.
Bug 3583581
Change-Id: Ib865bdc5d2b2ceb9d57511c3618e5fe607acab09
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2776075
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Following drivers are upstreamed (and present in v5.15) but not yet
feature complete:
tegra186_dspk.c
tegra210_admaif.c
tegra210_ahub.c
tegra210_dmic.c
tegra210_i2s.c
To use these drivers, device nodes in DT can use OOT specific
compatibles. Update compatibles in drivers to facilitate this.
Bug 3583581
Change-Id: I1a9e31fc5f1b2d2539f644a413ba0c06c6da2110
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774435
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
All build errors have been now addressed by previous commits in the
series. Now enable OOT drivers build. To do so, update top level
makefile to include drivers path and update the internal makefile
to build individual drivers.
Some of the AHUB drivers are already upstreamed and are part of
v5.15 core kernel. But presently the drivers are copied to provide
full feature set. To differentiate core modules from OOT modules
the *.ko files here use "oot" string.
Bug 3583581
Change-Id: I21d51c542ed4ed7dddf7cf8d8202ebc496049fff
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774434
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
tegra_adma_dump_ch_reg() is implemented by downstream ADMA driver only
which is not upstreamed yet. This causes build error with Kernel OOT
because upstream ADMA driver is used. Disable this call temporarily
until future is decided for this helper.
Bug 3583581
Bug 3798682
Change-Id: Ifb625509fe8354e65f40d4047e4e80ef6a5e287f
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774433
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add config based header inclusion for AHC driver. The ASRC and ARAD
drivers are not POR for L4T releases and also AHC driver is not yet
up with Kernel OOT. For now, ensure ASRC and ARAD functionality
without dependency on AHC driver. Later if there is a requirement
test functionality with AHC module.
Bug 3583581
Change-Id: I5e586886ae91b1dcaa9e3aa945364dc21a23f281
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774432
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This is inspired from following upstream commit:
------------------------------------------------------------------------
commit 189364872fba07291db7f68fe0161f97e5b61bb1
Author: Takashi Iwai <tiwai@suse.de>
Date: Mon Aug 2 09:28:09 2021 +0200
ASoC: tegra: Use managed buffer allocation
As the standard buffer allocation helper supports WC pages now, we can
convert imx-pcm-rpmsg driver to use that. This allows us to remove
lots of superfluous code.
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210802072815.13551-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
------------------------------------------------------------------------
Above is required to avoid build errors related to non existent
callbacks in 'snd_soc_component_driver' structure.
Bug 3583581
Change-Id: Id1a930db0e41a51be35813aed67183974d1eec57
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774431
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
OOT drivers cannot directly access private headers of core kernel.
This is a standard policy adopted by kernel distributors and to
workaround this problem copy headers to OOT path. Update the usage
references as well.
Bug 3583581
Change-Id: I1b99e17c60294a1cb257eb5b80837faa896d3f8d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774429
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Kernel OOT POR is for Tegra234 and later. BW manager code for legacy
chips causes build error with Kernel OOT and Tegra234 uses interconnect
based BW requests. Since Tegra194 (and earlier) support is not needed,
remove the legacy code.
Bug 3583581
Change-Id: I04c6ca0bc58dad4de9daa6ab65b04ee01553724d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774428
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
snd_soc_of_parse_daifmt() is removed from later kernel versions and this
causes complilation error. Use asoc_simple_parse_daifmt() helper to
parse DAI format.
asoc_simple_canonicalize_platform() has a different signature now and
thus update the helper usage accordingly.
Bug 3583581
Change-Id: I9a99fc71849ddf460040f980aea7d4b9f8f80011
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774427
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Make sure to call pm_runtime_enable() before the
of_platform_populate() which will ensure ahub runtime
resume would be called to enable ahub clock before accessing
any ahub modules registers in modules probe. Calling
of_platform_populate() in parent driver probe results in all
of its child device probe to be completed before it exits the
parent probe call.
The issue caught during MVC child device probe tries to access a
register in probe call which depends on the ahub clock that gets
enabled during AHUB RPM resume. But ahub RPM resume not called as
pm_runtime_enable() in ahub parent driver happens after the
of_platform_populate(). This was observed when drivers were built
as part of kernel image.
Bug 3752938
Change-Id: Ifeb4085961d89877f79ff521adb6dfdf4e51907c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2762027
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>