// SPDX-License-Identifier: GPL-2.0-only /* DVB USB compliant Linux driver for the * - GENPIX 8pks/qpsk/DCII USB2.0 DVB-S module * * Copyright (C) 2006,2007 Alan Nisota (alannisota@gmail.com) * Copyright (C) 2006,2007 Genpix Electronics (genpix@genpix-electronics.com) * * Thanks to GENPIX for the sample code used to implement this module. * * This module is based off the vp7045 and vp702x modules * * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
*/ #include"gp8psk.h" #include"gp8psk-fe.h"
if (!gp8psk_get_fw_version(d, fw_vers))
info("FW Version = %i.%02i.%i (0x%x) Build %4i/%02i/%02i",
fw_vers[2], fw_vers[1], fw_vers[0], GP8PSK_FW_VERS(fw_vers),
2000 + fw_vers[5], fw_vers[4], fw_vers[3]); else
info("failed to get FW version");
if (!gp8psk_get_fpga_version(d, &fpga_vers))
info("FPGA Version = %i", fpga_vers); else
info("failed to get FPGA version");
}
staticint gp8psk_load_bcm4500fw(struct dvb_usb_device *d)
{ int ret; conststruct firmware *fw = NULL; const u8 *ptr;
u8 *buf; if ((ret = request_firmware(&fw, bcm4500_firmware,
&d->udev->dev)) != 0) {
err("did not find the bcm4500 firmware file '%s' (status %d). You can use /scripts/get_dvb_firmware to get the firmware",
bcm4500_firmware,ret); return ret;
}
ret = -EINVAL;
if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) goto out_rel_fw;
info("downloading bcm4500 firmware from file '%s'",bcm4500_firmware);
ptr = fw->data;
buf = kmalloc(64, GFP_KERNEL); if (!buf) {
ret = -ENOMEM; goto out_rel_fw;
}
while (ptr[0] != 0xff) {
u16 buflen = ptr[0] + 4; if (ptr + buflen >= fw->data + fw->size) {
err("failed to load bcm4500 firmware."); goto out_free;
} if (buflen > 64) {
err("firmware chunk size bigger than 64 bytes."); goto out_free;
}
memcpy(buf, ptr, buflen); if (dvb_usb_generic_write(d, buf, buflen)) {
err("failed to load bcm4500 firmware."); goto out_free;
}
ptr += buflen;
}
/* usb specific object needed to register this driver with the usb subsystem */ staticstruct usb_driver gp8psk_usb_driver = {
.name = "dvb_usb_gp8psk",
.probe = gp8psk_usb_probe,
.disconnect = dvb_usb_device_exit,
.id_table = gp8psk_usb_table,
};
module_usb_driver(gp8psk_usb_driver);
MODULE_AUTHOR("Alan Nisota ");
MODULE_DESCRIPTION("Driver for Genpix DVB-S");
MODULE_VERSION("1.1");
MODULE_LICENSE("GPL");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.