Skip to content

Commit

Permalink
plat-sam: remove useless function in sam_pl310.c
Browse files Browse the repository at this point in the history
l2_sram_config() is currently only used to set L2 SRAM for L2 cache.
Remove it and use io_write32() directly.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
clementleger authored and jforissier committed Sep 16, 2021
1 parent 3a0a0b2 commit e914243
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions core/arch/arm/plat-sam/sam_pl310.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@

register_phys_mem_pgdir(MEM_AREA_IO_SEC, PL310_BASE, CORE_MMU_PGDIR_SIZE);

enum ram_config {RAMC_SRAM = 0, RAMC_L2CC};

static void l2_sram_config(enum ram_config setting)
{
vaddr_t sfr_base = sam_sfr_base();

if (setting == RAMC_L2CC)
io_write32(sfr_base + AT91_SFR_L2CC_HRAMC, 0x1);
else
io_write32(sfr_base + AT91_SFR_L2CC_HRAMC, 0x0);
}

vaddr_t pl310_base(void)
{
static void *va;
Expand All @@ -64,7 +52,7 @@ vaddr_t pl310_base(void)
void arm_cl2_config(vaddr_t pl310_base)
{
io_write32(pl310_base + PL310_CTRL, 0);
l2_sram_config(RAMC_L2CC);
io_write32(sam_sfr_base() + AT91_SFR_L2CC_HRAMC, 0x1);
io_write32(pl310_base + PL310_AUX_CTRL, PL310_AUX_CTRL_INIT);
io_write32(pl310_base + PL310_PREFETCH_CTRL, PL310_PREFETCH_CTRL_INIT);
io_write32(pl310_base + PL310_POWER_CTRL, PL310_POWER_CTRL_INIT);
Expand Down

0 comments on commit e914243

Please sign in to comment.