diff options
author | Josh Blum <josh@joshknows.com> | 2011-03-16 17:21:53 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-03-16 17:21:53 -0700 |
commit | c0cfc69948b444901325326372265b0f13f7d223 (patch) | |
tree | e40dcaa4d2990be451efec26015d5eaf65fde495 /firmware | |
parent | a49811fc3627f36e50bceeb0e92949ac7a58d400 (diff) | |
download | uhd-c0cfc69948b444901325326372265b0f13f7d223.tar.gz uhd-c0cfc69948b444901325326372265b0f13f7d223.tar.bz2 uhd-c0cfc69948b444901325326372265b0f13f7d223.zip |
usrp2: use new and common slave base map for usrp2/n210
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/zpu/lib/memory_map.h | 29 | ||||
-rw-r--r-- | firmware/zpu/usrp2/slave_base.h | 35 | ||||
-rw-r--r-- | firmware/zpu/usrp2p/slave_base.h | 37 |
3 files changed, 25 insertions, 76 deletions
diff --git a/firmware/zpu/lib/memory_map.h b/firmware/zpu/lib/memory_map.h index 132fdb6f6..938cf7776 100644 --- a/firmware/zpu/lib/memory_map.h +++ b/firmware/zpu/lib/memory_map.h @@ -19,11 +19,32 @@ #ifndef INCLUDED_MEMORY_MAP_H #define INCLUDED_MEMORY_MAP_H -#include "slave_base.h" #include <stdint.h> #define MASTER_CLK_RATE 100000000 // 100 MHz +//////////////////////////////////////////////////////////////////////// +// Define slave bases +//////////////////////////////////////////////////////////////////////// +#define ROUTER_RAM_BASE 0x4000 +#define SPI_BASE 0x5000 +#define I2C_BASE 0x5400 +#define GPIO_BASE 0x5800 +#define READBACK_BASE 0x5C00 +#define ETH_BASE 0x6000 +#define SETTING_REGS_BASE 0x7000 +#define PIC_BASE 0x8000 +#define UART_BASE 0x8800 +#define ATR_BASE 0x8C00 +#ifdef USRP2 +#define SDSPI_BASE 0xB000 +#endif +#ifdef USRP2P +#define ICAP_BASE 0xA000 +#define SPIF_BASE 0xB000 +#define RAM_BASE 0xC000 +#endif + ///////////////////////////////////////////////////// // SPI Core, Slave 2. See core docs for more info ///////////////////////////////////////////////////// @@ -112,7 +133,7 @@ typedef struct { volatile uint32_t irqs; } router_status_t; -#define router_status ((router_status_t *) ROUTER_STATUS_BASE) +#define router_status ((router_status_t *) READBACK_BASE) // The hw_config register @@ -204,7 +225,7 @@ typedef struct { #define SR_UDP_SM 192 // 64 -#define _SR_ADDR(sr) (MISC_OUTPUT_BASE + (sr) * sizeof(uint32_t)) +#define _SR_ADDR(sr) (SETTING_REGS_BASE + (sr) * sizeof(uint32_t)) #define SR_ADDR_BLDRDONE _SR_ADDR(5) @@ -254,7 +275,7 @@ typedef struct { // LED_F // controlled by CPLD #define LED_RJ45 (1 << 5) -#define output_regs ((output_regs_t *) MISC_OUTPUT_BASE) +#define output_regs ((output_regs_t *) SETTING_REGS_BASE) // --- protocol framer regs --- diff --git a/firmware/zpu/usrp2/slave_base.h b/firmware/zpu/usrp2/slave_base.h deleted file mode 100644 index e990d54f7..000000000 --- a/firmware/zpu/usrp2/slave_base.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2011 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/>. -// - -#ifndef INCLUDED_SLAVE_BASE_H -#define INCLUDED_SLAVE_BASE_H - -#define RAM_BASE 0x0000 -#define ROUTER_RAM_BASE 0x8000 -#define SPI_BASE 0xC000 -#define I2C_BASE 0xC400 -#define GPIO_BASE 0xC800 -#define ROUTER_STATUS_BASE 0xCC00 -#define ETH_BASE 0xD000 -#define MISC_OUTPUT_BASE 0xD400 -#define PIC_BASE 0xD800 -#define UART_BASE 0xE000 -#define ATR_BASE 0xE400 -#define SDSPI_BASE 0xEC00 - -#endif - diff --git a/firmware/zpu/usrp2p/slave_base.h b/firmware/zpu/usrp2p/slave_base.h deleted file mode 100644 index 3c1c19bf9..000000000 --- a/firmware/zpu/usrp2p/slave_base.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2011 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/>. -// - -#ifndef INCLUDED_SLAVE_BASE_H -#define INCLUDED_SLAVE_BASE_H - -#define BOOTRAM_BASE 0x0000 -#define ROUTER_RAM_BASE 0x4000 -#define SPI_BASE 0x6000 -#define I2C_BASE 0x6100 -#define GPIO_BASE 0x6200 -#define ROUTER_STATUS_BASE 0x6300 -#define ETH_BASE 0x6400 -#define MISC_OUTPUT_BASE 0x5000 -#define PIC_BASE 0x6500 -#define UART_BASE 0x6700 -#define ATR_BASE 0x6800 -#define ICAP_BASE 0x6A00 -#define SPIF_BASE 0x6B00 -#define RAM_BASE 0x8000 - -#endif - |