/*--------------------------------------------------------------------------------*\ * * Copyright (C) 2013 AVM GmbH * * 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 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: mbahr@avm.de \*--------------------------------------------------------------------------------*/ #include #include /*------------------------------------------------------------------------------------------*\ * Set MDIO Boot Register to a specific value to inform Host about status * \*------------------------------------------------------------------------------------------*/ #if defined(CONFIG_SOC_AR934X) || defined(CONFIG_SOC_QCA955X) void ath79_set_boot_mdio_regs(unsigned int num_vals, uint16_t *vals) { int i; uint32_t *mdio_reg = (uint32_t *) KSEG1ADDR(AR934X_MDIO_BOOT_REG); if (num_vals > 8) num_vals = 8; for (i = 0; i < num_vals; i++) mdio_reg[i] = vals[i] & 0x0000ffff; for (; i < 8; i++) mdio_reg[i] = 0x00000000; } #endif /* defined(CONFIG_SOC_AR934X) || defined(CONFIG_SOC_QCA955X) */