[PATCH v2] mailbox: PCC: Fix lockdep warning when request PCC channel

2016-10-18 Thread Hoan Tran
t too long. This patch releases spinlock before request_irq() and free_irq() to fix this issue as spinlock is only needed to protect the channel data. Signed-off-by: Hoan Tran --- v2 * Release spinlock before request_irq() and free_irq() instead of using mutex drivers/mailbox/pcc.c | 8 --

Re: [PATCH] mailbox: PCC: Fix lockdep warning when request PCC channel

2016-10-14 Thread Hoan Tran
Hi Prashanth, On Fri, Oct 14, 2016 at 4:44 PM, Prakash, Prashanth wrote: > Hi Hoan, > > On 10/14/2016 4:52 PM, Hoan Tran wrote: >> This patch fixes the lockdep warning below >> >> [7.229767] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) >> [

[PATCH] mailbox: PCC: Fix return value of pcc_mbox_request_channel()

2016-10-14 Thread Hoan Tran
When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of this function use IS_ERR() to check for error code. Signed-off-by: Duc Dang Signed-off-by: Hoan Tran --- include/acpi/pcc.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] mailbox: PCC: Fix lockdep warning when request PCC channel

2016-10-14 Thread Hoan Tran
t too long. Adding a mutex to protect critical section of this function. Beside of that, spinlock is still used to protect the data of channel. Signed-off-by: Hoan Tran --- drivers/mailbox/pcc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/pcc.c b/dr

Re: [PATCH v2] cpufreq: CPPC: Correct desired_perf calculation

2016-10-13 Thread Hoan Tran
On Thu, Oct 13, 2016 at 2:12 PM, Rafael J. Wysocki wrote: > On Thu, Oct 13, 2016 at 9:37 PM, Prakash, Prashanth > wrote: >> On 10/13/2016 11:33 AM, Hoan Tran wrote: >>> The desired_perf is an abstract performance number. Its value should >>> be in the range of [lowe

[PATCH v2] cpufreq: CPPC: Correct desired_perf calculation

2016-10-13 Thread Hoan Tran
old perf. Signed-off-by: Hoan Tran --- v2 * Return if desired_perf is the same with the old one (Prashanth's suggestion) drivers/cpufreq/cppc_cpufreq.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpuf

Re: [PATCH] cpufreq: CPPC: Correct desired_perf calculation

2016-10-12 Thread Hoan Tran
[Resend with plain text mode] Hi Prashanth, On Wed, Oct 12, 2016 at 8:36 AM, Prakash, Prashanth wrote: > Hi Hoan, > > On 10/11/2016 3:12 PM, Hoan Tran wrote: >> The desired_perf is an abstract performance number. Its value should >> be in the range of [lowest perf, highest

Re: [PATCH] cpufreq: CPPC: Correct desired_perf calculation

2016-10-11 Thread Hoan Tran
Hi Rafael, On Tue, Oct 11, 2016 at 2:50 PM, Rafael J. Wysocki wrote: > On Tuesday, October 11, 2016 02:12:00 PM Hoan Tran wrote: >> The desired_perf is an abstract performance number. Its value should >> be in the range of [lowest perf, highest perf] of CPPC. >> The c

[PATCH] cpufreq: CPPC: Correct desired_perf calculation

2016-10-11 Thread Hoan Tran
The desired_perf is an abstract performance number. Its value should be in the range of [lowest perf, highest perf] of CPPC. The correct calculation is desired_perf = freq * cppc_highest_perf / cppc_dmi_max_khz Signed-off-by: Hoan Tran --- drivers/cpufreq/cppc_cpufreq.c | 2 +- 1 file changed

[PATCH] i2c: xgene: Avoid dma_buffer overrun

2016-10-10 Thread Hoan Tran
SMBus block command uses the first byte of buffer for the data length. The dma_buffer should be increased by 1 to avoid the overrun issue. Reported-by: Phil Endecott Signed-off-by: Hoan Tran --- drivers/i2c/busses/i2c-xgene-slimpro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] cpufreq: CPPC: Avoid overflow when calculating desired_perf

2016-09-14 Thread Hoan Tran
Hi Rafael, On Wed, Sep 14, 2016 at 5:50 PM, Rafael J. Wysocki wrote: > On Wednesday, September 14, 2016 04:08:28 PM Hoan Tran wrote: >> This patch fixes overflow issue when calculating the desired_perf. >> >> Signed-off-by: Hoan Tran >> --- >> drivers/cpufreq/

[PATCH] cpufreq: CPPC: Avoid overflow when calculating desired_perf

2016-09-14 Thread Hoan Tran
This patch fixes overflow issue when calculating the desired_perf. Signed-off-by: Hoan Tran --- drivers/cpufreq/cppc_cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 894e465..3e0961e 100644

Re: [PATCH v3 2/3] clk: xgene: Add PMD clock

2016-09-14 Thread Hoan Tran
On Wed, Sep 14, 2016 at 1:55 PM, Stephen Boyd wrote: > On 09/12, Hoan Tran wrote: >> Add X-Gene PMD clock support. >> >> PMD clock is implemented for a single register field. >> Output rate = parent_rate * (denominator - scale) / denominator >> with >>

Re: [PATCH v3 3/3] arm64: dts: xgene: Add DT node for APM X-Gene 2 CPU clocks

2016-09-14 Thread Hoan Tran
Hi Stephen, On Wed, Sep 14, 2016 at 1:55 PM, Stephen Boyd wrote: > On 09/12, Hoan Tran wrote: >> Add DT nodes to enable APM X-Gene 2 CPU clocks. >> >> Signed-off-by: Hoan Tran >> --- > > This can go through arm-soc? I'm not applying this. Yes,

Re: [PATCH] ACPI: CPPC: Support PCC with interrupt flag

2016-09-14 Thread Hoan Tran
On Wed, Sep 14, 2016 at 9:49 AM, Rafael J. Wysocki wrote: > On Wednesday, September 14, 2016 08:45:14 AM Hoan Tran wrote: >> On Tue, Aug 30, 2016 at 11:20 AM, Hoan Tran wrote: >> > On Thu, Jul 21, 2016 at 2:07 PM, Hoan Tran wrote: >> >> For PCC mailbox with in

[RESEND PATCH] ACPI: CPPC: Support PCC with interrupt flag

2016-09-14 Thread Hoan Tran
For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() function to notify the mailbox framework about TX completion. Signed-off-by: Hoan Tran Reviewed-by: Prashanth Prakash --- drivers/acpi/cppc_acpi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH] ACPI: CPPC: Support PCC with interrupt flag

2016-09-14 Thread Hoan Tran
On Tue, Aug 30, 2016 at 11:20 AM, Hoan Tran wrote: > On Thu, Jul 21, 2016 at 2:07 PM, Hoan Tran wrote: >> For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() >> function to notify the mailbox framework about TX completion. >> >> Signed-off-by: Hoan

Re: [RESEND PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-09-14 Thread Hoan Tran
On Mon, Sep 12, 2016 at 3:07 PM, Rafael J. Wysocki wrote: > On Monday, August 15, 2016 05:14:05 PM Hoan Tran wrote: >> ACPI 6.1 has a PCC HW-Reduced Communication Subspace type 2 intended for >> use on HW-Reduce ACPI Platform, which requires read-modify-write sequence >> to

[PATCH v3 2/3] clk: xgene: Add PMD clock

2016-09-12 Thread Hoan Tran
and scale will be computed and programmed accordingly. Signed-off-by: Hoan Tran --- drivers/clk/clk-xgene.c | 221 1 file changed, 221 insertions(+) diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index 3433132..5daddf5 100644 --- a

[PATCH v3 1/3] Documentation: dtb: xgene: Add PMD clock binding

2016-09-12 Thread Hoan Tran
Add APM X-Gene clock binding documentation for PMD clock. Signed-off-by: Hoan Tran Acked-by: Rob Herring --- Documentation/devicetree/bindings/clock/xgene.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/xgene.txt b

[PATCH v3 0/3] clk: xgene: Add PMD clock support

2016-09-12 Thread Hoan Tran
and scale will be computed and programmed accordingly. v3 * Minor changes on dt binding document. v2 * Imply clock shift and width by the compatible string as Rob's comments v1 * Initial Hoan Tran (3): Documentation: dtb: xgene: Add PMD clock binding clk: xgene: Add PMD clock arm64

[PATCH v3 3/3] arm64: dts: xgene: Add DT node for APM X-Gene 2 CPU clocks

2016-09-12 Thread Hoan Tran
Add DT nodes to enable APM X-Gene 2 CPU clocks. Signed-off-by: Hoan Tran --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 56 ++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi

Re: [PATCH v2 1/3] Documentation: dtb: xgene: Add PMD clock binding

2016-09-12 Thread Hoan Tran
On Mon, Sep 12, 2016 at 8:37 AM, Rob Herring wrote: > On Fri, Sep 02, 2016 at 05:40:53PM -0700, Hoan Tran wrote: >> Add APM X-Gene clock binding documentation for PMD clock. >> >> Signed-off-by: Hoan Tran >> --- >> Documentation/devicetree/bindings/clock/xgene.

Re: [PATCH] hwmon: xgene: access mailbox as RAM

2016-09-09 Thread Hoan Tran
On Fri, Sep 9, 2016 at 1:50 PM, Arnd Bergmann wrote: > On Friday, September 9, 2016 1:43:17 PM CEST Hoan Tran wrote: >> >> > * Are you sure you don't need any smp_rmb()/smp_wmb() barriers >> > between the accesses? >> >> No, we don't need a s

Re: [PATCH v2] hwmon: xgene: access mailbox as RAM

2016-09-09 Thread Hoan Tran
cppc_ss->length); > + ctx->pcc_comm_addr = memremap(ctx->comm_base_addr, > + cppc_ss->length, > + MEMREMAP_WB); > } else { > dev_err(&pdev->dev, "Failed to get PCC comm > region\n"); > rc = -ENODEV; > Acked-by: Hoan Tran Tested-by: Hoan Tran Thanks Hoan

Re: [PATCH] hwmon: xgene: access mailbox as RAM

2016-09-09 Thread Hoan Tran
On Fri, Sep 9, 2016 at 12:58 PM, Arnd Bergmann wrote: > On Friday, September 9, 2016 12:24:32 PM CEST Hoan Tran wrote: >> On Fri, Sep 9, 2016 at 8:38 AM, Arnd Bergmann wrote: >> > The newly added hwmon driver fails to build in an allmodconfig >> > index bc78a5

Re: [PATCH] hwmon: xgene: access mailbox as RAM

2016-09-09 Thread Hoan Tran
Hi Arnd, On Fri, Sep 9, 2016 at 8:38 AM, Arnd Bergmann wrote: > The newly added hwmon driver fails to build in an allmodconfig > kernel: > > 1 ERROR: "memblock_is_memory" [drivers/hwmon/xgene-hwmon.ko] undefined! > > According to comments in the code, the mailbox is a shared memory region,

Re: [PATCH] hwmon: xgene: access mailbox as RAM

2016-09-09 Thread Hoan Tran
On Fri, Sep 9, 2016 at 9:58 AM, Guenter Roeck wrote: > Hi Arnd, > > On Fri, Sep 09, 2016 at 05:38:58PM +0200, Arnd Bergmann wrote: >> The newly added hwmon driver fails to build in an allmodconfig >> kernel: >> >> 1 ERROR: "memblock_is_memory" [drivers/hwmon/xgene-hwmon.ko] >> undefined! >

[PATCH v3] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-08 Thread Hoan Tran
valid resourse as unmapped PCC shared memory. This patch fixes this issue by saving this alarm message and scheduling a bottom handler after xgene_hwmon_probe() finish. Signed-off-by: Hoan Tran Reported-by: Itaru Kitayama --- v3 * Replace IS_ERR by IS_ERR_OR_NULL v2 * Check hwmon_de

Re: [PATCH v2] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-08 Thread Hoan Tran
Hi All, Please discard this patch. I'll resend another one soon. Thanks Hoan On Thu, Sep 8, 2016 at 8:31 AM, Hoan Tran wrote: > The system crashes during probing xgene-hwmon driver when temperature > alarm interrupt occurs before. > It's because > - xgene_hwmon_pr

[PATCH v2] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-08 Thread Hoan Tran
valid resourse as unmapped PCC shared memory. This patch fixes this issue by saving this alarm message and scheduling a bottom handler after xgene_hwmon_probe() finish. Signed-off-by: Hoan Tran Reported-by: Itaru Kitayama --- v2 * Check hwmon_dev and resp_pending to determine the driver is not

Re: [PATCH] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-07 Thread Hoan Tran
Hi Guenter, On Wed, Sep 7, 2016 at 12:24 PM, Guenter Roeck wrote: > On Wed, Sep 07, 2016 at 11:55:06AM -0700, Hoan Tran wrote: >> Hi Guenter, >> >> On Tue, Sep 6, 2016 at 11:39 PM, Guenter Roeck wrote: >> > On 09/06/2016 11:07 PM, Hoan Tran wrote: >> >>

Re: [PATCH] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-07 Thread Hoan Tran
Hi Guenter, On Tue, Sep 6, 2016 at 11:39 PM, Guenter Roeck wrote: > On 09/06/2016 11:07 PM, Hoan Tran wrote: >> >> Hi Guenter, >> >> On Tue, Sep 6, 2016 at 10:50 PM, Guenter Roeck wrote: >>> >>> On 09/06/2016 10:21 PM, Hoan Tran wrote: >>>

Re: [PATCH] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-06 Thread Hoan Tran
Hi Guenter, On Tue, Sep 6, 2016 at 10:50 PM, Guenter Roeck wrote: > On 09/06/2016 10:21 PM, Hoan Tran wrote: >> >> Hi Guenter, >> >> Thank for your quick review ! >> >> On Tue, Sep 6, 2016 at 9:35 PM, Guenter Roeck wrote: >>> >>> On

Re: [PATCH] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-06 Thread Hoan Tran
Hi Guenter, Thank for your quick review ! On Tue, Sep 6, 2016 at 9:35 PM, Guenter Roeck wrote: > On 09/06/2016 08:46 PM, Hoan Tran wrote: >> >> The system crashes during probing xgene-hwmon driver when temperature >> alarm interrupt occurs before. >> It's

[PATCH] hwmon: xgene: Fix crash when alarm occurs before driver probe

2016-09-06 Thread Hoan Tran
into invalid resource as unmapped PCC shared memory. This patch fixes this issue by saving this alarm message and scheduling a bottom handler after xgene_hwmon_probe() finish. Signed-off-by: Hoan Tran Reported-by: Itaru Kitayama --- drivers/hwmon/xgene-hwmon.c

[PATCH v2 0/3] clk: xgene: Add PMD clock support

2016-09-02 Thread Hoan Tran
and scale will be computed and programmed accordingly. v2 * Imply clock shift and width by the compatible string as Rob's comments v1 * Initial Hoan Tran (3): Documentation: dtb: xgene: Add PMD clock binding clk: xgene: Add PMD clock arm64: dts: xgene: Add DT node for APM X-Gene

[PATCH v2 2/3] clk: xgene: Add PMD clock

2016-09-02 Thread Hoan Tran
and scale will be computed and programmed accordingly. Signed-off-by: Hoan Tran --- drivers/clk/clk-xgene.c | 221 1 file changed, 221 insertions(+) diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index 3433132..5daddf5 100644 --- a

[PATCH v2 3/3] arm64: dts: xgene: Add DT node for APM X-Gene 2 CPU clocks

2016-09-02 Thread Hoan Tran
Add DT nodes to enable APM X-Gene 2 CPU clocks. Signed-off-by: Hoan Tran --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 56 ++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi

[PATCH v2 1/3] Documentation: dtb: xgene: Add PMD clock binding

2016-09-02 Thread Hoan Tran
Add APM X-Gene clock binding documentation for PMD clock. Signed-off-by: Hoan Tran --- Documentation/devicetree/bindings/clock/xgene.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/xgene.txt b/Documentation/devicetree/bindings

Re: [PATCH] ACPI: CPPC: Support PCC with interrupt flag

2016-08-30 Thread Hoan Tran
On Thu, Jul 21, 2016 at 2:07 PM, Hoan Tran wrote: > For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() > function to notify the mailbox framework about TX completion. > > Signed-off-by: Hoan Tran > --- > This patch is tested on top and depends on pa

Re: [PATCH 1/3] Documentation: dtb: xgene: Add PMD clock binding

2016-08-29 Thread Hoan Tran
Hi Rob, On Mon, Aug 29, 2016 at 8:42 AM, Rob Herring wrote: > On Tue, Aug 23, 2016 at 08:52:39AM -0700, Hoan Tran wrote: >> Add APM X-Gene clock binding documentation for PMD clock. >> >> Signed-off-by: Hoan Tran >> --- >> Documentation/devicet

[PATCH 1/3] Documentation: dtb: xgene: Add PMD clock binding

2016-08-23 Thread Hoan Tran
Add APM X-Gene clock binding documentation for PMD clock. Signed-off-by: Hoan Tran --- Documentation/devicetree/bindings/clock/xgene.txt | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/xgene.txt b/Documentation/devicetree

[PATCH 0/3] clk: xgene: Add PMD clock support

2016-08-23 Thread Hoan Tran
and scale will be computed and programmed accordingly. Hoan Tran (3): Documentation: dtb: xgene: Add PMD clock binding clk: xgene: Add PMD clock arm64: dts: xgene: Add DT node for APM X-Gene 2 CPU clocks Documentation/devicetree/bindings/clock/xgene.txt | 22 +++ arch/arm64/boot/dts/apm/apm

[PATCH 3/3] arm64: dts: xgene: Add DT node for APM X-Gene 2 CPU clocks

2016-08-23 Thread Hoan Tran
Add DT nodes to enable APM X-Gene 2 CPU clocks. Signed-off-by: Hoan Tran --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 64 ++ 1 file changed, 64 insertions(+) diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi

[PATCH 2/3] clk: xgene: Add PMD clock

2016-08-23 Thread Hoan Tran
and scale will be computed and programmed accordingly. Signed-off-by: Hoan Tran --- drivers/clk/clk-xgene.c | 223 1 file changed, 223 insertions(+) diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index 3433132..66ce200 100644 --- a

Re: [PATCH v2] clk: Add fractional scale clock support

2016-08-16 Thread Hoan Tran
On Mon, Aug 15, 2016 at 5:14 PM, Stephen Boyd wrote: > Sorry I was away for some time. > > On 08/08, Hoan Tran wrote: >> On Wed, Jul 20, 2016 at 11:36 AM, Hoan Tran wrote: >> > On Fri, Jul 1, 2016 at 5:09 PM, Hoan Tran wrote: >> >> >> >> Hi Step

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-08-16 Thread Hoan Tran
On Tue, Aug 16, 2016 at 4:56 AM, Rafael J. Wysocki wrote: > On Monday, August 15, 2016 04:41:22 PM Hoan Tran wrote: >> Hi Rafael, >> >> On Mon, Aug 15, 2016 at 4:18 PM, Rafael J. Wysocki >> wrote: >> > On Monday, August 15, 2016 09:45:24 AM Hoan Tran wrote: &

[RESEND PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-08-15 Thread Hoan Tran
ACPI 6.1 has a PCC HW-Reduced Communication Subspace type 2 intended for use on HW-Reduce ACPI Platform, which requires read-modify-write sequence to acknowledge doorbell interrupt. This patch provides the implementation for the Communication Subspace Type 2. Signed-off-by: Hoan Tran Reviewed-by

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-08-15 Thread Hoan Tran
Hi Rafael, On Mon, Aug 15, 2016 at 4:18 PM, Rafael J. Wysocki wrote: > On Monday, August 15, 2016 09:45:24 AM Hoan Tran wrote: >> On Mon, Jun 27, 2016 at 2:32 PM, Rafael J. Wysocki >> wrote: >> > >> > On Monday, June 27, 2016 11:27:42 AM Hoan Tran

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-08-15 Thread Hoan Tran
On Mon, Jun 27, 2016 at 2:32 PM, Rafael J. Wysocki wrote: > > On Monday, June 27, 2016 11:27:42 AM Hoan Tran wrote: > > Hi Jassi and Rafael, > > > > On Wed, Jun 15, 2016 at 9:19 AM, Prakash, Prashanth > > wrote: > > > > > > > > >

Re: [PATCH v2] clk: Add fractional scale clock support

2016-08-08 Thread Hoan Tran
On Wed, Jul 20, 2016 at 11:36 AM, Hoan Tran wrote: > On Fri, Jul 1, 2016 at 5:09 PM, Hoan Tran wrote: >> >> Hi Stephen, >> >> On Fri, Jul 1, 2016 at 11:38 AM, Stephen Boyd wrote: >> > Sorry I replied offlist before. Pressed the wrong key. >> > >

Re: [PATCH v3 2/3] hwmon: xgene: Add hwmon driver

2016-08-01 Thread Hoan Tran
lp improve the system] > > url: > https://github.com/0day-ci/linux/commits/Hoan-Tran/hwmon-xgene-Add-support-for-X-Gene-hwmon-driver/20160725-015356 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git > hwmon-next > config: arm64-allmodconfig

Re: hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-23 Thread Hoan Tran
need a newer version of Tianocore. > Also, if you or your folks can fold your patch set into APM's xgene-next > GitHub repo, that would help me to keep up with the development. xgene-next is currently used for device tree patch only. Thanks Hoan > > Itaru > > > On 7/24/16

Re: hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-23 Thread Hoan Tran
Hi Itaru, > On Jul 23, 2016, at 16:51, Itaru Kitayama wrote: > > Hi Hoan, > > I've been testing your patch set on a Rev B0 system with ACPI, in dmesg > I see: > > [1.546444] xgene-slimpro-i2c APMC0D40:00: i2c mailbox channel request > failed > [1.570062] xgene-slimpro-hwmon APMC0D29:

Re: [PATCH v4 0/3] hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-22 Thread Hoan Tran
Hi Guenter, On Thu, Jul 21, 2016 at 6:30 PM, Guenter Roeck wrote: > On 07/21/2016 03:37 PM, Hoan Tran wrote: >> >> This patch set adds hardware temperature and power reading support for >> APM X-Gene SoC using the mailbox communication interface. >> For device tree, it

[PATCH v4 2/3] hwmon: xgene: Add hwmon driver

2016-07-21 Thread Hoan Tran
This patch adds hardware temperature and power reading support for APM X-Gene SoC using the mailbox communication interface. Signed-off-by: Hoan Tran Reviewed-by: Guenter Roeck --- Documentation/hwmon/xgene-hwmon | 30 ++ drivers/hwmon/Kconfig | 7 + drivers/hwmon/Makefile

[PATCH v4 1/3] Documentation: dtb: xgene: Add hwmon dts binding documentation

2016-07-21 Thread Hoan Tran
This patch adds the APM X-Gene hwmon device tree node documentation. Signed-off-by: Hoan Tran Acked-by: Rob Herring --- .../devicetree/bindings/hwmon/apm-xgene-hwmon.txt | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon

[PATCH v4 3/3] arm64: dts: apm: Add X-Gene SoC hwmon to device tree

2016-07-21 Thread Hoan Tran
This patch adds DT node to enable hwmon driver for APM X-Gene SoC. Signed-off-by: Hoan Tran Acked-by: Guenter Roeck --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 5 + arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 + 2 files changed, 10 insertions(+) diff --git a/arch/arm64/boot

[PATCH v4 0/3] hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-21 Thread Hoan Tran
for milli-Watt) - Remove power reading for SoC - Fix review comments from Guenter v1 - Initial Hoan Tran (3): Documentation: dtb: xgene: Add hwmon dts binding documentation hwmon: xgene: Add hwmon driver arm64: dts: apm: Add X-Gene SoC hwmon to device tree .../devicetree/bindings/hwmon/

Re: [PATCH v3 2/3] hwmon: xgene: Add hwmon driver

2016-07-21 Thread Hoan Tran
Hi Guenter, On Thu, Jul 21, 2016 at 3:09 PM, Guenter Roeck wrote: > On Thu, Jul 21, 2016 at 01:55:56PM -0700, Hoan Tran wrote: >> This patch adds hardware temperature and power reading support for >> APM X-Gene SoC using the mailbox communication interface. >> >&g

[PATCH] ACPI: CPPC: Support PCC with interrupt flag

2016-07-21 Thread Hoan Tran
For PCC mailbox with interrupt flag, CPPC should call mbox_chan_txdone() function to notify the mailbox framework about TX completion. Signed-off-by: Hoan Tran --- This patch is tested on top and depends on patch[1]: [1] http://www.spinics.net/lists/linux-acpi/msg66041.html - [PATCH v3] mailbox

[PATCH v3 2/3] hwmon: xgene: Add hwmon driver

2016-07-21 Thread Hoan Tran
This patch adds hardware temperature and power reading support for APM X-Gene SoC using the mailbox communication interface. Signed-off-by: Hoan Tran --- Documentation/hwmon/xgene-hwmon | 30 ++ drivers/hwmon/Kconfig | 7 + drivers/hwmon/Makefile | 1 + drivers/hwmon

[PATCH v3 1/3] Documentation: dtb: xgene: Add hwmon dts binding documentation

2016-07-21 Thread Hoan Tran
This patch adds the APM X-Gene hwmon device tree node documentation. Signed-off-by: Hoan Tran Acked-by: Rob Herring --- .../devicetree/bindings/hwmon/apm-xgene-hwmon.txt | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon

[PATCH v3 3/3] arm64: dts: apm: Add X-Gene SoC hwmon to device tree

2016-07-21 Thread Hoan Tran
This patch adds DT node to enable hwmon driver for APM X-Gene SoC. Signed-off-by: Hoan Tran --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 5 + arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 + 2 files changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi

[PATCH v3 0/3] hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-21 Thread Hoan Tran
Fix review comments from Guenter v1 - Initial Hoan Tran (3): Documentation: dtb: xgene: Add hwmon dts binding documentation hwmon: xgene: Add hwmon driver arm64: dts: apm: Add X-Gene SoC hwmon to device tree .../devicetree/bindings/hwmon/apm-xgene-hwmon.txt | 14 + Documentation/hw

Re: [PATCH v2] clk: Add fractional scale clock support

2016-07-20 Thread Hoan Tran
On Fri, Jul 1, 2016 at 5:09 PM, Hoan Tran wrote: > > Hi Stephen, > > On Fri, Jul 1, 2016 at 11:38 AM, Stephen Boyd wrote: > > Sorry I replied offlist before. Pressed the wrong key. > > > > On 06/30, Hoan Tran wrote: > >> On Thu, Jun 30, 2016 at 1:23 PM, St

Re: [PATCH v2 2/3] hwmon: xgene: Add hwmon driver

2016-07-18 Thread Hoan Tran
Hi Guenter, On Sat, Jul 16, 2016 at 9:35 AM, Guenter Roeck wrote: > On 07/11/2016 05:30 PM, Hoan Tran wrote: >> >> This patch adds hardware temperature and power reading support for >> APM X-Gene SoC using the mailbox communication interface. >>

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-07-13 Thread Hoan Tran
Hi Rafael, On Mon, Jun 27, 2016 at 2:32 PM, Rafael J. Wysocki wrote: > On Monday, June 27, 2016 11:27:42 AM Hoan Tran wrote: >> Hi Jassi and Rafael, >> >> On Wed, Jun 15, 2016 at 9:19 AM, Prakash, Prashanth >> wrote: >> > >> > >> > On

[PATCH v2 1/3] Documentation: dtb: xgene: Add hwmon dts binding documentation

2016-07-11 Thread Hoan Tran
This patch adds the APM X-Gene hwmon device tree node documentation. Signed-off-by: Hoan Tran --- .../devicetree/bindings/hwmon/apm-xgene-hwmon.txt | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/apm-xgene-hwmon.txt

[PATCH v2 2/3] hwmon: xgene: Add hwmon driver

2016-07-11 Thread Hoan Tran
This patch adds hardware temperature and power reading support for APM X-Gene SoC using the mailbox communication interface. Signed-off-by: Hoan Tran --- Documentation/hwmon/xgene-hwmon | 30 ++ drivers/hwmon/Kconfig | 7 + drivers/hwmon/Makefile | 1 + drivers/hwmon

[PATCH v2 3/3] arm64: dts: apm: Add X-Gene SoC hwmon to device tree

2016-07-11 Thread Hoan Tran
This patch adds DT node to enable hwmon driver for APM X-Gene SoC. Signed-off-by: Hoan Tran --- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 5 + arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 + 2 files changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi

[PATCH v2 0/3] hwmon: xgene: Add support for X-Gene hwmon driver

2016-07-11 Thread Hoan Tran
- Initial Hoan Tran (3): Documentation: dtb: xgene: Add hwmon dts binding documentation hwmon: xgene: Add hwmon driver arm64: dts: apm: Add X-Gene SoC hwmon to device tree .../devicetree/bindings/hwmon/apm-xgene-hwmon.txt | 14 + Documentation/hwmon/xgene-hwmon| 30

[PATCH] ACPI: CPPC: Return error if _CPC is invalid on a CPU

2016-07-04 Thread Hoan Tran
Based on 8.4.7.1 section of ACPI 6.1 specification, if the platform supports CPPC, the _CPC object must exist under all processor objects. If cpc_desc_ptr pointer is invalid on any CPUs, acpi_get_psd_map() should return error and CPPC cpufreq driver can not be registered. Signed-off-by: Hoan Tran

Re: [PATCH] mailbox: pcc: Add PCC request and free channel declarations

2016-07-04 Thread Hoan Tran
Hi Prashanth, On Wed, Jun 15, 2016 at 8:55 AM, Prakash, Prashanth wrote: > Hi Hoan, > > On 6/14/2016 5:12 PM, Hoan Tran wrote: >> As PCC will be used by other clients not only CPPC. >> This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() >> decla

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-07-04 Thread Hoan Tran
Hi Prashanth, On Thu, Jun 9, 2016 at 3:25 PM, Prakash, Prashanth wrote: > > > On 6/9/2016 2:47 PM, Hoan Tran wrote: >> Hi Ashwin and Prashanth, >> >> On Wed, Jun 8, 2016 at 5:41 PM, Hoan Tran wrote: >>> Hi Prashanth, >>> >>> >>>

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-07-04 Thread Hoan Tran
Hi Ashwin and Prashanth, On Wed, Jun 8, 2016 at 5:41 PM, Hoan Tran wrote: > Hi Prashanth, > > > On Wed, Jun 8, 2016 at 5:32 PM, Prakash, Prashanth > wrote: >> >> >> On 6/8/2016 10:24 AM, Hoan Tran wrote: >>> Hi Ashwin, >>> >>>

[PATCH] mailbox: pcc: Add PCC request and free channel declarations

2016-07-04 Thread Hoan Tran
As PCC will be used by other clients not only CPPC. This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations Signed-off-by: Hoan Tran --- include/acpi/cppc_acpi.h | 4 include/linux/mailbox_client.h | 4 2 files changed, 4 insertions(+), 4

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-07-04 Thread Hoan Tran
Hi Jassi and Rafael, On Wed, Jun 15, 2016 at 9:19 AM, Prakash, Prashanth wrote: > > > On 6/9/2016 4:43 PM, Hoan Tran wrote: >> Hi Prashanth, >> >> On Thu, Jun 9, 2016 at 3:25 PM, Prakash, Prashanth >> wrote: >>> >>> On 6/9/2016 2:4

Re: [PATCH] acpi: cppc: Prevent cpc_desc_ptr points to the invalid data

2016-07-04 Thread Hoan Tran
On Tue, May 31, 2016 at 12:29 PM, Ashwin Chaugule wrote: > > On 27 May 2016 at 12:41, Hoan Tran wrote: > > Hi Ashwin, > > Hi, > > > > > Yes, I saw kernel crash. > > As cpc_desc_ptr is not NULL, cppc_cpufreq_init() still can pass then > > crash d

[PATCH v2] mailbox: pcc: Add PCC request and free channel declarations

2016-07-04 Thread Hoan Tran
Exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations into a pcc.h header file. v2 * Introduce pcc.h header file for pcc client methods v1 * Initial Signed-off-by: Hoan Tran --- include/acpi/cppc_acpi.h | 7 +-- include/acpi/pcc.h | 29

Re: [PATCH v2] clk: Add fractional scale clock support

2016-07-01 Thread Hoan Tran
Hi Stephen, On Fri, Jul 1, 2016 at 11:38 AM, Stephen Boyd wrote: > Sorry I replied offlist before. Pressed the wrong key. > > On 06/30, Hoan Tran wrote: >> On Thu, Jun 30, 2016 at 1:23 PM, Stephen Boyd wrote: >> > >> > How is this different from clk-fractiona

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-06-27 Thread Hoan Tran
Hi Jassi and Rafael, On Wed, Jun 15, 2016 at 9:19 AM, Prakash, Prashanth wrote: > > > On 6/9/2016 4:43 PM, Hoan Tran wrote: >> Hi Prashanth, >> >> On Thu, Jun 9, 2016 at 3:25 PM, Prakash, Prashanth >> wrote: >>> >>> On 6/9/2016 2:4

Re: [PATCH] acpi: cppc: Prevent cpc_desc_ptr points to the invalid data

2016-06-24 Thread Hoan Tran
On Tue, May 31, 2016 at 12:29 PM, Ashwin Chaugule wrote: > > On 27 May 2016 at 12:41, Hoan Tran wrote: > > Hi Ashwin, > > Hi, > > > > > Yes, I saw kernel crash. > > As cpc_desc_ptr is not NULL, cppc_cpufreq_init() still can pass then > > crash d

Re: [PATCH 1/3] Documentation: dtb: xgene: Add hwmon dts binding documentation

2016-06-23 Thread Hoan Tran
On Tue, Jun 7, 2016 at 11:05 AM, Hoan Tran wrote: > Hi Jassi, > > Thanks for your reply ! > > On Tue, Jun 7, 2016 at 10:20 AM, Jassi Brar wrote: >> On Tue, May 24, 2016 at 6:31 AM, Hoan Tran wrote: >>> Hi Rob, >>> >>> Thanks for your review ! >

[PATCH v2] clk: Add fractional scale clock support

2016-06-20 Thread Hoan Tran
compile error by using DIV_ROUND_UP_ULL() macro * Remove DT binding document * Remove DT clk_fractional_scale_init() function v1 * Initial Signed-off-by: Hoan Tran Signed-off-by: Loc Ho --- drivers/clk/Makefile | 1 + drivers/clk/clk-fractional-scale.c | 195

[PATCH] ACPI: CPPC: Return error if _CPC is invalid on a CPU

2016-06-17 Thread Hoan Tran
Based on 8.4.7.1 section of ACPI 6.1 specification, if the platform supports CPPC, the _CPC object must exist under all processor objects. If cpc_desc_ptr pointer is invalid on any CPUs, acpi_get_psd_map() should return error and CPPC cpufreq driver can not be registered. Signed-off-by: Hoan Tran

Re: [PATCH 2/2] clk: Add fractional scale clock support

2016-06-17 Thread Hoan Tran
Hi Geert, On Thu, Jun 16, 2016 at 11:43 PM, Geert Uytterhoeven wrote: > On Fri, Jun 17, 2016 at 1:40 AM, Hoan Tran wrote: >> This patch adds fractional scale clock support. >> Fractional scale clock is implemented for a single register field. >> Output rate = parent_rate

[PATCH 1/2] Documentation: dt: clock: Add fractional scale binding

2016-06-16 Thread Hoan Tran
Add fractional scale clock DTS binding. Signed-off-by: Hoan Tran Signed-off-by: Loc Ho --- .../bindings/clock/fractional-scale-clock.txt | 31 ++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/fractional-scale-clock.txt

[PATCH 2/2] clk: Add fractional scale clock support

2016-06-16 Thread Hoan Tran
: Hoan Tran Signed-off-by: Loc Ho --- drivers/clk/Makefile | 1 + drivers/clk/clk-fractional-scale.c | 253 + include/linux/clk-provider.h | 41 ++ 3 files changed, 295 insertions(+) create mode 100644 drivers/clk/clk-fractional

[PATCH 0/2] clk: Add fractional scale clock support

2016-06-16 Thread Hoan Tran
This patch adds fractional scale clock support. Fractional scale clock is implemented for a single register field. Output rate = parent_rate * scale / denominator For example, for 1 / 8 fractional scale, denominator will be 8 and scale will be computed and programmed accordingly. Hoan Tran (2

[PATCH v2] mailbox: pcc: Add PCC request and free channel declarations

2016-06-16 Thread Hoan Tran
Exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations into a pcc.h header file. v2 * Introduce pcc.h header file for pcc client methods v1 * Initial Signed-off-by: Hoan Tran --- include/acpi/cppc_acpi.h | 7 +-- include/acpi/pcc.h | 29

Re: [PATCH] mailbox: pcc: Add PCC request and free channel declarations

2016-06-15 Thread Hoan Tran
Hi Prashanth, On Wed, Jun 15, 2016 at 8:55 AM, Prakash, Prashanth wrote: > Hi Hoan, > > On 6/14/2016 5:12 PM, Hoan Tran wrote: >> As PCC will be used by other clients not only CPPC. >> This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() >> decla

[PATCH] mailbox: pcc: Add PCC request and free channel declarations

2016-06-14 Thread Hoan Tran
As PCC will be used by other clients not only CPPC. This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations Signed-off-by: Hoan Tran --- include/acpi/cppc_acpi.h | 4 include/linux/mailbox_client.h | 4 2 files changed, 4 insertions(+), 4

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-06-09 Thread Hoan Tran
Hi Prashanth, On Thu, Jun 9, 2016 at 3:25 PM, Prakash, Prashanth wrote: > > > On 6/9/2016 2:47 PM, Hoan Tran wrote: >> Hi Ashwin and Prashanth, >> >> On Wed, Jun 8, 2016 at 5:41 PM, Hoan Tran wrote: >>> Hi Prashanth, >>> >>> >>>

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-06-09 Thread Hoan Tran
Hi Ashwin and Prashanth, On Wed, Jun 8, 2016 at 5:41 PM, Hoan Tran wrote: > Hi Prashanth, > > > On Wed, Jun 8, 2016 at 5:32 PM, Prakash, Prashanth > wrote: >> >> >> On 6/8/2016 10:24 AM, Hoan Tran wrote: >>> Hi Ashwin, >>> >>>

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-06-08 Thread Hoan Tran
Hi Prashanth, On Wed, Jun 8, 2016 at 5:32 PM, Prakash, Prashanth wrote: > > > On 6/8/2016 10:24 AM, Hoan Tran wrote: >> Hi Ashwin, >> >> On Wed, Jun 8, 2016 at 5:18 AM, Ashwin Chaugule >> wrote: >>> + Prashanth (Can you please have a look as well?)

Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2

2016-06-08 Thread Hoan Tran
Hi Ashwin, On Wed, Jun 8, 2016 at 5:18 AM, Ashwin Chaugule wrote: > + Prashanth (Can you please have a look as well?) > > On 31 May 2016 at 15:35, Hoan Tran wrote: >> Hi Ashwin, > > Hi, > > Sorry about the delay. I'm in the middle of switching jobs and >

Re: [PATCH 1/3] Documentation: dtb: xgene: Add hwmon dts binding documentation

2016-06-07 Thread Hoan Tran
Hi Jassi, Thanks for your reply ! On Tue, Jun 7, 2016 at 10:20 AM, Jassi Brar wrote: > On Tue, May 24, 2016 at 6:31 AM, Hoan Tran wrote: >> Hi Rob, >> >> Thanks for your review ! >> >> On Mon, May 23, 2016 at 1:30 PM, Rob Herring wrote: >>> >>

[PATCH] mailbox: Add mailbox channel request by index support

2016-06-07 Thread Hoan Tran
This change adds request mailbox channel by index. It allows the mailbox client to request a channel without create a DT node. It's based on Rob's suggestion at http://www.spinics.net/lists/linux-doc/msg37060.html Signed-off-by: Hoan Tran --- drivers/mailbox/mailbox.c

<    1   2   3   >