|
@@ -0,0 +1,35 @@
|
|
|
+/*
|
|
|
+ * linux/arch/arm/mach-mv78xx0/mpp.h -- Multi Purpose Pins
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * sebastien requiem <sebastien@requiem.fr>
|
|
|
+ *
|
|
|
+ * This file is licensed under the terms of the GNU General Public
|
|
|
+ * License version 2. This program is licensed "as is" without any
|
|
|
+ * warranty of any kind, whether express or implied.
|
|
|
+ */
|
|
|
+
|
|
|
+#ifndef __MV78X00_MPP_H
|
|
|
+#define __MV78X00_MPP_H
|
|
|
+
|
|
|
+#define MPP(_num, _sel, _in, _out, _78100_A0) (\
|
|
|
+ /* MPP number */ ((_num) & 0xff) | \
|
|
|
+ /* MPP select value */ (((_sel) & 0xf) << 8) | \
|
|
|
+ /* may be input signal */ ((!!(_in)) << 12) | \
|
|
|
+ /* may be output signal */ ((!!(_out)) << 13) | \
|
|
|
+ /* available on A0 */ ((!!(_78100_A0)) << 14))
|
|
|
+
|
|
|
+ /* num sel i o 78100_A0 */
|
|
|
+
|
|
|
+#define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1)
|
|
|
+
|
|
|
+#define MPP0_GPIO MPP(0, 0x0, 1, 1, 1)
|
|
|
+#define MPP0_GE0_COL MPP(0, 0x1, 0, 0, 1)
|
|
|
+#define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 0, 1)
|
|
|
+#define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1)
|
|
|
+
|
|
|
+#define MPP1_GPIO MPP(1, 0x0, 1, 1, 1)
|
|
|
+#define MPP1_GE0_RXERR MPP(1, 0x1, 0, 0, 1)
|
|
|
+#define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 0, 1)
|
|
|
+#define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1)
|
|
|
+
|