Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-07 Thread Rafael J. Wysocki
On Wednesday, November 25, 2015 03:37:54 PM Thomas Gleixner wrote:
> On Wed, 25 Nov 2015, Andy Shevchenko wrote:
> > …we are working on another fix which is based also on this patch. Can
> > you provide your ACK if you are okay with the changes to arch/x86 ?
> 
> I'm fine with the patch. Once I have acks, I'll pick it up.

Well, it turns out that some material to go into my tree depends on this
one.  Would you mind if I took it?

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-07 Thread Rafael J. Wysocki
On Wednesday, November 25, 2015 03:37:54 PM Thomas Gleixner wrote:
> On Wed, 25 Nov 2015, Andy Shevchenko wrote:
> > …we are working on another fix which is based also on this patch. Can
> > you provide your ACK if you are okay with the changes to arch/x86 ?
> 
> I'm fine with the patch. Once I have acks, I'll pick it up.

Well, it turns out that some material to go into my tree depends on this
one.  Would you mind if I took it?

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-03 Thread Ong, Boon Leong

>-Original Message-
>From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel-
>ow...@vger.kernel.org] On Behalf Of Andy Shevchenko
>Sent: Wednesday, November 25, 2015 10:33 PM
>To: Thomas Gleixner 
>Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; linux-
>p...@vger.kernel.org; Ingo Molnar ; Peter Anvin
>; Wolfram Sang ; Zhang, Rui
>; Eduardo Valentin ; Kweh, Hock
>Leong 
>Subject: Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions
>
>On Wed, 2015-11-25 at 15:20 +0100, Thomas Gleixner wrote:
>> On Wed, 11 Nov 2015, Andy Shevchenko wrote:
>>
>> > The read and write opcodes are global for all units on SoC and even
>> across
>> > Intel SoCs. Remove duplication of corresponding constants. At the
>> same time
>> > convert all current users.
>> >
>> > No functional change.
>> >
>> > Cc: Thomas Gleixner 
>> > Cc: Ingo Molnar 
>> > Cc: Peter Anvin 
>> > Cc: Wolfram Sang 
>> > Cc: Zhang Rui 
>> > Cc: Eduardo Valentin 
>> > Cc: Hock Leong Kweh 
>
>Eduardo, Rui, can you provide your ACKs or comments about the patch?
>
Rui,
I have reviewed the change on drivers/thermal/intel_quark_dts_thermal.c.
Yes, I gave my ACK here.
 


RE: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-03 Thread Ong, Boon Leong

>-Original Message-
>From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel-
>ow...@vger.kernel.org] On Behalf Of Andy Shevchenko
>Sent: Wednesday, November 25, 2015 10:33 PM
>To: Thomas Gleixner <t...@linutronix.de>
>Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; linux-
>p...@vger.kernel.org; Ingo Molnar <mi...@redhat.com>; Peter Anvin
><h...@zytor.com>; Wolfram Sang <w...@the-dreams.de>; Zhang, Rui
><rui.zh...@intel.com>; Eduardo Valentin <edubez...@gmail.com>; Kweh, Hock
>Leong <hock.leong.k...@intel.com>
>Subject: Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions
>
>On Wed, 2015-11-25 at 15:20 +0100, Thomas Gleixner wrote:
>> On Wed, 11 Nov 2015, Andy Shevchenko wrote:
>>
>> > The read and write opcodes are global for all units on SoC and even
>> across
>> > Intel SoCs. Remove duplication of corresponding constants. At the
>> same time
>> > convert all current users.
>> >
>> > No functional change.
>> >
>> > Cc: Thomas Gleixner <t...@linutronix.de>
>> > Cc: Ingo Molnar <mi...@redhat.com>
>> > Cc: Peter Anvin <h...@zytor.com>
>> > Cc: Wolfram Sang <w...@the-dreams.de>
>> > Cc: Zhang Rui <rui.zh...@intel.com>
>> > Cc: Eduardo Valentin <edubez...@gmail.com>
>> > Cc: Hock Leong Kweh <hock.leong.k...@intel.com>
>
>Eduardo, Rui, can you provide your ACKs or comments about the patch?
>
Rui,
I have reviewed the change on drivers/thermal/intel_quark_dts_thermal.c.
Yes, I gave my ACK here.
 


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Thomas Gleixner
On Wed, 25 Nov 2015, Andy Shevchenko wrote:
> …we are working on another fix which is based also on this patch. Can
> you provide your ACK if you are okay with the changes to arch/x86 ?

I'm fine with the patch. Once I have acks, I'll pick it up.

Thanks,

tglx

Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Andy Shevchenko
On Wed, 2015-11-25 at 15:20 +0100, Thomas Gleixner wrote:
> On Wed, 11 Nov 2015, Andy Shevchenko wrote:
> 
> > The read and write opcodes are global for all units on SoC and even
> across
> > Intel SoCs. Remove duplication of corresponding constants. At the
> same time
> > convert all current users.
> > 
> > No functional change.
> > 
> > Cc: Thomas Gleixner 
> > Cc: Ingo Molnar 
> > Cc: Peter Anvin 
> > Cc: Wolfram Sang 
> > Cc: Zhang Rui 
> > Cc: Eduardo Valentin 
> > Cc: Hock Leong Kweh 

Eduardo, Rui, can you provide your ACKs or comments about the patch?

> > 
> > Signed-off-by: Andy Shevchenko 
> > ---
> > Since v1:
> > - satisfy kbuild robot
> > 
> >  arch/x86/include/asm/iosf_mbi.h  | 49 +---
> --
> >  arch/x86/platform/atom/punit_atom_debug.c    |  7 +---
> >  arch/x86/platform/intel-quark/imr.c  | 28 +
> >  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
> >  drivers/powercap/intel_rapl.c    | 10 ++---
> >  drivers/thermal/intel_quark_dts_thermal.c    | 61 ++
> --
> >  drivers/thermal/intel_soc_dts_iosf.c | 43 ++
> --
> 
> Hmm. Either we get acks of all maintainers and merge it through
> tip/x86/... 

I prefer this way because…

> or we do the following:
> 
> Add the new constants w/o using them in a seperate patch and ship
> that
> linuswards now. Then the subsystem maintainers can pick the
> individual
> patches up and after the merge window closes we remove the old
> constants in one go.
> 
> Either way works for me.

…we are working on another fix which is based also on this patch. Can
you provide your ACK if you are okay with the changes to arch/x86 ?

> 
> Thanks,
> 
> tglx
> 
> 

-- 
Andy Shevchenko 
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Thomas Gleixner
On Wed, 11 Nov 2015, Andy Shevchenko wrote:

> The read and write opcodes are global for all units on SoC and even across
> Intel SoCs. Remove duplication of corresponding constants. At the same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 
> 
> Signed-off-by: Andy Shevchenko 
> ---
> Since v1:
> - satisfy kbuild robot
> 
>  arch/x86/include/asm/iosf_mbi.h  | 49 +-
>  arch/x86/platform/atom/punit_atom_debug.c|  7 +---
>  arch/x86/platform/intel-quark/imr.c  | 28 +
>  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
>  drivers/powercap/intel_rapl.c| 10 ++---
>  drivers/thermal/intel_quark_dts_thermal.c| 61 
> ++--
>  drivers/thermal/intel_soc_dts_iosf.c | 43 ++--

Hmm. Either we get acks of all maintainers and merge it through
tip/x86/... or we do the following:

Add the new constants w/o using them in a seperate patch and ship that
linuswards now. Then the subsystem maintainers can pick the individual
patches up and after the merge window closes we remove the old
constants in one go.

Either way works for me.

Thanks,

tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Thomas Gleixner
On Wed, 11 Nov 2015, Andy Shevchenko wrote:

> The read and write opcodes are global for all units on SoC and even across
> Intel SoCs. Remove duplication of corresponding constants. At the same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 
> 
> Signed-off-by: Andy Shevchenko 
> ---
> Since v1:
> - satisfy kbuild robot
> 
>  arch/x86/include/asm/iosf_mbi.h  | 49 +-
>  arch/x86/platform/atom/punit_atom_debug.c|  7 +---
>  arch/x86/platform/intel-quark/imr.c  | 28 +
>  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
>  drivers/powercap/intel_rapl.c| 10 ++---
>  drivers/thermal/intel_quark_dts_thermal.c| 61 
> ++--
>  drivers/thermal/intel_soc_dts_iosf.c | 43 ++--

Hmm. Either we get acks of all maintainers and merge it through
tip/x86/... or we do the following:

Add the new constants w/o using them in a seperate patch and ship that
linuswards now. Then the subsystem maintainers can pick the individual
patches up and after the merge window closes we remove the old
constants in one go.

Either way works for me.

Thanks,

tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Andy Shevchenko
On Wed, 2015-11-25 at 15:20 +0100, Thomas Gleixner wrote:
> On Wed, 11 Nov 2015, Andy Shevchenko wrote:
> 
> > The read and write opcodes are global for all units on SoC and even
> across
> > Intel SoCs. Remove duplication of corresponding constants. At the
> same time
> > convert all current users.
> > 
> > No functional change.
> > 
> > Cc: Thomas Gleixner 
> > Cc: Ingo Molnar 
> > Cc: Peter Anvin 
> > Cc: Wolfram Sang 
> > Cc: Zhang Rui 
> > Cc: Eduardo Valentin 
> > Cc: Hock Leong Kweh 

Eduardo, Rui, can you provide your ACKs or comments about the patch?

> > 
> > Signed-off-by: Andy Shevchenko 
> > ---
> > Since v1:
> > - satisfy kbuild robot
> > 
> >  arch/x86/include/asm/iosf_mbi.h  | 49 +---
> --
> >  arch/x86/platform/atom/punit_atom_debug.c    |  7 +---
> >  arch/x86/platform/intel-quark/imr.c  | 28 +
> >  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
> >  drivers/powercap/intel_rapl.c    | 10 ++---
> >  drivers/thermal/intel_quark_dts_thermal.c    | 61 ++
> --
> >  drivers/thermal/intel_soc_dts_iosf.c | 43 ++
> --
> 
> Hmm. Either we get acks of all maintainers and merge it through
> tip/x86/... 

I prefer this way because…

> or we do the following:
> 
> Add the new constants w/o using them in a seperate patch and ship
> that
> linuswards now. Then the subsystem maintainers can pick the
> individual
> patches up and after the merge window closes we remove the old
> constants in one go.
> 
> Either way works for me.

…we are working on another fix which is based also on this patch. Can
you provide your ACK if you are okay with the changes to arch/x86 ?

> 
> Thanks,
> 
> tglx
> 
> 

-- 
Andy Shevchenko 
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-25 Thread Thomas Gleixner
On Wed, 25 Nov 2015, Andy Shevchenko wrote:
> …we are working on another fix which is based also on this patch. Can
> you provide your ACK if you are okay with the changes to arch/x86 ?

I'm fine with the patch. Once I have acks, I'll pick it up.

Thanks,

tglx

Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-24 Thread Wolfram Sang
On Wed, Nov 11, 2015 at 07:59:29PM +0200, Andy Shevchenko wrote:
> The read and write opcodes are global for all units on SoC and even across
> Intel SoCs. Remove duplication of corresponding constants. At the same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 
> 
> Signed-off-by: Andy Shevchenko 

For the I2C part:

Acked-by: Wolfram Sang 



signature.asc
Description: Digital signature


Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-24 Thread Andy Shevchenko
On Wed, 2015-11-11 at 19:59 +0200, Andy Shevchenko wrote:
> The read and write opcodes are global for all units on SoC and even
> across
> Intel SoCs. Remove duplication of corresponding constants. At the
> same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 

Any concerns, anyone?

Btw, this patch has been tested on Intel BayTrail and Braswell.

> 
> Signed-off-by: Andy Shevchenko 
> ---
> Since v1:
> - satisfy kbuild robot
> 
>  arch/x86/include/asm/iosf_mbi.h  | 49 +-
> 
>  arch/x86/platform/atom/punit_atom_debug.c|  7 +---
>  arch/x86/platform/intel-quark/imr.c  | 28 +
>  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
>  drivers/powercap/intel_rapl.c| 10 ++---
>  drivers/thermal/intel_quark_dts_thermal.c| 61 ++--
> 
>  drivers/thermal/intel_soc_dts_iosf.c | 43 ++--
> 
>  7 files changed, 85 insertions(+), 130 deletions(-)
> 
> diff --git a/arch/x86/include/asm/iosf_mbi.h
> b/arch/x86/include/asm/iosf_mbi.h
> index b72ad0f..cdc5f63 100644
> --- a/arch/x86/include/asm/iosf_mbi.h
> +++ b/arch/x86/include/asm/iosf_mbi.h
> @@ -1,5 +1,5 @@
>  /*
> - * iosf_mbi.h: Intel OnChip System Fabric MailBox access support
> + * Intel OnChip System Fabric MailBox access support
>   */
>  
>  #ifndef IOSF_MBI_SYMS_H
> @@ -16,6 +16,16 @@
>  #define MBI_MASK_LO  0x00FF
>  #define MBI_ENABLE   0xF0
>  
> +/* IOSF SB read/write opcodes */
> +#define MBI_MMIO_READ0x00
> +#define MBI_MMIO_WRITE   0x01
> +#define MBI_CR_READ  0x06
> +#define MBI_CR_WRITE 0x07
> +#define MBI_REG_READ 0x10
> +#define MBI_REG_WRITE0x11
> +#define MBI_ESRAM_READ   0x12
> +#define MBI_ESRAM_WRITE  0x13
> +
>  /* Baytrail available units */
>  #define BT_MBI_UNIT_AUNIT0x00
>  #define BT_MBI_UNIT_SMC  0x01
> @@ -28,50 +38,13 @@
>  #define BT_MBI_UNIT_SATA 0xA3
>  #define BT_MBI_UNIT_PCIE 0xA6
>  
> -/* Baytrail read/write opcodes */
> -#define BT_MBI_AUNIT_READ0x10
> -#define BT_MBI_AUNIT_WRITE   0x11
> -#define BT_MBI_SMC_READ  0x10
> -#define BT_MBI_SMC_WRITE 0x11
> -#define BT_MBI_CPU_READ  0x10
> -#define BT_MBI_CPU_WRITE 0x11
> -#define BT_MBI_BUNIT_READ0x10
> -#define BT_MBI_BUNIT_WRITE   0x11
> -#define BT_MBI_PMC_READ  0x06
> -#define BT_MBI_PMC_WRITE 0x07
> -#define BT_MBI_GFX_READ  0x00
> -#define BT_MBI_GFX_WRITE 0x01
> -#define BT_MBI_SMIO_READ 0x06
> -#define BT_MBI_SMIO_WRITE0x07
> -#define BT_MBI_USB_READ  0x06
> -#define BT_MBI_USB_WRITE 0x07
> -#define BT_MBI_SATA_READ 0x00
> -#define BT_MBI_SATA_WRITE0x01
> -#define BT_MBI_PCIE_READ 0x00
> -#define BT_MBI_PCIE_WRITE0x01
> -
>  /* Quark available units */
>  #define QRK_MBI_UNIT_HBA 0x00
>  #define QRK_MBI_UNIT_HB  0x03
>  #define QRK_MBI_UNIT_RMU 0x04
>  #define QRK_MBI_UNIT_MM  0x05
> -#define QRK_MBI_UNIT_MMESRAM 0x05
>  #define QRK_MBI_UNIT_SOC 0x31
>  
> -/* Quark read/write opcodes */
> -#define QRK_MBI_HBA_READ 0x10
> -#define QRK_MBI_HBA_WRITE0x11
> -#define QRK_MBI_HB_READ  0x10
> -#define QRK_MBI_HB_WRITE 0x11
> -#define QRK_MBI_RMU_READ 0x10
> -#define QRK_MBI_RMU_WRITE0x11
> -#define QRK_MBI_MM_READ  0x10
> -#define QRK_MBI_MM_WRITE 0x11
> -#define QRK_MBI_MMESRAM_READ 0x12
> -#define QRK_MBI_MMESRAM_WRITE0x13
> -#define QRK_MBI_SOC_READ 0x06
> -#define QRK_MBI_SOC_WRITE0x07
> -
>  #if IS_ENABLED(CONFIG_IOSF_MBI)
>  
>  bool iosf_mbi_available(void);
> diff --git a/arch/x86/platform/atom/punit_atom_debug.c
> b/arch/x86/platform/atom/punit_atom_debug.c
> index 5ca8ead..81c769e 100644
> --- a/arch/x86/platform/atom/punit_atom_debug.c
> +++ b/arch/x86/platform/atom/punit_atom_debug.c
> @@ -25,8 +25,6 @@
>  #include 
>  #include 
>  
> -/* Side band Interface port */
> -#define PUNIT_PORT   0x04
>  /* Power gate status reg */
>  #define PWRGT_STATUS 0x61
>  /* Subsystem config/status Video processor */
> @@ -85,9 +83,8 @@ static int punit_dev_state_show(struct seq_file
> *seq_file, void *unused)
>  
>   seq_puts(seq_file, "\n\nPUNIT NORTH COMPLEX DEVICES :\n");
>   while (punit_devp->name) {
> - status = iosf_mbi_read(PUNIT_PORT, BT_MBI_PMC_READ,
> -    punit_devp->reg,
> -    _pwr_status);
> + status = iosf_mbi_read(BT_MBI_UNIT_PMC,
> MBI_REG_READ,
> +    punit_devp->reg,
> _pwr_status);
>   if (status) {
>   seq_printf(seq_file, "%9s : Read Failed\n",
>    

Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-24 Thread Andy Shevchenko
On Wed, 2015-11-11 at 19:59 +0200, Andy Shevchenko wrote:
> The read and write opcodes are global for all units on SoC and even
> across
> Intel SoCs. Remove duplication of corresponding constants. At the
> same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 

Any concerns, anyone?

Btw, this patch has been tested on Intel BayTrail and Braswell.

> 
> Signed-off-by: Andy Shevchenko 
> ---
> Since v1:
> - satisfy kbuild robot
> 
>  arch/x86/include/asm/iosf_mbi.h  | 49 +-
> 
>  arch/x86/platform/atom/punit_atom_debug.c|  7 +---
>  arch/x86/platform/intel-quark/imr.c  | 28 +
>  drivers/i2c/busses/i2c-designware-baytrail.c | 17 +++-
>  drivers/powercap/intel_rapl.c| 10 ++---
>  drivers/thermal/intel_quark_dts_thermal.c| 61 ++--
> 
>  drivers/thermal/intel_soc_dts_iosf.c | 43 ++--
> 
>  7 files changed, 85 insertions(+), 130 deletions(-)
> 
> diff --git a/arch/x86/include/asm/iosf_mbi.h
> b/arch/x86/include/asm/iosf_mbi.h
> index b72ad0f..cdc5f63 100644
> --- a/arch/x86/include/asm/iosf_mbi.h
> +++ b/arch/x86/include/asm/iosf_mbi.h
> @@ -1,5 +1,5 @@
>  /*
> - * iosf_mbi.h: Intel OnChip System Fabric MailBox access support
> + * Intel OnChip System Fabric MailBox access support
>   */
>  
>  #ifndef IOSF_MBI_SYMS_H
> @@ -16,6 +16,16 @@
>  #define MBI_MASK_LO  0x00FF
>  #define MBI_ENABLE   0xF0
>  
> +/* IOSF SB read/write opcodes */
> +#define MBI_MMIO_READ0x00
> +#define MBI_MMIO_WRITE   0x01
> +#define MBI_CR_READ  0x06
> +#define MBI_CR_WRITE 0x07
> +#define MBI_REG_READ 0x10
> +#define MBI_REG_WRITE0x11
> +#define MBI_ESRAM_READ   0x12
> +#define MBI_ESRAM_WRITE  0x13
> +
>  /* Baytrail available units */
>  #define BT_MBI_UNIT_AUNIT0x00
>  #define BT_MBI_UNIT_SMC  0x01
> @@ -28,50 +38,13 @@
>  #define BT_MBI_UNIT_SATA 0xA3
>  #define BT_MBI_UNIT_PCIE 0xA6
>  
> -/* Baytrail read/write opcodes */
> -#define BT_MBI_AUNIT_READ0x10
> -#define BT_MBI_AUNIT_WRITE   0x11
> -#define BT_MBI_SMC_READ  0x10
> -#define BT_MBI_SMC_WRITE 0x11
> -#define BT_MBI_CPU_READ  0x10
> -#define BT_MBI_CPU_WRITE 0x11
> -#define BT_MBI_BUNIT_READ0x10
> -#define BT_MBI_BUNIT_WRITE   0x11
> -#define BT_MBI_PMC_READ  0x06
> -#define BT_MBI_PMC_WRITE 0x07
> -#define BT_MBI_GFX_READ  0x00
> -#define BT_MBI_GFX_WRITE 0x01
> -#define BT_MBI_SMIO_READ 0x06
> -#define BT_MBI_SMIO_WRITE0x07
> -#define BT_MBI_USB_READ  0x06
> -#define BT_MBI_USB_WRITE 0x07
> -#define BT_MBI_SATA_READ 0x00
> -#define BT_MBI_SATA_WRITE0x01
> -#define BT_MBI_PCIE_READ 0x00
> -#define BT_MBI_PCIE_WRITE0x01
> -
>  /* Quark available units */
>  #define QRK_MBI_UNIT_HBA 0x00
>  #define QRK_MBI_UNIT_HB  0x03
>  #define QRK_MBI_UNIT_RMU 0x04
>  #define QRK_MBI_UNIT_MM  0x05
> -#define QRK_MBI_UNIT_MMESRAM 0x05
>  #define QRK_MBI_UNIT_SOC 0x31
>  
> -/* Quark read/write opcodes */
> -#define QRK_MBI_HBA_READ 0x10
> -#define QRK_MBI_HBA_WRITE0x11
> -#define QRK_MBI_HB_READ  0x10
> -#define QRK_MBI_HB_WRITE 0x11
> -#define QRK_MBI_RMU_READ 0x10
> -#define QRK_MBI_RMU_WRITE0x11
> -#define QRK_MBI_MM_READ  0x10
> -#define QRK_MBI_MM_WRITE 0x11
> -#define QRK_MBI_MMESRAM_READ 0x12
> -#define QRK_MBI_MMESRAM_WRITE0x13
> -#define QRK_MBI_SOC_READ 0x06
> -#define QRK_MBI_SOC_WRITE0x07
> -
>  #if IS_ENABLED(CONFIG_IOSF_MBI)
>  
>  bool iosf_mbi_available(void);
> diff --git a/arch/x86/platform/atom/punit_atom_debug.c
> b/arch/x86/platform/atom/punit_atom_debug.c
> index 5ca8ead..81c769e 100644
> --- a/arch/x86/platform/atom/punit_atom_debug.c
> +++ b/arch/x86/platform/atom/punit_atom_debug.c
> @@ -25,8 +25,6 @@
>  #include 
>  #include 
>  
> -/* Side band Interface port */
> -#define PUNIT_PORT   0x04
>  /* Power gate status reg */
>  #define PWRGT_STATUS 0x61
>  /* Subsystem config/status Video processor */
> @@ -85,9 +83,8 @@ static int punit_dev_state_show(struct seq_file
> *seq_file, void *unused)
>  
>   seq_puts(seq_file, "\n\nPUNIT NORTH COMPLEX DEVICES :\n");
>   while (punit_devp->name) {
> - status = iosf_mbi_read(PUNIT_PORT, BT_MBI_PMC_READ,
> -    punit_devp->reg,
> -    _pwr_status);
> + status = iosf_mbi_read(BT_MBI_UNIT_PMC,
> MBI_REG_READ,
> +  

Re: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-11-24 Thread Wolfram Sang
On Wed, Nov 11, 2015 at 07:59:29PM +0200, Andy Shevchenko wrote:
> The read and write opcodes are global for all units on SoC and even across
> Intel SoCs. Remove duplication of corresponding constants. At the same time
> convert all current users.
> 
> No functional change.
> 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Peter Anvin 
> Cc: Wolfram Sang 
> Cc: Zhang Rui 
> Cc: Eduardo Valentin 
> Cc: Hock Leong Kweh 
> 
> Signed-off-by: Andy Shevchenko 

For the I2C part:

Acked-by: Wolfram Sang 



signature.asc
Description: Digital signature