static u16 get_request_type_usb(struct ft1000_device *ft1000dev) { u16 request_type; u32 status; u16 tempword; u32 tempx; struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); if (pft1000info->bootmode == 1) { status = fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_TYPE_LOC, (u8 *)&tempx); tempx = ntohl(tempx); } else { if (pft1000info->usbboot == 2) { tempx = pft1000info->tempbuf[2]; tempword = pft1000info->tempbuf[3]; } else { tempx = 0; status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_TYPE_LOC, (u8 *)&tempword, 1); } tempx |= (tempword << 16); tempx = ntohl(tempx); } request_type = (u16)tempx; return request_type; }
static long get_request_value(struct ft1000_usb *ft1000dev) { u32 value; u16 tempword; int status; if (ft1000dev->bootmode == 1) { status = fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&value); value = ntohl(value); } else { status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&tempword, 0); value = tempword; status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&tempword, 1); value |= (tempword << 16); value = ntohl(value); } return value; }
static u16 get_request_type(struct ft1000_usb *ft1000dev) { u16 request_type; int status; u16 tempword; u32 tempx; if (ft1000dev->bootmode == 1) { status = fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_TYPE_LOC, (u8 *)&tempx); tempx = ntohl(tempx); } else { tempx = 0; status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_TYPE_LOC, (u8 *)&tempword, 1); tempx |= (tempword << 16); tempx = ntohl(tempx); } request_type = (u16)tempx; return request_type; }
//--------------------------------------------------------------------------- // Function: get_request_value // // Parameters: struct ft1000_device - device structure // // Returns: request value - success // // Description: This function returns the request value // // Notes: // //--------------------------------------------------------------------------- static long get_request_value(struct ft1000_device *ft1000dev) { u32 value; u16 tempword; u32 status; struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); if (pft1000info->bootmode == 1) { status = fix_ft1000_read_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&value); value = ntohl(value); } else { status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&tempword, 0); value = tempword; status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_SIZE_LOC, (u8 *)&tempword, 1); value |= (tempword << 16); value = ntohl(value); } return value; }