xpp_fxloader: support loading AB with ID > 201
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 21 Oct 2013 12:16:14 +0000 (15:16 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 21 Oct 2013 13:55:18 +0000 (16:55 +0300)
Support loading firmware for Astribanks with bcdDevice > 2.01, as we'll
have 2.02 soon.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

xpp/xpp_fxloader

index 01be192..076f0ec 100644 (file)
@@ -217,12 +217,14 @@ usb_firmware_device() {
        id_str="$1"
        devpath="$2"
 
+       bcd_device=`echo "$id_str" | cut -d/ -f3`
+
        case "$id_str" in
        e4e4/11[3456]0/101|e4e4/1163/101)
                fw="USB_FW.hex"
                ;;
-       e4e4/116[03]/201)
-               fw="USB_FW.201.hex"
+       e4e4/116[03]/20?)
+               fw="USB_FW.${bcd_device}.hex"
                ;;
        e4e4/*)
                debug "No USB firmware for device $devpath ($id_str)"
@@ -332,7 +334,7 @@ fpga_firmware_device() {
        e4e4/11[456]1/101)
                fw="FPGA_${id_product}.hex"
                ;;
-       e4e4/1161/201)
+       e4e4/1161/20?)
                fw="FPGA_${id_product}.${bcd_device}.hex"
                ;;
        e4e4/*)