linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
@ 2016-07-08 14:15 Sylwester Nawrocki
  2016-07-08 16:56 ` Michael Turquette
  2016-07-11  8:14 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2016-07-08 14:15 UTC (permalink / raw)
  To: linux-samsung-soc, linux-clk; +Cc: b.zolnierkie, Sylwester Nawrocki

Any clock dependencies can be properly handled with deferred probing
so we can remove core_initcall and switch to a proper loadable platform
driver module.
This change has been tested on Exynos4412 Odroid U3 based board.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/clk/samsung/Kconfig            |  9 +++++++++
 drivers/clk/samsung/Makefile           |  2 +-
 drivers/clk/samsung/clk-exynos-audss.c | 12 +-----------
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig
index 20c5fe9..addc652 100644
--- a/drivers/clk/samsung/Kconfig
+++ b/drivers/clk/samsung/Kconfig
@@ -9,6 +9,15 @@ config EXYNOS_ARM64_COMMON_CLK
 	bool "Samsung Exynos ARMv8-family clock controller support" if COMPILE_TEST
 	depends on COMMON_CLK_SAMSUNG
 
+config EXYNOS_AUDSS_CLK_CON
+	tristate "Samsung Exynos AUDSS clock controller support"
+	depends on COMMON_CLK_SAMSUNG
+	default y if ARCH_EXYNOS
+	help
+	  Support for the Audio Subsystem CLKCON clock controller present
+	  on some Exynos SoC variants. Choose M or Y here if you want to
+	  use audio devices such as I2S, PCM, etc.
+
 # For S3C24XX platforms, select following symbols:
 config S3C2410_COMMON_CLK
 	bool "Samsung S3C2410 clock controller support" if COMPILE_TEST
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index fc367d4..57f4dc6 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_SOC_EXYNOS5410)	+= clk-exynos5410.o
 obj-$(CONFIG_SOC_EXYNOS5420)	+= clk-exynos5420.o
 obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)	+= clk-exynos5433.o
 obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
-obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-audss.o
+obj-$(CONFIG_EXYNOS_AUDSS_CLK_CON) += clk-exynos-audss.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-clkout.o
 obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)	+= clk-exynos7.o
 obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 4e9584d..bdf8b97 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -273,17 +273,7 @@ static struct platform_driver exynos_audss_clk_driver = {
 	.remove = exynos_audss_clk_remove,
 };
 
-static int __init exynos_audss_clk_init(void)
-{
-	return platform_driver_register(&exynos_audss_clk_driver);
-}
-core_initcall(exynos_audss_clk_init);
-
-static void __exit exynos_audss_clk_exit(void)
-{
-	platform_driver_unregister(&exynos_audss_clk_driver);
-}
-module_exit(exynos_audss_clk_exit);
+module_platform_driver(exynos_audss_clk_driver);
 
 MODULE_AUTHOR("Padmavathi Venna <padma.v@samsung.com>");
 MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-08 14:15 [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver Sylwester Nawrocki
@ 2016-07-08 16:56 ` Michael Turquette
  2016-07-13 10:23   ` Sylwester Nawrocki
  2016-07-11  8:14 ` Krzysztof Kozlowski
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Turquette @ 2016-07-08 16:56 UTC (permalink / raw)
  To: Sylwester Nawrocki, linux-samsung-soc, linux-clk
  Cc: b.zolnierkie, Sylwester Nawrocki

Quoting Sylwester Nawrocki (2016-07-08 07:15:00)
> Any clock dependencies can be properly handled with deferred probing
> so we can remove core_initcall and switch to a proper loadable platform
> driver module.
> This change has been tested on Exynos4412 Odroid U3 based board.
> =

> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Looks good to me.

Regards,
Mike

> ---
>  drivers/clk/samsung/Kconfig            |  9 +++++++++
>  drivers/clk/samsung/Makefile           |  2 +-
>  drivers/clk/samsung/clk-exynos-audss.c | 12 +-----------
>  3 files changed, 11 insertions(+), 12 deletions(-)
> =

> diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig
> index 20c5fe9..addc652 100644
> --- a/drivers/clk/samsung/Kconfig
> +++ b/drivers/clk/samsung/Kconfig
> @@ -9,6 +9,15 @@ config EXYNOS_ARM64_COMMON_CLK
>         bool "Samsung Exynos ARMv8-family clock controller support" if CO=
MPILE_TEST
>         depends on COMMON_CLK_SAMSUNG
>  =

> +config EXYNOS_AUDSS_CLK_CON
> +       tristate "Samsung Exynos AUDSS clock controller support"
> +       depends on COMMON_CLK_SAMSUNG
> +       default y if ARCH_EXYNOS
> +       help
> +         Support for the Audio Subsystem CLKCON clock controller present
> +         on some Exynos SoC variants. Choose M or Y here if you want to
> +         use audio devices such as I2S, PCM, etc.
> +
>  # For S3C24XX platforms, select following symbols:
>  config S3C2410_COMMON_CLK
>         bool "Samsung S3C2410 clock controller support" if COMPILE_TEST
> diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
> index fc367d4..57f4dc6 100644
> --- a/drivers/clk/samsung/Makefile
> +++ b/drivers/clk/samsung/Makefile
> @@ -12,7 +12,7 @@ obj-$(CONFIG_SOC_EXYNOS5410)  +=3D clk-exynos5410.o
>  obj-$(CONFIG_SOC_EXYNOS5420)   +=3D clk-exynos5420.o
>  obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  +=3D clk-exynos5433.o
>  obj-$(CONFIG_SOC_EXYNOS5440)   +=3D clk-exynos5440.o
> -obj-$(CONFIG_ARCH_EXYNOS)      +=3D clk-exynos-audss.o
> +obj-$(CONFIG_EXYNOS_AUDSS_CLK_CON) +=3D clk-exynos-audss.o
>  obj-$(CONFIG_ARCH_EXYNOS)      +=3D clk-exynos-clkout.o
>  obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  +=3D clk-exynos7.o
>  obj-$(CONFIG_S3C2410_COMMON_CLK)+=3D clk-s3c2410.o
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung=
/clk-exynos-audss.c
> index 4e9584d..bdf8b97 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -273,17 +273,7 @@ static struct platform_driver exynos_audss_clk_drive=
r =3D {
>         .remove =3D exynos_audss_clk_remove,
>  };
>  =

> -static int __init exynos_audss_clk_init(void)
> -{
> -       return platform_driver_register(&exynos_audss_clk_driver);
> -}
> -core_initcall(exynos_audss_clk_init);
> -
> -static void __exit exynos_audss_clk_exit(void)
> -{
> -       platform_driver_unregister(&exynos_audss_clk_driver);
> -}
> -module_exit(exynos_audss_clk_exit);
> +module_platform_driver(exynos_audss_clk_driver);
>  =

>  MODULE_AUTHOR("Padmavathi Venna <padma.v@samsung.com>");
>  MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");
> -- =

> 1.9.1
> =

> --
> To unsubscribe from this list: send the line "unsubscribe linux-clk" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-08 14:15 [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver Sylwester Nawrocki
  2016-07-08 16:56 ` Michael Turquette
@ 2016-07-11  8:14 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2016-07-11  8:14 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: linux-samsung-soc, linux-clk, Bartłomiej Żołnierkiewicz

On Fri, Jul 8, 2016 at 4:15 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> Any clock dependencies can be properly handled with deferred probing
> so we can remove core_initcall and switch to a proper loadable platform
> driver module.
> This change has been tested on Exynos4412 Odroid U3 based board.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  drivers/clk/samsung/Kconfig            |  9 +++++++++
>  drivers/clk/samsung/Makefile           |  2 +-
>  drivers/clk/samsung/clk-exynos-audss.c | 12 +-----------
>  3 files changed, 11 insertions(+), 12 deletions(-)
>

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-08 16:56 ` Michael Turquette
@ 2016-07-13 10:23   ` Sylwester Nawrocki
  2016-07-13 22:00     ` Michael Turquette
  2016-07-19  9:26     ` Krzysztof Kozłowski
  0 siblings, 2 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2016-07-13 10:23 UTC (permalink / raw)
  To: Michael Turquette; +Cc: linux-samsung-soc, linux-clk, b.zolnierkie

On 07/08/2016 06:56 PM, Michael Turquette wrote:
> Quoting Sylwester Nawrocki (2016-07-08 07:15:00)
>> > Any clock dependencies can be properly handled with deferred probing
>> > so we can remove core_initcall and switch to a proper loadable platform
>> > driver module.
>> > This change has been tested on Exynos4412 Odroid U3 based board.
>> > 
>> > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>
> Looks good to me.

Thanks, I have added this patch to my tree, however at the moment
I have only two patches queued there. Please feel free to apply
this patch directly to clk-next.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-13 10:23   ` Sylwester Nawrocki
@ 2016-07-13 22:00     ` Michael Turquette
  2016-07-19  9:26     ` Krzysztof Kozłowski
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Turquette @ 2016-07-13 22:00 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: linux-samsung-soc, linux-clk, b.zolnierkie

Quoting Sylwester Nawrocki (2016-07-13 03:23:42)
> On 07/08/2016 06:56 PM, Michael Turquette wrote:
> > Quoting Sylwester Nawrocki (2016-07-08 07:15:00)
> >> > Any clock dependencies can be properly handled with deferred probing
> >> > so we can remove core_initcall and switch to a proper loadable platf=
orm
> >> > driver module.
> >> > This change has been tested on Exynos4412 Odroid U3 based board.
> >> > =

> >> > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> >
> > Looks good to me.
> =

> Thanks, I have added this patch to my tree, however at the moment
> I have only two patches queued there. Please feel free to apply
> this patch directly to clk-next.

Applied.

Regards,
Mike

> =

> -- =

> Regards,
> Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-13 10:23   ` Sylwester Nawrocki
  2016-07-13 22:00     ` Michael Turquette
@ 2016-07-19  9:26     ` Krzysztof Kozłowski
  2016-07-19  9:55       ` Sylwester Nawrocki
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozłowski @ 2016-07-19  9:26 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Michael Turquette, linux-samsung-soc, linux-clk,
	Bartłomiej Żołnierkiewicz

On Wed, Jul 13, 2016 at 12:23 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 07/08/2016 06:56 PM, Michael Turquette wrote:
>> Quoting Sylwester Nawrocki (2016-07-08 07:15:00)
>>> > Any clock dependencies can be properly handled with deferred probing
>>> > so we can remove core_initcall and switch to a proper loadable platform
>>> > driver module.
>>> > This change has been tested on Exynos4412 Odroid U3 based board.
>>> >
>>> > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>>
>> Looks good to me.
>
> Thanks, I have added this patch to my tree, however at the moment
> I have only two patches queued there. Please feel free to apply
> this patch directly to clk-next.


Unfortunately this breaks the audio on Odroid XU3 (simple-card). There
is no sound from:
$ aplay /usr/share/sounds/alsa/Front_Right.wav
and the command does not exit.

Sylwester,
Are you going to look at this?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-19  9:26     ` Krzysztof Kozłowski
@ 2016-07-19  9:55       ` Sylwester Nawrocki
  2016-07-21 18:22         ` Sylwester Nawrocki
  0 siblings, 1 reply; 8+ messages in thread
From: Sylwester Nawrocki @ 2016-07-19  9:55 UTC (permalink / raw)
  To: Krzysztof Kozłowski
  Cc: Michael Turquette, linux-samsung-soc, linux-clk,
	Bartłomiej Żołnierkiewicz

On 07/19/2016 11:26 AM, Krzysztof Kozłowski wrote:
> On Wed, Jul 13, 2016 at 12:23 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> > On 07/08/2016 06:56 PM, Michael Turquette wrote:
>>> >> Quoting Sylwester Nawrocki (2016-07-08 07:15:00)
>>>>> >>> > Any clock dependencies can be properly handled with deferred probing
>>>>> >>> > so we can remove core_initcall and switch to a proper loadable platform
>>>>> >>> > driver module.
>>>>> >>> > This change has been tested on Exynos4412 Odroid U3 based board.
>>>>> >>> >
>>>>> >>> > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>>> >>
>>> >> Looks good to me.
>> >
>> > Thanks, I have added this patch to my tree, however at the moment
>> > I have only two patches queued there. Please feel free to apply
>> > this patch directly to clk-next.
> 
> Unfortunately this breaks the audio on Odroid XU3 (simple-card). There
> is no sound from:
> $ aplay /usr/share/sounds/alsa/Front_Right.wav
> and the command does not exit.
> 
> Sylwester,
> Are you going to look at this?

Thanks for the bug report, I will check what's the problem here.
Odroid U3 also uses simple card and same codec and it all works there.

--
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver
  2016-07-19  9:55       ` Sylwester Nawrocki
@ 2016-07-21 18:22         ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2016-07-21 18:22 UTC (permalink / raw)
  To: Krzysztof Kozłowski
  Cc: Michael Turquette, linux-samsung-soc, linux-clk,
	Bartłomiej Żołnierkiewicz

On 07/19/2016 11:55 AM, Sylwester Nawrocki wrote:
>> Unfortunately this breaks the audio on Odroid XU3 (simple-card). There
>> > is no sound from:
>> > $ aplay /usr/share/sounds/alsa/Front_Right.wav
>> > and the command does not exit.
>> > 
>> > Sylwester,
>> > Are you going to look at this?
>
> Thanks for the bug report, I will check what's the problem here.
> Odroid U3 also uses simple card and same codec and it all works there.

It turned out that the difference was using ADMA on XU3 vs. PDMA on U3.
AUDSS clock controller provides a clock for ADMA and converting the AUDSS
clk driver to a loadable module causes deferring ADMA's controller
initialization, which was not handled properly by the sound component
drivers.
I've sent a patch to fix the issue, added you at Cc.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-21 18:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 14:15 [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver Sylwester Nawrocki
2016-07-08 16:56 ` Michael Turquette
2016-07-13 10:23   ` Sylwester Nawrocki
2016-07-13 22:00     ` Michael Turquette
2016-07-19  9:26     ` Krzysztof Kozłowski
2016-07-19  9:55       ` Sylwester Nawrocki
2016-07-21 18:22         ` Sylwester Nawrocki
2016-07-11  8:14 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).