[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.0-2528-gb115a68
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-10-05 20:46:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via b115a688bd0635c27a9bea1a4931814b9f116958 (commit)
via 9094e1bd3ad613de22d63148912f24fd3dd788b6 (commit)
via 75c49d3741fa5ceb3e513ddb2dab70f45de71a0c (commit)
via 62589ddc82bcd3f035d3f4fdc3034718197daaf9 (commit)
via ed36f6cfaf16166b54602af2209173623d6d0900 (commit)
via e48564688a7c48e87edddede954650d67844d414 (commit)
via afbd60d3b8b426b37f4563c63fe82b36c991996b (commit)
via bed594eb2c34404e36138e6e4640cc909375adda (commit)
from f49894823ef466a292d20207dfcbdbf9b53e51eb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b115a688bd0635c27a9bea1a4931814b9f116958
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 5 22:31:18 2011 +0200
[BUILDROOT] Re-makes 1.3.4 the default APF9328 U-Boot version
commit 9094e1bd3ad613de22d63148912f24fd3dd788b6
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 5 21:00:34 2011 +0200
[BUILDROOT] Makes U-Boot's fw_printenv compile again with recent toolchains
commit 75c49d3741fa5ceb3e513ddb2dab70f45de71a0c
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 5 19:26:38 2011 +0200
[LINUX] POD infrastructure: Escape to the Void
commit 62589ddc82bcd3f035d3f4fdc3034718197daaf9
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 5 16:11:44 2011 +0200
[DEBUG] Fixes crash when imxregs is called without parameters
commit ed36f6cfaf16166b54602af2209173623d6d0900
Author: Julien Boibessot <jul...@ar...>
Date: Wed Oct 5 15:44:14 2011 +0200
Indentation
commit e48564688a7c48e87edddede954650d67844d414
Merge: afbd60d f498948
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 4 22:03:28 2011 +0200
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit afbd60d3b8b426b37f4563c63fe82b36c991996b
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 4 20:01:31 2011 +0200
[U-BOOT] [2010.03] Fixes build with external recent EABI toolchains
commit bed594eb2c34404e36138e6e4640cc909375adda
Author: Julien Boibessot <jul...@ar...>
Date: Tue Oct 4 16:57:51 2011 +0200
[BUILD] Fixes scripts/quiltify.sh for U-Boot usage
-----------------------------------------------------------------------
Summary of changes:
buildroot/configs/apf9328_defconfig | 3 +-
buildroot/configs/apf9328test_defconfig | 1 +
...w_printenv_build_with_external_toolchains.patch | 21 +
...apf9328-fixes_gcc_4_4_EABI_linking_issues.patch | 54 +---
...-fixes_gcc_4_4_or_4_5_EABI_linking_issues.patch | 23 ++
scripts/quiltify.sh | 2 +-
target/linux/debug/imxregs/imxregs.c | 395 ++++++++++----------
target/linux/modules/fpga/Makefile | 5 +-
target/linux/modules/fpga/POD/Kconfig | 2 +-
target/linux/modules/fpga/POD/Makefile | 11 +-
target/linux/modules/fpga/POD/void/Makefile | 24 --
target/linux/modules/fpga/POD/void/void.c | 45 ---
12 files changed, 249 insertions(+), 337 deletions(-)
create mode 100644 patches/buildroot/2011.05/159-u-boot-fix_fw_printenv_build_with_external_toolchains.patch
create mode 100644 patches/u-boot/2010.03/u-boot-2010.03-151-all-apf-fixes_gcc_4_4_or_4_5_EABI_linking_issues.patch
delete mode 100644 target/linux/modules/fpga/POD/void/Kconfig
delete mode 100755 target/linux/modules/fpga/POD/void/Makefile
delete mode 100755 target/linux/modules/fpga/POD/void/void.c
diff --git a/buildroot/configs/apf9328_defconfig b/buildroot/configs/apf9328_defconfig
index d828b79..4edd418 100644
--- a/buildroot/configs/apf9328_defconfig
+++ b/buildroot/configs/apf9328_defconfig
@@ -54,12 +54,13 @@ BR2_PACKAGE_MTD_SUMTOOL=y
BR2_PACKAGE_TSLIB=y
BR2_PACKAGE_NTP=y
# BR2_PACKAGE_NTP_NTPD is not set
-BR2_PACKAGE_NANO=y
BR2_PACKAGE_PORTMAP=y
+BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_JFFS2=y
BR2_TARGET_ROOTFS_JFFS2_PAD=y
BR2_TARGET_UBOOT=y
BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-u-boot-$(BR2_TARGET_UBOOT_VERSION).h"
+BR2_TARGET_UBOOT_1_3_4=y
BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="../patches/u-boot/$(BR2_TARGET_UBOOT_VERSION)/"
BR2_TARGET_UBOOT_TOOL_ENV=y
# BR2_TARGET_UBOOT_NETWORK is not set
diff --git a/buildroot/configs/apf9328test_defconfig b/buildroot/configs/apf9328test_defconfig
index e803cbd..819a903 100644
--- a/buildroot/configs/apf9328test_defconfig
+++ b/buildroot/configs/apf9328test_defconfig
@@ -103,6 +103,7 @@ BR2_TARGET_ROOTFS_JFFS2=y
BR2_TARGET_ROOTFS_JFFS2_PAD=y
BR2_TARGET_UBOOT=y
BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-u-boot-$(BR2_TARGET_UBOOT_VERSION).h"
+BR2_TARGET_UBOOT_1_3_4=y
BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="../patches/u-boot/$(BR2_TARGET_UBOOT_VERSION)/"
BR2_TARGET_UBOOT_TOOL_ENV=y
# BR2_TARGET_UBOOT_NETWORK is not set
diff --git a/patches/buildroot/2011.05/159-u-boot-fix_fw_printenv_build_with_external_toolchains.patch b/patches/buildroot/2011.05/159-u-boot-fix_fw_printenv_build_with_external_toolchains.patch
new file mode 100644
index 0000000..1385957
--- /dev/null
+++ b/patches/buildroot/2011.05/159-u-boot-fix_fw_printenv_build_with_external_toolchains.patch
@@ -0,0 +1,21 @@
+Otherwise fw_printenv build fails with "arm-linux-gcc command unknown"
+with external toolchains.
+
+Should be removed when migrating to latest BR, as now fw_printenv build
+is done in packages/
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: buildroot/boot/u-boot/u-boot.mk
+===================================================================
+--- buildroot.orig/boot/u-boot/u-boot.mk 2011-10-04 22:09:23.000000000 +0200
++++ buildroot/boot/u-boot/u-boot.mk 2011-10-04 22:10:19.000000000 +0200
+@@ -212,7 +212,7 @@
+ # Build manually fw_printenv for the target
+ $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/.configured
+ $(TARGET_CONFIGURE_OPTS) \
+- $(MAKE) HOSTCC="$(TARGET_CC)" -C $(U_BOOT_DIR) env
++ $(MAKE) HOSTCC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(U_BOOT_DIR) env
+ $(INSTALL) -m 0755 -D $(U_BOOT_DIR)/tools/env/fw_printenv $@
+ ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
+
diff --git a/patches/u-boot/2010.03/u-boot-2010.03-150-apf9328-fixes_gcc_4_4_EABI_linking_issues.patch b/patches/u-boot/2010.03/u-boot-2010.03-150-apf9328-fixes_gcc_4_4_EABI_linking_issues.patch
index e033ef8..2e06531 100644
--- a/patches/u-boot/2010.03/u-boot-2010.03-150-apf9328-fixes_gcc_4_4_EABI_linking_issues.patch
+++ b/patches/u-boot/2010.03/u-boot-2010.03-150-apf9328-fixes_gcc_4_4_EABI_linking_issues.patch
@@ -1,24 +1,12 @@
-Don't know if it's the right way to do (marked as HACK in Openmoko). But
-without this patch, U-Boot (1.3.4) fails to link when gcc 4.3 or 4.4 is used.
-
-Errors are:
-
-xxx/buildroot/output/build/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv':
-xxx/buildroot/output/toolchain/gcc-4.3.4/libgcc/../gcc/config/arm/lib1funcs.asm:810: multiple definition of `__udivsi3' lib_arm/libarm.a(_udivsi3.o):xxx/buildroot/output/build/u-boot-1.3.4/lib_arm/_udivsi3.S:17: first defined here
-...
-xxx/buildroot/output/build/staging_dir/usr/bin/arm-linux-uclibcgnueabi-ld: error: Source object xxx/buildroot/output/build/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0
-xxx/buildroot/output/build/staging_dir/usr/bin/arm-linux-uclibcgnueabi-ld: failed to merge target specific data of file /home/julien/workspace/Armadeus_SF/armadeus-git-new-buildroot-build/buildroot/output/build/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a(_udivdi3.o)
-...
-xxx/buildroot/output/build/staging_dir/usr/bin/arm-linux-uclibcgnueabi-ld: failed to merge target specific data of file xxx/buildroot/output/build/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a(_clz.o)
-xxx/buildroot/output/build/staging_dir/usr/bin-ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
+To check if still needed...
Signed-off-by: Julien Boibessot <jul...@ar...>
Index: u-boot-2010.03/board/armadeus/apf9328/apf9328.c
===================================================================
---- u-boot-2010.03.orig/board/armadeus/apf9328/apf9328.c 2011-01-05 18:06:50.000000000 +0100
-+++ u-boot-2010.03/board/armadeus/apf9328/apf9328.c 2011-01-05 18:08:34.000000000 +0100
-@@ -99,3 +99,12 @@
+--- u-boot-2010.03.orig/board/armadeus/apf9328/apf9328.c 2011-10-04 15:25:28.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf9328/apf9328.c 2011-10-04 15:52:25.000000000 +0200
+@@ -99,3 +99,10 @@
{
return;
}
@@ -29,43 +17,13 @@ Index: u-boot-2010.03/board/armadeus/apf9328/apf9328.c
+ return dm9000_initialize(bis);
+}
+#endif
-+
-+void abort() {}
Index: u-boot-2010.03/board/armadeus/apf9328/config.mk
===================================================================
---- u-boot-2010.03.orig/board/armadeus/apf9328/config.mk 2011-01-05 18:05:23.000000000 +0100
-+++ u-boot-2010.03/board/armadeus/apf9328/config.mk 2011-01-05 18:08:34.000000000 +0100
+--- u-boot-2010.03.orig/board/armadeus/apf9328/config.mk 2011-10-04 15:25:28.000000000 +0200
++++ u-boot-2010.03/board/armadeus/apf9328/config.mk 2011-10-04 15:25:28.000000000 +0200
@@ -8,3 +8,5 @@
#
TEXT_BASE = 0x0BF80000
+
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
-Index: u-boot-2010.03/board/armadeus/apf9328/u-boot.lds
-===================================================================
---- u-boot-2010.03.orig/board/armadeus/apf9328/u-boot.lds 2011-01-05 18:05:23.000000000 +0100
-+++ u-boot-2010.03/board/armadeus/apf9328/u-boot.lds 2011-01-05 18:08:34.000000000 +0100
-@@ -38,6 +38,10 @@
-
- . = ALIGN(4);
- .rodata : { *(.rodata) }
-+ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
-+ __exidx_start = .;
-+ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
-+ __exidx_end = .;
-
- . = ALIGN(4);
- .data : { *(.data) }
-Index: u-boot-2010.03/Makefile
-===================================================================
---- u-boot-2010.03.orig/Makefile 2011-01-05 18:07:33.000000000 +0100
-+++ u-boot-2010.03/Makefile 2011-01-05 18:08:34.000000000 +0100
-@@ -262,7 +262,7 @@
- PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
- endif
- else
--PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
-+PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lgcc_eh
- endif
- PLATFORM_LIBS += $(PLATFORM_LIBGCC)
- export PLATFORM_LIBS
diff --git a/patches/u-boot/2010.03/u-boot-2010.03-151-all-apf-fixes_gcc_4_4_or_4_5_EABI_linking_issues.patch b/patches/u-boot/2010.03/u-boot-2010.03-151-all-apf-fixes_gcc_4_4_or_4_5_EABI_linking_issues.patch
new file mode 100644
index 0000000..05968b0
--- /dev/null
+++ b/patches/u-boot/2010.03/u-boot-2010.03-151-all-apf-fixes_gcc_4_4_or_4_5_EABI_linking_issues.patch
@@ -0,0 +1,23 @@
+Prevent linking error with some EABI toolchains.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: u-boot-2010.03/lib_arm/eabi_compat.c
+===================================================================
+--- u-boot-2010.03.orig/lib_arm/eabi_compat.c 2011-10-04 15:38:21.000000000 +0200
++++ u-boot-2010.03/lib_arm/eabi_compat.c 2011-10-04 15:46:12.000000000 +0200
+@@ -16,3 +16,14 @@
+ printf("raise: Signal # %d caught\n", signum);
+ return 0;
+ }
++
++/* Dummy functions to avoid linker complaints */
++void __aeabi_unwind_cpp_pr0(void)
++{
++
++}
++
++void abort(void)
++{
++ printf( "abort !\n" );
++}
diff --git a/scripts/quiltify.sh b/scripts/quiltify.sh
index 93f6da2..f46920b 100755
--- a/scripts/quiltify.sh
+++ b/scripts/quiltify.sh
@@ -63,7 +63,7 @@ elif [ "$answer" == "U-Boot" ]; then
QUILT_MAKEFILE_TARGET_TOUCH=".unpacked .patched"
QUILT_PATCH_FILTER="$ARMADEUS_U_BOOT_VERSION"
QUILT_TARGET_DIR=$ARMADEUS_U_BOOT_DIR
- QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/u-boot
+ QUILT_TARGET_PATCH_DIR=$ARMADEUS_BUILDROOT_DIR/../patches/u-boot/$ARMADEUS_U_BOOT_VERSION
else
QUILT_TARGET_NAME="Linux kernel"
QUILT_MAKEFILE_TARGET="linux26-patched"
diff --git a/target/linux/debug/imxregs/imxregs.c b/target/linux/debug/imxregs/imxregs.c
index dedcf87..26c6bb4 100644
--- a/target/linux/debug/imxregs/imxregs.c
+++ b/target/linux/debug/imxregs/imxregs.c
@@ -1,7 +1,7 @@
/*
- * imxregs.c - Tool to display and modify i.MXL/1/27 registers from Linux's userspace
+ * imxregs.c - Tool to display and modify i.MXL/1/27/51 registers from Linux's userspace
*
- * Copyright (C) 2006-2008 armadeus systems
+ * Copyright (C) 2006-2011 ARMadeus Systems
* Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-Loesungen Online GmbH
* Author: Julien Boibessot
*
@@ -39,8 +39,7 @@
#include "imxregs.h"
#endif
-
-//#define DEBUG TRUE
+/*#define DEBUG TRUE*/
#ifdef DEBUG
#define debug(fmt, arg...) printf(fmt, ##arg)
#else
@@ -50,69 +49,64 @@
// fd for /dev/mem
static int fd = -1;
-
// Get value of the register at the given address
static int getmem(u32 addr)
{
- void *map, *regaddr;
- u32 val;
-
- debug("getmem(0x%08x)\n", addr);
- if (fd == -1)
- {
- fd = open("/dev/mem", O_RDWR | O_SYNC);
- if (fd<0)
- {
- perror("open(\"/dev/mem\")");
- exit(1);
- }
- }
-
- map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, addr & ~MAP_MASK );
- if (map == (void*)-1 )
- {
- perror("mmap()");
- exit(1);
- }
-
- debug("Mapped addr: 0x%x\n", regaddr);
- regaddr = map + (addr & MAP_MASK);
-
- val = *(u32*) regaddr;
- munmap(0,MAP_SIZE);
-
- return val;
+ void *map, *regaddr;
+ u32 val;
+
+ debug("getmem(0x%08x)\n", addr);
+ if (fd == -1) {
+ fd = open("/dev/mem", O_RDWR | O_SYNC);
+ if (fd < 0) {
+ perror("open(\"/dev/mem\")");
+ exit(1);
+ }
+ }
+
+ map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
+ addr & ~MAP_MASK);
+ if (map == (void *)-1) {
+ perror("mmap()");
+ exit(1);
+ }
+
+ debug("Mapped addr: 0x%x\n", regaddr);
+ regaddr = map + (addr & MAP_MASK);
+
+ val = *(u32 *) regaddr;
+ munmap(0, MAP_SIZE);
+
+ return val;
}
-// Modify register value at given address
+/* Modify register value at given address */
static void putmem(u32 addr, u32 val)
{
- void *map, *regaddr;
- static int fd = -1;
-
- debug("putmem(0x%08x, 0x%08x)\n", addr, val);
-
- if (fd == -1)
- {
- fd = open("/dev/mem", O_RDWR | O_SYNC);
- if (fd<0)
- {
- perror("open(\"/dev/mem\")");
- exit(1);
- }
- }
-
- map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, addr & ~MAP_MASK );
- if (map == (void*)-1 )
- {
- perror("mmap()");
- exit(1);
- }
- printf("Replaced content: 0x%08x\n", regaddr);
- regaddr = map + (addr & MAP_MASK);
-
- *(u32*) regaddr = val;
- munmap(0,MAP_SIZE);
+ void *map, *regaddr;
+ static int fd = -1;
+
+ debug("putmem(0x%08x, 0x%08x)\n", addr, val);
+
+ if (fd == -1) {
+ fd = open("/dev/mem", O_RDWR | O_SYNC);
+ if (fd < 0) {
+ perror("open(\"/dev/mem\")");
+ exit(1);
+ }
+ }
+
+ map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
+ addr & ~MAP_MASK);
+ if (map == (void *)-1) {
+ perror("mmap()");
+ exit(1);
+ }
+ printf("Replaced content: 0x%08x\n", regaddr);
+ regaddr = map + (addr & MAP_MASK);
+
+ *(u32 *) regaddr = val;
+ munmap(0, MAP_SIZE);
}
static u32 lastaddr = 0;
@@ -120,63 +114,59 @@ static u32 newaddr = 1;
static u32 data = 0;
static u32 shiftdata;
-//
-// Show content of given register (index in reginfo struct)
+/* Show content of given register (index in reginfo struct) */
static void dumpentry(int i)
{
- int j;
-
- if (regs[i].addr != lastaddr) newaddr = 1;
- if (newaddr)
- {
- newaddr = 0;
- lastaddr = regs[i].addr;
- data = getmem(lastaddr);
- printf("\n%s\n", regs[i].desc);
- printf("%-24s 0x%08x -> ", regs[i].name, data);
- shiftdata = data;
- for (j=32; j>0; j--) {
- printf("%c", shiftdata & 0x80000000 ? '1' : '0');
- shiftdata = shiftdata << 1;
- if (j==9 || j==17 || j==25) printf(" ");
- }
-
- printf("\n");
- }
-
- if( (regs[i].shift != 0) || (regs[i].mask != 0xffffffff) )
- {
- shiftdata = (data >> regs[i].shift) & regs[i].mask;
- printf("%-25s ", regs[i].name);
- switch (regs[i].type)
- {
- // Hexa printing
- case 'x':
- printf("%8x", shiftdata);
- break;
- case '<':
- printf("%8u", 1 << shiftdata);
- break;
- // Decimal printing
- default:
- printf("%8u", shiftdata);
- break;
- }
- printf(" %s\n", regs[i].desc);
- }
+ int j;
+
+ if (regs[i].addr != lastaddr)
+ newaddr = 1;
+ if (newaddr) {
+ newaddr = 0;
+ lastaddr = regs[i].addr;
+ data = getmem(lastaddr);
+ printf("\n%s\n", regs[i].desc);
+ printf("%-24s 0x%08x -> ", regs[i].name, data);
+ shiftdata = data;
+ for (j = 32; j > 0; j--) {
+ printf("%c", shiftdata & 0x80000000 ? '1' : '0');
+ shiftdata = shiftdata << 1;
+ if (j == 9 || j == 17 || j == 25)
+ printf(" ");
+ }
+
+ printf("\n");
+ }
+
+ if ((regs[i].shift != 0) || (regs[i].mask != 0xffffffff)) {
+ shiftdata = (data >> regs[i].shift) & regs[i].mask;
+ printf("%-25s ", regs[i].name);
+ switch (regs[i].type) {
+ // Hexa printing
+ case 'x':
+ printf("%8x", shiftdata);
+ break;
+ case '<':
+ printf("%8u", 1 << shiftdata);
+ break;
+ // Decimal printing
+ default:
+ printf("%8u", shiftdata);
+ break;
+ }
+ printf(" %s\n", regs[i].desc);
+ }
}
-//
-// Show content of all supported registers
+/* Show content of all supported registers */
static void dumpall(void)
{
- int i;
- int n=sizeof(regs)/sizeof(struct reg_info);
+ int i;
+ int n = sizeof(regs) / sizeof(struct reg_info);
- for( i=0; i<n; i++ )
- {
- dumpentry(i);
- }
+ for (i = 0; i < n; i++) {
+ dumpentry(i);
+ }
}
/*
@@ -187,112 +177,103 @@ static void dumpall(void)
*/
static int dumpmatching(char *name)
{
- int i, found=0;
- int n=sizeof(regs)/sizeof(struct reg_info);
-
- for (i=0; i<n; i++)
- {
- if (strstr(regs[i].name, name)) {
- dumpentry(i);
- found = 1;
- }
- }
- if(!found)
- printf("No matching register found\n");
-
- return !found;
+ int i, found = 0;
+ int n = sizeof(regs) / sizeof(struct reg_info);
+
+ for (i = 0; i < n; i++) {
+ if (strstr(regs[i].name, name)) {
+ dumpentry(i);
+ found = 1;
+ }
+ }
+ if (!found)
+ printf("No matching register found\n");
+
+ return !found;
}
-//
-// Set content of register with given name
+/* Set content of register with given name */
static void setreg(char *name, u32 val)
{
- int i;
- u32 mem;
- int found=0;
- int count=0;
- int n=sizeof(regs)/sizeof(struct reg_info);
-
- for (i=0; i<n; i++)
- {
- if (strcmp(regs[i].name, name)==0)
- {
- found = i;
- //printf("Matched %s with %s, count=%d\n", regs[i].name, name, count);
- count++;
- }
- }
- if (count!=1)
- {
- printf("No or more than one matching register found\n");
- exit(1);
- }
-
- mem = getmem(regs[found].addr);
- debug("Old contents: 0x%08x\n", mem);
- mem &= ~(regs[found].mask << regs[found].shift);
- debug("Unmasked contents: 0x%08x\n", mem);
- val &= regs[found].mask;
- debug("mask: 0x%08x\n", regs[found].mask);
- debug("masked val: 0x%08x\n", val);
- mem |= val << regs[found].shift;
- debug("Embedded value: 0x%08x\n", mem);
- putmem(regs[found].addr, mem);
+ int i;
+ u32 mem;
+ int found = 0;
+ int count = 0;
+ int n = sizeof(regs) / sizeof(struct reg_info);
+
+ for (i = 0; i < n; i++) {
+ if (strcmp(regs[i].name, name) == 0) {
+ found = i;
+ /*printf("Matched %s with %s, count=%d\n", regs[i].name, name, count);*/
+ count++;
+ }
+ }
+ if (count != 1) {
+ printf("No or more than one matching register found\n");
+ exit(1);
+ }
+
+ mem = getmem(regs[found].addr);
+ debug("Old contents: 0x%08x\n", mem);
+ mem &= ~(regs[found].mask << regs[found].shift);
+ debug("Unmasked contents: 0x%08x\n", mem);
+ val &= regs[found].mask;
+ debug("mask: 0x%08x\n", regs[found].mask);
+ debug("masked val: 0x%08x\n", val);
+ mem |= val << regs[found].shift;
+ debug("Embedded value: 0x%08x\n", mem);
+ putmem(regs[found].addr, mem);
}
-
-void usage(char* name)
+void usage(char *name)
{
- printf("%s for %s CPU\n"
- "Usage: %s - to dump all known registers\n"
- " %s <name> - to dump named register\n"
- " %s <name> <value> - to set named register\n",
- name, IMX_TYPE, name, name, name);
+ printf("%s for %s CPU\n"
+ "Usage: %s - to dump all known registers\n"
+ " %s <name> - to dump named register\n"
+ " %s <name> <value> - to set named register\n",
+ name, IMX_TYPE, name, name, name);
}
int main(int argc, char *argv[])
{
- char *p;
- u32 val;
-
- if ((0 == strcmp(argv[1],"-h")) || (0 == strcmp(argv[1],"--help"))) {
- usage(argv[0]);
- return 0;
- }
-
- /* No arguments -> dump all known registers */
- if (argc == 1) {
- dumpall();
- return 0;
- }
-
- /* Uppercase first argument (register name) */
- if (argc >= 2)
- {
- p = argv[1];
- while (*p) {
- *p = toupper(*p);
- p++;
- }
- }
-
- /* Dump the content of the provided register */
- if (argc == 2)
- {
- return( dumpmatching(argv[1]) );
- }
-
- /* Put value to given register */
- if (argc == 3)
- {
- sscanf(argv[2],"%i",&val);
- setreg(argv[1], val);
- return 0;
- }
-
- /* In all other cases, print Usage */
- usage(argv[0]);
-
- return 1;
+ char *p;
+ u32 val;
+
+ /* No arguments -> dump all known registers */
+ if (argc == 1) {
+ dumpall();
+ return 0;
+ }
+
+ /* Want help ? */
+ if ((0 == strcmp(argv[1], "-h")) || (0 == strcmp(argv[1], "--help"))) {
+ usage(argv[0]);
+ return 0;
+ }
+
+ /* Uppercase first argument (register name) */
+ if (argc >= 2) {
+ p = argv[1];
+ while (*p) {
+ *p = toupper(*p);
+ p++;
+ }
+ }
+
+ /* Dump the content of the provided register */
+ if (argc == 2) {
+ return (dumpmatching(argv[1]));
+ }
+
+ /* Put value to given register */
+ if (argc == 3) {
+ sscanf(argv[2], "%i", &val);
+ setreg(argv[1], val);
+ return 0;
+ }
+
+ /* In all other cases, print Usage */
+ usage(argv[0]);
+
+ return 1;
}
-
diff --git a/target/linux/modules/fpga/Makefile b/target/linux/modules/fpga/Makefile
index 6352c4e..c63449d 100755
--- a/target/linux/modules/fpga/Makefile
+++ b/target/linux/modules/fpga/Makefile
@@ -5,13 +5,12 @@
#
ifneq ($(KERNELRELEASE),)
-
# Part executed when called from kernel build system:
-obj-$(CONFIG_ARMADEUS_FPGA_DRIVERS) += dev_tools/ others/ POD/ board_designs/ virtual_components/
+obj-$(CONFIG_ARMADEUS_FPGA_DRIVERS) += dev_tools/ others/ board_designs/ virtual_components/
+obj-$(CONFIG_POD_DRIVERS) += POD/
else
-
# Part executed when called from standard make in this directory:
ARMADEUS_BASE_DIR=../../../..
diff --git a/target/linux/modules/fpga/POD/Kconfig b/target/linux/modules/fpga/POD/Kconfig
index eeeb583..40fae13 100644
--- a/target/linux/modules/fpga/POD/Kconfig
+++ b/target/linux/modules/fpga/POD/Kconfig
@@ -1,5 +1,5 @@
#
-# Armadeus custom POD drivers configuration
+# Armadeus POD generated drivers configuration
#
config POD_DRIVERS
diff --git a/target/linux/modules/fpga/POD/Makefile b/target/linux/modules/fpga/POD/Makefile
index 2b97715..8c309cc 100644
--- a/target/linux/modules/fpga/POD/Makefile
+++ b/target/linux/modules/fpga/POD/Makefile
@@ -1,17 +1,15 @@
-
#
-# Main Makefile for the Armadeus FPGA related drivers
+# Main Makefile for the Armadeus FPGA related drivers (generated by POD)
#
-# Add your subdirectories to obj- target
+# Sub-directories are automatically added to obj- target
#
ifneq ($(KERNELRELEASE),)
-
# Part executed when called from kernel build system:
-obj-$(CONFIG_POD_DRIVERS) += $(shell ls -F drivers/armadeus/fpga/POD/ | grep \/$)
-else
+obj-$(CONFIG_POD_DRIVERS) += $(shell ls -F drivers/armadeus/fpga/POD/ | grep \/$)
+else
# Part executed when called from standard make in this directory:
ARMADEUS_BASE_DIR=../../../../..
@@ -29,4 +27,3 @@ install:
endif
-
diff --git a/target/linux/modules/fpga/POD/void/Kconfig b/target/linux/modules/fpga/POD/void/Kconfig
deleted file mode 100644
index e69de29..0000000
diff --git a/target/linux/modules/fpga/POD/void/Makefile b/target/linux/modules/fpga/POD/void/Makefile
deleted file mode 100755
index 775eaa1..0000000
--- a/target/linux/modules/fpga/POD/void/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Makefile for a generic Armadeus drivers
-#
-
-# Part executed when called from kernel build system:
-ifneq ($(KERNELRELEASE),)
-
-obj-$(CONFIG_POD_DRIVERS) += void.o
-
-else
-
-# Part executed when called from standard make in this directory:
-
-ARMADEUS_BASE_DIR=../../../../../../
-include $(ARMADEUS_BASE_DIR)/Makefile.in
-
-KDIR := $(ARMADEUS_LINUX_DIR)
-PWD := $(shell pwd)
-
-# Armadeus custom drivers common targets (default, clean, etc...)
-include ../../../Makefile.in
-
-endif
-
diff --git a/target/linux/modules/fpga/POD/void/void.c b/target/linux/modules/fpga/POD/void/void.c
deleted file mode 100755
index e19e376..0000000
--- a/target/linux/modules/fpga/POD/void/void.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- **********************************************************************
- * 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/moduleparam.h>
-#include <linux/init.h>
-
-//
-// Module's initialization function
-//
-static int __init void_init(void)
-{
- printk("Init void module\n");
-
- return(0);
-}
-
-//
-// Module's cleanup function
-//
-static void __exit void_exit(void)
-{
- printk("Leave void module\n");
-}
-
-module_init(void_init);
-module_exit(void_exit);
-MODULE_AUTHOR("Fabien Marteau");
-MODULE_DESCRIPTION("Void driver");
-MODULE_LICENSE("GPL");
hooks/post-receive
--
armadeus
|