Ifdef'd RAM and FLASH debug code out, enabled real code.
This commit is contained in:
parent
0c349acb2d
commit
4ed12c2f49
|
@ -506,10 +506,11 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, UINT32 exeaddr)
|
|||
if ( hw->dlstate != HFA384x_DLSTATE_DISABLED ) {
|
||||
return -EINVAL;
|
||||
}
|
||||
#if 0
|
||||
WLAN_LOG_DEBUG1(1,"ramdl_enable, exeaddr=0x%08x\n", exeaddr);
|
||||
hw->dlstate = HFA384x_DLSTATE_RAMENABLED;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Enable the aux port */
|
||||
if ( (result = hfa384x_cmd_aux_enable(hw)) ) {
|
||||
return result;
|
||||
|
@ -530,7 +531,6 @@ hw->dlstate = HFA384x_DLSTATE_RAMENABLED;
|
|||
/* Disable the aux port */
|
||||
hfa384x_cmd_aux_disable(hw);
|
||||
}
|
||||
#endif
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
@ -562,9 +562,10 @@ int hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
WLAN_LOG_DEBUG0(1,"ramdl_disable\n");
|
||||
hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
||||
#if 0
|
||||
#endif
|
||||
/* There isn't much we can do at this point, so I don't */
|
||||
/* bother w/ the return value */
|
||||
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
|
||||
|
@ -572,7 +573,6 @@ hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
|||
|
||||
/* Disable the aux port */
|
||||
hfa384x_cmd_aux_disable(hw);
|
||||
#endif
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
@ -615,8 +615,9 @@ int hfa384x_drvr_ramdl_write(hfa384x_t *hw, UINT32 daddr, void* buf, UINT32 len)
|
|||
}
|
||||
|
||||
WLAN_LOG_INFO2("Writing %ld bytes to ram @0x%06lx\n", len, daddr);
|
||||
WLAN_HEX_DUMP(1, "dldata", buf, len);
|
||||
#if 0
|
||||
WLAN_HEX_DUMP(1, "dldata", buf, len);
|
||||
#endif
|
||||
/* Copy the data via the aux port */
|
||||
hfa384x_copy_to_aux(hw, daddr, buf, len);
|
||||
|
||||
|
@ -632,7 +633,6 @@ WLAN_HEX_DUMP(1, "dldata", buf, len);
|
|||
result = -EINVAL;
|
||||
}
|
||||
kfree_s(verbuf, len);
|
||||
#endif
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
@ -692,16 +692,16 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
|
|||
}
|
||||
hw->dltimeout = hfa384x2host_16(hw->dltimeout);
|
||||
|
||||
#if 0
|
||||
WLAN_LOG_DEBUG0(1,"flashdl_enable\n");
|
||||
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
|
||||
#if 0
|
||||
#endif
|
||||
/* Enable the aux port */
|
||||
if ( (result = hfa384x_cmd_aux_enable(hw)) ) {
|
||||
return result;
|
||||
}
|
||||
|
||||
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
|
||||
#endif
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
@ -733,9 +733,10 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
|
|||
if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) {
|
||||
return -EINVAL;
|
||||
}
|
||||
#if 0
|
||||
WLAN_LOG_DEBUG0(1,"flashdl_enable\n");
|
||||
hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
||||
#if 0
|
||||
#endif
|
||||
|
||||
/* There isn't much we can do at this point, so I don't */
|
||||
/* bother w/ the return value */
|
||||
|
@ -744,7 +745,6 @@ hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
|||
|
||||
/* Disable the aux port */
|
||||
hfa384x_cmd_aux_disable(hw);
|
||||
#endif
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
|
@ -804,7 +804,9 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, UINT32 daddr, void* buf, UINT32 le
|
|||
dlbufaddr = (hw->bufinfo.page << 7) | hw->bufinfo.offset;
|
||||
verbuf = kmalloc(hw->bufinfo.len, GFP_KERNEL);
|
||||
|
||||
#if 0
|
||||
WLAN_LOG_DEBUG3(1,"dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout);
|
||||
#endif
|
||||
/* Figure out how many times to to the flash prog */
|
||||
nwrites = len / hw->bufinfo.len;
|
||||
nwrites += (len % hw->bufinfo.len) ? 1 : 0;
|
||||
|
@ -823,8 +825,9 @@ WLAN_LOG_DEBUG3(1,"dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw
|
|||
destlo = currdaddr & 0x0000ffff;
|
||||
desthi = currdaddr >> 16;
|
||||
WLAN_LOG_INFO2("Writing %ld bytes to flash @0x%06lx\n", currlen, currdaddr);
|
||||
WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen);
|
||||
#if 0
|
||||
WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen);
|
||||
#endif
|
||||
/* Set the download mode */
|
||||
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV,
|
||||
destlo, desthi, currlen);
|
||||
|
@ -852,7 +855,6 @@ WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen);
|
|||
kfree_s(verbuf, hw->bufinfo.len);
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Leave the firmware in the 'post-prog' mode. flashdl_disable will */
|
||||
|
|
Loading…
Reference in New Issue