public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable
@ 2021-02-24 12:48 Patrice Chotard
  2021-06-04 17:03 ` Patrick DELAUNAY
  2021-07-10  1:08 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patrice Chotard @ 2021-02-24 12:48 UTC (permalink / raw)
  To: u-boot

From: Patrice Chotard <patrice.chotard@st.com>

Fix following compilation issue when SYS_DCACHE_OFF is enable:
drivers/misc/scmi_agent.c:128: undefined reference to `mmu_set_region_dcache_behaviour'

when SYS_DCACHE_OFF is enable, mmu_set_region_dcache_behaviour() must be
defined.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

 arch/arm/lib/cache-cp15.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 24050e5bdd..f1703ead96 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -97,12 +97,6 @@ void mmu_set_region_dcache_behaviour_phys(phys_addr_t start, phys_addr_t phys,
 	mmu_page_table_flush(startpt, stoppt);
 }
 
-void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
-				     enum dcache_option option)
-{
-	mmu_set_region_dcache_behaviour_phys(start, start, size, option);
-}
-
 __weak void dram_bank_mmu_setup(int bank)
 {
 	struct bd_info *bd = gd->bd;
@@ -314,6 +308,12 @@ int dcache_status(void)
 {
 	return 0;					/* always off */
 }
+
+void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
+				     enum dcache_option option)
+{
+}
+
 #else
 void dcache_enable(void)
 {
@@ -329,4 +329,10 @@ int dcache_status(void)
 {
 	return (get_cr() & CR_C) != 0;
 }
+
+void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
+				     enum dcache_option option)
+{
+	mmu_set_region_dcache_behaviour_phys(start, start, size, option);
+}
 #endif
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable
  2021-02-24 12:48 [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable Patrice Chotard
@ 2021-06-04 17:03 ` Patrick DELAUNAY
  2021-07-10  1:08 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2021-06-04 17:03 UTC (permalink / raw)
  To: Patrice Chotard, u-boot
  Cc: U-Boot STM32, Patrice Chotard, Alexey Brodkin, Alison Wang,
	Andy Fleming, Angelo Dureghello, Bin Meng, Daniel Schwierzeck,
	Macpaul Lin, Marek Szyprowski, Marek Vasut, Mario Six,
	Masahiro Yamada, Michal Simek, Nobuhiro Iwamatsu, Priyanka Jain,
	Scott McNutt, Simon Glass, Stefan Roese, Thomas Chou, Tom Rini,
	Wolfgang Denk

Hi Patrice,

On 2/24/21 1:48 PM, Patrice Chotard wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Fix following compilation issue when SYS_DCACHE_OFF is enable:
> drivers/misc/scmi_agent.c:128: undefined reference to `mmu_set_region_dcache_behaviour'
>
> when SYS_DCACHE_OFF is enable, mmu_set_region_dcache_behaviour() must be
> defined.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
>   arch/arm/lib/cache-cp15.c | 18 ++++++++++++------
>   1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
> index 24050e5bdd..f1703ead96 100644
> --- a/arch/arm/lib/cache-cp15.c
> +++ b/arch/arm/lib/cache-cp15.c
> @@ -97,12 +97,6 @@ void mmu_set_region_dcache_behaviour_phys(phys_addr_t start, phys_addr_t phys,
>   	mmu_page_table_flush(startpt, stoppt);
>   }
>   
> -void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
> -				     enum dcache_option option)
> -{
> -	mmu_set_region_dcache_behaviour_phys(start, start, size, option);
> -}
> -
>   __weak void dram_bank_mmu_setup(int bank)
>   {
>   	struct bd_info *bd = gd->bd;
> @@ -314,6 +308,12 @@ int dcache_status(void)
>   {
>   	return 0;					/* always off */
>   }
> +
> +void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
> +				     enum dcache_option option)
> +{
> +}
> +
>   #else
>   void dcache_enable(void)
>   {
> @@ -329,4 +329,10 @@ int dcache_status(void)
>   {
>   	return (get_cr() & CR_C) != 0;
>   }
> +
> +void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
> +				     enum dcache_option option)
> +{
> +	mmu_set_region_dcache_behaviour_phys(start, start, size, option);
> +}
>   #endif


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable
  2021-02-24 12:48 [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable Patrice Chotard
  2021-06-04 17:03 ` Patrick DELAUNAY
@ 2021-07-10  1:08 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-07-10  1:08 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: u-boot, Patrick DELAUNAY, U-Boot STM32, Patrice Chotard,
	Alexey Brodkin, Alison Wang, Andy Fleming, Angelo Dureghello,
	Bin Meng, Daniel Schwierzeck, Macpaul Lin, Marek Szyprowski,
	Marek Vasut, Mario Six, Masahiro Yamada, Michal Simek,
	Nobuhiro Iwamatsu, Priyanka Jain, Scott McNutt, Simon Glass,
	Stefan Roese, Thomas Chou, Wolfgang Denk

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Wed, Feb 24, 2021 at 01:48:42PM +0100, Patrice Chotard wrote:

> From: Patrice Chotard <patrice.chotard@st.com>
> 
> Fix following compilation issue when SYS_DCACHE_OFF is enable:
> drivers/misc/scmi_agent.c:128: undefined reference to `mmu_set_region_dcache_behaviour'
> 
> when SYS_DCACHE_OFF is enable, mmu_set_region_dcache_behaviour() must be
> defined.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-10  1:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-24 12:48 [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable Patrice Chotard
2021-06-04 17:03 ` Patrick DELAUNAY
2021-07-10  1:08 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox