lkml.org 
[lkml]   [2020]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 09/41] usb: gadget: s3c-hsudc: remove platform header dependency
Date
Krzysztof Kozlowski <krzk@kernel.org> writes:

> From: Arnd Bergmann <arnd@arndb.de>
>
> There is no real phy driver, so s3c-hsudc just pokes the registers
> itself. Improve this a little by making it a platform data callback
> like we do for gpios.
>
> There is only one board using this driver, and it's unlikely
> that another would be added, so this is a minimal workaround.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> [krzk: Include regs-s3c2443-clock.h in ifdef to fixup build on s3c6400]
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> ---
>
> Changes since v1:
> 1. Include regs-s3c2443-clock.h in ifdef to fixup build on s3c640
> ---
> .../include/mach/regs-s3c2443-clock.h | 49 +++++++++++++++++
> arch/arm/plat-samsung/devs.c | 6 ++
> drivers/usb/gadget/udc/s3c-hsudc.c | 55 ++-----------------
> include/linux/platform_data/s3c-hsudc.h | 2 +
> 4 files changed, 61 insertions(+), 51 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> index 6bf924612b06..682759549e63 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> @@ -10,6 +10,8 @@
> #ifndef __ASM_ARM_REGS_S3C2443_CLOCK
> #define __ASM_ARM_REGS_S3C2443_CLOCK
>
> +#include <linux/delay.h>
> +
> #define S3C2443_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
>
> #define S3C2443_PLLCON_MDIVSHIFT 16
> @@ -184,5 +186,52 @@ s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
> return (unsigned int)fvco;
> }
>
> +static inline void s3c_hsudc_init_phy(void)

This should, really, be a PHY driver under drivers/phy, since the goal
is to make this platform-independent, might as well take the opportunity
to introduce a proper driver, no?

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-08-07 16:10    [W:0.077 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site