Commit 5e195bbd authored by Corentin Labbe's avatar Corentin Labbe Committed by Mauro Carvalho Chehab

media: zoran: fix checkpatch issue

Fix a lot of style issue found by checkpatch.
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 874edaa5
// SPDX-License-Identifier: GPL-2.0-or-later
/* /*
* VIDEO MOTION CODECs internal API for video devices * VIDEO MOTION CODECs internal API for video devices
* *
...@@ -5,22 +6,6 @@ ...@@ -5,22 +6,6 @@
* bound to a master device. * bound to a master device.
* *
* (c) 2002 Wolfgang Scherr <scherr@net4you.at> * (c) 2002 Wolfgang Scherr <scherr@net4you.at>
*
* $Id: videocodec.c,v 1.1.2.8 2003/03/29 07:16:04 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
#define VIDEOCODEC_VERSION "v0.2" #define VIDEOCODEC_VERSION "v0.2"
...@@ -69,8 +54,7 @@ static struct codec_list *codeclist_top; ...@@ -69,8 +54,7 @@ static struct codec_list *codeclist_top;
/* function prototypes of the master/slave interface */ /* function prototypes of the master/slave interface */
/* ================================================= */ /* ================================================= */
struct videocodec * struct videocodec *videocodec_attach(struct videocodec_master *master)
videocodec_attach (struct videocodec_master *master)
{ {
struct codec_list *h = codeclist_top; struct codec_list *h = codeclist_top;
struct attached_list *a, *ptr; struct attached_list *a, *ptr;
...@@ -82,8 +66,7 @@ videocodec_attach (struct videocodec_master *master) ...@@ -82,8 +66,7 @@ videocodec_attach (struct videocodec_master *master)
return NULL; return NULL;
} }
dprintk(2, dprintk(2, "%s: '%s', flags %lx, magic %lx\n", __func__,
"videocodec_attach: '%s', flags %lx, magic %lx\n",
master->name, master->flags, master->magic); master->name, master->flags, master->magic);
if (!h) { if (!h) {
...@@ -97,50 +80,35 @@ videocodec_attach (struct videocodec_master *master) ...@@ -97,50 +80,35 @@ videocodec_attach (struct videocodec_master *master)
// attach only if the slave has at least the flags // attach only if the slave has at least the flags
// expected by the master // expected by the master
if ((master->flags & h->codec->flags) == master->flags) { if ((master->flags & h->codec->flags) == master->flags) {
dprintk(4, "videocodec_attach: try '%s'\n", dprintk(4, "%s: try '%s'\n", __func__, h->codec->name);
h->codec->name);
if (!try_module_get(h->codec->owner)) if (!try_module_get(h->codec->owner))
return NULL; return NULL;
codec = kmemdup(h->codec, sizeof(struct videocodec), codec = kmemdup(h->codec, sizeof(struct videocodec), GFP_KERNEL);
GFP_KERNEL); if (!codec)
if (!codec) {
dprintk(1,
KERN_ERR
"videocodec_attach: no mem\n");
goto out_module_put; goto out_module_put;
}
res = strlen(codec->name); res = strlen(codec->name);
snprintf(codec->name + res, sizeof(codec->name) - res, snprintf(codec->name + res, sizeof(codec->name) - res, "[%d]", h->attached);
"[%d]", h->attached);
codec->master_data = master; codec->master_data = master;
res = codec->setup(codec); res = codec->setup(codec);
if (res == 0) { if (res == 0) {
dprintk(3, "videocodec_attach '%s'\n", dprintk(3, "%s: '%s'\n", __func__, codec->name);
codec->name); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
ptr = kzalloc(sizeof(struct attached_list), GFP_KERNEL); if (!ptr)
if (!ptr) {
dprintk(1,
KERN_ERR
"videocodec_attach: no memory\n");
goto out_kfree; goto out_kfree;
}
ptr->codec = codec; ptr->codec = codec;
a = h->list; a = h->list;
if (!a) { if (!a) {
h->list = ptr; h->list = ptr;
dprintk(4, dprintk(4, "videocodec: first element\n");
"videocodec: first element\n");
} else { } else {
while (a->next) while (a->next)
a = a->next; // find end a = a->next; // find end
a->next = ptr; a->next = ptr;
dprintk(4, dprintk(4, "videocodec: in after '%s'\n", h->codec->name);
"videocodec: in after '%s'\n",
h->codec->name);
} }
h->attached += 1; h->attached += 1;
...@@ -161,9 +129,9 @@ videocodec_attach (struct videocodec_master *master) ...@@ -161,9 +129,9 @@ videocodec_attach (struct videocodec_master *master)
kfree(codec); kfree(codec);
return NULL; return NULL;
} }
EXPORT_SYMBOL(videocodec_attach);
int int videocodec_detach(struct videocodec *codec)
videocodec_detach (struct videocodec *codec)
{ {
struct codec_list *h = codeclist_top; struct codec_list *h = codeclist_top;
struct attached_list *a, *prev; struct attached_list *a, *prev;
...@@ -174,8 +142,7 @@ videocodec_detach (struct videocodec *codec) ...@@ -174,8 +142,7 @@ videocodec_detach (struct videocodec *codec)
return -EINVAL; return -EINVAL;
} }
dprintk(2, dprintk(2, "%s: '%s', type: %x, flags %lx, magic %lx\n", __func__,
"videocodec_detach: '%s', type: %x, flags %lx, magic %lx\n",
codec->name, codec->type, codec->flags, codec->magic); codec->name, codec->type, codec->flags, codec->magic);
if (!h) { if (!h) {
...@@ -191,9 +158,7 @@ videocodec_detach (struct videocodec *codec) ...@@ -191,9 +158,7 @@ videocodec_detach (struct videocodec *codec)
if (codec == a->codec) { if (codec == a->codec) {
res = a->codec->unset(a->codec); res = a->codec->unset(a->codec);
if (res >= 0) { if (res >= 0) {
dprintk(3, dprintk(3, "%s: '%s'\n", __func__, a->codec->name);
"videocodec_detach: '%s'\n",
a->codec->name);
a->codec->master_data = NULL; a->codec->master_data = NULL;
} else { } else {
dprintk(1, dprintk(1,
...@@ -202,14 +167,12 @@ videocodec_detach (struct videocodec *codec) ...@@ -202,14 +167,12 @@ videocodec_detach (struct videocodec *codec)
a->codec->name); a->codec->name);
a->codec->master_data = NULL; a->codec->master_data = NULL;
} }
if (prev == NULL) { if (!prev) {
h->list = a->next; h->list = a->next;
dprintk(4, dprintk(4, "videocodec: delete first\n");
"videocodec: delete first\n");
} else { } else {
prev->next = a->next; prev->next = a->next;
dprintk(4, dprintk(4, "videocodec: delete middle\n");
"videocodec: delete middle\n");
} }
module_put(a->codec->owner); module_put(a->codec->owner);
kfree(a->codec); kfree(a->codec);
...@@ -226,9 +189,9 @@ videocodec_detach (struct videocodec *codec) ...@@ -226,9 +189,9 @@ videocodec_detach (struct videocodec *codec)
dprintk(1, KERN_ERR "videocodec_detach: given codec not found!\n"); dprintk(1, KERN_ERR "videocodec_detach: given codec not found!\n");
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL(videocodec_detach);
int int videocodec_register(const struct videocodec *codec)
videocodec_register (const struct videocodec *codec)
{ {
struct codec_list *ptr, *h = codeclist_top; struct codec_list *ptr, *h = codeclist_top;
...@@ -241,11 +204,9 @@ videocodec_register (const struct videocodec *codec) ...@@ -241,11 +204,9 @@ videocodec_register (const struct videocodec *codec)
"videocodec: register '%s', type: %x, flags %lx, magic %lx\n", "videocodec: register '%s', type: %x, flags %lx, magic %lx\n",
codec->name, codec->type, codec->flags, codec->magic); codec->name, codec->type, codec->flags, codec->magic);
ptr = kzalloc(sizeof(struct codec_list), GFP_KERNEL); ptr = kzalloc(sizeof(*ptr), GFP_KERNEL);
if (!ptr) { if (!ptr)
dprintk(1, KERN_ERR "videocodec_register: no memory\n");
return -ENOMEM; return -ENOMEM;
}
ptr->codec = codec; ptr->codec = codec;
if (!h) { if (!h) {
...@@ -261,9 +222,9 @@ videocodec_register (const struct videocodec *codec) ...@@ -261,9 +222,9 @@ videocodec_register (const struct videocodec *codec)
return 0; return 0;
} }
EXPORT_SYMBOL(videocodec_register);
int int videocodec_unregister(const struct videocodec *codec)
videocodec_unregister (const struct videocodec *codec)
{ {
struct codec_list *prev = NULL, *h = codeclist_top; struct codec_list *prev = NULL, *h = codeclist_top;
...@@ -294,7 +255,7 @@ videocodec_unregister (const struct videocodec *codec) ...@@ -294,7 +255,7 @@ videocodec_unregister (const struct videocodec *codec)
} }
dprintk(3, "videocodec: unregister '%s' is ok.\n", dprintk(3, "videocodec: unregister '%s' is ok.\n",
h->codec->name); h->codec->name);
if (prev == NULL) { if (!prev) {
codeclist_top = h->next; codeclist_top = h->next;
dprintk(4, dprintk(4,
"videocodec: delete first element\n"); "videocodec: delete first element\n");
...@@ -315,6 +276,7 @@ videocodec_unregister (const struct videocodec *codec) ...@@ -315,6 +276,7 @@ videocodec_unregister (const struct videocodec *codec)
"videocodec_unregister: given codec not found!\n"); "videocodec_unregister: given codec not found!\n");
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL(videocodec_unregister);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static int proc_videocodecs_show(struct seq_file *m, void *v) static int proc_videocodecs_show(struct seq_file *m, void *v)
...@@ -327,12 +289,12 @@ static int proc_videocodecs_show(struct seq_file *m, void *v) ...@@ -327,12 +289,12 @@ static int proc_videocodecs_show(struct seq_file *m, void *v)
while (h) { while (h) {
seq_printf(m, "S %32s %04x %08lx %08lx (TEMPLATE)\n", seq_printf(m, "S %32s %04x %08lx %08lx (TEMPLATE)\n",
h->codec->name, h->codec->type, h->codec->name, h->codec->type,
h->codec->flags, h->codec->magic); h->codec->flags, h->codec->magic);
a = h->list; a = h->list;
while (a) { while (a) {
seq_printf(m, "M %32s %04x %08lx %08lx (%s)\n", seq_printf(m, "M %32s %04x %08lx %08lx (%s)\n",
a->codec->master_data->name, a->codec->master_data->name,
a->codec->master_data->type, a->codec->master_data->type,
a->codec->master_data->flags, a->codec->master_data->flags,
a->codec->master_data->magic, a->codec->master_data->magic,
...@@ -349,39 +311,29 @@ static int proc_videocodecs_show(struct seq_file *m, void *v) ...@@ -349,39 +311,29 @@ static int proc_videocodecs_show(struct seq_file *m, void *v)
/* ===================== */ /* ===================== */
/* hook in driver module */ /* hook in driver module */
/* ===================== */ /* ===================== */
static int __init static int __init videocodec_init(void)
videocodec_init (void)
{ {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static struct proc_dir_entry *videocodec_proc_entry; static struct proc_dir_entry *videocodec_proc_entry;
#endif #endif
printk(KERN_INFO "Linux video codec intermediate layer: %s\n", pr_info("Linux video codec intermediate layer: %s\n", VIDEOCODEC_VERSION);
VIDEOCODEC_VERSION);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
videocodec_proc_entry = proc_create_single("videocodecs", 0, NULL, videocodec_proc_entry = proc_create_single("videocodecs", 0, NULL, proc_videocodecs_show);
proc_videocodecs_show); if (!videocodec_proc_entry)
if (!videocodec_proc_entry) {
dprintk(1, KERN_ERR "videocodec: can't init procfs.\n"); dprintk(1, KERN_ERR "videocodec: can't init procfs.\n");
}
#endif #endif
return 0; return 0;
} }
static void __exit static void __exit videocodec_exit(void)
videocodec_exit (void)
{ {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
remove_proc_entry("videocodecs", NULL); remove_proc_entry("videocodecs", NULL);
#endif #endif
} }
EXPORT_SYMBOL(videocodec_attach);
EXPORT_SYMBOL(videocodec_detach);
EXPORT_SYMBOL(videocodec_register);
EXPORT_SYMBOL(videocodec_unregister);
module_init(videocodec_init); module_init(videocodec_init);
module_exit(videocodec_exit); module_exit(videocodec_exit);
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* VIDEO MOTION CODECs internal API for video devices * VIDEO MOTION CODECs internal API for video devices
* *
...@@ -5,22 +6,6 @@ ...@@ -5,22 +6,6 @@
* bound to a master device. * bound to a master device.
* *
* (c) 2002 Wolfgang Scherr <scherr@net4you.at> * (c) 2002 Wolfgang Scherr <scherr@net4you.at>
*
* $Id: videocodec.h,v 1.1.2.4 2003/01/14 21:15:03 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
/* =================== */ /* =================== */
...@@ -64,7 +49,6 @@ ...@@ -64,7 +49,6 @@
device dependent and vary between MJPEG/MPEG/WAVELET/... devices. (!!!!) device dependent and vary between MJPEG/MPEG/WAVELET/... devices. (!!!!)
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
*/ */
/* ========================================== */ /* ========================================== */
/* description of the videocodec_io structure */ /* description of the videocodec_io structure */
...@@ -111,7 +95,7 @@ ...@@ -111,7 +95,7 @@
the calls include frame numbers and flags (even/odd/...) the calls include frame numbers and flags (even/odd/...)
if needed and a flag which allows blocking until its ready if needed and a flag which allows blocking until its ready
*/ */
/* ============== */ /* ============== */
/* user interface */ /* user interface */
/* ============== */ /* ============== */
...@@ -131,7 +115,6 @@ M zr36055[0] 0001 0000c001 00000000 (zr36050[0]) ...@@ -131,7 +115,6 @@ M zr36055[0] 0001 0000c001 00000000 (zr36050[0])
M zr36055[1] 0001 0000c001 00000000 (zr36050[1]) M zr36055[1] 0001 0000c001 00000000 (zr36050[1])
*/ */
/* =============================================== */ /* =============================================== */
/* special defines for the videocodec_io structure */ /* special defines for the videocodec_io structure */
...@@ -207,10 +190,9 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1]) ...@@ -207,10 +190,9 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1])
#define CODEC_G_FLAG 0x8000 /* this is how 'get' is detected */ #define CODEC_G_FLAG 0x8000 /* this is how 'get' is detected */
/* types of transfer, directly user space or a kernel buffer (image-fn.'s) */ /* types of transfer, directly user space or a kernel buffer (image-fn.'s) */
/* -> used in get_image, put_image */ /* -> used in get_image, put_image */
#define CODEC_TRANSFER_KERNEL 0 /* use "memcopy" */ #define CODEC_TRANSFER_KERNEL 0 /* use "memcopy" */
#define CODEC_TRANSFER_USER 1 /* use "to/from_user" */ #define CODEC_TRANSFER_USER 1 /* use "to/from_user" */
/* ========================= */ /* ========================= */
/* the structures itself ... */ /* the structures itself ... */
...@@ -267,46 +249,27 @@ struct videocodec { ...@@ -267,46 +249,27 @@ struct videocodec {
void *data; /* private slave data */ void *data; /* private slave data */
/* attach/detach client functions (indirect call) */ /* attach/detach client functions (indirect call) */
int (*setup) (struct videocodec * codec); int (*setup)(struct videocodec *codec);
int (*unset) (struct videocodec * codec); int (*unset)(struct videocodec *codec);
/* main functions, every client needs them for sure! */ /* main functions, every client needs them for sure! */
// set compression or decompression (or freeze, stop, standby, etc) // set compression or decompression (or freeze, stop, standby, etc)
int (*set_mode) (struct videocodec * codec, int (*set_mode)(struct videocodec *codec, int mode);
int mode);
// setup picture size and norm (for the codec's video frontend) // setup picture size and norm (for the codec's video frontend)
int (*set_video) (struct videocodec * codec, int (*set_video)(struct videocodec *codec, struct tvnorm *norm,
struct tvnorm * norm, struct vfe_settings *cap, struct vfe_polarity *pol);
struct vfe_settings * cap,
struct vfe_polarity * pol);
// other control commands, also mmap setup etc. // other control commands, also mmap setup etc.
int (*control) (struct videocodec * codec, int (*control)(struct videocodec *codec, int type, int size, void *data);
int type,
int size,
void *data);
/* additional setup/query/processing (may be NULL pointer) */ /* additional setup/query/processing (may be NULL pointer) */
// interrupt setup / handling (for irq's delivered by master) // interrupt setup / handling (for irq's delivered by master)
int (*setup_interrupt) (struct videocodec * codec, int (*setup_interrupt)(struct videocodec *codec, long mode);
long mode); int (*handle_interrupt)(struct videocodec *codec, int source, long flag);
int (*handle_interrupt) (struct videocodec * codec,
int source,
long flag);
// picture interface (if any) // picture interface (if any)
long (*put_image) (struct videocodec * codec, long (*put_image)(struct videocodec *codec, int tr_type, int block,
int tr_type, long *fr_num, long *flag, long size, void *buf);
int block, long (*get_image)(struct videocodec *codec, int tr_type, int block,
long *fr_num, long *fr_num, long *flag, long size, void *buf);
long *flag,
long size,
void *buf);
long (*get_image) (struct videocodec * codec,
int tr_type,
int block,
long *fr_num,
long *flag,
long size,
void *buf);
}; };
struct videocodec_master { struct videocodec_master {
...@@ -318,13 +281,9 @@ struct videocodec_master { ...@@ -318,13 +281,9 @@ struct videocodec_master {
void *data; /* private master data */ void *data; /* private master data */
__u32(*readreg) (struct videocodec * codec, __u32 (*readreg)(struct videocodec *codec, __u16 reg);
__u16 reg); void (*writereg)(struct videocodec *codec, __u16 reg, __u32 value);
void (*writereg) (struct videocodec * codec,
__u16 reg,
__u32 value);
}; };
/* ================================================= */ /* ================================================= */
/* function prototypes of the master/slave interface */ /* function prototypes of the master/slave interface */
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* zoran - Iomega Buz driver * zoran - Iomega Buz driver
* *
...@@ -12,16 +13,6 @@ ...@@ -12,16 +13,6 @@
* bttv - Bt848 frame grabber driver * bttv - Bt848 frame grabber driver
* Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) * Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
* & Marcus Metzler (mocm@thp.uni-koeln.de) * & Marcus Metzler (mocm@thp.uni-koeln.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.
*
* 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.
*/ */
#ifndef _BUZ_H_ #ifndef _BUZ_H_
...@@ -141,11 +132,12 @@ struct zoran_format { ...@@ -141,11 +132,12 @@ struct zoran_format {
__u32 flags; __u32 flags;
__u32 vfespfr; __u32 vfespfr;
}; };
/* flags */ /* flags */
#define ZORAN_FORMAT_COMPRESSED 1<<0 #define ZORAN_FORMAT_COMPRESSED BIT(0)
#define ZORAN_FORMAT_OVERLAY 1<<1 #define ZORAN_FORMAT_OVERLAY BIT(1)
#define ZORAN_FORMAT_CAPTURE 1<<2 #define ZORAN_FORMAT_CAPTURE BIT(2)
#define ZORAN_FORMAT_PLAYBACK 1<<3 #define ZORAN_FORMAT_PLAYBACK BIT(3)
/* overlay-settings */ /* overlay-settings */
struct zoran_overlay_settings { struct zoran_overlay_settings {
...@@ -205,7 +197,7 @@ struct zoran_buffer_col { ...@@ -205,7 +197,7 @@ struct zoran_buffer_col {
enum zoran_lock_activity active; /* feature currently in use? */ enum zoran_lock_activity active; /* feature currently in use? */
unsigned int num_buffers, buffer_size; unsigned int num_buffers, buffer_size;
struct zoran_buffer buffer[MAX_FRAME]; /* buffers */ struct zoran_buffer buffer[MAX_FRAME]; /* buffers */
u8 allocated; /* Flag if buffers are allocated */ u8 allocated; /* Flag if buffers are allocated */
u8 need_contiguous; /* Flag if contiguous buffers are needed */ u8 need_contiguous; /* Flag if contiguous buffers are needed */
/* only applies to jpg buffers, raw buffers are always contiguous */ /* only applies to jpg buffers, raw buffers are always contiguous */
}; };
...@@ -262,7 +254,7 @@ struct card_info { ...@@ -262,7 +254,7 @@ struct card_info {
/* avs6eyes mux setting */ /* avs6eyes mux setting */
u8 input_mux; u8 input_mux;
void (*init) (struct zoran * zr); void (*init)(struct zoran *zr);
}; };
struct zoran { struct zoran {
...@@ -300,10 +292,10 @@ struct zoran { ...@@ -300,10 +292,10 @@ struct zoran {
v4l2_std_id norm; v4l2_std_id norm;
/* Current buffer params */ /* Current buffer params */
void *vbuf_base; void *vbuf_base;
int vbuf_height, vbuf_width; int vbuf_height, vbuf_width;
int vbuf_depth; int vbuf_depth;
int vbuf_bytesperline; int vbuf_bytesperline;
struct zoran_overlay_settings overlay_settings; struct zoran_overlay_settings overlay_settings;
u32 *overlay_mask; /* overlay mask */ u32 *overlay_mask; /* overlay mask */
...@@ -336,11 +328,11 @@ struct zoran { ...@@ -336,11 +328,11 @@ struct zoran {
/* (dma_head - dma_tail) is number active in DMA, must be <= BUZ_NUM_STAT_COM */ /* (dma_head - dma_tail) is number active in DMA, must be <= BUZ_NUM_STAT_COM */
/* (value & BUZ_MASK_STAT_COM) corresponds to index in stat_com table */ /* (value & BUZ_MASK_STAT_COM) corresponds to index in stat_com table */
unsigned long jpg_que_head; /* Index where to put next buffer which is queued */ unsigned long jpg_que_head; /* Index where to put next buffer which is queued */
unsigned long jpg_dma_head; /* Index of next buffer which goes into stat_com */ unsigned long jpg_dma_head; /* Index of next buffer which goes into stat_com */
unsigned long jpg_dma_tail; /* Index of last buffer in stat_com */ unsigned long jpg_dma_tail; /* Index of last buffer in stat_com */
unsigned long jpg_que_tail; /* Index of last buffer in queue */ unsigned long jpg_que_tail; /* Index of last buffer in queue */
unsigned long jpg_seq_num; /* count of frames since grab/play started */ unsigned long jpg_seq_num; /* count of frames since grab/play started */
unsigned long jpg_err_seq; /* last seq_num before error */ unsigned long jpg_err_seq; /* last seq_num before error */
unsigned long jpg_err_shift; unsigned long jpg_err_shift;
unsigned long jpg_queued_num; /* count of frames queued since grab/play started */ unsigned long jpg_queued_num; /* count of frames queued since grab/play started */
...@@ -392,11 +384,11 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev) ...@@ -392,11 +384,11 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev)
/* There was something called _ALPHA_BUZ that used the PCI address instead of /* There was something called _ALPHA_BUZ that used the PCI address instead of
* the kernel iomapped address for btread/btwrite. */ * the kernel iomapped address for btread/btwrite. */
#define btwrite(dat,adr) writel((dat), zr->zr36057_mem+(adr)) #define btwrite(dat, adr) writel((dat), zr->zr36057_mem + (adr))
#define btread(adr) readl(zr->zr36057_mem+(adr)) #define btread(adr) readl(zr->zr36057_mem + (adr))
#define btand(dat,adr) btwrite((dat) & btread(adr), adr) #define btand(dat, adr) btwrite((dat) & btread(adr), adr)
#define btor(dat,adr) btwrite((dat) | btread(adr), adr) #define btor(dat, adr) btwrite((dat) | btread(adr), adr)
#define btaor(dat,mask,adr) btwrite((dat) | ((mask) & btread(adr)), adr) #define btaor(dat, mask, adr) btwrite((dat) | ((mask) & btread(adr)), adr)
#endif #endif
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* Zoran zr36057/zr36067 PCI controller driver, for the * Zoran zr36057/zr36067 PCI controller driver, for the
* Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
...@@ -6,16 +7,6 @@ ...@@ -6,16 +7,6 @@
* This part handles card-specific data and detection * This part handles card-specific data and detection
* *
* Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx> * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
*
* 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.
*/ */
#ifndef __ZORAN_CARD_H__ #ifndef __ZORAN_CARD_H__
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* Zoran zr36057/zr36067 PCI controller driver, for the * Zoran zr36057/zr36067 PCI controller driver, for the
* Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
...@@ -6,50 +7,28 @@ ...@@ -6,50 +7,28 @@
* This part handles card-specific data and detection * This part handles card-specific data and detection
* *
* Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx> * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
*
* 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.
*/ */
#ifndef __ZORAN_DEVICE_H__ #ifndef __ZORAN_DEVICE_H__
#define __ZORAN_DEVICE_H__ #define __ZORAN_DEVICE_H__
/* general purpose I/O */ /* general purpose I/O */
extern void GPIO(struct zoran *zr, extern void GPIO(struct zoran *zr, int bit, unsigned int value);
int bit,
unsigned int value);
/* codec (or actually: guest bus) access */ /* codec (or actually: guest bus) access */
extern int post_office_wait(struct zoran *zr); extern int post_office_wait(struct zoran *zr);
extern int post_office_write(struct zoran *zr, extern int post_office_write(struct zoran *zr, unsigned int guest, unsigned int reg, unsigned int value);
unsigned guest, extern int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg);
unsigned reg,
unsigned value);
extern int post_office_read(struct zoran *zr,
unsigned guest,
unsigned reg);
extern void detect_guest_activity(struct zoran *zr); extern void detect_guest_activity(struct zoran *zr);
extern void jpeg_codec_sleep(struct zoran *zr, extern void jpeg_codec_sleep(struct zoran *zr, int sleep);
int sleep);
extern int jpeg_codec_reset(struct zoran *zr); extern int jpeg_codec_reset(struct zoran *zr);
/* zr360x7 access to raw capture */ /* zr360x7 access to raw capture */
extern void zr36057_overlay(struct zoran *zr, extern void zr36057_overlay(struct zoran *zr, int on);
int on); extern void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count);
extern void write_overlay_mask(struct zoran_fh *fh, extern void zr36057_set_memgrab(struct zoran *zr, int mode);
struct v4l2_clip *vp,
int count);
extern void zr36057_set_memgrab(struct zoran *zr,
int mode);
extern int wait_grab_pending(struct zoran *zr); extern int wait_grab_pending(struct zoran *zr);
/* interrupts */ /* interrupts */
...@@ -64,8 +43,7 @@ extern void zr36057_enable_jpg(struct zoran *zr, ...@@ -64,8 +43,7 @@ extern void zr36057_enable_jpg(struct zoran *zr,
extern void zoran_feed_stat_com(struct zoran *zr); extern void zoran_feed_stat_com(struct zoran *zr);
/* general */ /* general */
extern void zoran_set_pci_master(struct zoran *zr, extern void zoran_set_pci_master(struct zoran *zr, int set_master);
int set_master);
extern void zoran_init_hardware(struct zoran *zr); extern void zoran_init_hardware(struct zoran *zr);
extern void zr36057_restart(struct zoran *zr); extern void zr36057_restart(struct zoran *zr);
......
This diff is collapsed.
...@@ -83,14 +83,11 @@ static const struct procfs_params_zr36067 zr67[] = { ...@@ -83,14 +83,11 @@ static const struct procfs_params_zr36067 zr67[] = {
{NULL, 0, 0, 0}, {NULL, 0, 0, 0},
}; };
static void static void setparam(struct zoran *zr, char *name, char *sval)
setparam (struct zoran *zr,
char *name,
char *sval)
{ {
int i = 0, reg0, reg, val; int i = 0, reg0, reg, val;
while (zr67[i].name != NULL) { while (zr67[i].name) {
if (!strncmp(name, zr67[i].name, strlen(zr67[i].name))) { if (!strncmp(name, zr67[i].name, strlen(zr67[i].name))) {
reg = reg0 = btread(zr67[i].reg); reg = reg0 = btread(zr67[i].reg);
reg &= ~(zr67[i].mask << zr67[i].bit); reg &= ~(zr67[i].mask << zr67[i].bit);
...@@ -119,19 +116,20 @@ static int zoran_show(struct seq_file *p, void *v) ...@@ -119,19 +116,20 @@ static int zoran_show(struct seq_file *p, void *v)
seq_printf(p, "ZR36067 registers:\n"); seq_printf(p, "ZR36067 registers:\n");
for (i = 0; i < 0x130; i += 16) for (i = 0; i < 0x130; i += 16)
seq_printf(p, "%03X %08X %08X %08X %08X \n", i, seq_printf(p, "%03X %08X %08X %08X %08X\n", i,
btread(i), btread(i+4), btread(i+8), btread(i+12)); btread(i), btread(i + 4), btread(i + 8), btread(i + 12));
return 0; return 0;
} }
static int zoran_open(struct inode *inode, struct file *file) static int zoran_open(struct inode *inode, struct file *file)
{ {
struct zoran *data = PDE_DATA(inode); struct zoran *data = PDE_DATA(inode);
return single_open(file, zoran_show, data); return single_open(file, zoran_show, data);
} }
static ssize_t zoran_write(struct file *file, const char __user *buffer, static ssize_t zoran_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct zoran *zr = PDE_DATA(file_inode(file)); struct zoran *zr = PDE_DATA(file_inode(file));
char *string, *sp; char *string, *sp;
...@@ -142,14 +140,10 @@ static ssize_t zoran_write(struct file *file, const char __user *buffer, ...@@ -142,14 +140,10 @@ static ssize_t zoran_write(struct file *file, const char __user *buffer,
string = sp = vmalloc(count + 1); string = sp = vmalloc(count + 1);
if (!string) { if (!string) {
dprintk(1,
KERN_ERR
"%s: write_proc: can not allocate memory\n",
ZR_DEVNAME(zr));
return -ENOMEM; return -ENOMEM;
} }
if (copy_from_user(string, buffer, count)) { if (copy_from_user(string, buffer, count)) {
vfree (string); vfree(string);
return -EFAULT; return -EFAULT;
} }
string[count] = 0; string[count] = 0;
...@@ -185,15 +179,14 @@ static const struct file_operations zoran_operations = { ...@@ -185,15 +179,14 @@ static const struct file_operations zoran_operations = {
}; };
#endif #endif
int int zoran_proc_init(struct zoran *zr)
zoran_proc_init (struct zoran *zr)
{ {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
char name[8]; char name[8];
snprintf(name, 7, "zoran%d", zr->id); snprintf(name, 7, "zoran%d", zr->id);
zr->zoran_proc = proc_create_data(name, 0, NULL, &zoran_operations, zr); zr->zoran_proc = proc_create_data(name, 0, NULL, &zoran_operations, zr);
if (zr->zoran_proc != NULL) { if (zr->zoran_proc) {
dprintk(2, dprintk(2,
KERN_INFO KERN_INFO
"%s: procfs entry /proc/%s allocated. data=%p\n", "%s: procfs entry /proc/%s allocated. data=%p\n",
...@@ -207,8 +200,7 @@ zoran_proc_init (struct zoran *zr) ...@@ -207,8 +200,7 @@ zoran_proc_init (struct zoran *zr)
return 0; return 0;
} }
void void zoran_proc_cleanup(struct zoran *zr)
zoran_proc_cleanup (struct zoran *zr)
{ {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
char name[8]; char name[8];
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* Zoran ZR36016 basic configuration functions - header file * Zoran ZR36016 basic configuration functions - header file
* *
* Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at>
*
* $Id: zr36016.h,v 1.1.2.3 2003/01/14 21:18:07 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
#ifndef ZR36016_H #ifndef ZR36016_H
......
// SPDX-License-Identifier: GPL-2.0-or-later
/* /*
* Zoran ZR36050 basic configuration functions * Zoran ZR36050 basic configuration functions
* *
* Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at>
*
* $Id: zr36050.c,v 1.1.2.11 2003/08/03 14:54:53 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
#define ZR050_VERSION "v0.7.1" #define ZR050_VERSION "v0.7.1"
...@@ -64,36 +49,27 @@ MODULE_PARM_DESC(debug, "Debug level (0-4)"); ...@@ -64,36 +49,27 @@ MODULE_PARM_DESC(debug, "Debug level (0-4)");
========================================================================= */ ========================================================================= */
/* read and write functions */ /* read and write functions */
static u8 static u8 zr36050_read(struct zr36050 *ptr, u16 reg)
zr36050_read (struct zr36050 *ptr,
u16 reg)
{ {
u8 value = 0; u8 value = 0;
// just in case something is wrong... /* just in case something is wrong... */
if (ptr->codec->master_data->readreg) if (ptr->codec->master_data->readreg)
value = (ptr->codec->master_data->readreg(ptr->codec, value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF;
reg)) & 0xFF;
else else
dprintk(1, dprintk(1,
KERN_ERR "%s: invalid I/O setup, nothing read!\n", KERN_ERR "%s: invalid I/O setup, nothing read!\n", ptr->name);
ptr->name);
dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value);
value);
return value; return value;
} }
static void static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value)
zr36050_write (struct zr36050 *ptr,
u16 reg,
u8 value)
{ {
dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg);
reg);
// just in case something is wrong... /* just in case something is wrong... */
if (ptr->codec->master_data->writereg) if (ptr->codec->master_data->writereg)
ptr->codec->master_data->writereg(ptr->codec, reg, value); ptr->codec->master_data->writereg(ptr->codec, reg, value);
else else
...@@ -110,8 +86,7 @@ zr36050_write (struct zr36050 *ptr, ...@@ -110,8 +86,7 @@ zr36050_write (struct zr36050 *ptr,
========================================================================= */ ========================================================================= */
/* status is kept in datastructure */ /* status is kept in datastructure */
static u8 static u8 zr36050_read_status1(struct zr36050 *ptr)
zr36050_read_status1 (struct zr36050 *ptr)
{ {
ptr->status1 = zr36050_read(ptr, ZR050_STATUS_1); ptr->status1 = zr36050_read(ptr, ZR050_STATUS_1);
...@@ -126,8 +101,7 @@ zr36050_read_status1 (struct zr36050 *ptr) ...@@ -126,8 +101,7 @@ zr36050_read_status1 (struct zr36050 *ptr)
========================================================================= */ ========================================================================= */
/* scale factor is kept in datastructure */ /* scale factor is kept in datastructure */
static u16 static u16 zr36050_read_scalefactor(struct zr36050 *ptr)
zr36050_read_scalefactor (struct zr36050 *ptr)
{ {
ptr->scalefact = (zr36050_read(ptr, ZR050_SF_HI) << 8) | ptr->scalefact = (zr36050_read(ptr, ZR050_SF_HI) << 8) |
(zr36050_read(ptr, ZR050_SF_LO) & 0xFF); (zr36050_read(ptr, ZR050_SF_LO) & 0xFF);
...@@ -143,8 +117,7 @@ zr36050_read_scalefactor (struct zr36050 *ptr) ...@@ -143,8 +117,7 @@ zr36050_read_scalefactor (struct zr36050 *ptr)
wait if codec is ready to proceed (end of processing) or time is over wait if codec is ready to proceed (end of processing) or time is over
========================================================================= */ ========================================================================= */
static void static void zr36050_wait_end(struct zr36050 *ptr)
zr36050_wait_end (struct zr36050 *ptr)
{ {
int i = 0; int i = 0;
...@@ -165,8 +138,7 @@ zr36050_wait_end (struct zr36050 *ptr) ...@@ -165,8 +138,7 @@ zr36050_wait_end (struct zr36050 *ptr)
basic test of "connectivity", writes/reads to/from memory the SOF marker basic test of "connectivity", writes/reads to/from memory the SOF marker
========================================================================= */ ========================================================================= */
static int static int zr36050_basic_test(struct zr36050 *ptr)
zr36050_basic_test (struct zr36050 *ptr)
{ {
zr36050_write(ptr, ZR050_SOF_IDX, 0x00); zr36050_write(ptr, ZR050_SOF_IDX, 0x00);
zr36050_write(ptr, ZR050_SOF_IDX + 1, 0x00); zr36050_write(ptr, ZR050_SOF_IDX + 1, 0x00);
...@@ -207,19 +179,14 @@ zr36050_basic_test (struct zr36050 *ptr) ...@@ -207,19 +179,14 @@ zr36050_basic_test (struct zr36050 *ptr)
simple loop for pushing the init datasets simple loop for pushing the init datasets
========================================================================= */ ========================================================================= */
static int static int zr36050_pushit(struct zr36050 *ptr, u16 startreg, u16 len, const char *data)
zr36050_pushit (struct zr36050 *ptr,
u16 startreg,
u16 len,
const char *data)
{ {
int i = 0; int i = 0;
dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name,
startreg, len); startreg, len);
while (i < len) { while (i < len)
zr36050_write(ptr, startreg++, data[i++]); zr36050_write(ptr, startreg++, data[i++]);
}
return i; return i;
} }
...@@ -338,8 +305,7 @@ static const char zr36050_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 }; ...@@ -338,8 +305,7 @@ static const char zr36050_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
/* SOF (start of frame) segment depends on width, height and sampling ratio /* SOF (start of frame) segment depends on width, height and sampling ratio
of each color component */ of each color component */
static int static int zr36050_set_sof(struct zr36050 *ptr)
zr36050_set_sof (struct zr36050 *ptr)
{ {
char sof_data[34]; // max. size of register set char sof_data[34]; // max. size of register set
int i; int i;
...@@ -370,8 +336,7 @@ zr36050_set_sof (struct zr36050 *ptr) ...@@ -370,8 +336,7 @@ zr36050_set_sof (struct zr36050 *ptr)
/* SOS (start of scan) segment depends on the used scan components /* SOS (start of scan) segment depends on the used scan components
of each color component */ of each color component */
static int static int zr36050_set_sos(struct zr36050 *ptr)
zr36050_set_sos (struct zr36050 *ptr)
{ {
char sos_data[16]; // max. size of register set char sos_data[16]; // max. size of register set
int i; int i;
...@@ -398,8 +363,7 @@ zr36050_set_sos (struct zr36050 *ptr) ...@@ -398,8 +363,7 @@ zr36050_set_sos (struct zr36050 *ptr)
/* DRI (define restart interval) */ /* DRI (define restart interval) */
static int static int zr36050_set_dri(struct zr36050 *ptr)
zr36050_set_dri (struct zr36050 *ptr)
{ {
char dri_data[6]; // max. size of register set char dri_data[6]; // max. size of register set
...@@ -421,8 +385,7 @@ zr36050_set_dri (struct zr36050 *ptr) ...@@ -421,8 +385,7 @@ zr36050_set_dri (struct zr36050 *ptr)
... sorry for the spaghetti code ... ... sorry for the spaghetti code ...
========================================================================= */ ========================================================================= */
static void static void zr36050_init(struct zr36050 *ptr)
zr36050_init (struct zr36050 *ptr)
{ {
int sum = 0; int sum = 0;
long bitcnt, tmp; long bitcnt, tmp;
...@@ -577,11 +540,9 @@ zr36050_init (struct zr36050 *ptr) ...@@ -577,11 +540,9 @@ zr36050_init (struct zr36050 *ptr)
/* set compression/expansion mode and launches codec - /* set compression/expansion mode and launches codec -
this should be the last call from the master before starting processing */ this should be the last call from the master before starting processing */
static int static int zr36050_set_mode(struct videocodec *codec, int mode)
zr36050_set_mode (struct videocodec *codec,
int mode)
{ {
struct zr36050 *ptr = (struct zr36050 *) codec->data; struct zr36050 *ptr = (struct zr36050 *)codec->data;
dprintk(2, "%s: set_mode %d call\n", ptr->name, mode); dprintk(2, "%s: set_mode %d call\n", ptr->name, mode);
...@@ -595,13 +556,10 @@ zr36050_set_mode (struct videocodec *codec, ...@@ -595,13 +556,10 @@ zr36050_set_mode (struct videocodec *codec,
} }
/* set picture size (norm is ignored as the codec doesn't know about it) */ /* set picture size (norm is ignored as the codec doesn't know about it) */
static int static int zr36050_set_video(struct videocodec *codec, struct tvnorm *norm,
zr36050_set_video (struct videocodec *codec, struct vfe_settings *cap, struct vfe_polarity *pol)
struct tvnorm *norm,
struct vfe_settings *cap,
struct vfe_polarity *pol)
{ {
struct zr36050 *ptr = (struct zr36050 *) codec->data; struct zr36050 *ptr = (struct zr36050 *)codec->data;
int size; int size;
dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n",
...@@ -630,21 +588,17 @@ zr36050_set_video (struct videocodec *codec, ...@@ -630,21 +588,17 @@ zr36050_set_video (struct videocodec *codec,
ptr->real_code_vol = size >> 3; /* in bytes */ ptr->real_code_vol = size >> 3; /* in bytes */
/* Set max_block_vol here (previously in zr36050_init, moved /* Set max_block_vol here (previously in zr36050_init, moved
* here for consistency with zr36060 code */ * here for consistency with zr36060 code */
zr36050_write(ptr, ZR050_MBCV, ptr->max_block_vol); zr36050_write(ptr, ZR050_MBCV, ptr->max_block_vol);
return 0; return 0;
} }
/* additional control functions */ /* additional control functions */
static int static int zr36050_control(struct videocodec *codec, int type, int size, void *data)
zr36050_control (struct videocodec *codec,
int type,
int size,
void *data)
{ {
struct zr36050 *ptr = (struct zr36050 *) codec->data; struct zr36050 *ptr = (struct zr36050 *)codec->data;
int *ival = (int *) data; int *ival = (int *)data;
dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type, dprintk(2, "%s: control %d call with %d byte\n", ptr->name, type,
size); size);
...@@ -760,8 +714,7 @@ zr36050_control (struct videocodec *codec, ...@@ -760,8 +714,7 @@ zr36050_control (struct videocodec *codec,
Deinitializes Zoran's JPEG processor Deinitializes Zoran's JPEG processor
========================================================================= */ ========================================================================= */
static int static int zr36050_unset(struct videocodec *codec)
zr36050_unset (struct videocodec *codec)
{ {
struct zr36050 *ptr = codec->data; struct zr36050 *ptr = codec->data;
...@@ -789,8 +742,7 @@ zr36050_unset (struct videocodec *codec) ...@@ -789,8 +742,7 @@ zr36050_unset (struct videocodec *codec)
(the given size is determined by the processor with the video interface) (the given size is determined by the processor with the video interface)
========================================================================= */ ========================================================================= */
static int static int zr36050_setup(struct videocodec *codec)
zr36050_setup (struct videocodec *codec)
{ {
struct zr36050 *ptr; struct zr36050 *ptr;
int res; int res;
...@@ -805,7 +757,7 @@ zr36050_setup (struct videocodec *codec) ...@@ -805,7 +757,7 @@ zr36050_setup (struct videocodec *codec)
} }
//mem structure init //mem structure init
codec->data = ptr = kzalloc(sizeof(struct zr36050), GFP_KERNEL); codec->data = ptr = kzalloc(sizeof(struct zr36050), GFP_KERNEL);
if (NULL == ptr) { if (!ptr) {
dprintk(1, KERN_ERR "zr36050: Can't get enough memory!\n"); dprintk(1, KERN_ERR "zr36050: Can't get enough memory!\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -868,16 +820,14 @@ static const struct videocodec zr36050_codec = { ...@@ -868,16 +820,14 @@ static const struct videocodec zr36050_codec = {
HOOK IN DRIVER AS KERNEL MODULE HOOK IN DRIVER AS KERNEL MODULE
========================================================================= */ ========================================================================= */
static int __init static int __init zr36050_init_module(void)
zr36050_init_module (void)
{ {
//dprintk(1, "ZR36050 driver %s\n",ZR050_VERSION); //dprintk(1, "ZR36050 driver %s\n",ZR050_VERSION);
zr36050_codecs = 0; zr36050_codecs = 0;
return videocodec_register(&zr36050_codec); return videocodec_register(&zr36050_codec);
} }
static void __exit static void __exit zr36050_cleanup_module(void)
zr36050_cleanup_module (void)
{ {
if (zr36050_codecs) { if (zr36050_codecs) {
dprintk(1, dprintk(1,
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* Zoran ZR36050 basic configuration functions - header file * Zoran ZR36050 basic configuration functions - header file
* *
* Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at> * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at>
*
* $Id: zr36050.h,v 1.1.2.2 2003/01/14 21:18:22 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
#ifndef ZR36050_H #ifndef ZR36050_H
...@@ -85,10 +70,10 @@ struct zr36050 { ...@@ -85,10 +70,10 @@ struct zr36050 {
#define ZR050_ACT_MH 0x01b #define ZR050_ACT_MH 0x01b
#define ZR050_ACT_ML 0x01c #define ZR050_ACT_ML 0x01c
#define ZR050_ACT_LO 0x01d #define ZR050_ACT_LO 0x01d
#define ZR050_ACV_TRUN_HI 0x01e #define ZR050_ACV_TURN_HI 0x01e
#define ZR050_ACV_TRUN_MH 0x01f #define ZR050_ACV_TURN_MH 0x01f
#define ZR050_ACV_TRUN_ML 0x020 #define ZR050_ACV_TURN_ML 0x020
#define ZR050_ACV_TRUN_LO 0x021 #define ZR050_ACV_TURN_LO 0x021
#define ZR050_STATUS_0 0x02e #define ZR050_STATUS_0 0x02e
#define ZR050_STATUS_1 0x02f #define ZR050_STATUS_1 0x02f
...@@ -145,7 +130,6 @@ struct zr36050 { ...@@ -145,7 +130,6 @@ struct zr36050 {
#define ZR050_OP_NSCN_8 0xE0 #define ZR050_OP_NSCN_8 0xE0
#define ZR050_OP_OVF 0x10 #define ZR050_OP_OVF 0x10
/* zr36050 markers-enable register bits */ /* zr36050 markers-enable register bits */
#define ZR050_ME_APP 0x80 #define ZR050_ME_APP 0x80
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* zr36057.h - zr36057 register offsets * zr36057.h - zr36057 register offsets
* *
* Copyright (C) 1998 Dave Perks <dperks@ibm.net> * Copyright (C) 1998 Dave Perks <dperks@ibm.net>
*
* 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.
*/ */
#ifndef _ZR36057_H_ #ifndef _ZR36057_H_
#define _ZR36057_H_ #define _ZR36057_H_
/* Zoran ZR36057 registers */ /* Zoran ZR36057 registers */
#define ZR36057_VFEHCR 0x000 /* Video Front End, Horizontal Configuration Register */ #define ZR36057_VFEHCR 0x000 /* Video Front End, Horizontal Configuration Register */
#define ZR36057_VFEHCR_HSPol (1<<30) #define ZR36057_VFEHCR_HSPol BIT(30)
#define ZR36057_VFEHCR_HStart 10 #define ZR36057_VFEHCR_HStart 10
#define ZR36057_VFEHCR_HEnd 0 #define ZR36057_VFEHCR_HEnd 0
#define ZR36057_VFEHCR_Hmask 0x3ff #define ZR36057_VFEHCR_Hmask 0x3ff
#define ZR36057_VFEVCR 0x004 /* Video Front End, Vertical Configuration Register */ #define ZR36057_VFEVCR 0x004 /* Video Front End, Vertical Configuration Register */
#define ZR36057_VFEVCR_VSPol (1<<30) #define ZR36057_VFEVCR_VSPol BIT(30)
#define ZR36057_VFEVCR_VStart 10 #define ZR36057_VFEVCR_VStart 10
#define ZR36057_VFEVCR_VEnd 0 #define ZR36057_VFEVCR_VEnd 0
#define ZR36057_VFEVCR_Vmask 0x3ff #define ZR36057_VFEVCR_Vmask 0x3ff
#define ZR36057_VFESPFR 0x008 /* Video Front End, Scaler and Pixel Format Register */ #define ZR36057_VFESPFR 0x008 /* Video Front End, Scaler and Pixel Format Register */
#define ZR36057_VFESPFR_ExtFl (1<<26) #define ZR36057_VFESPFR_ExtFl BIT(26)
#define ZR36057_VFESPFR_TopField (1<<25) #define ZR36057_VFESPFR_TopField BIT(25)
#define ZR36057_VFESPFR_VCLKPol (1<<24) #define ZR36057_VFESPFR_VCLKPol BIT(24)
#define ZR36057_VFESPFR_HFilter 21 #define ZR36057_VFESPFR_HFilter 21
#define ZR36057_VFESPFR_HorDcm 14 #define ZR36057_VFESPFR_HorDcm 14
#define ZR36057_VFESPFR_VerDcm 8 #define ZR36057_VFESPFR_VerDcm 8
...@@ -54,14 +44,14 @@ ...@@ -54,14 +44,14 @@
#define ZR36057_VSSFGR 0x014 /* Video Stride, Status, and Frame Grab Register */ #define ZR36057_VSSFGR 0x014 /* Video Stride, Status, and Frame Grab Register */
#define ZR36057_VSSFGR_DispStride 16 #define ZR36057_VSSFGR_DispStride 16
#define ZR36057_VSSFGR_VidOvf (1<<8) #define ZR36057_VSSFGR_VidOvf BIT(8)
#define ZR36057_VSSFGR_SnapShot (1<<1) #define ZR36057_VSSFGR_SnapShot BIT(1)
#define ZR36057_VSSFGR_FrameGrab (1<<0) #define ZR36057_VSSFGR_FrameGrab BIT(0)
#define ZR36057_VDCR 0x018 /* Video Display Configuration Register */ #define ZR36057_VDCR 0x018 /* Video Display Configuration Register */
#define ZR36057_VDCR_VidEn (1<<31) #define ZR36057_VDCR_VidEn BIT(31)
#define ZR36057_VDCR_MinPix 24 #define ZR36057_VDCR_MinPix 24
#define ZR36057_VDCR_Triton (1<<24) #define ZR36057_VDCR_Triton BIT(24)
#define ZR36057_VDCR_VidWinHt 12 #define ZR36057_VDCR_VidWinHt 12
#define ZR36057_VDCR_VidWinWid 0 #define ZR36057_VDCR_VidWinWid 0
...@@ -70,60 +60,60 @@ ...@@ -70,60 +60,60 @@
#define ZR36057_MMBR 0x020 /* Masking Map "Bottom" Register */ #define ZR36057_MMBR 0x020 /* Masking Map "Bottom" Register */
#define ZR36057_OCR 0x024 /* Overlay Control Register */ #define ZR36057_OCR 0x024 /* Overlay Control Register */
#define ZR36057_OCR_OvlEnable (1 << 15) #define ZR36057_OCR_OvlEnable BIT(15)
#define ZR36057_OCR_MaskStride 0 #define ZR36057_OCR_MaskStride 0
#define ZR36057_SPGPPCR 0x028 /* System, PCI, and General Purpose Pins Control Register */ #define ZR36057_SPGPPCR 0x028 /* System, PCI, and General Purpose Pins Control Register */
#define ZR36057_SPGPPCR_SoftReset (1<<24) #define ZR36057_SPGPPCR_SoftReset BIT(24)
#define ZR36057_GPPGCR1 0x02c /* General Purpose Pins and GuestBus Control Register (1) */ #define ZR36057_GPPGCR1 0x02c /* General Purpose Pins and GuestBus Control Register (1) */
#define ZR36057_MCSAR 0x030 /* MPEG Code Source Address Register */ #define ZR36057_MCSAR 0x030 /* MPEG Code Source Address Register */
#define ZR36057_MCTCR 0x034 /* MPEG Code Transfer Control Register */ #define ZR36057_MCTCR 0x034 /* MPEG Code Transfer Control Register */
#define ZR36057_MCTCR_CodTime (1 << 30) #define ZR36057_MCTCR_CodTime BIT(30)
#define ZR36057_MCTCR_CEmpty (1 << 29) #define ZR36057_MCTCR_CEmpty BIT(29)
#define ZR36057_MCTCR_CFlush (1 << 28) #define ZR36057_MCTCR_CFlush BIT(28)
#define ZR36057_MCTCR_CodGuestID 20 #define ZR36057_MCTCR_CodGuestID 20
#define ZR36057_MCTCR_CodGuestReg 16 #define ZR36057_MCTCR_CodGuestReg 16
#define ZR36057_MCMPR 0x038 /* MPEG Code Memory Pointer Register */ #define ZR36057_MCMPR 0x038 /* MPEG Code Memory Pointer Register */
#define ZR36057_ISR 0x03c /* Interrupt Status Register */ #define ZR36057_ISR 0x03c /* Interrupt Status Register */
#define ZR36057_ISR_GIRQ1 (1<<30) #define ZR36057_ISR_GIRQ1 BIT(30)
#define ZR36057_ISR_GIRQ0 (1<<29) #define ZR36057_ISR_GIRQ0 BIT(29)
#define ZR36057_ISR_CodRepIRQ (1<<28) #define ZR36057_ISR_CodRepIRQ BIT(28)
#define ZR36057_ISR_JPEGRepIRQ (1<<27) #define ZR36057_ISR_JPEGRepIRQ BIT(27)
#define ZR36057_ICR 0x040 /* Interrupt Control Register */ #define ZR36057_ICR 0x040 /* Interrupt Control Register */
#define ZR36057_ICR_GIRQ1 (1<<30) #define ZR36057_ICR_GIRQ1 BIT(30)
#define ZR36057_ICR_GIRQ0 (1<<29) #define ZR36057_ICR_GIRQ0 BIT(29)
#define ZR36057_ICR_CodRepIRQ (1<<28) #define ZR36057_ICR_CodRepIRQ BIT(28)
#define ZR36057_ICR_JPEGRepIRQ (1<<27) #define ZR36057_ICR_JPEGRepIRQ BIT(27)
#define ZR36057_ICR_IntPinEn (1<<24) #define ZR36057_ICR_IntPinEn BIT(24)
#define ZR36057_I2CBR 0x044 /* I2C Bus Register */ #define ZR36057_I2CBR 0x044 /* I2C Bus Register */
#define ZR36057_I2CBR_SDA (1<<1) #define ZR36057_I2CBR_SDA BIT(1)
#define ZR36057_I2CBR_SCL (1<<0) #define ZR36057_I2CBR_SCL BIT(0)
#define ZR36057_JMC 0x100 /* JPEG Mode and Control */ #define ZR36057_JMC 0x100 /* JPEG Mode and Control */
#define ZR36057_JMC_JPG (1 << 31) #define ZR36057_JMC_JPG BIT(31)
#define ZR36057_JMC_JPGExpMode (0 << 29) #define ZR36057_JMC_JPGExpMode (0 << 29)
#define ZR36057_JMC_JPGCmpMode (1 << 29) #define ZR36057_JMC_JPGCmpMode BIT(29)
#define ZR36057_JMC_MJPGExpMode (2 << 29) #define ZR36057_JMC_MJPGExpMode (2 << 29)
#define ZR36057_JMC_MJPGCmpMode (3 << 29) #define ZR36057_JMC_MJPGCmpMode (3 << 29)
#define ZR36057_JMC_RTBUSY_FB (1 << 6) #define ZR36057_JMC_RTBUSY_FB BIT(6)
#define ZR36057_JMC_Go_en (1 << 5) #define ZR36057_JMC_Go_en BIT(5)
#define ZR36057_JMC_SyncMstr (1 << 4) #define ZR36057_JMC_SyncMstr BIT(4)
#define ZR36057_JMC_Fld_per_buff (1 << 3) #define ZR36057_JMC_Fld_per_buff BIT(3)
#define ZR36057_JMC_VFIFO_FB (1 << 2) #define ZR36057_JMC_VFIFO_FB BIT(2)
#define ZR36057_JMC_CFIFO_FB (1 << 1) #define ZR36057_JMC_CFIFO_FB BIT(1)
#define ZR36057_JMC_Stll_LitEndian (1 << 0) #define ZR36057_JMC_Stll_LitEndian BIT(0)
#define ZR36057_JPC 0x104 /* JPEG Process Control */ #define ZR36057_JPC 0x104 /* JPEG Process Control */
#define ZR36057_JPC_P_Reset (1 << 7) #define ZR36057_JPC_P_Reset BIT(7)
#define ZR36057_JPC_CodTrnsEn (1 << 5) #define ZR36057_JPC_CodTrnsEn BIT(5)
#define ZR36057_JPC_Active (1 << 0) #define ZR36057_JPC_Active BIT(0)
#define ZR36057_VSP 0x108 /* Vertical Sync Parameters */ #define ZR36057_VSP 0x108 /* Vertical Sync Parameters */
#define ZR36057_VSP_VsyncSize 16 #define ZR36057_VSP_VsyncSize 16
...@@ -142,7 +132,7 @@ ...@@ -142,7 +132,7 @@
#define ZR36057_FVAP_PAY 0 #define ZR36057_FVAP_PAY 0
#define ZR36057_FPP 0x118 /* Field Process Parameters */ #define ZR36057_FPP 0x118 /* Field Process Parameters */
#define ZR36057_FPP_Odd_Even (1 << 0) #define ZR36057_FPP_Odd_Even BIT(0)
#define ZR36057_JCBA 0x11c /* JPEG Code Base Address */ #define ZR36057_JCBA 0x11c /* JPEG Code Base Address */
...@@ -155,9 +145,9 @@ ...@@ -155,9 +145,9 @@
#define ZR36057_GCR2 0x12c /* GuestBus Control Register (2) */ #define ZR36057_GCR2 0x12c /* GuestBus Control Register (2) */
#define ZR36057_POR 0x200 /* Post Office Register */ #define ZR36057_POR 0x200 /* Post Office Register */
#define ZR36057_POR_POPen (1<<25) #define ZR36057_POR_POPen BIT(25)
#define ZR36057_POR_POTime (1<<24) #define ZR36057_POR_POTime BIT(24)
#define ZR36057_POR_PODir (1<<23) #define ZR36057_POR_PODir BIT(23)
#define ZR36057_STR 0x300 /* "Still" Transfer Register */ #define ZR36057_STR 0x300 /* "Still" Transfer Register */
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* /*
* Zoran ZR36060 basic configuration functions - header file * Zoran ZR36060 basic configuration functions - header file
* *
* Copyright (C) 2002 Laurent Pinchart <laurent.pinchart@skynet.be> * Copyright (C) 2002 Laurent Pinchart <laurent.pinchart@skynet.be>
*
* $Id: zr36060.h,v 1.1.1.1.2.3 2003/01/14 21:18:47 rbultje Exp $
*
* ------------------------------------------------------------------------
*
* 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.
*
* ------------------------------------------------------------------------
*/ */
#ifndef ZR36060_H #ifndef ZR36060_H
...@@ -86,10 +71,10 @@ struct zr36060 { ...@@ -86,10 +71,10 @@ struct zr36060 {
#define ZR060_ACT_MH 0x01b #define ZR060_ACT_MH 0x01b
#define ZR060_ACT_ML 0x01c #define ZR060_ACT_ML 0x01c
#define ZR060_ACT_LO 0x01d #define ZR060_ACT_LO 0x01d
#define ZR060_ACV_TRUN_HI 0x01e #define ZR060_ACV_TURN_HI 0x01e
#define ZR060_ACV_TRUN_MH 0x01f #define ZR060_ACV_TURN_MH 0x01f
#define ZR060_ACV_TRUN_ML 0x020 #define ZR060_ACV_TURN_ML 0x020
#define ZR060_ACV_TRUN_LO 0x021 #define ZR060_ACV_TURN_LO 0x021
#define ZR060_IDR_DEV 0x022 #define ZR060_IDR_DEV 0x022
#define ZR060_IDR_REV 0x023 #define ZR060_IDR_REV 0x023
#define ZR060_TCR_HI 0x024 #define ZR060_TCR_HI 0x024
...@@ -139,78 +124,78 @@ struct zr36060 { ...@@ -139,78 +124,78 @@ struct zr36060 {
/* ZR36060 LOAD register bits */ /* ZR36060 LOAD register bits */
#define ZR060_LOAD_Load (1 << 7) #define ZR060_LOAD_Load BIT(7)
#define ZR060_LOAD_SyncRst (1 << 0) #define ZR060_LOAD_SyncRst BIT(0)
/* ZR36060 Code FIFO Status register bits */ /* ZR36060 Code FIFO Status register bits */
#define ZR060_CFSR_Busy (1 << 7) #define ZR060_CFSR_Busy BIT(7)
#define ZR060_CFSR_CBusy (1 << 2) #define ZR060_CFSR_CBusy BIT(2)
#define ZR060_CFSR_CFIFO (3 << 0) #define ZR060_CFSR_CFIFO (3 << 0)
/* ZR36060 Code Interface register */ /* ZR36060 Code Interface register */
#define ZR060_CIR_Code16 (1 << 7) #define ZR060_CIR_Code16 BIT(7)
#define ZR060_CIR_Endian (1 << 6) #define ZR060_CIR_Endian BIT(6)
#define ZR060_CIR_CFIS (1 << 2) #define ZR060_CIR_CFIS BIT(2)
#define ZR060_CIR_CodeMstr (1 << 0) #define ZR060_CIR_CodeMstr BIT(0)
/* ZR36060 Codec Mode register */ /* ZR36060 Codec Mode register */
#define ZR060_CMR_Comp (1 << 7) #define ZR060_CMR_Comp BIT(7)
#define ZR060_CMR_ATP (1 << 6) #define ZR060_CMR_ATP BIT(6)
#define ZR060_CMR_Pass2 (1 << 5) #define ZR060_CMR_Pass2 BIT(5)
#define ZR060_CMR_TLM (1 << 4) #define ZR060_CMR_TLM BIT(4)
#define ZR060_CMR_BRB (1 << 2) #define ZR060_CMR_BRB BIT(2)
#define ZR060_CMR_FSF (1 << 1) #define ZR060_CMR_FSF BIT(1)
/* ZR36060 Markers Enable register */ /* ZR36060 Markers Enable register */
#define ZR060_MER_App (1 << 7) #define ZR060_MER_App BIT(7)
#define ZR060_MER_Com (1 << 6) #define ZR060_MER_Com BIT(6)
#define ZR060_MER_DRI (1 << 5) #define ZR060_MER_DRI BIT(5)
#define ZR060_MER_DQT (1 << 4) #define ZR060_MER_DQT BIT(4)
#define ZR060_MER_DHT (1 << 3) #define ZR060_MER_DHT BIT(3)
/* ZR36060 Interrupt Mask register */ /* ZR36060 Interrupt Mask register */
#define ZR060_IMR_EOAV (1 << 3) #define ZR060_IMR_EOAV BIT(3)
#define ZR060_IMR_EOI (1 << 2) #define ZR060_IMR_EOI BIT(2)
#define ZR060_IMR_End (1 << 1) #define ZR060_IMR_End BIT(1)
#define ZR060_IMR_DataErr (1 << 0) #define ZR060_IMR_DataErr BIT(0)
/* ZR36060 Interrupt Status register */ /* ZR36060 Interrupt Status register */
#define ZR060_ISR_ProCnt (3 << 6) #define ZR060_ISR_ProCnt (3 << 6)
#define ZR060_ISR_EOAV (1 << 3) #define ZR060_ISR_EOAV BIT(3)
#define ZR060_ISR_EOI (1 << 2) #define ZR060_ISR_EOI BIT(2)
#define ZR060_ISR_End (1 << 1) #define ZR060_ISR_End BIT(1)
#define ZR060_ISR_DataErr (1 << 0) #define ZR060_ISR_DataErr BIT(0)
/* ZR36060 Video Control register */ /* ZR36060 Video Control register */
#define ZR060_VCR_Video8 (1 << 7) #define ZR060_VCR_Video8 BIT(7)
#define ZR060_VCR_Range (1 << 6) #define ZR060_VCR_Range BIT(6)
#define ZR060_VCR_FIDet (1 << 3) #define ZR060_VCR_FIDet BIT(3)
#define ZR060_VCR_FIVedge (1 << 2) #define ZR060_VCR_FIVedge BIT(2)
#define ZR060_VCR_FIExt (1 << 1) #define ZR060_VCR_FIExt BIT(1)
#define ZR060_VCR_SyncMstr (1 << 0) #define ZR060_VCR_SyncMstr BIT(0)
/* ZR36060 Video Polarity register */ /* ZR36060 Video Polarity register */
#define ZR060_VPR_VCLKPol (1 << 7) #define ZR060_VPR_VCLKPol BIT(7)
#define ZR060_VPR_PValPol (1 << 6) #define ZR060_VPR_PValPol BIT(6)
#define ZR060_VPR_PoePol (1 << 5) #define ZR060_VPR_PoePol BIT(5)
#define ZR060_VPR_SImgPol (1 << 4) #define ZR060_VPR_SImgPol BIT(4)
#define ZR060_VPR_BLPol (1 << 3) #define ZR060_VPR_BLPol BIT(3)
#define ZR060_VPR_FIPol (1 << 2) #define ZR060_VPR_FIPol BIT(2)
#define ZR060_VPR_HSPol (1 << 1) #define ZR060_VPR_HSPol BIT(1)
#define ZR060_VPR_VSPol (1 << 0) #define ZR060_VPR_VSPol BIT(0)
/* ZR36060 Scaling register */ /* ZR36060 Scaling register */
#define ZR060_SR_VScale (1 << 2) #define ZR060_SR_VScale BIT(2)
#define ZR060_SR_HScale2 (1 << 0) #define ZR060_SR_HScale2 BIT(0)
#define ZR060_SR_HScale4 (2 << 0) #define ZR060_SR_HScale4 (2 << 0)
#endif /*fndef ZR36060_H */ #endif /*fndef ZR36060_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment