diff options
Diffstat (limited to 'firmware/zpu/usrp2p')
| -rw-r--r-- | firmware/zpu/usrp2p/spi_flash.c | 4 | ||||
| -rw-r--r-- | firmware/zpu/usrp2p/spi_flash.h | 10 | ||||
| -rw-r--r-- | firmware/zpu/usrp2p/spif.c | 1 | ||||
| -rw-r--r-- | firmware/zpu/usrp2p/u2p_init.c | 3 | ||||
| -rw-r--r-- | firmware/zpu/usrp2p/udp_fw_update.c | 4 | 
5 files changed, 15 insertions, 7 deletions
| diff --git a/firmware/zpu/usrp2p/spi_flash.c b/firmware/zpu/usrp2p/spi_flash.c index 9406f8042..09f908edb 100644 --- a/firmware/zpu/usrp2p/spi_flash.c +++ b/firmware/zpu/usrp2p/spi_flash.c @@ -1,7 +1,6 @@ -/* -*- c++ -*- */  /*   * Copyright 2009 Free Software Foundation, Inc. - * Copyright 2009-2011 Ettus Research LLC + * Copyright 2009-2012 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 @@ -17,6 +16,7 @@   * along with this program.  If not, see <http://www.gnu.org/licenses/>.   */ +#include "spi_flash.h"  #include "spi_flash_private.h"  //#include <stdlib.h>  #include <nonstdio.h> diff --git a/firmware/zpu/usrp2p/spi_flash.h b/firmware/zpu/usrp2p/spi_flash.h index a10533e08..8a8facdca 100644 --- a/firmware/zpu/usrp2p/spi_flash.h +++ b/firmware/zpu/usrp2p/spi_flash.h @@ -23,10 +23,18 @@  #include <stdint.h>  #include <stdbool.h> -  #define SPI_FLASH_PAGE_SIZE	256  #define SPI_SS_FLASH 1 +#define SPIF_PUSH_RISE   0             // push tx data on rising edge of SCLK +#define SPIF_PUSH_FALL   SPI_CTRL_TXNEG        // push tx data on falling edge of SCLK +#define SPIF_LATCH_RISE  0             // latch rx data on rising edge of SCLK +#define SPIF_LATCH_FALL  SPI_CTRL_RXNEG        // latch rx data on falling edge of SCLK + +void spif_init(void); +void spif_wait(void); + +uint32_t spif_transact(bool readback, int slave, uint32_t data, int length, uint32_t flags);  uint32_t spi_flash_rdid(void);	/* Read ID */  uint32_t spi_flash_rdsr(void);	/* Read Status Register */ diff --git a/firmware/zpu/usrp2p/spif.c b/firmware/zpu/usrp2p/spif.c index 91da73155..60807ca4a 100644 --- a/firmware/zpu/usrp2p/spif.c +++ b/firmware/zpu/usrp2p/spif.c @@ -21,6 +21,7 @@   */  #include "spi.h" +#include "spi_flash.h"  #include "memory_map.h"  void diff --git a/firmware/zpu/usrp2p/u2p_init.c b/firmware/zpu/usrp2p/u2p_init.c index 381987ae6..1890dd726 100644 --- a/firmware/zpu/usrp2p/u2p_init.c +++ b/firmware/zpu/usrp2p/u2p_init.c @@ -24,7 +24,6 @@ void u2p_init(void){      bool safe_fw = find_safe_booted_flag();      set_safe_booted_flag(0);      if (safe_fw) { -        set_default_ip_addr(); -        set_default_mac_addr(); +        eth_addrs_set_default();      }  } diff --git a/firmware/zpu/usrp2p/udp_fw_update.c b/firmware/zpu/usrp2p/udp_fw_update.c index 5689388a8..cd9e7d902 100644 --- a/firmware/zpu/usrp2p/udp_fw_update.c +++ b/firmware/zpu/usrp2p/udp_fw_update.c @@ -1,6 +1,5 @@ -/* -*- c++ -*- */  /* - * Copyright 2010 Ettus Research LLC + * Copyright 2010-2012 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 @@ -19,6 +18,7 @@  //Routines to handle updating the SPI Flash firmware via UDP  #include <net_common.h> +#include "memory_map.h"  #include "usrp2/fw_common.h"  #include "spi.h"  #include "spi_flash.h" | 
