diff mbox

[PATCHv2,05/11] tests: Adjust tco-test to use qpci_legacy_iomap()

Message ID 1476879941-14360-6-git-send-email-david@gibson.dropbear.id.au
State New
Headers show

Commit Message

David Gibson Oct. 19, 2016, 12:25 p.m. UTC
Avoid tco-test making assumptions about the internal format of the address
tokens passed to PCI IO accessors, by using the new qpci_legacy_iomap()
function.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 tests/tco-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Vivier Oct. 19, 2016, 1:35 p.m. UTC | #1
On 19/10/2016 14:25, David Gibson wrote:
> Avoid tco-test making assumptions about the internal format of the address
> tokens passed to PCI IO accessors, by using the new qpci_legacy_iomap()
> function.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

I think you should merge it with the previous one...

Anyway:

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

> ---
>  tests/tco-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/tco-test.c b/tests/tco-test.c
> index 0d201b1..129577d 100644
> --- a/tests/tco-test.c
> +++ b/tests/tco-test.c
> @@ -70,7 +70,7 @@ static void test_init(TestData *d)
>      /* set Root Complex BAR */
>      qpci_config_writel(d->dev, ICH9_LPC_RCBA, RCBA_BASE_ADDR | 0x1);
>  
> -    d->tco_io_base = (void *)((uintptr_t)PM_IO_BASE_ADDR + 0x60);
> +    d->tco_io_base = qpci_legacy_iomap(d->dev, PM_IO_BASE_ADDR + 0x60);
>  }
>  
>  static void stop_tco(const TestData *d)
>
diff mbox

Patch

diff --git a/tests/tco-test.c b/tests/tco-test.c
index 0d201b1..129577d 100644
--- a/tests/tco-test.c
+++ b/tests/tco-test.c
@@ -70,7 +70,7 @@  static void test_init(TestData *d)
     /* set Root Complex BAR */
     qpci_config_writel(d->dev, ICH9_LPC_RCBA, RCBA_BASE_ADDR | 0x1);
 
-    d->tco_io_base = (void *)((uintptr_t)PM_IO_BASE_ADDR + 0x60);
+    d->tco_io_base = qpci_legacy_iomap(d->dev, PM_IO_BASE_ADDR + 0x60);
 }
 
 static void stop_tco(const TestData *d)