diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:26:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:26:34 -0700 |
commit | 138051659902da7e6a09d379fee5dade2a80fcfd (patch) | |
tree | e0a90e27451b1fcd812675092d30c1059369cb87 /drivers/staging/ft1000/ft1000-usb | |
parent | d5ef642355bdd9b383ff5c18cbc6102a06eecbaf (diff) | |
parent | e1703b329f7c7ea82ea181dc4c50020f25061a2c (diff) | |
download | op-kernel-dev-138051659902da7e6a09d379fee5dade2a80fcfd.zip op-kernel-dev-138051659902da7e6a09d379fee5dade2a80fcfd.tar.gz |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits)
staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
staging:iio:kfifo_buf fix double initialization of the ring device structure.
staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata.
staging:iio:imu fix missing register table index for some channels
spectra: enable device before poking it
staging: rts_pstor: Fix a miswriting
staging/lirc_bt829: Return -ENODEV when no hardware is found.
staging/lirc_parallel: remove pointless prototypes.
staging/lirc_parallel: fix panic on rmmod
staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata.
Staging: zram: Fix kunmapping order
Revert "gma500: Fix dependencies"
gma500: Add medfield header
gma500: wire up the mrst i2c bus from chip_info
gma500: Fix DPU build
gma500: Clean up the DPU config and make it runtime
gma500: resync with Medfield progress
gma500: Use the mrst helpers and power control for mode commit
gma500@ Fix backlight range error
gma500: More Moorestown muddle meddling means MM maybe might modeset
...
Fix up fairly trivial conflicts all over, mostly due to header file
cleanup conflicts, but some deleted files and some just context changes:
- Documentation/feature-removal-schedule.txt
- drivers/staging/bcm/headers.h
- drivers/staging/brcm80211/brcmfmac/dhd_linux.c
- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
- drivers/staging/brcm80211/brcmfmac/wl_iw.c
- drivers/staging/et131x/et131x_netdev.c
- drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
- drivers/staging/rtl8192e/r8192E.h
- drivers/staging/usbip/userspace/src/utils.h
Diffstat (limited to 'drivers/staging/ft1000/ft1000-usb')
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | 32 | ||||
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 413 |
2 files changed, 10 insertions, 435 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h index 6a8a196..3f4207f 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h @@ -26,38 +26,6 @@ #ifndef _FT1000IOCTLH_ #define _FT1000IOCTLH_ -#define DSPVERSZ 4 -#define HWSERNUMSZ 16 -#define SKUSZ 20 -#define EUISZ 8 -#define CALVERSZ 2 -#define CALDATESZ 6 - -#define MAX_DNLD_BLKSZ 1024 - -// Standard Flarion Pseudo header -struct pseudo_hdr { - unsigned short length; //length of msg body - unsigned char source; //source address (0x10=Host 0x20=DSP) - unsigned char destination; //destination address (refer to source address) - unsigned char portdest; //destination port id - // 0x00=Driver - // 0x10=Application Broadcast - // 0x20=Network Stack - // 0x80=Dsp OAM - // 0x90=Dsp Airlink - // 0xa0=Dsp Loader - // 0xb0=Dsp MIP - unsigned char portsrc; //source port id (refer to portdest) - unsigned short sh_str_id; //stream id (Not applicable on Mobile) - unsigned char control; //stream id (Not applicable on Mobile) - unsigned char rsvd1; //reserved - unsigned char seq_num; //sequence number - unsigned char rsvd2; //reserved - unsigned short qos_class; //Quality of Service class (Not applicable on Mobile) - unsigned short checksum; //Pseudo header checksum -} __attribute__ ((packed)); - typedef struct _IOCTL_GET_VER { unsigned long drv_ver; diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h index 0b30020..51c0847 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h @@ -2,81 +2,18 @@ #define _FT1000_USB_H_ /*Jim*/ +#include "../ft1000.h" #include "ft1000_ioctl.h" #define FT1000_DRV_VER 0x01010403 -#define MODESZ 2 #define MAX_NUM_APP 6 #define MAX_MSG_LIMIT 200 #define NUM_OF_FREE_BUFFERS 1500 -// Driver message types -#define MEDIA_STATE 0x0010 -#define DSP_PROVISION 0x0030 -#define DSP_INIT_MSG 0x0050 -#define DSP_STORE_INFO 0x0070 -#define DSP_GET_INFO 0x0071 -#define GET_DRV_ERR_RPT_MSG 0x0073 -#define RSP_DRV_ERR_RPT_MSG 0x0074 - - -// Size of DPRAM Command -#define MAX_CMD_SQSIZE 1780 -#define SLOWQ_TYPE 0 #define PSEUDOSZ 16 -#define DSP_QID_OFFSET 4 - - -// MEMORY MAP FOR ELECTRABUZZ ASIC -#define FT1000_REG_DFIFO_STAT 0x0008 // Downlink FIFO status register -#define FT1000_REG_DPRAM_DATA 0x000C // DPRAM VALUE in DPRAM ADDR - -#define FT1000_DSP_LED 0xFFA // dsp led status for PAD device - -#define FT1000_MAG_DSP_LED 0x3FE // dsp led status for PAD device -#define FT1000_MAG_DSP_LED_INDX 0x1 // dsp led status for PAD device #define SUCCESS 0x00 - -#define DRIVERID 0x00 - -// Driver Error Messages for DSP -#define DSP_CONDRESET_INFO 0x7ef2 -#define DSP_HB_INFO 0x7ef0 - -// Magnemite specific defines -#define hi_mag 0x6968 // Byte swap hi to avoid additional system call -#define ho_mag 0x6f68 // Byte swap ho to avoid additional system call - - - -struct media_msg { - struct pseudo_hdr pseudo; - u16 type; - u16 length; - u16 state; - u32 ip_addr; - u32 net_mask; - u32 gateway; - u32 dns_1; - u32 dns_2; -} __attribute__ ((packed)); - -struct dsp_init_msg { - struct pseudo_hdr pseudo; - u16 type; - u16 length; - u8 DspVer[DSPVERSZ]; // DSP version number - u8 HwSerNum[HWSERNUMSZ]; // Hardware Serial Number - u8 Sku[SKUSZ]; // SKU - u8 eui64[EUISZ]; // EUI64 - u8 ProductMode[MODESZ]; // Product Mode (Market/Production) - u8 RfCalVer[CALVERSZ]; // Rf Calibration version - u8 RfCalDate[CALDATESZ]; // Rf Calibration date -} __attribute__ ((packed)); - - struct app_info_block { u32 nTxMsg; // DPRAM msg sent to DSP with app_id u32 nRxMsg; // DPRAM msg rcv from dsp with app_id @@ -90,11 +27,6 @@ struct app_info_block { struct list_head app_sqlist; // link list of msgs for applicaton on slow queue } __attribute__((packed)); -struct prov_record { - struct list_head list; - u8 *pprov_data; -}; - /*end of Jim*/ #define DEBUG(args...) printk(KERN_INFO args) @@ -108,350 +40,25 @@ struct prov_record { #define LARGE_TIMEOUT 5000 -#define MAX_DSP_SESS_REC 1024 - -#define MAX_NUM_CARDS 32 - -#define DSPVERSZ 4 -#define HWSERNUMSZ 16 -#define SKUSZ 20 -#define EUISZ 8 -#define CALVERSZ 2 -#define CALDATESZ 6 -#define MODESZ 2 - -#define DSPID 0x20 -#define HOSTID 0x10 - -#define DSPOAM 0x80 -#define DSPAIRID 0x90 - -#define DRIVERID 0x00 -#define FMM 0x10 -#define NETWORKID 0x20 -#define AUTOLNCHID 0x30 -#define DSPLPBKID 0x40 - #define DSPBCMSGID 0x10 -#define ENET_MAX_SIZE 1514 -#define ENET_HEADER_SIZE 14 - - -#define CIS_NET_ADDR_OFFSET 0xff0 - -// MAGNEMITE specific - -#define FT1000_REG_MAG_UFDR 0x0000 // Uplink FIFO Data Register. - -#define FT1000_REG_MAG_UFDRL 0x0000 // Uplink FIFO Data Register low-word. - -#define FT1000_REG_MAG_UFDRH 0x0002 // Uplink FIFO Data Register high-word. - -#define FT1000_REG_MAG_UFER 0x0004 // Uplink FIFO End Register - -#define FT1000_REG_MAG_UFSR 0x0006 // Uplink FIFO Status Register - -#define FT1000_REG_MAG_DFR 0x0008 // Downlink FIFO Register - -#define FT1000_REG_MAG_DFRL 0x0008 // Downlink FIFO Register low-word - -#define FT1000_REG_MAG_DFRH 0x000a // Downlink FIFO Register high-word - -#define FT1000_REG_MAG_DFSR 0x000c // Downlink FIFO Status Register - -#define FT1000_REG_MAG_DPDATA 0x0010 // Dual Port RAM Indirect Data Register - -#define FT1000_REG_MAG_DPDATAL 0x0010 // Dual Port RAM Indirect Data Register low-word - -#define FT1000_REG_MAG_DPDATAH 0x0012 // Dual Port RAM Indirect Data Register high-word - -#define FT1000_REG_MAG_WATERMARK 0x002c // Supv. Control Reg. LLC register - -#define FT1000_REG_MAG_VERSION 0x0030 // LLC Version LLC register - - - -// Common - -#define FT1000_REG_DPRAM_ADDR 0x000E // DPRAM ADDRESS when card in IO mode - -#define FT1000_REG_SUP_CTRL 0x0020 // Supv. Control Reg. LLC register - -#define FT1000_REG_SUP_STAT 0x0022 // Supv. Status Reg LLC register - -#define FT1000_REG_RESET 0x0024 // Reset Reg LLC register - -#define FT1000_REG_SUP_ISR 0x0026 // Supv ISR LLC register - -#define FT1000_REG_SUP_IMASK 0x0028 // Supervisor Interrupt Mask LLC register - -#define FT1000_REG_DOORBELL 0x002a // Door Bell Reg LLC register - -#define FT1000_REG_ASIC_ID 0x002e // ASIC Identification Number - - // (Electrabuzz=0 Magnemite=TBD) - - - -// DSP doorbells - -#define FT1000_DB_DPRAM_RX 0x0001 // this value indicates that DSP has - - // data for host in DPRAM SlowQ - -#define FT1000_DB_DNLD_RX 0x0002 // Downloader handshake doorbell - -#define FT1000_ASIC_RESET_REQ 0x0004 - -#define FT1000_DSP_ASIC_RESET 0x0008 - - - -#define FT1000_DB_COND_RESET 0x0010 - - - -// Host doorbells - -#define FT1000_DB_DPRAM_TX 0x0100 // this value indicates that host has - - // data for DSP in DPRAM. - -#define FT1000_DB_DNLD_TX 0x0200 // Downloader handshake doorbell - -#define FT1000_ASIC_RESET_DSP 0x0400 - -#define FT1000_DB_HB 0x1000 // this value indicates that supervisor - - - -// Electrabuzz specific DPRAM mapping // has a heartbeat message for DSP. - -#define FT1000_DPRAM_BASE 0x1000 // 0x0000 to 0x07FF DPRAM 2Kx16 - R/W from PCMCIA or DSP - -#define FT1000_DPRAM_TX_BASE 0x1002 // TX AREA (SlowQ) - -#define FT1000_DPRAM_RX_BASE 0x1800 // RX AREA (SlowQ) - -#define FT1000_DPRAM_SIZE 0x1000 // 4K bytes - - - -#define FT1000_DRV_DEBUG 0x17E0 // Debug area for driver - -#define FT1000_FIFO_LEN 0x17FC // total length for DSP FIFO tracking - -#define FT1000_HI_HO 0x17FE // heartbeat with HI/HO - -#define FT1000_DSP_STATUS 0x1FFE // dsp status - non-zero is a request to reset dsp - - - -#define FT1000_DSP_CON_STATE 0x1FF8 // DSP Connection Status Info - -#define FT1000_DSP_LEDS 0x1FFA // DSP LEDS for rcv pwr strength, Rx data, Tx data - -#define DSP_TIMESTAMP 0x1FFC // dsp timestamp - -#define DSP_TIMESTAMP_DIFF 0x1FFA // difference of dsp timestamp in DPRAM and Pseudo header. - - - -#define FT1000_DPRAM_FEFE 0x1002 // Dsp Downloader handshake location - - - -#define FT1000_DSP_TIMER0 0x1FF0 - -#define FT1000_DSP_TIMER1 0x1FF2 - -#define FT1000_DSP_TIMER2 0x1FF4 - -#define FT1000_DSP_TIMER3 0x1FF6 - - +/* Electrabuzz specific DPRAM mapping */ +/* this is used by ft1000_usb driver - isn't that a bug? */ +#undef FT1000_DPRAM_RX_BASE +#define FT1000_DPRAM_RX_BASE 0x1800 /* RX AREA (SlowQ) */ // MEMORY MAP FOR MAGNEMITE - -#define FT1000_DPRAM_MAG_TX_BASE 0x0000 // TX AREA (SlowQ) - -#define FT1000_DPRAM_MAG_RX_BASE 0x0200 // RX AREA (SlowQ) - - - -#define FT1000_MAG_FIFO_LEN 0x1FF // total length for DSP FIFO tracking - -#define FT1000_MAG_FIFO_LEN_INDX 0x1 // low-word index - -#define FT1000_MAG_HI_HO 0x1FF // heartbeat with HI/HO - -#define FT1000_MAG_HI_HO_INDX 0x0 // high-word index - -#define FT1000_MAG_DSP_LEDS 0x3FE // dsp led status for PAD device - -#define FT1000_MAG_DSP_LEDS_INDX 0x1 // dsp led status for PAD device - - - -#define FT1000_MAG_DSP_CON_STATE 0x3FE // DSP Connection Status Info - -#define FT1000_MAG_DSP_CON_STATE_INDX 0x0 // DSP Connection Status Info - - - -#define FT1000_MAG_DPRAM_FEFE 0x000 // location for dsp ready indicator - -#define FT1000_MAG_DPRAM_FEFE_INDX 0x0 // location for dsp ready indicator - - - -#define FT1000_MAG_DSP_TIMER0 0x3FC - -#define FT1000_MAG_DSP_TIMER0_INDX 0x1 - - - -#define FT1000_MAG_DSP_TIMER1 0x3FC - -#define FT1000_MAG_DSP_TIMER1_INDX 0x0 - - - -#define FT1000_MAG_DSP_TIMER2 0x3FD - -#define FT1000_MAG_DSP_TIMER2_INDX 0x1 - - - -#define FT1000_MAG_DSP_TIMER3 0x3FD - -#define FT1000_MAG_DSP_TIMER3_INDX 0x0 - - - -#define FT1000_MAG_TOTAL_LEN 0x200 - -#define FT1000_MAG_TOTAL_LEN_INDX 0x1 - - - -#define FT1000_MAG_PH_LEN 0x200 - -#define FT1000_MAG_PH_LEN_INDX 0x0 - - - -#define FT1000_MAG_PORT_ID 0x201 - -#define FT1000_MAG_PORT_ID_INDX 0x0 - - - -// - -// Constants for the FT1000_REG_SUP_ISR - -// - -// Indicate the cause of an interrupt. - -// - -// SUPERVISOR ISR BIT MAPS - - - -#define ISR_EMPTY (u8)0x00 // no bits set in ISR - -#define ISR_DOORBELL_ACK (u8)0x01 // the doorbell i sent has been received. - -#define ISR_DOORBELL_PEND (u8)0x02 // doorbell for me - -#define ISR_RCV (u8)0x04 // packet received with no errors - -#define ISR_WATERMARK (u8)0x08 // - - - -// Interrupt mask register defines - -// note these are different from the ISR BIT MAPS. - -#define ISR_MASK_NONE 0x0000 - -#define ISR_MASK_DOORBELL_ACK 0x0001 - -#define ISR_MASK_DOORBELL_PEND 0x0002 - -#define ISR_MASK_RCV 0x0004 - -#define ISR_MASK_WATERMARK 0x0008 // Normally we will only mask the watermark interrupt when we want to enable interrupts. - -#define ISR_MASK_ALL 0xffff - - - -#define HOST_INTF_LE 0x0000 // Host interface little endian - -#define HOST_INTF_BE 0x0001 // Host interface big endian - - - -#define ISR_DEFAULT_MASK 0x7ff9 - - - -#define hi 0x6869 - -#define ho 0x686f - - - -#define FT1000_ASIC_RESET 0x80 // COR value for soft reset to PCMCIA core - -#define FT1000_ASIC_BITS 0x51 // Bits set in COR register under normal operation - -#define FT1000_ASIC_MAG_BITS 0x55 // Bits set in COR register under normal operation - - - -#define FT1000_COR_OFFSET 0x100 - - - -#define ELECTRABUZZ_ID 0 // ASIC ID for ELECTRABUZZ - -#define MAGNEMITE_ID 0x1a01 // ASIC ID for MAGNEMITE - - +/* the indexes are swapped comparing to PCMCIA - is it OK or a bug? */ +#undef FT1000_MAG_DSP_LED_INDX +#define FT1000_MAG_DSP_LED_INDX 0x1 /* dsp led status for PAD device */ +#undef FT1000_MAG_DSP_CON_STATE_INDX +#define FT1000_MAG_DSP_CON_STATE_INDX 0x0 /* DSP Connection Status Info */ // Maximum times trying to get ASIC out of reset - #define MAX_ASIC_RESET_CNT 20 - - -#define DSP_RESET_BIT 0x1 - -#define ASIC_RESET_BIT 0x2 - -#define DSP_UNENCRYPTED 0x4 - -#define DSP_ENCRYPTED 0x8 - -#define EFUSE_MEM_DISABLE 0x0040 - - #define MAX_BUF_SIZE 4096 -struct drv_msg { - struct pseudo_hdr pseudo; - u16 type; - u16 length; - u8 data[0]; -} __attribute__ ((packed)); - struct ft1000_device { struct usb_device *dev; |