From 614a39ced8799b3ec63cc738ee7dda095a6ea74c Mon Sep 17 00:00:00 2001 From: file Date: Wed, 7 Feb 2007 20:09:29 +0000 Subject: Merged revisions 2107 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ r2107 | file | 2007-02-07 15:01:41 -0500 (Wed, 07 Feb 2007) | 2 lines Merge in zaptel-firmware branch. This basically downloads the firmware from the FTP site and builds the appropriate headers based on the current version. Drivers just know they need a certain firmware and get fed the current version. If this prevents your zaptel from building do a make distclean and start fresh or make sure the firmware is checked in make menuselect. ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2108 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp/Kbuild | 16 +++++++--------- wct4xxp/Makefile | 12 +++++------- wct4xxp/OCT6114-128D.ima | Bin 249159 -> 0 bytes wct4xxp/OCT6114-64D.ima | Bin 249159 -> 0 bytes wct4xxp/base.c | 28 ++++++++++++++-------------- wct4xxp/vpm450m.c | 1 - 6 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 wct4xxp/OCT6114-128D.ima delete mode 100644 wct4xxp/OCT6114-64D.ima (limited to 'wct4xxp') diff --git a/wct4xxp/Kbuild b/wct4xxp/Kbuild index ea6148b..105ca73 100644 --- a/wct4xxp/Kbuild +++ b/wct4xxp/Kbuild @@ -5,19 +5,17 @@ EXTRA_CFLAGS := -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(sr wct4xxp-objs := base.o vpm450m.o $(shell $(src)/../oct612x/octasic-helper objects ../oct612x) ifneq ($(HOTPLUG_FIRMWARE),yes) -wct4xxp-objs += firmware_oct6114-64d.o firmware_oct6114-128d.o +wct4xxp-objs += ../firmware/zaptel-fw-oct6114-064.o ../firmware/zaptel-fw-oct6114-128.o endif +$(obj)/../firmware/zaptel-fw-oct6114-064.o: $(obj)/base.o + $(MAKE) -C $(obj)/../firmware zaptel-fw-oct6114-064.o + +$(obj)/../firmware/zaptel-fw-oct6114-128.o: $(obj)/base.o + $(MAKE) -C $(obj)/../firmware zaptel-fw-oct6114-128.o + $(obj)/base.o: $(src)/vpm450m.h $(src)/wct4xxp.h $(obj)/base.o: $(src)/../zaptel.h $(obj)/vpm450m.o: $(src)/vpm450m.h $(obj)/vpm450m.o: $(src)/../oct612x/include/oct6100api/oct6100_api.h - -$(obj)/firmware_oct6114-64d.o: $(src)/OCT6114-64D.ima $(obj)/base.o - @echo Making firmware object file for $(notdir $<) - @cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o - -$(obj)/firmware_oct6114-128d.o: $(src)/OCT6114-128D.ima $(obj)/base.o - @echo Making firmware object file for $(notdir $<) - @cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o diff --git a/wct4xxp/Makefile b/wct4xxp/Makefile index 7fe2869..2fd4ee3 100644 --- a/wct4xxp/Makefile +++ b/wct4xxp/Makefile @@ -16,15 +16,13 @@ base.o: ../zaptel.h vpm450m.h wct4xxp.h vpm450m.o: vpm450m.h ../oct612x/include/oct6100api/oct6100_api.h -firmware_oct6114-64d.o: OCT6114-64D.ima base.o - @echo Making firmware object file for $< - ../build_tools/make_firmware_object $< $@ base.o +../firmware/zaptel-fw-oct6114-064.o: base.o + $(MAKE) -C ../firmware zaptel-fw-oct6114-064.o -firmware_oct6114-128d.o: OCT6114-128D.ima base.o - @echo Making firmware object file for $< - ../build_tools/make_firmware_object $< $@ base.o +../firmware/zaptel-fw-oct6114-128.o: base.o + $(MAKE) -C ../firmware zaptel-fw-oct6114-128.o -wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) firmware_oct6114-64d.o firmware_oct6114-128d.o +wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) ../firmware/zaptel-fw-oct6114-064.o ../firmware/zaptel-fw-oct6114-128.o $(LD) -r -o $@ $^ clean: diff --git a/wct4xxp/OCT6114-128D.ima b/wct4xxp/OCT6114-128D.ima deleted file mode 100644 index 2644bc5..0000000 Binary files a/wct4xxp/OCT6114-128D.ima and /dev/null differ diff --git a/wct4xxp/OCT6114-64D.ima b/wct4xxp/OCT6114-64D.ima deleted file mode 100644 index c379320..0000000 Binary files a/wct4xxp/OCT6114-64D.ima and /dev/null differ diff --git a/wct4xxp/base.c b/wct4xxp/base.c index bcbeeee..bab8813 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -49,8 +49,8 @@ #include "vpm450m.h" #ifdef HOTPLUG_FIRMWARE -static const char *oct064_firmware = "OCT6114-64D.ima"; -static const char *oct128_firmware = "OCT6114-128D.ima"; +#include "../firmware/zaptel-fw-oct6114-064.h" +#include "../firmware/zaptel-fw-oct6114-128.h" #endif /* @@ -3107,10 +3107,10 @@ static void t4_vpm450_init(struct t4 *wc) struct firmware embedded_firmware; const struct firmware *firmware = &embedded_firmware; #if !defined(HOTPLUG_FIRMWARE) - extern void _binary_OCT6114_64D_ima_size; - extern void _binary_OCT6114_128D_ima_size; - extern u8 _binary_OCT6114_64D_ima_start[]; - extern u8 _binary_OCT6114_128D_ima_start[]; + extern void _binary_zaptel_fw_oct6114_064_bin_size; + extern void _binary_zaptel_fw_oct6114_128_bin_size; + extern u8 _binary_zaptel_fw_oct6114_064_bin_start[]; + extern u8 _binary_zaptel_fw_oct6114_128_bin_start[]; #endif if (!vpmsupport) { @@ -3140,38 +3140,38 @@ static void t4_vpm450_init(struct t4 *wc) switch ((vpm_capacity = get_vpm450m_capacity(wc))) { case 64: #if defined(HOTPLUG_FIRMWARE) - if ((request_firmware(&firmware, oct064_firmware, &wc->dev->dev) != 0) || + if ((request_firmware(&firmware, zaptel_fw_oct6114_064, &wc->dev->dev) != 0) || !firmware) { - printk("VPM450: firmware %s not available from userspace\n", oct064_firmware); + printk("VPM450: firmware %s not available from userspace\n", zaptel_fw_oct6114_064); return; } #else - embedded_firmware.data = _binary_OCT6114_64D_ima_start; + embedded_firmware.data = _binary_zaptel_fw_oct6114_064_bin_start; /* Yes... this is weird. objcopy gives us a symbol containing the size of the firmware, not a pointer a variable containing the size. The only way we can get the value of the symbol is to take its address, so we define it as a pointer and then cast that value to the proper type. */ - embedded_firmware.size = (size_t) &_binary_OCT6114_64D_ima_size; + embedded_firmware.size = (size_t) &_binary_zaptel_fw_oct6114_064_bin_size; #endif break; case 128: #if defined(HOTPLUG_FIRMWARE) - if ((request_firmware(&firmware, oct128_firmware, &wc->dev->dev) != 0) || + if ((request_firmware(&firmware, zaptel_fw_oct6114_128, &wc->dev->dev) != 0) || !firmware) { - printk("VPM450: firmware %s not available from userspace\n", oct128_firmware); + printk("VPM450: firmware %s not available from userspace\n", zaptel_fw_oct6114_128); return; } #else - embedded_firmware.data = _binary_OCT6114_128D_ima_start; + embedded_firmware.data = _binary_zaptel_fw_oct6114_128_bin_start; /* Yes... this is weird. objcopy gives us a symbol containing the size of the firmware, not a pointer a variable containing the size. The only way we can get the value of the symbol is to take its address, so we define it as a pointer and then cast that value to the proper type. */ - embedded_firmware.size = (size_t) &_binary_OCT6114_128D_ima_size; + embedded_firmware.size = (size_t) &_binary_zaptel_fw_oct6114_128_bin_size; #endif break; default: diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c index 33e1164..fa9a47a 100644 --- a/wct4xxp/vpm450m.c +++ b/wct4xxp/vpm450m.c @@ -414,7 +414,6 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f ChipOpen.pbyImageFile = firmware->data; ChipOpen.ulImageSize = firmware->size; - ChipOpen.fEnableMemClkOut = TRUE; ChipOpen.ulMemClkFreq = cOCT6100_MCLK_FREQ_133_MHZ; ChipOpen.ulMaxChannels = vpm450m->numchans; -- cgit v1.2.3