From 4711829f03ee2fcd1c4e9dc2a353af0e35497180 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 31 Dec 2010 17:29:57 -0800 Subject: usrp2: fixed mdelay (used ticks rb register), cool led blink in u2init, removed unused files --- firmware/zpu/lib/bootconfig.c | 101 ------------------------------------------ 1 file changed, 101 deletions(-) delete mode 100644 firmware/zpu/lib/bootconfig.c (limited to 'firmware/zpu/lib/bootconfig.c') diff --git a/firmware/zpu/lib/bootconfig.c b/firmware/zpu/lib/bootconfig.c deleted file mode 100644 index 93adc05c2..000000000 --- a/firmware/zpu/lib/bootconfig.c +++ /dev/null @@ -1,101 +0,0 @@ -/* -*- c -*- */ -/* - * Copyright 2009 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 . - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "bootconfig.h" -#include "bootconfig_private.h" -#include -#include -#include -#include -#include -#include -#include - -eeprom_boot_info_t eeprom_shadow; - -static eeprom_boot_info_t eeprom_default = { - .magic = EEPROM_BOOT_INFO_MAGIC, - .nattempts = 1, - .next_boot.fpga_image_number = 0, - .next_boot.firmware_image_number = 0, - .default_boot.fpga_image_number = 0, - .default_boot.firmware_image_number = 0 -}; - -eeprom_boot_info_t * -_bc_get_eeprom_shadow(void) -{ - return &eeprom_shadow; -} - - -bool -_bc_write_eeprom_shadow(void) -{ - return eeprom_write(I2C_ADDR_MBOARD, BOOT_INFO_OFFSET, &eeprom_shadow, sizeof(eeprom_shadow)); -} - -void -bootconfig_init(void) -{ - if (!eeprom_read(I2C_ADDR_MBOARD, BOOT_INFO_OFFSET, &eeprom_shadow, sizeof(eeprom_shadow)) - || eeprom_shadow.magic != EEPROM_BOOT_INFO_MAGIC){ - eeprom_shadow = eeprom_default; - _bc_write_eeprom_shadow(); - } -} - -bootconfig_t -bootconfig_get_default(void) -{ - return eeprom_shadow.default_boot; -} - -bool -bootconfig_set_default(bootconfig_t bc) -{ - if (!validate_bootconfig(bc)) - return false; - - eeprom_shadow.default_boot = bc; - eeprom_shadow.next_boot = bc; - return _bc_write_eeprom_shadow(); -} - -void -bootconfig_boot(bootconfig_t bc) -{ - if (!validate_bootconfig(bc)) - return; - - eeprom_shadow.next_boot = bc; - eeprom_shadow.nattempts = 1; - _bc_write_eeprom_shadow(); - - if (1){ - puts("\nbootconfig: chaining to FPGA slot 0 bootloader"); - mdelay(100); - } - - while (1){ - // Reload fpga with code from SPI flash address 0x0. - icap_reload_fpga(0x00000000); - } -} -- cgit v1.2.3