2010-07-25 17:11:39

by Alexander Shishkin

[permalink] [raw]
Subject: [PATCH 5/7] omap3: move EMU peripheral addresses to a platform header

These addresses are also needed for the OFF code to save/restore the
contexts of the EMU peripherals correctly.

Signed-off-by: Alexander Shishkin <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Russell King <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
arch/arm/mach-omap2/emu.c | 14 ++++----------
arch/arm/plat-omap/include/plat/io.h | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index 9c442e2..6b41745 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -24,19 +24,13 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alexander Shishkin");

-/* Cortex CoreSight components within omap3xxx EMU */
-#define ETM_BASE (L4_EMU_34XX_PHYS + 0x10000)
-#define DBG_BASE (L4_EMU_34XX_PHYS + 0x11000)
-#define ETB_BASE (L4_EMU_34XX_PHYS + 0x1b000)
-#define DAPCTL (L4_EMU_34XX_PHYS + 0x1d000)
-
static struct amba_device omap3_etb_device = {
.dev = {
.init_name = "etb",
},
.res = {
- .start = ETB_BASE,
- .end = ETB_BASE + SZ_4K - 1,
+ .start = OMAP34XX_ETB_PHYS,
+ .end = OMAP34XX_ETB_PHYS + OMAP34XX_ETB_SIZE - 1,
.flags = IORESOURCE_MEM,
},
.periphid = 0x000bb907,
@@ -47,8 +41,8 @@ static struct amba_device omap3_etm_device = {
.init_name = "etm",
},
.res = {
- .start = ETM_BASE,
- .end = ETM_BASE + SZ_4K - 1,
+ .start = OMAP34XX_ETM_PHYS,
+ .end = OMAP34XX_ETM_PHYS + OMAP34XX_ETM_SIZE - 1,
.flags = IORESOURCE_MEM,
},
.periphid = 0x102bb921,
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 128b549..81f736a 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -185,6 +185,26 @@

/* 3430 IVA - currently unmapped */

+#define OMAP34XX_DBG_OFFSET (0x00011000)
+#define OMAP34XX_DBG_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_DBG_OFFSET)
+#define OMAP34XX_DBG_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_DBG_OFFSET)
+#define OMAP34XX_DBG_SIZE SZ_4K
+
+#define OMAP34XX_ETM_OFFSET (0x00010000)
+#define OMAP34XX_ETM_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_ETM_OFFSET)
+#define OMAP34XX_ETM_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_ETM_OFFSET)
+#define OMAP34XX_ETM_SIZE SZ_4K
+
+#define OMAP34XX_ETB_OFFSET (0x0001b000)
+#define OMAP34XX_ETB_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_ETB_OFFSET)
+#define OMAP34XX_ETB_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_ETB_OFFSET)
+#define OMAP34XX_ETB_SIZE SZ_4K
+
+#define OMAP34XX_DAP_OFFSET (0x0001d000)
+#define OMAP34XX_DAP_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_DAP_OFFSET)
+#define OMAP34XX_DAP_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_DAP_OFFSET)
+#define OMAP34XX_DAP_SIZE SZ_4K
+
/*
* ----------------------------------------------------------------------------
* Omap4 specific IO mapping
--
1.7.1


2010-07-26 07:04:14

by Santosh Shilimkar

[permalink] [raw]
Subject: RE: [PATCH 5/7] omap3: move EMU peripheral addresses to a platform header

> -----Original Message-----
> From: Alexander Shishkin [mailto:[email protected]]
> Sent: Sunday, July 25, 2010 10:35 PM
> To: [email protected]
> Cc: Alexander Shishkin; Tony Lindgren; Russell King; Paul Walmsley;
> Shilimkar, Santosh; Kevin Hilman; [email protected]; linux-
> [email protected]
> Subject: [PATCH 5/7] omap3: move EMU peripheral addresses to a platform
> header
>
> These addresses are also needed for the OFF code to save/restore the
> contexts of the EMU peripherals correctly.
>
> Signed-off-by: Alexander Shishkin <[email protected]>
> Cc: Tony Lindgren <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: Paul Walmsley <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
> Cc: Kevin Hilman <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> ---
> arch/arm/mach-omap2/emu.c | 14 ++++----------
> arch/arm/plat-omap/include/plat/io.h | 20 ++++++++++++++++++++
> 2 files changed, 24 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
> index 9c442e2..6b41745 100644
> --- a/arch/arm/mach-omap2/emu.c
> +++ b/arch/arm/mach-omap2/emu.c
> @@ -24,19 +24,13 @@
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Alexander Shishkin");
>
> -/* Cortex CoreSight components within omap3xxx EMU */
> -#define ETM_BASE (L4_EMU_34XX_PHYS + 0x10000)
> -#define DBG_BASE (L4_EMU_34XX_PHYS + 0x11000)
> -#define ETB_BASE (L4_EMU_34XX_PHYS + 0x1b000)
> -#define DAPCTL (L4_EMU_34XX_PHYS + 0x1d000)
> -
> static struct amba_device omap3_etb_device = {
> .dev = {
> .init_name = "etb",
> },
> .res = {
> - .start = ETB_BASE,
> - .end = ETB_BASE + SZ_4K - 1,
> + .start = OMAP34XX_ETB_PHYS,
> + .end = OMAP34XX_ETB_PHYS + OMAP34XX_ETB_SIZE - 1,
> .flags = IORESOURCE_MEM,
> },
> .periphid = 0x000bb907,
> @@ -47,8 +41,8 @@ static struct amba_device omap3_etm_device = {
> .init_name = "etm",
> },
> .res = {
> - .start = ETM_BASE,
> - .end = ETM_BASE + SZ_4K - 1,
> + .start = OMAP34XX_ETM_PHYS,
> + .end = OMAP34XX_ETM_PHYS + OMAP34XX_ETM_SIZE - 1,
> .flags = IORESOURCE_MEM,
> },
> .periphid = 0x102bb921,
> diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-
> omap/include/plat/io.h
> index 128b549..81f736a 100644
> --- a/arch/arm/plat-omap/include/plat/io.h
> +++ b/arch/arm/plat-omap/include/plat/io.h
> @@ -185,6 +185,26 @@
>
> /* 3430 IVA - currently unmapped */
>
> +#define OMAP34XX_DBG_OFFSET (0x00011000)
> +#define OMAP34XX_DBG_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_DBG_OFFSET)
> +#define OMAP34XX_DBG_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_DBG_OFFSET)
> +#define OMAP34XX_DBG_SIZE SZ_4K
> +
> +#define OMAP34XX_ETM_OFFSET (0x00010000)
> +#define OMAP34XX_ETM_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_ETM_OFFSET)
> +#define OMAP34XX_ETM_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_ETM_OFFSET)
> +#define OMAP34XX_ETM_SIZE SZ_4K
> +
> +#define OMAP34XX_ETB_OFFSET (0x0001b000)
> +#define OMAP34XX_ETB_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_ETB_OFFSET)
> +#define OMAP34XX_ETB_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_ETB_OFFSET)
> +#define OMAP34XX_ETB_SIZE SZ_4K
> +
> +#define OMAP34XX_DAP_OFFSET (0x0001d000)
> +#define OMAP34XX_DAP_VIRT (L4_EMU_34XX_VIRT + OMAP34XX_DAP_OFFSET)
> +#define OMAP34XX_DAP_PHYS (L4_EMU_34XX_PHYS + OMAP34XX_DAP_OFFSET)
> +#define OMAP34XX_DAP_SIZE SZ_4K
> +
Changes looks good to me.
Acked-by: Santosh Shilimkar <[email protected]>