From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv1 4/4] ARM: socfpga: use the pl310 driver to configure the cache
Date: Fri, 8 Mar 2019 20:17:12 +0100 [thread overview]
Message-ID: <8804ee41-bb7d-14be-d75a-bbb067d167a2@denx.de> (raw)
In-Reply-To: <20190308161651.10160-5-dinguyen@kernel.org>
On 3/8/19 5:16 PM, Dinh Nguyen wrote:
> Find the UCLASS_CACHE driver to configure the cache controller's
> settings.
>
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> ---
> arch/arm/mach-socfpga/misc.c | 16 +++-------------
> 1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
> index fcf211d62b..34d8c4c51b 100644
> --- a/arch/arm/mach-socfpga/misc.c
> +++ b/arch/arm/mach-socfpga/misc.c
> @@ -59,20 +59,10 @@ void enable_caches(void)
> #ifdef CONFIG_SYS_L2_PL310
> void v7_outer_cache_enable(void)
> {
> - /* Disable the L2 cache */
> - clrbits_le32(&pl310->pl310_ctrl, L2X0_CTRL_EN);
> -
> - writel(0x111, &pl310->pl310_tag_latency_ctrl);
> - writel(0x121, &pl310->pl310_data_latency_ctrl);
> -
> - /* enable BRESP, instruction and data prefetch, full line of zeroes */
> - setbits_le32(&pl310->pl310_aux_ctrl,
> - L310_AUX_CTRL_DATA_PREFETCH_MASK |
> - L310_AUX_CTRL_INST_PREFETCH_MASK |
> - L310_SHARED_ATT_OVERRIDE_ENABLE);
> + struct udevice *dev;
>
> - /* Enable the L2 cache */
> - setbits_le32(&pl310->pl310_ctrl, L2X0_CTRL_EN);
> + if (uclass_get_device(UCLASS_CACHE, 0, &dev))
> + pr_err("cache controller driver NOT found!\n");
> }
>
> void v7_outer_cache_disable(void)
>
Reviewed-by: Marek Vasut <marex@denx.de>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2019-03-08 19:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 16:16 [U-Boot] [PATCHv1 0/4] dm: cache: add dm cache driver Dinh Nguyen
2019-03-08 16:16 ` [U-Boot] [PATCHv1 1/4] ARM: pl310: Add macro's for handling tag and data latency mask Dinh Nguyen
2019-03-08 19:16 ` Marek Vasut
2019-03-08 16:16 ` [U-Boot] [PATCHv1 2/4] dm: cache: Create a uclass for cache controller Dinh Nguyen
2019-03-08 19:16 ` Marek Vasut
2019-03-10 21:51 ` Simon Glass
2019-03-08 16:16 ` [U-Boot] [PATCHv1 3/4] configs: socfpga: add imply pl310 " Dinh Nguyen
2019-03-08 19:16 ` Marek Vasut
2019-03-08 16:16 ` [U-Boot] [PATCHv1 4/4] ARM: socfpga: use the pl310 driver to configure the cache Dinh Nguyen
2019-03-08 19:17 ` Marek Vasut [this message]
2019-03-08 19:16 ` [U-Boot] [PATCHv1 0/4] dm: cache: add dm cache driver Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8804ee41-bb7d-14be-d75a-bbb067d167a2@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox