diff options
Diffstat (limited to 'wct4xxp_base.c')
-rw-r--r-- | wct4xxp_base.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/wct4xxp_base.c b/wct4xxp_base.c index a060cb7..580b05c 100644 --- a/wct4xxp_base.c +++ b/wct4xxp_base.c @@ -40,6 +40,9 @@ #endif #ifdef LINUX26 #include <linux/moduleparam.h> +#ifdef HOTPLUG_FIRMWARE +#include <linux/firmware.h> +#endif #endif #include "wct4xxp.h" #include "vpm450m.h" @@ -2671,6 +2674,10 @@ static void t4_vpm450_init(struct t4 *wc) unsigned int check1, check2; int laws[4] = { 0, }; int x; +#ifdef HOTPLUG_FIRMWARE + const struct firmware *firmware; +#endif + if (!vpmsupport) { printk("VPM450M: Support Disabled\n"); return; @@ -2687,15 +2694,31 @@ static void t4_vpm450_init(struct t4 *wc) printk("VPM450: Not Present\n"); return; } +#ifdef HOTPLUG_FIRMWARE + if (request_firmware(&firmware, "OCT6114-128D.ima", &wc->dev->dev) != 0 || !firmware) { + printk("VPM450M: Firmware not found to be loaded\n"); + return; + } + printk("VPM450: Firmware of size %d found\n", firmware->size); +#else + printk("VPM450: Using classic method of loading firmware\n"); +#endif /* Setup alaw vs ulaw rules */ for (x=0;x<wc->numspans;x++) { if (wc->tspans[x]->span.channels > 24) laws[x] = 1; } +#ifdef HOTPLUG_FIRMWARE + if (!(wc->vpm450m = init_vpm450m(wc, laws, firmware))) { +#else if (!(wc->vpm450m = init_vpm450m(wc, laws))) { +#endif printk("VPM450: Failed to initialize\n"); return; } +#ifdef HOTPLUG_FIRMWARE + release_firmware(firmware); +#endif wc->vpm = T4_VPM_PRESENT; printk("VPM450: Present and operational servicing %d span(s)\n", vpmspans); } |