Message ID | 20200110144711.81938-3-giulio.benetti@benettiengineering.com |
---|---|
State | Accepted |
Commit | e403316634de6b09b2487c310ddc36d0c1ebfdc2 |
Headers | show |
Series | Add i.MXRT family support | expand |
> Since some driver requires this function add it as an empty stub > when DCACHE is OFF. > Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic
Hi Giulio, > Since some driver I would prefer more verbose commit message. Please share which driver requires this change. > requires this function add it as an empty stub > when DCACHE is OFF. > > Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com> > --- > arch/arm/cpu/armv7m/cache.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c > index f4ba3ad50e..7353698557 100644 > --- a/arch/arm/cpu/armv7m/cache.c > +++ b/arch/arm/cpu/armv7m/cache.c > @@ -291,6 +291,12 @@ void flush_dcache_all(void) > void invalidate_dcache_all(void) > { > } > + > +void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, > + enum dcache_option option) > +{ > +} > + > #endif > > #if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200128/ee6478d2/attachment.sig>
On 1/28/20 9:10 AM, Lukasz Majewski wrote: > Hi Giulio, > >> Since some driver > > I would prefer more verbose commit message. Please share which driver > requires this change. Yes, you were right, this is a quite dumb commit log. Now commit log can't be changed, anyway this is the list of drivers that use it: drivers/video/mvebu_lcd.c drivers/video/mxsfb.c (that I'm going to use soon) drivers/video/bcm2835.c drivers/video/fsl_dcu_fb.c drivers/video/tegra.c drivers/video/imx/mxc_ipuv3_fb.c drivers/net/zynq_gem.c drivers/net/mvneta.c drivers/net/mvpp2.c And this function prototype is provided by arch/arm/include/asm/system.h Everything came out when I've tried to build mxsfb.c. But after this e-mail I've dug deeper and see that sometimes mmu_set_region_dcache_behaviour() call is guarded by CONFIG_IS_ENABLED(SYS_DCACHE_OFF) and sometimes i.e. arch/arm/cpu/armv8/cache_v8.c that function is defined both implemented and empty according to CONFIG_IS_ENABLED(SYS_DCACHE_OFF). So one chance is to put a check to guard against CONFIG_IS_ENABLED(SYS_DCACHE_OFF) on every call(the files listed above), otherwise, where is guarded we should remove the guard and adding missing mmu_set_region_dcache_behaviour() empty implementation. ~5 files to touch, but if you say it's worth, I can do patches for that, and I don't see any drawbacks expect having a standard way on dealing with the cache function. What about that? Kind regards
On Tue, 28 Jan 2020 17:50:03 +0100 Giulio Benetti <giulio.benetti at benettiengineering.com> wrote: > On 1/28/20 9:10 AM, Lukasz Majewski wrote: > > Hi Giulio, > > > >> Since some driver > > > > I would prefer more verbose commit message. Please share which > > driver requires this change. > > Yes, you were right, this is a quite dumb commit log. > > Now commit log can't be changed, anyway this is the list of drivers > that use it: > drivers/video/mvebu_lcd.c > drivers/video/mxsfb.c (that I'm going to use soon) > drivers/video/bcm2835.c > drivers/video/fsl_dcu_fb.c > drivers/video/tegra.c > drivers/video/imx/mxc_ipuv3_fb.c > > drivers/net/zynq_gem.c > drivers/net/mvneta.c > drivers/net/mvpp2.c > > And this function prototype is provided by > arch/arm/include/asm/system.h > > Everything came out when I've tried to build mxsfb.c. > > But after this e-mail I've dug deeper and see that sometimes > mmu_set_region_dcache_behaviour() call is guarded by > CONFIG_IS_ENABLED(SYS_DCACHE_OFF) and sometimes i.e. > arch/arm/cpu/armv8/cache_v8.c that function is defined both > implemented and empty according to CONFIG_IS_ENABLED(SYS_DCACHE_OFF). > So one chance is to put a check to guard against > CONFIG_IS_ENABLED(SYS_DCACHE_OFF) on every call(the files listed > above), otherwise, where is guarded we should remove the guard and > adding missing mmu_set_region_dcache_behaviour() empty > implementation. ~5 files to touch, but if you say it's worth, I can > do patches for that, and I don't see any drawbacks expect having a > standard way on dealing with the cache function. > > What about that? IMHO, it would be best to to this change when you decide to add support for DCACHE/ICACHE on this SoC. > > Kind regards Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200129/ebd39903/attachment.sig>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c index f4ba3ad50e..7353698557 100644 --- a/arch/arm/cpu/armv7m/cache.c +++ b/arch/arm/cpu/armv7m/cache.c @@ -291,6 +291,12 @@ void flush_dcache_all(void) void invalidate_dcache_all(void) { } + +void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, + enum dcache_option option) +{ +} + #endif #if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
Since some driver requires this function add it as an empty stub when DCACHE is OFF. Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com> --- arch/arm/cpu/armv7m/cache.c | 6 ++++++ 1 file changed, 6 insertions(+)