diff mbox series

[Linaro-uefi,linaro-uefi,v1,25/32] D05/ACPI: Modify I2C device

Message ID 1505829398-52214-26-git-send-email-heyi.guo@linaro.org
State Superseded
Headers show
Series Update D03/D05 binary for edk update and fix some error. | expand

Commit Message

gary guo Sept. 19, 2017, 1:56 p.m. UTC
From: Ming Huang <waip23@foxmail.com>

1. Disable I2C0 device avoiding access conflict in OS;
2. Modify name of _HID for matching the string in OS driver;

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ming Huang <huangming23@huawei.com>
---
 Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

Comments

Graeme Gregory Sept. 21, 2017, 11:50 a.m. UTC | #1
On Tue, Sep 19, 2017 at 09:56:31PM +0800, Heyi Guo wrote:
> From: Ming Huang <waip23@foxmail.com>

> 

> 1. Disable I2C0 device avoiding access conflict in OS;

> 2. Modify name of _HID for matching the string in OS driver;

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ming Huang <huangming23@huawei.com>

> ---

>  Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl | 20 +-------------------

>  1 file changed, 1 insertion(+), 19 deletions(-)

> 

> diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> index eb906ef..3cc60d1 100644

> --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> @@ -18,26 +18,8 @@

>  

>  Scope(_SB)

>  {

> -  Device(I2C0) {

> -    Name(_HID, "APMC0D0F")

> -    Name(_CID, "APMC0D0F")

> -    Name(_CRS, ResourceTemplate() {

> -      Memory32Fixed(ReadWrite, 0xd00e0000, 0x10000)

> -      Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI6") { 705 }

> -    })

> -    Name (_DSD, Package () {

> -      ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),

> -      Package () {

> -        Package () {"clock-frequency", 100000},

> -        Package () {"i2c-sda-falling-time-ns", 913},

> -        Package () {"i2c-scl-falling-time-ns", 303},

> -        Package () {"i2c-sda-hold-time-ns", 0x9c2},

> -      }

> -    })

> -  }

> -

>    Device(I2C2) {

> -    Name(_HID, "APMC0D0F")

> +    Name(_HID, "HISI02A1")

>      Name(_CID, "APMC0D0F")

>      Name(_CRS, ResourceTemplate() {

>        Memory32Fixed(ReadWrite, 0xd0100000, 0x10000)


Is this change backwards compatible?

ERP 17.08 must also run on this firmware.

Graeme
Graeme Gregory Sept. 21, 2017, 12:10 p.m. UTC | #2
On Thu, Sep 21, 2017 at 12:50:23PM +0100, graeme.gregory@linaro.org wrote:
> On Tue, Sep 19, 2017 at 09:56:31PM +0800, Heyi Guo wrote:

> > From: Ming Huang <waip23@foxmail.com>

> >

> > 1. Disable I2C0 device avoiding access conflict in OS;

> > 2. Modify name of _HID for matching the string in OS driver;

> >

> > Contributed-under: TianoCore Contribution Agreement 1.0

> > Signed-off-by: Ming Huang <huangming23@huawei.com>

> > ---

> >  Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl | 20 +-------------------

> >  1 file changed, 1 insertion(+), 19 deletions(-)

> >

> > diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > index eb906ef..3cc60d1 100644

> > --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > @@ -18,26 +18,8 @@

> >

> >  Scope(_SB)

> >  {

> > -  Device(I2C0) {

> > -    Name(_HID, "APMC0D0F")

> > -    Name(_CID, "APMC0D0F")

> > -    Name(_CRS, ResourceTemplate() {

> > -      Memory32Fixed(ReadWrite, 0xd00e0000, 0x10000)

> > -      Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI6") { 705 }

> > -    })

> > -    Name (_DSD, Package () {

> > -      ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),

> > -      Package () {

> > -        Package () {"clock-frequency", 100000},

> > -        Package () {"i2c-sda-falling-time-ns", 913},

> > -        Package () {"i2c-scl-falling-time-ns", 303},

> > -        Package () {"i2c-sda-hold-time-ns", 0x9c2},

> > -      }

> > -    })

> > -  }

> > -

> >    Device(I2C2) {

> > -    Name(_HID, "APMC0D0F")

> > +    Name(_HID, "HISI02A1")

> >      Name(_CID, "APMC0D0F")

> >      Name(_CRS, ResourceTemplate() {

> >        Memory32Fixed(ReadWrite, 0xd0100000, 0x10000)

>

> Is this change backwards compatible?

>

> ERP 17.08 must also run on this firmware.

>

Just to clarify, its not 100% clear to me from commit message I2C0 is
not used by the kernel.

If it was always unused that I see nothing wrong with this change.

Graeme
Huangming (Mark) Sept. 22, 2017, 9:46 a.m. UTC | #3
It's backwards compatible. the I2C0 is not use in kernel.

-----邮件原件-----
发件人: graeme.gregory@linaro.org [mailto:graeme.gregory@linaro.org]
发送时间: 2017年9月21日 20:11
收件人: Heyi Guo <heyi.guo@linaro.org>
抄送: leif.lindholm@linaro.org; linaro-uefi@lists.linaro.org; ard.biesheuvel@linaro.org; Guoheyi <guoheyi@huawei.com>; wanghuiqiang <wanghuiqiang@huawei.com>; Huangming (Mark) <huangming23@huawei.com>; zhangjinsong (A) <zhangjinsong2@huawei.com>; Ming Huang <waip23@foxmail.com>
主题: Re: [linaro-uefi v1 25/32] D05/ACPI: Modify I2C device

On Thu, Sep 21, 2017 at 12:50:23PM +0100, graeme.gregory@linaro.org wrote:
> On Tue, Sep 19, 2017 at 09:56:31PM +0800, Heyi Guo wrote:

> > From: Ming Huang <waip23@foxmail.com>

> >

> > 1. Disable I2C0 device avoiding access conflict in OS; 2. Modify 

> > name of _HID for matching the string in OS driver;

> >

> > Contributed-under: TianoCore Contribution Agreement 1.0

> > Signed-off-by: Ming Huang <huangming23@huawei.com>

> > ---

> >  Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl | 20

> > +-------------------

> >  1 file changed, 1 insertion(+), 19 deletions(-)

> >

> > diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > index eb906ef..3cc60d1 100644

> > --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl

> > @@ -18,26 +18,8 @@

> >

> >  Scope(_SB)

> >  {

> > -  Device(I2C0) {

> > -    Name(_HID, "APMC0D0F")

> > -    Name(_CID, "APMC0D0F")

> > -    Name(_CRS, ResourceTemplate() {

> > -      Memory32Fixed(ReadWrite, 0xd00e0000, 0x10000)

> > -      Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI6") { 705 }

> > -    })

> > -    Name (_DSD, Package () {

> > -      ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),

> > -      Package () {

> > -        Package () {"clock-frequency", 100000},

> > -        Package () {"i2c-sda-falling-time-ns", 913},

> > -        Package () {"i2c-scl-falling-time-ns", 303},

> > -        Package () {"i2c-sda-hold-time-ns", 0x9c2},

> > -      }

> > -    })

> > -  }

> > -

> >    Device(I2C2) {

> > -    Name(_HID, "APMC0D0F")

> > +    Name(_HID, "HISI02A1")

> >      Name(_CID, "APMC0D0F")

> >      Name(_CRS, ResourceTemplate() {

> >        Memory32Fixed(ReadWrite, 0xd0100000, 0x10000)

>

> Is this change backwards compatible?

>

> ERP 17.08 must also run on this firmware.

>

Just to clarify, its not 100% clear to me from commit message I2C0 is not used by the kernel.

If it was always unused that I see nothing wrong with this change.

Graeme
diff mbox series

Patch

diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl
index eb906ef..3cc60d1 100644
--- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl
+++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/D05I2c.asl
@@ -18,26 +18,8 @@ 
 
 Scope(_SB)
 {
-  Device(I2C0) {
-    Name(_HID, "APMC0D0F")
-    Name(_CID, "APMC0D0F")
-    Name(_CRS, ResourceTemplate() {
-      Memory32Fixed(ReadWrite, 0xd00e0000, 0x10000)
-      Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI6") { 705 }
-    })
-    Name (_DSD, Package () {
-      ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
-      Package () {
-        Package () {"clock-frequency", 100000},
-        Package () {"i2c-sda-falling-time-ns", 913},
-        Package () {"i2c-scl-falling-time-ns", 303},
-        Package () {"i2c-sda-hold-time-ns", 0x9c2},
-      }
-    })
-  }
-
   Device(I2C2) {
-    Name(_HID, "APMC0D0F")
+    Name(_HID, "HISI02A1")
     Name(_CID, "APMC0D0F")
     Name(_CRS, ResourceTemplate() {
       Memory32Fixed(ReadWrite, 0xd0100000, 0x10000)