summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8abd6e6)
raw | patch | inline | side by side (parent: 8abd6e6)
author | Sam Sortais <sam.sortais@xilinx.com> | |
Thu, 18 Aug 2016 00:46:28 +0000 (17:46 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:49 +0000 (22:01 -0700) |
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
index 37a49610d0cc7c97ebaf7125ec4b1c369dbe6108..0a9f8d9bad2562d4f48834c2a05c1e55983cdd68 100755 (executable)
0}
};
-int fw_table_size = sizeof(fw_table)/sizeof(struct firmware_info);
+const int fw_table_size = sizeof(fw_table)/sizeof(struct firmware_info);
diff --git a/apps/system/generic/machine/zynqmp_r5/helper.c b/apps/system/generic/machine/zynqmp_r5/helper.c
index 7e775f61472a8f395c94dabd2dc4f2d67e60eca5..4ca349086feabc44a38257c5fe5e5e6e77fd7b67 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string.h>
+
#include "xparameters.h"
#include "xil_exception.h"
#include "xscugic.h"
#include "xil_cache.h"
#include "metal/sys.h"
+#include "metal/irq.h"
+#include "metal/system/generic/irq.h"
+
#define INTC_DEVICE_ID XPAR_SCUGIC_0_DEVICE_ID
/** IPI IRQ ID */
#define IPI_IRQ_VECT_ID 65
-XScuGic InterruptController;
-
-extern void metal_irq_isr(unsigned int irq);
extern int platform_register_metal_device(void);
-int zynqmp_r5_gic_initialize()
+static XScuGic InterruptController;
+
+
+static int zynqmp_r5_gic_initialize(void)
{
u32 Status;
+ XScuGic_Config *IntcConfig; /* The configuration parameters of the interrupt controller */
Xil_ExceptionDisable();
- XScuGic_Config *IntcConfig; /* The configuration parameters of the interrupt controller */
-
/*
* Initialize the interrupt controller driver
*/
&InterruptController);
Xil_ExceptionEnable();
+
/* Connect Interrupt ID with ISR */
XScuGic_Connect(&InterruptController, IPI_IRQ_VECT_ID,
(Xil_ExceptionHandler)metal_irq_isr,
return 0;
}
-void init_system()
+void init_system(void)
{
struct metal_init_params metal_param = METAL_INIT_DEFAULTS;
void cleanup_system()
{
metal_finish();
+
Xil_DCacheDisable();
Xil_ICacheDisable();
Xil_DCacheInvalidate();
diff --git a/apps/system/generic/machine/zynqmp_r5/sys_init.c b/apps/system/generic/machine/zynqmp_r5/sys_init.c
index fd847f1e08b56d56d42047f46bfa242f761f05a2..3c449fc8ca0874a1e22d14b3a165c7fafacf03d0 100644 (file)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string.h>
-#include "xparameters.h"
-#include "xil_exception.h"
-#include "xscugic.h"
+
#include "metal/sys.h"
#include "metal/device.h"
#include "metal/io.h"
{NULL, NULL},
};
+const int metal_dev_table_sz = sizeof (metal_dev_table)/sizeof(struct metal_device);
+
+
/**
* This funciton is to install baremeta/RTOS libmetal devices.
*/
-extern char RPROC_DEBUG[];
int platform_register_metal_device(void)
{
int i;
/* Register device */
metal_bus_register(&metal_generic_bus);
- for (i = 0;
- i < (int)(sizeof(metal_dev_table)/sizeof(struct metal_device));
- i++) {
+ for (i = 0; i < metal_dev_table_sz; i++) {
dev = &metal_dev_table[i];
ret = metal_register_generic_device(dev);
if (ret)