diff options
| -rw-r--r-- | firmware/zpu/apps/txrx_uhd.c | 2 | ||||
| -rw-r--r-- | firmware/zpu/lib/pkt_ctrl.c | 4 | ||||
| -rw-r--r-- | firmware/zpu/usrp2/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | firmware/zpu/usrp2/memory_map.h | 6 | ||||
| -rw-r--r-- | firmware/zpu/usrp2/udp_fw_update.c | 34 | ||||
| -rw-r--r-- | firmware/zpu/usrp2p/memory_map.h | 6 | 
6 files changed, 4 insertions, 49 deletions
| diff --git a/firmware/zpu/apps/txrx_uhd.c b/firmware/zpu/apps/txrx_uhd.c index 61c2521b9..2030b1ce9 100644 --- a/firmware/zpu/apps/txrx_uhd.c +++ b/firmware/zpu/apps/txrx_uhd.c @@ -368,7 +368,9 @@ main(void)    register_udp_listener(USRP2_UDP_CTRL_PORT, handle_udp_ctrl_packet);    register_udp_listener(USRP2_UDP_DATA_PORT, handle_udp_data_packet);    register_udp_listener(USRP2_UDP_ERR0_PORT, handle_udp_err0_packet); +#ifdef USRP2P    register_udp_listener(USRP2_UDP_UPDATE_PORT, handle_udp_fw_update_packet); +#endif    //3) set the routing mode to slave and send a garp    pkt_ctrl_set_routing_mode(PKT_CTRL_ROUTING_MODE_SLAVE); diff --git a/firmware/zpu/lib/pkt_ctrl.c b/firmware/zpu/lib/pkt_ctrl.c index 96cf76356..df5851c35 100644 --- a/firmware/zpu/lib/pkt_ctrl.c +++ b/firmware/zpu/lib/pkt_ctrl.c @@ -70,7 +70,7 @@ void *pkt_ctrl_claim_incoming_buffer(size_t *num_lines){      //if done: clear the read and return the buffer      if (status & CPU_STAT_RD_DONE){          *num_lines = (router_status->status >> 16) & 0xffff; -        return router_ram(0); +        return ((uint32_t *) ROUTER_RAM_BASE);      }      //if error: drop the packet and start a new read @@ -99,7 +99,7 @@ void *pkt_ctrl_claim_outgoing_buffer(void){      }      //wait for idle and return the buffer      cpu_stat_wait_for(CPU_STAT_WR_IDLE); -    return router_ram(0); +    return ((uint32_t *) ROUTER_RAM_BASE);  }  void pkt_ctrl_commit_outgoing_buffer(size_t num_lines){ diff --git a/firmware/zpu/usrp2/CMakeLists.txt b/firmware/zpu/usrp2/CMakeLists.txt index 8ed31b8d4..ca5c6d92a 100644 --- a/firmware/zpu/usrp2/CMakeLists.txt +++ b/firmware/zpu/usrp2/CMakeLists.txt @@ -23,7 +23,6 @@ ADD_LIBRARY(libusrp2fw STATIC      ${COMMON_SRCS}      sd.c      ethernet.c -    udp_fw_update.c  )  ######################################################################## diff --git a/firmware/zpu/usrp2/memory_map.h b/firmware/zpu/usrp2/memory_map.h index 40c5e6540..b1ca4aa6d 100644 --- a/firmware/zpu/usrp2/memory_map.h +++ b/firmware/zpu/usrp2/memory_map.h @@ -53,12 +53,6 @@  #define ROUTER_RAM_BASE 0x8000 -#define RAM_NLINES	   0x0200	// number of 32-bit lines in a buffer - -#define _router_ram ((uint32_t *) ROUTER_RAM_BASE) -#define router_ram(n) (&_router_ram[(n) * RAM_NLINES]) - -  /////////////////////////////////////////////////////  // SPI Core, Slave 2.  See core docs for more info  #define SPI_BASE 0xC000   // Base address (16-bit) diff --git a/firmware/zpu/usrp2/udp_fw_update.c b/firmware/zpu/usrp2/udp_fw_update.c deleted file mode 100644 index 14eb0b1ee..000000000 --- a/firmware/zpu/usrp2/udp_fw_update.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 Ettus Research LLC - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see <http://www.gnu.org/licenses/>. - */ - -//Routines to handle updating the SPI Flash firmware via UDP - -#include "net_common.h" -#include "usrp2/fw_common.h" -#include <nonstdio.h> -#include "udp_fw_update.h" - -//Firmware update packet handler -void handle_udp_fw_update_packet(struct socket_address src, struct socket_address dst, -                                 unsigned char *payload, int payload_len) { - -  usrp2_fw_update_data_t update_data_out; -  update_data_out.id = USRP2_FW_UPDATE_ID_WAT; - -  send_udp_pkt(USRP2_UDP_UPDATE_PORT, src, &update_data_out, sizeof(update_data_out)); -} diff --git a/firmware/zpu/usrp2p/memory_map.h b/firmware/zpu/usrp2p/memory_map.h index a9db642ed..85c64466d 100644 --- a/firmware/zpu/usrp2p/memory_map.h +++ b/firmware/zpu/usrp2p/memory_map.h @@ -46,12 +46,6 @@  #define ROUTER_RAM_BASE 0x4000 -#define RAM_NLINES	   0x0200	// number of 32-bit lines in a buffer - -#define _router_ram ((uint32_t *) ROUTER_RAM_BASE) -#define router_ram(n) (&_router_ram[(n) * RAM_NLINES]) - -  /////////////////////////////////////////////////////  // SPI Core, Slave 2.  See core docs for more info  #define SPI_BASE 0x6000   // Base address (16-bit) is base peripheral addr | 
