Commit 32eb7c73 authored by Xose Vazquez Perez's avatar Xose Vazquez Perez Committed by Ben Hutchings
Browse files

linux-firmware: add carl9170 firmware



GPLv2 firmware for carl9170, Atheros AR9170 802.11 draft-n USB driver.

Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarXose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 8cf14f0a
.globl _jump_to_bootcode
.type _jump_to_bootcode, @function
_jump_to_bootcode:
mov.l stack_start, r0
mov.l @r0, sp
mov.l eeprom_start, r0
mov.l @r0, r0
jmp @r0
.align 4
stack_start: .long 0x00000004
eeprom_start: .long 0x00000000
This diff is collapsed.
/*
* carl9170 firmware - used by the ar9170 wireless device
*
* UART debug interface functions.
*
* Copyright (c) 2000-2005 ZyDAS Technology Corporation
* Copyright (c) 2007-2009 Atheros Communications, Inc.
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "carl9170.h"
#include "uart.h"
#include "io.h"
#ifdef CONFIG_CARL9170FW_DEBUG_UART
void uart_putc(const char c)
{
set(AR9170_UART_REG_TX_HOLDING, c);
while (get(AR9170_UART_REG_LINE_STATUS) &
AR9170_UART_LINE_STS_TX_FIFO_ALMOST_EMPTY) {
/*
* wait until the byte has made it
*/
}
}
void uart_print_hex_dump(const void *buf, const int len)
{
unsigned int offset = 0;
uart_putc('H');
uart_putc('D');
uart_putc(':');
while (len > 0) {
uart_putc(*((uint8_t *) buf + offset));
offset++;
}
}
void uart_init(void)
{
unsigned int timeout = 0;
#ifdef CONFIG_CARL9170FW_UART_CLOCK_25M
set(AR9170_UART_REG_DIVISOR_LSB, 0xc);
#elif CONFIG_CARL9170FW_UART_CLOCK_40M
set(AR9170_UART_REG_DIVISOR_LSB, 0x14); /* 40 MHz */
set(AR9170_UART_REG_REMAINDER, 0xb38e);
#else
#error "Unsupported UART clock"
#endif /* CARL9170FW_UART_CLOCK_25M */
while (get(AR9170_UART_REG_LINE_STATUS) &
AR9170_UART_LINE_STS_TRANSMITTER_EMPTY) {
if (timeout++ >= 10000)
break;
}
}
#endif /* CONFIG_CARL9170FW_DEBUG_UART */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
menu "USB Firmware Configuration Settings"
config CARL9170FW_USB_STANDARD_CMDS
def_bool y
prompt "Basic USB Interface"
---help---
Allows the device to be queried about Standard USB 2.0 Device
Description Descriptors.
Say Y, unless you don't care if lsusb -v fails.
config CARL9170FW_USB_UP_STREAM
def_bool y
prompt "USB Upload Stream"
---help---
This features allows the USB silicon to combine small, single
frames into bigger transfers. This can help to reduce
some per-transfer overhead in the application.
Say Y, unless you have experienced strange rx corruptions.
config CARL9170FW_USB_DN_STREAM
def_bool n
prompt "USB Download Stream"
config CARL9170FW_DEBUG_USB
def_bool y
prompt "Pass debug messages through USB transport"
---help---
Report all firmware messages through the USB transport.
But there is a catch: In case of a BUG, the USB transport
needs to be functional, otherwise the application won't
receive anything.
Say Y.
endmenu
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
cmake_minimum_required(VERSION 2.8)
project(config)
#set(CMAKE_VERBOSE_MAKEFILE ON)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../include/generated")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../extra")
FIND_PACKAGE(GPERF REQUIRED)
BISON_TARGET(zconf zconf.y zconf.tab.c COMPILE_FLAGS "-l -b zconf -p zconf -t")
FLEX_TARGET(zconfscan zconf.l zconf.lex.c COMPILE_FLAGS "-Pzconf -L")
GPERF_TARGET(zconfhash zconf.gperf zconf.hash.c)
SET(zconf_deps ${FLEX_zconfscan_OUTPUTS} ${GPERF_zconfhash_OUTPUTS})
SET_SOURCE_FILES_PROPERTIES(${BISON_zconf_OUTPUTS}
PROPERTIES OBJECT_DEPENDS "${zconf_deps}")
set(conf_src conf.c ${BISON_zconf_OUTPUTS})
add_executable(conf ${conf_src})
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment