diff options
79 files changed, 5275 insertions, 1330 deletions
@@ -49,3 +49,4 @@ v4l2-apps/util/v4l2-ctl$ v4l2-apps/util/cx18-ctl$ v4l2-apps/util/ivtv-ctl$ v4l2-apps/util/v4l-board-dbg$ +v4l/firmware/ @@ -61,9 +61,16 @@ for i in $CS; do if [ "$parents" == "$old_id" ]; then echo "Ok." else + newname="$TMP/hg_${TREE}_$(printf %0${#NUM}d ${j}).merge" + echo "Nok/Merge:" echo -e "\t\tOld node ID: $old_id" echo -e "\t\tNode parents $parents" + echo -e "\t\tRenamed to $newname" + mv $name $newname + + # Avoids incrementing if rename happens + j=$((j-1)) fi else last="`hg log -r -1|grep changeset`" diff --git a/linux/arch/arm/mach-pxa/devices.c b/linux/arch/arm/mach-pxa/devices.c index d6c05b6ea..a6f2390ce 100644 --- a/linux/arch/arm/mach-pxa/devices.c +++ b/linux/arch/arm/mach-pxa/devices.c @@ -10,11 +10,14 @@ #include <asm/arch/mmc.h> #include <asm/arch/irda.h> #include <asm/arch/i2c.h> +#include <asm/arch/mfp-pxa27x.h> #include <asm/arch/ohci.h> #include <asm/arch/pxa27x_keypad.h> #include <asm/arch/camera.h> +#include <asm/arch/audio.h> #include "devices.h" +#include "generic.h" void __init pxa_register_device(struct platform_device *dev, void *data) { @@ -91,8 +94,19 @@ static struct resource pxa2xx_udc_resources[] = { static u64 udc_dma_mask = ~(u32)0; -struct platform_device pxa_device_udc = { - .name = "pxa2xx-udc", +struct platform_device pxa25x_device_udc = { + .name = "pxa25x-udc", + .id = -1, + .resource = pxa2xx_udc_resources, + .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), + .dev = { + .platform_data = &pxa_udc_info, + .dma_mask = &udc_dma_mask, + } +}; + +struct platform_device pxa27x_device_udc = { + .name = "pxa27x-udc", .id = -1, .resource = pxa2xx_udc_resources, .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), @@ -233,8 +247,15 @@ struct platform_device pxa_device_i2c = { .num_resources = ARRAY_SIZE(pxai2c_resources), }; +static unsigned long pxa27x_i2c_mfp_cfg[] = { + GPIO117_I2C_SCL, + GPIO118_I2C_SDA, +}; + void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) { + if (cpu_is_pxa27x()) + pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg)); pxa_register_device(&pxa_device_i2c, info); } @@ -278,8 +299,69 @@ struct platform_device pxa_device_rtc = { .id = -1, }; +static struct resource pxa_ac97_resources[] = { + [0] = { + .start = 0x40500000, + .end = 0x40500000 + 0xfff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_AC97, + .end = IRQ_AC97, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 pxa_ac97_dmamask = 0xffffffffUL; + +struct platform_device pxa_device_ac97 = { + .name = "pxa2xx-ac97", + .id = -1, + .dev = { + .dma_mask = &pxa_ac97_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(pxa_ac97_resources), + .resource = pxa_ac97_resources, +}; + +void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops) +{ + pxa_register_device(&pxa_device_ac97, ops); +} + #ifdef CONFIG_PXA25x +static struct resource pxa25x_resource_pwm0[] = { + [0] = { + .start = 0x40b00000, + .end = 0x40b0000f, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa25x_device_pwm0 = { + .name = "pxa25x-pwm", + .id = 0, + .resource = pxa25x_resource_pwm0, + .num_resources = ARRAY_SIZE(pxa25x_resource_pwm0), +}; + +static struct resource pxa25x_resource_pwm1[] = { + [0] = { + .start = 0x40c00000, + .end = 0x40c0000f, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa25x_device_pwm1 = { + .name = "pxa25x-pwm", + .id = 1, + .resource = pxa25x_resource_pwm1, + .num_resources = ARRAY_SIZE(pxa25x_resource_pwm1), +}; + static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32); static struct resource pxa25x_resource_ssp[] = { @@ -568,6 +650,36 @@ struct platform_device pxa27x_device_ssp3 = { .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), }; +static struct resource pxa27x_resource_pwm0[] = { + [0] = { + .start = 0x40b00000, + .end = 0x40b0001f, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa27x_device_pwm0 = { + .name = "pxa27x-pwm", + .id = 0, + .resource = pxa27x_resource_pwm0, + .num_resources = ARRAY_SIZE(pxa27x_resource_pwm0), +}; + +static struct resource pxa27x_resource_pwm1[] = { + [0] = { + .start = 0x40c00000, + .end = 0x40c0001f, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa27x_device_pwm1 = { + .name = "pxa27x-pwm", + .id = 1, + .resource = pxa27x_resource_pwm1, + .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1), +}; + static struct resource pxa27x_resource_camera[] = { [0] = { .start = 0x50000000, diff --git a/linux/arch/arm/mach-pxa/pcm990-baseboard.c b/linux/arch/arm/mach-pxa/pcm990-baseboard.c index 49d951db0..5d87c7c86 100644 --- a/linux/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.c @@ -24,6 +24,7 @@ #include <linux/platform_device.h> #include <linux/ide.h> #include <linux/i2c.h> +#include <linux/pwm_backlight.h> #include <media/soc_camera.h> @@ -33,12 +34,103 @@ #include <asm/mach/map.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa2xx-gpio.h> +#include <asm/arch/audio.h> #include <asm/arch/mmc.h> #include <asm/arch/ohci.h> #include <asm/arch/pcm990_baseboard.h> +#include <asm/arch/pxafb.h> + +#include "devices.h" /* - * The PCM-990 development baseboard uses PCM-027's hardeware in the + * pcm990_lcd_power - control power supply to the LCD + * @on: 0 = switch off, 1 = switch on + * + * Called by the pxafb driver + */ +#ifndef CONFIG_PCM990_DISPLAY_NONE +static void pcm990_lcd_power(int on, struct fb_var_screeninfo *var) +{ + if (on) { + /* enable LCD-Latches + * power on LCD + */ + __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3) = + PCM990_CTRL_LCDPWR + PCM990_CTRL_LCDON; + } else { + /* disable LCD-Latches + * power off LCD + */ + __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3) = 0x00; + } +} +#endif + +#if defined(CONFIG_PCM990_DISPLAY_SHARP) +static struct pxafb_mode_info fb_info_sharp_lq084v1dg21 = { + .pixclock = 28000, + .xres = 640, + .yres = 480, + .bpp = 16, + .hsync_len = 20, + .left_margin = 103, + .right_margin = 47, + .vsync_len = 6, + .upper_margin = 28, + .lower_margin = 5, + .sync = 0, + .cmap_greyscale = 0, +}; + +static struct pxafb_mach_info pcm990_fbinfo __initdata = { + .modes = &fb_info_sharp_lq084v1dg21, + .num_modes = 1, + .lccr0 = LCCR0_PAS, + .lccr3 = LCCR3_PCP, + .pxafb_lcd_power = pcm990_lcd_power, +}; +#elif defined(CONFIG_PCM990_DISPLAY_NEC) +struct pxafb_mode_info fb_info_nec_nl6448bc20_18d = { + .pixclock = 39720, + .xres = 640, + .yres = 480, + .bpp = 16, + .hsync_len = 32, + .left_margin = 16, + .right_margin = 48, + .vsync_len = 2, + .upper_margin = 12, + .lower_margin = 17, + .sync = 0, + .cmap_greyscale = 0, +}; + +static struct pxafb_mach_info pcm990_fbinfo __initdata = { + .modes = &fb_info_nec_nl6448bc20_18d, + .num_modes = 1, + .lccr0 = LCCR0_Act, + .lccr3 = LCCR3_PixFlEdg, + .pxafb_lcd_power = pcm990_lcd_power, +}; +#endif + +static struct platform_pwm_backlight_data pcm990_backlight_data = { + .pwm_id = 0, + .max_brightness = 1023, + .dft_brightness = 1023, + .pwm_period_ns = 78770, +}; + +static struct platform_device pcm990_backlight_device = { + .name = "pwm-backlight", + .dev = { + .parent = &pxa27x_device_pwm0.dev, + .platform_data = &pcm990_backlight_data, + }, +}; + +/* + * The PCM-990 development baseboard uses PCM-027's hardware in the * following way: * * - LCD support is in use @@ -333,36 +425,6 @@ static struct i2c_board_info __initdata pcm990_i2c_devices[] = { #endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ /* - * AC97 support - * Note: The connected AC97 mixer also reports interrupts at PCM990_AC97_IRQ - */ -static struct resource pxa27x_ac97_resources[] = { - [0] = { - .start = 0x40500000, - .end = 0x40500000 + 0xfff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_AC97, - .end = IRQ_AC97, - .flags = IORESOURCE_IRQ, - }, -}; - -static u64 pxa_ac97_dmamask = 0xffffffffUL; - -static struct platform_device pxa27x_device_ac97 = { - .name = "pxa2xx-ac97", - .id = -1, - .dev = { - .dma_mask = &pxa_ac97_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(pxa27x_ac97_resources), - .resource = pxa27x_ac97_resources, -}; - -/* * enable generic access to the base board control CPLDs U6 and U7 */ static struct map_desc pcm990_io_desc[] __initdata = { @@ -393,7 +455,11 @@ void __init pcm990_baseboard_init(void) /* register CPLD's IRQ controller */ pcm990_init_irq(); - platform_device_register(&pxa27x_device_ac97); +#ifndef CONFIG_PCM990_DISPLAY_NONE + set_pxa_fb_info(&pcm990_fbinfo); +#endif + pxa_gpio_mode(GPIO16_PWM0_MD); + platform_device_register(&pcm990_backlight_device); /* MMC */ pxa_set_mci_info(&pcm990_mci_platform_data); @@ -402,6 +468,7 @@ void __init pcm990_baseboard_init(void) pxa_set_ohci_info(&pcm990_ohci_platform_data); pxa_set_i2c_info(NULL); + pxa_set_ac97_info(NULL); #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) pxa_set_camera_info(&pcm990_pxacamera_platform_data); diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig index 7a7803b5d..93ea201f4 100644 --- a/linux/drivers/media/Kconfig +++ b/linux/drivers/media/Kconfig @@ -38,7 +38,6 @@ config VIDEO_ALLOW_V4L1 bool "Enable Video For Linux API 1 (DEPRECATED)" depends on VIDEO_DEV && VIDEO_V4L2_COMMON default VIDEO_DEV && VIDEO_V4L2_COMMON - select VIDEO_V4L1_COMPAT ---help--- Enables drivers based on the legacy V4L1 API. @@ -49,9 +48,9 @@ config VIDEO_ALLOW_V4L1 If you are unsure as to whether this is required, answer Y. config VIDEO_V4L1_COMPAT - bool "Enable Video For Linux API 1 compatible Layer" + bool "Enable Video For Linux API 1 compatible Layer" if !VIDEO_ALLOW_V4L1 depends on VIDEO_DEV - default VIDEO_DEV + default y ---help--- Enables a compatibility API used by most V4L2 devices to allow its usage with legacy applications that supports only V4L1 api. diff --git a/linux/drivers/media/common/ir-functions.c b/linux/drivers/media/common/ir-functions.c index 3653b6d37..ddbd4be99 100644 --- a/linux/drivers/media/common/ir-functions.c +++ b/linux/drivers/media/common/ir-functions.c @@ -78,6 +78,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, if (repeat) set_bit(EV_REP, dev->evbit); } +EXPORT_SYMBOL_GPL(ir_input_init); void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir) { @@ -86,6 +87,7 @@ void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir) ir_input_key_event(dev,ir); } } +EXPORT_SYMBOL_GPL(ir_input_nokey); void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, u32 ir_key, u32 ir_raw) @@ -108,6 +110,7 @@ void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, input_event(a, EV_IR, ir->ir_type, ir->ir_raw); #endif } +EXPORT_SYMBOL_GPL(ir_input_keydown); /* -------------------------------------------------------------------------- */ /* extract mask bits out of data and pack them into the result */ @@ -126,6 +129,7 @@ u32 ir_extract_bits(u32 data, u32 mask) return value; } +EXPORT_SYMBOL_GPL(ir_extract_bits); static int inline getbit(u32 *samples, int bit) { @@ -150,6 +154,7 @@ int ir_dump_samples(u32 *samples, int count) printk("\n"); return 0; } +EXPORT_SYMBOL_GPL(ir_dump_samples); /* decode raw samples, pulse distance coding used by NEC remotes */ int ir_decode_pulsedistance(u32 *samples, int count, int low, int high) @@ -216,6 +221,7 @@ int ir_decode_pulsedistance(u32 *samples, int count, int low, int high) return value; } +EXPORT_SYMBOL_GPL(ir_decode_pulsedistance); /* decode raw samples, biphase coding, used by rc5 for example */ int ir_decode_biphase(u32 *samples, int count, int low, int high) @@ -257,6 +263,7 @@ int ir_decode_biphase(u32 *samples, int count, int low, int high) } return value; } +EXPORT_SYMBOL_GPL(ir_decode_biphase); /* RC5 decoding stuff, moved from bttv-input.c to share it with * saa7134 */ @@ -357,6 +364,7 @@ void ir_rc5_timer_end(unsigned long data) } } } +EXPORT_SYMBOL_GPL(ir_rc5_timer_end); void ir_rc5_timer_keyup(unsigned long data) { @@ -365,21 +373,4 @@ void ir_rc5_timer_keyup(unsigned long data) dprintk(1, "ir-common: key released\n"); ir_input_nokey(ir->dev, &ir->ir); } - -EXPORT_SYMBOL_GPL(ir_input_init); -EXPORT_SYMBOL_GPL(ir_input_nokey); -EXPORT_SYMBOL_GPL(ir_input_keydown); - -EXPORT_SYMBOL_GPL(ir_extract_bits); -EXPORT_SYMBOL_GPL(ir_dump_samples); -EXPORT_SYMBOL_GPL(ir_decode_biphase); -EXPORT_SYMBOL_GPL(ir_decode_pulsedistance); - -EXPORT_SYMBOL_GPL(ir_rc5_timer_end); EXPORT_SYMBOL_GPL(ir_rc5_timer_keyup); - -/* - * Local variables: - * c-basic-offset: 8 - * End: - */ diff --git a/linux/drivers/media/common/tuners/tuner-xc2028.c b/linux/drivers/media/common/tuners/tuner-xc2028.c index 88fd2c91c..a3272e81e 100644 --- a/linux/drivers/media/common/tuners/tuner-xc2028.c +++ b/linux/drivers/media/common/tuners/tuner-xc2028.c @@ -259,7 +259,7 @@ static int load_all_firmwares(struct dvb_frontend *fe) { struct xc2028_data *priv = fe->tuner_priv; const struct firmware *fw = NULL; - unsigned char *p, *endp; + const unsigned char *p, *endp; int rc = 0; int n, n_array; char name[33]; diff --git a/linux/drivers/media/common/tuners/xc5000.c b/linux/drivers/media/common/tuners/xc5000.c index 63b4dba44..e0f045e1b 100644 --- a/linux/drivers/media/common/tuners/xc5000.c +++ b/linux/drivers/media/common/tuners/xc5000.c @@ -282,7 +282,7 @@ static int xc_read_reg(struct xc5000_priv *priv, u16 regAddr, u16 *i2cData) return result; } -static int xc_load_i2c_sequence(struct dvb_frontend *fe, u8 i2c_sequence[]) +static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence) { struct xc5000_priv *priv = fe->tuner_priv; diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index 0ae0e5852..e6d20310a 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -33,6 +33,7 @@ #include <linux/cdev.h> #include "compat.h" #include <linux/mutex.h> +#include <linux/smp_lock.h> #include "dvbdev.h" static int dvbdev_debug; @@ -75,6 +76,7 @@ static int dvb_device_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev; + lock_kernel(); dvbdev = dvbdev_find_device (iminor(inode)); if (dvbdev && dvbdev->fops) { @@ -95,8 +97,10 @@ static int dvb_device_open(struct inode *inode, struct file *file) file->f_op = fops_get(old_fops); } fops_put(old_fops); + unlock_kernel(); return err; } + unlock_kernel(); return -ENODEV; } @@ -425,7 +429,12 @@ static int __init init_dvbdev(void) return retval; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) cdev_init(&dvb_device_cdev, &dvb_device_fops); +#else + cdev_init(&dvb_device_cdev, + (struct file_operations *)&dvb_device_fops); +#endif if ((retval = cdev_add(&dvb_device_cdev, dev, MAX_DVB_MINORS)) != 0) { printk(KERN_ERR "dvb-core: unable register character device\n"); goto error; diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index 9a3e97247..578afce68 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -24,6 +24,7 @@ * see Documentation/dvb/README.dvb-usb for more information */ #include <media/tuner.h> +#include <linux/vmalloc.h> #include "cxusb.h" @@ -791,12 +792,26 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, if (fw->data[idoff] == (USB_VID_DVICO & 0xff) && fw->data[idoff + 1] == USB_VID_DVICO >> 8) { - fw->data[idoff + 2] = + struct firmware new_fw; + u8 *new_fw_data = vmalloc(fw->size); + int ret; + + if (!new_fw_data) + return -ENOMEM; + + memcpy(new_fw_data, fw->data, fw->size); + new_fw.size = fw->size; + new_fw.data = new_fw_data; + + new_fw_data[idoff + 2] = le16_to_cpu(udev->descriptor.idProduct) + 1; - fw->data[idoff + 3] = + new_fw_data[idoff + 3] = le16_to_cpu(udev->descriptor.idProduct) >> 8; - return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2); + ret = usb_cypress_load_firmware(udev, &new_fw, + CYPRESS_FX2); + vfree(new_fw_data); + return ret; } } diff --git a/linux/drivers/media/dvb/dvb-usb/gp8psk.c b/linux/drivers/media/dvb/dvb-usb/gp8psk.c index 6eb8cc37f..1b002909b 100644 --- a/linux/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/linux/drivers/media/dvb/dvb-usb/gp8psk.c @@ -86,7 +86,8 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) { int ret; const struct firmware *fw = NULL; - u8 *ptr, *buf; + 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) " diff --git a/linux/drivers/media/dvb/frontends/bcm3510.c b/linux/drivers/media/dvb/frontends/bcm3510.c index 1cd63a4df..ba85a5618 100644 --- a/linux/drivers/media/dvb/frontends/bcm3510.c +++ b/linux/drivers/media/dvb/frontends/bcm3510.c @@ -591,7 +591,8 @@ static void bcm3510_release(struct dvb_frontend* fe) */ #define BCM3510_DEFAULT_FIRMWARE "dvb-fe-bcm3510-01.fw" -static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, u8 *b, u16 len) +static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, const u8 *b, + u16 len) { int ret = 0,i; bcm3510_register_value vH, vL,vD; @@ -615,7 +616,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe) struct bcm3510_state* st = fe->demodulator_priv; const struct firmware *fw; u16 addr,len; - u8 *b; + const u8 *b; int ret,i; deb_info("requesting firmware\n"); diff --git a/linux/drivers/media/dvb/frontends/nxt200x.c b/linux/drivers/media/dvb/frontends/nxt200x.c index 9172843dd..a079fa824 100644 --- a/linux/drivers/media/dvb/frontends/nxt200x.c +++ b/linux/drivers/media/dvb/frontends/nxt200x.c @@ -94,7 +94,8 @@ static u8 i2c_readbytes (struct nxt200x_state* state, u8 addr, u8* buf, u8 len) return 0; } -static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, u8 *buf, u8 len) +static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, + const u8 *buf, u8 len) { u8 buf2 [len+1]; int err; diff --git a/linux/drivers/media/dvb/frontends/or51211.c b/linux/drivers/media/dvb/frontends/or51211.c index 7eaa47655..6afe12aac 100644 --- a/linux/drivers/media/dvb/frontends/or51211.c +++ b/linux/drivers/media/dvb/frontends/or51211.c @@ -69,7 +69,7 @@ struct or51211_state { u32 current_frequency; }; -static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf, +static int i2c_writebytes (struct or51211_state* state, u8 reg, const u8 *buf, int len) { int err; @@ -77,7 +77,7 @@ static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf, msg.addr = reg; msg.flags = 0; msg.len = len; - msg.buf = buf; + msg.buf = (u8 *)buf; if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { printk(KERN_WARNING "or51211: i2c_writebytes error " diff --git a/linux/drivers/media/dvb/frontends/sp8870.c b/linux/drivers/media/dvb/frontends/sp8870.c index aa78aa14a..1c9a9b405 100644 --- a/linux/drivers/media/dvb/frontends/sp8870.c +++ b/linux/drivers/media/dvb/frontends/sp8870.c @@ -98,7 +98,7 @@ static int sp8870_readreg (struct sp8870_state* state, u16 reg) static int sp8870_firmware_upload (struct sp8870_state* state, const struct firmware *fw) { struct i2c_msg msg; - char *fw_buf = fw->data; + const char *fw_buf = fw->data; int fw_pos; u8 tx_buf[255]; int tx_len; diff --git a/linux/drivers/media/dvb/frontends/sp887x.c b/linux/drivers/media/dvb/frontends/sp887x.c index 49f55877f..4543609e1 100644 --- a/linux/drivers/media/dvb/frontends/sp887x.c +++ b/linux/drivers/media/dvb/frontends/sp887x.c @@ -140,7 +140,7 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware u8 buf [BLOCKSIZE+2]; int i; int fw_size = fw->size; - unsigned char *mem = fw->data; + const unsigned char *mem = fw->data; dprintk("%s\n", __func__); diff --git a/linux/drivers/media/dvb/frontends/tda10048.c b/linux/drivers/media/dvb/frontends/tda10048.c index f2d66234a..7c718e247 100644 --- a/linux/drivers/media/dvb/frontends/tda10048.c +++ b/linux/drivers/media/dvb/frontends/tda10048.c @@ -233,7 +233,7 @@ static u8 tda10048_readreg(struct tda10048_state *state, u8 reg) } static int tda10048_writeregbulk(struct tda10048_state *state, u8 reg, - u8 *data, u16 len) + const u8 *data, u16 len) { int ret = -EREMOTEIO; struct i2c_msg msg; diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c index a0d638653..1465ff77b 100644 --- a/linux/drivers/media/dvb/frontends/tda1004x.c +++ b/linux/drivers/media/dvb/frontends/tda1004x.c @@ -317,7 +317,7 @@ static int tda10046h_set_bandwidth(struct tda1004x_state *state, } static int tda1004x_do_upload(struct tda1004x_state *state, - unsigned char *mem, unsigned int len, + const unsigned char *mem, unsigned int len, u8 dspCodeCounterReg, u8 dspCodeInReg) { u8 buf[65]; diff --git a/linux/drivers/media/dvb/siano/smscoreapi.h b/linux/drivers/media/dvb/siano/smscoreapi.h index 482ef0676..dbedc315f 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.h +++ b/linux/drivers/media/dvb/siano/smscoreapi.h @@ -29,6 +29,7 @@ #include <linux/scatterlist.h> #include <linux/types.h> #include <asm/page.h> + #include "compat.h" #include "dmxdev.h" #include "dvbdev.h" diff --git a/linux/drivers/media/dvb/siano/smsusb.c b/linux/drivers/media/dvb/siano/smsusb.c index 079deb2a1..40582bf70 100644 --- a/linux/drivers/media/dvb/siano/smsusb.c +++ b/linux/drivers/media/dvb/siano/smsusb.c @@ -55,7 +55,7 @@ struct smsusb_device_t { static int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) static void smsusb_onresponse(struct urb *urb) #else static void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) diff --git a/linux/drivers/media/radio/miropcm20-rds.c b/linux/drivers/media/radio/miropcm20-rds.c index 06dfed9ef..af90cdcf2 100644 --- a/linux/drivers/media/radio/miropcm20-rds.c +++ b/linux/drivers/media/radio/miropcm20-rds.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <linux/delay.h> @@ -27,13 +28,16 @@ static int rds_f_open(struct inode *in, struct file *fi) if (rds_users) return -EBUSY; + lock_kernel(); rds_users++; if ((text_buffer=kmalloc(66, GFP_KERNEL)) == 0) { rds_users--; printk(KERN_NOTICE "aci-rds: Out of memory by open()...\n"); + unlock_kernel(); return -ENOMEM; } + unlock_kernel(); return 0; } @@ -104,7 +108,11 @@ static ssize_t rds_f_read(struct file *file, char __user *buffer, size_t length, } } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) static const struct file_operations rds_fops = { +#else +static struct file_operations rds_fops = { +#endif .owner = THIS_MODULE, .read = rds_f_read, .open = rds_f_open, diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index 45c90b8bc..70a96a361 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -24,21 +24,21 @@ config VIDEOBUF_VMALLOC select VIDEOBUF_GEN tristate +config VIDEOBUF_DMA_CONTIG + depends on HAS_DMA + select VIDEOBUF_GEN + tristate + config VIDEOBUF_DVB tristate select VIDEOBUF_GEN - select VIDEOBUF_DMA_SG config VIDEO_BTCX tristate -config VIDEO_IR_I2C - tristate - config VIDEO_IR tristate depends on INPUT - select VIDEO_IR_I2C if I2C config VIDEO_TVEEPROM tristate @@ -84,6 +84,19 @@ config VIDEO_HELPER_CHIPS_AUTO In doubt, say Y. +config VIDEO_IR_I2C + tristate "I2C module for IR" if !VIDEO_HELPER_CHIPS_AUTO + depends on I2C && VIDEO_IR + default y + ---help--- + Most boards have an IR chip directly connected via GPIO. However, + some video boards have the IR connected via I2C bus. + + If your board doesn't have an I2C IR chip, you may disable this + option. + + In doubt, say Y. + # # Encoder / Decoder module configuration # @@ -600,9 +613,6 @@ config VIDEO_STRADIS driver for PCI. There is a product page at <http://www.stradis.com/>. -config VIDEO_ZORAN_ZR36060 - tristate - config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux" depends on PCI && I2C_ALGOBIT && VIDEO_V4L1 && VIRT_TO_BUS @@ -616,61 +626,64 @@ config VIDEO_ZORAN To compile this driver as a module, choose M here: the module will be called zr36067. +config VIDEO_ZORAN_DC30 + tristate "Pinnacle/Miro DC30(+) support" + depends on VIDEO_ZORAN + select VIDEO_ADV7175 if VIDEO_HELPER_CHIPS_AUTO + select VIDEO_VPX3220 if VIDEO_HELPER_CHIPS_AUTO + help + Support for the Pinnacle/Miro DC30(+) MJPEG capture/playback + card. This also supports really old DC10 cards based on the + zr36050 MJPEG codec and zr36016 VFE. + +config VIDEO_ZORAN_ZR36060 + tristate "Zoran ZR36060" + depends on VIDEO_ZORAN + help + Say Y to support Zoran boards based on 36060 chips. + This includes Iomega Bus, Pinnacle DC10, Linux media Labs 33 + and 33 R10 and AverMedia 6 boards. + config VIDEO_ZORAN_BUZ tristate "Iomega Buz support" - depends on VIDEO_ZORAN + depends on VIDEO_ZORAN_ZR36060 select VIDEO_SAA7111 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_SAA7185 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_ZORAN_ZR36060 help Support for the Iomega Buz MJPEG capture/playback card. config VIDEO_ZORAN_DC10 tristate "Pinnacle/Miro DC10(+) support" - depends on VIDEO_ZORAN - select VIDEO_SAA7110 + depends on VIDEO_ZORAN_ZR36060 + select VIDEO_SAA7110 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_ADV7175 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_ZORAN_ZR36060 help Support for the Pinnacle/Miro DC10(+) MJPEG capture/playback card. -config VIDEO_ZORAN_DC30 - tristate "Pinnacle/Miro DC30(+) support" - depends on VIDEO_ZORAN - select VIDEO_ADV7175 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_VPX3220 if VIDEO_HELPER_CHIPS_AUTO - help - Support for the Pinnacle/Miro DC30(+) MJPEG capture/playback - card. This also supports really old DC10 cards based on the - zr36050 MJPEG codec and zr36016 VFE. - config VIDEO_ZORAN_LML33 tristate "Linux Media Labs LML33 support" - depends on VIDEO_ZORAN + depends on VIDEO_ZORAN_ZR36060 select VIDEO_BT819 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_BT856 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_ZORAN_ZR36060 help Support for the Linux Media Labs LML33 MJPEG capture/playback card. config VIDEO_ZORAN_LML33R10 tristate "Linux Media Labs LML33R10 support" - depends on VIDEO_ZORAN + depends on VIDEO_ZORAN_ZR36060 select VIDEO_SAA7114 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_ADV7170 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_ZORAN_ZR36060 help support for the Linux Media Labs LML33R10 MJPEG capture/playback card. config VIDEO_ZORAN_AVS6EYES tristate "AverMedia 6 Eyes support (EXPERIMENTAL)" - depends on VIDEO_ZORAN && EXPERIMENTAL && VIDEO_V4L1 + depends on VIDEO_ZORAN_ZR36060 && EXPERIMENTAL && VIDEO_V4L1 select VIDEO_BT856 if VIDEO_HELPER_CHIPS_AUTO select VIDEO_KS0127 if VIDEO_HELPER_CHIPS_AUTO - select VIDEO_ZORAN_ZR36060 help Support for the AverMedia 6 Eyes video surveillance card. @@ -915,7 +928,7 @@ endif # V4L_USB_DRIVERS config SOC_CAMERA tristate "SoC camera support" depends on VIDEO_V4L2 && HAS_DMA - select VIDEOBUF_DMA_SG + select VIDEOBUF_GEN help SoC Camera is a common API to several cameras, not connecting over a bus like PCI or USB. For example some i2c camera connected @@ -950,11 +963,26 @@ config MT9V022_PCA9536_SWITCH Select this if your MT9V022 camera uses a PCA9536 I2C GPIO extender to switch between 8 and 10 bit datawidth modes +config SOC_CAMERA_PLATFORM + tristate "platform camera support" + depends on SOC_CAMERA + help + This is a generic SoC camera platform driver, useful for testing + config VIDEO_PXA27x tristate "PXA27x Quick Capture Interface driver" depends on VIDEO_DEV && PXA27x select SOC_CAMERA + select VIDEOBUF_DMA_SG ---help--- This is a v4l2 driver for the PXA27x Quick Capture Interface +config VIDEO_SH_MOBILE_CEU + tristate "SuperH Mobile CEU Interface driver" + depends on VIDEO_DEV + select SOC_CAMERA + select VIDEOBUF_DMA_CONTIG + ---help--- + This is a v4l2 driver for the SuperH Mobile CEU Interface + endif # VIDEO_CAPTURE_DRIVERS diff --git a/linux/drivers/media/video/Makefile b/linux/drivers/media/video/Makefile index 0a1837c99..00e2df8a4 100644 --- a/linux/drivers/media/video/Makefile +++ b/linux/drivers/media/video/Makefile @@ -89,6 +89,7 @@ obj-$(CONFIG_VIDEO_TUNER) += tuner.o obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o +obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o obj-$(CONFIG_VIDEO_BTCX) += btcx-risc.o @@ -133,9 +134,11 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o obj-$(CONFIG_VIDEO_CX23885) += cx23885/ obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o +obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o obj-$(CONFIG_SOC_CAMERA) += soc_camera.o obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o +obj-$(CONFIG_SOC_CAMERA_PLATFORM) += soc_camera_platform.o obj-$(CONFIG_VIDEO_AU0828) += au0828/ diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index df2dfd2ba..ff9d09f09 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -3809,7 +3809,8 @@ static int terratec_active_radio_upgrade(struct bttv *btv) #define BTTV_ALT_DCLK 0x100000 #define BTTV_ALT_NCONFIG 0x800000 -static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen) +static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro, + u32 microlen) { u32 n; u8 bits; diff --git a/linux/drivers/media/video/cx18/cx18-av-core.c b/linux/drivers/media/video/cx18/cx18-av-core.c index 3ccdf613b..3b0a2c450 100644 --- a/linux/drivers/media/video/cx18/cx18-av-core.c +++ b/linux/drivers/media/video/cx18/cx18-av-core.c @@ -80,6 +80,7 @@ static void log_video_status(struct cx18 *cx); static void cx18_av_initialize(struct cx18 *cx) { + struct cx18_av_state *state = &cx->av_state; u32 v; cx18_av_loadfw(cx); @@ -159,6 +160,149 @@ static void cx18_av_initialize(struct cx18 *cx) /* CxDevWrReg(CXADEC_SRC_COMB_CFG, 0x6628021F); */ /* } */ cx18_av_write4(cx, CXADEC_SRC_COMB_CFG, 0x6628021F); + state->default_volume = 228 - cx18_av_read(cx, 0x8d4); + state->default_volume = ((state->default_volume / 2) + 23) << 9; +} + +/* ----------------------------------------------------------------------- */ + +void cx18_av_std_setup(struct cx18 *cx) +{ + struct cx18_av_state *state = &cx->av_state; + v4l2_std_id std = state->std; + int hblank, hactive, burst, vblank, vactive, sc; + int vblank656, src_decimation; + int luma_lpf, uv_lpf, comb; + u32 pll_int, pll_frac, pll_post; + + /* datasheet startup, step 8d */ + if (std & ~V4L2_STD_NTSC) + cx18_av_write(cx, 0x49f, 0x11); + else + cx18_av_write(cx, 0x49f, 0x14); + + if (std & V4L2_STD_625_50) { + hblank = 132; + hactive = 720; + burst = 93; + vblank = 36; + vactive = 580; + vblank656 = 40; + src_decimation = 0x21f; + + luma_lpf = 2; + if (std & V4L2_STD_PAL) { + uv_lpf = 1; + comb = 0x20; + sc = 688739; + } else if (std == V4L2_STD_PAL_Nc) { + uv_lpf = 1; + comb = 0x20; + sc = 556453; + } else { /* SECAM */ + uv_lpf = 0; + comb = 0; + sc = 672351; + } + } else { + hactive = 720; + hblank = 122; + vactive = 487; + luma_lpf = 1; + uv_lpf = 1; + vblank = 26; + vblank656 = 26; + + src_decimation = 0x21f; + if (std == V4L2_STD_PAL_60) { + burst = 0x5b; + luma_lpf = 2; + comb = 0x20; + sc = 688739; + } else if (std == V4L2_STD_PAL_M) { + burst = 0x61; + comb = 0x20; + sc = 555452; + } else { + burst = 0x5b; + comb = 0x66; + sc = 556063; + } + } + + /* DEBUG: Displays configured PLL frequency */ + pll_int = cx18_av_read(cx, 0x108); + pll_frac = cx18_av_read4(cx, 0x10c) & 0x1ffffff; + pll_post = cx18_av_read(cx, 0x109); + CX18_DEBUG_INFO("PLL regs = int: %u, frac: %u, post: %u\n", + pll_int, pll_frac, pll_post); + + if (pll_post) { + int fin, fsc; + int pll = 28636363L * ((((u64)pll_int) << 25) + pll_frac); + + pll >>= 25; + pll /= pll_post; + CX18_DEBUG_INFO("PLL = %d.%06d MHz\n", + pll / 1000000, pll % 1000000); + CX18_DEBUG_INFO("PLL/8 = %d.%06d MHz\n", + pll / 8000000, (pll / 8) % 1000000); + + fin = ((u64)src_decimation * pll) >> 12; + CX18_DEBUG_INFO("ADC Sampling freq = %d.%06d MHz\n", + fin / 1000000, fin % 1000000); + + fsc = (((u64)sc) * pll) >> 24L; + CX18_DEBUG_INFO("Chroma sub-carrier freq = %d.%06d MHz\n", + fsc / 1000000, fsc % 1000000); + + CX18_DEBUG_INFO("hblank %i, hactive %i, " + "vblank %i , vactive %i, vblank656 %i, src_dec %i," + "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x," + " sc 0x%06x\n", + hblank, hactive, vblank, vactive, vblank656, + src_decimation, burst, luma_lpf, uv_lpf, comb, sc); + } + + /* Sets horizontal blanking delay and active lines */ + cx18_av_write(cx, 0x470, hblank); + cx18_av_write(cx, 0x471, 0xff & (((hblank >> 8) & 0x3) | + (hactive << 4))); + cx18_av_write(cx, 0x472, hactive >> 4); + + /* Sets burst gate delay */ + cx18_av_write(cx, 0x473, burst); + + /* Sets vertical blanking delay and active duration */ + cx18_av_write(cx, 0x474, vblank); + cx18_av_write(cx, 0x475, 0xff & (((vblank >> 8) & 0x3) | + (vactive << 4))); + cx18_av_write(cx, 0x476, vactive >> 4); + cx18_av_write(cx, 0x477, vblank656); + + /* Sets src decimation rate */ + cx18_av_write(cx, 0x478, 0xff & src_decimation); + cx18_av_write(cx, 0x479, 0xff & (src_decimation >> 8)); + + /* Sets Luma and UV Low pass filters */ + cx18_av_write(cx, 0x47a, luma_lpf << 6 | ((uv_lpf << 4) & 0x30)); + + /* Enables comb filters */ + cx18_av_write(cx, 0x47b, comb); + + /* Sets SC Step*/ + cx18_av_write(cx, 0x47c, sc); + cx18_av_write(cx, 0x47d, 0xff & sc >> 8); + cx18_av_write(cx, 0x47e, 0xff & sc >> 16); + + /* Sets VBI parameters */ + if (std & V4L2_STD_625_50) { + cx18_av_write(cx, 0x47f, 0x01); + state->vbi_line_offset = 5; + } else { + cx18_av_write(cx, 0x47f, 0x00); + state->vbi_line_offset = 8; + } } /* ----------------------------------------------------------------------- */ @@ -320,7 +464,7 @@ static int set_v4lstd(struct cx18 *cx) } cx18_av_and_or(cx, 0x400, ~0x2f, fmt | 0x20); cx18_av_and_or(cx, 0x403, ~0x3, pal_m); - cx18_av_vbi_setup(cx); + cx18_av_std_setup(cx); input_change(cx); return 0; } @@ -559,6 +703,8 @@ int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg) switch (qc->id) { case V4L2_CID_AUDIO_VOLUME: + return v4l2_ctrl_query_fill(qc, 0, 65535, + 65535 / 100, state->default_volume); case V4L2_CID_AUDIO_MUTE: case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_BASS: diff --git a/linux/drivers/media/video/cx18/cx18-av-core.h b/linux/drivers/media/video/cx18/cx18-av-core.h index b54239959..eb61fa1e0 100644 --- a/linux/drivers/media/video/cx18/cx18-av-core.h +++ b/linux/drivers/media/video/cx18/cx18-av-core.h @@ -79,6 +79,7 @@ struct cx18_av_state { u32 audclk_freq; int audmode; int vbi_line_offset; + int default_volume; u32 id; u32 rev; int is_initialized; @@ -305,6 +306,7 @@ u32 cx18_av_read4(struct cx18 *cx, u16 addr); int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value); int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value); int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg); +void cx18_av_std_setup(struct cx18 *cx); /* ----------------------------------------------------------------------- */ /* cx18_av-firmware.c */ @@ -317,7 +319,6 @@ void cx18_av_audio_set_path(struct cx18 *cx); /* ----------------------------------------------------------------------- */ /* cx18_av-vbi.c */ -void cx18_av_vbi_setup(struct cx18 *cx); int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg); #endif diff --git a/linux/drivers/media/video/cx18/cx18-av-vbi.c b/linux/drivers/media/video/cx18/cx18-av-vbi.c index 0c92f1236..02fdf57bb 100644 --- a/linux/drivers/media/video/cx18/cx18-av-vbi.c +++ b/linux/drivers/media/video/cx18/cx18-av-vbi.c @@ -83,145 +83,6 @@ static int decode_vps(u8 *dst, u8 *p) return err & 0xf0; } -void cx18_av_vbi_setup(struct cx18 *cx) -{ - struct cx18_av_state *state = &cx->av_state; - v4l2_std_id std = state->std; - int hblank, hactive, burst, vblank, vactive, sc; - int vblank656, src_decimation; - int luma_lpf, uv_lpf, comb; - u32 pll_int, pll_frac, pll_post; - - /* datasheet startup, step 8d */ - if (std & ~V4L2_STD_NTSC) - cx18_av_write(cx, 0x49f, 0x11); - else - cx18_av_write(cx, 0x49f, 0x14); - - if (std & V4L2_STD_625_50) { - hblank = 0x084; - hactive = 0x2d0; - burst = 0x5d; - vblank = 0x024; - vactive = 0x244; - vblank656 = 0x28; - src_decimation = 0x21f; - - luma_lpf = 2; - if (std & V4L2_STD_PAL) { - uv_lpf = 1; - comb = 0x20; - sc = 0x0a8263; - } else if (std == V4L2_STD_PAL_Nc) { - uv_lpf = 1; - comb = 0x20; - sc = 0x087da5; - } else { /* SECAM */ - uv_lpf = 0; - comb = 0; - sc = 0x0a425f; - } - } else { - hactive = 720; - hblank = 122; - vactive = 487; - luma_lpf = 1; - uv_lpf = 1; - vblank = 26; - vblank656 = 26; - - src_decimation = 0x21f; - if (std == V4L2_STD_PAL_60) { - burst = 0x5b; - luma_lpf = 2; - comb = 0x20; - sc = 0x0a8263; - } else if (std == V4L2_STD_PAL_M) { - burst = 0x61; - comb = 0x20; - sc = 555452; - } else { - burst = 0x5b; - comb = 0x66; - sc = 556063; - } - } - - /* DEBUG: Displays configured PLL frequency */ - pll_int = cx18_av_read(cx, 0x108); - pll_frac = cx18_av_read4(cx, 0x10c) & 0x1ffffff; - pll_post = cx18_av_read(cx, 0x109); - CX18_DEBUG_INFO("PLL regs = int: %u, frac: %u, post: %u\n", - pll_int, pll_frac, pll_post); - - if (pll_post) { - int fin, fsc; - int pll = 28636363L * ((((u64)pll_int) << 25) + pll_frac); - - pll >>= 25; - pll /= pll_post; - CX18_DEBUG_INFO("PLL = %d.%06d MHz\n", - pll / 1000000, pll % 1000000); - CX18_DEBUG_INFO("PLL/8 = %d.%06d MHz\n", - pll / 8000000, (pll / 8) % 1000000); - - fin = ((u64)src_decimation * pll) >> 12; - CX18_DEBUG_INFO("ADC Sampling freq = %d.%06d MHz\n", - fin / 1000000, fin % 1000000); - - fsc = (((u64)sc) * pll) >> 24L; - CX18_DEBUG_INFO("Chroma sub-carrier freq = %d.%06d MHz\n", - fsc / 1000000, fsc % 1000000); - - CX18_DEBUG_INFO("hblank %i, hactive %i, " - "vblank %i , vactive %i, vblank656 %i, src_dec %i," - "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x," - " sc 0x%06x\n", - hblank, hactive, vblank, vactive, vblank656, - src_decimation, burst, luma_lpf, uv_lpf, comb, sc); - } - - /* Sets horizontal blanking delay and active lines */ - cx18_av_write(cx, 0x470, hblank); - cx18_av_write(cx, 0x471, 0xff & (((hblank >> 8) & 0x3) | - (hactive << 4))); - cx18_av_write(cx, 0x472, hactive >> 4); - - /* Sets burst gate delay */ - cx18_av_write(cx, 0x473, burst); - - /* Sets vertical blanking delay and active duration */ - cx18_av_write(cx, 0x474, vblank); - cx18_av_write(cx, 0x475, 0xff & (((vblank >> 8) & 0x3) | - (vactive << 4))); - cx18_av_write(cx, 0x476, vactive >> 4); - cx18_av_write(cx, 0x477, vblank656); - - /* Sets src decimation rate */ - cx18_av_write(cx, 0x478, 0xff & src_decimation); - cx18_av_write(cx, 0x479, 0xff & (src_decimation >> 8)); - - /* Sets Luma and UV Low pass filters */ - cx18_av_write(cx, 0x47a, luma_lpf << 6 | ((uv_lpf << 4) & 0x30)); - - /* Enables comb filters */ - cx18_av_write(cx, 0x47b, comb); - - /* Sets SC Step*/ - cx18_av_write(cx, 0x47c, sc); - cx18_av_write(cx, 0x47d, 0xff & sc >> 8); - cx18_av_write(cx, 0x47e, 0xff & sc >> 16); - - /* Sets VBI parameters */ - if (std & V4L2_STD_625_50) { - cx18_av_write(cx, 0x47f, 0x01); - state->vbi_line_offset = 5; - } else { - cx18_av_write(cx, 0x47f, 0x00); - state->vbi_line_offset = 8; - } -} - int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg) { struct cx18_av_state *state = &cx->av_state; @@ -287,8 +148,8 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg) /* raw VBI */ memset(svbi, 0, sizeof(*svbi)); - /* Setup VBI */ - cx18_av_vbi_setup(cx); + /* Setup standard */ + cx18_av_std_setup(cx); /* VBI Offset */ cx18_av_write(cx, 0x47f, vbi_offset); @@ -299,8 +160,8 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg) for (x = 0; x <= 23; x++) lcr[x] = 0x00; - /* Setup VBI */ - cx18_av_vbi_setup(cx); + /* Setup standard */ + cx18_av_std_setup(cx); /* Sliced VBI */ cx18_av_write(cx, 0x404, 0x32); /* Ancillary data */ diff --git a/linux/drivers/media/video/cx18/cx18-irq.c b/linux/drivers/media/video/cx18/cx18-irq.c index 25114a5cb..654664783 100644 --- a/linux/drivers/media/video/cx18/cx18-irq.c +++ b/linux/drivers/media/video/cx18/cx18-irq.c @@ -132,7 +132,11 @@ static void hpu_cmd(struct cx18 *cx, u32 sw1) CX18_WARN("Unexpected interrupt %08x\n", sw1); } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18) +irqreturn_t cx18_irq_handler(int irq, void *dev_id, struct pt_regs *regs) +#else irqreturn_t cx18_irq_handler(int irq, void *dev_id) +#endif { struct cx18 *cx = (struct cx18 *)dev_id; u32 sw1, sw1_mask; diff --git a/linux/drivers/media/video/cx18/cx18-irq.h b/linux/drivers/media/video/cx18/cx18-irq.h index 379f704f5..cbcd2022f 100644 --- a/linux/drivers/media/video/cx18/cx18-irq.h +++ b/linux/drivers/media/video/cx18/cx18-irq.h @@ -30,7 +30,11 @@ #define SW2_INT_STATUS 0xc73144 #define SW2_INT_ENABLE_PCI 0xc7315c +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18) +irqreturn_t cx18_irq_handler(int irq, void *dev_id, struct pt_regs *regs); +#else irqreturn_t cx18_irq_handler(int irq, void *dev_id); +#endif void cx18_irq_work_handler(struct work_struct *work); void cx18_dma_stream_dec_prepare(struct cx18_stream *s, u32 offset, int lock); diff --git a/linux/drivers/media/video/cx18/cx18-streams.c b/linux/drivers/media/video/cx18/cx18-streams.c index df99070e6..a4886bc6c 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.c +++ b/linux/drivers/media/video/cx18/cx18-streams.c @@ -311,8 +311,10 @@ void cx18_streams_cleanup(struct cx18 *cx, int unregister) /* Teardown all streams */ for (type = 0; type < CX18_MAX_STREAMS; type++) { - if (cx->streams[type].dvb.enabled) + if (cx->streams[type].dvb.enabled) { cx18_dvb_unregister(&cx->streams[type]); + cx->streams[type].dvb.enabled = false; + } vdev = cx->streams[type].v4l2dev; diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c index 3f2191162..835062f5b 100644 --- a/linux/drivers/media/video/cx2341x.c +++ b/linux/drivers/media/video/cx2341x.c @@ -78,6 +78,61 @@ const u32 cx2341x_mpeg_ctrls[] = { }; EXPORT_SYMBOL(cx2341x_mpeg_ctrls); +static const struct cx2341x_mpeg_params default_params = { + /* misc */ + .capabilities = 0, + .port = CX2341X_PORT_MEMORY, + .width = 720, + .height = 480, + .is_50hz = 0, + + /* stream */ + .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, + .stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE, + .stream_insert_nav_packets = 0, + + /* audio */ + .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, + .audio_encoding = V4L2_MPEG_AUDIO_ENCODING_LAYER_2, + .audio_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_224K, + .audio_mode = V4L2_MPEG_AUDIO_MODE_STEREO, + .audio_mode_extension = V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4, + .audio_emphasis = V4L2_MPEG_AUDIO_EMPHASIS_NONE, + .audio_crc = V4L2_MPEG_AUDIO_CRC_NONE, + .audio_mute = 0, + + /* video */ + .video_encoding = V4L2_MPEG_VIDEO_ENCODING_MPEG_2, + .video_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3, + .video_b_frames = 2, + .video_gop_size = 12, + .video_gop_closure = 1, + .video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, + .video_bitrate = 6000000, + .video_bitrate_peak = 8000000, + .video_temporal_decimation = 0, + .video_mute = 0, + .video_mute_yuv = 0x008080, /* YCbCr value for black */ + + /* encoding filters */ + .video_spatial_filter_mode = + V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL, + .video_spatial_filter = 0, + .video_luma_spatial_filter_type = + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR, + .video_chroma_spatial_filter_type = + V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR, + .video_temporal_filter_mode = + V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL, + .video_temporal_filter = 8, + .video_median_filter_type = + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF, + .video_luma_median_filter_top = 255, + .video_luma_median_filter_bottom = 0, + .video_chroma_median_filter_top = 255, + .video_chroma_median_filter_bottom = 0, +}; + /* Map the control ID to the correct field in the cx2341x_mpeg_params struct. Return -EINVAL if the ID is unknown, else return 0. */ @@ -431,13 +486,13 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return v4l2_ctrl_query_fill(qctrl, V4L2_MPEG_AUDIO_ENCODING_LAYER_2, V4L2_MPEG_AUDIO_ENCODING_LAYER_2, 1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2); + default_params.audio_encoding); case V4L2_CID_MPEG_AUDIO_L2_BITRATE: return v4l2_ctrl_query_fill(qctrl, V4L2_MPEG_AUDIO_L2_BITRATE_192K, V4L2_MPEG_AUDIO_L2_BITRATE_384K, 1, - V4L2_MPEG_AUDIO_L2_BITRATE_224K); + default_params.audio_l2_bitrate); case V4L2_CID_MPEG_AUDIO_L1_BITRATE: case V4L2_CID_MPEG_AUDIO_L3_BITRATE: @@ -480,17 +535,22 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return cx2341x_ctrl_query_fill(qctrl, V4L2_MPEG_STREAM_VBI_FMT_NONE, V4L2_MPEG_STREAM_VBI_FMT_NONE, 1, - V4L2_MPEG_STREAM_VBI_FMT_NONE); + default_params.stream_vbi_fmt); + + case V4L2_CID_MPEG_VIDEO_GOP_SIZE: + return v4l2_ctrl_query_fill(qctrl, 1, 34, 1, + params->is_50hz ? 12 : 15); /* CX23415/6 specific */ case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: return cx2341x_ctrl_query_fill(qctrl, V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL, V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO, 1, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL); + default_params.video_spatial_filter_mode); case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: - cx2341x_ctrl_query_fill(qctrl, 0, 15, 1, 0); + cx2341x_ctrl_query_fill(qctrl, 0, 15, 1, + default_params.video_spatial_filter); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) @@ -502,7 +562,7 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF, V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE, 1, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF); + default_params.video_luma_spatial_filter_type); if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; @@ -513,7 +573,7 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF, V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR, 1, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF); + default_params.video_chroma_spatial_filter_type); if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; @@ -523,10 +583,11 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return cx2341x_ctrl_query_fill(qctrl, V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL, V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO, 1, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL); + default_params.video_temporal_filter_mode); case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER: - cx2341x_ctrl_query_fill(qctrl, 0, 31, 1, 0); + cx2341x_ctrl_query_fill(qctrl, 0, 31, 1, + default_params.video_temporal_filter); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_temporal_filter_mode == V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO) @@ -537,10 +598,11 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return cx2341x_ctrl_query_fill(qctrl, V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF, V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG, 1, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF); + default_params.video_median_filter_type); case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 255); + cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, + default_params.video_luma_median_filter_top); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) @@ -548,7 +610,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return 0; case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 0); + cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, + default_params.video_luma_median_filter_bottom); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) @@ -556,7 +619,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return 0; case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 255); + cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, + default_params.video_chroma_median_filter_top); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) @@ -564,7 +628,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return 0; case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 0); + cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, + default_params.video_chroma_median_filter_bottom); qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) @@ -572,7 +637,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, return 0; case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS: - return cx2341x_ctrl_query_fill(qctrl, 0, 1, 1, 0); + return cx2341x_ctrl_query_fill(qctrl, 0, 1, 1, + default_params.stream_insert_nav_packets); default: return v4l2_ctrl_query_fill_std(qctrl); @@ -726,61 +792,6 @@ EXPORT_SYMBOL(cx2341x_ext_ctrls); void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) { - static struct cx2341x_mpeg_params default_params = { - /* misc */ - .capabilities = 0, - .port = CX2341X_PORT_MEMORY, - .width = 720, - .height = 480, - .is_50hz = 0, - - /* stream */ - .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, - .stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE, - .stream_insert_nav_packets = 0, - - /* audio */ - .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, - .audio_encoding = V4L2_MPEG_AUDIO_ENCODING_LAYER_2, - .audio_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_224K, - .audio_mode = V4L2_MPEG_AUDIO_MODE_STEREO, - .audio_mode_extension = V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4, - .audio_emphasis = V4L2_MPEG_AUDIO_EMPHASIS_NONE, - .audio_crc = V4L2_MPEG_AUDIO_CRC_NONE, - .audio_mute = 0, - - /* video */ - .video_encoding = V4L2_MPEG_VIDEO_ENCODING_MPEG_2, - .video_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3, - .video_b_frames = 2, - .video_gop_size = 12, - .video_gop_closure = 1, - .video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, - .video_bitrate = 6000000, - .video_bitrate_peak = 8000000, - .video_temporal_decimation = 0, - .video_mute = 0, - .video_mute_yuv = 0x008080, /* YCbCr value for black */ - - /* encoding filters */ - .video_spatial_filter_mode = - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL, - .video_spatial_filter = 0, - .video_luma_spatial_filter_type = - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR, - .video_chroma_spatial_filter_type = - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR, - .video_temporal_filter_mode = - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL, - .video_temporal_filter = 8, - .video_median_filter_type = - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF, - .video_luma_median_filter_top = 255, - .video_luma_median_filter_bottom = 0, - .video_chroma_median_filter_top = 255, - .video_chroma_median_filter_bottom = 0, - }; - *p = default_params; cx2341x_calc_audio_properties(p); } diff --git a/linux/drivers/media/video/cx23885/Kconfig b/linux/drivers/media/video/cx23885/Kconfig index 04e9640c2..5cfb46bbd 100644 --- a/linux/drivers/media/video/cx23885/Kconfig +++ b/linux/drivers/media/video/cx23885/Kconfig @@ -9,6 +9,7 @@ config VIDEO_CX23885 select VIDEO_TVEEPROM select VIDEO_IR select VIDEOBUF_DVB + select VIDEOBUF_DMA_SG select VIDEO_CX25840 select VIDEO_CX2341X select DVB_DIB7000P if !DVB_FE_CUSTOMISE diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index a43ed390a..ecd498c70 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -248,7 +248,7 @@ static void cx25840_initialize(struct i2c_client *client) cx25840_write(client, 0x8d3, 0x1f); cx25840_write(client, 0x8e3, 0x03); - cx25840_vbi_setup(client); + cx25840_std_setup(client); /* trial and error says these are needed to get audio */ cx25840_write(client, 0x914, 0xa0); @@ -356,7 +356,7 @@ static void cx23885_initialize(struct i2c_client *client) finish_wait(&state->fw_wait, &wait); destroy_workqueue(q); - cx25840_vbi_setup(client); + cx25840_std_setup(client); /* (re)set input */ set_input(client, state->vid_input, state->aud_input); @@ -367,6 +367,153 @@ static void cx23885_initialize(struct i2c_client *client) /* ----------------------------------------------------------------------- */ +void cx25840_std_setup(struct i2c_client *client) +{ + struct cx25840_state *state = i2c_get_clientdata(client); + v4l2_std_id std = state->std; + int hblank, hactive, burst, vblank, vactive, sc; + int vblank656, src_decimation; + int luma_lpf, uv_lpf, comb; + u32 pll_int, pll_frac, pll_post; + + /* datasheet startup, step 8d */ + if (std & ~V4L2_STD_NTSC) + cx25840_write(client, 0x49f, 0x11); + else + cx25840_write(client, 0x49f, 0x14); + + if (std & V4L2_STD_625_50) { + hblank = 132; + hactive = 720; + burst = 93; + vblank = 36; + vactive = 580; + vblank656 = 40; + src_decimation = 0x21f; + luma_lpf = 2; + + if (std & V4L2_STD_SECAM) { + uv_lpf = 0; + comb = 0; + sc = 0x0a425f; + } else if (std == V4L2_STD_PAL_Nc) { + uv_lpf = 1; + comb = 0x20; + sc = 556453; + } else { + uv_lpf = 1; + comb = 0x20; + sc = 688739; + } + } else { + hactive = 720; + hblank = 122; + vactive = 487; + luma_lpf = 1; + uv_lpf = 1; + + src_decimation = 0x21f; + if (std == V4L2_STD_PAL_60) { + vblank = 26; + vblank656 = 26; + burst = 0x5b; + luma_lpf = 2; + comb = 0x20; + sc = 688739; + } else if (std == V4L2_STD_PAL_M) { + vblank = 20; + vblank656 = 24; + burst = 0x61; + comb = 0x20; + sc = 555452; + } else { + vblank = 26; + vblank656 = 26; + burst = 0x5b; + comb = 0x66; + sc = 556063; + } + } + + /* DEBUG: Displays configured PLL frequency */ + pll_int = cx25840_read(client, 0x108); + pll_frac = cx25840_read4(client, 0x10c) & 0x1ffffff; + pll_post = cx25840_read(client, 0x109); + v4l_dbg(1, cx25840_debug, client, + "PLL regs = int: %u, frac: %u, post: %u\n", + pll_int, pll_frac, pll_post); + + if (pll_post) { + int fin, fsc; + int pll = (28636363L * ((((u64)pll_int) << 25L) + pll_frac)) >> 25L; + + pll /= pll_post; + v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n", + pll / 1000000, pll % 1000000); + v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n", + pll / 8000000, (pll / 8) % 1000000); + + fin = ((u64)src_decimation * pll) >> 12; + v4l_dbg(1, cx25840_debug, client, + "ADC Sampling freq = %d.%06d MHz\n", + fin / 1000000, fin % 1000000); + + fsc = (((u64)sc) * pll) >> 24L; + v4l_dbg(1, cx25840_debug, client, + "Chroma sub-carrier freq = %d.%06d MHz\n", + fsc / 1000000, fsc % 1000000); + + v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, " + "vblank %i, vactive %i, vblank656 %i, src_dec %i, " + "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, " + "sc 0x%06x\n", + hblank, hactive, vblank, vactive, vblank656, + src_decimation, burst, luma_lpf, uv_lpf, comb, sc); + } + + /* Sets horizontal blanking delay and active lines */ + cx25840_write(client, 0x470, hblank); + cx25840_write(client, 0x471, + 0xff & (((hblank >> 8) & 0x3) | (hactive << 4))); + cx25840_write(client, 0x472, hactive >> 4); + + /* Sets burst gate delay */ + cx25840_write(client, 0x473, burst); + + /* Sets vertical blanking delay and active duration */ + cx25840_write(client, 0x474, vblank); + cx25840_write(client, 0x475, + 0xff & (((vblank >> 8) & 0x3) | (vactive << 4))); + cx25840_write(client, 0x476, vactive >> 4); + cx25840_write(client, 0x477, vblank656); + + /* Sets src decimation rate */ + cx25840_write(client, 0x478, 0xff & src_decimation); + cx25840_write(client, 0x479, 0xff & (src_decimation >> 8)); + + /* Sets Luma and UV Low pass filters */ + cx25840_write(client, 0x47a, luma_lpf << 6 | ((uv_lpf << 4) & 0x30)); + + /* Enables comb filters */ + cx25840_write(client, 0x47b, comb); + + /* Sets SC Step*/ + cx25840_write(client, 0x47c, sc); + cx25840_write(client, 0x47d, 0xff & sc >> 8); + cx25840_write(client, 0x47e, 0xff & sc >> 16); + + /* Sets VBI parameters */ + if (std & V4L2_STD_625_50) { + cx25840_write(client, 0x47f, 0x01); + state->vbi_line_offset = 5; + } else { + cx25840_write(client, 0x47f, 0x00); + state->vbi_line_offset = 8; + } +} + +/* ----------------------------------------------------------------------- */ + static void input_change(struct i2c_client *client) { struct cx25840_state *state = i2c_get_clientdata(client); @@ -584,7 +731,7 @@ static int set_v4lstd(struct i2c_client *client) } cx25840_and_or(client, 0x400, ~0xf, fmt); cx25840_and_or(client, 0x403, ~0x3, pal_m); - cx25840_vbi_setup(client); + cx25840_std_setup(client); if (!state->is_cx25836) input_change(client); return 0; @@ -1076,6 +1223,8 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, switch (qc->id) { case V4L2_CID_AUDIO_VOLUME: + return v4l2_ctrl_query_fill(qc, 0, 65535, + 65535 / 100, state->default_volume); case V4L2_CID_AUDIO_MUTE: case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_BASS: @@ -1283,6 +1432,8 @@ static int cx25840_probe(struct i2c_client *client, state->pvr150_workaround = 0; state->audmode = V4L2_TUNER_MODE_LANG1; state->unmute_volume = -1; + state->default_volume = 228 - cx25840_read(client, 0x8d4); + state->default_volume = ((state->default_volume / 2) + 23) << 9; state->vbi_line_offset = 8; state->id = id; state->rev = device_id; diff --git a/linux/drivers/media/video/cx25840/cx25840-core.h b/linux/drivers/media/video/cx25840/cx25840-core.h index df6d8bcc1..f81a9a959 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.h +++ b/linux/drivers/media/video/cx25840/cx25840-core.h @@ -45,6 +45,7 @@ struct cx25840_state { u32 audclk_freq; int audmode; int unmute_volume; /* -1 if not muted */ + int default_volume; int vbi_line_offset; u32 id; u32 rev; @@ -62,6 +63,7 @@ int cx25840_write4(struct i2c_client *client, u16 addr, u32 value); u8 cx25840_read(struct i2c_client *client, u16 addr); u32 cx25840_read4(struct i2c_client *client, u16 addr); int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned mask, u8 value); +void cx25840_std_setup(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-firmware.c */ @@ -74,7 +76,6 @@ void cx25840_audio_set_path(struct i2c_client *client); /* ----------------------------------------------------------------------- */ /* cx25850-vbi.c */ -void cx25840_vbi_setup(struct i2c_client *client); int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg); #endif diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c index 2d8364e65..08e293ee3 100644 --- a/linux/drivers/media/video/cx25840/cx25840-vbi.c +++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c @@ -83,150 +83,6 @@ static int decode_vps(u8 * dst, u8 * p) return err & 0xf0; } -void cx25840_vbi_setup(struct i2c_client *client) -{ - struct cx25840_state *state = i2c_get_clientdata(client); - v4l2_std_id std = state->std; - int hblank,hactive,burst,vblank,vactive,sc,vblank656,src_decimation; - int luma_lpf,uv_lpf, comb; - u32 pll_int,pll_frac,pll_post; - - /* datasheet startup, step 8d */ - if (std & ~V4L2_STD_NTSC) { - cx25840_write(client, 0x49f, 0x11); - } else { - cx25840_write(client, 0x49f, 0x14); - } - - if (std & V4L2_STD_625_50) { - hblank=0x084; - hactive=0x2d0; - burst=0x5d; - vblank=0x024; - vactive=0x244; - vblank656=0x28; - src_decimation=0x21f; - - luma_lpf=2; - if (std & V4L2_STD_SECAM) { - uv_lpf=0; - comb=0; - sc=0x0a425f; - } else if (std == V4L2_STD_PAL_Nc) { - uv_lpf=1; - comb=0x20; - sc=556453; - } else { - uv_lpf=1; - comb=0x20; - sc=0x0a8263; - } - } else { - hactive=720; - hblank=122; - vactive=487; - luma_lpf=1; - uv_lpf=1; - - src_decimation=0x21f; - if (std == V4L2_STD_PAL_60) { - vblank=26; - vblank656=26; - burst=0x5b; - luma_lpf=2; - comb=0x20; - sc=0x0a8263; - } else if (std == V4L2_STD_PAL_M) { - vblank=20; - vblank656=24; - burst=0x61; - comb=0x20; - - sc=555452; - } else { - vblank=26; - vblank656=26; - burst=0x5b; - comb=0x66; - sc=556063; - } - } - - /* DEBUG: Displays configured PLL frequency */ - pll_int=cx25840_read(client, 0x108); - pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff; - pll_post=cx25840_read(client, 0x109); - v4l_dbg(1, cx25840_debug, client, - "PLL regs = int: %u, frac: %u, post: %u\n", - pll_int,pll_frac,pll_post); - - if (pll_post) { - int fin, fsc; - int pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L; - - pll/=pll_post; - v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n", - pll/1000000, pll%1000000); - v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n", - pll/8000000, (pll/8)%1000000); - - fin=((u64)src_decimation*pll)>>12; - v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = " - "%d.%06d MHz\n", - fin/1000000,fin%1000000); - - fsc= (((u64)sc)*pll) >> 24L; - v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = " - "%d.%06d MHz\n", - fsc/1000000,fsc%1000000); - - v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, " - "vblank %i, vactive %i, vblank656 %i, src_dec %i, " - "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x," - " sc 0x%06x\n", - hblank, hactive, vblank, vactive, vblank656, - src_decimation, burst, luma_lpf, uv_lpf, comb, sc); - } - - /* Sets horizontal blanking delay and active lines */ - cx25840_write(client, 0x470, hblank); - cx25840_write(client, 0x471, 0xff&(((hblank>>8)&0x3)|(hactive <<4))); - cx25840_write(client, 0x472, hactive>>4); - - /* Sets burst gate delay */ - cx25840_write(client, 0x473, burst); - - /* Sets vertical blanking delay and active duration */ - cx25840_write(client, 0x474, vblank); - cx25840_write(client, 0x475, 0xff&(((vblank>>8)&0x3)|(vactive <<4))); - cx25840_write(client, 0x476, vactive>>4); - cx25840_write(client, 0x477, vblank656); - - /* Sets src decimation rate */ - cx25840_write(client, 0x478, 0xff&src_decimation); - cx25840_write(client, 0x479, 0xff&(src_decimation>>8)); - - /* Sets Luma and UV Low pass filters */ - cx25840_write(client, 0x47a, luma_lpf<<6|((uv_lpf<<4)&0x30)); - - /* Enables comb filters */ - cx25840_write(client, 0x47b, comb); - - /* Sets SC Step*/ - cx25840_write(client, 0x47c, sc); - cx25840_write(client, 0x47d, 0xff&sc>>8); - cx25840_write(client, 0x47e, 0xff&sc>>16); - - /* Sets VBI parameters */ - if (std & V4L2_STD_625_50) { - cx25840_write(client, 0x47f, 0x01); - state->vbi_line_offset = 5; - } else { - cx25840_write(client, 0x47f, 0x00); - state->vbi_line_offset = 8; - } -} - int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) { struct cx25840_state *state = i2c_get_clientdata(client); @@ -293,8 +149,8 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) /* raw VBI */ memset(svbi, 0, sizeof(*svbi)); - /* Setup VBI */ - cx25840_vbi_setup(client); + /* Setup standard */ + cx25840_std_setup(client); /* VBI Offset */ cx25840_write(client, 0x47f, vbi_offset); @@ -305,8 +161,8 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) for (x = 0; x <= 23; x++) lcr[x] = 0x00; - /* Setup VBI */ - cx25840_vbi_setup(client); + /* Setup standard */ + cx25840_std_setup(client); /* Sliced VBI */ cx25840_write(client, 0x404, 0x32); /* Ancillary data */ diff --git a/linux/drivers/media/video/dabusb.c b/linux/drivers/media/video/dabusb.c index 4efe3f839..72bf5868c 100644 --- a/linux/drivers/media/video/dabusb.c +++ b/linux/drivers/media/video/dabusb.c @@ -700,7 +700,11 @@ static int dabusb_ioctl (struct inode *inode, struct file *file, unsigned int cm return ret; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) static const struct file_operations dabusb_fops = +#else +static struct file_operations dabusb_fops = +#endif { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 4d65b1be4..697202d47 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -30,7 +30,11 @@ #include <linux/pagemap.h> #include <linux/io.h> #include <asm/page.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +#include <asm/uaccess.h> +#else #include <linux/uaccess.h> +#endif #include <linux/jiffies.h> #include "gspca.h" diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c index fc668f5b5..73fcfddce 100644 --- a/linux/drivers/media/video/ir-kbd-i2c.c +++ b/linux/drivers/media/video/ir-kbd-i2c.c @@ -195,88 +195,6 @@ static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) return 1; } -/* Common (grey or coloured) pinnacle PCTV remote handling - * - */ -static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, - int parity_offset, int marker, int code_modulo) -{ - unsigned char b[4]; - unsigned int start = 0,parity = 0,code = 0; - - /* poll IR chip */ - if (4 != i2c_master_recv(&ir->c,b,4)) { - dprintk(2,"read error\n"); - return -EIO; - } - - for (start = 0; start < ARRAY_SIZE(b); start++) { - if (b[start] == marker) { - code=b[(start+parity_offset+1)%4]; - parity=b[(start+parity_offset)%4]; - } - } - - /* Empty Request */ - if (parity==0) - return 0; - - /* Repeating... */ - if (ir->old == parity) - return 0; - - ir->old = parity; - - /* drop special codes when a key is held down a long time for the grey controller - In this case, the second bit of the code is asserted */ - if (marker == 0xfe && (code & 0x40)) - return 0; - - code %= code_modulo; - - *ir_raw = code; - *ir_key = code; - - dprintk(1,"Pinnacle PCTV key %02x\n", code); - - return 1; -} - -/* The grey pinnacle PCTV remote - * - * There are one issue with this remote: - * - I2c packet does not change when the same key is pressed quickly. The workaround - * is to hold down each key for about half a second, so that another code is generated - * in the i2c packet, and the function can distinguish key presses. - * - * Sylvain Pasche <sylvain.pasche@gmail.com> - */ -int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) -{ - - return get_key_pinnacle(ir, ir_key, ir_raw, 1, 0xfe, 0xff); -} - -EXPORT_SYMBOL_GPL(get_key_pinnacle_grey); - - -/* The new pinnacle PCTV remote (with the colored buttons) - * - * Ricardo Cerqueira <v4l@cerqueira.org> - */ -int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) -{ - /* code_modulo parameter (0x88) is used to reduce code value to fit inside IR_KEYTAB_SIZE - * - * this is the only value that results in 42 unique - * codes < 128 - */ - - return get_key_pinnacle(ir, ir_key, ir_raw, 2, 0x80, 0x88); -} - -EXPORT_SYMBOL_GPL(get_key_pinnacle_color); - /* ----------------------------------------------------------------------- */ static void ir_key_poll(struct IR_i2c *ir) diff --git a/linux/drivers/media/video/ivtv/ivtv-i2c.c b/linux/drivers/media/video/ivtv/ivtv-i2c.c index 3446ab458..1488bc7ce 100644 --- a/linux/drivers/media/video/ivtv/ivtv-i2c.c +++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c @@ -135,7 +135,7 @@ static const u8 hw_addrs[] = { static const char * const hw_devicenames[] = { "cx25840", "saa7115", - "saa7127", + "saa7127_auto", /* saa7127 or saa7129 */ "msp3400", "tuner", "wm8775", diff --git a/linux/drivers/media/video/ivtv/ivtvfb.c b/linux/drivers/media/video/ivtv/ivtvfb.c index bdfda48e5..bdedff281 100644 --- a/linux/drivers/media/video/ivtv/ivtvfb.c +++ b/linux/drivers/media/video/ivtv/ivtvfb.c @@ -367,6 +367,7 @@ static int ivtvfb_prep_frame(struct ivtv *itv, int cmd, void __user *source, return ivtvfb_prep_dec_dma_to_device(itv, dest_offset, source, count); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos) { @@ -448,6 +449,7 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, return (err) ? err : count; } +#endif static int ivtvfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { @@ -909,7 +911,9 @@ static int ivtvfb_blank(int blank_mode, struct fb_info *info) static struct fb_ops ivtvfb_ops = { .owner = THIS_MODULE, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) .fb_write = ivtvfb_write, +#endif .fb_check_var = ivtvfb_check_var, .fb_set_par = ivtvfb_set_par, .fb_setcolreg = ivtvfb_setcolreg, diff --git a/linux/drivers/media/video/mt9m001.c b/linux/drivers/media/video/mt9m001.c index 089ce311f..94709f05c 100644 --- a/linux/drivers/media/video/mt9m001.c +++ b/linux/drivers/media/video/mt9m001.c @@ -617,8 +617,12 @@ static void mt9m001_video_remove(struct soc_camera_device *icd) soc_camera_video_stop(&mt9m001->icd); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static int mt9m001_probe(struct i2c_client *client, const struct i2c_device_id *did) +#else +static int mt9m001_probe(struct i2c_client *client) +#endif { struct mt9m001 *mt9m001; struct soc_camera_device *icd; diff --git a/linux/drivers/media/video/ov7670.c b/linux/drivers/media/video/ov7670.c index dcf7678a8..9cf1aa2bc 100644 --- a/linux/drivers/media/video/ov7670.c +++ b/linux/drivers/media/video/ov7670.c @@ -877,7 +877,7 @@ static int ov7670_store_cmatrix(struct i2c_client *client, int matrix[CMATRIX_LEN]) { int i, ret; - unsigned char signbits; + unsigned char signbits = 0; /* * Weird crap seems to exist in the upper part of @@ -1053,7 +1053,7 @@ static unsigned char ov7670_abs_to_sm(unsigned char v) static int ov7670_t_brightness(struct i2c_client *client, int value) { - unsigned char com8, v; + unsigned char com8 = 0, v; int ret; ov7670_read(client, REG_COM8, &com8); @@ -1066,7 +1066,7 @@ static int ov7670_t_brightness(struct i2c_client *client, int value) static int ov7670_q_brightness(struct i2c_client *client, __s32 *value) { - unsigned char v; + unsigned char v = 0; int ret = ov7670_read(client, REG_BRIGHT, &v); *value = ov7670_sm_to_abs(v); @@ -1080,7 +1080,7 @@ static int ov7670_t_contrast(struct i2c_client *client, int value) static int ov7670_q_contrast(struct i2c_client *client, __s32 *value) { - unsigned char v; + unsigned char v = 0; int ret = ov7670_read(client, REG_CONTRAS, &v); *value = v; @@ -1090,7 +1090,7 @@ static int ov7670_q_contrast(struct i2c_client *client, __s32 *value) static int ov7670_q_hflip(struct i2c_client *client, __s32 *value) { int ret; - unsigned char v; + unsigned char v = 0; ret = ov7670_read(client, REG_MVFP, &v); *value = (v & MVFP_MIRROR) == MVFP_MIRROR; @@ -1100,7 +1100,7 @@ static int ov7670_q_hflip(struct i2c_client *client, __s32 *value) static int ov7670_t_hflip(struct i2c_client *client, int value) { - unsigned char v; + unsigned char v = 0; int ret; ret = ov7670_read(client, REG_MVFP, &v); @@ -1118,7 +1118,7 @@ static int ov7670_t_hflip(struct i2c_client *client, int value) static int ov7670_q_vflip(struct i2c_client *client, __s32 *value) { int ret; - unsigned char v; + unsigned char v = 0; ret = ov7670_read(client, REG_MVFP, &v); *value = (v & MVFP_FLIP) == MVFP_FLIP; @@ -1128,7 +1128,7 @@ static int ov7670_q_vflip(struct i2c_client *client, __s32 *value) static int ov7670_t_vflip(struct i2c_client *client, int value) { - unsigned char v; + unsigned char v = 0; int ret; ret = ov7670_read(client, REG_MVFP, &v); diff --git a/linux/drivers/media/video/pxa_camera.c b/linux/drivers/media/video/pxa_camera.c index 5ec5bb9a9..b15f82c49 100644 --- a/linux/drivers/media/video/pxa_camera.c +++ b/linux/drivers/media/video/pxa_camera.c @@ -30,6 +30,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-dev.h> +#include <media/videobuf-dma-sg.h> #include <media/soc_camera.h> #include <linux/videodev2.h> @@ -582,6 +583,19 @@ static struct videobuf_queue_ops pxa_videobuf_ops = { .buf_release = pxa_videobuf_release, }; +static void pxa_camera_init_videobuf(struct videobuf_queue *q, + struct soc_camera_device *icd) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct pxa_camera_dev *pcdev = ici->priv; + + /* We must pass NULL as dev pointer, then all pci_* dma operations + * transform to normal dma_* ones. */ + videobuf_queue_sg_init(q, &pxa_videobuf_ops, NULL, &pcdev->lock, + V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE, + sizeof(struct pxa_buffer), icd); +} + static int mclk_get_divisor(struct pxa_camera_dev *pcdev) { unsigned int mclk_10khz = pcdev->platform_mclk_10khz; @@ -983,34 +997,23 @@ static int pxa_camera_querycap(struct soc_camera_host *ici, return 0; } -static spinlock_t *pxa_camera_spinlock_alloc(struct soc_camera_file *icf) -{ - struct soc_camera_host *ici = - to_soc_camera_host(icf->icd->dev.parent); - struct pxa_camera_dev *pcdev = ici->priv; - - return &pcdev->lock; -} - static struct soc_camera_host_ops pxa_soc_camera_host_ops = { .owner = THIS_MODULE, .add = pxa_camera_add_device, .remove = pxa_camera_remove_device, .set_fmt_cap = pxa_camera_set_fmt_cap, .try_fmt_cap = pxa_camera_try_fmt_cap, + .init_videobuf = pxa_camera_init_videobuf, .reqbufs = pxa_camera_reqbufs, .poll = pxa_camera_poll, .querycap = pxa_camera_querycap, .try_bus_param = pxa_camera_try_bus_param, .set_bus_param = pxa_camera_set_bus_param, - .spinlock_alloc = pxa_camera_spinlock_alloc, }; /* Should be allocated dynamically too, but we have only one. */ static struct soc_camera_host pxa_soc_camera_host = { .drv_name = PXA_CAM_DRV_NAME, - .vbq_ops = &pxa_videobuf_ops, - .msize = sizeof(struct pxa_buffer), .ops = &pxa_soc_camera_host_ops, }; diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index 5d99f8455..5488679ed 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1567,7 +1567,7 @@ static int saa7115_remove(struct i2c_client *client) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id saa7115_id[] = { - { "saa711x", 1 }, /* autodetect */ + { "saa7115_auto", 1 }, /* autodetect */ { "saa7111", 0 }, { "saa7113", 0 }, { "saa7114", 0 }, diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c index 28905adfb..0b126a849 100644 --- a/linux/drivers/media/video/saa7127.c +++ b/linux/drivers/media/video/saa7127.c @@ -672,7 +672,6 @@ static int saa7127_probe(struct i2c_client *client, { struct saa7127_state *state; struct v4l2_sliced_vbi_data vbi = { 0, 0, 0, 0 }; /* set to disabled */ - int read_result = 0; /* Check if the adapter supports the needed features */ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) @@ -720,20 +719,33 @@ static int saa7127_probe(struct i2c_client *client, saa7127_set_input_type(client, SAA7127_INPUT_TYPE_NORMAL); saa7127_set_video_enable(client, 1); - /* Detect if it's an saa7129 */ - read_result = saa7127_read(client, SAA7129_REG_FADE_KEY_COL2); - saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, 0xaa); - if (saa7127_read(client, SAA7129_REG_FADE_KEY_COL2) == 0xaa) { - v4l_info(client, "saa7129 found @ 0x%x (%s)\n", - client->addr << 1, client->adapter->name); - saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, read_result); - saa7127_write_inittab(client, saa7129_init_config_extra); - state->ident = V4L2_IDENT_SAA7129; - } else { - v4l_info(client, "saa7127 found @ 0x%x (%s)\n", - client->addr << 1, client->adapter->name); - state->ident = V4L2_IDENT_SAA7127; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + if (id->driver_data) { /* Chip type is already known */ + state->ident = id->driver_data; + } else { /* Needs detection */ +#else + { +#endif + int read_result; + + /* Detect if it's an saa7129 */ + read_result = saa7127_read(client, SAA7129_REG_FADE_KEY_COL2); + saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, 0xaa); + if (saa7127_read(client, SAA7129_REG_FADE_KEY_COL2) == 0xaa) { + saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, + read_result); + state->ident = V4L2_IDENT_SAA7129; + strlcpy(client->name, "saa7129", I2C_NAME_SIZE); + } else { + state->ident = V4L2_IDENT_SAA7127; + strlcpy(client->name, "saa7127", I2C_NAME_SIZE); + } } + + v4l_info(client, "%s found @ 0x%x (%s)\n", client->name, + client->addr << 1, client->adapter->name); + if (state->ident == V4L2_IDENT_SAA7129) + saa7127_write_inittab(client, saa7129_init_config_extra); return 0; } @@ -751,7 +763,11 @@ static int saa7127_remove(struct i2c_client *client) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static struct i2c_device_id saa7127_id[] = { - { "saa7127", 0 }, + { "saa7127_auto", 0 }, /* auto-detection */ + { "saa7126", V4L2_IDENT_SAA7127 }, + { "saa7127", V4L2_IDENT_SAA7127 }, + { "saa7128", V4L2_IDENT_SAA7129 }, + { "saa7129", V4L2_IDENT_SAA7129 }, { } }; MODULE_DEVICE_TABLE(i2c, saa7127_id); diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 08597a558..8ec09c97e 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -6078,9 +6078,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) i2c_transfer(&dev->i2c_adap, &msg, 1); break; } -#if 0 - /* FIXME: This entry doesn't exist yet */ - case SAA7134_BOARD_ASUSTeK_TVFM35: + case SAA7134_BOARD_ASUSTeK_TVFM7135: /* The card below is detected as card=53, but is different */ if (dev->autodetected && (dev->eedata[0x27] == 0x03)) { dev->board = SAA7134_BOARD_ASUSTeK_P7131_ANALOG; @@ -6089,7 +6087,6 @@ int saa7134_board_init2(struct saa7134_dev *dev) dev->name, saa7134_boards[dev->board].name); } break; -#endif case SAA7134_BOARD_HAUPPAUGE_HVR1110: hauppauge_eeprom(dev, dev->eedata+0x80); /* break intentionally omitted */ diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c index 89fc7dfc2..f26fd7061 100644 --- a/linux/drivers/media/video/saa7134/saa7134-input.c +++ b/linux/drivers/media/video/saa7134/saa7134-input.c @@ -198,6 +198,84 @@ static int get_key_beholdm6xx(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) return 1; } +/* Common (grey or coloured) pinnacle PCTV remote handling + * + */ +static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, + int parity_offset, int marker, int code_modulo) +{ + unsigned char b[4]; + unsigned int start = 0,parity = 0,code = 0; + + /* poll IR chip */ + if (4 != i2c_master_recv(&ir->c, b, 4)) { + i2cdprintk("read error\n"); + return -EIO; + } + + for (start = 0; start < ARRAY_SIZE(b); start++) { + if (b[start] == marker) { + code=b[(start+parity_offset + 1) % 4]; + parity=b[(start+parity_offset) % 4]; + } + } + + /* Empty Request */ + if (parity == 0) + return 0; + + /* Repeating... */ + if (ir->old == parity) + return 0; + + ir->old = parity; + + /* drop special codes when a key is held down a long time for the grey controller + In this case, the second bit of the code is asserted */ + if (marker == 0xfe && (code & 0x40)) + return 0; + + code %= code_modulo; + + *ir_raw = code; + *ir_key = code; + + i2cdprintk("Pinnacle PCTV key %02x\n", code); + + return 1; +} + +/* The grey pinnacle PCTV remote + * + * There are one issue with this remote: + * - I2c packet does not change when the same key is pressed quickly. The workaround + * is to hold down each key for about half a second, so that another code is generated + * in the i2c packet, and the function can distinguish key presses. + * + * Sylvain Pasche <sylvain.pasche@gmail.com> + */ +static int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +{ + + return get_key_pinnacle(ir, ir_key, ir_raw, 1, 0xfe, 0xff); +} + + +/* The new pinnacle PCTV remote (with the colored buttons) + * + * Ricardo Cerqueira <v4l@cerqueira.org> + */ +static int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +{ + /* code_modulo parameter (0x88) is used to reduce code value to fit inside IR_KEYTAB_SIZE + * + * this is the only value that results in 42 unique + * codes < 128 + */ + + return get_key_pinnacle(ir, ir_key, ir_raw, 2, 0x80, 0x88); +} + void saa7134_input_irq(struct saa7134_dev *dev) { struct card_ir *ir = dev->remote; diff --git a/linux/drivers/media/video/sh_mobile_ceu_camera.c b/linux/drivers/media/video/sh_mobile_ceu_camera.c new file mode 100644 index 000000000..012005e1a --- /dev/null +++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c @@ -0,0 +1,657 @@ +/* + * V4L2 Driver for SuperH Mobile CEU interface + * + * Copyright (C) 2008 Magnus Damm + * + * Based on V4L2 Driver for PXA camera host - "pxa_camera.c", + * + * Copyright (C) 2006, Sascha Hauer, Pengutronix + * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include <linux/init.h> +#include <linux/module.h> +#include <linux/io.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> +#include <linux/errno.h> +#include <linux/fs.h> +#include <linux/interrupt.h> +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/moduleparam.h> +#include <linux/time.h> +#include <linux/version.h> +#include <linux/device.h> +#include <linux/platform_device.h> +#include <linux/mutex.h> +#include <linux/videodev2.h> + +#include <media/v4l2-common.h> +#include <media/v4l2-dev.h> +#include <media/soc_camera.h> +#include <media/sh_mobile_ceu.h> +#include <media/videobuf-dma-contig.h> + +/* register offsets for sh7722 / sh7723 */ + +#define CAPSR 0x00 +#define CAPCR 0x04 +#define CAMCR 0x08 +#define CMCYR 0x0c +#define CAMOR 0x10 +#define CAPWR 0x14 +#define CAIFR 0x18 +#define CSTCR 0x20 /* not on sh7723 */ +#define CSECR 0x24 /* not on sh7723 */ +#define CRCNTR 0x28 +#define CRCMPR 0x2c +#define CFLCR 0x30 +#define CFSZR 0x34 +#define CDWDR 0x38 +#define CDAYR 0x3c +#define CDACR 0x40 +#define CDBYR 0x44 +#define CDBCR 0x48 +#define CBDSR 0x4c +#define CFWCR 0x5c +#define CLFCR 0x60 +#define CDOCR 0x64 +#define CDDCR 0x68 +#define CDDAR 0x6c +#define CEIER 0x70 +#define CETCR 0x74 +#define CSTSR 0x7c +#define CSRTR 0x80 +#define CDSSR 0x84 +#define CDAYR2 0x90 +#define CDACR2 0x94 +#define CDBYR2 0x98 +#define CDBCR2 0x9c + +static DEFINE_MUTEX(camera_lock); + +/* per video frame buffer */ +struct sh_mobile_ceu_buffer { + struct videobuf_buffer vb; /* v4l buffer must be first */ + const struct soc_camera_data_format *fmt; +}; + +struct sh_mobile_ceu_dev { + struct device *dev; + struct soc_camera_host ici; + struct soc_camera_device *icd; + + unsigned int irq; + void __iomem *base; + unsigned long video_limit; + + spinlock_t lock; + struct list_head capture; + struct videobuf_buffer *active; + + struct sh_mobile_ceu_info *pdata; +}; + +static void ceu_write(struct sh_mobile_ceu_dev *priv, + unsigned long reg_offs, unsigned long data) +{ + iowrite32(data, priv->base + reg_offs); +} + +static unsigned long ceu_read(struct sh_mobile_ceu_dev *priv, + unsigned long reg_offs) +{ + return ioread32(priv->base + reg_offs); +} + +/* + * Videobuf operations + */ +static int sh_mobile_ceu_videobuf_setup(struct videobuf_queue *vq, + unsigned int *count, + unsigned int *size) +{ + struct soc_camera_device *icd = vq->priv_data; + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + int bytes_per_pixel = (icd->current_fmt->depth + 7) >> 3; + + *size = PAGE_ALIGN(icd->width * icd->height * bytes_per_pixel); + + if (0 == *count) + *count = 2; + + if (pcdev->video_limit) { + while (*size * *count > pcdev->video_limit) + (*count)--; + } + + dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size); + + return 0; +} + +static void free_buffer(struct videobuf_queue *vq, + struct sh_mobile_ceu_buffer *buf) +{ + struct soc_camera_device *icd = vq->priv_data; + + dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %zd\n", __func__, + &buf->vb, buf->vb.baddr, buf->vb.bsize); + + if (in_interrupt()) + BUG(); + + videobuf_dma_contig_free(vq, &buf->vb); + dev_dbg(&icd->dev, "%s freed\n", __func__); + buf->vb.state = VIDEOBUF_NEEDS_INIT; +} + +static void sh_mobile_ceu_capture(struct sh_mobile_ceu_dev *pcdev) +{ + ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) & ~1); + ceu_write(pcdev, CETCR, ~ceu_read(pcdev, CETCR) & 0x0317f313); + ceu_write(pcdev, CEIER, ceu_read(pcdev, CEIER) | 1); + + ceu_write(pcdev, CAPCR, ceu_read(pcdev, CAPCR) & ~0x10000); + + ceu_write(pcdev, CETCR, 0x0317f313 ^ 0x10); + + if (pcdev->active) { + ceu_write(pcdev, CDAYR, videobuf_to_dma_contig(pcdev->active)); + ceu_write(pcdev, CAPSR, 0x1); /* start capture */ + } +} + +static int sh_mobile_ceu_videobuf_prepare(struct videobuf_queue *vq, + struct videobuf_buffer *vb, + enum v4l2_field field) +{ + struct soc_camera_device *icd = vq->priv_data; + struct sh_mobile_ceu_buffer *buf; + int ret; + + buf = container_of(vb, struct sh_mobile_ceu_buffer, vb); + + dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %zd\n", __func__, + vb, vb->baddr, vb->bsize); + + /* Added list head initialization on alloc */ + WARN_ON(!list_empty(&vb->queue)); + +#ifdef DEBUG + /* This can be useful if you want to see if we actually fill + * the buffer with something */ + memset((void *)vb->baddr, 0xaa, vb->bsize); +#endif + + BUG_ON(NULL == icd->current_fmt); + + if (buf->fmt != icd->current_fmt || + vb->width != icd->width || + vb->height != icd->height || + vb->field != field) { + buf->fmt = icd->current_fmt; + vb->width = icd->width; + vb->height = icd->height; + vb->field = field; + vb->state = VIDEOBUF_NEEDS_INIT; + } + + vb->size = vb->width * vb->height * ((buf->fmt->depth + 7) >> 3); + if (0 != vb->baddr && vb->bsize < vb->size) { + ret = -EINVAL; + goto out; + } + + if (vb->state == VIDEOBUF_NEEDS_INIT) { + ret = videobuf_iolock(vq, vb, NULL); + if (ret) + goto fail; + vb->state = VIDEOBUF_PREPARED; + } + + return 0; +fail: + free_buffer(vq, buf); +out: + return ret; +} + +static void sh_mobile_ceu_videobuf_queue(struct videobuf_queue *vq, + struct videobuf_buffer *vb) +{ + struct soc_camera_device *icd = vq->priv_data; + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + unsigned long flags; + + dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %zd\n", __func__, + vb, vb->baddr, vb->bsize); + + vb->state = VIDEOBUF_ACTIVE; + spin_lock_irqsave(&pcdev->lock, flags); + list_add_tail(&vb->queue, &pcdev->capture); + + if (!pcdev->active) { + pcdev->active = vb; + sh_mobile_ceu_capture(pcdev); + } + + spin_unlock_irqrestore(&pcdev->lock, flags); +} + +static void sh_mobile_ceu_videobuf_release(struct videobuf_queue *vq, + struct videobuf_buffer *vb) +{ + free_buffer(vq, container_of(vb, struct sh_mobile_ceu_buffer, vb)); +} + +static struct videobuf_queue_ops sh_mobile_ceu_videobuf_ops = { + .buf_setup = sh_mobile_ceu_videobuf_setup, + .buf_prepare = sh_mobile_ceu_videobuf_prepare, + .buf_queue = sh_mobile_ceu_videobuf_queue, + .buf_release = sh_mobile_ceu_videobuf_release, +}; + +static irqreturn_t sh_mobile_ceu_irq(int irq, void *data) +{ + struct sh_mobile_ceu_dev *pcdev = data; + struct videobuf_buffer *vb; + unsigned long flags; + + spin_lock_irqsave(&pcdev->lock, flags); + + vb = pcdev->active; + list_del_init(&vb->queue); + + if (!list_empty(&pcdev->capture)) + pcdev->active = list_entry(pcdev->capture.next, + struct videobuf_buffer, queue); + else + pcdev->active = NULL; + + sh_mobile_ceu_capture(pcdev); + + vb->state = VIDEOBUF_DONE; + do_gettimeofday(&vb->ts); + vb->field_count++; + wake_up(&vb->done); + spin_unlock_irqrestore(&pcdev->lock, flags); + + return IRQ_HANDLED; +} + +static int sh_mobile_ceu_add_device(struct soc_camera_device *icd) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + int ret = -EBUSY; + + mutex_lock(&camera_lock); + + if (pcdev->icd) + goto err; + + dev_info(&icd->dev, + "SuperH Mobile CEU driver attached to camera %d\n", + icd->devnum); + + if (pcdev->pdata->enable_camera) + pcdev->pdata->enable_camera(); + + ret = icd->ops->init(icd); + if (ret) + goto err; + + ceu_write(pcdev, CAPSR, 1 << 16); /* reset */ + while (ceu_read(pcdev, CSTSR) & 1) + msleep(1); + + pcdev->icd = icd; +err: + mutex_unlock(&camera_lock); + + return ret; +} + +static void sh_mobile_ceu_remove_device(struct soc_camera_device *icd) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + + BUG_ON(icd != pcdev->icd); + + /* disable capture, disable interrupts */ + ceu_write(pcdev, CEIER, 0); + ceu_write(pcdev, CAPSR, 1 << 16); /* reset */ + icd->ops->release(icd); + if (pcdev->pdata->disable_camera) + pcdev->pdata->disable_camera(); + + dev_info(&icd->dev, + "SuperH Mobile CEU driver detached from camera %d\n", + icd->devnum); + + pcdev->icd = NULL; +} + +static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, + __u32 pixfmt) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + int ret, buswidth, width, cfszr_width, cdwdr_width; + unsigned long camera_flags, common_flags, value; + + camera_flags = icd->ops->query_bus_param(icd); + common_flags = soc_camera_bus_param_compatible(camera_flags, + pcdev->pdata->flags); + if (!common_flags) + return -EINVAL; + + ret = icd->ops->set_bus_param(icd, common_flags); + if (ret < 0) + return ret; + + switch (common_flags & SOCAM_DATAWIDTH_MASK) { + case SOCAM_DATAWIDTH_8: + buswidth = 8; + break; + case SOCAM_DATAWIDTH_16: + buswidth = 16; + break; + default: + return -EINVAL; + } + + ceu_write(pcdev, CRCNTR, 0); + ceu_write(pcdev, CRCMPR, 0); + + value = 0x00000010; + value |= (common_flags & SOCAM_VSYNC_ACTIVE_LOW) ? (1 << 1) : 0; + value |= (common_flags & SOCAM_HSYNC_ACTIVE_LOW) ? (1 << 0) : 0; + value |= (buswidth == 16) ? (1 << 12) : 0; + ceu_write(pcdev, CAMCR, value); + + ceu_write(pcdev, CAPCR, 0x00300000); + ceu_write(pcdev, CAIFR, 0); + + mdelay(1); + + width = icd->width * (icd->current_fmt->depth / 8); + width = (buswidth == 16) ? width / 2 : width; + cfszr_width = (buswidth == 8) ? width / 2 : width; + cdwdr_width = (buswidth == 16) ? width * 2 : width; + + ceu_write(pcdev, CAMOR, 0); + ceu_write(pcdev, CAPWR, (icd->height << 16) | width); + ceu_write(pcdev, CFLCR, 0); /* data fetch mode - no scaling */ + ceu_write(pcdev, CFSZR, (icd->height << 16) | cfszr_width); + ceu_write(pcdev, CLFCR, 0); /* data fetch mode - no lowpass filter */ + ceu_write(pcdev, CDOCR, 0x00000016); + + ceu_write(pcdev, CDWDR, cdwdr_width); + ceu_write(pcdev, CFWCR, 0); /* keep "datafetch firewall" disabled */ + + /* not in bundle mode: skip CBDSR, CDAYR2, CDACR2, CDBYR2, CDBCR2 */ + /* in data fetch mode: no need for CDACR, CDBYR, CDBCR */ + + return 0; +} + +static int sh_mobile_ceu_try_bus_param(struct soc_camera_device *icd, + __u32 pixfmt) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + unsigned long camera_flags, common_flags; + + camera_flags = icd->ops->query_bus_param(icd); + common_flags = soc_camera_bus_param_compatible(camera_flags, + pcdev->pdata->flags); + if (!common_flags) + return -EINVAL; + + return 0; +} + +static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd, + __u32 pixfmt, struct v4l2_rect *rect) +{ + return icd->ops->set_fmt_cap(icd, pixfmt, rect); +} + +static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd, + struct v4l2_format *f) +{ + /* FIXME: calculate using depth and bus width */ + + if (f->fmt.pix.height < 4) + f->fmt.pix.height = 4; + if (f->fmt.pix.height > 1920) + f->fmt.pix.height = 1920; + if (f->fmt.pix.width < 2) + f->fmt.pix.width = 2; + if (f->fmt.pix.width > 2560) + f->fmt.pix.width = 2560; + f->fmt.pix.width &= ~0x01; + f->fmt.pix.height &= ~0x03; + + /* limit to sensor capabilities */ + return icd->ops->try_fmt_cap(icd, f); +} + +static int sh_mobile_ceu_reqbufs(struct soc_camera_file *icf, + struct v4l2_requestbuffers *p) +{ + int i; + + /* This is for locking debugging only. I removed spinlocks and now I + * check whether .prepare is ever called on a linked buffer, or whether + * a dma IRQ can occur for an in-work or unlinked buffer. Until now + * it hadn't triggered */ + for (i = 0; i < p->count; i++) { + struct sh_mobile_ceu_buffer *buf; + + buf = container_of(icf->vb_vidq.bufs[i], + struct sh_mobile_ceu_buffer, vb); + INIT_LIST_HEAD(&buf->vb.queue); + } + + return 0; +} + +static unsigned int sh_mobile_ceu_poll(struct file *file, poll_table *pt) +{ + struct soc_camera_file *icf = file->private_data; + struct sh_mobile_ceu_buffer *buf; + + buf = list_entry(icf->vb_vidq.stream.next, + struct sh_mobile_ceu_buffer, vb.stream); + + poll_wait(file, &buf->vb.done, pt); + + if (buf->vb.state == VIDEOBUF_DONE || + buf->vb.state == VIDEOBUF_ERROR) + return POLLIN|POLLRDNORM; + + return 0; +} + +static int sh_mobile_ceu_querycap(struct soc_camera_host *ici, + struct v4l2_capability *cap) +{ + strlcpy(cap->card, "SuperH_Mobile_CEU", sizeof(cap->card)); + cap->version = KERNEL_VERSION(0, 0, 5); + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + return 0; +} + +static void sh_mobile_ceu_init_videobuf(struct videobuf_queue *q, + struct soc_camera_device *icd) +{ + struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); + struct sh_mobile_ceu_dev *pcdev = ici->priv; + + videobuf_queue_dma_contig_init(q, + &sh_mobile_ceu_videobuf_ops, + &ici->dev, &pcdev->lock, + V4L2_BUF_TYPE_VIDEO_CAPTURE, + V4L2_FIELD_NONE, + sizeof(struct sh_mobile_ceu_buffer), + icd); +} + +static struct soc_camera_host_ops sh_mobile_ceu_host_ops = { + .owner = THIS_MODULE, + .add = sh_mobile_ceu_add_device, + .remove = sh_mobile_ceu_remove_device, + .set_fmt_cap = sh_mobile_ceu_set_fmt_cap, + .try_fmt_cap = sh_mobile_ceu_try_fmt_cap, + .reqbufs = sh_mobile_ceu_reqbufs, + .poll = sh_mobile_ceu_poll, + .querycap = sh_mobile_ceu_querycap, + .try_bus_param = sh_mobile_ceu_try_bus_param, + .set_bus_param = sh_mobile_ceu_set_bus_param, + .init_videobuf = sh_mobile_ceu_init_videobuf, +}; + +static int sh_mobile_ceu_probe(struct platform_device *pdev) +{ + struct sh_mobile_ceu_dev *pcdev; + struct resource *res; + void __iomem *base; + unsigned int irq; + int err = 0; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + irq = platform_get_irq(pdev, 0); + if (!res || !irq) { + dev_err(&pdev->dev, "Not enough CEU platform resources.\n"); + err = -ENODEV; + goto exit; + } + + pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL); + if (!pcdev) { + dev_err(&pdev->dev, "Could not allocate pcdev\n"); + err = -ENOMEM; + goto exit; + } + + platform_set_drvdata(pdev, pcdev); + INIT_LIST_HEAD(&pcdev->capture); + spin_lock_init(&pcdev->lock); + + pcdev->pdata = pdev->dev.platform_data; + if (!pcdev->pdata) { + err = -EINVAL; + dev_err(&pdev->dev, "CEU platform data not set.\n"); + goto exit_kfree; + } + + base = ioremap_nocache(res->start, res->end - res->start + 1); + if (!base) { + err = -ENXIO; + dev_err(&pdev->dev, "Unable to ioremap CEU registers.\n"); + goto exit_kfree; + } + + pcdev->irq = irq; + pcdev->base = base; + pcdev->video_limit = 0; /* only enabled if second resource exists */ + pcdev->dev = &pdev->dev; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (res) { + err = dma_declare_coherent_memory(&pdev->dev, res->start, + res->start, + (res->end - res->start) + 1, + DMA_MEMORY_MAP | + DMA_MEMORY_EXCLUSIVE); + if (!err) { + dev_err(&pdev->dev, "Unable to declare CEU memory.\n"); + err = -ENXIO; + goto exit_iounmap; + } + + pcdev->video_limit = (res->end - res->start) + 1; + } + + /* request irq */ + err = request_irq(pcdev->irq, sh_mobile_ceu_irq, IRQF_DISABLED, + pdev->dev.bus_id, pcdev); + if (err) { + dev_err(&pdev->dev, "Unable to register CEU interrupt.\n"); + goto exit_release_mem; + } + + pcdev->ici.priv = pcdev; + pcdev->ici.dev.parent = &pdev->dev; + pcdev->ici.nr = pdev->id; + pcdev->ici.drv_name = pdev->dev.bus_id, + pcdev->ici.ops = &sh_mobile_ceu_host_ops, + + err = soc_camera_host_register(&pcdev->ici); + if (err) + goto exit_free_irq; + + return 0; + +exit_free_irq: + free_irq(pcdev->irq, pcdev); +exit_release_mem: + if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) + dma_release_declared_memory(&pdev->dev); +exit_iounmap: + iounmap(base); +exit_kfree: + kfree(pcdev); +exit: + return err; +} + +static int sh_mobile_ceu_remove(struct platform_device *pdev) +{ + struct sh_mobile_ceu_dev *pcdev = platform_get_drvdata(pdev); + + soc_camera_host_unregister(&pcdev->ici); + free_irq(pcdev->irq, pcdev); + if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) + dma_release_declared_memory(&pdev->dev); + iounmap(pcdev->base); + kfree(pcdev); + return 0; +} + +static struct platform_driver sh_mobile_ceu_driver = { + .driver = { + .name = "sh_mobile_ceu", + }, + .probe = sh_mobile_ceu_probe, + .remove = sh_mobile_ceu_remove, +}; + +static int __init sh_mobile_ceu_init(void) +{ + return platform_driver_register(&sh_mobile_ceu_driver); +} + +static void __exit sh_mobile_ceu_exit(void) +{ + return platform_driver_unregister(&sh_mobile_ceu_driver); +} + +module_init(sh_mobile_ceu_init); +module_exit(sh_mobile_ceu_exit); + +MODULE_DESCRIPTION("SuperH Mobile CEU driver"); +MODULE_AUTHOR("Magnus Damm"); +MODULE_LICENSE("GPL"); diff --git a/linux/drivers/media/video/soc_camera.c b/linux/drivers/media/video/soc_camera.c index 8ae2d9916..e39b98f1e 100644 --- a/linux/drivers/media/video/soc_camera.c +++ b/linux/drivers/media/video/soc_camera.c @@ -26,6 +26,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-dev.h> +#include <media/videobuf-core.h> #include <media/soc_camera.h> static LIST_HEAD(hosts); @@ -182,7 +183,6 @@ static int soc_camera_open(struct inode *inode, struct file *file) struct soc_camera_device *icd; struct soc_camera_host *ici; struct soc_camera_file *icf; - spinlock_t *lock; int ret; icf = vmalloc(sizeof(*icf)); @@ -209,13 +209,6 @@ static int soc_camera_open(struct inode *inode, struct file *file) } icf->icd = icd; - - icf->lock = ici->ops->spinlock_alloc(icf); - if (!icf->lock) { - ret = -ENOMEM; - goto esla; - } - icd->use_count++; /* Now we really have to activate the camera */ @@ -233,21 +226,12 @@ static int soc_camera_open(struct inode *inode, struct file *file) file->private_data = icf; dev_dbg(&icd->dev, "camera device open\n"); - /* We must pass NULL as dev pointer, then all pci_* dma operations - * transform to normal dma_* ones. */ - videobuf_queue_sg_init(&icf->vb_vidq, ici->vbq_ops, NULL, icf->lock, - V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE, - ici->msize, icd); + ici->ops->init_videobuf(&icf->vb_vidq, icd); return 0; /* All errors are entered with the video_lock held */ eiciadd: - lock = icf->lock; - icf->lock = NULL; - if (ici->ops->spinlock_free) - ici->ops->spinlock_free(lock); -esla: module_put(ici->ops->owner); emgi: module_put(icd->ops->owner); @@ -263,15 +247,11 @@ static int soc_camera_close(struct inode *inode, struct file *file) struct soc_camera_device *icd = icf->icd; struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); struct video_device *vdev = icd->vdev; - spinlock_t *lock = icf->lock; mutex_lock(&video_lock); icd->use_count--; if (!icd->use_count) ici->ops->remove(icd); - icf->lock = NULL; - if (ici->ops->spinlock_free) - ici->ops->spinlock_free(lock); module_put(icd->ops->owner); module_put(ici->ops->owner); mutex_unlock(&video_lock); @@ -767,27 +747,12 @@ static void dummy_release(struct device *dev) { } -static spinlock_t *spinlock_alloc(struct soc_camera_file *icf) -{ - spinlock_t *lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL); - - if (lock) - spin_lock_init(lock); - - return lock; -} - -static void spinlock_free(spinlock_t *lock) -{ - kfree(lock); -} - int soc_camera_host_register(struct soc_camera_host *ici) { int ret; struct soc_camera_host *ix; - if (!ici->vbq_ops || !ici->ops->add || !ici->ops->remove) + if (!ici->ops->init_videobuf || !ici->ops->add || !ici->ops->remove) return -EINVAL; /* Number might be equal to the platform device ID */ @@ -811,11 +776,6 @@ int soc_camera_host_register(struct soc_camera_host *ici) if (ret) goto edevr; - if (!ici->ops->spinlock_alloc) { - ici->ops->spinlock_alloc = spinlock_alloc; - ici->ops->spinlock_free = spinlock_free; - } - scan_add_host(ici); return 0; diff --git a/linux/drivers/media/video/soc_camera_platform.c b/linux/drivers/media/video/soc_camera_platform.c new file mode 100644 index 000000000..eefb0327e --- /dev/null +++ b/linux/drivers/media/video/soc_camera_platform.c @@ -0,0 +1,198 @@ +/* + * Generic Platform Camera Driver + * + * Copyright (C) 2008 Magnus Damm + * Based on mt9m001 driver, + * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/delay.h> +#include <linux/platform_device.h> +#include <linux/videodev2.h> +#include <media/v4l2-common.h> +#include <media/soc_camera.h> + +struct soc_camera_platform_info { + int iface; + char *format_name; + unsigned long format_depth; + struct v4l2_pix_format format; + unsigned long bus_param; + int (*set_capture)(struct soc_camera_platform_info *info, int enable); +}; + +struct soc_camera_platform_priv { + struct soc_camera_platform_info *info; + struct soc_camera_device icd; + struct soc_camera_data_format format; +}; + +static struct soc_camera_platform_info * +soc_camera_platform_get_info(struct soc_camera_device *icd) +{ + struct soc_camera_platform_priv *priv; + priv = container_of(icd, struct soc_camera_platform_priv, icd); + return priv->info; +} + +static int soc_camera_platform_init(struct soc_camera_device *icd) +{ + return 0; +} + +static int soc_camera_platform_release(struct soc_camera_device *icd) +{ + return 0; +} + +static int soc_camera_platform_start_capture(struct soc_camera_device *icd) +{ + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + return p->set_capture(p, 1); +} + +static int soc_camera_platform_stop_capture(struct soc_camera_device *icd) +{ + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + return p->set_capture(p, 0); +} + +static int soc_camera_platform_set_bus_param(struct soc_camera_device *icd, + unsigned long flags) +{ + return 0; +} + +static unsigned long +soc_camera_platform_query_bus_param(struct soc_camera_device *icd) +{ + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + return p->bus_param; +} + +static int soc_camera_platform_set_fmt_cap(struct soc_camera_device *icd, + __u32 pixfmt, struct v4l2_rect *rect) +{ + return 0; +} + +static int soc_camera_platform_try_fmt_cap(struct soc_camera_device *icd, + struct v4l2_format *f) +{ + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + + f->fmt.pix.width = p->format.width; + f->fmt.pix.height = p->format.height; + return 0; +} + +static int soc_camera_platform_video_probe(struct soc_camera_device *icd) +{ + struct soc_camera_platform_priv *priv; + priv = container_of(icd, struct soc_camera_platform_priv, icd); + + priv->format.name = priv->info->format_name; + priv->format.depth = priv->info->format_depth; + priv->format.fourcc = priv->info->format.pixelformat; + priv->format.colorspace = priv->info->format.colorspace; + + icd->formats = &priv->format; + icd->num_formats = 1; + + return soc_camera_video_start(icd); +} + +static void soc_camera_platform_video_remove(struct soc_camera_device *icd) +{ + soc_camera_video_stop(icd); +} + +static struct soc_camera_ops soc_camera_platform_ops = { + .owner = THIS_MODULE, + .probe = soc_camera_platform_video_probe, + .remove = soc_camera_platform_video_remove, + .init = soc_camera_platform_init, + .release = soc_camera_platform_release, + .start_capture = soc_camera_platform_start_capture, + .stop_capture = soc_camera_platform_stop_capture, + .set_fmt_cap = soc_camera_platform_set_fmt_cap, + .try_fmt_cap = soc_camera_platform_try_fmt_cap, + .set_bus_param = soc_camera_platform_set_bus_param, + .query_bus_param = soc_camera_platform_query_bus_param, +}; + +static int soc_camera_platform_probe(struct platform_device *pdev) +{ + struct soc_camera_platform_priv *priv; + struct soc_camera_platform_info *p; + struct soc_camera_device *icd; + int ret; + + p = pdev->dev.platform_data; + if (!p) + return -EINVAL; + + priv = kzalloc(sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->info = p; + platform_set_drvdata(pdev, priv); + + icd = &priv->icd; + icd->ops = &soc_camera_platform_ops; + icd->control = &pdev->dev; + icd->width_min = 0; + icd->width_max = priv->info->format.width; + icd->height_min = 0; + icd->height_max = priv->info->format.height; + icd->y_skip_top = 0; + icd->iface = priv->info->iface; + + ret = soc_camera_device_register(icd); + if (ret) + kfree(priv); + + return ret; +} + +static int soc_camera_platform_remove(struct platform_device *pdev) +{ + struct soc_camera_platform_priv *priv = platform_get_drvdata(pdev); + + soc_camera_device_unregister(&priv->icd); + kfree(priv); + return 0; +} + +static struct platform_driver soc_camera_platform_driver = { + .driver = { + .name = "soc_camera_platform", + }, + .probe = soc_camera_platform_probe, + .remove = soc_camera_platform_remove, +}; + +static int __init soc_camera_platform_module_init(void) +{ + return platform_driver_register(&soc_camera_platform_driver); +} + +static void __exit soc_camera_platform_module_exit(void) +{ + return platform_driver_unregister(&soc_camera_platform_driver); +} + +module_init(soc_camera_platform_module_init); +module_exit(soc_camera_platform_module_exit); + +MODULE_DESCRIPTION("SoC Camera Platform driver"); +MODULE_AUTHOR("Magnus Damm"); +MODULE_LICENSE("GPL v2"); diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index b50e0942e..d7b931fd3 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -286,7 +286,11 @@ static int tvmixer_clients(struct i2c_client *client) return -1; /* everything is fine, register */ - if ((minor = register_sound_mixer(&tvmixer_fops,devnr)) < 0) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) + if ((minor = register_sound_mixer(&tvmixer_fops, devnr)) < 0) { +#else + if ((minor = register_sound_mixer((struct file_operations *)&tvmixer_fops, devnr)) < 0) { +#endif printk(KERN_ERR "tvmixer: cannot allocate mixer device\n"); return -1; } diff --git a/linux/drivers/media/video/videobuf-dma-contig.c b/linux/drivers/media/video/videobuf-dma-contig.c new file mode 100644 index 000000000..c71001da3 --- /dev/null +++ b/linux/drivers/media/video/videobuf-dma-contig.c @@ -0,0 +1,419 @@ +/* + * helper functions for physically contiguous capture buffers + * + * The functions support hardware lacking scatter gather support + * (i.e. the buffers must be linear in physical memory) + * + * Copyright (c) 2008 Magnus Damm + * + * Based on videobuf-vmalloc.c, + * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 + */ + +#include <linux/init.h> +#include <linux/module.h> +#include <linux/mm.h> +#include <linux/dma-mapping.h> +#include <media/videobuf-dma-contig.h> +#include "compat.h" + +struct videobuf_dma_contig_memory { + u32 magic; + void *vaddr; + dma_addr_t dma_handle; + unsigned long size; +}; + +#define MAGIC_DC_MEM 0x0733ac61 +#define MAGIC_CHECK(is, should) \ + if (unlikely((is) != (should))) { \ + pr_err("magic mismatch: %x expected %x\n", is, should); \ + BUG(); \ + } + +static void +videobuf_vm_open(struct vm_area_struct *vma) +{ + struct videobuf_mapping *map = vma->vm_private_data; + + dev_dbg(map->q->dev, "vm_open %p [count=%u,vma=%08lx-%08lx]\n", + map, map->count, vma->vm_start, vma->vm_end); + + map->count++; +} + +static void videobuf_vm_close(struct vm_area_struct *vma) +{ + struct videobuf_mapping *map = vma->vm_private_data; + struct videobuf_queue *q = map->q; + int i; + + dev_dbg(map->q->dev, "vm_close %p [count=%u,vma=%08lx-%08lx]\n", + map, map->count, vma->vm_start, vma->vm_end); + + map->count--; + if (0 == map->count) { + struct videobuf_dma_contig_memory *mem; + + dev_dbg(map->q->dev, "munmap %p q=%p\n", map, q); + mutex_lock(&q->vb_lock); + + /* We need first to cancel streams, before unmapping */ + if (q->streaming) + videobuf_queue_cancel(q); + + for (i = 0; i < VIDEO_MAX_FRAME; i++) { + if (NULL == q->bufs[i]) + continue; + + if (q->bufs[i]->map != map) + continue; + + mem = q->bufs[i]->priv; + if (mem) { + /* This callback is called only if kernel has + allocated memory and this memory is mmapped. + In this case, memory should be freed, + in order to do memory unmap. + */ + + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + /* vfree is not atomic - can't be + called with IRQ's disabled + */ + dev_dbg(map->q->dev, "buf[%d] freeing %p\n", + i, mem->vaddr); + + dma_free_coherent(q->dev, mem->size, + mem->vaddr, mem->dma_handle); + mem->vaddr = NULL; + } + + q->bufs[i]->map = NULL; + q->bufs[i]->baddr = 0; + } + + kfree(map); + + mutex_unlock(&q->vb_lock); + } +} + +static struct vm_operations_struct videobuf_vm_ops = { + .open = videobuf_vm_open, + .close = videobuf_vm_close, +}; + +static void *__videobuf_alloc(size_t size) +{ + struct videobuf_dma_contig_memory *mem; + struct videobuf_buffer *vb; + + vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); + if (vb) { + mem = vb->priv = ((char *)vb) + size; + mem->magic = MAGIC_DC_MEM; + } + + return vb; +} + +static void *__videobuf_to_vmalloc(struct videobuf_buffer *buf) +{ + struct videobuf_dma_contig_memory *mem = buf->priv; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + return mem->vaddr; +} + +static int __videobuf_iolock(struct videobuf_queue *q, + struct videobuf_buffer *vb, + struct v4l2_framebuffer *fbuf) +{ + struct videobuf_dma_contig_memory *mem = vb->priv; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + switch (vb->memory) { + case V4L2_MEMORY_MMAP: + dev_dbg(q->dev, "%s memory method MMAP\n", __func__); + + /* All handling should be done by __videobuf_mmap_mapper() */ + if (!mem->vaddr) { + dev_err(q->dev, "memory is not alloced/mmapped.\n"); + return -EINVAL; + } + break; + case V4L2_MEMORY_USERPTR: + dev_dbg(q->dev, "%s memory method USERPTR\n", __func__); + + /* The only USERPTR currently supported is the one needed for + read() method. + */ + if (vb->baddr) + return -EINVAL; + + mem->size = PAGE_ALIGN(vb->size); + mem->vaddr = dma_alloc_coherent(q->dev, mem->size, + &mem->dma_handle, GFP_KERNEL); + if (!mem->vaddr) { + dev_err(q->dev, "dma_alloc_coherent %ld failed\n", + mem->size); + return -ENOMEM; + } + + dev_dbg(q->dev, "dma_alloc_coherent data is at %p (%ld)\n", + mem->vaddr, mem->size); + break; + case V4L2_MEMORY_OVERLAY: + default: + dev_dbg(q->dev, "%s memory method OVERLAY/unknown\n", + __func__); + return -EINVAL; + } + + return 0; +} + +static int __videobuf_sync(struct videobuf_queue *q, + struct videobuf_buffer *buf) +{ + struct videobuf_dma_contig_memory *mem = buf->priv; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + dma_sync_single_for_cpu(q->dev, mem->dma_handle, mem->size, + DMA_FROM_DEVICE); + return 0; +} + +static int __videobuf_mmap_free(struct videobuf_queue *q) +{ + unsigned int i; + + dev_dbg(q->dev, "%s\n", __func__); + for (i = 0; i < VIDEO_MAX_FRAME; i++) { + if (q->bufs[i] && q->bufs[i]->map) + return -EBUSY; + } + + return 0; +} + +static int __videobuf_mmap_mapper(struct videobuf_queue *q, + struct vm_area_struct *vma) +{ + struct videobuf_dma_contig_memory *mem; + struct videobuf_mapping *map; + unsigned int first; + int retval; + unsigned long size, offset = vma->vm_pgoff << PAGE_SHIFT; + + dev_dbg(q->dev, "%s\n", __func__); + if (!(vma->vm_flags & VM_WRITE) || !(vma->vm_flags & VM_SHARED)) + return -EINVAL; + + /* look for first buffer to map */ + for (first = 0; first < VIDEO_MAX_FRAME; first++) { + if (!q->bufs[first]) + continue; + + if (V4L2_MEMORY_MMAP != q->bufs[first]->memory) + continue; + if (q->bufs[first]->boff == offset) + break; + } + if (VIDEO_MAX_FRAME == first) { + dev_dbg(q->dev, "invalid user space offset [offset=0x%lx]\n", + offset); + return -EINVAL; + } + + /* create mapping + update buffer list */ + map = kzalloc(sizeof(struct videobuf_mapping), GFP_KERNEL); + if (!map) + return -ENOMEM; + + q->bufs[first]->map = map; + map->start = vma->vm_start; + map->end = vma->vm_end; + map->q = q; + + q->bufs[first]->baddr = vma->vm_start; + + mem = q->bufs[first]->priv; + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + mem->size = PAGE_ALIGN(q->bufs[first]->bsize); + mem->vaddr = dma_alloc_coherent(q->dev, mem->size, + &mem->dma_handle, GFP_KERNEL); + if (!mem->vaddr) { + dev_err(q->dev, "dma_alloc_coherent size %ld failed\n", + mem->size); + goto error; + } + dev_dbg(q->dev, "dma_alloc_coherent data is at addr %p (size %ld)\n", + mem->vaddr, mem->size); + + /* Try to remap memory */ + + size = vma->vm_end - vma->vm_start; + size = (size < mem->size) ? size : mem->size; + + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + retval = remap_pfn_range(vma, vma->vm_start, + mem->dma_handle >> PAGE_SHIFT, + size, vma->vm_page_prot); + if (retval) { + dev_err(q->dev, "mmap: remap failed with error %d. ", retval); + dma_free_coherent(q->dev, mem->size, + mem->vaddr, mem->dma_handle); + goto error; + } + + vma->vm_ops = &videobuf_vm_ops; + vma->vm_flags |= VM_DONTEXPAND; + vma->vm_private_data = map; + + dev_dbg(q->dev, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n", + map, q, vma->vm_start, vma->vm_end, + (long int) q->bufs[first]->bsize, + vma->vm_pgoff, first); + + videobuf_vm_open(vma); + + return 0; + +error: + kfree(map); + return -ENOMEM; +} + +static int __videobuf_copy_to_user(struct videobuf_queue *q, + char __user *data, size_t count, + int nonblocking) +{ + struct videobuf_dma_contig_memory *mem = q->read_buf->priv; + void *vaddr; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + BUG_ON(!mem->vaddr); + + /* copy to userspace */ + if (count > q->read_buf->size - q->read_off) + count = q->read_buf->size - q->read_off; + + vaddr = mem->vaddr; + + if (copy_to_user(data, vaddr + q->read_off, count)) + return -EFAULT; + + return count; +} + +static int __videobuf_copy_stream(struct videobuf_queue *q, + char __user *data, size_t count, size_t pos, + int vbihack, int nonblocking) +{ + unsigned int *fc; + struct videobuf_dma_contig_memory *mem = q->read_buf->priv; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + if (vbihack) { + /* dirty, undocumented hack -- pass the frame counter + * within the last four bytes of each vbi data block. + * We need that one to maintain backward compatibility + * to all vbi decoding software out there ... */ + fc = (unsigned int *)mem->vaddr; + fc += (q->read_buf->size >> 2) - 1; + *fc = q->read_buf->field_count >> 1; + dev_dbg(q->dev, "vbihack: %d\n", *fc); + } + + /* copy stuff using the common method */ + count = __videobuf_copy_to_user(q, data, count, nonblocking); + + if ((count == -EFAULT) && (pos == 0)) + return -EFAULT; + + return count; +} + +static struct videobuf_qtype_ops qops = { + .magic = MAGIC_QTYPE_OPS, + + .alloc = __videobuf_alloc, + .iolock = __videobuf_iolock, + .sync = __videobuf_sync, + .mmap_free = __videobuf_mmap_free, + .mmap_mapper = __videobuf_mmap_mapper, + .video_copy_to_user = __videobuf_copy_to_user, + .copy_stream = __videobuf_copy_stream, + .vmalloc = __videobuf_to_vmalloc, +}; + +void videobuf_queue_dma_contig_init(struct videobuf_queue *q, + struct videobuf_queue_ops *ops, + struct device *dev, + spinlock_t *irqlock, + enum v4l2_buf_type type, + enum v4l2_field field, + unsigned int msize, + void *priv) +{ + videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize, + priv, &qops); +} +EXPORT_SYMBOL_GPL(videobuf_queue_dma_contig_init); + +dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf) +{ + struct videobuf_dma_contig_memory *mem = buf->priv; + + BUG_ON(!mem); + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + return mem->dma_handle; +} +EXPORT_SYMBOL_GPL(videobuf_to_dma_contig); + +void videobuf_dma_contig_free(struct videobuf_queue *q, + struct videobuf_buffer *buf) +{ + struct videobuf_dma_contig_memory *mem = buf->priv; + + /* mmapped memory can't be freed here, otherwise mmapped region + would be released, while still needed. In this case, the memory + release should happen inside videobuf_vm_close(). + So, it should free memory only if the memory were allocated for + read() operation. + */ + if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr) + return; + + if (!mem) + return; + + MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); + + dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle); + mem->vaddr = NULL; +} +EXPORT_SYMBOL_GPL(videobuf_dma_contig_free); + +MODULE_DESCRIPTION("helper module to manage video4linux dma contig buffers"); +MODULE_AUTHOR("Magnus Damm"); +MODULE_LICENSE("GPL"); diff --git a/linux/drivers/media/video/videobuf-dma-sg.c b/linux/drivers/media/video/videobuf-dma-sg.c index 21194d6fe..e64350e1f 100644 --- a/linux/drivers/media/video/videobuf-dma-sg.c +++ b/linux/drivers/media/video/videobuf-dma-sg.c @@ -1,7 +1,7 @@ /* * helper functions for SG DMA video4linux capture buffers * - * The functions expect the hardware being able to scatter gatter + * The functions expect the hardware being able to scatter gather * (i.e. the buffers are not linear in physical memory, but fragmented * into PAGE_SIZE chunks). They also assume the driver does not need * to touch the video data. diff --git a/linux/drivers/media/video/videobuf-vmalloc.c b/linux/drivers/media/video/videobuf-vmalloc.c index 6f487b348..eb25cc257 100644 --- a/linux/drivers/media/video/videobuf-vmalloc.c +++ b/linux/drivers/media/video/videobuf-vmalloc.c @@ -1,7 +1,7 @@ /* * helper functions for vmalloc video4linux capture buffers * - * The functions expect the hardware being able to scatter gatter + * The functions expect the hardware being able to scatter gather * (i.e. the buffers are not linear in physical memory, but fragmented * into PAGE_SIZE chunks). They also assume the driver does not need * to touch the video data. diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 7ac11d5fb..b32b59afd 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -376,6 +376,7 @@ EXPORT_SYMBOL(v4l_printk_ioctl); * sysfs stuff */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) static ssize_t show_index(struct device *cd, struct device_attribute *attr, char *buf) { @@ -392,6 +393,30 @@ static ssize_t show_name(struct device *cd, return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); } +static struct device_attribute video_device_attrs[] = { + __ATTR(name, S_IRUGO, show_name, NULL), + __ATTR(index, S_IRUGO, show_index, NULL), + __ATTR_NULL +}; +#else +static ssize_t show_index(struct class_device *cd, char *buf) +{ + struct video_device *vfd = container_of(cd, struct video_device, + class_dev); + return sprintf(buf, "%i\n", vfd->index); +} + +static ssize_t show_name(struct class_device *cd, char *buf) +{ + struct video_device *vfd = container_of(cd, struct video_device, + class_dev); + return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); +} + +static CLASS_DEVICE_ATTR(index, S_IRUGO, show_index, NULL); +static CLASS_DEVICE_ATTR(name, S_IRUGO, show_name, NULL); +#endif + struct video_device *video_device_alloc(void) { struct video_device *vfd; @@ -407,7 +432,11 @@ void video_device_release(struct video_device *vfd) } EXPORT_SYMBOL(video_device_release); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +static void video_release(struct class_device *cd) +#else static void video_release(struct device *cd) +#endif { struct video_device *vfd = container_of(cd, struct video_device, class_dev); @@ -420,16 +449,14 @@ static void video_release(struct device *cd) vfd->release(vfd); } -static struct device_attribute video_device_attrs[] = { - __ATTR(name, S_IRUGO, show_name, NULL), - __ATTR(index, S_IRUGO, show_index, NULL), - __ATTR_NULL -}; - static struct class video_class = { .name = VIDEO_NAME, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + .release = video_release, +#else .dev_attrs = video_device_attrs, .dev_release = video_release, +#endif }; /* @@ -457,7 +484,7 @@ static int video_open(struct inode *inode, struct file *file) unsigned int minor = iminor(inode); int err = 0; struct video_device *vfl; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) const struct file_operations *old_fops; #else struct file_operations *old_fops; @@ -478,7 +505,11 @@ static int video_open(struct inode *inode, struct file *file) } } old_fops = file->f_op; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) file->f_op = fops_get(vfl->fops); +#else + file->f_op = (struct file_operations *)fops_get(vfl->fops); +#endif if(file->f_op->open) err = file->f_op->open(inode,file); if (err) { @@ -2016,26 +2047,8 @@ out: } EXPORT_SYMBOL(video_ioctl2); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -struct index_info { - struct device *dev; - unsigned int used[VIDEO_NUM_DEVICES]; -}; - -static int __fill_index_info(struct device *cd, void *data) -{ - struct index_info *info = data; - struct video_device *vfd = container_of(cd, struct video_device, - class_dev); - - if (info->dev == vfd->dev) - info->used[vfd->index] = 1; - - return 0; -} - /** - * assign_index - assign stream number based on parent device + * get_index - assign stream number based on parent device * @vdev: video_device to assign index number to, vdev->dev should be assigned * @num: -1 if auto assign, requested number otherwise * @@ -2045,46 +2058,35 @@ static int __fill_index_info(struct device *cd, void *data) */ static int get_index(struct video_device *vdev, int num) { - struct index_info *info; + u32 used = 0; + const int max_index = sizeof(used) * 8 - 1; int i; - int ret = 0; - if (num >= VIDEO_NUM_DEVICES) + /* Currently a single v4l driver instance cannot create more than + 32 devices. + Increase to u64 or an array of u32 if more are needed. */ + if (num > max_index) { + printk(KERN_ERR "videodev: %s num is too large\n", __func__); return -EINVAL; - - info = kzalloc(sizeof(*info), GFP_KERNEL); - if (!info) - return -ENOMEM; - - info->dev = vdev->dev; - - ret = class_for_each_device(&video_class, info, - __fill_index_info); - - if (ret < 0) - goto out; - - if (num >= 0) { - if (!info->used[num]) - ret = num; - else - ret = -ENFILE; - - goto out; } for (i = 0; i < VIDEO_NUM_DEVICES; i++) { - if (info->used[i]) - continue; - ret = i; - goto out; + if (video_device[i] != NULL && + video_device[i] != vdev && + video_device[i]->dev == vdev->dev) { + used |= 1 << video_device[i]->index; + } } -out: - kfree(info); - return ret; + if (num >= 0) { + if (used & (1 << num)) + return -ENFILE; + return num; + } + + i = ffz(used); + return i > max_index ? -ENFILE : i; } -#endif static const struct file_operations video_fops; @@ -2178,35 +2180,57 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, video_device[i]=vfd; vfd->minor=i; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) ret = get_index(vfd, index); -#else - ret = 0; -#endif + vfd->index = ret; + + mutex_unlock(&videodev_lock); + if (ret < 0) { - printk(KERN_ERR "%s: get_index failed\n", - __func__); + printk(KERN_ERR "%s: get_index failed\n", __func__); goto fail_minor; } - vfd->index = ret; - - mutex_unlock(&videodev_lock); mutex_init(&vfd->lock); /* sysfs class */ memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); - if (vfd->dev) - vfd->class_dev.parent = vfd->dev; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18) vfd->class_dev.class = &video_class; vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + if (vfd->dev) + vfd->class_dev.dev = vfd->dev; + sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); + ret = class_device_register(&vfd->class_dev); +#else + if (vfd->dev) + vfd->class_dev.parent = vfd->dev; sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); ret = device_register(&vfd->class_dev); +#endif if (ret < 0) { - printk(KERN_ERR "%s: device_register failed\n", - __func__); + printk(KERN_ERR "%s: device_register failed\n", __func__); goto fail_minor; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + ret = class_device_create_file(&vfd->class_dev, + &class_device_attr_name); + if (ret < 0) { + printk(KERN_ERR "%s: class_device_create_file 'name' failed\n", + __func__); + class_device_unregister(&vfd->class_dev); + goto fail_minor; + } + ret = class_device_create_file(&vfd->class_dev, + &class_device_attr_index); + if (ret < 0) { + printk(KERN_ERR "%s: class_device_create_file 'index' failed\n", + __func__); + class_device_unregister(&vfd->class_dev); + goto fail_minor; + } +#endif #if 1 /* keep */ /* needed until all drivers are fixed */ @@ -2241,7 +2265,11 @@ void video_unregister_device(struct video_device *vfd) panic("videodev: bad unregister"); video_device[vfd->minor]=NULL; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + class_device_unregister(&vfd->class_dev); +#else device_unregister(&vfd->class_dev); +#endif mutex_unlock(&videodev_lock); } EXPORT_SYMBOL(video_unregister_device); @@ -2265,7 +2293,12 @@ static int __init videodev_init(void) int ret; printk(KERN_INFO "Linux video capture interface: v2.00\n"); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) if (register_chrdev(VIDEO_MAJOR, VIDEO_NAME, &video_fops)) { +#else + if (register_chrdev(VIDEO_MAJOR, VIDEO_NAME, + (struct file_operations *)&video_fops)) { +#endif printk(KERN_WARNING "video_dev: unable to get major %d\n", VIDEO_MAJOR); return -EIO; } diff --git a/linux/firmware/Makefile b/linux/firmware/Makefile new file mode 100644 index 000000000..e2841d35d --- /dev/null +++ b/linux/firmware/Makefile @@ -0,0 +1,128 @@ +# +# kbuild file for firmware/ +# + +# Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a +# leading /, it's relative to $(srctree). +fwdir := $(subst ",,$(CONFIG_EXTRA_FIRMWARE_DIR)) +fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) + +fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE)) + +# There are three cases to care about: +# 1. Building kernel with CONFIG_FIRMWARE_IN_KERNEL=y -- $(fw-shipped-y) should +# include the firmware files to include, according to .config +# 2. 'make modules_install', which will install firmware for modules, and +# _also_ for the in-kernel drivers when CONFIG_FIRMWARE_IN_KERNEL=n +# 3. 'make firmware_install', which installs all firmware, unconditionally. + +# For the former two cases we want $(fw-shipped-y) and $(fw-shipped-m) to be +# accurate. In the latter case it doesn't matter -- it'll use $(fw-shipped-all). +# But be aware that the config file might not be included at all. + +fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin +fw-shipped-$(CONFIG_USB_DABUSB) += dabusb/firmware.fw dabusb/bitstream.bin +fw-shipped-$(CONFIG_USB_VICAM) += vicam/firmware.fw +fw-shipped-$(CONFIG_VIDEO_CPIA2) += cpia2/stv0672_vp4.bin + +fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-) + +# Directories which we _might_ need to create, so we have a rule for them. +firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(fw-external-y) $(fw-shipped-all)))) + +quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@) + cmd_mkdir = mkdir -p $@ + +quiet_cmd_ihex = IHEX $@ + cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@ + +quiet_cmd_ihex2fw = IHEX2FW $@ + cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@ + +quiet_cmd_h16tofw = H16TOFW $@ + cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@ + +quiet_cmd_fwbin = MK_FW $@ + cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \ + FWSTR="$(subst /,_,$(subst .,_,$(subst -,_,$(patsubst \ + firmware/%.gen.S,%,$@))))"; \ + ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long); \ + ASM_ALIGN=$(if $(CONFIG_64BIT),3,2); \ + PROGBITS=$(if $(CONFIG_ARM),%,@)progbits; \ + echo "/* Generated by firmware/Makefile */" > $@;\ + echo " .section .rodata" >>$@;\ + echo " .p2align $${ASM_ALIGN}" >>$@;\ + echo "_fw_$${FWSTR}_bin:" >>$@;\ + echo " .incbin \"$(2)\"" >>$@;\ + echo "_fw_end:" >>$@;\ + echo " .section .rodata.str,\"aMS\",$${PROGBITS},1" >>$@;\ + echo " .p2align $${ASM_ALIGN}" >>$@;\ + echo "_fw_$${FWSTR}_name:" >>$@;\ + echo " .string \"$$FWNAME\"" >>$@;\ + echo " .section .builtin_fw,\"a\",$${PROGBITS}" >>$@;\ + echo " .p2align $${ASM_ALIGN}" >>$@;\ + echo " $${ASM_WORD} _fw_$${FWSTR}_name" >>$@;\ + echo " $${ASM_WORD} _fw_$${FWSTR}_bin" >>$@;\ + echo " $${ASM_WORD} _fw_end - _fw_$${FWSTR}_bin" >>$@; + +# One of these files will change, or come into existence, whenever +# the configuration changes between 32-bit and 64-bit. The .S files +# need to change when that happens. +wordsize_deps := $(wildcard include/config/64bit.h include/config/32bit.h \ + include/config/ppc32.h include/config/ppc64.h \ + include/config/superh32.h include/config/superh64.h \ + include/config/x86_32.h include/config/x86_64.h) + +# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. +# It'll end up depending on these targets, so make them a PHONY rule which +# depends on _all_ the directories in $(firmware-dirs), and it'll work out OK. +PHONY += $(objtree)/$$(%) $(objtree)/$(obj)/$$(%) +$(objtree)/$$(%) $(objtree)/$(obj)/$$(%): $(firmware-dirs) + @true + +# For the $$(dir %) trick, where we need % to be expanded first. +.SECONDEXPANSION: + +$(patsubst %,$(obj)/%.gen.S, $(fw-shipped-y)): %: $(wordsize_deps) \ + | $(objtree)/$$(dir %) + $(call cmd,fwbin,$(patsubst %.gen.S,%,$@)) +$(patsubst %,$(obj)/%.gen.S, $(fw-external-y)): %: $(wordsize_deps) \ + include/config/extra/firmware/dir.h | $(objtree)/$$(dir %) + $(call cmd,fwbin,$(fwabs)/$(patsubst $(obj)/%.gen.S,%,$@)) + +# The .o files depend on the binaries directly; the .S files don't. +$(patsubst %,$(obj)/%.gen.o, $(fw-shipped-y)): %.gen.o: % +$(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/% + +# .ihex is used just as a simple way to hold binary files in a source tree +# where binaries are frowned upon. They are directly converted with objcopy. +$(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) + $(call cmd,ihex) + +# .HEX is also Intel HEX, but where the offset and length in each record +# is actually meaningful, because the firmware has to be loaded in a certain +# order rather than as a single binary blob. Thus, we convert them into our +# more compact binary representation of ihex records (<linux/ihex.h>) +$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) + $(call cmd,ihex2fw) + +# .H16 is our own modified form of Intel HEX, with 16-bit length for records. +$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) + $(call cmd,h16tofw) + +$(firmware-dirs): + $(call cmd,mkdir) + +obj-y += $(patsubst %,%.gen.o, $(fw-external-y)) +obj-$(CONFIG_FIRMWARE_IN_KERNEL) += $(patsubst %,%.gen.o, $(fw-shipped-y)) + +# Remove .S files and binaries created from ihex +# (during 'make clean' .config isn't included so they're all in $(fw-shipped-)) +targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \ + $(shell find $(obj) -name \*.gen.S 2>/dev/null)) + +# Without this, built-in.o won't be created when it's empty, and the +# final vmlinux link will fail. +obj-n := dummy + +hostprogs-y := ihex2fw diff --git a/linux/firmware/cpia2/stv0672_vp4.bin.ihex b/linux/firmware/cpia2/stv0672_vp4.bin.ihex new file mode 100644 index 000000000..bd0b9cf65 --- /dev/null +++ b/linux/firmware/cpia2/stv0672_vp4.bin.ihex @@ -0,0 +1,73 @@ +:1000000001BCE302E303E304E305E306E3079344EF +:1000100056D4934E5651934E51D6934E4F54934EC1 +:10002000924F92A4930592F4931B929291E692368A +:100030009274924A928C928EC8D00B4202A0CA92BD +:100040000902C9100A0A0A81E3B8E3B0E3A8E3A0F1 +:10005000E398E390E100CFD70A12CC9508B20A18D2 +:10006000E10001EE0C084A12C818F09AC022F31CF5 +:100070004A13F314C8A0F214F21CEB13D3A26316B4 +:10008000489EF018A403F393C058F713519CE9203D +:10009000CFEF63F9922ED35F63FA922ED36763FB9F +:1000A000922ED36FE91A631648A7F020A406F394A2 +:1000B000C027F714F513519DF6136318C420CBEF36 +:1000C00063FC922ED37763FD922ED37F63FE922E34 +:1000D000D38763FF922ED38F6438922ED3976439DF +:1000E000922ED39FE100F53AF43BF7BFF2BCF23D0C +:1000F000E1008087908051D5022202324BD3F71164 +:100100000BDAE1000E0202400DB5E3024855E5129C +:10011000A401E81BE390F018A401E8BF8DB84BD10F +:100120004BD80BCB0BC2E100E302E30352D360597F +:10013000E6930D2252D4E6930D2AE398E390E10072 +:10014000025D0263E302C81202CAC85202C2826898 +:10015000E302C81402CAC89002C20AD0C9930ADADC +:10016000CCD20AE2631202DA0A980AA00AA8E39043 +:10017000E100E3020AD0C9930ADACCD20AE26312A0 +:1001800002DA0A980AA00AA84991E56AA404C812EA +:1001900002CAC8528289C81402CAC89002C2E39037 +:1001A000E1000860E1004853E897085AE100E302E3 +:1001B000E30354D36059E6930D52E398E390E100D2 +:1001C000029CE3025513931755139317E390E10034 +:1001D0007530E302E30355556059E6930DB2E39899 +:1001E000E390E10002AEE792E918EA9AE898E81095 +:1001F000E811E851D2DAD2F3E813D2FAE850D2EAA1 +:10020000E8D0E8D1D30A03094823E52CA003482409 +:10021000EA1C0308D2E3D303D313E10002CB059316 +:100220005793F09AAC0BE30792EAE29FE506E3B03E +:10023000A002EB1E82D7EA1EE23B859BE91EC89016 +:10024000859402DE05805793F0BAAC0692EAE2BFCD +:10025000E506A001EBBF8588E93EC8908581E93EAF +:10026000F0BAF339F03A6017F03AC090F0BAE10012 +:10027000003FE302E30358106059E6930DA25812C1 +:10028000E6930DAAE398E390E1000301E100030384 +:100290009B7D8B8BE302E30358566059E6930DBABE +:1002A000E398E390E100030F9311E100E3024A11A8 +:1002B0000B4291AFE390E100F291F091A3FEE100D7 +:1002C0006092C05FF013F013595BE213F0115A19FA +:1002D000E213E10000000327686176616E610006A9 +:1002E000032CE302E303E9385915595AF29ABC0B7F +:1002F000A40A591EF311F01AE2BB5915F011192A7C +:10030000E502A401EBBFE398E390E1000342192862 +:10031000E100E9306079E100E303E3076079934E9F +:10032000E3B8E398E100E91AF01FE233F091E292BA +:08033000E032F031E1000000B1 +:00000001FF + + Copyright 2001, STMicrolectronics, Inc. + Contact: steve.miller@st.com + + Description: + This file contains patch data for the CPiA2 (stv0672) VP4. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/linux/firmware/dabusb/bitstream.bin.ihex b/linux/firmware/dabusb/bitstream.bin.ihex new file mode 100644 index 000000000..5021a4b1e --- /dev/null +++ b/linux/firmware/dabusb/bitstream.bin.ihex @@ -0,0 +1,761 @@ +:1000000000090FF00FF00FF00FF000000161000D7C +:1000100064616275736274722E6E63640062000BB9 +:10002000733130786C76713130300063000B3139C8 +:1000300039392F30392F32340064000931303A34E5 +:10004000323A3436006500002EC0FF20175F9F5BF8 +:10005000FEFBBBB7BBBBFBBFAFEFFBDFB7FBFB7F61 +:10006000BFB7EFF2FFFBFEFFFFEFFFFEFFBFFFFF9B +:10007000FFFFAFFFFAFFFFFFC9FFFFFFDFFFFFFF3B +:10008000FFFFFFFFFFFFFFFFFFFFFFFBFFA3FFFBE4 +:10009000FEFFBFEFE3FEFFBFE3FEFFBF6FFBF6FF18 +:1000A000BFFF47FFFF9FEEF9FECF9FEFFBCF9BEE19 +:1000B000F8FEEF8FEEFBFE0BFFFFFFFFFFFFFFFFE2 +:1000C000FFFFBFFFFFFBFFFFBFFFFFFC17FFFFFFAF +:1000D000FFFFFF7FFFFFFF7FFFFFFBFFFF7FFFFFB4 +:1000E000FC3FFFFFFFFFFFFFFFFFFFFBFFFFFFFFE7 +:1000F000FFFFFFFFFFFE5FFFFFFDFFFFDBFFFDFFD9 +:1001000077FFFDFFFFDFFEFDFFFFF2FFFFFFFFFFB9 +:10011000FFFDFFFFFFFDFFFFFFFFFFFFFFFFFFE111 +:100120007FFFFFFFFFFFFFFFFFFFFFFFFF3FFFFF1F +:10013000FFFFFFFFE3FFFFFFFFFFFFFFFFFFFFBF2B +:10014000FFFEFFFFFFFFFFFFFF67FFFFFFFFFFFF58 +:100150007FFFFFFF7FFFFFFFFFFFDFFFFFFF2FFF9F +:10016000F3FDFF7FDEF7FDFF7FF77DFF7FDFF7BD4C +:10017000FF7FFF1FFFEFFBFEFFBFEFFBFEFFEFFB6D +:10018000FEFFBFEFFBFEFFFF3FFE7F9FE7F9FE7F15 +:100190009FE7FA7F9FE7F9FE7F9FE7FFFC7FBFBFE6 +:1001A000EFFBFEFFBFEFFBB7BFEFFBFEFFBFEFFBB9 +:1001B000FFE0FDF9FE7F9FE7F9FE7F9DF9FE7D9D43 +:1001C000E7F9FE7F9FEDEDFFFDFF7FDFF7FDFF7F8E +:1001D000DFFDFF7FDFF7FDFF7FDFFF9BFFEFFBFE14 +:1001E000FBBFEFBBFEFFAFBBBEFFBFEFFBFEFFFFE2 +:1001F000B7BFDBF6BDBF6BDBF6F9BF5BD6F9BF6FF0 +:10020000DBF6FDBFFF0EFFFFFFFF5FFFF7FFFF7F86 +:10021000F7BDFFFFFFFFFFFFFFDF9FFFFFFFFEFFB9 +:10022000FFEFFEFEFFFF77FFFBFBFFFFFFFFF83F47 +:10023000FFFDFFFFFFFDFFFFFFFFFFFFFFFFFFFFD2 +:10024000FFFFFFF47FFFFEFDBEFFDFFEFFFFEF7F3E +:10025000FFCFFFCFFFFFFFDFE6FFFF7FDFF7DD7F91 +:100260007FDFF7FF7FDFD7FDFF7FDFF7FFCDFFF2F7 +:10027000FFFF4F7FF4FFFFFFE7EFFFFFFFFFFFFFF1 +:10028000FFFFBBFFEFFFFEFFFFFFEFFFFFEFFFFBF7 +:10029000FFFFFFFFFFFFFF65EFFFFF7FFFFDEFFFAA +:1002A000FFFFFEFFFFFFFFFFFFFFFFFECFDFFEFFB1 +:1002B000FFFBFFFFFFFFF3FFFFFFFFFFFFFFFFFF5E +:1002C000FEDFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5F +:1002D000FFFFFFFFFFFEBFFFFFFFE37FFFFFFFFF0B +:1002E000FFFFEFEBFFFEBFFFEBFFFC7FFFFFFFEE2B +:1002F000FFFFFFFFFFFFDDFFD6FFFDBFFFFBFFFEA0 +:10030000FDFFFFFDEFFFFFFFFFFFFFDEFFFFFFFF32 +:10031000FFFFBFFFFDFF7FBFFF5FDFFFFFBF77FF77 +:10032000FFFF7FD7FFFFFFFFFFC3FFFFFFFFDFEFF1 +:10033000FFFFFEFBFFFFDFBFFFFFFFFFEDFFB7FF8C +:10034000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBD +:10035000FFFFFFAF7FFFFFFFFFFFFFFFFFFFFFFF7D +:10036000FFFFFFFFFFFFFFFFDFBFDFF3FDFBFF5BD3 +:10037000FDFFBFEFF7FFFF7DFFFFFFFFF83BFFBF74 +:100380006FFFFEFFBFFFEB7DFFEFFBFEFFFFFFFFF9 +:10039000FFF27FFCFF3FDFEDFEFFFFFFFFEF5FF7A8 +:1003A000B5FFEFFFFFFFE03F9F9EFFFFEFFFDFFF87 +:1003B000BF5FBFCFF3FFFFFFFFFFFF69AF33FDFF5D +:1003C000FBFFFFFFFFFCFF7FD9FFDFFFFFFFFFF514 +:1003D000A3DF6EDEFFFFBDFFFFFEFFFFFFFEE7FDB9 +:1003E000FFFFFFF9EFC6FEB7ADE5F9FFFFFFCFFF57 +:1003F000FFFFCDFB7FFFFFFFF9F60FDFECCF7FFFA5 +:10040000FB7FFFFFFFFDFFFEF9FD7FFF7FFFF95B35 +:10041000FF73DCFD7BDFFFFFFF7BFFFFF753D6FFA2 +:10042000FFFFFFD89FFEFFEF7FEEFFFFFFFBEDED2D +:10043000FDFFFEFFFFFB7FFFE27FFF6FD857F7FF57 +:10044000FFFFDFFFE8FFFFFDFFFFFC7FFFE4FFFB97 +:10045000EFFBFEDFB7EDFFFEDF7FFFFE7FB7FFFFA5 +:10046000FFFF89FFFFCFF3FE7FFFEFFFFE7E7FFBE5 +:10047000FFFFFFFFFFFFFFF1FFEB7AD5BF6FDBBE92 +:10048000FDB7D8F6E5BF6FFBFEF5BD7E06FFDFF7D3 +:10049000FBF6FF3FFFDBFFFF6FFBF7FFFFFFFBFEFE +:1004A000F7AFFFB7EDEFF7FEFFFFDFFFFEFFEFFF58 +:1004B000FFFFFFBFF7FC1FEEFBFEBDFF7F5FD7FD19 +:1004C000FB43FFFFFDFF5FFFF7FFF93FFFCFF3FDAA +:1004D000F77EEFA7F9FE8FA7E9F37E9FFBF8FFFFFA +:1004E0003FFD7F5FDFFDFFFF5FFFFD5FFFFF7FFDE4 +:1004F0007FFD9FFFE0FFFAF8BE6F9FE6F8BE3F9AD0 +:10050000F9BE6F9FE2F9FE6F9FF9FFF5FD7FCFDF28 +:10051000FDFD7FFFF5FFFFFFF7F5FD0FDBFFD3FFCD +:10052000EBFAFFFFBFFFFAFFFFCBFBFEFFFFEBFA8B +:10053000FEFFFFB7FFFFFFFFBFFFDFF5FFFFD7FFA6 +:10054000FFFFDFD7F5FF7FFE4FFFFDFF7F7FFFAD92 +:10055000EBFBFFADFFFFFFFFAFEBFBFFFC0DFFFF72 +:10056000DFD2FDFFFFFDF6FFFF7FFFFF1FFFFFFF55 +:10057000FFFB3F7DEB32FEBF2FEBFAAEBDE0FA7E14 +:10058000BFADEBFAFEBFF57FFFDEFEE3FBFFFFFF33 +:10059000DFEF4FDFFF7FDFFFF7FFFFF87FFFFFEFAA +:1005A000FBFFFFFFEFFFFFDFEDFBDFFFBFFFFFFF05 +:1005B00081FFFFFFFF3FFFFFFFFFFEDDFEEFFDFFBF +:1005C000FFFBFEF7FF93FDFB7EFFFE87E9FF7FB396 +:1005D0009FFEFEFFAFFDFE7E3FFE67FFFFF7FFFFC2 +:1005E000FCF7DFFDFF7FFFFF7F6DFFFFFEFFFF2FAB +:1005F000FFBFFFFFEEFFBEFFFFFEFFEFFFFFFEFFAF +:10060000EFFFFFFA5FFFFFFBFFFFEFFFFBFEFDFFCA +:10061000FEFFFBFFFFFF7FFFFEBFDFFFFBFFFFF7DC +:10062000FCFDFFFFFFFFFF7FFFFFFFFFFFF27FFFEC +:10063000FFFFFF7FFFFFFFFFF3FFFFFFEFFBFFFF6A +:10064000FFDFE2FFFFFBFFFFFFFFFFFFFBE7FFFD19 +:10065000FFFFFFBFFFFFFFEDEFFDFFFFDFD7F5FD62 +:100660007F5DFDFF7FDF97F4FD7B5FFFC9FFFBFE32 +:10067000FFBFFF5FFFFFF7FFEFFDFFEFFFFFFFFF94 +:10068000FFF7FFD7FD7D7FFFFFFFFFEFDFF7FDFFE8 +:10069000BBFFFF7FFFFEE3FFF9FE7FBFEFFBFEFF27 +:1006A000BFF9FEFF9FEFF9FEFFBFF3DAFF37CDF38F +:1006B0007CDF37CDF37F37CDF37CDF37CCF37F5A48 +:1006C000BDF6FDBF6FDBF6FDBF6FDEFDBF6FDBF676 +:1006D000FDBF6FFEF16FEB7ADEB7ADEB7ADEB7AF41 +:1006E0007ADEB7ADEB7ADEB7FF7EFFFECDB36CDB13 +:1006F00036CDB36CDECDB36CDB36CDB36CDFC9BFAA +:10070000F7BDEF7A9EA7A9EA7AB7BDEA7BDEA7BD5F +:10071000CA728D91FFEFFBFEFFBFEFFBFEF7EFFB11 +:10072000FEFFBFEFFBFEFFFE87FFF6FDBF6FDBF6B0 +:10073000FDBF6FF6FDBF6FDBF6FDBF6FFE4FFFBF66 +:10074000EFBBEEFBBEEFBBEFBEEFBBEEFBBEEFBB06 +:10075000EFFC5FFFFFFF3FCFF3FCFF3FCFFCFF3F0E +:10076000CFF3FCFF3FCFFD9FFEBFAFEBFAFEBFAF65 +:10077000EBFEBFAFEBFAFEBFAFEBFFE16FFDFF7F1C +:10078000DFF7FDFF7FDFFDFF7FDFF7FDFF7FDFFF8F +:100790007ABFFBFEDFB7EDFB7EDFB7FB7EDFB7ED99 +:1007A000FB7EDFB7FFC9FFFFBFEFFBFEFFBFEFFB25 +:1007B000FFBFEFFBFEFFBFEEFBFEBBFFFEFFBFEF89 +:1007C000FBFEFFBFEFFEFFBFEFFBFEFF3FCFFFE7EC +:1007D000FEFFF5FD775DD735DD77D7F5CD7B5DD7AE +:1007E000F5DD77FE27FFFF8BE2F8BE2F8BE2F9AF36 +:1007F0008BE2F8BE2F8BE2F9FE1FFF5FD7F5FD7F7E +:100800005FD7F5FF5FD7F5FD7F5FD7F5FFFA3FFEB6 +:10081000BFAFEBFAFEBFAFEBECBFAFEBFAFEBFAF83 +:10082000EBFFFE7FFD7FFFFFFFFFFFFFFFFFFFFFEF +:10083000FFFFFFFFFFFFFFE6FFFADFF7FDFF7FDFB0 +:10084000F7FCFFDFF7FDFF7FDFF7FDFFF5FFFFFFA1 +:10085000FFFFFFFFFFFFFBFFFFFFFFFFFFFFFFFFAC +:10086000FF02FFFEBFABEBFABEBF23EBDE1FAFEA1A +:10087000FAFEAFAFEBFD97FFF3FC7B1FCFF1FC7FE0 +:100880001FF1FC771FCDF1FCFF1FFE87FFAFEFFAD2 +:10089000FEFFAFEFFAFDBF2BFB7EBFBFEBFBFBFB09 +:1008A000DFFFFBF7FFFF7FF7F7FFFDDFFEFCDFFF5A +:1008B000DFFFFDFFDABFFFBBEFFBF9FFBEEFFBFB86 +:1008C000BFEFFBFEFFBFEFFBFFF77FFDD7FFFF7F13 +:1008D000FFFFFFFEF7FFFEFFF7FFFF7FFFFFECFFCD +:1008E000FFFEDFBFFFFBFEFFBB68AE1FAEFBFBFFE3 +:1008F000FFBFFFD5FF7FFFFFF7FEFEFFBFEF9FFDAE +:100900007FFFCBFFFFDFFFFFBBF7BFFFFFFFFFDF77 +:10091000FFBFFBFFFFFFDE3FFFFFFFFFFFA7FFFF64 +:10092000FFFFEFFF7FFBFDFB7FFFFFFFFFCFF37CB0 +:10093000FF7F8D7FFFFFFFFFFBFFF7FBFEFDFFFF4C +:10094000FFFFF7FDFF7FFD1FFDFFFFFFFFBFDFFF85 +:10095000FFFE5CFF6DFF7FABE7F1FFFD9FFFFFAD8B +:10096000EB7A3F1FFFFFFEBFAFF3DEF5FF8FFBDF2C +:10097000E67FFFDFF3FDFF7EFFFFFFFFFFFDF7F3E5 +:100980007FDFF7EFFFF63F9FDFFFFFEEFFFFEFFB9D +:10099000FFFFF9FBFE4FBFEFBBFF69AFAFFCFF3FAF +:1009A000DDFFFCBF8FFFFDF3BFED9EFCBF6FF5D3F6 +:1009B000DFFFDBD6F5EFFDFEFFB9FF1FD2A9AFFFCA +:1009C000DBF7BFEF46FFFFADEB7ADFEFF7FF7FF717 +:1009D0009FEDFF7FFFADEB7FF56FFFFDFBD6F4F7DB +:1009E000FBF97E7FFF5FC2FEBFFDFB33DFF95BFFDC +:1009F000FFDD677DCFEFDBECFF77DDF7FDFFFFDE8F +:100A0000A7BFD49FFFFFBFEFFEFFDFEFBBFFFFEFEE +:100A1000EBFAFFEFBDFBFFE27FFFDFDFF7FDBFBBC0 +:100A200073F7FD7FDFDEF7BFEADBF6FFD6FFFF6679 +:100A3000FFBEFFBF6BD9F6DFFFFB7E7FB77EFFFEF9 +:100A4000FFCDFFFE7FFFFCFD3FFBFBF7FFFFFBF64B +:100A50007DFE7FFFFCFFB9FFF9FAFEBFAF5BD6ED6D +:100A6000AD7BF6F9BFEFF8FAFEBFFEE6FFFFF7FD3C +:100A7000FF7FBFEFF3FFFF6FF7FEFFFFF7FDFEF70E +:100A8000EFFFFBEFFB7EDEFEFFBFFFFEFFFFFBFF86 +:100A9000FFEFFB6FFC1FFEE7FFFFFFEFFFD3B4BBD1 +:100AA000FFFFFDBF6FE3FEFFBFFCBFF7CFF7FDFF0A +:100AB0002FDFABEAFFDFE7EA9AAFEFFBFEFFF53F80 +:100AC000FD7EFFD7F5FBFFFDF7FF7FFEF7FDFFD7AC +:100AD000FFD77FEE7FFA79FE2F8BE6F9FE3F9EF976 +:100AE000BE2F0BE7F9FE2F9FFDFFFE7D7F5FD7FF37 +:100AF000FF7FFFFDFF7F5F97FFFD7F5FFFE3FFFF4E +:100B0000FAFEBFAFFBFBFFFFCFEBFEBFAFFFFAFE6E +:100B1000BFFF87FFFFF5FFFFFFFFFDFF7FFFFFFF29 +:100B2000FBFFFFF5FFFFFE0FFFFDEBFFFFF7FFEF02 +:100B30007BDFFEFFFFDFF7FDEB7FDFFF5FFFFFFFE8 +:100B4000FFFDBFFF7EFABFC7DBF7BD3FFBFFF6FF30 +:100B5000FAAFFFEBFAFE3F2FEAFA3EADC9BAF6ADA7 +:100B6000AFEBFAF6BFFE7FFFFFFDFFF17F3FCFF156 +:100B7000EFFF7FFFBCDFDFF7DDFFE07FFFFFFEFF62 +:100B8000FAECBB7F5FFFFBECFFEFB7FFF7FFFFB5B2 +:100B9000FFFF7FFFFFFFEEDF5FDFDEFFAEE777FFE8 +:100BA000FFDFF7FFE3FFFABBFEFFAFFDFBFEBFABCE +:100BB000F9FEFFBF7FBFFEBDFED7FF9FFDFFBEEF6B +:100BC000FFEEFDBB5BEFFF7FEFFFEFFF7FFF4FFF10 +:100BD000EFFBBCFCFFFFFFFEFEFDFAFEFBFFFDF39B +:100BE000FBFFF85FFFFFD7F5FDDFEFFFF3DC5FCE24 +:100BF000F5BDFFFFD7FFFFF93FFFDFF7FFFEFFFD6A +:100C0000FFFBFFF7B97DFEDFFFFFFFFFF97FFFFE70 +:100C1000FFFF7FFFFEFFFFF7F6FFBFF1F8FFFFFFCB +:100C2000FFE0FFFFFFFFF9FFFFFFFFFFEFEFFFFF19 +:100C30009BFB7FFFFFFFC1FFDFFF3F5FD7BFEFBB26 +:100C4000DEEEFF7FDFFFFEF57FDFFF99FFFFFAFF9C +:100C5000BFFDEB7AFFB7FEFEFFFFEFFFFFFDBFFF1B +:100C600097FFFDF7FF7FF7FFFFFD5FFEF3F9DFDF83 +:100C7000FFFFFCFFFF83FFFFFEFF9EECFBEEFF9FED +:100C8000BFEFFFFEED7BFFFFFFF15AFFFFFDFF7C93 +:100C9000693BDFFF7F1FDFFFFDBAFFFFFBFF5BBD8F +:100CA000FFFFFFFFD7B6EDE9FFD6BD6F5FFBFFEF9C +:100CB000FF5FFEF66FFFFFFFFFF7EB7ADFFF9F7F1F +:100CC0007FFFB7FFFFFEDFFF6CFFFBFFBB6FEBFE9D +:100CD000CCF7A5FA5CF575BBB7DFFE6F5FC5BFFD4E +:100CE0007BFEFF95E729CF4FF591EE6BDFEFFD54CB +:100CF000F5BDB1FFEFEEFBBEBFAFFEDEBD6FDAF2BA +:100D0000FFAFBEFFFFFD7EA7FFF7FFBFEF7BF6FD46 +:100D1000BD4AF28585BF5BFEB5FDFAFF4FFFFEDFE2 +:100D2000FFEDFFBFFFBF7FFEFFB76DFFF7BFBFEF58 +:100D3000FD1FFFFE7DFF67FFFFFF3F7FFEBFFFE759 +:100D4000DFE7FFEF6BFC1FFFBFEFFBFEDEBFAFFA7D +:100D5000FFB6EFF9FEFF8FEFDBEFAB6FFBFEFFFFA0 +:100D6000EFFDFF7FFFFFDEFFFFEFFFFFFF3FFF6CA9 +:100D7000FFBFFBFFFEFFFBFEDFFFFFEFFFFFBFFF3D +:100D8000FFFEFBFFD57FFFFFEFFBFFFFBFEF43B58C +:100D9000FD6FCFD6BE3F7FDBFEC3FFFDFFAFEBFB9A +:100DA000FCFF3EEFE8FABDCDAAFEFE7DCFFFB7FF08 +:100DB000F7FFFFFFFDFF75CD52D7FDFBF7DDFBEF22 +:100DC000EBFFFF4FFFBF9FE7F9FC7F8BC3F9AF8FAE +:100DD000E7E9BE7F9FE6F9FC5FFFFFF7FDFF7A5F63 +:100DE000D7EDFFFFD7FFDD7FE7FFFCFFFC3FFFFFF5 +:100DF000FFFBFFFEBFAFFFFDFFEFFFEBFFFFFFFFBE +:100E0000FFF77FFF7FDFFFFDFD7FFEF7FD7FDFFF49 +:100E1000FDFFFFDFFBFFEEFFFBFFF7FDFF7ADFF5D6 +:100E2000FDFADFF7FCFF7FDFBFEDFFC9FFDFFFBF8C +:100E30002FFBFFBCADFFF7FFFFEFD3FF7DBF6FFFC1 +:100E4000FAFFFEBFAEEAFABEADA5EBCEBFA7EB5AE6 +:100E5000DEBDAF6BFD57FFFFF47F1F7FFDFF7F36C9 +:100E6000F0DF79FFFFFFF7FDBFFF87FFFBF3FCFF1C +:100E7000FFFFFF7EFFBFDFFFFFFFFFFFFDBFF89F0C +:100E8000FFFFFFFFBFFFFFFDF7FCBDFFFEFFFFFF02 +:100E9000FFFFFBF9BFFFFFEBE2FEFFBFEFA9BA2F99 +:100EA000EBF9FE77DFF7FFFFF97FFFFF7FEFD7FF5B +:100EB000FDFFFBF5FFBF6FDFFFFFFDFFFFF0FFFF53 +:100EC000FF3FCFFFBAEE9BBFEED7FECDEFFFDFBFF8 +:100ED000FFFFC5FFFFFD7F4FFDF6D9FF4FD6FDBFDA +:100EE0006EFFFFF47FFF7F8BFFFFFFFFF7FFF9FE31 +:100EF00037FFD9FBF5AFFDFFFFFBFFFF07FFFFFF4C +:100F0000FBF7FFFDFF7CFA7E4FFCDF1DC7FFFFFFF5 +:100F1000FFAEFFFFFFFFFDFBFFFFFEFEFCFF7F7F3D +:100F2000BFEFFEFFFFFF5FFDFFFFFFFD6F5AD77BA7 +:100F3000BE5FFE39FFF7FFF7FDFEAA1FFFFFFFFFB1 +:100F4000FEFEABAFFDFEBFFFF7FF7FFE8FE3FBEEC4 +:100F50007FFFFFFFFFEBFBFFFDBFEFDFFFFFFFFFAB +:100F6000FFFFFFFBE43FFFDFFFFFFFFFF3EFBBFBF4 +:100F7000BFEFBBFFD7BFFFFFFF29AFF7FFFFFBFFAF +:100F8000FBE6FF0FFB3FDF0FFFAFFFFFFFF5C3DF08 +:100F90005FFFFFFFFE6BCABEBCFF9FF2BFFFFEFA02 +:100FA000FFFFEF16FFFFFFFFFFFCDF97FD79FF3725 +:100FB000E77FFFFFB5FFFFF62FFFFDFBFEFFFFFD05 +:100FC0005F575FFFDB52DFFFFDBFFFFFFCDBFF7BF7 +:100FD000B5FD7FFF719C6EFFF635A59BFFFFFDFF02 +:100FE000FFDB9E7FFEEFFBFFFFBDEFFFDEB7F94BA0 +:100FF000FFF5EFFFFFFFE87EFFEADFF7FFFD695B2C +:10100000FC9FEF78D6FFEBEFFFFFFFE8FFFFEDFF60 +:10101000FFFFFFE3F9F6BFFFFFFEDFFF7FFFFFFFEC +:10102000D1FFFFE7FFFFFFFFE7F9FFBF7FD9FFFD1C +:10103000FE7FFFFEFFF9FFFBD6DFBFEF5BD6FFBFF2 +:10104000FBF6FFBFEFF8F6DDBEFE16FFBFEFFFFEBB +:10105000FFBFEFFFFFFF6FFBFFFFFF6FF3FFF7EF38 +:10106000FBFFBFFFEFFEFFBFFFFFFFBEBFFFEFFFB6 +:101070007FEFFFFD17FB7BFFFFFD7FDBF6F47FFAC1 +:10108000FEF5BFEBE3F7FFFFE9BFFFAFF7FDF37E30 +:101090008FA3EAFFCBF3EEFFBFEFF7F9FFFE7FFF71 +:1010A000FFFFFFF5FBF6FFF52FFEFBD7BFFFBEDF0F +:1010B0009FFFF0FFFFF9FE7F8FA3F8FE6F9FF9F609 +:1010C0002F9FE7F9FE2F9FE1FFFFFF7FDFF7F5FD81 +:1010D0007F7FF5FF9F5FFBFEFF7FFFFFCBFFFFFBE7 +:1010E000FEFFBFAFFBFEFFDFFEFEBFF7FFFFFFFF10 +:1010F000FFC7FFFFFDFF7FDDF7FDFFFFD7FFFD7F90 +:10110000FFFBFDFFFFFEEF7FFDEFFBFEFBFDFF7F23 +:10111000DFFDFF7ADFF7FDFFFFFFFF1FFFFFD3F7C4 +:10112000FFFF6FDBFFFFEFCBF4FFFFFFFFFFFFFED3 +:1011300029FFE8DA769FAF6ADAFE35EBDAD6BFAB85 +:10114000EB7ADEBFD77FFFFEFFBFEFFDDF77BFFD8E +:1011500037EFFFEFFF3FFFFFFFFE7FFFFFFFF77E51 +:10116000DFFFFFFFFAB77FFFFFFEFFFFFFFF89FFF3 +:10117000FFFFFFFFFFFFFFFFFF9FFBFFFFFFE7FFFB +:10118000FFFFFFAAFFABFBFAEFBFFFDFFA7BB9FE61 +:10119000FEFFFDFFF7FE3FFFB7FFF7EEFF7FEFFF1C +:1011A000FF7FFF1FFBFFBFFBFEFFBDFFFF2FFFBF4A +:1011B000FF7FDFFAFFFFFCEEF5F3BEFB0FEFF3BEA0 +:1011C000EFFC5FFF5AFFF7DFFFFFFED5FC5FFBF28E +:1011D000FFFF2FBBF3FFFFBFFFEFFFEFFFFFFFFF9F +:1011E000BFFFFFFD7BFFDFB9FFFBFFD87FFFFFFFE6 +:1011F000FBFFFC7F1FBFE0DFF7EFFFFD7FFEDFFFA0 +:10120000E0FFFFFDEFFBFFFEF7DFFFEB5FFFF7FF08 +:10121000FFFFFFBFFFFDFFFDFFFFFFF7FDFF3BDC13 +:10122000FD6D7B5F57F5FD7F5FFFB1FFEBFFFFFFBC +:10123000FBFBFEFFBFFBBEFFBFEFFBFEFFAFFEF7FA +:10124000DFDFFFFFFF7FCFF3F8FFD7FBFF5FBFF7C5 +:10125000FBFF7FFE23FFFFFE7FF3FFFBFEFFFFF39D +:10126000FFFFF5F9FF3FFFFFF09AFFBE7FFFFCF99C +:10127000FFFDAFEBFEBFFFCFF3FE7FFFFF5BBDFFC8 +:10128000BCEBFFD7D4AFAFFDFFCFF7FDFF7FDFF79C +:10129000FDFEFF6FFFFBFFFFFFFD7F5EFDBFDBF687 +:1012A000FDBF6FFBEEFDFF7AFFFAFBFF3FFBB75F71 +:1012B000D6F71F71DC771DC731DC77DFF9BFF55B2F +:1012C000F4D79DAEFFBFFDBFDBF6FDBF6FDBF6FEC3 +:1012D0003D81FFEBFEFEFEFFEB7ADF7D777DF5794A +:1012E000DF57DDF57D7EE6FFD63FBF7FFFD4F53FBC +:1012F000BFFBBEEFB3EEFB9EEFBBFE8BFFFEDFB787 +:10130000EDFFF7FDFEFFEFBBEEFFBEEFBBEEEBFC2C +:101310001FFFFFFDFFE7FFF7FDFFEFFEFFBFEFFB46 +:10132000FEFFBFEBFA1FFFB7EF5BFEFFAFEBDDE7A2 +:10133000DE779DE779DE779DBFE66FFFFEFFBFEFAB +:10134000FBFEFDBF6FF6FDBF6FDBF6FDBFFF7EFF4F +:10135000FFFBFEFEFFEFFBFDEF7EF7BDEF7BDEF751 +:10136000BDEFFFD5FFBFFFEFFEFFFC3F0FE7FE7FA6 +:101370009FE7F9FE7F9FE7FEF3FFFEDFADDF67EE3D +:10138000FBBFEFFEFFBFEFFBFEFFBFEFFF23FFFF43 +:10139000FFFF7FFFF3BCDBFEFBFFFBBEF7FBFF7F26 +:1013A000DFFFCFFBFF9FE3F9BE3F8FE779FF9DE7AC +:1013B000F9FE7F9FE7F9FE5FFFCFF7FFFFFFDFF743 +:1013C000FE7FE7F9FE7FFFFFFBFEFFFFBFFFBFBF12 +:1013D000FFFEFFBFEFFFFDFFFFFFFFFFFFF7FDFF7A +:1013E000FF3FFFBFFFF7FFFF7FDFFFFFFFFFFFFFB5 +:1013F000FFFFFFFFFFE8EFFF5FF7BFF9FEDFB7FD7D +:10140000FFDFF7FDFF7FDFF7FDFFDDFFF2FFBFFF2F +:10141000FFBFFFFF2FF2FFBF2F7BD2F7BF2FFFBB16 +:10142000FFEE8FAFEBFAFE3FA769CE8FA4EAFAEE8C +:10143000B7AEEBFDC7FFF7F7FFFFFFFFFF7F3EF300 +:1014400074FF3F4FFFE7FF3FFEA7FFFFDFF7B7FF48 +:10145000F7FFBAEF37EBFBFEBFFBFEF3FFF9DFFF51 +:10146000BFFFFFFFBFFFFFFFFDDFFFFDFFFFFBFE35 +:10147000FDFFFBBFFE3FEDFFDFBE3DA7FBFA3FE6F2 +:10148000E1FEFE3FEFE3DFF57FFEFF7EFFFFFFFFA4 +:10149000EF6FF6FF7DEFD7DEFF7DEFFFF2FFFFFF7F +:1014A000FFFFFF7BDEFBE6EEEF376EF37EEB37EF01 +:1014B000FFC1FFFEFFF7EFFFFFFFBF3FD2DFBF2FF0 +:1014C0007BE2FFFE3BBDDBFFFEFFFFFFFFFFEFFE0A +:1014D000FFFBFFFFBFFFFBDFFFBFFFB7FFFFBFEF5C +:1014E000FFFFFFFFFFFF0FFF7FFF1FEFF1FDFFF685 +:1014F000AFFFFFFFFFFFEFFFFFFFFE9FFFFFFF7745 +:10150000EFF7FBFFFE5FFFFFBFCFFBF7DDF7F5FF58 +:101510005FD5F5FD7F5FD7F5FFFB0FFFFFA9EA7AE7 +:10152000FFAF8FFEDFAFEFFBFEFFBFEFFBDFE55F3F +:10153000FFFFFFFFFFBD57FFFF6F77BFF7FBFF7F89 +:10154000BFF7FFFCBFFF9FFFFFEFFFFEFFFFFF1F87 +:10155000CFFFFCFFFFFFFFFB65AFF37CFF3FDFFF2B +:10156000FDE9FE7FE7FFFE7FFFFFFFFFFDE3DFFBFF +:10157000DBF6FDEF5BFBFFDFFCFF3FDFF3FDFF7FF3 +:10158000DFEF66FFDFADEB7ADEF7F7E7D9FD9F67A8 +:10159000D9F67D9FE7DFF547FD655BD6F4FEFFEFEB +:1015A000FF6DF6DDB76DDB76DCB77DFA9BF66D9DE2 +:1015B0006759DFF7DDFFEBFEBFAFEBFAFEBFAFE32E +:1015C000D19FFFBDBFEFFEF7BFBFF7D77FDDF79D10 +:1015D000DF7FDFF7FFE07FFDC1DFF7FDC77F7FFB28 +:1015E000FFBBECFB3EFFBFECFBFFD87FBF6CFFBE39 +:1015F000FFBFEDFFEFFEFBBFEFFBFEFFBFEEFFC542 +:10160000FFAF6FFFFCFD3FE7FFFEFFEFFBFEFFBFFD +:10161000EFFBFEBF89FEFABAFEBFAFFBF6F5D97D40 +:101620009765D9745D9765D3FED6FFBFF7FDFF7F41 +:10163000BFCFFBFEFFEFFBFEFFBFEFFBFFF68FFB15 +:10164000FFEFFB7EDBFEFFBEEFEEFBBEEFBBEEFB74 +:10165000BEFFFFDFFF43FFFFFBEF5FB7FE7FE7F952 +:10166000FE7F9FE7F9FE7FF9BFFEAF77FDFF2FAF4B +:10167000A7FEFFEFFBFEFFBFEFFBFEFFF17FEFDFFB +:10168000FF97F5EFFFDFFFFFBFFFBFFFFFFEFFFF8D +:10169000FFE0FFFFF9FE2F8BE3F8BE779FF9DA77C3 +:1016A0009DE779DE779FDDFFFDFD7F5FD7FDFF7F43 +:1016B000E7FE7F97E7FBFEFFBFEFFFABFFEFFAFE12 +:1016C000BFAFFFFAFFFFDFFFFBFFF7FDFF7FDFFF8D +:1016D00067FFF7F5FFFFFFDFFDFFFFFFFFFFFFFFE6 +:1016E000FFFFFFFFFFEFFFBDEBFFFFF7ADEBFFDFFE +:1016F000FDFF3FDFF7FDFF7FDFFF5FFFF7FFFFFD30 +:10170000BFFFCBF4FF7FD3F7FD3F7FD3F7FFFC3F55 +:10171000FFEAFABEAFABEBBAF4956B52D4AD2F4AE9 +:10172000D2F6BFD27FF73FFFFFF37FFFFFF7FFBA8D +:10173000DFFBFDFFBFFFFBFFF87FEAFFFEFEDFFFE1 +:10174000F7FF7FBBFFFFBFDFFBFFFFBFFFB17FFFE7 +:10175000FBEFFFFFFFFFFFBFCFFEFFFFEFFFF7FF36 +:10176000FFFFF1FF69BEFABFAFE2FFFEFDAFF3FE80 +:10177000FFBFEFFBFCFFFF07FD95DBDF7FDFAFFF68 +:10178000F7AF36FEBF65EBF6FE9F6FFE07FFCFFF9C +:10179000F8FEFFCFFFF6FAE7FBFEFFBBEDF9FFFF18 +:1017A000FF5FFFFFFF75FFEF7EFDE0E85ED3E5F929 +:1017B0003E5FD7F7FFFA2FFBFFFFFFFFFEFFFF7F24 +:1017C0007FD7F57D5F57D5F5EFFFF37FFC7FFFC730 +:1017D000F1FFFF1FCFB0FF3FCFF3FCFF3FCEFFE491 +:1017E000FFDF7FFEF7BBFFFFDFEFEEFFBFEFFBFE8C +:1017F000BFBFEFFFD1FFFFFFFDFBFFFDFFFB9FE939 +:10180000FE7F9FE7F9FE7FBFFFB3FFFFF7FFFFAF4C +:10181000F7FFB63FEBFAFEBFAFEBFAFEBFFEA7FF46 +:10182000FFFFFFFFF7FFFFFFFE9FF7F9FF7F9FE737 +:10183000FFFFFEAF6FFFFFFF9FFFDFFF7D5FDDFF5D +:10184000FBBFE7BBFFFBDF6D5F7EFFFFFFFFFFFF1F +:10185000EBF7FFE7EFF7FFFF7FFFF7FFFC8FFFEFEF +:10186000FDFEFFBEF4F27DD7CFFF3FFFFFFFFFFF7E +:10187000FFCF6BFFBF3FFBF2FC7FEBFF9FFAFFFF49 +:101880003FFFF3FFFFFD70F7FFFFBFFFFBD7FEF544 +:1018900077FF15DD77FDFF7FDFF7FBCDBFFFFDFF96 +:1018A000FFDF37CDF9ECFEEFBBF4FB3F4FB3FFFD9D +:1018B000CBFFE97E549FE54BB7FFDD7DC771DD7738 +:1018C0005DD775CD7FD6FFD3F6F93F6D95AF7FFE1F +:1018D000FFEFFBFEFFBFEFFBFEF6C7FFAD7BCAFFCE +:1018E000BFBFEFFDE3DFB7EDFB7EDF37EDE3FBDFEF +:1018F000FF525C15FDCF7FDFFEEFEFFBFEFFBFEC7D +:101900007BFEFFFE3E7FDAF7FDFF7FFFFFFBEFBBB5 +:101910006FFBFEFFBFEFFBFFF77DFFD8FFFDBF7F33 +:10192000FBFFFF9FFBFE7F9FE7F9FE7F9FEA7FF6AD +:10193000BFBD6A5AF6E5BF775F6DDD775DD775DDB0 +:1019400077FFA5BFCFFBFFFFBFCFFBFDFFBFF3FEC0 +:10195000FFBFEFFBFEFFFDABFFBFBFFFFBFF7FEF56 +:10196000FFBEFBEEFBBEEFBBEEFBBFFFB5FFD0BC87 +:10197000FD2F4BF7FFFF9FF9FE7F9FE7F9FE7F9F4B +:10198000FA8FFDABFADABFAFB3FDFFBFFBFEFFBFBF +:10199000EFFBFEF7BFFF9FFF77F7BDFD77DFFF7E11 +:1019A000DFEDBBFEFFBEEFFBFEFFFA3FFFBE6F8F1A +:1019B000E6F9FE7F9FC7FE7F9FE7F9FE7F9FE7FB6B +:1019C0007FFF7FCFFFFDFFFFDFFBAFBFEFFFFEFF1E +:1019D0009FEFFBFFFCFFFBFEFFFFFFFFFEFFFFF79C +:1019E000FFFFFFFFFFFFFFFFFFF5FFFFFF3FDFF7F9 +:1019F000FFFF7FEFFEFFBFFFFBFFFFBFEFFFB37FE8 +:101A0000FF7B5EF7FDFF7B7FF7FF7FDFF7FDFF7F4B +:101A1000DFF7FF17FFFFFF7FFFFFDDF6FCBFCBF215 +:101A2000BCBF2FCBF2FCBFFE8FFFFA7EBFA7EBDA65 +:101A3000FCBFAF7AFEBFAFEAFAFEBFAFF4DFFEFF36 +:101A4000F33C7F3EFFCFF8BF8FE3F8FE3F8FE7E820 +:101A5000FFFC9FFFFFCFEBB3E7FB7BF3FEFFCFDB8A +:101A6000FBFBBF6F6FDFEC7FFFFFF7FDFDFFFFFFAD +:101A7000FFB2BFFFDEFDBDEFFBF6DFEAE7DBFEBB3B +:101A8000FFEBFBBF9F8FE8FE3F8FA3F8FE3F8FFF6A +:101A9000F87EFDFD7FFFFBCDFFFDFF5FEFFDFFFF4C +:101AA000DFF7FDFFBE90FFFFEEFF3FBFF3BBFEB7CA +:101AB000ABFAFEAFADEAFADEABFF63FFFEF2FFB3B7 +:101AC000FFDFEE7DFF03F1F43F1FC3F1EC7FFE6FFC +:101AD000FFFBFBFF9FFFBFFF7B5FFDFFDFF7FDFD10 +:101AE0007F7FDFFECFFBFFFFAFFBFF1FEFA5FDBF3B +:101AF000DFFB7DFFBFDFFBFFFD3BFFFFFFFFFFFDC8 +:101B0000AFF3FFFB7FBFD7FBBF7FBBF7FFF87FFFC4 +:101B1000FA5FD7FFDF7FEFFFFF7FDBF7FDFF7FDFA0 +:101B2000B7FBECFFFFF7BFEFFDFCFBFFEFF0FE3F65 +:101B30008FE3F8FE3F8FEF8DFFFFEF7FBFFFFBFFCF +:101B4000DBBFFFFFFFFFFFFFFFFFFFEFD8FF2E7F91 +:101B5000BEEFFE6EFFBFF9FFFFF3FFFFFFFFFFFFCA +:101B6000FC66BE47F37FDFFE879FFFFFFFFFE7FFB7 +:101B7000FFFFFFFFFFD66F7CFB4FD2FFFD2BFEFF69 +:101B8000FFFD5FD7D5F57DFFFFFFBF9BFFFFDFB7F1 +:101B9000FFFFDFFF3FCFFE7FBFEFFBFCFF3FFFD923 +:101BA000BFFE97EC8FB7FE9B7DFDB7DD771DC7713C +:101BB000DD775DD7F36FFD3F73DDAFFD7AFFFFAFDC +:101BC000FEFDBFEFFBFEFFBFEF667FFFFFBFBFFF66 +:101BD000FBFFF7DFFDFB7DDFB7CDF37C5F3F913F80 +:101BE000FF3DEF7BFFFCFFCAEFFEFFBDEFFB1EE7F3 +:101BF000BBEC7FB3FFFD9FFFFFFEFFFF7FBFFBFE40 +:101C0000FFBFEFFBEEFBBFDF67FFFFBFEFDBFFBCFC +:101C1000FE7FFBFF9FEFF9FE7F9FE7F9FE87FFEE58 +:101C2000FBBEE5BFEFF9D765F7DDE77DDF775DD771 +:101C30007FF89BFEFFBFEFFBFFFFBFEFFBFF7FCFF8 +:101C4000F3FCFFBFEFFFDB3FEFFBFEFFDFFFFEFB21 +:101C5000BBEFBFEFBBEEFBBEEFBBFFFC7FFD3B5B13 +:101C6000D6E5FD4FC3FBFFBFEFFBFEFFBFEFFBFF62 +:101C7000B4FFFABC8FB2E9D22ECFFBFFBFEFFBFE61 +:101C8000FFBFEFFBFFECFFFDFD7FDFF7E4DF5FFF52 +:101C9000FFFBFFFFFFFFFFFFFFFFC3FFEFE6F8FEC5 +:101CA0003F8B83F9FE7FE7F9FE7F9FE7F9FE7F1701 +:101CB000FDFFFFFF7F5FF72CFFFFFFFE7FFFE7F9D0 +:101CC000FE7F9FFE2FFFFFEFFFFEBFEFADFFFF7F09 +:101CD000FFFFFFFFFFFFFFFFFEDFFFDFFFFDFD7FD9 +:101CE000DFF7FFFFFFFFFFFFFFFFFFFFFFFA3FFEF2 +:101CF000F7FDEF7AFFB1BDFF7FF7FDFF7FDFF7FD57 +:101D0000FF7FF327FFDFFFDDFFFC9BFFCBFCBF2F37 +:101D1000CBF2FCBF2FC9FFDEFFDFAFEBDAFEBBAFBC +:101D2000EBF8F7AFE8FAFEBFAFEBF2FFFDFFFFEF16 +:101D3000BDD7BFFFFFDE8FB8DE378DA378DA3F8FC8 +:101D4000FFA1FFFFFBFBFFFFFFFFA7BDFB76FDBF72 +:101D5000EFDBFEBBBFFE277FFFFEFEFDF5FFEFF5CD +:101D6000DF1FE7FDFF7FDFF7FDFFFFCDFDAEFFFAD1 +:101D70003E3FABFDF87E8FE3F8FE3E8FE3F8FFFEBB +:101D80001FEFDFBFFEDEDFD9FFDFBCFFFF7FFFEF0E +:101D9000FD7FDFF7F93FFEFFFF6FFEDEBFF7EDEAE5 +:101DA000FD8F83F8EA3F8FEFFFF47FFFEFEF7BF3C8 +:101DB000F15FFFFFF13B7FDFF7FDFFFFFFFFE0FF7C +:101DC000FFFFF7FF6FFF7FFFFFF7DEF7BFEFFBF7C8 +:101DD000FDFFFFF5FAFFFFFBE7FFF3F87FF3DFFFFF +:101DE000FFFFFFFFFFFF1FEFBBFFFFFFFFFFFFFD39 +:101DF000FF7FFF9FFFFFFFFFFFFFFFCFFF37FFFFCB +:101E00007FDF775DE7FCFFBFF7F5FBFFFFD7F5FB53 +:101E1000FFFF45FD7FEAFDBEBFDFF7FFFFDBFBFEF7 +:101E2000FFBFEFFFFFFFFB5F7FFFFEFFFFFFFFFF37 +:101E3000FFFEFFEFFDFF7FDFFFEFFBF80FF3FFF982 +:101E40002EFBFEFCF3EFFFFFBFFFFBE7FFFE7EFF75 +:101E5000C06BCFFF34DFF1FDFFEFFFFFFFDFF7FDCA +:101E6000CF7F9CFDFD6CF7FFF6FDEB2B9FFFFCFE8B +:101E70007EFFFFFFFFD7F3F7FFFBE1BFFFEB7ADE4B +:101E8000D7FBFFF9FEFFFFF3DE7FFDE77FFFFDBB22 +:101E9000FFFF7ECCF6AF5F7FFEF47DF7FDBB6EDB10 +:101EA000B7FFF7DF66FFFFF73DCFDEBDFFFFDEDBED +:101EB0008DF77EDFB7EF7FFFF687FFFFEFFEDEBF18 +:101EC000FFFFFFBBEFFDFF7BDEF73FFFBFFBDBFF4D +:101ED000F2B6FDBD7FE7FFFFFF6FF7FFFFFFFE7765 +:101EE000FFBFF8AFFFDFBFFFBF7FFBFFFFFFDBFEE2 +:101EF000FFBFFFFAFFFDFFF67FFF9FFFFF3FEFF8F9 +:101F0000EE7E9FBAFEBF8FEFFEFEF9FFFA7FFE7EE8 +:101F1000BFAFFB96FD9FEF5E65BEEF5BB6FFBEE316 +:101F2000FFB5BFFFFDFF7FFFEFDFFEFFBFFBFEFF43 +:101F3000BFCFFFFFFFFD9BFFFEFBFEDFFF7FFFF735 +:101F4000FEFFDFFBFBFEFFFFFFFFFFB7FEFAFFAB6D +:101F5000EFFFFDB57B7FFBF7FDFFFFDDFFEF8FFFA1 +:101F60002FFFFB7CFF3FDF73EBFE3FFFEFFBFEFF2E +:101F7000EFFDFFBFFD0FFFFFFFF5F9FF7FD7FDFF6F +:101F8000DFFFF7FBFF7FBFFFFFF09FFFFE7F8BE3CD +:101F9000F9DE279BE6BE7F9BC3F8DE7F9DE7FE7FD1 +:101FA000FFFF5FD7FFFFFF4FFBFFFF7FFFAFFF9FED +:101FB0007FFBFFE8FFFFFEBFAFFFFFFEBFEFF7FFB6 +:101FC000BFFFFFFFFFFFF7FFFCFFFFFD7FFFFFFFEE +:101FD000FD3FCFFFFFFFFFF7FFFD7FFFFF93FFFFF9 +:101FE0007ADFF7FFFF7B7FB7EFFFFFFDBFFDFBFF52 +:101FF000F7FFD7FFFFFFFC9F6FCBFFF4BBDFD6FDE2 +:10200000BF2FD3F7FFDFFFCFFFFABEBDAF6ADABE47 +:10201000BBAB3ABE2DAEEBDAF63FADF5DDFFCFF14F +:10202000FFF97FFF73FEFFCFC3F4F72FF3FFFCFF31 +:102030007C1FFF3F4FFF7EFFEFBDF6FEFF2BEFDC67 +:10204000FBFDFFFBFFEA7BFFFFFFFFFFFBF7DFFF6F +:10205000E37DFFB7FFBFFFFFDFFFF8FFBFFFBFEB71 +:10206000E7FAFE3DBFE9FCBFFFFAFBFEFFFFFFD929 +:10207000FFFFFFF67FFFF67DFFDFCFFDBFFBEF7EAB +:10208000FF7FFFFFD3FFFDFBFFFBFFFFFFEFFFBF66 +:10209000FEFFF7EFFFFFFFFBFF87FFFDFFFFFFFFE7 +:1020A0007BFEFFFE3BF7F7FF3FFFFFFFFFFF0FFF4A +:1020B000FFFFFFFBFFFFFFF7FFFFADFFFEF7FFFF97 +:1020C0005FFFFFDFFFFDFFF5FFDFFFBDFFE9FFC79C +:1020D000F3FFFFF7FFF3FFF83BFFFF7BDFBFFBEFF3 +:1020E000FBFFFBF7F7BBFFFFFFFFFBFFFE7FF37F6D +:1020F0005EB7BFFD7FFFF97FFBFFEBFD7F7FFFEF4B +:10210000FBE03FFEBFBFDFFF7EFFF7FFFFFEBFFF2D +:10211000DB78FFFFFFEEA1BFF5DEFBF7FFFBFFFF64 +:10212000FFFFFBFFFFD7FFFFFFFFEFF0FFFFFFF316 +:10213000F7FFEFFFE7CFFFFBFFEFFFFF9F9FEFFCF6 +:1021400016BFFEF3E4FFFFC6FFE7FFFFFDFFBFFF83 +:10215000FF3FFFBFD6AF7FFE6B7E7FFFAFFFFFBFAE +:10216000FF5FFFFEFFFFFEFFFFBDDBFFFE5FF2FF35 +:10217000FF5FFFFFFFFFFFFFEF7FFFFFFFFFDEBF00 +:10218000FFFFEFFB77FEBD7F5FFFFFFFDF6FEDFF20 +:10219000FDFF7FFD6FFFFF77DACFFD5FFFBFFFFF22 +:1021A000DF7FFFFBFFFFFFFF667FFFFEBFE7BFFA9A +:1021B000FFFEFFFFFFDFFF59EFFFEFFB7F89FFFF10 +:1021C000E9FF6FFFF5FFFFFFFFFF7FF2F7FFFFEF74 +:1021D000F87FFBFFFDFFFFD9FFEFBBFFFFFFBFEF66 +:1021E000DEFFFF9F7FDFFFF7FFFFFFFFDFFFFFAF98 +:1021F000FFFFF73FEB9FFE7F9E7F9FFE87FFEDDB9C +:1022000056FFBFAF0BD2FFEFDB6E7DBD6FF8FE3F19 +:10221000FA5BFFFDBFEFFFBF6FDBE6FFFF3FFFDFB6 +:10222000FEFFFFFFFFDA3FFFFBFEFEFFFFDFF7BD14 +:10223000FFFDFFFEFFFBFFFFFFFFF15FFD9FDFFDE7 +:10224000FFFD7FFFFFFFFF76FAFFFF7FE3F8FFAEA2 +:10225000FFFB7E9D73FFFA7FDFFFFF7FFFFBCDFF5C +:102260007FEFFBFFFDFFF77F7FEFFFEDFFFFFFB588 +:10227000FFBFFFBFFDEFDBF7FF93FFEFE2F9BE7F8C +:102280008BE7F9FE6BE7F9FE7F9FE7F9FE7F47FFDB +:10229000FFFDFF9FFFD7FFFFFFFFF5FF9FFFF7FE4B +:1022A000FFBFFE6FFFFFFBFFFFFFAFFFFFFF7FFBE7 +:1022B000FFFEFFFFFFFFFFFDDFFFFFF7FFFFFFDF79 +:1022C000FFFFFF5FFFFFFFFF5FFBFEFFF837FFFF32 +:1022D000EFFF7FFEBFFFFFFEBFFFFF7FFFBFFDFFE2 +:1022E0007FFA7FFFFF6FFFFF7DFFCFFFFFFF4FFFF5 +:1022F000F2FFFFFFFFFFFABFFFAEEBFAFEBBADEB55 +:10230000FAF7AF6BFAF6BF25E9F27F45FFFFFDF75D +:10231000F7BFFFDFFFFFBFFBFFDFF3FFF73FCFFF9D +:10232000A1FFFFBFE7FFFF7FFF3DFFFFFFF7FF2F8D +:10233000FFFBF57FFE57FFFFFFFFFFFFFFFFFFF7EC +:102340003FFFFEFFFFFFFDFEF7EEAFFEEEE7FAFFF9 +:10235000FE9DF95EFEFFEBFFFFDFA7FFFFFFFCDB4B +:10236000FFFFFF7EFBFFFFEFFBFDFFDBFFFFFFEF4C +:10237000FFFFFFFDBFFEBFFF6F7FFFF7FFFFF9FF0E +:10238000F7FFBFDEF7FFFFFFFA7FFDBF5FFFFFBF75 +:10239000FFEDFFF7BFFFFFEFFFDFFFFFFFE6FFFBF4 +:1023A0007FFFFFFFFFFFF7FFFFFFFFFFFFFFEBFFD9 +:1023B000FDFFF5FFF67FDFBDCFFFFFFFFFDFFFFF74 +:1023C000FFF9FFFFFFFFFFE3FFEEBFFF7DEFFEFF23 +:1023D000FFFFBFFFFFFFFFFEFFFFFFFFE7FFB5AE01 +:1023E000FFFFB6FEBFFFFFBFFFFFFFFFFFFFFFFFC7 +:1023F000FF27FFEFFE7FDFFF7EFFFFFFFFFFFFFFF7 +:10240000FFFFFDFFF7F99FFF5FFFFFFFFFFFFF7F6C +:10241000FFFFFEFFFFFFFFFFFFFFFF0FFFE7BFFE16 +:10242000FFBFFFFFFFFFFCBFFFFFFEFFFFFFFFC47B +:102430006BFF291FFBAFFFFFFFFFFFEF1BFEFFFC42 +:102440006FFFFFFD6AF7D7F5BFFFFEFFFFFFFFFF3E +:10245000FEBFFFFFFAFFFFF7FBDDBFFFE7FFFFFF58 +:10246000FFFFFFFFFFFD7FFFFFF5FFFFF7FDB3EF6E +:10247000FD7E5DFFFDFFFFFFFD7FD2F5FB7ECBB74D +:10248000FFFFFFC6FFFDEE63FFFFFFFFFFF6FD65E9 +:102490005BDFFFD5FFFFFFF6E7BFF7A9FFFFEDFF0B +:1024A000FFFFFFFFEBFFFFFFAFFFFFFFF81BFFE3A7 +:1024B000D0BFFFE1FFFFFFFFFFD7FFFFFF5FFFFF81 +:1024C000FFFFAFFFDB76BFFF7FFFBFEFFEFFBFEF7A +:1024D000FBFEFFFFFFBFF27FFF9FFEBDFE7FFFFF02 +:1024E000FFFFFFFFFFFFFFFFFFF73FEC7FF695BB0E +:1024F000EFF8FEFCBF2FDAFCBF2FCBF2FCBFEFFFE3 +:10250000A9BFCFFBFFFFFFFEDDB76DF6D9B66D9B10 +:1025100076D9BFFBFDA3FFBFEFFFEFFFFFFF7FDF1C +:10252000FDEF7BDEF7FDEF7FFFFF05FFFAFE7FEF9C +:10253000E3FFFFFD7FFFFFFFFF5FFFFFFD7FFBAFBF +:10254000FF63C8FFBFEFFFFFFA7FFFFFFFFE9FF7AC +:10255000FFFABFFE9FFB7FFFFFEFD7FFFFF5FFFFF7 +:10256000FFFFFD7FFFFFBFFFF9BFFFBE279FE7F91A +:10257000FE7F8BE7FE7F9FE2F9FE7F9FE7F17FFF03 +:10258000FFFFFBFEFFFFFFD7FFFFFFFFF5FFFFFF92 +:10259000D7FFFAFFFEFFFFFFFDFFFFFFAFF7FFFFD3 +:1025A000FFEBFFFFFFAFFFC4FFF7FFFFEFFFFFFFF2 +:1025B000FF5FFFFFFFFFD7FFFFFFFFFFEBFFFB7A90 +:1025C000DFF7FDFFFFFEBFFFFF7FFFAFFFFFFFF75E +:1025D000EFE3FFDDD2FFDFFFFFF2FCBFCBF6FDBF75 +:1025E0002FCBFF7FDFDEAFFFDAEEBFAFE9FAF4BD3E +:1025F000AF5AAEBBAB6BDADEBFADD75EFFFFBFFC41 +:10260000FFDFFDFFFFFFFFDFF7FFFFFFFFFDFFFA2B +:102610001FFFFEFBEFBFFDFFFDBD77FFFFFFFF9D2F +:10262000EFFFFFFFEF7DFFFBFEEFFFFFFFFFFFF779 +:10263000FFFFFFFFFFFFFFEEBFE4FBFFFE3FFEFFDC +:10264000FFFFFFAFEAFEBFAFEBFAFEFFFFFF55F65D +:10265000FFFEF7FF7FFFEBF75FC5FD7F5FD7F5FF5D +:102660006FFBFF8AFFFFFFFFEBFFFFFFFFFBBFBF1B +:10267000EFFBFFFFFFFFFBFF77DFFBFFFD7FEFFFC0 +:10268000FFFFBF7FFFDFBFFFFBFFFFFFFEEFDFFFAF +:10269000FEFF9FEF7DFFF7FF7FFFFFDFF7FDFFEFFF +:1026A000DFFFDFFFFFFFFFFFFFFFFFFFFDFFFFFB80 +:1026B000FDFFBFDFD1FFF83BFFFFFFFFFFFFFFFF85 +:1026C0007EDBFDFF77DBB77DBFFBFFF87FED7B5E39 +:1026D000FFFEFFFF4FD7FD7FDFD7F5FF7FFFFFFF37 +:1026E000F23FFEFFBFFFFFFFFFBFEFFEFF3BEEFF2E +:1026F000FCEFFFFFFF85FFFDFEFFF5FFFFFEFFDFA5 +:10270000FBFF5FBFFFFDFFFFFFFFA8FFFF9F9EFFD7 +:10271000FFFF7FF3FFFFCFFFF7FDFF7FFFFFFC16FB +:10272000BFCFA3E5EF7FFFF3E4FFCF93FCFF3FCFE5 +:10273000FFFFFFD60F7DBF6EFBF4FCAF6DDB77B7FD +:102740006DDBF6FDBFFFFFFFBF9BFADEB7B7EDF90C +:102750007EB7ACEBD6B3ADEB7ADFFFFFFFD8BFFFA0 +:10276000B7ED9F6FDDF768DB37B36CDB36CDB37F3A +:10277000FF7FF56FFDEF793DF793E47A9EADEA7A3E +:102780009EF7BDEFFFFFFF767FFBC6FFBBEFDAFED4 +:10279000FDBFFBFEFFBFEFFBFFFFFBFFA5FFFDAB98 +:1027A0006F78DE178F79DFFDFF7FDFF7FDFFFFFB1F +:1027B000FFFBFFEFFBEFFBFEFFBBDAF3EF3BCEF3DC +:1027C000BCEF3FCFDFFFB7FFFFFFCF73FFBFEFFFD0 +:1027D000F3FF3FCFF3FCFF3DCF9FFE07FFAFEBFEC4 +:1027E000FDBFEFEBFAFFAFEBFAFEBFAFFBFE3FFB27 +:1027F0009BFF7FDFFFF3FEFFDEF7BF7BDEF7BDEF62 +:102800007BFEFFFFDF3FFEFFB7FFEFF7FFBFEDFEF1 +:10281000DFB7EDFB7EDFFFFFFFFD5FEFEBFAFEF5BD +:10282000BF6FFFFFFFFFFFFFFFFFFFFEF8FFA8FFE7 +:10283000FFBFEFFB6AFBB7EFFBFFBFEFFBFEFFBF86 +:10284000EFFBFFE0FFFFFD7F5CD77DDFF35CF5CDA5 +:10285000735ED7B5FD7FEFFFDBFFFFE2F8BE2F8F82 +:10286000E7F8BE6BE2F8BE2F8BE2F9FE7FE7FFD7F9 +:10287000F5FD7FFFF7F5FD7FD7F5FD7F5FD7F5FF0E +:10288000FFFF8FFFAFEBFAFFFFBFEBFAFF2FEBFA73 +:10289000FEBFAFEBFFFFFE5FFF5FFFFFFDFFFFD758 +:1028A000FFFFFFFFFFFFFFFFFFFFFFFFBFFEB7FDC3 +:1028B000FF7EDFF7ADFF7FF7FDFF7FDFF7FDFF7FD7 +:1028C000F67FFFFFFFDBF6FCAFFFFFFFFFF7FFFF29 +:1028D000FFFFFFFFFFECBFFFAFEBFAF6AB8FEBFAAA +:1028E000F7A5EBFABEBFAFEBFAFF6DFFFF7FDF335B +:1028F000DDFF7FFEF7FC7FFBFFFFFFFFFFFFFFA970 +:10290000FFFDFFFFFEFFFFDFFFFFEFEFFDFF7FFF9C +:10291000FFFFFFFEA7FFFFFF77DFF7FD9F7FFE773B +:10292000EFFFFFFFFFFFFFFFFFAFBFAFFFF9BEBF2E +:102930008FFBFEFEEFFBFEFFBFEFFBFFFFFDDF6F38 +:10294000EFFF7FFFBFBFDFFFFCFFDFF7FDEF7FDFA4 +:10295000FFFFFF3FF6FFCFFFDBFBF7FFEB7AFFFF49 +:10296000FFBFEFFBFFFFFFFE6DFDFF5FFBFFFFF70C +:10297000FF5FF5FFFFFFFFFFFFFFFFFFF8FFFBFF1C +:10298000FFFDFFFFFFFFE7F6BFFFFFFFFFFBFFFFBE +:10299000FFC9FFFFFFBDFFBFAFEFEF3FD1FC7FFBE4 +:1029A000C7FFFFFFFFFFE3FFFFFFFFFDFFFF77FF15 +:1029B000DFB7FDF7FDF7FFFFFFFFFF57FFF7A5FDAF +:1029C0003FDFBFBFFE7FFFFFFFDFFAFDFFFFFFFE20 +:1029D00087FFE9FFFEEFBFEFFEFEFFEFFFFFFFFF08 +:1029E000FFFFFFFFFA9FFF3FFFFDFD57DFFDF3FFF6 +:1029F000DFFDFF5FDFF5FDFFFFF98FFFFFFFEE7FDC +:102A0000FFFFBF5EFEECFB3F7F9FEFF9FFFFCD6B4B +:102A1000FFFFFFC5F3FCFA38FFAF3FEE7F9FFFD902 +:102A2000FFFFFD7AF7FFF3FFAF6FDBF2B9E9FBFFC2 +:102A3000FFFFFEFFFFEFFFFBC5BFFFEFFF5EB7AD80 +:102A4000CD797CFFFFFFFFFFFFFFFFFFFD93FFEF4F +:102A5000EAFEBFEF5BD2CDF56D77DFF7FDFF7FDFDD +:102A6000FFFF66FFD5657D5F759D657FD6FB4FFFD8 +:102A7000FFFFFFFFFFFFF6C7FFBFEFFAFEFFBFEB51 +:102A8000FFDFFF7EFFFFEFFD7ED7FF78DFFF5FDF19 +:102A9000F5BF7FDFC5FF3FF67EFF0FEFF23EBFFFC2 +:102AA000FB3FFFFB7FFFB3FEFBF6FDFFDAF7FDFF09 +:102AB0007FDFF7BFFFFA7FFFFFFFFF9FFFF3DCF928 +:102AC000BFCEE7F9FE7F9FE7FFFFE27FFEFFBFEF8C +:102AD000EBFAFF9F671EFF8FE7F8FE7F8FEFFFBDCA +:102AE000BFFFFBFFFFDFF7FFFCFFBFFFFFFFFFFFA5 +:102AF000FFFFFFFDB3FFFFEFFFFFBFEDFFFBEEFEAC +:102B0000FFFFEFFFFEFFFFFFFFB5FFB7FDFD6EFF0D +:102B1000FFFEFD2FD8FEBF8FEBF9FE3FFFFACFFF80 +:102B2000E7D9FABFDF77FCFB3FABFEFFBFEFFBFE51 +:102B3000FFFFEE1FFFDFF7FFFFFF5F9735BF5EFE72 +:102B4000BFEFFFF7FDFFFFFABFFFBE6F9FE7F8BEC5 +:102B50002F8B66947D9DE7F9FE7F9FE7F17FFFFF56 +:102B6000FFF7F5FD7F5FFBFD9EFFFBFEFFFFEFFF25 +:102B7000FFA0FFFFFFBFEFEBFAFEBFB7F7F7FFFFC6 +:102B8000FDFFFFFFFFFFDDFFFDFFFFFFD7FFFFFFA3 +:102B90007FF5FFFFEFFFFFFFBFFFFFABFEFBFEFF79 +:102BA000F7AFFFFFDEF7EB5FDFF7FDFF7FDFFFFF34 +:102BB000B3FFC9FEFFFFFFFFD6FFFFCBFFFFDFFF25 +:102BC000FFFFFFFFFC8FFFBABEBFAFEB78FEB7ADD4 +:102BD0003AFEB7AFEB7AFEBFAFFF9FFFFFDFFCFF10 +:102BE000FFFEC3FEFFFF33FCFFBFDFF3FFFFBB9F12 +:102BF000FFFFFFEBDFFFFFAFF76FF9BFEFFDFFFF59 +:102C0000FFFFFFE37FFFFFFFFBFFFFBFFDFBF7FFC2 +:102C1000DFF7FFFEEF5FBDFFFAFFF8FFBFAFFBFE80 +:102C2000FE3FEFE8FFDFF3FDFFFFFFFFFFEDFFFBE0 +:102C3000FDFFAFFFFFFEFEBFDBFFFFFFBFFFDFFFBC +:102C4000FDFFCBFFFFFFFFFFBF6FFF7FB7B3FFFFAE +:102C5000DFFFFBEFFFFFFF07FFFBFFFFFFEDFFF5D0 +:102C60007CFF7FFEFFFFEFCFFFFBFFFF2FFFFFFF8C +:102C7000FFF3FFFBFFFEFFFFFFFFFFFFBFFFFFFFB5 +:102C8000FD1BFFFFFFFFFFFFFFFFFE7CFFFFFFFFBE +:102C9000EFFFFFFFFFFBBF7FFDFFFFFFFFFFFFFF1A +:102CA000DBFFFFFFFFFFFFFDFFFFF07FFFFFFFFFE9 +:102CB000FFFFFFFFFFFBFFDFFFFFFFFFFFFDBFFE8B +:102CC0007FFFFFFFFFFFFFFFFFEFFEFFBFFFFFFFE5 +:102CD000FFFFEFFAB5FFFFFFF7F7FFFFFFFFDFFB97 +:102CE000FCFFFFFEFF7FDFBFFFCBBFF9FE7F9FE74B +:102CF000F9FE7F97E1FE799FE7FDFE7FDFFE37FF5C +:102D0000FBDEDEBDEFF3FEFBAFEBFEFFFFCFFFFE12 +:102D1000FFBFFF8FFFEFFBFEFFBFE7F95E7FEFFB1B +:102D2000DAFFBFEFFBFEFFFD1FFFFFFFFFFFFFDF2F +:102D3000FFFF7FFFFFF7FB7FFFFFFFFFFC3FFFBFB2 +:102D4000EFFBFEFFBFEF7B7FBFEFFBFEFFB5EFFBAF +:102D5000BFFA7FFCFF3FCFF3FCFF3FCFBCFF3FEF4D +:102D6000F3FCFE3FCFFFEEEFFBFEFFBFEFFB6AD7AA +:102D7000B7FBF8FFB7EFBAFEFFBF7FE9FFF97E5F51 +:102D800097E5F9FE7FBFF97E5F9FE5FBFE5FB7FF2A +:102D9000A3FFF7FDFF7FDFF7FDFF5EF77DFF77DF26 +:102DA000F7FDFF7FFFD7FFFFFFFFFFFFFDDFFB7F8B +:102DB000FFFFEFFFFEFBFFFFBFFE8FFFDFF7FDFD15 +:102DC0007FDFF7FD3EDFF5BDFF7FDFF7FDF7FF9FFC +:102DD000FFFFFFFFFFFFFFFFFFFDFFBEFFFFFFFF46 +:102DE000FFFFFFFD3FFFDFF7FDFF7FDFF7FDFFCFB9 +:102DF00077FCFF5FDFF7FDFFF47FFFFFFFFFFFFFC3 +:102E0000FFFFFFFFFFFFFFFFFFFDFFFFFFEEFFFFE5 +:102E1000FFFFFFFFFFFFFFFFEDFBFFFFBFFFFFFF18 +:102E2000FFFFE9FFFFFFFFFFFFFBFFFFFFD3FFFFF8 +:102E3000BF3FFBFFFFFFFBF3FFFFFFFFFFFFFFFFB6 +:102E4000FFFFFFFFFFFEFFF7FFFFFFFF17FFFFFF83 +:102E5000DFFFFDFFFFFFFFFFDFDFFFFDFFFFDFF70E +:102E6000FF4FFFFFFFFFFFFFFFFFFFFEFFFFFFFD25 +:102E7000FFFFFFFFFEFF9FFFFFFFFFFFFFFFFFFFC3 +:102E8000FDFFFFFFFFFF7FFFFFFF7A3FFFFFFFFF19 +:102E9000FFFFFF7FFFFFFFFFFFFFFFFFFFFFFFF2CF +:102EA0007FFFFBFEFFBFEFF8FEFFBFFBFEFF8FECD7 +:102EB000FBFEFFBFF8F7FEFFBFEFFBFEFDBFCFEC51 +:102EC000FF3FEFDBF8FFBFCFFFF9FFFFBFFFFBFFC7 +:102ED000FFFFEFFBDFFFFFFFFFFFBFFFFFFFBBFFBA +:102EE000EFFBFEEFBFEEEBFBFEFFEFFEEEBFFEEBF8 +:102EF000FFEFFF17FF7EEBBBFEBFBEFBEF5BF7BD37 +:0A2F0000FBCFBFBFBBFB7ECCEFFF91 +:00000001FF + + * Copyright (C) 1999 BayCom GmbH + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that redistributions of source + * code retain the above copyright notice and this comment without + * modification. diff --git a/linux/firmware/dabusb/firmware.HEX b/linux/firmware/dabusb/firmware.HEX new file mode 100644 index 000000000..7c258df2b --- /dev/null +++ b/linux/firmware/dabusb/firmware.HEX @@ -0,0 +1,649 @@ +:02000000215786 +:0300030002016691 +:03000B0002016689 +:0300130002016681 +:03001B0002016679 +:0300230002016671 +:03002B0002016669 +:0300330002030FB6 +:03003B0002016659 +:03004300020100B7 +:03004B0002016649 +:0300530002016641 +:03005B000204BDDF +:0300630002016730 +:03010000020C5A94 +:030104000201ED08 +:030108000202519F +:03010C0002027C70 +:030110000202E404 +:0101140032B8 +:0101180032B4 +:03011C000205FDDC +:03012000020000DA +:03012400020000D6 +:0301280002043C92 +:03012C0002046A60 +:03013000020000CA +:03013400020000C6 +:03013800020000C2 +:03013C00020000BE +:03014000020000BA +:03014400020000B6 +:03014800020000B2 +:03014C00020000AE +:03015000020000AA +:03015400020000A6 +:0A01570075817FE5826003020161FB +:0501610012076F21648C +:010166003266 +:0E016700C0D0C086C082C083C0E0907F97E009 +:0E0175004480F0907F69F0F0F0F0F0F0F0F0D0 +:0E018300F0F0F0F0F0F0F0F0F0F0F0F0F0F04E +:0E019100F0F0F0F0F0F0F0F0F0F0907F97E07A +:03019F00557FF099 +:0E01A200907F9AE030E423907F68F0F0F0F058 +:0E01B000F0F0F0F0F0F0F0F0F0F0F0F0F0F021 +:0E01BE00F0F0F0F0F0F0F0F0F0F0F0F0F0F013 +:0E01CC00E5D8C2E3F5D8D0E0D083D082D0864B +:0301DA00D0D03250 +:0801DD0075860090FFC37C054C +:0701E500A3E582458370F9D8 +:0101EC0022F0 +:0E01ED00C0E0C0F0C082C083C002C003C0D01A +:0E01FB0075D000C086758600E591C2E4F591CE +:0D020900908800E0F541907FAB7402F0900A +:090216007FAB7402F0E5326021B7 +:04021F007A007B00E6 +:0B022300C3EA9418EB64809480501232 +:0E022E00907F69F0F0F0F0F0F0F0F00ABA0006 +:02023C00010BB4 +:02023E0080E35B +:02024000D08666 +:0E024200D0D0D003D002D083D082D0F0D0E054 +:01025000327B +:0E025100C0E0C0F0C082C083C0D075D000C035 +:0E025F0086758600E591C2E4F591907FAB7440 +:04026D0004F0D08643 +:0B027100D0D0D083D082D0F0D0E0329B +:0E027C00C0E0C0F0C082C083C002C003C00456 +:0E028A00C005C006C007C000C001C0D075D0BE +:0D02980000C086758600E591C2E4F59190E6 +:0C02A5007FAB7408F0756E00756F0212DC +:0602B1001144757039755F +:0602B700710C75720212C9 +:0C02BD001175907FD6E4F075D820D08633 +:0E02C900D0D0D001D000D007D006D005D00490 +:0D02D700D003D002D083D082D0F0D0E0322E +:0E02E400C0E0C0F0C082C083C0D075D000C0A2 +:0E02F20086758600E591C2E4F591907FAB74AD +:0403000010F0D086A3 +:0B030400D0D0D083D082D0F0D0E03207 +:0E030F00C0E0C0F0C082C083C002C003C004C2 +:0E031D00C005C006C007C000C001C0D075D02A +:0C032B0000C086758600756E00756F02BC +:0703370012114475704075BE +:06033E00710C7572021241 +:0E0344001175907FD67402F0907FD67406F08B +:0503520075D810D086F3 +:0E035700D0D0D001D000D007D006D005D00401 +:0D036500D003D002D083D082D0F0D0E0329F +:0D037200907FA57480F0907FA6749AF01221 +:0C037F00101B907FA6E542F012101B90AE +:0D038B007FA6E543F012101B907FA5744083 +:01039800F074 +:010399002241 +:0D039A00907FA57480F0907FA6749AF012F9 +:0C03A700101B907FA6E544F012101B9084 +:0C03B3007FA6E545F012101B907FA6E528 +:0B03BF0046F012101B907FA57440F068 +:0103CA002210 +:0A03CB0075440275450075460012E6 +:0903D500039A75420375430012FE +:0203DE000372A8 +:0103E00022FA +:0C03E100908800E536F09088007410252C +:0903ED0036F01201DD75420175C4 +:0903F600431812037275440275EC +:0903FF00450075460012039A75D1 +:08040800420375434412037224 +:0104100022C9 +:0E041100C0E0C0F0C082C083C0D075D000C073 +:0E041F0086758600E591C2E4F591907FAA747F +:04042D0002F0D08683 +:0B043100D0D0D083D082D0F0D0E032D9 +:0E043C00C0E0C0F0C082C083C0D075D000C048 +:0E044A0086758600E591C2E4F591907FA97455 +:0704580004F0753001D086AD +:0B045F00D0D0D083D082D0F0D0E032AB +:0E046A00C0E0C0F0C082C083C0D075D000C01A +:0E04780086758600E591C2E4F591907FAA7426 +:0704860004F0753101D0867E +:0B048D00D0D0D083D082D0F0D0E0327D +:0E049800C0E0C0F0C082C083C0D075D000C0EC +:0C04A60086758600E591C2E5F591D086D0 +:0B04B200D0D0D083D082D0F0D0E03258 +:0E04BD00C0E0C0F0C082C083C0D075D000C0C7 +:0C04CB0086758600E591C2E7F591D086A9 +:0B04D700D0D0D083D082D0F0D0E03233 +:0C04E200907FEAE0FA8A20907F96E4F018 +:0104EE0022EB +:0704EF00907FEAE0FA8A2188 +:0104F60022E3 +:0E04F700901713E0FA901715E0FB74802AFAB4 +:0E05050074802BFBEA0303543FFCEAC423542A +:0E0513001FFA2CFAEB0303543FFCEBC42354F5 +:0B0521001FFB2CFB90170AE0FC60029F +:02052C007A0053 +:07052E0090170CE0FC6002D5 +:020535007B0049 +:0B053700EA2BFCC313F53A7544028B5D +:07054200458A4612039A7579 +:090549006E08756F001211447573 +:040552007047757108 +:080556000C757202121175858B +:05055E003A731211A028 +:010563002275 +:0E056400907F96E0FA907F9674806502F0908A +:0E0572007FEBE0FA907FEAE0FB907FEFE0FC89 +:0E0580003395E0FD8C057C00907FEEE0FE33AD +:0E058E0095E0FFEC2EFCED3FFD907FE9E0FED6 +:05059C00BE0102800316 +:0305A1000205F957 +:0605A400BC0121BD001E98 +:0E05AA00EAC40354F8FCEB25E0FD2C2400FC11 +:0E05B800E43417FD907EC0E0FE8C828D83F04F +:0205C600803182 +:0E05C800EAC40354F8FAEB25E0FB2AFA2400FB +:0E05D600FBE43417FC907EC0E0FD8B828C832A +:0E05E400F074012A2400FAE43417FB907EC163 +:0705F200E0FC8A828B83F01C +:0305F90075380151 +:0105FC0022DC +:0E05FD00C0E0C0F0C082C083C002C003C004D2 +:0E060B00C005C006C007C000C001C0D075D039 +:0D06190000C086758600E591C2E4F5919061 +:0D0626007FAA7401F0120564753700D086BC +:0E063300D0D0D001D000D007D006D005D00422 +:0D064100D003D002D083D082D0F0D0E032C0 +:0E064E00907FEBE0FA907FEAE0FB907FEEE019 +:0E065C00FC3395E0FD907F96E0FE907F967453 +:0E066A00806506F0907F007401F0EAC403542E +:0E067800F8FEEB25E0FB2EFE2400FBE4341719 +:0E068600FF8B828F83E0FB74012E2400FEE4C4 +:0E0694003417FF8E828F83E0FE907FE9E0FF37 +:0306A200BF810A0B +:0A06A500907F00EBF0907F01EEF073 +:0806AF00907FE9E0FBBB821A19 +:0306B700BA010C79 +:0C06BA00907F00E4F0907F01E4F0800BE2 +:0B06C600907F00E4F0907F0174B5F01D +:0806D100907FE9E0FBBB831BF5 +:0306D900BA010D56 +:0D06DC00907F007401F0907F01E4F0800B2E +:0B06E900907F00E4F0907F017412F09D +:0806F400907FE9E0FBBB841CD0 +:0306FC00BA010D33 +:0D06FF00907F007401F0907F01E4F0800C0A +:0C070C00907F007480F0907F017401F079 +:05071800907FB5ECF03C +:01071D0022B9 +:0C071E0075360D908800741DF0756B801E +:0A072A00756C3C1210E2756B8075CF +:090734006C0F1210E2756B807568 +:09073D006C061210E2756B807568 +:070746006C011210E27A00C1 +:03074D00BAFF00F0 +:02075000500A4D +:0A075200C0021201DDD0020A80F19E +:0A075C00756B80756C3C1210E2759D +:080766006B80756C0F1210E2AC +:01076E002268 +:0E076F00907FA1E4F0907FAF7401F0907F9234 +:0E077D007402F0758E3175892175880075C87B +:0E078B0000758D4075984075C04075870075EB +:0907990020007521007522007595 +:0507A200230075470073 +:0707A700C3E5479420501147 +:0D07AE00E5472400F582E43417F583E4F0FC +:0407BB00054780E886 +:0907BF00E4F540F53FE4F53CF5DA +:0707C8003BE4F53EF53D7531 +:0B07CF003200753700753900907F93F1 +:0E07DA00743CF0907F9C74FFF0907F967480CA +:0E07E800F0907F947470F0907F9D748FF0906D +:0E07F6007F97E4F0907F9574C2F0907F987426 +:0E08040028F0907F9E7428F0907FF0E4F09032 +:0E0812007FF1E4F0907FF2E4F0907FF3E4F0E9 +:0E082000907FF4E4F0907FF5E4F0907FF6E432 +:0E082E00F0907FF7E4F0907FF8E4F0907FF90F +:0E083C007438F0907FFA74A0F0907FFB74A0E7 +:0E084A00F0907FFC74A0F0907FFD74A0F09001 +:0E0858007FFE74A0F0907FFF74A0F0907FE010 +:0E0866007403F0907FE17401F0907FDD7480E8 +:0B087400F012124312071E7A007B00F6 +:09087F00C3EA941EEB940050172B +:0C088800908800E0F54790880BE0F547F1 +:09089400907F68F00ABA00010B24 +:02089D0080E0F9 +:0C089F001203E1907FD6E4F07A007B00A9 +:0D08AB008A048B05C3EA94E0EB942E501AEA +:0E08B800C002C003C004C0051201DDD005D08F +:0A08C60004D003D0020ABA00010BAF +:0208D00080D9CD +:0D08D200907FD67402F0907FD67406F090EF +:0E08DF007FDE7405F0907FDF7405F0907FAC33 +:0E08ED00E4F0907FAD7405F075A88075F810EA +:0D08FB00907FAE740BF0907FE27488F09057 +:0C0908007FAB7408F075E81175320175C2 +:0C0914003100753000C004C0051204F76B +:0A092000D005D004753400753501D0 +:0D092A00907FAE7403F08C02BA00028003CF +:03093700020A3F72 +:0C093A00853334907F9D748FF0907F9780 +:0E0946007408F0907F9D7488F0907F9AE0FA1C +:0C09540074055AF533907F9D748FF0906D +:0D0960007F977402F0907F9D7482F0E53364 +:0D096D0025E0FA907F9AE05405FB4AF5332F +:02097A00600C0F +:0C097C00907F96E0FA907F9674804AF01D +:0B098800756E00756F00C004C0051202 +:0E0993001144D005D004901713E0FA74802AA6 +:0609A100FAE533B404295D +:0309A700BAA000F3 +:0209AA005024D7 +:0D09AC00901713E004FB0B901713EBF09075 +:0E09B9001713E0FB901715F0C002C004C00534 +:0909C7001204F7D005D004D0029F +:0509D000E533B402262E +:0609D500C374049A5020D7 +:0D09DB00901713E0FA1A1A901713EAF09023 +:0D09E8001713E0FA901715F0C004C00512B7 +:0609F50004F7D005D00458 +:0509FB00E533B4081D06 +:040A0000E534701950 +:0A0A040074012535540FF5358535D2 +:0C0A0E0075757600C004C0051213FED000 +:030A1A0005D00400 +:050A1D00E533B4011DEA +:040A2200E53470192E +:0A0A2600E53524FF540FF535853542 +:0C0A300075757600C004C0051213FED0DE +:030A3C0005D004DE +:0E0A3F00C004C0051201DDD005D004907F96E2 +:0E0A4D00E0FA907F96747F5AF0907F977408BD +:0A0A5B00F0C3EC9400ED9402400893 +:080A6500907F96E0FA20E608FC +:080A6D00C3E49C74089D5013C2 +:0E0A7500907F96E0FA907F9674406502F07CC8 +:050A8300007D0080056C +:050A88000CBC00010D93 +:050A8D00E538B4010E84 +:0D0A9200C004C0051204F7D005D00475386B +:010A9F000056 +:070AA000E531700302092A91 +:0A0AA700907FC9E0FA7003020C2DE5 +:0E0AB100907F96E0FA907F9674806502F09038 +:090ABF007DC0E0FABA2C028003AC +:030AC800020B36E8 +:050ACB007532007B0004 +:030AD000BB640004 +:020AD300501CB5 +:0E0AD500C002C003C004C0051201DDD005D070 +:0D0AE30004D003D00290880FE0F5470B808F +:010AF000DF26 +:0D0AF100C002C004C00512071E1203E1126E +:0C0AFE0004F7D005D004D002756E00751E +:0D0B0A006F01C002C004C005121144D005E7 +:090B1700D004D00275704D757117 +:0B0B20000C757202C002C004C0051278 +:0B0B2B001175D005D004D002020C2D83 +:030B3600BA2A3B9D +:0D0B3900907F987420F0C002C004C0051227 +:0E0B460001DDD005D004D002907F987428F015 +:020B54007B0024 +:030B5600BB0A00D7 +:050B59004003020C2D19 +:0E0B5E00C002C003C004C0051201DDD005D0E6 +:080B6C0004D003D0020B80E26B +:030B7400BA2B1A7F +:080B7700907FC9E0FBBB4012B6 +:0E0B7F00C002C004C005121205D005D004D07B +:040B8D0002020C2D27 +:030B9100BA101F78 +:0E0B9400907F96E0FB907F9674806503F0C022 +:0E0BA20002C004C00512103DD005D004D002E0 +:030BB000020C2D07 +:030BB300BA111262 +:0E0BB600C002C004C00512106AD005D004D0E1 +:040BC40002020C2DF0 +:030BC800BA12124C +:0E0BCB00C002C004C00512108FD005D004D0A7 +:040BD90002020C2DDB +:030BDD00BA130B3D +:0B0BE000907DC1E0FB908800F0804297 +:030BEB00BA141128 +:0E0BEE00C002C004C0051211DDD005D004D035 +:030BFC0002802E46 +:030BFF00BA151D07 +:0C0C0200907DC1E0F575907DC2E0F576B4 +:0E0C0E00C002C004C0051213FED005D004D0F1 +:030C1C0002800E45 +:030C1F00BA160BF7 +:0B0C2200C004C0051213A3D005D004CD +:0B0C2D00907FC9E4F075310002092A35 +:010C38002299 +:070C3900535550454E4400E5 +:070C4000524553554D4500DC +:060C470020566F6C200036 +:0D0C4D004441425553422076312E30300094 +:0E0C5A00C0E0C0F0C082C083C002C003C0046E +:0E0C6800C005C006C007C000C001C0D075D0D6 +:0D0C760000C086758600E591C2E4F59190FE +:0E0C83007FAB7401F0907FE8E0FA907FE9E02B +:060C9100FBBB0002800322 +:030C9700020D3813 +:030C9A00BA801409 +:0E0C9D00907F007401F0907F01E4F0907FB52D +:060CAB007402F0020ECD00 +:050CB100BA820280037D +:030CB600020D1D0F +:080CB900907FECE0FCBC01009F +:020CC1004021D0 +:060CC300C374079C401BF6 +:0E0CC900EC24FF25E0FD24C6F582E4347FF51F +:0D0CD70083E0FD530501907F00EDF0802BC0 +:030CE400BC8100D0 +:020CE7004021AA +:060CE900C374879C401B50 +:0E0CEF00EC247F25E0FC24B6F582E4347FF58A +:0D0CFD0083E0FC530401907F00ECF08005C3 +:050D0A00907F00E4F001 +:0E0D0F00907F01E4F0907FB57402F0020ECDEB +:050D1D00BA8102800311 +:030D2200020EC5F9 +:0E0D2500907F00E4F0907F01E4F0907FB574C1 +:050D330002F0020ECDEC +:030D3800BB012DCF +:060D3B00BA0003020ECD18 +:030D4100BA0211E2 +:0D0D4400755900C002C003120EF0D003D09C +:040D510002020ECDBF +:050D5500BA2102800339 +:030D5A00020ECDB9 +:0B0D5D00753701907FC5E4F0020ECD59 +:030D6800BB031FAB +:060D6B00BA0003020ECDE8 +:050D7100BA020280033C +:030D7600020ECD9D +:0D0D7900755901C002C003120EF0D003D066 +:040D860002020ECD8A +:030D8A00BB065451 +:050D8D00BA80028003A2 +:030D9200020EC589 +:080D9500907FEBE0FCBC0115AE +:0C0D9D007CFB7D0F8D067F00907FD4EE64 +:090DA900F0907FD5ECF0020ECDB4 +:0A0DB200907FEBE0FCBC020280031E +:030DBC00020EC55F +:0A0DBF00907FEAE0FCBC0002800314 +:030DC900020EC552 +:0C0DCC007C3B7D0F8D067F00907FD4EEF5 +:090DD800F0907FD5ECF0020ECD85 +:060DE100BB0703020EC572 +:030DE700BB081036 +:0D0DEA00AC48907F00ECF0907FB57401F0F4 +:030DF700020ECD1C +:030DFA00BB093101 +:050DFD00BA00028003B2 +:030E0200020EC518 +:0E0E0500907FEAE0FCC374019C5003020EC50E +:080E1300907FEAE0FCBC000A3C +:0A0E1B00901721E4F0901722E4F094 +:090E2500907FEAE0F548020ECDD1 +:030E2E00BB0A27D5 +:050E3100BA81028003FC +:030E3600020EC5E4 +:0E0E3900907FECE0FA2420FAE43417FC8A8261 +:0E0E47008C83E0FA907F00F0907FB57401F08C +:030E5500020ECDBD +:050E5800BB0B0280034A +:030E5D00020EA9D9 +:0D0E6000901720E4F0907FECE0FABA011A40 +:080E6D00907FEDE0FABA0012DB +:0E0E7500907FEAE0FA901721F0C0031204E229 +:040E8300D0038046D2 +:080E8700907FECE0FABA023E94 +:080E8F00907FEDE0FABA003695 +:0D0E9700C0031204EFD003907FEAE0FA9050 +:050EA4001722F080247C +:050EA900BB12028017DE +:050EAE00BB8102800D74 +:050EB300BB8302800872 +:050EB800BB8202800373 +:030EBD00BB8405EE +:050EC00012064E80083F +:080EC500907FB47403F0800675 +:060ECD00907FB47402F0F6 +:020ED300D086C7 +:0E0ED500D0D0D001D000D007D006D005D00478 +:0D0EE300D003D002D083D082D0F0D0E03216 +:0B0EF000907FECE0F55AC39401401D18 +:070EFB00C37407955A40166D +:0D0F0200E55A24FF25E0FA24C6F582E43408 +:090F0F007FF583AA59EAF0802263 +:070F1800C3E55A9481401B60 +:070F1F00C37487955A4014CA +:0D0F2600E55A24FF25E0FA24B6F582E434F4 +:070F33007FF583AA59EAF0E3 +:010F3A002294 +:0E0F3B000902BA000301004000090400000092 +:0E0F49000101000009240100013D0001010C1E +:0E0F570024020110070002030000000D240612 +:0E0F650003010215000300030000092403022B +:0E0F7300010100010009240304020300030031 +:0E0F8100092403050306000100090401000015 +:0E0F8F00010200000904010101010200000737 +:0E0F9D002401020101000B24020102021001D6 +:0E0FAB0080BB00090588050001010000072534 +:0E0FB900010000000009040200020000000018 +:0E0FC7000705820240000007050202400000FC +:0E0FD50009040201030000000007058202402B +:0E0FE30000000705020240000009058905A074 +:0A0FF1000101000000FFFFFFFF00F8 +:0E0FFB00120100010000004047059999000115 +:0E10090000000001000000000000000902BA13 +:0410170000030100D1 +:02101B007A0059 +:03101D00BA050011 +:02102000501767 +:08102200907FA5E0FB30E00522 +:05102A00900001800DA3 +:0A102F00C0021201DDD0020A80E4C5 +:0310390090000123 +:01103C002291 +:0E103D00907DC1E0F9A3E0FAA3E0FB7C007D0A +:04104B007EEB6012C6 +:0E104F0089828A83E0A3A982AA838C828D8382 +:04105D00F00CDBEECA +:08106100907DC3E0907FB9F01F +:011069002264 +:0E106A00907DC1E0F9A3E0FAA3E0FB7CC47D19 +:041078007DEB60E5C7 +:0E107C008C828D83E00C89828A83F0A3A98286 +:04108A00AA83DBEE6C +:01108E00223F +:0E108F00907FA57480F00586907DC1E00586F7 +:0E109D00A3F012101B907FA60586A3A3E0F916 +:0510AB006016A305869C +:0D10B000907FA60586E0A30586F0C0011222 +:0610BD00101BD001D9ED6B +:0610C300907FA57440F0CF +:0110C9002204 +:0810CA009088027401F07A0025 +:0310D200BAFF0062 +:0210D500500ABF +:0A10D700C0021201DDD0020A80F110 +:0110E10022EC +:0510E200E56BB4C0083D +:0810E700908803E56CF080061F +:0610EF00908802E56CF0A0 +:0410F5007A007B0002 +:0B10F900C3EA9432EB6480948050073F +:051104000ABA00010B16 +:0211090080EE76 +:01110B0022C1 +:0A110C00908803E56DF005397A00C4 +:03111600BA2800F4 +:02111900500381 +:03111B000A80F84F +:05111E00E539B41008E2 +:0811230090880274C0F0800EF8 +:05112B00E539B42009C4 +:091130009088027480F07539000A +:021139007A003A +:03113B00BA2800CF +:02113E0050035C +:031140000A80F82A +:011143002289 +:04114400E56F6002F1 +:0211480080071E +:07114A007A007539008005F1 +:051151007A4075391021 +:09115600E56E2AFAE56E2539F573 +:0A115F003990880274802AF07A00AB +:08116900C3EA648094A850035E +:031171000A80F5FC +:011174002258 +:06117500AA70AB71AC7220 +:0C117B008A828B838CF01214EEFD601849 +:0D1187008D6DC002C003C00412110CD00415 +:09119400D003D0020ABA00010BDD +:02119D0080DCF4 +:01119F00222D +:0D11A000E573C4540FFA53020FC374099A8B +:0211AD005006EA +:0611AF0074372AFB8004E6 +:0411B50074302AFB6D +:0C11B9008B6DC00312110CD003AA7353FD +:0811C500020FC374099A5006E1 +:0611CD0074372AFB8004C8 +:0411D30074302AFB4F +:0511D7008B6D12110CEC +:0111DC0022F0 +:0711DD00907DC3E0FA600FF2 +:0C11E400907DC1E0F56E907DC2E0F56FDB +:0311F00012114495 +:0C11F300907DFFE4F07570C475717D758F +:0511FF007201121175E0 +:0112040022C7 +:021205007A0469 +:03120700BA4000EA +:02120A0050365C +:0E120C00EA24C0F582E4347DF583E0FB7C002B +:03121A00BC08000D +:02121D0050205F +:06121F008B05ED30E70B2A +:0B122500907F967442F074C3F08008C4 +:08123000907F96E4F07481F058 +:07123800EB25E0FB0C80DB5D +:03123F000A80C55D +:011242002289 +:041243007A007BEFC3 +:03124700BA1000DA +:02124A00502032 +:0E124C0074112BFB2400FCE43418FD8C828D01 +:0E125A0083E4F0EA2400F582E43419F583E41D +:04126800F00A80DB2D +:01126C00225F +:0E126D0074F82400F58274033484F583E4F0F1 +:0E127B0074F92400F58274033484F583E4F0E2 +:0E12890074FA2400F58274033484F583E4F0D3 +:0E12970074FB2400F58274033484F583E4F0C4 +:0E12A50074FF2400F58274033484F583E4F0B2 +:0112B3002218 +:0E12B4001203CB12126D7AC07B877C0174018D +:0E12C2002AFDE43BFE8C078A828B838CF0743D +:0E12D000011214BF2DFAE43EFB8F048D828EB6 +:0E12DE00838FF074061214BF74012AFDE43BE6 +:0E12EC00FE8C078A828B838CF0E41214BF7490 +:0E12FA00012DFAE43EFB8F048D828E838FF06F +:0E130800740B1214BF74012AFDE43BFE8C0727 +:0E1316008A828B838CF074081214BF74012D30 +:0E132400FAE43EFB8F048D828E838FF07401FD +:0E1332001214BF2AFDE43BFE8C078A828B83D7 +:0E1340008CF0E41214BF74012DFAE43EFB8F12 +:0E134E00048D828E838FF074031214BF7D0015 +:03135C00BD0600CB +:02135F0050122A +:0B1361008A828B838CF00ABA00010B1B +:07136C00E41214BF0D80E93B +:0D1373008A828B838CF0E5741214BF74F92C +:0E1380002400F58274033484F583740FF07436 +:0E138E00FE2400F58274033484F5837401F0AC +:06139C001203E11204F748 +:0113A2002228 +:0D13A300907DC1E0FA2400FBE43419FC90B9 +:0E13B0007DC2E0FD8B828C83F075F011EAA403 +:0313BE00FA7B00B7 +:0313C100BB10005E +:0213C4005024B3 +:0E13C600EA2400FCE43418FDEB2CFCE43DFDB1 +:0E13D40074042B24C0F582E4347DF583E0FE22 +:0813E2008C828D83F00B80D793 +:0E13EA00EA2400FAE43418FB74102AF582E4B9 +:0513F8003BF583E4F069 +:0113FD0022CD +:0413FE00E57660022E +:02140200801652 +:0C140400740F5575FA8A752400F582E417 +:0A1410003419F583E0F5741212B4EC +:0A141A001210CA756E00756F001203 +:0614240011447570B9755A +:06142A007114757202123C +:0B1430001175E576B402047401800120 +:01143B00E4CC +:03143C00FA700F34 +:0C143F0074012575F573C0021211A0D0D5 +:03144B0002800A12 +:0A144E00857573C0021211A0D002D0 +:0C145800756E00756F01C002121144D0C7 +:0414640002EA701A0E +:0D14680075F011E575A4FA2400FAE43418BB +:09147500FB8A708B717572011283 +:04147E00117580362E +:021482007A00EE +:03148400BA10009B +:02148700502FE4 +:0D148900EA2400F582E43419F583E0FBE568 +:0414960075B5031B0A +:0E149A0075F011EAA4FB2400FBE43418FC8B6F +:0914A800708C71757201C0021212 +:0414B1001175D002DF +:0314B5000A80CCDE +:0114B8002211 +:0614B90050726F67200075 +:0E14BF00C8C0E0C8C0E0E5F0600B14600F1478 +:0714CD00601114601280158C +:0714D400D0E0A882F6800EB3 +:0514DB00D0E0F08009E3 +:0414E000D0E08005D3 +:0514E400D0E0A882F237 +:0414E900C8D0E0C8BF +:0114ED0022DC +:0E14EE00C8C0E0E5F0600D14600F14600F142C +:0614FC00601074FF800F78 +:05150200A882E6800A4A +:03150700E080077A +:04150A00E4938003E3 +:03150E00A882E2CE +:04151100F8D0E0C866 +:0115150022B3 +:00000001FF + + * Copyright (C) 1999 BayCom GmbH + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that redistributions of source + * code retain the above copyright notice and this comment without + * modification. diff --git a/linux/firmware/ihex2fw.c b/linux/firmware/ihex2fw.c new file mode 100644 index 000000000..660b191ed --- /dev/null +++ b/linux/firmware/ihex2fw.c @@ -0,0 +1,268 @@ +/* + * Parser/loader for IHEX formatted data. + * + * Copyright © 2008 David Woodhouse <dwmw2@infradead.org> + * Copyright © 2005 Jan Harkes <jaharkes@cs.cmu.edu> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <stdint.h> +#include <arpa/inet.h> +#include <stdio.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/mman.h> +#include <fcntl.h> +#include <string.h> +#include <unistd.h> +#include <stdlib.h> +#define _GNU_SOURCE +#include <getopt.h> + + +struct ihex_binrec { + struct ihex_binrec *next; /* not part of the real data structure */ + uint32_t addr; + uint16_t len; + uint8_t data[]; +}; + +/** + * nybble/hex are little helpers to parse hexadecimal numbers to a byte value + **/ +static uint8_t nybble(const uint8_t n) +{ + if (n >= '0' && n <= '9') return n - '0'; + else if (n >= 'A' && n <= 'F') return n - ('A' - 10); + else if (n >= 'a' && n <= 'f') return n - ('a' - 10); + return 0; +} + +static uint8_t hex(const uint8_t *data, uint8_t *crc) +{ + uint8_t val = (nybble(data[0]) << 4) | nybble(data[1]); + *crc += val; + return val; +} + +static int process_ihex(uint8_t *data, ssize_t size); +static void file_record(struct ihex_binrec *record); +static int output_records(int outfd); + +static int sort_records = 0; +static int wide_records = 0; + +int usage(void) +{ + fprintf(stderr, "ihex2fw: Convert ihex files into binary " + "representation for use by Linux kernel\n"); + fprintf(stderr, "usage: ihex2fw [<options>] <src.HEX> <dst.fw>\n"); + fprintf(stderr, " -w: wide records (16-bit length)\n"); + fprintf(stderr, " -s: sort records by address\n"); + return 1; +} + +int main(int argc, char **argv) +{ + int infd, outfd; + struct stat st; + uint8_t *data; + int opt; + + while ((opt = getopt(argc, argv, "ws")) != -1) { + switch (opt) { + case 'w': + wide_records = 1; + break; + case 's': + sort_records = 1; + break; + default: + return usage(); + } + } + + if (optind + 2 != argc) + return usage(); + + if (!strcmp(argv[optind], "-")) + infd = 0; + else + infd = open(argv[optind], O_RDONLY); + if (infd == -1) { + fprintf(stderr, "Failed to open source file: %s", + strerror(errno)); + return usage(); + } + if (fstat(infd, &st)) { + perror("stat"); + return 1; + } + data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, infd, 0); + if (data == MAP_FAILED) { + perror("mmap"); + return 1; + } + + if (!strcmp(argv[optind+1], "-")) + outfd = 1; + else + outfd = open(argv[optind+1], O_TRUNC|O_CREAT|O_WRONLY, 0644); + if (outfd == -1) { + fprintf(stderr, "Failed to open destination file: %s", + strerror(errno)); + return usage(); + } + if (process_ihex(data, st.st_size)) + return 1; + + output_records(outfd); + return 0; +} + +static int process_ihex(uint8_t *data, ssize_t size) +{ + struct ihex_binrec *record; + uint32_t offset = 0; + uint8_t type, crc = 0, crcbyte = 0; + int i, j; + int line = 1; + int len; + + i = 0; +next_record: + /* search for the start of record character */ + while (i < size) { + if (data[i] == '\n') line++; + if (data[i++] == ':') break; + } + + /* Minimum record length would be about 10 characters */ + if (i + 10 > size) { + fprintf(stderr, "Can't find valid record at line %d\n", line); + return -EINVAL; + } + + len = hex(data + i, &crc); i += 2; + if (wide_records) { + len <<= 8; + len += hex(data + i, &crc); i += 2; + } + record = malloc((sizeof (*record) + len + 3) & ~3); + if (!record) { + fprintf(stderr, "out of memory for records\n"); + return -ENOMEM; + } + memset(record, 0, (sizeof(*record) + len + 3) & ~3); + record->len = len; + + /* now check if we have enough data to read everything */ + if (i + 8 + (record->len * 2) > size) { + fprintf(stderr, "Not enough data to read complete record at line %d\n", + line); + return -EINVAL; + } + + record->addr = hex(data + i, &crc) << 8; i += 2; + record->addr |= hex(data + i, &crc); i += 2; + type = hex(data + i, &crc); i += 2; + + for (j = 0; j < record->len; j++, i += 2) + record->data[j] = hex(data + i, &crc); + + /* check CRC */ + crcbyte = hex(data + i, &crc); i += 2; + if (crc != 0) { + fprintf(stderr, "CRC failure at line %d: got 0x%X, expected 0x%X\n", + line, crcbyte, (unsigned char)(crcbyte-crc)); + return -EINVAL; + } + + /* Done reading the record */ + switch (type) { + case 0: + /* old style EOF record? */ + if (!record->len) + break; + + record->addr += offset; + file_record(record); + goto next_record; + + case 1: /* End-Of-File Record */ + if (record->addr || record->len) { + fprintf(stderr, "Bad EOF record (type 01) format at line %d", + line); + return -EINVAL; + } + break; + + case 2: /* Extended Segment Address Record (HEX86) */ + case 4: /* Extended Linear Address Record (HEX386) */ + if (record->addr || record->len != 2) { + fprintf(stderr, "Bad HEX86/HEX386 record (type %02X) at line %d\n", + type, line); + return -EINVAL; + } + + /* We shouldn't really be using the offset for HEX86 because + * the wraparound case is specified quite differently. */ + offset = record->data[0] << 8 | record->data[1]; + offset <<= (type == 2 ? 4 : 16); + goto next_record; + + case 3: /* Start Segment Address Record */ + case 5: /* Start Linear Address Record */ + if (record->addr || record->len != 4) { + fprintf(stderr, "Bad Start Address record (type %02X) at line %d\n", + type, line); + return -EINVAL; + } + + /* These records contain the CS/IP or EIP where execution + * starts. Don't really know what to do with them. */ + goto next_record; + + default: + fprintf(stderr, "Unknown record (type %02X)\n", type); + return -EINVAL; + } + + return 0; +} + +static struct ihex_binrec *records; + +static void file_record(struct ihex_binrec *record) +{ + struct ihex_binrec **p = &records; + + while ((*p) && (!sort_records || (*p)->addr < record->addr)) + p = &((*p)->next); + + record->next = *p; + *p = record; +} + +static int output_records(int outfd) +{ + unsigned char zeroes[5] = {0, 0, 0, 0, 0}; + struct ihex_binrec *p = records; + + while (p) { + uint16_t writelen = (p->len + 9) & ~3; + + p->addr = htonl(p->addr); + p->len = htonl(p->len); + write(outfd, &p->addr, writelen); + p = p->next; + } + /* EOF record is zero length, since we don't bother to represent + the type field in the binary version */ + write(outfd, zeroes, 5); + return 0; +} diff --git a/linux/firmware/ttusb-budget/dspbootcode.bin.ihex b/linux/firmware/ttusb-budget/dspbootcode.bin.ihex new file mode 100644 index 000000000..b4b224707 --- /dev/null +++ b/linux/firmware/ttusb-budget/dspbootcode.bin.ihex @@ -0,0 +1,820 @@ +:1000000008AA001800030800001000000180185F13 +:100010000000018077182AEB6BF8001803FF68F8DE +:100020000018FFFEF7B8F7BEF6B9F4A0F6B7F6B5BC +:10003000F6B6F02019DFF1000001F84D01ABF6B87B +:10004000F02019DFF07301A57EF80012F000000126 +:1000500047F800117E9200F80011F00000017EF8D0 +:100060000011F00000016C89019AF7B8EEFCF02055 +:10007000FFFFF1000001F84D01BFF27301B94E021C +:10008000F495F5E356027E001100FA4C01B76B03BC +:100090000001F6B8EE04F0740DA7F07401C54A1122 +:1000A0004A1672112AE610F80011FA4501DBF495A0 +:1000B000EEFF4811F0002AC68816F495F49510EE6C +:1000C000FFFFF4E36CE9FFFF01D510F82AE7F845DC +:1000D00001E210F82AE7F4E3F07401FFEE018A165A +:1000E0008A11FC00F7B8E9204A1109F82AE6F84E0F +:1000F00001F3F27301FDF495E80172112AE649114A +:1001000080E12AC6F3000001E80081F82AE68A119E +:10011000FC00F495F073020010F82A0FFC004A115D +:10012000F074020280F82A107308000940F82A15BA +:1001300082F80011F495771003E8F5A9F830022150 +:1001400071F82A102A1556F82A0CF0E34EF82A16F0 +:10015000E8004EF82A0C8A11FC004A064A074A1D9C +:1001600068F800077D3F69F80007400068F8001D47 +:10017000FFFC6BF82A0F00018A1D8A078A06F4EB40 +:10018000EEFD76F82A0F000076000000FB80194C87 +:10019000F495E80080F82A11F980190780F82A0EF2 +:1001A000F980166676002A1210F82A11F98018E3F1 +:1001B00010F82A0EF980166610F82A0EF9801687B4 +:1001C000EE03FC004A11F6B8F495F020800011F817 +:1001D0002A5AF84D029311F82A9FF84C027C7712A4 +:1001E0002A39491201F82A9F8911F495F4957181F1 +:1001F00000116CE1FFAB02936BF82A9F0001E90547 +:1002000001E2000381F82AA0F073029572112A9F7F +:10021000F49510E12A396BF82A9F000111F82A9F02 +:1002200009F82AA0F84C029376F82A5A000076F8CA +:100230002A9F000076F82AA000008811F495481142 +:100240008A11FC004A11EEFE10F82A5AF84402B254 +:1002500076F82A5A0001F07402588811F495771044 +:100260008000F4A9F83002B24811F03000FF80009D +:1002700010F82A5BF98018D6EE028A11FC00F4957A +:100280004A084A094A0A4A0B4A0C4A0D4A104A11BE +:100290004A124A134A144A154A164A174A174A1963 +:1002A0004A0E4A064A074A1A4A1D4A1B4A1C68F85F +:1002B00000077D3F69F80007400068F8001DFFFC5B +:1002C000481868F80018FFFEF495F4954A08EEFD0A +:1002D000F07402588811F49577108000F4A9F83072 +:1002E00002EF4811F03000FF800010F82A5BF9801F +:1002F00018D6EE038A18F4958A1C8A1B8A1D8A1A5E +:100300008A078A068A0E8A198A178A178A168A1510 +:100310008A148A138A128A118A108A0D8A0C8A0B0F +:100320008A0A8A098A08F4EB4A1177112A397681F8 +:10033000005577122A1810E2000180E1000110E256 +:10034000000280E1000276E10003000076E1000493 +:1003500000AAF07402988A11FC004A118811F495E1 +:10036000F49510816FF82A9E0C88E8FF18E10001CF +:100370001AF82A9EF0301FFF80F82A9E8A11FC008E +:100380004A1177112A397681005577122A1811E21D +:10039000000181E1000111E2000281E1000276E149 +:1003A0000003000248086FE100040C98F03000FFE1 +:1003B00080E1000576E1000600AAF07402988A1137 +:1003C000FC004A1177112A397681005577122A18D4 +:1003D00010E2000180E1000110E2000280E1000271 +:1003E00076E1000300044811F00000048812F4953F +:1003F00077132A76E900E598F3000001F6B8480B78 +:1004000008F82A3CF8430371768200AAF074029837 +:100410008A11FC004A11EEF08811F495F49571816F +:10042000001471E1000100154911F3000002891167 +:10043000E7826DEA0004E7836DEB000A771A000596 +:10044000F07203AA1181F2E88082E9FF19E100014C +:10045000F1A0819211E1000CF2E88083E9FF19E13B +:10046000000DF1A081936DE9000248184918700051 +:100470000015F0000004F300000A80018102F2740C +:100480000E54F4954814EE108A11FC004A11F074D1 +:100490000C5E80F82A5C77122A3976820055771133 +:1004A0002A1810E1000180E2000110E1000280E260 +:1004B000000276E20003001CF6B856F82A16F0F0A7 +:1004C000F0F880E2000756F82A16F1F0E8FFF28013 +:1004D00080E2000656F82A16F1F8E8FFF28080E282 +:1004E000000557F82A16E8FFF28080E2000456F86B +:1004F000276CF0F0F0F880E2000B56F8276CF1F072 +:10050000E8FFF28080E2000A56F8276CF1F8E8FF75 +:10051000F28080E20009E8FF57F8276CF28080E261 +:10052000000856F8276AF0F0F0F880E2000F56F85D +:10053000276AF1F0E8FFF28080E2000E56F8276AA1 +:10054000F1F8E8FFF28080E2000D57F8276AE8FF33 +:10055000F28080E2000C76E20013000076E20012E6 +:1005600000006FF82A5C0C5880E20011E8FF18F8D0 +:100570002A5C80E2001076E20017000076E20016A6 +:1005800000006FF82A9E0C5880E20015E8FF18F86A +:100590002A9E80E2001476E2001B000076E2001A38 +:1005A000000076E20019000070E20018276E76E283 +:1005B000001F000076E2001E000076E2001D000031 +:1005C00076E2001C000076E2002000AAF074029897 +:1005D0008A11FC004A11EEFE10F82A38F84504EDA5 +:1005E00077122A1810E200028811F495771000089B +:1005F0006DE9FFDFF6A9F8200475F073047DF010B3 +:100600000021F0001A8348087EF80008F4E2F07434 +:10061000030AF07304EA4812F2740323F0000004A2 +:10062000F2740336F495E800F07304EA77112A189F +:10063000E8FF6FE100040D4818E10005F274096954 +:10064000F495F2A0F0740336F07304EA77112A18D7 +:10065000E8FF6FE100040D4818E10005F27409415C +:10066000F495F2A0F0740336F07304EAF0740357C3 +:10067000F07304EA10F82A1CF07412A4F274033622 +:10068000F495E800F07304EA4812F2740380F00075 +:100690000004F2740336F495E800F07304EA10F8ED +:1006A0002A1CF07412C5F2740336F495E800F07356 +:1006B00004EA77112A18E8FF6FE100060D4818E1F7 +:1006C000000771E100050012F2A070000012800125 +:1006D00010E10004F0740E7AF2740336F495E80029 +:1006E000F07304EAF07403BC76F82A380000EE02D6 +:1006F0008A11FC004A1177112A3976810055771248 +:100700002A1810E2000180E1000110E2000280E1FD +:10071000000276E1000300094811F000000488128D +:10072000F49577132A86E900E598F3000001F6B8FE +:10073000480B08F82A3CF843050A768200AAF074B0 +:1007400002988A11FC004A1177112A3976810055E6 +:1007500077132A1810E3000180E1000110E3000282 +:1007600080E1000213E3000381E1000348117711E7 +:100770000000F84D0544F000000488124813F00012 +:1007800000048813F495F495E5986D91F6B8481136 +:1007900008F82A3CF843053AF0202A394911F500B7 +:1007A0008911F495F49576E1000400AAF07402989A +:1007B0008A11FC004A1177112A3976810055771287 +:1007C0002A1810E2000180E1000110E2000280E13D +:1007D000000276E10003000C4811F00000048812CA +:1007E000F49577132A7AE900E598F3000001F6B84A +:1007F000480B08F82A3CF843056A768200AAF07490 +:1008000002988A11FC004A1177112A397681005525 +:1008100077122A1810E2000180E1000110E20002C4 +:1008200080E1000276E1000300194811F0000004A5 +:100830008812F49577132A5DE900E598F30000012A +:10084000F6B8480B08F82A3CF8430593768200AACC +:10085000F07402988A11FC004A11881110F82A38A5 +:10086000F84405E310F82AA1F84405BA6CE1FF56F4 +:1008700005E372122AA1F49570E22A1800116BF8B0 +:100880002AA10001F07305E372122AA1F49570E227 +:100890002A18001110F82AA1F00000018812F4951E +:1008A000F4956EE2FFFC05D173122AA14811F00005 +:1008B000000580F82AA210F82AA108F82AA2F84414 +:1008C00005E36CE1FFAB05DD76F82A38000176F828 +:1008D0002AA1000076F82AA200008A11FC00F495F3 +:1008E0004A084A094A0A4A0B4A0C4A0D4A104A1158 +:1008F0004A124A134A144A154A164A174A174A19FD +:100900004A0E4A064A074A1A4A1D4A1B4A1C68F8F8 +:1009100000077D3F69F80007400068F8001DFFFCF4 +:10092000481868F80018FFFEF495F4954A08EEFFA1 +:1009300010F82A5BF9801804F07405A2EE018A18F9 +:10094000F4958A1C8A1B8A1D8A1A8A078A068A0ECF +:100950008A198A178A178A168A158A148A138A129C +:100960008A118A108A0D8A0C8A0B8A0A8A098A08D7 +:10097000F4EBEEFD76F82A38000076F82A5A0000EB +:10098000E8014E00FB8017D6F495E80180F82A5B59 +:1009900076002A8FF98016AA10F82A5BF980175C76 +:1009A00010F82A5BF980176FFB801666F495E81A39 +:1009B000FB801687F495E81AFB801666F495E81B11 +:1009C000FB801687F495E81BEE03FC004A11F495B2 +:1009D00013028811E800F84D066AF3100001891A25 +:1009E000F495F07206691C918A11FC004A11881175 +:1009F00012031102F8450679F0100001881AF495E7 +:100A0000F072067881918A11FC004A11F495710206 +:100A10000011110361F800110001F8300691F6B8D9 +:100A20006FF800110C1F8811F3E8E8FF1881F1A09E +:100A30008181F073069DF6B86FF800110C1F8811C4 +:100A4000F33000FFF020FF001881F1A081818A11AE +:100A5000FC004A11F495110261F8000B0001F82026 +:100A600006B1490BF61F8811F495F4951081F273C5 +:100A700006B8F03000FF490BF61F8811F495F49585 +:100A80001281F4788A11FC004A11F4957102001267 +:100A900013038811E800F84D06CCF3100001891A01 +:100AA000F495F07206CB1192F2C081918A11FC008C +:100AB0008812120271010013F84506DBF0100001E4 +:100AC000881AF495F07206DAE598FC004A11EEFEF9 +:100AD0008811110410067105001261F8001200015E +:100AE000F82006EAF0000001F6B8F00000016FF807 +:100AF00000120F1F48088100F47F8001F27406BACB +:100B0000F4954811EE028A11FC004A11EEFE88129B +:100B1000110410067105001361F800130001F8209C +:100B20000709F0000001F00000018811F6B86FF825 +:100B300000130F1F81004811F47F8001F27406CE6C +:100B4000F49548124811F030FFFEEE028A11FC00C5 +:100B50004A114A164A17EEFCF495800271080016F5 +:100B60001009710B00178003710A00114817F8452E +:100B7000073F700000111003F074069F80017000A1 +:100B800000161002F074067B6D916D966CEFFFFFFE +:100B9000072FEE048A178A168A11FC004A11EEFE0E +:100BA00010F82AE808F82AE9F845076476000001F9 +:100BB00062F82AE9005EF274120BF0003040721104 +:100BC0002AE97710000FF5A9F82007616BF82AE9E8 +:100BD0000001F073076476F82AE90000EE028A113A +:100BE000FC004A118811E80075F800080008E800C8 +:100BF00075F800080009F6B8F495F020FC3F75F888 +:100C00000008000DF0200C3075F80008000C76F894 +:100C10002AE8000076F82AE900006C81079276F84D +:100C20002AEA0000FB801676F495E810E80075F8D3 +:100C300000080000F07307A876F82AEA0001FB809C +:100C40001666F495E810FB801687F495E810E80026 +:100C500075F800080000F6B8F495F020FFFF75F86D +:100C6000000800008A11FC00F4954A084A094A0A63 +:100C70004A064A074A1D68F800077D3F69F80007E1 +:100C8000400068F8001DFFFC10F82AEAF84507E16B +:100C900010F82AE8F0000001F030000F80F82AE890 +:100CA00010F82AE8F84407D6F6B8F495F020FC3F8F +:100CB00075F80008000DF0200C3075F80008000CE5 +:100CC000E80075F800080000F6B8F495F020FFFF82 +:100CD00075F8000800008A1D8A078A068A0A8A09B0 +:100CE0008A08F4EBEEFFF2740767F495E801EE0171 +:100CF000FC004A074A1D68F800077D3F69F80007B5 +:100D0000400068F8001DFFFC8A1D8A07F4EB4A11B9 +:100D10007711002876812400E80075F800080001AA +:100D2000F2740767F495E8007711001D6881007F71 +:100D3000F6B8F495F020FF807711001DF030010027 +:100D40001A818081F0740A33F07411ACF980132594 +:100D5000F9801653F9801782F074062FF98014B2C7 +:100D6000F9801910F0740DE3F07407E8F07402369E +:100D70008A11FC004A1160F8277BFFFFF830083920 +:100D800071F8277B277960F82779FFFFF83008B2E0 +:100D900010F8298608F82779F0307FFF8811F4953C +:100DA00077104000F6A9F830085810F8277908F8AD +:100DB000277AF0307FFF8811F49577104000F6A96C +:100DC000F820086376F82779FFFF76F8277BFFFF86 +:100DD000F7B8F27308D9F020FFFFF6B856F8277479 +:100DE000F0F9881156F82772F0F98812F495F49505 +:100DF000E720F4A9F830088FF120277C4811F6008D +:100E00008813F495F495108308F82779F0307FFF64 +:100E10008813F49577104000F5ABF830088F6D918A +:100E20004811F03001FF8811F495E720F7A9F83058 +:100E300008746D894811F03001FFF0E7F495480817 +:100E40004EF827744808F1F98911F495F49571E189 +:100E5000277C277A60F8277BFFFFF83008AB48082B +:100E60004EF8277276F8277BFFFF76F82779FFFF89 +:100E7000F27308D9F495E80044F8277340F8277511 +:100E800082F80011F49577108000F6A9F82008D8B0 +:100E9000F6B810F82773F000800048084EF8277461 +:100EA0004808F0F98811F495F49571E1277C277AC8 +:100EB000F7B857F82774F062FFFFF040FF80F28028 +:100EC0004EF82774E8008A11FC004A114A16EEFB1E +:100ED00011F8277109F8277389118810F495F49592 +:100EE000F6A9F82008EDF273090EF495E800F62053 +:100EF00076000041F07412EE8816F495F7B86D96FE +:100F000010F80016F847090AE7617600000076013C +:100F10000080760200FF76030000F2740CB9F495AD +:100F2000E8006CE9FFFF08FB7316000EF066004155 +:100F3000EE058A168A11FC004A11F495710200131D +:100F4000F6B877117FFF57F827724811F280F0004A +:100F500080008811F640F0E0F1F1E801F28080F8BD +:100F600027787712800057F827724812F28088128B +:100F7000F495F4956C820938E80075F800080001D2 +:100F8000F073093DF020800175F8000800017081C0 +:100F900000138A11FC004A11F0307FFF11F82986F6 +:100FA000F520F3307FFF8911F49577104000F6A902 +:100FB000F8200954F2730967F495E8026FF8277A6C +:100FC0000D20F3307FFF8911F49577104000F6A9CA +:100FD000F8200964F2730967F495E80180F8277B2B +:100FE000E8008A11FC004A1111F82986F520F33037 +:100FF0007FFF8911F49577104000F6A9F820097A4F +:10100000F273098DF495E8026FF8277A0D20F3301A +:101010007FFF8911F49577104000F6A9F820098A1E +:10102000F273098DF495E80180F82779E8008A11B8 +:10103000FC004A11F495710200128811F6B857F8B5 +:101040002772F0207FFFF280F0008000808157F847 +:101050002772E801F3F1F28080F827787711800099 +:10106000481157F82772F2808811F495F4956C8135 +:1010700009B5E80075F800080001F07309BAF0201E +:10108000800175F80008000145F8277143F82773BF +:1010900083F80011F495E720F6A9F83009C9F27336 +:1010A00009E47712000057F82772F0207FFFF280E2 +:1010B0004912F500F300800061F8000B8000F83061 +:1010C00009DCF1208000F5208912F49548126FF8B0 +:1010D00027730D00F495490B4FF827728A11FE0013 +:1010E0004812F4954A114A164A17EEFCF495710815 +:1010F00000168817F0740830481870000016F27453 +:10110000098FF00000028811F495F4956C810A0AA9 +:10111000F27408DBF4954816481870000016F27453 +:10112000098FF00000028811100270010011800088 +:10113000F27406CEF495481749114817F60088173F +:10114000E760F5A9F8200A2D4816F62088114818FE +:1011500070000011F274098FF00000028811700114 +:10116000001110028000F27406CEF4954817EE04C8 +:1011700048168A178A168A11FC00EEFDE8004EF820 +:101180002770E8004EF82772E8004EF82774E80050 +:101190004EF8277676F82779FFFF76F8277A000051 +:1011A00076F8277BFFFF76F827780000E80075F8CF +:1011B000000800017600000076010200F27412DCE3 +:1011C000F020277CEE03FC004A11EEFCF4954E0063 +:1011D00077127FFFF6B84912F180F3008000891280 +:1011E000F0E0F1F14F02E901F495480BF5405602A9 +:1011F000F18081F827787711800056004911F1803D +:101200008911F495F4956C810A81E80075F800085D +:101210000001F0730A86F020800175F800080001D3 +:101220001082EE048A11FC004A11EEFEF4954E0085 +:1012300077117FFFF6B84911F180F3008000891122 +:10124000F0E0F1F1E801F28080F827785600F12013 +:101250008000F180F495490BF84D0AABF020800135 +:1012600075F800080001F0730AAFE80075F800088F +:101270000001EE0248118A11FC004A118812130283 +:1012800077110000F84D0ACBF3100001891AF4958C +:10129000F0720ACA48111CF8297E881111F8297EBB +:1012A000F200000180F8297E819248118A11FC0029 +:1012B0004A11F495710200118812F6B8F0207FFFF0 +:1012C00057F82770F280F0008000808257F827706E +:1012D000E801F3F1F28080F8277877128000481255 +:1012E00057F82770F2808812F495F4956C820AF40E +:1012F000E80075F800080001F0730AF9F020800199 +:1013000075F80008000145F82775E71043F82771C4 +:1013100083F800126DE800046D8AF6AAF8300B0A13 +:10132000F2730B257711000057F82770F0207FFF2C +:10133000F2804911F500F300800061F8000B800095 +:10134000F8300B1DF1208000F5208911F49548112B +:101350006FF827710D00F495490B4FF8277048116D +:101360008A11FC004A114A164A17EEF08817101726 +:1013700080051016800610158007711400111005E5 +:10138000F030000188101006F0300001800849118B +:101390001005F6018009100661F800080001F82028 +:1013A0000B4B1009F0000001800971080012F4AA2B +:1013B000F8300B541009F00000018009120949119E +:1013C000F47F8009F620800A56F827704E0C100929 +:1013D00080004818F2740ACEF00000048816F495D4 +:1013E000F4956C860B6DF2730C59F495E800F6B821 +:1013F000F495560CF0F98812F495F49570E2277C78 +:101400002986E800800E4811F8450BCC77100001C2 +:10141000F4A9F8300B896CE1FFFD0B8B10E700029B +:10142000800EF0730B8B1087800EE710F5AEF8205E +:101430000BB270000017700100161004F07406CE95 +:1014400048174916F60088174811F6208811100928 +:10145000F62080004818F2740ACEF00000048816C6 +:1014600010047000001770010011F07406CE4811CE +:1014700000048004F0730BBC7000001770010011B1 +:101480001004F07406CE4811000480044911481677 +:10149000F6208816F495F4956C860BCC100A800023 +:1014A0004818F2740ACEF00000048816120AF845B3 +:1014B0000C33710A0010F4AEF8300C1C4816F0E141 +:1014C00088111208F8450BDB6D891207F8450BE906 +:1014D0001007800070020011100680011004F074E3 +:1014E00006DCF0730BEF48116F000C9F1004F074D2 +:1014F0000AB3110EF1C0810E10064911F6008006E4 +:101500001005F6208811F000000148086F000C9FBC +:101510004818F2740ACEF00000041207F8450C11C6 +:101520001007800070020011100680011004F07492 +:1015300006DCF0730C1748116F000C9F1004F07458 +:101540000AB3110EF1C0810EF0730C331207F84587 +:101550000C2A10078000100680011005800210047C +:10156000F07406DCF0730C3012056F000C9F100451 +:10157000F0740AB3110EF1C0810E76000001481814 +:10158000F2740ACEF0000004710400117081298603 +:10159000100E1CF82986800E760000014818F2749F +:1015A0000ACEF0000004100E71040011808110F8C2 +:1015B0002986F0000001F0307FFF80F829861009AD +:1015C000F00000028009EE108A178A168A11FC00CA +:1015D00010F8277508F82771F01000014808FC0082 +:1015E0004A114A16EEFFF49571040016F00000014E +:1015F00048084EF8297C6DEEFFFD4816F8450C9919 +:1016000056F8297CF0740A5A881110F8297DF000E8 +:10161000000148084EF8297C10F82982F0000001EA +:101620008810F495F495F4A9FA300C9680F8298284 +:1016300056F82980F00000014EF8298073112982A4 +:101640006CEEFFFF0C76EE018A168A11FC004A113F +:1016500076F82984000076F829850001E8004EF824 +:101660002A0C76F82986000076F829870000771181 +:1016700029887681AAAA76E10001AAAA76E1000269 +:1016800000008A11FC004A11EEFCF495710600146A +:10169000710700137108001271090015771000FF1F +:1016A000F4AAF8300D44491353F82A0C4FF82A0CC9 +:1016B0007312000EF166000D8911F4957710000188 +:1016C00071E124000011F4A9F8300D177710000221 +:1016D000F4A9F8300CEC7711298A76810000E80033 +:1016E0007714000077130000F0730D486C830CFA38 +:1016F0007711298A4812F0E8F04080008081E800E4 +:1017000077140000F0730D484913F340800081F80E +:10171000298A61F800150001F8200D0769F8298A67 +:10172000400061F800140001F8200D0F69F8298AC3 +:1017300020007711298A4912F3E81B818181F07317 +:101740000D4811F82984F84C0D37771129887681D6 +:10175000AAAA11F82985F3100001F340AA0081E13B +:101760000001760000028001700200147003001373 +:10177000F2740B28F495481171F829852984F073C7 +:101780000D737600000080017602000070030013E4 +:10179000F2740B28F495E800F0730D737711298A21 +:1017A0007081001311F82984F84C0D68771129888D +:1017B0007681AAAA11F82985F3100001F340AA0046 +:1017C00081E10001760000038001700200147003C3 +:1017D0000013F2740B28F495481171F829852984B7 +:1017E000F0730D7376000001800170020014700325 +:1017F0000013F2740B28F49548116BF82984FFFF4D +:10180000EE048A11FC004A11F540F495480BF47877 +:101810008811F495F4956CE1FFB90D88F2730DA56C +:10182000F495E860F200000661F800110020F8303D +:101830000D9861F8000B0001F8200DA3F2000007DD +:10184000F0730DA361F8000B0001F8200DA1F273F5 +:101850000DA3F0000001F00000024808F47F8A1197 +:10186000FC00EEFFF07407FDF0740744F0740DB453 +:10187000F0740205F0740460F0730DAAEEFD10F828 +:101880002AA3F8440DCB10F82AA4F8450DD776000A +:101890000200F27409E8F020220076F82AA4000081 +:1018A00076F82AA70000F0730DD776000200F274D4 +:1018B00009E8F020200076F82AA3000076F82AA78D +:1018C0000001F0740C5EF0E0F0103A98F8470DE17A +:1018D00076F8276E0000EE03FC004A11EEFE771149 +:1018E00020007600AAAA76010200F274066CF49534 +:1018F000481176005555760102004811F274066CC5 +:10190000F000020076F82AA3000076F82AA400006E +:10191000E8004E00FB80153EF495E80480F82AA507 +:1019200076002AA8F980148776002AADFB8013621E +:10193000F495E80210F82AA5F9801463FB80166676 +:10194000F495E81CFB801687F495E81CE8014E002E +:10195000FB8017D6F495E80080F82AA676002AB70F +:10196000F98016AA10F82AA6F980175C10F82AA6A2 +:10197000F980176FEE028A11FC00F4954A084A09B3 +:101980004A0A4A074A1D68F800077D3F69F80007C0 +:10199000400068F8001DFFFC10F82AA7F8440E4B21 +:1019A00076F82AA30001F0730E4E76F82AA40001FF +:1019B0008A1D8A078A0A8A098A08F4EB4A114A169C +:1019C0004A17EEFE880E71080016710600171107FF +:1019D000F066000DF00025A0881176010006810058 +:1019E000F27406CEF00000017601000670000016C9 +:1019F0004811F27406CEF000000770810017EE0265 +:101A00008A178A168A11FC004A11880E7102001288 +:101A10001103F066000DF00024008811F495708128 +:101A200000126EE2FFFE0E8DF495E800E80180E101 +:101A3000000276E1000300FF76E10004000076E199 +:101A4000000B000076E1000C000081E100018A112A +:101A5000FC004A11EEFC880EF495F166000DF300CF +:101A600024008911F495F49576E1000C000076E1EC +:101A7000000B000076E10002000176000000760114 +:101A80000000800276030000F2740CB9F495E800BF +:101A9000EE048A11FC004A118819F4957319000E9E +:101AA000F166000DF2002400771525A077140000E0 +:101AB000771A001FF0720F14F6B849190985F84C0F +:101AC0000F13F100000589114915F3000001891376 +:101AD0004915F3000007891211931D91199289107D +:101AE000F495F4956C800F1311931D911992891040 +:101AF000F495F4956C800F1311931D911992891030 +:101B0000F495F4956C800F1311931D91199289101F +:101B1000F495F4956C800F1311931D91199289100F +:101B2000F495F4956C800F1311931D9119928911FE +:101B3000F495F4956C810F136D946DED000D4814C0 +:101B40008A11FC004A114A164A17EEF88817100D40 +:101B50008004100C8005710E00167317000EF066DD +:101B6000000DF0002400881110F82763F8450F32AB +:101B7000F2740E9FF495481710F82760F8440F3D53 +:101B800060E100020001F8200F6DF07311331004C2 +:101B900080001005F074069F1104F3000001810419 +:101BA0006D8E7710000171E100020012F4AAF83086 +:101BB0000F6277100002F4AAF8300F6D45E1000BB8 +:101BC000881043E1000C83F80012F495F495F4AA10 +:101BD000F8300F6DF0730F96F50081044916F5206B +:101BE000891676E1000C000076E10004000048163A +:101BF000F8451133F7B871E10002001210F8001235 +:101C0000F0100003F8460F8C10F80012F0100003DB +:101C1000F845101677100001F4AAF8300F9C7710E1 +:101C20000002F4AAF8300FA8F0730F9677100004A2 +:101C3000F4AAF83010B777100005F4AAF83010BCF9 +:101C4000F2740E9FF4954817F073113176E1000C91 +:101C5000000076E1000B000076E10004000076E170 +:101C60000002000211E1000CE803F6208912F4954D +:101C700077100003F5AAF8300FB66BF8276F000154 +:101C80008810F495F495F5AEF8200FBD481680063F +:101C90008813F49577100003F6ABF8200FC86BF8A3 +:101CA000276F00011206F845100010E100048000C3 +:101CB0001005800110048002100680034811F274A0 +:101CC000071EF0000005100600E1000480E100049A +:101CD000100600E1000C80E1000C881211061004CF +:101CE000F60080044816F62088168913F4957710BC +:101CF0000003F6ABF8200FF56BF8276F00017710A3 +:101D0000000C71E100040013F6ABF82010006BF832 +:101D1000276F00016CE2FFFD1131F6B86FE100059D +:101D20000C486FE100060C18F0300FFFF0000003C4 +:101D300080E1000B76E1000200034816F8451133FC +:101D400071E1000C001210E1000B4912F62088131B +:101D5000E80CF6208810F495F495F5ABF8201027E0 +:101D6000481380068810F495F495F5AEF8201030ED +:101D7000700600161206F845105F10E1000480009E +:101D80001005800110048002100680034811F274CF +:101D9000071EF0000005100600E1000480E10004C9 +:101DA000100600E1000C80E1000C881211061004FE +:101DB000F60080044816F6208816F4957710000C7B +:101DC00071E100040013F6ABF820105F6BF8276F89 +:101DD00000017710000CF6AAF820106BF2740E9F29 +:101DE000F495481771E1000C00127710000CF4AA6A +:101DF000F830107C7710000C71E1000B0013F6AB8B +:101E0000F83010B4E730F7AAF83010B4F2740EC10D +:101E1000F49548178812F495F4956C82108D76E14C +:101E20000004000076E100020005F07310B476E1D2 +:101E3000000200047710000C71E1000B0012F5AAFB +:101E4000F820109AF073109C7712000C76000000B6 +:101E50007001001270020017760300014811F2743D +:101E60000CB9F000000576E1000400007710000CCA +:101E700071E1000B0012F6AAF820111C4816F84573 +:101E8000113360E100020005F82010DF10E1000BC3 +:101E900008E1000C11E10004F84D10C76BF8276F42 +:101EA00000018810F495F495F5AEF82010CF48168F +:101EB000F4954808F84511166FE1000C0D0081E11A +:101EC000000C1104F50081044916F5208916F07301 +:101ED000110E10E1000B71E1000C00128810F49556 +:101EE000F495F6AAF83011164912F6208810F495E8 +:101EF000F495F5AEF82010F3481680064808F8452A +:101F000011161004700200178000760300001006FE +:101F100080011005F0740CB9100600E1000C80E19E +:101F2000000C11061004F60080044816F6208816EE +:101F300010E1000C08E1000BF845111CF0731131A1 +:101F4000F2740E9FF4954817F073113376E1000C8C +:101F5000000076E1000B000076E1000200011004B1 +:101F600080001005F074069F8812F495771000FF2A +:101F7000F4AAF83011336C860F70EE088A178A16AF +:101F80008A11FC004A11EEFCF495710600128811CA +:101F90007312000EF166000DF30024008914138102 +:101FA000F77AF330000181F8276013E10001F77C34 +:101FB000F330000381F82761E90F19E1000181F88E +:101FC000276271E400030013F6B84913F30000011F +:101FD000F330000F490B09F82762F84D117577109F +:101FE00000FFF4ABF830117557F8276CF3000001CF +:101FF0004FF8276C76F827630001F073117876F8B4 +:102000002763000070E40003276276F8276400006D +:1020100011F8276161F8000B0002F820118DE90129 +:102020006FE100020F1881F8276411F8276161F849 +:10203000000B0001F82011A910F82764F10000043A +:102040008913E9B8F52081F8276560840002F8203B +:1020500011A9700000117001001370022765F2745D +:102060000F18F4954812EE048A11FC004A114A1622 +:102070004A17EEFCE8004EF82766E8004EF827689D +:10208000E8004EF8276CE8004EF8276A77122740E0 +:1020900077112400771A001FF07211DB7092001183 +:1020A00076E10001FFFF7681000076E1000200008A +:1020B00076E1000300FF76E1000C000076E1000B02 +:1020C000000076E1000400006DE9000DF02025A07D +:1020D000F10000078911F100000181028816F495D2 +:1020E00077170020768600FF760000007601000654 +:1020F0001002F074066C7600000076010006F2749F +:10210000066CF49548111002F000000D80026DE994 +:10211000000D6DEE000D6CEFFFFF11E8F0740C9DEB +:10212000EE048A178A168A11FC004A114A164A17C9 +:10213000EEFA8811100A4911F84D129F4808F84527 +:10214000129F80041281F5788912F495F4956CE25F +:10215000FFB9128A61F800080080F830128A13E192 +:102160000001F0E8F778F1A0F2301FFF8817F4952E +:10217000771224007716000077130020F6B848176E +:1021800008E20001F84512426DEA000D6D966CEB15 +:10219000FFFF1234F073129056F8276AF000000126 +:1021A0004EF8276A60820001F83012547000001661 +:1021B000F2741138F4954811F07312907000001603 +:1021C000F2741138F495481172102A9EF495F4AF08 +:1021D000F830126E76000000760100BC7002001626 +:1021E00076030000F2740CB9F4954811F073129064 +:1021F00010F8276EF844129076000000760100BCBB +:102200007002001676030000F2740CB9F4954811C0 +:10221000F0740C5EF0E0F0101388F842129076F83B +:10222000276E0001F073129056F82766F000000147 +:102230004EF827666DE9005E56F82768F000000149 +:102240004EF82768710400126EEAFFFF121870043E +:102250000012EE068A178A168A11FC004A11EEFE59 +:10226000880EF495F066000DF00025A08811F49515 +:10227000F495768100FF7600000076010006F27486 +:10228000066CF0000001760000007601000648119F +:10229000F274066CF0000007EE028A11FC004A118D +:1022A000880EF495F066000DF00024008811F49576 +:1022B000F49576E10001FFFF7681000076E10002EF +:1022C000000076E1000300FF8A11FC004A11F4953A +:1022D00013038811FA4D12EC71020012F310000181 +:1022E000891AF495F07212EB709100128A11FC00B9 +:1022F000F4954A0B4A0C4A0DF7B8EEFE10F80008A8 +:102300001106F1C08300F4851106F7858106F6B841 +:10231000EC0F1E0661008000F8201305F484EE0225 +:102320008A0D8A0C8A0BFC00F4954A0B4A0C4A0D64 +:10233000EEFEF7B8800010F80008F4851106F78566 +:102340008106F6B8EC0F1E06F0F061008000F82060 +:102350001320F484EE028A0D8A0C8A0BFC004A11C9 +:102360007711007B76812EEC7711007BEEFF718177 +:102370000011EE0176E10001000076E100040000AA +:1023800076E10006000076E10062000076E100766A +:10239000000076E10092000076E10094000076E112 +:1023A00000B0000076E100B3000076E100BE00005E +:1023B00076E100BF000076E100C1000076E100C3D5 +:1023C000000076E100C5000076E100C700007681DC +:1023D00000008A11F495F4E44A114A164A17EEFFF8 +:1023E000F49571060016FB8016A28817F495F7B8CD +:1023F00010F80017F0100002FA4613887711000059 +:1024000010F80017F0100002F84513F910F8001743 +:10241000F845143910F80017F0100001F845141FA2 +:10242000F073145210F80017F0100003F84513D39E +:1024300010F80017F0100006F84414527712007BD1 +:102440007182001461E400070040F830145249140E +:102450004817F6008812F495771300557711005746 +:102460006DEA003BE50110E600068081481400F8A3 +:1024700000178812F4957711005510E20040808112 +:102480007711005710E6000780817711005510E2A0 +:102490000045808110E60008771100578081771190 +:1024A000005510E2004A80817711005710E60009BC +:1024B0008081F2731452771103C07712007B10826F +:1024C000F00000078813F495F495961BF830145229 +:1024D00010E300357712005580827712005710E61E +:1024E000000480827712005510E300378082771253 +:1024F000005710E6000580824811F0400010F2738A +:102500001450F04000207712007B1082F00000078A +:102510008812F495F495960DF830145210E20034B8 +:102520007713005580837713005710E600028083ED +:1025300010E200367712005580827712005710E6BD +:10254000000380824811F0400004F2731450F04000 +:1025500000087712007B1082F00000078812F495C3 +:10256000F495960EF830145210E2003377120055AD +:1025700080827712005710E6000180824811F273C2 +:102580001450F04000027712007B1082F000000728 +:102590008812F495F495960FF830145210E2003238 +:1025A000771200557713005780824811E762F04098 +:1025B0000001E5018811F4957712007B48117182C2 +:1025C00000121AE2000780E20007F980169AEE0175 +:1025D0008A1748118A168A11F4E44A118811770E75 +:1025E000000577120055E804F6B828E10002EEFF76 +:1025F000808277120057F0208000EE011A82771255 +:1026000000578082E80132E10002F5827711005420 +:10261000F693188177110054F2A080818A11F49505 +:10262000F4E44A114A16F49571040011FB8016A2D5 +:102630008816F4957712005510E600038082771211 +:10264000005610E100027713005680827712005680 +:1026500010E10003808210E10004771200568082AE +:102660007712005610E100018082E712E501F9803F +:10267000169A8A168A11F4E44A114A164A17EEF994 +:102680007711007B76000016760100177602001A9B +:102690007603001B7604001C7605001D718100176F +:1026A00071E7000600111081F84414DFF980165319 +:1026B000F6B8FB801585F020FFFFF6B8FB80160802 +:1026C000F020FFFF7711007B7181001776E700068D +:1026D00000014817771600007710000477150003F3 +:1026E0007714000277130001F000003976E7000844 +:1026F000001F76E700070000880E771A00054817CC +:10270000F0000009881248188819E800F072152CAA +:10271000731900117682000011917311001970E293 +:102720000003001670E20004001370E200050014BC +:1027300081E2000170E20006001570E2000700105F +:1027400080E20002730E0011F100001E6DEE000524 +:102750006DEB00056DEC00056DED00056DE8000505 +:10276000F000000181916DEA00087311000EEE0780 +:1027700076E70041002476E70046002576E7004B27 +:10278000002676E7005000278A178A168A11F4E49B +:102790004A114A16EEFE881156064E00F98016A21E +:1027A000F7B810F80011F010FFFFFA451560771622 +:1027B000FFFF7712007B49111082F603F000000939 +:1027C0008811F495F4951081F8441571F273157120 +:1027D000F495E7167711007B1081F000000988114D +:1027E000F495771200061081F845155C6EEAFFFF3C +:1027F00015696DE9000876860001E9015600F1804F +:1028000010F8000BF845157EFB801585F4954816E9 +:10281000F980169AEE0248168A168A11F4E44A11D3 +:10282000EEFFFB8016A28811F4957710FFFFF4A944 +:10283000F83015C410E1000377120055808277123A +:1028400000567682000077120056768200007712DA +:1028500000567682000077120056768200007712CA +:1028600000567682000010E10002F000000832F805 +:10287000000877120054E801F482F493188277126A +:102880000054F0400000808210E10001F9801676CB +:1028900010E10001F9801666F07316037711007BD2 +:1028A0007181001171E1000700127682000010E1D1 +:1028B0000009F98015857711007B7181001110E105 +:1028C0000009FB801585F00000087711007B7181FD +:1028D000001110E10009FB801585F0000010771150 +:1028E000007B7181001110E10009FB801585F0006B +:1028F00000187711007B7181001110E10009FB8045 +:102900001585F00000207711007B7181001110E126 +:102910000009FB801585F0000028F980169AEE0169 +:102920008A11F4E44A11EEFFFB8016A28811F49597 +:102930007710FFFFF4A9F830164177110055768122 +:10294000001E7711005676810000771100567681BF +:1029500000007711005676810000771100567681CD +:1029600000007711005676810000771100567681BD +:1029700000007711005676810000771100567681AD +:102980000000771100567681000077110056F2732F +:10299000164E768100007711007B7181001171E184 +:1029A000000700127682000010E10039F980160855 +:1029B000F980169AEE018A11F4E44A117711007B2E +:1029C0001081F00000048811F495F4951081FA4408 +:1029D0001663F495EEFF76810001EE018A11F4E4AE +:1029E000F01000104A1132F80008EEFF77110001D4 +:1029F000E801EE01F4821A8180818A11F495F4E4F1 +:102A0000F01000104A1132F80008EEFFE8017711CB +:102A10000000F482EE01F493188180818A11F4950C +:102A2000F4E44A11F01000107711000032F80008A9 +:102A3000EEFF1181E801EE0177110000F482F2A0AF +:102A400080818A11F495F4E4F273169EF6BBF49536 +:102A5000F495F495F495F4E4F27316A6F7BBF495A7 +:102A6000F495F495F495F4E44A114A16F49571043A +:102A70000016FB8016A28811F49571E10005001282 +:102A80007682000E10E6000E71E1000600128082D0 +:102A900071E1000500127682000D71E1000600125E +:102AA00010E6000D808271E1000500127682000CB4 +:102AB00010E6000C71E100060012808271E1000551 +:102AC00000127682000B10E6000B71E10006001286 +:102AD000808271E1000500127682000A71E1000631 +:102AE000001210E6000A808271E100050012768271 +:102AF000000910E6000971E100060012808271E110 +:102B0000000500127682000871E10006001210E64E +:102B10000008808271E1000500127682000710E64D +:102B2000000771E100060012808271E100050012C9 +:102B30007682000671E10006001210E6000680822F +:102B400071E1000500127682000571E100060012B5 +:102B500010E60005808271E1000500127682000413 +:102B600071E10006001210E60004808271E10005A8 +:102B700000127682000371E10006001210E60003E5 +:102B8000808271E1000500127682000210E60002E8 +:102B900071E100060012808271E100050012768268 +:102BA000000110E6000171E100060012808271E16F +:102BB000000500127682000071E100060013E76252 +:102BC000E501F980169A8A168A11F4E44A118811EF +:102BD000F495F49571E100050012EEFF7682000095 +:102BE000EE0171E100060011698100018A11F4957E +:102BF000F4E44A118811F495F49571E1000500128E +:102C0000EEFF76820001EE0171E10006001169819C +:102C100000018A11F495F4E44A117711007B1081C8 +:102C2000F00000948811F495F4951081FA44179CF3 +:102C3000F495EEFFF98016537711007B1081F000B8 +:102C400000948811F495F49576810001EE0176E107 +:102C50000001000076E10002002176E1000300207F +:102C600076E10004002376E10005002276E100060B +:102C7000003876E10007003976E10008001576E1BA +:102C80000009001476E1000A000076E1000B004123 +:102C900076E1000C004076E1000D004376E1000E85 +:102CA000004276E1000F004876E10010004976E12D +:102CB0000011001B76E10012001A8A11F495F4E469 +:102CC0004A11EEFD881156064E00F98016A27712C1 +:102CD000007B770E0009108228F80011F0000095A3 +:102CE0008811F495F4951081F84517F0F27317FDEB +:102CF0007711FFFF76810001E9015600F18010F89D +:102D0000000BF84517FDFB801810F4954811F98069 +:102D1000169AEE0348118A11F495F4E44A118811C9 +:102D2000F495EEFF71E100010011EE0110818A11AE +:102D3000F495F4E44A11EEFFFB8016A28811F49595 +:102D40007710FFFFF4A9F83018C371E100050012F5 +:102D50007682000071E1000600127682000071E1C7 +:102D6000000500127682000171E1000600127682F1 +:102D7000000071E1000500127682000271E1000698 +:102D800000127682000071E10005001276820003D5 +:102D900071E1000600127682000071E10005001268 +:102DA0007682000471E1000600127682000071E173 +:102DB000000500127682000571E10006001276829D +:102DC000000071E1000500127682000671E1000644 +:102DD00000127682000171E1000500127682000780 +:102DE00071E1000600127682200071E100050012F8 +:102DF0007682000871E1000600127682000071E11F +:102E0000000500127682000971E100060012768248 +:102E1000000071E1000500127682000A71E10006EF +:102E200000127682000071E1000500127682000B2C +:102E300071E1000600127682000071E100050012C7 +:102E40007682000C71E1000600127682000071E1CA +:102E5000000500127682000D71E1000600127682F4 +:102E6000000071E1000500127682000E71E100069B +:102E700000127682000010E10007F980167610E15A +:102E80000008F980167610E10007F980166610E157 +:102E90000008F9801666F07318D17711007B108155 +:102EA000FB801810F00000957711007B1081FB80EB +:102EB0001810F000009EF980169AEE018A11F4E4D1 +:102EC0004A118811EEFFF495100471E1000300111E +:102ED000EE0180818A11F495F4E44A114A16F495C2 +:102EE00071040016FB8016A28811F49571E10002AE +:102EF00000127682001010E6000171E1000300125A +:102F0000808271E10004001210E600028082E76214 +:102F100071E100020013E501F980169A8A168A1100 +:102F2000F4E44A118811EEFFEE0110E100018A116C +:102F3000F495F4E44A117711007B1081F00000B39E +:102F40008811F495F4951081FA44192AF495EEFF4E +:102F5000F98016537711007B1081F00000B38811BF +:102F6000F495F49576810001EE0176E10001000010 +:102F700076E10002001376E10003002676E100040A +:102F8000002576E10005002476E10006000076E1E8 +:102F90000007001776E10008003276E100090031F1 +:102FA00076E1000A00308A11F495F4E44A114A16D9 +:102FB0004A17EEFFF49571060017FB8016A28811E0 +:102FC000F495F7B810F80011F010FFFFFA451973E7 +:102FD0007716FFFF7712007B770E0005108228F826 +:102FE0000011F00000B48811F495F4951081F844B4 +:102FF0001984F2731984F495E7167711007B108118 +:10300000F00000B48811F495771200021081F845A1 +:10301000196F6EEAFFFF197C6DE9000561F8001772 +:103020000001FA20198F76860001FB801997F4952C +:103030004816F980169AEE018A1748168A168A11E0 +:10304000F4E44A11EEFFFB8016A28811F495771084 +:10305000FFFFF4A9F83019CC71E100020012698277 +:10306000001071E1000200126882F7FF71E10002B6 +:1030700000126882FBFF71E1000200126882FFF01B +:1030800071E1000300127682FFFF71E1000400127B +:103090007682FFFF71E1000200126982002071E177 +:1030A00000020011F27319DA6881FFEF7711007BDB +:1030B0001081FB801997F00000B47711007B10811C +:1030C000FB801997F00000B9F980169AEE018A1179 +:1030D000F4E400A4000019DF00012AE6000000016A +:1030E0002AE7000000032A120C01C34F0000000170 +:1030F0002A15000000022A160000000000192A5DAF +:103100000043006F0070007900720069006700687A +:10311000007400200054006500630068006E006FBA +:10312000005400720065006E0064002000410047FA +:10313000000000042A760030002E00300000000C51 +:103140002A7A004600650062002000320037002025 +:103150000032003000300031000000092A860031C2 +:103160000034003A00330035003A003300330000E9 +:10317000000F2A8F00000000000000010000000185 +:10318000000000000000000000000000000000003F +:10319000000000012A9E000000012A9F000000019B +:1031A0002AA0000000012AA1000000012AA20000BC +:1031B0000001297E000000022980000000000001BB +:1031C0002982FFFF00012AA7000000052AA87141FB +:1031D0002000200000230400000A2AAD00000000A7 +:1031E00000000000000000000000000000000000DF +:1031F000000F2AB7000000000000004000A082403D +:103200000008307F00800180000000000000000006 +:1032100000000001276E00000001276F0000000081 +:10322000000900001A8304E804CF04C504BA04B0FE +:1032300004AC049C048C0481007800000100F2734B +:1032400007EFF495F495F27307EFF495F495F273A4 +:1032500007EFF495F495F27307EFF495F495F27394 +:1032600007EFF495F495F27307EFF495F495F27384 +:1032700007EFF495F495F27307EFF495F495F27374 +:1032800007EFF495F495F27307EFF495F495F27364 +:1032900007EFF495F495F27307EFF495F495F27354 +:1032A00007EFF495F495F27307EFF495F495F27344 +:1032B00007EFF495F495F27307EFF495F495F27334 +:1032C00007AAF495F495F27307EFF495F495F27369 +:1032D00007EFF495F495F2730223F495F495F273E5 +:1032E00007EFF495F495F27307EFF495F495F27304 +:1032F00007EFF495F495F27307EFF495F495F273F4 +:1033000007EFF495F495F27307EFF495F495F273E3 +:1033100005E5F495F495F27302B5F495F495F2731E +:103320000E33F495F495F27307EFF495F4950000DD +:00000001FF diff --git a/linux/firmware/vicam/firmware.H16 b/linux/firmware/vicam/firmware.H16 new file mode 100644 index 000000000..cac0cba68 --- /dev/null +++ b/linux/firmware/vicam/firmware.H16 @@ -0,0 +1,7 @@ +:0026000000B6C31F000264E767FDFF0EC0E709DE008E00C0094003C01744034BAFC00700004BAF97CF00001D +:000A000000B6C30300036418000000FB +:0008000000B6C301000664000014 +:0696000000B6C38F060264E707000008C0E70700003EC0E7075401AA00E707C805B600E7074201D200E7077C001600E70756001800E707060092C0E70700001EC0E707FFFF22C0E707040024C0E707EC2728C0E70716018E00E78701000EC097CFD70900C0E777010092C009C1E709FE052401E70904062601E707070092C0E70500C0C0DF97CF170057001702D70900C0E777010092C00AC1E757FFFFFA050DC0E7570000FA050FC09FAFC600E70500C0C805C105C005C0DF97CF27DAFA05EF0701000B0673CF9FAF78019FAF1A036ECFE709FC052401E70902062601E707070092C0E709FC05FE05E70902060406E7090006FC05E709FE05000627DAFA05E7570100FA0502CA04C097CF9FAF660597CFE70740000206C809FC059FAFDA0297CFCF170200EF57810009069FA0B601EF57800009069FA04002EF5701000B069FA04603E70701000AC046AF47AF9FAF4002E7072E000AC0EF878000090697CF000E0100C05751009FC09E02C057500020C0C057550012C0C05756009FC072029FCFD602C10B080601D06F900806C0070800C10B08069FAF280597CF2F0E02000806C0070800C10B08069FAF28059FCFD6022F0E02000906EF87800009069FCFD602EF677FFF0906E767FFFD22C0E767EFFF24C0E787100028C09FAFB805E787E02124C09FAFA805E787080024C0E767DFFF24C0C8070A00C0070000C10701009FAF28059FAFB805C0079E009FAF4405E767FFFE24C0C00920C0E787000124C0C07700020FC1E767F7FF24C0E767F7FF24C0E787080024C008DA5EC1EF078000090697CFEF0701000A0697CFEF0700000B06EF0700000A06EF677FFF0906EF0700000D06E767EFFF28C0E76717D824C0E70700001EC0E707FFFF22C097CFC8070E069FAFDA02E7070000F205E7071000F605E7070E06F405E707D602F805C807F205C107008050AF97CF2F0C020007062F0C04000606E7070000F205E7071000F605E707E205F405E707CE02F805C807F205C107008051AF97CF9FAF66049FAF1A0359AF97CFC0070E00C10B0C0641D19FAF2805C0073C009FAF44056800C0073B009FAF44056F000C066800E0070401E80B0A06E8070000E0070002E007EC01E007FCFF97CFE707FFFFFA05EF0700000B06E7070E062401E7070E06FE05E70740002601E70740000406E707070092C097CFEF0702000B069FAF7801EF77800007069FC01404EF770100070637C0EF7701000D060FC1EF0701000D06C0070200C10730009FAF2805C0070100C10702009FAF2805C807FF4F9FAFA805C00738009FAF4405C177030002C108DA75C1C17701000AC1C0070100C10702009FAF2805EF07010006062CCFC0070100C10704009FAF2805EF070000060622CFEF0700000D06EF57010006061BC0C0070100C10701009FAF2805C0070200C10730009FAF2805C807FF4F9FAFA805C00738009FAF4405C1670300C157030002C008DA73C1C0070200C1071200EF570000060602C0C10723009FAF2805C0071400C10BEA059FAF2805C0073E009FAF0A05E709E405FA0527D8FA05E7070E06FC05E7074E060006E707400002069FAF66059FAFC60097CFC10BE20541D001D2C11723009FAFDC04C0070400C10BE3059FAF2805C0070600C109E6059FAF2805C0070700C109E605C1D19FAF2805C0070B00C109E8059FAF2805C0070C00C109E805C1D19FAF2805C0070D00C10709009FAF2805C0070300C10732009FAF2805C0070F00C10700009FAF280597CFE767FFD924C0C8070A004000C0670002278024C0E787000424C0E767FFF924C001D208DA72C1E787002024C097CF27001EC0E787FF0022C0E7677FFF24C0E787800024C0E787800024C097CF9FAF0A0567001EC0E767BFFF24C0E787400024C0E787400024C097CF9FAF0A05E76700FF22C0E767FFFE24C0E767FFFE24C0C10920C0E787000124C097CFC0074000C809FC05E76700FF22C0E767FFFE24C0E767BFFF24C0E767BFFF24C000DAE80920C0E787400024C0E787400024C000DAE80920C06DC1E787000124C097CFE707320012C0E777008012C07CC097CFE707204E12C0E777008012C07CC097CF0902190001010080960904000001000000000705810240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A1 +:0136000000B6C32F0103640E0014001A00200026004A0064006A0092009A00A000B200B800BE00C200C800CE00DC00DA00E200E000E800E600EE00EC00F200F80002010A010E0112011E01220128012C0132013601440150015E01720176017A01800188018C0194019C01A001A401AA01B001B401BA01D001DA01F601FA01020234023C0244024A0250025602740278027E0284028A02880290028E029402A202A802AE02B402BA02B802C002BE02C402D002D402E002E602EE02F802FC0206031E032403280330032E033C034A034E03540358035E0366036E037A0386038E039603B203B803C603CC03D403DA03E803F403FC03040420042A04320436043E044404420448044E044C04540452045A045E046204680474047C04800488048C0494049A04A204A604AE04B404C004CC04D8042A0546056C0500005E +:0008000000B6C301000664000014 +:0000000001FF diff --git a/linux/include/asm-arm/arch-pxa/pxa-regs.h b/linux/include/asm-arm/arch-pxa/pxa-regs.h index a288ae8c7..dce930862 100644 --- a/linux/include/asm-arm/arch-pxa/pxa-regs.h +++ b/linux/include/asm-arm/arch-pxa/pxa-regs.h @@ -46,13 +46,13 @@ #define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */ #define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */ -#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ - (0x20000000 + (Nb)*PCMCIASp) +#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ + (0x20000000 + (Nb)*PCMCIASp) #define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */ -#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ - (_PCMCIA (Nb) + 2*PCMCIAPrtSp) -#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ - (_PCMCIA (Nb) + 3*PCMCIAPrtSp) +#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ + (_PCMCIA (Nb) + 2*PCMCIAPrtSp) +#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ + (_PCMCIA (Nb) + 3*PCMCIAPrtSp) #define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */ #define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */ @@ -600,418 +600,6 @@ /* - * USB Device Controller - * PXA25x and PXA27x USB device controller registers are different. - */ -#if defined(CONFIG_PXA25x) - -#define UDC_RES1 __REG(0x40600004) /* UDC Undocumented - Reserved1 */ -#define UDC_RES2 __REG(0x40600008) /* UDC Undocumented - Reserved2 */ -#define UDC_RES3 __REG(0x4060000C) /* UDC Undocumented - Reserved3 */ - -#define UDCCR __REG(0x40600000) /* UDC Control Register */ -#define UDCCR_UDE (1 << 0) /* UDC enable */ -#define UDCCR_UDA (1 << 1) /* UDC active */ -#define UDCCR_RSM (1 << 2) /* Device resume */ -#define UDCCR_RESIR (1 << 3) /* Resume interrupt request */ -#define UDCCR_SUSIR (1 << 4) /* Suspend interrupt request */ -#define UDCCR_SRM (1 << 5) /* Suspend/resume interrupt mask */ -#define UDCCR_RSTIR (1 << 6) /* Reset interrupt request */ -#define UDCCR_REM (1 << 7) /* Reset interrupt mask */ - -#define UDCCS0 __REG(0x40600010) /* UDC Endpoint 0 Control/Status Register */ -#define UDCCS0_OPR (1 << 0) /* OUT packet ready */ -#define UDCCS0_IPR (1 << 1) /* IN packet ready */ -#define UDCCS0_FTF (1 << 2) /* Flush Tx FIFO */ -#define UDCCS0_DRWF (1 << 3) /* Device remote wakeup feature */ -#define UDCCS0_SST (1 << 4) /* Sent stall */ -#define UDCCS0_FST (1 << 5) /* Force stall */ -#define UDCCS0_RNE (1 << 6) /* Receive FIFO no empty */ -#define UDCCS0_SA (1 << 7) /* Setup active */ - -/* Bulk IN - Endpoint 1,6,11 */ -#define UDCCS1 __REG(0x40600014) /* UDC Endpoint 1 (IN) Control/Status Register */ -#define UDCCS6 __REG(0x40600028) /* UDC Endpoint 6 (IN) Control/Status Register */ -#define UDCCS11 __REG(0x4060003C) /* UDC Endpoint 11 (IN) Control/Status Register */ - -#define UDCCS_BI_TFS (1 << 0) /* Transmit FIFO service */ -#define UDCCS_BI_TPC (1 << 1) /* Transmit packet complete */ -#define UDCCS_BI_FTF (1 << 2) /* Flush Tx FIFO */ -#define UDCCS_BI_TUR (1 << 3) /* Transmit FIFO underrun */ -#define UDCCS_BI_SST (1 << 4) /* Sent stall */ -#define UDCCS_BI_FST (1 << 5) /* Force stall */ -#define UDCCS_BI_TSP (1 << 7) /* Transmit short packet */ - -/* Bulk OUT - Endpoint 2,7,12 */ -#define UDCCS2 __REG(0x40600018) /* UDC Endpoint 2 (OUT) Control/Status Register */ -#define UDCCS7 __REG(0x4060002C) /* UDC Endpoint 7 (OUT) Control/Status Register */ -#define UDCCS12 __REG(0x40600040) /* UDC Endpoint 12 (OUT) Control/Status Register */ - -#define UDCCS_BO_RFS (1 << 0) /* Receive FIFO service */ -#define UDCCS_BO_RPC (1 << 1) /* Receive packet complete */ -#define UDCCS_BO_DME (1 << 3) /* DMA enable */ -#define UDCCS_BO_SST (1 << 4) /* Sent stall */ -#define UDCCS_BO_FST (1 << 5) /* Force stall */ -#define UDCCS_BO_RNE (1 << 6) /* Receive FIFO not empty */ -#define UDCCS_BO_RSP (1 << 7) /* Receive short packet */ - -/* Isochronous IN - Endpoint 3,8,13 */ -#define UDCCS3 __REG(0x4060001C) /* UDC Endpoint 3 (IN) Control/Status Register */ -#define UDCCS8 __REG(0x40600030) /* UDC Endpoint 8 (IN) Control/Status Register */ -#define UDCCS13 __REG(0x40600044) /* UDC Endpoint 13 (IN) Control/Status Register */ - -#define UDCCS_II_TFS (1 << 0) /* Transmit FIFO service */ -#define UDCCS_II_TPC (1 << 1) /* Transmit packet complete */ -#define UDCCS_II_FTF (1 << 2) /* Flush Tx FIFO */ -#define UDCCS_II_TUR (1 << 3) /* Transmit FIFO underrun */ -#define UDCCS_II_TSP (1 << 7) /* Transmit short packet */ - -/* Isochronous OUT - Endpoint 4,9,14 */ -#define UDCCS4 __REG(0x40600020) /* UDC Endpoint 4 (OUT) Control/Status Register */ -#define UDCCS9 __REG(0x40600034) /* UDC Endpoint 9 (OUT) Control/Status Register */ -#define UDCCS14 __REG(0x40600048) /* UDC Endpoint 14 (OUT) Control/Status Register */ - -#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ -#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ -#define UDCCS_IO_ROF (1 << 2) /* Receive overflow */ -#define UDCCS_IO_DME (1 << 3) /* DMA enable */ -#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ -#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ - -/* Interrupt IN - Endpoint 5,10,15 */ -#define UDCCS5 __REG(0x40600024) /* UDC Endpoint 5 (Interrupt) Control/Status Register */ -#define UDCCS10 __REG(0x40600038) /* UDC Endpoint 10 (Interrupt) Control/Status Register */ -#define UDCCS15 __REG(0x4060004C) /* UDC Endpoint 15 (Interrupt) Control/Status Register */ - -#define UDCCS_INT_TFS (1 << 0) /* Transmit FIFO service */ -#define UDCCS_INT_TPC (1 << 1) /* Transmit packet complete */ -#define UDCCS_INT_FTF (1 << 2) /* Flush Tx FIFO */ -#define UDCCS_INT_TUR (1 << 3) /* Transmit FIFO underrun */ -#define UDCCS_INT_SST (1 << 4) /* Sent stall */ -#define UDCCS_INT_FST (1 << 5) /* Force stall */ -#define UDCCS_INT_TSP (1 << 7) /* Transmit short packet */ - -#define UFNRH __REG(0x40600060) /* UDC Frame Number Register High */ -#define UFNRL __REG(0x40600064) /* UDC Frame Number Register Low */ -#define UBCR2 __REG(0x40600068) /* UDC Byte Count Reg 2 */ -#define UBCR4 __REG(0x4060006c) /* UDC Byte Count Reg 4 */ -#define UBCR7 __REG(0x40600070) /* UDC Byte Count Reg 7 */ -#define UBCR9 __REG(0x40600074) /* UDC Byte Count Reg 9 */ -#define UBCR12 __REG(0x40600078) /* UDC Byte Count Reg 12 */ -#define UBCR14 __REG(0x4060007c) /* UDC Byte Count Reg 14 */ -#define UDDR0 __REG(0x40600080) /* UDC Endpoint 0 Data Register */ -#define UDDR1 __REG(0x40600100) /* UDC Endpoint 1 Data Register */ -#define UDDR2 __REG(0x40600180) /* UDC Endpoint 2 Data Register */ -#define UDDR3 __REG(0x40600200) /* UDC Endpoint 3 Data Register */ -#define UDDR4 __REG(0x40600400) /* UDC Endpoint 4 Data Register */ -#define UDDR5 __REG(0x406000A0) /* UDC Endpoint 5 Data Register */ -#define UDDR6 __REG(0x40600600) /* UDC Endpoint 6 Data Register */ -#define UDDR7 __REG(0x40600680) /* UDC Endpoint 7 Data Register */ -#define UDDR8 __REG(0x40600700) /* UDC Endpoint 8 Data Register */ -#define UDDR9 __REG(0x40600900) /* UDC Endpoint 9 Data Register */ -#define UDDR10 __REG(0x406000C0) /* UDC Endpoint 10 Data Register */ -#define UDDR11 __REG(0x40600B00) /* UDC Endpoint 11 Data Register */ -#define UDDR12 __REG(0x40600B80) /* UDC Endpoint 12 Data Register */ -#define UDDR13 __REG(0x40600C00) /* UDC Endpoint 13 Data Register */ -#define UDDR14 __REG(0x40600E00) /* UDC Endpoint 14 Data Register */ -#define UDDR15 __REG(0x406000E0) /* UDC Endpoint 15 Data Register */ - -#define UICR0 __REG(0x40600050) /* UDC Interrupt Control Register 0 */ - -#define UICR0_IM0 (1 << 0) /* Interrupt mask ep 0 */ -#define UICR0_IM1 (1 << 1) /* Interrupt mask ep 1 */ -#define UICR0_IM2 (1 << 2) /* Interrupt mask ep 2 */ -#define UICR0_IM3 (1 << 3) /* Interrupt mask ep 3 */ -#define UICR0_IM4 (1 << 4) /* Interrupt mask ep 4 */ -#define UICR0_IM5 (1 << 5) /* Interrupt mask ep 5 */ -#define UICR0_IM6 (1 << 6) /* Interrupt mask ep 6 */ -#define UICR0_IM7 (1 << 7) /* Interrupt mask ep 7 */ - -#define UICR1 __REG(0x40600054) /* UDC Interrupt Control Register 1 */ - -#define UICR1_IM8 (1 << 0) /* Interrupt mask ep 8 */ -#define UICR1_IM9 (1 << 1) /* Interrupt mask ep 9 */ -#define UICR1_IM10 (1 << 2) /* Interrupt mask ep 10 */ -#define UICR1_IM11 (1 << 3) /* Interrupt mask ep 11 */ -#define UICR1_IM12 (1 << 4) /* Interrupt mask ep 12 */ -#define UICR1_IM13 (1 << 5) /* Interrupt mask ep 13 */ -#define UICR1_IM14 (1 << 6) /* Interrupt mask ep 14 */ -#define UICR1_IM15 (1 << 7) /* Interrupt mask ep 15 */ - -#define USIR0 __REG(0x40600058) /* UDC Status Interrupt Register 0 */ - -#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */ -#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */ -#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */ -#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */ -#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */ -#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */ -#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */ -#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */ - -#define USIR1 __REG(0x4060005C) /* UDC Status Interrupt Register 1 */ - -#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */ -#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */ -#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */ -#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */ -#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */ -#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */ -#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */ -#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */ - -#elif defined(CONFIG_PXA27x) - -#define UDCCR __REG(0x40600000) /* UDC Control Register */ -#define UDCCR_OEN (1 << 31) /* On-the-Go Enable */ -#define UDCCR_AALTHNP (1 << 30) /* A-device Alternate Host Negotiation - Protocol Port Support */ -#define UDCCR_AHNP (1 << 29) /* A-device Host Negotiation Protocol - Support */ -#define UDCCR_BHNP (1 << 28) /* B-device Host Negotiation Protocol - Enable */ -#define UDCCR_DWRE (1 << 16) /* Device Remote Wake-up Enable */ -#define UDCCR_ACN (0x03 << 11) /* Active UDC configuration Number */ -#define UDCCR_ACN_S 11 -#define UDCCR_AIN (0x07 << 8) /* Active UDC interface Number */ -#define UDCCR_AIN_S 8 -#define UDCCR_AAISN (0x07 << 5) /* Active UDC Alternate Interface - Setting Number */ -#define UDCCR_AAISN_S 5 -#define UDCCR_SMAC (1 << 4) /* Switch Endpoint Memory to Active - Configuration */ -#define UDCCR_EMCE (1 << 3) /* Endpoint Memory Configuration - Error */ -#define UDCCR_UDR (1 << 2) /* UDC Resume */ -#define UDCCR_UDA (1 << 1) /* UDC Active */ -#define UDCCR_UDE (1 << 0) /* UDC Enable */ - -#define UDCICR0 __REG(0x40600004) /* UDC Interrupt Control Register0 */ -#define UDCICR1 __REG(0x40600008) /* UDC Interrupt Control Register1 */ -#define UDCICR_FIFOERR (1 << 1) /* FIFO Error interrupt for EP */ -#define UDCICR_PKTCOMPL (1 << 0) /* Packet Complete interrupt for EP */ - -#define UDC_INT_FIFOERROR (0x2) -#define UDC_INT_PACKETCMP (0x1) - -#define UDCICR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2)) -#define UDCICR1_IECC (1 << 31) /* IntEn - Configuration Change */ -#define UDCICR1_IESOF (1 << 30) /* IntEn - Start of Frame */ -#define UDCICR1_IERU (1 << 29) /* IntEn - Resume */ -#define UDCICR1_IESU (1 << 28) /* IntEn - Suspend */ -#define UDCICR1_IERS (1 << 27) /* IntEn - Reset */ - -#define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */ -#define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */ -#define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2)) -#define UDCISR1_IRCC (1 << 31) /* IntReq - Configuration Change */ -#define UDCISR1_IRSOF (1 << 30) /* IntReq - Start of Frame */ -#define UDCISR1_IRRU (1 << 29) /* IntReq - Resume */ -#define UDCISR1_IRSU (1 << 28) /* IntReq - Suspend */ -#define UDCISR1_IRRS (1 << 27) /* IntReq - Reset */ - -#define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */ -#define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */ -#define UDCOTGICR_IESF (1 << 24) /* OTG SET_FEATURE command recvd */ -#define UDCOTGICR_IEXR (1 << 17) /* Extra Transciever Interrupt - Rising Edge Interrupt Enable */ -#define UDCOTGICR_IEXF (1 << 16) /* Extra Transciever Interrupt - Falling Edge Interrupt Enable */ -#define UDCOTGICR_IEVV40R (1 << 9) /* OTG Vbus Valid 4.0V Rising Edge - Interrupt Enable */ -#define UDCOTGICR_IEVV40F (1 << 8) /* OTG Vbus Valid 4.0V Falling Edge - Interrupt Enable */ -#define UDCOTGICR_IEVV44R (1 << 7) /* OTG Vbus Valid 4.4V Rising Edge - Interrupt Enable */ -#define UDCOTGICR_IEVV44F (1 << 6) /* OTG Vbus Valid 4.4V Falling Edge - Interrupt Enable */ -#define UDCOTGICR_IESVR (1 << 5) /* OTG Session Valid Rising Edge - Interrupt Enable */ -#define UDCOTGICR_IESVF (1 << 4) /* OTG Session Valid Falling Edge - Interrupt Enable */ -#define UDCOTGICR_IESDR (1 << 3) /* OTG A-Device SRP Detect Rising - Edge Interrupt Enable */ -#define UDCOTGICR_IESDF (1 << 2) /* OTG A-Device SRP Detect Falling - Edge Interrupt Enable */ -#define UDCOTGICR_IEIDR (1 << 1) /* OTG ID Change Rising Edge - Interrupt Enable */ -#define UDCOTGICR_IEIDF (1 << 0) /* OTG ID Change Falling Edge - Interrupt Enable */ - -#define UP2OCR __REG(0x40600020) /* USB Port 2 Output Control register */ - -#define UP2OCR_CPVEN (1 << 0) /* Charge Pump Vbus Enable */ -#define UP2OCR_CPVPE (1 << 1) /* Charge Pump Vbus Pulse Enable */ -#define UP2OCR_DPPDE (1 << 2) /* Host Port 2 Transceiver D+ Pull Down Enable */ -#define UP2OCR_DMPDE (1 << 3) /* Host Port 2 Transceiver D- Pull Down Enable */ -#define UP2OCR_DPPUE (1 << 4) /* Host Port 2 Transceiver D+ Pull Up Enable */ -#define UP2OCR_DMPUE (1 << 5) /* Host Port 2 Transceiver D- Pull Up Enable */ -#define UP2OCR_DPPUBE (1 << 6) /* Host Port 2 Transceiver D+ Pull Up Bypass Enable */ -#define UP2OCR_DMPUBE (1 << 7) /* Host Port 2 Transceiver D- Pull Up Bypass Enable */ -#define UP2OCR_EXSP (1 << 8) /* External Transceiver Speed Control */ -#define UP2OCR_EXSUS (1 << 9) /* External Transceiver Speed Enable */ -#define UP2OCR_IDON (1 << 10) /* OTG ID Read Enable */ -#define UP2OCR_HXS (1 << 16) /* Host Port 2 Transceiver Output Select */ -#define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ -#define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ - -#define UDCCSN(x) __REG2(0x40600100, (x) << 2) -#define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ -#define UDCCSR0_SA (1 << 7) /* Setup Active */ -#define UDCCSR0_RNE (1 << 6) /* Receive FIFO Not Empty */ -#define UDCCSR0_FST (1 << 5) /* Force Stall */ -#define UDCCSR0_SST (1 << 4) /* Sent Stall */ -#define UDCCSR0_DME (1 << 3) /* DMA Enable */ -#define UDCCSR0_FTF (1 << 2) /* Flush Transmit FIFO */ -#define UDCCSR0_IPR (1 << 1) /* IN Packet Ready */ -#define UDCCSR0_OPC (1 << 0) /* OUT Packet Complete */ - -#define UDCCSRA __REG(0x40600104) /* UDC Control/Status register - Endpoint A */ -#define UDCCSRB __REG(0x40600108) /* UDC Control/Status register - Endpoint B */ -#define UDCCSRC __REG(0x4060010C) /* UDC Control/Status register - Endpoint C */ -#define UDCCSRD __REG(0x40600110) /* UDC Control/Status register - Endpoint D */ -#define UDCCSRE __REG(0x40600114) /* UDC Control/Status register - Endpoint E */ -#define UDCCSRF __REG(0x40600118) /* UDC Control/Status register - Endpoint F */ -#define UDCCSRG __REG(0x4060011C) /* UDC Control/Status register - Endpoint G */ -#define UDCCSRH __REG(0x40600120) /* UDC Control/Status register - Endpoint H */ -#define UDCCSRI __REG(0x40600124) /* UDC Control/Status register - Endpoint I */ -#define UDCCSRJ __REG(0x40600128) /* UDC Control/Status register - Endpoint J */ -#define UDCCSRK __REG(0x4060012C) /* UDC Control/Status register - Endpoint K */ -#define UDCCSRL __REG(0x40600130) /* UDC Control/Status register - Endpoint L */ -#define UDCCSRM __REG(0x40600134) /* UDC Control/Status register - Endpoint M */ -#define UDCCSRN __REG(0x40600138) /* UDC Control/Status register - Endpoint N */ -#define UDCCSRP __REG(0x4060013C) /* UDC Control/Status register - Endpoint P */ -#define UDCCSRQ __REG(0x40600140) /* UDC Control/Status register - Endpoint Q */ -#define UDCCSRR __REG(0x40600144) /* UDC Control/Status register - Endpoint R */ -#define UDCCSRS __REG(0x40600148) /* UDC Control/Status register - Endpoint S */ -#define UDCCSRT __REG(0x4060014C) /* UDC Control/Status register - Endpoint T */ -#define UDCCSRU __REG(0x40600150) /* UDC Control/Status register - Endpoint U */ -#define UDCCSRV __REG(0x40600154) /* UDC Control/Status register - Endpoint V */ -#define UDCCSRW __REG(0x40600158) /* UDC Control/Status register - Endpoint W */ -#define UDCCSRX __REG(0x4060015C) /* UDC Control/Status register - Endpoint X */ - -#define UDCCSR_DPE (1 << 9) /* Data Packet Error */ -#define UDCCSR_FEF (1 << 8) /* Flush Endpoint FIFO */ -#define UDCCSR_SP (1 << 7) /* Short Packet Control/Status */ -#define UDCCSR_BNE (1 << 6) /* Buffer Not Empty (IN endpoints) */ -#define UDCCSR_BNF (1 << 6) /* Buffer Not Full (OUT endpoints) */ -#define UDCCSR_FST (1 << 5) /* Force STALL */ -#define UDCCSR_SST (1 << 4) /* Sent STALL */ -#define UDCCSR_DME (1 << 3) /* DMA Enable */ -#define UDCCSR_TRN (1 << 2) /* Tx/Rx NAK */ -#define UDCCSR_PC (1 << 1) /* Packet Complete */ -#define UDCCSR_FS (1 << 0) /* FIFO needs service */ - -#define UDCBCN(x) __REG2(0x40600200, (x)<<2) -#define UDCBCR0 __REG(0x40600200) /* Byte Count Register - EP0 */ -#define UDCBCRA __REG(0x40600204) /* Byte Count Register - EPA */ -#define UDCBCRB __REG(0x40600208) /* Byte Count Register - EPB */ -#define UDCBCRC __REG(0x4060020C) /* Byte Count Register - EPC */ -#define UDCBCRD __REG(0x40600210) /* Byte Count Register - EPD */ -#define UDCBCRE __REG(0x40600214) /* Byte Count Register - EPE */ -#define UDCBCRF __REG(0x40600218) /* Byte Count Register - EPF */ -#define UDCBCRG __REG(0x4060021C) /* Byte Count Register - EPG */ -#define UDCBCRH __REG(0x40600220) /* Byte Count Register - EPH */ -#define UDCBCRI __REG(0x40600224) /* Byte Count Register - EPI */ -#define UDCBCRJ __REG(0x40600228) /* Byte Count Register - EPJ */ -#define UDCBCRK __REG(0x4060022C) /* Byte Count Register - EPK */ -#define UDCBCRL __REG(0x40600230) /* Byte Count Register - EPL */ -#define UDCBCRM __REG(0x40600234) /* Byte Count Register - EPM */ -#define UDCBCRN __REG(0x40600238) /* Byte Count Register - EPN */ -#define UDCBCRP __REG(0x4060023C) /* Byte Count Register - EPP */ -#define UDCBCRQ __REG(0x40600240) /* Byte Count Register - EPQ */ -#define UDCBCRR __REG(0x40600244) /* Byte Count Register - EPR */ -#define UDCBCRS __REG(0x40600248) /* Byte Count Register - EPS */ -#define UDCBCRT __REG(0x4060024C) /* Byte Count Register - EPT */ -#define UDCBCRU __REG(0x40600250) /* Byte Count Register - EPU */ -#define UDCBCRV __REG(0x40600254) /* Byte Count Register - EPV */ -#define UDCBCRW __REG(0x40600258) /* Byte Count Register - EPW */ -#define UDCBCRX __REG(0x4060025C) /* Byte Count Register - EPX */ - -#define UDCDN(x) __REG2(0x40600300, (x)<<2) -#define PHYS_UDCDN(x) (0x40600300 + ((x)<<2)) -#define PUDCDN(x) (volatile u32 *)(io_p2v(PHYS_UDCDN((x)))) -#define UDCDR0 __REG(0x40600300) /* Data Register - EP0 */ -#define UDCDRA __REG(0x40600304) /* Data Register - EPA */ -#define UDCDRB __REG(0x40600308) /* Data Register - EPB */ -#define UDCDRC __REG(0x4060030C) /* Data Register - EPC */ -#define UDCDRD __REG(0x40600310) /* Data Register - EPD */ -#define UDCDRE __REG(0x40600314) /* Data Register - EPE */ -#define UDCDRF __REG(0x40600318) /* Data Register - EPF */ -#define UDCDRG __REG(0x4060031C) /* Data Register - EPG */ -#define UDCDRH __REG(0x40600320) /* Data Register - EPH */ -#define UDCDRI __REG(0x40600324) /* Data Register - EPI */ -#define UDCDRJ __REG(0x40600328) /* Data Register - EPJ */ -#define UDCDRK __REG(0x4060032C) /* Data Register - EPK */ -#define UDCDRL __REG(0x40600330) /* Data Register - EPL */ -#define UDCDRM __REG(0x40600334) /* Data Register - EPM */ -#define UDCDRN __REG(0x40600338) /* Data Register - EPN */ -#define UDCDRP __REG(0x4060033C) /* Data Register - EPP */ -#define UDCDRQ __REG(0x40600340) /* Data Register - EPQ */ -#define UDCDRR __REG(0x40600344) /* Data Register - EPR */ -#define UDCDRS __REG(0x40600348) /* Data Register - EPS */ -#define UDCDRT __REG(0x4060034C) /* Data Register - EPT */ -#define UDCDRU __REG(0x40600350) /* Data Register - EPU */ -#define UDCDRV __REG(0x40600354) /* Data Register - EPV */ -#define UDCDRW __REG(0x40600358) /* Data Register - EPW */ -#define UDCDRX __REG(0x4060035C) /* Data Register - EPX */ - -#define UDCCN(x) __REG2(0x40600400, (x)<<2) -#define UDCCRA __REG(0x40600404) /* Configuration register EPA */ -#define UDCCRB __REG(0x40600408) /* Configuration register EPB */ -#define UDCCRC __REG(0x4060040C) /* Configuration register EPC */ -#define UDCCRD __REG(0x40600410) /* Configuration register EPD */ -#define UDCCRE __REG(0x40600414) /* Configuration register EPE */ -#define UDCCRF __REG(0x40600418) /* Configuration register EPF */ -#define UDCCRG __REG(0x4060041C) /* Configuration register EPG */ -#define UDCCRH __REG(0x40600420) /* Configuration register EPH */ -#define UDCCRI __REG(0x40600424) /* Configuration register EPI */ -#define UDCCRJ __REG(0x40600428) /* Configuration register EPJ */ -#define UDCCRK __REG(0x4060042C) /* Configuration register EPK */ -#define UDCCRL __REG(0x40600430) /* Configuration register EPL */ -#define UDCCRM __REG(0x40600434) /* Configuration register EPM */ -#define UDCCRN __REG(0x40600438) /* Configuration register EPN */ -#define UDCCRP __REG(0x4060043C) /* Configuration register EPP */ -#define UDCCRQ __REG(0x40600440) /* Configuration register EPQ */ -#define UDCCRR __REG(0x40600444) /* Configuration register EPR */ -#define UDCCRS __REG(0x40600448) /* Configuration register EPS */ -#define UDCCRT __REG(0x4060044C) /* Configuration register EPT */ -#define UDCCRU __REG(0x40600450) /* Configuration register EPU */ -#define UDCCRV __REG(0x40600454) /* Configuration register EPV */ -#define UDCCRW __REG(0x40600458) /* Configuration register EPW */ -#define UDCCRX __REG(0x4060045C) /* Configuration register EPX */ - -#define UDCCONR_CN (0x03 << 25) /* Configuration Number */ -#define UDCCONR_CN_S (25) -#define UDCCONR_IN (0x07 << 22) /* Interface Number */ -#define UDCCONR_IN_S (22) -#define UDCCONR_AISN (0x07 << 19) /* Alternate Interface Number */ -#define UDCCONR_AISN_S (19) -#define UDCCONR_EN (0x0f << 15) /* Endpoint Number */ -#define UDCCONR_EN_S (15) -#define UDCCONR_ET (0x03 << 13) /* Endpoint Type: */ -#define UDCCONR_ET_S (13) -#define UDCCONR_ET_INT (0x03 << 13) /* Interrupt */ -#define UDCCONR_ET_BULK (0x02 << 13) /* Bulk */ -#define UDCCONR_ET_ISO (0x01 << 13) /* Isochronous */ -#define UDCCONR_ET_NU (0x00 << 13) /* Not used */ -#define UDCCONR_ED (1 << 12) /* Endpoint Direction */ -#define UDCCONR_MPS (0x3ff << 2) /* Maximum Packet Size */ -#define UDCCONR_MPS_S (2) -#define UDCCONR_DE (1 << 1) /* Double Buffering Enable */ -#define UDCCONR_EE (1 << 0) /* Endpoint Enable */ - - -#define UDC_INT_FIFOERROR (0x2) -#define UDC_INT_PACKETCMP (0x1) - -#define UDC_FNR_MASK (0x7ff) - -#define UDCCSR_WR_MASK (UDCCSR_DME|UDCCSR_FST) -#define UDC_BCR_MASK (0x3ff) -#endif - -/* * Fast Infrared Communication Port */ @@ -1237,120 +825,9 @@ #endif /* - * Power Manager + * Power Manager - see pxa2xx-regs.h */ -#define PMCR __REG(0x40F00000) /* Power Manager Control Register */ -#define PSSR __REG(0x40F00004) /* Power Manager Sleep Status Register */ -#define PSPR __REG(0x40F00008) /* Power Manager Scratch Pad Register */ -#define PWER __REG(0x40F0000C) /* Power Manager Wake-up Enable Register */ -#define PRER __REG(0x40F00010) /* Power Manager GPIO Rising-Edge Detect Enable Register */ -#define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */ -#define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */ -#define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */ -#define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */ -#define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */ -#define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */ -#define PGSR3 __REG(0x40F0002C) /* Power Manager GPIO Sleep State Register for GP[118-96] */ -#define RCSR __REG(0x40F00030) /* Reset Controller Status Register */ - -#define PSLR __REG(0x40F00034) /* Power Manager Sleep Config Register */ -#define PSTR __REG(0x40F00038) /*Power Manager Standby Config Register */ -#define PSNR __REG(0x40F0003C) /*Power Manager Sense Config Register */ -#define PVCR __REG(0x40F00040) /*Power Manager VoltageControl Register */ -#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-up Enable Reg */ -#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Register */ -#define PCMD(x) __REG2(0x40F00080, (x)<<2) -#define PCMD0 __REG(0x40F00080 + 0 * 4) -#define PCMD1 __REG(0x40F00080 + 1 * 4) -#define PCMD2 __REG(0x40F00080 + 2 * 4) -#define PCMD3 __REG(0x40F00080 + 3 * 4) -#define PCMD4 __REG(0x40F00080 + 4 * 4) -#define PCMD5 __REG(0x40F00080 + 5 * 4) -#define PCMD6 __REG(0x40F00080 + 6 * 4) -#define PCMD7 __REG(0x40F00080 + 7 * 4) -#define PCMD8 __REG(0x40F00080 + 8 * 4) -#define PCMD9 __REG(0x40F00080 + 9 * 4) -#define PCMD10 __REG(0x40F00080 + 10 * 4) -#define PCMD11 __REG(0x40F00080 + 11 * 4) -#define PCMD12 __REG(0x40F00080 + 12 * 4) -#define PCMD13 __REG(0x40F00080 + 13 * 4) -#define PCMD14 __REG(0x40F00080 + 14 * 4) -#define PCMD15 __REG(0x40F00080 + 15 * 4) -#define PCMD16 __REG(0x40F00080 + 16 * 4) -#define PCMD17 __REG(0x40F00080 + 17 * 4) -#define PCMD18 __REG(0x40F00080 + 18 * 4) -#define PCMD19 __REG(0x40F00080 + 19 * 4) -#define PCMD20 __REG(0x40F00080 + 20 * 4) -#define PCMD21 __REG(0x40F00080 + 21 * 4) -#define PCMD22 __REG(0x40F00080 + 22 * 4) -#define PCMD23 __REG(0x40F00080 + 23 * 4) -#define PCMD24 __REG(0x40F00080 + 24 * 4) -#define PCMD25 __REG(0x40F00080 + 25 * 4) -#define PCMD26 __REG(0x40F00080 + 26 * 4) -#define PCMD27 __REG(0x40F00080 + 27 * 4) -#define PCMD28 __REG(0x40F00080 + 28 * 4) -#define PCMD29 __REG(0x40F00080 + 29 * 4) -#define PCMD30 __REG(0x40F00080 + 30 * 4) -#define PCMD31 __REG(0x40F00080 + 31 * 4) - -#define PCMD_MBC (1<<12) -#define PCMD_DCE (1<<11) -#define PCMD_LC (1<<10) -/* FIXME: PCMD_SQC need be checked. */ -#define PCMD_SQC (3<<8) /* currently only bit 8 is changeable, - bit 9 should be 0 all day. */ -#define PVCR_VCSA (0x1<<14) -#define PVCR_CommandDelay (0xf80) -#define PCFR_PI2C_EN (0x1 << 6) - -#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ -#define PSSR_RDH (1 << 5) /* Read Disable Hold */ -#define PSSR_PH (1 << 4) /* Peripheral Control Hold */ -#define PSSR_STS (1 << 3) /* Standby Mode Status */ -#define PSSR_VFS (1 << 2) /* VDD Fault Status */ -#define PSSR_BFS (1 << 1) /* Battery Fault Status */ -#define PSSR_SSS (1 << 0) /* Software Sleep Status */ - -#define PSLR_SL_ROD (1 << 20) /* Sleep-Mode/Depp-Sleep Mode nRESET_OUT Disable */ - -#define PCFR_RO (1 << 15) /* RDH Override */ -#define PCFR_PO (1 << 14) /* PH Override */ -#define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */ -#define PCFR_L1_EN (1 << 11) /* Sleep Mode L1 converter Enable */ -#define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */ -#define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */ -#define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */ -#define PCFR_GPR_EN (1 << 4) /* nRESET_GPIO Pin Enable */ -#define PCFR_DS (1 << 3) /* Deep Sleep Mode */ -#define PCFR_FS (1 << 2) /* Float Static Chip Selects */ -#define PCFR_FP (1 << 1) /* Float PCMCIA controls */ -#define PCFR_OPDE (1 << 0) /* 3.6864 MHz oscillator power-down enable */ - -#define RCSR_GPR (1 << 3) /* GPIO Reset */ -#define RCSR_SMR (1 << 2) /* Sleep Mode */ -#define RCSR_WDR (1 << 1) /* Watchdog Reset */ -#define RCSR_HWR (1 << 0) /* Hardware Reset */ - -#define PWER_GPIO(Nb) (1 << Nb) /* GPIO [0..15] wake-up enable */ -#define PWER_GPIO0 PWER_GPIO (0) /* GPIO [0] wake-up enable */ -#define PWER_GPIO1 PWER_GPIO (1) /* GPIO [1] wake-up enable */ -#define PWER_GPIO2 PWER_GPIO (2) /* GPIO [2] wake-up enable */ -#define PWER_GPIO3 PWER_GPIO (3) /* GPIO [3] wake-up enable */ -#define PWER_GPIO4 PWER_GPIO (4) /* GPIO [4] wake-up enable */ -#define PWER_GPIO5 PWER_GPIO (5) /* GPIO [5] wake-up enable */ -#define PWER_GPIO6 PWER_GPIO (6) /* GPIO [6] wake-up enable */ -#define PWER_GPIO7 PWER_GPIO (7) /* GPIO [7] wake-up enable */ -#define PWER_GPIO8 PWER_GPIO (8) /* GPIO [8] wake-up enable */ -#define PWER_GPIO9 PWER_GPIO (9) /* GPIO [9] wake-up enable */ -#define PWER_GPIO10 PWER_GPIO (10) /* GPIO [10] wake-up enable */ -#define PWER_GPIO11 PWER_GPIO (11) /* GPIO [11] wake-up enable */ -#define PWER_GPIO12 PWER_GPIO (12) /* GPIO [12] wake-up enable */ -#define PWER_GPIO13 PWER_GPIO (13) /* GPIO [13] wake-up enable */ -#define PWER_GPIO14 PWER_GPIO (14) /* GPIO [14] wake-up enable */ -#define PWER_GPIO15 PWER_GPIO (15) /* GPIO [15] wake-up enable */ -#define PWER_RTC 0x80000000 /* RTC alarm wake-up enable */ - /* * SSP Serial Port Registers - see include/asm-arm/arch-pxa/regs-ssp.h */ @@ -1360,52 +837,9 @@ */ /* - * Core Clock + * Core Clock - see include/asm-arm/arch-pxa/pxa2xx-regs.h */ -#define CCCR __REG(0x41300000) /* Core Clock Configuration Register */ -#define CKEN __REG(0x41300004) /* Clock Enable Register */ -#define OSCC __REG(0x41300008) /* Oscillator Configuration Register */ -#define CCSR __REG(0x4130000C) /* Core Clock Status Register */ - -#define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */ -#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */ -#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */ - -#define CKEN_AC97CONF (31) /* AC97 Controller Configuration */ -#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */ -#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */ -#define CKEN_MEMC (22) /* Memory Controller Clock Enable */ -#define CKEN_MEMSTK (21) /* Memory Stick Host Controller */ -#define CKEN_IM (20) /* Internal Memory Clock Enable */ -#define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */ -#define CKEN_USIM (18) /* USIM Unit Clock Enable */ -#define CKEN_MSL (17) /* MSL Unit Clock Enable */ -#define CKEN_LCD (16) /* LCD Unit Clock Enable */ -#define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */ -#define CKEN_I2C (14) /* I2C Unit Clock Enable */ -#define CKEN_FICP (13) /* FICP Unit Clock Enable */ -#define CKEN_MMC (12) /* MMC Unit Clock Enable */ -#define CKEN_USB (11) /* USB Unit Clock Enable */ -#define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */ -#define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */ -#define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */ -#define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */ -#define CKEN_I2S (8) /* I2S Unit Clock Enable */ -#define CKEN_BTUART (7) /* BTUART Unit Clock Enable */ -#define CKEN_FFUART (6) /* FFUART Unit Clock Enable */ -#define CKEN_STUART (5) /* STUART Unit Clock Enable */ -#define CKEN_HWUART (4) /* HWUART Unit Clock Enable */ -#define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */ -#define CKEN_SSP (3) /* SSP Unit Clock Enable */ -#define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */ -#define CKEN_AC97 (2) /* AC97 Unit Clock Enable */ -#define CKEN_PWM1 (1) /* PWM1 Clock Enable */ -#define CKEN_PWM0 (0) /* PWM0 Clock Enable */ - -#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ -#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ - #ifdef CONFIG_PXA27x /* Camera Interface */ diff --git a/linux/include/media/ir-kbd-i2c.h b/linux/include/media/ir-kbd-i2c.h index a455f7ce5..00fa57eb9 100644 --- a/linux/include/media/ir-kbd-i2c.h +++ b/linux/include/media/ir-kbd-i2c.h @@ -19,7 +19,4 @@ struct IR_i2c { char phys[32]; int (*get_key)(struct IR_i2c*, u32*, u32*); }; - -int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); -int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); #endif diff --git a/linux/include/media/sh_mobile_ceu.h b/linux/include/media/sh_mobile_ceu.h new file mode 100644 index 000000000..234a4711d --- /dev/null +++ b/linux/include/media/sh_mobile_ceu.h @@ -0,0 +1,12 @@ +#ifndef __ASM_SH_MOBILE_CEU_H__ +#define __ASM_SH_MOBILE_CEU_H__ + +#include <media/soc_camera.h> + +struct sh_mobile_ceu_info { + unsigned long flags; /* SOCAM_... */ + void (*enable_camera)(void); + void (*disable_camera)(void); +}; + +#endif /* __ASM_SH_MOBILE_CEU_H__ */ diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index 6a8c8be7a..1de98f150 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -13,7 +13,7 @@ #define SOC_CAMERA_H #include <linux/videodev2.h> -#include <media/videobuf-dma-sg.h> +#include <media/videobuf-core.h> struct soc_camera_device { struct list_head list; @@ -48,15 +48,12 @@ struct soc_camera_device { struct soc_camera_file { struct soc_camera_device *icd; struct videobuf_queue vb_vidq; - spinlock_t *lock; }; struct soc_camera_host { struct list_head list; struct device dev; unsigned char nr; /* Host number */ - size_t msize; - struct videobuf_queue_ops *vbq_ops; void *priv; char *drv_name; struct soc_camera_host_ops *ops; @@ -69,13 +66,13 @@ struct soc_camera_host_ops { int (*set_fmt_cap)(struct soc_camera_device *, __u32, struct v4l2_rect *); int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); + void (*init_videobuf)(struct videobuf_queue *, + struct soc_camera_device *); int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); int (*try_bus_param)(struct soc_camera_device *, __u32); int (*set_bus_param)(struct soc_camera_device *, __u32); unsigned int (*poll)(struct file *, poll_table *); - spinlock_t* (*spinlock_alloc)(struct soc_camera_file *); - void (*spinlock_free)(spinlock_t *); }; struct soc_camera_link { @@ -156,11 +153,12 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( #define SOCAM_DATAWIDTH_8 (1 << 6) #define SOCAM_DATAWIDTH_9 (1 << 7) #define SOCAM_DATAWIDTH_10 (1 << 8) -#define SOCAM_PCLK_SAMPLE_RISING (1 << 9) -#define SOCAM_PCLK_SAMPLE_FALLING (1 << 10) +#define SOCAM_DATAWIDTH_16 (1 << 9) +#define SOCAM_PCLK_SAMPLE_RISING (1 << 10) +#define SOCAM_PCLK_SAMPLE_FALLING (1 << 11) #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \ - SOCAM_DATAWIDTH_10) + SOCAM_DATAWIDTH_10 | SOCAM_DATAWIDTH_16) static inline unsigned long soc_camera_bus_param_compatible( unsigned long camera_flags, unsigned long bus_flags) diff --git a/linux/include/media/soc_camera_platform.h b/linux/include/media/soc_camera_platform.h new file mode 100644 index 000000000..851f18220 --- /dev/null +++ b/linux/include/media/soc_camera_platform.h @@ -0,0 +1,15 @@ +#ifndef __SOC_CAMERA_H__ +#define __SOC_CAMERA_H__ + +#include <linux/videodev2.h> + +struct soc_camera_platform_info { + int iface; + char *format_name; + unsigned long format_depth; + struct v4l2_pix_format format; + unsigned long bus_param; + int (*set_capture)(struct soc_camera_platform_info *info, int enable); +}; + +#endif /* __SOC_CAMERA_H__ */ diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index aa0fd8c94..798622258 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -85,14 +85,14 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, struct video_device { /* device ops */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) const struct file_operations *fops; -#else - struct file_operations *fops; -#endif /* sysfs */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) struct device class_dev; /* v4l device */ +#else + struct class_device class_dev; +#endif struct device *dev; /* device parent */ /* device info */ @@ -383,13 +383,30 @@ extern int video_usercopy(struct inode *inode, struct file *file, #ifdef CONFIG_VIDEO_V4L1_COMPAT #include <linux/mm.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +static inline int __must_check +video_device_create_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + int ret = class_device_create_file(&vfd->class_dev, attr); + if (ret < 0) + printk(KERN_WARNING "%s error: %d\n", __func__, ret); + return ret; +} +static inline void +video_device_remove_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + class_device_remove_file(&vfd->class_dev, attr); +} +#else static inline int __must_check video_device_create_file(struct video_device *vfd, struct device_attribute *attr) { int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) - printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); + printk(KERN_WARNING "%s error: %d\n", __func__, ret); return ret; } static inline void @@ -398,6 +415,7 @@ video_device_remove_file(struct video_device *vfd, { device_remove_file(&vfd->class_dev, attr); } +#endif #endif /* CONFIG_VIDEO_V4L1_COMPAT */ diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index 31d6e103c..299b1c344 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -37,7 +37,7 @@ struct v4l2_i2c_driver_data { }; static struct v4l2_i2c_driver_data v4l2_i2c_data; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) static const struct i2c_client_address_data addr_data; #else static struct i2c_client_address_data addr_data; @@ -77,25 +77,25 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) #else static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) static int v4l2_i2c_drv_resume_helper(struct i2c_client *client) #else static int v4l2_i2c_drv_resume_helper(struct device * dev) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; @@ -107,14 +107,14 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev) static struct i2c_driver v4l2_i2c_driver_legacy = { .driver = { .owner = THIS_MODULE, -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif }, .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif @@ -123,18 +123,18 @@ static struct i2c_driver v4l2_i2c_driver_legacy = { /* ----------------------------------------------------------------------- */ /* i2c implementation */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) static struct i2c_driver v4l2_i2c_driver = { .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, }; -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int compat_legacy_probe(struct i2c_client *client) { return v4l2_i2c_data.probe(client, NULL); } #endif +#endif static int __init v4l2_i2c_drv_init(void) { @@ -151,7 +151,7 @@ static int __init v4l2_i2c_drv_init(void) v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command; err = i2c_add_driver(&v4l2_i2c_driver_legacy); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) if (err) return err; v4l2_i2c_driver.driver.name = v4l2_i2c_data.name; @@ -176,7 +176,7 @@ static int __init v4l2_i2c_drv_init(void) static void __exit v4l2_i2c_drv_cleanup(void) { i2c_del_driver(&v4l2_i2c_driver_legacy); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) i2c_del_driver(&v4l2_i2c_driver); #endif } diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 9333e56b3..1feadb6c1 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -44,13 +44,13 @@ struct v4l2_i2c_driver_data { static struct v4l2_i2c_driver_data v4l2_i2c_data; static struct i2c_driver v4l2_i2c_driver; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int compat_legacy_probe(struct i2c_client *client) { return v4l2_i2c_data.probe(client, NULL); } #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) /* Bus-based I2C implementation for kernels >= 2.6.22 */ @@ -111,25 +111,25 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) #else static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) static int v4l2_i2c_drv_resume_helper(struct i2c_client *client) #else static int v4l2_i2c_drv_resume_helper(struct device * dev) #endif { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; @@ -140,14 +140,14 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev) static struct i2c_driver v4l2_i2c_driver = { .driver = { .owner = THIS_MODULE, -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif }, .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, #endif diff --git a/linux/include/media/videobuf-dma-contig.h b/linux/include/media/videobuf-dma-contig.h new file mode 100644 index 000000000..549386681 --- /dev/null +++ b/linux/include/media/videobuf-dma-contig.h @@ -0,0 +1,32 @@ +/* + * helper functions for physically contiguous capture buffers + * + * The functions support hardware lacking scatter gather support + * (i.e. the buffers must be linear in physical memory) + * + * Copyright (c) 2008 Magnus Damm + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 + */ +#ifndef _VIDEOBUF_DMA_CONTIG_H +#define _VIDEOBUF_DMA_CONTIG_H + +#include <linux/dma-mapping.h> +#include <media/videobuf-core.h> + +void videobuf_queue_dma_contig_init(struct videobuf_queue *q, + struct videobuf_queue_ops *ops, + struct device *dev, + spinlock_t *irqlock, + enum v4l2_buf_type type, + enum v4l2_field field, + unsigned int msize, + void *priv); + +dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf); +void videobuf_dma_contig_free(struct videobuf_queue *q, + struct videobuf_buffer *buf); + +#endif /* _VIDEOBUF_DMA_CONTIG_H */ diff --git a/linux/include/media/videobuf-dma-sg.h b/linux/include/media/videobuf-dma-sg.h index be8da269e..90edd22d3 100644 --- a/linux/include/media/videobuf-dma-sg.h +++ b/linux/include/media/videobuf-dma-sg.h @@ -1,7 +1,7 @@ /* * helper functions for SG DMA video4linux capture buffers * - * The functions expect the hardware being able to scatter gatter + * The functions expect the hardware being able to scatter gather * (i.e. the buffers are not linear in physical memory, but fragmented * into PAGE_SIZE chunks). They also assume the driver does not need * to touch the video data. diff --git a/linux/include/media/videobuf-vmalloc.h b/linux/include/media/videobuf-vmalloc.h index aed39460c..e87222c6a 100644 --- a/linux/include/media/videobuf-vmalloc.h +++ b/linux/include/media/videobuf-vmalloc.h @@ -1,7 +1,7 @@ /* * helper functions for vmalloc capture buffers * - * The functions expect the hardware being able to scatter gatter + * The functions expect the hardware being able to scatter gather * (i.e. the buffers are not linear in physical memory, but fragmented * into PAGE_SIZE chunks). They also assume the driver does not need * to touch the video data. diff --git a/linux/sound/i2c/other/tea575x-tuner.c b/linux/sound/i2c/other/tea575x-tuner.c index a7fbe18d0..4ac049ad0 100644 --- a/linux/sound/i2c/other/tea575x-tuner.c +++ b/linux/sound/i2c/other/tea575x-tuner.c @@ -167,10 +167,12 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file, struct video_audio v; if(copy_from_user(&v, arg, sizeof(v))) return -EFAULT; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) if (tea->ops->mute) tea->ops->mute(tea, (v.flags & VIDEO_AUDIO_MUTE) ? 1 : 0); +#endif if(v.audio) return -EINVAL; return 0; @@ -223,9 +225,11 @@ void snd_tea575x_init(struct snd_tea575x *tea) snd_tea575x_set_freq(tea); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) /* mute on init */ if (tea->ops->mute) tea->ops->mute(tea, 1); +#endif } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) diff --git a/linux/sound/oss/btaudio.c b/linux/sound/oss/btaudio.c index 9aa5f866f..cf10bf82a 100644 --- a/linux/sound/oss/btaudio.c +++ b/linux/sound/oss/btaudio.c @@ -980,7 +980,11 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev, /* register devices */ if (digital) { rc = bta->dsp_digital = - register_sound_dsp(&btaudio_digital_dsp_fops,dsp1); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) + register_sound_dsp(&btaudio_digital_dsp_fops, dsp1); +#else + register_sound_dsp((struct file_operations *)&btaudio_digital_dsp_fops, dsp1); +#endif if (rc < 0) { printk(KERN_WARNING "btaudio: can't register digital dsp (rc=%d)\n",rc); @@ -991,7 +995,11 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev, } if (analog) { rc = bta->dsp_analog = - register_sound_dsp(&btaudio_analog_dsp_fops,dsp2); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) + register_sound_dsp(&btaudio_analog_dsp_fops, dsp2); +#else + register_sound_dsp((struct file_operations *)&btaudio_analog_dsp_fops, dsp2); +#endif if (rc < 0) { printk(KERN_WARNING "btaudio: can't register analog dsp (rc=%d)\n",rc); @@ -999,7 +1007,11 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev, } printk(KERN_INFO "btaudio: registered device dsp%d [analog]\n", bta->dsp_analog >> 4); - rc = bta->mixer_dev = register_sound_mixer(&btaudio_mixer_fops,mixer); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) + rc = bta->mixer_dev = register_sound_mixer(&btaudio_mixer_fops, mixer); +#else + rc = bta->mixer_dev = register_sound_mixer((struct file_operations *)&btaudio_mixer_fops, mixer); +#endif if (rc < 0) { printk(KERN_WARNING "btaudio: can't register mixer (rc=%d)\n",rc); diff --git a/v4l/Makefile b/v4l/Makefile index 60bf0b317..57bb4e614 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -39,11 +39,14 @@ endif # TOPDIR ################################################# # default compilation rule -default:: config-compat.h Makefile.media links oss +default:: config-compat.h Makefile.media links oss # firmware @echo Kernel build directory is $(OUTDIR) $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules ./scripts/rmmod.pl check # $(MAKE) checkpatch + +firmware:: firmlinks + $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD)/firmware $(MYCFLAGS) modules ################################################# # Object specific rules @@ -249,6 +252,10 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. @find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. +firmlinks:: + for i in `find ../linux/firmware/ -type d|sed s,"../linux/firmware",,`; do mkdir -p firmware/$$i; done >/dev/null + for i in `find ../linux/firmware/ -type f|sed s,"../linux/firmware",,`; do ln -sf $(PWD)/../linux/firmware/$$i firmware/$$i; done + # This link is so code with #include "oss/*.h" will find its header files oss: ln -sf . oss diff --git a/v4l/compat.h b/v4l/compat.h index ba9a7cff7..5e46c8271 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -114,6 +114,9 @@ do { \ p->length = sz; \ p->offset = off; \ } while (0) + +#define pr_err(fmt, arg...) \ + printk(KERN_ERR fmt, ##arg) #endif #ifndef BIT_MASK @@ -170,8 +173,11 @@ static inline struct proc_dir_entry *proc_create(const char *a, e = create_proc_entry(a, b, c); if (e) { e->owner = THIS_MODULE; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) e->proc_fops = d; - +#else + e->proc_fops = (struct file_operations *)d; +#endif } return e; } @@ -189,7 +195,11 @@ static inline struct proc_dir_entry *proc_create_data(const char *a, e = create_proc_entry(a, b, c); if (e) { e->owner = THIS_MODULE; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 17) e->proc_fops = d; +#else + e->proc_fops = (struct file_operations *)d; +#endif e->data = f; } return e; @@ -197,6 +207,10 @@ static inline struct proc_dir_entry *proc_create_data(const char *a, #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17) +#define hweight64(x) generic_hweight64(x) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) #define div64_u64(a,b) div64_64(a,b) diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index b553a8a06..b0dc16133 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -276,6 +276,7 @@ sub open_kconfig($$) { my $disabled = 0; my $in_help = 0; my $default_seen = 0; + my $if; print "Opening $file\n" if $debug; open $in, '<', $file or die "File not found: $file"; @@ -314,6 +315,7 @@ sub open_kconfig($$) { $disabled = 0; $default_seen = 0; $key = undef; + $if = ""; } next if (/^\s*#/ || /^\s*$/); # skip comments and blank lines @@ -327,6 +329,7 @@ sub open_kconfig($$) { my $nothandled = 0; if (m|^\s*(?:menu)?config (\w+)\s*$|) { $key = $1; + $if = ""; print "Found config '$key' at $file:$.\n" if $debug; add_config($key); @@ -382,8 +385,24 @@ sub open_kconfig($$) { # config type if(/^\s*bool(ean)?\s/) { add_bool($key); + if (m|if (.*)\s*$|) { + printf("Boolean $key with if '$1'\n") if $debug; + if ($if eq "") { + $if = "($1)"; + } else { + $if .= " && ($1)"; + } + } } elsif (/^\s*tristate\s/) { add_tristate($key); + if (m|if (.*)\s*$|) { + printf("Boolean $key with if '$1'\n") if $debug; + if ($if eq "") { + $if = "($1)"; + } else { + $if .= " && ($1)"; + } + } } elsif (/^\s*int\s/) { add_int($key); } elsif (/^\s*hex\s/) { @@ -400,6 +419,14 @@ sub open_kconfig($$) { # default lines } elsif (m|^\s*default\s+(.+?)(?:\s+if .*)?\s*$|) { my $o = $1; + if ($2 ne "") { + if ($if eq "") { + $if = "($2)"; + } else { + $if .= " && ($2)"; + } + } + # Get default for int options if ($o =~ m|^"(\d+)"$| && exists $intopt{$key}) { set_int_value($key, $1); @@ -412,13 +439,21 @@ sub open_kconfig($$) { # Override default for disabled tri/bool options # We don't care about the default for tri/bool options otherwise - } elsif ($o =~ /^(y|n|m|"yes"|"no")$/i && exists $tristate{$key}) { - if ($disabled) { - $default_seen = 1; - $_ = "\tdefault n\n"; + } elsif (!$o =~ /^(y|n|m|"yes"|"no")$/i && exists $tristate{$key}) { + print "Default is an expression at $file:$. $_\n" if $debug; + if ($if eq "") { + depends($key, "$o"); } - } else { - print "Unknown default at $file:$. $_\n" if $debug; + } + if ($if ne "") { + # FIXME: What happens if no default clause exists? + # the $if won't be handled + depends($key, "$if || $o"); + } + + if ($disabled) { + $default_seen = 1; + $_ = "\tdefault n\n"; } } else { print "Skipping $file:$. $_" if $debug; @@ -536,6 +571,74 @@ config VIDEO_KERNEL_VERSION Unless you know what you are doing, you should answer N. +config PREVENT_FIRMWARE_BUILD + default n + +config FIRMWARE_IN_KERNEL + default y + + bool "Include in-kernel firmware blobs in kernel binary" + depends on FW_LOADER + default y + help + The kernel source tree includes a number of firmware 'blobs' + which are used by various drivers. The recommended way to + use these is to run "make firmware_install" and to copy the + resulting binary files created in usr/lib/firmware directory + of the kernel tree to the /lib/firmware on your system so + that they can be loaded by userspace helpers on request. + + Enabling this option will build each required firmware blob + into the kernel directly, where request_firmware() will find + them without having to call out to userspace. This may be + useful if your root file system requires a device which uses + such firmware, and do not wish to use an initrd. + + This single option controls the inclusion of firmware for + every driver which usees request_firmare() and ships its + firmware in the kernel source tree, to avoid a proliferation + of 'Include firmware for xxx device' options. + + Say 'N' and let firmware be loaded from userspace. + +config EXTRA_FIRMWARE + string "External firmware blobs to build into the kernel binary" + depends on FW_LOADER + help + This option allows firmware to be built into the kernel, for the + cases where the user either cannot or doesn't want to provide it from + userspace at runtime (for example, when the firmware in question is + required for accessing the boot device, and the user doesn't want to + use an initrd). + This option is a string, and takes the (space-separated) names of the + firmware files -- the same names which appear in MODULE_FIRMWARE() + and request_firmware() in the source. These files should exist under + the directory specified by the EXTRA_FIRMWARE_DIR option, which is + by default the firmware/ subdirectory of the kernel source tree. + + So, for example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", + copy the usb8388.bin file into the firmware/ directory, and build the + kernel. Then any request_firmware("usb8388.bin") will be + satisfied internally without needing to call out to userspace. + + WARNING: If you include additional firmware files into your binary + kernel image which are not available under the terms of the GPL, + then it may be a violation of the GPL to distribute the resulting + image -- since it combines both GPL and non-GPL work. You should + consult a lawyer of your own before distributing such an image. + +config EXTRA_FIRMWARE_DIR + string "Firmware blobs root directory" + depends on EXTRA_FIRMWARE != "" + default "firmware" + help + This option controls the directory in which the kernel build system + looks for the firmware files listed in the EXTRA_FIRMWARE option. + The default is the firmware/ directory in the kernel source tree, + but by changing this option you can point it elsewhere, such as + the /lib/firmware/ directory or another separate directory + containing firmware files. + EOF open_kconfig('../linux', '../linux/drivers/media/Kconfig'); diff --git a/v4l/versions.txt b/v4l/versions.txt index 086403c33..46e2673c0 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -16,6 +16,8 @@ VIDEO_TCM825X USB_STKWEBCAM #Initial version for this driver USB_VIDEO_CLASS +# This driver needs div64_64 +DVB_DRX397XD [2.6.20] #This driver requires HID_REQ_GET_REPORT @@ -24,6 +26,15 @@ USB_SI470X [2.6.19] #This driver were developed at kernel 2.6.19, requiring vmalloc_user/remap_vmalloc_range VIDEO_CAFE_CCIC +#struct device vs struct class_device issues +USB_ET61X251 +USB_SN9C102 +USB_PWC +USB_PWC_DEBUG +USB_OV511 +USB_STV680 +USB_S2255 +VIDEO_USBVISION # Uses remap_vmalloc_range() [2.6.18] |