Title: [9807] trunk/drivers/char/bfin_ppi.c: [#6514] bfin_ppi: add support for packing with EPPI devices
- Revision
- 9807
- Author
- vapier
- Date
- 2011-03-30 20:25:56 -0400 (Wed, 30 Mar 2011)
Log Message
[#6514] bfin_ppi: add support for packing with EPPI devices
patch by Marius Kotsbak
Modified Paths
Diff
Modified: trunk/drivers/char/bfin_ppi.c (9806 => 9807)
--- trunk/drivers/char/bfin_ppi.c 2011-03-30 10:15:36 UTC (rev 9806)
+++ trunk/drivers/char/bfin_ppi.c 2011-03-31 00:25:56 UTC (rev 9807)
@@ -103,6 +103,7 @@
#define PORT_DIR EPPI_DIR
#define PORT_CFG FS_CFG
#define PACK_EN PACKEN
+#define EPPI_PACK_EN (1 << 20)
#define PPI_COUNT_CORR_OFFSET 0
#define XFR_TYPE_SHIFT 2
#define PORT_CFG_SHIFT 4 /* FS_CFG */
@@ -511,7 +512,6 @@
pr_debug("ppi_ioctl: CMD_PPI_PACKING\n");
regdata = dev->regs->ppi_control;
if (arg) {
-#if defined(PPI_CONTROL) || defined(PPI0_CONTROL)
/*
* The PACK_EN bit only has meaning when the PPI port width (selected by
* DLEN[2:0]) is 8 bits
@@ -521,11 +521,18 @@
"PACKING can't work while PPI port width isn't 8\n");
goto err_inval;
}
+#if defined(PPI_CONTROL) || defined(PPI0_CONTROL)
regdata |= PACK_EN;
+#elif defined(EPPI0_CONTROL) || defined(EPPI1_CONTROL)
+ regdata |= EPPI_PACK_EN;
+#endif
pr_debug("ppi_ioctl: CMD_PPI_PACKING packing enable\n");
-#endif
} else {
+#if defined(PPI_CONTROL) || defined(PPI0_CONTROL)
regdata &= ~PACK_EN;
+#elif defined(EPPI0_CONTROL) || defined(EPPI1_CONTROL)
+ regdata &= ~EPPI_PACK_EN;
+#endif
pr_debug("ppi_ioctl: CMD_PPI_PACKING packing disable\n");
}
conf->ppi_control = regdata;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits