All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org,
	m.szyprowski@samsung.com, kyungmin.park@samsung.com,
	inki.dae@samsung.com
Subject: Re: [PATCH v2 3/3] ARM: S5P: Add support for common MIPI CSIS/DSIM D-PHY control
Date: Thu, 10 Mar 2011 12:20:01 +0100	[thread overview]
Message-ID: <4D78B3E1.6030506@samsung.com> (raw)
In-Reply-To: <002601cbdead$0f1cb840$2d5628c0$%kim@samsung.com>

On 03/09/2011 11:55 PM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
>> Add common code for MIPI-CSIS and MIPI-DSIM drivers to support
>> their corresponding D-PHY's enable and reset control.
>> Tested with S5PV210 and EXYNOS4 SoCs.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>>  arch/arm/mach-exynos4/include/mach/regs-pmu.h   |    5 ++
>>  arch/arm/mach-s5pv210/include/mach/regs-clock.h |    5 +-
>>  arch/arm/plat-s5p/Kconfig                       |    5 ++
>>  arch/arm/plat-s5p/Makefile                      |    1 +
>>  arch/arm/plat-s5p/setup-mipi.c                  |   68
>> +++++++++++++++++++++++
>>  5 files changed, 83 insertions(+), 1 deletions(-)
>>  create mode 100644 arch/arm/plat-s5p/setup-mipi.c
...
>> diff --git a/arch/arm/plat-s5p/setup-mipi.c
> b/arch/arm/plat-s5p/setup-mipi.c
>> new file mode 100644
>> index 0000000..4d8ae96
>> --- /dev/null
>> +++ b/arch/arm/plat-s5p/setup-mipi.c
> 
> I think, "setup-mipiphy.c" is more clearly :)

OK.

> 
>> @@ -0,0 +1,68 @@
>> +/*
>> + * Copyright (C) 2011 Samsung Electronics Co., Ltd
>> + *
>> + * S5P - Helper functions for MIPI-CSIS and MIPI-DSIM D-PHY control
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/io.h>
>> +#include <linux/spinlock.h>
>> +
>> +#ifdef CONFIG_ARCH_EXYNOS4
>> +#include <mach/regs-pmu.h>
>> +#else
>> +#include <mach/regs-clock.h>
>> +#endif
> 
> How about following?
> 
> --- a/arch/arm/mach-exynos4/include/mach/regs-clock.h
> +++ b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> @@ -160,7 +160,9 @@
>  #define S5P_CLKDIV_BUS_GPLR_SHIFT      (4)
>  #define S5P_CLKDIV_BUS_GPLR_MASK       (0x7 << S5P_CLKDIV_BUS_GPLR_SHIFT)
> 
> -/* Compatibility defines */
> +/* Compatibility defines and inclusion */
> +
> +#include <mach/regs-pmu.h>
> 
>  #define S5P_EPLL_CON                   S5P_EPLL_CON0
> 
> Then, just adding regs-clock.h here.
> 
> +#include <mach/regs-clock.h>
> 

Yeah, that should do the trick, thanks. At least for now it's fine.
But I think the concept of having common code for peripherals and just
different headers for register address offset definitions for various
ARCH_S5P* need to be reconsidered to be able to build single image
for a few SoCs.

>> +
>> +static int __s5p_mipi_phy_control(struct platform_device *pdev,
>> +				  bool on, u32 reset)
...

Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

WARNING: multiple messages have this Message-ID (diff)
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] ARM: S5P: Add support for common MIPI CSIS/DSIM D-PHY control
Date: Thu, 10 Mar 2011 12:20:01 +0100	[thread overview]
Message-ID: <4D78B3E1.6030506@samsung.com> (raw)
In-Reply-To: <002601cbdead$0f1cb840$2d5628c0$%kim@samsung.com>

On 03/09/2011 11:55 PM, Kukjin Kim wrote:
> Sylwester Nawrocki wrote:
>>
>> Add common code for MIPI-CSIS and MIPI-DSIM drivers to support
>> their corresponding D-PHY's enable and reset control.
>> Tested with S5PV210 and EXYNOS4 SoCs.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>>  arch/arm/mach-exynos4/include/mach/regs-pmu.h   |    5 ++
>>  arch/arm/mach-s5pv210/include/mach/regs-clock.h |    5 +-
>>  arch/arm/plat-s5p/Kconfig                       |    5 ++
>>  arch/arm/plat-s5p/Makefile                      |    1 +
>>  arch/arm/plat-s5p/setup-mipi.c                  |   68
>> +++++++++++++++++++++++
>>  5 files changed, 83 insertions(+), 1 deletions(-)
>>  create mode 100644 arch/arm/plat-s5p/setup-mipi.c
...
>> diff --git a/arch/arm/plat-s5p/setup-mipi.c
> b/arch/arm/plat-s5p/setup-mipi.c
>> new file mode 100644
>> index 0000000..4d8ae96
>> --- /dev/null
>> +++ b/arch/arm/plat-s5p/setup-mipi.c
> 
> I think, "setup-mipiphy.c" is more clearly :)

OK.

> 
>> @@ -0,0 +1,68 @@
>> +/*
>> + * Copyright (C) 2011 Samsung Electronics Co., Ltd
>> + *
>> + * S5P - Helper functions for MIPI-CSIS and MIPI-DSIM D-PHY control
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/io.h>
>> +#include <linux/spinlock.h>
>> +
>> +#ifdef CONFIG_ARCH_EXYNOS4
>> +#include <mach/regs-pmu.h>
>> +#else
>> +#include <mach/regs-clock.h>
>> +#endif
> 
> How about following?
> 
> --- a/arch/arm/mach-exynos4/include/mach/regs-clock.h
> +++ b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> @@ -160,7 +160,9 @@
>  #define S5P_CLKDIV_BUS_GPLR_SHIFT      (4)
>  #define S5P_CLKDIV_BUS_GPLR_MASK       (0x7 << S5P_CLKDIV_BUS_GPLR_SHIFT)
> 
> -/* Compatibility defines */
> +/* Compatibility defines and inclusion */
> +
> +#include <mach/regs-pmu.h>
> 
>  #define S5P_EPLL_CON                   S5P_EPLL_CON0
> 
> Then, just adding regs-clock.h here.
> 
> +#include <mach/regs-clock.h>
> 

Yeah, that should do the trick, thanks. At least for now it's fine.
But I think the concept of having common code for peripherals and just
different headers for register address offset definitions for various
ARCH_S5P* need to be reconsidered to be able to build single image
for a few SoCs.

>> +
>> +static int __s5p_mipi_phy_control(struct platform_device *pdev,
>> +				  bool on, u32 reset)
...

Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

  parent reply	other threads:[~2011-03-10 11:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 17:34 [PATCH/RFC 0/3] ARM: S5P: Add common DPHY control code for MIPI-CSIS/MIPI-DSIM devices Sylwester Nawrocki
2011-03-02 17:34 ` Sylwester Nawrocki
2011-03-02 17:34 ` [PATCH 1/3] ARM: S5P: Rename MIPI-CSIS header and update Copyright Sylwester Nawrocki
2011-03-02 17:34   ` Sylwester Nawrocki
2011-03-03  4:33   ` Kukjin Kim
2011-03-03  4:33     ` Kukjin Kim
2011-03-03  9:34     ` Sylwester Nawrocki
2011-03-03  9:34       ` Sylwester Nawrocki
2011-03-02 17:34 ` [PATCH 2/3] ARM: S5PV210: Add clock entries for MIPI DPHY control Sylwester Nawrocki
2011-03-02 17:34   ` Sylwester Nawrocki
2011-03-02 17:34 ` [PATCH 3/3] ARM: EXYNOS4: " Sylwester Nawrocki
2011-03-02 17:34   ` Sylwester Nawrocki
2011-03-03  4:43 ` [PATCH/RFC 0/3] ARM: S5P: Add common DPHY control code for MIPI-CSIS/MIPI-DSIM devices Kukjin Kim
2011-03-03  4:43   ` Kukjin Kim
2011-03-03 19:04   ` [PATCH v2 0/3] ARM: S5P: Add D-PHY control platform helpers for MIPI-CSIS/DSIM drivers Sylwester Nawrocki
2011-03-03 19:04     ` Sylwester Nawrocki
2011-03-08 23:05     ` Kukjin Kim
2011-03-08 23:05       ` Kukjin Kim
2011-03-03 19:04   ` [PATCH v2 1/3] ARM: S5P: Rename MIPI-CSIS driver header and update Copyright Sylwester Nawrocki
2011-03-03 19:04     ` Sylwester Nawrocki
2011-03-03 19:04   ` [PATCH v2 2/3] ARM: S5P: Extend MIPI-CSIS platform_data with the PHY control callback Sylwester Nawrocki
2011-03-03 19:04     ` Sylwester Nawrocki
2011-03-09 15:44     ` [PATCH v2] " Sylwester Nawrocki
2011-03-09 15:44       ` Sylwester Nawrocki
2011-03-03 19:04   ` [PATCH v2 3/3] ARM: S5P: Add support for common MIPI CSIS/DSIM D-PHY control Sylwester Nawrocki
2011-03-03 19:04     ` Sylwester Nawrocki
2011-03-09 22:55     ` Kukjin Kim
2011-03-09 22:55       ` Kukjin Kim
2011-03-10 11:06       ` [PATCH v3 0/3] ARM: S5P: Add platform helpers for MIPI-CSIS/DSIM DPHY Sylwester Nawrocki
2011-03-10 11:06         ` Sylwester Nawrocki
2011-03-10 11:06       ` [PATCH v3 1/3] ARM: S5P: Rename MIPI-CSIS driver header and update Copyright Sylwester Nawrocki
2011-03-10 11:06         ` Sylwester Nawrocki
2011-03-10 11:13         ` Kukjin Kim
2011-03-10 11:13           ` Kukjin Kim
2011-03-10 11:06       ` [PATCH v3 2/3] ARM: S5P: Extend MIPI-CSIS platform_data with the PHY control callback Sylwester Nawrocki
2011-03-10 11:06         ` Sylwester Nawrocki
2011-03-10 11:29         ` Kukjin Kim
2011-03-10 11:29           ` Kukjin Kim
2011-03-10 11:06       ` [PATCH v3 3/3] ARM: S5P: Add support for common MIPI CSIS/DSIM D-PHY control Sylwester Nawrocki
2011-03-10 11:06         ` Sylwester Nawrocki
2011-03-10 11:20       ` Sylwester Nawrocki [this message]
2011-03-10 11:20         ` [PATCH v2 " Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D78B3E1.6030506@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=ben-linux@fluff.org \
    --cc=inki.dae@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.