summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv/mv_common.c
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2017-03-17 12:59:16 +0000
committerLuiz Souza <luiz@netgate.com>2017-09-06 11:34:57 -0500
commitd7df1cf012d3d18f71f3d8d520d4222173a3cc8d (patch)
tree3c3bef3523dcbd31347264a63c95abb0d194dd7a /sys/arm/mv/mv_common.c
parent745f40753b5fd7a3c864917b32567e571606bac4 (diff)
downloadFreeBSD-src-d7df1cf012d3d18f71f3d8d520d4222173a3cc8d.zip
FreeBSD-src-d7df1cf012d3d18f71f3d8d520d4222173a3cc8d.tar.gz
Remove code for Marvell SoCs that lack a kernel config.
It seems to be old code from the armv6 project branch that never had a kernel config. Reviewed by: mmel Sponsored by: ABT Systems Lrd Differential Revision: https://reviews.freebsd.org/D7166 (cherry picked from commit 8222ebf9418922bf855c63b6ab194d97a57da266)
Diffstat (limited to 'sys/arm/mv/mv_common.c')
-rw-r--r--sys/arm/mv/mv_common.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/sys/arm/mv/mv_common.c b/sys/arm/mv/mv_common.c
index ea077f9..5a2635b 100644
--- a/sys/arm/mv/mv_common.c
+++ b/sys/arm/mv/mv_common.c
@@ -76,9 +76,7 @@ MALLOC_DEFINE(M_IDMA, "idma", "idma dma test memory");
static int win_eth_can_remap(int i);
-#ifndef SOC_MV_FREY
static int decode_win_cpu_valid(void);
-#endif
static int decode_win_usb_valid(void);
static int decode_win_usb3_valid(void);
static int decode_win_eth_valid(void);
@@ -89,9 +87,7 @@ static int decode_win_sdhci_valid(void);
static int decode_win_idma_valid(void);
static int decode_win_xor_valid(void);
-#ifndef SOC_MV_FREY
static void decode_win_cpu_setup(void);
-#endif
#ifdef SOC_MV_ARMADAXP
static int decode_win_sdram_fixup(void);
#endif
@@ -364,7 +360,7 @@ uint32_t
soc_power_ctrl_get(uint32_t mask)
{
-#if !defined(SOC_MV_ORION) && !defined(SOC_MV_LOKIPLUS) && !defined(SOC_MV_FREY)
+#if !defined(SOC_MV_ORION)
if (mask != CPU_PM_CTRL_NONE)
mask &= read_cpu_ctrl(CPU_PM_CTRL);
@@ -382,7 +378,7 @@ void
soc_power_ctrl_set(uint32_t mask)
{
-#if !defined(SOC_MV_ORION) && !defined(SOC_MV_LOKIPLUS)
+#if !defined(SOC_MV_ORION)
if (mask != CPU_PM_CTRL_NONE)
write_cpu_ctrl(CPU_PM_CTRL, mask);
#endif
@@ -584,7 +580,6 @@ soc_decode_win(void)
return(err);
#endif
-#ifndef SOC_MV_FREY
if (!decode_win_cpu_valid() || !decode_win_usb_valid() ||
!decode_win_eth_valid() || !decode_win_idma_valid() ||
!decode_win_pcie_valid() || !decode_win_sata_valid() ||
@@ -593,13 +588,6 @@ soc_decode_win(void)
return (EINVAL);
decode_win_cpu_setup();
-#else
- if (!decode_win_usb_valid() ||
- !decode_win_eth_valid() || !decode_win_idma_valid() ||
- !decode_win_pcie_valid() || !decode_win_sata_valid() ||
- !decode_win_xor_valid() || !decode_win_usb3_valid())
- return (EINVAL);
-#endif
if (MV_DUMP_WIN)
soc_dump_decode_win();
@@ -614,7 +602,6 @@ soc_decode_win(void)
/**************************************************************************
* Decode windows registers accessors
**************************************************************************/
-#if !defined(SOC_MV_FREY)
WIN_REG_IDX_RD(win_cpu, cr, MV_WIN_CPU_CTRL, MV_MBUS_BRIDGE_BASE)
WIN_REG_IDX_RD(win_cpu, br, MV_WIN_CPU_BASE, MV_MBUS_BRIDGE_BASE)
WIN_REG_IDX_RD(win_cpu, remap_l, MV_WIN_CPU_REMAP_LO, MV_MBUS_BRIDGE_BASE)
@@ -623,7 +610,6 @@ WIN_REG_IDX_WR(win_cpu, cr, MV_WIN_CPU_CTRL, MV_MBUS_BRIDGE_BASE)
WIN_REG_IDX_WR(win_cpu, br, MV_WIN_CPU_BASE, MV_MBUS_BRIDGE_BASE)
WIN_REG_IDX_WR(win_cpu, remap_l, MV_WIN_CPU_REMAP_LO, MV_MBUS_BRIDGE_BASE)
WIN_REG_IDX_WR(win_cpu, remap_h, MV_WIN_CPU_REMAP_HI, MV_MBUS_BRIDGE_BASE)
-#endif
WIN_REG_BASE_IDX_RD(win_usb, cr, MV_WIN_USB_CTRL)
WIN_REG_BASE_IDX_RD(win_usb, br, MV_WIN_USB_BASE)
@@ -733,7 +719,6 @@ static inline uint32_t ddr_sz_read(int i)
}
#endif
-#if !defined(SOC_MV_FREY)
/**************************************************************************
* Decode windows helper routines
**************************************************************************/
@@ -956,7 +941,6 @@ decode_win_cpu_setup(void)
cpu_wins[i].size, cpu_wins[i].remap);
}
-#endif
#ifdef SOC_MV_ARMADAXP
static int
@@ -1315,11 +1299,7 @@ decode_win_eth_dump(u_long base)
win_eth_epap_read(base));
}
-#if defined(SOC_MV_LOKIPLUS)
-#define MV_WIN_ETH_DDR_TRGT(n) 0
-#else
#define MV_WIN_ETH_DDR_TRGT(n) ddr_target(n)
-#endif
static void
decode_win_eth_setup(u_long base)
OpenPOWER on IntegriCloud