armadeus-commitlog Mailing List for armadeus (Page 126)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Revision: 1206
http://armadeus.svn.sourceforge.net/armadeus/?rev=1206&view=rev
Author: artemys
Date: 2009-04-07 16:01:55 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
[LINUX] Add a patch to increase DMA size for MXC (APF27)
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/320-apf27-armadeus-increase_max_dma_zone_size.patch
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/320-apf27-armadeus-increase_max_dma_zone_size.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/320-apf27-armadeus-increase_max_dma_zone_size.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/320-apf27-armadeus-increase_max_dma_zone_size.patch 2009-04-07 16:01:55 UTC (rev 1206)
@@ -0,0 +1,17 @@
+Increases max DMA zone size for MXC platform.
+
+Signed-off-by: Nicolas Colombain <nic...@ar...>
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.27.13/arch/arm/plat-mxc/include/mach/memory.h
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/plat-mxc/include/mach/memory.h 2009-03-27 17:52:54.000000000 +0100
++++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/memory.h 2009-03-27 17:58:35.000000000 +0100
+@@ -26,4 +26,7 @@
+ */
+ #define __bus_to_virt(a) __phys_to_virt(a)
+
++/* Override the ARM default */
++#define CONSISTENT_DMA_SIZE SZ_4M
++
+ #endif /* __ASM_ARCH_MXC_MEMORY_H__ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-04-07 14:50:40
|
Revision: 1205
http://armadeus.svn.sourceforge.net/armadeus/?rev=1205&view=rev
Author: artemys
Date: 2009-04-07 14:50:31 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
[TOOLS] Freescale's VPU test tools can now compile and run on the APF27 (I said run, not work ;-) )
Added Paths:
-----------
trunk/buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch
trunk/buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch
trunk/buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch
Added: trunk/buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch
===================================================================
--- trunk/buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch (rev 0)
+++ trunk/buildroot/package/freescale-tools/03-misc-20071002-add_support_for_apf27.patch 2009-04-07 14:50:31 UTC (rev 1205)
@@ -0,0 +1,59 @@
+Add support for APF27 to Freescale's VPU test tools.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/lib/vpu/vpu_io.c misc-20071002/lib/vpu/vpu_io.c
+--- misc-20071002.org/lib/vpu/vpu_io.c 2009-03-18 08:45:44.000000000 +0100
++++ misc-20071002/lib/vpu/vpu_io.c 2009-03-18 12:16:47.000000000 +0100
+@@ -386,7 +386,7 @@
+ if (strlen(cpu) == 0) {
+ printf("can't get the chip info.\n");
+ return -1;
+- } else if (strstr(cpu, "MX27") == NULL) {
++ } else if (strstr(cpu, "APF27") == NULL) {
+ printf("VPU does not support %s\n", cpu);
+ return -1;
+ }
+@@ -398,7 +398,7 @@
+ DPRINTF("MX27 TO2.0\n");
+ return MX27_REV2;
+ } else {
+- DPRINTF("MX27 TO1\n");
+- return MX27_REV1;
++ DPRINTF("MX27 TO2.2\n");
++ return MX27_REV3;
+ }
+ }
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/lib/vpu/vpu_io.h misc-20071002/lib/vpu/vpu_io.h
+--- misc-20071002.org/lib/vpu/vpu_io.h 2009-03-18 08:45:44.000000000 +0100
++++ misc-20071002/lib/vpu/vpu_io.h 2009-03-18 12:17:08.000000000 +0100
+@@ -49,6 +49,7 @@
+
+ #define MX27_REV1 0x0882101D
+ #define MX27_REV2 0x1882101D
++#define MX27_REV3 0x2882101D
+
+ typedef void (*vpu_callback) (int status);
+
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/lib/vpu/vpu_lib.c misc-20071002/lib/vpu/vpu_lib.c
+--- misc-20071002.org/lib/vpu/vpu_lib.c 2009-03-18 08:45:44.000000000 +0100
++++ misc-20071002/lib/vpu/vpu_lib.c 2009-04-07 16:00:31.000000000 +0200
+@@ -92,7 +92,7 @@
+ */
+ RetCode vpu_Init(PhysicalAddress workBuf)
+ {
+- int i;
++ int i, rev_id;
+ Uint32 data;
+ Uint32 virt_codeBuf;
+ CodecInst *pCodecInst;
+@@ -109,7 +109,8 @@
+ virt_paraBuf2 = (unsigned long *)(virt_codeBuf + CODE_BUF_SIZE +
+ WORK_BUF_SIZE);
+
+- if (getChipVersion() == MX27_REV2) {
++ rev_id = getChipVersion();
++ if ((rev_id == MX27_REV2) || (rev_id == MX27_REV3)) {
+ /* Copy full Microcode to Code Buffer allocated on SDRAM */
+ for (i = 0; i < sizeof(bit_code2) / sizeof(bit_code2[0]); i += 2) {
+ data = (unsigned int)((bit_code2[i] << 16) | bit_code2[i + 1]);
Added: trunk/buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch
===================================================================
--- trunk/buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch (rev 0)
+++ trunk/buildroot/package/freescale-tools/04-misc-20071002-compile_vpu_tools_with_debug_symbols.patch 2009-04-07 14:50:31 UTC (rev 1205)
@@ -0,0 +1,28 @@
+Compiles libvpu and mxc_vpu_test with debugging symbols (yes they are buggy ! ;-) ).
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/lib/vpu/Makefile misc-20071002/lib/vpu/Makefile
+--- misc-20071002.org/lib/vpu/Makefile 2009-03-18 08:45:44.000000000 +0100
++++ misc-20071002/lib/vpu/Makefile 2009-03-18 13:24:23.000000000 +0100
+@@ -15,7 +15,7 @@
+
+ all: $(LIB)
+ %.o: %.c
+- $(CC) -D$(PLATFORM) -Wall -O2 -c $^ -o $@
++ $(CC) -D$(PLATFORM) -DDEBUG -g -Wall -O2 -c $^ -o $@
+
+ $(LIB): $(OBJ)
+ rm -f $(LIB)
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/test/mxc_vpu_test/Makefile misc-20071002/test/mxc_vpu_test/Makefile
+--- misc-20071002.org/test/mxc_vpu_test/Makefile 2009-03-18 08:45:40.000000000 +0100
++++ misc-20071002/test/mxc_vpu_test/Makefile 2009-03-18 15:18:26.000000000 +0100
+@@ -43,7 +43,7 @@
+ mv $(TARGET1) $(OBJDIR)
+
+ %.o: %.c
+- $(CC) -Wall -O2 -I $(LIBDIR) -c $^ -o $@
++ $(CC) -Wall -O2 -DDEBUG -I $(LIBDIR) -g -c $^ -o $@
+ # $(CC) -Wall -c $^ -o $@
+ # $(CC) -DDEBUG -DVGA_PANEL -c $^ -o $@
+ # $(CC) -DDEBUG -c $^ -o $@
Added: trunk/buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch
===================================================================
--- trunk/buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch (rev 0)
+++ trunk/buildroot/package/freescale-tools/06-misc-20071002-makes_rtp_lib_compatible_with_rfc3984.patch 2009-04-07 14:50:31 UTC (rev 1205)
@@ -0,0 +1,272 @@
+Makes VPU's RTP stuff compatible with RFC3984 (needed to transfer H.264 stream through network). Code was inspired by gstreamer's rtph264pay/depay one.
+
+1] This patch probably breaks H.263 & MPEG4 streams
+2] Only the Tx part is done yet
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+diff -X ../project_build_armv5te/apf27/linux-2.6.27.13/Documentation/dontdiff -urN misc-20071002.org/test/mxc_vpu_test/rtp.c misc-20071002/test/mxc_vpu_test/rtp.c
+--- misc-20071002.org/test/mxc_vpu_test/rtp.c 2009-03-18 08:45:40.000000000 +0100
++++ misc-20071002/test/mxc_vpu_test/rtp.c 2009-04-06 16:56:25.000000000 +0200
+@@ -19,27 +19,28 @@
+ #include <memory.h>
+ #include <sys/time.h>
+ #include <errno.h>
++
+ #include "udp.h"
+ #include "rtp.h"
+
+-#define RTP_VER 2
+-#define RTP_PAD (1 << 2)
+-#define RTP_EXT (1 << 3)
+-#define RTP_CC(count) ((count) << 4)
+-#define RTP_MRK (1 << 8)
+-#define RTP_TYP(typ) ((typ) << 9)
++/* RTP Flags MSB: */
++#define RTP_VER (2 << 6)
++#define RTP_PAD (1 << 5)
++#define RTP_EXT (1 << 4)
++#define RTP_CC(count) ((count) << 0)
++/* RTP Flags LSB: */
++#define RTP_MRK (1 << 7)
++#define RTP_TYP(typ) ((typ) << 0)
++
+
+-#pragma pack(1)
+ typedef struct {
+- unsigned short flag;
++ unsigned char flag_msb;
++ unsigned char flag_lsb;
+ unsigned short seq;
+ unsigned int time;
+ unsigned int ssrc;
+- /* out of spec additions */
+- unsigned short len;
+- char chk;
+-} rtph_t;
+-#pragma pack()
++} __attribute__((packed)) rtph_t;
++
+
+ int rtp_init(rtp_t * t, int bufsize)
+ {
+@@ -57,7 +58,8 @@
+ }
+ t->txbuf = t->rxbuf + rt;
+ h = (rtph_t *) t->txbuf;
+- h->flag = RTP_VER | RTP_TYP(t->type);
++ h->flag_msb = RTP_VER;
++ h->flag_lsb = RTP_TYP(t->type);
+
+ t->sock = udp_open(t->port, t->ip, &t->to);
+ if (t->sock < 0) {
+@@ -96,30 +98,67 @@
+ #endif
+
+ extern int g_state;
++
++#if 0
++int nal_decode(char *buf, int len)
++{
++ int i = 0;
++ int nb_nal = 0;
++
++ do
++ {
++ if ( (buf[i] == 0x00) && (buf[i+1] == 0x00) && (buf[i+2] == 0x00) && (buf[i+3] == 0x01)) {
++ nb_nal++;
++ i += 3;
++ }
++ } while (i++ < len);
++ return nb_nal;
++}
++#endif
++
++static inline int min(int a, int b)
++{
++ if (a < b)
++ return a;
++ else
++ return b;
++}
++
++// #define DEBUG(fmt, args...) printf(fmt, ## args)
++#define DEBUG(fmt, args...) do { ; } while (0)
++
++#define IS_ACCESS_UNIT(x) (((x) > 0x00) && ((x) < 0x06))
++
+ int rtp_tx(rtp_t * t, char *buf, int len)
+ {
+ rtph_t *h;
+- int tlen;
++ int tlen, hlen;
+ int rt;
+ struct timeval tv;
++ static unsigned short seq_num = 0;
++ int nal_type, mtu;
++ unsigned char nal_header;
++ unsigned char* payload;
++ int start, end;
+
+ h = (rtph_t *) t->txbuf;
+- h->flag &= ~RTP_MRK;
++ h->flag_lsb &= ~RTP_MRK;
+ gettimeofday(&tv, 0);
+- h->time = (tv.tv_sec * 1000000) + tv.tv_usec;
+- h->len = t->size;
+- for (tlen = 0; len > 0; tlen += h->len) {
+- if (len <= t->size) {
+- h->len = len;
+- h->flag |= RTP_MRK;
+- }
++ h->time = htonl(((tv.tv_sec * 1000000) + tv.tv_usec)/10); /* important ? */
++ hlen = t->size;
+
+- memcpy(h + 1, buf, h->len);
+- rt = t->size + sizeof(rtph_t);
+- h->chk = 0;
+-//g_state=123;
+- h->chk = chk_gen((char *)h, rt);
+-//g_state=124;
++ /* Here we receive NALU one by one from codec,
++ with 0x00000001 header, so skip it */
++ buf += 4;
++ len -= 4;
++
++ nal_type = buf[0] & 0x1f;
++ DEBUG("--- Processing packet with NAL type=%d\n", nal_type);
++ mtu = t->size;
++ if (len < mtu) {
++ DEBUG("NAL Unit fit in one packet datasize=%d mtu=%d\n", len, mtu);
++ memcpy(h + 1, buf, hlen);
++ rt = len + sizeof(rtph_t);
+ rt = sendto(t->sock, h, rt, 0,
+ (struct sockaddr *)&t->to, sizeof(t->to));
+ if (rt < 0) {
+@@ -127,12 +166,55 @@
+ return rt;
+ }
+
+- h->seq++;
+- buf += h->len;
+-// tlen += h->len;
+- len -= h->len;
++ seq_num++;
++ h->seq = htons(seq_num);
++ return len;
++ } else {
++ /* Divide NALU according to Fragmentation Unit A spec */
++ DEBUG("NAL Unit DOES NOT fit in one packet datasize=%d mtu=%d\n", len, mtu);
++ /* We keep 2 bytes for FU indicator and FU Header */
++ hlen -= 2;
++ start = 1;
++ end = 0;
++ /* skip NAL header in first frame as it will be reconstructed */
++ nal_header = *buf;
++ buf++;
++ len--;
++ for (tlen = 0; len > 0; tlen += hlen) {
++ if (len <= t->size) {
++ hlen = len;
++ h->flag_lsb |= RTP_MRK;
++ end = 1;
++ DEBUG("Last ");
++ }
++ payload = (unsigned char*)(h+1);
++ /* FU indicator (FU-A) */
++ payload[0] = (nal_header & 0x60) | 28;
++ /* FU Header */
++ payload[1] = (start << 7) | (end << 6) | (nal_header & 0x1f);
++
++// memcpy(h + 1, buf, hlen);
++ memcpy(&payload[2], buf, hlen);
++
++ rt = min((len+2), t->size) + sizeof(rtph_t);
++ rt = sendto(t->sock, h, rt, 0,
++ (struct sockaddr *)&t->to, sizeof(t->to));
++ if (rt < 0) {
++ printf("%s: rtp_tx err %d %d\n", t->name, rt, errno);
++ return rt;
++ }
++ DEBUG("Packet 0x%04x of %d bytes sent (%02x %02x %02x)\n", seq_num, rt,
++ buf[0], buf[1], buf[2]);
++
++ seq_num++;
++ h->seq = htons(seq_num);
++ buf += hlen;
++ // tlen += h->len;
++ len -= hlen;
++ start = 0;
++ }
++ return tlen;
+ }
+- return tlen;
+ }
+
+ int rtp_rx(rtp_t * t, char *buf, int len)
+@@ -167,16 +249,16 @@
+ // t->name, seq, rt);
+ t->err++;
+ lp_skip:
+- h->flag &= ~RTP_MRK;
++ h->flag_lsb &= ~RTP_MRK;
+ continue;
+ }
+
+- if (h->len > t->size) {
++ /*if (h->len > t->size) {
+ printf("%s: rtp_rx warn pktlen=%d > buflen=%d\n",
+ t->name, h->len, t->size);
+ t->err++;
+ goto lp_skip;
+- }
++ }*/
+
+ if (seq != h->seq) {
+ // printf("%s: rtp_rx exp %d got %d\n",
+@@ -192,7 +274,7 @@
+ }
+ #endif
+ /* skip remaining frags of pkt */
+- while (!(h->flag & RTP_MRK)) {
++ while (!(h->flag_lsb & RTP_MRK)) {
+ slen = sizeof(t->to);
+ rt = recvfrom(t->sock, h,
+ t->size + sizeof(rtph_t),
+@@ -209,14 +291,14 @@
+ printf("%s: rtp_rx(skip) warn pkt "
+ "corrupt chk=%02X\n",
+ t->name, rt);
+- h->flag &= ~RTP_MRK;
++ h->flag_lsb &= ~RTP_MRK;
+ t->err++;
+ } else {
+ t->skip++;
+ }
+ }
+ tlen = 0;
+- h->flag &= ~RTP_MRK;
++ h->flag_lsb &= ~RTP_MRK;
+ h->seq++;
+ tlen = 0; /* discard previous frags of pkt */
+ seq = h->seq;
+@@ -225,7 +307,7 @@
+
+ h->seq++;
+ seq = h->seq;
+- tlen += h->len;
++ /*tlen += h->len;*/
+ if (tlen > len) {
+ /* more data to read */
+ printf("%s: rtp_rx warn size %d < %d\n",
+@@ -233,8 +315,8 @@
+ return tlen;
+ }
+
+- memcpy(buf + tlen - h->len, h + 1, h->len);
++ /*memcpy(buf + tlen - h->len, h + 1, h->len);*/
+ }
+- while (!(h->flag & RTP_MRK));
++ while (!(h->flag_lsb & RTP_MRK));
+ return tlen;
+ }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-04-07 10:31:22
|
Revision: 1204
http://armadeus.svn.sourceforge.net/armadeus/?rev=1204&view=rev
Author: artemys
Date: 2009-04-07 10:31:12 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
[DEMOS] Add README + SDL_image example
Modified Paths:
--------------
trunk/target/demos/backlight_control/backlight.c
Added Paths:
-----------
trunk/target/demos/README
trunk/target/demos/show_image/
trunk/target/demos/show_image/Makefile
trunk/target/demos/show_image/image.c
Added: trunk/target/demos/README
===================================================================
--- trunk/target/demos/README (rev 0)
+++ trunk/target/demos/README 2009-04-07 10:31:12 UTC (rev 1204)
@@ -0,0 +1,15 @@
+Some program examples to show how to use some Armadeus boards functionnalities:
+- armanoid:
+ SDL 2D game (very basic)
+- backlight_control:
+ Backlight control with SDL and Tslib (touchscreen)
+- gps:
+ NMEA decoding examples (GPS connected on 2nd serial port)
+- show_image:
+ SDL_image library usage example
+- input_test:
+ Event handling in SDL (keyboard, mouse, joypad)
+- real_time:
+ Xenomai examples
+- wolfenstein3d:
+ SDL 3D game (buggy)
Modified: trunk/target/demos/backlight_control/backlight.c
===================================================================
--- trunk/target/demos/backlight_control/backlight.c 2009-04-07 09:03:46 UTC (rev 1203)
+++ trunk/target/demos/backlight_control/backlight.c 2009-04-07 10:31:12 UTC (rev 1204)
@@ -1,6 +1,6 @@
/*
* Small tool to demonstrate how to use (or not use ;-) ) Tslib + SDL library
- * for the Armadeus project. www.armadeus.og
+ * for the Armadeus project: http://www.armadeus.org
*
* 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
Added: trunk/target/demos/show_image/Makefile
===================================================================
--- trunk/target/demos/show_image/Makefile (rev 0)
+++ trunk/target/demos/show_image/Makefile 2009-04-07 10:31:12 UTC (rev 1204)
@@ -0,0 +1,47 @@
+ARMADEUS_BASE_DIR=../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+ifeq ($(TARGET),)
+ ROOT_DIR:=$(ARMADEUS_ROOTFS_DIR)
+ CC:=$(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-gcc
+ DEFINES="-DTARGET"
+ CFLAGS:=$(shell STAGING_DIR=$(ARMADEUS_STAGING_DIR) sh $(ARMADEUS_SDL_DIR)/sdl-config --cflags)
+ LIBS:=$(shell STAGING_DIR=$(ARMADEUS_STAGING_DIR) sh $(ARMADEUS_SDL_DIR)/sdl-config --libs) -lSDL_image
+else
+ ROOT_DIR:="/"
+ CFLAGS=`/usr/bin/sdl-config --cflags`
+ LIBS=`/usr/bin/sdl-config --libs` -lSDL_Image
+ CC=gcc
+ DEFINES="-DHOST"
+endif
+
+INSTALL_DIR:=$(ROOT_DIR)/usr/bin/
+ifneq ($(DEBUG),)
+CFLAGS+="-g"
+endif
+
+
+EXEC_NAME=show_image
+
+default: $(EXEC_NAME)
+
+all: $(EXEC_NAME)
+
+
+image.o: image.c
+ $(CC) $(CFLAGS) -c -o $@ $^
+
+$(EXEC_NAME): image.o
+ $(CC) $(LIBS) -o $@ $^
+
+
+install: $(EXEC_NAME)
+ mkdir -p $(INSTALL_DIR)
+ cp $^ $(INSTALL_DIR)
+
+clean:
+ rm -rf $(EXEC_NAME)
+ rm -rf *.o
+
+.PHONY: clean install
+
Added: trunk/target/demos/show_image/image.c
===================================================================
--- trunk/target/demos/show_image/image.c (rev 0)
+++ trunk/target/demos/show_image/image.c 2009-04-07 10:31:12 UTC (rev 1204)
@@ -0,0 +1,78 @@
+/*
+ * Small tool to demonstrate how to use SDL_image library
+ * for the Armadeus project: http://www.armadeus.org
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <SDL/SDL.h>
+#include <SDL/SDL_image.h>
+
+
+#define SCREEN_WIDTH 480
+#define SCREEN_HEIGHT 272
+
+
+void wait()
+{
+ int end = 0;
+ SDL_Event event;
+
+ while (!end)
+ {
+ SDL_WaitEvent(&event);
+ switch(event.type)
+ {
+ case SDL_QUIT:
+ end = 1;
+ break;
+ }
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ SDL_Surface *screen = NULL, *image = NULL;
+ SDL_Rect coord;
+
+ if (argc != 2) {
+ printf("Usage: %s file\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+ SDL_Init(SDL_INIT_VIDEO);
+ atexit(SDL_Quit);
+
+ screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 16, SDL_ANYFORMAT);
+ if (!screen) {
+ printf("Unable to open display (%dx%d)\n", SCREEN_WIDTH, SCREEN_HEIGHT);
+ return EXIT_FAILURE;
+ }
+
+ image = IMG_Load(argv[1]);
+ if (!image) {
+ printf("Unable to load image file: %s\n", SDL_GetError());
+ return EXIT_FAILURE;
+ }
+ SDL_BlitSurface(image, NULL, screen, 0);
+ SDL_Flip(screen);
+
+ wait();
+
+ SDL_FreeSurface(image);
+
+ return EXIT_SUCCESS;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-04-07 09:03:50
|
Revision: 1203
http://armadeus.svn.sourceforge.net/armadeus/?rev=1203&view=rev
Author: artemys
Date: 2009-04-07 09:03:46 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
[LINUX] Do some minor (indentation) changes in gpio driver
Modified Paths:
--------------
trunk/target/linux/modules/gpio/core.c
Modified: trunk/target/linux/modules/gpio/core.c
===================================================================
--- trunk/target/linux/modules/gpio/core.c 2009-04-06 15:09:50 UTC (rev 1202)
+++ trunk/target/linux/modules/gpio/core.c 2009-04-07 09:03:46 UTC (rev 1203)
@@ -1,5 +1,5 @@
/*
- * Armadeus i.MXL GPIO management driver
+ * Armadeus i.MXL/27 GPIO management driver
*
* Copyright (C) 2006-2008 Julien Boibessot <jul...@ar...>
* Nicolas Colombain <nic...@ar...>
@@ -210,15 +210,15 @@
{
static int i,j;
char mask = 0x01|base;
-
+
/* convert it into a string */
for (j=(base*number_of_bits)-(base), i = number_of_bits; i > 0; i--,j-=base) {
buffer[number_of_bits-i]=((value >> j)&mask)+'0';
}
-
+
buffer[number_of_bits] = '\n';
buffer[number_of_bits+1] = 0;
-
+
return number_of_bits+1;
}
@@ -230,12 +230,13 @@
ret_val = 0;
/* Create WORD to write from the string */
- for ( i=0, j=1; j<=number_of_bits; i++) {
+ for (i=0, j=1; j<=number_of_bits; i++) {
//printk("%x j=%d i=%d\n", buffer[i], j, i);
- if (buffer[i] == '\0') break; /* EOC */
-
+ if (buffer[i] == '\0')
+ break; /* EOC */
+
ret_val <<= base;
- ret_val |=(buffer[i]-'0')&0xff;
+ ret_val |= (buffer[i]-'0') & 0xff;
j++;
}
@@ -247,12 +248,14 @@
{
unsigned long shad;
int portSize = number_of_pins[num_port];
+
if (num_pin < (portSize/2)) {
shad = shadows_irq2[num_port];
} else {
shad = shadows_irq[num_port];
- num_pin-=(portSize/2);
+ num_pin -= (portSize/2);
}
+
return shad >> (/*portSize-2-*/(2*num_pin))& 3;
}
@@ -400,7 +403,7 @@
goto out;
}
- if( gpio->nb_pins != 1) {
+ if (gpio->nb_pins != 1) {
pr_debug("Full port write: 0x%x\n", value);
writeOnPort( gpio->port, value );
} else {
@@ -447,17 +450,17 @@
gpio->changed = 0;
if (gpio->nb_pins != 1) {
- value = readFromPort( gpio->port );
+ value = readFromPort(gpio->port);
pr_debug("Full port read: 0x%x\n", value);
} else {
value = gpio_get_value(minor);
pr_debug("Single pin read: %d\n", value);
}
- value = readFromPort( minor );
+ value = readFromPort(minor);
port_status = (char)(value & 0xFF);
- count = min( count, (size_t)sizeof(u32) );
+ count = min(count, (size_t)sizeof(u32));
if (copy_to_user(buf, &value, count)) {
ret = -EFAULT;
goto out;
@@ -475,19 +478,19 @@
struct gpio_item *gpio = dev_id;
u32 old_state, new_state;
-// printk("IT for pin %d %d\n", gpio->port, gpio->number);
+ pr_debug("IT for pin %d %d\n", gpio->port, gpio->number);
old_state = gpio->pin_state;
new_state = gpio_get_value(gpio->port|gpio->number);
gpio->pin_state = new_state;
-
+
if ((gpio->irq_value != (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) || new_state != old_state) {
gpio->changed = 1;
wake_up_interruptible(&gpio->change_wq);
if (gpio->async_queue)
kill_fasync(&gpio->async_queue, SIGIO, POLL_IN);
- if (gpio->irq_value == (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)){
+ if (gpio->irq_value == (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
set_irq_type(irq, ((gpio->pin_state)?IRQF_TRIGGER_FALLING:IRQF_TRIGGER_RISING));
}
}
@@ -545,15 +548,15 @@
gpio->pin_state = 0;
if (getPortDir(gpio->port) & (1 << gpio->number)) {
- gpio_direction_output( minor, 0 );
+ gpio_direction_output(minor, 0);
} else {
- gpio_direction_input( minor );
- gpio->pin_state = gpio_get_value( minor );
+ gpio_direction_input(minor);
+ gpio->pin_state = gpio_get_value(minor);
}
/* Request interrupt if pin was configured for */
gpio->irq_value = getIrqFromPin(gpio->number,gpio->port);
-
+
if (gpio->irq_value) {
irq = IRQ_GPIOA(minor); /* irq number are continuous */
ret = request_irq(irq, armadeus_gpio_interrupt, 0, "gpio", gpio);
@@ -619,7 +622,7 @@
/* Extract the type and number bitfields, and don't decode wrong cmds:
return ENOTTY (inappropriate ioctl) before access_ok() */
- if (_IOC_TYPE(cmd) != PP_IOCTL)
+ if (_IOC_TYPE(cmd) != PP_IOCTL)
return -ENOTTY;
/* The direction is a bitmask, and VERIFY_WRITE catches R/W transfers.
@@ -630,7 +633,8 @@
else if (_IOC_DIR(cmd) & _IOC_WRITE)
err = !access_ok(VERIFY_READ, (void *)arg, _IOC_SIZE(cmd));
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
/* Obtain exclusive access */
if (down_interruptible(&gpio_sema))
@@ -652,19 +656,19 @@
ret = __get_user(value, (unsigned int *)arg);
if (ret == 0) {
- setPortDir( minor, value );
+ setPortDir(minor, value);
}
break;
case GPIORDDATA:
- value = readFromPort( minor );
+ value = readFromPort(minor);
ret = __put_user(value, (unsigned int *)arg);
break;
case GPIOWRDATA:
ret = __get_user(value, (unsigned int *)arg);
if (ret == 0) {
- writeOnPort( minor, value );
+ writeOnPort(minor, value);
}
break;
@@ -709,7 +713,7 @@
switch (settings->type) {
case VALUE:
- port_status = readFromPort( port_ID );
+ port_status = readFromPort(port_ID);
break;
case DIRECTION:
@@ -734,7 +738,7 @@
break;
}
/* Put result to given chr buffer */
- if (settings->type != INTERRUPT){
+ if (settings->type != INTERRUPT) {
len = toString(port_status, buffer, number_of_pins[port_ID], 1);
} else {
len = toString(port_status, buffer, number_of_pins[port_ID]/2, 2);
@@ -748,7 +752,7 @@
*eof = 1;
up(&gpio_sema);
-
+
/* Return the length */
return len;
}
@@ -791,9 +795,9 @@
if (strlen(new_gpio_state) > 0) {
/* Convert it from String to Int */
- if (settings->type != INTERRUPT)
+ if (settings->type != INTERRUPT) {
gpio_state = fromString( new_gpio_state, number_of_pins[port_ID], 1);
- else {
+ } else {
gpio_state = fromString(new_gpio_state, number_of_pins[port_ID]/2, 2);
gpio_state2 = fromString(new_gpio_state+(number_of_pins[port_ID]/2), (number_of_pins[port_ID]/2), 2);
}
@@ -802,12 +806,12 @@
{
case VALUE:
printk("value\n");
- writeOnPort( port_ID, gpio_state );
+ writeOnPort(port_ID, gpio_state);
break;
case DIRECTION:
printk("direction\n");
- setPortDir( port_ID, gpio_state );
+ setPortDir(port_ID, gpio_state);
break;
case PULL_UP:
@@ -827,7 +831,7 @@
if (settings->type != INTERRUPT)
printk("/proc wrote 0x%x", gpio_state);
- else
+ else
printk("/proc wrote 0x%x 0x%x",gpio_state, gpio_state2);
printk(" on %s %s register\n", port_name[port_ID],
port_setting_name[settings->type]);
@@ -854,12 +858,11 @@
int i;
for (i = 0; i < NB_PORTS; i++) {
- config[i].entry = create_proc_entry( config[i].name, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL);
+ config[i].entry = create_proc_entry(config[i].name, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL);
if (config[i].entry == NULL) {
printk(KERN_ERR DRIVER_NAME ": Couldn't register %s. Terminating.\n", config[i].name);
return -ENOMEM;
}
-
config[i].entry->read_proc = armadeus_gpio_proc_read;
config[i].entry->write_proc = armadeus_gpio_proc_write;
config[i].entry->data = kmalloc(sizeof(struct gpio_settings), GFP_KERNEL);
@@ -1044,17 +1047,21 @@
*/
void gpioWriteOnPort( unsigned int aPort, unsigned int aValue )
{
- if (aPort >= NB_PORTS) { aPort = NB_PORTS - 1; printk(DRIVER_NAME "port unknown !\n"); return; }
- //
+ if (aPort >= NB_PORTS) {
+ printk(DRIVER_NAME "port unknown !\n");
+ return;
+ }
writeOnPort( aPort, aValue );
}
unsigned int gpioReadFromPort( unsigned int aPort )
{
if (aPort >= NB_PORTS) {
- aPort = NB_PORTS - 1; printk(DRIVER_NAME "port unknown !\n"); return(0);
- } else
- return (readFromPort( aPort ));
+ printk(DRIVER_NAME "port unknown !\n");
+ return 0;
+ } else {
+ return readFromPort(aPort);
+ }
}
void gpioSetPortDir( unsigned int aPort, unsigned int aDirMask )
@@ -1064,7 +1071,7 @@
unsigned int gpioGetPortDir( unsigned int aPort )
{
- return (getPortDir( aPort ));
+ return getPortDir(aPort);
}
EXPORT_SYMBOL( gpioWriteOnPort );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-04-06 15:10:06
|
Revision: 1202
http://armadeus.svn.sourceforge.net/armadeus/?rev=1202&view=rev
Author: gwenhael
Date: 2009-04-06 15:09:50 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
[DEMOS] global real time improvement
Modified Paths:
--------------
trunk/target/demos/real_time/Makefile.in
trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c
Added Paths:
-----------
trunk/target/demos/real_time/common.h
trunk/target/demos/real_time/common_kernel.h
Modified: trunk/target/demos/real_time/Makefile.in
===================================================================
--- trunk/target/demos/real_time/Makefile.in 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/Makefile.in 2009-04-06 15:09:50 UTC (rev 1202)
@@ -3,32 +3,44 @@
include $(ARMADEUS_BASE_DIR)/Makefile.in
-CC= arm-linux-gcc
-LD= arm-linux-ld
-CXX= arm-linux-g++
-AS= arm-linux-as
-NM= arm-linux-nm
-AR= arm-linux-ar
-SIZE= arm-linux-size
-OBJCOPY= arm-linux-objcopy
+CC= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-gcc
+LD= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-ld
+CXX= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-g++
+AS= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-as
+NM= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-nm
+AR= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-ar
+SIZE= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-size
+OBJCOPY= $(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-objcopy
-
EXEC=$(APPLICATIONS)
-XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
-XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
ifneq ($(APPLICATIONS),)
SRC= $(wildcard *.c)
OBJ= $(SRC:.c=.o)
EXEC= $(APPLICATIONS)
+CFLAGS=-g -W -Wall -D_GNU_SOURCE -D_REENTRANT
+LDFLAGS=-lpthread
+ifeq ($(XENOMAI),y)
XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
-CFLAGS=-g -W -Wall -I$(XENO)/include -I$(XENO)/include/native -I$(XENO)/include/rtdm -D_GNU_SOURCE -D_REENTRANT
-LDFLAGS=-L$(XENO)/lib -Xlinker -rpath $(XENO)/lib -Xlinker $(XENO)/lib/libnative.a $(XENO)/lib/librtdm.a -lpthread -lnative -lrtdm
+CFLAGS+=-I$(XENO)/include -I$(XENO)/include/native -I$(XENO)/include/rtdm
+LDFLAGS+=-L$(XENO)/lib -Xlinker -rpath $(XENO)/lib -Xlinker $(XENO)/lib/libnative.a $(XENO)/lib/librtdm.a -lnative -lrtdm
+endif
+
$(EXEC) : $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
$(OBJ): $(SRC)
$(CC) $(CFLAGS) -o $@ -c $<
+.PHONY: install
+ifeq ($(XENOMAI),y)
+install: $(EXEC)
+ mkdir -p $(DEST_DIR)/$(EXEC)
+ cp $(EXEC) $(DEST_DIR)/$(EXEC)
+ echo "$(EXEC):native:!./$(EXEC);popall:control_c" > /$(DEST_DIR)/$(EXEC)/.runinfo
+else
+install: $(EXEC)
+ cp $(EXEC) $(DEST_DIR)/$(EXEC)
endif
+endif
ifneq ($(MODULES),)
EXEC=$(MODULES).ko
@@ -41,10 +53,12 @@
obj-m := $(OBJ)
CLEAN_MOD= modules.order *.ko *.mod.c *.mod.o *.symvers $(CLEANMOD) .tmp_versions
-$(EXEC):
+$(EXEC): $(MODULES).c
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
-
+.PHONY: install
+install: $(EXEC)
+ cp $(EXEC) $(DEST_DIR)/$(EXEC)
endif
.PHONY: all
all: $(EXEC)
@@ -53,11 +67,8 @@
rm -rf $(OBJ) $(CLEAN_MOD)
rm -f $(EXEC)
rm -f *.c~ *.h~ Makefile~
-.PHONY: install
-install: $(EXEC)
- cp $(EXEC) $(DEST_DIR)/$(EXEC)
.PHONY: mrproper
mrproper: clean
- rm -f $(DEST_DIR)/$(EXEC)
+ rm -rf $(DEST_DIR)/$(EXEC)
Added: trunk/target/demos/real_time/common.h
===================================================================
--- trunk/target/demos/real_time/common.h (rev 0)
+++ trunk/target/demos/real_time/common.h 2009-04-06 15:09:50 UTC (rev 1202)
@@ -0,0 +1,17 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+#define INTERRUPT_OUTPUT_PORT 9
+#define INTERRUPT_INPUT_PORT 6
+#define INTERRUPT_OUTPUT_DEV "/dev/gpio/PA9"
+#define INTERRUPT_INPUT_DEV "/dev/gpio/PA6"
+
+#define PULSE_OUTPUT_DEV "/dev/gpio/PA4"
+#define PULSE_OUTPUT_PORT 4
+
+#define TIMESLEEP 10000
+#define TASK_PRIO 99 /* Highest RT priority */
+#define TASK_MODE 0 /* No flags */
+#define TASK_STKSZ 0 /* Stack size (use default one) */
+
+#endif /* COMMON_H */
Added: trunk/target/demos/real_time/common_kernel.h
===================================================================
--- trunk/target/demos/real_time/common_kernel.h (rev 0)
+++ trunk/target/demos/real_time/common_kernel.h 2009-04-06 15:09:50 UTC (rev 1202)
@@ -0,0 +1,8 @@
+#ifndef COMMON_KERNEL_H
+#define COMMON_KERNEL_H
+#include <asm/gpio.h>
+#include "common.h"
+
+#define INTERRUPT_INPUT_NB IRQ_GPIOA(INTERRUPT_INPUT_PORT)
+
+#endif /* COMMON_KERNEL_H */
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -26,21 +26,20 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/gpio.h>
+#include "../../../common_kernel.h"
-
-#define IRQ_NB IRQ_GPIOA(6)
-
MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
MODULE_DESCRIPTION("irq kernel test");
MODULE_SUPPORTED_DEVICE("none");
MODULE_LICENSE("GPL");
+static int iomask = 0x00;
/* irq handler */
static irqreturn_t test_interrupt_handler(int irqn, void *dev)
{
- printk("IT !\n");
-
+ imx_gpio_set_value(INTERRUPT_OUTPUT_PORT, iomask);
+ iomask^=1;
return IRQ_HANDLED;
}
@@ -48,19 +47,19 @@
{
int err;
- err = request_irq(IRQ_NB, test_interrupt_handler, 0, "test irq", NULL);
+ err = request_irq(INTERRUPT_INPUT_NB, test_interrupt_handler, 0, "test irq", NULL);
if (err) {
- printk(KERN_INFO "Error while requesting IRQ %d\n", IRQ_NB);
+ printk(KERN_INFO "Error while requesting IRQ %d\n", INTERRUPT_INPUT_NB);
return err;
}
- set_irq_type(IRQ_NB, IRQF_TRIGGER_FALLING);
+ set_irq_type(INTERRUPT_INPUT_NB, IRQF_TRIGGER_FALLING);
return 0;
}
static void __exit test_irq_exit(void)
{
- free_irq(IRQ_NB, NULL);
+ free_irq(INTERRUPT_INPUT_NB, NULL);
}
module_init(test_irq_init);
Modified: trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,47 +28,42 @@
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
+#include "../../../common.h"
-
-#define FALSE 0
-#define TRUE 1
-volatile int STOP=FALSE;
-int wait_flag=TRUE;
-void
-action (int signo, siginfo_t * si, void *data)
+int main (int argc, char **argv)
{
- printf (" -------------- Got the %d signal ------------\n", signo);
-}
+ int fd_input,fd_output, retval = 0, iomask=0x00;
-int
-main (int argc, char **argv)
-{
- int fd, res, oflags, retval = 0;
- unsigned int buffer;
-char buf[255];
+ // Open gpio file device for communication;
+ fd_input = open (INTERRUPT_INPUT_DEV, O_RDONLY);
+ if (fd_input < 0) {
+ printf ("Open Failed : %s\n",INTERRUPT_INPUT_DEV);
+ exit (EXIT_FAILURE);
+ }
+ fd_output = open(INTERRUPT_OUTPUT_DEV, O_RDWR);
+ if (fd_output < 0) {
+ printf("Open Failed : %s\n",INTERRUPT_OUTPUT_DEV);
+ exit (EXIT_FAILURE);
+ }
- // Open gpio file device for communication;
- fd = open ("/dev/gpio/PA6", O_RDONLY);
- if (fd < 0)
- {
- printf ("Open Failed\n");
- exit (EXIT_FAILURE);
- }
-
- // set this process as owner of device file
- retval = fcntl (fd, F_SETOWN, getpid ());
- if (retval < 0)
- {
- printf ("F_SETOWN fails \n");
- }
- while (STOP == FALSE)
- {
- usleep (100000);
- res = read (fd, buf, 255);
- printf(".\n");
- buf[res] = 0;
- printf ("%d:%x:%d\n", (int)buf[6],buf, res);
- }
- close (fd);
- exit (EXIT_SUCCESS);
+ // set this process as owner of device file
+ retval = fcntl (fd_input, F_SETOWN, getpid ());
+ if (retval < 0) {
+ printf ("F_SETOWN fails \n");
+ return EXIT_FAILURE;
+ }
+ retval = fcntl(fd_output, F_SETOWN, getpid());
+ if (retval < 0) {
+ printf("F_SETOWN fails for %s\n",INTERRUPT_OUTPUT_DEV);
+ return EXIT_FAILURE;
+ }
+ char c;
+ while (1) {
+ read (fd_input, &c, 1);
+ write(fd_output, &iomask,sizeof(iomask));
+ iomask ^=1;// (iomask == 0x00)?0x01:0x00;
+ }
+ close (fd_input);
+ close (fd_output);
+ exit (EXIT_SUCCESS);
}
Modified: trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,5 +1,6 @@
### List of modules to be build
MODULES= interrupt_xeno_kernel
+XENOMAI=y
ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
Modified: trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -27,41 +27,39 @@
#include <rtdm/rtdm_driver.h>
#include <mach/hardware.h>
#include <native/intr.h>
+#include "../../../common_kernel.h"
-
MODULE_LICENSE("GPL");
-#define IRQ_NUMBER 70 /* Intercept interrupt on portA6 */
-#define TASK_PRIO 99 /* Highest RT priority */
-#define TASK_MODE 0 /* No flags */
-#define TASK_STKSZ 0 /* Stack size (use default one) */
+static RT_INTR intr_desc;
+static int iomask;
-RT_INTR intr_desc;
-
-static int irq_server (xnintr_t *intr) {
- printk("IT !\n");
+static int irq_server (xnintr_t *intr)
+{
+ imx_gpio_set_value(INTERRUPT_OUTPUT_PORT, iomask);
+ iomask^=1;
return RT_INTR_HANDLED;
}
-static int __init irq_init(void) {
+static int __init irq_init(void)
+{
int err;
-
+ iomask = 0x00;
/* Version With 6 param only on kernel space */
- err = rt_intr_create(&intr_desc,"MyIrq", IRQ_NUMBER, irq_server, NULL, 0);
+ err = rt_intr_create(&intr_desc,"MyIrq", INTERRUPT_INPUT_NB, irq_server, NULL, 0);
if (err !=0){
printk("rt_intr_create : error\n");
return err;
}
err = rt_intr_enable(&intr_desc);
- if (err != 0)
- printk("rt_intr_enable : error\n");
- else
+ if (err == 0)
printk("rt_intr_create : ok\n");
return err;
}
-void __init irq_exit(void) {
+void __exit irq_exit(void)
+{
rt_intr_delete(&intr_desc);
}
Modified: trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,5 +1,6 @@
### List of applications to be build
APPLICATIONS = interrupt_xeno_userspace
+XENOMAI=y
### Set of compilation instructions
ARMADEUS_BASE_DIR=../../../../../..
include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -24,63 +24,62 @@
#include <sys/mman.h>
#include <native/task.h>
#include <native/intr.h>
+#include "../../../common.h"
-#define IRQ_NUMBER 70 /* Intercept interrupt on PA6 */
-#define TASK_PRIO 99 /* Highest RT priority */
-#define TASK_MODE 0 /* No flags */
-#define TASK_STKSZ 0 /* Stack size (use default one) */
-
RT_INTR intr_desc;
RT_TASK server_desc;
void cleanup(void);
void irq_server (void *cookie) {
- int err;
- if (rt_intr_enable(&intr_desc) != 0) {
- printf("erreur pour enable\n");
- return;
- }
- for (;;) {
- /* Wait for the next interrupt on channel 70. */
- err = rt_intr_wait(&intr_desc,TM_INFINITE);
- printf("tata plop\n");
- if (err > 0) {
- printf("interrupt retrouvee %d\n",err);
- }
- }
+ int fd ,iomask=0x00;
+ if (rt_intr_enable(&intr_desc) != 0) {
+ printf("Error : enabling IT\n");
+ return;
+ }
+ if ((fd = open(INTERRUPT_OUTPUT_DEV, O_RDWR))<0) {
+ printf("Open error on /dev/gpio/portD\n");
+ return;
+ }
+
+ for (;;) {
+ /* Wait for the next interrupt. */
+ if (rt_intr_wait(&intr_desc,TM_INFINITE) > 0) {
+ write(fd,&iomask,sizeof(iomask));
+ iomask^=1;
+ }
+ }
}
int main (int argc, char *argv[]) {
- int err;
+ int err;
+
+ mlockall(MCL_CURRENT|MCL_FUTURE);
- mlockall(MCL_CURRENT|MCL_FUTURE);
-
- /* Version With 4 param only on userSpace */
- err = rt_intr_create(&intr_desc,"MyIrq",IRQ_NUMBER,0);
- if (err != 0){
- printf("rt_intr_create : error\n");
- return 1;
- } else
- printf("rt_intr_create : ok\n");
-
- err = rt_task_create(&server_desc,
- "MyIrqServer",
- TASK_STKSZ,
- TASK_PRIO,
- TASK_MODE);
- if (err == 0)
- rt_task_start(&server_desc,&irq_server,NULL);
- else{
- printf("rt_task_start : error\n");
- return 1;
- }
- getchar();
- cleanup();
- return 0;
+ /* Version With 4 param only on userSpace */
+ err = rt_intr_create(&intr_desc,"MyIrq",70,0);
+ if (err != 0){
+ printf("rt_intr_create : error\n");
+ return 1;
+ }
+
+ err = rt_task_create(&server_desc,
+ "MyIrqServer",
+ TASK_STKSZ,
+ TASK_PRIO,
+ TASK_MODE);
+ if (err == 0)
+ rt_task_start(&server_desc,&irq_server,NULL);
+ else{
+ printf("rt_task_start : error\n");
+ return 1;
+ }
+ getchar();
+ cleanup();
+ return 0;
}
void cleanup (void) {
- rt_intr_delete(&intr_desc);
- rt_task_delete(&server_desc);
+ rt_intr_delete(&intr_desc);
+ rt_task_delete(&server_desc);
}
Modified: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,10 +28,8 @@
#include <linux/delay.h>
#include <linux/timer.h>
#include <asm/gpio.h>
+#include "../../../../common_kernel.h"
-#define TIMESLEEP 10
-#define MINOR_PORT 4
-
MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
MODULE_DESCRIPTION("sleep kernel test");
MODULE_SUPPORTED_DEVICE("none");
@@ -42,10 +40,11 @@
/* thread fonction */
int fct_thread_sleep(void *data) {
int iomask=1;
+ int timesleep = TIMESLEEP/1000;
do {
- imx_gpio_set_value(MINOR_PORT, iomask);
- iomask^=1;
- msleep(TIMESLEEP);
+ imx_gpio_set_value(PULSE_OUTPUT_PORT, iomask);
+ iomask^=1;
+ msleep(timesleep);
}while (!kthread_should_stop());
return 0;
}
@@ -59,7 +58,7 @@
/* unloading (rmmod) */
-static void __init blink_exit(void) {
+static void __exit blink_exit(void) {
printk(KERN_INFO "blink_exit\n");
kthread_stop(th);
}
Modified: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -29,10 +29,8 @@
#include <linux/delay.h>
#include <linux/timer.h>
#include <asm/gpio.h>
+#include "../../../../common_kernel.h"
-#define TIMESLEEP HZ/100
-#define MINOR_PORT 4
-
MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
MODULE_DESCRIPTION("sleep kernel test");
MODULE_SUPPORTED_DEVICE("none");
@@ -40,12 +38,12 @@
static int iomask = 0x00;
static struct timer_list mt;
-
+#define TS HZ/100
/* timer callback*/
void fonctionTimer(unsigned long arg) {
- imx_gpio_set_value(MINOR_PORT, iomask);
+ imx_gpio_set_value(PULSE_OUTPUT_PORT, iomask);
iomask^=1;
- mt.expires = jiffies+TIMESLEEP;
+ mt.expires = jiffies+TS;
add_timer(&mt);
}
@@ -53,16 +51,17 @@
static int __init blink_init(void) {
current->state = TASK_INTERRUPTIBLE;
init_timer(&mt);
- mt.expires = jiffies + TIMESLEEP;
+ mt.expires = jiffies + TS;
mt.data = (unsigned long) current;
mt.function = fonctionTimer;
add_timer(&mt);
+
printk(KERN_INFO "blink_init\n");
return 0;
}
/* unloading (rmmod) */
-static void __init blink_exit(void) {
+static void __exit blink_exit(void) {
printk(KERN_INFO "blink_exit\n");
del_timer(&mt);
}
Modified: trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,22 +28,22 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
+#include "../../../../common.h"
int main(int argc, char **argv) {
-
- int fd;
- int iomask;
- if ((fd = open("/dev/gpio/PA4", O_RDWR))<0) {
- printf("Open error on /dev/gpio/PA4\n");
- exit(0);
- }
- iomask=0x00;
- printf("Opened on /dev/gpio/PA4\n");
- while(1){
- iomask^=1;
- write(fd,&iomask,sizeof(iomask));
- usleep(10000);
- }
- close(fd);
- exit(0);
+ int fd, iomask;
+ if ((fd = open(PULSE_OUTPUT_DEV, O_RDWR))<0) {
+ printf("Open error on %s\n",PULSE_OUTPUT_DEV);
+ exit(0);
+ }
+ iomask=0x00;
+ printf("Opened on %s\n",PULSE_OUTPUT_DEV);
+
+ while(1){
+ iomask^=1;
+ write(fd,&iomask,sizeof(iomask));
+ usleep(TIMESLEEP);
+ }
+ close(fd);
+ exit(0);
}
Modified: trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -23,34 +23,45 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <signal.h>
#include <sys/types.h>
+#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#include "../../../../common.h"
+int fd;
+int iomask=0x00;
-#define TIMESLEEP 1
-#define PORT "/dev/gpio/PA4"
-
-int fd;
-int iomask;
-void test() {
- printf("hello world\n");
+void test(int signum) {
write(fd, &iomask, sizeof(iomask));
iomask ^=1;
}
int main(int argc, char **argv) {
- fd = open(PORT,O_RDWR);
+ struct sigaction sa;
+ struct itimerval timer;
+
+ fd = open(PULSE_OUTPUT_DEV,O_RDWR);
if (fd < 0) {
printf("open : error\n");
return 1;
}
- iomask = 1;
- do {
- signal(SIGALRM,test);
- alarm(TIMESLEEP);
- pause();
- } while(1);
+
+ /* Install test as the signal handler for SIGVTALRM */
+ memset(&sa, 0,sizeof(sa));
+ sa.sa_handler = &test;
+ sigaction(SIGVTALRM,&sa, NULL);
+ /* Configure the timer to expire after TIMESLEEP msec ... */
+ timer.it_value.tv_sec = 0;
+ timer.it_value.tv_usec = TIMESLEEP;
+ /* ... and every TIMESLEEP msec after that. */
+ timer.it_interval.tv_sec = 0;
+ timer.it_interval.tv_usec = TIMESLEEP;
+ /* Start a virtual timer. It counts down whenever this process is
+ * executing */
+ setitimer(ITIMER_VIRTUAL, &timer, NULL);
+ while(1);
return 0;
}
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,6 +1,6 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_rt_timer
-
+XENOMAI=y
ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
obj-m := $(MODULES).o
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,30 +28,24 @@
#include <mach/hardware.h>
#include <nucleus/types.h>
#include <asm/gpio.h>
+#include "../../../../common_kernel.h"
MODULE_LICENSE("GPL");
RT_TASK blink_task;
static int end = 0;
-#define TIMESLEEP 10000000llu
-#define MINOR_PORT 4
-#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
-#define MXC_DR(x) (0x1c + ((x) << 8))
-#define VA_GPIO_BASE IO_ADDRESS(IMX_GPIO_BASE)
-#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
-
void blink(void *arg){
int err, iomask;
- printk(KERN_INFO "entrering blink\n");
+ printk(KERN_INFO "entering blink\n");
- if (imx_gpio_request(GPIO_PORTA | MINOR_PORT, "blink") < 0) {
- gpio_free(MINOR_PORT);
+ if (imx_gpio_request(PULSE_OUTPUT_PORT, "blink") < 0) {
+ gpio_free(PULSE_OUTPUT_PORT);
return ;
}
- imx_gpio_direction_output(GPIO_PORTA | MINOR_PORT,1);
+ imx_gpio_direction_output(PULSE_OUTPUT_PORT,1);
- if ((err = rt_task_set_periodic(NULL, TM_NOW,rt_timer_ns2ticks(TIMESLEEP)))){
+ if ((err = rt_task_set_periodic(NULL, TM_NOW,rt_timer_ns2ticks(TIMESLEEP*1000)))){
printk("rt task set periodic failed \n");
return;
}
@@ -59,7 +53,7 @@
while(!end){
rt_task_wait_period(NULL);
- imx_gpio_set_value(GPIO_PORTA | MINOR_PORT, iomask);
+ imx_gpio_set_value(PULSE_OUTPUT_PORT, iomask);
iomask^=1;
}
printk("end\n");
@@ -80,12 +74,12 @@
}
/* unloading (rmmod) */
-static void __init blink_exit(void) {
+static void __exit blink_exit(void) {
end = 1;
printk(KERN_INFO "blink_exit\n");
rt_task_delete(&blink_task);
rt_timer_stop();
- gpio_free(MINOR_PORT);
+ gpio_free(PULSE_OUTPUT_PORT);
}
/* API kernel driver */
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,6 +1,6 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_timer
-
+XENOMAI=y
ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
obj-m := $(MODULES).o
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,26 +28,20 @@
#include <rtdm/rtdm_driver.h>
#include <mach/hardware.h>
#include <asm/gpio.h>
+#include "../../../../common_kernel.h"
MODULE_LICENSE("GPL");
static rtdm_task_t blink_task;
-static int end = 0;
+static int volatile end = 0;
-#define TIMESLEEP 5000000
-#define MINOR_PORT 4
-#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
-#define MXC_DR(x) (0x1c + ((x) << 8))
-#define VA_GPIO_BASE IO_ADDRESS(IMX_GPIO_BASE)
-#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
-
void blink(void *arg){
int iomask;
- printk(KERN_INFO "entrering blink\n");
+ printk(KERN_INFO "entering blink\n");
iomask=0;
while(!end){
rtdm_task_wait_period();
- gpio_set_value(MINOR_PORT, iomask);
+ gpio_set_value(PULSE_OUTPUT_PORT, iomask);
iomask^=1;
}
printk("end\n");
@@ -56,21 +50,21 @@
/* module load (insmod) */
static int __init blink_init(void) {
printk(KERN_INFO "blink_init\n");
- if (gpio_request(MINOR_PORT, "blink") < 0) {
- gpio_free(MINOR_PORT);
+ if (gpio_request(PULSE_OUTPUT_PORT, "blink") < 0) {
+ gpio_free(PULSE_OUTPUT_PORT);
return -EBUSY;
}
- gpio_direction_output(MINOR_PORT,1);
+ gpio_direction_output(PULSE_OUTPUT_PORT,1);
return rtdm_task_init(&blink_task, "blink", blink, NULL,
- 99, TIMESLEEP);
+ 99, TIMESLEEP*1000);
}
/* module unload (rmmod) */
-static void __init blink_exit(void) {
+static void __exit blink_exit(void) {
end = 1;
printk(KERN_INFO "blink_exit\n");
- rtdm_task_join_nrt(&blink_task,100);
- gpio_free(MINOR_PORT);
+ rtdm_task_join_nrt(&blink_task,1000);
+ gpio_free(PULSE_OUTPUT_PORT);
}
/* API kernel driver */
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,5 +1,6 @@
### List of applications to be build
-APPLICATIONS = pulse_xeno_userspace_timer
+APPLICATIONS = pulse_xeno_userspace_sleep
+XENOMAI=y
ARMADEUS_BASE_DIR=../../../../../../..
include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -21,29 +21,16 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <linux/ppdev.h>
#include <signal.h>
-#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>
#include <rtdm/rtdm.h>
+#include "../../../../common.h"
RT_TASK blink_task;
int write_fd = -1;
-#define TIMESLEEP 10000000
-#define WRITE_FILE "gpio/PA4"
-
-#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
-
void blink(void *arg){
int iomask;
struct timespec tim = {0,TIMESLEEP};
@@ -51,7 +38,7 @@
iomask=0x00;
while(1){
- rt_dev_write(write_fd,&iomask,sizeof(iomask));
+ write(write_fd,&iomask,sizeof(iomask));
iomask^=1;
if (nanosleep(&tim,NULL) != 0) {
printf("erreur de usleep\n");
@@ -74,8 +61,8 @@
/* Ouverture du descripteur de fichier */
- if ((write_fd = rt_dev_open(WRITE_FILE, 0)) < 0) {
- printf("Cannot open /dev/%s\n",WRITE_FILE);
+ if ((write_fd = open(PULSE_OUTPUT_DEV, O_WRONLY)) < 0) {
+ printf("Cannot open /dev/%s\n",PULSE_OUTPUT_DEV);
return 1;
}
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile 2009-04-06 15:09:50 UTC (rev 1202)
@@ -1,5 +1,6 @@
### List of applications to be build
APPLICATIONS = pulse_xeno_userspace_timer
+XENOMAI=y
ARMADEUS_BASE_DIR=../../../../../../..
include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c 2009-04-06 07:20:11 UTC (rev 1201)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c 2009-04-06 15:09:50 UTC (rev 1202)
@@ -28,29 +28,24 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-#include <linux/ppdev.h>
#include <signal.h>
#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>
+#include "../../../../common.h"
RT_TASK blink_task;
-#define TIMESLEEP 10000000
-#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
-
-/* Revoir en se basant sur cross-link.c */
-
void blink(void *arg){
int fd, iomask;
- if ((fd = open("/dev/gpio/PA4", O_RDWR))<0) {
- printf("Open error on /dev/gpio/portD\n");
+ if ((fd = open(PULSE_OUTPUT_DEV, O_RDWR))<0) {
+ printf("Open error on %s\n",PULSE_OUTPUT_DEV);
exit(0);
}
iomask=0x00;
- rt_task_set_periodic(NULL, TM_NOW, TIMESLEEP);
+ rt_task_set_periodic(NULL, TM_NOW, TIMESLEEP*1000);
while(1){
rt_task_wait_period(NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-04-06 07:20:14
|
Revision: 1201
http://armadeus.svn.sourceforge.net/armadeus/?rev=1201&view=rev
Author: gwenhael
Date: 2009-04-06 07:20:11 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
[BUILDROOT] Temporary patch to avoid freeze when using gpio_set_value
Modified Paths:
--------------
trunk/buildroot/package/xenomai/xenomai.mk
Added Paths:
-----------
trunk/buildroot/package/xenomai/02-xenomai-imx_gpio_set_value_inline.patch
Added: trunk/buildroot/package/xenomai/02-xenomai-imx_gpio_set_value_inline.patch
===================================================================
--- trunk/buildroot/package/xenomai/02-xenomai-imx_gpio_set_value_inline.patch (rev 0)
+++ trunk/buildroot/package/xenomai/02-xenomai-imx_gpio_set_value_inline.patch 2009-04-06 07:20:11 UTC (rev 1201)
@@ -0,0 +1,17 @@
+--- a/arch/arm/mach-imx/include/mach/gpio.h 2009-04-03 15:28:59.000000000 +0200
++++ b/arch/arm/mach-imx/include/mach/gpio.h 2009-04-03 15:29:11.000000000 +0200
+@@ -28,14 +28,10 @@
+
+ static inline void imx_gpio_set_value_inline(unsigned gpio, int value)
+ {
+- unsigned long flags;
+-
+- raw_local_irq_save(flags);
+ if(value)
+ DR(gpio >> GPIO_PORT_SHIFT) |= (1 << (gpio & GPIO_PIN_MASK));
+ else
+ DR(gpio >> GPIO_PORT_SHIFT) &= ~(1 << (gpio & GPIO_PIN_MASK));
+- raw_local_irq_restore(flags);
+ }
+
+ static inline void imx_gpio_set_value(unsigned gpio, int value)
Modified: trunk/buildroot/package/xenomai/xenomai.mk
===================================================================
--- trunk/buildroot/package/xenomai/xenomai.mk 2009-04-03 16:52:18 UTC (rev 1200)
+++ trunk/buildroot/package/xenomai/xenomai.mk 2009-04-06 07:20:11 UTC (rev 1201)
@@ -42,6 +42,8 @@
$(ADEOS_SOURCE)
toolchain/patch-kernel.sh $(LINUX26_DIR) package/xenomai \
01-adeos-$(ADEOS_VERSION)-imx_compatibility.patch
+ toolchain/patch-kernel.sh $(LINUX26_DIR) package/xenomai \
+ 02-xenomai-imx_gpio_set_value_inline.patch
touch $@
$(XENOMAI_DIR)/.unpacked: $(DL_DIR)/$(XENOMAI_SOURCE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2009-04-03 16:52:28
|
Revision: 1200
http://armadeus.svn.sourceforge.net/armadeus/?rev=1200&view=rev
Author: FabM
Date: 2009-04-03 16:52:18 +0000 (Fri, 03 Apr 2009)
Log Message:
-----------
[U-BOOT] Release FPGA_RESET at the end of configuration, wait for DONE to stop toggling clock and ignore firmware size
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf27/apf27.h
trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch
Added Paths:
-----------
trunk/buildroot/target/u-boot/u-boot-1.3.4-320-spartan.patch
Modified: trunk/buildroot/target/device/armadeus/apf27/apf27.h
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/apf27.h 2009-04-03 16:28:17 UTC (rev 1199)
+++ trunk/buildroot/target/device/armadeus/apf27/apf27.h 2009-04-03 16:52:18 UTC (rev 1200)
@@ -545,8 +545,7 @@
#define CFG_ENV_RANGE 0X00060000 /* 384kB ( 3 flash blocks ) */
#define CONFIG_ENV_OVERWRITE 1 /* env is writable now */
#define CONFIG_FIRMWARE_OFFSET 0x00100000
-//#define CONFIG_FIRMWARE_LEN 0x00080000 /* 512kB ( 4 flash blocks ) */
-#define CONFIG_FIRMWARE_LEN 0x000249F0 /* 150kB for 200k*/
+#define CONFIG_FIRMWARE_LEN 0x00080000 /* 512kB ( 4 flash blocks ) */
#define CONFIG_KERNEL_OFFSET 0x00180000
#define CONFIG_KERNEL_LEN 0x00500000 /* 5.0MB */
#define CONFIG_ROOTFS_OFFSET 0x00680000
Modified: trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch
===================================================================
--- trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch 2009-04-03 16:28:17 UTC (rev 1199)
+++ trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch 2009-04-03 16:52:18 UTC (rev 1200)
@@ -417,11 +417,11 @@
+ {
+ PRINTF ("%s:%d: FPGA POST ", __FUNCTION__, __LINE__);
+
-+ GPIO_CLEAR(CFG_FPGA_RESET);
+ imx_gpio_mode (CFG_FPGA_RW | GPIO_PF | GPIO_PUEN);
+ imx_gpio_mode (CFG_FPGA_CS | GPIO_PF | GPIO_PUEN);
+ imx_gpio_mode (CFG_FPGA_CLK | GPIO_PF | GPIO_PUEN);
+ GPIO_SET(CFG_FPGA_PRG);
++ GPIO_CLEAR(CFG_FPGA_RESET);
+ imx_gpio_mode (CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ return cookie;
+ }
Added: trunk/buildroot/target/u-boot/u-boot-1.3.4-320-spartan.patch
===================================================================
--- trunk/buildroot/target/u-boot/u-boot-1.3.4-320-spartan.patch (rev 0)
+++ trunk/buildroot/target/u-boot/u-boot-1.3.4-320-spartan.patch 2009-04-03 16:52:18 UTC (rev 1200)
@@ -0,0 +1,34 @@
+diff -purN /home/fabien/apf27/buildroot/project_build_armv5te/apf27/u-boot-1.3.4/common/spartan3.c /home/fabien/tmp/spartan3.c
+--- ref/u-boot-1.3.4/common/spartan3.c 2006-11-02 15:15:01.000000000 +0100
++++ u-boot-1.3.4/common/spartan3.c 2006-11-25 22:48:54.000000000 +0100
+@@ -220,7 +220,7 @@ static int Spartan3_sp_load (Xilinx_desc
+ (*fn->clk) (TRUE, TRUE, cookie); /* Assert the clock pin */
+
+ /* Load the data */
+- while (bytecount < bsize) {
++ while ( (*fn->done) (cookie) == FPGA_FAIL){
+ /* XXX - do we check for an Ctrl-C press in here ??? */
+ /* XXX - Check the error bit? */
+
+@@ -230,8 +230,8 @@ static int Spartan3_sp_load (Xilinx_desc
+ CONFIG_FPGA_DELAY ();
+ (*fn->clk) (TRUE, TRUE, cookie); /* Assert the clock pin */
+
+-#ifdef CFG_FPGA_CHECK_BUSY
+ ts = get_timer (0); /* get current time */
++#ifdef CFG_FPGA_CHECK_BUSY
+ while ((*fn->busy) (cookie)) {
+ /* XXX - we should have a check in here somewhere to
+ * make sure we aren't busy forever... */
+@@ -248,6 +248,11 @@ static int Spartan3_sp_load (Xilinx_desc
+ }
+ }
+ #endif
++ if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
++ puts ("** Timeout waiting for BUSY to clear.\n");
++ (*fn->abort) (cookie); /* abort the burn */
++ return FPGA_FAIL;
++ }
+
+ #ifdef CFG_FPGA_PROG_FEEDBACK
+ if (bytecount % (bsize / 40) == 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2009-04-03 16:28:25
|
Revision: 1199
http://armadeus.svn.sourceforge.net/armadeus/?rev=1199&view=rev
Author: thom25
Date: 2009-04-03 16:28:17 +0000 (Fri, 03 Apr 2009)
Log Message:
-----------
[LINUX] add DVI/HDMI hot plug management
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-03 11:41:47 UTC (rev 1198)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-03 16:28:17 UTC (rev 1199)
@@ -5,7 +5,7 @@
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-03-20 09:21:52.000000000 +0100
-@@ -0,0 +1,1306 @@
+@@ -0,0 +1,1379 @@
+ /*
+ * apf27.c
+ *
@@ -158,7 +158,6 @@
+
+#ifdef CONFIG_VIDEO_AD9889
+#define AD9889_INT 15
-+
+static int ad9889_pins[] = {
+ (GPIO_PORTC | GPIO_IN | GPIO_GPIO | AD9889_INT),
+};
@@ -174,9 +173,79 @@
+ return 0;
+}
+
++struct ad9889_fb_data {
++ struct fb_var_screeninfo var;
++ int PA31_GIUS_old_state;
++};
++
++static struct ad9889_fb_data apf27_ad9889_fb_data;
++extern void acquire_console_sem(void);
++extern void release_console_sem(void);
++
++static void ad9889_display_connected(void)
++{
++ struct fb_var_screeninfo temp_var;
++ struct fb_info *info = registered_fb[0];
++ extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var);
++
++ apf27_ad9889_fb_data.PA31_GIUS_old_state = 0;
++ /* make sure the LCD OE_ACD pin is correctly configured*/
++ if( __raw_readl(VA_GPIO_BASE + MXC_GIUS(0)) & 0x80 == 0x80){
++ apf27_ad9889_fb_data.PA31_GIUS_old_state = 1;
++ mxc_gpio_mode( PA31_PF_OE_ACD );
++ }
++
++ /*save old FB params */
++ memcpy( &apf27_ad9889_fb_data.var, &info->var, sizeof(struct fb_var_screeninfo));
++ memcpy( &temp_var, &info->var, sizeof(struct fb_var_screeninfo));
++
++ /* set new FB params */
++ temp_var.xres = 640;
++ temp_var.yres = 480;
++ temp_var.pixclock = 37538;
++ temp_var.left_margin = 0x2f;
++ temp_var.right_margin = 0x2f; /* at least 3 & 1 */
++ temp_var.upper_margin = 0x21;
++ temp_var.lower_margin = 0xa;
++ temp_var.hsync_len = 0x3f;
++ temp_var.vsync_len = 0x2,
++ temp_var.sync = FB_SYNC_OE_ACT_HIGH;
++ temp_var.vmode = FB_VMODE_NONINTERLACED,
++ temp_var.nonstd = 0;
++
++ acquire_console_sem();
++ /* tel the FB client that params have been changed */
++ info->flags |= FBINFO_MISC_USEREVENT;
++ /* set new params */
++ fb_set_var(info, &temp_var);
++ info->flags &= ~FBINFO_MISC_USEREVENT;
++ release_console_sem();
++}
++
++static void ad9889_display_disconnected(void)
++{
++ struct fb_info *info = registered_fb[0];
++
++ /* restoree LCD OE_ACD pin */
++ if( apf27_ad9889_fb_data.PA31_GIUS_old_state )
++ mxc_gpio_mode(GPIO_PORTA | 31 | GPIO_OUT| GPIO_GPIO);
++
++ /*restore old FB params */
++ acquire_console_sem();
++ /* inform the console that the FB params have been changed */
++ info->flags |= FBINFO_MISC_USEREVENT;
++ /* set new params */
++ fb_set_var(info, &apf27_ad9889_fb_data.var);
++ info->flags &= ~FBINFO_MISC_USEREVENT;
++ release_console_sem();
++}
++
+static struct ad9889_config apf27_ad9889_config = {
+ .init = ad9889_init,
+ .exit = ad9889_exit,
++ .display_connected = ad9889_display_connected,
++ .display_disconnected = ad9889_display_disconnected,
++ .data = &apf27_ad9889_fb_data,
+ .EDID_I2C_addr = 0x3f
+};
+
@@ -379,8 +448,12 @@
+#else
+ PA30_PF_CONTRAST,
+#endif
-+// PA31_PF_OE_ACD, /* For LQ043 OE_ACD is used as LCD Display ON/OFF */
++ /* For LQ043 OE_ACD is used as LCD Display ON/OFF */
++#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+ (GPIO_PORTA | 31 | GPIO_OUT| GPIO_GPIO)
++#else
++ PA31_PF_OE_ACD
++#endif
+};
+
+static int apf27_fb_init(struct platform_device *pdev)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-04-03 11:41:55
|
Revision: 1198
http://armadeus.svn.sourceforge.net/armadeus/?rev=1198&view=rev
Author: gwenhael
Date: 2009-04-03 11:41:47 +0000 (Fri, 03 Apr 2009)
Log Message:
-----------
[LINUX] Adding configuration gpio interrupt edges
Modified Paths:
--------------
trunk/target/linux/modules/gpio/core.c
Modified: trunk/target/linux/modules/gpio/core.c
===================================================================
--- trunk/target/linux/modules/gpio/core.c 2009-04-03 10:56:38 UTC (rev 1197)
+++ trunk/target/linux/modules/gpio/core.c 2009-04-03 11:41:47 UTC (rev 1198)
@@ -30,6 +30,7 @@
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/interrupt.h> /* request_irq */
+#include <linux/irq.h> /* set_irq_type */
#include <asm/gpio.h> /* imx_gpio_... */
#include <linux/cdev.h> /* struct cdev */
#include <mach/hardware.h>
@@ -175,6 +176,7 @@
int port;
int nb_pins;
int number;
+ unsigned char irq_value;
u32 pin_mask;
u32 oe_mask;
@@ -193,8 +195,10 @@
#ifdef CONFIG_ARCH_IMX
static unsigned int shadows_irq[NB_PORTS] = { 0, 0, 0, 0 };
+static unsigned int shadows_irq2[NB_PORTS] = { 0, 0, 0, 0 };
#else
static unsigned int shadows_irq[NB_PORTS] = { 0, 0, 0, 0, 0, 0 };
+static unsigned int shadows_irq2[NB_PORTS] = { 0, 0, 0, 0, 0, 0 };
#endif
@@ -202,13 +206,14 @@
static void __exit armadeus_gpio_cleanup(void);
-static int toString(unsigned long value, char* buffer, int number_of_bits)
+static int toString(unsigned long value, char* buffer, int number_of_bits, int base)
{
- static int i;
+ static int i,j;
+ char mask = 0x01|base;
/* convert it into a string */
- for (i = number_of_bits; i > 0; i--) {
- buffer[number_of_bits-i]=test_bit(i-1,&value)?'1':'0';
+ for (j=(base*number_of_bits)-(base), i = number_of_bits; i > 0; i--,j-=base) {
+ buffer[number_of_bits-i]=((value >> j)&mask)+'0';
}
buffer[number_of_bits] = '\n';
@@ -218,7 +223,7 @@
}
/* Convert binary string ("010011") to int. Don't care of non '0' / '1' chars */
-static unsigned long fromString(char* buffer, int number_of_bits)
+static unsigned long fromString(char* buffer, int number_of_bits, int base)
{
int i, j;
unsigned long ret_val=0;
@@ -228,19 +233,29 @@
for ( i=0, j=1; j<=number_of_bits; i++) {
//printk("%x j=%d i=%d\n", buffer[i], j, i);
if (buffer[i] == '\0') break; /* EOC */
-
- if (buffer[i] == '0' || buffer[i] == '1') {
- ret_val <<= 1;
- if (buffer[i] == '1') {
- ret_val |= 1;
- }
- j++;
- }
+
+ ret_val <<= base;
+ ret_val |=(buffer[i]-'0')&0xff;
+ j++;
}
return ret_val;
}
+/* Return the interrupt config for a pin */
+static unsigned char getIrqFromPin(int num_pin, int num_port)
+{
+ unsigned long shad;
+ int portSize = number_of_pins[num_port];
+ if (num_pin < (portSize/2)) {
+ shad = shadows_irq2[num_port];
+ } else {
+ shad = shadows_irq[num_port];
+ num_pin-=(portSize/2);
+ }
+ return shad >> (/*portSize-2-*/(2*num_pin))& 3;
+}
+
/*
* Low level functions
*/
@@ -460,18 +475,21 @@
struct gpio_item *gpio = dev_id;
u32 old_state, new_state;
- printk("IT for pin %d %d\n", gpio->port, gpio->number);
-
+// printk("IT for pin %d %d\n", gpio->port, gpio->number);
+
old_state = gpio->pin_state;
new_state = gpio_get_value(gpio->port|gpio->number);
gpio->pin_state = new_state;
-
- if (new_state != old_state) {
+
+ if ((gpio->irq_value != (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) || new_state != old_state) {
gpio->changed = 1;
wake_up_interruptible(&gpio->change_wq);
if (gpio->async_queue)
kill_fasync(&gpio->async_queue, SIGIO, POLL_IN);
+ if (gpio->irq_value == (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)){
+ set_irq_type(irq, ((gpio->pin_state)?IRQF_TRIGGER_FALLING:IRQF_TRIGGER_RISING));
+ }
}
return IRQ_HANDLED;
@@ -534,12 +552,25 @@
}
/* Request interrupt if pin was configured for */
- if (shadows_irq[gpio->port] & (1 << gpio->number)) {
+ gpio->irq_value = getIrqFromPin(gpio->number,gpio->port);
+
+ if (gpio->irq_value) {
irq = IRQ_GPIOA(minor); /* irq number are continuous */
ret = request_irq(irq, armadeus_gpio_interrupt, 0, "gpio", gpio);
if (ret)
goto err_irq;
- /* set_irq_type( irq, IRQF_TRIGGER_FALLING ); TDBJUJU */
+ switch (gpio->irq_value) {
+ case (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING):
+ ;
+ case IRQF_TRIGGER_RISING:
+ set_irq_type(irq, IRQF_TRIGGER_RISING);
+ break;
+ case IRQF_TRIGGER_FALLING:
+ set_irq_type(irq, IRQF_TRIGGER_FALLING);
+ break;
+ case IRQF_TRIGGER_NONE:
+ break;
+ }
}
success:
@@ -564,7 +595,7 @@
unsigned int irq;
if (gpio->initialized) {
- if (shadows_irq[gpio->port] & (1 << gpio->number) ) {
+ if (gpio->irq_value) {
irq = IRQ_GPIOA(minor);
free_irq(irq, gpio);
}
@@ -656,7 +687,7 @@
int buffer_length, int *eof, __attribute__ ((unused)) void *data)
{
int len = 0; /* The number of bytes actually used */
- unsigned int port_status = 0x66;
+ unsigned int port_status = 0x66, port_status2 = 0x66;
unsigned int port_ID = 0;
struct gpio_settings *settings = (struct gpio_settings *) data;
@@ -694,6 +725,7 @@
case INTERRUPT:
port_status = shadows_irq[port_ID];
+ port_status2 = shadows_irq2[port_ID];
printk("interrupt\n");
break;
@@ -702,9 +734,18 @@
break;
}
/* Put result to given chr buffer */
- len = toString(port_status, buffer, number_of_pins[port_ID]);
- printk("0x%08x\n", port_status);
+ if (settings->type != INTERRUPT){
+ len = toString(port_status, buffer, number_of_pins[port_ID], 1);
+ } else {
+ len = toString(port_status, buffer, number_of_pins[port_ID]/2, 2);
+ len += toString(port_status2, buffer+len-1, number_of_pins[port_ID]/2, 2);
+ }
+ printk("0x%08x", port_status);
+ if (settings->type == INTERRUPT)
+ printk("0x%08x", port_status2);
+ printk("\n");
+
*eof = 1;
up(&gpio_sema);
@@ -717,7 +758,7 @@
static int armadeus_gpio_proc_write( __attribute__ ((unused)) struct file *file, const char *buf, unsigned long count, __attribute__ ((unused)) void* data)
{
int len;
- unsigned int gpio_state;
+ unsigned int gpio_state=0, gpio_state2=0;
unsigned int port_ID = 0;
struct gpio_settings *settings = (struct gpio_settings *) data;
@@ -750,7 +791,12 @@
if (strlen(new_gpio_state) > 0) {
/* Convert it from String to Int */
- gpio_state = fromString( new_gpio_state, number_of_pins[port_ID] );
+ if (settings->type != INTERRUPT)
+ gpio_state = fromString( new_gpio_state, number_of_pins[port_ID], 1);
+ else {
+ gpio_state = fromString(new_gpio_state, number_of_pins[port_ID]/2, 2);
+ gpio_state2 = fromString(new_gpio_state+(number_of_pins[port_ID]/2), (number_of_pins[port_ID]/2), 2);
+ }
switch( settings->type )
{
@@ -770,6 +816,7 @@
case INTERRUPT:
shadows_irq[port_ID] = gpio_state;
+ shadows_irq2[port_ID] = gpio_state2;
printk("interrupt\n");
break;
@@ -778,8 +825,13 @@
break;
}
- printk("/proc wrote 0x%x on %s %s register\n", gpio_state,
- port_name[port_ID], port_setting_name[settings->type]);
+ if (settings->type != INTERRUPT)
+ printk("/proc wrote 0x%x", gpio_state);
+ else
+ printk("/proc wrote 0x%x 0x%x",gpio_state, gpio_state2);
+ printk(" on %s %s register\n", port_name[port_ID],
+ port_setting_name[settings->type]);
+
}
up(&gpio_sema);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2009-04-03 10:56:55
|
Revision: 1197
http://armadeus.svn.sourceforge.net/armadeus/?rev=1197&view=rev
Author: thom25
Date: 2009-04-03 10:56:38 +0000 (Fri, 03 Apr 2009)
Log Message:
-----------
[LINUX] first DVI image
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/314-apf27-armadeus-ad9889.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/314-apf27-armadeus-ad9889.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/314-apf27-armadeus-ad9889.patch 2009-04-01 12:58:20 UTC (rev 1196)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/314-apf27-armadeus-ad9889.patch 2009-04-03 10:56:38 UTC (rev 1197)
@@ -1,6 +1,6 @@
--- linux-2.6.27.13.orig/drivers/media/video/ad9889.c 2008-10-10 00:13:53.000000000 +0200
+++ linux-2.6.27.13/drivers/media/video/ad9889.c 2009-03-01 08:29:01.000000000 +0100
-@@ -0,0 +1,411 @@
+@@ -0,0 +1,509 @@
+/*
+ * ad9889 - Analog Devices AD9889 video encoder driver
+ *
@@ -33,9 +33,8 @@
+#include <media/v4l2-i2c-drv.h>
+#include <media/ad9889.h>
+#include <linux/interrupt.h>
-+//#include <linux/fb.h>
+#include <linux/delay.h>
-+
++#include <linux/proc_fs.h>
+#define HPD_INT 0x80
+#define MSEN_INT 0x40
+#define VS_INT 0x20
@@ -43,358 +42,457 @@
+#define ITU656_ERR_INT 0x08
+#define EDID_RDY_INT 0x04
+
-+static int video_in_format;
-+static int debug;
++/*static int dvi_mode;*/
+
+MODULE_DESCRIPTION("Analog Devices AD9889 video encoder driver");
+MODULE_AUTHOR("Nicolas Colombain");
+MODULE_LICENSE("GPL");
-+module_param(video_in_format, int, 0644);
-+module_param(debug, int, 0644);
-+MODULE_PARM_DESC(debug, "debug");
-+MODULE_PARM_DESC(video_in_format, "video in format");
++/*module_param(dvi_mode, int, 0644);
++MODULE_PARM_DESC(dvi_mode, "debug");
++*/
+
++struct proc_dir_entry *proc_read, *proc_write;
+
+struct ad9889_dev {
-+ struct mutex lock_sync;
-+ unsigned char edid_ready;
-+ int edid_block_map_offset;
-+ int next_segment;
++ struct mutex lock_sync;
++ unsigned char edid_ready;
++ int edid_block_map_offset;
++ int next_segment;
+
-+ struct i2c_client *client;
-+ int force_hpd;
-+ struct work_struct work;
-+ struct i2c_client *edid_ram;
++ struct i2c_client *client;
++ int force_hpd;
++ struct work_struct work;
++ struct i2c_client *edid_ram;
++ int current_reg_addr;
+};
+
+static int ad9889_read(struct i2c_client *client, u8 reg)
+{
-+ return i2c_smbus_read_byte_data(client, reg);
++ return i2c_smbus_read_byte_data(client, reg);
+}
+
+static int ad9889_write(struct i2c_client *client, u8 reg, u8 val)
+{
-+ int i;
++ int i;
+
-+ for (i = 0; i < 3; i++) {
-+ if (i2c_smbus_write_byte_data(client, reg, val) == 0)
-+ return 0;
-+ }
-+ printk(KERN_ERR "I2C Write Problem\n");
-+ return -1;
++ for (i = 0; i < 3; i++) {
++ if (i2c_smbus_write_byte_data(client, reg, val) == 0)
++ return 0;
++ }
++ printk(KERN_ERR "I2C Write Problem\n");
++ return -1;
+}
+
++
++static void dump(struct i2c_client *client)
++{
++ int j,i = 0;
++ do
++ {
++ for (j=0; j<4; j++){
++ printk("%x: %x\t\t",i, ad9889_read(client, i));
++ i++;
++ }
++ printk("\n");
++ }
++ while( i<0xcf );
++}
++
+static void ad9889_av_mute_on(struct i2c_client *client)
+{
-+ /* set chxPwrDwnI2C */
-+ ad9889_write(client, 0xa1, 0x38);
-+ /* set avmute*/
-+ ad9889_write(client, 0x45, 0x40);
++ /* set chxPwrDwnI2C */
++ ad9889_write(client, 0xa1, 0x38);
++ /* set avmute*/
++ ad9889_write(client, 0x45, 0x40);
+}
+
+static void ad9889_av_mute_off(struct i2c_client *client)
-+{
-+ /* clear chxPwrDwnI2C */
-+ ad9889_write(client, 0xa1, 0x0);
-+ /* clear avmute*/
-+ ad9889_write(client, 0x45, 0x80);
++{
++ /* clear chxPwrDwnI2C */
++ ad9889_write(client, 0xa1, 0x0);
++ /* clear avmute*/
++ ad9889_write(client, 0x45, 0x80);
+}
+
-+
++
+static void ad9889_init(struct i2c_client *client)
+{
-+ ad9889_av_mute_on(client);
-+ /* enable I2S0 and I2S standard format*/
-+ ad9889_write(client, 0x0c, 0x04);
-+ /* power up */
-+ ad9889_write(client, 0x41, 0x10);
++ ad9889_av_mute_on(client);
++ /* disable I2S0 and I2S standard format*/
++ ad9889_write(client, 0x0c, 0x00);
++ /* power up */
++ ad9889_write(client, 0x41, 0x10);
+
-+ /* set static reserved registers*/
-+ ad9889_write(client,0x0a, 0);
-+ ad9889_write(client, 0x98, 0x03);
-+ ad9889_write(client, 0x9C, 0x38);
-+ /* set low speed pixel clock */
-+ ad9889_write(client, 0xA2, 0x84);
-+ ad9889_write(client, 0xA3, 0x84);
++ /* set static reserved registers*/
++ ad9889_write(client,0x0a, 0);
++ ad9889_write(client, 0x98, 0x07);
++ ad9889_write(client, 0x9C, 0x38);
++ ad9889_write(client, 0x9d, 0x61);
++ ad9889_write(client, 0x9f, 0x70);
++ /* set low speed pixel clock */
++ ad9889_write(client, 0xA2, 0x87);
++ ad9889_write(client, 0xA3, 0x87);
+
-+ ad9889_write(client, 0xBB, 0xff);
++ ad9889_write(client, 0xBB, 0xff);
+
-+ /* set capture edge */
-+ ad9889_write(client, 0xba, 0x60);
-+ ad9889_write(client, 0x47, 0x80);
++ /* set capture edge */
++ ad9889_write(client, 0xba, 0x60);
++ ad9889_write(client, 0x47, 0x80);
+}
+
+static void setup_audio_video(struct i2c_client *client)
+{
-+ unsigned char rgb_rgb[24] = {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0};
-+
-+ /* dvi*/
-+ ad9889_write(client, 0xaf, 0x00);
-+ /* write color map */
-+ i2c_smbus_write_block_data(client, 0x18,24,rgb_rgb);
-+ /* set CSC mode 1*/
-+ ad9889_write(client, 0x17, 0x08);
-+ /* enable CSC */
-+ ad9889_write(client, 0x3b, 0x01);
-+ /* check input mode */
-+ if( (ad9889_read(client, 0x3E)>>2) == 1)
-+ printk("640x480 input mode detected\n");
-+ else
-+ printk(KERN_ERR "input mode not supported, must be 640x480\n");
++ unsigned char rgb_rgb[24] = {0x07, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0x07,
++ 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0x07, 0xff, 0, 0};
++ /* dvi */
++ ad9889_write(client, 0xaf, 0x04);
++ /* write color map */
++ i2c_smbus_write_block_data(client, 0x17,24,rgb_rgb);
++ /* set CSC mode */
++ ad9889_write(client, 0x17, 0x08);
++ /* disable CSC */
++ ad9889_write(client, 0x3b, 0x01);
++ /* check input mode */
++ if( (ad9889_read(client, 0x3E)>>2) != 1)
++ printk(KERN_ERR "input mode not supported, must be 640x480\n");
++ /* picture aspec ratio */
++ ad9889_write(client, 0x46, 0x04);
+}
+
+/* Returns the number of read bytes */
+int EDID_ram_read_data(struct i2c_client *client, u8 *values)
+{
-+ union i2c_smbus_data data;
-+ struct ad9889_config* config = client->dev.platform_data;
-+ struct ad9889_dev *ad9889 = i2c_get_clientdata(client);
-+ int status, i;
++ union i2c_smbus_data data;
++ struct ad9889_config* config = client->dev.platform_data;
++ struct ad9889_dev *ad9889 = i2c_get_clientdata(client);
++ int status, i;
+
-+ /* EDID ram base address */
-+ ad9889_write(client, 0x43, config->EDID_I2C_addr<<1);
++ /* EDID ram base address */
++ ad9889_write(client, 0x43, config->EDID_I2C_addr<<1);
+
-+ for( i=0; i<256/I2C_SMBUS_BLOCK_MAX; i++){
-+ data.block[0] = I2C_SMBUS_BLOCK_MAX;
-+ status = i2c_smbus_xfer(ad9889->edid_ram->adapter, config->EDID_I2C_addr,
-+ ad9889->edid_ram->flags,
-+ I2C_SMBUS_READ, i*32,
-+ I2C_SMBUS_I2C_BLOCK_DATA, &data);
-+ if (status < 0)
-+ return status;
-+ memcpy(&(values[i*32]), &data.block[1], data.block[0]);
-+ }
-+ return 0;
++ for( i=0; i<256/I2C_SMBUS_BLOCK_MAX; i++){
++ data.block[0] = I2C_SMBUS_BLOCK_MAX;
++ status = i2c_smbus_xfer(ad9889->edid_ram->adapter, config->EDID_I2C_addr,
++ ad9889->edid_ram->flags,
++ I2C_SMBUS_READ, i*32,
++ I2C_SMBUS_I2C_BLOCK_DATA, &data);
++ if (status < 0)
++ return status;
++ memcpy(&(values[i*32]), &data.block[1], data.block[0]);
++ }
++ return 0;
+}
+
+int handle_edid_interrupt(struct i2c_client *client)
+{
-+ unsigned char edid_dat[256];
-+ struct i2c_client temp_ram_client;
-+
-+ if( EDID_ram_read_data(client, edid_dat) < 0 )
-+ printk(KERN_ERR "error when reading EDID\n");
-+ else{
-+ int i;
-+ int xwidth;
-+ int aspect;
-+ int freq;
-+
-+ //printk("ESTABLISHED TIMING\n");
-+ //edid_dat[35];
-+ //edid_dat[36];
-+
-+ printk("Standard monitor timings\n");
-+ for(i=38; i<53; i+=2 ) {
-+ xwidth = edid_dat[i]*8 + 248;
-+ aspect = (edid_dat[i+1] & 0xC0) >> 6;
-+ freq = (edid_dat[i+1] &0x3f) +60;
-+ printk("xwidth:%d, aspect:%s, freq:%d\n", xwidth, aspect?"4:3":"16/9", freq);
-+ }
-+ }
-+ return 0;
++ unsigned char edid_dat[256];
++
++ if( EDID_ram_read_data(client, edid_dat) < 0 )
++ printk(KERN_ERR "error when reading EDID\n");
++ else{
++/* int i;
++ int xwidth;
++ int aspect;
++ int freq; */
++ /* check if the display is able to do 640x480 @60Hz */
++ if( !(edid_dat[35] & 0x20) )
++ printk(KERN_ERR "connected display does not support 640x480 mode\n");
++/* printk("Standard monitor timings\n");
++ for(i=38; i<53; i+=2 ) {
++ xwidth = edid_dat[i]*8 + 248;
++ aspect = (edid_dat[i+1] & 0xC0) >> 6;
++ freq = (edid_dat[i+1] &0x3f) +60;
++ printk("xwidth:%d, aspect:%s, freq:%d\n", xwidth, aspect?"4:3":"16/9", freq);
++ } */
++ }
++ return 0;
+}
+
+static void handle_hpd_interrupt(struct i2c_client *client)
+{
-+ if(ad9889_read(client, 0x42)&0x40) {
-+ /* wait until the cable is really inserted */
-+ mdelay(500);
-+ /* set chxPwrDwnI2C down */
-+ ad9889_write(client, 0xa1, 0x38);
-+ /* power up chip */
-+ ad9889_write(client, 0x41, 0x10);
-+ ad9889_write(client, 0x94, 0x84);
-+ ad9889_write(client, 0x95, 0xC3);
-+ }
++ struct ad9889_config *pdata = client->dev.platform_data;
++ if(ad9889_read(client, 0x42)&0x40) {
++ /* wait until the cable is really inserted */
++ mdelay(500);
++ /* set chxPwrDwnI2C down */
++ ad9889_write(client, 0xa1, 0x38);
++ /* power up chip */
++ ad9889_write(client, 0x41, 0x10);
++ ad9889_write(client, 0x94, 0x84);
++ ad9889_write(client, 0x95, 0xC3);
++ if(pdata->display_connected)
++ pdata->display_connected();
++ }
++ else{
++ if(pdata->display_disconnected)
++ pdata->display_disconnected();
++ }
+}
+
+static void ad9889_work(struct work_struct *work)
+{
-+ struct ad9889_dev *ad9889 = container_of(work, struct ad9889_dev, work);
-+ struct i2c_client *client = ad9889->client;
-+ int error;
++ struct ad9889_dev *ad9889 = container_of(work, struct ad9889_dev, work);
++ struct i2c_client *client = ad9889->client;
++ unsigned char interrupt_registers1;
++ unsigned char interrupt_registers2;
++ unsigned char interrupt_code = 0;
++ unsigned char interrupt_remain1 = 0xff;
++ unsigned char interrupt_remain2 = 0xff;
+
-+ unsigned char interrupt_registers1;
-+ unsigned char interrupt_registers2;
-+ unsigned char interrupt_code = 0;
-+ unsigned char interrupt_remain1 = 0xff;
-+ unsigned char interrupt_remain2 = 0xff;
++ mutex_lock(&ad9889->lock_sync);
+
-+ mutex_lock(&ad9889->lock_sync);
++ while((interrupt_remain1&0xC4)|(interrupt_remain2&0xc0)){
++ interrupt_registers1 = ad9889_read(client, 0x96);
++ interrupt_registers2 = ad9889_read(client, 0x97);
+
-+ while((interrupt_remain1&0xC4)|(interrupt_remain2&0xc0)){
-+ interrupt_registers1 = ad9889_read(client, 0x96);
-+ interrupt_registers2 = ad9889_read(client, 0x97);
-+ printk("interrupt reg1 %x, interrupt reg2 %x\n",
-+ interrupt_registers1, interrupt_registers2);
-+
-+ /* check HPD then call hpd handler */
-+ if((interrupt_registers1 & HPD_INT) || ad9889->force_hpd ) {
-+ handle_hpd_interrupt(client);
-+ ad9889->edid_ready = 0;
-+ ad9889->edid_block_map_offset = 0;
-+ if( ad9889->force_hpd ){
-+ ad9889->force_hpd = 0;
-+ ad9889_write(client,0x96, HPD_INT);
-+ interrupt_registers1 |= HPD_INT;
-+ }
-+ interrupt_code |= HPD_INT;
-+ }
-+
-+ /* check for EDID ready flag, then call EDID Handler */
-+ if((interrupt_registers1 & EDID_RDY_INT)) {
-+ if(!ad9889->edid_ready) {
-+ ad9889->next_segment = handle_edid_interrupt(client);
-+ interrupt_code |= EDID_RDY_INT;
-+ }
-+ }
-+
-+ /* re-enable the interrupt before requesting additional EDID */
-+ ad9889_write(client,0x96, interrupt_registers1);
-+ ad9889_write(client, 0x97, interrupt_registers2);
++ /* check HPD then call hpd handler */
++ if((interrupt_registers1 & HPD_INT) || ad9889->force_hpd ) {
++ handle_hpd_interrupt(client);
++ ad9889->edid_ready = 0;
++ ad9889->edid_block_map_offset = 0;
++ if( ad9889->force_hpd ){
++ ad9889->force_hpd = 0;
++ ad9889->edid_ready = 0;
++ ad9889_write(client,0x96, HPD_INT);
++ interrupt_registers1 |= HPD_INT;
++ }
++ interrupt_code |= HPD_INT;
++ }
+
-+ /* if final EDID interrupt was processed tell system that EDID is ready and
-+ initiate audio video setup */
-+
-+ if(interrupt_code&EDID_RDY_INT) {
-+ if(ad9889->next_segment==0) {
-+ ad9889_av_mute_on(client);
-+ ad9889_init(client);
-+ ad9889->edid_ready = 1;
-+ setup_audio_video(client);
-+ ad9889_av_mute_off(client);
-+ }
-+ else
-+ ad9889_write(client,0xc4, ad9889->edid_block_map_offset+ad9889->next_segment);
-+
-+ if(ad9889->next_segment==0x40)
-+ ad9889->edid_block_map_offset=0x40;
-+ }
-+ /*Check if additional interrupts occured during processing*/
-+ interrupt_remain1 = ad9889_read(client, 0x96);
-+ interrupt_remain2 = ad9889_read(client, 0x97);
-+ }
-+ mutex_unlock(&ad9889->lock_sync);
++ /* check for EDID ready flag, then call EDID Handler */
++ if((interrupt_registers1 & EDID_RDY_INT)) {
++ if(!ad9889->edid_ready) {
++ ad9889->next_segment = handle_edid_interrupt(client);
++ interrupt_code |= EDID_RDY_INT;
++ }
++ }
++
++ /* re-enable the interrupt before requesting additional EDID */
++ ad9889_write(client,0x96, interrupt_registers1);
++ ad9889_write(client, 0x97, interrupt_registers2);
++
++ /* if final EDID interrupt was processed tell system that EDID is ready and
++ initiate audio video setup */
++
++ if(interrupt_code&EDID_RDY_INT) {
++ if(ad9889->next_segment==0) {
++ ad9889_av_mute_on(client);
++ ad9889_init(client);
++ ad9889->edid_ready = 1;
++ setup_audio_video(client);
++ ad9889_av_mute_off(client);
++ }
++ else
++ ad9889_write(client,0xc4, ad9889->edid_block_map_offset+ad9889->next_segment);
++
++ if(ad9889->next_segment==0x40)
++ ad9889->edid_block_map_offset=0x40;
++ }
++ /*Check if additional interrupts occured during processing*/
++ interrupt_remain1 = ad9889_read(client, 0x96);
++ interrupt_remain2 = ad9889_read(client, 0x97);
++ }
++ mutex_unlock(&ad9889->lock_sync);
+}
+
+/* ad9889 has new data for us available. */
+static irqreturn_t ad9889_handler(int irq, void *dev_id)
+{
-+ struct ad9889_dev *dev = (struct ad9889_dev *) dev_id;
-+ schedule_work(&dev->work);
-+ return IRQ_HANDLED;
++ struct ad9889_dev *dev = (struct ad9889_dev *) dev_id;
++ schedule_work(&dev->work);
++ return IRQ_HANDLED;
+}
+
++static int ad9889_proc_read_register( __attribute__ ((unused)) struct file *file, const char *buf, unsigned long count, void *data)
++{
++ int len;
++ char given_param[16];
++ u8 reg_addr;
++ u8 reg_val;
++ struct i2c_client *i2c_client = data;
++ struct ad9889_dev *ad9889 = i2c_get_clientdata(i2c_client);
++
++ if (count <= 0) {
++ printk("Empty string transmitted !\n");
++ return 0;
++ }
++ if (count > 4) {
++ len = 4;
++ printk("Only 4x[0-9] decimal values supported !\n");
++ } else
++ len = count;
++
++ if (copy_from_user(given_param, buf, len))
++ return -EFAULT;
++
++ reg_addr = (u8)(simple_strtol(given_param, 0, 16));
++ ad9889->current_reg_addr = reg_addr;
++ reg_val = ad9889_read(i2c_client, reg_addr);
++ printk("Read 0x%02x @ 0x%02x\n", reg_val, reg_addr);
++
++ return len;
++}
++
++static int ad9889_proc_write_register( __attribute__ ((unused)) struct file *file, const char *buf, unsigned long count, void *data)
++{
++ int len, ret;
++ char given_param[16];
++ u8 reg_val;
++ struct i2c_client *i2c_client = data;
++ struct ad9889_dev *ad9889 = i2c_get_clientdata(i2c_client);
++
++ if (count <= 0) {
++ printk("Empty string transmitted !\n");
++ return 0;
++ }
++ if (count > 4) {
++ len = 4;
++ printk("Only 4x[0-9] decimal values supported !\n");
++ } else
++ len = count;
++
++ if (copy_from_user(given_param, buf, len))
++ return -EFAULT;
++
++ reg_val = ad9889_read(i2c_client, ad9889->current_reg_addr);
++ printk("Read 0x%02x @ 0x%02x\n", reg_val, ad9889->current_reg_addr);
++
++ reg_val = (u8)(simple_strtol(given_param, 0, 16));
++ printk("Writing+ 0x%02x @ 0x%02x\n", reg_val, ad9889->current_reg_addr);
++ ret = ad9889_write(i2c_client, ad9889->current_reg_addr, reg_val);
++ udelay(100);
++ if (ret) {
++ printk("Error while writing\n");
++ }
++
++ return len;
++}
++
+static int ad9889_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
-+ struct ad9889_config *pdata = client->dev.platform_data;
-+ struct ad9889_dev *ad9889;
-+ int err = -EINVAL;
++ struct ad9889_config *pdata = client->dev.platform_data;
++ struct ad9889_dev *ad9889;
++ int err = -EINVAL;
+
-+ /* Check if the adapter supports the needed features */
-+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-+ return -EIO;
++ /* Check if the adapter supports the needed features */
++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
++ return -EIO;
+
-+ if (!pdata) {
-+ printk(KERN_ERR "AD9889: Platform data not supplied\n");
-+ return -ENOENT;
-+ }
++ if (!pdata) {
++ printk(KERN_ERR "AD9889: Platform data not supplied\n");
++ return -ENOENT;
++ }
+
-+ if (!client->irq) {
-+ printk(KERN_ERR "AD9889: Invalid irq value\n");
-+ return -ENOENT;
-+ }
++ if (!client->irq) {
++ printk(KERN_ERR "AD9889: Invalid irq value\n");
++ return -ENOENT;
++ }
+
-+ ad9889 = kzalloc(sizeof(struct ad9889_dev), GFP_KERNEL);
++ ad9889 = kzalloc(sizeof(struct ad9889_dev), GFP_KERNEL);
+
-+ if (ad9889 == NULL)
-+ return -ENOMEM;
++ if (ad9889 == NULL)
++ return -ENOMEM;
+
-+ ad9889->client = client;
-+ i2c_set_clientdata(client, ad9889);
++ /* create proc files */
++ proc_read = create_proc_entry( "driver/ad9889read", S_IWUSR | S_IRGRP | S_IROTH, NULL);
++ proc_write = create_proc_entry( "driver/ad9889write", S_IWUSR | S_IRGRP | S_IROTH, NULL);
++ if ((proc_read == NULL) || (proc_write == NULL)) {
++ printk(KERN_ERR ": Could not register one /proc file. Terminating\n");
++ err = -ENOMEM;
++ goto err_proc;
++ } else {
++ proc_read->write_proc = ad9889_proc_read_register;
++ proc_read->data = client;
++ proc_write->write_proc = ad9889_proc_write_register;
++ proc_write->data = client;
++ }
+
-+ INIT_WORK(&ad9889->work, ad9889_work);
-+ mutex_init(&ad9889->lock_sync);
-+ mutex_lock(&ad9889->lock_sync);
++ ad9889->client = client;
++ i2c_set_clientdata(client, ad9889);
+
++ INIT_WORK(&ad9889->work, ad9889_work);
++ mutex_init(&ad9889->lock_sync);
++ mutex_lock(&ad9889->lock_sync);
+
-+ /* allocate GPIO / IRQ if necessary */
-+ if (pdata->init)
-+ pdata->init();
++ /* allocate GPIO / IRQ if necessary */
++ if (pdata->init)
++ pdata->init();
+
-+ if (request_irq(client->irq, ad9889_handler, IRQF_DISABLED | IRQF_SHARED
-+ | IRQF_TRIGGER_FALLING, "ad9889", ad9889)) {
-+ printk(KERN_ERR "Could not allocate touchscreen IRQ (n %d)\n", client->irq);
-+ err = -EINVAL;
-+ goto err_irq;
++ if (request_irq(client->irq, ad9889_handler, IRQF_DISABLED | IRQF_SHARED
++ | IRQF_TRIGGER_FALLING, "ad9889", ad9889)) {
++ printk(KERN_ERR "Could not allocate touchscreen IRQ (n %d)\n", client->irq);
++ err = -EINVAL;
++ goto err_irq;
+ }
+
-+ printk("detecting ad9889 client on address 0x%x\n", client->addr << 1);
-+
+ /* check whether the AD9889 is present */
-+ if( ad9889_read(client, 0xA5) != 0x04 ){
-+ printk("ad9889 not found\n");
-+ err = -ENODEV;
-+ goto err_presence;
-+ }
++ if( ad9889_read(client, 0xA5) != 0x04 ){
++ printk("ad9889 not found\n");
++ err = -ENODEV;
++ goto err_presence;
++ }
+
-+ ad9889->edid_ram = i2c_new_dummy(client->adapter, pdata->EDID_I2C_addr);
-+ if( !ad9889->edid_ram ){
-+ printk("error: can't add i2c device at 0x%x\n", pdata->EDID_I2C_addr);
-+ goto err_presence;
-+ }
++ ad9889->edid_ram = i2c_new_dummy(client->adapter, pdata->EDID_I2C_addr);
++ if( !ad9889->edid_ram ){
++ printk("error: can't add i2c device at 0x%x\n", pdata->EDID_I2C_addr);
++ goto err_presence;
++ }
+
-+ printk("ad9889 detected!\n");
-+ /* reset */
-+ ad9889_write(client, 0x41, 0X20);
-+ mdelay(10);
++ printk("ad9889 detected at address 0x%x!\n", client->addr << 1);
++ /* reset */
++ ad9889_write(client, 0x41, 0X60);
++ mdelay(10);
+
-+ mutex_unlock(&ad9889->lock_sync);
++ mutex_unlock(&ad9889->lock_sync);
+
-+ /* if a monitor is already connected, then simulate interrupt */
-+ err = ad9889_read(client, 0x42);
-+ if( err & 0x40){
-+ ad9889->force_hpd = 1;
-+ schedule_work(&ad9889->work);
-+ }
++ /* if a monitor is already connected, then simulate interrupt */
++ err = ad9889_read(client, 0x42);
++ if( err & 0x40){
++ /* power up */
++ ad9889->force_hpd = 1;
++ schedule_work(&ad9889->work);
++ }
+
-+ return 0;
++ return 0;
+
+err_presence:
-+ free_irq(client->irq, ad9889);
++ kfree(ad9889);
++ free_irq(client->irq, ad9889);
+
+err_irq:
-+ flush_scheduled_work();
-+ kfree(i2c_get_clientdata(client));
-+ if (pdata->exit)
-+ pdata->exit();
++ flush_scheduled_work();
++ kfree(i2c_get_clientdata(client));
++ if (pdata->exit)
++ pdata->exit();
+
-+ return 0;
++err_proc:
++ kfree(ad9889);
++
++ return 0;
+}
+
+/* ----------------------------------------------------------------------- */
+
+static int ad9889_remove(struct i2c_client *client)
+{
-+ struct ad9889_config *pdata = client->dev.platform_data;
-+ struct ad9889_dev *ad9889 = i2c_get_clientdata(client);
++ struct ad9889_config *pdata = client->dev.platform_data;
++ struct ad9889_dev *ad9889 = i2c_get_clientdata(client);
+
-+ free_irq(client->irq, ad9889);
++ free_irq(client->irq, ad9889);
+
-+ flush_scheduled_work();
++ flush_scheduled_work();
+
-+ if (pdata->exit)
-+ pdata->exit();
++ if (pdata->exit)
++ pdata->exit();
+
-+ i2c_unregister_device(ad9889->edid_ram);
++ i2c_unregister_device(ad9889->edid_ram);
+
-+ kfree(i2c_get_clientdata(client));
-+ kfree(ad9889);
++ kfree(i2c_get_clientdata(client));
++ kfree(ad9889);
+
-+ mutex_unlock(&ad9889->lock_sync);
-+ return 0;
++ mutex_unlock(&ad9889->lock_sync);
++ return 0;
+}
+
+/* ----------------------------------------------------------------------- */
@@ -406,15 +504,15 @@
+MODULE_DEVICE_TABLE(i2c, ad9889_id);
+
+static struct v4l2_i2c_driver_data v4l2_i2c_data = {
-+ .name = "ad9889",
++ .name = "ad9889",
+ //.command = ad9889_command,
-+ .probe = ad9889_probe,
-+ .remove = ad9889_remove,
-+ .id_table = ad9889_id,
++ .probe = ad9889_probe,
++ .remove = ad9889_remove,
++ .id_table = ad9889_id,
+};
--- linux-2.6.27.13.orig/include/media/ad9889.h 2008-10-10 00:13:53.000000000 +0200
+++ linux-2.6.27.13/include/media/ad9889.h 2009-03-01 08:29:01.000000000 +0100
-@@ -0,0 +1,33 @@
+@@ -0,0 +1,34 @@
+/*
+ * AD9889 driver
+ *
@@ -441,9 +539,10 @@
+struct ad9889_config {
+ int (*init)(void);
+ int (*exit)(void);
++ void (*display_connected)(void);
++ void (*display_disconnected)(void);
++ void* data;
+ unsigned char EDID_I2C_addr; /*base address of the EDID ram*/
-+ unsigned char high_speed_clock; /* set to 1 if pixel clock >80MHz */
-+ unsigned char edge_capture; /* set to 1 for positive pixel clock capture*/
+};
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2009-04-01 13:23:09
|
Revision: 1195
http://armadeus.svn.sourceforge.net/armadeus/?rev=1195&view=rev
Author: FabM
Date: 2009-04-01 12:15:33 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
[LINUX][APF27] toggling fpga_reset pin to '1' when fpga is configured. Changing default firmware lenght in uboot variables
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf27/apf27.h
trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch
Modified: trunk/buildroot/target/device/armadeus/apf27/apf27.h
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/apf27.h 2009-03-31 10:25:07 UTC (rev 1194)
+++ trunk/buildroot/target/device/armadeus/apf27/apf27.h 2009-04-01 12:15:33 UTC (rev 1195)
@@ -545,7 +545,8 @@
#define CFG_ENV_RANGE 0X00060000 /* 384kB ( 3 flash blocks ) */
#define CONFIG_ENV_OVERWRITE 1 /* env is writable now */
#define CONFIG_FIRMWARE_OFFSET 0x00100000
-#define CONFIG_FIRMWARE_LEN 0x00080000 /* 512kB ( 4 flash blocks ) */
+//#define CONFIG_FIRMWARE_LEN 0x00080000 /* 512kB ( 4 flash blocks ) */
+#define CONFIG_FIRMWARE_LEN 0x000249F0 /* 150kB for 200k*/
#define CONFIG_KERNEL_OFFSET 0x00180000
#define CONFIG_KERNEL_LEN 0x00500000 /* 5.0MB */
#define CONFIG_ROOTFS_OFFSET 0x00680000
Modified: trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch
===================================================================
--- trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch 2009-03-31 10:25:07 UTC (rev 1194)
+++ trunk/buildroot/target/u-boot/u-boot-1.3.4-310-apf27.patch 2009-04-01 12:15:33 UTC (rev 1195)
@@ -200,7 +200,7 @@
+CONFIG_NAND_U_BOOT = y
--- ref/u-boot-1.3.4/board/armadeus/apf27/fpga.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.4/board/armadeus/apf27/fpga.c 2008-12-29 16:27:49.000000000 +0100
-@@ -0,0 +1,255 @@
+@@ -0,0 +1,257 @@
+ /*
+ * (C) Copyright 2002-2008
+ * Eric Jarrige <eri...@ar...>
@@ -243,7 +243,6 @@
+ #define GPIO_WRITE(x,y) ( y ? GPIO_SET(x) : GPIO_CLEAR(x) )
+ #define GPIO_READ(x) ((SSR (GPIO_PORT(x)) & (1<<(x & GPIO_PIN_MASK)))>> \
+ (x & GPIO_PIN_MASK))
-+
+ #ifdef FPGA_DEBUG
+ #define PRINTF(fmt,args...) printf (fmt ,##args)
+ #else
@@ -294,6 +293,7 @@
+ imx_gpio_mode (CFG_FPGA_RW | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ imx_gpio_mode (CFG_FPGA_CS | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ imx_gpio_mode (CFG_FPGA_SUSPEND | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
++ GPIO_SET(CFG_FPGA_RESET);
+ imx_gpio_mode (CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ imx_gpio_mode (CFG_FPGA_PWR | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ GPIO_SET(CFG_FPGA_PRG);
@@ -301,7 +301,7 @@
+ GPIO_SET(CFG_FPGA_RW);
+ GPIO_SET(CFG_FPGA_CS);
+ GPIO_CLEAR(CFG_FPGA_SUSPEND);
-+ GPIO_CLEAR(CFG_FPGA_RESET);
++// GPIO_CLEAR(CFG_FPGA_RESET);
+ GPIO_CLEAR(CFG_FPGA_PWR);
+
+ return cookie;
@@ -417,10 +417,12 @@
+ {
+ PRINTF ("%s:%d: FPGA POST ", __FUNCTION__, __LINE__);
+
++ GPIO_CLEAR(CFG_FPGA_RESET);
+ imx_gpio_mode (CFG_FPGA_RW | GPIO_PF | GPIO_PUEN);
+ imx_gpio_mode (CFG_FPGA_CS | GPIO_PF | GPIO_PUEN);
+ imx_gpio_mode (CFG_FPGA_CLK | GPIO_PF | GPIO_PUEN);
+ GPIO_SET(CFG_FPGA_PRG);
++ imx_gpio_mode (CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ return cookie;
+ }
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2009-04-01 13:22:31
|
Revision: 1196
http://armadeus.svn.sourceforge.net/armadeus/?rev=1196&view=rev
Author: FabM
Date: 2009-04-01 12:58:20 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
[LINUX] Rise fpga_reset when FPGA is configured
Modified Paths:
--------------
trunk/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
Modified: trunk/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c 2009-04-01 12:15:33 UTC (rev 1195)
+++ trunk/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c 2009-04-01 12:58:20 UTC (rev 1196)
@@ -33,11 +33,11 @@
#define CFG_FPGA_PRG (GPIO_PORTF | 11) /* FPGA prog pin */
#define CFG_FPGA_CLK (GPIO_PORTF | 15) /* FPGA clk pin */
#define CFG_FPGA_INIT (GPIO_PORTF | 12) /* FPGA init pin */
-#define CFG_FPGA_DONE (GPIO_PORTF | 9) /* FPGA done pin */
-#define CFG_FPGA_RW (GPIO_PORTF | 21) /* FPGA done pin */
-#define CFG_FPGA_CS (GPIO_PORTF | 22) /* FPGA done pin */
+#define CFG_FPGA_DONE (GPIO_PORTF | 9) /* FPGA done pin */
+#define CFG_FPGA_RW (GPIO_PORTF | 21) /* FPGA done pin */
+#define CFG_FPGA_CS (GPIO_PORTF | 22) /* FPGA done pin */
#define CFG_FPGA_SUSPEND (GPIO_PORTF | 10) /* FPGA done pin */
-#define CFG_FPGA_RESET (GPIO_PORTF | 7) /* FPGA done pin */
+#define CFG_FPGA_RESET (GPIO_PORTF | 7) /* FPGA done pin */
static void __iomem *fpga_addr;
@@ -64,6 +64,7 @@
mxc_gpio_mode(CFG_FPGA_SUSPEND | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
mxc_gpio_mode(CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ gpio_set_value(CFG_FPGA_RESET,1);
gpio_set_value(CFG_FPGA_PWR, 0);
fpga_addr = ioremap( FPGA_BASE_ADDR, 16);
if( fpga_addr == NULL )
@@ -140,6 +141,7 @@
mxc_gpio_mode (CFG_FPGA_CS | GPIO_PF | GPIO_PUEN);
mxc_gpio_mode (CFG_FPGA_CLK | GPIO_PF | GPIO_PUEN);
gpio_set_value(CFG_FPGA_PRG, 1);
+ gpio_set_value(CFG_FPGA_RESET,0);
iounmap(fpga_addr);
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-31 10:25:21
|
Revision: 1194
http://armadeus.svn.sourceforge.net/armadeus/?rev=1194&view=rev
Author: artemys
Date: 2009-03-31 10:25:07 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
[LINUX] Add 2.6.29 Linux patches (copies from 2.6.27)
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/015-armadeus-logo-add_armadeus-project_tux.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/018-armadeus-i2c-imx-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/018-armadeus-i2c-imx.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/021-armadeus-apf9328_defconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/023-armadeus-fblcd-kconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/024-armadeus-apf9328-add_board_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-add_USB_registers.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-imx-add_USB_ressources.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-imx_udc-add_clock.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-imx_udc-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-imx_udc-change_source_sink_in_gadget_zero.to_fix
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-armadeus-imx_udc-deactivate_cdc_in_ether_c.to_fix
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/030-mike_lee-original_imx_udc.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/031-armadeus-updates_imx-udc_driver_for_new_kernels.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/040-armadeus-imx_mmc.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/040-armadeus-imxmmc-add_controller_driven_card_detection.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/040-armadeus-imxmmc-correct_some_freezes.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/041-armadeus-imx_irq.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/050-armadeus-add_custom_drivers_to_kconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/063-armadeus-max1027-add_max1027_include.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/072-armadeus-add_backlight_machinfo_to_imxfb_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/073-armadeus-tsc2102_integrate_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/074-armadeus-tsc2102-touchscreen-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/074-armadeus-tsc2102-touchscreen.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/075-armadeus-spi2-reg-irq-defines.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/076-arm-vmlinux-ld_script_patch_for_new_binutils.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/077-arm-checksyscalls.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/078-armadeus-set_imx_fb_info-sectio-mismatch.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/088-can-mcp2515.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/090-armadeus-alsa-create_imx-alsa_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/092-armadeus-alsa-imx-ssi-tsc2102-integrate_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/093-armadeus-add_ssi_registers_definition.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/094-armadeus-rtc1374-legacy.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/095-armadeus-imx-ssi-add_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/096-armadeus-clock-add_ssi_clk.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/097-armadeus-imx-dma-improvements.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/098-armadeus-imx-dma-announce_imx_is_supporting_scatter_gather.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/220-apf27-pengu-fec-old.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/226-apf27-pengu-mx27-Camera_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/227-apf27-pengu-mx27-Add_simple_CPU_frequency_scaling_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/230-apf27-pengu-mx2_devices_full.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/231-apf27-pengu-mxc_i2c_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/233-apf27-pengu-mx2_framebuffer_beta.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/234-apf27-armadeus-mx2_framebuffer_beta_update_for_2_6_27.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/235-apf27-pengu-make_pcm038_full_featured.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/235-apf27-pengu-pcm038-add_BSP_part_of_the_CPU_frequency_scaler.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/237-apf27-pengu-pcm970-Extend_to_current_development_status.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/238-apf27-pengu-mx27-Add_an_ALSA_driver_for_iMX27.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/238-apf27-pengu-pcm038-Add_ALSA_audio_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/239-apf27-armadeus-alsa-remove_mc13783_from_mx27_snd_driver_compilation.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/240-apf27-armadeus-fixe-bugs-drivers_mxc_nand.c.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/252-apf27-pengu-m27-we_can_do_DMA_chaining.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/256-apf27-pengu-mx27-Add_USB_resources_and_platform_devices.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/257-apf27-pengu-mx27-Add_EHCI_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/260-apf27-pengu-imxmmc-checkpatch_cleanup.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/261-apf27-pengu-imxmmc-remove_unused_variables.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/262-apf27-pengu-imxmmc-use_readl_writel.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/263-apf27-pengu-imxmmc-use_ioresource_to_specify_DMA_request.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/264-apf27-pengu-imxmmc-cleanup_DMA_handling.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/265-apf27-pengu-imxmmc-make_platform_data_mandatory.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/266-apf27-pengu-imxmmc-add_platform_specific_init_exit_functions.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/267-apf27-pengu-imxmmc-remove_remaining_platform_specific_setup.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/268-apf27-pengu-imxmmc-add_mx2_mx3_support.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/269-apf27-pengu-imxmmc-use_clock_provided_from_platform_data.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/270-apf27-armadeus-imxmmc-add_sdhc1_resources_to_arch_arm_mach-mx2_device.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/271-apf27-armadeus-imxmmc-add_missing_definitions_in_dma-mx1-mx2_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/273-apf27-armadeus-imxmmc-create_arch_arm_plat-mxc_include_mach_mmc_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/274-apf27-armadeus-imxmmc-correct_imxmmc_driver.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/275-apf27-armadeus-imxmmc-add_missing_registers_to_imxmmc_h.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/276-apf27-armadeus-imxmmc-allow_kconfig_selection_of_imxmmc_driver_for_mxc_platform_too.as_reference
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/280-apf27-armadeus-correct_bugs_in_clock_infrastructure.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/282-apf27-armadeus-add_apf27_to_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/283-apf27-armadeus-add_dump_uart_registers_function_to_imx_serial_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/285-apf27-armadeus-add_LQO43_to_mxcfb_modedb.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/286-apf27-armadeus-add_LQO57_to_mxcfb_modedb.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/287-apf27-armadeus-fix_usb_otg_int.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/288-apf27-set-ttySMX-ref-imx-uart.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/290-apf27-pengu-spi_addons.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-add_debug_support_with_UART1.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/292-apf27-armadeus-i2c-fix.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/293-apf27-armadeus-spi_imx-add_gpio_init_and_iMX27_support.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294-apf27-armadeus-imxfb-create_imx_fb_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/294b-apf27-armadeus-imxfb-create_imxfb_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/295-apf27-armadeus-imxfb-modify_imxfb_device_name_for_freescale_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/296-apf27-armadeus-imx27-usb-host1.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/297-apf27-armadeus-add_backlight_machinfo_to_plat_mxc_imxfb_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/297-apf27-armadeus-add_ethernet_PHY.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/299-apf27-armadeus-reboot.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/300-apf27-armadeus-jffs2_debug.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/301-apf27-armadeus-ssi-SSI1_TXD_is_an_ouput_not_an_input.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/302-apf27-armadeus-add_imx-alsa_h_to_plat-mxc_include_mach.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/303-apf27-armadeus-improve_mx2-dam_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/304-apf27-armadeus-improve_mx2-ssi_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/305-apf27-armadeus-separates_imx_and_mx2_alsa_build.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/310-apf27-armadeus-nfc-makes_it_compile_with_CONFIG_PM.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/311-apf27-armadeus-mx27-add_pm_infra.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/312-apf27-armadeus-ulpi-add_function_control_register_address.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/314-apf27-armadeus-ad9889.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/315-apf27-darius-mxc-watchdog.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/316-apf27-armadeus-watchdog-makes_darius_driver_work_on_mx27.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/317-apf27-armadeus-add_kconfig_option_to_use_imx_led_and_switch_for_powermanagement_test.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/318-apf27-pengu-mxc_add_vpu_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/convert_patches_to_p1.sh
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/013-armadeus-imxfb-improvements.patch 2009-03-31 10:25:07 UTC (rev 1194)
@@ -0,0 +1,309 @@
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
+--- linux-2.6.27.2.original/drivers/video/imxfb.c
++++ linux-2.6.27.2.mod/drivers/video/imxfb.c
+@@ -42,22 +42,48 @@
+ */
+ #define DEBUG_VAR 1
+
+-#include "imxfb.h"
++struct imxfb_info {
++ struct device *dev;
+
+-static struct imxfb_rgb def_rgb_16 = {
+- .red = { .offset = 8, .length = 4, },
+- .green = { .offset = 4, .length = 4, },
+- .blue = { .offset = 0, .length = 4, },
+- .transp = { .offset = 0, .length = 0, },
+-};
++ u_int max_bpp;
++ u_int max_xres;
++ u_int max_yres;
++
++ /*
++ * These are the addresses we mapped
++ * the framebuffer memory region to.
++ */
++ dma_addr_t map_dma;
++ u_char * map_cpu;
++ u_int map_size;
++
++ u_char * screen_cpu;
++ dma_addr_t screen_dma;
++ u_int palette_size;
++
++ dma_addr_t dbar1;
++ dma_addr_t dbar2;
++
++ u_int pcr;
++ u_int pwmr;
++ u_int lscr1;
++ u_int dmacr;
++ u_int cmap_inverse:1,
++ cmap_static:1,
++ unused:30;
+
+-static struct imxfb_rgb def_rgb_8 = {
+- .red = { .offset = 0, .length = 8, },
+- .green = { .offset = 0, .length = 8, },
+- .blue = { .offset = 0, .length = 8, },
+- .transp = { .offset = 0, .length = 0, },
++ void (*lcd_power)(int);
++ void (*backlight_power)(int);
+ };
+
++#define IMX_NAME "IMX"
++
++/*
++ * Minimum X and Y resolutions
++ */
++#define MIN_XRES 64
++#define MIN_YRES 64
++
+ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info);
+
+ static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
+@@ -152,7 +178,6 @@
+ imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ {
+ struct imxfb_info *fbi = info->par;
+- int rgbidx;
+
+ if (var->xres < MIN_XRES)
+ var->xres = MIN_XRES;
+@@ -165,27 +190,39 @@
+ var->xres_virtual = max(var->xres_virtual, var->xres);
+ var->yres_virtual = max(var->yres_virtual, var->yres);
+
++ memset(&var->transp, 0, sizeof(var->transp));
++
+ pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel);
+ switch (var->bits_per_pixel) {
+- case 16:
+- rgbidx = RGB_16;
+- break;
+ case 8:
+- rgbidx = RGB_8;
++ var->red.length = var->bits_per_pixel;
++ var->red.offset = 0;
++ var->green.length = var->bits_per_pixel;
++ var->green.offset = 0;
++ var->blue.length = var->bits_per_pixel;
++ var->blue.offset = 0;
++ break;
++ case 16:
++ if (fbi->pcr & PCR_TFT) {
++ var->red.length = 5;
++ var->red.offset = 11;
++ var->green.length = 6;
++ var->green.offset = 5;
++ var->blue.length = 5;
++ var->blue.offset = 0;
++ } else {
++ var->red.length = 4;
++ var->red.offset = 8;
++ var->green.length = 4;
++ var->green.offset = 4;
++ var->blue.length = 4;
++ var->blue.offset = 0;
++ }
+ break;
+ default:
+- rgbidx = RGB_16;
++ return -EINVAL;
+ }
+
+- /*
+- * Copy the RGB parameters for this display
+- * from the machine specific parameters.
+- */
+- var->red = fbi->rgb[rgbidx]->red;
+- var->green = fbi->rgb[rgbidx]->green;
+- var->blue = fbi->rgb[rgbidx]->blue;
+- var->transp = fbi->rgb[rgbidx]->transp;
+-
+ pr_debug("RGBT length = %d:%d:%d:%d\n",
+ var->red.length, var->green.length, var->blue.length,
+ var->transp.length);
+@@ -248,10 +285,11 @@
+
+ LCDC_RMCR = RMCR_LCDC_EN;
+
+- if(fbi->backlight_power)
+- fbi->backlight_power(1);
+ if(fbi->lcd_power)
+ fbi->lcd_power(1);
++ /* enable backlight after LCD */
++ if(fbi->backlight_power)
++ fbi->backlight_power(1);
+ }
+
+ static void imxfb_disable_controller(struct imxfb_info *fbi)
+@@ -312,6 +350,7 @@
+ pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
+ var->yres, var->vsync_len,
+ var->upper_margin, var->lower_margin);
++ pr_debug("var: bpp=%d\n", var->bits_per_pixel);
+
+ #if DEBUG_VAR
+ if (var->xres < 16 || var->xres > 1024)
+@@ -349,10 +388,17 @@
+ VCR_V_WAIT_2(var->lower_margin);
+
+ LCDC_SIZE = SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres);
+- LCDC_PCR = fbi->pcr;
+- LCDC_PWMR = fbi->pwmr;
+- LCDC_LSCR1 = fbi->lscr1;
+- LCDC_DMACR = fbi->dmacr;
++ // On TFT LCD i.MXL can support 16, 12, 8, 4bpp with the same hardware interface (12 to 16 bits)
++ // So if userspace app wants a 8bpp screen switch to 8bpp (can save ressources, with SDL for ex)
++ if( (var->bits_per_pixel == 8) && (fbi->pcr & PCR_TFT) )
++ {
++ pr_debug("Switching imxfb to 8bpp\n");
++ LCDC_PCR = (fbi->pcr & (~PCR_BPIX_MASK)) | PCR_BPIX_8 | PCR_END_BYTE_SWAP;
++ }
++ else
++ LCDC_PCR = fbi->pcr;
++
++ LCDC_VPW = VPW_VPW(var->xres * var->bits_per_pixel / 8 / 4);
+
+ return 0;
+ }
+@@ -391,7 +437,26 @@
+ case 1:
+ imx_gpio_mode(PD15_PF_LD0);
+ }
++#ifdef CONFIG_MACH_APF9328
++ /* initialize standard GPIOs */
++ imx_gpio_mode(PD6_PF_LSCLK);
++ imx_gpio_mode(PD14_PF_FLM_VSYNC);
++ imx_gpio_mode(PD13_PF_LP_HSYNC);
++// imx_gpio_mode(PD12_PF_ACD_OE);
+
++ /* if != 0 */
++ if( fbi->pwmr ) {
++ imx_gpio_mode(PD11_PF_CONTRAST);
++ }
++
++ /* sharp display specific */
++ if( fbi->pcr & PCR_SHARP ) {
++ imx_gpio_mode(PD10_PF_SPL_SPR);
++ imx_gpio_mode(PD7_PF_REV);
++ imx_gpio_mode(PD8_PF_CLS);
++ imx_gpio_mode(PD9_PF_PS);
++ }
++#else
+ /* initialize GPIOs */
+ imx_gpio_mode(PD6_PF_LSCLK);
+ imx_gpio_mode(PD11_PF_CONTRAST);
+@@ -406,6 +471,7 @@
+ imx_gpio_mode(PD9_PF_PS);
+ imx_gpio_mode(PD10_PF_SPL_SPR);
+ }
++#endif //CONFIG_MACH_APF9328
+ }
+
+ #ifdef CONFIG_PM
+@@ -469,9 +535,6 @@
+ info->fbops = &imxfb_ops;
+ info->flags = FBINFO_FLAG_DEFAULT;
+
+- fbi->rgb[RGB_16] = &def_rgb_16;
+- fbi->rgb[RGB_8] = &def_rgb_8;
+-
+ fbi->max_xres = inf->xres;
+ info->var.xres = inf->xres;
+ info->var.xres_virtual = inf->xres;
+@@ -596,6 +659,12 @@
+ imxfb_setup_gpio(fbi);
+
+ imxfb_set_par(info);
++ /* JB: The following parameters are only needed once at startup and so
++ removed from from imxfb_set_par()/imxfb_activate_var() */
++ LCDC_PWMR = fbi->pwmr;
++ LCDC_LSCR1 = fbi->lscr1;
++ LCDC_DMACR = fbi->dmacr;
++
+ ret = register_framebuffer(info);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to register framebuffer\n");
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
+--- linux-2.6.27.2.original/drivers/video/imxfb.h
++++ linux-2.6.27.2.mod/drivers/video/imxfb.h
+@@ -1,73 +0,0 @@
+-/*
+- * linux/drivers/video/imxfb.h
+- *
+- * Freescale i.MX Frame Buffer device driver
+- *
+- * Copyright (C) 2004 S.Hauer, Pengutronix
+- *
+- * Copyright (C) 1999 Eric A. Thomas
+- * Based on acornfb.c Copyright (C) Russell King.
+- *
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file COPYING in the main directory of this archive
+- * for more details.
+- */
+-
+-/*
+- * These are the bitfields for each
+- * display depth that we support.
+- */
+-struct imxfb_rgb {
+- struct fb_bitfield red;
+- struct fb_bitfield green;
+- struct fb_bitfield blue;
+- struct fb_bitfield transp;
+-};
+-
+-#define RGB_16 (0)
+-#define RGB_8 (1)
+-#define NR_RGB 2
+-
+-struct imxfb_info {
+- struct device *dev;
+- struct imxfb_rgb *rgb[NR_RGB];
+-
+- u_int max_bpp;
+- u_int max_xres;
+- u_int max_yres;
+-
+- /*
+- * These are the addresses we mapped
+- * the framebuffer memory region to.
+- */
+- dma_addr_t map_dma;
+- u_char * map_cpu;
+- u_int map_size;
+-
+- u_char * screen_cpu;
+- dma_addr_t screen_dma;
+- u_int palette_size;
+-
+- dma_addr_t dbar1;
+- dma_addr_t dbar2;
+-
+- u_int pcr;
+- u_int pwmr;
+- u_int lscr1;
+- u_int dmacr;
+- u_int cmap_inverse:1,
+- cmap_static:1,
+- unused:30;
+-
+- void (*lcd_power)(int);
+- void (*backlight_power)(int);
+-};
+-
+-#define IMX_NAME "IMX"
+-
+-/*
+- * Minimum X and Y resolutions
+- */
+-#define MIN_XRES 64
+-#define MIN_YRES 64
+-
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/014-armadeus-imxregs-add-lcd-bpix-mask.patch 2009-03-31 10:25:07 UTC (rev 1194)
@@ -0,0 +1,10 @@
+--- linux-2.6.27.2/arch/arm/mach-imx/include/mach/imx-regs.h
++++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/imx-regs.h
+@@ -411,6 +411,7 @@
+ #define PCR_BPIX_8 (3<<25)
+ #define PCR_BPIX_12 (4<<25)
+ #define PCR_BPIX_16 (4<<25)
++#define PCR_BPIX_MASK (7<<25)
+ #define PCR_PIXPOL (1<<24)
+ #define PCR_FLMPOL (1<<23)
+ #define PCR_LPPOL (1<<22)
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/015-armadeus-logo-add_armadeus-project_tux.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/015-armadeus-logo-add_armadeus-project_tux.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/015-armadeus-logo-add_armadeus-project_tux.patch 2009-03-31 10:25:07 UTC (rev 1194)
@@ -0,0 +1,19254 @@
+--- linux-2.6.23/drivers/video/logo/Kconfig 2006-09-20 05:42:06.000000000 +0200
++++ linux-2.6.23-imx/drivers/video/logo/Kconfig 2006-10-01 14:22:39.000000000 +0200
+@@ -70,5 +70,12 @@ config LOGO_M32R_CLUT224
+ depends on M32R
+ default y
+
++config LOGO_ARMADEUS_CLUT224
++ bool "224-color Armadeus Linux logo"
++ depends on ARM
++ default y
++ help
++ Choose this if you want to have the Armadeus Tux as boot logo
++
+ endif # LOGO
+
+--- linux-2.6.23/drivers/video/logo/logo_armadeus_clut224.ppm 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23-imx/drivers/video/logo/logo_armadeus_clut224.ppm 2006-10-01 14:22:39.000000000 +0200
+@@ -0,0 +1,19205 @@
++P3
++# CREATOR: The GIMP's PNM Filter Version 1.0
++# Armadeus project 224 colors Tux logo
++80 80
++255
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++6
++6
++6
++10
++10
++10
++10
++10
++10
++10
++10
++10
++6
++6
++6
++6
++6
++6
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++10
++10
++10
++14
++14
++14
++22
++22
++22
++26
++26
++26
++30
++30
++30
++34
++34
++34
++30
++30
++30
++30
++30
++30
++26
++26
++26
++18
++18
++18
++14
++14
++14
++10
++10
++10
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++14
++14
++14
++26
++26
++26
++42
++42
++42
++54
++54
++54
++66
++66
++66
++78
++78
++78
++78
++78
++78
++78
++78
++78
++74
++74
++74
++66
++66
++66
++54
++54
++54
++42
++42
++42
++26
++26
++26
++18
++18
++18
++10
++10
++10
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++22
++22
++22
++42
++42
++42
++66
++66
++66
++86
++86
++86
++66
++66
++66
++38
++38
++38
++38
++38
++38
++22
++22
++22
++26
++26
++26
++34
++34
++34
++54
++54
++54
++66
++66
++66
++86
++86
++86
++70
++70
++70
++46
++46
++46
++26
++26
++26
++14
++14
++14
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++26
++26
++26
++50
++50
++50
++82
++82
++82
++58
++58
++58
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++6
++6
++6
++54
++54
++54
++86
++86
++86
++66
++66
++66
++38
++38
++38
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++22
++22
++22
++50
++50
++50
++78
++78
++78
++34
++34
++34
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++6
++6
++6
++70
++70
++70
++78
++78
++78
++46
++46
++46
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++18
++18
++18
++42
++42
++42
++82
++82
++82
++26
++26
++26
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++14
++14
++14
++46
++46
++46
++34
++34
++34
++6
++6
++6
++2
++2
++6
++42
++42
++42
++78
++78
++78
++42
++42
++42
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++30
++30
++30
++66
++66
++66
++58
++58
++58
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++26
++26
++26
++86
++86
++86
++101
++101
++101
++46
++46
++46
++10
++10
++10
++2
++2
++6
++58
++58
++58
++70
++70
++70
++34
++34
++34
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++42
++42
++42
++86
++86
++86
++10
++10
++10
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++30
++30
++30
++94
++94
++94
++94
++94
++94
++58
++58
++58
++26
++26
++26
++2
++2
++6
++6
++6
++6
++78
++78
++78
++54
++54
++54
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++22
++22
++22
++62
++62
++62
++62
++62
++62
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++26
++26
++26
++54
++54
++54
++38
++38
++38
++18
++18
++18
++10
++10
++10
++2
++2
++6
++2
++2
++6
++34
++34
++34
++82
++82
++82
++38
++38
++38
++14
++14
++14
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++30
++30
++30
++78
++78
++78
++30
++30
++30
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++10
++10
++10
++10
++10
++10
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++78
++78
++78
++50
++50
++50
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++38
++38
++38
++86
++86
++86
++14
++14
++14
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++54
++54
++54
++66
++66
++66
++26
++26
++26
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++42
++42
++42
++82
++82
++82
++2
++2
++6
++2
++2
++6
++2
++2
++6
++6
++6
++6
++10
++10
++10
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++6
++6
++6
++14
++14
++14
++10
++10
++10
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++18
++18
++18
++82
++82
++82
++34
++34
++34
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++46
++46
++46
++86
++86
++86
++2
++2
++6
++2
++2
++6
++6
++6
++6
++6
++6
++6
++22
++22
++22
++34
++34
++34
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++18
++18
++18
++34
++34
++34
++10
++10
++10
++50
++50
++50
++22
++22
++22
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++10
++10
++10
++86
++86
++86
++42
++42
++42
++14
++14
++14
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++46
++46
++46
++86
++86
++86
++2
++2
++6
++2
++2
++6
++38
++38
++38
++116
++116
++116
++94
++94
++94
++22
++22
++22
++22
++22
++22
++2
++2
++6
++2
++2
++6
++2
++2
++6
++14
++14
++14
++86
++86
++86
++137
++137
++137
++161
++161
++161
++154
++153
++152
++38
++38
++38
++26
++26
++26
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++86
++86
++86
++46
++46
++46
++14
++14
++14
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++46
++46
++46
++86
++86
++86
++2
++2
++6
++14
++14
++14
++134
++134
++134
++198
++198
++198
++195
++195
++195
++116
++116
++116
++10
++10
++10
++2
++2
++6
++2
++2
++6
++6
++6
++6
++101
++98
++89
++187
++187
++187
++210
++210
++210
++218
++218
++218
++214
++214
++214
++134
++134
++134
++14
++14
++14
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++86
++86
++86
++50
++50
++50
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++46
++46
++46
++86
++86
++86
++2
++2
++6
++54
++54
++54
++218
++218
++218
++195
++195
++195
++226
++226
++226
++246
++246
++246
++58
++58
++58
++2
++2
++6
++2
++2
++6
++30
++30
++30
++210
++210
++210
++253
++253
++253
++173
++173
++172
++123
++123
++123
++221
++221
++221
++234
++234
++234
++74
++74
++74
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++70
++70
++70
++58
++58
++58
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++46
++46
++46
++82
++82
++82
++2
++2
++6
++106
++106
++106
++171
++171
++170
++26
++26
++26
++86
++86
++86
++226
++226
++226
++123
++123
++123
++10
++10
++10
++14
++14
++14
++46
++46
++46
++231
++231
++231
++190
++190
++190
++6
++6
++6
++70
++70
++70
++90
++90
++90
++238
++238
++238
++159
++158
++157
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++70
++70
++70
++58
++58
++58
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++42
++42
++42
++86
++86
++86
++6
++6
++6
++116
++116
++116
++106
++106
++106
++6
++6
++6
++70
++70
++70
++147
++147
++147
++127
++127
++127
++18
++18
++18
++38
++38
++38
++54
++54
++54
++221
++221
++221
++106
++106
++106
++2
++2
++6
++14
++14
++14
++46
++46
++46
++190
++190
++190
++198
++198
++198
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++74
++74
++74
++62
++62
++62
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++42
++42
++42
++94
++94
++94
++14
++14
++14
++101
++101
++101
++127
++127
++127
++2
++2
++6
++18
++18
++18
++116
++116
++116
++130
++98
++46
++121
++92
++8
++121
++92
++8
++100
++78
++10
++161
++161
++161
++106
++106
++106
++2
++2
++6
++2
++2
++6
++2
++2
++6
++195
++195
++195
++195
++195
++195
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++74
++74
++74
++62
++62
++62
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++1
++0
++0
++1
++0
++0
++1
++0
++0
++0
++0
++0
++1
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++38
++38
++38
++90
++90
++90
++14
++14
++14
++58
++58
++58
++210
++210
++210
++26
++26
++26
++52
++36
++6
++155
++116
++10
++226
++170
++11
++236
++186
++11
++225
++175
++15
++184
++144
++12
++215
++174
++15
++182
++146
++52
++37
++28
++9
++2
++2
++6
++70
++70
++70
++246
++246
++246
++137
++137
++137
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++70
++70
++70
++66
++66
++66
++26
++26
++26
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++38
++38
++38
++86
++86
++86
++14
++14
++14
++10
++10
++10
++195
++195
++195
++203
++179
++129
++192
++133
++9
++225
++175
++15
++239
++182
++13
++236
++190
++10
++232
++195
++16
++232
++200
++30
++245
++216
++46
++241
++208
++19
++232
++195
++16
++184
++144
++12
++203
++179
++129
++211
++206
++186
++42
++42
++42
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++50
++50
++50
++74
++74
++74
++30
++30
++30
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++34
++34
++34
++86
++86
++86
++14
++14
++14
++2
++2
++6
++121
++87
++25
++192
++133
++9
++219
++162
++10
++239
++182
++13
++236
++186
++11
++232
++195
++16
++241
++208
++19
++245
++216
++46
++245
++216
++46
++245
++216
++46
++246
++215
++20
++241
++208
++19
++241
++208
++19
++226
++184
++13
++121
++87
++25
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++50
++50
++50
++82
++82
++82
++34
++34
++34
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++34
++34
++34
++82
++82
++82
++30
++30
++30
++61
++42
++6
++180
++123
++7
++206
++145
++10
++230
++174
++11
++239
++182
++13
++236
++190
++10
++238
++202
++15
++241
++208
++19
++237
++201
++75
++245
++216
++46
++246
++215
++20
++246
++215
++20
++246
++215
++20
++226
++184
++13
++215
++174
++15
++184
++144
++12
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++26
++26
++26
++94
++94
++94
++42
++42
++42
++14
++14
++14
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++30
++30
++30
++78
++78
++78
++50
++50
++50
++104
++69
++6
++192
++133
++9
++216
++158
++10
++236
++178
++12
++236
++186
++11
++232
++195
++16
++241
++208
++19
++245
++216
++46
++245
++216
++46
++246
++215
++20
++246
++215
++20
++241
++208
++19
++198
++155
++10
++200
++144
++11
++216
++158
++10
++155
++116
++10
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++6
++6
++6
++90
++90
++90
++54
++54
++54
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++30
++30
++30
++78
++78
++78
++46
++46
++46
++22
++22
++22
++137
++92
++6
++210
++164
++10
++239
++182
++13
++236
++190
++10
++238
++202
++15
++241
++208
++19
++246
++215
++20
++246
++215
++20
++241
++208
++19
++210
++164
++10
++185
++133
++11
++210
++150
++10
++216
++158
++10
++210
++150
++10
++100
++78
++10
++2
++2
++6
++6
++6
++6
++54
++54
++54
++14
++14
++14
++2
++2
++6
++2
++2
++6
++62
++62
++62
++74
++74
++74
++30
++30
++30
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++34
++34
++34
++78
++78
++78
++50
++50
++50
++6
++6
++6
++80
++60
++22
++139
++102
++15
++190
++146
++13
++226
++184
++13
++232
++200
++30
++232
++195
++16
++215
++174
++15
++190
++146
++13
++168
++122
++10
++192
++133
++9
++210
++150
++10
++213
++154
++11
++202
++158
++25
++168
++150
++104
++101
++98
++89
++2
++2
++6
++2
++2
++6
++78
++78
++78
++116
++116
++116
++58
++58
++58
++2
++2
++6
++22
++22
++22
++90
++90
++90
++46
++46
++46
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++38
++38
++38
++86
++86
++86
++50
++50
++50
++6
++6
++6
++127
++127
++127
++168
++150
++104
++156
++107
++11
++168
++122
++10
++198
++155
++10
++184
++144
++12
++197
++138
++11
++200
++144
++11
++206
++145
++10
++206
++145
++10
++197
++138
++11
++203
++179
++129
++195
++195
++195
++198
++198
++198
++173
++173
++172
++14
++14
++14
++2
++2
++6
++22
++22
++22
++116
++116
++116
++116
++116
++116
++22
++22
++22
++2
++2
++6
++74
++74
++74
++70
++70
++70
++30
++30
++30
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++18
++18
++18
++50
++50
++50
++101
++101
++101
++26
++26
++26
++10
++10
++10
++137
++137
++137
++190
++190
++190
++168
++150
++104
++156
++107
++11
++197
++138
++11
++200
++144
++11
++197
++138
++11
++192
++133
++9
++180
++123
++7
++190
++142
++34
++203
++179
++129
++187
++187
++187
++202
++202
++202
++221
++221
++221
++214
++214
++214
++66
++66
++66
++2
++2
++6
++2
++2
++6
++50
++50
++50
++62
++62
++62
++6
++6
++6
++2
++2
++6
++10
++10
++10
++90
++90
++90
++50
++50
++50
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++34
++34
++34
++74
++74
++74
++74
++74
++74
++2
++2
++6
++6
++6
++6
++144
++144
++144
++198
++198
++198
++190
++190
++190
++170
++164
++156
++154
++121
++60
++156
++107
++11
++156
++107
++11
++168
++124
++44
++168
++150
++104
++187
++187
++187
++190
++190
++190
++210
++210
++210
++246
++246
++246
++253
++253
++253
++253
++253
++253
++182
++182
++182
++6
++6
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++62
++62
++62
++74
++74
++74
++34
++34
++34
++14
++14
++14
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++22
++22
++22
++54
++54
++54
++94
++94
++94
++18
++18
++18
++2
++2
++6
++46
++46
++46
++234
++234
++234
++221
++221
++221
++190
++190
++190
++190
++190
++190
++190
++190
++190
++187
++187
++187
++187
++187
++187
++190
++190
++190
++190
++190
++190
++195
++195
++195
++214
++214
++214
++242
++242
++242
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++82
++82
++82
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++14
++14
++14
++86
++86
++86
++54
++54
++54
++22
++22
++22
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++18
++18
++18
++46
++46
++46
++90
++90
++90
++46
++46
++46
++18
++18
++18
++6
++6
++6
++182
++182
++182
++253
++253
++253
++246
++246
++246
++206
++206
++206
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++190
++206
++206
++206
++231
++231
++231
++250
++250
++250
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++202
++202
++202
++14
++14
++14
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++42
++42
++42
++86
++86
++86
++42
++42
++42
++18
++18
++18
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++6
++6
++6
++14
++14
++14
++38
++38
++38
++74
++74
++74
++66
++66
++66
++2
++2
++6
++6
++6
++6
++90
++90
++90
++250
++250
++250
++253
++253
++253
++253
++253
++253
++238
++238
++238
++198
++198
++198
++190
++190
++190
++190
++190
++190
++195
++195
++195
++221
++221
++221
++246
++246
++246
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++82
++82
++82
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++78
++78
++78
++70
++70
++70
++34
++34
++34
++14
++14
++14
++6
++6
++6
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++14
++14
++14
++34
++34
++34
++66
++66
++66
++78
++78
++78
++6
++6
++6
++2
++2
++6
++18
++18
++18
++218
++218
++218
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++246
++246
++246
++226
++226
++226
++231
++231
++231
++246
++246
++246
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++179
++179
++178
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++18
++18
++18
++90
++90
++90
++62
++62
++62
++30
++30
++30
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
++10
++10
++10
++26
++26
++26
++58
++58
++58
++90
++90
++90
++18
++18
++18
++2
++2
++6
++2
++2
++6
++111
++111
++110
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++250
++250
++250
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++253
++231
++231
++231
++18
++18
++18
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++2
++2
++6
++18
++18
++18
++94
++94
++94
++54
++54
++54
++26
++26
++26
++10
++10
++10
++0
++0
++0
++0
++0
++0
++0
++0
++0
++0
+...
[truncated message content] |
|
From: <ar...@us...> - 2009-03-27 22:19:43
|
Revision: 1193
http://armadeus.svn.sourceforge.net/armadeus/?rev=1193&view=rev
Author: artemys
Date: 2009-03-27 22:19:31 +0000 (Fri, 27 Mar 2009)
Log Message:
-----------
[DEMOS] Cleanup Xenomai demos
Modified Paths:
--------------
trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-27 15:41:24 UTC (rev 1192)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-27 22:19:31 UTC (rev 1193)
@@ -22,13 +22,12 @@
*/
#include <linux/module.h>
-#include <asm/irq.h>
#include <linux/irq.h>
-#include <asm/signal.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/gpio.h>
+
#define IRQ_NB IRQ_GPIOA(6)
MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
@@ -36,45 +35,34 @@
MODULE_SUPPORTED_DEVICE("none");
MODULE_LICENSE("GPL");
+
/* irq handler */
-irqreturn_t interrupt_handler (int irqn, void *dev){
+static irqreturn_t test_interrupt_handler(int irqn, void *dev)
+{
printk("IT !\n");
+
return IRQ_HANDLED;
}
-/* loading (insmod) */
-static int __init irq_init(void) {
+static int __init test_irq_init(void)
+{
int err;
- printk("irq init\n");
- err =request_irq(IRQ_NB, interrupt_handler, 0,"test irq", NULL);
- if (err!=0){
- printk(KERN_INFO "request_irq : error ");
- switch (err) {
- case -EINVAL:
- printk("EINVAL\n");
- break;
- case -ENOMEM:
- printk("ENOMEM\n");
- break;
- case -EBUSY:
- printk("EBUSY\n");
- break;
- case -ENXIO:
- printk("ENXIO\n");
- break;
- }
+
+ err = request_irq(IRQ_NB, test_interrupt_handler, 0, "test irq", NULL);
+ if (err) {
+ printk(KERN_INFO "Error while requesting IRQ %d\n", IRQ_NB);
return err;
}
- set_irq_type( IRQ_NB, IRQF_TRIGGER_FALLING );
+ set_irq_type(IRQ_NB, IRQF_TRIGGER_FALLING);
+
return 0;
}
-/* unloading (rmmod) */
-void __exit irq_exit(void) {
- printk(KERN_INFO "irq_exit\n");
- free_irq(IRQ_NB,NULL);
+static void __exit test_irq_exit(void)
+{
+ free_irq(IRQ_NB, NULL);
}
-/* Api Linux devices */
-module_init(irq_init);
-module_exit(irq_exit);
+module_init(test_irq_init);
+module_exit(test_irq_exit);
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-03-27 15:41:41
|
Revision: 1192
http://armadeus.svn.sourceforge.net/armadeus/?rev=1192&view=rev
Author: gwenhael
Date: 2009-03-27 15:41:24 +0000 (Fri, 27 Mar 2009)
Log Message:
-----------
[DEMOS] Xenomai examples : Makefile now uses relative path
Modified Paths:
--------------
trunk/target/demos/real_time/Makefile.in
trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile
trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
Modified: trunk/target/demos/real_time/Makefile.in
===================================================================
--- trunk/target/demos/real_time/Makefile.in 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/Makefile.in 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,6 +1,5 @@
###### CONFIGURATION ######
DEST_DIR=/tftpboot/local/bin
-ARMADEUS_BASE_DIR=/home/gwe/armadeus/armadeus/
include $(ARMADEUS_BASE_DIR)/Makefile.in
@@ -15,8 +14,9 @@
EXEC=$(APPLICATIONS)
+XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
+XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
-
ifneq ($(APPLICATIONS),)
SRC= $(wildcard *.c)
OBJ= $(SRC:.c=.o)
@@ -39,7 +39,7 @@
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
obj-m := $(OBJ)
-EXTRA_CFLAGS=-I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix -I$(KSRC)/arch/arm/mach-imx/include/mach/
+
CLEAN_MOD= modules.order *.ko *.mod.c *.mod.o *.symvers $(CLEANMOD) .tmp_versions
$(EXEC):
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,4 +1,9 @@
###### CONFIGURATION ######
MODULES=interrupt_linux_kernel
-
--include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+ifneq ($(KERNELRELEASE),)
+ obj-m := $(MODULES).o
+ EXTRA_CFLAGS=-I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
+else
+ARMADEUS_BASE_DIR=../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-27 15:41:24 UTC (rev 1192)
@@ -27,7 +27,7 @@
#include <asm/signal.h>
#include <linux/init.h>
#include <linux/interrupt.h>
-#include <gpio.h>
+#include <asm/gpio.h>
#define IRQ_NB IRQ_GPIOA(6)
Modified: trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,4 +1,4 @@
###### CONFIGURATION ######
-APPLICATIONS=irq_linux_us
-
-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+APPLICATIONS=interrupt_linux_us
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,4 +1,10 @@
### List of modules to be build
MODULES= interrupt_xeno_kernel
-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
\ No newline at end of file
+ifneq ($(KERNELRELEASE),)
+ EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
+ obj-m := $(MODULES).o
+else
+ ARMADEUS_BASE_DIR=../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
Modified: trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,5 +1,6 @@
### List of applications to be build
APPLICATIONS = interrupt_xeno_userspace
### Set of compilation instructions
-include ../../../Makefile.in
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,3 +1,9 @@
###### CONFIGURATION ######
MODULES=pulse_linux_kernel_sleep
--include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+
+ifneq ($(KERNELRELEASE),)
+ obj-m := $(MODULES).o
+else
+ ARMADEUS_BASE_DIR=../../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
Modified: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-03-27 15:41:24 UTC (rev 1192)
@@ -27,7 +27,7 @@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/timer.h>
-#include <gpio.h>
+#include <asm/gpio.h>
#define TIMESLEEP 10
#define MINOR_PORT 4
Modified: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,3 +1,9 @@
###### CONFIGURATION ######
MODULES=pulse_linux_kernel_timer
--include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+ifneq ($(KERNELRELEASE),)
+ obj-m := $(MODULES).o
+else
+ ARMADEUS_BASE_DIR=../../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
+
Modified: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-03-27 15:41:24 UTC (rev 1192)
@@ -28,7 +28,7 @@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/timer.h>
-#include <gpio.h>
+#include <asm/gpio.h>
#define TIMESLEEP HZ/100
#define MINOR_PORT 4
Modified: trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,3 +1,3 @@
APPLICATIONS=pulse_linux_userspace_sleep
-
-include ../../../../Makefile.in
+ARMADEUS_BASE_DIR=../../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,3 +1,4 @@
APPLICATIONS=pulse_linux_userspace_timer
-include ../../../../Makefile.in
+ARMADEUS_BASE_DIR=../../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,4 +1,10 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_rt_timer
-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+ifneq ($(KERNELRELEASE),)
+ EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
+ obj-m := $(MODULES).o
+else
+ ARMADEUS_BASE_DIR=../../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-03-27 15:41:24 UTC (rev 1192)
@@ -27,7 +27,7 @@
#include <native/sem.h>
#include <mach/hardware.h>
#include <nucleus/types.h>
-#include <gpio.h>
+#include <asm/gpio.h>
MODULE_LICENSE("GPL");
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,3 +1,10 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_timer
-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
+
+ifneq ($(KERNELRELEASE),)
+ EXTRA_CFLAGS := -I./include/xenomai -I./include/xenomai/posix -I./include/xenomai/native
+ obj-m := $(MODULES).o
+else
+ ARMADEUS_BASE_DIR=../../../../../../..
+ include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
+endif
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-03-27 15:41:24 UTC (rev 1192)
@@ -27,7 +27,7 @@
#include <native/timer.h>
#include <rtdm/rtdm_driver.h>
#include <mach/hardware.h>
-#include <gpio.h>
+#include <asm/gpio.h>
MODULE_LICENSE("GPL");
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,5 +1,5 @@
### List of applications to be build
APPLICATIONS = pulse_xeno_userspace_timer
+ARMADEUS_BASE_DIR=../../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
-include ../../../../Makefile.in
-
Modified: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile 2009-03-27 15:41:24 UTC (rev 1192)
@@ -1,5 +1,5 @@
### List of applications to be build
APPLICATIONS = pulse_xeno_userspace_timer
+ARMADEUS_BASE_DIR=../../../../../../..
+include $(ARMADEUS_BASE_DIR)/target/demos/real_time/Makefile.in
-include ../../../../Makefile.in
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-03-27 10:46:10
|
Revision: 1191
http://armadeus.svn.sourceforge.net/armadeus/?rev=1191&view=rev
Author: gwenhael
Date: 2009-03-27 10:45:57 +0000 (Fri, 27 Mar 2009)
Log Message:
-----------
[DEMOS] xenomai demos, work but need to change path in Makefile
Modified Paths:
--------------
trunk/target/demos/real_time/Makefile.in
trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
Modified: trunk/target/demos/real_time/Makefile.in
===================================================================
--- trunk/target/demos/real_time/Makefile.in 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/Makefile.in 2009-03-27 10:45:57 UTC (rev 1191)
@@ -3,8 +3,6 @@
ARMADEUS_BASE_DIR=/home/gwe/armadeus/armadeus/
include $(ARMADEUS_BASE_DIR)/Makefile.in
-XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
-XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
CC= arm-linux-gcc
LD= arm-linux-ld
@@ -23,6 +21,7 @@
SRC= $(wildcard *.c)
OBJ= $(SRC:.c=.o)
EXEC= $(APPLICATIONS)
+XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
CFLAGS=-g -W -Wall -I$(XENO)/include -I$(XENO)/include/native -I$(XENO)/include/rtdm -D_GNU_SOURCE -D_REENTRANT
LDFLAGS=-L$(XENO)/lib -Xlinker -rpath $(XENO)/lib -Xlinker $(XENO)/lib/libnative.a $(XENO)/lib/librtdm.a -lpthread -lnative -lrtdm
$(EXEC) : $(OBJ)
@@ -35,7 +34,6 @@
EXEC=$(MODULES).ko
KSRC=$(ARMADEUS_LINUX_DIR)
-#$(LOCALDIR)/linux-2.6.27.13
KDIR=$(KSRC)
OBJ := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,4 +1,4 @@
###### CONFIGURATION ######
-MODULES=irq_linux_kernel
+MODULES=interrupt_linux_kernel
-include /home/gwe/armadeus/stage/devel/Makefile.in
+-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,4 +1,4 @@
###### CONFIGURATION ######
APPLICATIONS=irq_linux_us
-include /home/gwe/armadeus/stage/devel/Makefile.in
+include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,4 +1,4 @@
### List of modules to be build
MODULES= interrupt_xeno_kernel
-include /home/gwe/armadeus/stage/devel/Makefile.in
+include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
\ No newline at end of file
Modified: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,3 +1,3 @@
###### CONFIGURATION ######
MODULES=pulse_linux_kernel_sleep
-include ../../../../Makefile.in
+-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,4 +1,3 @@
###### CONFIGURATION ######
-#LOCALDIR=/home/gwe/armadeus/armadeus/buildroot/project_build_armv4t/apf9328
MODULES=pulse_linux_kernel_timer
-include ../../../../Makefile.in
+-include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,4 +1,4 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_rt_timer
-include /home/gwe/armadeus/stage/devel/Makefile.in
+include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-03-25 09:23:48 UTC (rev 1190)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-03-27 10:45:57 UTC (rev 1191)
@@ -1,3 +1,3 @@
### List of modules to be build
MODULES = pulse_xeno_kernel_timer
-include /home/gwe/armadeus/stage/devel/Makefile.in
+include /home/gwe/armadeus/armadeus/target/demos/real_time/Makefile.in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-25 09:24:08
|
Revision: 1190
http://armadeus.svn.sourceforge.net/armadeus/?rev=1190&view=rev
Author: artemys
Date: 2009-03-25 09:23:48 +0000 (Wed, 25 Mar 2009)
Log Message:
-----------
[BUILDROOT] Add a package for Freescale BSP test tools
Added Paths:
-----------
trunk/buildroot/package/freescale-tools/
trunk/buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch
trunk/buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch
trunk/buildroot/package/freescale-tools/tools.mk
Added: trunk/buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch
===================================================================
--- trunk/buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch (rev 0)
+++ trunk/buildroot/package/freescale-tools/01-misc-20071002-put_correct_path_to_libvpu.patch 2009-03-25 09:23:48 UTC (rev 1190)
@@ -0,0 +1,19 @@
+--- misc-20071002.org/test/mxc_vpu_test/Makefile 2009-03-17 17:35:38.000000000 +0100
++++ misc-20071002/test/mxc_vpu_test/Makefile 2009-03-17 17:48:17.000000000 +0100
+@@ -30,14 +30,14 @@
+ all: $(TARGET) $(TARGET1)
+
+ $(TARGET): $(LIBDIR)$(LIBNAME) $(OBJ)
+- $(LINK) -L . -lpthread -o $(TARGET) $(OBJ) $(LIBNAME)
++ $(LINK) -L . -lpthread -o $(TARGET) $(OBJ) $(LIBDIR)/$(LIBNAME)
+ mkdir -p $(OBJDIR)
+ mv $(TARGET) $(OBJDIR)
+ cp ./config/codec* $(OBJDIR)
+ cp ./bin/do_test $(OBJDIR)
+
+ $(TARGET1): $(LIBDIR)$(LIBNAME) ${OBJ1}
+- $(LINK) -L . -lpthread -o $(TARGET1) $(OBJ1) $(LIBNAME)
++ $(LINK) -L . -lpthread -o $(TARGET1) $(OBJ1) $(LIBDIR)/$(LIBNAME)
+ rm -rf *.o *.a
+ # mkdir -p $(OBJDIR)
+ mv $(TARGET1) $(OBJDIR)
Added: trunk/buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch
===================================================================
--- trunk/buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch (rev 0)
+++ trunk/buildroot/package/freescale-tools/02-misc-20071002-remove_index_in_libvpu.patch 2009-03-25 09:23:48 UTC (rev 1190)
@@ -0,0 +1,16 @@
+--- misc-20071002.org/lib/vpu/vpu_io.c 2009-03-17 17:35:38.000000000 +0100
++++ misc-20071002/lib/vpu/vpu_io.c 2009-03-17 17:55:35.000000000 +0100
+@@ -374,11 +374,11 @@
+
+ while (fgets(line, 80, fp) != NULL) {
+ if (strncmp(line, "Hardware", 8) == 0) {
+- str = index(line, ':');
++ str = strchr(line, ':');
+ strcpy(cpu, str + 2);
+ }
+ if (strncmp(line, "Revision", 8) == 0) {
+- str = index(line, ':');
++ str = strchr(line, ':');
+ strcpy(rev, str + 2);
+ }
+ }
Added: trunk/buildroot/package/freescale-tools/tools.mk
===================================================================
--- trunk/buildroot/package/freescale-tools/tools.mk (rev 0)
+++ trunk/buildroot/package/freescale-tools/tools.mk 2009-03-25 09:23:48 UTC (rev 1190)
@@ -0,0 +1,63 @@
+#############################################################
+#
+# Miscellaneous tools from Freescale BSP
+#
+#############################################################
+
+FREESCALE_TOOLS_VERSION:=20071002
+FREESCALE_TOOLS_SOURCE:=misc-$(FREESCALE_TOOLS_VERSION).tar.gz
+FREESCALE_TOOLS_PATCH_SOURCE:=misc-vpu_lib-2.2.2-mx27-2.patch
+FREESCALE_TOOLS_SITE:=http://www.bitshrine.org/gpp/
+FREESCALE_TOOLS_PATCH_SITE:=ftp://ftp2.armadeus.com/armadeusw/download/
+FREESCALE_TOOLS_CAT:=$(ZCAT)
+FREESCALE_TOOLS_DIR:=$(BUILD_DIR)/misc-$(FREESCALE_TOOLS_VERSION)
+FREESCALE_TOOLS_TARGET_DIR:=$(TARGET_DIR)/usr/bin/vpu
+FREESCALE_TOOLS_BIN:=mxc_vpu_test.out
+
+
+$(DL_DIR)/$(FREESCALE_TOOLS_PATCH_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FREESCALE_TOOLS_PATCH_SITE)/$(FREESCALE_TOOLS_PATCH_SOURCE)
+ $(WGET) -P $(DL_DIR) $(FREESCALE_TOOLS_PATCH_SITE)/$(FREESCALE_TOOLS_PATCH_SOURCE).md5
+
+$(DL_DIR)/$(FREESCALE_TOOLS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FREESCALE_TOOLS_SITE)/$(FREESCALE_TOOLS_SOURCE)
+ $(WGET) -P $(DL_DIR) $(FREESCALE_TOOLS_SITE)/$(FREESCALE_TOOLS_SOURCE).md5
+
+freescale-tools-source: $(DL_DIR)/$(FREESCALE_TOOLS_SOURCE) $(DL_DIR)/$(FREESCALE_TOOLS_PATCH_SOURCE)
+
+$(FREESCALE_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(FREESCALE_TOOLS_SOURCE) $(DL_DIR)/$(FREESCALE_TOOLS_PATCH_SOURCE)
+ $(FREESCALE_TOOLS_CAT) $(DL_DIR)/$(FREESCALE_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ mv $(BUILD_DIR)/misc $(FREESCALE_TOOLS_DIR)
+ toolchain/patch-kernel.sh $(FREESCALE_TOOLS_DIR) $(DL_DIR) misc-\*.patch
+ toolchain/patch-kernel.sh $(FREESCALE_TOOLS_DIR) package/freescale-tools \*misc-$(FREESCALE_TOOLS_VERSION)\*.patch
+ touch $@
+
+$(FREESCALE_TOOLS_DIR)/.configured: $(FREESCALE_TOOLS_DIR)/.unpacked
+ touch $@
+
+$(FREESCALE_TOOLS_TARGET_DIR)/$(FREESCALE_TOOLS_BIN): $(FREESCALE_TOOLS_DIR)/.configured
+ $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" PLATFORM=IMX27ADS -C $(FREESCALE_TOOLS_DIR)/lib/vpu/
+ $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" PLATFORM=IMX27ADS \
+ TOPDIR=$(FREESCALE_TOOLS_DIR) \
+ OBJDIR="$(FREESCALE_TOOLS_TARGET_DIR)" \
+ -C $(FREESCALE_TOOLS_DIR)/test/mxc_vpu_test/
+ touch $@
+
+FREESCALE-TOOLS freescale-tools: uclibc $(FREESCALE_TOOLS_TARGET_DIR)/$(FREESCALE_TOOLS_BIN)
+
+freescale-tools-clean:
+ -$(MAKE) -C $(FREESCALE_TOOLS_DIR)/lib/vpu/ clean
+ -$(MAKE) OBJDIR="$(FREESCALE_TOOLS_TARGET_DIR)" \
+ -C $(FREESCALE_TOOLS_DIR)/test/mxc_vpu_test/ clean
+
+freescale-tools-dirclean:
+ rm -rf $(FREESCALE_TOOLS_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_FREESCALE_TOOLS)),y)
+TARGETS+=freescale-tools
+endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-03-24 14:46:59
|
Revision: 1189
http://armadeus.svn.sourceforge.net/armadeus/?rev=1189&view=rev
Author: gwenhael
Date: 2009-03-24 14:46:53 +0000 (Tue, 24 Mar 2009)
Log Message:
-----------
[DEMOS] translations and typographic corrections
Modified Paths:
--------------
trunk/target/demos/real_time/fractal/main.c
trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
Modified: trunk/target/demos/real_time/fractal/main.c
===================================================================
--- trunk/target/demos/real_time/fractal/main.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/fractal/main.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -56,9 +56,7 @@
} elemPict;
-/* methode utilisee pour le fils pour
- * faire son calcul
- */
+/* used by children process */
void workChildren(elemPict *ep) {
float ii,ri,r,i;
int yy = 0,y=0;
@@ -98,11 +96,11 @@
}
-/* Travail fait par le maitre */
+/* Used by the master */
void workMaster(int *tabChildPipe, int global) {
int nbChild = NB_CHILD;
int i,lignDeb;
- // Envoi de la commande de traitement
+ // Sending the command processing
elemPict ep;
for (i=0,lignDeb=0;i<NB_CHILD;i++,lignDeb+=24) {
ep.x=0;
@@ -112,8 +110,8 @@
write(tabChildPipe[i],&ep,sizeof(elemPict));
}
- // Mise en attente de l'ensemble des calculs
- do {
+ // Queuing of all the calculations
+ do {
int size = read(global,&ep,sizeof(elemPict)+1);
printf("recu de %d debut %d fin %d\n",ep.numFils,ep.y,ep.height+ep.numFils);
if (size != sizeof(elemPict)) {
@@ -141,20 +139,16 @@
close(reception[LECTURE]);
}
-/* pipe : 0 => lecture dans le pipe , 1 => ecriture dans le pipe */
-
int main(int argc, char **argv) {
int global[2];
int tabChildPipe[NB_CHILD];
int pidChildPipe[NB_CHILD];
- /* Preparation de la pipe commune
- * enfant vers pere
- */
+
if (pipe(global) == -1) {
perror("pipeToMaster");
return(EXIT_FAILURE);
}
- /* Création de tous les processus fils */
+ /* Children process creation */
int pos;
int receptionFils[2];
for (pos = 0; pos < NB_CHILD; pos ++ ) {
@@ -168,30 +162,26 @@
printf("ca merde\n");
return -1;
break;
- case 0: // Fiston
+ case 0:
prepareChild(receptionFils, global);
return EXIT_SUCCESS;
break;
- default: // C'est le pere
- // Fermeture de la lecture
+ default:
close(receptionFils[LECTURE]);
tabChildPipe[pos] = receptionFils[ECRITURE];
pidChildPipe[pos] = pid;
break;
}
}
- // C'est plus que le code du pere
close(global[ECRITURE]);
int fbfd = init_lcd();
workMaster(tabChildPipe,global[LECTURE]);
- close(global[LECTURE]); // Fermeture du pipe d'ecoute
- // Fermeture des pipes des enfants
+ close(global[LECTURE]);
+
for (pos = 0; pos < 1; pos++) {
close (tabChildPipe[pos]);
}
- // Fermeture du framebuffer
close(fbfd);
- // Mise en attente de la fin des autres
for (pos = 0; pos<1;pos ++) {
waitpid(pidChildPipe[pos],NULL,0);
}
Modified: trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -38,7 +38,7 @@
/* irq handler */
irqreturn_t interrupt_handler (int irqn, void *dev){
- printk("toto plop\n");
+ printk("IT !\n");
return IRQ_HANDLED;
}
@@ -46,9 +46,9 @@
static int __init irq_init(void) {
int err;
printk("irq init\n");
- err =request_irq(IRQ_NB, interrupt_handler, 0/*IRQF_SHARED*/,"test irq", NULL);
+ err =request_irq(IRQ_NB, interrupt_handler, 0,"test irq", NULL);
if (err!=0){
- printk(KERN_INFO "erreur de request_irq\n");
+ printk(KERN_INFO "request_irq : error ");
switch (err) {
case -EINVAL:
printk("EINVAL\n");
@@ -65,7 +65,7 @@
}
return err;
}
- set_irq_type( IRQ_NB, IRQF_TRIGGER_FALLING ); //pour changer le front
+ set_irq_type( IRQ_NB, IRQF_TRIGGER_FALLING );
return 0;
}
Modified: trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -1,3 +1,26 @@
+/*
+* linux userspace apps for handling interrupts
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -23,15 +46,7 @@
int fd, res, oflags, retval = 0;
unsigned int buffer;
char buf[255];
-//struct sigaction oa;
-// struct sigaction sa;
- // sa.sa_sigaction = action;
- //sa.sa_flags = 0;
- //sa.sa_restorer = NULL;
- //sigemptyset(&sa.sa_mask);
- //sigaction (SIGIO, &sa, &oa);
-
// Open gpio file device for communication;
fd = open ("/dev/gpio/PA6", O_RDONLY);
if (fd < 0)
@@ -46,14 +61,6 @@
{
printf ("F_SETOWN fails \n");
}
- //retval = 0;
- // enable the gpio async notifications
- //oflags = fcntl (fd, F_GETFL);
- //retval = fcntl (fd, F_SETFL, oflags | FASYNC);
- /*if (retval < 0)
- {
- printf ("F_SETFL Fails \n");
- }*/
while (STOP == FALSE)
{
usleep (100000);
Modified: trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -32,7 +32,7 @@
MODULE_LICENSE("GPL");
-#define IRQ_NUMBER 70 /* Intercept interrupt #7 */
+#define IRQ_NUMBER 70 /* Intercept interrupt on portA6 */
#define TASK_PRIO 99 /* Highest RT priority */
#define TASK_MODE 0 /* No flags */
#define TASK_STKSZ 0 /* Stack size (use default one) */
@@ -45,25 +45,24 @@
}
static int __init irq_init(void) {
- int err;
+ int err;
- /* Version With 6 param only on kernel space */
- err = rt_intr_create(&intr_desc,"MyIrq", IRQ_NUMBER, irq_server, NULL, 0);
- if (err !=0){
- printk("rt_intr_create : error\n");
- return err;
- }
-
- err = rt_intr_enable(&intr_desc);
- if (err != 0)
- printk("rt_intr_enable : error\n");
- else
- printk("rt_intr_create : ok\n");
- return err;
+ /* Version With 6 param only on kernel space */
+ err = rt_intr_create(&intr_desc,"MyIrq", IRQ_NUMBER, irq_server, NULL, 0);
+ if (err !=0){
+ printk("rt_intr_create : error\n");
+ return err;
+ }
+ err = rt_intr_enable(&intr_desc);
+ if (err != 0)
+ printk("rt_intr_enable : error\n");
+ else
+ printk("rt_intr_create : ok\n");
+ return err;
}
void __init irq_exit(void) {
- rt_intr_delete(&intr_desc);
+ rt_intr_delete(&intr_desc);
}
module_init(irq_init);
Modified: trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -25,7 +25,7 @@
#include <native/task.h>
#include <native/intr.h>
-#define IRQ_NUMBER 70 /* Intercept interrupt #7 */
+#define IRQ_NUMBER 70 /* Intercept interrupt on PA6 */
#define TASK_PRIO 99 /* Highest RT priority */
#define TASK_MODE 0 /* No flags */
#define TASK_STKSZ 0 /* Stack size (use default one) */
@@ -42,7 +42,7 @@
return;
}
for (;;) {
- /* Wait for the next interrupt on channel #7. */
+ /* Wait for the next interrupt on channel 70. */
err = rt_intr_wait(&intr_desc,TM_INFINITE);
printf("tata plop\n");
if (err > 0) {
Modified: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -1,3 +1,26 @@
+/*
+* linux kernel driver for generation signal with sleep
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
Modified: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -1,9 +1,25 @@
-/***********************************
- * Pulse generator
- *
- * author : Gwenhael GOAVEC-MEROU
- *
- ***********************************/
+/*
+* linux kernel driver for generation signal with timer
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
#include <linux/module.h>
Modified: trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -1,3 +1,26 @@
+/*
+* linux user space apps for generating signl with sleep
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
Modified: trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -1,3 +1,26 @@
+/*
+* linux user space apps for generating signl with timer
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
@@ -17,12 +40,10 @@
iomask ^=1;
}
-int main(int argc, char **argv) {
- printf("**** G\xE9n\xE9rateur d'impulsions avec timer en mode utilisateur ****\n");
-
+int main(int argc, char **argv) {
fd = open(PORT,O_RDWR);
if (fd < 0) {
- printf("erreur\n");
+ printf("open : error\n");
return 1;
}
iomask = 1;
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -42,52 +42,52 @@
#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
void blink(void *arg){
- int err, iomask;
- printk(KERN_INFO "entrering blink\n");
+ int err, iomask;
+ printk(KERN_INFO "entrering blink\n");
- if (imx_gpio_request(GPIO_PORTA | MINOR_PORT, "blink") < 0) {
- gpio_free(MINOR_PORT);
- return ;
- }
- imx_gpio_direction_output(GPIO_PORTA | MINOR_PORT,1);
+ if (imx_gpio_request(GPIO_PORTA | MINOR_PORT, "blink") < 0) {
+ gpio_free(MINOR_PORT);
+ return ;
+ }
+ imx_gpio_direction_output(GPIO_PORTA | MINOR_PORT,1);
- if ((err = rt_task_set_periodic(NULL, TM_NOW,rt_timer_ns2ticks(TIMESLEEP)))){
- printk("rt task set periodic failed \n");
- return;
- }
- iomask=0;
+ if ((err = rt_task_set_periodic(NULL, TM_NOW,rt_timer_ns2ticks(TIMESLEEP)))){
+ printk("rt task set periodic failed \n");
+ return;
+ }
+ iomask=0;
- while(!end){
- rt_task_wait_period(NULL);
- imx_gpio_set_value(GPIO_PORTA | MINOR_PORT, iomask);
- iomask^=1;
- }
- printk("fin\n");
+ while(!end){
+ rt_task_wait_period(NULL);
+ imx_gpio_set_value(GPIO_PORTA | MINOR_PORT, iomask);
+ iomask^=1;
+ }
+ printk("end\n");
}
-
+/* loading (insmod) */
static int __init blink_init(void) {
- printk(KERN_INFO "blink_init\n");
- if (rt_task_create(&blink_task, "blink", 0, 99, 0)) {
- printk("task create error\n");
- return -EBUSY;
- }
- if (rt_task_start(&blink_task, &blink, NULL)) {
- printk("task start error\n");
- return -EBUSY;
- }
- return 0;
+ printk(KERN_INFO "blink_init\n");
+ if (rt_task_create(&blink_task, "blink", 0, 99, 0)) {
+ printk("task create error\n");
+ return -EBUSY;
+ }
+ if (rt_task_start(&blink_task, &blink, NULL)) {
+ printk("task start error\n");
+ return -EBUSY;
+ }
+ return 0;
}
-/* Fin de la tache (rmmod) */
+/* unloading (rmmod) */
static void __init blink_exit(void) {
- end = 1;
- printk(KERN_INFO "blink_exit\n");
- rt_task_delete(&blink_task);
- rt_timer_stop();
- gpio_free(MINOR_PORT);
+ end = 1;
+ printk(KERN_INFO "blink_exit\n");
+ rt_task_delete(&blink_task);
+ rt_timer_stop();
+ gpio_free(MINOR_PORT);
}
-/* Points d'entrée API modules Linux */
+/* API kernel driver */
module_init(blink_init);
module_exit(blink_exit);
Modified: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-03-24 14:46:53 UTC (rev 1189)
@@ -42,38 +42,37 @@
#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
void blink(void *arg){
- int iomask;
- printk(KERN_INFO "entrering blink\n");
- iomask=0;
- while(!end){
- rtdm_task_wait_period();
- gpio_set_value(MINOR_PORT, iomask);
- iomask^=1;
- }
- printk("fin\n");
+ int iomask;
+ printk(KERN_INFO "entrering blink\n");
+ iomask=0;
+ while(!end){
+ rtdm_task_wait_period();
+ gpio_set_value(MINOR_PORT, iomask);
+ iomask^=1;
+ }
+ printk("end\n");
}
-
+/* module load (insmod) */
static int __init blink_init(void) {
- printk(KERN_INFO "blink_init\n");
- if (gpio_request(MINOR_PORT, "blink") < 0) {
- gpio_free(MINOR_PORT);
- return -EBUSY;
- }
- gpio_direction_output(MINOR_PORT,1);
-
- return rtdm_task_init(&blink_task, "blink", blink, NULL,
+ printk(KERN_INFO "blink_init\n");
+ if (gpio_request(MINOR_PORT, "blink") < 0) {
+ gpio_free(MINOR_PORT);
+ return -EBUSY;
+ }
+ gpio_direction_output(MINOR_PORT,1);
+ return rtdm_task_init(&blink_task, "blink", blink, NULL,
99, TIMESLEEP);
}
-/* Fin de la tache (rmmod) */
+/* module unload (rmmod) */
static void __init blink_exit(void) {
- end = 1;
- printk(KERN_INFO "blink_exit\n");
- rtdm_task_join_nrt(&blink_task,100);
- gpio_free(MINOR_PORT);
+ end = 1;
+ printk(KERN_INFO "blink_exit\n");
+ rtdm_task_join_nrt(&blink_task,100);
+ gpio_free(MINOR_PORT);
}
-/* Points d'entrée API modules Linux */
+/* API kernel driver */
module_init(blink_init);
module_exit(blink_exit);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gwe...@us...> - 2009-03-24 14:08:04
|
Revision: 1188
http://armadeus.svn.sourceforge.net/armadeus/?rev=1188&view=rev
Author: gwenhael
Date: 2009-03-24 14:07:40 +0000 (Tue, 24 Mar 2009)
Log Message:
-----------
[DEMOS] Adding a complete set of xenomai usage examples
Added Paths:
-----------
trunk/target/demos/real_time/
trunk/target/demos/real_time/Makefile.in
trunk/target/demos/real_time/fractal/
trunk/target/demos/real_time/fractal/Makefile
trunk/target/demos/real_time/fractal/README
trunk/target/demos/real_time/fractal/lcd.c
trunk/target/demos/real_time/fractal/lcd.h
trunk/target/demos/real_time/fractal/main.c
trunk/target/demos/real_time/fractal/newton.c
trunk/target/demos/real_time/fractal/newton.h
trunk/target/demos/real_time/interrupt/
trunk/target/demos/real_time/interrupt/linux/
trunk/target/demos/real_time/interrupt/linux/kernel/
trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
trunk/target/demos/real_time/interrupt/linux/user_space/
trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
trunk/target/demos/real_time/interrupt/xenomai/
trunk/target/demos/real_time/interrupt/xenomai/kernel/
trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
trunk/target/demos/real_time/interrupt/xenomai/user_space/
trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
trunk/target/demos/real_time/pulse/
trunk/target/demos/real_time/pulse/linux/
trunk/target/demos/real_time/pulse/linux/kernel/
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
trunk/target/demos/real_time/pulse/linux/user_space/
trunk/target/demos/real_time/pulse/linux/user_space/sleep/
trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile
trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
trunk/target/demos/real_time/pulse/linux/user_space/timer/
trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile
trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
trunk/target/demos/real_time/pulse/xenomai/
trunk/target/demos/real_time/pulse/xenomai/kernel/
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
trunk/target/demos/real_time/pulse/xenomai/user_space/
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c
Added: trunk/target/demos/real_time/Makefile.in
===================================================================
--- trunk/target/demos/real_time/Makefile.in (rev 0)
+++ trunk/target/demos/real_time/Makefile.in 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,65 @@
+###### CONFIGURATION ######
+DEST_DIR=/tftpboot/local/bin
+ARMADEUS_BASE_DIR=/home/gwe/armadeus/armadeus/
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+XENO=$(ARMADEUS_ROOTFS_DIR)/usr/xenomai
+XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
+
+CC= arm-linux-gcc
+LD= arm-linux-ld
+CXX= arm-linux-g++
+AS= arm-linux-as
+NM= arm-linux-nm
+AR= arm-linux-ar
+SIZE= arm-linux-size
+OBJCOPY= arm-linux-objcopy
+
+
+EXEC=$(APPLICATIONS)
+
+
+ifneq ($(APPLICATIONS),)
+SRC= $(wildcard *.c)
+OBJ= $(SRC:.c=.o)
+EXEC= $(APPLICATIONS)
+CFLAGS=-g -W -Wall -I$(XENO)/include -I$(XENO)/include/native -I$(XENO)/include/rtdm -D_GNU_SOURCE -D_REENTRANT
+LDFLAGS=-L$(XENO)/lib -Xlinker -rpath $(XENO)/lib -Xlinker $(XENO)/lib/libnative.a $(XENO)/lib/librtdm.a -lpthread -lnative -lrtdm
+$(EXEC) : $(OBJ)
+ $(CC) -o $@ $^ $(LDFLAGS)
+$(OBJ): $(SRC)
+ $(CC) $(CFLAGS) -o $@ -c $<
+endif
+
+ifneq ($(MODULES),)
+EXEC=$(MODULES).ko
+
+KSRC=$(ARMADEUS_LINUX_DIR)
+#$(LOCALDIR)/linux-2.6.27.13
+KDIR=$(KSRC)
+OBJ := ${patsubst %, %.o, $(MODULES)}
+CLEANMOD := ${patsubst %, .%*, $(MODULES)}
+PWD := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+obj-m := $(OBJ)
+EXTRA_CFLAGS=-I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix -I$(KSRC)/arch/arm/mach-imx/include/mach/
+CLEAN_MOD= modules.order *.ko *.mod.c *.mod.o *.symvers $(CLEANMOD) .tmp_versions
+$(EXEC):
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
+
+
+endif
+.PHONY: all
+all: $(EXEC)
+.PHONY: clean
+clean:
+ rm -rf $(OBJ) $(CLEAN_MOD)
+ rm -f $(EXEC)
+ rm -f *.c~ *.h~ Makefile~
+.PHONY: install
+install: $(EXEC)
+ cp $(EXEC) $(DEST_DIR)/$(EXEC)
+
+.PHONY: mrproper
+mrproper: clean
+ rm -f $(DEST_DIR)/$(EXEC)
+
Added: trunk/target/demos/real_time/fractal/Makefile
===================================================================
--- trunk/target/demos/real_time/fractal/Makefile (rev 0)
+++ trunk/target/demos/real_time/fractal/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,24 @@
+CC=arm-linux-gcc
+CFLAGS=-g -W -Wall
+LDFLAGS=
+EXEC=newton
+SRC= $(wildcard *.c)
+OBJ= $(SRC:.c=.o)
+
+all: $(EXEC)
+
+newton: $(OBJ)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+%.o: %.c
+ $(CC) -o $@ -c $< $(CFLAGS)
+
+.PHONY: clean install
+
+clean:
+ rm -rf *.o
+ rm -f $(EXEC)
+ rm -f *.c~ *.h~ Makefile~
+install: all
+ cp -f $(EXEC) /tftpboot/local/bin
+
Added: trunk/target/demos/real_time/fractal/README
===================================================================
--- trunk/target/demos/real_time/fractal/README (rev 0)
+++ trunk/target/demos/real_time/fractal/README 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,6 @@
+** Distributed computing for overloading processor **
+
+Calculation and displays a fractal newton distributed.
+Master : creates processus with fork, distributes parts and displays the result.
+10 slaves : computes parts of the picture.
+10 esclaves qui font le calcul d'une partie de l'image.
Added: trunk/target/demos/real_time/fractal/lcd.c
===================================================================
--- trunk/target/demos/real_time/fractal/lcd.c (rev 0)
+++ trunk/target/demos/real_time/fractal/lcd.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,92 @@
+#include <errno.h>
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <linux/fb.h>
+#include <sys/mman.h>
+
+#include "lcd.h"
+
+#define RMAX 2.
+#define RMIN -3.
+#define IMAX 2.5
+#define IMIN -2.5
+
+char *fbp = 0;
+
+
+struct fb_var_screeninfo vinfo;
+struct fb_fix_screeninfo finfo;
+long int screensize = 0;
+
+
+int init_lcd(){
+ // Open the file for reading and writing
+ int fbfd = open("/dev/fb0", O_RDWR);
+ if (!fbfd) {
+ printf("Error: cannot open framebuffer device.\n");
+ return -1;
+ }
+ printf("The framebuffer device was opened successfully.\n");
+
+ // Get fixed screen information
+ if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
+ printf("Error reading fixed information.\n");
+ return -1;
+ }
+
+ // Get variable screen information
+ if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
+ printf("Error reading variable information.\n");
+ return -1;
+ }
+
+ printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel );
+
+ // Figure out the size of the screen in bytes
+ screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;
+
+ // Map the device to memory
+ fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED,
+ fbfd, 0);
+ if ((int)fbp == -1) {
+ printf("Error: failed to map framebuffer device to memory.\n");
+ return -1;
+ }
+ printf("The framebuffer device was mapped to memory successfully.\n");
+ return fbfd;
+ }
+
+void close_LCD(int fbfd){
+ munmap(fbp, screensize);
+ close(fbfd);
+ }
+
+
+void print_pix(int x, int y, int r, int g, int b){
+ long int location = 0;
+ if(x>=320)x=319;
+ if(y>=240)x=239;
+ if(x<0)x=0;
+ if(y<0)x=0;
+ location = (x+vinfo.xoffset) * (vinfo.bits_per_pixel/8) +
+ (y+vinfo.yoffset) * finfo.line_length;
+
+ unsigned short int t = ((r&0xf8)>>3)<<11 | ((g&0xfc)>>2) << 5 | ((b&0xf8)>>3);
+ *((unsigned short int*)(fbp + location)) = t;
+}
+
Added: trunk/target/demos/real_time/fractal/lcd.h
===================================================================
--- trunk/target/demos/real_time/fractal/lcd.h (rev 0)
+++ trunk/target/demos/real_time/fractal/lcd.h 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,15 @@
+#ifndef LCD_H
+#define LCD_H
+
+#define POINTSX 320.
+#define POINTSY 242.
+#define RMAX 2.
+#define RMIN -3.
+#define IMAX 2.5
+#define IMIN -2.5
+
+int init_lcd ();
+void close_LCD(int fbfd);
+void print_pix(int x, int y, int r, int g, int b);
+
+#endif /* LCD_H */
Added: trunk/target/demos/real_time/fractal/main.c
===================================================================
--- trunk/target/demos/real_time/fractal/main.c (rev 0)
+++ trunk/target/demos/real_time/fractal/main.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,199 @@
+/*
+* Calculation and displays a fractal newton distributed.
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "newton.h"
+#include "lcd.h"
+
+#define LECTURE 0
+#define ECRITURE 1
+
+
+#define NB_CHILD 10
+
+typedef struct str_color {
+ int r;
+ int g;
+ int b;
+} colour;
+
+typedef struct elem_pict {
+ float ii;
+ int x;
+ int y;
+ int height;
+ int width;
+ int numFils;
+ colour ligne[24][320];
+} elemPict;
+
+
+/* methode utilisee pour le fils pour
+ * faire son calcul
+ */
+void workChildren(elemPict *ep) {
+ float ii,ri,r,i;
+ int yy = 0,y=0;
+ int totaliter=0;
+ int x=0,maxiter=0, iter=0;//, yy = ep->y;
+ float fin = (RMAX-RMIN)/POINTSX;
+ float finY = (IMAX-IMIN)/POINTSY;
+ float yDeb = IMIN+(finY*ep->y);
+
+
+ for (ii=yDeb;ii<IMAX;ii+=(IMAX-IMIN)/POINTSY){ // terminal : 105x54
+ for (ri=RMIN;ri<RMAX;ri+=(RMAX-RMIN)/POINTSX) {
+ iter=0;
+ r=ri; i=ii;
+ do {
+ newton(&r,&i);
+ iter++;
+ }while ((module(r,i)<0.999) || (module(r,i)>1.001));
+ if (iter>maxiter)
+ maxiter=iter;
+ totaliter+=iter;
+ if (y >= (ep->height)) return;
+ ep->ligne[y][x].r = ep->ligne[y][x].g = ep->ligne[y][x].b = 0;
+ if (r>0){
+ ep->ligne[y][x].r = 255;
+ } else{
+ if (i>0){
+ ep->ligne[y][x].g = 255;
+ } else{
+ ep->ligne[y][x].b = 255;
+ }
+ }
+ x++;
+ }
+ y++;x=0;
+ }
+}
+
+
+/* Travail fait par le maitre */
+void workMaster(int *tabChildPipe, int global) {
+ int nbChild = NB_CHILD;
+ int i,lignDeb;
+ // Envoi de la commande de traitement
+ elemPict ep;
+ for (i=0,lignDeb=0;i<NB_CHILD;i++,lignDeb+=24) {
+ ep.x=0;
+ ep.y=lignDeb;
+ ep.height=24;
+ ep.numFils=i;
+ write(tabChildPipe[i],&ep,sizeof(elemPict));
+ }
+
+ // Mise en attente de l'ensemble des calculs
+ do {
+ int size = read(global,&ep,sizeof(elemPict)+1);
+ printf("recu de %d debut %d fin %d\n",ep.numFils,ep.y,ep.height+ep.numFils);
+ if (size != sizeof(elemPict)) {
+ printf("bizarre\n");
+ continue;
+ }
+ nbChild --;
+ int yy,x,y;
+ for (yy=0,y=ep.y;yy<24;y++,yy++) {
+ for (x=0;x<POINTSX;x++){
+ print_pix(x,y,ep.ligne[yy][x].r,ep.ligne[yy][x].g,ep.ligne[yy][x].b);
+ }
+ }
+ } while (nbChild >0);
+}
+
+void prepareChild(int *reception, int *versMaster) {
+ close(versMaster[LECTURE]);
+ close(reception[ECRITURE]);
+ elemPict ep;
+ read(reception[LECTURE], &ep, sizeof(elemPict));
+ workChildren(&ep);
+ write(versMaster[1],&ep,sizeof(elemPict));
+ close(versMaster[ECRITURE]);
+ close(reception[LECTURE]);
+}
+
+/* pipe : 0 => lecture dans le pipe , 1 => ecriture dans le pipe */
+
+int main(int argc, char **argv) {
+ int global[2];
+ int tabChildPipe[NB_CHILD];
+ int pidChildPipe[NB_CHILD];
+ /* Preparation de la pipe commune
+ * enfant vers pere
+ */
+ if (pipe(global) == -1) {
+ perror("pipeToMaster");
+ return(EXIT_FAILURE);
+ }
+ /* Création de tous les processus fils */
+ int pos;
+ int receptionFils[2];
+ for (pos = 0; pos < NB_CHILD; pos ++ ) {
+ if (pipe(receptionFils) == -1){
+ perror("pipeToMaster");
+ return(EXIT_FAILURE);
+ }
+ int pid = fork();
+ switch (pid) {
+ case -1:
+ printf("ca merde\n");
+ return -1;
+ break;
+ case 0: // Fiston
+ prepareChild(receptionFils, global);
+ return EXIT_SUCCESS;
+ break;
+ default: // C'est le pere
+ // Fermeture de la lecture
+ close(receptionFils[LECTURE]);
+ tabChildPipe[pos] = receptionFils[ECRITURE];
+ pidChildPipe[pos] = pid;
+ break;
+ }
+ }
+ // C'est plus que le code du pere
+ close(global[ECRITURE]);
+ int fbfd = init_lcd();
+ workMaster(tabChildPipe,global[LECTURE]);
+ close(global[LECTURE]); // Fermeture du pipe d'ecoute
+ // Fermeture des pipes des enfants
+ for (pos = 0; pos < 1; pos++) {
+ close (tabChildPipe[pos]);
+ }
+ // Fermeture du framebuffer
+ close(fbfd);
+ // Mise en attente de la fin des autres
+ for (pos = 0; pos<1;pos ++) {
+ waitpid(pidChildPipe[pos],NULL,0);
+ }
+ return EXIT_SUCCESS;
+}
Added: trunk/target/demos/real_time/fractal/newton.c
===================================================================
--- trunk/target/demos/real_time/fractal/newton.c (rev 0)
+++ trunk/target/demos/real_time/fractal/newton.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,52 @@
+// Dynamical systems and fractals
+// K.-H. Becker & M. D\"orfler
+// Cambridge University Press (1990), chapter.4
+#include <errno.h>
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include "newton.h"
+
+void multiplie(float *r1,float *i1,float *r2,float *i2) {
+ float tmp;
+ tmp=((*r1) * (*r2)-(*i1) * (*i2));
+ *i1=((*i1)*(*r2)+(*i2)*(*r1));
+ *r1=tmp;
+}
+
+void addition(float *r1,float *i1,float *r2,float *i2) {
+ *r1=((*r1)+(*r2));
+ *i1=((*i1)+(*i2));
+}
+
+void division(float *r1,float *i1,float *r2,float *i2) {
+ float tmp;
+ tmp=((*r1) * (*r2)+(*i1) * (*i2)) / ((*r2)*(*r2)+(*i2)*(*i2));
+ *i1=((*i1) * (*r2)-(*r1) * (*i2)) / ((*r2)*(*r2)+(*i2)*(*i2));
+ *r1=tmp;
+}
+
+void newton(float *ri,float *ii) {
+ float r,i,r2,i2;
+ r2=*ri; i2=*ii;
+ r=*ri; i=*ii;
+ multiplie(&r2,&i2,&r,&i); // z -> z^2 dans (r2,i2)
+ multiplie(&r,&i,&r2,&i2); // z -> z^3 dans (r ,i )
+ r=r-1.; // z^3-1
+ r2=r2*3;
+ i2=i2*3;
+ division(&r,&i,&r2,&i2); // (z^3-1)/(2*z^2)
+ *ri=*ri-r;
+ *ii=*ii-i; // z-(z^3-1)/(2*z^2)
+}
+
+inline float module(float r,float i){
+ return(r*r+i*i);
+}
Added: trunk/target/demos/real_time/fractal/newton.h
===================================================================
--- trunk/target/demos/real_time/fractal/newton.h (rev 0)
+++ trunk/target/demos/real_time/fractal/newton.h 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,10 @@
+#ifndef NEWTON_H
+#define NEWTON_H
+
+void multiplie(float *r1,float *i1,float *r2,float *i2);
+void addition(float *r1,float *i1,float *r2,float *i2);
+void division(float *r1,float *i1,float *r2,float *i2);
+void newton(float *ri,float *ii);
+inline float module(float r,float i);
+
+#endif /* NEWTON_H */
Added: trunk/target/demos/real_time/interrupt/linux/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/Makefile (rev 0)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,4 @@
+###### CONFIGURATION ######
+MODULES=irq_linux_kernel
+
+include /home/gwe/armadeus/stage/devel/Makefile.in
Added: trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c (rev 0)
+++ trunk/target/demos/real_time/interrupt/linux/kernel/interrupt_linux_kernel.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,80 @@
+/*
+* Small linux kernel driver for handling interrupt
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <linux/module.h>
+#include <asm/irq.h>
+#include <linux/irq.h>
+#include <asm/signal.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <gpio.h>
+
+#define IRQ_NB IRQ_GPIOA(6)
+
+MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
+MODULE_DESCRIPTION("irq kernel test");
+MODULE_SUPPORTED_DEVICE("none");
+MODULE_LICENSE("GPL");
+
+/* irq handler */
+irqreturn_t interrupt_handler (int irqn, void *dev){
+ printk("toto plop\n");
+ return IRQ_HANDLED;
+}
+
+/* loading (insmod) */
+static int __init irq_init(void) {
+ int err;
+ printk("irq init\n");
+ err =request_irq(IRQ_NB, interrupt_handler, 0/*IRQF_SHARED*/,"test irq", NULL);
+ if (err!=0){
+ printk(KERN_INFO "erreur de request_irq\n");
+ switch (err) {
+ case -EINVAL:
+ printk("EINVAL\n");
+ break;
+ case -ENOMEM:
+ printk("ENOMEM\n");
+ break;
+ case -EBUSY:
+ printk("EBUSY\n");
+ break;
+ case -ENXIO:
+ printk("ENXIO\n");
+ break;
+ }
+ return err;
+ }
+ set_irq_type( IRQ_NB, IRQF_TRIGGER_FALLING ); //pour changer le front
+ return 0;
+}
+
+/* unloading (rmmod) */
+void __exit irq_exit(void) {
+ printk(KERN_INFO "irq_exit\n");
+ free_irq(IRQ_NB,NULL);
+}
+
+/* Api Linux devices */
+module_init(irq_init);
+module_exit(irq_exit);
Added: trunk/target/demos/real_time/interrupt/linux/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/Makefile (rev 0)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,4 @@
+###### CONFIGURATION ######
+APPLICATIONS=irq_linux_us
+
+include /home/gwe/armadeus/stage/devel/Makefile.in
Added: trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c
===================================================================
--- trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c (rev 0)
+++ trunk/target/demos/real_time/interrupt/linux/user_space/interrupt_linux_us.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,67 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <unistd.h>
+
+
+#define FALSE 0
+#define TRUE 1
+volatile int STOP=FALSE;
+int wait_flag=TRUE;
+void
+action (int signo, siginfo_t * si, void *data)
+{
+ printf (" -------------- Got the %d signal ------------\n", signo);
+}
+
+int
+main (int argc, char **argv)
+{
+ int fd, res, oflags, retval = 0;
+ unsigned int buffer;
+char buf[255];
+//struct sigaction oa;
+// struct sigaction sa;
+ // sa.sa_sigaction = action;
+ //sa.sa_flags = 0;
+ //sa.sa_restorer = NULL;
+ //sigemptyset(&sa.sa_mask);
+
+ //sigaction (SIGIO, &sa, &oa);
+
+ // Open gpio file device for communication;
+ fd = open ("/dev/gpio/PA6", O_RDONLY);
+ if (fd < 0)
+ {
+ printf ("Open Failed\n");
+ exit (EXIT_FAILURE);
+ }
+
+ // set this process as owner of device file
+ retval = fcntl (fd, F_SETOWN, getpid ());
+ if (retval < 0)
+ {
+ printf ("F_SETOWN fails \n");
+ }
+ //retval = 0;
+ // enable the gpio async notifications
+ //oflags = fcntl (fd, F_GETFL);
+ //retval = fcntl (fd, F_SETFL, oflags | FASYNC);
+ /*if (retval < 0)
+ {
+ printf ("F_SETFL Fails \n");
+ }*/
+ while (STOP == FALSE)
+ {
+ usleep (100000);
+ res = read (fd, buf, 255);
+ printf(".\n");
+ buf[res] = 0;
+ printf ("%d:%x:%d\n", (int)buf[6],buf, res);
+ }
+ close (fd);
+ exit (EXIT_SUCCESS);
+}
Added: trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile (rev 0)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,4 @@
+### List of modules to be build
+MODULES= interrupt_xeno_kernel
+
+include /home/gwe/armadeus/stage/devel/Makefile.in
Added: trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c (rev 0)
+++ trunk/target/demos/real_time/interrupt/xenomai/kernel/interrupt_xeno_kernel.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,71 @@
+/*
+* Small xenomai kernel driver for handling interrupt
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <linux/module.h>
+#include <native/task.h>
+#include <native/timer.h>
+#include <rtdm/rtdm_driver.h>
+#include <mach/hardware.h>
+#include <native/intr.h>
+
+
+MODULE_LICENSE("GPL");
+
+
+#define IRQ_NUMBER 70 /* Intercept interrupt #7 */
+#define TASK_PRIO 99 /* Highest RT priority */
+#define TASK_MODE 0 /* No flags */
+#define TASK_STKSZ 0 /* Stack size (use default one) */
+
+RT_INTR intr_desc;
+
+static int irq_server (xnintr_t *intr) {
+ printk("IT !\n");
+ return RT_INTR_HANDLED;
+}
+
+static int __init irq_init(void) {
+ int err;
+
+ /* Version With 6 param only on kernel space */
+ err = rt_intr_create(&intr_desc,"MyIrq", IRQ_NUMBER, irq_server, NULL, 0);
+ if (err !=0){
+ printk("rt_intr_create : error\n");
+ return err;
+ }
+
+ err = rt_intr_enable(&intr_desc);
+ if (err != 0)
+ printk("rt_intr_enable : error\n");
+ else
+ printk("rt_intr_create : ok\n");
+ return err;
+}
+
+void __init irq_exit(void) {
+ rt_intr_delete(&intr_desc);
+}
+
+module_init(irq_init);
+module_exit(irq_exit);
+
Added: trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile (rev 0)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,5 @@
+### List of applications to be build
+APPLICATIONS = interrupt_xeno_userspace
+### Set of compilation instructions
+include ../../../Makefile.in
+
Added: trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c
===================================================================
--- trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c (rev 0)
+++ trunk/target/demos/real_time/interrupt/xenomai/user_space/interrupt_xeno_userspace.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,86 @@
+/*
+* Small xenomai user space for handling interrupt
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <sys/mman.h>
+#include <native/task.h>
+#include <native/intr.h>
+
+#define IRQ_NUMBER 70 /* Intercept interrupt #7 */
+#define TASK_PRIO 99 /* Highest RT priority */
+#define TASK_MODE 0 /* No flags */
+#define TASK_STKSZ 0 /* Stack size (use default one) */
+
+RT_INTR intr_desc;
+
+RT_TASK server_desc;
+void cleanup(void);
+
+void irq_server (void *cookie) {
+ int err;
+ if (rt_intr_enable(&intr_desc) != 0) {
+ printf("erreur pour enable\n");
+ return;
+ }
+ for (;;) {
+ /* Wait for the next interrupt on channel #7. */
+ err = rt_intr_wait(&intr_desc,TM_INFINITE);
+ printf("tata plop\n");
+ if (err > 0) {
+ printf("interrupt retrouvee %d\n",err);
+ }
+ }
+}
+
+int main (int argc, char *argv[]) {
+ int err;
+
+ mlockall(MCL_CURRENT|MCL_FUTURE);
+
+ /* Version With 4 param only on userSpace */
+ err = rt_intr_create(&intr_desc,"MyIrq",IRQ_NUMBER,0);
+ if (err != 0){
+ printf("rt_intr_create : error\n");
+ return 1;
+ } else
+ printf("rt_intr_create : ok\n");
+
+ err = rt_task_create(&server_desc,
+ "MyIrqServer",
+ TASK_STKSZ,
+ TASK_PRIO,
+ TASK_MODE);
+ if (err == 0)
+ rt_task_start(&server_desc,&irq_server,NULL);
+ else{
+ printf("rt_task_start : error\n");
+ return 1;
+ }
+ getchar();
+ cleanup();
+ return 0;
+}
+
+void cleanup (void) {
+ rt_intr_delete(&intr_desc);
+ rt_task_delete(&server_desc);
+}
Added: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,3 @@
+###### CONFIGURATION ######
+MODULES=pulse_linux_kernel_sleep
+include ../../../../Makefile.in
Added: trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/kernel/sleep_kernel/pulse_linux_kernel_sleep.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,46 @@
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/kthread.h>
+#include <linux/delay.h>
+#include <linux/timer.h>
+#include <gpio.h>
+
+#define TIMESLEEP 10
+#define MINOR_PORT 4
+
+MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
+MODULE_DESCRIPTION("sleep kernel test");
+MODULE_SUPPORTED_DEVICE("none");
+MODULE_LICENSE("GPL");
+
+struct task_struct *th;
+
+/* thread fonction */
+int fct_thread_sleep(void *data) {
+ int iomask=1;
+ do {
+ imx_gpio_set_value(MINOR_PORT, iomask);
+ iomask^=1;
+ msleep(TIMESLEEP);
+ }while (!kthread_should_stop());
+ return 0;
+}
+
+/* loading (insmod) */
+static int __init blink_init(void) {
+ th = kthread_create(fct_thread_sleep,NULL,"pulse_linux_kernel_thread_sleep");
+ wake_up_process(th);
+ return 0;
+}
+
+
+/* unloading (rmmod) */
+static void __init blink_exit(void) {
+ printk(KERN_INFO "blink_exit\n");
+ kthread_stop(th);
+}
+
+/* API Linux devices */
+module_init(blink_init);
+module_exit(blink_exit);
Added: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,4 @@
+###### CONFIGURATION ######
+#LOCALDIR=/home/gwe/armadeus/armadeus/buildroot/project_build_armv4t/apf9328
+MODULES=pulse_linux_kernel_timer
+include ../../../../Makefile.in
Added: trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/kernel/timer_kernel/pulse_linux_kernel_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,56 @@
+/***********************************
+ * Pulse generator
+ *
+ * author : Gwenhael GOAVEC-MEROU
+ *
+ ***********************************/
+
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/kthread.h>
+#include <linux/delay.h>
+#include <linux/timer.h>
+#include <gpio.h>
+
+#define TIMESLEEP HZ/100
+#define MINOR_PORT 4
+
+MODULE_AUTHOR("Gwenhael GOAVEC MEROU");
+MODULE_DESCRIPTION("sleep kernel test");
+MODULE_SUPPORTED_DEVICE("none");
+MODULE_LICENSE("GPL");
+
+static int iomask = 0x00;
+static struct timer_list mt;
+
+/* timer callback*/
+void fonctionTimer(unsigned long arg) {
+ imx_gpio_set_value(MINOR_PORT, iomask);
+ iomask^=1;
+ mt.expires = jiffies+TIMESLEEP;
+ add_timer(&mt);
+}
+
+/* loading (insmod) */
+static int __init blink_init(void) {
+ current->state = TASK_INTERRUPTIBLE;
+ init_timer(&mt);
+ mt.expires = jiffies + TIMESLEEP;
+ mt.data = (unsigned long) current;
+ mt.function = fonctionTimer;
+ add_timer(&mt);
+ printk(KERN_INFO "blink_init\n");
+ return 0;
+}
+
+/* unloading (rmmod) */
+static void __init blink_exit(void) {
+ printk(KERN_INFO "blink_exit\n");
+ del_timer(&mt);
+}
+
+/* Api Linux devices */
+module_init(blink_init);
+module_exit(blink_exit);
Added: trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/user_space/sleep/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,3 @@
+APPLICATIONS=pulse_linux_userspace_sleep
+
+include ../../../../Makefile.in
Added: trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/user_space/sleep/pulse_linux_userspace_sleep.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+int main(int argc, char **argv) {
+
+ int fd;
+ int iomask;
+ if ((fd = open("/dev/gpio/PA4", O_RDWR))<0) {
+ printf("Open error on /dev/gpio/PA4\n");
+ exit(0);
+ }
+ iomask=0x00;
+ printf("Opened on /dev/gpio/PA4\n");
+ while(1){
+ iomask^=1;
+ write(fd,&iomask,sizeof(iomask));
+ usleep(10000);
+ }
+ close(fd);
+ exit(0);
+}
Added: trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/user_space/timer/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,3 @@
+APPLICATIONS=pulse_linux_userspace_timer
+include ../../../../Makefile.in
+
Added: trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c (rev 0)
+++ trunk/target/demos/real_time/pulse/linux/user_space/timer/pulse_linux_userspace_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,35 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#define TIMESLEEP 1
+#define PORT "/dev/gpio/PA4"
+
+int fd;
+int iomask;
+void test() {
+ printf("hello world\n");
+ write(fd, &iomask, sizeof(iomask));
+ iomask ^=1;
+}
+
+int main(int argc, char **argv) {
+ printf("**** G\xE9n\xE9rateur d'impulsions avec timer en mode utilisateur ****\n");
+
+ fd = open(PORT,O_RDWR);
+ if (fd < 0) {
+ printf("erreur\n");
+ return 1;
+ }
+ iomask = 1;
+ do {
+ signal(SIGALRM,test);
+ alarm(TIMESLEEP);
+ pause();
+ } while(1);
+ return 0;
+}
Added: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,4 @@
+### List of modules to be build
+MODULES = pulse_xeno_kernel_rt_timer
+
+include /home/gwe/armadeus/stage/devel/Makefile.in
Added: trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/rt_timer/pulse_xeno_kernel_rt_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,93 @@
+/*
+* Xenomai kernel driver for generating pulses
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <linux/module.h>
+#include <native/task.h>
+#include <native/timer.h>
+#include <native/sem.h>
+#include <mach/hardware.h>
+#include <nucleus/types.h>
+#include <gpio.h>
+
+MODULE_LICENSE("GPL");
+
+RT_TASK blink_task;
+static int end = 0;
+
+#define TIMESLEEP 10000000llu
+#define MINOR_PORT 4
+#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
+#define MXC_DR(x) (0x1c + ((x) << 8))
+#define VA_GPIO_BASE IO_ADDRESS(IMX_GPIO_BASE)
+#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
+
+void blink(void *arg){
+ int err, iomask;
+ printk(KERN_INFO "entrering blink\n");
+
+ if (imx_gpio_request(GPIO_PORTA | MINOR_PORT, "blink") < 0) {
+ gpio_free(MINOR_PORT);
+ return ;
+ }
+ imx_gpio_direction_output(GPIO_PORTA | MINOR_PORT,1);
+
+ if ((err = rt_task_set_periodic(NULL, TM_NOW,rt_timer_ns2ticks(TIMESLEEP)))){
+ printk("rt task set periodic failed \n");
+ return;
+ }
+ iomask=0;
+
+ while(!end){
+ rt_task_wait_period(NULL);
+ imx_gpio_set_value(GPIO_PORTA | MINOR_PORT, iomask);
+ iomask^=1;
+ }
+ printk("fin\n");
+}
+
+
+static int __init blink_init(void) {
+ printk(KERN_INFO "blink_init\n");
+ if (rt_task_create(&blink_task, "blink", 0, 99, 0)) {
+ printk("task create error\n");
+ return -EBUSY;
+ }
+ if (rt_task_start(&blink_task, &blink, NULL)) {
+ printk("task start error\n");
+ return -EBUSY;
+ }
+ return 0;
+}
+
+/* Fin de la tache (rmmod) */
+static void __init blink_exit(void) {
+ end = 1;
+ printk(KERN_INFO "blink_exit\n");
+ rt_task_delete(&blink_task);
+ rt_timer_stop();
+ gpio_free(MINOR_PORT);
+}
+
+/* Points d'entrée API modules Linux */
+module_init(blink_init);
+module_exit(blink_exit);
Added: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,3 @@
+### List of modules to be build
+MODULES = pulse_xeno_kernel_timer
+include /home/gwe/armadeus/stage/devel/Makefile.in
Added: trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/kernel/timer_kernel/pulse_xeno_kernel_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,79 @@
+/*
+* Xenomai kernel driver for generating pulse with timer
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+
+#include <linux/module.h>
+#include <native/task.h>
+#include <native/timer.h>
+#include <rtdm/rtdm_driver.h>
+#include <mach/hardware.h>
+#include <gpio.h>
+
+MODULE_LICENSE("GPL");
+
+static rtdm_task_t blink_task;
+static int end = 0;
+
+#define TIMESLEEP 5000000
+#define MINOR_PORT 4
+#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
+#define MXC_DR(x) (0x1c + ((x) << 8))
+#define VA_GPIO_BASE IO_ADDRESS(IMX_GPIO_BASE)
+#define PORT_ADDR VA_GPIO_BASE + MXC_DR(0)
+
+void blink(void *arg){
+ int iomask;
+ printk(KERN_INFO "entrering blink\n");
+ iomask=0;
+ while(!end){
+ rtdm_task_wait_period();
+ gpio_set_value(MINOR_PORT, iomask);
+ iomask^=1;
+ }
+ printk("fin\n");
+}
+
+
+static int __init blink_init(void) {
+ printk(KERN_INFO "blink_init\n");
+ if (gpio_request(MINOR_PORT, "blink") < 0) {
+ gpio_free(MINOR_PORT);
+ return -EBUSY;
+ }
+ gpio_direction_output(MINOR_PORT,1);
+
+ return rtdm_task_init(&blink_task, "blink", blink, NULL,
+ 99, TIMESLEEP);
+}
+
+/* Fin de la tache (rmmod) */
+static void __init blink_exit(void) {
+ end = 1;
+ printk(KERN_INFO "blink_exit\n");
+ rtdm_task_join_nrt(&blink_task,100);
+ gpio_free(MINOR_PORT);
+}
+
+/* Points d'entrée API modules Linux */
+module_init(blink_init);
+module_exit(blink_exit);
Added: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,5 @@
+### List of applications to be build
+APPLICATIONS = pulse_xeno_userspace_timer
+
+include ../../../../Makefile.in
+
Added: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_sleep/pulse_xeno_userspace_sleep.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,90 @@
+/*
+* Small xenomai userspace apps for generating signal
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/ppdev.h>
+#include <signal.h>
+#include <sys/mman.h>
+
+#include <native/task.h>
+#include <native/timer.h>
+#include <rtdm/rtdm.h>
+
+RT_TASK blink_task;
+int write_fd = -1;
+
+#define TIMESLEEP 10000000
+#define WRITE_FILE "gpio/PA4"
+
+#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
+
+void blink(void *arg){
+ int iomask;
+ struct timespec tim = {0,TIMESLEEP};
+
+ iomask=0x00;
+
+ while(1){
+ rt_dev_write(write_fd,&iomask,sizeof(iomask));
+ iomask^=1;
+ if (nanosleep(&tim,NULL) != 0) {
+ printf("erreur de usleep\n");
+ return;
+ }
+ }
+}
+
+
+void catch_signal(int sig){}
+
+int main(int argc, char **argv) {
+
+ signal(SIGTERM, catch_signal);
+ signal(SIGINT, catch_signal);
+
+
+ /* Avoid memory swapping for this program */
+ mlockall(MCL_CURRENT|MCL_FUTURE);
+
+
+ /* Ouverture du descripteur de fichier */
+ if ((write_fd = rt_dev_open(WRITE_FILE, 0)) < 0) {
+ printf("Cannot open /dev/%s\n",WRITE_FILE);
+ return 1;
+ }
+
+ rt_task_create(&blink_task, "blinkLed", 0, 99, 0);
+ rt_task_start(&blink_task, &blink, NULL);
+
+ pause();
+
+ rt_task_delete(&blink_task);
+ rt_dev_close(write_fd);
+ return 0;
+}
Added: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/Makefile 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,5 @@
+### List of applications to be build
+APPLICATIONS = pulse_xeno_userspace_timer
+
+include ../../../../Makefile.in
+
Added: trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c
===================================================================
--- trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c (rev 0)
+++ trunk/target/demos/real_time/pulse/xenomai/user_space/pulse_timer/pulse_xeno_userspace_timer.c 2009-03-24 14:07:40 UTC (rev 1188)
@@ -0,0 +1,91 @@
+/*
+* Small xenomai userspace apps for generating signal
+*
+* Copyright (C) 2009 <gwe...@ar...>
+* Armadeus Project / Armadeus Systems
+*
+*
+* 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, 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.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/ppdev.h>
+#include <signal.h>
+#include <sys/mman.h>
+
+#include <native/task.h>
+#include <native/timer.h>
+
+RT_TASK blink_task;
+
+#define TIMESLEEP 10000000
+#define GPIOWRDIRECTION _IOW(PP_IOCTL, 0xF1, int)
+
+/* Revoir en se basant sur cross-link.c */
+
+void blink(void *arg){
+ int fd, iomask;
+ if ((fd = open("/dev/gpio/PA4", O_RDWR))<0) {
+ printf("Open error on /dev/gpio/portD\n");
+ exit(0);
+ }
+ iomask=0x00;
+
+ rt_task_set_periodic(NULL, TM_NOW, TIMESLEEP);
+
+ while(1){
+ rt_task_wait_period(NULL);
+ write(fd,&iomask,sizeof(iomask));
+ iomask^=1;
+ }
+ close(fd);
+}
+
+void catch_signal() {}
+
+int main(int argc, char **argv) {
+
+ signal(SIGTERM, catch_signal);
+ signal(SIGINT, catch_signal);
+
+ /* Avoids memory swapping for this program */
+ mlockall(MCL_CURRENT|MCL_FUTURE);
+
+ /*
+ * Arguments: &task,
+ * name,
+ * stack size (0=default),
+ * priority,
+ * mode (FPU, start suspended, ...)
+ */
+ rt_task_create(&blink_task, "blinkLed", 0, 99, 0);
+
+ /*
+ * Arguments: &task,
+ * task function,
+ * function argument
+ */
+ rt_task_start(&blink_task, &blink, NULL);
+ pause();
+ rt_task_delete(&blink_task);
+ return 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-24 11:32:10
|
Revision: 1187
http://armadeus.svn.sourceforge.net/armadeus/?rev=1187&view=rev
Author: artemys
Date: 2009-03-24 11:32:02 +0000 (Tue, 24 Mar 2009)
Log Message:
-----------
[LINUX] Corrects bug in I2C bus declaration in apf27.c
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-03-23 22:24:07 UTC (rev 1186)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-03-24 11:32:02 UTC (rev 1187)
@@ -1265,7 +1265,7 @@
+ mxc_register_device(&imx_i2c_device1, &apf27_i2c_1_data);
+
+ i2c_register_board_info(0, apf27_i2c_devices_bus0,
-+ ARRAY_SIZE(apf27_i2c_devices_bus1));
++ ARRAY_SIZE(apf27_i2c_devices_bus0));
+
+ i2c_register_board_info(1, apf27_i2c_devices_bus1,
+ ARRAY_SIZE(apf27_i2c_devices_bus1));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-23 22:24:09
|
Revision: 1186
http://armadeus.svn.sourceforge.net/armadeus/?rev=1186&view=rev
Author: artemys
Date: 2009-03-23 22:24:07 +0000 (Mon, 23 Mar 2009)
Log Message:
-----------
[DEBUG] Corrects some CSI and PrP register names in imxregs
Modified Paths:
--------------
trunk/target/linux/debug/imxregs/imx27regs.h
Modified: trunk/target/linux/debug/imxregs/imx27regs.h
===================================================================
--- trunk/target/linux/debug/imxregs/imx27regs.h 2009-03-22 21:32:37 UTC (rev 1185)
+++ trunk/target/linux/debug/imxregs/imx27regs.h 2009-03-23 22:24:07 UTC (rev 1186)
@@ -916,13 +916,13 @@
{ "PRP_DEST_Y_PTR", 0x10026420, 0, 0xffffffff, 'x', "PrP Destination Y Frame Start Address" },
{ "PRP_DEST_CB_PTR", 0x10026424, 0, 0xffffffff, 'x', "PrP Destination CB Frame Start Address" },
{ "PRP_DEST_CR_PTR", 0x10026428, 0, 0xffffffff, 'x', "PrP Destination CR Frame Start Address" },
-{ "PRP_SOURCE_FRAME_SIZE", 0x1002642C, 0, 0xffffffff, 'x', "PrP Source Frame Size Register" },
+{ "PRP_SRC_FRAME_SIZE", 0x1002642C, 0, 0xffffffff, 'x', "PrP Source Frame Size Register" },
{ "PRP_CH1_LINE_STRIDE", 0x10026430, 0, 0xffffffff, 'x', "PrP Channel-1 Line stride Register" },
{ "PRP_SRC_PIXEL_FORMAT_CNTL", 0x10026434, 0, 0xffffffff, 'x', "PrP Source Pixel Format Control Register" },
{ "PRP_CH1_PIXEL_FORMAT_CNTL", 0x10026438, 0, 0xffffffff, 'x', "PrP CH1 Pixel Format Control Register" },
{ "PRP_CH1_OUT_IMAGE_SIZE", 0x1002643C, 0, 0xffffffff, 'x', "PrP CH1 Output Image Size Register" },
{ "PRP_CH2_OUT_IMAGE_SIZE", 0x10026440, 0, 0xffffffff, 'x', "PrP CH2 Output Image Size Register" },
-{ "PRP_SOURCE_LINE_STRIDE", 0x10026444, 0, 0xffffffff, 'x', "PrP Source Line Stride Register" },
+{ "PRP_SRC_LINE_STRIDE", 0x10026444, 0, 0xffffffff, 'x', "PrP Source Line Stride Register" },
{ "PRP_CSC_COEFF_012", 0x10026448, 0, 0xffffffff, 'x', "PrP CSC Coefficients 0, 1, and" },
{ "PRP_CSC_COEFF_345", 0x1002644C, 0, 0xffffffff, 'x', "PrP CSC Coefficients 3, 4, and" },
{ "PRP_CSC_COEFF_678", 0x10026450, 0, 0xffffffff, 'x', "PrP CSC Coefficients 6, 7, and" },
@@ -1212,14 +1212,14 @@
{ "FIPNDH", 0x10040060, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register High" },
{ "FIPNDL", 0x10040064, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register Low" },
// CSI
-{ "CSICR1", 0x80000000, 0, 0xffffffff, 'x', "CSI Control Register 1" },
-{ "CSICR2", 0x80000004, 0, 0xffffffff, 'x', "CSI Control Register 2" },
-{ "CSISR", 0x80000008, 0, 0xffffffff, 'x', "CSI Status Register" },
-{ "CSISTATR", 0x8000000C, 0, 0xffffffff, 'x', "CSI Statistic FIFO Register" },
-{ "CSIRXR", 0x80000010, 0, 0xffffffff, 'x', "CSI RxFIFO Register" },
-{ "CSIRXCNT", 0x80000014, 0, 0xffffffff, 'x', "CSI RX Count Register" },
-{ "CSIDEBUG", 0x80000018, 0, 0xffffffff, 'x', "CSI Debug Register" },
-{ "CSICR3", 0x8000001C, 0, 0xffffffff, 'x', "CSI Control Register 3" },
+{ "CSICR1", 0x80000000, 0, 0xffffffff, 'x', "CSI Control Register 1" },
+{ "CSICR2", 0x80000004, 0, 0xffffffff, 'x', "CSI Control Register 2" },
+{ "CSISR", 0x80000008, 0, 0xffffffff, 'x', "CSI Status Register" },
+{ "CSISTATFIFO", 0x8000000C, 0, 0xffffffff, 'x', "CSI Statistic FIFO Register" },
+{ "CSIRFIFO", 0x80000010, 0, 0xffffffff, 'x', "CSI RxFIFO Register" },
+{ "CSIRXCNT", 0x80000014, 0, 0xffffffff, 'x', "CSI RX Count Register" },
+{ "CSIDEBUG", 0x80000018, 0, 0xffffffff, 'x', "CSI Debug Register" },
+{ "CSICR3", 0x8000001C, 0, 0xffffffff, 'x', "CSI Control Register 3" },
// ATA
{ "TIME_CONFIG0", 0x80001000, 0, 0xffffffff, 'x', "ATA timing parameter 0." },
{ "TIME_CONFIG1", 0x80001004, 0, 0xffffffff, 'x', "ATA timing parameter 1." },
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-03-22 21:32:43
|
Revision: 1185
http://armadeus.svn.sourceforge.net/armadeus/?rev=1185&view=rev
Author: jorasse
Date: 2009-03-22 21:32:37 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
[ARMADEUS] Add makefile target to automatize build of any armadeus target
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-03-22 18:00:25 UTC (rev 1184)
+++ trunk/Makefile 2009-03-22 21:32:37 UTC (rev 1185)
@@ -133,6 +133,15 @@
echo -e "\033[1m\nThis configuration does not exist !!\n\033[0m" ; \
fi;
+%_autoconf: $(BUILDROOT_DIR)/.unpacked
+ @if [ -e "$(BUILDROOT_DIR)/target/device/armadeus/$(patsubst %_autoconf,%,$@)/$(patsubst %_autoconf,%,$@)_defconfig" ]; then \
+ rm -f $(BUILDROOT_DIR)/.config ; \
+ $(MAKE) -C $(BUILDROOT_DIR) $(patsubst %_autoconf,%,$@)_defconfig ; \
+ touch $(BUILDROOT_DIR)/.configured ; \
+ else \
+ echo -e "\033[1m\nThis configuration does not exist !!\n\033[0m" ; \
+ fi;
+
all: $(BUILDROOT_DIR)/.configured
@echo "If your /bin/sh link doesn't point to /bin/bash, please correct that."
@ls -al /bin/sh | grep bash
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-22 18:00:29
|
Revision: 1184
http://armadeus.svn.sourceforge.net/armadeus/?rev=1184&view=rev
Author: artemys
Date: 2009-03-22 18:00:25 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
[DEBUG] Makes eMMA PreProcessor registers accessible from imxregs
Modified Paths:
--------------
trunk/target/linux/debug/imxregs/imx27regs.h
Modified: trunk/target/linux/debug/imxregs/imx27regs.h
===================================================================
--- trunk/target/linux/debug/imxregs/imx27regs.h 2009-03-22 17:58:48 UTC (rev 1183)
+++ trunk/target/linux/debug/imxregs/imx27regs.h 2009-03-22 18:00:25 UTC (rev 1184)
@@ -905,39 +905,39 @@
{ "PP_CSC_COEFF_012", 0x10026038, 0, 0xffffffff, 'x', "PP CSC Coefficient 0, 1, and" },
{ "PP_CSC_COEFF_34", 0x1002603C, 0, 0xffffffff, 'x', "PP CSC Coefficient 3 and 4" },
// { "PP_RESIZE_COEF_TBL", 0x10026100 - 0x1002617C, 0, 0xffffffff, 'x', "PP Resize Coefficient Table Register" },
-{ "PrP_CNTL", 0x10026400, 0, 0xffffffff, 'x', "PrP Control Register" },
-{ "PrP_INTRCNTL", 0x10026404, 0, 0xffffffff, 'x', "PrP Interrupt Control Register" },
-{ "PrP_INTRSTATUS", 0x10026408, 0, 0xffffffff, 'x', "PrP interrupt Status Register" },
-{ "PrP_SOURCE_Y_PTR", 0x1002640C, 0, 0xffffffff, 'x', "PrP Source Y Frame Start Address" },
-{ "PrP_SOURCE_CB_PTR", 0x10026410, 0, 0xffffffff, 'x', "PrP Source CB Frame Start Address" },
-{ "PrP_SOURCE_CR_PTR", 0x10026414, 0, 0xffffffff, 'x', "PrP Source CR Frame Start Address" },
-{ "PrP_DEST_RGB1_PTR", 0x10026418, 0, 0xffffffff, 'x', "PrP Destination RGB Frame-1 Start Address" },
-{ "PrP_DEST_RGB2_PTR", 0x1002641C, 0, 0xffffffff, 'x', "PrP Destination RGB Frame-2 Start Address" },
-{ "PrP_DEST_Y_PTR", 0x10026420, 0, 0xffffffff, 'x', "PrP Destination Y Frame Start Address" },
-{ "PrP_DEST_CB_PTR", 0x10026424, 0, 0xffffffff, 'x', "PrP Destination CB Frame Start Address" },
-{ "PrP_DEST_CR_PTR", 0x10026428, 0, 0xffffffff, 'x', "PrP Destination CR Frame Start Address" },
-{ "PrP_SOURCE_FRAME_SIZE", 0x1002642C, 0, 0xffffffff, 'x', "PrP Source Frame Size Register" },
-{ "PrP_CH1_LINE_STRIDE", 0x10026430, 0, 0xffffffff, 'x', "PrP Channel-1 Line stride Register" },
-{ "PrP_SRC_PIXEL_FORMAT_CNTL", 0x10026434, 0, 0xffffffff, 'x', "PrP Source Pixel Format Control Register" },
-{ "PrP_CH1_PIXEL_FORMAT_CNTL", 0x10026438, 0, 0xffffffff, 'x', "PrP CH1 Pixel Format Control Register" },
-{ "PrP_CH1_OUT_IMAGE_SIZE", 0x1002643C, 0, 0xffffffff, 'x', "PrP CH1 Output Image Size Register" },
-{ "PrP_CH2_OUT_IMAGE_SIZE", 0x10026440, 0, 0xffffffff, 'x', "PrP CH2 Output Image Size Register" },
-{ "PrP_SOURCE_LINE_STRIDE", 0x10026444, 0, 0xffffffff, 'x', "PrP Source Line Stride Register" },
-{ "PrP_CSC_COEFF_012", 0x10026448, 0, 0xffffffff, 'x', "PrP CSC Coefficients 0, 1, and" },
-{ "PrP_CSC_COEFF_345", 0x1002644C, 0, 0xffffffff, 'x', "PrP CSC Coefficients 3, 4, and" },
-{ "PrP_CSC_COEFF_678", 0x10026450, 0, 0xffffffff, 'x', "PrP CSC Coefficients 6, 7, and" },
-{ "PrP_CH1_HRESIZE_COEFF1", 0x10026454, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Coefficients Register" },
-{ "PrP_CH1_HRESIZE_COEFF2", 0x10026458, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Coefficients Register" },
-{ "PrP_CH1_HRESIZE_VALID", 0x1002645C, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Valid Register" },
-{ "PrP_CH1_VRESIZE_COEFF1", 0x10026460, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Coefficients Register" },
-{ "PrP_CH1_VRESIZE_COEFF2", 0x10026464, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Coefficients Register" },
-{ "PrP_CH1_VRESIZE_VALID", 0x10026468, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Valid Register" },
-{ "PrP_CH2_HRESIZE_COEFF1", 0x1002646C, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Coefficients Register" },
-{ "PrP_CH2_HRESIZE_COEFF2", 0x10026470, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Coefficients Register" },
-{ "PrP_CH2_HRESIZE_VALID", 0x10026474, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Valid Register" },
-{ "PrP_CH2_VRESIZE_COEFF1", 0x10026478, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Coefficients Register" },
-{ "PrP_CH2_VRESIZE_COEFF2", 0x1002647C, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Coefficients Register" },
-{ "PrP_CH2_VRESIZE_VALID", 0x10026480, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Valid Register" },
+{ "PRP_CNTL", 0x10026400, 0, 0xffffffff, 'x', "PrP Control Register" },
+{ "PRP_INTRCNTL", 0x10026404, 0, 0xffffffff, 'x', "PrP Interrupt Control Register" },
+{ "PRP_INTRSTATUS", 0x10026408, 0, 0xffffffff, 'x', "PrP interrupt Status Register" },
+{ "PRP_SOURCE_Y_PTR", 0x1002640C, 0, 0xffffffff, 'x', "PrP Source Y Frame Start Address" },
+{ "PRP_SOURCE_CB_PTR", 0x10026410, 0, 0xffffffff, 'x', "PrP Source CB Frame Start Address" },
+{ "PRP_SOURCE_CR_PTR", 0x10026414, 0, 0xffffffff, 'x', "PrP Source CR Frame Start Address" },
+{ "PRP_DEST_RGB1_PTR", 0x10026418, 0, 0xffffffff, 'x', "PrP Destination RGB Frame-1 Start Address" },
+{ "PRP_DEST_RGB2_PTR", 0x1002641C, 0, 0xffffffff, 'x', "PrP Destination RGB Frame-2 Start Address" },
+{ "PRP_DEST_Y_PTR", 0x10026420, 0, 0xffffffff, 'x', "PrP Destination Y Frame Start Address" },
+{ "PRP_DEST_CB_PTR", 0x10026424, 0, 0xffffffff, 'x', "PrP Destination CB Frame Start Address" },
+{ "PRP_DEST_CR_PTR", 0x10026428, 0, 0xffffffff, 'x', "PrP Destination CR Frame Start Address" },
+{ "PRP_SOURCE_FRAME_SIZE", 0x1002642C, 0, 0xffffffff, 'x', "PrP Source Frame Size Register" },
+{ "PRP_CH1_LINE_STRIDE", 0x10026430, 0, 0xffffffff, 'x', "PrP Channel-1 Line stride Register" },
+{ "PRP_SRC_PIXEL_FORMAT_CNTL", 0x10026434, 0, 0xffffffff, 'x', "PrP Source Pixel Format Control Register" },
+{ "PRP_CH1_PIXEL_FORMAT_CNTL", 0x10026438, 0, 0xffffffff, 'x', "PrP CH1 Pixel Format Control Register" },
+{ "PRP_CH1_OUT_IMAGE_SIZE", 0x1002643C, 0, 0xffffffff, 'x', "PrP CH1 Output Image Size Register" },
+{ "PRP_CH2_OUT_IMAGE_SIZE", 0x10026440, 0, 0xffffffff, 'x', "PrP CH2 Output Image Size Register" },
+{ "PRP_SOURCE_LINE_STRIDE", 0x10026444, 0, 0xffffffff, 'x', "PrP Source Line Stride Register" },
+{ "PRP_CSC_COEFF_012", 0x10026448, 0, 0xffffffff, 'x', "PrP CSC Coefficients 0, 1, and" },
+{ "PRP_CSC_COEFF_345", 0x1002644C, 0, 0xffffffff, 'x', "PrP CSC Coefficients 3, 4, and" },
+{ "PRP_CSC_COEFF_678", 0x10026450, 0, 0xffffffff, 'x', "PrP CSC Coefficients 6, 7, and" },
+{ "PRP_CH1_HRESIZE_COEFF1", 0x10026454, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Coefficients Register" },
+{ "PRP_CH1_HRESIZE_COEFF2", 0x10026458, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Coefficients Register" },
+{ "PRP_CH1_HRESIZE_VALID", 0x1002645C, 0, 0xffffffff, 'x', "PrP CH1 Horizontal Resize Valid Register" },
+{ "PRP_CH1_VRESIZE_COEFF1", 0x10026460, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Coefficients Register" },
+{ "PRP_CH1_VRESIZE_COEFF2", 0x10026464, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Coefficients Register" },
+{ "PRP_CH1_VRESIZE_VALID", 0x10026468, 0, 0xffffffff, 'x', "PrP CH1 Vertical Resize Valid Register" },
+{ "PRP_CH2_HRESIZE_COEFF1", 0x1002646C, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Coefficients Register" },
+{ "PRP_CH2_HRESIZE_COEFF2", 0x10026470, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Coefficients Register" },
+{ "PRP_CH2_HRESIZE_VALID", 0x10026474, 0, 0xffffffff, 'x', "PrP CH2 Horizontal Resize Valid Register" },
+{ "PRP_CH2_VRESIZE_COEFF1", 0x10026478, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Coefficients Register" },
+{ "PRP_CH2_VRESIZE_COEFF2", 0x1002647C, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Coefficients Register" },
+{ "PRP_CH2_VRESIZE_VALID", 0x10026480, 0, 0xffffffff, 'x', "PrP CH2 Vertical Resize Valid Register" },
// PLLCLK
{ "CSCR", 0x10027000, 0, 0xffffffff, 'x', "Clock Source Control Register" },
{ "MPCTL0", 0x10027004, 0, 0xffffffff, 'x', "MPLL Control Register 0" },
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-22 17:58:52
|
Revision: 1183
http://armadeus.svn.sourceforge.net/armadeus/?rev=1183&view=rev
Author: artemys
Date: 2009-03-22 17:58:48 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
[BUILD] Makes quilt script stop when a patch won't apply
Modified Paths:
--------------
trunk/scripts/quilt.sh
Modified: trunk/scripts/quilt.sh
===================================================================
--- trunk/scripts/quilt.sh 2009-03-22 14:28:31 UTC (rev 1182)
+++ trunk/scripts/quilt.sh 2009-03-22 17:58:48 UTC (rev 1183)
@@ -40,6 +40,10 @@
done
quilt push -a
+if [ "$?" != 0 ]; then
+ echo "Please correct that"
+ exit 1
+fi
quilt series >> .applied_patches_list
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2009-03-22 14:28:41
|
Revision: 1182
http://armadeus.svn.sourceforge.net/armadeus/?rev=1182&view=rev
Author: artemys
Date: 2009-03-22 14:28:31 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
[LINUX] Add driver for i.MX27 VPU (par2)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.27.13.config
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch
Removed Paths:
-------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch
Modified: trunk/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.27.13.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.27.13.config 2009-03-22 09:38:51 UTC (rev 1181)
+++ trunk/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.27.13.config 2009-03-22 14:28:31 UTC (rev 1182)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27.13
-# Fri Mar 13 14:31:08 2009
+# Sun Mar 22 15:24:00 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1219,6 +1219,15 @@
# CONFIG_DMADEVICES is not set
#
+# MXC support drivers
+#
+
+#
+# MXC VPU(Video Processing Unit) support
+#
+# CONFIG_MXC_VPU is not set
+
+#
# Voltage and Current regulators
#
# CONFIG_REGULATOR is not set
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch 2009-03-22 09:38:51 UTC (rev 1181)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/318-apf27-pengu-mxc_add_vpu_driver.patch 2009-03-22 14:28:31 UTC (rev 1182)
@@ -21,11 +21,11 @@
Signed-off-by: Sascha Hauer <s....@pe...>
---
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 9722f8b..209a53d 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -1268,6 +1268,8 @@ source "drivers/rtc/Kconfig"
+Index: linux-2.6.27.13/arch/arm/Kconfig
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/Kconfig 2009-03-22 14:56:45.000000000 +0100
++++ linux-2.6.27.13/arch/arm/Kconfig 2009-03-22 14:58:09.000000000 +0100
+@@ -1239,6 +1239,8 @@
source "drivers/dma/Kconfig"
@@ -33,22 +33,20 @@
+
source "drivers/dca/Kconfig"
- source "drivers/auxdisplay/Kconfig"
-diff --git a/drivers/Makefile b/drivers/Makefile
-index fceb71a..99c847c 100644
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -102,3 +102,4 @@ obj-$(CONFIG_SSB) += ssb/
+ source "drivers/regulator/Kconfig"
+Index: linux-2.6.27.13/drivers/Makefile
+===================================================================
+--- linux-2.6.27.13.orig/drivers/Makefile 2009-03-22 14:56:45.000000000 +0100
++++ linux-2.6.27.13/drivers/Makefile 2009-03-22 14:59:05.000000000 +0100
+@@ -100,3 +100,4 @@
+ obj-$(CONFIG_SSB) += ssb/
obj-$(CONFIG_VIRTIO) += virtio/
obj-$(CONFIG_REGULATOR) += regulator/
- obj-$(CONFIG_STAGING) += staging/
+obj-y += mxc/
-\ No newline at end of file
-diff --git a/drivers/mxc/Kconfig b/drivers/mxc/Kconfig
-new file mode 100644
-index 0000000..90fcfd1
---- /dev/null
-+++ b/drivers/mxc/Kconfig
+Index: linux-2.6.27.13/drivers/mxc/Kconfig
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.27.13/drivers/mxc/Kconfig 2009-03-22 14:58:09.000000000 +0100
@@ -0,0 +1,13 @@
+# drivers/video/mxc/Kconfig
+
@@ -402,7 +400,7 @@
+ }
+/* RMW: this is not portable across platforms */
+#ifdef CONFIG_ARCH_MX27
-+ /* set/clear LHD (Latency Hiding Disable) bit in ESDCFG0 reg.
++ /* set/clear LHD (Latency Hiding Disable) bit in ESDCFG0 reg.
+ Tends to fix MPEG4 issue on MX27 TO2 */
+ case VPU_IOC_LHD:
+ {
Deleted: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch 2009-03-22 09:38:51 UTC (rev 1181)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/319-apf27-pengu-mx2_add_vpu_device.patch 2009-03-22 14:28:31 UTC (rev 1182)
@@ -1,19 +0,0 @@
-From: Sascha Hauer <s....@pe...>
-Date: Tue, 11 Nov 2008 14:46:05 +0000 (+0100)
-Subject: MX2: Add VPU (video processing unit) device
-X-Git-Url: http://pasiphae.extern.pengutronix.de/?p=imx%2Flinux-2.6.git;a=commitdiff_plain;h=362e97c9b0a6fa4b861462958ccdfcbdf8d3a118
-
-MX2: Add VPU (video processing unit) device
-
-Signed-off-by: Sascha Hauer <s....@pe...>
----
-
-diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
-index 64bb85b..c3c3a81 100644
---- a/arch/arm/mach-mx2/devices.h
-+++ b/arch/arm/mach-mx2/devices.h
-@@ -28,3 +28,4 @@ extern struct platform_device imx_i2c_device0;
- extern struct platform_device imx_i2c_device1;
- extern struct platform_device mx27_camera_device;
- extern struct platform_device mxc_fb_device;
-+extern struct platform_device mxc_vpu_device;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|