armadeus-commitlog Mailing List for armadeus (Page 135)
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
|
|
From: <jo...@us...> - 2009-01-01 16:15:30
|
Revision: 981
http://armadeus.svn.sourceforge.net/armadeus/?rev=981&view=rev
Author: jorasse
Date: 2009-01-01 16:15:24 +0000 (Thu, 01 Jan 2009)
Log Message:
-----------
[buildroot] Enable save/restore project config - including u-boot, uclibc and busybox configuration
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/Makefile.in
trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
trunk/buildroot/target/device/armadeus/u-boot/u-boot.mk
trunk/patches/051-buildroot-u-boot.diff
Added Paths:
-----------
trunk/patches/062-buildroot-add-uboot-conf-to-saved-project.diff
Modified: trunk/buildroot/target/device/armadeus/Makefile.in
===================================================================
--- trunk/buildroot/target/device/armadeus/Makefile.in 2008-12-29 15:11:09 UTC (rev 980)
+++ trunk/buildroot/target/device/armadeus/Makefile.in 2009-01-01 16:15:24 UTC (rev 981)
@@ -27,8 +27,11 @@
include target/device/armadeus/rootfs/Makefile.in
include target/device/armadeus/$(BOARD_NAME)/Makefile.in
+ifndef BR2_PACKAGE_BUSYBOX_CONFIG
BR2_PACKAGE_BUSYBOX_CONFIG:=$(ARMADEUS_PATH)/busybox.config
-UCLIBC_CONFIG_FILE:=$(BOARD_PATH)/uClibc.config.$(ARCH)
+endif
+#UCLIBC_CONFIG_FILE:=$(BOARD_PATH)/uClibc.config.$(ARCH)
+
endif
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig 2008-12-29 15:11:09 UTC (rev 980)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig 2009-01-01 16:15:24 UTC (rev 981)
@@ -186,7 +186,7 @@
# BR2_UCLIBC_VERSION_0_9_28_3 is not set
BR2_UCLIBC_VERSION_0_9_29=y
# BR2_UCLIBC_VERSION_SNAPSHOT is not set
-BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.29.config"
+BR2_UCLIBC_CONFIG="$(BOARD_PATH)/uClibc.config.$(ARCH)"
# BR2_ENABLE_LOCALE is not set
# BR2_PTHREADS_NONE is not set
# BR2_PTHREADS is not set
@@ -729,7 +729,8 @@
# bootloader for target device
#
BR2_TARGET_UBOOT=y
-BR2_TARGET_UBOOT_BOARDNAME="$(BOARD_NAME)"
+BR2_TARGET_UBOOT_BOARDNAME="$(BR2_BOARD_PATH)"
+BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE="$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME).h"
BR2_TARGET_UBOOT_CUSTOM_PATCH=""
BR2_TARGET_UBOOT_SERVERIP=""
BR2_TARGET_UBOOT_IPADDR=""
Modified: trunk/buildroot/target/device/armadeus/u-boot/u-boot.mk
===================================================================
--- trunk/buildroot/target/device/armadeus/u-boot/u-boot.mk 2008-12-29 15:11:09 UTC (rev 980)
+++ trunk/buildroot/target/device/armadeus/u-boot/u-boot.mk 2009-01-01 16:15:24 UTC (rev 981)
@@ -6,7 +6,9 @@
U_BOOT_BIN=$(BOARD_NAME)-u-boot.bin
BR2_TARGET_U_BOOT_CONFIG_BOARD=$(BOARD_NAME)
+ifndef BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE
BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE=$(BOARD_PATH)/$(BOARD_NAME).h
+endif
MKIMAGE_BINLOC:=$(STAGING_DIR)/usr/bin/mkimage
MKIMAGE:=$(KERNEL_CROSS)mkimage
Modified: trunk/patches/051-buildroot-u-boot.diff
===================================================================
--- trunk/patches/051-buildroot-u-boot.diff 2008-12-29 15:11:09 UTC (rev 980)
+++ trunk/patches/051-buildroot-u-boot.diff 2009-01-01 16:15:24 UTC (rev 981)
@@ -1,8 +1,28 @@
--- buildroot/target/u-boot.ref/Config.in 2008-11-03 09:15:09.000000000 +0100
+++ buildroot/target/u-boot/Config.in 2008-11-13 22:01:30.000000000 +0100
-@@ -80,3 +80,10 @@ config BR2_TARGET_UBOOT_TOOL_ENV
+@@ -7,11 +7,18 @@
+ config BR2_TARGET_UBOOT_BOARDNAME
+ string "board name"
depends on BR2_TARGET_UBOOT
+- default "$(BOARD_NAME)"
++ default "$(BR2_BOARD_NAME)"
help
+ One of U-Boot supported boards to be built.
+ This will be suffixed with _config to meet U-Boot standard naming.
+
++config BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE
++ string "U-Boot header file"
++ depends on BR2_TARGET_UBOOT
++ default "$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME).h"
++ help
++ U-Boot config Header file to use to build U-Boot for your target.
++
+ config BR2_TARGET_UBOOT_CUSTOM_PATCH
+ string "custom patch"
+ depends on BR2_TARGET_UBOOT
+@@ -80,3 +87,10 @@
+ depends on BR2_TARGET_UBOOT
+ help
Install fw_printenv / fw_setenv tools in target.
+
+config BR2_TARGET_UBOOT_COPYTO
Added: trunk/patches/062-buildroot-add-uboot-conf-to-saved-project.diff
===================================================================
--- trunk/patches/062-buildroot-add-uboot-conf-to-saved-project.diff (rev 0)
+++ trunk/patches/062-buildroot-add-uboot-conf-to-saved-project.diff 2009-01-01 16:15:24 UTC (rev 981)
@@ -0,0 +1,18 @@
+--- buildroot/project/project.mk.ref 2008-11-03 09:15:03.000000000 +0100
++++ buildroot/project/project.mk 2009-01-01 16:54:02.000000000 +0100
+@@ -40,10 +40,12 @@
+ $(SED) '/BR2_UCLIBC_CONFIG/d' $(PROJECT_FILE); \
+ echo "BR2_UCLIBC_CONFIG=\"$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config\"" >> $(PROJECT_FILE); \
+ fi
+- if [ -f $(UBOOT_DIR)/include/configs/$(PROJECT).h ]; then \
++ if [ -f $(U_BOOT_DIR)/include/configs/$(BOARD_NAME).h ]; then \
+ mkdir -p $(LOCAL)/$(PROJECT)/u-boot; \
+- cp $(UBOOT_DIR)/include/configs/$(PROJECT).h \
+- $(LOCAL)/$(PROJECT)/u-boot/$(PROJECT).h; \
++ cp $(U_BOOT_DIR)/include/configs/$(BOARD_NAME).h \
++ $(LOCAL)/$(PROJECT)/u-boot/$(BOARD_NAME).h; \
++ $(SED) '/BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE/d' $(PROJECT_FILE); \
++ echo "BR2_TARGET_U_BOOT_CONFIG_HEADER_FILE=\"$(LOCAL)/$(PROJECT)/u-boot/$(BOARD_NAME).h\"" >> $(PROJECT_FILE); \
+ fi
+
+ getconfig: $(CONFIG)/conf
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-29 15:11:15
|
Revision: 980
http://armadeus.svn.sourceforge.net/armadeus/?rev=980&view=rev
Author: jorasse
Date: 2008-12-29 15:11:09 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
[uboot] update reference uboot image to the latest version of patch 3.5
Modified Paths:
--------------
trunk/software/uboot_recover/apf9328-u-boot.bin
Modified: trunk/software/uboot_recover/apf9328-u-boot.bin
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-29 14:11:00
|
Revision: 979
http://armadeus.svn.sourceforge.net/armadeus/?rev=979&view=rev
Author: jorasse
Date: 2008-12-29 14:10:55 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
[buildroot] fixed patch failure when patch create new buildroot file - move tslib patch form patch directory to buidlroot/package/tslib
Added Paths:
-----------
trunk/buildroot/package/tslib/
trunk/buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch
Removed Paths:
-------------
trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
Added: trunk/buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch
===================================================================
--- trunk/buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch (rev 0)
+++ trunk/buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch 2008-12-29 14:10:55 UTC (rev 979)
@@ -0,0 +1,48 @@
+The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
+only exported in recent kernels.
+
+Signed-off-by: Sebastian Siewior <seb...@br...>
+
+
+--- tslib-1.0.org/plugins/input-raw.c 2008-11-18 11:38:02.000000000 +0100
++++ tslib-1.0/plugins/input-raw.c 2008-11-18 11:44:10.000000000 +0100
+@@ -44,23 +44,31 @@
+ int using_syn;
+ };
+
++#define BITS_PER_LONG (sizeof(long) * 8)
++#ifndef EV_CNT
++#define EV_CNT (EV_MAX+1)
++#endif
++#ifndef ABS_CNT
++#define ABS_CNT (ABS_MAX+1)
++#endif
++
+ static int check_fd(struct tslib_input *i)
+ {
+ struct tsdev *ts = i->module.dev;
+ int version;
+- u_int32_t bit;
+- u_int32_t absbit;
++ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
++ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
+
+ if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
+ (version == EV_VERSION) &&
+- (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
+- (bit & (1 << EV_ABS)) &&
+- (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
+- (absbit & (1 << ABS_X)) &&
+- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
++ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
++ (bit[0] & (1 << EV_ABS)) &&
++ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
++ (absbit[0] & (1 << ABS_X)) &&
++ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
+ }
+
+- if (bit & (1 << EV_SYN))
++ if (bit[0] & (1 << EV_SYN))
+ i->using_syn = 1;
+
+ return 0;
Deleted: trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
===================================================================
--- trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff 2008-12-28 00:55:25 UTC (rev 978)
+++ trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff 2008-12-29 14:10:55 UTC (rev 979)
@@ -1,51 +0,0 @@
---- /dev/null 1970-01-01 01:00:00.000000000 +0100
-+++ buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch 2008-12-16 18:03:50.000000000 +0100
-@@ -0,0 +1,48 @@
-+The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
-+only exported in recent kernels.
-+
-+Signed-off-by: Sebastian Siewior <seb...@br...>
-+
-+
-+--- tslib-1.0.org/plugins/input-raw.c 2008-11-18 11:38:02.000000000 +0100
-++++ tslib-1.0/plugins/input-raw.c 2008-11-18 11:44:10.000000000 +0100
-+@@ -44,23 +44,31 @@
-+ int using_syn;
-+ };
-+
-++#define BITS_PER_LONG (sizeof(long) * 8)
-++#ifndef EV_CNT
-++#define EV_CNT (EV_MAX+1)
-++#endif
-++#ifndef ABS_CNT
-++#define ABS_CNT (ABS_MAX+1)
-++#endif
-++
-+ static int check_fd(struct tslib_input *i)
-+ {
-+ struct tsdev *ts = i->module.dev;
-+ int version;
-+- u_int32_t bit;
-+- u_int32_t absbit;
-++ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
-++ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
-+
-+ if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
-+ (version == EV_VERSION) &&
-+- (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
-+- (bit & (1 << EV_ABS)) &&
-+- (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
-+- (absbit & (1 << ABS_X)) &&
-+- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
-++ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
-++ (bit[0] & (1 << EV_ABS)) &&
-++ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
-++ (absbit[0] & (1 << ABS_X)) &&
-++ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
-+ }
-+
-+- if (bit & (1 << EV_SYN))
-++ if (bit[0] & (1 << EV_SYN))
-+ i->using_syn = 1;
-+
-+ return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-28 00:55:30
|
Revision: 978
http://armadeus.svn.sourceforge.net/armadeus/?rev=978&view=rev
Author: jorasse
Date: 2008-12-28 00:55:25 +0000 (Sun, 28 Dec 2008)
Log Message:
-----------
[linux] Clean-up apf9328-isp1761 driver - hardware configuration moved to apf9328.c and u-boot 1.3.4 patch 3.5
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/apf9328-isp1761.c
Modified: trunk/target/linux/modules/isp1761/apf9328-isp1761.c
===================================================================
--- trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-28 00:51:11 UTC (rev 977)
+++ trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-28 00:55:25 UTC (rev 978)
@@ -1,3 +1,7 @@
+/*
+ * Deprecated - Now part of apf9328.c kernel file and U-Boot 1.3.4 patch 3.5
+ */
+
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/device.h>
@@ -14,145 +18,15 @@
#include <mach/hardware.h>
#include <mach/imx-regs.h>
#endif
-#include <asm/delay.h>
-#include <linux/usb/isp116x.h>
-#define ISP1761_BASE IMX_CS3_PHYS
-#define ISP1761_GPIO_IRQ GPIO_PORTC | 10
-#define ISP1761_IRQ IRQ_GPIOC(10)
-#define CS3U 0x18 /*chip select 3 upper register */
-#define CS3L 0x1C /*chip select 3 lower register */
-
-#define CONFIG_SYS_BUS_FREQ 96 /* 96|48... MHz (BCLOCK and HCLOCK) */
-#define CFG_HCLK_LGTH (1000/CONFIG_SYS_BUS_FREQ) /* ns */
-
-
-
-/* CS3 configuration for ISP176x USB Host */
-#define CFG_CS3_CHIP_SELECT_ENABLE 1 /* 1 : enable CS0 peripherals */
-#define CFG_CS3_PIN_ASSERT 0 /* chip select pin state when */
- /* chip select disabled */
-#define CFG_CS3_DATA_PORT_SIZE 0x5 /* 5=16 bits on D[15:0] pins */
- /* 3=8bits on D[7:0] 6=32 bits..*/
-#define CFG_CS3_SUPERVISOR_PROTECT 0 /* 1 : user mode access prohibited*/
-#define CFG_CS3_WRITE_PROTECT 0 /* 1 : write access prohibited */
-#define CFG_CS3_EB_SIGNAL_CONTROL_WRITE 1 /* 1 when EB is used as write signal*/
-
-#define CFG_CS3_READ_CYC_LGTH 110 /* ns */
-#define CFG_CS3_OE_ASSERT_DLY 45 /* ns */
-#define CFG_CS3_OE_NEG_DLY 40 /* ns */
-
-#define CFG_CS3_CS_NEG_LGTH 30 /* max 30 ns CS HIGH to CS LOW at 100MHz*/
-#define CFG_CS3_XTRA_DEAD_CYC 0 /* ns from CS HIGH to tristate bus */
-
-#define CFG_CS3_WRITE_XTRA_LGTH 0 /* ns */
-#define CFG_CS3_EB_ASSERT_DLY 45 /* ns */
-#define CFG_CS3_EB_NEG_DLY 45 /* ns */
-#define CFG_CS3_CS_ASSERT_NEG_DLY 35 /* ns */
-
-#define CFG_CS3_SYNC_ENABLE 0 /* enable synchronous burst mode*/
-#define CFG_CS3_SYNC_PAGE_MODE_EMUL 0 /* enable page mode emulation */
-#define CFG_CS3_SYNC_PAGE_SIZE 0 /* 4 words page size (8bytes) */
-#define CFG_CS3_SYNC_BURST_CLK_START 0 /* 0 ns burst clock delay */
-#define CFG_CS3_SYNC_BURST_CLK_DIV 0 /* 0 : divider is 1 */
-#define CFG_CS3_SYNC_DAT_OUT_LGTH 0 /* ns */
-
-
-#define CFG_CS3U_VAL\
- ((((CFG_CS3_XTRA_DEAD_CYC+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)\
- |((((CFG_CS3_WRITE_XTRA_LGTH+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<4)\
- |(((((CFG_CS3_READ_CYC_LGTH+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)-1)&0x3F)<<8)\
- |((((CFG_CS3_CS_NEG_LGTH+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x03)<<14)\
- |((((CFG_CS3_SYNC_DAT_OUT_LGTH+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<16)\
- |((CFG_CS3_SYNC_ENABLE&0x01)<<20)\
- |((CFG_CS3_SYNC_PAGE_MODE_EMUL&0x01)<<21)\
- |((CFG_CS3_SYNC_PAGE_SIZE&0x03)<<22)\
- |((((CFG_CS3_SYNC_BURST_CLK_START+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<24)\
- |((CFG_CS3_SYNC_BURST_CLK_DIV&0x03)<<28))
-
-#define CFG_CS3L_VAL\
- ((CFG_CS3_CHIP_SELECT_ENABLE&0x01)\
- |((CFG_CS3_PIN_ASSERT&0x01)<<1)\
- |((CFG_CS3_WRITE_PROTECT&0x01)<<4)\
- |((CFG_CS3_SUPERVISOR_PROTECT&0x01)<<6)\
- |((CFG_CS3_DATA_PORT_SIZE&0x07)<<8)\
- |((CFG_CS3_EB_SIGNAL_CONTROL_WRITE&0x01)<<11)\
- |((((CFG_CS3_CS_ASSERT_NEG_DLY+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<12)\
- |(((((CFG_CS3_EB_NEG_DLY*2)+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<16)\
- |(((((CFG_CS3_EB_ASSERT_DLY*2)+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<20)\
- |(((((CFG_CS3_OE_NEG_DLY*2)+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<24)\
- |(((((CFG_CS3_OE_ASSERT_DLY*2)+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<28))
-
-
-
-static void apf_isp116x_delay(struct device *dev, int delay)
-{
- /* On this platform, we work with 200MHz clock, giving
- 5 ns per instruction. The cycle below involves 2
- instructions and we lose 2 more instruction times due
- to pipeline flush at jump. I.e., we consume 20 ns
- per cycle.
- */
- int cyc = delay / 20;
-
- __asm__ volatile ("0:\n"
- " subs %0, %1, #1\n"
- " bge 0b\n"
- :"=r" (cyc)
- :"0"(cyc));
-}
-
-static struct isp116x_platform_data isp116x_pdata = {
- .sel15Kres = 1,
- .oc_enable = 1,
- .int_act_high = 0,
- .int_edge_triggered = 1,
- .remote_wakeup_enable = 1,
- .delay = apf_isp116x_delay,
-};
-
-static struct resource devfull_isp1761_resources[] = {
- [0] = {
- .name = "isp1761-regs",
- .start = ISP1761_BASE + 0x00000000,
- .end = ISP1761_BASE + 0x000fffff,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = ISP1761_IRQ,
- .end = ISP1761_IRQ,
- .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
- },
-};
-
-static struct platform_device devfull_isp1761_device = {
- .name = "isp1761",
- .id = 0,
- .num_resources = ARRAY_SIZE(devfull_isp1761_resources),
- .resource = devfull_isp1761_resources,
- .dev = { .platform_data = &isp116x_pdata, },
-};
-
-static struct platform_device *devfull_isp1761_devices[] = {
- &devfull_isp1761_device,
-};
-
int __init devfull_isp1761_init(void)
-{
- unsigned int num_devices=ARRAY_SIZE(devfull_isp1761_devices);
- /* configure the chip select 3 */
- __REG(IMX_EIM_BASE + CS3U + IMX_IO_BASE) = CFG_CS3U_VAL; //CSU
- __REG(IMX_EIM_BASE + CS3L + IMX_IO_BASE) = CFG_CS3L_VAL; //CSL
- imx_gpio_mode( ISP1761_GPIO_IRQ | GPIO_IN | GPIO_GIUS ); /* Set up IRQ line. */
- set_irq_type( ISP1761_IRQ, IRQF_TRIGGER_FALLING );
-
- return platform_add_devices(devfull_isp1761_devices, num_devices);
+{
+ return 0;
}
void __exit devfull_isp1761_exit(void)
{
- platform_device_unregister(&devfull_isp1761_device);
}
module_init(devfull_isp1761_init);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-28 00:51:12
|
Revision: 977
http://armadeus.svn.sourceforge.net/armadeus/?rev=977&view=rev
Author: jorasse
Date: 2008-12-28 00:51:11 +0000 (Sun, 28 Dec 2008)
Log Message:
-----------
[linux] Improved console message with apf9328_devlight (ISP1760 device not present)
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/hal/hal_imx.c
Modified: trunk/target/linux/modules/isp1761/hal/hal_imx.c
===================================================================
--- trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-12-28 00:49:12 UTC (rev 976)
+++ trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-12-28 00:51:11 UTC (rev 977)
@@ -845,8 +845,9 @@
* and reading back and checking the contents are same or not
*/
if(reg_data != 0xFACEECAF) {
- err("%s scratch register mismatch %x. Unable to find the ISP176x device",
+ err("%s scratch register mismatch %x",
isp1761_driver_name,reg_data);
+ err("ISP176x device not present");
status = -ENODEV;
goto clean;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-28 00:49:21
|
Revision: 976
http://armadeus.svn.sourceforge.net/armadeus/?rev=976&view=rev
Author: jorasse
Date: 2008-12-28 00:49:12 +0000 (Sun, 28 Dec 2008)
Log Message:
-----------
[linux] Enhanced USB host driver ISP176x to be linked with linux kernel - Changed default configuration to statically include ISP1760 driver.
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config 2008-12-27 23:54:30 UTC (rev 975)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config 2008-12-28 00:49:12 UTC (rev 976)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27.2
-# Sat Dec 20 17:21:59 2008
+# Sun Dec 28 01:31:05 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -927,21 +927,15 @@
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
-# CONFIG_HIDRAW is not set
+CONFIG_HIDRAW=y
#
# USB Input Devices
#
-CONFIG_USB_HID=m
+CONFIG_USB_HID=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
-# CONFIG_USB_HIDDEV is not set
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
+CONFIG_USB_HIDDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -1010,7 +1004,50 @@
#
# USB port drivers
#
-# CONFIG_USB_SERIAL is not set
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_CONSOLE=y
+# CONFIG_USB_EZUSB is not set
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_SPCP8X5 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_DEBUG is not set
#
# USB Miscellaneous drivers
@@ -1101,7 +1138,7 @@
#
# Communication bus related:
#
-CONFIG_ARMADEUS_ISP1761=m
+CONFIG_ARMADEUS_ISP1761=y
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-27 23:54:30 UTC (rev 975)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-28 00:49:12 UTC (rev 976)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,607 @@
+@@ -0,0 +1,677 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -48,6 +48,7 @@
+#include <mach/imx-regs.h> // imx_gpio_mode()
+#include <mach/imx-alsa.h>
+#include <linux/spi/max1027.h>
++#include <linux/usb/isp116x.h>
+
+#ifdef CONFIG_DM9000
+#include <linux/dm9000.h>
@@ -70,7 +71,67 @@
+#ifdef CONFIG_IMX_BACKLIGHT_MODULE
+#define CONFIG_IMX_BACKLIGHT 1
+#endif
++#ifdef CONFIG_ARMADEUS_ISP1761_MODULE
++#define CONFIG_ARMADEUS_ISP1761 1
++#endif
+
++// --- ISP1761
++#ifdef CONFIG_ARMADEUS_ISP1761
++
++static void apf_isp116x_delay(struct device *dev, int delay)
++{
++ /* On this platform, we work with 200MHz clock, giving
++ 5 ns per instruction. The cycle below involves 2
++ instructions and we lose 2 more instruction times due
++ to pipeline flush at jump. I.e., we consume 20 ns
++ per cycle.
++ */
++ int cyc = delay / 20;
++
++ __asm__ volatile ("0:\n"
++ " subs %0, %1, #1\n"
++ " bge 0b\n"
++ :"=r" (cyc)
++ :"0"(cyc));
++}
++
++static struct isp116x_platform_data isp116x_pdata = {
++ .sel15Kres = 1,
++ .oc_enable = 1,
++ .int_act_high = 0,
++ .int_edge_triggered = 1,
++ .remote_wakeup_enable = 1,
++ .delay = apf_isp116x_delay,
++};
++
++static struct resource devfull_isp1761_resources[] = {
++ [0] = {
++ .name = "isp1761-regs",
++ .start = ISP1761_BASE + 0x00000000,
++ .end = ISP1761_BASE + 0x000fffff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = ISP1761_IRQ,
++ .end = ISP1761_IRQ,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
++ },
++};
++
++static struct platform_device devfull_isp1761_device = {
++ .name = "isp1761",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(devfull_isp1761_resources),
++ .resource = devfull_isp1761_resources,
++ .dev = { .platform_data = &isp116x_pdata, },
++};
++
++/*static struct platform_device *devfull_isp1761_devices[] = {
++ &devfull_isp1761_device,
++};*/
++
++#endif
++
+// --- ETHERNET RESSOURCE ---
+#ifdef CONFIG_DM9000
+static struct resource dm9000_resources[] = {
@@ -523,6 +584,9 @@
+#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
+ &tsc2102_alsa_device,
+#endif // CONFIG_SND_IMX_TSC2102 || CONFIG_SND_IMX_TSC2102_MODULE
++#ifdef CONFIG_ARMADEUS_ISP1761
++ &devfull_isp1761_device,
++#endif // CONFIG_ARMADEUS_ISP1761
+};
+
+static void __init apf9328_init(void)
@@ -547,6 +611,9 @@
+#ifdef CONFIG_CAN_MCP251X
+ mcp251X_init_gpio();
+#endif
++#ifdef CONFIG_ARMADEUS_ISP1761
++ imx_gpio_mode( ISP1761_GPIO_IRQ | GPIO_IN | GPIO_GIUS ); /* Set up IRQ line. */
++#endif // CONFIG_ARMADEUS_ISP1761
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+
@@ -598,6 +665,9 @@
+#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
+ set_irq_type( APF9328_FPGA_IRQ, IRQF_TRIGGER_RISING );
+#endif
++#ifdef CONFIG_ARMADEUS_ISP1761
++ set_irq_type( ISP1761_IRQ, IRQF_TRIGGER_FALLING );
++#endif // CONFIG_ARMADEUS_ISP1761
+}
+
+
@@ -822,7 +892,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/include/mach/apf9328.h
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/apf9328.h
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,63 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
@@ -880,4 +950,9 @@
+
+#define CLK32 32768
+
++// USB HOST ISP1760: option available with APF_devfull
++#define ISP1761_BASE IMX_CS3_PHYS
++#define ISP1761_GPIO_IRQ ( GPIO_PORTC | 10 )
++#define ISP1761_IRQ ( IRQ_GPIOC(10) )
++
+#endif // __ASM_ARCH_APF9328_H
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-27 23:54:33
|
Revision: 975
http://armadeus.svn.sourceforge.net/armadeus/?rev=975&view=rev
Author: jorasse
Date: 2008-12-27 23:54:30 +0000 (Sat, 27 Dec 2008)
Log Message:
-----------
[uboot] Changed CS3 timings to support ISP1760 USB Host controler
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-27 22:26:16 UTC (rev 974)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-27 23:54:30 UTC (rev 975)
@@ -33,7 +33,7 @@
#define __CONFIG_H
#define CONFIG_ENV_VERSION "3.4"
-#define CONFIG_IDENT_STRING " apf9328 patch 3.4"
+#define CONFIG_IDENT_STRING " apf9328 patch 3.5"
#define CONFIG_ARM920T 1 /* this is an ARM920T CPU */
#define CONFIG_IMX 1 /* in a Motorola MC9328MXL Chip */
@@ -588,7 +588,7 @@
#define CFG_CS2_SYNC_BURST_CLK_DIV 0 /* 0 : divider is 1 */
#define CFG_CS2_SYNC_DAT_OUT_LGTH 0 /* ns */
-/* CS3 configuration for */
+/* CS3 configuration for ISP1760 */
#define CFG_CS3_CHIP_SELECT_ENABLE 1 /* 1 : enable CS0 peripherals */
#define CFG_CS3_PIN_ASSERT 0 /* chip select pin state when */
/* chip select disabled */
@@ -598,17 +598,17 @@
#define CFG_CS3_WRITE_PROTECT 0 /* 1: write access prohibited */
#define CFG_CS3_EB_SIGNAL_CONTROL_WRITE 1 /* 1 when EB is used as write signal*/
-#define CFG_CS3_READ_CYC_LGTH 0 /* ns */
-#define CFG_CS3_OE_ASSERT_DLY 0 /* ns */
-#define CFG_CS3_OE_NEG_DLY 0 /* ns */
+#define CFG_CS3_READ_CYC_LGTH 110 /* ns */
+#define CFG_CS3_OE_ASSERT_DLY 45 /* ns */
+#define CFG_CS3_OE_NEG_DLY 40 /* ns */
-#define CFG_CS3_CS_NEG_LGTH 0 /* max 30 ns CS HIGH to CS LOW at 100MHz */
+#define CFG_CS3_CS_NEG_LGTH 30 /* max 30 ns CS HIGH to CS LOW at 100MHz */
#define CFG_CS3_XTRA_DEAD_CYC 0 /* ns from CS HIGH to tristate bus */
#define CFG_CS3_WRITE_XTRA_LGTH 0 /* ns */
-#define CFG_CS3_EB_ASSERT_DLY 0 /* ns */
-#define CFG_CS3_EB_NEG_DLY 0 /* ns */
-#define CFG_CS3_CS_ASSERT_NEG_DLY 0 /* ns */
+#define CFG_CS3_EB_ASSERT_DLY 45 /* ns */
+#define CFG_CS3_EB_NEG_DLY 45 /* ns */
+#define CFG_CS3_CS_ASSERT_NEG_DLY 35 /* ns */
#define CFG_CS3_SYNC_ENABLE 0 /* enable synchronous burst mode*/
#define CFG_CS3_SYNC_PAGE_MODE_EMUL 0 /* enable page mode emulation*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-27 22:26:19
|
Revision: 974
http://armadeus.svn.sourceforge.net/armadeus/?rev=974&view=rev
Author: jorasse
Date: 2008-12-27 22:26:16 +0000 (Sat, 27 Dec 2008)
Log Message:
-----------
[linux] Enhanced Identification test to check 32bit registers access
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/hal/hal_imx.c
Modified: trunk/target/linux/modules/isp1761/hal/hal_imx.c
===================================================================
--- trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-12-27 22:24:37 UTC (rev 973)
+++ trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-12-27 22:26:16 UTC (rev 974)
@@ -834,17 +834,17 @@
#endif
loc_dev = &(isp1761_loc_dev[ISP1761_HC]);
- isp1761_reg_write16(loc_dev, HC_SCRATCH_REG, 0xFACE);
+ isp1761_reg_write32(loc_dev, HC_SCRATCH_REG, 0xFACEECAF);
/* perform a read of the chip ID to avoir bus hold effect when
* reading back the scratch register */
isp1761_reg_read16(loc_dev, HC_CHIP_ID_REG, reg_data);
udelay(100);
- reg_data = isp1761_reg_read16(loc_dev, HC_SCRATCH_REG,reg_data);
+ reg_data = isp1761_reg_read32(loc_dev, HC_SCRATCH_REG,reg_data);
/* Host Controller presence is detected by writing to scratch register
* and reading back and checking the contents are same or not
*/
- if(reg_data != 0xFACE) {
+ if(reg_data != 0xFACEECAF) {
err("%s scratch register mismatch %x. Unable to find the ISP176x device",
isp1761_driver_name,reg_data);
status = -ENODEV;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-27 22:24:59
|
Revision: 973
http://armadeus.svn.sourceforge.net/armadeus/?rev=973&view=rev
Author: jorasse
Date: 2008-12-27 22:24:37 +0000 (Sat, 27 Dec 2008)
Log Message:
-----------
[linux] preliminary workaround to fix ISP1760/FTDI oops
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/host/pehci.c
Modified: trunk/target/linux/modules/isp1761/host/pehci.c
===================================================================
--- trunk/target/linux/modules/isp1761/host/pehci.c 2008-12-26 00:22:21 UTC (rev 972)
+++ trunk/target/linux/modules/isp1761/host/pehci.c 2008-12-27 22:24:37 UTC (rev 973)
@@ -2692,6 +2692,10 @@
switch (usb_pipetype (urb->pipe)) {
case PIPE_CONTROL:
case PIPE_BULK:
+ if (!urb->hcpriv){
+ break;
+ }
+
qh = urb_priv->qh;
@@ -2772,6 +2776,10 @@
break;
case PIPE_INTERRUPT:
pehci_check("phci_1761_urb_dequeue: INTR needs to be done\n");
+ if (!urb->hcpriv){
+ break;
+ }
+
qh = urb_priv->qh;
td_ptd_buf = &td_ptd_map_buff[TD_PTD_BUFF_TYPE_INTL];
td_ptd_map = &td_ptd_buf->map_list[qh->qtd_ptd_index];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-26 00:22:23
|
Revision: 972
http://armadeus.svn.sourceforge.net/armadeus/?rev=972&view=rev
Author: jorasse
Date: 2008-12-26 00:22:21 +0000 (Fri, 26 Dec 2008)
Log Message:
-----------
[linux] remove useless debug info
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/apf9328-isp1761.c
Modified: trunk/target/linux/modules/isp1761/apf9328-isp1761.c
===================================================================
--- trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-25 23:58:26 UTC (rev 971)
+++ trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-26 00:22:21 UTC (rev 972)
@@ -144,7 +144,6 @@
/* configure the chip select 3 */
__REG(IMX_EIM_BASE + CS3U + IMX_IO_BASE) = CFG_CS3U_VAL; //CSU
__REG(IMX_EIM_BASE + CS3L + IMX_IO_BASE) = CFG_CS3L_VAL; //CSL
- printk("CFG_CS3 %#x %#x", CFG_CS3U_VAL, CFG_CS3L_VAL);
imx_gpio_mode( ISP1761_GPIO_IRQ | GPIO_IN | GPIO_GIUS ); /* Set up IRQ line. */
set_irq_type( ISP1761_IRQ, IRQF_TRIGGER_FALLING );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-25 23:58:28
|
Revision: 971
http://armadeus.svn.sourceforge.net/armadeus/?rev=971&view=rev
Author: jorasse
Date: 2008-12-25 23:58:26 +0000 (Thu, 25 Dec 2008)
Log Message:
-----------
[linux] improved ISP1760 pre-fetch timing according datasheet - optimized RD/WR pulse width
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/apf9328-isp1761.c
Modified: trunk/target/linux/modules/isp1761/apf9328-isp1761.c
===================================================================
--- trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-20 21:00:40 UTC (rev 970)
+++ trunk/target/linux/modules/isp1761/apf9328-isp1761.c 2008-12-25 23:58:26 UTC (rev 971)
@@ -39,17 +39,17 @@
#define CFG_CS3_WRITE_PROTECT 0 /* 1 : write access prohibited */
#define CFG_CS3_EB_SIGNAL_CONTROL_WRITE 1 /* 1 when EB is used as write signal*/
-#define CFG_CS3_READ_CYC_LGTH 105 /* ns */
-#define CFG_CS3_OE_ASSERT_DLY 35 /* ns */
-#define CFG_CS3_OE_NEG_DLY 35 /* ns */
+#define CFG_CS3_READ_CYC_LGTH 110 /* ns */
+#define CFG_CS3_OE_ASSERT_DLY 45 /* ns */
+#define CFG_CS3_OE_NEG_DLY 40 /* ns */
#define CFG_CS3_CS_NEG_LGTH 30 /* max 30 ns CS HIGH to CS LOW at 100MHz*/
#define CFG_CS3_XTRA_DEAD_CYC 0 /* ns from CS HIGH to tristate bus */
#define CFG_CS3_WRITE_XTRA_LGTH 0 /* ns */
-#define CFG_CS3_EB_ASSERT_DLY 5 /* ns */
-#define CFG_CS3_EB_NEG_DLY 65 /* ns */
-#define CFG_CS3_CS_ASSERT_NEG_DLY 0 /* ns */
+#define CFG_CS3_EB_ASSERT_DLY 45 /* ns */
+#define CFG_CS3_EB_NEG_DLY 45 /* ns */
+#define CFG_CS3_CS_ASSERT_NEG_DLY 35 /* ns */
#define CFG_CS3_SYNC_ENABLE 0 /* enable synchronous burst mode*/
#define CFG_CS3_SYNC_PAGE_MODE_EMUL 0 /* enable page mode emulation */
@@ -144,6 +144,7 @@
/* configure the chip select 3 */
__REG(IMX_EIM_BASE + CS3U + IMX_IO_BASE) = CFG_CS3U_VAL; //CSU
__REG(IMX_EIM_BASE + CS3L + IMX_IO_BASE) = CFG_CS3L_VAL; //CSL
+ printk("CFG_CS3 %#x %#x", CFG_CS3U_VAL, CFG_CS3L_VAL);
imx_gpio_mode( ISP1761_GPIO_IRQ | GPIO_IN | GPIO_GIUS ); /* Set up IRQ line. */
set_irq_type( ISP1761_IRQ, IRQF_TRIGGER_FALLING );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-20 21:00:44
|
Revision: 970
http://armadeus.svn.sourceforge.net/armadeus/?rev=970&view=rev
Author: artemys
Date: 2008-12-20 21:00:40 +0000 (Sat, 20 Dec 2008)
Log Message:
-----------
[LINUX] Add PWM driver to default apf9328 linux 2.6.27 config
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config 2008-12-20 20:08:18 UTC (rev 969)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config 2008-12-20 21:00:40 UTC (rev 970)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27.2
-# Fri Nov 21 16:00:52 2008
+# Sat Dec 20 17:21:59 2008
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1095,7 +1095,7 @@
#
# Handheld related
#
-# CONFIG_ARMADEUS_PWM_DRIVER is not set
+CONFIG_ARMADEUS_PWM_DRIVER=m
CONFIG_IMX_BACKLIGHT=m
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-20 20:08:23
|
Revision: 969
http://armadeus.svn.sourceforge.net/armadeus/?rev=969&view=rev
Author: artemys
Date: 2008-12-20 20:08:18 +0000 (Sat, 20 Dec 2008)
Log Message:
-----------
[LINUX] Makes PWM driver works again with 2.6.27 kernels
Modified Paths:
--------------
trunk/target/linux/modules/pwm/Makefile
trunk/target/linux/modules/pwm/test/testpwm.sh
Added Paths:
-----------
trunk/target/linux/modules/pwm/pwm.c
Modified: trunk/target/linux/modules/pwm/Makefile
===================================================================
--- trunk/target/linux/modules/pwm/Makefile 2008-12-19 16:59:30 UTC (rev 968)
+++ trunk/target/linux/modules/pwm/Makefile 2008-12-20 20:08:18 UTC (rev 969)
@@ -5,10 +5,13 @@
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-$(CONFIG_ARMADEUS_PWM_DRIVER) += pwm.o
-#obj-m += pwm.o
+obj-$(CONFIG_ARMADEUS_PWM_DRIVER) += imx-pwm.o
-pwm-objs := core.o
+ifeq ($(KERNELVERSION),2.6.23.1)
+ imx-pwm-objs := core.o
+else
+ imx-pwm-objs := pwm.o
+endif
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
Added: trunk/target/linux/modules/pwm/pwm.c
===================================================================
--- trunk/target/linux/modules/pwm/pwm.c (rev 0)
+++ trunk/target/linux/modules/pwm/pwm.c 2008-12-20 20:08:18 UTC (rev 969)
@@ -0,0 +1,1323 @@
+/*
+ *
+ * Driver for the i.MX PWM driver
+ *
+ * This driver is part of the Armadeus Project and is the merge of a lot of ideas
+ * found on the Web.
+ *
+ * Maintainer: Julien Boibessot <jul...@ar...>
+ *
+ * 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
+ *
+ *
+ */
+//#define DEBUG 1
+
+#include <linux/module.h>
+#include <linux/version.h>
+
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/delay.h>
+#include <linux/poll.h>
+#include <asm/uaccess.h> /* get_user,copy_to_user */
+#include <linux/miscdevice.h>
+
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+#include <linux/fcntl.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/string.h>
+#include <linux/init.h>
+#include <asm/bitops.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <linux/wait.h>
+#include <linux/pm.h>
+// For /sys
+#include <linux/sysdev.h>
+// For struct class
+#include <linux/device.h>
+// For circular buffer
+#include <linux/circ_buf.h>
+#include <mach/hardware.h>
+
+// additional defines
+#define PWMC_PRESCALER_MASK 0x00007F00
+#define PWMC_REPEAT_MASK 0x0000000C
+#define PWMC_CLKSEL_MASK 0x00000003
+//
+#include <linux/platform_device.h>
+
+#include "pwm.h"
+
+#define PWM_TEST
+
+#define DRIVER_NAME "imx-pwm"
+#define DRIVER_VERSION "0.6"
+
+#define DEV_IRQ_NAME DRIVER_NAME
+#define DEV_IRQ_ID DRIVER_NAME
+
+//#define PK(fmt, args...) printk(fmt, ## args)
+#define PK(...)
+
+
+struct pwm_device {
+ u32 reg;
+ int active;
+ unsigned duty;
+ /*const*/ struct pwm_table *entry;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ struct class_device class_dev;
+#else
+ struct device class_dev;
+#endif
+};
+
+static struct class pwm_class; /* forward declaration only */
+
+#define to_pwm_device(d) container_of(d, struct pwm_device, class_dev)
+
+
+// Global variables
+int gPwmMode;
+//char *gpWriteBuf;
+int g4bytes; // count 4 bytes write occurence to FIFO
+u8 *gpWriteBufPtr;
+u16 *gpWriteBufPtr16;
+int gDataLen = PWM_DATA_8BIT;
+u16 gSampleValue;
+
+int irq = 0;
+module_param(irq, int, 0);
+
+wait_queue_head_t write_wait;
+wait_queue_head_t exit_wait;
+struct fasync_struct *ts_fasync;
+
+int gMajor = 0; /* TODO dynamic major for now */
+
+typedef struct timer_list timer_blk_t;
+
+typedef struct timerStruct
+{
+ timer_blk_t *timer_blk_ptr;
+ int period;
+ void (*timer_func)(unsigned long);
+ int stop_flag;
+} PWM_Timer_t;
+
+static PWM_Timer_t pwmTimer;
+static timer_blk_t timer_blk;
+
+struct pwm_table {
+ long period; /* in us */
+ unsigned max_period_val;
+ unsigned prescaler;
+};
+
+struct pwm_table pwmdata;
+/*
+ * Ready to use calculations
+ */
+static const struct pwm_table pwm_table[]={
+ {
+ .period=1, /* 1 us */
+ .max_period_val = 13,
+ .prescaler=1,
+ },
+ {
+ .period=5, /* 5 us */
+ .max_period_val = 65,
+ .prescaler=1,
+ },
+ {
+ .period=10, /* 10 us */
+ .max_period_val = 130,
+ .prescaler=1,
+ },
+ {
+ .period=20, /* 20 us */
+ .max_period_val = 260,
+ .prescaler=1,
+ },
+ {
+ .period=50, /* 50 us */
+ .max_period_val = 650,
+ .prescaler=1,
+ },
+ {
+ .period=100, /* 100 us */
+ .max_period_val = 650,
+ .prescaler=2,
+ },
+ {
+ .period=500, /* 500 us */
+ .max_period_val = 929,
+ .prescaler=7,
+ },
+ {
+ .period=1000, /* 1ms */
+ .max_period_val = 1000,
+ .prescaler=13,
+ },
+ {
+ .period=2000, /* 2ms */
+ .max_period_val = 1000,
+ .prescaler=26,
+ },
+ {
+ .period=3000, /* 3ms */
+ .max_period_val = 1000,
+ .prescaler=39,
+ },
+ {
+ .period=4000, /* 4ms */
+ .max_period_val = 1020,
+ .prescaler=51,
+ },
+ {
+ .period=5000, /* 5ms */
+ .max_period_val = 1016,
+ .prescaler=64,
+ }
+};
+
+/****************************************************************
+ * Circular buffer handling four sound playing
+ ***************************************************************/
+
+struct sound_circ_buf {
+ char* buf;
+ int write; // == head
+ int read; // == tail
+ int size;
+};
+
+static inline u8 get_byte_from_circbuf( struct sound_circ_buf* abuffer )
+{
+ u8 b = abuffer->buf[ abuffer->read ];
+ abuffer->read = (abuffer->read + 1) & (abuffer->size - 1);
+ return b;
+}
+
+static inline u16 get_word_from_circbuf( struct sound_circ_buf* abuffer )
+{
+ u16 w = *((u16*)(&(abuffer->buf[ abuffer->read ])));
+ abuffer->read = (abuffer->read + 2) & (abuffer->size - 1);
+ return w;
+}
+
+static inline void put_byte_to_circbuf( struct sound_circ_buf* abuffer, unsigned char abyte )
+{
+ abuffer->buf[ abuffer->write ] = abyte;
+ abuffer->write = (abuffer->write + 1) & (abuffer->size - 1);
+}
+
+static inline void increase_circbuf( struct sound_circ_buf* abuffer, int count )
+{
+ abuffer->write = (abuffer->write + count) & (abuffer->size - 1);
+ pr_debug("Added %d bytes to buffer, now write is in pos %d\n", count, abuffer->write);
+}
+
+#define MAX_SOUND_BUFFER_SIZE (16*1024) // !! Should be a power of 2 !!
+static struct sound_circ_buf gPWM_Circ_Buf;
+
+/****************************************************************
+ *
+ ***************************************************************/
+
+static void inline unregister_sys_file( struct pwm_device *ppd );
+
+
+/**
+ * setup_pwm_unit - common setup function whenever something was changed
+ * @ppd: PWM unit to work with
+ */
+static void setup_pwm_unit(struct pwm_device *ppd)
+{
+ if (ppd->entry == NULL)
+ return; /* do nothing, not fully configured yet */
+
+ if (ppd->active)
+ {
+ // Activate PWM
+ PWMC |= PWMC_EN;
+
+ // Setup prescaler
+ pr_debug("Updating PWM registers\n");
+ PWMC = (PWMC & ~PWMC_PRESCALER_MASK) | PWMC_PRESCALER(ppd->entry->prescaler) /*| PWMC_REPEAT(3)*/;
+
+ // Setup period
+ PWMP = PWMP_PERIOD(ppd->entry->period);
+
+ // Setup duty
+ PWMS = PWMS_SAMPLE( (u32) ((ppd->entry->period * ppd->duty) / 1000) );
+/* unsigned duty;
+
+ if (ppd->duty == MAX_DUTY)
+ duty=ppd->entry->max_period_val-1; // FIXME: Solve with bit 10 in this register
+ else
+ duty=((ppd->entry->max_period_val-1)*ppd->duty)/MAX_DUTY;
+*/
+
+ }
+ else
+ {
+ // De-activate
+ PWMC &= ~PWMC_EN;
+ }
+}
+
+/******************************************************************************
+ * Function Name: checkDevice
+ *
+ * Input: inode :
+ * Value Returned: int : Return status.If no error, return 0.
+ *
+ * Description: verify if the inode is a correct inode
+ *
+ * Modification History:
+ * 10 DEC,2001,
+ *****************************************************************************/
+// static int checkDevice(struct inode *pInode)
+// {
+// int minor;
+// kdev_t dev = pInode->i_rdev;
+//
+// if( MAJOR(dev) != gMajor)
+// {
+// PK("<1>checkDevice bad major = %d\n",MAJOR(dev) );
+// return -1;
+// }
+// minor = MINOR(dev);
+//
+// if ( minor < MAX_ID )
+// return minor;
+// else
+// {
+// PK("<1>checkDevice bad minor = %d\n",minor );
+// return -1;
+// }
+// }
+
+/* timer */
+int CreateTimer(PWM_Timer_t *timer)
+{
+ init_timer(timer->timer_blk_ptr);
+ timer->timer_blk_ptr->function = timer->timer_func;
+
+ return(0);
+}
+
+int StartTimer(PWM_Timer_t *timer)
+{
+ timer->timer_blk_ptr->expires = jiffies + timer->period;
+ timer->stop_flag = 0;
+
+ add_timer((struct timer_list *)timer->timer_blk_ptr);
+
+ return(0);
+}
+int StopTimer(PWM_Timer_t *timer)
+{
+ timer->stop_flag = 1;
+ del_timer_sync((struct timer_list *)timer->timer_blk_ptr);
+
+ return(0);
+}
+
+static void StopPwm(void)
+{
+ PWMC &= ~PWMC_IRQEN; // disable IRQ
+ PWMC &= ~PWMC_EN; // disable PWM
+
+ gSampleValue = 0;
+ if(gPwmMode == PWM_TONE_MODE)
+ StopTimer(&pwmTimer);
+
+ // Can release file now
+ wake_up_interruptible(&exit_wait);
+
+ PK("<1>data completed.\n");
+ PK("<1>PWMC = 0x%8x\n", (u32)PWMC);
+}
+
+static void pwmIntFunc( unsigned long unused)
+{
+// u32 period;
+
+ PK("<1>pwm sam int\n");
+
+// if (gWriteCnt > 0)
+// {
+// PK("<1>PWMS = 0x%4x\n", (u16)_reg_PWM_PWMS);
+//
+// // 96M/128/2/period
+// period = *gpWriteBufPtr16++;
+//
+// if(period > 0)
+// // PWMP = 96000000/128/12/2/period; //96000000/128/2*11
+// PWMP = 66000000/128/2/period; //96000000/128/2*11
+// PK("<1>PWMP = 0x%4x\n", (u16)PWMP);
+// PK("<1>PWMCNT = 0x%4x\n", (u16)PWMCNT);
+//
+// StartTimer(&pwmTimer);
+//
+// gWriteCnt--;
+// }
+// else
+// StopPwm();
+
+}
+
+// static int handle_pm_event(struct pm_dev *dev, pm_request_t rqst, void *data)
+// {
+// switch(rqst)
+// {
+// case PM_SUSPEND:
+// PK("<1> PM suspend event received in PWM device.\n");
+// StopPwm();
+// break;
+//
+// case PM_RESUME:
+// PK("<1> PM resume event received in PWM device.\n");
+// break;
+//
+// default:
+// break;
+// }
+// return 0;
+// }
+
+/******************************************************************************
+ *
+ *****************************************************************************/
+static int initPWM(void)
+{
+ // Init Port PA[2] : PWMO
+ // Should be done in apf9328.c non ???
+ DDIR(0) |= 0x00000002;
+ GIUS(0) &= ~0x00000002;
+ GPR(0) &= ~0x00000002;
+
+ // Software reset
+ PWMC |= PWMC_SWR;
+ udelay(10);
+ // Activate & de-activate PWM (seems to be necessary after a reset)
+ PWMC |= PWMC_EN; PWMC &= ~PWMC_EN;
+
+ // Enable interrupt
+ //PWMC |= PWMC_IRQEN;
+
+ return 1;
+}
+
+//////////////////////////////////////// /DEV INTERFACE ////////////////////////////////////////////
+
+/*
+ * Called from user space close()
+ */
+int pwm_release(struct inode * inode, struct file * filp)
+{
+ // wait unit gWriteCnt == 0
+ interruptible_sleep_on(&exit_wait);
+
+ if( gPWM_Circ_Buf.buf ) {
+ kfree( gPWM_Circ_Buf.buf );
+ gPWM_Circ_Buf.buf = 0;
+ }
+ printk(DRIVER_NAME " released, 4 bytes FIFO usage: %d\n", g4bytes);
+ return 0;
+}
+
+/*
+ * Called from user space open()
+ */
+int pwm_open(struct inode * inode, struct file * filp)
+{
+ // Init PWM hardware
+ initPWM();
+
+ pr_debug(DRIVER_NAME " opened \n");
+ return 0;
+}
+
+/*
+ *
+ */
+static int pwm_fasync(int fd, struct file *filp, int mode)
+{
+ PK("<1>in pwm_fasyn ----\n");
+#if 0
+ /* TODO TODO put this data into file private data */
+ int minor = checkDevice( filp->f_dentry->d_inode);
+ if ( minor == - 1)
+ {
+ PK("<1>asp_fasyn:bad device minor\n");
+ return -ENODEV;
+ }
+
+ return( fasync_helper(fd, filp, mode, &ts_fasync) );
+#endif
+ return 0;
+}
+
+/*
+ * Called from user space ioctl()
+ */
+int pwm_ioctl(struct inode * inode, struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ char *str=NULL;
+ int ret = 0;
+
+ pr_debug("pwm_ioctl ----\n");
+ switch(cmd)
+ {
+ // Set PWM Mode (Tone or Playback)
+ case PWM_IOC_SMODE:
+ {
+ gPwmMode = arg;
+
+ if (gPwmMode == PWM_TONE_MODE)
+ {
+ // create periodic timer when tone mode
+ pr_debug("PWM Tone Mode.\n");
+ pwmTimer.timer_blk_ptr = &timer_blk;
+ pwmTimer.timer_func = pwmIntFunc;
+ CreateTimer(&pwmTimer);
+ }
+ else
+ {
+ pr_debug("PWM Play Mode.\n");
+ }
+ }
+ break;
+
+ // Set Playback frequency/ouput rate
+ case PWM_IOC_SFREQ:
+ {
+ PWMC &= ~PWMC_EN; // Disable PWM
+ PWMC &= ~PWMC_CLKSRC; // Select 16MHz PERCLK1 as CLK source
+ PWMC &= ~PWMC_PRESCALER_MASK; // PRESCALER = 0 => use full 16MHz
+
+ switch(arg)
+ {
+ case PWM_SAMPLING_32KHZ:
+ PWMC &= ~PWMC_REPEAT_MASK; // REPEAT = 0 => divide by 1
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/1/2 = 32768
+ str = "32Khz";
+ break;
+ case PWM_SAMPLING_16KHZ:
+ PWMC &= ~PWMC_REPEAT_MASK;
+ PWMC |= PWMC_REPEAT(1); // REPEAT = 01 => divide by 2
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/2/2 = 16384
+ str = "16Khz";
+ break;
+ case PWM_SAMPLING_8KHZ:
+ default:
+ PWMC &= ~PWMC_REPEAT_MASK;
+ PWMC |= PWMC_REPEAT(2); // REPEAT = 10 => divide by 4
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/4/2 = 8192
+ str = "8Khz";
+ break;
+ }
+ pr_debug("Sample rate = %s\n", str);
+ pr_debug("ioctl: PWMC = 0x%8x\n", PWMC);
+ }
+ break;
+
+ // Set samples length (8 or 16 bits)
+ case PWM_IOC_SDATALEN:
+ {
+ gDataLen = arg;
+ if( arg == PWM_DATA_8BIT )
+ {
+ PWMP = 0xfe; // Period, 8bit
+ str = "8bit";
+ }
+ else // if(arg == PWM_DATA_16BIT)
+ {
+ PWMP = 0xfffe; // Period, 16bit
+ str = "16bit";
+ }
+
+ pr_debug("Data Length = %s\n", str);
+ }
+ break;
+
+ case PWM_IOC_SSAMPLE:
+ gSampleValue = arg;
+ break;
+
+ case PWM_IOC_SPERIOD:
+ if (gPwmMode == PWM_TONE_MODE)
+ {
+ PK("<1>PWM period = %d\n",(int)arg);
+ pwmTimer.period = arg/12;
+ }
+ break;
+
+ case PWM_IOC_STOP:
+ StopPwm();
+ break;
+
+ case PWM_IOC_SWAPDATA:
+ if (arg&PWM_SWAP_HCTRL) //Halfword FIFO data swapping
+ {
+ PWMC |= PWMC_HCTR;
+ }
+ else
+ {
+ PWMC &= ~PWMC_HCTR;
+ }
+
+ if (arg&PWM_SWAP_BCTRL) //Byte FIFO data swapping
+ {
+ PWMC |= PWMC_BCTR;
+ }
+ else
+ {
+ PWMC &= ~PWMC_BCTR;
+ }
+ break;
+
+ default:
+ printk( DRIVER_NAME ": unkown IOCTL\n");
+ break;
+ }
+
+ return ret;
+}
+
+/******************************************************************************
+ * Called from user space read()
+ *
+ *****************************************************************************/
+ssize_t pwm_read(struct file * filp, char * buf, size_t count, loff_t * l)
+{
+ int ret = 0;
+
+ if( PWMC & PWMC_IRQEN )
+ ret = 1; // no data
+ else
+ ret = 0; // processing data
+
+ pr_debug("pwm_read ----\n");
+ return ret;
+}
+
+/******************************************************************************
+ * Called from user space write()
+ *
+ *****************************************************************************/
+static ssize_t pwm_write( struct file *filp, const char *buf, size_t count, loff_t *f_pos )
+{
+ int ret = 0;
+ int remaining_space = 0;
+
+ pr_debug( "pwm_write ----\n" );
+
+ if( count > MAX_SOUND_BUFFER_SIZE )
+ count = MAX_SOUND_BUFFER_SIZE;
+ // First time, allocate the double buffer
+ if( !gPWM_Circ_Buf.buf ) {
+ gPWM_Circ_Buf.buf = kmalloc( count*2, GFP_KERNEL );
+ if( !gPWM_Circ_Buf.buf ) {
+ goto out;
+ } else {
+ // Initialize circular buffer
+ gPWM_Circ_Buf.read = 0;
+ gPWM_Circ_Buf.write = 0;
+ gPWM_Circ_Buf.size = MAX_SOUND_BUFFER_SIZE*2;
+ }
+ }
+
+ // If there is enough space at the end of the buffer for all data in one copy, do it
+ remaining_space = gPWM_Circ_Buf.size - gPWM_Circ_Buf.write;
+ pr_debug("Remaining space to end: %d, must write: %d \n", remaining_space, count);
+ if( remaining_space >= count ) {
+ // Get data from UserSpace
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write , buf, count ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, count );
+ // if not enough space, then
+ } else {
+ // Do it in 2 times
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write, buf, remaining_space ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, remaining_space );
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write, buf, count - remaining_space ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, count - remaining_space );
+ }
+
+ // Enable PWM
+ PWMC |= PWMC_EN; PWMS = 0x00000000;
+
+ if( gPwmMode == PWM_PLAY_MODE )
+ {
+ PWMC |= PWMC_IRQEN; // Enable IRQ
+ }
+ else
+ {
+ PWMS = gSampleValue;
+ PWMC |= 0x7f00; // set prescaler to 128
+/* gpWriteBufPtr16 = (u16*)gpWriteBuf;
+ gWriteCnt /= 2; //input size is 8bit size, need /2 to get 16bit size
+ StartTimer( &pwmTimer );*/
+ }
+
+ // Calculate how much space is left in buffer
+ remaining_space = CIRC_SPACE( gPWM_Circ_Buf.write, gPWM_Circ_Buf.read, gPWM_Circ_Buf.size );
+ pr_debug("Space left: %d\n", remaining_space);
+ if( remaining_space < count ) {
+ // Pauses user app until interrupt handler has consumed some data
+ interruptible_sleep_on( &write_wait );
+ }
+
+out:
+ pr_debug( "out pwm_write PWMC = 0x%8x ----\n", PWMC );
+ return count;
+}
+
+
+struct file_operations pwm_fops = {
+ open: pwm_open,
+ release: pwm_release,
+ read: pwm_read,
+ write: pwm_write,
+ ioctl: pwm_ioctl,
+ fasync: pwm_fasync
+};
+
+/////////////////////////////////////// END OF /DEV INTERFACE /////////////////////////////////////////////////////////
+
+
+/**
+ * pwm_show_duty - return current duty setting
+ * @dev: device to work with
+ * @buf: space to write the current value in
+ */
+static ssize_t pwm_show_duty(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ ret_size=sprintf(buf,"%u",ppd->duty);
+ return ret_size;
+}
+
+/**
+ * pwm_store_duty - set new duty
+ * @dev: device to work with
+ * @buf: buffer with new value in ASCII
+ * @size: size of buffer
+ *
+ * Returns the given @size or -EIO
+ *
+ * Duty value can be 0 ... 1000. Without floating point you can take
+ * one position after decimal point into account. The internal counters
+ * supports 10 bit resolution, so it makes sense to support such a thing
+ * like 66.6% or 33.3% (given as 666 and 333 values)
+ */
+static ssize_t pwm_store_duty(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if ((value < 1) || (value > 999))
+ return -EIO;
+
+ ppd->duty=(unsigned)value;
+
+ setup_pwm_unit(ppd);
+ return size;
+}
+
+/**
+ * pwm_show_period - return current period setting
+ * @dev: device to work with
+ * @buf: space to write the current value in
+ */
+static ssize_t pwm_show_period(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ if (ppd->entry) /* already initialized? */
+ ret_size=sprintf(buf,"%ld",ppd->entry->period);
+ else
+ ret_size=sprintf(buf,"0");
+
+ return ret_size;
+}
+
+/**
+ * pwm_store_period - set new period setting
+ * @dev: device to work with
+ * @buf: buffer with new value in ASCII
+ * @size: size of buffer
+ *
+ * Returns the given @size or -EIO
+ *
+ * The min/max period depends on processors features.
+ * Currently the i.MXl uses either PERCLK1 or CLK32 clock.s You can prescale
+ * these clocks up to 1/128 (down to 203.125kHz).
+ * The period is based on this prescaled clock and it's width depends on
+ * the period register (PWMP). This register is 16 bits width.
+ * So for PERCLK1 (16Mhz):
+ * - min. period is (no prescale, PWMP = 1): ~62ns
+ * - max. period is (max prescale, period control = 0xFFFF): ~520ms
+ * For CLK32 (32KHz):
+ * - min. period is ~31us
+ * - max. period is 256s
+ *
+ * The unit of the given value should be "us" (1E-6) and the value
+ * between 1 and 500000.
+ */
+
+#define PWM_MAX_PERIOD 500000 // us
+#define PWM_MIN_PERIOD 1 //us
+#define PWM_MIN_FREQUENCY 2 // Hz
+#define PWM_MAX_FREQUENCY 100000 // Hz
+static ssize_t pwm_store_period(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value/*,i*/;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if ((value < PWM_MIN_PERIOD) && (value > PWM_MAX_PERIOD))
+ return -EIO;
+
+/* for( i=0; i<ARRAY_SIZE(pwm_table); i++ )
+ {
+ if (pwm_table[i].period >= value)
+ break;
+ }
+ if (i==ARRAY_SIZE(pwm_table)) // period not found in table?
+ return -EIO;
+
+ ppd->entry=&pwm_table[i];*/
+ ppd->entry=&pwmdata;
+ ppd->entry->period = value;
+ ppd->entry->prescaler = 8; // 1us / tick if CLKSEL is = 0
+ ppd->entry->max_period_val = value;
+ /*printk(KERN_INFO "New period should be %ld us, and is %ld us\n",
+ value,ppd->entry->period);*/
+
+ setup_pwm_unit(ppd);
+ return size;
+}
+
+/**
+ * pwm_show_frequency - return current frequency setting
+ * @dev: device to work with
+ * @buf: space to write the current value in
+ */
+static ssize_t pwm_show_frequency(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ if (ppd->entry)
+ ret_size = sprintf( buf,"%ld", (u32) 1000000/(ppd->entry->period) );
+ else
+ ret_size = sprintf(buf,"0");
+
+ return ret_size;
+}
+
+/**
+ * pwm_store_frequency - set new frequency setting
+ * @dev: device to work with
+ * @buf: buffer with new value in ASCII
+ * @size: size of buffer
+ *
+ * Returns the given @size or -EIO
+ *
+ * The unit of the given value should be in Hertz and the value
+ * between 2 and 100k.
+ */
+
+static ssize_t pwm_store_frequency(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if( (value < PWM_MIN_FREQUENCY) && (value > PWM_MAX_FREQUENCY) )
+ return -EIO;
+
+ // Convert frequency into period
+ value = (u32) (1000000 / value);
+ //
+ ppd->entry=&pwmdata;
+ ppd->entry->period = value;
+ ppd->entry->prescaler = 8; // 1us / tick if CLKSEL is = 0
+ ppd->entry->max_period_val = value;
+ // Update hardware
+ setup_pwm_unit(ppd);
+
+ return( size );
+}
+
+/**
+ * pwm_show_state - return current state setting
+ * @dev: device to work with
+ * @buf: space to write the current value in
+ */
+static ssize_t pwm_show_state(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t ret_size = 0;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ ret_size=sprintf(buf,"%d",ppd->active);
+ return ret_size;
+}
+
+/**
+ * pwm_store_state - set new state setting
+ * @dev: device to work with
+ * @buf: buffer with new value in ASCII
+ * @size: size of buffer
+ *
+ * Returns the given @size
+ */
+static ssize_t pwm_store_state(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
+{
+ long value;
+ struct pwm_device *ppd = to_pwm_device(dev);
+
+ value = simple_strtol(buf, NULL, 10);
+ if (value != 0)
+ ppd->active=1;
+ else
+ ppd->active=0;
+
+ setup_pwm_unit(ppd);
+
+ return size;
+}
+
+
+/*
+ * Attribute: /sys/class/pwm/pwmX/duty
+ * dev_attr_duty
+ */
+static DEVICE_ATTR(duty, S_IWUSR | S_IRUGO, pwm_show_duty, pwm_store_duty);
+
+/*
+ * Attribute: /sys/class/pwm/pwmX/period
+ * dev_attr_period
+ */
+static DEVICE_ATTR(period, S_IWUSR | S_IRUGO, pwm_show_period, pwm_store_period);
+
+/*
+ * Attribute: /sys/class/pwm/pwmX/frequency
+ * dev_attr_frequency
+ */
+static DEVICE_ATTR(frequency, S_IWUSR | S_IRUGO, pwm_show_frequency, pwm_store_frequency);
+
+/*
+ * Attribute: /sys/class/pwm/pwmX/active
+ * dev_attr_active
+ */
+static DEVICE_ATTR(active, S_IWUSR | S_IRUGO, pwm_show_state, pwm_store_state);
+
+/**
+ * init_userinterface - setup the device and things the user will see
+ * @pdev: platform device to work with
+ * @address: physical address of this device
+ *
+ * Return 0 on success
+ */
+static int init_userinterface(struct platform_device *pdev, u32 address)
+{
+ int rc = 0;
+ struct pwm_device *ppd;
+
+ if (unlikely((ppd = kmalloc(sizeof(struct pwm_device), GFP_KERNEL)) == NULL)) {
+ rc = -ENOMEM;
+ goto error_malloc;
+ }
+
+ memset(&ppd->class_dev, 0, sizeof(struct device));
+ ppd->class_dev.class = &pwm_class;
+ ppd->class_dev.parent = &pdev->dev;
+ snprintf(ppd->class_dev.bus_id, BUS_ID_SIZE, "pwm%i", pdev->id);
+ ppd->reg=address;
+ ppd->entry=NULL;
+ ppd->active=0;
+ ppd->duty=500; // = 50.O%
+
+ rc = device_register(&ppd->class_dev);
+ if (unlikely(rc)) goto error_register;
+
+ /* Register the attributes */
+ rc |= device_create_file( &ppd->class_dev, &dev_attr_duty );
+ if (unlikely(rc)) goto error_file;
+ rc |= device_create_file( &ppd->class_dev, &dev_attr_period );
+ if (unlikely(rc)) goto error_file;
+ rc |= device_create_file( &ppd->class_dev, &dev_attr_frequency );
+ if (unlikely(rc)) goto error_file;
+ rc |= device_create_file( &ppd->class_dev, &dev_attr_active );
+ if (unlikely(rc)) goto error_file;
+
+ pdev->dev.driver_data=ppd;
+ goto success;
+
+error_file:
+ printk(KERN_ERR "%s: class /sys file creation failed\n", DRIVER_NAME);
+ unregister_sys_file(ppd);
+error_register:
+ printk(KERN_ERR "%s: class registering failed\n", DRIVER_NAME);
+ kfree(ppd);
+error_malloc:
+ return rc;
+success:
+ return 0;
+}
+
+/*
+ * PWM interrupt handler (used in Play Mode only)
+ */
+static irqreturn_t pwm_interrupt(int irq, void *dev_id)
+{
+ u32 status;
+ int remaining = 0;
+
+ /* Acknowledge interrupt */
+ status = PWMC;
+
+ remaining = CIRC_CNT( gPWM_Circ_Buf.write, gPWM_Circ_Buf.read, gPWM_Circ_Buf.size );
+ if( remaining <= 1024 && remaining > 1021 ) { // TODO make it better (I think a test each consumed sample is the only accurate solution
+ // Can accept new data now
+ wake_up_interruptible( &write_wait );
+ }
+
+ /* End of sound buffer */
+ if( remaining < 3 )
+ {
+ if(gDataLen == PWM_DATA_8BIT)
+ {
+ while( remaining )
+ {
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ /*PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);*/
+ remaining--;
+ }
+ }
+ else // if(gDataLen == PWM_DATA_16BIT) // one comparaison is enough
+ {
+ while( remaining )
+ {
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ //PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);
+ remaining--;
+ }
+ }
+
+ StopPwm();
+ goto end;
+ }
+
+ /* Put sound samples in FIFO */
+ if(gDataLen == PWM_DATA_8BIT)
+ {
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ if (PWMC & PWMC_FIFOAV) // TODO: verify if needed
+ {
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ g4bytes++;
+ }
+ }
+ else // if(gDataLen == PWM_DATA_16BIT) // one comparaison is enough
+ {
+ // TODO: put good value in PWMC_BCTR to auto swap bytes if needed (do it at write or ioctl)
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ if (PWMC & PWMC_FIFOAV) // TODO: verify if needed
+ {
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ g4bytes++;
+ }
+ }
+
+end:
+ return(IRQ_HANDLED);
+}
+
+/*
+ *
+ */
+static int __init pwm_init_from_probe(void)
+{
+ int result;
+
+ /* Register our char device */
+ result = register_chrdev(0, DRIVER_NAME, &pwm_fops);
+ if ( result < 0 )
+ {
+ printk("pwm driver: Unable to register driver\n");
+ goto end;
+ }
+ /* Dynamic Major allocation */
+ if( gMajor == 0 )
+ {
+ gMajor = result;
+ printk("PWM major number = %d\n",gMajor);
+ }
+
+ result = request_irq(PWM_INT, pwm_interrupt, IRQF_DISABLED, DEV_IRQ_NAME, DEV_IRQ_ID);
+ if (result)
+ {
+ printk("<1>cannot init major= %d irq=%d\n", gMajor, irq);
+ unregister_chrdev(gMajor, DRIVER_NAME);
+ goto end;
+ }
+
+ /* init wait queue */
+ init_waitqueue_head(&write_wait);
+ init_waitqueue_head(&exit_wait);
+ pr_debug("Wait queues initialized\n");
+
+ /* init PWM hardware module */
+ initPWM();
+
+ printk("i.MX PWM driver v" DRIVER_VERSION "\n");
+
+end:
+ return( result );
+}
+
+/**
+ * imx_pwm_drv_probe - claim resources
+ * @pdev: platform device to work with
+ *
+ * CAUTION: This functions rejects a PWM unit if its
+ * not forwarded to any possible GPIO pin! In this case
+ * it also returns -ENODEV
+ *
+ * Returns -ENODEV if there is no such device on this SoC, -EBUSY if this
+ * resource is already claimed
+ */
+static int imx_pwm_drv_probe(struct platform_device *pdev)
+{
+ int err=-ENODEV;
+ struct resource *res;
+
+ printk(KERN_INFO " Initializing PWM#%u...",pdev->id);
+
+ switch( pdev->id )
+ {
+ /* PWM0 */
+ case 0:
+ // Check if GPIO was initialized ??
+ break;
+
+ default:
+ printk(DRIVER_NAME " failed. Unknown PWM%u device. Remember that this device only supports 1 PWM\n", pdev->id);
+ return err;
+ break;
+ }
+
+ if (unlikely(!(res = platform_get_resource(pdev, IORESOURCE_MEM, 0))))
+ goto exit;
+
+ if (unlikely(!request_mem_region( res->start, res->end - res->start + 1, "imx-pwm" ))) {
+ err = -EBUSY;
+ goto exit;
+ }
+ pwm_init_from_probe();
+
+ /* Create /sys stuf */
+ if (unlikely((err=init_userinterface(pdev,res->start))))
+ goto release;
+
+ printk("done.\n");
+ return(0);
+
+release:
+ release_mem_region(res->start, res->end - res->start + 1);
+exit:
+ printk(KERN_INFO "not available.\n");
+ return err;
+}
+
+static inline void unregister_sys_file( struct pwm_device *ppd )
+{
+ /* Unregister /sys attributes */
+ device_remove_file( &ppd->class_dev, &dev_attr_active );
+ device_remove_file( &ppd->class_dev, &dev_attr_period );
+ device_remove_file( &ppd->class_dev, &dev_attr_frequency );
+ device_remove_file( &ppd->class_dev, &dev_attr_duty );
+}
+
+/**
+ * imx_pwm_drv_remove - free claimed resources
+ * @pdev: platform device to work with
+ */
+static int imx_pwm_drv_remove (struct platform_device *pdev)
+{
+ struct resource *res;
+ struct pwm_device *ppd=(struct pwm_device*)pdev->dev.driver_data;
+
+ unregister_sys_file(ppd);
+ device_unregister( &ppd->class_dev );
+ kfree(ppd);
+
+ res = platform_get_resource( pdev, IORESOURCE_MEM, 0 );
+ release_mem_region( res->start, res->end - res->start + 1 );
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+/**
+ * imx_pwm_drv_suspend - power down
+ * @dev: platform device to work with
+ * @state: state to reach
+ */
+static int imx_pwm_drv_suspend (struct platform_device *pdev, pm_message_t state)
+{
+ printk("%s\n",__FUNCTION__);
+ return 0;
+}
+
+/**
+ * imx_pwm_drv_resume - power up and continue
+ * @pdev: platform device to work with
+ */
+static int imx_pwm_drv_resume (struct platform_device *pdev)
+{
+ printk("%s\n",__FUNCTION__);
+ return 0;
+}
+#else
+
+# define imx_pwm_drv_suspend NULL
+# define imx_pwm_drv_resume NULL
+
+#endif // CONFIG_PM
+
+/**
+ * pwm_class_release -
+ * @dev:
+ */
+static void pwm_class_release(struct device *dev)
+{
+ return;
+}
+
+static struct platform_driver imx_pwm_driver = {
+ .probe = imx_pwm_drv_probe,
+ .remove = imx_pwm_drv_remove,
+ .suspend = imx_pwm_drv_suspend,
+ .resume = imx_pwm_drv_resume,
+ .driver = {
+ .name = DRIVER_NAME,
+ },
+};
+
+
+static struct sysdev_class pwm_sysclass = {
+ .name = "pwm",
+};
+
+static struct sys_device pwm_sys_device = {
+ .id = 0,
+ .cls = &pwm_sysclass,
+};
+
+static struct class pwm_class = {
+ .name = "pwm",
+ .dev_release = pwm_class_release,
+};
+
+
+/*
+ * Called when module is insmoded
+ */
+int __init imx_pwm_init(void)
+{
+ int ret;
+
+ printk(KERN_INFO "Initializing PWM class.\n");
+
+ if (unlikely((ret = class_register(&pwm_class)))) {
+ printk(KERN_ERR "%s: couldn't register class, exiting\n", DRIVER_NAME);
+ return ret;
+ }
+
+ if (unlikely((ret = sysdev_class_register(&pwm_sysclass)))) {
+ printk(KERN_ERR "%s: couldn't register sysdev class, exiting\n", DRIVER_NAME);
+ goto out_sysdev_class;
+ }
+
+ if (unlikely((ret = sysdev_register(&pwm_sys_device)))) {
+ printk(KERN_ERR "%s: couldn't register sysdev, exiting\n", DRIVER_NAME);
+ goto out_sysdev_register;
+ }
+
+ return platform_driver_register( &imx_pwm_driver );
+
+out_sysdev_register:
+ sysdev_class_unregister( &pwm_sysclass );
+out_sysdev_class:
+ class_unregister( &pwm_class );
+
+ return ret;
+}
+
+/*
+ * Called when module is rmmoded
+ */
+void __exit imx_pwm_exit(void)
+{
+ disable_irq( PWM_INT ); // should be done before free_irq no ?
+ free_irq( PWM_INT, DEV_IRQ_ID );
+ unregister_chrdev( gMajor, DRIVER_NAME );
+
+ platform_driver_unregister( &imx_pwm_driver );
+ sysdev_unregister( &pwm_sys_device );
+ sysdev_class_unregister( &pwm_sysclass );
+ class_unregister( &pwm_class );
+
+ printk( DRIVER_NAME " successfully unloaded\n" );
+}
+
+module_init(imx_pwm_init);
+module_exit(imx_pwm_exit);
+MODULE_AUTHOR("Julien Boibessot & Sebastien Royen, inspired by a lot of other PWM drivers");
+MODULE_DESCRIPTION("i.MX PWM driver");
+MODULE_LICENSE("GPL");
+
Modified: trunk/target/linux/modules/pwm/test/testpwm.sh
===================================================================
--- trunk/target/linux/modules/pwm/test/testpwm.sh 2008-12-19 16:59:30 UTC (rev 968)
+++ trunk/target/linux/modules/pwm/test/testpwm.sh 2008-12-20 20:08:18 UTC (rev 969)
@@ -9,6 +9,11 @@
FREQUENCY="100 200 300 400 500 600"
DUTY="001 250 333 500 666 750 999"
+if [ ! -d "$SYS_DIR" ]; then
+ echo "Can't find /sys/ interface"
+ exit 1
+fi
+
echo "Starting PWM test"
echo 1 > $SYS_DIR/active
@@ -20,7 +25,7 @@
sleep 5
done
-#Test period setting
+#Test period setting
for period in $PERIOD
do
echo $period > $SYS_DIR/period
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-19 16:59:35
|
Revision: 968
http://armadeus.svn.sourceforge.net/armadeus/?rev=968&view=rev
Author: artemys
Date: 2008-12-19 16:59:30 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
[LINUX] Update desc. of backlight driver
Modified Paths:
--------------
trunk/target/linux/modules/backlight/Kconfig
Modified: trunk/target/linux/modules/backlight/Kconfig
===================================================================
--- trunk/target/linux/modules/backlight/Kconfig 2008-12-19 13:09:41 UTC (rev 967)
+++ trunk/target/linux/modules/backlight/Kconfig 2008-12-19 16:59:30 UTC (rev 968)
@@ -2,10 +2,10 @@
#
config IMX_BACKLIGHT
- tristate "i.MXL backlight driver"
+ tristate "i.MX backlight driver"
default n
depends on ARMADEUS_DRIVERS && BACKLIGHT_LCD_SUPPORT
---help---
This driver allows you to control the backlight of your graphic LCD, if it's
- connected to the i.MXL "CONTRAST" pin.
+ connected to the i.MXL/i.MX27 "CONTRAST" pin.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-19 13:09:45
|
Revision: 967
http://armadeus.svn.sourceforge.net/armadeus/?rev=967&view=rev
Author: artemys
Date: 2008-12-19 13:09:41 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
[LINUX] Factorizes common Makefile targets (default & clean) for Armadeus custom drivers
Modified Paths:
--------------
trunk/target/linux/modules/Makefile
trunk/target/linux/modules/backlight/Makefile
trunk/target/linux/modules/fpga/Makefile
trunk/target/linux/modules/fpga/others/Makefile
trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile
trunk/target/linux/modules/generic/Makefile
trunk/target/linux/modules/gpio/Makefile
trunk/target/linux/modules/imxlkeypad/Makefile
trunk/target/linux/modules/isp1761/Makefile
trunk/target/linux/modules/max1027/Makefile
trunk/target/linux/modules/pwm/Makefile
Added Paths:
-----------
trunk/target/linux/modules/Makefile.in
Modified: trunk/target/linux/modules/Makefile
===================================================================
--- trunk/target/linux/modules/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -21,16 +21,17 @@
ifeq ($(LINUX_DIR),)
LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
-PWD:= $(shell pwd)
+KDIR := $(LINUX_DIR)
+PWD := $(shell pwd)
default:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) modules
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+DIRS := $(shell ls)
clean:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
-
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
+ for directory in $(DIRS); do if [ -d "$$directory" ] && [ ! -L "$$directory" ]; then $(MAKE) -C $$directory clean; fi ; done
+
install:
echo "Installing Armadeus drivers..."
$(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
Added: trunk/target/linux/modules/Makefile.in
===================================================================
--- trunk/target/linux/modules/Makefile.in (rev 0)
+++ trunk/target/linux/modules/Makefile.in 2008-12-19 13:09:41 UTC (rev 967)
@@ -0,0 +1,13 @@
+#
+# Helpers Makefile for the Armadeus drivers
+#
+#
+
+default:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+clean:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
+ rm -f modules.order
+ rm -rf .tmp_versions/
+
Property changes on: trunk/target/linux/modules/Makefile.in
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/target/linux/modules/backlight/Makefile
===================================================================
--- trunk/target/linux/modules/backlight/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/backlight/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -23,13 +23,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- rm -f *.*o
- rm -f Module.symvers
- rm -f .*.cmd
-
endif
Modified: trunk/target/linux/modules/fpga/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/fpga/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -20,16 +20,12 @@
ifeq ($(LINUX_DIR),)
LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
-PWD:= $(shell pwd)
+KDIR := $(LINUX_DIR)
+PWD := $(shell pwd)
-default:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) zImage modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
-
install:
echo "Installing Armadeus drivers..."
$(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
Modified: trunk/target/linux/modules/fpga/others/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/fpga/others/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -20,19 +20,15 @@
ifeq ($(LINUX_DIR),)
LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
-PWD:= $(shell pwd)
+KDIR := $(LINUX_DIR)
+PWD := $(shell pwd)
-default:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) zImage modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../../Makefile.in
-clean:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
-
install:
echo "Installing Armadeus drivers..."
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
+ $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
endif
Modified: trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -18,12 +18,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-
-clean:
- rm -f *.*o
- rm -f Module.symvers
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../../../Makefile.in
endif
Modified: trunk/target/linux/modules/generic/Makefile
===================================================================
--- trunk/target/linux/modules/generic/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/generic/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -18,12 +18,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- rm -f *.*o
- rm -f Module.symvers
-
endif
Modified: trunk/target/linux/modules/gpio/Makefile
===================================================================
--- trunk/target/linux/modules/gpio/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/gpio/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -21,14 +21,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets:
+include ../Makefile.in
-clean:
- rm -f *.*o \
- rm -f Module.symvers
- rm -f .*.cmd
- rm -f *.mod.c
- rm -rf .tmp_versions/
endif
Modified: trunk/target/linux/modules/imxlkeypad/Makefile
===================================================================
--- trunk/target/linux/modules/imxlkeypad/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/imxlkeypad/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -17,12 +17,7 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-
-clean:
- rm -f .*.cmd
- rm -f *.*o
- rm -f Module.symvers
-
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
+
endif
Modified: trunk/target/linux/modules/isp1761/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/isp1761/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -16,16 +16,12 @@
ifeq ($(LINUX_DIR),)
LINUX_DIR := $(ARMADEUS_LINUX_DIR)
endif
+KDIR := $(LINUX_DIR)
PWD := $(shell pwd)
-default:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
-
install:
echo "Installing Armadeus drivers..."
$(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
Modified: trunk/target/linux/modules/max1027/Makefile
===================================================================
--- trunk/target/linux/modules/max1027/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/max1027/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -17,14 +17,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- rm -f *.*o \
- rm -f Module.symvers
- rm -f .*.cmd
- rm -f *.mod.c
- rm -rf .tmp_versions/
endif
Modified: trunk/target/linux/modules/pwm/Makefile
===================================================================
--- trunk/target/linux/modules/pwm/Makefile 2008-12-19 10:00:43 UTC (rev 966)
+++ trunk/target/linux/modules/pwm/Makefile 2008-12-19 13:09:41 UTC (rev 967)
@@ -20,12 +20,8 @@
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
-default:
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# Armadeus custom drivers common targets (default, clean, etc...)
+include ../Makefile.in
-clean:
- rm -f *.*o \
- rm -f Module.symvers
-
endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-19 10:00:45
|
Revision: 966
http://armadeus.svn.sourceforge.net/armadeus/?rev=966&view=rev
Author: artemys
Date: 2008-12-19 10:00:43 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
[LINUX] Cleanup backlight driver to prepare i.MX27 compatibility
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
trunk/target/linux/modules/backlight/imx_bl_2.6.23.c
trunk/target/linux/modules/backlight/test/test_backlight.sh
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-18 16:15:30 UTC (rev 965)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-19 10:00:43 UTC (rev 966)
@@ -497,7 +497,7 @@
+};
+//extern struct platform_device imxfb_device; // filled in generic.c
+static struct platform_device imxbl_device = {
-+ .name = "imxl-bl",
++ .name = "imx-bl",
+ .dev = {
+// .parent = &imxfb_device.dev, crash kernel even if EXPORT_SYMBOL() is done in generic.c
+ .platform_data = &imx_bl_machinfo,
@@ -611,6 +611,9 @@
+ .timer = &imx_timer,
+ .init_machine = apf9328_init,
+MACHINE_END
+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/arch/arm/mach-imx/apf9328_lcd_config.h
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328_lcd_config.h
@@ -0,0 +1,200 @@
@@ -818,7 +821,7 @@
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/arch/arm/mach-imx/include/mach/apf9328.h
-+++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/apf9328.h
++++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/apf9328.h
@@ -0,0 +1,58 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/target/linux/modules/backlight/imx_bl_2.6.23.c
===================================================================
--- trunk/target/linux/modules/backlight/imx_bl_2.6.23.c 2008-12-18 16:15:30 UTC (rev 965)
+++ trunk/target/linux/modules/backlight/imx_bl_2.6.23.c 2008-12-19 10:00:43 UTC (rev 966)
@@ -1,5 +1,5 @@
/*
- * Backlight Driver for i.MXL based platforms
+ * Backlight Driver for i.MX based platforms
*
* Copyright (c) 2007 Julien Boibessot - Armadeus Project
*
@@ -21,12 +21,17 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
#include <asm/arch/imxfb.h> /* Backlight machinfo struct is defined here */
-#include <asm/arch/imx-regs.h>
+#include <asm/arch/hardware.h>
#else
#include <mach/imxfb.h> /* Backlight machinfo struct is defined here */
-#include <mach/imx-regs.h>
+#include <mach/hardware.h>
#endif
+#ifdef CONFIG_ARCH_IMX
+#define LCDC_BASE_ADDR IMX_LCDC_BASE
+#endif
+#define DRIVER_NAME "imx-bl"
+#define DRIVER_VERSION "0.2"
static int imxbl_intensity;
static DEFINE_MUTEX(bl_mutex);
@@ -52,14 +57,14 @@
if (imxbl_flags & IMXBL_BATTLOW)
intensity &= bl_machinfo->limit_mask;
- // If a function was given in machine info then use it
+ /* If a method was given in machine info then use it */
if( bl_machinfo->set_bl_intensity ) {
bl_machinfo->set_bl_intensity(intensity);
- } else { // Otherwise use this default one:
- shadow = LCDC_PWMR;
- shadow &= 0xffffff00;
+ } else { /* Otherwise use this default one: */
+ shadow = readl(IO_ADDRESS(LCDC_BASE_ADDR) + 0x2c); /* PWMR / LPCCR */
+ shadow &= ~PWMR_PW(0xff);
shadow |= PWMR_PW(intensity);
- LCDC_PWMR = shadow;
+ writel(shadow, IO_ADDRESS(LCDC_BASE_ADDR) + 0x2c);
pr_debug("Setting backlight intensity to %d\n", intensity);
}
@@ -125,12 +130,12 @@
if (!machinfo->limit_mask)
machinfo->limit_mask = -1;
- imx_backlight_device = backlight_device_register ("imxl-bl", &pdev->dev, NULL, &imxbl_ops);
- if (IS_ERR (imx_backlight_device))
- {
- printk("Error imxBL\n");
+ imx_backlight_device = backlight_device_register(DRIVER_NAME,
+ &pdev->dev, NULL, &imxbl_ops);
+ if (IS_ERR (imx_backlight_device)) {
+ printk("can't register backlight device\n");
return PTR_ERR (imx_backlight_device);
- }
+ }
platform_set_drvdata(pdev, imx_backlight_device);
@@ -139,7 +144,7 @@
imx_backlight_device->props.brightness = machinfo->default_intensity;
backlight_update_status(imx_backlight_device);
- printk("i.MX Backlight driver initialized.\n");
+ printk("i.MX Backlight driver v" DRIVER_VERSION " initialized.\n");
return 0;
}
@@ -163,23 +168,23 @@
.suspend = imxbl_suspend,
.resume = imxbl_resume,
.driver = {
- .name = "imxl-bl",
+ .name = DRIVER_NAME,
},
};
static int __init imxbl_init(void)
{
- return platform_driver_register(&imxbl_driver);
+ return platform_driver_register(&imxbl_driver);
}
static void __exit imxbl_exit(void)
{
- platform_driver_unregister(&imxbl_driver);
+ platform_driver_unregister(&imxbl_driver);
}
module_init(imxbl_init);
module_exit(imxbl_exit);
MODULE_AUTHOR("Julien Boibessot <jul...@ar...>");
-MODULE_DESCRIPTION("i.MXL Backlight Driver");
+MODULE_DESCRIPTION("i.MX Backlight Driver");
MODULE_LICENSE("GPL");
Modified: trunk/target/linux/modules/backlight/test/test_backlight.sh
===================================================================
--- trunk/target/linux/modules/backlight/test/test_backlight.sh 2008-12-18 16:15:30 UTC (rev 965)
+++ trunk/target/linux/modules/backlight/test/test_backlight.sh 2008-12-19 10:00:43 UTC (rev 966)
@@ -6,7 +6,12 @@
exit 1
}
-BL_SYS_DIR="/sys/class/backlight/imxl-bl/"
+BL_SYS_DIR="/sys/class/backlight/imx-bl/"
+if [ ! -d "$BL_SYS_DIR" ]; then
+ echo "/sys interface not found:"
+ echo " driver not loaded or wrong version !"
+ failed
+fi
# Save actual brightness
ACTUAL=`cat "$BL_SYS_DIR/actual_brightness"`
@@ -25,4 +30,4 @@
# Restore brightness
echo "$ACTUAL" > "$BL_SYS_DIR/brightness"
-exit 0
\ No newline at end of file
+exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-12-18 16:15:34
|
Revision: 965
http://armadeus.svn.sourceforge.net/armadeus/?rev=965&view=rev
Author: FabM
Date: 2008-12-18 16:15:30 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
[LINUX][DRIVER] Remove /proc directory at module exit
Modified Paths:
--------------
trunk/target/linux/modules/gpio/ppdevemu.c
Modified: trunk/target/linux/modules/gpio/ppdevemu.c
===================================================================
--- trunk/target/linux/modules/gpio/ppdevemu.c 2008-12-18 14:00:48 UTC (rev 964)
+++ trunk/target/linux/modules/gpio/ppdevemu.c 2008-12-18 16:15:30 UTC (rev 965)
@@ -375,6 +375,7 @@
{
printk("PPDEV cleanup: ");
remove_proc_entry( PPDEV_PROC_FILENAME, NULL );
+ remove_proc_entry( PPDEV_PROC_DIRNAME, NULL);
printk("2 ");
unregister_chrdev(ppdev_major, PPDEV_DEVICE_NAME);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-12-18 14:00:53
|
Revision: 964
http://armadeus.svn.sourceforge.net/armadeus/?rev=964&view=rev
Author: FabM
Date: 2008-12-18 14:00:48 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
[LINUX][Driver] Suppressing fpga directory in proc entry at module remove
Modified Paths:
--------------
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c 2008-12-18 11:00:12 UTC (rev 963)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c 2008-12-18 14:00:48 UTC (rev 964)
@@ -159,7 +159,7 @@
int err = 0; int ret = 0;
unsigned int minor;
- PRINTF( DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd );
+ //PRINTF( DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd );
// Extract the type and number bitfields, and don't decode wrong cmds: return ENOTTY (inappropriate ioctl) before access_ok()
if (_IOC_TYPE(cmd) != FPGA_IOCTL) return -ENOTTY;
@@ -201,7 +201,6 @@
static int createProcEntries( void )
{
static struct proc_dir_entry *fpga_Proc_File;
-
// Create main directory
proc_mkdir(FPGA_PROC_DIRNAME, NULL);
// Create proc file to handle GPIO values
@@ -273,10 +272,12 @@
// Remove /proc entries
remove_proc_entry(FPGA_PROC_FILENAME, NULL);
+ // Remove /proc directory entry
+ remove_proc_entry(FPGA_PROC_DIRNAME, NULL);
// De-register /dev interface
unregister_chrdev(fpga_major, FPGA_DRIVER_NAME);
- PRINTF("Ok !\n ");
+ PRINTF("Ok !\n");
}
//------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-18 11:00:14
|
Revision: 963
http://armadeus.svn.sourceforge.net/armadeus/?rev=963&view=rev
Author: artemys
Date: 2008-12-18 11:00:12 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
[TEST] Add test script for ADC
Added Paths:
-----------
trunk/target/test/test_adc.sh
Added: trunk/target/test/test_adc.sh
===================================================================
--- trunk/target/test/test_adc.sh (rev 0)
+++ trunk/target/test/test_adc.sh 2008-12-18 11:00:12 UTC (rev 963)
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2008 The Armadeus Project
+#
+# 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.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+
+test_ADC()
+{
+ show_test_banner "ADC"
+
+ modprobe spi_imx
+ modprobe max1027
+ if [ "$?" == 0 ]; then
+ # Slow mode
+ let set=0x62; echo $set > /sys/bus/spi/devices/spi1.0/setup
+ sleep 0.1
+ let conv=0xf9; echo $conv > /sys/bus/spi/devices/spi1.0/conversion
+ sleep 0.1
+ temp=`cat /sys/bus/spi/devices/spi1.0/temp1_input`
+ if [ "$temp" != "0" ]; then
+ echo "Temp: $temp m°C"
+ echo_test_ok
+ fi
+ else
+ echo "Hardware not found !"
+ fi
+}
+
+test_ADC
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2008-12-18 08:39:08
|
Revision: 962
http://armadeus.svn.sourceforge.net/armadeus/?rev=962&view=rev
Author: thom25
Date: 2008-12-18 08:39:00 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
[LINUX] improve tsc2102 driver
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-16 18:51:42 UTC (rev 961)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-18 08:39:00 UTC (rev 962)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,610 @@
+@@ -0,0 +1,607 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -340,7 +340,7 @@
+#define TSC2102_CS_GPIOB 17
+#define TSC2102_INT_GPIOD 8
+
-+static void tsc2102_init_gpio(void)
++static int tsc2102_init_gpio(void)
+{
+ // Activate SPI2 port ----
+ // PortB 17 is used as chip select (in GPIO mode)
@@ -370,6 +370,7 @@
+ FMCR &= ~(SSI_TXCLK_SEL);
+
+ printk("TSC2102 GPIOs initialized\n");
++ return 0;
+}
+
+// Chip select command for TSC2102
@@ -389,7 +390,7 @@
+static struct tsc2102_config apf9328_tsc2102_config = {
+ .use_internal = 1, // -> use internal voltage reference
+ .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
-+ .temp_at25c = 2200,
++ .init = tsc2102_init_gpio
+/* .apm_report = palmte_get_power_status,
+ .alsa_config = &palmte_alsa_config,*/
+};
@@ -543,10 +544,6 @@
+ set_imx_fb_info(&apf9328_fb_info);
+ imx_fb_set_gpios(); /* init PORTD ....*/
+#endif
-+
-+#ifdef CONFIG_SPI_TSC2102
-+ tsc2102_init_gpio();
-+#endif
+#ifdef CONFIG_CAN_MCP251X
+ mcp251X_init_gpio();
+#endif
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102.patch 2008-12-16 18:51:42 UTC (rev 961)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102.patch 2008-12-18 08:39:00 UTC (rev 962)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/include/linux/spi/tsc2102.h
+++ linux-2.6.27.2.mod/include/linux/spi/tsc2102.h
-@@ -0,0 +1,176 @@
+@@ -0,0 +1,177 @@
+/*
+ * include/linux/spi/tsc2102.h
+ *
@@ -30,13 +30,15 @@
+#define __LINUX_SPI_TSC2102_H
+
+struct apm_power_info;
++
+struct tsc2102_config {
+ int use_internal; /* Use internal reference voltage */
+ uint32_t monitor; /* What inputs are relevant */
-+ int temp_at25c; /* Thermometer calibration data */
+ void (*apm_report)(struct apm_power_info *info, int *battery);
+ /* Report status to APM based on battery[] */
+ void *alsa_config; /* .platform_data for the ALSA device */
++ int (*init)(void); /* allocate GPIOs */
++ void (*exit)(void);
+};
+
+#define TSC_BAT1 (1 << 0)
@@ -57,7 +59,6 @@
+extern int tsc2102_coords_cb(tsc2102_coords_t handler);
+extern int tsc2102_ports_cb(tsc2102_ports_t handler);
+extern int tsc2102_temp1_cb(tsc2102_temp_t handler);
-+extern int tsc2102_temp2_cb(tsc2102_temp_t handler);
+
+#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
+extern void tsc2102_set_volume(uint8_t left_ch, uint8_t right_ch);
@@ -185,14 +186,13 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/drivers/spi/tsc2102.c
+++ linux-2.6.27.2.mod/drivers/spi/tsc2102.c
-@@ -0,0 +1,1148 @@
+@@ -0,0 +1,1000 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
+ * TSC2102 interface driver.
-+ * Copyright (C) 2007 Armadeus systems (nc)
-+ * -> fix dead locks, reorganize state machine
-+ * -> fix scheduling while atomic and hwmon support
++ * Copyright (C) 2008 Armadeus systems (nc)
++ * -> spi communication reworked to avoid deadlock
+ * Copyright (c) 2005 Andrzej Zaborowski <ba...@za...>
+ *
+ * This package is free software; you can redistribute it and/or modify
@@ -224,6 +224,7 @@
+#include <linux/err.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
++#include <linux/workqueue.h>
+
+#include <asm/system.h>
+#include <asm/irq.h>
@@ -236,19 +237,20 @@
+#endif
+
+#ifdef CONFIG_MACH_APF9328 // TODO: Put MCLK choice in Kconfig ??
-+#define MCLK_16M 1 // DevFull
++#define MCLK_16M 1
+#endif // CONFIG_MACH_APF9328
+
+/* #define DEBUG */
+#define DEBUG_AUDIO
+
+/* Bit field definitions for chip registers */
-+#define TSC2102_ADC_TS_CONTROL 0x8bf4
++#define TSC2102_ADC_TS_CONTROL 0x8bf5
+#define TSC2102_ADC_SCAN_CONTROL 0x2ff4
+#define TSC2102_ADC_T1_CONTROL 0x2bf4
+#define TSC2102_ADC_T2_CONTROL 0x33f4
+#define TSC2102_ADC_DAV 0x4000
+#define TSC2102_ADC_PEN 0x0000
++#define TSC2102_ADC_PINTDAV 0x8000
+#define TSC2102_ADC_INT_REF_125 0x0016
+#define TSC2102_ADC_INT_REF_250 0x0017
+#define TSC2102_ADC_REF TSC2102_ADC_INT_REF_250 /*2.5V*/
@@ -283,6 +285,9 @@
+
+#define CS_CHANGE(val) 0
+
++#define SM_BAT_AUX 0
++#define SM_TEMP1 1
++
+struct tsc2102_spi_req {
+ struct spi_device *dev;
+ uint16_t command;
@@ -300,27 +305,23 @@
+ int state; /* Scan modes */
+ struct timer_list ts_timer; /* Busy-wait for PEN UP */
+ struct timer_list mode_timer; /* Change .state every some time */
-+ int touch_in_progress;
++
+ uint16_t status, adc_status, adc_data[4];
+ tsc2102_touch_t touch_cb;
+ tsc2102_coords_t coords_cb;
+ tsc2102_ports_t ports_cb;
+ tsc2102_temp_t temp1_cb;
-+ tsc2102_temp_t temp2_cb;
+ unsigned int ts_msecs; /* Interval for .ts_timer */
+ unsigned int mode_msecs; /* Interval for .mode_timer */
+
+ struct spi_device *spi;
-+ struct spi_transfer *transfers;
-+ struct tsc2102_spi_req req_adc;
-+ struct tsc2102_spi_req req_status;
-+ struct tsc2102_spi_req req_pressure;
-+ struct tsc2102_spi_req req_stopadc;
-+ struct tsc2102_spi_req req_mode;
-+ struct tsc2102_spi_req req_click;
+
-+ int bat[2], aux[1], temp[2];
-+ struct class_device *hwmondev;
++ int bat[2], aux[1], temp;
++ struct device *hwmondev;
++ struct work_struct work;
++ unsigned long todo;
++#define WORK_CHANGE_MODE 0 /* change mode */
++
+};
+
+static struct tsc2102_dev tsc;
@@ -408,93 +409,73 @@
+ return ret;
+}
+
-+static void tsc2102_write_async(
-+ struct tsc2102_spi_req *spi, int page, u8 address, u16 data,
-+ void (*complete)(struct tsc2102_dev *context))
++static void tsc_work(struct work_struct *work)
+{
-+ int ret;
++#define Z2STAT (1<<7)
++#define AXSTAT (1<<4)
++#define T1STAT (1<<2)
+
-+ spi_message_init(&spi->message);
-+ spi->message.complete = (void (*)(void *)) complete;
-+ spi->message.context = &tsc;
++ int status;
++
++ mutex_lock(&tsc.lock_sync);
++ /* state of SM has to be changed ? */
++ if( test_and_clear_bit( WORK_CHANGE_MODE,&tsc.todo) ){
++ /* change state of SM */
++ if( tsc.state == SM_TEMP1 ){
++ tsc.state = SM_BAT_AUX;
++ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL,
++ TSC2102_ADC_DAV);
++ tsc2102_write_sync(TSC2102_TS_ADC_CTRL,
++ TSC2102_ADC_SCAN_CONTROL);
++ }
++ else{
++ tsc.state = SM_TEMP1;
++ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL,
++ TSC2102_ADC_DAV);
++ tsc2102_write_sync(TSC2102_TS_ADC_CTRL,
++ TSC2102_ADC_T1_CONTROL);
++ }
++ }
+
-+ /* Address */
-+ spi->command = (page << 11) | (address << 5);
-+ spi->transfer[0].tx_buf = &spi->command;
-+ spi->transfer[0].rx_buf = 0;
-+ spi->transfer[0].len = 2;
-+ spi_message_add_tail(&spi->transfer[0], &spi->message);
++ status = tsc2102_read_sync(TSC2102_TS_STATUS_CTRL);
++
++ if( status & Z2STAT){
++ int pendown;
++ tsc2102_reads_sync( TSC2102_TS_X, tsc.adc_data, 4);
++ pendown = tsc2102_read_sync(TSC2102_TS_ADC_CTRL) & TSC2102_ADC_PSTCM;
++ /* avoid sending data if pen is up*/
++ if (tsc.coords_cb && pendown){
++ tsc.coords_cb(tsc.adc_data[0], tsc.adc_data[1],
++ tsc.adc_data[2], tsc.adc_data[3]);
++ }
++ }
+
-+ /* Data */
-+ spi->data = data;
-+ spi->transfer[1].tx_buf = &spi->data;
-+ spi->transfer[1].rx_buf = 0;
-+ spi->transfer[1].len = 2;
-+ spi->transfer[1].cs_change = CS_CHANGE(1);
-+ spi_message_add_tail(&spi->transfer[1], &spi->message);
-+
-+ ret = spi_async(spi->dev, &spi->message);
-+ if (ret)
-+ printk(KERN_ERR "%s: error %i in SPI request\n",
-+ __FUNCTION__, ret);
-+}
-+
-+static void tsc2102_reads_async(struct tsc2102_spi_req *spi,
-+ int page, u8 startaddress, u16 *data, int numregs,
-+ void (*complete)(struct tsc2102_dev *context))
-+{
-+ int ret, i, j;
-+
-+ spi_message_init(&spi->message);
-+ spi->message.complete = (void (*)(void *)) complete;
-+ spi->message.context = &tsc;
-+ i = 0;
-+ j = 0;
-+
-+ /* Address */
-+ spi->command = 0x8000 | (page << 11) | (startaddress << 5);
-+ spi->transfer[i].tx_buf = &spi->command;
-+ spi->transfer[i].rx_buf = 0;
-+ spi->transfer[i].len = 2;
-+ spi_message_add_tail(&spi->transfer[i ++], &spi->message);
-+
-+ /* Data */
-+ while (j < numregs) {
-+ spi->transfer[i].tx_buf = 0;
-+ spi->transfer[i].rx_buf = &data[j ++];
-+ spi->transfer[i].len = 2;
-+ spi->transfer[i].cs_change = CS_CHANGE(j == numregs);
-+ spi_message_add_tail(&spi->transfer[i ++], &spi->message);
++ if( status & AXSTAT ){
++ tsc2102_reads_sync( TSC2102_TS_BAT1, tsc.adc_data, 3);
++ if (tsc.ports_cb)
++ tsc.ports_cb(tsc.adc_data[0], tsc.adc_data[1],
++ tsc.adc_data[2]);
++ tsc.bat[0] = tsc.adc_data[0];
++ tsc.bat[1] = tsc.adc_data[1];
++ tsc.aux[0] = tsc.adc_data[2];
++ /* switch to pintdav and TS control */
++ tsc2102_write_sync( TSC2102_TS_ADC_CTRL,
++ TSC2102_ADC_TS_CONTROL);
++ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_PINTDAV);
+ }
++ else if( status & T1STAT) {
++ tsc.temp = tsc2102_read_sync(TSC2102_TS_TEMP1);
++ if (tsc.temp1_cb)
++ tsc.temp1_cb(tsc.temp);
++ /* switch to pintdav and TS control */
++ tsc2102_write_sync( TSC2102_TS_ADC_CTRL,
++ TSC2102_ADC_TS_CONTROL);
++ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_PINTDAV);
++ }
+
-+ ret = spi_async(spi->dev, &spi->message);
-+ if (ret)
-+ printk(KERN_ERR "%s: error %i in SPI request\n",
-+ __FUNCTION__, ret);
++ mutex_unlock(&tsc.lock_sync);
+}
+
-+static void tsc2102_read_async(struct tsc2102_spi_req *spi,
-+ int page, u8 address, u16 *ret,
-+ void (*complete)(struct tsc2102_dev *context))
-+{
-+ tsc2102_reads_async(spi, page, address, ret, 1, complete);
-+}
-+
-+static void tsc2102_request_alloc(struct tsc2102_dev *dev,
-+ struct tsc2102_spi_req *spi, int direction, int numregs,
-+ struct spi_transfer **buffer)
-+{
-+ spi->dev = dev->spi;
-+
-+ if (direction == 1) /* Write */
-+ numregs = 2;
-+ else /* Read */
-+ numregs += 1;
-+
-+ spi->transfer = *buffer;
-+ *buffer += numregs;
-+}
-+
+#define tsc2102_cb_register_func(cb, cb_t) \
+int tsc2102_ ## cb(cb_t handler) \
+{ \
@@ -514,13 +495,13 @@
+ return 0; \
+}
+
++
+tsc2102_cb_register_func(touch_cb, tsc2102_touch_t)
+EXPORT_SYMBOL(tsc2102_touch_cb);
+tsc2102_cb_register_func(coords_cb, tsc2102_coords_t)
+EXPORT_SYMBOL(tsc2102_coords_cb);
+tsc2102_cb_register_func(ports_cb, tsc2102_ports_t)
+tsc2102_cb_register_func(temp1_cb, tsc2102_temp_t)
-+tsc2102_cb_register_func(temp2_cb, tsc2102_temp_t)
+
+#ifdef DEBUG
+static void tsc2102_print_dav(void)
@@ -555,153 +536,34 @@
+}
+#endif
+
-+static void tsc2102_complete_dummy(struct tsc2102_dev *dev){}
-+
-+static inline void tsc2102_touchscreen_mode(struct tsc2102_dev *dev)
-+{
-+ spin_lock_irq(&dev->lock);
-+ dev->touch_in_progress = 1;
-+
-+ /* Scan X, Y, Z1, Z2, chip controlled, 12-bit, 16 samples, 500 usec */
-+ tsc2102_write_async(&dev->req_mode,
-+ TSC2102_TS_ADC_CTRL, TSC2102_ADC_TS_CONTROL,
-+ tsc2102_complete_dummy);
-+ spin_unlock_irq(&dev->lock);
-+}
-+
-+static void tsc2102_end_current_conversion(struct tsc2102_dev *dev)
-+{
-+ spin_lock_irq(&dev->lock);
-+ dev->touch_in_progress = 0;
-+ dev->state++;
-+ switch (dev->state) {
-+ /* Scan BAT1, BAT2, AUX, 12-bit, 16 samples, 500 usec */
-+ case 0: tsc2102_write_async(&dev->req_mode, TSC2102_TS_ADC_CTRL,
-+ TSC2102_ADC_SCAN_CONTROL, tsc2102_complete_dummy);
-+ break;
-+ /* Scan TEMP1, 12-bit, 16 samples, 500 usec */
-+ case 1: tsc2102_write_async(&dev->req_mode, TSC2102_TS_ADC_CTRL,
-+ TSC2102_ADC_T1_CONTROL, tsc2102_complete_dummy);
-+ break;
-+ /* Scan TEMP2, 12-bit, 16 samples, 500 usec */
-+ case 2: tsc2102_write_async(&dev->req_mode, TSC2102_TS_ADC_CTRL,
-+ TSC2102_ADC_T2_CONTROL, tsc2102_complete_dummy);
-+ break;
-+ default:
-+ tsc2102_write_async(&dev->req_mode, TSC2102_TS_ADC_CTRL,
-+ TSC2102_ADC_SCAN_CONTROL, tsc2102_complete_dummy);
-+ dev->state = 0;
-+ break;
-+ }
-+ spin_unlock_irq(&dev->lock);
-+ mod_timer(&dev->mode_timer, jiffies +
-+ msecs_to_jiffies(dev->mode_msecs));
-+}
-+
+static void tsc2102_mode(unsigned long data)
+{
+ struct tsc2102_dev *dev = (struct tsc2102_dev *) data;
-+ spin_lock_irq(&dev->lock);
-+
-+ tsc2102_write_async(&dev->req_stopadc,
-+ TSC2102_TS_ADC_CTRL, TSC2102_ADC_ADST,
-+ tsc2102_end_current_conversion);
-+
-+ spin_unlock_irq(&dev->lock);
-+}
-+
-+/* Read touch screen data */
-+static void tsc2102_TS_data_report(struct tsc2102_dev *dev)
-+{
-+ if (dev->coords_cb)
-+ dev->coords_cb(
-+ dev->adc_data[0], dev->adc_data[1],
-+ dev->adc_data[2], dev->adc_data[3]);
-+}
-+
-+static void tsc2102_pressure_report(struct tsc2102_dev *dev)
-+{
-+ spin_lock_irq(&dev->lock);
++ /* request change of SM state */
++ set_bit(WORK_CHANGE_MODE, &dev->todo);
++ schedule_work(&dev->work);
++ /* restart mode timer */
+ mod_timer(&dev->mode_timer, jiffies +
+ msecs_to_jiffies(dev->mode_msecs));
-+
-+ tsc2102_reads_async(&dev->req_adc, TSC2102_TS_X,
-+ dev->adc_data, 4, tsc2102_TS_data_report);
-+
-+ if ( dev->adc_status & TSC2102_ADC_PSTCM) {
-+ mod_timer(&dev->ts_timer, jiffies +
-+ msecs_to_jiffies(dev->ts_msecs));
-+ }
-+ spin_unlock_irq(&dev->lock);
+}
+
-+static void tsc2102_scan_data_report(struct tsc2102_dev *dev)
-+{
-+ mod_timer(&dev->mode_timer, jiffies +
-+ msecs_to_jiffies(dev->mode_msecs));
-+ spin_lock_irq(&dev->lock);
-+ switch (dev->state)
-+ {
-+ case 0: if (dev->ports_cb)
-+ dev->ports_cb(dev->adc_data[0],
-+ dev->adc_data[1], dev->adc_data[2]);
-+ dev->bat[0] = dev->adc_data[0];
-+ dev->bat[1] = dev->adc_data[1];
-+ dev->aux[0] = dev->adc_data[2];
-+ break;
-+
-+ case 1: if (dev->temp1_cb)
-+ dev->temp1_cb(*dev->adc_data);
-+ dev->temp[0] = *dev->adc_data;
-+ break;
-+
-+ case 2: if (dev->temp2_cb)
-+ dev->temp2_cb(*dev->adc_data);
-+ dev->temp[1] = *dev->adc_data;
-+ break;
-+ default: break;
-+ }
-+ tsc2102_touchscreen_mode(dev);
-+ spin_unlock_irq(&dev->lock);
-+}
-+
+/* TSC has new data for us available. */
+static irqreturn_t tsc2102_handler(int irq, void *dev_id)
+{
+ struct tsc2102_dev *dev = (struct tsc2102_dev *) dev_id;
-+
-+ mod_timer(&dev->mode_timer, jiffies +
-+ msecs_to_jiffies(dev->mode_msecs));
-+
-+ spin_lock_irq(&dev->lock);
-+ if( dev->touch_in_progress ){
-+ tsc2102_read_async(&dev->req_pressure, TSC2102_TS_ADC_CTRL,
-+ &dev->adc_status, tsc2102_pressure_report);
-+ }
-+ else{
-+ switch(dev->state){
-+ case 0: tsc2102_reads_async(&dev->req_adc, TSC2102_TS_BAT1,
-+ dev->adc_data, 3, tsc2102_scan_data_report);
-+ break;
-+ case 1: tsc2102_read_async(&dev->req_adc, TSC2102_TS_TEMP1,
-+ dev->adc_data, tsc2102_scan_data_report);
-+ break;
-+ case 2: tsc2102_read_async(&dev->req_adc, TSC2102_TS_TEMP2,
-+ dev->adc_data, tsc2102_scan_data_report);
-+ break;
-+ default: break;
-+ }
-+ }
-+ spin_unlock_irq(&dev->lock);
++ /* restart pen up timer */
++ mod_timer(&tsc.ts_timer, jiffies +
++ msecs_to_jiffies(tsc.ts_msecs));
++
++ schedule_work(&dev->work);
+ return IRQ_HANDLED;
+}
+
+static void tsc2102_pressure(unsigned long data)
+{
+ struct tsc2102_dev *dev = (struct tsc2102_dev *) data;
-+ if (dev->touch_cb){
++ if (dev->touch_cb)
+ dev->touch_cb(0);
-+ }
+}
+
+#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
@@ -923,7 +785,7 @@
+ /* 84 usec precharge time, 32 usec sense time */
+ tsc2102_write_sync(TSC2102_TS_CONFIG_CTRL, TSC2102_CONFIG_TIMES);
+
-+ /* PINT/DAV acts as DAV */
++ /* PINT/DAV acts as PINT */
+ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_DAV);
+
+#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
@@ -945,8 +807,8 @@
+#endif /* CONFIG_SOUND || CONFIG_SOUND_MODULE */
+
+ /* Init mode state machine */
-+ dev->state = 0;
-+ dev->touch_in_progress = 0;
++ dev->state = SM_BAT_AUX;
++
+ /* Start mode timer */
+ mod_timer(&dev->mode_timer, jiffies +
+ msecs_to_jiffies(dev->mode_msecs));
@@ -1025,8 +887,7 @@
+TSC2102_INPUT(in0, bat[0])
+TSC2102_INPUT(in1, bat[1])
+TSC2102_INPUT(in2, aux[0])
-+TSC2102_INPUT(in3, temp[0])
-+TSC2102_INPUT(in4, temp[1])
++TSC2102_INPUT(in3, temp)
+
+static ssize_t show_temp1(struct device *dev,
+ struct device_attribute *devattr, char *buf)
@@ -1034,17 +895,9 @@
+ struct tsc2102_dev *devhwmon = dev_get_drvdata(dev);
+ int value;
+
-+ /*
-+ * Use method #2 (differential) to calculate current temperature.
-+ * The approximation curve is: y = ax + b
-+ * where b = 185 and a = 0.61 (taken from TSC datasheet page 15)
-+ * the result (x) is in degree Celcius
-+ * As it is the silicium temperature, a compensation factor can specified to
-+ * estimate the ambient temperature.
-+ */
-+ value = (devhwmon->temp[1] - devhwmon->temp[0] - 185)*1639 ; /* Celcius millidegree */
++ value = (-devhwmon->temp*7 + 8400)*50 ; /* Celcius millidegree */
+
-+ return sprintf(buf, "%i\n", value - devhwmon->pdata->temp_at25c);
++ return sprintf(buf, "%i\n", value);
+}
+static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp1, NULL);
+#endif /* CONFIG_HWMON */
@@ -1072,6 +925,7 @@
+
+ del_timer(&dev->mode_timer);
+ del_timer(&dev->ts_timer);
++ flush_scheduled_work();
+
+ if (dev->touch_cb)
+ dev->touch_cb(0);
@@ -1140,6 +994,7 @@
+ tsc.ts_msecs = 30;
+ tsc.mode_msecs = 500;
+ tsc.spi = spi;
++ INIT_WORK(&tsc.work, tsc_work);
+
+ /* Allocate enough struct spi_transfer's for all requests */
+ spi_buffer = kzalloc(sizeof(struct spi_transfer) * 16, GFP_KERNEL);
@@ -1148,19 +1003,14 @@
+ return -ENOMEM;
+ }
+
-+ tsc.transfers = spi_buffer;
-+ tsc2102_request_alloc(&tsc, &tsc.req_adc, 0, 4, &spi_buffer);
-+ tsc2102_request_alloc(&tsc, &tsc.req_status, 0, 1, &spi_buffer);
-+ tsc2102_request_alloc(&tsc, &tsc.req_pressure, 0, 1, &spi_buffer);
-+ tsc2102_request_alloc(&tsc, &tsc.req_stopadc, 1, 1, &spi_buffer);
-+ tsc2102_request_alloc(&tsc, &tsc.req_mode, 1, 1, &spi_buffer);
-+ tsc2102_request_alloc(&tsc, &tsc.req_click, 1, 1, &spi_buffer);
-+
+ spin_lock_init(&tsc.lock);
+ mutex_init(&tsc.lock_sync);
+ mutex_lock(&tsc.lock_sync);
+
-+ /* Get the BCLK - assuming the rate is at 12000000 */
++ /* allocate GPIO / IRQ if necessary */
++ if (pdata->init)
++ pdata->init();
++
+#ifdef IMX_CLOCK_CONFIG
+ tsc.bclk_ck = clk_get(0, "bclk"); TODO add clock mechanism to i.MX ???
+ if (!tsc.bclk_ck) {
@@ -1172,7 +1022,7 @@
+ clk_enable(tsc.bclk_ck);
+#endif //IMX_CLOCK_CONFIG
+
-+ if (request_irq(spi->irq, tsc2102_handler, IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_FALLING, "tsc2102", &tsc)) {
++ if (request_irq(spi->irq, tsc2102_handler, IRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_FALLING, "tsc2102", &tsc)) {
+ printk(KERN_ERR "Could not allocate touchscreen IRQ (n %d)\n", spi->irq);
+ err = -EINVAL;
+ goto err_clk;
@@ -1232,7 +1082,6 @@
+ if (pdata->monitor & TSC_TEMP) {
+ err |= device_create_file(&spi->dev, &dev_attr_temp1_input);
+ err |= device_create_file(&spi->dev, &dev_attr_in3_input);
-+ err |= device_create_file(&spi->dev, &dev_attr_in4_input);
+ }
+
+ if (err)
@@ -1256,6 +1105,7 @@
+err_timer:
+ del_timer(&tsc.ts_timer);
+ del_timer(&tsc.mode_timer);
++ flush_scheduled_work();
+ dev_set_drvdata(&spi->dev, NULL);
+err_clk:
+/* clk_disable(tsc.bclk_ck); TODO add clock mechanism to i.MX ???
@@ -1276,15 +1126,18 @@
+
+ dev_set_drvdata(&spi->dev, NULL);
+
++ /* Release the GPIO/IRQ */
++ if (dev->pdata->exit)
++ dev->pdata->exit();
++
+ /* Release the BCLK */
+/* clk_disable(dev->bclk_ck); TODO add clock mechanism to i.MX ???
+ clk_put(dev->bclk_ck); */
+
+ del_timer(&tsc.mode_timer);
+ del_timer(&tsc.ts_timer);
++ flush_scheduled_work();
+
-+ kfree(tsc.transfers);
-+
+#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE)
+ hwmon_device_unregister(dev->hwmondev);
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-16 18:51:46
|
Revision: 961
http://armadeus.svn.sourceforge.net/armadeus/?rev=961&view=rev
Author: artemys
Date: 2008-12-16 18:51:42 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
[BUILDROOT] Makes tslib work with recent kernel
Added Paths:
-----------
trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
Added: trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
===================================================================
--- trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff (rev 0)
+++ trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff 2008-12-16 18:51:42 UTC (rev 961)
@@ -0,0 +1,51 @@
+--- /dev/null 1970-01-01 01:00:00.000000000 +0100
++++ buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch 2008-12-16 18:03:50.000000000 +0100
+@@ -0,0 +1,48 @@
++The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
++only exported in recent kernels.
++
++Signed-off-by: Sebastian Siewior <seb...@br...>
++
++
++--- tslib-1.0.org/plugins/input-raw.c 2008-11-18 11:38:02.000000000 +0100
+++++ tslib-1.0/plugins/input-raw.c 2008-11-18 11:44:10.000000000 +0100
++@@ -44,23 +44,31 @@
++ int using_syn;
++ };
++
+++#define BITS_PER_LONG (sizeof(long) * 8)
+++#ifndef EV_CNT
+++#define EV_CNT (EV_MAX+1)
+++#endif
+++#ifndef ABS_CNT
+++#define ABS_CNT (ABS_MAX+1)
+++#endif
+++
++ static int check_fd(struct tslib_input *i)
++ {
++ struct tsdev *ts = i->module.dev;
++ int version;
++- u_int32_t bit;
++- u_int32_t absbit;
+++ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
+++ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
++
++ if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
++ (version == EV_VERSION) &&
++- (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
++- (bit & (1 << EV_ABS)) &&
++- (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
++- (absbit & (1 << ABS_X)) &&
++- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
+++ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
+++ (bit[0] & (1 << EV_ABS)) &&
+++ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
+++ (absbit[0] & (1 << ABS_X)) &&
+++ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
++ }
++
++- if (bit & (1 << EV_SYN))
+++ if (bit[0] & (1 << EV_SYN))
++ i->using_syn = 1;
++
++ return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-15 16:37:22
|
Revision: 960
http://armadeus.svn.sourceforge.net/armadeus/?rev=960&view=rev
Author: artemys
Date: 2008-12-15 16:37:15 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
[DEBUG] imxssi: removes what imxregs is already doing (very well ;-) )
Modified Paths:
--------------
trunk/target/linux/debug/imxssi/Makefile
trunk/target/linux/debug/imxssi/imxssi.c
Removed Paths:
-------------
trunk/target/linux/debug/imxssi/imxregs.h
Modified: trunk/target/linux/debug/imxssi/Makefile
===================================================================
--- trunk/target/linux/debug/imxssi/Makefile 2008-12-15 15:19:39 UTC (rev 959)
+++ trunk/target/linux/debug/imxssi/Makefile 2008-12-15 16:37:15 UTC (rev 960)
@@ -1,9 +1,9 @@
-
-all: imxssi
-
-imxssi: imxssi.c imxregs.h
- arm-linux-gcc imxssi.c -O2 -lm -o $@
-
-clean:
- rm -f *.o
- rm -f imxssi
+
+all: imxssi
+
+imxssi: imxssi.c ../imxregs/imxregs.h
+ arm-linux-gcc imxssi.c -O2 -lm -o $@
+
+clean:
+ rm -f *.o
+ rm -f imxssi
Deleted: trunk/target/linux/debug/imxssi/imxregs.h
===================================================================
--- trunk/target/linux/debug/imxssi/imxregs.h 2008-12-15 15:19:39 UTC (rev 959)
+++ trunk/target/linux/debug/imxssi/imxregs.h 2008-12-15 16:37:15 UTC (rev 960)
@@ -1,541 +0,0 @@
-/*
- * imxregs.h - Tool to display and modify iMX registers from Linux's userspace
- *
- * Author/Maintainer: J. Boibessot
- * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-L�ungen Online GmbH
- *
- * This tool is placed under the GPL.
- *
-*/
-
-typedef unsigned int u32;
-
-struct reg_info {
- char *name;
- u32 addr;
- int shift;
- u32 mask;
- char type;
- char *desc;
-};
-
-
-static struct reg_info regs[] =
-{
-// RTC
-{ "HOURMIN", 0x00204000, 0, 0xffffffff, 'x', "RTC Hours and minutes counter register" },
-{ "SECONDS", 0x00204004, 0, 0xffffffff, 'x', "RTC Seconds counter register" },
-{ "ALRM_HM", 0x00204008, 0, 0xffffffff, 'x', "RTC Hours and minutes alarm register" },
-{ "ALRM_SEC", 0x0020400C, 0, 0xffffffff, 'x', "RTC Seconds alarm register" },
-{ "RCCTL", 0x00204010, 0, 0xffffffff, 'x', "RTC Control register" },
-{ "RTCIENR", 0x00204018, 0, 0xffffffff, 'x', "RTC Interrupt Enable register" },
-{ "STPWCH", 0x0020401C, 0, 0xffffffff, 'x', "RTC Stopwatch minutes register" },
-{ "DAYR", 0x00204020, 0, 0xffffffff, 'x', "RTC Days counter register" },
-{ "DAYALARM", 0x00204024, 0, 0xffffffff, 'x', "RTC Day Alarm register" },
-//LCD
-{ "SSA", 0x00205000, 0, 0xffffffff, 'x', "Screen Start Address Register" },
-{ "SIZE", 0x00205004, 0, 0xffffffff, 'x', "Size Register" },
-{ "VPW", 0x00205008, 0, 0xffffffff, 'x', "Virtual Page Width Register" },
-{ "CPOS", 0x0020500C, 0, 0xffffffff, 'x', "LCD Cursor Position Register" },
-{ "LCWHB", 0x00205010, 0, 0xffffffff, 'x', "LCD Cursor Width Height and Blink Register" },
-{ "LCHCC", 0x00205014, 0, 0xffffffff, 'x', "LCD Color Cursor Mapping Register" },
-{ "LPCR", 0x00205018, 0, 0xffffffff, 'x', "Panel Configuration Register" },
-{ "HCR", 0x0020501C, 0, 0xffffffff, 'x', "Horizontal Configuration Register" },
-{ "VCR", 0x00205020, 0, 0xffffffff, 'x', "Vertical Configuration Register" },
-{ "POS", 0x00205024, 0, 0xffffffff, 'x', "Panning Offset Register" },
-{ "LGPMR", 0x00205028, 0, 0xffffffff, 'x', "LCD Gray Palette Mapping Register" },
-{ "PWMR", 0x0020502C, 0, 0xffffffff, 'x', "PWM Contrast Control Register" },
-{ "DMACR", 0x00205030, 0, 0xffffffff, 'x', "DMA Control Register" },
-{ "RMCR", 0x00205034, 0, 0xffffffff, 'x', "Refresh Mode Control Register" },
-{ "LCDICR", 0x00205038, 0, 0xffffffff, 'x', "Interrupt Configuration Register" },
-{ "LCDISR", 0x00205040, 0, 0xffffffff, 'x', "Interrupt Status Register" },
-// UART
-{ "URX11D_2", 0x0020702C, 0, 0xffffffff, 'x', "UART2 Receiver Register 11" },
-{ "URX12D_2", 0x00207030, 0, 0xffffffff, 'x', "UART2 Receiver Register 12" },
-{ "URX13D_2", 0x00207034, 0, 0xffffffff, 'x', "UART2 Receiver Register 13" },
-{ "URX14D_2", 0x00207038, 0, 0xffffffff, 'x', "UART2 Receiver Register 14" },
-{ "URX15D_2", 0x0020703C, 0, 0xffffffff, 'x', "UART2 Receiver Register 15" },
-{ "UTX0D_2", 0X00207040, 0, 0xffffffff, 'x', "UART2 Transmitter Register 0" },
-{ "UTX1D_2", 0X00207044, 0, 0xffffffff, 'x', "UART2 Transmitter Register 1" },
-{ "UTX2D_2", 0X00207048, 0, 0xffffffff, 'x', "UART2 Transmitter Register 2" },
-{ "UTX3D_2", 0X0020704C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 3" },
-{ "UTX4D_2", 0X00207050, 0, 0xffffffff, 'x', "UART2 Transmitter Register 4" },
-{ "UTX5D_2", 0X00207054, 0, 0xffffffff, 'x', "UART2 Transmitter Register 5" },
-{ "UTX6D_2", 0X00207058, 0, 0xffffffff, 'x', "UART2 Transmitter Register 6" },
-{ "UTX7D_2", 0X0020705C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 7" },
-{ "UTX8D_2", 0X00207060, 0, 0xffffffff, 'x', "UART2 Transmitter Register 8" },
-{ "UTX9D_2", 0X00207064, 0, 0xffffffff, 'x', "UART2 Transmitter Register 9" },
-{ "UTX10D_2", 0X00207068, 0, 0xffffffff, 'x', "UART2 Transmitter Register 10" },
-{ "UTX11D_2", 0X0020706C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 11" },
-{ "UTX12D_2", 0X00207070, 0, 0xffffffff, 'x', "UART2 Transmitter Register 12" },
-{ "UTX13D_2", 0X00207074, 0, 0xffffffff, 'x', "UART2 Transmitter Register 13" },
-{ "UTX14D_2", 0X00207078, 0, 0xffffffff, 'x', "UART2 Transmitter Register 14" },
-{ "UTX15D_2", 0X0020707C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 15" },
-{ "UCR1_2", 0x00207080, 0, 0xffffffff, 'x', "UART2 Control Register 1" },
-{ "UCR2_2", 0x00207084, 0, 0xffffffff, 'x', "UART2 Control Register 2" },
-{ "UCR3_2", 0x00207088, 0, 0xffffffff, 'x', "UART2 Control Register 3" },
-{ "UCR4_2", 0x0020708C, 0, 0xffffffff, 'x', "UART2 Control Register 4" },
-{ "UFCR_2", 0x00207090, 0, 0xffffffff, 'x', "UART2 FIFO Control Register" },
-{ "USR1_2", 0x00207094, 0, 0xffffffff, 'x', "UART2 Status Register 1" },
-{ "USR2_2", 0x00207098, 0, 0xffffffff, 'x', "UART2 Status Register 2" },
-{ "UESC_2", 0x0020709C, 0, 0xffffffff, 'x', "UART2 Escape Character Register" },
-{ "UTIM_2", 0x002070A0, 0, 0xffffffff, 'x', "UART2 Escape Timer Register" },
-{ "UBIR_2", 0x002070A4, 0, 0xffffffff, 'x', "UART2 BRM Incremental Register" },
-{ "UBMR_2", 0x002070A8, 0, 0xffffffff, 'x', "UART2 BRM Modulator Register" },
-{ "UBRC_2", 0x002070AC, 0, 0xffffffff, 'x', "UART2 Baud Rate Count Register" },
-{ "BIPR1_2", 0x002070B0, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 1" },
-{ "BIPR2_2", 0x002070B4, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 2" },
-{ "BIPR3_2", 0x002070B8, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 3" },
-{ "BIPR4_2", 0x002070BC, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 4" },
-{ "BMPR1_2", 0x002070C0, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 1" },
-{ "BMPR2_2", 0x002070C4, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 2" },
-{ "BMPR3_2", 0x002070C8, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 3" },
-{ "BMPR4_2", 0x002070CC, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 4" },
-{ "UTS_2", 0x002070D0, 0, 0xffffffff, 'x', "UART2 Test Register 1" },
-// PWM
-{ "PWMC", 0x00208000, 0, 0xffffffff, 'x', "PWM Control Register" },
-{ "PWMS", 0x00208004, 0, 0xffffffff, 'x', "PWM Sample Register" },
-{ "PWMP", 0x00208008, 0, 0xffffffff, 'x', "PWM Period Register" },
-{ "PWMCNT", 0x0020800C, 0, 0xffffffff, 'x', "PWM Counter Register" },
-// DMA
-{ "DCR", 0x00209000, 0, 0xffffffff, 'x', "DMA Control Register" },
-{ "DISR", 0x00209004, 0, 0xffffffff, 'x', "DMA Interrupt Status Register" },
-{ "DIMR", 0x00209008, 0, 0xffffffff, 'x', "DMA Interrupt Mask Register" },
-{ "DBTOSR", 0x0020900C, 0, 0xffffffff, 'x', "DMA Burst Time-Out Status Register" },
-{ "DRTOSR", 0x00209010, 0, 0xffffffff, 'x', "DMA Request Time-Out Status Register" },
-{ "DSESR", 0x00209014, 0, 0xffffffff, 'x', "DMA Transfer Error Status Register" },
-{ "DBOSR", 0x00209018, 0, 0xffffffff, 'x', "DMA Buffer Overflow Status Register" },
-{ "DBTOCR", 0x0020901C, 0, 0xffffffff, 'x', "DMA Burst Time-Out Control Register" },
-{ "WSRA", 0x00209040, 0, 0xffffffff, 'x', "W-Size Register A" },
-{ "XSRA", 0x00209044, 0, 0xffffffff, 'x', "X-Size Register A" },
-{ "YSRA", 0x00209048, 0, 0xffffffff, 'x', "Y-Size Register A" },
-{ "WSRB", 0x0020904C, 0, 0xffffffff, 'x', "W-Size Register B" },
-{ "XSRB", 0x00209050, 0, 0xffffffff, 'x', "X-Size Register B" },
-{ "YSRB", 0x00209054, 0, 0xffffffff, 'x', "Y-Size Register B" },
-{ "SAR0", 0x00209080, 0, 0xffffffff, 'x', "Channel 0 Source Address Register" },
-{ "DAR0", 0x00209084, 0, 0xffffffff, 'x', "Channel 0 Destination Address Register" },
-{ "CNTR0", 0x00209088, 0, 0xffffffff, 'x', "Channel 0 Count Register" },
-{ "CCR0", 0x0020908C, 0, 0xffffffff, 'x', "Channel 0 Control Register" },
-{ "RSSR0", 0x00209090, 0, 0xffffffff, 'x', "Channel 0 Request Source Select Register" },
-{ "BLR0", 0x00209094, 0, 0xffffffff, 'x', "Channel 0 Burst Length Register" },
-{ "RTOR0", 0x00209098, 0, 0xffffffff, 'x', "Channel 0 Request Time-Out Register" },
-{ "BUCR0", 0x00209098, 0, 0xffffffff, 'x', "Channel 0 Bus Utilization Control Register" },
-{ "SAR1", 0x002090C0, 0, 0xffffffff, 'x', "Channel 1 Source Address Register" },
-{ "DAR1", 0x002090C4, 0, 0xffffffff, 'x', "Channel 1 Destination Address Register" },
-{ "CNTR1", 0x002090C8, 0, 0xffffffff, 'x', "Channel 1 Count Register" },
-{ "CCR1", 0x002090CC, 0, 0xffffffff, 'x', "Channel 1 Control Register" },
-{ "RSSR1", 0x002090D0, 0, 0xffffffff, 'x', "Channel 1 Request Source Select Register" },
-{ "BLR1", 0x002090D4, 0, 0xffffffff, 'x', "Channel 1 Burst Length Register" },
-{ "RTOR1", 0x002090D8, 0, 0xffffffff, 'x', "Channel 1 Request Time-Out Register" },
-{ "BUCR1", 0x002090D8, 0, 0xffffffff, 'x', "Channel 1 Bus Utilization Control Register" },
-{ "SAR2", 0x00209100, 0, 0xffffffff, 'x', "Channel 2 Source Address Register" },
-{ "DAR2", 0x00209104, 0, 0xffffffff, 'x', "Channel 2 Destination Address Register" },
-{ "CNTR2", 0x00209108, 0, 0xffffffff, 'x', "Channel 2 Count Register" },
-{ "CCR2", 0x0020910C, 0, 0xffffffff, 'x', "Channel 2 Control Register" },
-{ "RSSR2", 0x00209110, 0, 0xffffffff, 'x', "Channel 2 Request Source Select Register" },
-{ "BLR2", 0x00209114, 0, 0xffffffff, 'x', "Channel 2 Burst Length Register" },
-{ "RTOR2", 0x00209118, 0, 0xffffffff, 'x', "Channel 2 Request Time-Out Register" },
-{ "BUCR2", 0x00209118, 0, 0xffffffff, 'x', "Channel 2 Bus Utilization Control Register" },
-{ "SAR3", 0x00209140, 0, 0xffffffff, 'x', "Channel 3 Source Address Register" },
-{ "DAR3", 0x00209144, 0, 0xffffffff, 'x', "Channel 3 Destination Address Register" },
-{ "CNTR3", 0x00209148, 0, 0xffffffff, 'x', "Channel 3 Count Register" },
-{ "CCR3", 0x0020914C, 0, 0xffffffff, 'x', "Channel 3 Control Register" },
-{ "RSSR3", 0x00209150, 0, 0xffffffff, 'x', "Channel 3 Request Source Select Register" },
-{ "BLR3", 0x00209154, 0, 0xffffffff, 'x', "Channel 3 Burst Length Register" },
-{ "RTOR3", 0x00209158, 0, 0xffffffff, 'x', "Channel 3 Request Time-Out Register" },
-{ "BUCR3", 0x0020915C, 0, 0xffffffff, 'x', "Channel 3 Bus Utilization Control Register" },
-{ "SAR4", 0x00209180, 0, 0xffffffff, 'x', "Channel 4 Source Address Register" },
-{ "DAR4", 0x00209184, 0, 0xffffffff, 'x', "Channel 4 Destination Address Register" },
-{ "CNTR4", 0x00209188, 0, 0xffffffff, 'x', "Channel 4 Count Register" },
-{ "CCR4", 0x0020918C, 0, 0xffffffff, 'x', "Channel 4 Control Register" },
-{ "RSSR4", 0x00209190, 0, 0xffffffff, 'x', "Channel 4 Request Source Select Register" },
-{ "BLR4", 0x00209194, 0, 0xffffffff, 'x', "Channel 4 Burst Length Register" },
-{ "RTOR4", 0x00209198, 0, 0xffffffff, 'x', "Channel 4 Request Time-Out Register" },
-{ "BUCR4", 0x0020919C, 0, 0xffffffff, 'x', "Channel 4 Bus Utilization Control Register" },
-{ "SAR5", 0x002091C0, 0, 0xffffffff, 'x', "Channel 5 Source Address Register" },
-{ "DAR5", 0x002091C4, 0, 0xffffffff, 'x', "Channel 5 Destination Address Register" },
-{ "CNTR5", 0x002091C8, 0, 0xffffffff, 'x', "Channel 5 Count Register" },
-{ "CCR5", 0x002091CC, 0, 0xffffffff, 'x', "Channel 5 Control Register" },
-{ "RSSR5", 0x002091D0, 0, 0xffffffff, 'x', "Channel 5 Request Source Select Register" },
-{ "BLR5", 0x002091D4, 0, 0xffffffff, 'x', "Channel 5 Burst Length Register" },
-{ "RTOR5", 0x002091D8, 0, 0xffffffff, 'x', "Channel 5 Request Time-Out Register" },
-{ "BUCR5", 0x002091DC, 0, 0xffffffff, 'x', "Channel 5 Bus Utilization Control Register" },
-{ "SAR6", 0x00209200, 0, 0xffffffff, 'x', "Channel 6 Source Address Register" },
-{ "DAR6", 0x00209204, 0, 0xffffffff, 'x', "Channel 6 Destination Address Register" },
-{ "CNTR6", 0x00209208, 0, 0xffffffff, 'x', "Channel 6 Count Register" },
-{ "CCR6", 0x0020920C, 0, 0xffffffff, 'x', "Channel 6 Control Register" },
-{ "RSSR6", 0x00209210, 0, 0xffffffff, 'x', "Channel 6 Request Source Select Register" },
-{ "BLR6", 0x00209214, 0, 0xffffffff, 'x', "Channel 6 Burst Length Register" },
-{ "RTOR6", 0x00209218, 0, 0xffffffff, 'x', "Channel 6 Request Time-Out Register" },
-{ "BUCR6", 0x00209218, 0, 0xffffffff, 'x', "Channel 6 Bus Utilization Control Register" },
-{ "SAR7", 0x00209240, 0, 0xffffffff, 'x', "Channel 7 Source Address Register" },
-{ "DAR7", 0x00209244, 0, 0xffffffff, 'x', "Channel 7 Destination Address Register" },
-{ "CNTR7", 0x00209248, 0, 0xffffffff, 'x', "Channel 7 Count Register" },
-{ "CCR7", 0x0020924C, 0, 0xffffffff, 'x', "Channel 7 Control Register" },
-{ "RSSR7", 0x00209250, 0, 0xffffffff, 'x', "Channel 7 Request Source Select Register" },
-{ "BLR7", 0x00209254, 0, 0xffffffff, 'x', "Channel 7 Burst Length Register" },
-{ "RTOR7", 0x00209258, 0, 0xffffffff, 'x', "Channel 7 Request Time-Out Register" },
-{ "BUCR7", 0x00209258, 0, 0xffffffff, 'x', "Channel 7 Bus Utilization Control Register" },
-{ "SAR8", 0x00209280, 0, 0xffffffff, 'x', "Channel 8 Source Address Register" },
-{ "DAR8", 0x00209284, 0, 0xffffffff, 'x', "Channel 8 Destination Address Register" },
-{ "CNTR8", 0x00209288, 0, 0xffffffff, 'x', "Channel 8 Count Register" },
-{ "CCR8", 0x0020928C, 0, 0xffffffff, 'x', "Channel 8 Control Register" },
-{ "RSSR8", 0x00209290, 0, 0xffffffff, 'x', "Channel 8 Request Source Select Register" },
-{ "BLR8", 0x00209294, 0, 0xffffffff, 'x', "Channel 8 Burst Length Register" },
-{ "RTOR8", 0x00209298, 0, 0xffffffff, 'x', "Channel 8 Request Time-Out Register" },
-{ "BUCR8", 0x00209298, 0, 0xffffffff, 'x', "Channel 8 Bus Utilization Control Register" },
-{ "SAR9", 0x002092C0, 0, 0xffffffff, 'x', "Channel 9 Source Address Register" },
-{ "DAR9", 0x002092C4, 0, 0xffffffff, 'x', "Channel 9 Destination Address Register" },
-{ "CNTR9", 0x002092C8, 0, 0xffffffff, 'x', "Channel 9 Count Register" },
-{ "CCR9", 0x002092CC, 0, 0xffffffff, 'x', "Channel 9 Control Register" },
-{ "RSSR9", 0x002092D0, 0, 0xffffffff, 'x', "Channel 9 Request Source Select Register" },
-{ "BLR9", 0x002092D4, 0, 0xffffffff, 'x', "Channel 9 Burst Length Register" },
-{ "RTOR9", 0x002092D8, 0, 0xffffffff, 'x', "Channel 9 Request Time-Out Register" },
-{ "BUCR9", 0x002092DC, 0, 0xffffffff, 'x', "Channel 9 Bus Utilization Control Register" },
-{ "SAR10", 0x00209300, 0, 0xffffffff, 'x', "Channel 10 Source Address Register" },
-{ "DAR10", 0x00209304, 0, 0xffffffff, 'x', "Channel 10 Destination Address Register" },
-{ "CNTR10", 0x00209308, 0, 0xffffffff, 'x', "Channel 10 Count Register" },
-// NOT ACCESSIBLE IN USER MODE ??
-/*{ "PSR0_2", 0x00210000, 0, 0xffffffff, 'x', "AIPI2 Peripheral Size Register 0" },
-{ "PSR1_2", 0x00210004, 0, 0xffffffff, 'x', "AIPI2 Peripheral Size Register 1" },
-{ "PAR_2", 0x00210008, 0, 0xffffffff, 'x', "AIPI2 Peripheral Access Register" },
-{ "PCR_2", 0x0021000C, 0, 0xffffffff, 'x', "AIPI2 Peripheral Control Register" },
-{ "TSR_2", 0x00210010, 0, 0xffffffff, 'x', "AIPI2 Time-Out Status Register" },*/
-// USB
-{ "USB_FRAME", 0x00212000, 0, 0xffffffff, 'x', "USB Frame Number and Match Register" },
-{ "USB_SPEC", 0x00212004, 0, 0xffffffff, 'x', "USB Specification and Release Number Register" },
-{ "USB_STAT", 0x00212008, 0, 0xffffffff, 'x', "USB Status Register" },
-{ "USB_CTRL", 0x0021200C, 0, 0xffffffff, 'x', "USB Control Register" },
-{ "USB_DADR", 0x00212010, 0, 0xffffffff, 'x', "USB Descriptor RAM Address Register" },
-{ "USB_DDAT", 0x00212014, 0, 0xffffffff, 'x', "USB Descriptor RAM/Endpoint Buffer Data Register" },
-{ "USB_INTR", 0x00212018, 0, 0xffffffff, 'x', "USB Interrupt Status Register" },
-{ "USB_MASK", 0x0021201C, 0, 0xffffffff, 'x', "USB Interrupt Mask Register" },
-{ "USB_MCTL", 0x00212020, 0, 0xffffffff, 'x', "USB FIFO Memory Control Register" },
-{ "USB_ENAB", 0x00212024, 0, 0xffffffff, 'x', "USB Enable Register" },
-{ "USB_EP0_STAT", 0x00212030, 0, 0xffffffff, 'x', "Endpoint 0 Status/Control Register" },
-{ "USB_EP0_INTR", 0x00212034, 0, 0xffffffff, 'x', "Endpoint 0 Interrupt Status Register" },
-{ "USB_EP0_MASK", 0x00212038, 0, 0xffffffff, 'x', "Endpoint 0 Interrupt Mask Register" },
-{ "USB_EP0_FDAT", 0x0021203C, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Data Register" },
-{ "USB_EP0_FSTAT", 0x00212040, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Status Register" },
-{ "USB_EP0_FCTRL", 0x00212044, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Control Register" },
-{ "USB_EP0_LRFP", 0x00212048, 0, 0xffffffff, 'x', "Endpoint 0 Last Read Frame Pointer Register" },
-{ "USB_EP0_LWFP", 0x0021204C, 0, 0xffffffff, 'x', "Endpoint 0 Last Write Frame Pointer Register" },
-{ "USB_EP0_FALRM", 0x00212050, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Alarm Register" },
-{ "USB_EP0_FRDP", 0x00212054, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Read Pointer Register" },
-{ "USB_EP0_FWRP", 0x00212058, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Write Pointer Register" },
-{ "USB_EP1_STAT", 0x00212060, 0, 0xffffffff, 'x', "Endpoint 1 Status/Control Register" },
-{ "USB_EP1_INTR", 0x00212064, 0, 0xffffffff, 'x', "Endpoint 1 Interrupt Status Register" },
-{ "USB_EP1_MASK", 0x00212068, 0, 0xffffffff, 'x', "Endpoint 1 Interrupt Mask Register" },
-{ "USB_EP1_FDAT", 0x0021206C, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Data Register" },
-{ "USB_EP1_FSTAT", 0x00212070, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Status Register" },
-{ "USB_EP1_FCTRL", 0x00212074, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Control Register" },
-{ "USB_EP1_LRFP", 0x00212078, 0, 0xffffffff, 'x', "Endpoint 1 Last Read Frame Pointer Register" },
-{ "USB_EP1_LWFP", 0x0021207C, 0, 0xffffffff, 'x', "Endpoint 1 Last Write Frame Pointer Register" },
-{ "USB_EP1_FALRM", 0x00212080, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Alarm Register" },
-{ "USB_EP1_FRDP", 0x00212084, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Read Pointer Register" },
-{ "USB_EP1_FWRP", 0x00212088, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Write Pointer Register" },
-{ "USB_EP2_STAT", 0x00212090, 0, 0xffffffff, 'x', "Endpoint 2 Status/Control Register" },
-{ "USB_EP2_INTR", 0x00212094, 0, 0xffffffff, 'x', "Endpoint 2 Interrupt Status Register" },
-{ "USB_EP2_MASK", 0x00212098, 0, 0xffffffff, 'x', "Endpoint 2 Interrupt Mask Register" },
-{ "USB_EP2_FDAT", 0x0021209C, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Data Register" },
-{ "USB_EP2_FSTAT", 0x002120A0, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Status Register" },
-{ "USB_EP2_FCTRL", 0x002120A4, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Control Register" },
-{ "USB_EP2_LRFP", 0x002120A8, 0, 0xffffffff, 'x', "Endpoint 2 Last Read Frame Pointer Register" },
-{ "USB_EP2_LWFP", 0x002120AC, 0, 0xffffffff, 'x', "Endpoint 2 Last Write Frame Pointer Register" },
-{ "USB_EP2_FALRM", 0x002120B0, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Alarm Register" },
-{ "USB_EP2_FRDP", 0x002120B4, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Read Pointer Register" },
-{ "USB_EP2_FWRP", 0x002120B8, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Write Pointer Register" },
-{ "USB_EP3_STAT", 0x002120C0, 0, 0xffffffff, 'x', "Endpoint 3 Status/Control Register" },
-{ "USB_EP3_INTR", 0x002120C4, 0, 0xffffffff, 'x', "Endpoint 3 Interrupt Status Register" },
-{ "USB_EP3_MASK", 0x002120C8, 0, 0xffffffff, 'x', "Endpoint 3 Interrupt Mask Register" },
-{ "USB_EP3_FDAT", 0x002120CC, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Data Register" },
-{ "USB_EP3_FSTAT", 0x002120D0, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Status Register" },
-{ "USB_EP3_FCTRL", 0x002120D4, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Control Register" },
-{ "USB_EP3_LRFP", 0x002120D8, 0, 0xffffffff, 'x', "Endpoint 3 Last Read Frame Pointer Register" },
-{ "USB_EP3_LWFP", 0x002120DC, 0, 0xffffffff, 'x', "Endpoint 3 Last Write Frame Pointer Register" },
-{ "USB_EP3_FALRM", 0x002120E0, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Alarm Register" },
-{ "USB_EP3_FRDP", 0x002120E4, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Read Pointer Register" },
-{ "USB_EP3_FWRP", 0x002120E8, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Write Pointer Register" },
-{ "USB_EP4_STAT", 0x002120F0, 0, 0xffffffff, 'x', "Endpoint 4 Status/Control Register" },
-{ "USB_EP4_INTR", 0x002120F4, 0, 0xffffffff, 'x', "Endpoint 4 Interrupt Status Register" },
-{ "USB_EP4_MASK", 0x002120F8, 0, 0xffffffff, 'x', "Endpoint 4 Interrupt Mask Register" },
-{ "USB_EP4_FDAT", 0x002120FC, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Data Register" },
-{ "USB_EP4_FSTAT", 0x00212100, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Status Register" },
-{ "USB_EP4_FCTRL", 0x00212104, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Control Register" },
-{ "USB_EP4_LRFP", 0x00212108, 0, 0xffffffff, 'x', "Endpoint 4 Last Read Frame Pointer Register" },
-{ "USB_EP4_LWFP", 0x0021210C, 0, 0xffffffff, 'x', "Endpoint 4 Last Write Frame Pointer Register" },
-{ "USB_EP4_FALRM", 0x00212110, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Alarm Register" },
-{ "USB_EP4_FRDP", 0x00212114, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Read Pointer Register" },
-{ "USB_EP4_FWRP", 0x00212118, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Write Pointer Register" },
-{ "USB_EP5_STAT", 0x00212120, 0, 0xffffffff, 'x', "Endpoint 5 Status/Control Register" },
-{ "USB_EP5_INTR", 0x00212124, 0, 0xffffffff, 'x', "Endpoint 5 Interrupt Status Register" },
-{ "USB_EP5_MASK", 0x00212128, 0, 0xffffffff, 'x', "Endpoint 5 Interrupt Mask Register" },
-{ "USB_EP5_FDAT", 0x0021212C, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Data Register" },
-{ "USB_EP5_FSTAT", 0x00212130, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Status Register" },
-{ "USB_EP5_FCTRL", 0x00212134, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Control Register" },
-{ "USB_EP5_LRFP", 0x00212138, 0, 0xffffffff, 'x', "Endpoint 5 Last Read Frame Pointer Register" },
-{ "USB_EP5_LWFP", 0x0021213C, 0, 0xffffffff, 'x', "Endpoint 5 Last Write Frame Pointer Register" },
-{ "USB_EP5_FALRM", 0x00212140, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Alarm Register" },
-{ "USB_EP5_FRDP", 0x00212144, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Read Pointer Register" },
-{ "USB_EP5_FWRP", 0x00212148, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Write Pointer Register" },
-// SPI
-{ "RXDATAREG1", 0x00213000, 0, 0xffffffff, 'x', "SPI 1 Rx Data Register" },
-{ "TXDATAREG1", 0x00213004, 0, 0xffffffff, 'x', "SPI 1 Tx Data Register" },
-{ "CONTROLREG1", 0x00213008, 0, 0xffffffff, 'x', "SPI 1 Control Register" },
-{ "INTREG1", 0x0021300C, 0, 0xffffffff, 'x', "SPI 1 Interrupt Control/Status Register" },
-{ "TESTREG1", 0x00213010, 0, 0xffffffff, 'x', "SPI 1 Test Register" },
-{ "PERIODREG1", 0x00213014, 0, 0xffffffff, 'x', "SPI 1 Sample Period Control Register" },
-{ "DMAREG1", 0x00213018, 0, 0xffffffff, 'x', "SPI 1 DMA Control Register" },
-{ "RESETREG1", 0x0021301C, 0, 0xffffffff, 'x', "SPI 1 Soft Reset Register" },
-// MMC
-{ "STR_STP_CLK", 0x00214000, 0, 0xffffffff, 'x', "MMC/SD Clock Control Register" },
-{ "STR_STP_CLK_ENDIAN", 0x00214000, 5, 1, 'x', "ENDIAN FIFO Mode Selection: setting this bit selects the Endian mode of the FIFO." },
-{ "STR_STP_CLK_RESET", 0x00214000, 3, 1, 'x', "Resets the MMC/SD module. 1 = Reset the MMC/SD module" },
-{ "STR_STP_CLK_ENABLE", 0x00214000, 2, 1, 'x', "Enables/Disables the MMC/SD module. When the module is disabled, the clock source and all internal operations are halted." },
-{ "STR_STP_CLK_START", 0x00214000, 1, 1, 'x', "1 = MMC/SD clock active" },
-{ "STR_STP_CLK_STOP", 0x00214000, 0, 1, 'x', "1 = MMC/SD clock stopped" },
-{ "STATUS", 0x00214004, 0, 0xffffffff, 'x', "MMC/SD Status Register" },
-{ "STATUS_CARD_PRESENCE", 0x00214004, 15, 1, 'x', "1 = At least 1 card is present" },
-{ "STATUS_SDIO_INT_ACTIVE", 0x00214004, 14, 1, 'x', "1 = Interrupt detected via SDIO card bus" },
-{ "STATUS_END_CMD_RESP", 0x00214004, 13, 1, 'x', "1 = Command transmitted successfully (response received)" },
-{ "STATUS_WRITE_OP_DONE", 0x00214004, 12, 1, 'x', "1 = Write operation complete" },
-{ "STATUS_DATA_TRANS_DONE", 0x00214004, 11, 1, 'x', "1 = Data transfer complete" },
-{ "STATUS_WR_CRC_ERROR_CODE", 0x00214004, 9, 3, 'x', "00 = No transmission error, CRC status is 010 (positive)" },
-{ "STATUS_CARD_BUS_CLK_RUN", 0x00214004, 8, 1, 'x', "1 = MMC/SD clock is running" },
-{ "STATUS_APPL_BUFF_FF", 0x00214004, 7, 1, 'x', "1 = Buffer is full" },
-{ "STATUS_APPL_BUFF_FE", 0x00214004, 6, 1, 'x', "1 = Buffer is empty" },
-{ "STATUS_RESP_CRC_ERR", 0x00214004, 5, 1, 'x', "1 = Response CRC error occurred" },
-{ "STATUS_CRC_READ_ERR", 0x00214004, 3, 1, 'x', "1 = CRC read error occurred" },
-{ "STATUS_CRC_WRITE_ERR", 0x00214004, 2, 1, 'x', "1 = CRC write error occurred" },
-{ "STATUS_TIME_OUT_RESP", 0x00214004, 1, 1, 'x', "1 = Time-out response error occurred" },
-{ "STATUS_TIME_OUT_READ", 0x00214004, 0, 1, 'x', "1 = Time-out read data error occurred" },
-{ "CLK_RATE", 0x00214008, 0, 0xffffffff, 'x', "MMC/SD Clock Rate Register" },
-{ "CLK_RATE_PRESCALER", 0x00214008, 3, 0x00000007, 'x', "Specifies the divider value to generate CLK_20M." },
-{ "CLK_RATE_DIV", 0x00214008, 0, 0x00000007, 'x', "Specifies the divider value to generate CLK_DIV" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-/*{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },*/
-{ "RES_TO", 0x00214010, 0, 0xffffffff, 'x', "MMC/SD Response Time Out Register" },
-{ "READ_TO", 0x00214014, 0, 0xffffffff, 'x', "MMC/SD Read Time Out Register" },
-{ "BLK_LEN", 0x00214018, 0, 0xffffffff, 'x', "MMC/SD Block Length Register" },
-{ "NOB", 0x0021401C, 0, 0xffffffff, 'x', "MMC/SD Number of Blocks Register" },
-{ "REV_NO", 0x00214020, 0, 0xffffffff, 'x', "MMC/SD Revision Number Register" },
-{ "INT_MASK", 0x00214024, 0, 0xffffffff, 'x', "MMC/SD Interrupt Mask Register" },
-{ "CMD", 0x00214028, 0, 0xffffffff, 'x', "MMC/SD Command Number Register" },
-{ "ARGH", 0x0021402C, 0, 0xffffffff, 'x', "MMC/SD Higher Argument Register" },
-{ "ARGL", 0x00214030, 0, 0xffffffff, 'x', "MMC/SD Lower Argument Register" },
-{ "RES_FIFO", 0x00214034, 0, 0xffffffff, 'x', "MMC/SD Response FIFO Register" },
-{ "BUFFER_ACCESS", 0x00214038, 0, 0xffffffff, 'x', "MMC/SD Buffer Access Register" },
-// I2C
-{ "IADR", 0x00217000, 0, 0xffffffff, 'x', "I2C Address Register" },
-{ "IFDR", 0x00217004, 0, 0xffffffff, 'x', "I2C Frequency Divider Register" },
-{ "I2CR", 0x00217008, 0, 0xffffffff, 'x', "I2C Control Register" },
-{ "I2CSR", 0x0021700C, 0, 0xffffffff, 'x', "I2C Status Register" },
-{ "I2DR", 0x00217010, 0, 0xffffffff, 'x', "I2C Data I/O Register" },
-// SSI
-{ "STX", 0x00218000, 0, 0xffffffff, 'x', "SSI Transmit Data Register" },
-{ "SRX", 0x00218004, 0, 0xffffffff, 'x', "SSI Receive Data Register" },
-{ "SCSR", 0x00218008, 0, 0xffffffff, 'x', "SSI Control/Status Register" },
-{ "STCR", 0x0021800C, 0, 0xffffffff, 'x', "SSI Transmit Configuration Register" },
-{ "SRCR", 0x00218010, 0, 0xffffffff, 'x', "SSI Receive Configuration Register" },
-{ "STCCR", 0x00218014, 0, 0xffffffff, 'x', "SSI Transmit Clock Control Register" },
-{ "SRCCR", 0x00218018, 0, 0xffffffff, 'x', "SSI Receive Clock Control Register" },
-{ "STSR", 0x0021801C, 0, 0xffffffff, 'x', "SSI Time Slot Register" },
-{ "SFCSR", 0x00218020, 0, 0xffffffff, 'x', "SSI FIFO Control/Status Register" },
-{ "SOR", 0x00218028, 0, 0xffffffff, 'x', "SSI Option Register" },
-// SPI
-{ "RXDATAREG2", 0x00219000, 0, 0xffffffff, 'x', "SPI 2 Rx Data Register" },
-{ "TXDATAREG2", 0x00219004, 0, 0xffffffff, 'x', "SPI 2 Tx Data Register" },
-{ "CONTROLREG2", 0x00219008, 0, 0xffffffff, 'x', "SPI 2 Control Register" },
-{ "INTREG2", 0x0021900C, 0, 0xffffffff, 'x', "SPI 2 Interrupt Control/Status Register" },
-{ "TESTREG2", 0x00219010, 0, 0xffffffff, 'x', "SPI 2 Test Register" },
-{ "PERIODREG2", 0x00219014, 0, 0xffffffff, 'x', "SPI 2 Sample Period Control Register" },
-{ "DMAREG2", 0x00219018, 0, 0xffffffff, 'x', "SPI 2 DMA Control Register" },
-{ "RESETREG2", 0x0021901C, 0, 0xffffffff, 'x', "SPI 2 Soft Reset Register" },
-// MS
-{ "MSCMD", 0x0021A000, 0, 0xffffffff, 'x', "Memory Stick Command Register" },
-{ "MSCS", 0x0021A002, 0, 0xffffffff, 'x', "Memory Stick Control/Status Register" },
-{ "MSTDATA", 0x0021A004, 0, 0xffffffff, 'x', "Memory Stick Transmit FIFO Data Register" },
-{ "MSRDATA", 0x0021A004, 0, 0xffffffff, 'x', "Memory Stick Receive FIFO Data Register" },
-{ "MSICS", 0x0021A006, 0, 0xffffffff, 'x', "Memory Stick Interrupt Control/Status Register" },
-{ "MSPPCD", 0x0021A008, 0, 0xffffffff, 'x', "Memory Stick Parallel Port Control/Data Register" },
-{ "MSC2", 0x0021A00A, 0, 0xffffffff, 'x', "Memory Stick Control 2 Register" },
-{ "MSACD", 0x0021A00C, 0, 0xffffffff, 'x', "Memory Stick Auto Command Register" },
-{ "MSFAECS", 0x0021A00E, 0, 0xffffffff, 'x', "Memory Stick FIFO Access Error Control/Status Register" },
-{ "MSCLKD", 0x0021A010, 0, 0xffffffff, 'x', "Memory Stick Serial Clock Divider Register" },
-{ "MSDRQC", 0x0021A012, 0, 0xffffffff, 'x', "Memory Stick DMA Request Control Register" },
-//
-{ "CSCR", 0x0021B000, 0, 0xffffffff, 'x', "Clock Source Control Register" },
-{ "MPCTL0", 0x0021B004, 0, 0xffffffff, 'x', "MCU PLL Control Register 0" },
-{ "MPCTL1", 0x0021B008, 0, 0xffffffff, 'x', "MCU PLL and System Clock Control Register 1" },
-{ "SPCTL0", 0x0021B00C, 0, 0xffffffff, 'x', "System PLL Control Register 0" },
-{ "SPCTL1", 0x0021B010, 0, 0xffffffff, 'x', "System PLL Control Register 1" },
-{ "PCDR", 0x0021B020, 0, 0xffffffff, 'x', "Peripheral Clock Divider Register" },
-{ "RSR", 0x0021B800, 0, 0xffffffff, 'x', "Reset Source Register" },
-{ "SIDR", 0x0021B804, 0, 0xffffffff, 'x', "Silicon ID Register" },
-{ "FMCR", 0x0021B808, 0, 0xffffffff, 'x', "Function Multiplexing Control Register" },
-{ "GPCR", 0x0021B80C, 0, 0xffffffff, 'x', "Global Peripheral Control Register" },
-{ "GCCR", 0x0021B810, 0, 0xffffffff, 'x', "Global Clock Control Register" },
-{ "DDIR_A", 0x0021C000, 0, 0xffffffff, 'x', "Port A Data Direction Register" },
-{ "OCR1_A", 0x0021C004, 0, 0xffffffff, 'x', "Port A Output Configuration Register 1" },
-{ "OCR2_A", 0x0021C008, 0, 0xffffffff, 'x', "Port A Output Configuration Register 2" },
-{ "ICONFA1_A", 0x0021C00C, 0, 0xffffffff, 'x', "Port A Input Configuration Register A1" },
-{ "ICONFA2_A", 0x0021C010, 0, 0xffffffff, 'x', "Port A Input Configuration Register A2" },
-{ "ICONFB1_A", 0x0021C014, 0, 0xffffffff, 'x', "Port A Input Configuration Register B1" },
-{ "ICONFB2_A", 0x0021C018, 0, 0xffffffff, 'x', "Port A Input Configuration Register B2" },
-{ "DR_A", 0x0021C01C, 0, 0xffffffff, 'x', "Port A Data Register" },
-{ "GIUS_A", 0x0021C020, 0, 0xffffffff, 'x', "Port A GPIO In Use Register" },
-{ "SSR_A", 0x0021C024, 0, 0xffffffff, 'x', "Port A Sample Status Register" },
-{ "ICR1_A", 0x0021C028, 0, 0xffffffff, 'x', "Port A Interrupt Configuration Register 1" },
-{ "ICR2_A", 0x0021C02C, 0, 0xffffffff, 'x', "Port A Interrupt Configuration Register 2" },
-{ "IMR_A", 0x0021C030, 0, 0xffffffff, 'x', "Port A Interrupt Mask Register" },
-{ "ISR_A", 0x0021C034, 0, 0xffffffff, 'x', "Port A Interrupt Status Register" },
-{ "GPR_A", 0x0021C038, 0, 0xffffffff, 'x', "Port A General Purpose Register" },
-{ "SWR_A", 0x0021C03C, 0, 0xffffffff, 'x', "Port A Software Reset Register" },
-{ "PUEN_A", 0x0021C040, 0, 0xffffffff, 'x', "Port A Pull_Up Enable Register" },
-{ "DDIR_B", 0x0021C100, 0, 0xffffffff, 'x', "Port B Data Direction Register" },
-{ "OCR1_B", 0x0021C104, 0, 0xffffffff, 'x', "Port B Output Configuration Register 1" },
-{ "OCR2_B", 0x0021C108, 0, 0xffffffff, 'x', "Port B Output Configuration Register 2" },
-{ "ICONFA1_B", 0x0021C10C, 0, 0xffffffff, 'x', "Port B Input Configuration Register A1" },
-{ "ICONFA2_B", 0x0021C110, 0, 0xffffffff, 'x', "Port B Input Configuration Register A2" },
-{ "ICONFB1_B", 0x0021C114, 0, 0xffffffff, 'x', "Port B Input Configuration Register B1" },
-{ "ICONFB2_B", 0x0021C118, 0, 0xffffffff, 'x', "Port B Input Configuration Register B2" },
-{ "DR_B", 0x0021C11C, 0, 0xffffffff, 'x', "Port B Data Register" },
-{ "GIUS_B", 0x0021C120, 0, 0xffffffff, 'x', "Port B GPIO In Use Register" },
-{ "SSR_B", 0x0021C124, 0, 0xffffffff, 'x', "Port B Sample Status Register" },
-{ "ICR1_B", 0x0021C128, 0, 0xffffffff, 'x', "Port B Interrupt Configuration Register 1" },
-{ "ICR2_B", 0x0021C12C, 0, 0xffffffff, 'x', "Port B Interrupt Configuration Register 2" },
-{ "IMR_B", 0x0021C130, 0, 0xffffffff, 'x', "Port B Interrupt Mask Register" },
-{ "ISR_B", 0x0021C134, 0, 0xffffffff, 'x', "Port B Interrupt Status Register" },
-{ "GPR_B", 0x0021C138, 0, 0xffffffff, 'x', "Port B General Purpose Register" },
-{ "SWR_B", 0x0021C13C, 0, 0xffffffff, 'x', "Port B Software Reset Register" },
-{ "PUEN_B", 0x0021C140, 0, 0xffffffff, 'x', "Port B Pull_Up Enable Register" },
-{ "DDIR_C", 0x0021C200, 0, 0xffffffff, 'x', "Port C Data Direction Register" },
-{ "OCR1_C", 0x0021C204, 0, 0xffffffff, 'x', "Port C Output Configuration Register 1" },
-{ "OCR2_C", 0x0021C208, 0, 0xffffffff, 'x', "Port C Output Configuration Register 2" },
-{ "ICONFA1_C", 0x0021C20C, 0, 0xffffffff, 'x', "Port C Input Configuration Register A1" },
-{ "ICONFA2_C", 0x0021C210, 0, 0xffffffff, 'x', "Port C Input Configuration Register A2" },
-{ "ICONFB1_C", 0x0021C214, 0, 0xffffffff, 'x', "Port C Input Configuration Register B1" },
-{ "ICONFB2_C", 0x0021C218, 0, 0xffffffff, 'x', "Port C Input Configuration Register B2" },
-{ "DR_C", 0x0021C21C, 0, 0xffffffff, 'x', "Port C Data Register" },
-{ "GIUS_C", 0x0021C220, 0, 0xffffffff, 'x', "Port C GPIO In Use Register" },
-{ "SSR_C", 0x0021C224, 0, 0xffffffff, 'x', "Port C Sample Status Register" },
-{ "ICR1_C", 0x0021C228, 0, 0xffffffff, 'x', "Port C Interrupt Configuration Register 1" },
-{ "ICR2_C", 0x0021C22C, 0, 0xffffffff, 'x', "Port C Interrupt Configuration Register 2" },
-{ "IMR_C", 0x0021C230, 0, 0xffffffff, 'x', "Port C Interrupt Mask Register" },
-{ "ISR_C", 0x0021C234, 0, 0xffffffff, 'x', "Port C Interrupt Status Register" },
-{ "GPR_C", 0x0021C238, 0, 0xffffffff, 'x', "Port C General Purpose Register" },
-{ "SWR_C", 0x0021C23C, 0, 0xffffffff, 'x', "Port C Software Reset Register" },
-{ "PUEN_C", 0x0021C240, 0, 0xffffffff, 'x', "Port C Pull_Up Enable Register" },
-{ "DDIR_D", 0x0021C300, 0, 0xffffffff, 'x', "Port D Data Direction Register" },
-{ "OCR1_D", 0x0021C304, 0, 0xffffffff, 'x', "Port D Output Configuration Register 1" },
-{ "OCR2_D", 0x0021C308, 0, 0xffffffff, 'x', "Port D Output Configuration Register 2" },
-{ "ICONFA1_D", 0x0021C30C, 0, 0xffffffff, 'x', "Port D Input Configuration Register A1" },
-{ "ICONFA2_D", 0x0021C310, 0, 0xffffffff, 'x', "Port D Input Configuration Register A2" },
-{ "ICONFB1_D", 0x0021C314, 0, 0xffffffff, 'x', "Port D Input Configuration Register B1" },
-{ "ICONFB2_D", 0x0021C318, 0, 0xffffffff, 'x', "Port D Input Configuration Register B2" },
-{ "DR_D", 0x0021C31C, 0, 0xffffffff, 'x', "Port D Data Register" },
-{ "GIUS_D", 0x0021C320, 0, 0xffffffff, 'x', "Port D GPIO In Use Register" },
-{ "SSR_D", 0x0021C324, 0, 0xffffffff, 'x', "Port D Sample Status Register" },
-{ "ICR1_D", 0x0021C328, 0, 0xffffffff, 'x', "Port D Interrupt Configuration Register 1" },
-{ "ICR2_D", 0x0021C32C, 0, 0xffffffff, 'x', "Port D Interrupt Configuration Register 2" },
-{ "IMR_D", 0x0021C330, 0, 0xffffffff, 'x', "Port D Interrupt Mask Register" },
-{ "ISR_D", 0x0021C334, 0, 0xffffffff, 'x', "Port D Interrupt Status Register" },
-{ "GPR_D", 0x0021C338, 0, 0xffffffff, 'x', "Port D General Purpose Register" },
-{ "SWR_D", 0x0021C33C, 0, 0xffffffff, 'x', "Port D Software Reset Register" },
-{ "PUEN_D", 0x0021C340, 0, 0xffffffff, 'x', "Port D Pull_Up Enable Register" },
-{ "CS0U", 0x00220000, 0, 0xffffffff, 'x', "Chip Select 0 Upper Control Register" },
-{ "CS0L", 0x00220004, 0, 0xffffffff, 'x', "Chip Select 0 Lower Control Register" },
-{ "CS1U", 0x00220008, 0, 0xffffffff, 'x', "Chip Select 1 Upper Control Register" },
-{ "CS1L", 0x0022000C, 0, 0xffffffff, 'x', "Chip Select 1 Lower Control Register" },
-{ "CS2U", 0x00220010, 0, 0xffffffff, 'x', "Chip Select 2 Upper Control Register" },
-{ "CS2L", 0x00220014, 0, 0xffffffff, 'x', "Chip Select 2 Lower Control Register" },
-{ "CS3U", 0x00220018, 0, 0xffffffff, 'x', "Chip Select 3 Upper Control Register" },
-{ "CS3L", 0x0022001C, 0, 0xffffffff, 'x', "Chip Select 3 Lower Control Register" },
-{ "CS4U", 0x00220020, 0, 0xffffffff, 'x', "Chip Select 4 Upper Control Register" },
-{ "CS4L", 0x00220024, 0, 0xffffffff, 'x', "Chip Select 4 Lower Control Register" },
-{ "CS5U", 0x00220028, 0, 0xffffffff, 'x', "Chip Select 5 Upper Control Register" },
-{ "CS5L", 0x0022002C, 0, 0xffffffff, 'x', "Chip Select 5 Lower Control Register" },
-{ "EIM", 0x00220030, 0, 0xffffffff, 'x', "EIM Configuration Register" },
-{ "SDCTL0", 0x00221000, 0, 0xffffffff, 'x', "SDRAM 0 Control Register" },
-{ "SDCTL1", 0x00221004, 0, 0xffffffff, 'x', "SDRAM 1 Control Register" },
-{ "MISCELLANEOUS", 0x00221014, 0, 0xffffffff, 'x', "Miscellaneous Register" },
-{ "SDRST", 0x00221018, 0, 0xffffffff, 'x', "SDRAM Reset Register" },
-{ "MMA_MAC_MOD", 0x00222000, 0, 0xffffffff, 'x', "MMA MAC Module Register" },
-{ "MMA_MAC_CTRL", 0x00222004, 0, 0xffffffff, 'x', "MMA MAC Control Register" },
-{ "MMA_MAC_MULT", 0x00222008, 0, 0xffffffff, 'x', "MMA MAC Multiply Counter Register" },
-{ "MMA_MAC_ACCU", 0x0022200C, 0, 0xffffffff, 'x', "MMA MAC Accumulate Counter Register" },
-{ "MMA_MAC_INTR", 0x00222010, 0, 0xffffffff, 'x', "MMA MAC Interrupt Register" },
-{ "MMA_MAC_INTR_MASK", 0x00222014, 0, 0xffffffff, 'x', "MMA MAC Interrupt Mask Register" },
-{ "MMA_MAC_FIFO", 0x00222018, 0, 0xffffffff, 'x', "MMA MAC FIFO Register" },
-{ "MMA_MAC_FIFO_STAT", 0x0022201C, 0, 0xffffffff, 'x', "MMA MAC FIFO Status Register" },
-{ "MMA_MAC_BURST", 0x00222020, 0, 0xffffffff, 'x', "MMA MAC Burst Count Register" },
-{ "MMA_MAC_BITSEL", 0x00222024, 0, 0xffffffff, 'x', "MMA MAC Bit Select Register" },
-{ "MMA_MAC_XYACCU", 0x00222040, 0, 0xffffffff, 'x', "MMA MAC XY Count Accumulate Register" },
-{ "MMA_MAC_XBASE", 0x00222200, 0, 0xffffffff, 'x', "MMA MAC X Base Address Register" },
-{ "MMA_MAC_XINDEX", 0x00222204, 0, 0xffffffff, 'x', "MMA MAC X Index Register" },
-{ "MMA_MAC_XLENGTH", 0x00222208, 0, 0xffffffff, 'x', "MMA MAC X Length Register" },
-{ "MMA_MAC_XMODIFY", 0x0022220C, 0, 0xffffffff, 'x', "MMA MAC X Modify Register" },
-{ "MMA_MAC_XINCR", 0x00222210, 0, 0xffffffff, 'x', "MMA MAC X Increment Register" },
-{ "MMA_MAC_XCOUNT", 0x00222214, 0, 0xffffffff, 'x', "MMA MAC X Count Register" },
-{ "MMA_MAC_YBASE", 0x00222300, 0, 0xffffffff, 'x', "MMA MAC Y Base Address Register" },
-{ "MMA_MAC_YINDEX", 0x00222304, 0, 0xffffffff, 'x', "MMA MAC Y Index Register" },
-{ "MMA_MAC_YLENGTH", 0x00222308, 0, 0xffffffff, 'x', "MMA MAC Y Length Register" },
-{ "MMA_MAC_YMODIFY", 0x0022230C, 0, 0xffffffff, 'x', "MMA MAC Y Modify Register" },
-{ "MMA_MAC_YINCR", 0x00222310, 0, 0xffffffff, 'x', "MMA MAC Y Increment Register" },
-{ "MMA_MAC_YCOUNT", 0x00222314, 0, 0xffffffff, 'x', "MMA MAC Y Count Register" },
-{ "MMA_DCTCTRL", 0x00222400, 0, 0xffffffff, 'x', "DCT/iDCT Control Register" },
-{ "MMA_DCTVERSION", 0x00222404, 0, 0xffffffff, 'x', "DCT/iDCT Version Register" },
-{ "MMA_DCTIRQENA", 0x00222408, 0, 0xffffffff, 'x', "DCT/iDCT IRQ Enable Register" },
-{ "MMA_DCTIRQSTAT", 0x0022240C, 0, 0xffffffff, 'x', "DCT/iDCT IRQ Status Register" },
-{ "DSA_DCTSRCDATA", 0x00222410, 0, 0xffffffff, 'x', "DCT/iDCT Source Data Address" },
-{ "MMA_DCTDESDATA", 0x00222414, 0, 0xffffffff, 'x', "DCT/iDCT Destination Data Address" },
-{ "MMA_DCTXOFF", 0x00222418, 0, 0xffffffff, 'x', "DCT/iDCT X-Offset Address" },
-{ "MMA_DCTYOFF", 0x0022241C, 0, 0xffffffff, 'x', "DCT/iDCT Y-Offset Address" },
-{ "MMA_DCTXYCNT", 0x00222420, 0, 0xffffffff, 'x', "DCT/iDCT XY Count" },
-{ "MMA_DCTSKIP", 0x00222424, 0, 0xffffffff, 'x', "DCT/iDCT Skip Address" },
-{ "MMA_DCTFIFO", 0x00222500, 0, 0xffffffff, 'x', "DCT/iDCT Data FIFO" },
-{ "INTCNTL", 0x00223000, 0, 0xffffffff, 'x', "Interrupt Control Register" },
-{ "NIMASK", 0x00223004, 0, 0xffffffff, 'x', "Normal Interrupt Mask Register" },
-{ "INTENNUM", 0x00223008, 0, 0xffffffff, 'x', "Interrupt Enable Number Register" },
-{ "INTDISNUM", 0x0022300C, 0, 0xffffffff, 'x', "Interrupt Disable Number Register" },
-{ "INTENABLEH", 0x00223010, 0, 0xffffffff, 'x', "Interrupt Enable Register High" },
-{ "INTENABLEL", 0x00223014, 0, 0xffffffff, 'x', "Interrupt Enable Register Low" },
-{ "INTTYPEH", 0x00223018, 0, 0xffffffff, 'x', "Interrupt Type Register High" },
-{ "INTTYPEL", 0x0022301C, 0, 0xffffffff, 'x', "Interrupt Type Register Low" },
-{ "NIPRIORITY7", 0x00223020, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 7" },
-{ "NIPRIORITY6", 0x00223024, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 6" },
-{ "NIPRIORITY5", 0x00223028, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 5" },
-{ "NIPRIORITY4", 0x0022302C, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 4" },
-{ "NIPRIORITY3", 0x00223030, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 3" },
-{ "NIPRIORITY2", 0x00223034, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 2" },
-{ "NIPRIORITY1", 0x00223038, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 1" },
-{ "NIPRIORITY0", 0x0022303C, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 0" },
-{ "NIVECSR", 0x00223040, 0, 0xffffffff, 'x', "Normal Interrupt Vector and Status Register" },
-{ "FIVECSR", 0x00223044, 0, 0xffffffff, 'x', "Fast Interrupt Vector and Status Register" },
-{ "INTSRCH", 0x00223048, 0, 0xffffffff, 'x', "Interrupt Source Register High" },
-{ "INTSRCL", 0x0022304C, 0, 0xffffffff, 'x', "Interrupt Source Register Low" },
-{ "INTFRCH", 0x00223050, 0, 0xffffffff, 'x', "Interrupt Force Register High" },
-{ "INTFRCL", 0x00223054, 0, 0xffffffff, 'x', "Interrupt Force Register Low" },
-{ "NIPNDH", 0x00223058, 0, 0xffffffff, 'x', "Normal Interrupt Pending Register High" },
-{ "NIPNDL", 0x0022305C, 0, 0xffffffff, 'x', "Normal Interrupt Pending Register Low" },
-{ "FIPNDH", 0x00223060, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register High" },
-{ "FIPNDL", 0x00223064, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register Low" },
-{ "CSICR1", 0x00224000, 0, 0xffffffff, 'x', "CSI Control Register 1" },
-{ "CSICR2", 0x00224004, 0, 0xffffffff, 'x', "CSI Control Register 2" },
-{ "CSISR", 0x00224008, 0, 0xffffffff, 'x', "CSI Status Register 1" },
-{ "CSISTATR", 0x0022400C, 0, 0xffffffff, 'x', "CSI Statistic FIFO Register 1" },
-{ "CSIRXR", 0x00224010, 0, 0xffffffff, 'x', "CSI RxFIFO Register 1" },
-};
-
-// Size of mmapping:
-#define MAP_SIZE 4096
-#define MAP_MASK ( MAP_SIZE - 1 )
Modified: trunk/target/linux/debug/imxssi/imxssi.c
===================================================================
--- trunk/target/linux/debug/imxssi/imxssi.c 2008-12-15 15:19:39 UTC (rev 959)
+++ trunk/target/linux/debug/imxssi/imxssi.c 2008-12-15 16:37:15 UTC (rev 960)
@@ -35,7 +35,7 @@
/*#include <linux/i2c.h>
#include <linux/i2c-dev.h>*/
-#include "imxregs.h"
+#include "../imxregs/imxregs.h"
#define DEBUG TRUE
@@ -138,10 +138,10 @@
switch (regs[i].type)
{
// Hexa printing
- case 'x':
+ case 'x':
printf("%8x", shiftdata);
break;
- case '<':
+ case '<':
printf("%8u", 1 << shiftdata);
break;
// Decimal printing
@@ -317,34 +317,6 @@
char *p;
u32 val;
- // 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) {
- dumpmatching(argv[1]);
- return 0;
- }
-
- // Put value to given register
- if (argc == 3) {
- sscanf(argv[2],"%i",&val);
- setreg(argv[1], val);
- return 0;
- }
-
if (argc == 4) {
u32 type;
float level;
@@ -362,16 +334,12 @@
return 0;
}
// In all other cases, print Usage
- printf("Usage: %s - to dump all known registers\n"
- " %s <name> - to dump named register\n"
- " %s <name> <value> - to set named register\n",
- " %s <signal_type> <samples> <scale> - to audio signal:\n",
- " <signal_type> 0:triangular 1:sinusoid",
- " <samples> nb sample per period",
- " <scale> 0.0 .. 1.0 signal amplitude\n",
- " tsc2102 has to be configured in master mode",
+ printf("Usage: %s <signal_type> <samples> <scale> - to audio signal:\n"
+ " <signal_type> 0:triangular 1:sinusoid\n"
+ " <samples> nb sample per period\n"
+ " <scale> 0.0 .. 1.0 signal amplitude\n"
+ " !! tsc210x has to be configured in master mode !!\n",
argv[0], argv[0], argv[0], argv[0]);
return 1;
}
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-15 15:19:46
|
Revision: 959
http://armadeus.svn.sourceforge.net/armadeus/?rev=959&view=rev
Author: artemys
Date: 2008-12-15 15:19:39 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
[DEBUG] Found 2 indent styles in imxssi so I applied the most common one to the whole file
Modified Paths:
--------------
trunk/target/linux/debug/imxssi/imxssi.c
Modified: trunk/target/linux/debug/imxssi/imxssi.c
===================================================================
--- trunk/target/linux/debug/imxssi/imxssi.c 2008-12-15 14:22:25 UTC (rev 958)
+++ trunk/target/linux/debug/imxssi/imxssi.c 2008-12-15 15:19:39 UTC (rev 959)
@@ -1,12 +1,25 @@
/*
- * imxregs.c - Tool to display and modify iMX registers from Linux's userspace
+ * imxssi.c - Tool to send SSI data from Linux's userspace
*
- * Maintainer: J. Boibessot
- * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-L�ungen Online GmbH
- *
- * This tool is placed under the GPL.
+ * Maintainers: E. Jarrige, J. Boibessot
+ * (c) Copyright 2008 by Armadeus Systems
+ * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-Loesungen Online GmbH
*
-*/
+ * 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 <unistd.h>
@@ -34,67 +47,61 @@
// Get value of the register at the given address
static int getmem(u32 addr)
{
- void *map, *regaddr;
- u32 val;
-#ifdef DEBUG
- printf("getmem(0x%08x)\n", addr);
-#endif // DEBUG
- 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);
- }
-#ifdef DEBUG
- printf("Mapped addr: 0x%x\n", regaddr);
-#endif // DEBUG
- regaddr = map + (addr & MAP_MASK);
-
- val = *(u32*) regaddr;
- munmap(0,MAP_SIZE);
-
- return val;
+ void *map, *regaddr;
+ u32 val;
+ #ifdef DEBUG
+ printf("getmem(0x%08x)\n", addr);
+ #endif // DEBUG
+ 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);
+ }
+ #ifdef DEBUG
+ printf("Mapped addr: 0x%x\n", regaddr);
+ #endif // DEBUG
+ regaddr = map + (addr & MAP_MASK);
+
+ val = *(u32*) regaddr;
+ munmap(0,MAP_SIZE);
+
+ return val;
}
// Modify register value at given address
static void putmem(u32 addr, u32 val)
{
- void *map, *regaddr;
- static int fd = -1;
-
- //printf("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("Mapped addr: 0x%x\n", regaddr);
- regaddr = map + (addr & MAP_MASK);
-
- *(u32*) regaddr = val;
- munmap(0,MAP_SIZE);
+ void *map, *regaddr;
+ static int fd = -1;
+
+ //printf("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("Mapped addr: 0x%x\n", regaddr);
+ regaddr = map + (addr & MAP_MASK);
+
+ *(u32*) regaddr = val;
+ munmap(0,MAP_SIZE);
}
static u32 lastaddr = 0;
@@ -106,221 +113,199 @@
// 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
static void dumpall(void)
{
- int i;
- int n=sizeof(regs)/sizeof(struct reg_info);
-
- for( i=0; i<n; i++ )
- {
- dumpentry(i);
- }
+ int i;
+ int n=sizeof(regs)/sizeof(struct reg_info);
+
+ for( i=0; i<n; i++ ) {
+ dumpentry(i);
+ }
}
//
// Show content of register with name starting with given string
static void dumpmatching(char *name)
{
- int i;
- int n=sizeof(regs)/sizeof(struct reg_info);
-
- for (i=0; i<n; i++)
- {
- if (strstr(regs[i].name, name))
- dumpentry(i);
- }
+ int i;
+ int n=sizeof(regs)/sizeof(struct reg_info);
+
+ for (i=0; i<n; i++) {
+ if (strstr(regs[i].name, name))
+ dumpentry(i);
+ }
}
//
// 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);
- //printf("Old contents: 0x%08x\n", mem);
- mem &= ~(regs[found].mask << regs[found].shift);
- //printf("Unmasked contents: 0x%08x\n", mem);
- val &= regs[found].mask;
- //printf("mask: 0x%08x\n", regs[found].mask);
- //printf("masked val: 0x%08x\n", val);
- mem |= val << regs[found].shift;
- //printf("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);
+ //printf("Old contents: 0x%08x\n", mem);
+ mem &= ~(regs[found].mask << regs[found].shift);
+ //printf("Unmasked contents: 0x%08x\n", mem);
+ val &= regs[found].mask;
+ //printf("mask: 0x%08x\n", regs[found].mask);
+ //printf("masked val: 0x%08x\n", val);
+ mem |= val << regs[found].shift;
+ //printf("Embedded value: 0x%08x\n", mem);
+ putmem(regs[found].addr, mem);
}
static void audio(u32 type, u32 samples, float level)
{
- volatile void *map, *regaddr, *dma;
- static int fd = -1;
- u32 counter = 0;
+ volatile void *map, *regaddr, *dma;
+ static int fd = -1;
+ u32 counter = 0;
+ u32 i;
- if (samples > 65536) samples = 65536;
- if (-1.0f > level) -1.0f;
- if ( 1.0f < level) 1.0f;
+ if (samples > 65536) samples = 65536;
+ if (-1.0f > level) -1.0f;
+ if ( 1.0f < level) 1.0f;
+
+ for (i=0;i<65536;i++)
+ ttable[i] = 0;
+
+ if (0 == (type%2)) {
+ u32 i=0;
+ for (i=0;i<(samples/2);i++) {
+ table[i] = roundf((-32768+ ((i*(65535/samples))*2*level)));
+ table[samples-1-i] = roundf(((-32768 + ((i*(65535/samples))*2*level))));
+ /*printf("tab[%d]=%d tab[%d]=%d\n", i, table[i], (65536/inc)-1-i, table[(65536/inc)-1-i]);*/
+ }
+ } else {
+ u32 i=0;
+ double cosx;
+ for (i=0;i<samples;i++) {
+ cosx = cos(((double)i/samples)*2*M_PI);
+ table[i] = roundf(cosx*32767*level);
+ }
+ }
+
+ //printf("putmem(0x%08x, 0x%08x)\n", 0x00218000, 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, 0x00218000 & ~MAP_MASK );
+ if (map == (void*)-1 ) {
+ perror("mmap() ssi");
+ exit(1);
+ }
+ printf("Mapped ssi addr: 0x%x\n", map);
+ regaddr = map + (0x00218000 & MAP_MASK);
- u32 i;
- for (i=0;i<65536;i++) ttable[i] = 0;
- if (0 == (type%2))
- {
- u32 i=0;
- for (i=0;i<(samples/2);i++)
- {
- table[i] = roundf((-32768+ ((i*(65535/samples))*2*level)));
- table[samples-1-i] = roundf(((-32768 + ((i*(65535/samples))*2*level))));
- /*printf("tab[%d]=%d tab[%d]=%d\n", i, table[i], (65536/inc)-1-i, table[(65536/inc)-1-i]);*/
- }
- }
- else
- {
- u32 i=0;
- double cosx;
- for (i=0;i<samples;i++)
- {
- cosx = cos(((double)i/samples)*2*M_PI);
- table[i] = roundf(cosx*32767*level);
-
- }
- }
+ dma = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x00209000 & ~MAP_MASK );
+ if (dma == (void*)-1 ) {
+ perror("mmap() dma");
+ exit(1);
+ }
+ printf("Mapped dma addr: 0x%x\n", dma);
+
+ *(volatile u32*)(dma+0x2CC) = 0x20A0; /* CCR9 */
- //printf("putmem(0x%08x, 0x%08x)\n", 0x00218000, 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, 0x00218000 & ~MAP_MASK );
- if (map == (void*)-1 )
- {
- perror("mmap() ssi");
- exit(1);
- }
- printf("Mapped ssi addr: 0x%x\n", map);
- regaddr = map + (0x00218000 & MAP_MASK);
-
-
- dma = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x00209000 & ~MAP_MASK );
- if (dma == (void*)-1 )
- {
- perror("mmap() dma");
- exit(1);
- }
- printf("Mapped dma addr: 0x%x\n", dma);
-
- *(volatile u32*)(dma+0x2CC) = 0x20A0; /* CCR9 */
-
- if (1 < type)
- {
- *(volatile u32*)(dma+0x2CC) = 0x2000; /* CCR9 */
- *(volatile u32*)(dma+0x2C0) = table; /* SAR9 */
- *(volatile u32*)(dma+0x2C4) = ttable/*0x00218000*/; /* DAR9 */
- *(volatile u32*)(dma+0x2C8) = samples; /* CNTR9 */
- *(volatile u32*)(dma+0x2CC) = 0x2000; /* CCR9 */
- *(volatile u32*)(dma+0x2D0) = 16; /* RSSR9 */
- *(volatile u32*)(dma+0x2D4) = 16; /* BLR9 */
-
- *(volatile u32*)(dma+0x2CC) = 0x000F; /* CCR9 */
-
- while(1)
- {
- while(6 < ((*(volatile u32*)(map + (0x00218020 & MAP_MASK)))&0x0F00)>>8 );
-
- {
- u32 i;
- for (i=0;i<samples;i++)
- printf("tab[%d]=%d tab[%d]=%d\n", i, table[i], i, ttable[i]);
- /**(volatile short*) regaddr = 32000;*/
-/* *(volatile short*) regaddr = table[counter&0X0FFFF];
- *(volatile short*) regaddr = table[counter&0X0FFFF];
- counter = (counter+1)%samples;
-*/
- }
- }
- }
- else
- {
- while(1)
- {
- while(6 < ((*(volatile u32*)(map + (0x00218020 & MAP_MASK)))&0x0F00)>>8 );
-
- {
- *(volatile u32*) regaddr = table[counter&0X0FFFF];
- *(volatile u32*) regaddr = table[counter&0X0FFFF];
- counter = (counter+1)%samples;
- }
- }
- }
-
- munmap(0,MAP_SIZE);
+ if (1 < type) {
+ *(volatile u32*)(dma+0x2CC) = 0x2000; /* CCR9 */
+ *(volatile u32*)(dma+0x2C0) = table; /* SAR9 */
+ *(volatile u32*)(dma+0x2C4) = ttable/*0x00218000*/; /* DAR9 */
+ *(volatile u32*)(dma+0x2C8) = samples; /* CNTR9 */
+ *(volatile u32*)(dma+0x2CC) = 0x2000; /* CCR9 */
+ *(volatile u32*)(dma+0x2D0) = 16; /* RSSR9 */
+ *(volatile u32*)(dma+0x2D4) = 16; /* BLR9 */
+ *(volatile u32*)(dma+0x2CC) = 0x000F; /* CCR9 */
+
+ while(1) {
+ while(6 < ((*(volatile u32*)(map + (0x00218020 & MAP_MASK)))&0x0F00)>>8 );
+
+ {
+ u32 i;
+ for (i=0;i<samples;i++)
+ printf("tab[%d]=%d tab[%d]=%d\n", i, table[i], i, ttable[i]);
+ /**(volatile short*) regaddr = 32000;*/
+ /* *(volatile short*) regaddr = table[counter&0X0FFFF];
+ *(volatile short*) regaddr = table[counter&0X0FFFF];
+ counter = (counter+1)%samples;
+ */
+ }
+ }
+ } else {
+ while(1) {
+ while(6 < ((*(volatile u32*)(map + (0x00218020 & MAP_MASK)))&0x0F00)>>8 );
+
+ {
+ *(volatile u32*) regaddr = table[counter&0X0FFFF];
+ *(volatile u32*) regaddr = table[counter&0X0FFFF];
+ counter = (counter+1)%samples;
+ }
+ }
+ }
+
+ munmap(0,MAP_SIZE);
}
@@ -334,39 +319,35 @@
// No arguments -> dump all known registers
if (argc == 1) {
- dumpall();
- return 0;
+ dumpall();
+ return 0;
}
// Uppercase first argument (register name)
- if (argc >= 2)
- {
+ if (argc >= 2) {
p = argv[1];
while (*p) {
- *p = toupper(*p);
- p++;
+ *p = toupper(*p);
+ p++;
}
}
// Dump the content of the provided register
- if (argc == 2)
- {
- dumpmatching(argv[1]);
- return 0;
+ if (argc == 2) {
+ dumpmatching(argv[1]);
+ return 0;
}
// Put value to given register
- if (argc == 3)
- {
+ if (argc == 3) {
sscanf(argv[2],"%i",&val);
setreg(argv[1], val);
return 0;
}
- if (argc == 4)
- {
- u32 type;
- float level;
+ if (argc == 4) {
+ u32 type;
+ float level;
setreg("SFCSR", 0x0088);
setreg("STCCR", 0x6103);
@@ -382,15 +363,15 @@
}
// In all other cases, print Usage
printf("Usage: %s - to dump all known registers\n"
- " %s <name> - to dump named register\n"
- " %s <name> <value> - to set named register\n",
- " %s <signal_type> <samples> <scale> - to audio signal:\n",
- " <signal_type> 0:triangular 1:sinusoid",
- " <samples> nb sample per period",
- " <scale> 0.0 .. 1.0 signal amplitude\n",
- " tsc2102 has to be configured in master mode",
- argv[0], argv[0], argv[0], argv[0]);
-
+ " %s <name> - to dump named register\n"
+ " %s <name> <value> - to set named register\n",
+ " %s <signal_type> <samples> <scale> - to audio signal:\n",
+ " <signal_type> 0:triangular 1:sinusoid",
+ " <samples> nb sample per period",
+ " <scale> 0.0 .. 1.0 signal amplitude\n",
+ " tsc2102 has to be configured in master mode",
+ argv[0], argv[0], argv[0], argv[0]);
+
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-15 14:22:26
|
Revision: 958
http://armadeus.svn.sourceforge.net/armadeus/?rev=958&view=rev
Author: artemys
Date: 2008-12-15 14:22:25 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
[LINUX] Updates Armadeus custom drivers Makefiles with usage of new general Makefile.in
Modified Paths:
--------------
trunk/target/linux/modules/Makefile
trunk/target/linux/modules/backlight/Makefile
trunk/target/linux/modules/fpga/Makefile
trunk/target/linux/modules/fpga/POD/Makefile
trunk/target/linux/modules/fpga/dev_tools/Makefile
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/Makefile
trunk/target/linux/modules/fpga/others/Makefile
trunk/target/linux/modules/fpga/others/Wb_button/Makefile
trunk/target/linux/modules/fpga/others/Wb_led/Makefile
trunk/target/linux/modules/fpga/others/i2ctest/Makefile
trunk/target/linux/modules/fpga/others/led/Makefile
trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile
trunk/target/linux/modules/generic/Makefile
trunk/target/linux/modules/gpio/Makefile
trunk/target/linux/modules/imxlkeypad/Makefile
trunk/target/linux/modules/isp1761/Makefile
trunk/target/linux/modules/max1027/Makefile
trunk/target/linux/modules/pwm/Makefile
Removed Paths:
-------------
trunk/target/linux/modules/generic/.tmp_versions/
Modified: trunk/target/linux/modules/Makefile
===================================================================
--- trunk/target/linux/modules/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -15,14 +15,11 @@
# Part executed when called from standard make in this directory:
-BASE_DIR:=../../../buildroot/
-REL:=$(shell grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed -e 's/BR2_PACKAGE_LINUX_VERSION=//' | sed -e 's/"//g')
-#`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
-# sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR:=$(BASE_DIR)build_arm/linux-$(REL)
+ARMADEUS_BASE_DIR=../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
ifeq ($(LINUX_DIR),)
-LINUX_DIR:=$(ARMADEUS_KERNEL_DIR)
+LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
PWD:= $(shell pwd)
Modified: trunk/target/linux/modules/backlight/Makefile
===================================================================
--- trunk/target/linux/modules/backlight/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/backlight/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -17,11 +17,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/fpga/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -14,14 +14,11 @@
# Part executed when called from standard make in this directory:
-BASE_DIR:=../../../../buildroot/
-REL:=$(shell grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed -e 's/BR2_PACKAGE_LINUX_VERSION=//' | sed -e 's/"//g')
-#`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
-# sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR:=$(BASE_DIR)build_arm/linux-$(REL)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
ifeq ($(LINUX_DIR),)
-LINUX_DIR:=$(ARMADEUS_KERNEL_DIR)
+LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
PWD:= $(shell pwd)
Modified: trunk/target/linux/modules/fpga/POD/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/POD/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/POD/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -14,12 +14,11 @@
# Part executed when called from standard make in this directory:
-BASE_DIR:=../../../../buildroot/
-REL:=$(shell grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | sed -e 's/BR2_PACKAGE_LINUX_VERSION=//' | sed -e 's/"//g')
-#
-ARMADEUS_KERNEL_DIR:=$(BASE_DIR)build_arm/linux-$(REL)
+ARMADEUS_BASE_DIR=../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
ifeq ($(LINUX_DIR),)
-LINUX_DIR:=$(ARMADEUS_KERNEL_DIR)
+LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
PWD:= $(shell pwd)
Modified: trunk/target/linux/modules/fpga/dev_tools/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/dev_tools/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -14,14 +14,11 @@
# Part executed when called from standard make in this directory:
-BASE_DIR:=../../../../buildroot/
-REL:=$(shell grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed -e 's/BR2_PACKAGE_LINUX_VERSION=//' | sed -e 's/"//g')
-#`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
-# sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR:=$(BASE_DIR)build_arm/linux-$(REL)
+ARMADEUS_BASE_DIR=../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
ifeq ($(LINUX_DIR),)
-LINUX_DIR:=$(ARMADEUS_KERNEL_DIR)
+LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
PWD:= $(shell pwd)
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -8,20 +8,17 @@
# dd if=fpga_test.bit of=/dev/fpga/loader
-BASE_DIR="../../../../buildroot/"
-
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm_nofpu/linux-$(REL)
-
ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_FPGA_TOOL_DRIVER) += fpgaloader.o
fpgaloader-objs := target-fpga-loader.o xilinx-fpga-loader.o fpga-loader.o
else
-KDIR := $(ARMADEUS_KERNEL_DIR)
+
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
@@ -30,7 +27,6 @@
clean:
rm -f *.*o \
rm -f Module.symvers
-
endif
Modified: trunk/target/linux/modules/fpga/others/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -14,14 +14,11 @@
# Part executed when called from standard make in this directory:
-BASE_DIR:=../../../../buildroot/
-REL:=$(shell grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed -e 's/BR2_PACKAGE_LINUX_VERSION=//' | sed -e 's/"//g')
-#`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
-# sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR:=$(BASE_DIR)build_arm/linux-$(REL)
+ARMADEUS_BASE_DIR=../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
ifeq ($(LINUX_DIR),)
-LINUX_DIR:=$(ARMADEUS_KERNEL_DIR)
+LINUX_DIR:=$(ARMADEUS_LINUX_DIR)
endif
PWD:= $(shell pwd)
Modified: trunk/target/linux/modules/fpga/others/Wb_button/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/Wb_button/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/Wb_button/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -2,13 +2,6 @@
# Makefile for the Armadeus Wb_button drivers
#
-BASE_DIR="../../../../../buildroot/"
-
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-
ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_BUTTON_DRIVER) += button.o
@@ -18,7 +11,10 @@
else
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/fpga/others/Wb_led/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/Wb_led/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/Wb_led/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -2,13 +2,6 @@
# Makefile for the Armadeus Wb_led drivers
#
-BASE_DIR="../../../../../../buildroot/"
-
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-
ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_LED_DRIVER) += s_led.o g_led.o
@@ -17,7 +10,11 @@
# (preferably use Makefile in parent directory)
else
-KDIR := $(ARMADEUS_KERNEL_DIR)
+
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/fpga/others/i2ctest/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/i2ctest/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/i2ctest/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -13,11 +13,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/fpga/others/led/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/led/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/led/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -13,11 +13,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/fpga/others/ps2keyboard/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -12,11 +12,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm_nofpu/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/generic/Makefile
===================================================================
--- trunk/target/linux/modules/generic/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/generic/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -12,11 +12,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm_nofpu/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/gpio/Makefile
===================================================================
--- trunk/target/linux/modules/gpio/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/gpio/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -15,12 +15,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR)/.config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-BUILD_ARM=`ls $(BASE_DIR) | grep "^build_arm"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_ARM)/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/imxlkeypad/Makefile
===================================================================
--- trunk/target/linux/modules/imxlkeypad/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/imxlkeypad/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -11,12 +11,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-BUILD_ARM=`ls ../../../../buildroot | grep "^build_arm"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_ARM)/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/isp1761/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/isp1761/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -10,14 +10,11 @@
# Part execute when called from standard make in this directory:
else
-BASE_DIR="../../../../buildroot/"
-BUILD_DIR_EXT:=$(shell ls $(BASE_DIR) | grep -e "^project_build_arm*")
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_DIR_EXT)/apf9328/linux-$(REL)
ifeq ($(LINUX_DIR),)
-LINUX_DIR := $(ARMADEUS_KERNEL_DIR)
+LINUX_DIR := $(ARMADEUS_LINUX_DIR)
endif
PWD := $(shell pwd)
Modified: trunk/target/linux/modules/max1027/Makefile
===================================================================
--- trunk/target/linux/modules/max1027/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/max1027/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -11,11 +11,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
Modified: trunk/target/linux/modules/pwm/Makefile
===================================================================
--- trunk/target/linux/modules/pwm/Makefile 2008-12-15 13:29:01 UTC (rev 957)
+++ trunk/target/linux/modules/pwm/Makefile 2008-12-15 14:22:25 UTC (rev 958)
@@ -14,11 +14,10 @@
# (preferably use Makefile in parent directory)
else
-BASE_DIR="../../../../buildroot/"
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm_nofpu/linux-$(REL)
-KDIR := $(ARMADEUS_KERNEL_DIR)
+ARMADEUS_BASE_DIR=../../../..
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+
+KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
default:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-12-15 13:29:04
|
Revision: 957
http://armadeus.svn.sourceforge.net/armadeus/?rev=957&view=rev
Author: FabM
Date: 2008-12-15 13:29:01 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
[BUILDROOT][PACKAGE][MYSQL_CLIENT] Shrink size of mysql_client
Added Paths:
-----------
trunk/patches/061-buildroot-mysql_client.diff
Added: trunk/patches/061-buildroot-mysql_client.diff
===================================================================
--- trunk/patches/061-buildroot-mysql_client.diff (rev 0)
+++ trunk/patches/061-buildroot-mysql_client.diff 2008-12-15 13:29:01 UTC (rev 957)
@@ -0,0 +1,46 @@
+--- /home/fabien/virgin-armadeus/buildroot/package/database/mysql_client/Config.in 2008-12-15 13:18:29.000000000 +0100
++++ buildroot/package/database/mysql_client/Config.in 2008-12-15 11:00:35.000000000 +0100
+@@ -2,3 +2,21 @@ config BR2_PACKAGE_MYSQL_CLIENT
+ bool "MySQL 5.1 client"
+ help
+ MySQL client
++
++if BR2_PACKAGE_MYSQL_CLIENT
++config BR2_PACKAGE_MYSQL_CLIENT_SHRINK
++ bool "MySQL client shrink"
++ help
++ Reduce the size of MySQL package suppressing:
++ usr/mysql-test/
++ usr/sql-bench/
++ usr/bin/mysql_client_test
++ usr/bin/mysql_waitpid
++ usr/bin/myisampack
++ usr/bin/mysqldump
++ usr/bin/mysqltest
++ usr/bin/myisamchk
++ usr/bin/myisam_ftdump
++ usr/bin/myisamlog
++ usr/bin/my_print_defaults
++endif
+--- /home/fabien/virgin-armadeus/buildroot/package/database/mysql_client/mysql_client.mk 2008-12-15 13:18:29.000000000 +0100
++++ buildroot/package/database/mysql_client/mysql_client.mk 2008-12-15 11:05:57.000000000 +0100
+@@ -28,3 +28,19 @@ MYSQL_CLIENT_CONF_OPT = \
+ $(ENABLE_DEBUG)
+
+ $(eval $(call AUTOTARGETS,package/database,mysql_client))
++
++ifeq ($(BR2_PACKAGE_MYSQL_CLIENT_SHRINK),y)
++$(MYSQL_CLIENT_HOOK_POST_INSTALL):
++ rm -rf $(TARGET_DIR)/usr/mysql-test/
++ rm -rf $(TARGET_DIR)/usr/sql-bench/
++ rm -rf $(TARGET_DIR)/usr/bin/mysql_client_test
++ rm -rf $(TARGET_DIR)/usr/bin/mysql_waitpid
++ rm -rf $(TARGET_DIR)/usr/bin/myisampack
++ rm -rf $(TARGET_DIR)/usr/bin/mysqldump
++ rm -rf $(TARGET_DIR)/usr/bin/mysqltest
++ rm -rf $(TARGET_DIR)/usr/bin/myisamchk
++ rm -rf $(TARGET_DIR)/usr/bin/myisam_ftdump
++ rm -rf $(TARGET_DIR)/usr/bin/myisamlog
++ rm -rf $(TARGET_DIR)/usr/bin/my_print_defaults
++ touch $@
++endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|