Re: [U-Boot] [RFC PATCH 2/8] arm: actions: Add owl memory map regions

2019-01-05 Thread Manivannan Sadhasivam
On Sun, Jan 06, 2019 at 01:16:43AM +, André Przywara wrote:
> On 05/01/2019 18:27, Manivannan Sadhasivam wrote:
> 
> Hi,
> 
> > On Thu, Jan 03, 2019 at 06:56:17PM +0530, Amit Singh Tomar wrote:
> >> This adds memory regions needed to setup MMU for actions
> >> S900 and S700 SoCs.
> >>
> >> Signed-off-by: Amit Singh Tomar 
> >> ---
> >>  arch/arm/mach-owl/Makefile  |  1 +
> >>  arch/arm/mach-owl/sysmap-owl.c  | 32 
> >>  arch/arm/mach-owl/sysmap-s900.c | 32 
> >>  3 files changed, 33 insertions(+), 32 deletions(-)
> >>  create mode 100644 arch/arm/mach-owl/sysmap-owl.c
> >>  delete mode 100644 arch/arm/mach-owl/sysmap-s900.c
> >>
> >> diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile
> >> index 2a76ee0..417c859 100644
> >> --- a/arch/arm/mach-owl/Makefile
> >> +++ b/arch/arm/mach-owl/Makefile
> >> @@ -1,3 +1,4 @@
> >>  # SPDX-License-Identifier:GPL-2.0+
> >>  
> >>  obj-y += soc.o
> >> +obj-y += sysmap-owl.o
> >> diff --git a/arch/arm/mach-owl/sysmap-owl.c 
> >> b/arch/arm/mach-owl/sysmap-owl.c
> >> new file mode 100644
> >> index 000..9dc4a05
> >> --- /dev/null
> >> +++ b/arch/arm/mach-owl/sysmap-owl.c
> >> @@ -0,0 +1,32 @@
> >> +// SPDX-License-Identifier: GPL-2.0+
> >> +/*
> >> + * Actions Semi S900/S700 Memory map
> >> + *
> >> + * Copyright (C) 2015 Actions Semi Co., Ltd.
> >> + * Copyright (C) 2018 Manivannan Sadhasivam 
> >> 
> >> + */
> >> +
> >> +#include 
> > 
> > You might want to wrap the below contents with CONFIG_ARM64 since S500
> > has different memory map and it is an ARMv7 SoC.
> 
> If I am not mistaken, we need that struct mm_region only for v8 parts.
> So that would be better handled in the Makefile instead?
> 
> obj-$(CONFIG_ARM64) += sysmap-owl.o
> 

Yes, this makes sense!

Thanks,
Mani

> Cheers,
> Andre.
> > 
> >> +#include 
> >> +
> >> +static struct mm_region owl_mem_map[] = {
> >> +  {
> >> +  .virt = 0x0UL, /* DDR */
> >> +  .phys = 0x0UL, /* DDR */
> >> +  .size = 0x8000UL,
> >> +  .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> >> +   PTE_BLOCK_INNER_SHARE
> >> +  }, {
> >> +  .virt = 0xE000UL, /* Peripheral block */
> >> +  .phys = 0xE000UL, /* Peripheral block */
> >> +  .size = 0x0800UL,
> >> +  .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> >> +   PTE_BLOCK_NON_SHARE |
> >> +   PTE_BLOCK_PXN | PTE_BLOCK_UXN
> >> +  }, {
> >> +  /* List terminator */
> >> +  0,
> >> +  }
> >> +};
> >> +
> >> +struct mm_region *mem_map = owl_mem_map;
> >> diff --git a/arch/arm/mach-owl/sysmap-s900.c 
> >> b/arch/arm/mach-owl/sysmap-s900.c
> >> deleted file mode 100644
> >> index f78b639..000
> >> --- a/arch/arm/mach-owl/sysmap-s900.c
> >> +++ /dev/null
> >> @@ -1,32 +0,0 @@
> >> -// SPDX-License-Identifier: GPL-2.0+
> >> -/*
> >> - * Actions Semi S900 Memory map
> >> - *
> >> - * Copyright (C) 2015 Actions Semi Co., Ltd.
> >> - * Copyright (C) 2018 Manivannan Sadhasivam 
> >> 
> >> - */
> >> -
> >> -#include 
> >> -#include 
> >> -
> >> -static struct mm_region s900_mem_map[] = {
> >> -  {
> >> -  .virt = 0x0UL, /* DDR */
> >> -  .phys = 0x0UL, /* DDR */
> >> -  .size = 0x8000UL,
> >> -  .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> >> -   PTE_BLOCK_INNER_SHARE
> >> -  }, {
> >> -  .virt = 0xE000UL, /* Peripheral block */
> >> -  .phys = 0xE000UL, /* Peripheral block */
> >> -  .size = 0x0800UL,
> >> -  .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> >> -   PTE_BLOCK_NON_SHARE |
> >> -   PTE_BLOCK_PXN | PTE_BLOCK_UXN
> >> -  }, {
> >> -  /* List terminator */
> >> -  0,
> >> -  }
> >> -};
> >> -
> >> -struct mm_region *mem_map = s900_mem_map;
> >> -- 
> >> 2.7.4
> >>
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 2/8] arm: actions: Add owl memory map regions

2019-01-05 Thread André Przywara
On 05/01/2019 18:27, Manivannan Sadhasivam wrote:

Hi,

> On Thu, Jan 03, 2019 at 06:56:17PM +0530, Amit Singh Tomar wrote:
>> This adds memory regions needed to setup MMU for actions
>> S900 and S700 SoCs.
>>
>> Signed-off-by: Amit Singh Tomar 
>> ---
>>  arch/arm/mach-owl/Makefile  |  1 +
>>  arch/arm/mach-owl/sysmap-owl.c  | 32 
>>  arch/arm/mach-owl/sysmap-s900.c | 32 
>>  3 files changed, 33 insertions(+), 32 deletions(-)
>>  create mode 100644 arch/arm/mach-owl/sysmap-owl.c
>>  delete mode 100644 arch/arm/mach-owl/sysmap-s900.c
>>
>> diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile
>> index 2a76ee0..417c859 100644
>> --- a/arch/arm/mach-owl/Makefile
>> +++ b/arch/arm/mach-owl/Makefile
>> @@ -1,3 +1,4 @@
>>  # SPDX-License-Identifier:  GPL-2.0+
>>  
>>  obj-y += soc.o
>> +obj-y += sysmap-owl.o
>> diff --git a/arch/arm/mach-owl/sysmap-owl.c b/arch/arm/mach-owl/sysmap-owl.c
>> new file mode 100644
>> index 000..9dc4a05
>> --- /dev/null
>> +++ b/arch/arm/mach-owl/sysmap-owl.c
>> @@ -0,0 +1,32 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * Actions Semi S900/S700 Memory map
>> + *
>> + * Copyright (C) 2015 Actions Semi Co., Ltd.
>> + * Copyright (C) 2018 Manivannan Sadhasivam 
>> 
>> + */
>> +
>> +#include 
> 
> You might want to wrap the below contents with CONFIG_ARM64 since S500
> has different memory map and it is an ARMv7 SoC.

If I am not mistaken, we need that struct mm_region only for v8 parts.
So that would be better handled in the Makefile instead?

obj-$(CONFIG_ARM64) += sysmap-owl.o

Cheers,
Andre.
> 
>> +#include 
>> +
>> +static struct mm_region owl_mem_map[] = {
>> +{
>> +.virt = 0x0UL, /* DDR */
>> +.phys = 0x0UL, /* DDR */
>> +.size = 0x8000UL,
>> +.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
>> + PTE_BLOCK_INNER_SHARE
>> +}, {
>> +.virt = 0xE000UL, /* Peripheral block */
>> +.phys = 0xE000UL, /* Peripheral block */
>> +.size = 0x0800UL,
>> +.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
>> + PTE_BLOCK_NON_SHARE |
>> + PTE_BLOCK_PXN | PTE_BLOCK_UXN
>> +}, {
>> +/* List terminator */
>> +0,
>> +}
>> +};
>> +
>> +struct mm_region *mem_map = owl_mem_map;
>> diff --git a/arch/arm/mach-owl/sysmap-s900.c 
>> b/arch/arm/mach-owl/sysmap-s900.c
>> deleted file mode 100644
>> index f78b639..000
>> --- a/arch/arm/mach-owl/sysmap-s900.c
>> +++ /dev/null
>> @@ -1,32 +0,0 @@
>> -// SPDX-License-Identifier: GPL-2.0+
>> -/*
>> - * Actions Semi S900 Memory map
>> - *
>> - * Copyright (C) 2015 Actions Semi Co., Ltd.
>> - * Copyright (C) 2018 Manivannan Sadhasivam 
>> 
>> - */
>> -
>> -#include 
>> -#include 
>> -
>> -static struct mm_region s900_mem_map[] = {
>> -{
>> -.virt = 0x0UL, /* DDR */
>> -.phys = 0x0UL, /* DDR */
>> -.size = 0x8000UL,
>> -.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
>> - PTE_BLOCK_INNER_SHARE
>> -}, {
>> -.virt = 0xE000UL, /* Peripheral block */
>> -.phys = 0xE000UL, /* Peripheral block */
>> -.size = 0x0800UL,
>> -.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
>> - PTE_BLOCK_NON_SHARE |
>> - PTE_BLOCK_PXN | PTE_BLOCK_UXN
>> -}, {
>> -/* List terminator */
>> -0,
>> -}
>> -};
>> -
>> -struct mm_region *mem_map = s900_mem_map;
>> -- 
>> 2.7.4
>>

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 2/8] arm: actions: Add owl memory map regions

2019-01-05 Thread Manivannan Sadhasivam
On Thu, Jan 03, 2019 at 06:56:17PM +0530, Amit Singh Tomar wrote:
> This adds memory regions needed to setup MMU for actions
> S900 and S700 SoCs.
> 
> Signed-off-by: Amit Singh Tomar 
> ---
>  arch/arm/mach-owl/Makefile  |  1 +
>  arch/arm/mach-owl/sysmap-owl.c  | 32 
>  arch/arm/mach-owl/sysmap-s900.c | 32 
>  3 files changed, 33 insertions(+), 32 deletions(-)
>  create mode 100644 arch/arm/mach-owl/sysmap-owl.c
>  delete mode 100644 arch/arm/mach-owl/sysmap-s900.c
> 
> diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile
> index 2a76ee0..417c859 100644
> --- a/arch/arm/mach-owl/Makefile
> +++ b/arch/arm/mach-owl/Makefile
> @@ -1,3 +1,4 @@
>  # SPDX-License-Identifier:   GPL-2.0+
>  
>  obj-y += soc.o
> +obj-y += sysmap-owl.o
> diff --git a/arch/arm/mach-owl/sysmap-owl.c b/arch/arm/mach-owl/sysmap-owl.c
> new file mode 100644
> index 000..9dc4a05
> --- /dev/null
> +++ b/arch/arm/mach-owl/sysmap-owl.c
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Actions Semi S900/S700 Memory map
> + *
> + * Copyright (C) 2015 Actions Semi Co., Ltd.
> + * Copyright (C) 2018 Manivannan Sadhasivam 
> 
> + */
> +
> +#include 

You might want to wrap the below contents with CONFIG_ARM64 since S500
has different memory map and it is an ARMv7 SoC.

Thanks,
Mani

> +#include 
> +
> +static struct mm_region owl_mem_map[] = {
> + {
> + .virt = 0x0UL, /* DDR */
> + .phys = 0x0UL, /* DDR */
> + .size = 0x8000UL,
> + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> +  PTE_BLOCK_INNER_SHARE
> + }, {
> + .virt = 0xE000UL, /* Peripheral block */
> + .phys = 0xE000UL, /* Peripheral block */
> + .size = 0x0800UL,
> + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> +  PTE_BLOCK_NON_SHARE |
> +  PTE_BLOCK_PXN | PTE_BLOCK_UXN
> + }, {
> + /* List terminator */
> + 0,
> + }
> +};
> +
> +struct mm_region *mem_map = owl_mem_map;
> diff --git a/arch/arm/mach-owl/sysmap-s900.c b/arch/arm/mach-owl/sysmap-s900.c
> deleted file mode 100644
> index f78b639..000
> --- a/arch/arm/mach-owl/sysmap-s900.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * Actions Semi S900 Memory map
> - *
> - * Copyright (C) 2015 Actions Semi Co., Ltd.
> - * Copyright (C) 2018 Manivannan Sadhasivam 
> 
> - */
> -
> -#include 
> -#include 
> -
> -static struct mm_region s900_mem_map[] = {
> - {
> - .virt = 0x0UL, /* DDR */
> - .phys = 0x0UL, /* DDR */
> - .size = 0x8000UL,
> - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> -  PTE_BLOCK_INNER_SHARE
> - }, {
> - .virt = 0xE000UL, /* Peripheral block */
> - .phys = 0xE000UL, /* Peripheral block */
> - .size = 0x0800UL,
> - .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> -  PTE_BLOCK_NON_SHARE |
> -  PTE_BLOCK_PXN | PTE_BLOCK_UXN
> - }, {
> - /* List terminator */
> - 0,
> - }
> -};
> -
> -struct mm_region *mem_map = s900_mem_map;
> -- 
> 2.7.4
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [RFC PATCH 2/8] arm: actions: Add owl memory map regions

2019-01-03 Thread Amit Singh Tomar
This adds memory regions needed to setup MMU for actions
S900 and S700 SoCs.

Signed-off-by: Amit Singh Tomar 
---
 arch/arm/mach-owl/Makefile  |  1 +
 arch/arm/mach-owl/sysmap-owl.c  | 32 
 arch/arm/mach-owl/sysmap-s900.c | 32 
 3 files changed, 33 insertions(+), 32 deletions(-)
 create mode 100644 arch/arm/mach-owl/sysmap-owl.c
 delete mode 100644 arch/arm/mach-owl/sysmap-s900.c

diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile
index 2a76ee0..417c859 100644
--- a/arch/arm/mach-owl/Makefile
+++ b/arch/arm/mach-owl/Makefile
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 obj-y += soc.o
+obj-y += sysmap-owl.o
diff --git a/arch/arm/mach-owl/sysmap-owl.c b/arch/arm/mach-owl/sysmap-owl.c
new file mode 100644
index 000..9dc4a05
--- /dev/null
+++ b/arch/arm/mach-owl/sysmap-owl.c
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Actions Semi S900/S700 Memory map
+ *
+ * Copyright (C) 2015 Actions Semi Co., Ltd.
+ * Copyright (C) 2018 Manivannan Sadhasivam 
+ */
+
+#include 
+#include 
+
+static struct mm_region owl_mem_map[] = {
+   {
+   .virt = 0x0UL, /* DDR */
+   .phys = 0x0UL, /* DDR */
+   .size = 0x8000UL,
+   .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+PTE_BLOCK_INNER_SHARE
+   }, {
+   .virt = 0xE000UL, /* Peripheral block */
+   .phys = 0xE000UL, /* Peripheral block */
+   .size = 0x0800UL,
+   .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+PTE_BLOCK_NON_SHARE |
+PTE_BLOCK_PXN | PTE_BLOCK_UXN
+   }, {
+   /* List terminator */
+   0,
+   }
+};
+
+struct mm_region *mem_map = owl_mem_map;
diff --git a/arch/arm/mach-owl/sysmap-s900.c b/arch/arm/mach-owl/sysmap-s900.c
deleted file mode 100644
index f78b639..000
--- a/arch/arm/mach-owl/sysmap-s900.c
+++ /dev/null
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Actions Semi S900 Memory map
- *
- * Copyright (C) 2015 Actions Semi Co., Ltd.
- * Copyright (C) 2018 Manivannan Sadhasivam 
- */
-
-#include 
-#include 
-
-static struct mm_region s900_mem_map[] = {
-   {
-   .virt = 0x0UL, /* DDR */
-   .phys = 0x0UL, /* DDR */
-   .size = 0x8000UL,
-   .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
-PTE_BLOCK_INNER_SHARE
-   }, {
-   .virt = 0xE000UL, /* Peripheral block */
-   .phys = 0xE000UL, /* Peripheral block */
-   .size = 0x0800UL,
-   .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
-PTE_BLOCK_NON_SHARE |
-PTE_BLOCK_PXN | PTE_BLOCK_UXN
-   }, {
-   /* List terminator */
-   0,
-   }
-};
-
-struct mm_region *mem_map = s900_mem_map;
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot