summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/pxaregs
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-05-29 22:17:43 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-05-30 11:28:58 +0200
commitaf738233bbae8ece8e3cde040eca2243e4821699 (patch)
tree2cf2cc2891169e3bfb5b918aa6038664e96502d4 /meta-oe/recipes-support/pxaregs
parent3087fa5c4ab4ad5ee3dae251d1477302044aab49 (diff)
downloadmeta-openembedded-af738233bbae8ece8e3cde040eca2243e4821699.tar.gz
pxaregs: import from OE rev d4f0211e2078d5033ae0dee74664de5520d8392d
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/pxaregs')
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs-1.14/Makefile3
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs-1.14/i2c.patch15
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs-1.14/munmap.patch22
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs-1.14/serial.patch14
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs-1.14/usb.patch17
-rw-r--r--meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb25
6 files changed, 96 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs-1.14/Makefile b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/Makefile
new file mode 100644
index 000000000..00b7d5262
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/Makefile
@@ -0,0 +1,3 @@
1
2
3all: pxaregs
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs-1.14/i2c.patch b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/i2c.patch
new file mode 100644
index 000000000..36983ec47
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/i2c.patch
@@ -0,0 +1,15 @@
1Index: pxaregs-1.14/pxaregs.c
2===================================================================
3--- pxaregs-1.14.orig/pxaregs.c
4+++ pxaregs-1.14/pxaregs.c
5@@ -21,10 +21,6 @@
6 #include <fcntl.h>
7 #include <ctype.h>
8
9-#include <linux/i2c.h>
10-#include <linux/i2c-dev.h>
11-
12-
13 // fd for /dev/mem
14 static int fd = -1;
15
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs-1.14/munmap.patch b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/munmap.patch
new file mode 100644
index 000000000..a9c4b95cf
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/munmap.patch
@@ -0,0 +1,22 @@
1Index: pxaregs-1.14/pxaregs.c
2===================================================================
3--- pxaregs-1.14.orig/pxaregs.c
4+++ pxaregs-1.14/pxaregs.c
5@@ -1794,7 +1794,7 @@ static int getmem(u32 addr)
6 regaddr = map + (addr & MAP_MASK);
7
8 val = *(u32*) regaddr;
9- munmap(0,MAP_SIZE);
10+ munmap(map,MAP_SIZE);
11
12 return val;
13 }
14@@ -1829,7 +1829,7 @@ static void putmem(u32 addr, u32 val)
15 regaddr = map + (addr & MAP_MASK);
16
17 *(u32*) regaddr = val;
18- munmap(0,MAP_SIZE);
19+ munmap(map,MAP_SIZE);
20 }
21
22 static u32 lastaddr = 0;
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs-1.14/serial.patch b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/serial.patch
new file mode 100644
index 000000000..06853851d
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/serial.patch
@@ -0,0 +1,14 @@
1Index: pxaregs-1.14/pxaregs.c
2===================================================================
3--- pxaregs-1.14.orig/pxaregs.c
4+++ pxaregs-1.14/pxaregs.c
5@@ -78,6 +78,9 @@ static struct reg_info regs[] = {
6 { "ISAR", 0x403016A0, 0, 0xffffffff, 'x', "I2C Slave Address Register" },
7 { "ISAR_SA", 0x403016A0, 0, 0x0000007f, 'x', "I2C Slave Address" },
8
9+{ "HW_MCR", 0x41600010, 0, 0xffffffff, 'x', "HWUART Modem Control Register" },
10+{ "HW_MSR", 0x41600018, 0, 0xffffffff, 'x', "HWUART Modem Status Register" },
11+
12 { "PMCR", 0x40F00000, 0, 0xffffffff, 'x', "Power Manager Control Register (3-23)" },
13 { "PMCR_IDAE", 0x40F00000, 0, 0x00000001, 'd', "PM imprecise data abort abort signal" },
14
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs-1.14/usb.patch b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/usb.patch
new file mode 100644
index 000000000..59f21fe3c
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs-1.14/usb.patch
@@ -0,0 +1,17 @@
1Index: pxaregs-1.14/pxaregs.c
2===================================================================
3--- pxaregs-1.14.orig/pxaregs.c
4+++ pxaregs-1.14/pxaregs.c
5@@ -78,6 +78,12 @@ static struct reg_info regs[] = {
6 { "ISAR", 0x403016A0, 0, 0xffffffff, 'x', "I2C Slave Address Register" },
7 { "ISAR_SA", 0x403016A0, 0, 0x0000007f, 'x', "I2C Slave Address" },
8
9+{ "UP2OCR", 0x40600020, 0, 0xffffffff, 'x', "USB Port 2 Output Control Register" },
10+{ "UP2OCR_SEOS", 0x40600020, 24, 7, 'x', "USB Port 2 Single-Ended Output Select" },
11+{ "UP2OCR_HXOE", 0x40600020, 17, 1, 'x', "USB Port 2 Tranceiver OE" },
12+{ "UP2OCR_HXS", 0x40600020, 16, 1, 'x', "USB Port 2 Tranceiver Output Select" },
13+{ "UP2OCR_IDON", 0x40600020, 10, 1, 'x', "OTG ID Read Enable" },
14+
15 { "HW_MCR", 0x41600010, 0, 0xffffffff, 'x', "HWUART Modem Control Register" },
16 { "HW_MSR", 0x41600018, 0, 0xffffffff, 'x', "HWUART Modem Status Register" },
17
diff --git a/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb b/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb
new file mode 100644
index 000000000..d5a5b4ba9
--- /dev/null
+++ b/meta-oe/recipes-support/pxaregs/pxaregs_1.14.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "Tool to display and modify PXA registers at runtime"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://pxaregs.c;endline=12;md5=2cb6b33300eacdec4d7299bc42533740"
4AUTHOR = "Holger Schurig <hs4233@mail.mn-solutions.de>"
5HOMEPAGE = "http://www.mn-logistik.de/unsupported/pxa250/"
6
7SRC_URI = "http://www.mn-logistik.de/unsupported/pxa250/pxaregs.c \
8 file://i2c.patch \
9 file://munmap.patch \
10 file://serial.patch \
11 file://usb.patch "
12
13S = "${WORKDIR}"
14
15do_compile() {
16 ${CC} pxaregs.c -o pxaregs ${CFLAGS} ${LDFLAGS}
17}
18
19do_install() {
20 install -d ${D}${sbindir}/
21 install -m 0755 pxaregs ${D}${sbindir}/
22}
23
24SRC_URI[md5sum] = "a43baa88842cd5926dbffb6fb87624f6"
25SRC_URI[sha256sum] = "f339b91cd8ab348052c36b36d20033e4bffc3666bc836ff72d5704f025e1c057"