sw_services: Openamp: modified the code and license
This patch modifies the code according to wendy's openamp changes and also updates the license information Signed-off-by: Kinjal Pravinbhai Patel <patelki@xilinx.com>
This commit is contained in:
parent
1da3451cff
commit
0a34042255
7 changed files with 36 additions and 37 deletions
8
ThirdParty/sw_services/xilopenamp/src/config.c
vendored
Normal file → Executable file
8
ThirdParty/sw_services/xilopenamp/src/config.c
vendored
Normal file → Executable file
|
@ -58,13 +58,7 @@ extern unsigned char _binary_firmware2_end;
|
|||
|
||||
#define FIRMWARE2_START (void *)&_binary_firmware2_start
|
||||
#define FIRMWARE2_END (void *)&_binary_firmware2_end
|
||||
/* IPI REGs OFFSET */
|
||||
#define IPI_TRIG_OFFSET 0x00000000 /* IPI trigger register offset */
|
||||
#define IPI_OBS_OFFSET 0x00000004 /* IPI observation register offset */
|
||||
#define IPI_ISR_OFFSET 0x00000010 /* IPI interrupt status register offset */
|
||||
#define IPI_IMR_OFFSET 0x00000014 /* IPI interrupt mask register offset */
|
||||
#define IPI_IER_OFFSET 0x00000018 /* IPI interrupt enable register offset */
|
||||
#define IPI_IDR_OFFSET 0x0000001C /* IPI interrupt disable register offset */
|
||||
|
||||
/* Init firmware table */
|
||||
|
||||
const struct firmware_info fw_table[] = { { "firmware1",
|
||||
|
|
1
ThirdParty/sw_services/xilopenamp/src/env.h
vendored
Normal file → Executable file
1
ThirdParty/sw_services/xilopenamp/src/env.h
vendored
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2014, Mentor Graphics Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
|
1
ThirdParty/sw_services/xilopenamp/src/remote_device.c
vendored
Normal file → Executable file
1
ThirdParty/sw_services/xilopenamp/src/remote_device.c
vendored
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2014, Mentor Graphics Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
|
1
ThirdParty/sw_services/xilopenamp/src/remoteproc.c
vendored
Normal file → Executable file
1
ThirdParty/sw_services/xilopenamp/src/remoteproc.c
vendored
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2014, Mentor Graphics Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
|
|
56
ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c
vendored
Normal file → Executable file
56
ThirdParty/sw_services/xilopenamp/src/rpmsg_core.c
vendored
Normal file → Executable file
|
@ -550,44 +550,42 @@ void rpmsg_rx_callback(struct virtqueue *vq) {
|
|||
|
||||
env_unlock_mutex(rdev->lock);
|
||||
|
||||
if (!rp_hdr) {
|
||||
return;
|
||||
}
|
||||
while(rp_hdr) {
|
||||
|
||||
/* Get the channel node from the remote device channels list. */
|
||||
node = rpmsg_rdev_get_endpoint_from_addr(rdev, rp_hdr->dst);
|
||||
/* Get the channel node from the remote device channels list. */
|
||||
node = rpmsg_rdev_get_endpoint_from_addr(rdev, rp_hdr->dst);
|
||||
|
||||
if (!node)
|
||||
/* Fatal error no endpoint for the given dst addr. */
|
||||
return;
|
||||
if (!node)
|
||||
/* Fatal error no endpoint for the given dst addr. */
|
||||
return;
|
||||
|
||||
rp_ept = (struct rpmsg_endpoint *) node->data;
|
||||
rp_ept = (struct rpmsg_endpoint *) node->data;
|
||||
|
||||
rp_chnl = rp_ept->rp_chnl;
|
||||
rp_chnl = rp_ept->rp_chnl;
|
||||
|
||||
if ((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS)) {
|
||||
if ((rp_chnl) && (rp_chnl->state == RPMSG_CHNL_STATE_NS)) {
|
||||
/* First message from RPMSG Master, update channel
|
||||
* destination address and state */
|
||||
rp_chnl->dst = rp_hdr->src;
|
||||
rp_chnl->state = RPMSG_CHNL_STATE_ACTIVE;
|
||||
|
||||
/* First message from RPMSG Master, update channel
|
||||
* destination address and state */
|
||||
rp_chnl->dst = rp_hdr->src;
|
||||
rp_chnl->state = RPMSG_CHNL_STATE_ACTIVE;
|
||||
|
||||
/* Notify channel creation to application */
|
||||
if (rdev->channel_created) {
|
||||
rdev->channel_created(rp_chnl);
|
||||
/* Notify channel creation to application */
|
||||
if (rdev->channel_created) {
|
||||
rdev->channel_created(rp_chnl);
|
||||
}
|
||||
} else {
|
||||
rp_ept->cb(rp_chnl, rp_hdr->data, rp_hdr->len, rp_ept->priv,
|
||||
rp_hdr->src);
|
||||
}
|
||||
} else {
|
||||
|
||||
rp_ept->cb(rp_chnl, rp_hdr->data, rp_hdr->len, rp_ept->priv,
|
||||
rp_hdr->src);
|
||||
env_lock_mutex(rdev->lock);
|
||||
|
||||
/* Return used buffers. */
|
||||
rpmsg_return_buffer(rdev, rp_hdr, len, idx);
|
||||
|
||||
rp_hdr = (struct rpmsg_hdr *) rpmsg_get_rx_buffer(rdev, &len, &idx);
|
||||
env_unlock_mutex(rdev->lock);
|
||||
}
|
||||
|
||||
env_lock_mutex(rdev->lock);
|
||||
|
||||
/* Return used buffers. */
|
||||
rpmsg_return_buffer(rdev, rp_hdr, len, idx);
|
||||
|
||||
env_unlock_mutex(rdev->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
5
ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c
vendored
Normal file → Executable file
5
ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.c
vendored
Normal file → Executable file
|
@ -32,7 +32,6 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include "sleep.h"
|
||||
|
||||
|
||||
|
||||
|
@ -107,6 +106,10 @@ int rpmsg_retarget_deinit(struct rpmsg_channel *rp_chnl) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int rpmsg_retarget_send(void *data, int len) {
|
||||
return send_rpc(data, len);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* FUNCTION
|
||||
|
|
1
ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h
vendored
Normal file → Executable file
1
ThirdParty/sw_services/xilopenamp/src/rpmsg_retarget.h
vendored
Normal file → Executable file
|
@ -79,3 +79,4 @@ void debug_print(char* str, int len);
|
|||
/* API prototypes */
|
||||
int rpmsg_retarget_init(struct rpmsg_channel *rp_chnl, rpc_shutdown_cb cb);
|
||||
int rpmsg_retarget_deinit(struct rpmsg_channel *rp_chnl);
|
||||
int rpmsg_retarget_send(void *data, int len);
|
||||
|
|
Loading…
Add table
Reference in a new issue