#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/mutex.h>
#include <asm/unaligned.h>
#include "usbatm.h"
Go to the source code of this file.
|
#define | DRIVER_AUTHOR "Roman Kagan, David Woodhouse, Duncan Sands, Simon Arlott" |
|
#define | DRIVER_VERSION "0.4" |
|
#define | DRIVER_DESC "Conexant AccessRunner ADSL USB modem driver" |
|
#define | CXACRU_EP_CMD 0x01 /* Bulk/interrupt in/out */ |
|
#define | CXACRU_EP_DATA 0x02 /* Bulk in/out */ |
|
#define | CMD_PACKET_SIZE 64 /* Should be maxpacket(ep)? */ |
|
#define | CMD_MAX_CONFIG ((CMD_PACKET_SIZE / 4 - 1) / 2) |
|
#define | PLLFCLK_ADDR 0x00350068 |
|
#define | PLLBCLK_ADDR 0x0035006c |
|
#define | SDRAMEN_ADDR 0x00350010 |
|
#define | FW_ADDR 0x00801000 |
|
#define | BR_ADDR 0x00180600 |
|
#define | SIG_ADDR 0x00180500 |
|
#define | BR_STACK_ADDR 0x00187f10 |
|
#define | SDRAM_ENA 0x1 |
|
#define | CMD_TIMEOUT 2000 /* msecs */ |
|
#define | POLL_INTERVAL 1 /* secs */ |
|
#define | CXACRU__ATTR_INIT(_name) static DEVICE_ATTR(_name, S_IRUGO, cxacru_sysfs_show_##_name, NULL) |
|
#define | CXACRU_CMD_INIT(_name) |
|
#define | CXACRU_SET_INIT(_name) |
|
#define | CXACRU_ATTR_INIT(_value, _type, _name) |
|
#define | CXACRU_ATTR_CREATE(_v, _t, _name) CXACRU_DEVICE_CREATE_FILE(_name) |
|
#define | CXACRU_CMD_CREATE(_name) CXACRU_DEVICE_CREATE_FILE(_name) |
|
#define | CXACRU_SET_CREATE(_name) CXACRU_DEVICE_CREATE_FILE(_name) |
|
#define | CXACRU__ATTR_CREATE(_name) CXACRU_DEVICE_CREATE_FILE(_name) |
|
#define | CXACRU_ATTR_REMOVE(_v, _t, _name) CXACRU_DEVICE_REMOVE_FILE(_name) |
|
#define | CXACRU_CMD_REMOVE(_name) CXACRU_DEVICE_REMOVE_FILE(_name) |
|
#define | CXACRU_SET_REMOVE(_name) CXACRU_DEVICE_REMOVE_FILE(_name) |
|
#define | CXACRU__ATTR_REMOVE(_name) CXACRU_DEVICE_REMOVE_FILE(_name) |
|
#define | CXACRU_ALL_FILES(_action) |
|
#define | CXACRU_DEVICE_REMOVE_FILE(_name) device_remove_file(&intf->dev, &dev_attr_##_name); |
|
#define | CXACRU_DEVICE_CREATE_FILE(_name) |
|
|
enum | cxacru_fw_request {
FW_CMD_ERR,
FW_GET_VER,
FW_READ_MEM,
FW_WRITE_MEM,
FW_RMW_MEM,
FW_CHECKSUM_MEM,
FW_GOTO_MEM
} |
|
enum | cxacru_cm_request {
CM_REQUEST_UNDEFINED = 0x80,
CM_REQUEST_TEST,
CM_REQUEST_CHIP_GET_MAC_ADDRESS,
CM_REQUEST_CHIP_GET_DP_VERSIONS,
CM_REQUEST_CHIP_ADSL_LINE_START,
CM_REQUEST_CHIP_ADSL_LINE_STOP,
CM_REQUEST_CHIP_ADSL_LINE_GET_STATUS,
CM_REQUEST_CHIP_ADSL_LINE_GET_SPEED,
CM_REQUEST_CARD_INFO_GET,
CM_REQUEST_CARD_DATA_GET,
CM_REQUEST_CARD_DATA_SET,
CM_REQUEST_COMMAND_HW_IO,
CM_REQUEST_INTERFACE_HW_IO,
CM_REQUEST_CARD_SERIAL_DATA_PATH_GET,
CM_REQUEST_CARD_SERIAL_DATA_PATH_SET,
CM_REQUEST_CARD_CONTROLLER_VERSION_GET,
CM_REQUEST_CARD_GET_STATUS,
CM_REQUEST_CARD_GET_MAC_ADDRESS,
CM_REQUEST_CARD_GET_DATA_LINK_STATUS,
CM_REQUEST_MAX
} |
|
enum | cxacru_cm_flash { CM_FLASH_READ = 0xa1,
CM_FLASH_WRITE = 0xa2
} |
|
enum | cxacru_cm_status {
CM_STATUS_UNDEFINED,
CM_STATUS_SUCCESS,
CM_STATUS_ERROR,
CM_STATUS_UNSUPPORTED,
CM_STATUS_UNIMPLEMENTED,
CM_STATUS_PARAMETER_ERROR,
CM_STATUS_DBG_LOOPBACK,
CM_STATUS_MAX
} |
|
enum | cxacru_info_idx {
CXINF_DOWNSTREAM_RATE,
CXINF_UPSTREAM_RATE,
CXINF_LINK_STATUS,
CXINF_LINE_STATUS,
CXINF_MAC_ADDRESS_HIGH,
CXINF_MAC_ADDRESS_LOW,
CXINF_UPSTREAM_SNR_MARGIN,
CXINF_DOWNSTREAM_SNR_MARGIN,
CXINF_UPSTREAM_ATTENUATION,
CXINF_DOWNSTREAM_ATTENUATION,
CXINF_TRANSMITTER_POWER,
CXINF_UPSTREAM_BITS_PER_FRAME,
CXINF_DOWNSTREAM_BITS_PER_FRAME,
CXINF_STARTUP_ATTEMPTS,
CXINF_UPSTREAM_CRC_ERRORS,
CXINF_DOWNSTREAM_CRC_ERRORS,
CXINF_UPSTREAM_FEC_ERRORS,
CXINF_DOWNSTREAM_FEC_ERRORS,
CXINF_UPSTREAM_HEC_ERRORS,
CXINF_DOWNSTREAM_HEC_ERRORS,
CXINF_LINE_STARTABLE,
CXINF_MODULATION,
CXINF_ADSL_HEADEND,
CXINF_ADSL_HEADEND_ENVIRONMENT,
CXINF_CONTROLLER_VERSION,
CXINF_MAX = 0x1c
} |
|
enum | cxacru_poll_state { CXPOLL_STOPPING,
CXPOLL_STOPPED,
CXPOLL_POLLING,
CXPOLL_SHUTDOWN
} |
|
#define BR_ADDR 0x00180600 |
#define BR_STACK_ADDR 0x00187f10 |
#define CMD_PACKET_SIZE 64 /* Should be maxpacket(ep)? */ |
#define CMD_TIMEOUT 2000 /* msecs */ |
#define CXACRU_ALL_FILES |
( |
|
_action | ) |
|
#define CXACRU_ATTR_INIT |
( |
|
_value, |
|
|
|
_type, |
|
|
|
_name |
|
) |
| |
Value:
to_usb_interface(
dev));
\
\
return cxacru_sysfs_showattr_##_type(instance->card_info[_value],
buf); \
} \
CXACRU__ATTR_INIT(_name)
Definition at line 225 of file cxacru.c.
#define CXACRU_CMD_INIT |
( |
|
_name | ) |
|
Value:
cxacru_sysfs_show_##_name, cxacru_sysfs_store_##_name)
Definition at line 217 of file cxacru.c.
#define CXACRU_DEVICE_CREATE_FILE |
( |
|
_name | ) |
|
#define CXACRU_EP_CMD 0x01 /* Bulk/interrupt in/out */ |
#define CXACRU_EP_DATA 0x02 /* Bulk in/out */ |
#define CXACRU_SET_INIT |
( |
|
_name | ) |
|
Value:
NULL, cxacru_sysfs_store_##_name)
Definition at line 221 of file cxacru.c.
#define DRIVER_AUTHOR "Roman Kagan, David Woodhouse, Duncan Sands, Simon Arlott" |
#define DRIVER_DESC "Conexant AccessRunner ADSL USB modem driver" |
#define DRIVER_VERSION "0.4" |
#define FW_ADDR 0x00801000 |
#define PLLBCLK_ADDR 0x0035006c |
#define PLLFCLK_ADDR 0x00350068 |
#define POLL_INTERVAL 1 /* secs */ |
#define SDRAMEN_ADDR 0x00350010 |
#define SIG_ADDR 0x00180500 |
- Enumerator:
CM_FLASH_READ |
|
CM_FLASH_WRITE |
|
Definition at line 125 of file cxacru.c.
- Enumerator:
CM_REQUEST_UNDEFINED |
|
CM_REQUEST_TEST |
|
CM_REQUEST_CHIP_GET_MAC_ADDRESS |
|
CM_REQUEST_CHIP_GET_DP_VERSIONS |
|
CM_REQUEST_CHIP_ADSL_LINE_START |
|
CM_REQUEST_CHIP_ADSL_LINE_STOP |
|
CM_REQUEST_CHIP_ADSL_LINE_GET_STATUS |
|
CM_REQUEST_CHIP_ADSL_LINE_GET_SPEED |
|
CM_REQUEST_CARD_INFO_GET |
|
CM_REQUEST_CARD_DATA_GET |
|
CM_REQUEST_CARD_DATA_SET |
|
CM_REQUEST_COMMAND_HW_IO |
|
CM_REQUEST_INTERFACE_HW_IO |
|
CM_REQUEST_CARD_SERIAL_DATA_PATH_GET |
|
CM_REQUEST_CARD_SERIAL_DATA_PATH_SET |
|
CM_REQUEST_CARD_CONTROLLER_VERSION_GET |
|
CM_REQUEST_CARD_GET_STATUS |
|
CM_REQUEST_CARD_GET_MAC_ADDRESS |
|
CM_REQUEST_CARD_GET_DATA_LINK_STATUS |
|
CM_REQUEST_MAX |
|
Definition at line 87 of file cxacru.c.
- Enumerator:
CM_STATUS_UNDEFINED |
|
CM_STATUS_SUCCESS |
|
CM_STATUS_ERROR |
|
CM_STATUS_UNSUPPORTED |
|
CM_STATUS_UNIMPLEMENTED |
|
CM_STATUS_PARAMETER_ERROR |
|
CM_STATUS_DBG_LOOPBACK |
|
CM_STATUS_MAX |
|
Definition at line 131 of file cxacru.c.
- Enumerator:
FW_CMD_ERR |
|
FW_GET_VER |
|
FW_READ_MEM |
|
FW_WRITE_MEM |
|
FW_RMW_MEM |
|
FW_CHECKSUM_MEM |
|
FW_GOTO_MEM |
|
Definition at line 75 of file cxacru.c.
- Enumerator:
CXINF_DOWNSTREAM_RATE |
|
CXINF_UPSTREAM_RATE |
|
CXINF_LINK_STATUS |
|
CXINF_LINE_STATUS |
|
CXINF_MAC_ADDRESS_HIGH |
|
CXINF_MAC_ADDRESS_LOW |
|
CXINF_UPSTREAM_SNR_MARGIN |
|
CXINF_DOWNSTREAM_SNR_MARGIN |
|
CXINF_UPSTREAM_ATTENUATION |
|
CXINF_DOWNSTREAM_ATTENUATION |
|
CXINF_TRANSMITTER_POWER |
|
CXINF_UPSTREAM_BITS_PER_FRAME |
|
CXINF_DOWNSTREAM_BITS_PER_FRAME |
|
CXINF_STARTUP_ATTEMPTS |
|
CXINF_UPSTREAM_CRC_ERRORS |
|
CXINF_DOWNSTREAM_CRC_ERRORS |
|
CXINF_UPSTREAM_FEC_ERRORS |
|
CXINF_DOWNSTREAM_FEC_ERRORS |
|
CXINF_UPSTREAM_HEC_ERRORS |
|
CXINF_DOWNSTREAM_HEC_ERRORS |
|
CXINF_LINE_STARTABLE |
|
CXINF_MODULATION |
|
CXINF_ADSL_HEADEND |
|
CXINF_ADSL_HEADEND_ENVIRONMENT |
|
CXINF_CONTROLLER_VERSION |
|
CXINF_MAX |
|
Definition at line 143 of file cxacru.c.
- Enumerator:
CXPOLL_STOPPING |
|
CXPOLL_STOPPED |
|
CXPOLL_POLLING |
|
CXPOLL_SHUTDOWN |
|
Definition at line 173 of file cxacru.c.
CXACRU_ALL_FILES |
( |
INIT |
| ) |
|
MODULE_DEVICE_TABLE |
( |
usb |
, |
|
|
cxacru_usb_ids |
|
|
) |
| |
module_usb_driver |
( |
cxacru_usb_driver |
| ) |
|