Skip to content

Commit

Permalink
core: arm: imx7d: remove soc_is_imx7d/s functions
Browse files Browse the repository at this point in the history
Remove soc_is_imx7d/s functions. Not needed.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
MrVan authored and jforissier committed Sep 18, 2017
1 parent b3c4f4f commit eedc47b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 36 deletions.
34 changes: 2 additions & 32 deletions core/arch/arm/plat-imx/imx-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,36 +89,6 @@ bool soc_is_imx6dqp(void)
return (imx_soc_type() == SOC_MX6Q) && (imx_soc_rev_major() == 2);
}

bool soc_is_imx7s(void)
{
vaddr_t addr = core_mmu_get_va(OCOTP_BASE + 0x450, MEM_AREA_IO_SEC);
uint32_t val = read32(addr);

if (soc_is_imx7ds()) {
if (val & 1)
return true;
else
return false;
}

return false;
}

bool soc_is_imx7d(void)
{
vaddr_t addr = core_mmu_get_va(OCOTP_BASE + 0x450, MEM_AREA_IO_SEC);
uint32_t val = read32(addr);

if (soc_is_imx7ds()) {
if (val & 1)
return false;
else
return true;
}

return false;
}

bool soc_is_imx7ds(void)
{
return imx_soc_type() == SOC_MX7D;
Expand All @@ -128,7 +98,7 @@ uint32_t imx_get_src_gpr(int cpu)
{
vaddr_t va = core_mmu_get_va(SRC_BASE, MEM_AREA_IO_SEC);

if (soc_is_imx7d())
if (soc_is_imx7ds())
return read32(va + SRC_GPR1_MX7 + cpu * 8 + 4);
else
return read32(va + SRC_GPR1 + cpu * 8 + 4);
Expand All @@ -138,7 +108,7 @@ void imx_set_src_gpr(int cpu, uint32_t val)
{
vaddr_t va = core_mmu_get_va(SRC_BASE, MEM_AREA_IO_SEC);

if (soc_is_imx7d())
if (soc_is_imx7ds())
write32(val, va + SRC_GPR1_MX7 + cpu * 8 + 4);
else
write32(val, va + SRC_GPR1 + cpu * 8 + 4);
Expand Down
2 changes: 0 additions & 2 deletions core/arch/arm/plat-imx/imx.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ bool soc_is_imx6sdl(void);
bool soc_is_imx6dq(void);
bool soc_is_imx6dqp(void);
bool soc_is_imx7ds(void);
bool soc_is_imx7d(void);
bool soc_is_imx7s(void);
uint32_t imx_soc_type(void);
void imx_gpcv2_set_core1_pdn_by_software(void);
void imx_gpcv2_set_core1_pup_by_software(void);
Expand Down
4 changes: 2 additions & 2 deletions core/arch/arm/plat-imx/pm/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int psci_affinity_info(uint32_t affinity,

cpu = affinity;

if (soc_is_imx7d())
if (soc_is_imx7ds())
wfi = true;
else
wfi = read32(gpr5) & ARM_WFI_STAT_MASK(cpu);
Expand All @@ -131,7 +131,7 @@ int psci_affinity_info(uint32_t affinity,
* Wait secondary cpus ready to be killed
* TODO: Change to non dead loop
*/
if (soc_is_imx7d()) {
if (soc_is_imx7ds()) {
while (read32(va + SRC_GPR1_MX7 + cpu * 8 + 4) != UINT_MAX)
;

Expand Down

0 comments on commit eedc47b

Please sign in to comment.