lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 02 Jan 2011 16:16:10 +0000
From:	Abylay Ospan <aospan@...up.ru>
To:	mchehab@...radead.org, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/5 v2] cx23885: Altera FPGA CI interface reworked.

It decreases I2C traffic.

Signed-off-by: Abylay Ospan <aospan@...up.ru>
Signed-off-by: Igor M. Liplianin <liplianin@...up.ru>
---
  drivers/media/video/cx23885/cx23885-dvb.c |   18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
b/drivers/media/video/cx23885/cx23885-dvb.c
index 6c144f7..53c2b6d 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -620,29 +620,29 @@ int netup_altera_fpga_rw(void *device, int flag, 
int data, int read)
  {
  	struct cx23885_dev *dev = (struct cx23885_dev *)device;
  	unsigned long timeout = jiffies + msecs_to_jiffies(1);
-	int mem = 0;
+	uint32_t mem = 0;
  -	cx_set(MC417_RWD, ALT_RD | ALT_WR | ALT_CS);
+	mem = cx_read(MC417_RWD);
  	if (read)
  		cx_set(MC417_OEN, ALT_DATA);
  	else {
  		cx_clear(MC417_OEN, ALT_DATA);/* D0-D7 out */
-		mem = cx_read(MC417_RWD);
  		mem &= ~ALT_DATA;
  		mem |= (data & ALT_DATA);
-		cx_write(MC417_RWD, mem);
  	}
   	if (flag)
-		cx_set(MC417_RWD, ALT_AD_RG);/* ADDR */
+		mem |= ALT_AD_RG;
  	else
-		cx_clear(MC417_RWD, ALT_AD_RG);/* VAL */
+		mem &= ~ALT_AD_RG;
  -	cx_clear(MC417_RWD, ALT_CS);/* ~CS */
+	mem &= ~ALT_CS;
  	if (read)
-		cx_clear(MC417_RWD, ALT_RD);
+		mem = (mem & ~ALT_RD) | ALT_WR;
  	else
-		cx_clear(MC417_RWD, ALT_WR);
+		mem = (mem & ~ALT_WR) | ALT_RD;
+
+	cx_write(MC417_RWD, mem);  /* start RW cycle */
   	for (;;) {
  		mem = cx_read(MC417_RWD);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ