// SPDX-License-Identifier: GPL-2.0 /* * FPGA to/from HPS Bridge Driver for Altera SoCFPGA Devices * * Copyright (C) 2013-2016 Altera Corporation, All Rights Reserved. * * Includes this patch from the mailing list: * fpga: altera-hps2fpga: fix HPS2FPGA bridge visibility to L3 masters * Signed-off-by: Anatolij Gustschin <agust@denx.de>
*/
/* * This driver manages bridges on a Altera SOCFPGA between the ARM host * processor system (HPS) and the embedded FPGA. * * This driver supports enabling and disabling of the configured ports, which * allows for safe reprogramming of the FPGA, assuming that the new FPGA image * uses the same port configuration. Bridges must be disabled before * reprogramming the FPGA and re-enabled after the FPGA has been programmed.
*/
/* bring bridge out of reset */ if (enable)
ret = reset_control_deassert(priv->bridge_reset); else
ret = reset_control_assert(priv->bridge_reset); if (ret) return ret;
/* Allow bridge to be visible to L3 masters or not */ if (priv->remap_mask) {
spin_lock_irqsave(&l3_remap_lock, flags);
l3_remap_shadow |= ALT_L3_REMAP_MPUZERO_MSK;
if (enable)
l3_remap_shadow |= priv->remap_mask; else
l3_remap_shadow &= ~priv->remap_mask;
ret = regmap_write(priv->l3reg, ALT_L3_REMAP_OFST,
l3_remap_shadow);
spin_unlock_irqrestore(&l3_remap_lock, flags);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.