armadeus-commitlog Mailing List for armadeus (Page 140)
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: <ar...@us...> - 2008-07-25 15:39:10
|
Revision: 856
http://armadeus.svn.sourceforge.net/armadeus/?rev=856&view=rev
Author: artemys
Date: 2008-07-25 15:39:19 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
[LINUX] remove warning in apf9328_lcd_config.h compilation
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-25 15:10:43 UTC (rev 855)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-25 15:39:19 UTC (rev 856)
@@ -2,7 +2,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.23.1.original/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-25 16:13:51.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-25 17:36:46.000000000 +0200
@@ -0,0 +1,558 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
@@ -566,7 +566,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.23.1.original/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 16:17:40.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 17:36:46.000000000 +0200
@@ -0,0 +1,200 @@
+/*
+ *
@@ -605,7 +605,7 @@
+ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
+ else
+ DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
-+#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
++//#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+ // No LCD powerdown yet
+#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
+ if(on) {
@@ -772,7 +772,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.23.1.original/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-25 16:13:51.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-25 17:36:46.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 15:10:43 UTC (rev 855)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 15:39:19 UTC (rev 856)
@@ -35,7 +35,7 @@
DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
else
DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
-#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+//#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
// No LCD powerdown yet
#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
if(on) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-25 15:10:34
|
Revision: 855
http://armadeus.svn.sourceforge.net/armadeus/?rev=855&view=rev
Author: artemys
Date: 2008-07-25 15:10:43 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
[TOOLS] LGPMR renamed LSCR1 in imxregs
Modified Paths:
--------------
trunk/target/linux/debug/imxregs/Makefile
trunk/target/linux/debug/imxregs/imxregs.h
Modified: trunk/target/linux/debug/imxregs/Makefile
===================================================================
--- trunk/target/linux/debug/imxregs/Makefile 2008-07-25 14:42:48 UTC (rev 854)
+++ trunk/target/linux/debug/imxregs/Makefile 2008-07-25 15:10:43 UTC (rev 855)
@@ -1,3 +1,6 @@
+ifeq ($(CC),cc)
+ CC=arm-linux-gcc
+endif
all: imxregs
@@ -2,3 +5,3 @@
imxregs: imxregs.c imxregs.h
- arm-linux-gcc imxregs.c -o $@
+ $(CC) imxregs.c -o $@
Modified: trunk/target/linux/debug/imxregs/imxregs.h
===================================================================
--- trunk/target/linux/debug/imxregs/imxregs.h 2008-07-25 14:42:48 UTC (rev 854)
+++ trunk/target/linux/debug/imxregs/imxregs.h 2008-07-25 15:10:43 UTC (rev 855)
@@ -60,7 +60,7 @@
{ "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" },
+{ "LSCR1", 0x00205028, 0, 0xffffffff, 'x', "Sharp Configuration 1 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" },
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-25 14:42:40
|
Revision: 854
http://armadeus.svn.sourceforge.net/armadeus/?rev=854&view=rev
Author: artemys
Date: 2008-07-25 14:42:48 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
[LINUX] Improve backlight handling for Sharp LQ043
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-25 14:37:51 UTC (rev 853)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-25 14:42:48 UTC (rev 854)
@@ -2,7 +2,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.23.1.original/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-23 14:39:36.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-25 16:13:51.000000000 +0200
@@ -0,0 +1,558 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
@@ -566,8 +566,8 @@
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.23.1.original/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-23 14:39:36.000000000 +0200
-@@ -0,0 +1,199 @@
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 16:17:40.000000000 +0200
+@@ -0,0 +1,200 @@
+/*
+ *
+ * Armadeus LCD configuration file
@@ -592,7 +592,6 @@
+#define SHARP_LQ043_POWER_DOWN 12 /* PD12_ACD_OE line */
+#define CONTRAST_LINE 11 /* PD11_CONTRAST */
+
-+#define BACKLIGHT_ON 0x000000ff
+#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
+
+/*
@@ -629,10 +628,12 @@
+ */
+static void apf9328_lcd_backlight_power(int on)
+{
++ pr_debug("apf9328_lcd_backlight_power: %s\n", on ? "on":"off");
++
+ if(on)
-+ LCDC_PWMR |= BACKLIGHT_ON;
++ LCDC_PWMR |= PWMR_CC_EN;
+ else
-+ LCDC_PWMR &= ~BACKLIGHT_ON;
++ LCDC_PWMR &= ~PWMR_CC_EN;
+}
+
+
@@ -652,7 +653,7 @@
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
+ PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(5),
-+ .pwmr = 0x00000100, // Contrast with PWM @ Line_Pulse, min by default
++ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .backlight_power = apf9328_lcd_backlight_power,
+ .lcd_power = apf9328_lcd_power,
@@ -771,7 +772,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.23.1.original/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-23 14:39:36.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-25 16:13:51.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 14:37:51 UTC (rev 853)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-25 14:42:48 UTC (rev 854)
@@ -22,7 +22,6 @@
#define SHARP_LQ043_POWER_DOWN 12 /* PD12_ACD_OE line */
#define CONTRAST_LINE 11 /* PD11_CONTRAST */
-#define BACKLIGHT_ON 0x000000ff
#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
/*
@@ -59,10 +58,12 @@
*/
static void apf9328_lcd_backlight_power(int on)
{
+ pr_debug("apf9328_lcd_backlight_power: %s\n", on ? "on":"off");
+
if(on)
- LCDC_PWMR |= BACKLIGHT_ON;
+ LCDC_PWMR |= PWMR_CC_EN;
else
- LCDC_PWMR &= ~BACKLIGHT_ON;
+ LCDC_PWMR &= ~PWMR_CC_EN;
}
@@ -82,7 +83,7 @@
.pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(5),
- .pwmr = 0x00000100, // Contrast with PWM @ Line_Pulse, min by default
+ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
.dmacr = DEFAULT_DMA_SETTINGS,
.backlight_power = apf9328_lcd_backlight_power,
.lcd_power = apf9328_lcd_power,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-25 14:37:42
|
Revision: 853
http://armadeus.svn.sourceforge.net/armadeus/?rev=853&view=rev
Author: artemys
Date: 2008-07-25 14:37:51 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
[TOOLS] Improve automatic Linux patch generation tool
Modified Paths:
--------------
trunk/target/linux/Makefile
Modified: trunk/target/linux/Makefile
===================================================================
--- trunk/target/linux/Makefile 2008-07-23 20:57:38 UTC (rev 852)
+++ trunk/target/linux/Makefile 2008-07-25 14:37:51 UTC (rev 853)
@@ -1,53 +1,73 @@
-# To get from Buildroot:
-LINUX_VERSION=2.6.23.1
-TARBALL_DIR=/local/downloads
-BUILD_DIR=../../buildroot/build_arm
+#
+# Get important variables from Buildroot:
+#
+BUILDROOT_DIR=../../buildroot
+include $(BUILDROOT_DIR)/.config
-LINUX_NAME=linux-$(LINUX_VERSION)
-LINUX_ARCHIVE=$(LINUX_NAME).tar.bz2
+LINUX_VERSION:=$(shell echo $(BR2_PACKAGE_LINUX_VERSION))
+TARBALL_DIR:=$(shell echo $(BR2_DL_DIR)) #/local/downloads
+BUILD_DIR=$(BUILDROOT_DIR)/build_arm
+
+
+LINUX_NAME:=linux-$(LINUX_VERSION)
+LINUX_ARCHIVE:=$(LINUX_NAME).tar.bz2
# Working Linux:
-LINUX_DIR=$(BUILD_DIR)/$(LINUX_NAME)
+LINUX_DIR:=$(BUILD_DIR)/$(LINUX_NAME)
# Original Linux:
-LINUX_DIR_TO_DIFF=$(LINUX_DIR).original
+LINUX_DIR_TO_DIFF:=$(LINUX_DIR).original
-PATCH_DIR=../../buildroot/target/device/armadeus/linux/kernel-patches/$(LINUX_VERSION)
+PATCH_DIR:=../../buildroot/target/device/armadeus/linux/kernel-patches/$(LINUX_VERSION)
TMP_DIR=./tmp
PATCH_CMD=./generate_patch.sh
CLEAN_PATCH_CMD=sed --in-place "s,$(LINUX_DIR),$(LINUX_NAME)," $@ && sed --in-place=.bak "s,\.\./linux/,$(LINUX_NAME).mod/," $@
-START_CMD=echo "*** Generating patch: $@"
+START_CMD=echo "*** Generating patch: $@"; mkdir -p ./tmp
-### ALSA Patches:
+GENERATE_PATCH_FROM_SINGLE_DEPEND=$(PATCH_CMD) $(LINUX_DIR_TO_DIFF)/$< ../linux/$< $@; echo " adding $<"
+GENERATE_PATCH_FROM_MULTIPLE_DEPENDS=rm -f $@; for file in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$file ../linux/$$file $@; echo " adding $$file"; done
-$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff: include/asm-arm/arch-imx/imx-alsa.h
+
+### ALSA Patches: ---
+
+DEP1=include/asm-arm/arch-imx/imx-alsa.h
+TARGET1:=$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff
+$(TARGET1): $(DEP1)
@$(START_CMD)
- $(PATCH_CMD) $(LINUX_DIR_TO_DIFF)/$< ../linux/$< $@
- $(CLEAN_PATCH_CMD)
+ @$(GENERATE_PATCH_FROM_SINGLE_DEPEND)
+ @$(CLEAN_PATCH_CMD)
@echo
-PATCHES+=$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff
+PATCHES+=$(TARGET1)
+FILES+=$(DEP1)
-$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff: sound/arm/imx-alsa.c sound/arm/imx-alsa-dma.h sound/arm/imx-alsa-tsc2102.c sound/arm/imx-alsa-tsc2102.h sound/arm/imx-alsa-tsc2102-mixer.c
+DEP2=sound/arm/imx-alsa.c sound/arm/imx-alsa-dma.h sound/arm/imx-alsa-tsc2102.c sound/arm/imx-alsa-tsc2102.h sound/arm/imx-alsa-tsc2102-mixer.c
+TARGET2:=$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff
+$(TARGET2): $(DEP2)
@$(START_CMD)
- for patch in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$patch ../linux/$$patch $@; done
- $(CLEAN_PATCH_CMD)
+ @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
+ @$(CLEAN_PATCH_CMD)
@echo
-PATCHES+=$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff
+PATCHES+=$(TARGET2)
+FILES+=$(DEP2)
-### APF9328 Patches:
-$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff: arch/arm/mach-imx/apf9328.c arch/arm/mach-imx/apf9328_lcd_config.h include/asm-arm/arch-imx/apf9328.h
+### APF9328 Patches: ---
+
+DEP3=arch/arm/mach-imx/apf9328.c arch/arm/mach-imx/apf9328_lcd_config.h include/asm-arm/arch-imx/apf9328.h
+TARGET3:=$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff
+$(TARGET3): $(DEP3)
@$(START_CMD)
- for patch in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$patch ../linux/$$patch $@; done
- $(CLEAN_PATCH_CMD)
+ @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
+ @$(CLEAN_PATCH_CMD)
@echo
-PATCHES+=$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff
+PATCHES+=$(TARGET3)
+FILES+=$(DEP3)
-### Other Patches:
+### Other Patches: ---
-### Patches generation:
+### Patches generation: ---
-.PHONY: clean all help
+.PHONY: clean all help show import patch patch_install
$(LINUX_DIR_TO_DIFF)/.unpacked:
@echo "***Installing original kernel in $(BUILD_DIR)"
@@ -55,23 +75,37 @@
tar jxf $(TARBALL_DIR)/$(LINUX_ARCHIVE) -C $(BUILD_DIR)/
mv $(LINUX_DIR) $(LINUX_DIR_TO_DIFF)
mv $(LINUX_DIR).modified $(LINUX_DIR)
- touch $@
+ @touch $@
patch: $(LINUX_DIR_TO_DIFF)/.unpacked $(PATCHES)
- mkdir -p ./tmp
patch_install: patch
- echo $(PATCHES)
- cp -a $(PATCHES) $(PATCH_DIR)/
+ @cp -a $(PATCHES) $(PATCH_DIR)/
+ @echo "Patches installed, you can check the diff in $(PATCH_DIR)/"
+ @echo " please don't commit only timestamp changes !"
+show:
+ @echo "Linux kernel files ($(LINUX_VERSION)) from which I can generate patch:"
+ @for file in $(FILES); do echo " $$file"; done
+ @echo "\nNames of the patches I will generate:"
+ @for patch in $(PATCHES); do echo " $$patch"; done
+
+import:
+ @for file in $(FILES); do cp $(LINUX_DIR)/$$file $$file; done
+ @echo "Import done, check your modifications with svn status -q"
+
help:
@echo "make [patch|patch_install|clean|help]"
- @echo " help: this help"
- @echo " patch: generate all patches in $(TMP_DIR) directory"
- @echo " patch_install: install patch in $(PATCH_DIR)"
+ @echo " help ............ this help"
+ @echo " show ............ list handled kernel files and generated patches name"
+ @echo " import .......... import files we handle here from current kernel"
+ @echo " patch ........... generate all patches in $(TMP_DIR) directory"
+ @echo " patch_install ... install generated patches in $(PATCH_DIR)"
all: patch
clean:
- rm -f $(TMP_DIR)/*
-
+ $(MAKE) clean -C modules
+# rm -f $(TMP_DIR)/* humm... not a good idea to clean patches otherwise will be regenerated
+# with new timestamp even if no changes where made to the files...
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-23 20:57:29
|
Revision: 852
http://armadeus.svn.sourceforge.net/armadeus/?rev=852&view=rev
Author: artemys
Date: 2008-07-23 20:57:38 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
[LINUX] Add first version (without IT) of OpenCore 16550 serial IP driver
Modified Paths:
--------------
trunk/target/linux/modules/Makefile
trunk/target/linux/modules/fpga/Kconfig
Added Paths:
-----------
trunk/target/linux/modules/fpga/serial/
trunk/target/linux/modules/fpga/serial/16550.c
trunk/target/linux/modules/fpga/serial/Kconfig
trunk/target/linux/modules/fpga/serial/Makefile
trunk/target/linux/modules/fpga/serial/README
Modified: trunk/target/linux/modules/Makefile
===================================================================
--- trunk/target/linux/modules/Makefile 2008-07-23 12:51:25 UTC (rev 851)
+++ trunk/target/linux/modules/Makefile 2008-07-23 20:57:38 UTC (rev 852)
@@ -4,16 +4,18 @@
# Add your subdirectories to obj- target
#
-# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
+# Part executed when called from kernel build system:
+
obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ pwm/ backlight/ isp1761/ \
fpga/ps2keyboard/ imxlkeypad/ fpga/fpga_devtools/ fpga/Wb_led/ fpga/Wb_button/ \
- fpga/i2ctest/ fpga/fpgaaccess/
+ fpga/i2ctest/ fpga/fpgaaccess/ fpga/serial/
-# Part execute when called from standard make in this directory:
else
+# 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')
Modified: trunk/target/linux/modules/fpga/Kconfig
===================================================================
--- trunk/target/linux/modules/fpga/Kconfig 2008-07-23 12:51:25 UTC (rev 851)
+++ trunk/target/linux/modules/fpga/Kconfig 2008-07-23 20:57:38 UTC (rev 852)
@@ -23,5 +23,7 @@
source "drivers/armadeus/fpga/fpgaaccess/Kconfig"
+source "drivers/armadeus/fpga/serial/Kconfig"
+
endmenu
Added: trunk/target/linux/modules/fpga/serial/16550.c
===================================================================
--- trunk/target/linux/modules/fpga/serial/16550.c (rev 0)
+++ trunk/target/linux/modules/fpga/serial/16550.c 2008-07-23 20:57:38 UTC (rev 852)
@@ -0,0 +1,78 @@
+/*
+ * Initialisation Driver for OpenCore 16550 serial IP
+ * loaded in FPGA of the Armadeus boards.
+ *
+ * (C) Copyright 2008 Armadeus Systems
+ * Author: Julien Boibessot <jul...@ar...>
+ *
+ * Inspired from Au1x00 Init from Pantelis Antoniou
+ *
+ * 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.
+ */
+
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <linux/module.h>
+#include <linux/serial_core.h>
+#include <linux/serial_8250.h>
+#include <linux/types.h>
+
+#include <asm/io.h> // readb()
+
+
+#define PORT(_base, _phys, _clock, _irq) \
+ { \
+ .membase = (void __iomem *)_base, \
+ .mapbase = _phys, \
+ .irq = _irq, \
+ .uartclk = _clock, \
+ .regshift = 1, \
+ .iotype = UPIO_MEM, \
+ .flags = UPF_BOOT_AUTOCONF \
+ }
+
+
+/* POD specific part */
+#define UART_INPUT_CLOCK 96000000
+#define UART1_BASE 0x10
+#define UART2_BASE 0x20
+#define UART1_IRQ APF9328_FPGA_IRQ
+#define UART2_IRQ APF9328_FPGA_IRQ
+/* End of POD specific part */
+
+
+static struct plat_serial8250_port ocore_16550_data[] = {
+ PORT( APF9328_FPGA_VIRT+UART1_BASE, APF9328_FPGA_PHYS+UART1_BASE, UART_INPUT_CLOCK, UART1_IRQ ),
+ PORT( APF9328_FPGA_VIRT+UART2_BASE, APF9328_FPGA_PHYS+UART2_BASE, UART_INPUT_CLOCK, UART2_IRQ ),
+ { },
+};
+
+static struct platform_device ocore_16550_device = {
+ .name = "serial8250", /* we use generic 8250/16550 Linux layer */
+ .id = PLAT8250_DEV_PLATFORM1,
+ .dev = {
+ .platform_data = ocore_16550_data,
+ },
+};
+
+static int __init ocore_16550_init(void)
+{
+ return platform_device_register( &ocore_16550_device );
+}
+
+static void __exit ocore_16550_exit(void)
+{
+ platform_device_unregister( &ocore_16550_device );
+}
+
+module_init(ocore_16550_init);
+module_exit(ocore_16550_exit);
+
+MODULE_AUTHOR("Julien Boibessot, <jul...@ar...>");
+MODULE_DESCRIPTION("8250 Linux layer registration module for 16550 OpenCore IP in Armadeus FPGA");
+MODULE_LICENSE("GPL");
Added: trunk/target/linux/modules/fpga/serial/Kconfig
===================================================================
--- trunk/target/linux/modules/fpga/serial/Kconfig (rev 0)
+++ trunk/target/linux/modules/fpga/serial/Kconfig 2008-07-23 20:57:38 UTC (rev 852)
@@ -0,0 +1,12 @@
+#
+#
+
+config ARMADEUS_FPGA_16550_OCORE
+ tristate "OpenCore 16550 serial IP driver"
+ default n
+ depends on ARMADEUS_FPGA_DRIVERS
+ ---help---
+ If you have the corresponding IP loaded in the FPGA then this
+ driver will allow you to use it by registering the serial ports
+ to the Linux 8250 serial layer.
+
Added: trunk/target/linux/modules/fpga/serial/Makefile
===================================================================
--- trunk/target/linux/modules/fpga/serial/Makefile (rev 0)
+++ trunk/target/linux/modules/fpga/serial/Makefile 2008-07-23 20:57:38 UTC (rev 852)
@@ -0,0 +1,35 @@
+#
+# Makefile for the Armadeus FPGA serial "driver" (compatible with 16550/8250 OpenCore IP)
+#
+
+ifneq ($(KERNELRELEASE),)
+
+# Part executed when called from kernel build system:
+
+obj-$(CONFIG_ARMADEUS_FPGA_16550_OCORE) += 16550_ocore.o
+16550_ocore-objs := 16550.o
+
+else
+
+# Part executed when called from standard make in this directory:
+# (preferably use Makefile in parent directory)
+
+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)
+PWD := $(shell pwd)
+
+default:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+clean:
+ rm -f *.*o
+ rm -f Module.symvers
+ rm -rf .*.cmd
+ rm -f *.mod.c
+
+endif
+
Property changes on: trunk/target/linux/modules/fpga/serial/Makefile
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/target/linux/modules/fpga/serial/README
===================================================================
--- trunk/target/linux/modules/fpga/serial/README (rev 0)
+++ trunk/target/linux/modules/fpga/serial/README 2008-07-23 20:57:38 UTC (rev 852)
@@ -0,0 +1,8 @@
+To compile this driver from here:
+---------------------------------
+ make ARCH=arm CROSS_COMPILE=$PWD/../../../../../buildroot/build_arm/staging_dir/bin/arm-linux-
+
+To install this driver:
+-----------------------
+Copy resulting *.ko files on your target rootfs
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-23 12:51:16
|
Revision: 851
http://armadeus.svn.sourceforge.net/armadeus/?rev=851&view=rev
Author: artemys
Date: 2008-07-23 12:51:25 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
[LINUX] Cleanup apf9328_init() + remove unneeded request_mem_region(IMX_CS1_PHYS)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/target/linux/arch/arm/mach-imx/apf9328.c
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-23 12:42:22 UTC (rev 850)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-23 12:51:25 UTC (rev 851)
@@ -2,8 +2,8 @@
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.23.1.original/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-22 11:04:04.000000000 +0200
-@@ -0,0 +1,567 @@
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-23 14:39:36.000000000 +0200
+@@ -0,0 +1,558 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -484,42 +484,33 @@
+{
+ printk("--- Registering APF9328 ressources\n");
+
-+ // Serial
-+ /*UFCR(IMX_UART1_BASE) = 0xa81; To be removed
-+ UFCR(IMX_UART2_BASE) = 0xa81;*/
-+ // LCD
-+#ifdef CONFIG_FB_IMX
++#ifdef CONFIG_FB_IMX /* LCD */
+ set_imx_fb_info(&apf9328_fb_info);
-+ printk("Set apf9328_fb_info\n");
-+ // init PORTD ....//
-+ imx_fb_set_gpios();
-+#endif // CONFIG_FB_IMX
++ imx_fb_set_gpios(); /* init PORTD ....*/
++#endif
+
+#ifdef CONFIG_SENSORS_MAX1027
+ max1027_init_cs();
-+#endif //CONFIG_SENSORS_MAX1027
++#endif
+#ifdef CONFIG_SPI_TSC2102
+ tsc2102_init_gpio();
-+#endif // CONFIG_SPI_TSC2102
++#endif
+#ifdef CONFIG_CAN_MCP251X
+ mcp251X_init_gpio();
-+#endif // CONFIG_CAN_MCP251X
++#endif
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
++
+#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+#endif
+
-+#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
-+ request_mem_region(IMX_CS1_PHYS,IMX_CS1_SIZE,"FPGA");
-+#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
-+
+ printk("--- APF9328 ressources registered\n");
+}
+
+/*
+ * Register here the memory addresses we want to access from our drivers and
-+ * which are not already registerd in generic.c
++ * which are not already registered in generic.c
+ */
+static struct map_desc apf9328_io_desc[] __initdata = {
+#ifdef CONFIG_FB_IMX
@@ -575,7 +566,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.23.1.original/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-22 10:33:25.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-23 14:39:36.000000000 +0200
@@ -0,0 +1,199 @@
+/*
+ *
@@ -780,7 +771,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.23.1.original/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-22 10:33:25.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-23 14:39:36.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/target/linux/arch/arm/mach-imx/apf9328.c
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328.c 2008-07-23 12:42:22 UTC (rev 850)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328.c 2008-07-23 12:51:25 UTC (rev 851)
@@ -478,42 +478,33 @@
{
printk("--- Registering APF9328 ressources\n");
- // Serial
- /*UFCR(IMX_UART1_BASE) = 0xa81; To be removed
- UFCR(IMX_UART2_BASE) = 0xa81;*/
- // LCD
-#ifdef CONFIG_FB_IMX
+#ifdef CONFIG_FB_IMX /* LCD */
set_imx_fb_info(&apf9328_fb_info);
- printk("Set apf9328_fb_info\n");
- // init PORTD ....//
- imx_fb_set_gpios();
-#endif // CONFIG_FB_IMX
+ imx_fb_set_gpios(); /* init PORTD ....*/
+#endif
#ifdef CONFIG_SENSORS_MAX1027
max1027_init_cs();
-#endif //CONFIG_SENSORS_MAX1027
+#endif
#ifdef CONFIG_SPI_TSC2102
tsc2102_init_gpio();
-#endif // CONFIG_SPI_TSC2102
+#endif
#ifdef CONFIG_CAN_MCP251X
mcp251X_init_gpio();
-#endif // CONFIG_CAN_MCP251X
+#endif
platform_add_devices(devices, ARRAY_SIZE(devices));
+
#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
#endif
-#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
- request_mem_region(IMX_CS1_PHYS,IMX_CS1_SIZE,"FPGA");
-#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
-
printk("--- APF9328 ressources registered\n");
}
/*
* Register here the memory addresses we want to access from our drivers and
- * which are not already registerd in generic.c
+ * which are not already registered in generic.c
*/
static struct map_desc apf9328_io_desc[] __initdata = {
#ifdef CONFIG_FB_IMX
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-23 12:42:14
|
Revision: 850
http://armadeus.svn.sourceforge.net/armadeus/?rev=850&view=rev
Author: artemys
Date: 2008-07-23 12:42:22 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
[LINUX] Update some 2.6.23.1 patches with new automatically built warning
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff 2008-07-23 10:10:00 UTC (rev 849)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff 2008-07-23 12:42:22 UTC (rev 850)
@@ -1,8 +1,8 @@
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/include/asm-arm/arch-imx/imx-alsa.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/imx-alsa.h 2008-07-18 11:51:12.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/imx-alsa.h 2008-07-22 10:33:24.000000000 +0200
@@ -0,0 +1,131 @@
+/*
+ * linux/include/asm-arm/arch-imx/imx-alsa.h
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff 2008-07-23 10:10:00 UTC (rev 849)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff 2008-07-23 12:42:22 UTC (rev 850)
@@ -1,8 +1,8 @@
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/sound/arm/imx-alsa.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/sound/arm/imx-alsa.c 2008-07-18 15:10:45.000000000 +0200
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa.c 2008-07-22 10:33:25.000000000 +0200
@@ -0,0 +1,683 @@
+/*
+ * sound/arm/imx-alsa.c
@@ -689,9 +689,9 @@
+
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/sound/arm/imx-alsa-dma.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/sound/arm/imx-alsa-dma.h 2008-07-18 15:11:05.000000000 +0200
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-dma.h 2008-07-22 10:33:25.000000000 +0200
@@ -0,0 +1,50 @@
+/*
+ * linux/sound/arm/imx/imx-alsa-dma.h
@@ -745,9 +745,9 @@
+
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.c 2008-07-18 15:11:34.000000000 +0200
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.c 2008-07-22 10:33:25.000000000 +0200
@@ -0,0 +1,345 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.c
@@ -1096,9 +1096,9 @@
+
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.h 2008-07-18 15:11:51.000000000 +0200
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.h 2008-07-22 10:33:25.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.h
@@ -1148,9 +1148,9 @@
+
PATCH AUTOMATICALLY GENERATED
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory)
+(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102-mixer.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102-mixer.c 2008-07-18 15:12:06.000000000 +0200
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102-mixer.c 2008-07-22 10:33:25.000000000 +0200
@@ -0,0 +1,288 @@
+/*
+ * sound/arm/imx-alsa-tsc2102-mixer.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-23 10:09:53
|
Revision: 849
http://armadeus.svn.sourceforge.net/armadeus/?rev=849&view=rev
Author: artemys
Date: 2008-07-23 10:10:00 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
[BUILDROOT] Correct Bug [ 1981233 ] file_4.21.orig.tar.gz no more downloadable
Added Paths:
-----------
trunk/patches/044-buildroot-change-file-package-mirror.diff
Added: trunk/patches/044-buildroot-change-file-package-mirror.diff
===================================================================
--- trunk/patches/044-buildroot-change-file-package-mirror.diff (rev 0)
+++ trunk/patches/044-buildroot-change-file-package-mirror.diff 2008-07-23 10:10:00 UTC (rev 849)
@@ -0,0 +1,11 @@
+--- buildroot/package/file/file.mk.org 2008-07-23 12:04:45.000000000 +0200
++++ buildroot/package/file/file.mk 2008-07-23 12:05:24.000000000 +0200
+@@ -5,7 +5,7 @@
+ #############################################################
+ FILE_VERSION:=4.21
+ FILE_SOURCE:=file_$(FILE_VERSION).orig.tar.gz
+-FILE_SITE:=http://ftp.debian.org/debian/pool/main/f/file
++FILE_SITE:=http://buildroot.uclibc.org/downloads/buildroot-sources
+ FILE_SOURCE_DIR:=$(BUILD_DIR)/file-$(FILE_VERSION)
+ FILE_DIR1:=$(TOOL_BUILD_DIR)/file-$(FILE_VERSION)-host
+ FILE_DIR2:=$(BUILD_DIR)/file-$(FILE_VERSION)-target
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-23 09:59:14
|
Revision: 848
http://armadeus.svn.sourceforge.net/armadeus/?rev=848&view=rev
Author: artemys
Date: 2008-07-23 09:59:22 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
[BUILDROOT] Change setserial download mirror
Added Paths:
-----------
trunk/patches/043-buildroot-change-setserial-mirror.diff
Added: trunk/patches/043-buildroot-change-setserial-mirror.diff
===================================================================
--- trunk/patches/043-buildroot-change-setserial-mirror.diff (rev 0)
+++ trunk/patches/043-buildroot-change-setserial-mirror.diff 2008-07-23 09:59:22 UTC (rev 848)
@@ -0,0 +1,13 @@
+Index: package/setserial/setserial.mk
+===================================================================
+--- buildroot.org/package/setserial/setserial.mk (révision 22865)
++++ buildroot/package/setserial/setserial.mk (copie de travail)
+@@ -7,7 +7,7 @@
+ SETSERIAL_PATCH_VERSION:=-44
+ #SETSERIAL_PATCH_FILE:=
+ SETSERIAL_SOURCE:=setserial_$(SETSERIAL_VERSION)$(SETSERIAL_PATCH_VERSION).tar.gz
+-SETSERIAL_SITE:=http://ftp.debian.org/debian/pool/main/s/setserial/
++SETSERIAL_SITE:=http://security.ubuntu.com/ubuntu/pool/main/s/setserial/
+ SETSERIAL_DIR:=$(BUILD_DIR)/setserial-$(SETSERIAL_VERSION)
+ SETSERIAL_BINARY:=setserial
+ SETSERIAL_TARGET_BINARY:=usr/bin/setserial
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-22 09:09:47
|
Revision: 847
http://armadeus.svn.sourceforge.net/armadeus/?rev=847&view=rev
Author: artemys
Date: 2008-07-22 09:09:55 +0000 (Tue, 22 Jul 2008)
Log Message:
-----------
[LINUX] Add APF9328 FPGA interrupt definition to apf9328.h & apf9328.c + little cleanup
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/target/linux/arch/arm/mach-imx/apf9328.c
trunk/target/linux/include/asm-arm/arch-imx/apf9328.h
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-21 17:56:15 UTC (rev 846)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-22 09:09:55 UTC (rev 847)
@@ -1,6 +1,9 @@
---- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328.c 2008-04-01 16:15:37.000000000 +0200
-@@ -0,0 +1,570 @@
+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.23.1.original/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c 2008-07-22 11:04:04.000000000 +0200
+@@ -0,0 +1,567 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -393,7 +396,7 @@
+ .transceiver_enable = NULL,
+};
+
-+#endif
++#endif // CONFIG_CAN_MCP251X
+
+
+static struct spi_board_info spi_board_info[] __initdata = {
@@ -541,23 +544,20 @@
+{
+ // Init generic IRQs
+ imx_init_irq();
++
+ // Init our custom IRQs
-+ set_irq_type(APF9328_UART1_IRQ, IRQF_TRIGGER_FALLING);
+#ifdef CONFIG_DM9000
+ set_irq_type(APF9328_ETH_IRQ, IRQF_TRIGGER_FALLING);
-+#endif // CONFIG_DM9000
++#endif
+#ifdef CONFIG_SPI_TSC2102
+ set_irq_type( IRQ_GPIOD(TSC2102_INT_GPIOD), IRQF_TRIGGER_FALLING );
-+#endif // CONFIG_SPI_TSC2102
++#endif
+#ifdef CONFIG_CAN_MCP251X
+ set_irq_type( IRQ_GPIOC(CAN_MPC251X_INT_GPIOC), IRQF_TRIGGER_FALLING );
-+#endif // CONFIG_CAN_MCP251X
-+
++#endif
+#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
-+#define FPGA_INT_GPIOA 1
-+ set_irq_type(IRQ_GPIOA(FPGA_INT_GPIOA),IRQF_TRIGGER_RISING);
-+#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
-+
++ set_irq_type( APF9328_FPGA_IRQ, IRQF_TRIGGER_RISING );
++#endif
+}
+
+
@@ -571,9 +571,12 @@
+ .timer = &imx_timer,
+ .init_machine = apf9328_init,
+MACHINE_END
---- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2007-01-07 21:40:59.000000000 +0100
-@@ -0,0 +1,189 @@
+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.23.1.original/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-22 10:33:25.000000000 +0200
+@@ -0,0 +1,199 @@
+/*
+ *
+ * Armadeus LCD configuration file
@@ -601,6 +604,9 @@
+#define BACKLIGHT_ON 0x000000ff
+#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
+
++/*
++ * Power on/off LCD's internal logic
++ */
+static void apf9328_lcd_power(int on)
+{
+ pr_debug("apf9328_lcd_power: %s\n", on ? "on":"off");
@@ -613,7 +619,7 @@
+ // No LCD powerdown yet
+#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
+ if(on) {
-+ mdelay(200); // at least ten frames have to be processed before
++ mdelay(200); // at least ten frames have to be processed before
+ // enabling the display
+ DR(LCD_PORT) |= (1 << SHARP_LQ043_POWER_DOWN);
+ }
@@ -627,6 +633,9 @@
+#endif // CONFIG_FB_IMX_OPTREX_F51900_CSTN
+}
+
++/*
++ * Power on/off LCD's backlight
++ */
+static void apf9328_lcd_backlight_power(int on)
+{
+ if(on)
@@ -635,6 +644,7 @@
+ LCDC_PWMR &= ~BACKLIGHT_ON;
+}
+
++
+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
@@ -739,6 +749,9 @@
+#error Please define a imxfb_mach_info structure with your LCD parameters here
+#endif
+
++/*
++ * Configure custom GPIOs needed by LCDs
++ */
+static void imx_fb_set_gpios(void)
+{
+
@@ -763,9 +776,12 @@
+#endif // CONFIG_FB_IMX
+
+#endif // APF9328_LCD_CONFIG_H
---- ref/linux-2.6.23.1/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1/include/asm-arm/arch-imx/apf9328.h 2006-10-07 20:09:07.000000000 +0200
-@@ -0,0 +1,60 @@
+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.23.1.original/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h 2008-07-22 10:33:25.000000000 +0200
+@@ -0,0 +1,54 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
@@ -794,14 +810,6 @@
+/* Memory Map for the APF9328 Board */
+/* ------------------------------------------------------------------------ */
+
-+// Serial ports
-+#define APF9328_UART1_VIRT ( IMX_CS3_VIRT + 0x30000 )
-+#define APF9328_UART1_PHYS ( IMX_CS3_PHYS + 0x30000 )
-+#define APF9328_UART1_IRQ ( IRQ_GPIOA(1) )
-+#define APF9328_UART2_VIRT ( IMX_CS3_VIRT + 0x10000 )
-+#define APF9328_UART2_PHYS ( IMX_CS3_PHYS + 0x10000 )
-+#define APF9328_UART2_IRQ ( IRQ_GPIOA(1) )
-+
+// Ethernet
+#define APF9328_ETH_VIRT ( IMX_CS4_VIRT + 0x00C00000 )
+#define APF9328_ETH_PHYS ( IMX_CS4_PHYS + 0x00C00000 )
@@ -821,7 +829,9 @@
+// Usefull ?
+
+// FPGA
-+// TBDL
++#define APF9328_FPGA_VIRT ( IMX_CS1_VIRT )
++#define APF9328_FPGA_PHYS ( IMX_CS1_PHYS )
++#define APF9328_FPGA_IRQ ( IRQ_GPIOA(1) )
+
+#define CLK32 32768
+
Modified: trunk/target/linux/arch/arm/mach-imx/apf9328.c
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328.c 2008-07-21 17:56:15 UTC (rev 846)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328.c 2008-07-22 09:09:55 UTC (rev 847)
@@ -390,7 +390,7 @@
.transceiver_enable = NULL,
};
-#endif
+#endif // CONFIG_CAN_MCP251X
static struct spi_board_info spi_board_info[] __initdata = {
@@ -538,23 +538,20 @@
{
// Init generic IRQs
imx_init_irq();
+
// Init our custom IRQs
- set_irq_type(APF9328_UART1_IRQ, IRQF_TRIGGER_FALLING);
#ifdef CONFIG_DM9000
set_irq_type(APF9328_ETH_IRQ, IRQF_TRIGGER_FALLING);
-#endif // CONFIG_DM9000
+#endif
#ifdef CONFIG_SPI_TSC2102
set_irq_type( IRQ_GPIOD(TSC2102_INT_GPIOD), IRQF_TRIGGER_FALLING );
-#endif // CONFIG_SPI_TSC2102
+#endif
#ifdef CONFIG_CAN_MCP251X
set_irq_type( IRQ_GPIOC(CAN_MPC251X_INT_GPIOC), IRQF_TRIGGER_FALLING );
-#endif // CONFIG_CAN_MCP251X
-
+#endif
#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
-#define FPGA_INT_GPIOA 1
- set_irq_type(IRQ_GPIOA(FPGA_INT_GPIOA),IRQF_TRIGGER_RISING);
-#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
-
+ set_irq_type( APF9328_FPGA_IRQ, IRQF_TRIGGER_RISING );
+#endif
}
Modified: trunk/target/linux/include/asm-arm/arch-imx/apf9328.h
===================================================================
--- trunk/target/linux/include/asm-arm/arch-imx/apf9328.h 2008-07-21 17:56:15 UTC (rev 846)
+++ trunk/target/linux/include/asm-arm/arch-imx/apf9328.h 2008-07-22 09:09:55 UTC (rev 847)
@@ -26,14 +26,6 @@
/* Memory Map for the APF9328 Board */
/* ------------------------------------------------------------------------ */
-// Serial ports
-#define APF9328_UART1_VIRT ( IMX_CS3_VIRT + 0x30000 )
-#define APF9328_UART1_PHYS ( IMX_CS3_PHYS + 0x30000 )
-#define APF9328_UART1_IRQ ( IRQ_GPIOA(1) )
-#define APF9328_UART2_VIRT ( IMX_CS3_VIRT + 0x10000 )
-#define APF9328_UART2_PHYS ( IMX_CS3_PHYS + 0x10000 )
-#define APF9328_UART2_IRQ ( IRQ_GPIOA(1) )
-
// Ethernet
#define APF9328_ETH_VIRT ( IMX_CS4_VIRT + 0x00C00000 )
#define APF9328_ETH_PHYS ( IMX_CS4_PHYS + 0x00C00000 )
@@ -53,7 +45,9 @@
// Usefull ?
// FPGA
-// TBDL
+#define APF9328_FPGA_VIRT ( IMX_CS1_VIRT )
+#define APF9328_FPGA_PHYS ( IMX_CS1_PHYS )
+#define APF9328_FPGA_IRQ ( IRQ_GPIOA(1) )
#define CLK32 32768
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-21 17:56:07
|
Revision: 846
http://armadeus.svn.sourceforge.net/armadeus/?rev=846&view=rev
Author: artemys
Date: 2008-07-21 17:56:15 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[LINUX] Add very first stage of tools to easily manage our Linux kernel patches generation/maintenance
Added Paths:
-----------
trunk/target/linux/Makefile
trunk/target/linux/arch/
trunk/target/linux/arch/arm/
trunk/target/linux/arch/arm/mach-imx/
trunk/target/linux/arch/arm/mach-imx/apf9328.c
trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
trunk/target/linux/generate_patch.sh
trunk/target/linux/include/
trunk/target/linux/include/asm-arm/
trunk/target/linux/include/asm-arm/arch-imx/
trunk/target/linux/include/asm-arm/arch-imx/apf9328.h
trunk/target/linux/include/asm-arm/arch-imx/imx-alsa.h
trunk/target/linux/sound/
trunk/target/linux/sound/arm/
trunk/target/linux/sound/arm/imx-alsa-dma.h
trunk/target/linux/sound/arm/imx-alsa-tsc2102-mixer.c
trunk/target/linux/sound/arm/imx-alsa-tsc2102.c
trunk/target/linux/sound/arm/imx-alsa-tsc2102.h
trunk/target/linux/sound/arm/imx-alsa.c
Added: trunk/target/linux/Makefile
===================================================================
--- trunk/target/linux/Makefile (rev 0)
+++ trunk/target/linux/Makefile 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,77 @@
+# To get from Buildroot:
+LINUX_VERSION=2.6.23.1
+TARBALL_DIR=/local/downloads
+BUILD_DIR=../../buildroot/build_arm
+
+LINUX_NAME=linux-$(LINUX_VERSION)
+LINUX_ARCHIVE=$(LINUX_NAME).tar.bz2
+# Working Linux:
+LINUX_DIR=$(BUILD_DIR)/$(LINUX_NAME)
+# Original Linux:
+LINUX_DIR_TO_DIFF=$(LINUX_DIR).original
+
+PATCH_DIR=../../buildroot/target/device/armadeus/linux/kernel-patches/$(LINUX_VERSION)
+TMP_DIR=./tmp
+PATCH_CMD=./generate_patch.sh
+CLEAN_PATCH_CMD=sed --in-place "s,$(LINUX_DIR),$(LINUX_NAME)," $@ && sed --in-place=.bak "s,\.\./linux/,$(LINUX_NAME).mod/," $@
+START_CMD=echo "*** Generating patch: $@"
+
+### ALSA Patches:
+
+$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff: include/asm-arm/arch-imx/imx-alsa.h
+ @$(START_CMD)
+ $(PATCH_CMD) $(LINUX_DIR_TO_DIFF)/$< ../linux/$< $@
+ $(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff
+
+$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff: sound/arm/imx-alsa.c sound/arm/imx-alsa-dma.h sound/arm/imx-alsa-tsc2102.c sound/arm/imx-alsa-tsc2102.h sound/arm/imx-alsa-tsc2102-mixer.c
+ @$(START_CMD)
+ for patch in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$patch ../linux/$$patch $@; done
+ $(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff
+
+
+### APF9328 Patches:
+$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff: arch/arm/mach-imx/apf9328.c arch/arm/mach-imx/apf9328_lcd_config.h include/asm-arm/arch-imx/apf9328.h
+ @$(START_CMD)
+ for patch in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$patch ../linux/$$patch $@; done
+ $(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff
+
+
+### Other Patches:
+
+
+### Patches generation:
+
+.PHONY: clean all help
+
+$(LINUX_DIR_TO_DIFF)/.unpacked:
+ @echo "***Installing original kernel in $(BUILD_DIR)"
+ mv $(LINUX_DIR) $(LINUX_DIR).modified
+ tar jxf $(TARBALL_DIR)/$(LINUX_ARCHIVE) -C $(BUILD_DIR)/
+ mv $(LINUX_DIR) $(LINUX_DIR_TO_DIFF)
+ mv $(LINUX_DIR).modified $(LINUX_DIR)
+ touch $@
+
+patch: $(LINUX_DIR_TO_DIFF)/.unpacked $(PATCHES)
+ mkdir -p ./tmp
+
+patch_install: patch
+ echo $(PATCHES)
+ cp -a $(PATCHES) $(PATCH_DIR)/
+
+help:
+ @echo "make [patch|patch_install|clean|help]"
+ @echo " help: this help"
+ @echo " patch: generate all patches in $(TMP_DIR) directory"
+ @echo " patch_install: install patch in $(PATCH_DIR)"
+
+all: patch
+
+clean:
+ rm -f $(TMP_DIR)/*
+
Added: trunk/target/linux/arch/arm/mach-imx/apf9328.c
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328.c (rev 0)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328.c 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,570 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
+ * Copyright (c) 2005 Armadeus
+ * This work is based on scb9328.c from Sascha Hauer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <linux/device.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/serial_8250.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/tsc2102.h>
+#include "../../../drivers/net/can/mcp251x.h"
+
+#include <asm/system.h>
+#include <asm/hardware.h>
+#include <linux/irq.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+
+#include <asm/mach/map.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/arch/imx-uart.h>
+#include <asm/arch/mmc.h>
+#include <asm/arch/spi_imx.h>
+#include <asm/arch/imx-regs.h> // imx_gpio_mode()
+#include <asm/arch/imx-alsa.h>
+
+#ifdef CONFIG_DM9000
+#include <linux/dm9000.h>
+#endif // CONFIG_DM9000
+
+#include "generic.h"
+
+#ifdef CONFIG_SENSORS_MAX1027_MODULE
+#define CONFIG_SENSORS_MAX1027 1
+#endif
+#ifdef CONFIG_SPI_IMX_MODULE
+#define CONFIG_SPI_IMX 1
+#endif
+#ifdef CONFIG_SPI_TSC2102_MODULE
+#define CONFIG_SPI_TSC2102 1
+#endif
+#ifdef CONFIG_CAN_MCP251X_MODULE
+#define CONFIG_CAN_MCP251X 1
+#endif
+#ifdef CONFIG_IMX_BACKLIGHT_MODULE
+#define CONFIG_IMX_BACKLIGHT 1
+#endif
+
+// --- ETHERNET RESSOURCE ---
+#ifdef CONFIG_DM9000
+static struct resource dm9000_resources[] = {
+ [0] = {
+ .start = (APF9328_ETH_PHYS + 0),
+ .end = (APF9328_ETH_PHYS + 1),
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = (APF9328_ETH_PHYS + 2),
+ .end = (APF9328_ETH_PHYS + 3),
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ .start = (APF9328_ETH_IRQ),
+ .end = (APF9328_ETH_IRQ),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct dm9000_plat_data dm9000_setup = {
+ .flags = DM9000_PLATF_16BITONLY
+};
+
+static struct platform_device dm9000x_device = {
+ .name = "dm9000",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(dm9000_resources),
+ .resource = dm9000_resources,
+ .dev = { .platform_data = &dm9000_setup, },
+};
+#endif // CONFIG_DM9000
+
+// --- PWM RESSOURCE ---
+// I don't think it needs an ifdef - JB
+static struct resource pwm_resources[] = {
+ [0] = {
+ .start = (IMX_PWM_BASE),
+ .end = (IMX_PWM_BASE + 0x0C),
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = (PWM_INT),
+ .end = (PWM_INT),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device imx_pwm_device = {
+ .name = "imx-pwm", // Should be the same as the driver name
+ .id = 0,
+ .num_resources = ARRAY_SIZE(pwm_resources),
+ .resource = pwm_resources,
+};
+
+#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
+static struct imx_alsa_codec_config tsc2102_alsa_pdata;
+
+static struct resource ssi_resources[] = {
+ [0] = {
+ .start = (IMX_SSI_BASE),
+ .end = (IMX_SSI_BASE + 0x28),
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device tsc2102_alsa_device = {
+ .name = "tsc2102-alsa", // Should be the same as the driver name
+ .id = 0,
+ .num_resources = ARRAY_SIZE(ssi_resources),
+ .resource = ssi_resources,
+ .dev = {
+ .platform_data = &tsc2102_alsa_pdata,
+ }
+};
+#endif // defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
+
+
+// --- SERIAL RESSOURCE ---
+static struct imxuart_platform_data uart_pdata = {
+ .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static struct resource imx_uart1_resources[] = {
+ [0] = {
+ .start = 0x00206000,
+ .end = 0x002060FF,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = (UART1_MINT_RX),
+ .end = (UART1_MINT_RX),
+ .flags = IORESOURCE_IRQ,
+ },
+ [2] = {
+ .start = (UART1_MINT_TX),
+ .end = (UART1_MINT_TX),
+ .flags = IORESOURCE_IRQ,
+},
+};
+
+static struct platform_device imx_uart1_device = {
+ .name = "imx-uart",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(imx_uart1_resources),
+ .resource = imx_uart1_resources,
+ .dev = {
+ .platform_data = &uart_pdata,
+ }
+};
+
+static struct resource imx_uart2_resources[] = {
+ [0] = {
+ .start = 0x00207000,
+ .end = 0x002070FF,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = (UART2_MINT_RX),
+ .end = (UART2_MINT_RX),
+ .flags = IORESOURCE_IRQ,
+ },
+ [2] = {
+ .start = (UART2_MINT_TX),
+ .end = (UART2_MINT_TX),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device imx_uart2_device = {
+ .name = "imx-uart",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(imx_uart2_resources),
+ .resource = imx_uart2_resources,
+ .dev = {
+ .platform_data = &uart_pdata,
+ }
+};
+
+#ifdef CONFIG_SPI_IMX
+static struct resource imx_spi1_resource[] = {
+ [0] = {
+ .start = 0x00213000,
+ .end = 0x00213fff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = CSPI_INT,
+ .end = CSPI_INT,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct spi_imx_master imx_spi1_master_info = {
+ .num_chipselect = 1,
+ .enable_dma = 0,
+};
+
+static struct platform_device imx_spi1 = {
+ .name = "spi_imx",
+ .id = 1,
+ .resource = imx_spi1_resource,
+ .num_resources = ARRAY_SIZE(imx_spi1_resource),
+ .dev = {
+ .platform_data = &imx_spi1_master_info,
+ },
+};
+
+static struct resource imx_spi2_resource[] = {
+ [0] = {
+ .start = 0x00219000,
+ .end = 0x00219fff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = SPI2_INT,
+ .end = SPI2_INT,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct spi_imx_master imx_spi2_master_info = {
+ .num_chipselect = 1,
+ .enable_dma = 0,
+};
+
+static struct platform_device imx_spi2 = {
+ .name = "spi_imx",
+ .id = 2,
+ .resource = imx_spi2_resource,
+ .num_resources = ARRAY_SIZE(imx_spi2_resource),
+ .dev = {
+ .platform_data = &imx_spi2_master_info,
+ },
+};
+
+#endif //CONFIG_SPI_IMX
+
+#ifdef CONFIG_SENSORS_MAX1027
+#define IMX_SPI1_SS_PIN 15
+#define IMX_SPI1_SS (1<<15)
+static void max1027_init_cs(void)
+{
+ // SPI CSn is used as chip select but in GPIO mode
+ OCR1(2) |= 3<<(IMX_SPI1_SS_PIN*2);
+ DDIR(2) |= IMX_SPI1_SS;
+ DR(2) |= IMX_SPI1_SS;
+ GIUS(2) |= IMX_SPI1_SS;
+ GIUS(2) &= ~(1<<14 | 1<<16 | 1<< 17); // Set SPI primary functions
+}
+static void max1027_cs(u32 command)
+{
+ if( command == SPI_CS_DEASSERT )
+ DR(2) |= IMX_SPI1_SS;
+ else
+ DR(2) &= ~IMX_SPI1_SS;
+}
+
+static struct spi_imx_chip max1027_hw = {
+ .cs_control = max1027_cs,
+};
+
+#endif // CONFIG_SENSORS_MAX1027
+
+#ifdef CONFIG_SPI_TSC2102
+#define TSC2102_CS_GPIOB 17
+#define TSC2102_INT_GPIOD 8
+
+static void tsc2102_init_gpio(void)
+{
+ // Activate SPI2 port ----
+ // PortB 17 is used as chip select (in GPIO mode)
+ DR(1) |= 1 << TSC2102_CS_GPIOB; // Initializes it High
+ imx_gpio_mode( GPIO_PORTB | TSC2102_CS_GPIOB | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+ // Configure SPI2 outputs
+ imx_gpio_mode( PD7_AIN_SPI2_SCLK );
+ imx_gpio_mode( PD10_AIN_SPI2_TXD );
+ imx_gpio_mode( PD9_AOUT_SPI2_RXD );
+ FMCR |= SPI2_RXD_SEL; // RX is AOUT on PORTD
+
+ // PortD 8 is used as PINTDAV interrupt
+ imx_gpio_mode( GPIO_PORTD | TSC2102_INT_GPIOD | GPIO_IN | GPIO_GIUS );
+ //imx_gpio_irq_type( IRQ_GPIOD(8), __IRQT_FALEDGE );
+
+ // Activate SSI on PortC ----
+ imx_gpio_mode( PC3_PF_SSI_RXFS );
+ FMCR &= ~(SSI_RXFS_SEL);
+ imx_gpio_mode( PC4_PF_SSI_RXCLK );
+ FMCR &= ~(SSI_RXCLK_SEL);
+ imx_gpio_mode( PC5_PF_SSI_RXDAT );
+ FMCR &= ~(SSI_RXDAT_SEL);
+ imx_gpio_mode( PC6_PF_SSI_TXDAT );
+ imx_gpio_mode( PC7_PF_SSI_TXFS );
+ FMCR &= ~(SSI_TXFS_SEL);
+ imx_gpio_mode( PC8_PF_SSI_TXCLK );
+ FMCR &= ~(SSI_TXCLK_SEL);
+
+ printk("TSC2102 GPIOs initialized\n");
+}
+
+// Chip select command for TSC2102
+static void tsc2102_cs(u32 command)
+{
+ // PortB 19 is used as chip select
+ if( command == SPI_CS_DEASSERT )
+ DR(1) |= 1<< TSC2102_CS_GPIOB;
+ else
+ DR(1) &= ~(1<< TSC2102_CS_GPIOB);
+}
+
+static struct spi_imx_chip tsc2102_hw = {
+ .cs_control = tsc2102_cs,
+};
+
+static struct tsc2102_config apf9328_tsc2102_config = {
+ .use_internal = 1, // -> use internal voltage reference
+ .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
+ .temp_at25c = 2200,
+/* .apm_report = palmte_get_power_status,
+ .alsa_config = &palmte_alsa_config,*/
+};
+
+#endif // CONFIG_SPI_TSC2102
+
+#ifdef CONFIG_CAN_MCP251X
+#define CAN_MPC251X_CS_GPIOB 19
+#define CAN_MPC251X_INT_GPIOC 13
+
+// Chip select command for MCP251X
+static void mcp251X_cs(u32 command)
+{
+ // PortB 19 is used as chip select
+ if( command == SPI_CS_DEASSERT )
+ DR(1) |= 1<< CAN_MPC251X_CS_GPIOB;
+ else
+ DR(1) &= ~(1<< CAN_MPC251X_CS_GPIOB);
+}
+
+static struct spi_imx_chip mcp251X_hw = {
+ .cs_control = mcp251X_cs,
+};
+
+static void mcp251X_init_gpio(void)
+{
+ // Activate SPI2 port ----
+ // PortB 19 is used as chip select (in GPIO mode)
+ DR(1) |= 1 << CAN_MPC251X_CS_GPIOB; // Initializes it High
+ imx_gpio_mode( GPIO_PORTB | CAN_MPC251X_CS_GPIOB | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+
+ // PortC 13 is used as CAN interrupt
+ imx_gpio_mode( GPIO_PORTC | CAN_MPC251X_INT_GPIOC | GPIO_IN | GPIO_GIUS );
+
+ // Configure SPI2 outputs
+ imx_gpio_mode( PD7_AIN_SPI2_SCLK );
+ imx_gpio_mode( PD10_AIN_SPI2_TXD );
+ imx_gpio_mode( PD9_AOUT_SPI2_RXD );
+ FMCR |= SPI2_RXD_SEL; // RX is AOUT on PORTD
+}
+
+static struct mcp251x_platform_data apf9328_mcp251x_config = {
+ .oscillator_frequency = 16000000,
+ .board_specific_setup = NULL,
+ .device_reset = NULL,
+ .transceiver_enable = NULL,
+};
+
+#endif
+
+
+static struct spi_board_info spi_board_info[] __initdata = {
+#ifdef CONFIG_SENSORS_MAX1027
+{
+ .modalias = "max1027",
+ .controller_data = &max1027_hw,
+ .max_speed_hz = 8000000,
+ .bus_num = 1, // SPI1
+ .chip_select = 0,
+ .mode = 0,
+},
+#endif // CONFIG_SENSORS_MAX1027
+#ifdef CONFIG_SPI_TSC2102
+{
+ .modalias = "tsc2102",
+ .controller_data = &tsc2102_hw,
+ .max_speed_hz = 8000000,
+ .bus_num = 2, // SPI2
+ .irq = IRQ_GPIOD(TSC2102_INT_GPIOD),
+ .chip_select = 0,
+ .mode = 0,
+ .platform_data = &apf9328_tsc2102_config,
+},
+#endif // CONFIG_SPI_TSC2102
+#ifdef CONFIG_CAN_MCP251X
+ {
+ .modalias = "mcp251x",
+ .max_speed_hz = 8000000, /* 8MHz */
+ .controller_data = &mcp251X_hw,
+ .bus_num = 2,
+ .mode = SPI_MODE_0,
+ .chip_select = 0,
+ .irq = IRQ_GPIOC( CAN_MPC251X_INT_GPIOC ),
+ .platform_data = &apf9328_mcp251x_config,
+ },
+#endif // CONFIG_CAN_MCP251X
+};
+
+// --- LCD RESSOURCE ---
+#ifdef CONFIG_FB_IMX
+// all custom LCD configuration is deported to this file for clarity purpose:
+#include "apf9328_lcd_config.h"
+#define IMX_FB_PHYS (0x0C000000 - 0x40000)
+#endif // CONFIG_FB_IMX
+
+#ifdef CONFIG_IMX_BACKLIGHT
+static struct imxbl_machinfo imx_bl_machinfo = {
+ .max_intensity = 0xff,
+ .default_intensity = 0x90,
+ .limit_mask = 0x7f, // When battery is low
+// set_bl_intensity = put a function here if you want to overload default one,
+};
+//extern struct platform_device imxfb_device; // filled in generic.c
+static struct platform_device imxbl_device = {
+ .name = "imxl-bl",
+ .dev = {
+// .parent = &imxfb_device.dev, crash kernel even if EXPORT_SYMBOL() is done in generic.c
+ .platform_data = &imx_bl_machinfo,
+ },
+ .id = 0,
+};
+#endif // CONFIG_IMX_BACKLIGHT
+
+static struct platform_device *devices[] __initdata = {
+ &imx_uart1_device,
+ &imx_uart2_device,
+#ifdef CONFIG_DM9000
+ &dm9000x_device,
+#endif // CONFIG_DM9000
+#ifdef CONFIG_SPI_IMX
+ &imx_spi1,
+ &imx_spi2,
+#endif //CONFIG_SPI_IMX
+ &imx_pwm_device,
+#ifdef CONFIG_IMX_BACKLIGHT
+ &imxbl_device,
+#endif // CONFIG_IMX_BACKLIGHT
+#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
+};
+
+static void __init apf9328_init(void)
+{
+ printk("--- Registering APF9328 ressources\n");
+
+ // Serial
+ /*UFCR(IMX_UART1_BASE) = 0xa81; To be removed
+ UFCR(IMX_UART2_BASE) = 0xa81;*/
+ // LCD
+#ifdef CONFIG_FB_IMX
+ set_imx_fb_info(&apf9328_fb_info);
+ printk("Set apf9328_fb_info\n");
+ // init PORTD ....//
+ imx_fb_set_gpios();
+#endif // CONFIG_FB_IMX
+
+#ifdef CONFIG_SENSORS_MAX1027
+ max1027_init_cs();
+#endif //CONFIG_SENSORS_MAX1027
+#ifdef CONFIG_SPI_TSC2102
+ tsc2102_init_gpio();
+#endif // CONFIG_SPI_TSC2102
+#ifdef CONFIG_CAN_MCP251X
+ mcp251X_init_gpio();
+#endif // CONFIG_CAN_MCP251X
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+#endif
+
+#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
+ request_mem_region(IMX_CS1_PHYS,IMX_CS1_SIZE,"FPGA");
+#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
+
+ printk("--- APF9328 ressources registered\n");
+}
+
+/*
+ * Register here the memory addresses we want to access from our drivers and
+ * which are not already registerd in generic.c
+ */
+static struct map_desc apf9328_io_desc[] __initdata = {
+#ifdef CONFIG_FB_IMX
+ {
+ .virtual = IMX_FB_VIRT,
+ .pfn = __phys_to_pfn(IMX_FB_PHYS),
+ .length = IMX_FB_SIZE,
+ .type = MT_DEVICE
+ },
+#endif // CONFIG_FB_IMX
+ // FPGA Memory mapping
+ {.virtual = IMX_CS1_VIRT, .pfn = __phys_to_pfn(IMX_CS1_PHYS), .length = IMX_CS1_SIZE, .type = MT_DEVICE},
+};
+
+void __init apf9328_map_io(void)
+{
+ imx_map_io();
+ iotable_init(apf9328_io_desc, ARRAY_SIZE(apf9328_io_desc));
+}
+
+static void __init apf9328_init_irq(void)
+{
+ // Init generic IRQs
+ imx_init_irq();
+ // Init our custom IRQs
+ set_irq_type(APF9328_UART1_IRQ, IRQF_TRIGGER_FALLING);
+#ifdef CONFIG_DM9000
+ set_irq_type(APF9328_ETH_IRQ, IRQF_TRIGGER_FALLING);
+#endif // CONFIG_DM9000
+#ifdef CONFIG_SPI_TSC2102
+ set_irq_type( IRQ_GPIOD(TSC2102_INT_GPIOD), IRQF_TRIGGER_FALLING );
+#endif // CONFIG_SPI_TSC2102
+#ifdef CONFIG_CAN_MCP251X
+ set_irq_type( IRQ_GPIOC(CAN_MPC251X_INT_GPIOC), IRQF_TRIGGER_FALLING );
+#endif // CONFIG_CAN_MCP251X
+
+#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
+#define FPGA_INT_GPIOA 1
+ set_irq_type(IRQ_GPIOA(FPGA_INT_GPIOA),IRQF_TRIGGER_RISING);
+#endif // CONFIG_ARMADEUS_FPGA_DRIVERS
+
+}
+
+
+MACHINE_START(APF9328, "Armadeus APF9328")
+ /* Maintainer: Julien Boibessot, Armadeus */
+ .phys_io = 0x00200000,
+ .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
+ .boot_params = 0x08000100,
+ .map_io = apf9328_map_io,
+ .init_irq = apf9328_init_irq,
+ .timer = &imx_timer,
+ .init_machine = apf9328_init,
+MACHINE_END
Added: trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h
===================================================================
--- trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h (rev 0)
+++ trunk/target/linux/arch/arm/mach-imx/apf9328_lcd_config.h 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,199 @@
+/*
+ *
+ * Armadeus LCD configuration file
+ *
+ * Put here all that is needed to configure the Hardware
+ * interface to your LCD
+ *
+ *
+ */
+
+#ifndef APF9328_LCD_CONFIG_H
+#define APF9328_LCD_CONFIG_H
+
+
+#ifdef CONFIG_FB_IMX
+#include <asm/arch/imxfb.h>
+#include <linux/delay.h>
+
+#define LCD_PORT 3 /* Port D */
+
+#define OPTREX_F51900_POWER_DOWN 7 /* PD7_REV line */
+#define SHARP_LQ043_POWER_DOWN 12 /* PD12_ACD_OE line */
+#define CONTRAST_LINE 11 /* PD11_CONTRAST */
+
+#define BACKLIGHT_ON 0x000000ff
+#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
+
+/*
+ * Power on/off LCD's internal logic
+ */
+static void apf9328_lcd_power(int on)
+{
+ pr_debug("apf9328_lcd_power: %s\n", on ? "on":"off");
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
+ if(on)
+ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
+ else
+ DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
+#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+ // No LCD powerdown yet
+#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
+ if(on) {
+ mdelay(200); // at least ten frames have to be processed before
+ // enabling the display
+ DR(LCD_PORT) |= (1 << SHARP_LQ043_POWER_DOWN);
+ }
+ else
+ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN);
+#else
+ if(on)
+ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE);
+ else
+ DR(LCD_PORT) |= (1 << CONTRAST_LINE);
+#endif // CONFIG_FB_IMX_OPTREX_F51900_CSTN
+}
+
+/*
+ * Power on/off LCD's backlight
+ */
+static void apf9328_lcd_backlight_power(int on)
+{
+ if(on)
+ LCDC_PWMR |= BACKLIGHT_ON;
+ else
+ LCDC_PWMR &= ~BACKLIGHT_ON;
+}
+
+
+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
+ .bpp = 16,
+ .xres = 480,
+ .yres = 272,
+
+ .hsync_len = 10,
+ .vsync_len = 3,
+ .left_margin = 2,
+ .upper_margin = 2,
+ .right_margin = 0,
+ .lower_margin = 3,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
+ PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(5),
+ .pwmr = 0x00000100, // Contrast with PWM @ Line_Pulse, min by default
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .backlight_power = apf9328_lcd_backlight_power,
+ .lcd_power = apf9328_lcd_power,
+};
+#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
+ .bpp = 16,
+ .xres = 320,
+ .yres = 240,
+
+ .hsync_len = 30,
+ .vsync_len = 3,
+ .left_margin = 1,
+ .upper_margin = 20,
+ .right_margin = 68,
+ .lower_margin = 20,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(7),
+ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .backlight_power = apf9328_lcd_backlight_power,
+};
+#elif CONFIG_FB_IMX_SHARP_LQ057_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
+ .bpp = 16,
+ .xres = 320,
+ .yres = 240,
+
+ .hsync_len = 9,
+ .vsync_len = 2,
+ .left_margin = 9,
+ .upper_margin = 0,
+ .right_margin = 27,
+ .lower_margin = 7,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | /*PCR_CLKPOL |*/
+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
+ .pwmr = 0, // No contrast management
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .lcd_power = apf9328_lcd_power,
+};
+#elif CONFIG_FB_IMX_OPTREX_F51900_CSTN
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
+ .bpp = 8,
+ .xres = 320,
+ .yres = 240,
+
+ .hsync_len = 2,
+ .vsync_len = 2,
+ .left_margin = 2,
+ .upper_margin = 2,
+ .right_margin = 2,
+ .lower_margin = 2,
+
+ .pcr = PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_8 | PCR_ACD(5) |
+ PCR_END_BYTE_SWAP | PCR_PCD(3),
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .lcd_power = apf9328_lcd_power,
+};
+#elif CONFIG_FB_IMX_MOTOROLA_A910_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
+ .pixclock = 62500,
+ .bpp = 16,
+ .xres = 240,
+ .yres = 320,
+
+ .hsync_len = 9,
+ .vsync_len = 2,
+ .left_margin = 9,
+ .upper_margin = 2,
+ .right_margin = 27,
+ .lower_margin = 4,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL |
+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
+ .dmacr = DEFAULT_DMA_SETTINGS,
+ .pwmr = 0, // No contrast management
+ .lcd_power = apf9328_lcd_power,
+};
+#else
+#error Please define a imxfb_mach_info structure with your LCD parameters here
+#endif
+
+/*
+ * Configure custom GPIOs needed by LCDs
+ */
+static void imx_fb_set_gpios(void)
+{
+
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
+ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN); // Initializes it High
+ imx_gpio_mode( GPIO_PORTD | OPTREX_F51900_POWER_DOWN | GPIO_OUT | GPIO_DR );
+#else
+ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE); // Initializes it low
+ // GPIO Function for CONTRAST pin (changed in imxfb if contrast is activated)
+ imx_gpio_mode( GPIO_PORTD | CONTRAST_LINE | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+#endif
+
+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
+ // ACD_OE (SHARP_LQ043_POWER_DOWN) used as power down signal
+ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN); // Initializes it Low
+ imx_gpio_mode( GPIO_PORTD | SHARP_LQ043_POWER_DOWN | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+#else
+ // otherwise use ACD_OE as standard LCD controller signal
+ imx_gpio_mode(PD12_PF_ACD_OE);
+#endif // CONFIG_FB_IMX_SHARP_LQ043_TFT
+}
+#endif // CONFIG_FB_IMX
+
+#endif // APF9328_LCD_CONFIG_H
Added: trunk/target/linux/generate_patch.sh
===================================================================
--- trunk/target/linux/generate_patch.sh (rev 0)
+++ trunk/target/linux/generate_patch.sh 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+ echo "Usage: $0 [options] <source> <dest> <patchname>"
+ echo " options: --append"
+ exit 1
+fi
+
+if [ "$1" == "--append" ]; then
+ shift
+ echo "PATCH AUTOMATICALLY GENERATED" >> $3
+else
+ echo "PATCH AUTOMATICALLY GENERATED" > $3
+fi
+echo "DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST" >> $3
+echo "(Take a look at armadeus/target/linux/ directory to know how to generate it)" >> $3
+
+diff -urN $1 $2 >> $3
+exit 0
Property changes on: trunk/target/linux/generate_patch.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/target/linux/include/asm-arm/arch-imx/apf9328.h
===================================================================
--- trunk/target/linux/include/asm-arm/arch-imx/apf9328.h (rev 0)
+++ trunk/target/linux/include/asm-arm/arch-imx/apf9328.h 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,60 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
+ * Copyright (c) 2005 Armadeus
+ * This work is based on scb9328.h from Sascha Hauer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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
+ *
+ */
+
+#ifndef __ASM_ARCH_APF9328_H
+#define __ASM_ARCH_APF9328_H
+
+/* ------------------------------------------------------------------------ */
+/* Memory Map for the APF9328 Board */
+/* ------------------------------------------------------------------------ */
+
+// Serial ports
+#define APF9328_UART1_VIRT ( IMX_CS3_VIRT + 0x30000 )
+#define APF9328_UART1_PHYS ( IMX_CS3_PHYS + 0x30000 )
+#define APF9328_UART1_IRQ ( IRQ_GPIOA(1) )
+#define APF9328_UART2_VIRT ( IMX_CS3_VIRT + 0x10000 )
+#define APF9328_UART2_PHYS ( IMX_CS3_PHYS + 0x10000 )
+#define APF9328_UART2_IRQ ( IRQ_GPIOA(1) )
+
+// Ethernet
+#define APF9328_ETH_VIRT ( IMX_CS4_VIRT + 0x00C00000 )
+#define APF9328_ETH_PHYS ( IMX_CS4_PHYS + 0x00C00000 )
+#define APF9328_ETH_IRQ ( IRQ_GPIOB(14) )
+
+// FLASH
+#define APF9328_FLASH_PHYS IMX_CS0_PHYS
+#ifdef CONFIG_IMX_APF9328_FLASH_8MB
+# define APF9328_FLASH_SIZE 0x00800000
+#endif
+#ifdef CONFIG_IMX_APF9328_FLASH_16MB
+# define APF9328_FLASH_SIZE 0x01000000
+#endif
+#define APF9328_FLASH_BASE IMX_CS0_VIRT
+
+// RAM
+// Usefull ?
+
+// FPGA
+// TBDL
+
+#define CLK32 32768
+
+#endif // __ASM_ARCH_APF9328_H
Added: trunk/target/linux/include/asm-arm/arch-imx/imx-alsa.h
===================================================================
--- trunk/target/linux/include/asm-arm/arch-imx/imx-alsa.h (rev 0)
+++ trunk/target/linux/include/asm-arm/arch-imx/imx-alsa.h 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,131 @@
+/*
+ * linux/include/asm-arm/arch-imx/imx-alsa.h
+ *
+ * Alsa Driver for AIC23 and TSC2101 codecs on iMX platform boards.
+ *
+ * Copyright (C) 2008 Armadeus <nic...@ar...>
+ * Based on the omap alsa driver
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __IMX_ALSA_H
+#define __IMX_ALSA_H
+
+#include <sound/driver.h>
+#include <asm/arch/dma.h>
+#include <asm/arch/imx-dma.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+/*#include <asm/arch/ssi.h>*/
+#include <linux/platform_device.h>
+/*
+ * Debug functions
+ */
+#undef DEBUG
+//#define DEBUG
+
+#define ERR(ARGS...) printk(KERN_ERR "{%s}-ERROR: ", __FUNCTION__);printk(ARGS);
+
+#ifdef DEBUG
+#define DPRINTK(ARGS...) printk(KERN_INFO "<%s>: ",__FUNCTION__);printk(ARGS)
+#define ADEBUG() printk("XXX Alsa debug f:%s, l:%d\n", __FUNCTION__, __LINE__)
+#define FN_IN printk(KERN_INFO "[%s]: start\n", __FUNCTION__)
+#define FN_OUT(n) printk(KERN_INFO "[%s]: end(%u)\n",__FUNCTION__, n)
+#else
+#define DPRINTK(ARGS...) /* nop */
+#define ADEBUG() /* nop */
+#define FN_IN /* nop */
+#define FN_OUT(n) /* nop */
+#endif
+
+#define DMA_BUF_SIZE (1024 * 8)
+
+/*
+ * Buffer management for alsa and dma
+ */
+struct audio_stream {
+ char *id; /* identification string */
+ int stream_id; /* numeric identification */
+// int dma_dev; /* dma number of that device */
+ imx_dmach_t dma_dev; /* device identifier for DMA */
+ int dma_in_progress;
+ int offset; /* store start position of the last period in the alsa buffer */
+ int active:1; /* we are using this stream for transfer now */
+ int period; /* current transfer period */
+ int periods; /* current count of periods registered in the DMA engine */
+ spinlock_t dma_lock; /* for locking in DMA operations */
+ struct snd_pcm_substream *stream; /* the pcm stream */
+ int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */
+ int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */
+};
+
+
+/*
+ * Alsa card structure
+ */
+struct snd_card_imx_codec {
+ struct snd_card *card;
+ struct snd_pcm *pcm;
+ long samplerate;
+ struct audio_stream s[2]; /* playback & capture */
+};
+
+/* Codec specific information and function pointers.
+ * Codec imx-alsa-tsc2101.c
+ * is responsible for defining the function pointers.
+ */
+struct imx_alsa_codec_config {
+ char *name;
+ struct imx_ssi_reg_cfg *mcbsp_regs_alsa;
+ struct snd_pcm_hw_constraint_list *hw_constraints_rates;
+ struct snd_pcm_hardware *snd_imx_alsa_playback;
+ struct snd_pcm_hardware *snd_imx_alsa_capture;
+ void (*codec_configure_dev)(void);
+ void (*codec_set_samplerate)(long);
+ void (*codec_clock_setup)(void);
+ int (*codec_clock_on)(void);
+ int (*codec_clock_off)(void);
+ int (*get_default_samplerate)(void);
+};
+
+/*********** Mixer function prototypes *************************/
+int snd_imx_mixer(struct snd_card_imx_codec *);
+void snd_imx_init_mixer(void);
+
+#ifdef CONFIG_PM
+void snd_imx_suspend_mixer(void);
+void snd_imx_resume_mixer(void);
+#endif
+
+int snd_imx_alsa_post_probe(struct platform_device *pdev, struct imx_alsa_codec_config *config);
+int snd_imx_alsa_remove(struct platform_device *pdev);
+#ifdef CONFIG_PM
+int snd_imx_alsa_suspend(struct platform_device *pdev, pm_message_t state);
+int snd_imx_alsa_resume(struct platform_device *pdev);
+#else
+#define snd_imx_alsa_suspend NULL
+#define snd_imx_alsa_resume NULL
+#endif
+void snd_imx_alsa_dma_interrupt(int, void *);
+
+#endif
Added: trunk/target/linux/sound/arm/imx-alsa-dma.h
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa-dma.h (rev 0)
+++ trunk/target/linux/sound/arm/imx-alsa-dma.h 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,50 @@
+/*
+ * linux/sound/arm/imx/imx-alsa-dma.h
+ *
+ * Common audio DMA handling for the iMX processors
+ *
+ * Copyright (C) 2008 Nicolas Colombain <nic...@ar...>
+ *
+ * Copyright (C) 2006 Mika Laitio <la...@cc...>
+ *
+ * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
+ *
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * Copyright (C) 2000, 2001 Nicolas Pitre <ni...@ca...>
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef __IMX_AUDIO_ALSA_DMA_H
+#define __IMX_AUDIO_ALSA_DMA_H
+
+/************************** INCLUDES *************************************/
+
+#include <asm/arch/imx-alsa.h>
+
+/************************** GLOBAL DATA STRUCTURES *********************************/
+
+typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);
+
+/**************** ARCH SPECIFIC FUNCIONS *******************************************/
+
+void imx_clear_alsa_sound_dma(struct audio_stream * s);
+
+/*int imx_request_alsa_sound_dma(int device_id, const char *device_name,
+ void *data, int **channels);*/
+//int imx_free_alsa_sound_dma(void *data, int **channels);
+
+int imx_start_alsa_sound_dma(struct audio_stream *s, dma_addr_t dma_ptr, u_int dma_size);
+
+void imx_stop_alsa_sound_dma(struct audio_stream *s);
+
+#endif
+
Added: trunk/target/linux/sound/arm/imx-alsa-tsc2102-mixer.c
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa-tsc2102-mixer.c (rev 0)
+++ trunk/target/linux/sound/arm/imx-alsa-tsc2102-mixer.c 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,288 @@
+/*
+ * sound/arm/imx-alsa-tsc2102-mixer.c
+ *
+ * Alsa codec driver for TSC2102 chip for iMXL platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
+ * Code based on the TSC2101 ALSA driver for omap platforms.
+ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
+ * Code based on the TSC2101 ALSA driver.
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/types.h>
+#include <linux/spi/tsc2102.h>
+
+#include <asm/arch/imx-alsa.h>
+
+#include <sound/driver.h>
+#include <sound/initval.h>
+#include <sound/control.h>
+
+#include "imx-alsa-tsc2102.h"
+
+static int vol[2], mute[2], filter[2];
+
+/*
+ * Converts the Alsa mixer volume (0 - 100) to actual Digital
+ * Gain Control (DGC) value that can be written or read from the
+ * TSC2102 registers.
+ *
+ * Note that the number "OUTPUT_VOLUME_MAX" is smaller than
+ * OUTPUT_VOLUME_MIN because DGC works as a volume decreaser. (The
+ * higher the value sent to DAC, the more the volume of controlled
+ * channel is decreased)
+ */
+static void set_dac_gain_stereo(int left_ch, int right_ch)
+{
+ int lch, rch;
+
+ if (left_ch > 100)
+ vol[0] = 100;
+ else if (left_ch < 0)
+ vol[0] = 0;
+ else
+ vol[0] = left_ch;
+ lch = OUTPUT_VOLUME_MIN - vol[0] *
+ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
+
+ if (right_ch > 100)
+ vol[1] = 100;
+ else if (right_ch < 0)
+ vol[1] = 0;
+ else
+ vol[1] = right_ch;
+ rch = OUTPUT_VOLUME_MIN - vol[1] *
+ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
+
+ tsc2102_set_volume(lch, rch);
+}
+
+void init_playback_targets(void)
+{
+ set_dac_gain_stereo(DEFAULT_OUTPUT_VOLUME, DEFAULT_OUTPUT_VOLUME);
+
+ /* Unmute */
+ tsc2102_set_mute(0, 0);
+
+ mute[0] = mute[1] = 0;
+ filter[0] = filter[1] = 0;
+}
+
+/*
+ * Initializes TSC 2102 and playback target.
+ */
+void snd_imx_init_mixer(void)
+{
+ FN_IN;
+
+ init_playback_targets();
+
+ FN_OUT(0);
+}
+
+static int __pcm_playback_volume_info(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
+{
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+ uinfo->count = 2;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 100;
+ return 0;
+}
+
+static int __pcm_playback_volume_get(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = vol[0]; /* L */
+ ucontrol->value.integer.value[1] = vol[1]; /* R */
+
+ return 0;
+}
+
+static int __pcm_playback_volume_put(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ set_dac_gain_stereo(
+ ucontrol->value.integer.value[0], /* L */
+ ucontrol->value.integer.value[1]); /* R */
+ return 1;
+}
+
+static int __pcm_playback_switch_info(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
+{
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+ uinfo->count = 2;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
+ return 0;
+}
+
+static int __pcm_playback_switch_get(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = !mute[0]; /* L */
+ ucontrol->value.integer.value[1] = !mute[1]; /* R */
+
+ return 0;
+}
+
+static int __pcm_playback_switch_put(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ mute[0] = (ucontrol->value.integer.value[0] == 0); /* L */
+ mute[1] = (ucontrol->value.integer.value[1] == 0); /* R */
+
+ tsc2102_set_mute(mute[0], mute[1]);
+ return 1;
+}
+
+static int __pcm_playback_deemphasis_info(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
+{
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
+ return 0;
+}
+
+static int __pcm_playback_deemphasis_get(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = filter[0];
+ return 0;
+}
+
+static int __pcm_playback_deemphasis_put(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ filter[0] = (ucontrol->value.integer.value[0] > 0);
+
+ tsc2102_set_deemphasis(filter[0]);
+ return 1;
+}
+
+static int __pcm_playback_bassboost_info(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
+{
+ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
+ uinfo->count = 1;
+ uinfo->value.integer.min = 0;
+ uinfo->value.integer.max = 1;
+ return 0;
+}
+
+static int __pcm_playback_bassboost_get(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ ucontrol->value.integer.value[0] = filter[1];
+ return 0;
+}
+
+static int __pcm_playback_bassboost_put(
+ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
+{
+ filter[1] = (ucontrol->value.integer.value[0] > 0);
+
+ tsc2102_set_bassboost(filter[1]);
+ return 1;
+}
+
+static struct snd_kcontrol_new tsc2102_control[] __devinitdata = {
+ {
+ .name = "Master Playback Volume",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .index = 0,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+ .info = __pcm_playback_volume_info,
+ .get = __pcm_playback_volume_get,
+ .put = __pcm_playback_volume_put,
+ },
+ {
+ .name = "Master Playback Switch",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .index = 0,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+ .info = __pcm_playback_switch_info,
+ .get = __pcm_playback_switch_get,
+ .put = __pcm_playback_switch_put,
+ },
+ {
+ .name = "De-emphasis Filter Switch",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .index = 0,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+ .info = __pcm_playback_deemphasis_info,
+ .get = __pcm_playback_deemphasis_get,
+ .put = __pcm_playback_deemphasis_put,
+ },
+ {
+ .name = "Bass-boost Filter Switch",
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .index = 0,
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+ .info = __pcm_playback_bassboost_info,
+ .get = __pcm_playback_bassboost_get,
+ .put = __pcm_playback_bassboost_put,
+ },
+};
+
+#ifdef CONFIG_PM
+void snd_imx_suspend_mixer(void)
+{
+ /* Nothing to do */
+}
+
+void snd_imx_resume_mixer(void)
+{
+ /* The chip was reset, restore the last used values */
+ set_dac_gain_stereo(vol[0], vol[1]);
+
+ tsc2102_set_mute(mute[0], mute[1]);
+ tsc2102_set_deemphasis(filter[0]);
+ tsc2102_set_bassboost(filter[1]);
+}
+#endif
+
+int snd_imx_mixer(struct snd_card_imx_codec *tsc2102)
+{
+ int i, err;
+
+ if (!tsc2102)
+ return -EINVAL;
+
+ for (i = 0; i < ARRAY_SIZE(tsc2102_control); i ++) {
+ err = snd_ctl_add(tsc2102->card,
+ snd_ctl_new1(&tsc2102_control[i],
+ tsc2102->card));
+
+ if (err < 0)
+ return err;
+ }
+ return 0;
+}
+
+MODULE_DESCRIPTION("Interface driver for TI TSC2102 chips.");
+MODULE_LICENSE("GPL");
+
Added: trunk/target/linux/sound/arm/imx-alsa-tsc2102.c
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa-tsc2102.c (rev 0)
+++ trunk/target/linux/sound/arm/imx-alsa-tsc2102.c 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,345 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.c
+ *
+ * Alsa codec driver for TSC2102 chip for iMXL platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
+ * Code based on the TSC2101 ALSA driver for omap platforms.
+ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
+ * Code based on the TSC2101 ALSA driver.
+ *
+ * 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.
+ */
+
+#include <linux/delay.h>
+#include <linux/soundcard.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+#include <linux/slab.h>
+#ifdef CONFIG_PM
+#include <linux/pm.h>
+#endif
+#include <linux/spi/tsc2102.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/imx-regs.h>
+#include <asm/arch/imx-alsa.h>
+
+#include "imx-alsa-tsc2102.h"
+
+static struct clk *tsc2102_bclk = 0;
+
+/*
+ * Hardware capabilities
+ */
+
+/* DAC sampling rates (BCLK = 12 MHz) */
+static unsigned int rates[] = {
+ 7350, 8000, 8820, 9600, 11025, 12000, 14700,
+ 16000, 22050, 24000, 29400, 32000, 44100, 48000,
+};
+
+static struct snd_pcm_hw_constraint_list tsc2102_hw_constraints_rates = {
+ .count = ARRAY_SIZE(rates),
+ .list = rates,
+ .mask = 0,
+};
+
+#define IMX_SSI_RATES \
+ (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | \
+ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
+ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
+ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_KNOT)
+
+static struct snd_pcm_hardware tsc2102_snd_imx_alsa_playback = {
+ .info = SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_MMAP_VALID,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = IMX_SSI_RATES,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ .channels_min = 2,
+ .channels_max = 2,
+ .buffer_bytes_max = 32 * 1024,
+ .period_bytes_min = 64,
+ .period_bytes_max = 8 * 1024, //test
+ .periods_min = 2,
+ .periods_max = 255,
+ .fifo_size = 0,
+};
+
+#define DUMP_TSC2102_AUDIO_REGISTERS 1
+#ifdef DUMP_TSC2102_AUDIO_REGISTERS
+static void dump_tsc2102_audio_regs(void) {
+ printk("TSC2102_AUDIO1_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_AUDIO1_CTRL));
+ printk("TSC2102_DAC_GAIN_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_DAC_GAIN_CTRL));
+ printk("TSC2102_AUDIO2_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_AUDIO2_CTRL));
+ printk("TSC2102_DAC_POWER_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_DAC_POWER_CTRL));
+ printk("TSC2102_AUDIO3_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_AUDIO3_CTRL));
+ printk("TSC2102_LCH_BASS_BOOST_N0 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N0));
+ printk("TSC2102_LCH_BASS_BOOST_N1 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N1));
+ printk("TSC2102_LCH_BASS_BOOST_N2 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N2));
+ printk("TSC2102_LCH_BASS_BOOST_N3 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N3));
+ printk("TSC2102_LCH_BASS_BOOST_N4 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N4));
+ printk("TSC2102_LCH_BASS_BOOST_N5 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N5));
+ printk("TSC2102_LCH_BASS_BOOST_D1 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D1));
+ printk("TSC2102_LCH_BASS_BOOST_D2 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D2));
+ printk("TSC2102_LCH_BASS_BOOST_D4 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D4));
+ printk("TSC2102_LCH_BASS_BOOST_D5 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D5));
+ printk("TSC2102_RCH_BASS_BOOST_N0 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N0));
+ printk("TSC2102_RCH_BASS_BOOST_N1 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N1));
+ printk("TSC2102_RCH_BASS_BOOST_N2 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N2));
+ printk("TSC2102_RCH_BASS_BOOST_N3 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N3));
+ printk("TSC2102_RCH_BASS_BOOST_N4 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N4));
+ printk("TSC2102_RCH_BASS_BOOST_N5 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N5));
+ printk("TSC2102_RCH_BASS_BOOST_D1 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D1));
+ printk("TSC2102_RCH_BASS_BOOST_D2 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D2));
+ printk("TSC2102_RCH_BASS_BOOST_D4 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D4));
+ printk("TSC2102_RCH_BASS_BOOST_D5 = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D5));
+ printk("TSC2102_PLL1_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_PLL1_CTRL));
+ printk("TSC2102_PLL2_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_PLL2_CTRL));
+ printk("TSC2102_AUDIO4_CTRL = 0x%04x\n",
+ tsc2102_read_sync(TSC2102_AUDIO4_CTRL));
+}
+#endif
+
+/*
+ * ALSA operations according to board file
+ */
+
+static long current_rate = 0;
+
+/*
+ * Sample rate changing
+ */
+static void tsc2102_set_samplerate(long sample_rate)
+{
+ int clkgdv = 0;
+ u16 srgr1, srgr2;
+
+ if (sample_rate == current_rate)
+ return;
+ current_rate = 0;
+
+#if 0
+ /* Wait for any frames to complete */
+ udelay(125);
+#endif
+ /* Set the sample rate on the TSC */
+ if (tsc2102_set_rate(sample_rate)) {
+ printk("error setting TSC at %d Hz sample rate\n", sample_rate);
+ return;
+ }
+
+#ifdef TSC_MASTER
+
+#else
+ /* Set the sample rate on the i.MXL SSI */
+ printk("erreur 1");
+ imx_get_perclk3();
+ clkgdv = CODEC_CLOCK / (sample_rate * (DEFAULT_BITPERSAMPLE * 2 - 1));
+ if (clkgdv)
+ srgr1 = (FWID(DEFAULT_BITPERSAMPLE - 1) | CLKGDV(clkgdv));
+ else
+ return;
+ xxxxx
+ /* Stereo Mode */
+ srgr2 = (CLKSM | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1));
+#endif
+
+ current_rate = sample_rate;
+ dump_tsc2102_audio_regs();
+}
+
+static void tsc2102_configure(void)
+{
+ tsc2102_dac_power(1);
+
+#ifdef TSC_MASTER
+ tsc2102_set_i2s_master(1);
+#else
+#error "to be implemented"
+ tsc2102_set_i2s_master(0);
+#endif
+}
+
+/*
+ * Do clock framework bclk search
+ */
+static void tsc2102_clock_setup(void)
+{
+ /*tsc2102_bclk = clk_get(0, "bclk"); no clock management*/
+}
+
+/*
+ * Do some sanity checks, set clock rate, start it.
+ */
+static int tsc2102_clock_on(void)
+{
+/* int err;
+no clock management*/
+
+#ifdef TSC_MASTER
+
+#endif
+
+/* if (clk_get_usecount(tsc2102_bclk) > 0 &&
+ clk_get_rate(tsc2102_bclk) != CODEC_CLOCK) {
+ printk(KERN_WARNING
+ "BCLK already in use at %d Hz. We change it to %d Hz\n",
+ (uint) clk_get_rate(tsc2102_bclk), CODEC_CLOCK);
+
+ err = clk_set_rate(tsc2102_bclk, CODEC_CLOCK);
+ if (err) {
+ printk(KERN_WARNING "Cannot set BCLK clock rate "
+ "for TSC2102 codec, error code = %d\n", err);
+ }
+ }
+
+ clk_enable(tsc2102_bclk);
+no clock management*/
+
+ /* Clock disabled when SSI disabled */
+ //?? SSI_SOR |= 0x40;
+
+ return 0;
+}
+
+/*
+ * Turn off the audio codec and then stop the clock.
+ */
+static int tsc2102_clock_off(void)
+{
+ DPRINTK("clock use count = %d\n", clk_get_usecount(tsc2102_bclk));
+
+/* clk_disable(tsc2102_bclk);
+no clock management */
+
+ /* Clock enabled when SSI disabled */
+ //?? SSI_SOR &= ~0x40;
+
+ return 0;
+}
+
+static int tsc2102_get_default_samplerate(void)
+{
+ return DEFAULT_SAMPLE_RATE;
+}
+
+#ifdef CONFIG_PM
+static int snd_imx_alsa_tsc2102_suspend(
+ struct platform_device *pdev, pm_message_t state)
+{
+ tsc2102_dac_power(0);
+ current_rate = 0;
+
+ return snd_imx_alsa_suspend(pdev, state);
+}
+
+static int snd_imx_alsa_tsc2102_resume(struct platform_device *pdev)
+{
+ tsc2102_dac_power(1);
+
+#ifdef TSC_MASTER
+ tsc2102_set_i2s_master(1);
+#else
+ tsc2102_set_i2s_master(0);
+#endif
+
+ return snd_imx_alsa_resume(pdev);
+}
+#endif // CONFIG_PM
+
+static int __init snd_imx_alsa_tsc2102_probe(struct platform_device *pdev)
+{
+ int ret;
+ struct imx_alsa_codec_config *codec_cfg = pdev->dev.platform_data;
+
+ if (codec_cfg) {
+ codec_cfg->hw_constraints_rates =
+ &tsc2102_hw_constraints_rates;
+ codec_cfg->snd_imx_alsa_playback =
+ &tsc2102_snd_imx_alsa_playback;
+ codec_cfg->codec_configure_dev = tsc2102_configure;
+ codec_cfg->codec_set_samplerate = tsc2102_set_samplerate;
+ codec_cfg->codec_clock_setup = tsc2102_clock_setup;
+ codec_cfg->codec_clock_on = tsc2102_clock_on;
+ codec_cfg->codec_clock_off = tsc2102_clock_off;
+ codec_cfg->get_default_samplerate =
+ tsc2102_get_default_samplerate;
+ ret = snd_imx_alsa_post_probe(pdev, codec_cfg);
+ } else
+ ret = -ENODEV;
+
+ return ret;
+}
+
+static int snd_imx_alsa_tsc2102_remove(struct platform_device *pdev)
+{
+ tsc2102_dac_power(0);
+
+ return snd_imx_alsa_remove(pdev);
+}
+
+static struct platform_driver imx_alsa_driver = {
+ .probe = snd_imx_alsa_tsc2102_probe,
+ .remove = snd_imx_alsa_tsc2102_remove,
+#ifdef CONFIG_PM
+ .suspend = snd_imx_alsa_tsc2102_suspend,
+ .resume = snd_imx_alsa_tsc2102_resume,
+#endif // CONFIG_PM
+ .driver = {
+ .name = "tsc2102-alsa",
+ },
+};
+
+static int __init imx_alsa_tsc2102_init(void)
+{
+ int err;
+
+ ADEBUG();
+ err = platform_driver_register(&imx_alsa_driver);
+
+ return err;
+}
+
+static void __exit imx_alsa_tsc2102_exit(void)
+{
+ ADEBUG();
+ platform_driver_unregister(&imx_alsa_driver);
+}
+
+module_init(imx_alsa_tsc2102_init);
+module_exit(imx_alsa_tsc2102_exit);
+
Added: trunk/target/linux/sound/arm/imx-alsa-tsc2102.h
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa-tsc2102.h (rev 0)
+++ trunk/target/linux/sound/arm/imx-alsa-tsc2102.h 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,46 @@
+/*
+ * sound/arm/imx-alsa-tsc2102.h
+ *
+ * Alsa codec driver for TSC2102 chip for IMX1 platforms.
+ *
+ * Copyright (c) 2008 Jorasse <jo...@ar...>
+ * Code based on the TSC2101 ALSA driver for omap platforms.
+ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
+ * Code based on the TSC2101 ALSA driver.
+ *
+ * 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.
+ */
+
+#ifndef IMX_ALSA_TSC2102_H_
+#define IMX_ALSA_TSC2102_H_
+
+#include <linux/types.h>
+
+/* Define to set the TSC as the master, otherwise slave */
+#define TSC_MASTER
+
+/*
+ * Audio related macros
+ */
+#ifndef DEFAULT_BITPERSAMPLE
+#define DEFAULT_BITPERSAMPLE 16
+#endif
+
+#define DEFAULT_SAMPLE_RATE 48000
+#define CODEC_CLOCK 16000000
+#define AUDIO_MCBSP OMAP_MCBSP1 /* to remove */
+
+/*
+ * ALSA mixer related macros
+ */
+#define OUTPUT_VOLUME_MIN 0x7f /* 1111111 = -63.5 dB */
+#define OUTPUT_VOLUME_MAX 0x00 /* 0000000 */
+#define OUTPUT_VOLUME_RANGE (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX)
+
+#define DEFAULT_OUTPUT_VOLUME 90 /* Default output volume */
+
+#endif /* IMX_ALSA_TSC2102_H_ */
+
Added: trunk/target/linux/sound/arm/imx-alsa.c
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa.c (rev 0)
+++ trunk/target/linux/sound/arm/imx-alsa.c 2008-07-21 17:56:15 UTC (rev 846)
@@ -0,0 +1,683 @@
+/*
+ * sound/arm/imx-alsa.c
+ *
+ * Alsa Driver for i.MXL / SSI
+ *
+ * Copyright (C) 2008 Armadeus Systems <nic...@ar...>
+ * <jul...@ar...>
+ * Based on omap-alsa.c
+ *
+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/spi/tsc2102.h>
+#ifdef CONFIG_PM
+#include <linux/pm.h>
+#endif
+#include <sound/driver.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+
+#include <asm/arch/imx-alsa.h>
+#include <linux/dma-mapping.h>
+#include <asm/arch/imx-dma.h>
+
+#define TSC_MASTER
+
+#define TRANSMIT_WM_LEVEL 8 // (in free places)
+#define SSI_DMA_BLR_TRANSMIT 16 // (3*2) // DMA Burst Length (in bytes)
+#define SSI_DMA_BLR 8
+
+MODULE_AUTHOR("Nicolas Colombain / Julien Boibessot - Armadeus Systems");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("i.MX1/L driver for ALSA");
+MODULE_ALIAS("iMX_alsa_ssi");
+
+static struct snd_card_imx_codec *alsa_codec = NULL;
+static struct imx_alsa_codec_config *alsa_codec_config = NULL;
+
+
+/*
+ * HW interface start and stop helper functions
+ */
+static int audio_ifc_start(void)
+{
+ printk("Starting HW\n");
+ SSI_SCSR |= SSI_TE; /* TE enable */
+ return 0;
+}
+
+static int audio_ifc_stop(void)
+{
+ printk("Stopping HW\n");
+ SSI_SCSR &= ~SSI_TE; /* TE disable */
+ return 0;
+}
+
+#ifdef DEBUG
+static void dump_ssi_registers(void)
+{
+ printk("SSI_STX: 0x%x\n", SSI_STX);
+ printk("SSI_SRX: 0x%x\n", SSI_SRX);
+ printk("SSI_SCSR: 0x%x\n", SSI_SCSR);
+ printk("SSI_STCR: 0x%x\n", SSI_STCR);
+ printk("SSI_SRCR: 0x%x\n", SSI_SRCR);
+ printk("SSI_STCCR: 0x%x\n", SSI_STCCR);
+ printk("SSI_SRCCR: 0x%x\n", SSI_SRCCR);
+ printk("SSI_STSR: 0x%x\n", SSI_STSR);
+ printk("SSI_SFCSR: 0x%x\n", SSI_SFCSR);
+ printk("SSI_STR: 0x%x\n", SSI_STR);
+ printk("SSI_SOR: 0x%x\n", SSI_SOR);
+}
+#endif
+
+static void imx_alsa_audio_init(struct snd_card_imx_codec *imx_alsa)
+{
+ /* Setup DMA stuff */
+ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].id = "Alsa imx out";
+ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].stream_id =
+ SNDRV_PCM_STREAM_PLAYBACK;
+ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev =
+ IMX_DMA_CHANNELS-1;
+ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].hw_start =
+ audio_ifc_start;
+ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].hw_stop =
+ audio_ifc_stop;
+
+ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].id = "Alsa imx in";
+ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].stream_id =
+ SNDRV_PCM_STREAM_CAPTU...
[truncated message content] |
|
From: <ar...@us...> - 2008-07-21 17:44:52
|
Revision: 845
http://armadeus.svn.sourceforge.net/armadeus/?rev=845&view=rev
Author: artemys
Date: 2008-07-21 17:45:01 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[LINUX] remove led.mod.c file from Wb_led driver
Removed Paths:
-------------
trunk/target/linux/modules/fpga/Wb_led/led.mod.c
Deleted: trunk/target/linux/modules/fpga/Wb_led/led.mod.c
===================================================================
--- trunk/target/linux/modules/fpga/Wb_led/led.mod.c 2008-07-21 17:27:09 UTC (rev 844)
+++ trunk/target/linux/modules/fpga/Wb_led/led.mod.c 2008-07-21 17:45:01 UTC (rev 845)
@@ -1,21 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const char __module_depends[]
-__attribute_used__
-__attribute__((section(".modinfo"))) =
-"depends=";
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-21 17:27:00
|
Revision: 844
http://armadeus.svn.sourceforge.net/armadeus/?rev=844&view=rev
Author: artemys
Date: 2008-07-21 17:27:09 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[LINUX] Allows isp1761 driver to be compiled as static or module (even if it's not working when compiled as static: bug opened)
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/Makefile
trunk/target/linux/modules/isp1761/hal/Makefile
trunk/target/linux/modules/isp1761/host/Makefile
Modified: trunk/target/linux/modules/isp1761/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/Makefile 2008-07-21 13:29:45 UTC (rev 843)
+++ trunk/target/linux/modules/isp1761/Makefile 2008-07-21 17:27:09 UTC (rev 844)
@@ -11,9 +11,11 @@
else
BASE_DIR="../../../../buildroot/"
+BUILD_DIR_EXT:=$(shell ls $(BASE_DIR) | grep -e "^build_arm*")
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)
+
+ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_DIR_EXT)/linux-$(REL)
ifeq ($(LINUX_DIR),)
LINUX_DIR := $(ARMADEUS_KERNEL_DIR)
endif
Modified: trunk/target/linux/modules/isp1761/hal/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/hal/Makefile 2008-07-21 13:29:45 UTC (rev 843)
+++ trunk/target/linux/modules/isp1761/hal/Makefile 2008-07-21 17:27:09 UTC (rev 844)
@@ -1 +1,3 @@
-obj-m := hal_imx.o
+#
+#
+obj-$(CONFIG_ARMADEUS_ISP1761) := hal_imx.o
Modified: trunk/target/linux/modules/isp1761/host/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/host/Makefile 2008-07-21 13:29:45 UTC (rev 843)
+++ trunk/target/linux/modules/isp1761/host/Makefile 2008-07-21 17:27:09 UTC (rev 844)
@@ -1,4 +1,6 @@
-obj-m := pehci.o
+#
+#
+obj-$(CONFIG_ARMADEUS_ISP1761) := pehci.o
clean:
find . -name '*.mod.[co]' -or -name '.*.o.cmd' | xargs rm -f
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-21 13:29:39
|
Revision: 843
http://armadeus.svn.sourceforge.net/armadeus/?rev=843&view=rev
Author: artemys
Date: 2008-07-21 13:29:45 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[FIRMWARE] Rend ?\195?\160 C?\195?\169sar ce qui est ?\195?\160 C?\195?\169sar...
Modified Paths:
--------------
trunk/firmware/wishbone_example/src/wishbone/syscon.vhd
Modified: trunk/firmware/wishbone_example/src/wishbone/syscon.vhd
===================================================================
--- trunk/firmware/wishbone_example/src/wishbone/syscon.vhd 2008-07-21 13:27:50 UTC (rev 842)
+++ trunk/firmware/wishbone_example/src/wishbone/syscon.vhd 2008-07-21 13:29:45 UTC (rev 843)
@@ -1,6 +1,7 @@
---------------------------------------------------------------------------
-- Company : ARMadeus Systems
--- Author(s) : Fabien Marteau
+-- Author(s) : Fabrice Mousset (fab...@la...),
+-- modified by Fabien Marteau (fab...@ar...)
--
-- Creation Date : 05/03/2008
-- File : syscon.vhd
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-21 13:27:45
|
Revision: 842
http://armadeus.svn.sourceforge.net/armadeus/?rev=842&view=rev
Author: artemys
Date: 2008-07-21 13:27:50 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[FIRMWARE] New version of Yvan Roch's servo IP
Modified Paths:
--------------
trunk/firmware/servo/README.txt
trunk/firmware/servo/SERVO_top.vhd
trunk/firmware/servo/pwm_module.vhd
trunk/firmware/servo/servo.ucf
Added Paths:
-----------
trunk/firmware/servo/COUNTER.vhd
trunk/firmware/servo/RESET_MODULE.vhd
Removed Paths:
-------------
trunk/firmware/servo/CLK_GENERATOR.vhd
Deleted: trunk/firmware/servo/CLK_GENERATOR.vhd
===================================================================
--- trunk/firmware/servo/CLK_GENERATOR.vhd 2008-07-21 12:46:08 UTC (rev 841)
+++ trunk/firmware/servo/CLK_GENERATOR.vhd 2008-07-21 13:27:50 UTC (rev 842)
@@ -1,84 +0,0 @@
-----------------------------------------------------------------------------------
--- Company: Armadeus Project
--- Engineer: Yvan Roch
---
--- Create Date: 2007-12-03
--- Design Name:
--- Module Name: CLK_GENERATOR - behavioral
--- Project Name:
--- Target Devices: Spartan3 Armadeus
--- Tool versions: ISE 9.2.02i
--- Description: Servo Contoller
---
--- Dependencies:
---
--- Revision:
--- Revision 0.01 - File Created
--- Additional Comments:
--- Ce module est un diviseur d'horloge, il fourni un signal d'horloge a 4MHz
--- et maintient le compteur 16 bits utilise par tous les modules PWM
-----------------------------------------------------------------------------------
-library IEEE;
-use IEEE.STD_LOGIC_1164.ALL;
-use IEEE.STD_LOGIC_ARITH.ALL;
-use IEEE.STD_LOGIC_UNSIGNED.ALL;
-
-entity CLK_GENERATOR is
- port (clkIn : in STD_LOGIC; -- Entree de l'horloge a 96 MHz provenant du MC9328MXL
- counterOut16Bits : out std_logic_vector(15 downto 0); -- Compteur 16 bits utilise par tous les modules PWM
- writeValue : out STD_LOGIC); -- Validation de la mise a jour des registres internes des modules PWM
-end entity CLK_GENERATOR;
-
-architecture behavioral of CLK_GENERATOR is
- signal clkInternalOut : STD_LOGIC := '0'; -- Registre interne du generateur 4MHz
- signal counter : std_logic_vector(15 downto 0) := X"0000"; -- Registre interne du compteur
-
-begin
- -- generation du signal 4MHz
- process (clkIn)
- variable countMax : integer; -- Valeur numerique du countMax
- variable count : integer;
-
- begin
- -- Sur front montant de clkIn
- if (clkIn'event) and (clkIn = '1') then
- -- Compte le nombre de cycle d'horloge
- count := count + 1;
- -- Pour une frequence de sortie de 4MHz
- countMax := 24;
- -- Si countMax/2 est atteint
- -- La frequence de sortie vaut: 1/((1/96000000)*countMax)
- if (count = countMax/2) then
- clkInternalOut <= not clkInternalOut;
- count := 0;
- end if;
- end if;
- end process;
-
- -- gestion du compteur 16 bits
- process (clkInternalOut)
-
- begin
- -- Sur front montant de clkInternalOut
- if (clkInternalOut'event and clkInternalOut = '1') then
- counter <= counter + 1;
- -- Sortie de la valeur du compteur
- counterOut16Bits <= counter;
- -- Generation du signal writeValue
- if (counter > "1111100000110000") then
- -- Debut de la generation de l'impulsion PWM (partie constante de 0.5ms)
- -- a la valeur 63536 du counter
- -- => Mise a jour des registres interdite
- writeValue <= '0';
- elsif (counter < "0001111111111110") then
- -- Generation impulsions PWM en cours
- -- valeur maximale du compteur 12 bits
- -- => Mise a jour des registres interdite
- writeValue <= '0';
- else
- -- Dans les autre cas, les sorties PWM sont a 0 => Mise jour des registres possible
- writeValue <= '1';
- end if;
- end if;
- end process;
-end architecture behavioral;
Added: trunk/firmware/servo/COUNTER.vhd
===================================================================
--- trunk/firmware/servo/COUNTER.vhd (rev 0)
+++ trunk/firmware/servo/COUNTER.vhd 2008-07-21 13:27:50 UTC (rev 842)
@@ -0,0 +1,77 @@
+--------------------------------------------------------------------------------
+-- Copyright (C) 2008 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 3 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, see <http://www.gnu.org/licenses/>.
+--------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Yvan Roch
+--
+-- Create Date: 2007-12-03
+-- Design Name:
+-- Module Name: COUNTER - behavioral
+-- Project Name:
+-- Target Devices: Spartan3 Armadeus
+-- Tool versions: ISE 9.2.02i
+-- Description: Servo Contoller
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Revision 0.02 - 2008-05-11 (see SERVO_top.vhd)
+-- Revision 0.03 - 2008-07-09 (see SERVO_top.vhd)
+-- Additional Comments:
+-- This module is a 16bits counter.
+-- It maintains a 16 bits counter at 4 MHz used by all the PWM modules.
+----------------------------------------------------------------------------------
+library IEEE;
+-- IEEE.STD_LOGIC_UNSIGNED.ALL and IEEE.STD_LOGIC_ARITH.ALL are not used because
+-- they may have some incompability with some synthesizer (SYNOPSYS library)
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+
+entity COUNTER_MODULE is
+ -- Clock division ratio
+ -- Default value of 24 for counter output at 4MHz
+ generic(ratio : integer := 24);
+
+ port (clkIn : in STD_LOGIC; -- 96 MHz clock input from MC9328MXL
+ counterOut16Bits : out std_logic_vector(15 downto 0) -- 16 bits counter used by all the PWM modules
+ );
+end entity COUNTER_MODULE;
+
+architecture behavioral of COUNTER_MODULE is
+ signal counter : std_logic_vector(15 downto 0) := X"0000"; -- Internal 16 bits counter register
+
+begin
+ -- 4MHz counter
+ process (clkIn)
+ variable count : integer range 0 to ratio;
+
+ begin
+ -- On the rising edge of clkIn
+ if (rising_edge(clkIn)) then
+ -- Count the 96MHz signal
+ count := count + 1;
+ -- 16 bits 96/ratio MHz counter management
+ -- For ratio=24, counter is incremented at 4MHz rate
+ if (count = ratio) then
+ count := 0;
+ counter <= std_logic_vector(unsigned(counter) + 1);
+ counterOut16Bits <= counter;
+ end if;
+ end if;
+ end process;
+end architecture behavioral;
Modified: trunk/firmware/servo/README.txt
===================================================================
--- trunk/firmware/servo/README.txt 2008-07-21 12:46:08 UTC (rev 841)
+++ trunk/firmware/servo/README.txt 2008-07-21 13:27:50 UTC (rev 842)
@@ -1,27 +1,47 @@
-Ce projet est un firmware FPGA de contolleur de servo de telecommande.
-Une description de ce genre de servos peut \xEAtre trouve a:
+--------------------------------------------------------------------------------
+-- Copyright (C) 2008 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 3 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, see <http://www.gnu.org/licenses/>.
+--------------------------------------------------------------------------------
+
+This project is a FPGA firmware for R/C servos.
+
+A description of such R/C servos can be found at:
http://fribotte.free.fr/bdtech/pic/pic_et_servo.html
-Il est inspire du projet "Atmel AVR 2004 Design Contest Entry Project Number A3722"
-de Circuit Cellar par Eric Gagnon :
+
+It is inspired from the project:
+"Atmel AVR 2004 Design Contest Entry Project Number A3722"
+of Circuit Cellar by Eric Gagnon :
http://www.circuitcellar.com/avr2004/HA3722.html
-Ce controleur de servo permet de controler jusqu'a 24 servos.
-Il est facilement extensible a plus.
-L'utilisation d'un FPGA est justifie car avec les sorties classiques d'un microcontroleur,
-meme avec l'utilisation d'un timer hardware et d'une programmation en assembleur,
-le repect precis des largeurs des impulsions PWM est quasi impossible surtout avec
-un nombre eleve de servos a commander.
-Un FPGA permet de realiser une concurence vraie dans la generation des signaux.
-D'ailleurs avec ce controleur, il n'y a pas de fretillement des servos quelque
-soient leur position les uns par rapport aux autres, ce qui n'est pas le cas
-dans une solution classique a microcontoleur.
+This controler is able to drive from 1 to 32 R/C servos.
-1 - CREATION D'UN NOUVEAU PROJET DANS XILINX ISE
-Version Xilinx ISE 9.2.04i
-Creer le nouveau projet:
+The FPGA use is justify because with classical microcontoller outputs, hardware timers
+and assembly programming, the strict respect of PWM timing is almost impossible with
+numerous R/C servos.
+FPGA can build a module with a "true" concurrency in PWM signals generation.
+With this controller, there is no R/C servo jittering. For more explanation
+about servo jittering:
+http://www.circuitcellar.com/avr2004/wentries/A3722.zip
+
+1 - CREATE A NEW PROJECT IN XILINX ISE:
+Xilinx ISE Version: 9.2.04i
+Create a new project:
File->New Project
-Selectionner Top Level Source: HDL (Harware Description Language)
-Pour le FPGA de la carte Armadeus choisir:
+Select Top Level Source: HDL (Harware Description Language)
+For the Aramadeus FPGA choose:
Family: Spartan3
Device: XC3S200
Package: TQ144
@@ -31,60 +51,60 @@
Simulator: ISE Simulator (VHDL/Verilog)
Preferred Language: VHDL
-Importer les fichiers sources dans le projet ISE:
+Import the source files in the project:
Projet->Add Source
-Selectionner les fichiers:
+Select files:
SERVO_top.vhd
-CLK_GENERATOR.vhd
+COUNTER.vhd
pwm_module.vhd
servo.ucf
-2 - SYNTHESE - CREATION DU FICHIER FIRMWARE SERVO_top.bit
-Generate Programming File->clic droit->Run
+2 - SYNTHESIZE - SERVO_top.bit FIRMWARE FILE CREATION
+Generate Programming File->right clic->Run
-3 - CHARGEMENT DU FIRMWARE SERVO_top.bit DANS L'APF9328
-Se placer dans le repertoire qui contient le fichier SERVO_top.bit
+3 - LOADING OF SERVO_top.bit FIRMWARE FILE IN APF9328
+Go to the SERVO_top.bit directory
-Etablir une connexion RS232 avec l'APF9328 comme le decrit:
+Establish a RS232 link to APF9328 as describe:
http://www.armadeus.com/wiki/index.php?title=Connection_with_U-Boot_on_Linux
-Mettre sous tension l'APF9328
-Au message Hit any key to stop autoboot:
-Appuyer sur une touche pour obtenir le prompt:
+Power up APF9328
+At message Hit any key to stop autoboot:
+Hit any key to obtain the command prompt:
BIOS>
-Choisir l'emplacement memoire de l'upload:
+Choose the upload memory address:
loadb 08000000
-Le message:
+The message:
## Ready for binary (kermit) download to 0x08000000 at 115200 bps...
-apparait.
+is printed.
-Passer en mode commande Kermit:
+Change to the Kermit command mode:
Ctrl+Altgr+\+c
-Upload du fichier:
+File upload:
send SERVO_top.bit
-Kermit upload le fichier.
-Taper c pour reconnecter le terminal.
+Kermit upload the file.
+Hit c to reconnect the terminal.
-Flasher le firmware:
+Firmware Flashing:
run flash_firmware
-Charger le firmware dans le FPGA:
+Loading the firmware in the FPGA:
fpga load 0 ${firmware_addr} ${firmware_len}
-Pour un chargement automatique au boot:
+For an automatic loading at boot:
setenv firmware_autoload 1
saveenv
-Le firmware est maintenant charge et utilisable.
+The firmware is now usable:
-4 - UTILISATION DU FIRMWARE
-Actuellement seul le firmware est ecrit.
-Les servos sont a brancher sur les ports de la DevLight suivants via un buffer
-74HCT244:
+4 - USING FIRMWARE
+Actually, only the firmware is written.
+R/C servos must be connected to the DevLight ports via a 74HCT244 buffer:
+
L24N_3/P87 -> servo 00
L24P_3/P86 -> servo 01
L23N_3/P85 -> servo 02
@@ -109,58 +129,68 @@
L31P_0/P129 -> servo 21
L31N_0/P130 -> servo 22
L32N_1/P125 -> servo 23
+L30P_0/P131 -> servo 24
+L30N_0/P132 -> servo 25
+L27P_0/P135 -> servo 26
+L28N_1/P119 -> servo 27
+L28P_1/P118 -> servo 28
+IO1/P116 -> servo 29
+L01P_1/P112 -> servo 30
+L01P_1/P112 -> servo 31
-Commande BIOS pour le controle des servos:
-Au chargement du firmware, tous les servos sont desactives.
+BIOS commands for R/C servos controlling:
+At firmware initialisation, all R/C servos are disable.
-Activation des servos 0-15:
-mw.w 12000040 FFFF
+Servos 0-15 enabling:
+mw.w 1200000A FFFF
-Activation des servos 16-23:
-mw.w 12000042 00FF
+Servos 16-31 enabling:
+mw.w 1200000C FFFF
-Desactivation des servos 0-15:
-mw.w 12000040 0000
+At firmware initialisation, all R/C servos are in medium position.
+Put the servo 0 on the maximal counterclockwise position:
+mw.w 12000010 0000
+Put the servo 0 on the median position:
+mw.w 12000010 0800
+Put the servo 0 on the maximal clockwise position:
+mw.w 12000010 0FFF
-Desactivation des servos 16-23:
-mw.w 12000042 0000
+R/C servos addresses:
+0x12000010 -> servo 0
+0x12000012 -> servo 1
+0x12000014 -> servo 2
+0x12000016 -> servo 3
+0x12000018 -> servo 4
+0x1200001A -> servo 5
+0x1200001C -> servo 6
+0x1200001E -> servo 7
+0x12000020 -> servo 8
+0x12000022 -> servo 9
+0x12000024 -> servo 10
+0x12000026 -> servo 11
+0x12000028 -> servo 12
+0x1200002A -> servo 13
+0x1200002C -> servo 14
+0x1200002E -> servo 15
+0x12000030 -> servo 16
+0x12000032 -> servo 17
+0x12000034 -> servo 18
+0x12000036 -> servo 19
+0x12000038 -> servo 20
+0x1200003A -> servo 21
+0x1200003C -> servo 22
+0x1200003E -> servo 23
+0x12000040 -> servo 24
+0x12000042 -> servo 25
+0x12000044 -> servo 26
+0x12000046 -> servo 27
+0x12000048 -> servo 28
+0x1200004A -> servo 29
+0x1200004C -> servo 30
+0x1200004E -> servo 31
-Au chargement du firmware, tous les servos sont en position mediane.
-Positionnement du servo 0 a la position maximale anti-horaire:
-mw.w 12000000 0000
-Positionnement du servo 0 a la position maximale horaire:
-mw.w 12000000 0FFF
-Positionnement du servo 0 a la position mediane:
-mw.w 12000000 0800
-
-Voici les adresses a utiliser pour les autres servos:
-0x12000000 -> servo 0
-0x12000002 -> servo 1
-0x12000004 -> servo 2
-0x12000006 -> servo 3
-0x12000008 -> servo 4
-0x1200000A -> servo 5
-0x1200000C -> servo 6
-0x1200000E -> servo 7
-0x12000010 -> servo 8
-0x12000012 -> servo 9
-0x12000014 -> servo 10
-0x12000016 -> servo 11
-0x12000018 -> servo 12
-0x1200001A -> servo 13
-0x1200001C -> servo 14
-0x1200001E -> servo 15
-0x12000020 -> servo 16
-0x12000022 -> servo 17
-0x12000024 -> servo 18
-0x12000026 -> servo 19
-0x12000028 -> servo 20
-0x1200002A -> servo 21
-0x1200002C -> servo 22
-0x1200002E -> servo 23
-
5 - ROAD MAP
-De futurs developpements sont en cours:
- - Driver Linux pour le firmware FPGA,
- - Daemon de commande des servos via le driver Linux,
- - Client reseau pour daemon de commande...
+Developements in progress:
+ - Linux Kernel Driver for this firmware
+ - Command Daemon for the Linux Kernel Driver,
+ - Network Client for the Command Daemon...
Added: trunk/firmware/servo/RESET_MODULE.vhd
===================================================================
--- trunk/firmware/servo/RESET_MODULE.vhd (rev 0)
+++ trunk/firmware/servo/RESET_MODULE.vhd 2008-07-21 13:27:50 UTC (rev 842)
@@ -0,0 +1,112 @@
+--------------------------------------------------------------------------------
+-- Copyright (C) 2008 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 3 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, see <http://www.gnu.org/licenses/>.
+--------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Yvan ROCH
+--
+-- Create Date: 2008-05-21
+-- Design Name:
+-- Module Name: RESET - behavioral
+-- Project Name: SERVO
+-- Target Devices: Spartan3 Armadeus
+-- Tool versions: ISE 9.2.02i
+-- Description: Reset Generator
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Revision 0.02 - 2008-05-11 (see SERVO_top.vhd)
+-- Revision 0.03 - 2008-07-09 (see SERVO_top.vhd)
+-- Additional Comments:
+-- This code comes from Fabrice Mousset (syscon.vhd Wisbone_example)
+
+-- To avoid the Warning Messages from XST:
+-- WARNING:Xst:2677 - Node <resetGenerator/resetInside_4> of sequential type is unconnected in block <SERVO_top>.
+-- .
+-- .
+-- .
+-- WARNING:Xst:2677 - Node <resetGenerator/resetInside_20> of sequential type is unconnected in block <SERVO_top>.
+-- FlipFlop resetGenerator/resetInside has been replicated 20 time(s)
+-- With ISE
+-- In ISE -> Synthesize - XST -> Properties -> Xilinx Specific Options (advanced) -> Unckeck Register Duplication
+-- In the VHDL source
+-- attribute register_duplication: string;
+-- attribute register_duplication of resetInside : signal is "yes";
+-- See XST User Guide 8.1i: Chapter 5 p395 Register Duplication
+-- The fanout of the resetCold is enought whitout duplication (Max Fanout is 500 for a Saprtan 3)...
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+
+---------------------------------------------------------------------------
+Entity RESET_MODULE is
+---------------------------------------------------------------------------
+port
+(
+ -- Clock Input
+ clkIn : in std_logic ;
+ -- External Reset Input
+ resetIn : in std_logic ;
+ -- Well formed reset signal
+ resetOut : out std_logic
+);
+end entity;
+
+---------------------------------------------------------------------------
+Architecture behavioral of RESET_MODULE is
+---------------------------------------------------------------------------
+signal delayCold: std_logic := '0';
+signal resetCold: std_logic := '0';
+signal resetReqPulse: std_logic := '0';
+
+
+-- No Register Duplication for signal reset
+attribute register_duplication: string;
+attribute register_duplication of resetCold : signal is "no";
+
+begin
+----------------------------------------------------------------------------
+-- RESET signal generator.
+----------------------------------------------------------------------------
+ process(clkIn,resetIn)
+ variable resetInEdgeDetect : std_logic := '0';
+ begin
+ -- This process generate a 1->0 0->1 transition on
+ -- the resetReqPulse when these a rinsing edge on resetIn
+ if(rising_edge(clkIn)) then
+ if (resetInEdgeDetect = '0' and resetIn ='1') then
+ resetReqPulse <= '0';
+ else
+ resetReqPulse <= '1';
+ end if;
+ resetInEdgeDetect :=resetIn;
+ end if;
+ end process;
+
+ process(clkIn)
+ begin
+ -- Generating one pulse on resetCold on startup for 2 rising edge of clkIn
+ -- Generating one pulse on resetCold on pulse on resetReqPulse
+ if(rising_edge(clkIn)) then
+ delayCold <= (not(resetReqPulse) and delayCold and not(resetCold))
+ or (not(delayCold) and resetCold);
+ resetCold <= (not(resetReqPulse) and not(delayCold) and not(resetCold) );
+ end if;
+ end process;
+ resetOut <= resetCold;
+end architecture behavioral;
Modified: trunk/firmware/servo/SERVO_top.vhd
===================================================================
--- trunk/firmware/servo/SERVO_top.vhd 2008-07-21 12:46:08 UTC (rev 841)
+++ trunk/firmware/servo/SERVO_top.vhd 2008-07-21 13:27:50 UTC (rev 842)
@@ -1,4 +1,20 @@
-----------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+-- Copyright (C) 2008 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 3 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, see <http://www.gnu.org/licenses/>.
+--------------------------------------------------------------------------------
-- Company: Armadeus Project
-- Engineer: Yvan ROCH
--
@@ -14,594 +30,333 @@
--
-- Revision:
-- Revision 0.01 - File Created
+-- Revision 0.02 - 2008-05-11
+-- Application of sonzerro and Fabrice Mousset recommendations:
+-- - All comments are in english.
+-- - Synchronous design, using of a single clock and removing the writeValue
+-- signal.
+-- - Using a reset signal.
+-- - Using of rising_edge.
+-- - Using generic parameters (number of servos...).
+-- - Using generator for multiple entity.
+-- - Using integer with range.
+-- Removing unedeed signal readAccessPulse.
+-- Adding MagicID register for firmware recognition from Linux driver.
+-- Adding Firmware Version register for versatile configuration of Linux driver.
+-- Adding Number of servos register for versatile configuration of Linux driver.
+-- Adding Command/Status register for send command (like reset) to the firmware.
+-- Revision 0.03 - 2008-07-09
+-- - Use IEEE.NUMERIC_STD only. Avoid the use of SYNOPSYS Library
+-- IEEE.STD_LOGIC_UNSIGNED and IEEE.STD_LOGIC_ARITH.
+-- - Synchronous design, using of a single clock (removing 4MHz unused clock)
+-- - Asynchronous Reset
+--
-- Additional Comments:
--- Ce projet est un firmware FPGA de contolleur de servo de telecommande
--- Il est inspirer du projet "Atmel AVR 2004 Design Contest Entry Project Number A3722"
--- de Circuit Cellar par Eric Gagnon :
+-- This project is a R/C servos controller FPGA Firmware for the Xilinx Spartan3 embedded
+-- on the Armadeus board. It is inspired from the project
+-- "Atmel AVR 2004 Design Contest Entry Project Number A3722" of Circuit Cellar
+-- from Eric Gagnon :
-- http://www.circuitcellar.com/avr2004/HA3722.html
--
--- Ce controleur de servo permet de controle jusqu'a 24 servos.
--- Il est facilement extensible a plus.
---
--- Chaque registre de servo (0x12000000 - 0x1200002E) est un registre 16 bits
--- avec 12 bits significatifs contenant la position du servo concerne.
--- 0000 ecrit a l'adresse 0x12000000 positionnera le servo 0 a la position maximale anti-horaire
--- 0800 ecrit a l'adresse 0x12000000 positionnera le servo 0 a la position mediane
--- 0FFF ecrit a l'adresse 0x12000000 positionnera le servo 0 a la position maximale horaire
--- Les registres 0x12000030 et 0x12000032 sont les registres de validation des servos
--- 0001 ecrit a l'adresse 0x12000030 activera le servo 0
--- 0001 ecrit a l'adresse 0x12000032 activera le servo 16
+-- This controler is able to drive from 1 to 32 R/C servos.
+-- This number is controled by the generic parameter 'nbrServos'
--
--- Decodage d'adresse:
--- 0x12000000 servo 0
--- 0x12000002 servo 1
--- 0x12000004 servo 2
--- 0x12000006 servo 3
--- 0x12000008 servo 4
--- 0x1200000A servo 5
--- 0x1200000C servo 6
--- 0x1200000E servo 7
--- 0x12000010 servo 8
--- 0x12000012 servo 9
--- 0x12000014 servo 10
--- 0x12000016 servo 11
--- 0x12000018 servo 12
--- 0x1200001A servo 13
--- 0x1200001C servo 14
--- 0x1200001E servo 15
--- 0x12000020 servo 16
--- 0x12000022 servo 17
--- 0x12000024 servo 18
--- 0x12000026 servo 19
--- 0x12000028 servo 20
--- 0x1200002A servo 21
--- 0x1200002C servo 22
--- 0x1200002E servo 23
--- 0x12000030 Registre de validation LSB
--- 0x12000032 Registre de validation MSB
+-- Addresses Mapping
+-- Spartan3 Base Address on Armadeus Board: 0x12000000
+-- Magic ID Register: 0x12000000
+-- Firmware Version Register: 0x12000002
+-- Number of R/C servos managed: 0x12000004
+-- Status Register: 0x12000006
+-- Command Register: 0x12000008
+-- Enable Servo Register LSB: 0x1200000A
+-- Enable Servo Register MSB: 0x1200000C
+-- Base Address of Servos Position Registers 0x12000010
+--
+-- Each servo has a 16 bits position register with only 12 signifiant bits that containt the servo position.
+-- Example:
+-- 0000 written at address 0x12000010 will put the servo 0 on the maximal counterclockwise position.
+-- 0800 written at address 0x12000010 will put the servo 0 on the median position.
+-- 0FFF written at address 0x12000010 will put the servo 0 on the maximal clockwise position.
+--
+-- The Enable Servo Register LSB and Enable Servo Register MSB are the servos enable control registers:
+-- XXX1 written at address 0x1200000A will enable the servo 0 (the servo will keep his planed position)
+-- XXX0 written at address 0x1200000A will disable the servo 0 (the servo is freewheeling)
+-- XXX1 written at address 0x1200000C will enable the servo 16 (the servo will keep his planed position)
+-- XXX0 written at address 0x1200000C will disable the servo 16 (the servo is freewheeling)
+--
+-- Status Register:
+-- bit0: If set, a write error occured
+--
+-- Command Register:
+-- bit0: If set, the firmware will reset
+--------------------------------------------------------------------------------
---
-----------------------------------------------------------------------------------
-
library IEEE;
+-- IEEE.STD_LOGIC_UNSIGNED.ALL and IEEE.STD_LOGIC_ARITH.ALL are not used because
+-- they may have some incompability with some synthesizer (SYNOPSYS library)
use IEEE.STD_LOGIC_1164.ALL;
-use IEEE.STD_LOGIC_ARITH.ALL;
-use IEEE.STD_LOGIC_UNSIGNED.ALL;
+use IEEE.NUMERIC_STD.ALL;
entity SERVO_top is
+ -- nbrServos is the number of servos managed by this module
+ -- nbrServos is not declared as a constant because it is used is the
+ -- port declaration section of this module (the synthetizer does not permit that)
+ -- When changing nbrServos you must modify the servo.ucf file for connecting
+ -- pwmOut<XX> properly.
+ generic ( nbrServos : integer := 32);
port ( -- MC9328MXL pins
- -- Bus de donnees 16 bits
+ -- MC9328MXL 16 bits Data Bus
DataxD : inout std_logic_vector(15 downto 0);
- -- Bus d'adresses A0-A12
- -- L'adresse de base du Spartan3 est 0x12000000
+ -- MC9328MXL Address Bus A0-A12
+ -- The Spartan3 base addressis 0x12000000
AddrxDI : in std_logic_vector(12 downto 0);
- -- Acces en ecriture (APF9328: CTRL9, Spartan3 pin 60, MC9328MXL: EB3n pin M5) Actif Bas
- -- Ce signal du MC9328MXL est actif au niveau bas en ecriture ET en lecture
- -- Selon le Data Sheet du MC9328MXL P4:
- -- LSB Byte Strobe?Active low external enable byte signal that controls D [7:0].
- -- Voir timing Write P28
+ -- Write access (APF9328: CTRL9, Spartan3 pin 60, MC9328MXL: EB3n pin M5) Active Low
+ -- This signal from the MC9328MXL is active low for write AND read operations
+ -- According to MC9328MXL Data Sheet p4:
+ -- LSB Byte Strobe Active low external enable byte signal that controls D [7:0].
+ -- See Write timing p28
WRxBI : in std_logic;
- -- Acces en lecture (APF9328: CTRL10, Spartan3 pin 63, MC9328MXL: OEn pin R5) Actif Bas
- -- Ce signal du MC9328MXL est actif au niveau bas en lecture UNIQUEMENT
- -- Selon le Data Sheet du MC9328MXL P4:
+ -- Read access (APF9328: CTRL10, Spartan3 pin 63, MC9328MXL: OEn pin R5) Active Low
+ -- This signal from the MC9328MXL is active low for read operation SOLELY
+ -- According to MC9328MXL Data Sheet p4:
-- Memory Output Enable?Active low output enables external data bus.
- -- Voir timing Read P26
+ -- See Read timing P26
RDxBI : in std_logic;
- -- Remarque sur WRxBI et RDxBI:
- -- RDxBI est en fait OEn, actif lors de la lecture UNIQUEMENT sur le bus externe du MC9328MXL
- -- WRxBI est en fait EB3n, actif lors de l'acc\xE8s a l'octet de poids faible du bus de donn\xE9es en lecture ET en ecriture
- -- Ce n'est pas tr\xE8s clair car ces deux signaux ne sont pas mutuellement exclusifs!!!
- -- En resum\xE9:
- -- Lors d'une lecture: RDxBI=0 et WRxBI=0 (les 2 actifs a 0)
- -- Lors d'une ecriture: RDxBI=1 et WRxBI=0 (les 2 actifs a 0)
+ -- Comments on WRxBI et RDxBI:
+ -- RDxBI is in fact OEn, active SOLELY on read operations on the MC9328MXL external bus.
+ -- WRxBI is in fact EB3n, active on read AND write operations on the LSB byte of the data bus.
+ -- It is not very clear because these signals are not mutually exclusive!!!
+ -- To resume:
+ -- On read operations: RDxBI=0 et WRxBI=0 (both acvite low)
+ -- On write operations: RDxBI=1 et WRxBI=0 (both acvite low)
- -- Chip select (APF9328: CTRL1, Spartan3 pin 59, MC9328MXL: CS1n M8) Actif Bas
+ -- Chip select (APF9328: CTRL1, Spartan3 pin 59, MC9328MXL: CS1n M8) Active Low
CSxBI : in std_logic;
- -- Entree de l'horloge a 96 MHz provenant du MC9328MXL sur la broche P55 du Spartan3
+ -- Clock input at 96 MHz from MC9328MXL on Spartan3 pin P55
clkInImx96MHz : in STD_LOGIC;
- -- Declaration des 24 registres de 1 bit contenant la sortie PWM
- pwmOut : out std_logic_vector(23 downto 0));
-
+ -- nbrServos 1 bit register declaration for PWM outputs
+ pwmOut : out std_logic_vector(nbrServos-1 downto 0)
+ );
end entity SERVO_top;
architecture structural of SERVO_top is
- -- Declaration du type reg12Array24 qui contient 24 signaux de 12 bits
- -- Ce type est utilise pour les 24 registres de position des servos
- type reg12Array24 is array(0 to 23) of std_logic_vector(11 downto 0);
+ -- Contants declaration
+ -- Magic ID
+ constant regMagicID : std_logic_vector(15 downto 0) := X"7207";
+ -- Firmware Version
+ constant regFirmwareVersion : std_logic_vector(15 downto 0) := X"0003";
+ -- MagicID register Address: 0x12000000
+ constant regMagicIDAddr : std_logic_vector(12 downto 0) := "0000000000000";
+ -- Firmaware version register Address:0x12000002
+ constant regFirmwareVersionAddr : std_logic_vector(12 downto 0) := "0000000000010";
+ -- Number of servos register Address: 0x12000004
+ constant regNumberServosAddr : std_logic_vector(12 downto 0) := "0000000000100";
+ -- Status register Address: 0x12000006
+ constant regStatusAddr : std_logic_vector(12 downto 0) := "0000000000110";
+ -- Command register Address: 0x12000008
+ constant regCmdAddr : std_logic_vector(12 downto 0) := "0000000001000";
+ -- Servos Validation Register LSB Address: 0x1200000A
+ constant regServosValidationLSBAddr : std_logic_vector(12 downto 0) := "0000000001010";
+ -- Servos Validation Register MSB Address: 0x1200000C
+ constant regServosValidationMSBAddr : std_logic_vector(12 downto 0) := "0000000001100";
+ -- Servos Position Registers base address : 0x12000010
+ -- Servo N Position Register address is : N*2 + addrRegServosPositionDase
+ constant addrRegServosPositionDaseAddr : std_logic_vector(12 downto 0) := "0000000010000";
+
+ -- Type reg12Array declaration that containts nbrServos signals of 12 bits
+ -- This type is used for the sorvos positions registers
+ type reg12Array is array(0 to nbrServos-1) of std_logic_vector(11 downto 0);
- -- Declaration des 24 registres de 16 bits contenant la position des servos
- -- Initialisation en position mediane des servos
- -- Position Min: 0
- -- Position Max: FFF
- signal servosReg : reg12Array24 := (X"800",X"800",X"800",X"800",X"800",X"800",
- X"800",X"800",X"800",X"800",X"800",X"800",X"800",X"800",X"800",X"800",X"800",
- X"800",X"800",X"800",X"800",X"800",X"800",X"800");
- -- Declaration des 24 registres de 1 bit contenant la validation des servos
- -- Initailisation: tous les servo sont desactives
- signal enableReg : std_logic_vector(31 downto 0) := X"00000000";
+ -- Reset Generator Declaration
+ component RESET_MODULE
+ -- Ports declaration
+ port
+ (
+ -- Clock Input
+ clkIn : in std_logic ;
+ -- External Reset Input
+ resetIn : in std_logic ;
+ -- Well formed reset signal
+ resetOut : out std_logic
+ );
+ end component RESET_MODULE;
- -- Declaration du diviseur d'horloge
- component CLK_GENERATOR
- -- Declaration des ports utilises
+ -- Counter declaration
+ component COUNTER_MODULE
+ -- Ports declaration
port (clkIn : in STD_LOGIC;
- counterOut16Bits : out std_logic_vector(15 downto 0);
- writeValue : out STD_LOGIC);
- end component CLK_GENERATOR;
+ counterOut16Bits : out std_logic_vector(15 downto 0));
+ end component COUNTER_MODULE;
- -- Declaration du generateur PWM
+ -- PWM generator declaration
component PWM_MODULE
- -- Declaration des ports utilises
+ -- Ports declaration
Port (count : in std_logic_vector(15 downto 0);
+ clkIn : in std_logic;
servosReg : in std_logic_vector( 11 downto 0);
enableReg: in std_logic;
- pwmOut : out std_logic;
- writeValue : in std_logic);
+ pwmOut : out std_logic);
end component PWM_MODULE;
- -- Declaration des signaux
- -- Reset asynchrone actif bas
- signal resetn : std_logic;
- -- Signal de synchro de lecture
- signal readAccessPulse : std_logic;
- -- Signal buffer pour compteur principal
+ -- Signals declaration
+ -- nbrServos 16 bits positon registers declaration
+ signal servosReg : reg12Array;
+ -- nbrServos 1 bit enable registers declaration
+ signal regEnable : std_logic_vector(31 downto 0);
+ -- Status register
+ signal regStatus : std_logic;
+ -- Command register
+ signal regCmd : std_logic_vector(15 downto 0);
+ -- Reset active on high level from the RESET_MODULE
+ signal reset : std_logic;
+ -- Reset request send to the RESET_MODULE
+ signal requestReset : std_logic;
+ -- Signal buffer for the main counter
signal count : std_logic_vector(15 downto 0);
- -- Signal en provenance de compteur principal signifiant que les valeurs
- -- servosReg(X) et enableReg(X) peuvent mis a jour sans perturber la generation
- -- de la partie utile de l'impulsion
- signal writeValue : std_logic;
-
- -- Definition de l'architecture
- begin
- -- Instantiation du generateur d'horloge
- clockGen : CLK_GENERATOR
- -- Mapping des ports du generateur d'horloge
- port map (clkIn => clkInImx96MHz,
- counterOut16Bits => count,
- writeValue => writeValue);
--- testOut => testOut);
- -- Instantiation des 24 modules PWM
- PWM0 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(0),
- enableReg => enableReg(0),
- pwmOut => pwmOut(0),
- writeValue => writeValue);
- PWM1 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(1),
- enableReg => enableReg(1),
- pwmOut => pwmOut(1),
- writeValue => writeValue);
- PWM2 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(2),
- enableReg => enableReg(2),
- pwmOut => pwmOut(2),
- writeValue => writeValue);
- PWM3 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(3),
- enableReg => enableReg(3),
- pwmOut => pwmOut(3),
- writeValue => writeValue);
- PWM4 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(4),
- enableReg => enableReg(4),
- pwmOut => pwmOut(4),
- writeValue => writeValue);
- PWM5 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(5),
- enableReg => enableReg(5),
- pwmOut => pwmOut(5),
- writeValue => writeValue);
- PWM6 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(6),
- enableReg => enableReg(6),
- pwmOut => pwmOut(6),
- writeValue => writeValue);
- PWM7 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(7),
- enableReg => enableReg(7),
- pwmOut => pwmOut(7),
- writeValue => writeValue);
- PWM8 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(8),
- enableReg => enableReg(8),
- pwmOut => pwmOut(8),
- writeValue => writeValue);
- PWM9 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(9),
- enableReg => enableReg(9),
- pwmOut => pwmOut(9),
- writeValue => writeValue);
- PWM10 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(10),
- enableReg => enableReg(10),
- pwmOut => pwmOut(10),
- writeValue => writeValue);
- PWM11 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(11),
- enableReg => enableReg(11),
- pwmOut => pwmOut(11),
- writeValue => writeValue);
- PWM12 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(12),
- enableReg => enableReg(12),
- pwmOut => pwmOut(12),
- writeValue => writeValue);
- PWM13 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(13),
- enableReg => enableReg(13),
- pwmOut => pwmOut(13),
- writeValue => writeValue);
- PWM14 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(14),
- enableReg => enableReg(14),
- pwmOut => pwmOut(14),
- writeValue => writeValue);
- PWM15 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(15),
- enableReg => enableReg(15),
- pwmOut => pwmOut(15),
- writeValue => writeValue);
- PWM16 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(16),
- enableReg => enableReg(16),
- pwmOut => pwmOut(16),
- writeValue => writeValue);
- PWM17 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(17),
- enableReg => enableReg(17),
- pwmOut => pwmOut(17),
- writeValue => writeValue);
- PWM18 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(18),
- enableReg => enableReg(18),
- pwmOut => pwmOut(18),
- writeValue => writeValue);
- PWM19 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(19),
- enableReg => enableReg(19),
- pwmOut => pwmOut(19),
- writeValue => writeValue);
- PWM20 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(20),
- enableReg => enableReg(20),
- pwmOut => pwmOut(20),
- writeValue => writeValue);
- PWM21 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(21),
- enableReg => enableReg(21),
- pwmOut => pwmOut(21),
- writeValue => writeValue);
- PWM22 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(22),
- enableReg => enableReg(22),
- pwmOut => pwmOut(22),
- writeValue => writeValue);
- PWM23 : PWM_MODULE
- -- Mapping des ports du module PWM
- port map (count => count,
- servosReg => servosReg(23),
- enableReg => enableReg(23),
- pwmOut => pwmOut(23),
- writeValue => writeValue);
+-- Architecture definition
+begin
+ -- Reset generator Instantiation
+ resetGenerator : RESET_MODULE
+ -- Port mapping for Reset generator
+ port map (
+ clkIn => clkInImx96MHz,
+ resetIn => requestReset,
+ resetOut => reset
+ );
+ -- Counter instantiation
+ counterGenerator : COUNTER_MODULE
+ -- Port mapping for Counter
+ port map (
+ clkIn => clkInImx96MHz,
+ counterOut16Bits => count
+ );
+ -- PWM Modules Instantiation
+ Pwm : for N in 0 to nbrServos-1 generate
+ PWM_MOD : PWM_MODULE
+ port map (
+ count => count,
+ clkIn => clkInImx96MHz,
+ servosReg => servosReg(N),
+ enableReg => regEnable(N),
+ pwmOut => pwmOut(N));
+ end generate Pwm;
- -- Initialisation
- resetn <= '1';
-
- -- Processus d'ecriture dans le registre depuis le bus \xB5P
- registerWrite: process (clkInImx96MHz, resetn)
+ -- Write process in the firmware registers from the \xB5P bus
+ registerWrite: process (clkInImx96MHz,reset)
begin -- process registerWrite
- -- Reset asynchrone actif au niveau bas
- if resetn = '0' then
- -- Action eventuelle du Reset
- -- Sur le front montant de clk_in_Imx_96MHz
- elsif clkInImx96MHz'event and clkInImx96MHz = '1' then
+ -- General Initialisation Process
+ -- This initialisation process is here because if it is located in
+ -- an other process the synthesis will failed because there are multiple
+ -- asignments to the same signals
+ -- Asynchronous Reset
+ if reset = '1' then
+ requestReset <= '0';
+ regStatus <= '0';
+ regCmd <= X"0000";
+ -- All servos are disable
+ regEnable <= X"00000000";
+ -- Medium position for all servos
+ for N in 0 to nbrServos-1 loop
+ servosReg(N) <= X"800";
+ end loop;
+ elsif rising_edge(clkInImx96MHz) then
+ -- Write access
if CSxBI = '0' and WRxBI = '0' then
- -- Decodage d'adresse, adresse de base: 0x12000000
+ -- Addresses decoding, base address is 0x12000000
case AddrxDI is
- -- 0x12000000 servo 0
- when "0000000000000" =>
- -- Sauvegarde dans le registre du servo 0
- servosReg(0) <= DataxD(11 downto 0);
- -- 0x12000002 servo 1
- when "0000000000010" =>
- -- Sauvegarde dans le registre du servo 1
- servosReg(1) <= DataxD(11 downto 0);
- -- 0x12000004 servo 2
- when "0000000000100" =>
- -- Sauvegarde dans le registre du servo 2
- servosReg(2) <= DataxD(11 downto 0);
- -- 0x12000006 servo 3
- when "0000000000110" =>
- -- Sauvegarde dans le registre du servo 3
- servosReg(3) <= DataxD(11 downto 0);
- -- 0x12000008 servo 4
- when "0000000001000" =>
- -- Sauvegarde dans le registre du servo 4
- servosReg(4) <= DataxD(11 downto 0);
- -- 0x1200000A servo 5
- when "0000000001010" =>
- -- Sauvegarde dans le registre du servo 5
- servosReg(5) <= DataxD(11 downto 0);
- -- 0x1200000C servo 6
- when "0000000001100" =>
- -- Sauvegarde dans le registre du servo 6
- servosReg(6) <= DataxD(11 downto 0);
- -- 0x1200000E servo 7
- when "0000000001110" =>
- -- Sauvegarde dans le registre du servo 7
- servosReg(7) <= DataxD(11 downto 0);
- -- 0x12000010 servo 8
- when "0000000010000" =>
- -- Sauvegarde dans le registre du servo 8
- servosReg(8) <= DataxD(11 downto 0);
- -- 0x12000012 servo 9
- when "0000000010010" =>
- -- Sauvegarde dans le registre du servo 9
- servosReg(9) <= DataxD(11 downto 0);
- -- 0x12000014 servo 10
- when "0000000010100" =>
- -- Sauvegarde dans le registre du servo 10
- servosReg(10) <= DataxD(11 downto 0);
- -- 0x12000016 servo 11
- when "0000000010110" =>
- -- Sauvegarde dans le registre du servo 11
- servosReg(11) <= DataxD(11 downto 0);
- -- 0x12000018 servo 12
- when "0000000011000" =>
- -- Sauvegarde dans le registre du servo 12
- servosReg(12) <= DataxD(11 downto 0);
- -- 0x1200001A servo 13
- when "0000000011010" =>
- -- Sauvegarde dans le registre du servo 13
- servosReg(13) <= DataxD(11 downto 0);
- -- 0x1200001C servo 14
- when "0000000011100" =>
- -- Sauvegarde dans le registre du servo 14
- servosReg(14) <= DataxD(11 downto 0);
- -- 0x1200001E servo 15
- when "0000000011110" =>
- -- Sauvegarde dans le registre du servo 15
- servosReg(15) <= DataxD(11 downto 0);
- -- 0x12000020 servo 16
- when "0000000100000" =>
- -- Sauvegarde dans le registre du servo 16
- servosReg(16) <= DataxD(11 downto 0);
- -- 0x12000022 servo 17
- when "0000000100010" =>
- -- Sauvegarde dans le registre du servo 17
- servosReg(17) <= DataxD(11 downto 0);
- -- 0x12000024 servo 18
- when "0000000100100" =>
- -- Sauvegarde dans le registre du servo 18
- servosReg(18) <= DataxD(11 downto 0);
- -- 0x12000026 servo 19
- when "0000000100110" =>
- -- Sauvegarde dans le registre du servo 19
- servosReg(19) <= DataxD(11 downto 0);
- -- 0x12000028 servo 20
- when "0000000101000" =>
- -- Sauvegarde dans le registre du servo 20
- servosReg(20) <= DataxD(11 downto 0);
- -- 0x1200002A servo 21
- when "0000000101010" =>
- -- Sauvegarde dans le registre du servo 21
- servosReg(21) <= DataxD(11 downto 0);
- -- 0x1200002C servo 22
- when "0000000101100" =>
- -- Sauvegarde dans le registre du servo 22
- servosReg(22) <= DataxD(11 downto 0);
- -- 0x1200002E servo 23
- when "0000000101110" =>
- -- Sauvegarde dans le registre du servo 23
- servosReg(23) <= DataxD(11 downto 0);
- -- 0x12000030 Registre de validation LSB
- when "0000000110000" =>
- -- Sauvegarde dans le registre de validation LSB
- enableReg(15 downto 0) <= DataxD(15 downto 0);
- -- 0x12000032 Registre de validation MSB
- when "0000000110010" =>
- -- Sauvegarde dans le registre de validation LSB
- enableReg(31 downto 16) <= DataxD(15 downto 0);
+ -- MagicID, Firmaware version, regNumberServos, Status
+ -- register not processed: read only registers!!!
+ when regCmdAddr =>
+ -- Save in the regCmd
+ regCmd <= DataxD(15 downto 0);
+ -- Here: code for command execution...
+ -- Software Reset
+ if regCmd = X"0001" then
+ requestReset <= '1';
+ end if;
+ if regCmd = X"0000" then
+ requestReset <= '0';
+ end if;
+ -- Servos Validation Register LSB
+ when regServosValidationLSBAddr =>
+ -- save in regEnable LSB
+ regEnable(15 downto 0) <= DataxD(15 downto 0);
+ -- Servos Validation Register MSB
+ when regServosValidationMSBAddr =>
+ -- save in regEnable MSB
+ regEnable(31 downto 16) <= DataxD(15 downto 0);
when others => null;
- end case;
+ -- Add here read error processing
+ end case;
+ -- Save position value for all servos
+ for N in 0 to nbrServos-1 loop
+ -- unigned cast must be used with IEEE.NUMERIC_STD
+ if (std_logic_vector(unsigned(addrRegServosPositionDaseAddr) + (N*2))=AddrxDI) then
+ -- Save in Servo N Position Register
+ servosReg(N) <= DataxD(11 downto 0);
+ end if;
+ end loop;
end if;
end if;
end process registerWrite;
- -- Processus d'acces generique en lecture depuis le bus \xB5P
- registerReadSyn: process (clkInImx96MHz, resetn)
- variable ReadAccessEdgeDetect : std_logic := '0';
- begin -- process registerReadSyn
- -- Reset asynchrone actif au niveau bas
- if resetn = '0' then
- ReadAccessPulse <= '1';
- ReadAccessEdgeDetect := '0';
- -- Sur le front montant de clk_in_Imx_96MHz
- elsif clkInImx96MHz'event and clkInImx96MHz = '1' then
- -- Si initialement ReadAccessEdgeDetect=0 et acces en lecture (RDxBI=0 et CSxBI=0)
- -- Alors ReadAccessPulse=0
- -- Au cycle d'horloge suivant si tourjours acces en lecture (RDxBI=0 et CSxBI=0)
- -- Alors ReadAccessPulse=1
- -- Et vice versa
- -- On obtient donc une transition 0->1 ou 1->0 sur ReadAccessPulse
- -- Au maximum en 2 cycle de clk_in_Imx_96MHz
- -- Lorsque l'acces en lecture est fini ReadAccessEdgeDetect revient a 0
- if (ReadAccessEdgeDetect = '0' and ((not CSxBI) and (not RDxBI)) = '1') then
- ReadAccessPulse <= '0';
- else
- ReadAccessPulse <= '1';
- end if;
- -- ReadAccessEdgeDetect = 1 si lecture (RDxBI=0 et CSxBI=0)
- ReadAccessEdgeDetect := (not CSxBI) and (not RDxBI);
- end if;
- end process registerReadSyn;
-
- -- Processus de lecture du registre depuis le bus \xB5P
- registerRead : process (CSxBI, RDxBI, AddrxDI, ReadAccessPulse)
+ -- Read process of firmware registers from the \xB5P bus
+ registerRead : process (CSxBI, RDxBI, AddrxDI, clkInImx96MHz, servosReg, regStatus, regCmd, regEnable)
begin -- process registerRead
- -- acces en lecture (RDxBI=0 et CSxBI=0)
+ -- Read access (RDxBI=0 et CSxBI=0)
if CSxBI = '0' and RDxBI = '0' then
+ -- Read the general register:
+ -- regMagicID,regFirmwareVersion, regNumberServos,regStatus
+ -- regCmd,regServosValidationLSBAddr,regServosValidationMSBAddr
case AddrxDI is
- -- 0x12000000 servo 0
- when "0000000000000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 0
- DataxD <= "0000" & servosReg(0)(11 downto 0);
- -- 0x12000002 servo 1
- when "0000000000010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 1
- DataxD <= "0000" & servosReg(1)(11 downto 0);
- -- 0x12000004 servo 2
- when "0000000000100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 2
- DataxD <= "0000" & servosReg(2)(11 downto 0);
- -- 0x12000006 servo 3
- when "0000000000110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 3
- DataxD <= "0000" & servosReg(3)(11 downto 0);
- -- 0x12000008 servo 4
- when "0000000001000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 4
- DataxD <= "0000" & servosReg(4)(11 downto 0);
- -- 0x1200000A servo 5
- when "0000000001010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 5
- DataxD <= "0000" & servosReg(5)(11 downto 0);
- -- 0x1200000C servo 6
- when "0000000001100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 6
- DataxD <= "0000" & servosReg(6)(11 downto 0);
- -- 0x1200000E servo 7
- when "0000000001110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 7
- DataxD <= "0000" & servosReg(7)(11 downto 0);
- -- 0x12000010 servo 8
- when "0000000010000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 8
- DataxD <= "0000" & servosReg(8)(11 downto 0);
- -- 0x12000012 servo 9
- when "0000000010010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 9
- DataxD <= "0000" & servosReg(9)(11 downto 0);
- -- 0x12000014 servo 10
- when "0000000010100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 10
- DataxD <= "0000" & servosReg(10)(11 downto 0);
- -- 0x12000016 servo 11
- when "0000000010110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 11
- DataxD <= "0000" & servosReg(11)(11 downto 0);
- -- 0x12000018 servo 12
- when "0000000011000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 12
- DataxD <= "0000" & servosReg(12)(11 downto 0);
- -- 0x1200001A servo 13
- when "0000000011010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 13
- DataxD <= "0000" & servosReg(13)(11 downto 0);
- -- 0x1200001C servo 14
- when "0000000011100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 14
- DataxD <= "0000" & servosReg(14)(11 downto 0);
- -- 0x1200001E servo 15
- when "0000000011110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 15
- DataxD <= "0000" & servosReg(15)(11 downto 0);
- -- 0x12000020 servo 16
- when "0000000100000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 16
- DataxD <= "0000" & servosReg(16)(11 downto 0);
- -- 0x12000022 servo 17
- when "0000000100010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 17
- DataxD <= "0000" & servosReg(17)(11 downto 0);
- -- 0x12000024 servo 18
- when "0000000100100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 18
- DataxD <= "0000" & servosReg(18)(11 downto 0);
- -- 0x12000026 servo 19
- when "0000000100110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 19
- DataxD <= "0000" & servosReg(19)(11 downto 0);
- -- 0x12000028 servo 20
- when "0000000101000" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 20
- DataxD <= "0000" & servosReg(20)(11 downto 0);
- -- 0x1200002A servo 21
- when "0000000101010" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 21
- DataxD <= "0000" & servosReg(21)(11 downto 0);
- -- 0x1200002C servo 22
- when "0000000101100" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 22
- DataxD <= "0000" & servosReg(22)(11 downto 0);
- -- 0x1200002E servo 23
- when "0000000101110" =>
- -- Envoi sur le bus de donnees \xB5P du registre du servo 23
- DataxD <= "0000" & servosReg(23)(11 downto 0);
- -- 0x12000030 Registre de validation LSB
- when "0000000110000" =>
- -- Envoi sur le bus de donnees \xB5P du registre de validation LSB
- DataxD <= enableReg(15 downto 0);
- -- 0x12000032 Registre de validation MSB
- when "0000000110010" =>
- -- Envoi sur le bus de donnees \xB5P du registre de validation LSB
- DataxD <= enableReg(31 downto 16);
+ -- Read MagicID
+ when regMagicIDAddr =>
+ -- Send on the \xB5P data bus the MagicID
+ DataxD <= regMagicID;
+ -- Read Firmaware version
+ when regFirmwareVersionAddr =>
+ -- Send on the \xB5P data bus the Firmaware version
+ DataxD <= regFirmwareVersion;
+ -- Read regNumberServos
+ when regNumberServosAddr =>
+ -- Send on the \xB5P data bus the number of managed servos
+ DataxD <= std_logic_vector(to_unsigned(nbrServos,16));
+ -- Read regStatus
+ when regStatusAddr =>
+ -- Send on the \xB5P data bus the Status
+ DataxD <= X"000" & "000" & regStatus;
+ -- Read regCmd
+ when regCmdAddr =>
+ -- Send on the \xB5P data bus the last cms code
+ DataxD <= regCmd;
+ -- Servos Validation Register LSB
+ when regServosValidationLSBAddr =>
+ -- Send on the \xB5P data bus regEnable LSB
+ DataxD <= regEnable(15 downto 0);
+ -- Servos Validation Register MSB
+ when regServosValidationMSBAddr =>
+ -- Send on the \xB5P data bus regEnable MSB
+ DataxD <= regEnable(31 downto 16);
when others =>
DataxD <= (others => '0');
end case;
+ -- Read position value for all servos
+ for N in 0 to nbrServos-1 loop
+ -- unigned cast must be used with IEEE.NUMERIC_STD
+ if (std_logic_vector(unsigned(addrRegServosPositionDaseAddr) + (N*2))=AddrxDI) then
+ -- Send on the \xB5P data bus Servo N Position Register
+ DataxD <= "0000" & servosReg(N)(11 downto 0);
+ end if;
+ end loop;
+
else
- -- Haute impedance si acces autre qu'en lecture
+ -- hig impedance si acces autre qu'en lecture
DataxD <= (others => 'Z');
end if;
end process registerRead;
Modified: trunk/firmware/servo/pwm_module.vhd
===================================================================
--- trunk/firmware/servo/pwm_module.vhd 2008-07-21 12:46:08 UTC (rev 841)
+++ trunk/firmware/servo/pwm_module.vhd 2008-07-21 13:27:50 UTC (rev 842)
@@ -1,4 +1,20 @@
-----------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+-- Copyright (C) 2008 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 3 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, see <http://www.gnu.org/licenses/>.
+--------------------------------------------------------------------------------
-- Company: Armadeus Project
-- Engineer: Yvan ROCH
--
@@ -14,64 +30,82 @@
--
-- Revision:
-- Revision 0.01 - File Created
--- Additional Comments:
---
-------------------------------------------------------------------------------------
-
-library IEEE;
-use IEEE.STD_LOGIC_1164.ALL;
-use IEEE.STD_LOGIC_ARITH.ALL;
-use IEEE.STD_LOGIC_UNSIGNED.ALL;
-
-entity PWM_MODULE is
+-- Revision 0.02 - 2008-05-11 (see SERVO_top.vhd)
+-- Revision 0.03 - 2008-07-09 (see SERVO_top.vhd)
+-- Additional Comments:
+-- PWM module: This module generates the PWM output and save the servosReg and
+-- enableReg signals in the internal module register at the right time.
+--------------------------------------------------------------------------------
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+
+entity PWM_MODULE is
Port (
- -- Compteur externe de 16 bits cadencer a 4MHz: un cycle complet du compteur
- -- dure 16.384 ms, c'est la dur\xE9e entre 2 implusions
+ -- External 96 MHz clock
+ clkIn : in std_logic;
+ -- External 4MHz, 16 bits, external counter
+ -- One counter cycle has a duration of 16.384 ms
+ -- This is the delay between 2 PWM pulses
count : in std_logic_vector(15 downto 0);
- -- signal servosReg(X) copie dans pwmValue
+
+ -- signal servosReg(X) to be copied in pwmValue
servosReg : in std_logic_vector( 11 downto 0);
- -- signal enableReg(X) copie dans enable
+
+ -- signal enableReg(X) to be copied in enable
enableReg: in std_logic;
- -- sortie pwm
- pwmOut : out std_logic;
- -- le signal writeValue valide l'ecriture de servosReg dans pwmValue et enableReg dans
- -- enable a un instant ou la sortie PWM est a zero.
- -- Ainsi la generation de l'impulsion n'est pas perturbee par le changement
- -- de valeur de servosReg et enableReg
- writeValue : in std_logic);
-end PWM_MODULE;
-
-architecture Behavioral of PWM_MODULE is
- -- Valeur interne pwmValue : registre de 12 bits.
+
+ -- PWM output
+ pwmOut : out std_logic);
+end PWM_MODULE;
+
+architecture Behavioral of PWM_MODULE is
+ -- Internal value pwmValue : 12 bits register
signal pwmValue : std_logic_vector(11 downto 0) := "000000000000";
- -- Validation de la sortie PWM
- signal enable: std_logic := '0';
-begin
-
- -- Ecriture dans les registres du module
- process(writeValue)
- begin
- if (writeValue'event and writeValue='1') then
- -- Sur le front montant de writeValue memorisation
- -- de servosReg dans pwmValue et enableReg dans enable
- pwmValue <= servosReg;
- enable <= enableReg;
- end if;
- end process;
+ -- PWM output validation
+ signal enable: std_logic := '0';
+begin
- -- Generation du signal PWM
- pwmOut <= '0' when (enable = '0') else -- sortie a 0 si servo devalide
- -- Generation de l'impulsion de 0.5 ms commune a toute les valeurs
- -- 1111100000110000b=63536
- -- 65536-63536=2000 2000 cycle a 4MHz=0.5ms
- -- Cela corresponde au debut de generation de l'impulsion
+ -- Writing operation in the module registers
+ --
+ -- Revision 0.02: removing the writeValue signal.
+ -- The internal registers must updated only when the PWM ouput is 0
+ -- for avoiding the servo jittering.
+ -- The PWM ouput is 0 when count < 1111100000110000b (start of the common
+ -- 0.5 ms PWM pulse for all servos)and
+ -- count > 0001111111111110b (max 12bits pwmValue left shifted by 1 bit)
+ -- Arbitrary the internal registers will be updated when count is 0x8000
+ process(clkIn)
+ begin
+ -- On the rising edge of count
+ if (rising_edge(clkIn)) then
+ -- count is 0x8000 update of the internal registers
+ if (count = "1000000000000000") then
+ pwmValue <= servosReg;
+ enable <= enableReg;
+ end if;
+ end if;
+ end process;
+
+ -- PWM signal generation
+ --
+ pwmOut <=
+ -- PWM output to 0 if servo disable
+ '0' when (enable = '0') else
+
+ -- Common to all values 0.5ms pulse generation
+ -- 1111100000110000b=63536
+ -- 65536-63536=2000: 2000 cycles at 4MHz=0.5ms
+ -- This...
[truncated message content] |
|
From: <ar...@us...> - 2008-07-21 12:46:09
|
Revision: 841
http://armadeus.svn.sourceforge.net/armadeus/?rev=841&view=rev
Author: artemys
Date: 2008-07-21 12:46:08 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[FIRMWARE] Rename wishbone example's directory
Added Paths:
-----------
trunk/firmware/wishbone_example/
Removed Paths:
-------------
trunk/firmware/Wisbone_example/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-21 08:51:23
|
Revision: 840
http://armadeus.svn.sourceforge.net/armadeus/?rev=840&view=rev
Author: artemys
Date: 2008-07-21 08:50:52 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
[LINUX] patches splitting continues...
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-20 12:41:02 UTC (rev 839)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-21 08:50:52 UTC (rev 840)
@@ -826,14 +826,3 @@
+#define CLK32 32768
+
+#endif // __ASM_ARCH_APF9328_H
---- ref/linux-2.6.23.1/include/asm-arm/arch-imx/hardware.h 2006-10-12 22:37:14.000000000 +0200
-+++ linux-2.6.23.1/include/asm-arm/arch-imx/hardware.h 2006-10-07 20:09:07.000000000 +0200
-@@ -104,4 +104,8 @@ extern unsigned int imx_get_usb_clk(void
- #include "scb9328.h"
- #endif
-
-+#ifdef CONFIG_MACH_APF9328
-+#include "apf9328.h"
-+#endif
-+
- #endif
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff 2008-07-20 12:41:02 UTC (rev 839)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff 2008-07-21 08:50:52 UTC (rev 840)
@@ -1,3 +1,14 @@
+--- linux-2.6.23.1/include/asm-arm/arch-imx/hardware.h 2006-10-12 22:37:14.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/hardware.h 2006-10-07 20:09:07.000000000 +0200
+@@ -104,4 +104,8 @@ extern unsigned int imx_get_usb_clk(void
+ #include "scb9328.h"
+ #endif
+
++#ifdef CONFIG_MACH_APF9328
++#include "apf9328.h"
++#endif
++
+ #endif
--- linux-2.6.23.1/arch/arm/mach-imx/Kconfig 2006-10-12 22:37:14.000000000 +0200
+++ linux-2.6.23.1.mod/arch/arm/mach-imx/Kconfig 2006-10-07 20:09:07.000000000 +0200
@@ -1,6 +1,10 @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-20 12:42:29
|
Revision: 839
http://armadeus.svn.sourceforge.net/armadeus/?rev=839&view=rev
Author: artemys
Date: 2008-07-20 12:41:02 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
[LINUX] Extract build part of 021-apf9328 patch
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-19 15:55:28 UTC (rev 838)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-20 12:41:02 UTC (rev 839)
@@ -763,84 +763,6 @@
+#endif // CONFIG_FB_IMX
+
+#endif // APF9328_LCD_CONFIG_H
---- ref/linux-2.6.23.1/arch/arm/mach-imx/Kconfig 2006-10-12 22:37:14.000000000 +0200
-+++ linux-2.6.23.1/arch/arm/mach-imx/Kconfig 2006-10-07 20:09:07.000000000 +0200
-@@ -1,6 +1,10 @@
- menu "IMX Implementations"
- depends on ARCH_IMX
--
-+
-+choice
-+ prompt "Development board selection"
-+ depends on ARCH_IMX
-+
- config ARCH_MX1ADS
- bool "mx1ads"
- depends on ARCH_IMX
-@@ -20,6 +24,14 @@ config MACH_SCB9328
- help
- Say Y here if you are using the Synertronixx scb9328 board
-
-+config MACH_APF9328
-+ bool "apf9328"
-+ depends on ARCH_IMX
-+ help
-+ Say Yes here if you are using the Armadeus APF9328 development board
-+
-+endchoice
-+
- choice
- prompt "SCB9328 eval board"
- depends on MACH_SCB9328
-@@ -39,4 +51,30 @@ config IMX_SCB9328_EVK9328L
-
- endchoice
-
-+choice
-+ prompt "APF9328 Flash available"
-+ depends on MACH_APF9328
-+ default IMX_APF9328_FLASH_16MB
-+
-+config IMX_APF9328_FLASH_8MB
-+ bool "8MB"
-+
-+config IMX_APF9328_FLASH_16MB
-+ bool "16MB"
-+
-+endchoice
-+
-+choice
-+ prompt "APF9328 RAM available"
-+ depends on MACH_APF9328
-+ default IMX_APF9328_RAM_32MB
-+
-+config IMX_SCB9328_RAM_16MB
-+ bool "16MB"
-+
-+config IMX_SCB9328_RAM_32MB
-+ bool "32MB"
-+
-+endchoice
-+
- endmenu
---- ref/linux-2.6.23.1/arch/arm/mach-imx/Makefile 2006-10-12 22:37:14.000000000 +0200
-+++ linux-2.6.23.1/arch/arm/mach-imx/Makefile 2006-10-07 20:09:07.000000000 +0200
-@@ -15,6 +15,7 @@
- obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
- obj-$(CONFIG_MACH_MX1FS2) += mx1fs2.o
- obj-$(CONFIG_MACH_SCB9328) += scb9328.o
-+obj-$(CONFIG_MACH_APF9328) += apf9328.o
-
- # Support for blinky lights
- led-y := leds.o
---- ref/linux-2.6.23.1/arch/arm/mach-imx/Makefile.boot 2006-10-12 22:37:14.000000000 +0200
-+++ linux-2.6.23.1/arch/arm/mach-imx/Makefile.boot 2006-10-07 20:09:07.000000000 +0200
-@@ -1,3 +1,4 @@
- zreladdr-$(CONFIG_ARCH_MX1ADS) := 0x08008000
- zreladdr-$(CONFIG_MACH_MX1FS2) := 0x08008000
- zreladdr-$(CONFIG_MACH_SCB9328) := 0x08008000
-+ zreladdr-$(CONFIG_MACH_APF9328) := 0x08008000
-\ No newline at end of file
--- ref/linux-2.6.23.1/include/asm-arm/arch-imx/apf9328.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1/include/asm-arm/arch-imx/apf9328.h 2006-10-07 20:09:07.000000000 +0200
@@ -0,0 +1,60 @@
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/024-apf9328-add-board-to-linux-build-system.diff 2008-07-20 12:41:02 UTC (rev 839)
@@ -0,0 +1,78 @@
+--- linux-2.6.23.1/arch/arm/mach-imx/Kconfig 2006-10-12 22:37:14.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/Kconfig 2006-10-07 20:09:07.000000000 +0200
+@@ -1,6 +1,10 @@
+ menu "IMX Implementations"
+ depends on ARCH_IMX
+-
++
++choice
++ prompt "Development board selection"
++ depends on ARCH_IMX
++
+ config ARCH_MX1ADS
+ bool "mx1ads"
+ depends on ARCH_IMX
+@@ -20,6 +24,14 @@ config MACH_SCB9328
+ help
+ Say Y here if you are using the Synertronixx scb9328 board
+
++config MACH_APF9328
++ bool "apf9328"
++ depends on ARCH_IMX
++ help
++ Say Yes here if you are using the Armadeus APF9328 development board
++
++endchoice
++
+ choice
+ prompt "SCB9328 eval board"
+ depends on MACH_SCB9328
+@@ -39,4 +51,30 @@ config IMX_SCB9328_EVK9328L
+
+ endchoice
+
++choice
++ prompt "APF9328 Flash available"
++ depends on MACH_APF9328
++ default IMX_APF9328_FLASH_16MB
++
++config IMX_APF9328_FLASH_8MB
++ bool "8MB"
++
++config IMX_APF9328_FLASH_16MB
++ bool "16MB"
++
++endchoice
++
++choice
++ prompt "APF9328 RAM available"
++ depends on MACH_APF9328
++ default IMX_APF9328_RAM_32MB
++
++config IMX_SCB9328_RAM_16MB
++ bool "16MB"
++
++config IMX_SCB9328_RAM_32MB
++ bool "32MB"
++
++endchoice
++
+ endmenu
+--- linux-2.6.23.1/arch/arm/mach-imx/Makefile 2006-10-12 22:37:14.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/Makefile 2006-10-07 20:09:07.000000000 +0200
+@@ -15,6 +15,7 @@
+ obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
+ obj-$(CONFIG_MACH_MX1FS2) += mx1fs2.o
+ obj-$(CONFIG_MACH_SCB9328) += scb9328.o
++obj-$(CONFIG_MACH_APF9328) += apf9328.o
+
+ # Support for blinky lights
+ led-y := leds.o
+--- linux-2.6.23.1/arch/arm/mach-imx/Makefile.boot 2006-10-12 22:37:14.000000000 +0200
++++ linux-2.6.23.1.mod/arch/arm/mach-imx/Makefile.boot 2006-10-07 20:09:07.000000000 +0200
+@@ -1,3 +1,4 @@
+ zreladdr-$(CONFIG_ARCH_MX1ADS) := 0x08008000
+ zreladdr-$(CONFIG_MACH_MX1FS2) := 0x08008000
+ zreladdr-$(CONFIG_MACH_SCB9328) := 0x08008000
++ zreladdr-$(CONFIG_MACH_APF9328) := 0x08008000
+\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-19 15:56:21
|
Revision: 838
http://armadeus.svn.sourceforge.net/armadeus/?rev=838&view=rev
Author: artemys
Date: 2008-07-19 15:55:28 +0000 (Sat, 19 Jul 2008)
Log Message:
-----------
[LINUX] 020-scbfb patch is no more used so rename it so it won't be applied
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.no_more_used
Removed Paths:
-------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.diff
Deleted: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.diff 2008-07-18 19:52:49 UTC (rev 837)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.diff 2008-07-19 15:55:28 UTC (rev 838)
@@ -1,65 +0,0 @@
---- linux-org/arch/arm/mach-imx/scb9328.c 2006-10-01 14:21:57.000000000 +0200
-+++ linux-imx/arch/arm/mach-imx/scb9328.c 2006-10-01 14:26:43.000000000 +0200
-@@ -34,6 +34,8 @@
- #include <linux/usb_isp116x.h>
- #endif
-
-+#include <asm/arch/imxfb.h>
-+
- #define TYPE_NONE 0
- #define TYPE_EVK9328 1
- #define TYPE_EVK9328L 2
-@@ -246,6 +248,37 @@ static struct platform_device serial_dev
- },
- };
-
-+static void apf9328_lcd_power(int on)
-+{
-+ printk("apf9328_lcd_power: %d\n", on);
-+ /* use Port_D CONTRAST pin to control LCD power down mode */
-+ if(on)
-+ DR(3) &= 0xFFFFF7FF;
-+ else
-+ DR(3) |= 0x00000800;
-+}
-+
-+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
-+ .bpp = 16,
-+ .xres = 240,
-+ .yres = 320,
-+
-+ .hsync_len = 9,
-+ .vsync_len = 2,
-+ .left_margin = 9,
-+ .upper_margin = 2,
-+ .right_margin = 27,
-+ .lower_margin = 4,
-+
-+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL |
-+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
-+
-+ .lcd_power = apf9328_lcd_power,
-+};
-+
-+
-+
- static struct platform_device *devices[] __initdata = {
- &serial_device,
- #ifdef CONFIG_DM9000
-@@ -261,6 +294,15 @@ static int __init scb9328_init(void)
- /// ej //evk9328_init_leds();
- UFCR(IMX_UART1_BASE) = 0xa81;
- UFCR(IMX_UART2_BASE) = 0xa81;
-+
-+ set_imx_fb_info(&apf9328_fb_info);
-+
-+ DR(3) |= 0x00000800; // essai Nico ...
-+ DDIR(3) |= 0x7FFFFFC0;
-+ GIUS(3) &= 0x8000003F;
-+ GPR(3) &= 0x8000003F;
-+
-+
- return platform_add_devices(devices, ARRAY_SIZE(devices));
- }
-
Copied: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.no_more_used (from rev 833, trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.diff)
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.no_more_used (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/020-linux-2.6.23.1-scbfb.no_more_used 2008-07-19 15:55:28 UTC (rev 838)
@@ -0,0 +1,65 @@
+--- linux-org/arch/arm/mach-imx/scb9328.c 2006-10-01 14:21:57.000000000 +0200
++++ linux-imx/arch/arm/mach-imx/scb9328.c 2006-10-01 14:26:43.000000000 +0200
+@@ -34,6 +34,8 @@
+ #include <linux/usb_isp116x.h>
+ #endif
+
++#include <asm/arch/imxfb.h>
++
+ #define TYPE_NONE 0
+ #define TYPE_EVK9328 1
+ #define TYPE_EVK9328L 2
+@@ -246,6 +248,37 @@ static struct platform_device serial_dev
+ },
+ };
+
++static void apf9328_lcd_power(int on)
++{
++ printk("apf9328_lcd_power: %d\n", on);
++ /* use Port_D CONTRAST pin to control LCD power down mode */
++ if(on)
++ DR(3) &= 0xFFFFF7FF;
++ else
++ DR(3) |= 0x00000800;
++}
++
++static struct imxfb_mach_info apf9328_fb_info __initdata = {
++ .pixclock = 62500,
++ .bpp = 16,
++ .xres = 240,
++ .yres = 320,
++
++ .hsync_len = 9,
++ .vsync_len = 2,
++ .left_margin = 9,
++ .upper_margin = 2,
++ .right_margin = 27,
++ .lower_margin = 4,
++
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL |
++ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
++
++ .lcd_power = apf9328_lcd_power,
++};
++
++
++
+ static struct platform_device *devices[] __initdata = {
+ &serial_device,
+ #ifdef CONFIG_DM9000
+@@ -261,6 +294,15 @@ static int __init scb9328_init(void)
+ /// ej //evk9328_init_leds();
+ UFCR(IMX_UART1_BASE) = 0xa81;
+ UFCR(IMX_UART2_BASE) = 0xa81;
++
++ set_imx_fb_info(&apf9328_fb_info);
++
++ DR(3) |= 0x00000800; // essai Nico ...
++ DDIR(3) |= 0x7FFFFFC0;
++ GIUS(3) &= 0x8000003F;
++ GPR(3) &= 0x8000003F;
++
++
+ return platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-18 19:52:40
|
Revision: 837
http://armadeus.svn.sourceforge.net/armadeus/?rev=837&view=rev
Author: artemys
Date: 2008-07-18 19:52:49 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
[LINUX] Add first version of ALSA drivers for TSC2102 / i.MXL SSI (should produce sound :-) )
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/092-alsa-imx-ssi-tsc2102-integrate-driver-to-linux-build-system.diff
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/093-imxregs-add-ssi-registers-definition.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-18 16:35:49 UTC (rev 836)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-18 19:52:49 UTC (rev 837)
@@ -1,6 +1,6 @@
--- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328.c 2008-04-01 16:15:37.000000000 +0200
-@@ -0,0 +1,543 @@
+@@ -0,0 +1,570 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -43,6 +43,7 @@
+#include <asm/arch/mmc.h>
+#include <asm/arch/spi_imx.h>
+#include <asm/arch/imx-regs.h> // imx_gpio_mode()
++#include <asm/arch/imx-alsa.h>
+
+#ifdef CONFIG_DM9000
+#include <linux/dm9000.h>
@@ -121,6 +122,29 @@
+ .resource = pwm_resources,
+};
+
++#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
++static struct imx_alsa_codec_config tsc2102_alsa_pdata;
++
++static struct resource ssi_resources[] = {
++ [0] = {
++ .start = (IMX_SSI_BASE),
++ .end = (IMX_SSI_BASE + 0x28),
++ .flags = IORESOURCE_MEM,
++ },
++};
++
++static struct platform_device tsc2102_alsa_device = {
++ .name = "tsc2102-alsa", // Should be the same as the driver name
++ .id = 0,
++ .num_resources = ARRAY_SIZE(ssi_resources),
++ .resource = ssi_resources,
++ .dev = {
++ .platform_data = &tsc2102_alsa_pdata,
++ }
++};
++#endif // defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
++
++
+// --- SERIAL RESSOURCE ---
+static struct imxuart_platform_data uart_pdata = {
+ .flags = IMXUART_HAVE_RTSCTS,
@@ -448,6 +472,9 @@
+#ifdef CONFIG_IMX_BACKLIGHT
+ &imxbl_device,
+#endif // CONFIG_IMX_BACKLIGHT
++#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
+};
+
+static void __init apf9328_init(void)
@@ -798,7 +825,7 @@
endmenu
--- ref/linux-2.6.23.1/arch/arm/mach-imx/Makefile 2006-10-12 22:37:14.000000000 +0200
+++ linux-2.6.23.1/arch/arm/mach-imx/Makefile 2006-10-07 20:09:07.000000000 +0200
-@@ -13,6 +13,7 @@ obj-y += irq.o time.o dma.o generic.o
+@@ -15,6 +15,7 @@
obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
obj-$(CONFIG_MACH_MX1FS2) += mx1fs2.o
obj-$(CONFIG_MACH_SCB9328) += scb9328.o
@@ -879,7 +906,7 @@
+#endif // __ASM_ARCH_APF9328_H
--- ref/linux-2.6.23.1/include/asm-arm/arch-imx/hardware.h 2006-10-12 22:37:14.000000000 +0200
+++ linux-2.6.23.1/include/asm-arm/arch-imx/hardware.h 2006-10-07 20:09:07.000000000 +0200
-@@ -107,4 +107,8 @@ extern unsigned int imx_get_usb_clk(void
+@@ -104,4 +104,8 @@ extern unsigned int imx_get_usb_clk(void
#include "scb9328.h"
#endif
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2008-07-18 16:35:49 UTC (rev 836)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2008-07-18 19:52:49 UTC (rev 837)
@@ -179,7 +179,7 @@
+#endif /* __LINUX_SPI_TSC2102_H */
--- linux-2.6.23.original/drivers/spi/tsc2102.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.mod/drivers/spi/tsc2102.c 2007-09-22 01:42:55.000000000 +0200
-@@ -0,0 +1,1103 @@
+@@ -0,0 +1,1148 @@
+/*
+ * drivers/spi/tsc2102.c
+ *
@@ -229,6 +229,13 @@
+#include <asm/apm.h>
+#endif
+
++#ifdef CONFIG_MACH_APF9328 // TODO: Put MCLK choice in Kconfig ??
++#define MCLK_16M 1 // DevFull
++#endif // CONFIG_MACH_APF9328
++
++/* #define DEBUG */
++#define DEBUG_AUDIO
++
+/* Bit field definitions for chip registers */
+#define TSC2102_ADC_TS_CONTROL 0x8bf4
+#define TSC2102_ADC_SCAN_CONTROL 0x2ff4
@@ -252,10 +259,17 @@
+#define TSC2102_DAC_OFF 0xafa0
+#define TSC2102_FS44K (1 << 13)
+#define TSC2102_PLL1_OFF 0x0000
++#ifdef MCLK_16M /* 16Mhz master clock */
++#define TSC2102_PLL1_44K (PLL1_PLLEN | PLL1_Q_VAL(0) | PLL1_P_VAL(1) | PLL1_J_VAL(5))
++#define TSC2102_PLL1_48K (PLL1_PLLEN | PLL1_Q_VAL(0) | PLL1_P_VAL(1) | PLL1_J_VAL(6))
++#define TSC2102_PLL2_44K (PLL2_D_VAL(6448))
++#define TSC2102_PLL2_48K (PLL2_D_VAL(1440))
++#else
+#define TSC2102_PLL1_44K 0x811c
+#define TSC2102_PLL1_48K 0x8120
+#define TSC2102_PLL2_44K (5462 << 2)
+#define TSC2102_PLL2_48K (1920 << 2)
++#endif // MCLK_16M
+#define TSC2102_SLVMS (1 << 11)
+#define TSC2102_DEEMPF (1 << 0)
+#define TSC2102_BASSBC (1 << 1)
@@ -297,6 +311,7 @@
+ 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;
@@ -683,7 +698,8 @@
+ }
+}
+
-+#ifdef CONFIG_SOUND
++#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
++
+/*
+ * Volume level values should be in the range [0, 127].
+ * Higher values mean lower volume.
@@ -705,6 +721,7 @@
+ tsc2102_write_sync(TSC2102_DAC_GAIN_CTRL, val);
+ mutex_unlock(&tsc.lock_sync);
+}
++EXPORT_SYMBOL(tsc2102_set_volume);
+
+void tsc2102_set_mute(int left_ch, int right_ch)
+{
@@ -720,6 +737,7 @@
+
+ mutex_unlock(&tsc.lock_sync);
+}
++EXPORT_SYMBOL(tsc2102_set_mute);
+
+void tsc2102_get_mute(int *left_ch, int *right_ch)
+{
@@ -733,6 +751,7 @@
+ *left_ch = !!(val & (1 << 15));
+ *right_ch = !!(val & (1 << 7));
+}
++EXPORT_SYMBOL(tsc2102_get_mute);
+
+void tsc2102_set_deemphasis(int enable)
+{
@@ -748,6 +767,7 @@
+ tsc2102_write_sync(TSC2102_DAC_POWER_CTRL, val);
+ mutex_unlock(&tsc.lock_sync);
+}
++EXPORT_SYMBOL(tsc2102_set_deemphasis);
+
+void tsc2102_set_bassboost(int enable)
+{
@@ -763,8 +783,9 @@
+ tsc2102_write_sync(TSC2102_DAC_POWER_CTRL, val);
+ mutex_unlock(&tsc.lock_sync);
+}
++EXPORT_SYMBOL(tsc2102_set_bassboost);
+
-+/* {rate, dsor, fsref} */
++/* {rate, divisor, fsref?=44,1k} */
+static const struct tsc2102_rate_info_s tsc2102_rates[] = {
+ /* Fsref / 6.0 */
+ {7350, 63, 1},
@@ -791,6 +812,7 @@
+ {44100, 0, 1},
+ {48000, 0, 0},
+
++ /* end of struct */
+ {0, 0, 0},
+};
+
@@ -809,7 +831,8 @@
+
+ mutex_lock(&tsc.lock_sync);
+
-+ tsc2102_write_sync(TSC2102_AUDIO1_CTRL, tsc2102_rates[i].divisor);
++ val = tsc2102_read_sync(TSC2102_AUDIO1_CTRL) & ~AC1_DACFS_MASK;
++ tsc2102_write_sync(TSC2102_AUDIO1_CTRL, val | AC1_DACFS(tsc2102_rates[i].divisor) );
+
+ val = tsc2102_read_sync(TSC2102_AUDIO3_CTRL);
+
@@ -828,6 +851,7 @@
+ mutex_unlock(&tsc.lock_sync);
+ return 0;
+}
++EXPORT_SYMBOL(tsc2102_set_rate);
+
+/*
+ * Perform basic set-up with default values and power the DAC on.
@@ -837,8 +861,8 @@
+ mutex_lock(&tsc.lock_sync);
+
+ if (state) {
-+ /* 16-bit words, DSP mode, sample at Fsref */
-+ tsc2102_write_sync(TSC2102_AUDIO1_CTRL, 0x0100);
++ /* 16-bit words, I2S mode, sample at Fsref */
++ tsc2102_write_sync(TSC2102_AUDIO1_CTRL, AC1_WLEN(0) | AC1_DATFM(0) | AC1_DACFS(0) );
+ /* Keyclicks off, soft-stepping at normal rate */
+ tsc2102_write_sync(TSC2102_AUDIO2_CTRL, TSC2102_KEYCLICK_OFF);
+ /* 44.1 kHz Fsref, continuous transfer mode, master DAC */
@@ -860,6 +884,7 @@
+
+ mutex_unlock(&tsc.lock_sync);
+}
++EXPORT_SYMBOL(tsc2102_dac_power);
+
+void tsc2102_set_i2s_master(int state)
+{
@@ -875,7 +900,8 @@
+
+ mutex_unlock(&tsc.lock_sync);
+}
-+#endif /* CONFIG_SOUND */
++EXPORT_SYMBOL(tsc2102_set_i2s_master);
++#endif /* CONFIG_SOUND || CONFIG_SOUND_MODULE */
+
+static int tsc2102_configure(struct tsc2102_dev *dev)
+{
@@ -894,6 +920,24 @@
+ /* PINT/DAV acts as DAV */
+ tsc2102_write_sync(TSC2102_TS_STATUS_CTRL, TSC2102_ADC_DAV);
+
++#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
++ /* 16-bit words, I2S mode, sample at Fsref */
++ tsc2102_write_sync(TSC2102_AUDIO1_CTRL, AC1_WLEN(0) | AC1_DATFM(0) | AC1_DACFS(0) );
++ /* Keyclicks off, soft-stepping at normal rate */
++ tsc2102_write_sync(TSC2102_AUDIO2_CTRL, TSC2102_KEYCLICK_OFF);
++ /* 48 kHz Fsref, continuous transfer mode, master DAC */
++ tsc2102_write_sync(TSC2102_AUDIO3_CTRL, 0x0800);
++ /* Soft-stepping enabled */
++ tsc2102_write_sync(TSC2102_AUDIO4_CTRL, 0x0000);
++ /* FSRef = 44,1k */
++ tsc2102_write_sync(TSC2102_PLL1_CTRL, TSC2102_PLL1_44K);
++ tsc2102_write_sync(TSC2102_PLL2_CTRL, TSC2102_PLL2_44K);
++
++ tsc2102_write_sync(TSC2102_DAC_GAIN_CTRL, 0xA0A0);
++ tsc2102_write_sync(TSC2102_DAC_POWER_CTRL, 0x3BA0);
++ tsc2102_write_sync(TSC2102_DAC_GAIN_CTRL, 0x7F7F);
++#endif /* CONFIG_SOUND || CONFIG_SOUND_MODULE */
++
+ /* Init mode state machine */
+ dev->state = 0;
+ dev->touch_in_progress = 0;
@@ -1104,6 +1148,7 @@
+ 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);
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/090-alsa-create-imx-alsa_h.diff 2008-07-18 19:52:49 UTC (rev 837)
@@ -0,0 +1,137 @@
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/include/asm-arm/arch-imx/imx-alsa.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/imx-alsa.h 2008-07-18 11:51:12.000000000 +0200
+@@ -0,0 +1,131 @@
++/*
++ * linux/include/asm-arm/arch-imx/imx-alsa.h
++ *
++ * Alsa Driver for AIC23 and TSC2101 codecs on iMX platform boards.
++ *
++ * Copyright (C) 2008 Armadeus <nic...@ar...>
++ * Based on the omap alsa driver
++ *
++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * 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.
++ *
++ */
++
++#ifndef __IMX_ALSA_H
++#define __IMX_ALSA_H
++
++#include <sound/driver.h>
++#include <asm/arch/dma.h>
++#include <asm/arch/imx-dma.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++/*#include <asm/arch/ssi.h>*/
++#include <linux/platform_device.h>
++/*
++ * Debug functions
++ */
++#undef DEBUG
++//#define DEBUG
++
++#define ERR(ARGS...) printk(KERN_ERR "{%s}-ERROR: ", __FUNCTION__);printk(ARGS);
++
++#ifdef DEBUG
++#define DPRINTK(ARGS...) printk(KERN_INFO "<%s>: ",__FUNCTION__);printk(ARGS)
++#define ADEBUG() printk("XXX Alsa debug f:%s, l:%d\n", __FUNCTION__, __LINE__)
++#define FN_IN printk(KERN_INFO "[%s]: start\n", __FUNCTION__)
++#define FN_OUT(n) printk(KERN_INFO "[%s]: end(%u)\n",__FUNCTION__, n)
++#else
++#define DPRINTK(ARGS...) /* nop */
++#define ADEBUG() /* nop */
++#define FN_IN /* nop */
++#define FN_OUT(n) /* nop */
++#endif
++
++#define DMA_BUF_SIZE (1024 * 8)
++
++/*
++ * Buffer management for alsa and dma
++ */
++struct audio_stream {
++ char *id; /* identification string */
++ int stream_id; /* numeric identification */
++// int dma_dev; /* dma number of that device */
++ imx_dmach_t dma_dev; /* device identifier for DMA */
++ int dma_in_progress;
++ int offset; /* store start position of the last period in the alsa buffer */
++ int active:1; /* we are using this stream for transfer now */
++ int period; /* current transfer period */
++ int periods; /* current count of periods registered in the DMA engine */
++ spinlock_t dma_lock; /* for locking in DMA operations */
++ struct snd_pcm_substream *stream; /* the pcm stream */
++ int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */
++ int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */
++};
++
++
++/*
++ * Alsa card structure
++ */
++struct snd_card_imx_codec {
++ struct snd_card *card;
++ struct snd_pcm *pcm;
++ long samplerate;
++ struct audio_stream s[2]; /* playback & capture */
++};
++
++/* Codec specific information and function pointers.
++ * Codec imx-alsa-tsc2101.c
++ * is responsible for defining the function pointers.
++ */
++struct imx_alsa_codec_config {
++ char *name;
++ struct imx_ssi_reg_cfg *mcbsp_regs_alsa;
++ struct snd_pcm_hw_constraint_list *hw_constraints_rates;
++ struct snd_pcm_hardware *snd_imx_alsa_playback;
++ struct snd_pcm_hardware *snd_imx_alsa_capture;
++ void (*codec_configure_dev)(void);
++ void (*codec_set_samplerate)(long);
++ void (*codec_clock_setup)(void);
++ int (*codec_clock_on)(void);
++ int (*codec_clock_off)(void);
++ int (*get_default_samplerate)(void);
++};
++
++/*********** Mixer function prototypes *************************/
++int snd_imx_mixer(struct snd_card_imx_codec *);
++void snd_imx_init_mixer(void);
++
++#ifdef CONFIG_PM
++void snd_imx_suspend_mixer(void);
++void snd_imx_resume_mixer(void);
++#endif
++
++int snd_imx_alsa_post_probe(struct platform_device *pdev, struct imx_alsa_codec_config *config);
++int snd_imx_alsa_remove(struct platform_device *pdev);
++#ifdef CONFIG_PM
++int snd_imx_alsa_suspend(struct platform_device *pdev, pm_message_t state);
++int snd_imx_alsa_resume(struct platform_device *pdev);
++#else
++#define snd_imx_alsa_suspend NULL
++#define snd_imx_alsa_resume NULL
++#endif
++void snd_imx_alsa_dma_interrupt(int, void *);
++
++#endif
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/091-alsa-add-imx-ssi-tsc2102-driver.diff 2008-07-18 19:52:49 UTC (rev 837)
@@ -0,0 +1,1442 @@
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/sound/arm/imx-alsa.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa.c 2008-07-18 15:10:45.000000000 +0200
+@@ -0,0 +1,683 @@
++/*
++ * sound/arm/imx-alsa.c
++ *
++ * Alsa Driver for i.MXL / SSI
++ *
++ * Copyright (C) 2008 Armadeus Systems <nic...@ar...>
++ * <jul...@ar...>
++ * Based on omap-alsa.c
++ *
++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include <linux/platform_device.h>
++#include <linux/spi/tsc2102.h>
++#ifdef CONFIG_PM
++#include <linux/pm.h>
++#endif
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++
++#include <asm/arch/imx-alsa.h>
++#include <linux/dma-mapping.h>
++#include <asm/arch/imx-dma.h>
++
++#define TSC_MASTER
++
++#define TRANSMIT_WM_LEVEL 8 // (in free places)
++#define SSI_DMA_BLR_TRANSMIT 16 // (3*2) // DMA Burst Length (in bytes)
++#define SSI_DMA_BLR 8
++
++MODULE_AUTHOR("Nicolas Colombain / Julien Boibessot - Armadeus Systems");
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("i.MX1/L driver for ALSA");
++MODULE_ALIAS("iMX_alsa_ssi");
++
++static struct snd_card_imx_codec *alsa_codec = NULL;
++static struct imx_alsa_codec_config *alsa_codec_config = NULL;
++
++
++/*
++ * HW interface start and stop helper functions
++ */
++static int audio_ifc_start(void)
++{
++ printk("Starting HW\n");
++ SSI_SCSR |= SSI_TE; /* TE enable */
++ return 0;
++}
++
++static int audio_ifc_stop(void)
++{
++ printk("Stopping HW\n");
++ SSI_SCSR &= ~SSI_TE; /* TE disable */
++ return 0;
++}
++
++#ifdef DEBUG
++static void dump_ssi_registers(void)
++{
++ printk("SSI_STX: 0x%x\n", SSI_STX);
++ printk("SSI_SRX: 0x%x\n", SSI_SRX);
++ printk("SSI_SCSR: 0x%x\n", SSI_SCSR);
++ printk("SSI_STCR: 0x%x\n", SSI_STCR);
++ printk("SSI_SRCR: 0x%x\n", SSI_SRCR);
++ printk("SSI_STCCR: 0x%x\n", SSI_STCCR);
++ printk("SSI_SRCCR: 0x%x\n", SSI_SRCCR);
++ printk("SSI_STSR: 0x%x\n", SSI_STSR);
++ printk("SSI_SFCSR: 0x%x\n", SSI_SFCSR);
++ printk("SSI_STR: 0x%x\n", SSI_STR);
++ printk("SSI_SOR: 0x%x\n", SSI_SOR);
++}
++#endif
++
++static void imx_alsa_audio_init(struct snd_card_imx_codec *imx_alsa)
++{
++ /* Setup DMA stuff */
++ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].id = "Alsa imx out";
++ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].stream_id =
++ SNDRV_PCM_STREAM_PLAYBACK;
++ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev =
++ IMX_DMA_CHANNELS-1;
++ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].hw_start =
++ audio_ifc_start;
++ imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].hw_stop =
++ audio_ifc_stop;
++
++ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].id = "Alsa imx in";
++ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].stream_id =
++ SNDRV_PCM_STREAM_CAPTURE;
++ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].dma_dev =
++ IMX_DMA_CHANNELS-2;
++ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].hw_start =
++ audio_ifc_start;
++ imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].hw_stop =
++ audio_ifc_stop;
++}
++
++static void dma_err_handler(int channel, void *data, int errcode)
++{
++ printk("dma_err_handler %d %d\n",channel, errcode);
++
++ imx_dma_disable(channel);
++}
++
++/*
++ * DMA functions
++ * Depends on imx-alsa-dma.c functions and (imx) dma.c
++ *
++ */
++static int audio_dma_request(struct audio_stream *s,
++ void (*callback) (int, void *))
++{
++ int err=0;
++ ADEBUG();
++
++ err = imx_dma_request_by_prio(&(s->dma_dev), s->id, DMA_PRIO_HIGH);
++ if (err < 0) {
++ printk(KERN_ERR "Unable to grab dma channel: %d\n", s->dma_dev);
++ } else {
++ err = imx_dma_setup_handlers(s->dma_dev,
++ snd_imx_alsa_dma_interrupt,
++ dma_err_handler,
++ s);
++ if (err < 0)
++ printk(KERN_ERR "Unable to setup dma handler for channel %d\n", s->dma_dev);
++ }
++ printk("audio_dma_request done (%d)\n", s->dma_dev);
++ imx_dma_disable(s->dma_dev);
++ return err;
++}
++
++static int audio_dma_free(struct audio_stream *s)
++{
++ int err = 0;
++ ADEBUG();
++
++ imx_dma_free(s->dma_dev); // doesn't return an error if failed
++
++ return err;
++}
++
++
++/*
++ * This function should calculate the current position of the dma in the
++ * buffer. It will help alsa middle layer to continue update the buffer.
++ * Its correctness is crucial for good functioning.
++ */
++static u_int audio_get_dma_pos(struct audio_stream *s)
++{
++ struct snd_pcm_substream *substream = s->stream;
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ unsigned int offset;
++ unsigned long flags;
++ ADEBUG();
++
++ /* this must be called w/ interrupts locked as requested in dma.c */
++ spin_lock_irqsave(&s->dma_lock, flags);
++
++ /* For the current period let's see where we are */
++ spin_unlock_irqrestore(&s->dma_lock, flags);
++
++ /* Now, the position related to the end of that period */
++// offset = bytes_to_frames(runtime, s->offset) + (runtime->period_size >> 1); //bytes_to_frames(runtime, count);
++ if( s->dma_in_progress ) {
++ offset = (runtime->period_size * (s->periods)) + (runtime->period_size >> 1);
++ if (offset >= runtime->buffer_size)
++ offset = runtime->period_size >> 1;
++ } else {
++ offset = (runtime->period_size * (s->periods));
++ if (offset >= runtime->buffer_size)
++ offset = 0;
++ }
++// printk("audio_get_dma_pos: %d (%d)\n", offset, bytes_to_frames(runtime, s->offset));
++ return offset;
++}
++
++/*
++ * this stops the dma and clears the dma ptrs
++ */
++static void audio_stop_dma(struct audio_stream *s)
++{
++ unsigned long flags;
++ ADEBUG();
++
++ spin_lock_irqsave(&s->dma_lock, flags);
++ s->active = 0;
++ s->period = 0;
++ s->periods = 0;
++
++ /* this stops the dma channel and clears the buffer ptrs */
++ imx_dma_disable(s->dma_dev);
++
++ spin_unlock_irqrestore(&s->dma_lock, flags);
++}
++
++/*
++ * Main dma routine, requests dma according where you are in main alsa buffer
++ */
++static void audio_process_dma(struct audio_stream *s)
++{
++ //#define IMX_SSI_BASE (0x00218000) /* a retrouver depuis le plateform data !!! */
++ struct snd_pcm_substream *substream = s->stream;
++ struct snd_pcm_runtime *runtime;
++ unsigned int dma_size;
++ unsigned int offset;
++ int ret;
++ dma_addr_t source;
++
++ runtime = substream->runtime;
++ imx_dma_disable(s->dma_dev);
++
++ if (s->active) {
++ dma_size = frames_to_bytes(runtime, runtime->period_size);
++ offset = dma_size * s->period;
++// printk("dma_size %d, off %d psize %d from 0x%x\n", dma_size, offset, runtime->period_size, (dma_addr_t)runtime->dma_area);
++ snd_assert(dma_size <= DMA_BUF_SIZE,);
++
++ source = dma_map_single(NULL,
++ runtime->dma_area + offset,
++ dma_size,
++ DMA_TO_DEVICE);
++ if (dma_mapping_error(source)) {
++ printk("Unable to map DMA buffer\n");
++ return;
++ }
++
++ ret = imx_dma_setup_single(s->dma_dev,
++ source, dma_size,
++ 0x00218000, DMA_MODE_WRITE);
++ if (ret) {
++ printk(KERN_ERR
++ "audio_process_dma: cannot queue DMA buffer (%i)\n", ret);
++ return;
++ }
++ imx_dma_enable(s->dma_dev);
++
++ s->dma_in_progress = 1;
++ s->period++;
++ s->period %= runtime->periods;
++// s->periods++;
++ s->offset = offset;
++
++ } else {
++ printk("stream not active\n");
++ }
++}
++
++/*
++ * This is called when dma IRQ occurs at the end of each transmited block
++ */
++void snd_imx_alsa_dma_interrupt(int channel, void *data)
++{
++ struct audio_stream *s = data;
++ struct snd_pcm_substream *substream = s->stream;
++ struct snd_pcm_runtime *runtime;
++// unsigned int dma_size;
++// unsigned int offset;
++// unsigned long temp;
++// int ret, i;
++// dma_addr_t source;
++
++ runtime = substream->runtime;
++
++ //printk("[%x] <dma %d>\n",IMX_TCN(IMX_TIM2_BASE), channel);
++/* // Reset DMA channel
++ CCR(channel) &= ~CCR_CEN; TO REMOVE
++ CCR(channel) |= CCR_CEN;*/
++ /*
++ * If we are getting a callback for an active stream then we inform
++ * the PCM middle layer we've finished a period
++ */
++ if (s->active)
++ snd_pcm_period_elapsed(s->stream);
++
++ spin_lock(&s->dma_lock);
++ s->dma_in_progress = 0;
++ s->periods++;
++ s->periods %= runtime->periods;
++
++// if (s->periods > 0)
++// s->periods--;
++
++ /* Trig next DMA transfer */
++ audio_process_dma(s);
++ spin_unlock(&s->dma_lock);
++}
++
++/*
++ * Alsa section
++ * PCM settings and callbacks
++ */
++static int snd_imx_alsa_trigger(struct snd_pcm_substream * substream, int cmd)
++{
++ struct snd_card_imx_codec *chip =
++ snd_pcm_substream_chip(substream);
++ int stream_id = substream->pstr->stream;
++ struct audio_stream *s = &chip->s[stream_id];
++ int err = 0;
++ u32 temp;
++
++ /* note local interrupts are already disabled in the midlevel code */
++
++ spin_lock(&s->dma_lock);
++ switch (cmd) {
++ case SNDRV_PCM_TRIGGER_START:
++ /* requested stream startup */
++ // clear SSI underrun
++ temp = SSI_SCSR;
++ SSI_STX = 0x0000;
++
++ s->active = 1;
++ s->dma_in_progress = 0;
++ audio_process_dma(s);
++ SSI_SCSR |= SSI_TE;
++ break;
++
++ case SNDRV_PCM_TRIGGER_STOP:
++ /* requested stream shutdown */
++ audio_stop_dma(s);
++ SSI_SCSR &= ~SSI_TE;
++ break;
++
++ default:
++ printk("Not supported (yet?) ALSA trigger: 0x%x\n", cmd);
++ err = -EINVAL;
++ break;
++ }
++ spin_unlock(&s->dma_lock);
++
++ return err;
++}
++
++static int snd_imx_alsa_prepare(struct snd_pcm_substream * substream)
++{
++ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ struct audio_stream *s = &chip->s[substream->pstr->stream];
++
++ /* set requested samplerate */
++ alsa_codec_config->codec_set_samplerate(runtime->rate);
++ chip->samplerate = runtime->rate;
++
++ s->period = 0;
++ s->periods = 0;
++
++ return 0;
++}
++
++static snd_pcm_uframes_t snd_imx_alsa_pointer(struct snd_pcm_substream *substream)
++{
++ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
++
++ ADEBUG();
++ return audio_get_dma_pos(&chip->s[substream->pstr->stream]);
++}
++
++static int snd_card_imx_alsa_open(struct snd_pcm_substream * substream)
++{
++ struct snd_card_imx_codec *chip =
++ snd_pcm_substream_chip(substream);
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ int stream_id = substream->pstr->stream;
++ int err;
++
++ printk ("snd_card_imx_alsa_open substream 0x%x\n", substream);
++ chip->s[stream_id].stream = substream;
++ alsa_codec_config->codec_clock_on();
++ if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
++ runtime->hw = *(alsa_codec_config->snd_imx_alsa_playback);
++ }
++ else{
++ runtime->hw = *(alsa_codec_config->snd_imx_alsa_capture);
++ printk ("capture not supported\n");
++ }
++ if ((err = snd_pcm_hw_constraint_integer(runtime,
++ SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
++ return err;
++
++ printk ("playback supported %d\n",runtime->hw.rate_min);
++ if ((err = snd_pcm_hw_constraint_list(runtime,
++ 0,
++ SNDRV_PCM_HW_PARAM_RATE,
++ alsa_codec_config->hw_constraints_rates)) < 0)
++ return err;
++ printk("success\n");
++ return 0;
++}
++
++static int snd_card_imx_alsa_close(struct snd_pcm_substream * substream)
++{
++ struct snd_card_imx_codec *chip = snd_pcm_substream_chip(substream);
++
++ ADEBUG();
++ alsa_codec_config->codec_clock_off();
++ chip->s[substream->pstr->stream].stream = NULL;
++
++ return 0;
++}
++
++/* HW params & free */
++static int snd_imx_alsa_hw_params(struct snd_pcm_substream * substream,
++ struct snd_pcm_hw_params * hw_params)
++{
++ return snd_pcm_lib_malloc_pages(substream,
++ params_buffer_bytes(hw_params));
++}
++
++static int snd_imx_alsa_hw_free(struct snd_pcm_substream * substream)
++{
++ return snd_pcm_lib_free_pages(substream);
++}
++
++/* pcm operations */
++static struct snd_pcm_ops snd_card_imx_alsa_playback_ops = {
++ .open = snd_card_imx_alsa_open,
++ .close = snd_card_imx_alsa_close,
++ .ioctl = snd_pcm_lib_ioctl,
++ .hw_params = snd_imx_alsa_hw_params,
++ .hw_free = snd_imx_alsa_hw_free,
++ .prepare = snd_imx_alsa_prepare,
++ .trigger = snd_imx_alsa_trigger,
++ .pointer = snd_imx_alsa_pointer,
++};
++
++static struct snd_pcm_ops snd_card_imx_alsa_capture_ops = {
++ .open = snd_card_imx_alsa_open,
++ .close = snd_card_imx_alsa_close,
++ .ioctl = snd_pcm_lib_ioctl,
++ .hw_params = snd_imx_alsa_hw_params,
++ .hw_free = snd_imx_alsa_hw_free,
++ .prepare = snd_imx_alsa_prepare,
++ .trigger = snd_imx_alsa_trigger,
++ .pointer = snd_imx_alsa_pointer,
++};
++
++/*
++ * Alsa init and exit section
++ *
++ * Inits pcm alsa structures, allocate the alsa buffer, suspend, resume
++ */
++static int __init snd_card_imx_alsa_pcm(struct snd_card_imx_codec *imx_alsa,
++ int device)
++{
++ struct snd_pcm *pcm;
++ int err;
++
++ ADEBUG();
++ if ((err = snd_pcm_new(imx_alsa->card, "IMX PCM", device, 1, 1, &pcm)) < 0)
++ return err;
++
++ /* sets up initial buffer with continuous allocation */
++ snd_pcm_lib_preallocate_pages_for_all(pcm,
++ SNDRV_DMA_TYPE_CONTINUOUS,
++ snd_dma_continuous_data
++ (GFP_KERNEL),
++ 8 * 1024, 8 * 1024);
++
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
++ &snd_card_imx_alsa_playback_ops);
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
++ &snd_card_imx_alsa_capture_ops);
++ pcm->private_data = imx_alsa;
++ pcm->info_flags = 0;
++ strcpy(pcm->name, "imx alsa pcm");
++
++ imx_alsa_audio_init(imx_alsa);
++
++ /* request DMA channels */
++ audio_dma_request(&imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK],
++ snd_imx_alsa_dma_interrupt);
++ audio_dma_request(&imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE],
++ snd_imx_alsa_dma_interrupt);
++
++ /* configure i.MXL DMA control register for given channels */
++ CCR(imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev) =
++ CCR_DMOD_FIFO |
++ CCR_SMOD_LINEAR |
++ CCR_SSIZ_32 | CCR_DSIZ_16 |
++ CCR_REN;
++ CCR(imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].dma_dev) =
++ CCR_DMOD_LINEAR |
++ CCR_SMOD_FIFO |
++ CCR_SSIZ_16 | CCR_DSIZ_32 |
++ CCR_REN;
++ /* configure i.MXL DMA request channel */
++ RSSR(imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev) = DMA_REQ_SSI_T;
++ RSSR(imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].dma_dev) = DMA_REQ_SSI_R;
++ /* configure DMA burst length per channel */
++ BLR(imx_alsa->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev) = SSI_DMA_BLR_TRANSMIT;
++ BLR(imx_alsa->s[SNDRV_PCM_STREAM_CAPTURE].dma_dev) = SSI_DMA_BLR;
++
++ /* Reset SSI before configuring it */
++ SSI_SCSR &= ~SSI_EN;
++ SSI_SCSR |= SSI_EN;
++ /* SSI FIFO watermark */
++ SSI_SFCSR = SSI_RFWM(8) | SSI_TFWM(TRANSMIT_WM_LEVEL);
++#ifdef TSC_MASTER
++ /* Clocks */
++ SSI_STCCR = SSI_WL_16 | SSI_DC(0);
++ SSI_SRCCR = SSI_WL_16 | SSI_DC(0);
++ /* Control */
++ SSI_SCSR = SSI_I2S_SLAVE_MODE | SSI_SYN | SSI_EN;
++ /* Transmit config */
++ SSI_STCR = SSI_MAE | SSI_FEN | SSI_SCKP | SSI_FSI | SSI_EFS;
++#else
++ /* Clocks */
++ SSI_STCCR = 0x00006103;
++ SSI_SRCCR = 0x00006103;
++ /* Transmit config */
++ SSI_STCR = SSI_MAE | SSI_FEN | SSI_FDIR | SSI_DIR | SSI_SCKP | SSI_FSI | SSI_EFS;
++ /* Control */
++ SSI_SCSR = /*SSI_SYS_CLK_EN |*/ SSI_I2S_MASTER_MODE | SSI_SYN | /*SSI_TE |*/ SSI_EN;
++#endif // TSC_MASTER
++
++ imx_alsa->pcm = pcm;
++
++ return 0;
++}
++
++
++#ifdef CONFIG_PM
++/*
++ * Driver suspend/resume - calls alsa functions. Some hints from aaci.c
++ */
++int snd_imx_alsa_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct snd_card_imx_codec *chip;
++ struct snd_card *card = platform_get_drvdata(pdev);
++
++ if (card->power_state != SNDRV_CTL_POWER_D3hot) {
++ chip = card->private_data;
++ if (chip->card->power_state != SNDRV_CTL_POWER_D3hot) {
++ snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
++ snd_pcm_suspend_all(chip->pcm);
++ /* Mutes and turn clock off */
++ alsa_codec_config->codec_clock_off();
++ snd_imx_suspend_mixer();
++ }
++ }
++ return 0;
++}
++
++int snd_imx_alsa_resume(struct platform_device *pdev)
++{
++ struct snd_card_imx_codec *chip;
++ struct snd_card *card = platform_get_drvdata(pdev);
++
++ if (card->power_state != SNDRV_CTL_POWER_D0) {
++ chip = card->private_data;
++ if (chip->card->power_state != SNDRV_CTL_POWER_D0) {
++ snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
++ alsa_codec_config->codec_clock_on();
++ snd_imx_resume_mixer();
++ }
++ }
++ return 0;
++}
++
++#endif /* CONFIG_PM */
++
++void snd_imx_alsa_free(struct snd_card * card)
++{
++ struct snd_card_imx_codec *chip = card->private_data;
++
++ /*
++ * Turn off codec after it is done.
++ * Can't do it immediately, since it may still have
++ * buffered data.
++ */
++ schedule_timeout_interruptible(2);
++
++/* omap_mcbsp_stop(AUDIO_MCBSP);
++ omap_mcbsp_free(AUDIO_MCBSP);
++*/
++ audio_dma_free(&chip->s[SNDRV_PCM_STREAM_PLAYBACK]);
++ audio_dma_free(&chip->s[SNDRV_PCM_STREAM_CAPTURE]);
++}
++
++/* module init & exit */
++
++/*
++ * Inits alsa soundcard structure.
++ * Called by the probe method in codec after function pointers has been set.
++ */
++int snd_imx_alsa_post_probe(struct platform_device *pdev, struct imx_alsa_codec_config *config)
++{
++ int err = 0;
++ int def_rate;
++ struct snd_card *card;
++
++ alsa_codec_config = config;
++
++ alsa_codec_config->codec_clock_setup();
++ alsa_codec_config->codec_clock_on();
++
++ if (alsa_codec_config && alsa_codec_config->codec_configure_dev)
++ alsa_codec_config->codec_configure_dev();
++
++ alsa_codec_config->codec_clock_off();
++
++ /* create the soundcard */
++ card = snd_card_new(-1, "IMX-ALSA", THIS_MODULE, sizeof(alsa_codec));
++ if (card == NULL)
++ goto nodev1;
++
++ alsa_codec = kcalloc(1, sizeof(*alsa_codec), GFP_KERNEL);
++ if (alsa_codec == NULL)
++ goto nodev2;
++
++ card->private_data = (void *)alsa_codec;
++ card->private_free = snd_imx_alsa_free;
++ alsa_codec->card = card;
++ def_rate = alsa_codec_config->get_default_samplerate();
++ alsa_codec->samplerate = def_rate;
++ spin_lock_init(&alsa_codec->s[0].dma_lock);
++ spin_lock_init(&alsa_codec->s[1].dma_lock);
++
++ /* mixer */
++ if ((err = snd_imx_mixer(alsa_codec)) < 0)
++ goto nodev3;
++
++ /* PCM */
++ if ((err = snd_card_imx_alsa_pcm(alsa_codec, 0)) < 0)
++ goto nodev3;
++ strcpy(card->driver, "IMXALSA");
++ strcpy(card->shortname, "ARMADEUS IMX_ALSA");
++ sprintf(card->longname, "ARMADEUS IMX_ALSA");
++
++ snd_imx_init_mixer();
++ snd_card_set_dev(card, &pdev->dev);
++
++ /* Register the created soundcard */
++ if ((err = snd_card_register(card)) == 0) {
++ printk(KERN_INFO "audio support initialized\n");
++ platform_set_drvdata(pdev, card);
++ return 0;
++ }
++
++nodev3:
++ kfree(alsa_codec);
++nodev2:
++ snd_card_free(card);
++nodev1:
++
++ return err;
++}
++
++int snd_imx_alsa_remove(struct platform_device *pdev)
++{
++ struct snd_card *card = platform_get_drvdata(pdev);
++ struct snd_card_imx_codec *chip = card->private_data;
++
++ snd_card_free(card);
++
++ alsa_codec = NULL;
++ card->private_data = NULL;
++ kfree(chip);
++
++ platform_set_drvdata(pdev, NULL);
++
++ return 0;
++}
++
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/sound/arm/imx-alsa-dma.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-dma.h 2008-07-18 15:11:05.000000000 +0200
+@@ -0,0 +1,50 @@
++/*
++ * linux/sound/arm/imx/imx-alsa-dma.h
++ *
++ * Common audio DMA handling for the iMX processors
++ *
++ * Copyright (C) 2008 Nicolas Colombain <nic...@ar...>
++ *
++ * Copyright (C) 2006 Mika Laitio <la...@cc...>
++ *
++ * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
++ *
++ * Copyright (C) 2004 Texas Instruments, Inc.
++ *
++ * Copyright (C) 2000, 2001 Nicolas Pitre <ni...@ca...>
++ *
++ * This package is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ */
++
++#ifndef __IMX_AUDIO_ALSA_DMA_H
++#define __IMX_AUDIO_ALSA_DMA_H
++
++/************************** INCLUDES *************************************/
++
++#include <asm/arch/imx-alsa.h>
++
++/************************** GLOBAL DATA STRUCTURES *********************************/
++
++typedef void (*dma_callback_t) (int lch, u16 ch_status, void *data);
++
++/**************** ARCH SPECIFIC FUNCIONS *******************************************/
++
++void imx_clear_alsa_sound_dma(struct audio_stream * s);
++
++/*int imx_request_alsa_sound_dma(int device_id, const char *device_name,
++ void *data, int **channels);*/
++//int imx_free_alsa_sound_dma(void *data, int **channels);
++
++int imx_start_alsa_sound_dma(struct audio_stream *s, dma_addr_t dma_ptr, u_int dma_size);
++
++void imx_stop_alsa_sound_dma(struct audio_stream *s);
++
++#endif
++
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.c 2008-07-18 15:11:34.000000000 +0200
+@@ -0,0 +1,345 @@
++/*
++ * sound/arm/imx-alsa-tsc2102.c
++ *
++ * Alsa codec driver for TSC2102 chip for iMXL platforms.
++ *
++ * Copyright (c) 2008 Jorasse <jo...@ar...>
++ * Code based on the TSC2101 ALSA driver for omap platforms.
++ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
++ * Code based on the TSC2101 ALSA driver.
++ *
++ * 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.
++ */
++
++#include <linux/delay.h>
++#include <linux/soundcard.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/slab.h>
++#ifdef CONFIG_PM
++#include <linux/pm.h>
++#endif
++#include <linux/spi/tsc2102.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/imx-regs.h>
++#include <asm/arch/imx-alsa.h>
++
++#include "imx-alsa-tsc2102.h"
++
++static struct clk *tsc2102_bclk = 0;
++
++/*
++ * Hardware capabilities
++ */
++
++/* DAC sampling rates (BCLK = 12 MHz) */
++static unsigned int rates[] = {
++ 7350, 8000, 8820, 9600, 11025, 12000, 14700,
++ 16000, 22050, 24000, 29400, 32000, 44100, 48000,
++};
++
++static struct snd_pcm_hw_constraint_list tsc2102_hw_constraints_rates = {
++ .count = ARRAY_SIZE(rates),
++ .list = rates,
++ .mask = 0,
++};
++
++#define IMX_SSI_RATES \
++ (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | \
++ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
++ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
++ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_KNOT)
++
++static struct snd_pcm_hardware tsc2102_snd_imx_alsa_playback = {
++ .info = SNDRV_PCM_INFO_INTERLEAVED |
++ SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
++ SNDRV_PCM_INFO_MMAP_VALID,
++ .formats = SNDRV_PCM_FMTBIT_S16_LE,
++ .rates = IMX_SSI_RATES,
++ .rate_min = 8000,
++ .rate_max = 48000,
++ .channels_min = 2,
++ .channels_max = 2,
++ .buffer_bytes_max = 32 * 1024,
++ .period_bytes_min = 64,
++ .period_bytes_max = 8 * 1024, //test
++ .periods_min = 2,
++ .periods_max = 255,
++ .fifo_size = 0,
++};
++
++#define DUMP_TSC2102_AUDIO_REGISTERS 1
++#ifdef DUMP_TSC2102_AUDIO_REGISTERS
++static void dump_tsc2102_audio_regs(void) {
++ printk("TSC2102_AUDIO1_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_AUDIO1_CTRL));
++ printk("TSC2102_DAC_GAIN_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_DAC_GAIN_CTRL));
++ printk("TSC2102_AUDIO2_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_AUDIO2_CTRL));
++ printk("TSC2102_DAC_POWER_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_DAC_POWER_CTRL));
++ printk("TSC2102_AUDIO3_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_AUDIO3_CTRL));
++ printk("TSC2102_LCH_BASS_BOOST_N0 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N0));
++ printk("TSC2102_LCH_BASS_BOOST_N1 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N1));
++ printk("TSC2102_LCH_BASS_BOOST_N2 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N2));
++ printk("TSC2102_LCH_BASS_BOOST_N3 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N3));
++ printk("TSC2102_LCH_BASS_BOOST_N4 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N4));
++ printk("TSC2102_LCH_BASS_BOOST_N5 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_N5));
++ printk("TSC2102_LCH_BASS_BOOST_D1 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D1));
++ printk("TSC2102_LCH_BASS_BOOST_D2 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D2));
++ printk("TSC2102_LCH_BASS_BOOST_D4 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D4));
++ printk("TSC2102_LCH_BASS_BOOST_D5 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_LCH_BASS_BOOST_D5));
++ printk("TSC2102_RCH_BASS_BOOST_N0 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N0));
++ printk("TSC2102_RCH_BASS_BOOST_N1 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N1));
++ printk("TSC2102_RCH_BASS_BOOST_N2 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N2));
++ printk("TSC2102_RCH_BASS_BOOST_N3 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N3));
++ printk("TSC2102_RCH_BASS_BOOST_N4 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N4));
++ printk("TSC2102_RCH_BASS_BOOST_N5 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_N5));
++ printk("TSC2102_RCH_BASS_BOOST_D1 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D1));
++ printk("TSC2102_RCH_BASS_BOOST_D2 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D2));
++ printk("TSC2102_RCH_BASS_BOOST_D4 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D4));
++ printk("TSC2102_RCH_BASS_BOOST_D5 = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_RCH_BASS_BOOST_D5));
++ printk("TSC2102_PLL1_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_PLL1_CTRL));
++ printk("TSC2102_PLL2_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_PLL2_CTRL));
++ printk("TSC2102_AUDIO4_CTRL = 0x%04x\n",
++ tsc2102_read_sync(TSC2102_AUDIO4_CTRL));
++}
++#endif
++
++/*
++ * ALSA operations according to board file
++ */
++
++static long current_rate = 0;
++
++/*
++ * Sample rate changing
++ */
++static void tsc2102_set_samplerate(long sample_rate)
++{
++ int clkgdv = 0;
++ u16 srgr1, srgr2;
++
++ if (sample_rate == current_rate)
++ return;
++ current_rate = 0;
++
++#if 0
++ /* Wait for any frames to complete */
++ udelay(125);
++#endif
++ /* Set the sample rate on the TSC */
++ if (tsc2102_set_rate(sample_rate)) {
++ printk("error setting TSC at %d Hz sample rate\n", sample_rate);
++ return;
++ }
++
++#ifdef TSC_MASTER
++
++#else
++ /* Set the sample rate on the i.MXL SSI */
++ printk("erreur 1");
++ imx_get_perclk3();
++ clkgdv = CODEC_CLOCK / (sample_rate * (DEFAULT_BITPERSAMPLE * 2 - 1));
++ if (clkgdv)
++ srgr1 = (FWID(DEFAULT_BITPERSAMPLE - 1) | CLKGDV(clkgdv));
++ else
++ return;
++ xxxxx
++ /* Stereo Mode */
++ srgr2 = (CLKSM | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1));
++#endif
++
++ current_rate = sample_rate;
++ dump_tsc2102_audio_regs();
++}
++
++static void tsc2102_configure(void)
++{
++ tsc2102_dac_power(1);
++
++#ifdef TSC_MASTER
++ tsc2102_set_i2s_master(1);
++#else
++#error "to be implemented"
++ tsc2102_set_i2s_master(0);
++#endif
++}
++
++/*
++ * Do clock framework bclk search
++ */
++static void tsc2102_clock_setup(void)
++{
++ /*tsc2102_bclk = clk_get(0, "bclk"); no clock management*/
++}
++
++/*
++ * Do some sanity checks, set clock rate, start it.
++ */
++static int tsc2102_clock_on(void)
++{
++/* int err;
++no clock management*/
++
++#ifdef TSC_MASTER
++
++#endif
++
++/* if (clk_get_usecount(tsc2102_bclk) > 0 &&
++ clk_get_rate(tsc2102_bclk) != CODEC_CLOCK) {
++ printk(KERN_WARNING
++ "BCLK already in use at %d Hz. We change it to %d Hz\n",
++ (uint) clk_get_rate(tsc2102_bclk), CODEC_CLOCK);
++
++ err = clk_set_rate(tsc2102_bclk, CODEC_CLOCK);
++ if (err) {
++ printk(KERN_WARNING "Cannot set BCLK clock rate "
++ "for TSC2102 codec, error code = %d\n", err);
++ }
++ }
++
++ clk_enable(tsc2102_bclk);
++no clock management*/
++
++ /* Clock disabled when SSI disabled */
++ //?? SSI_SOR |= 0x40;
++
++ return 0;
++}
++
++/*
++ * Turn off the audio codec and then stop the clock.
++ */
++static int tsc2102_clock_off(void)
++{
++ DPRINTK("clock use count = %d\n", clk_get_usecount(tsc2102_bclk));
++
++/* clk_disable(tsc2102_bclk);
++no clock management */
++
++ /* Clock enabled when SSI disabled */
++ //?? SSI_SOR &= ~0x40;
++
++ return 0;
++}
++
++static int tsc2102_get_default_samplerate(void)
++{
++ return DEFAULT_SAMPLE_RATE;
++}
++
++#ifdef CONFIG_PM
++static int snd_imx_alsa_tsc2102_suspend(
++ struct platform_device *pdev, pm_message_t state)
++{
++ tsc2102_dac_power(0);
++ current_rate = 0;
++
++ return snd_imx_alsa_suspend(pdev, state);
++}
++
++static int snd_imx_alsa_tsc2102_resume(struct platform_device *pdev)
++{
++ tsc2102_dac_power(1);
++
++#ifdef TSC_MASTER
++ tsc2102_set_i2s_master(1);
++#else
++ tsc2102_set_i2s_master(0);
++#endif
++
++ return snd_imx_alsa_resume(pdev);
++}
++#endif // CONFIG_PM
++
++static int __init snd_imx_alsa_tsc2102_probe(struct platform_device *pdev)
++{
++ int ret;
++ struct imx_alsa_codec_config *codec_cfg = pdev->dev.platform_data;
++
++ if (codec_cfg) {
++ codec_cfg->hw_constraints_rates =
++ &tsc2102_hw_constraints_rates;
++ codec_cfg->snd_imx_alsa_playback =
++ &tsc2102_snd_imx_alsa_playback;
++ codec_cfg->codec_configure_dev = tsc2102_configure;
++ codec_cfg->codec_set_samplerate = tsc2102_set_samplerate;
++ codec_cfg->codec_clock_setup = tsc2102_clock_setup;
++ codec_cfg->codec_clock_on = tsc2102_clock_on;
++ codec_cfg->codec_clock_off = tsc2102_clock_off;
++ codec_cfg->get_default_samplerate =
++ tsc2102_get_default_samplerate;
++ ret = snd_imx_alsa_post_probe(pdev, codec_cfg);
++ } else
++ ret = -ENODEV;
++
++ return ret;
++}
++
++static int snd_imx_alsa_tsc2102_remove(struct platform_device *pdev)
++{
++ tsc2102_dac_power(0);
++
++ return snd_imx_alsa_remove(pdev);
++}
++
++static struct platform_driver imx_alsa_driver = {
++ .probe = snd_imx_alsa_tsc2102_probe,
++ .remove = snd_imx_alsa_tsc2102_remove,
++#ifdef CONFIG_PM
++ .suspend = snd_imx_alsa_tsc2102_suspend,
++ .resume = snd_imx_alsa_tsc2102_resume,
++#endif // CONFIG_PM
++ .driver = {
++ .name = "tsc2102-alsa",
++ },
++};
++
++static int __init imx_alsa_tsc2102_init(void)
++{
++ int err;
++
++ ADEBUG();
++ err = platform_driver_register(&imx_alsa_driver);
++
++ return err;
++}
++
++static void __exit imx_alsa_tsc2102_exit(void)
++{
++ ADEBUG();
++ platform_driver_unregister(&imx_alsa_driver);
++}
++
++module_init(imx_alsa_tsc2102_init);
++module_exit(imx_alsa_tsc2102_exit);
++
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102.h 2008-07-18 15:11:51.000000000 +0200
+@@ -0,0 +1,46 @@
++/*
++ * sound/arm/imx-alsa-tsc2102.h
++ *
++ * Alsa codec driver for TSC2102 chip for IMX1 platforms.
++ *
++ * Copyright (c) 2008 Jorasse <jo...@ar...>
++ * Code based on the TSC2101 ALSA driver for omap platforms.
++ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
++ * Code based on the TSC2101 ALSA driver.
++ *
++ * 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.
++ */
++
++#ifndef IMX_ALSA_TSC2102_H_
++#define IMX_ALSA_TSC2102_H_
++
++#include <linux/types.h>
++
++/* Define to set the TSC as the master, otherwise slave */
++#define TSC_MASTER
++
++/*
++ * Audio related macros
++ */
++#ifndef DEFAULT_BITPERSAMPLE
++#define DEFAULT_BITPERSAMPLE 16
++#endif
++
++#define DEFAULT_SAMPLE_RATE 48000
++#define CODEC_CLOCK 16000000
++#define AUDIO_MCBSP OMAP_MCBSP1 /* to remove */
++
++/*
++ * ALSA mixer related macros
++ */
++#define OUTPUT_VOLUME_MIN 0x7f /* 1111111 = -63.5 dB */
++#define OUTPUT_VOLUME_MAX 0x00 /* 0000000 */
++#define OUTPUT_VOLUME_RANGE (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX)
++
++#define DEFAULT_OUTPUT_VOLUME 90 /* Default output volume */
++
++#endif /* IMX_ALSA_TSC2102_H_ */
++
+PATCH AUTOMATICALLY GENERATED
+DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
+(Take a look at armadeus/target/linux/ directory)
+--- linux-2.6.23.1.original/sound/arm/imx-alsa-tsc2102-mixer.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1.mod/sound/arm/imx-alsa-tsc2102-mixer.c 2008-07-18 15:12:06.000000000 +0200
+@@ -0,0 +1,288 @@
++/*
++ * sound/arm/imx-alsa-tsc2102-mixer.c
++ *
++ * Alsa codec driver for TSC2102 chip for iMXL platforms.
++ *
++ * Copyright (c) 2008 Jorasse <jo...@ar...>
++ * Code based on the TSC2101 ALSA driver for omap platforms.
++ * Copyright (c) 2006 Andrzej Zaborowski <ba...@za...>
++ * Code based on the TSC2101 ALSA driver.
++ *
++ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
++ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
++ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
++ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#include <linux/types.h>
++#include <linux/spi/tsc2102.h>
++
++#include <asm/arch/imx-alsa.h>
++
++#include <sound/driver.h>
++#include <sound/initval.h>
++#include <sound/control.h>
++
++#include "imx-alsa-tsc2102.h"
++
++static int vol[2], mute[2], filter[2];
++
++/*
++ * Converts the Alsa mixer volume (0 - 100) to actual Digital
++ * Gain Control (DGC) value that can be written or read from the
++ * TSC2102 registers.
++ *
++ * Note that the number "OUTPUT_VOLUME_MAX" is smaller than
++ * OUTPUT_VOLUME_MIN because DGC works as a volume decreaser. (The
++ * higher the value sent to DAC, the more the volume of controlled
++ * channel is decreased)
++ */
++static void set_dac_gain_stereo(int left_ch, int right_ch)
++{
++ int lch, rch;
++
++ if (left_ch > 100)
++ vol[0] = 100;
++ else if (left_ch < 0)
++ vol[0] = 0;
++ else
++ vol[0] = left_ch;
++ lch = OUTPUT_VOLUME_MIN - vol[0] *
++ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
++
++ if (right_ch > 100)
++ vol[1] = 100;
++ else if (right_ch < 0)
++ vol[1] = 0;
++ else
++ vol[1] = right_ch;
++ rch = OUTPUT_VOLUME_MIN - vol[1] *
++ (OUTPUT_VOLUME_MIN - OUTPUT_VOLUME_MAX) / 100;
++
++ tsc2102_set_volume(lch, rch);
++}
++
++void init_playback_targets(void)
++{
++ set_dac_gain_stereo(DEFAULT_OUTPUT_VOLUME, DEFAULT_OUTPUT_VOLUME);
++
++ /* Unmute */
++ tsc2102_set_mute(0, 0);
++
++ mute[0] = mute[1] = 0;
++ filter[0] = filter[1] = 0;
++}
++
++/*
++ * Initializes TSC 2102 and playback target.
++ */
++void snd_imx_init_mixer(void)
++{
++ FN_IN;
++
++ init_playback_targets();
++
++ FN_OUT(0);
++}
++
++static int __pcm_playback_volume_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 100;
++ return 0;
++}
++
++static int __pcm_playback_volume_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = vol[0]; /* L */
++ ucontrol->value.integer.value[1] = vol[1]; /* R */
++
++ return 0;
++}
++
++static int __pcm_playback_volume_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ set_dac_gain_stereo(
++ ucontrol->value.integer.value[0], /* L */
++ ucontrol->value.integer.value[1]); /* R */
++ return 1;
++}
++
++static int __pcm_playback_switch_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 1;
++ return 0;
++}
++
++static int __pcm_playback_switch_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = !mute[0]; /* L */
++ ucontrol->value.integer.value[1] = !mute[1]; /* R */
++
++ return 0;
++}
++
++static int __pcm_playback_switch_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ mute[0] = (ucontrol->value.integer.value[0] == 0); /* L */
++ mute[1] = (ucontrol->value.integer.value[1] == 0); /* R */
++
++ tsc2102_set_mute(mute[0], mute[1]);
++ return 1;
++}
++
++static int __pcm_playback_deemphasis_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 1;
++ return 0;
++}
++
++static int __pcm_playback_deemphasis_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = filter[0];
++ return 0;
++}
++
++static int __pcm_playback_deemphasis_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ filter[0] = (ucontrol->value.integer.value[0] > 0);
++
++ tsc2102_set_deemphasis(filter[0]);
++ return 1;
++}
++
++static int __pcm_playback_bassboost_info(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
++{
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = 1;
++ return 0;
++}
++
++static int __pcm_playback_bassboost_get(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ ucontrol->value.integer.value[0] = filter[1];
++ return 0;
++}
++
++static int __pcm_playback_bassboost_put(
++ struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
++{
++ filter[1] = (ucontrol->value.integer.value[0] > 0);
++
++ tsc2102_set_bassboost(filter[1]);
++ return 1;
++}
++
++static struct snd_kcontrol_new tsc2102_control[] __devinitdata = {
++ {
++ .name = "Master Playback Volume",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __pcm_playback_volume_info,
++ .get = __pcm_playback_volume_get,
++ .put = __pcm_playback_volume_put,
++ },
++ {
++ .name = "Master Playback Switch",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __pcm_playback_switch_info,
++ .get = __pcm_playback_switch_get,
++ .put = __pcm_playback_switch_put,
++ },
++ {
++ .name = "De-emphasis Filter Switch",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __pcm_playback_deemphasis_info,
++ .get = __pcm_playback_deemphasis_get,
++ .put = __pcm_playback_deemphasis_put,
++ },
++ {
++ .name = "Bass-boost Filter Switch",
++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++ .index = 0,
++ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
++ .info = __pcm_playback_bassboost_info,
++ .get = __pcm_playback_bassboost_get,
++ .put = __pcm_playback_bassboost_put,
++ },
++};
++
++#ifdef CONFIG_PM
++void snd_imx_suspend_mixer(void)
++{
++ /* Nothing to do */
++}
++
++void snd_imx_resume_mixer(void)
++{
++ /* The chip was reset, restore the last used values */
++ set_dac_gain_stereo(vol[0], vol[1]);
++
++ tsc2102_set_mute(mute[0], mute[1]);
++ tsc2102_set_deemphasis(filter[0]);
++ tsc2102_set_bassboost(filter[1]);
++}
++#endif
++
++int snd_imx_mixer(struct snd_card_imx_codec *tsc2102)
++{
++ int i, err;
++
++ if (!tsc2102)
++ return -EINVAL;
++
++ for (i = 0; i < ARRAY_SIZE(tsc2102_control); i ++) {
++ err = snd_ctl_add(tsc2102->card,
++ snd_ctl_new1(&tsc2102_control[i],
++ tsc2102->card));
++
++ if (err < 0)
++ return err;
++ }
++ return 0;
++}
++
++MODULE_DESCRIPTION("Interface driver for TI TSC2102 chips.");
++MODULE_LICENSE("GPL");
++
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/092-alsa-imx-ssi-tsc2102-integrate-driver-to-linux-build-system.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/092-alsa-imx-ssi-tsc2102-integrate-driver-to-linux-build-system.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/092-alsa-imx-ssi-tsc2102-integrate-driver-to-linux-build-system.diff 2008-07-18 19:52:49 UTC (rev 837)
@@ -0,0 +1,29 @@
+--- linux-2.6.23.1/sound/arm/Kconfig 2007-10-12 18:43:44.000000000 +0200
++++ linux-2.6.23.1.alsa/sound/arm/Kconfig 2008-07-17 17:39:17.000000000 +0200
+@@ -33,4 +33,16 @@
+ Say Y or M if you want to support any AC97 codec attached to
+ the PXA2xx AC97 interface.
+
++config SND_IMX_TSC2102
++ tristate "i.MX1/L TSC2102 alsa driver"
++ depends on ARCH_IMX && SND
++ select SND_PCM
++ select SPI_TSC2102
++ help
++ Say Y here if you have an i.MX1/L platform board
++ and a TSC2102 audio chip.
++
++ To compile this driver as a module, choose M here: the module
++ will be called snd-imx-tsc2102.
++
+ endmenu
+--- linux-2.6.23.1/sound/arm/Makefile 2007-10-12 18:43:44.000000000 +0200
++++ linux-2.6.23.1.alsa/sound/arm/Makefile 2008-07-17 15:53:07.000000000 +0200
+@@ -13,3 +13,7 @@
+
+ obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o
+ snd-pxa2xx-ac97-objs := pxa2xx-ac97.o
++
++obj-$(CONFIG_SND_IMX_TSC2102) += snd-imx-alsa-tsc2102.o
++snd-imx-alsa-tsc2102-objs := imx-alsa.o imx-alsa-tsc2102.o imx-alsa-tsc2102-mixer.o
++
Added: trunk/buildroot/target/device/armadeus/linux...
[truncated message content] |
|
From: <ar...@us...> - 2008-07-18 16:35:40
|
Revision: 836
http://armadeus.svn.sourceforge.net/armadeus/?rev=836&view=rev
Author: artemys
Date: 2008-07-18 16:35:49 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
[LINUX] Add comment in spi2-reg-irq-defines patch
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/075-linux-2.6.23.1-spi2-reg-irq-defines.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/075-linux-2.6.23.1-spi2-reg-irq-defines.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/075-linux-2.6.23.1-spi2-reg-irq-defines.diff 2008-07-18 16:02:37 UTC (rev 835)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/075-linux-2.6.23.1-spi2-reg-irq-defines.diff 2008-07-18 16:35:49 UTC (rev 836)
@@ -1,12 +1,13 @@
---- linux-2.6.18.1/include/asm-arm/arch-imx/imx-regs.h 2007-08-01 22:01:00.000000000 +0200
-+++ linux-2.6.18.1.mod/include/asm-arm/arch-imx/imx-regs.h 2007-07-17 00:08:11.000000000 +0200
-@@ -39,6 +39,16 @@
+--- linux-2.6.23.1/include/asm-arm/arch-imx/imx-regs.h 2007-08-01 22:01:00.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/imx-regs.h 2007-07-17 00:08:11.000000000 +0200
+@@ -39,6 +39,17 @@
#define IMX_AITC_BASE (0x23000 + IMX_IO_BASE)
#define IMX_CSI_BASE (0x24000 + IMX_IO_BASE)
+/* System control registers */
+
+#define FMCR __REG(0x1B808 + IMX_IO_BASE)
++/* FMCR bit fields */
+#define SPI2_RXD_SEL (1 << 8)
+#define SSI_RXFS_SEL (1 << 7)
+#define SSI_RXCLK_SEL (1 << 6)
@@ -26,8 +27,8 @@
#define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 )
#define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 )
#define PD8_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8 )
---- linux-2.6.18.1/include/asm-arm/arch-imx/irqs.h 2006-10-14 05:34:03.000000000 +0200
-+++ linux-2.6.18.1.mod/include/asm-arm/arch-imx/irqs.h 2007-07-15 15:59:04.000000000 +0200
+--- linux-2.6.23.1/include/asm-arm/arch-imx/irqs.h 2006-10-14 05:34:03.000000000 +0200
++++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/irqs.h 2007-07-15 15:59:04.000000000 +0200
@@ -61,6 +61,7 @@
#define PWM_INT 34
#define SDHC_INT 35
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-18 16:05:27
|
Revision: 835
http://armadeus.svn.sourceforge.net/armadeus/?rev=835&view=rev
Author: artemys
Date: 2008-07-18 16:02:37 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
[LINUX] Split tsc2102 spi patch in 2 parts (driver/build) + do some defines update in tsc2102.h
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-tsc2102-integrate-driver-to-linux-build-system.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2008-07-18 08:16:51 UTC (rev 834)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-linux-2.6.23.1-tsc2102.diff 2008-07-18 16:02:37 UTC (rev 835)
@@ -1,7 +1,6 @@
-diff -pNur ref/linux-2.6.18.1/include/linux/spi/tsc2102.h linux-2.6.18.1/include/linux/spi/tsc2102.h
---- ref/linux-2.6.18.1/include/linux/spi/tsc2102.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.18.1/include/linux/spi/tsc2102.h 2007-09-22 01:42:29.000000000 +0200
-@@ -0,0 +1,175 @@
+--- linux-2.6.23.original/include/linux/spi/tsc2102.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.mod/include/linux/spi/tsc2102.h 2007-09-22 01:42:29.000000000 +0200
+@@ -0,0 +1,176 @@
+/*
+ * include/linux/spi/tsc2102.h
+ *
@@ -57,7 +56,7 @@
+extern int tsc2102_temp1_cb(tsc2102_temp_t handler);
+extern int tsc2102_temp2_cb(tsc2102_temp_t handler);
+
-+#ifdef CONFIG_SOUND
++#if defined(CONFIG_SOUND) || defined(CONFIG_SOUND_MODULE)
+extern void tsc2102_set_volume(uint8_t left_ch, uint8_t right_ch);
+extern void tsc2102_set_mute(int left_ch, int right_ch);
+extern void tsc2102_get_mute(int *left_ch, int *right_ch);
@@ -66,7 +65,7 @@
+extern void tsc2102_set_i2s_master(int state);
+extern void tsc2102_set_deemphasis(int enable);
+extern void tsc2102_set_bassboost(int enable);
-+#endif
++#endif // CONFIG_SOUND || CONFIG_SOUND_MODULE
+
+extern void tsc2102_keyclick(int amplitude, int freq, int length);
+
@@ -123,7 +122,8 @@
+/* Field masks for Audio Control 1 */
+#define AC1_WLEN(ARG) (((ARG) & 0x03) << 10)
+#define AC1_DATFM(ARG) (((ARG) & 0x03) << 8)
-+#define AC1_DACFS(ARG) ((ARG) & 0x3f)
++#define AC1_DACFS_MASK (0x3f)
++#define AC1_DACFS(ARG) ((ARG) & AC1_DACFS_MASK)
+
+/* Field masks for TSC2102_DAC_GAIN_CTRL */
+#define DGC_DALMU (1 << 15)
@@ -162,7 +162,7 @@
+#define PLL1_PLLEN (1 << 15)
+#define PLL1_Q_VAL(ARG) (((ARG) & 0x0f) << 11)
+#define PLL1_P_VAL(ARG) (((ARG) & 0x07) << 8)
-+#define PLL1_I_VAL(ARG) (((ARG) & 0x3f) << 2)
++#define PLL1_J_VAL(ARG) (((ARG) & 0x3f) << 2)
+
+/* Field masks for TSC2102_PLL2_CTRL */
+#define PLL2_D_VAL(ARG) (((ARG) & 0x3fff) << 2)
@@ -177,38 +177,8 @@
+};
+
+#endif /* __LINUX_SPI_TSC2102_H */
-diff -pNur test/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/spi/Kconfig armadeus/buildroot/build_arm_nofpu/linux-2.6.18.1/drivers/spi/Kconfig
---- ref/linux-2.6.18.1/drivers/spi/Kconfig 2007-09-22 02:39:35.000000000 +0200
-+++ linux-2.6.18.1/drivers/spi/Kconfig 2007-09-16 11:08:17.000000000 +0200
-@@ -230,6 +230,14 @@ comment "SPI Protocol Masters"
- sysfs interface, with each line presented as a kind of GPIO
- exposing both switch control and diagnostic feedback.
-
-+config SPI_TSC2102
-+ depends on SPI_MASTER
-+ depends on HWMON = n || HWMON
-+ tristate "TSC2102 codec support"
-+ ---help---
-+ Say Y here if you want support for the TSC2102 chip. It
-+ will be needed for the touchscreen driver on some boards.
-+
- #
- # Add new SPI protocol masters in alphabetical order above this line
- #
-diff -pNur ref/linux-2.6.18.1/drivers/spi/Makefile linux-2.6.18.1/drivers/spi/Makefile
---- ref/linux-2.6.18.1/drivers/spi/Makefile 2007-09-22 02:39:35.000000000 +0200
-+++ linux-2.6.18.1/drivers/spi/Makefile 2007-09-16 11:08:16.000000000 +0200
-@@ -33,6 +33,7 @@
- obj-$(CONFIG_SPI_AT25) += at25.o
- obj-$(CONFIG_SPI_SPIDEV) += spidev.o
- obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
-+obj-$(CONFIG_SPI_TSC2102) += tsc2102.o
- # ... add above this line ...
-
- # SPI slave controller drivers (upstream link)
-diff -pNur ref/linux-2.6.18.1/drivers/spi/tsc2102.c linux-2.6.18.1/drivers/spi/tsc2102.c
---- ref/linux-2.6.18.1/drivers/spi/tsc2102.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.18.1/drivers/spi/tsc2102.c 2007-09-22 01:42:55.000000000 +0200
+--- linux-2.6.23.original/drivers/spi/tsc2102.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.mod/drivers/spi/tsc2102.c 2007-09-22 01:42:55.000000000 +0200
@@ -0,0 +1,1103 @@
+/*
+ * drivers/spi/tsc2102.c
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-tsc2102-integrate-driver-to-linux-build-system.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-tsc2102-integrate-driver-to-linux-build-system.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/073-tsc2102-integrate-driver-to-linux-build-system.diff 2008-07-18 16:02:37 UTC (rev 835)
@@ -0,0 +1,27 @@
+--- linux-2.6.23.original/drivers/spi/Kconfig 2007-09-22 02:39:35.000000000 +0200
++++ linux-2.6.23.mod/drivers/spi/Kconfig 2007-09-16 11:08:17.000000000 +0200
+@@ -230,6 +230,14 @@ comment "SPI Protocol Masters"
+ sysfs interface, with each line presented as a kind of GPIO
+ exposing both switch control and diagnostic feedback.
+
++config SPI_TSC2102
++ depends on SPI_MASTER
++ depends on HWMON = n || HWMON
++ tristate "TSC2102 codec support"
++ ---help---
++ Say Y here if you want support for the TSC2102 chip. It
++ will be needed for the touchscreen driver on some boards.
++
+ #
+ # Add new SPI protocol masters in alphabetical order above this line
+ #
+--- linux-2.6.23.original/drivers/spi/Makefile 2007-09-22 02:39:35.000000000 +0200
++++ linux-2.6.23.mod/drivers/spi/Makefile 2007-09-16 11:08:16.000000000 +0200
+@@ -33,6 +33,7 @@
+ obj-$(CONFIG_SPI_AT25) += at25.o
+ obj-$(CONFIG_SPI_SPIDEV) += spidev.o
+ obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
++obj-$(CONFIG_SPI_TSC2102) += tsc2102.o
+ # ... add above this line ...
+
+ # SPI slave controller drivers (upstream link)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-18 08:16:43
|
Revision: 834
http://armadeus.svn.sourceforge.net/armadeus/?rev=834&view=rev
Author: artemys
Date: 2008-07-18 08:16:51 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
[LINUX] Extract defconfig part (not used) from apf9328.diff
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328_defconfig.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-17 08:45:37 UTC (rev 833)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328.diff 2008-07-18 08:16:51 UTC (rev 834)
@@ -1,811 +1,3 @@
---- ref/linux-2.6.23.1/arch/arm/configs/apf9328_defconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.23.1/arch/arm/configs/apf9328_defconfig 2006-10-07 20:09:07.000000000 +0200
-@@ -0,0 +1,805 @@
-+#
-+# Automatically generated make config: don't edit
-+# Linux kernel version: 2.6.10-imx1
-+# Fri Dec 16 23:27:52 2005
-+#
-+CONFIG_ARM=y
-+CONFIG_MMU=y
-+CONFIG_UID16=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_GENERIC_IOMAP=y
-+
-+#
-+# Code maturity level options
-+#
-+CONFIG_EXPERIMENTAL=y
-+CONFIG_CLEAN_COMPILE=y
-+CONFIG_BROKEN_ON_SMP=y
-+CONFIG_LOCK_KERNEL=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+
-+#
-+# General setup
-+#
-+CONFIG_LOCALVERSION=""
-+CONFIG_SWAP=y
-+CONFIG_SYSVIPC=y
-+# CONFIG_POSIX_MQUEUE is not set
-+# CONFIG_BSD_PROCESS_ACCT is not set
-+# CONFIG_SYSCTL is not set
-+# CONFIG_AUDIT is not set
-+# CONFIG_HOTPLUG is not set
-+CONFIG_KOBJECT_UEVENT=y
-+CONFIG_IKCONFIG=y
-+CONFIG_IKCONFIG_PROC=y
-+CONFIG_EMBEDDED=y
-+# CONFIG_KALLSYMS is not set
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-+CONFIG_SHMEM=y
-+CONFIG_CC_ALIGN_FUNCTIONS=0
-+CONFIG_CC_ALIGN_LABELS=0
-+CONFIG_CC_ALIGN_LOOPS=0
-+CONFIG_CC_ALIGN_JUMPS=0
-+# CONFIG_TINY_SHMEM is not set
-+CONFIG_BASE_SMALL=0
-+
-+#
-+# Loadable module support
-+#
-+CONFIG_MODULES=y
-+CONFIG_MODULE_UNLOAD=y
-+# CONFIG_MODULE_FORCE_UNLOAD is not set
-+CONFIG_OBSOLETE_MODPARM=y
-+# CONFIG_MODVERSIONS is not set
-+# CONFIG_MODULE_SRCVERSION_ALL is not set
-+CONFIG_KMOD=y
-+
-+#
-+# System Type
-+#
-+# CONFIG_ARCH_CLPS7500 is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_CO285 is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_CAMELOT is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_IOP3XX is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_IXP2000 is not set
-+# CONFIG_ARCH_L7200 is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C2410 is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_LH7A40X is not set
-+# CONFIG_ARCH_OMAP is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+CONFIG_ARCH_IMX=y
-+# CONFIG_ARCH_H720X is not set
-+
-+#
-+# IMX Implementations
-+#
-+# CONFIG_MACH_MX1FS2 is not set
-+# CONFIG_MACH_SCB9328 is not set
-+CONFIG_MACH_APF9328=y
-+# CONFIG_ARCH_MX1ADS is not set
-+# CONFIG_MACH_PIMX1 is not set
-+# CONFIG_IMX_APF9328_FLASH_8MB is not set
-+CONFIG_IMX_APF9328_FLASH_16MB=y
-+# CONFIG_IMX_SCB9328_RAM_16MB is not set
-+CONFIG_IMX_SCB9328_RAM_32MB=y
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_32=y
-+CONFIG_CPU_ARM920T=y
-+CONFIG_CPU_32v4=y
-+CONFIG_CPU_ABRT_EV4T=y
-+CONFIG_CPU_CACHE_V4WT=y
-+CONFIG_CPU_CACHE_VIVT=y
-+CONFIG_CPU_COPY_V4WB=y
-+CONFIG_CPU_TLB_V4WBI=y
-+
-+#
-+# Processor Features
-+#
-+CONFIG_ARM_THUMB=y
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-+
-+#
-+# General setup
-+#
-+CONFIG_ZBOOT_ROM_TEXT=0x0
-+CONFIG_ZBOOT_ROM_BSS=0x0
-+# CONFIG_XIP_KERNEL is not set
-+
-+#
-+# At least one math emulation must be selected
-+#
-+CONFIG_FPE_NWFPE=y
-+CONFIG_FPE_NWFPE_XP=y
-+CONFIG_FPE_FASTFPE=y
-+CONFIG_BINFMT_ELF=y
-+# CONFIG_BINFMT_AOUT is not set
-+# CONFIG_BINFMT_MISC is not set
-+
-+#
-+# Generic Driver Options
-+#
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+# CONFIG_PM is not set
-+CONFIG_PREEMPT=y
-+# CONFIG_ARTHUR is not set
-+CONFIG_CMDLINE=""
-+# CONFIG_LEDS is not set
-+CONFIG_ALIGNMENT_TRAP=y
-+
-+#
-+# Parallel port support
-+#
-+# CONFIG_PARPORT is not set
-+
-+#
-+# Memory Technology Devices (MTD)
-+#
-+CONFIG_MTD=y
-+CONFIG_MTD_DEBUG=y
-+CONFIG_MTD_DEBUG_VERBOSE=3
-+CONFIG_MTD_PARTITIONS=y
-+# CONFIG_MTD_CONCAT is not set
-+# CONFIG_MTD_REDBOOT_PARTS is not set
-+CONFIG_MTD_CMDLINE_PARTS=y
-+CONFIG_MTD_AFS_PARTS=y
-+
-+#
-+# User Modules And Translation Layers
-+#
-+CONFIG_MTD_CHAR=y
-+CONFIG_MTD_BLOCK=y
-+# CONFIG_FTL is not set
-+# CONFIG_NFTL is not set
-+# CONFIG_INFTL is not set
-+
-+#
-+# RAM/ROM/Flash chip drivers
-+#
-+CONFIG_MTD_CFI=y
-+# CONFIG_MTD_JEDECPROBE is not set
-+CONFIG_MTD_GEN_PROBE=y
-+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-+CONFIG_MTD_MAP_BANK_WIDTH_1=y
-+CONFIG_MTD_MAP_BANK_WIDTH_2=y
-+CONFIG_MTD_MAP_BANK_WIDTH_4=y
-+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-+CONFIG_MTD_CFI_I1=y
-+CONFIG_MTD_CFI_I2=y
-+# CONFIG_MTD_CFI_I4 is not set
-+# CONFIG_MTD_CFI_I8 is not set
-+CONFIG_MTD_CFI_INTELEXT=y
-+# CONFIG_MTD_CFI_AMDSTD is not set
-+# CONFIG_MTD_CFI_STAA is not set
-+CONFIG_MTD_CFI_UTIL=y
-+# CONFIG_MTD_RAM is not set
-+# CONFIG_MTD_ROM is not set
-+# CONFIG_MTD_ABSENT is not set
-+# CONFIG_MTD_XIP is not set
-+
-+#
-+# Mapping drivers for chip access
-+#
-+CONFIG_MTD_COMPLEX_MAPPINGS=y
-+# CONFIG_MTD_PHYSMAP is not set
-+# CONFIG_MTD_ARM_INTEGRATOR is not set
-+# CONFIG_MTD_SCB9328 is not set
-+# CONFIG_MTD_PIMX1 is not set
-+# CONFIG_MTD_MX1FS2 is not set
-+# CONFIG_MTD_MX1ADS is not set
-+CONFIG_MTD_APF9328=y
-+# CONFIG_MTD_EDB7312 is not set
-+
-+#
-+# Self-contained MTD device drivers
-+#
-+# CONFIG_MTD_SLRAM is not set
-+# CONFIG_MTD_PHRAM is not set
-+# CONFIG_MTD_MTDRAM is not set
-+# CONFIG_MTD_BLKMTD is not set
-+# CONFIG_MTD_BLOCK2MTD is not set
-+
-+#
-+# Disk-On-Chip Device Drivers
-+#
-+# CONFIG_MTD_DOC2000 is not set
-+# CONFIG_MTD_DOC2001 is not set
-+# CONFIG_MTD_DOC2001PLUS is not set
-+
-+#
-+# NAND Flash Device Drivers
-+#
-+# CONFIG_MTD_NAND is not set
-+
-+#
-+# Plug and Play support
-+#
-+
-+#
-+# Block devices
-+#
-+# CONFIG_BLK_DEV_FD is not set
-+CONFIG_BLK_DEV_LOOP=y
-+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-+CONFIG_BLK_DEV_NBD=m
-+CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_COUNT=1
-+CONFIG_BLK_DEV_RAM_SIZE=4096
-+CONFIG_BLK_DEV_INITRD=y
-+CONFIG_INITRAMFS_SOURCE=""
-+# CONFIG_CDROM_PKTCDVD is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
-+# CONFIG_IOSCHED_AS is not set
-+CONFIG_IOSCHED_DEADLINE=y
-+CONFIG_IOSCHED_CFQ=y
-+
-+#
-+# Multi-device support (RAID and LVM)
-+#
-+# CONFIG_MD is not set
-+
-+#
-+# Networking support
-+#
-+CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
-+CONFIG_PACKET=y
-+CONFIG_PACKET_MMAP=y
-+# CONFIG_NETLINK_DEV is not set
-+CONFIG_UNIX=y
-+# CONFIG_NET_KEY is not set
-+CONFIG_INET=y
-+# CONFIG_IP_MULTICAST is not set
-+# CONFIG_IP_ADVANCED_ROUTER is not set
-+CONFIG_IP_PNP=y
-+CONFIG_IP_PNP_DHCP=y
-+CONFIG_IP_PNP_BOOTP=y
-+CONFIG_IP_PNP_RARP=y
-+# CONFIG_NET_IPIP is not set
-+# CONFIG_NET_IPGRE is not set
-+# CONFIG_ARPD is not set
-+# CONFIG_SYN_COOKIES is not set
-+# CONFIG_INET_AH is not set
-+# CONFIG_INET_ESP is not set
-+# CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_TUNNEL is not set
-+CONFIG_IP_TCPDIAG=y
-+# CONFIG_IP_TCPDIAG_IPV6 is not set
-+# CONFIG_IPV6 is not set
-+# CONFIG_NETFILTER is not set
-+
-+#
-+# SCTP Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_IP_SCTP is not set
-+# CONFIG_ATM is not set
-+# CONFIG_BRIDGE is not set
-+# CONFIG_VLAN_8021Q is not set
-+# CONFIG_DECNET is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_NET_DIVERT is not set
-+# CONFIG_ECONET is not set
-+# CONFIG_WAN_ROUTER is not set
-+
-+#
-+# QoS and/or fair queueing
-+#
-+# CONFIG_NET_SCHED is not set
-+# CONFIG_NET_CLS_ROUTE is not set
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_IRDA is not set
-+# CONFIG_BT is not set
-+CONFIG_NETDEVICES=y
-+# CONFIG_DUMMY is not set
-+# CONFIG_BONDING is not set
-+# CONFIG_EQUALIZER is not set
-+# CONFIG_TUN is not set
-+
-+#
-+# Ethernet (10 or 100Mbit)
-+#
-+CONFIG_NET_ETHERNET=y
-+CONFIG_MII=y
-+# CONFIG_SMC91X is not set
-+CONFIG_DM9000=y
-+
-+#
-+# Ethernet (1000 Mbit)
-+#
-+
-+#
-+# Ethernet (10000 Mbit)
-+#
-+
-+#
-+# Token Ring devices
-+#
-+
-+#
-+# Wireless LAN (non-hamradio)
-+#
-+# CONFIG_NET_RADIO is not set
-+
-+#
-+# Wan interfaces
-+#
-+# CONFIG_WAN is not set
-+# CONFIG_PPP is not set
-+# CONFIG_SLIP is not set
-+# CONFIG_SHAPER is not set
-+# CONFIG_NETCONSOLE is not set
-+
-+#
-+# SCSI device support
-+#
-+# CONFIG_SCSI is not set
-+
-+#
-+# Fusion MPT device support
-+#
-+
-+#
-+# IEEE 1394 (FireWire) support
-+#
-+
-+#
-+# I2O device support
-+#
-+
-+#
-+# ISDN subsystem
-+#
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+
-+#
-+# Userland interfaces
-+#
-+# CONFIG_INPUT_MOUSEDEV is not set
-+# CONFIG_INPUT_JOYDEV is not set
-+# CONFIG_INPUT_TSDEV is not set
-+# CONFIG_INPUT_EVDEV is not set
-+# CONFIG_INPUT_EVBUG is not set
-+
-+#
-+# Input I/O drivers
-+#
-+# CONFIG_GAMEPORT is not set
-+CONFIG_SOUND_GAMEPORT=y
-+# CONFIG_SERIO is not set
-+
-+#
-+# Input Device Drivers
-+#
-+# CONFIG_INPUT_KEYBOARD is not set
-+# CONFIG_INPUT_MOUSE is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TOUCHSCREEN is not set
-+# CONFIG_INPUT_MISC is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_HW_CONSOLE=y
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+
-+#
-+# Serial drivers
-+#
-+# CONFIG_SERIAL_8250 is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+CONFIG_SERIAL_IMX=y
-+CONFIG_SERIAL_IMX_CONSOLE=y
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+CONFIG_UNIX98_PTYS=y
-+# CONFIG_LEGACY_PTYS is not set
-+
-+#
-+# IPMI
-+#
-+# CONFIG_IPMI_HANDLER is not set
-+
-+#
-+# Watchdog Cards
-+#
-+# CONFIG_WATCHDOG is not set
-+# CONFIG_NVRAM is not set
-+CONFIG_RTC=m
-+# CONFIG_DTLK is not set
-+# CONFIG_R3964 is not set
-+
-+#
-+# Ftape, the floppy tape device driver
-+#
-+# CONFIG_DRM is not set
-+# CONFIG_RAW_DRIVER is not set
-+
-+#
-+# I2C support
-+#
-+CONFIG_I2C=m
-+CONFIG_I2C_CHARDEV=m
-+
-+#
-+# I2C Algorithms
-+#
-+# CONFIG_I2C_ALGOBIT is not set
-+# CONFIG_I2C_ALGOPCF is not set
-+# CONFIG_I2C_ALGOPCA is not set
-+
-+#
-+# I2C Hardware Bus support
-+#
-+# CONFIG_I2C_ISA is not set
-+# CONFIG_I2C_PARPORT_LIGHT is not set
-+# CONFIG_I2C_STUB is not set
-+# CONFIG_I2C_PCA_ISA is not set
-+# CONFIG_I2C_IMX is not set
-+
-+#
-+# Hardware Sensors Chip support
-+#
-+# CONFIG_I2C_SENSOR is not set
-+# CONFIG_SENSORS_ADM1021 is not set
-+# CONFIG_SENSORS_ADM1025 is not set
-+# CONFIG_SENSORS_ADM1026 is not set
-+# CONFIG_SENSORS_ADM1031 is not set
-+# CONFIG_SENSORS_ASB100 is not set
-+# CONFIG_SENSORS_DS1621 is not set
-+# CONFIG_SENSORS_FSCHER is not set
-+# CONFIG_SENSORS_FSCPOS is not set
-+# CONFIG_SENSORS_GL518SM is not set
-+# CONFIG_SENSORS_GL520SM is not set
-+# CONFIG_SENSORS_IT87 is not set
-+# CONFIG_SENSORS_LM63 is not set
-+# CONFIG_SENSORS_LM75 is not set
-+# CONFIG_SENSORS_LM77 is not set
-+# CONFIG_SENSORS_LM78 is not set
-+# CONFIG_SENSORS_LM80 is not set
-+# CONFIG_SENSORS_LM83 is not set
-+# CONFIG_SENSORS_LM85 is not set
-+# CONFIG_SENSORS_LM87 is not set
-+# CONFIG_SENSORS_LM90 is not set
-+# CONFIG_SENSORS_LM92 is not set
-+# CONFIG_SENSORS_MAX1619 is not set
-+# CONFIG_SENSORS_PC87360 is not set
-+# CONFIG_SENSORS_SMSC47B397 is not set
-+# CONFIG_SENSORS_SMSC47M1 is not set
-+# CONFIG_SENSORS_W83781D is not set
-+# CONFIG_SENSORS_W83L785TS is not set
-+# CONFIG_SENSORS_W83627HF is not set
-+
-+#
-+# Other I2C Chip support
-+#
-+# CONFIG_SENSORS_DS1337 is not set
-+# CONFIG_SENSORS_EEPROM is not set
-+# CONFIG_SENSORS_PCF8574 is not set
-+# CONFIG_SENSORS_PCF8591 is not set
-+# CONFIG_SENSORS_RTC8564 is not set
-+CONFIG_I2C_DEBUG_CORE=y
-+# CONFIG_I2C_DEBUG_ALGO is not set
-+# CONFIG_I2C_DEBUG_BUS is not set
-+# CONFIG_I2C_DEBUG_CHIP is not set
-+
-+#
-+# Multimedia devices
-+#
-+# CONFIG_VIDEO_DEV is not set
-+
-+#
-+# Digital Video Broadcasting Devices
-+#
-+# CONFIG_DVB is not set
-+
-+#
-+# File systems
-+#
-+CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT3_FS is not set
-+# CONFIG_JBD is not set
-+# CONFIG_REISERFS_FS is not set
-+# CONFIG_JFS_FS is not set
-+# CONFIG_XFS_FS is not set
-+# CONFIG_MINIX_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+# CONFIG_QUOTA is not set
-+CONFIG_DNOTIFY=y
-+# CONFIG_AUTOFS_FS is not set
-+# CONFIG_AUTOFS4_FS is not set
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=m
-+# CONFIG_MSDOS_FS is not set
-+CONFIG_VFAT_FS=m
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_SYSFS=y
-+# CONFIG_DEVFS_FS is not set
-+CONFIG_DEVPTS_FS_XATTR=y
-+# CONFIG_DEVPTS_FS_SECURITY is not set
-+CONFIG_TMPFS=y
-+# CONFIG_TMPFS_XATTR is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+CONFIG_RAMFS=y
-+
-+#
-+# Miscellaneous filesystems
-+#
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
-+# CONFIG_JFFS_FS is not set
-+CONFIG_JFFS2_FS=y
-+CONFIG_JFFS2_FS_DEBUG=0
-+# CONFIG_JFFS2_FS_NAND is not set
-+# CONFIG_JFFS2_FS_NOR_ECC is not set
-+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-+CONFIG_JFFS2_ZLIB=y
-+CONFIG_JFFS2_RTIME=y
-+# CONFIG_JFFS2_RUBIN is not set
-+CONFIG_CRAMFS=y
-+# CONFIG_VXFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+
-+#
-+# Network File Systems
-+#
-+CONFIG_NFS_FS=y
-+CONFIG_NFS_V3=y
-+CONFIG_NFS_V4=y
-+CONFIG_NFS_DIRECTIO=y
-+# CONFIG_NFSD is not set
-+CONFIG_LOCKD=y
-+CONFIG_LOCKD_V4=y
-+# CONFIG_EXPORTFS is not set
-+CONFIG_SUNRPC=y
-+# CONFIG_RPCSEC_GSS_KRB5 is not set
-+# CONFIG_RPCSEC_GSS_SPKM3 is not set
-+# CONFIG_SMB_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+
-+#
-+# Partition Types
-+#
-+# CONFIG_PARTITION_ADVANCED is not set
-+CONFIG_MSDOS_PARTITION=y
-+
-+#
-+# Native Language Support
-+#
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
-+# CONFIG_NLS_CODEPAGE_437 is not set
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+# CONFIG_NLS_CODEPAGE_850 is not set
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
-+# CONFIG_NLS_ISO8859_1 is not set
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_UTF8 is not set
-+
-+#
-+# Profiling support
-+#
-+# CONFIG_PROFILING is not set
-+
-+#
-+# Graphics support
-+#
-+CONFIG_FB=y
-+# CONFIG_FB_MODE_HELPERS is not set
-+# CONFIG_FB_TILEBLITTING is not set
-+CONFIG_FB_IMX=y
-+# CONFIG_FB_VIRTUAL is not set
-+
-+#
-+# Console display driver support
-+#
-+# CONFIG_VGA_CONSOLE is not set
-+CONFIG_DUMMY_CONSOLE=y
-+CONFIG_FRAMEBUFFER_CONSOLE=y
-+CONFIG_FONTS=y
-+CONFIG_FONT_8x8=y
-+CONFIG_FONT_8x16=y
-+# CONFIG_FONT_6x11 is not set
-+CONFIG_FONT_PEARL_8x8=y
-+CONFIG_FONT_ACORN_8x8=y
-+# CONFIG_FONT_MINI_4x6 is not set
-+# CONFIG_FONT_SUN8x16 is not set
-+# CONFIG_FONT_SUN12x22 is not set
-+
-+#
-+# Logo configuration
-+#
-+CONFIG_LOGO=y
-+# CONFIG_LOGO_LINUX_MONO is not set
-+# CONFIG_LOGO_LINUX_VGA16 is not set
-+# CONFIG_LOGO_LINUX_CLUT224 is not set
-+CONFIG_LOGO_ARMADEUS_CLUT224=y
-+
-+#
-+# Sound
-+#
-+# CONFIG_SOUND is not set
-+
-+#
-+# Misc devices
-+#
-+
-+#
-+# USB support
-+#
-+# CONFIG_USB is not set
-+CONFIG_USB_ARCH_HAS_HCD=y
-+# CONFIG_USB_ARCH_HAS_OHCI is not set
-+
-+#
-+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
-+#
-+
-+#
-+# USB Gadget Support
-+#
-+# CONFIG_USB_GADGET is not set
-+
-+#
-+# MMC/SD Card support
-+#
-+# CONFIG_MMC is not set
-+
-+#
-+# Kernel hacking
-+#
-+# CONFIG_DEBUG_KERNEL is not set
-+# CONFIG_DEBUG_INFO is not set
-+CONFIG_FRAME_POINTER=y
-+# CONFIG_DEBUG_USER is not set
-+
-+#
-+# Security options
-+#
-+# CONFIG_KEYS is not set
-+# CONFIG_SECURITY is not set
-+
-+#
-+# Cryptographic options
-+#
-+CONFIG_CRYPTO=y
-+# CONFIG_CRYPTO_HMAC is not set
-+# CONFIG_CRYPTO_NULL is not set
-+# CONFIG_CRYPTO_MD4 is not set
-+# CONFIG_CRYPTO_MD5 is not set
-+# CONFIG_CRYPTO_SHA1 is not set
-+# CONFIG_CRYPTO_SHA256 is not set
-+# CONFIG_CRYPTO_SHA512 is not set
-+# CONFIG_CRYPTO_WP512 is not set
-+# CONFIG_CRYPTO_DES is not set
-+# CONFIG_CRYPTO_BLOWFISH is not set
-+# CONFIG_CRYPTO_TWOFISH is not set
-+# CONFIG_CRYPTO_SERPENT is not set
-+# CONFIG_CRYPTO_AES is not set
-+# CONFIG_CRYPTO_CAST5 is not set
-+# CONFIG_CRYPTO_CAST6 is not set
-+# CONFIG_CRYPTO_TEA is not set
-+# CONFIG_CRYPTO_ARC4 is not set
-+# CONFIG_CRYPTO_KHAZAD is not set
-+# CONFIG_CRYPTO_ANUBIS is not set
-+# CONFIG_CRYPTO_DEFLATE is not set
-+# CONFIG_CRYPTO_MICHAEL_MIC is not set
-+# CONFIG_CRYPTO_CRC32C is not set
-+# CONFIG_CRYPTO_TEST is not set
-+
-+#
-+# Library routines
-+#
-+# CONFIG_CRC_CCITT is not set
-+CONFIG_CRC32=y
-+# CONFIG_LIBCRC32C is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_ZLIB_DEFLATE=y
--- linux-2.6.23.1.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.23.1.1.mod/arch/arm/mach-imx/apf9328.c 2008-04-01 16:15:37.000000000 +0200
@@ -0,0 +1,543 @@
@@ -1377,7 +569,7 @@
+
+#define OPTREX_F51900_POWER_DOWN 7 /* PD7_REV line */
+#define SHARP_LQ043_POWER_DOWN 12 /* PD12_ACD_OE line */
-+#define CONTRAST_LINE 11 /* PD11_CONTRAST */
++#define CONTRAST_LINE 11 /* PD11_CONTRAST */
+
+#define BACKLIGHT_ON 0x000000ff
+#define DEFAULT_DMA_SETTINGS (DMACR_BURST | DMACR_HM(8) | DMACR_TM(4))
@@ -1387,19 +579,19 @@
+ pr_debug("apf9328_lcd_power: %s\n", on ? "on":"off");
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
+ if(on)
-+ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
++ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN);
+ else
-+ DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
++ DR(LCD_PORT) &= ~(1 << OPTREX_F51900_POWER_DOWN);
+#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+ // No LCD powerdown yet
+#elif CONFIG_FB_IMX_SHARP_LQ043_TFT
+ if(on) {
+ mdelay(200); // at least ten frames have to be processed before
+ // enabling the display
-+ DR(LCD_PORT) |= (1 << SHARP_LQ043_POWER_DOWN);
++ DR(LCD_PORT) |= (1 << SHARP_LQ043_POWER_DOWN);
+ }
+ else
-+ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN);
++ DR(LCD_PORT) &= ~(1 << SHARP_LQ043_POWER_DOWN);
+#else
+ if(on)
+ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE);
@@ -1525,11 +717,11 @@
+
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
+ DR(LCD_PORT) |= (1 << OPTREX_F51900_POWER_DOWN); // Initializes it High
-+ imx_gpio_mode( GPIO_PORTD | OPTREX_F51900_POWER_DOWN | GPIO_OUT | GPIO_DR );
++ imx_gpio_mode( GPIO_PORTD | OPTREX_F51900_POWER_DOWN | GPIO_OUT | GPIO_DR );
+#else
+ DR(LCD_PORT) &= ~(1 << CONTRAST_LINE); // Initializes it low
+ // GPIO Function for CONTRAST pin (changed in imxfb if contrast is activated)
-+ imx_gpio_mode( GPIO_PORTD | CONTRAST_LINE | GPIO_OUT | GPIO_GIUS | GPIO_DR );
++ imx_gpio_mode( GPIO_PORTD | CONTRAST_LINE | GPIO_OUT | GPIO_GIUS | GPIO_DR );
+#endif
+
+#ifdef CONFIG_FB_IMX_SHARP_LQ043_TFT
@@ -1550,11 +742,11 @@
menu "IMX Implementations"
depends on ARCH_IMX
-
-+
++
+choice
+ prompt "Development board selection"
+ depends on ARCH_IMX
-+
++
config ARCH_MX1ADS
bool "mx1ads"
depends on ARCH_IMX
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328_defconfig.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328_defconfig.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/021-linux-2.6.23.1-apf9328_defconfig.diff 2008-07-18 08:16:51 UTC (rev 834)
@@ -0,0 +1,808 @@
+--- ref/linux-2.6.23.1/arch/arm/configs/apf9328_defconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.23.1/arch/arm/configs/apf9328_defconfig 2006-10-07 20:09:07.000000000 +0200
+@@ -0,0 +1,805 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.10-imx1
++# Fri Dec 16 23:27:52 2005
++#
++CONFIG_ARM=y
++CONFIG_MMU=y
++CONFIG_UID16=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_IOMAP=y
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_CLEAN_COMPILE=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_SYSCTL is not set
++# CONFIG_AUDIT is not set
++# CONFIG_HOTPLUG is not set
++CONFIG_KOBJECT_UEVENT=y
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_EMBEDDED=y
++# CONFIG_KALLSYMS is not set
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SHMEM=y
++CONFIG_CC_ALIGN_FUNCTIONS=0
++CONFIG_CC_ALIGN_LABELS=0
++CONFIG_CC_ALIGN_LOOPS=0
++CONFIG_CC_ALIGN_JUMPS=0
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_OBSOLETE_MODPARM=y
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_CLPS7500 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_CO285 is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_CAMELOT is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_IOP3XX is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_OMAP is not set
++# CONFIG_ARCH_VERSATILE is not set
++CONFIG_ARCH_IMX=y
++# CONFIG_ARCH_H720X is not set
++
++#
++# IMX Implementations
++#
++# CONFIG_MACH_MX1FS2 is not set
++# CONFIG_MACH_SCB9328 is not set
++CONFIG_MACH_APF9328=y
++# CONFIG_ARCH_MX1ADS is not set
++# CONFIG_MACH_PIMX1 is not set
++# CONFIG_IMX_APF9328_FLASH_8MB is not set
++CONFIG_IMX_APF9328_FLASH_16MB=y
++# CONFIG_IMX_SCB9328_RAM_16MB is not set
++CONFIG_IMX_SCB9328_RAM_32MB=y
++
++#
++# Processor Type
++#
++CONFIG_CPU_32=y
++CONFIG_CPU_ARM920T=y
++CONFIG_CPU_32v4=y
++CONFIG_CPU_ABRT_EV4T=y
++CONFIG_CPU_CACHE_V4WT=y
++CONFIG_CPU_CACHE_VIVT=y
++CONFIG_CPU_COPY_V4WB=y
++CONFIG_CPU_TLB_V4WBI=y
++
++#
++# Processor Features
++#
++CONFIG_ARM_THUMB=y
++# CONFIG_CPU_ICACHE_DISABLE is not set
++# CONFIG_CPU_DCACHE_DISABLE is not set
++# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
++
++#
++# General setup
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++# CONFIG_XIP_KERNEL is not set
++
++#
++# At least one math emulation must be selected
++#
++CONFIG_FPE_NWFPE=y
++CONFIG_FPE_NWFPE_XP=y
++CONFIG_FPE_FASTFPE=y
++CONFIG_BINFMT_ELF=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_PM is not set
++CONFIG_PREEMPT=y
++# CONFIG_ARTHUR is not set
++CONFIG_CMDLINE=""
++# CONFIG_LEDS is not set
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++CONFIG_MTD=y
++CONFIG_MTD_DEBUG=y
++CONFIG_MTD_DEBUG_VERBOSE=3
++CONFIG_MTD_PARTITIONS=y
++# CONFIG_MTD_CONCAT is not set
++# CONFIG_MTD_REDBOOT_PARTS is not set
++CONFIG_MTD_CMDLINE_PARTS=y
++CONFIG_MTD_AFS_PARTS=y
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=y
++CONFIG_MTD_BLOCK=y
++# CONFIG_FTL is not set
++# CONFIG_NFTL is not set
++# CONFIG_INFTL is not set
++
++#
++# RAM/ROM/Flash chip drivers
++#
++CONFIG_MTD_CFI=y
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_GEN_PROBE=y
++# CONFIG_MTD_CFI_ADV_OPTIONS is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++CONFIG_MTD_CFI_INTELEXT=y
++# CONFIG_MTD_CFI_AMDSTD is not set
++# CONFIG_MTD_CFI_STAA is not set
++CONFIG_MTD_CFI_UTIL=y
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++# CONFIG_MTD_XIP is not set
++
++#
++# Mapping drivers for chip access
++#
++CONFIG_MTD_COMPLEX_MAPPINGS=y
++# CONFIG_MTD_PHYSMAP is not set
++# CONFIG_MTD_ARM_INTEGRATOR is not set
++# CONFIG_MTD_SCB9328 is not set
++# CONFIG_MTD_PIMX1 is not set
++# CONFIG_MTD_MX1FS2 is not set
++# CONFIG_MTD_MX1ADS is not set
++CONFIG_MTD_APF9328=y
++# CONFIG_MTD_EDB7312 is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_SLRAM is not set
++# CONFIG_MTD_PHRAM is not set
++# CONFIG_MTD_MTDRAM is not set
++# CONFIG_MTD_BLKMTD is not set
++# CONFIG_MTD_BLOCK2MTD is not set
++
++#
++# Disk-On-Chip Device Drivers
++#
++# CONFIG_MTD_DOC2000 is not set
++# CONFIG_MTD_DOC2001 is not set
++# CONFIG_MTD_DOC2001PLUS is not set
++
++#
++# NAND Flash Device Drivers
++#
++# CONFIG_MTD_NAND is not set
++
++#
++# Plug and Play support
++#
++
++#
++# Block devices
++#
++# CONFIG_BLK_DEV_FD is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=1
++CONFIG_BLK_DEV_RAM_SIZE=4096
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CDROM_PKTCDVD is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++# CONFIG_IOSCHED_AS is not set
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++
++#
++# Multi-device support (RAID and LVM)
++#
++# CONFIG_MD is not set
++
++#
++# Networking support
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++# CONFIG_NETLINK_DEV is not set
++CONFIG_UNIX=y
++# CONFIG_NET_KEY is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_IP_TCPDIAG=y
++# CONFIG_IP_TCPDIAG_IPV6 is not set
++# CONFIG_IPV6 is not set
++# CONFIG_NETFILTER is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_NET_DIVERT is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++# CONFIG_NET_CLS_ROUTE is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_SMC91X is not set
++CONFIG_DM9000=y
++
++#
++# Ethernet (1000 Mbit)
++#
++
++#
++# Ethernet (10000 Mbit)
++#
++
++#
++# Token Ring devices
++#
++
++#
++# Wireless LAN (non-hamradio)
++#
++# CONFIG_NET_RADIO is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_SCSI is not set
++
++#
++# Fusion MPT device support
++#
++
++#
++# IEEE 1394 (FireWire) support
++#
++
++#
++# I2O device support
++#
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++
++#
++# Userland interfaces
++#
++# CONFIG_INPUT_MOUSEDEV is not set
++# CONFIG_INPUT_JOYDEV is not set
++# CONFIG_INPUT_TSDEV is not set
++# CONFIG_INPUT_EVDEV is not set
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input I/O drivers
++#
++# CONFIG_GAMEPORT is not set
++CONFIG_SOUND_GAMEPORT=y
++# CONFIG_SERIO is not set
++
++#
++# Input Device Drivers
++#
++# CONFIG_INPUT_KEYBOARD is not set
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_IMX=y
++CONFIG_SERIAL_IMX_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++CONFIG_UNIX98_PTYS=y
++# CONFIG_LEGACY_PTYS is not set
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++# CONFIG_NVRAM is not set
++CONFIG_RTC=m
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++
++#
++# Ftape, the floppy tape device driver
++#
++# CONFIG_DRM is not set
++# CONFIG_RAW_DRIVER is not set
++
++#
++# I2C support
++#
++CONFIG_I2C=m
++CONFIG_I2C_CHARDEV=m
++
++#
++# I2C Algorithms
++#
++# CONFIG_I2C_ALGOBIT is not set
++# CONFIG_I2C_ALGOPCF is not set
++# CONFIG_I2C_ALGOPCA is not set
++
++#
++# I2C Hardware Bus support
++#
++# CONFIG_I2C_ISA is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_PCA_ISA is not set
++# CONFIG_I2C_IMX is not set
++
++#
++# Hardware Sensors Chip support
++#
++# CONFIG_I2C_SENSOR is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ASB100 is not set
++# CONFIG_SENSORS_DS1621 is not set
++# CONFIG_SENSORS_FSCHER is not set
++# CONFIG_SENSORS_FSCPOS is not set
++# CONFIG_SENSORS_GL518SM is not set
++# CONFIG_SENSORS_GL520SM is not set
++# CONFIG_SENSORS_IT87 is not set
++# CONFIG_SENSORS_LM63 is not set
++# CONFIG_SENSORS_LM75 is not set
++# CONFIG_SENSORS_LM77 is not set
++# CONFIG_SENSORS_LM78 is not set
++# CONFIG_SENSORS_LM80 is not set
++# CONFIG_SENSORS_LM83 is not set
++# CONFIG_SENSORS_LM85 is not set
++# CONFIG_SENSORS_LM87 is not set
++# CONFIG_SENSORS_LM90 is not set
++# CONFIG_SENSORS_LM92 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_SMSC47B397 is not set
++# CONFIG_SENSORS_SMSC47M1 is not set
++# CONFIG_SENSORS_W83781D is not set
++# CONFIG_SENSORS_W83L785TS is not set
++# CONFIG_SENSORS_W83627HF is not set
++
++#
++# Other I2C Chip support
++#
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_RTC8564 is not set
++CONFIG_I2C_DEBUG_CORE=y
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT3_FS is not set
++# CONFIG_JBD is not set
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++# CONFIG_AUTOFS_FS is not set
++# CONFIG_AUTOFS4_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++# CONFIG_ISO9660_FS is not set
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++# CONFIG_MSDOS_FS is not set
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_SYSFS=y
++# CONFIG_DEVFS_FS is not set
++CONFIG_DEVPTS_FS_XATTR=y
++# CONFIG_DEVPTS_FS_SECURITY is not set
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_XATTR is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_RAMFS=y
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++# CONFIG_JFFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++# CONFIG_JFFS2_FS_NAND is not set
++# CONFIG_JFFS2_FS_NOR_ECC is not set
++# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
++CONFIG_JFFS2_ZLIB=y
++CONFIG_JFFS2_RTIME=y
++# CONFIG_JFFS2_RUBIN is not set
++CONFIG_CRAMFS=y
++# CONFIG_VXFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++
++#
++# Network File Systems
++#
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++CONFIG_NFS_V4=y
++CONFIG_NFS_DIRECTIO=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++# CONFIG_EXPORTFS is not set
++CONFIG_SUNRPC=y
++# CONFIG_RPCSEC_GSS_KRB5 is not set
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_MSDOS_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++# CONFIG_NLS_CODEPAGE_437 is not set
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++# CONFIG_NLS_ISO8859_1 is not set
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++
++#
++# Profiling support
++#
++# CONFIG_PROFILING is not set
++
++#
++# Graphics support
++#
++CONFIG_FB=y
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++CONFIG_FB_IMX=y
++# CONFIG_FB_VIRTUAL is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++CONFIG_FONTS=y
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++# CONFIG_FONT_6x11 is not set
++CONFIG_FONT_PEARL_8x8=y
++CONFIG_FONT_ACORN_8x8=y
++# CONFIG_FONT_MINI_4x6 is not set
++# CONFIG_FONT_SUN8x16 is not set
++# CONFIG_FONT_SUN12x22 is not set
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++# CONFIG_LOGO_LINUX_MONO is not set
++# CONFIG_LOGO_LINUX_VGA16 is not set
++# CONFIG_LOGO_LINUX_CLUT224 is not set
++CONFIG_LOGO_ARMADEUS_CLUT224=y
++
++#
++# Sound
++#
++# CONFIG_SOUND is not set
++
++#
++# Misc devices
++#
++
++#
++# USB support
++#
++# CONFIG_USB is not set
++CONFIG_USB_ARCH_HAS_HCD=y
++# CONFIG_USB_ARCH_HAS_OHCI is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++# CONFIG_MMC is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_DEBUG_KERNEL is not set
++# CONFIG_DEBUG_INFO is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_DEBUG_USER is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++# CONFIG_CRYPTO_MD5 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_DES is not set
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Library routines
++#
++# CONFIG_CRC_CCITT is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-17 08:45:29
|
Revision: 833
http://armadeus.svn.sourceforge.net/armadeus/?rev=833&view=rev
Author: artemys
Date: 2008-07-17 08:45:37 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
[BUILDROOT] SDL_ttf needs freetype package to compile
Modified Paths:
--------------
trunk/patches/011-buildroot-sdl-image-ttf-config.diff
Modified: trunk/patches/011-buildroot-sdl-image-ttf-config.diff
===================================================================
--- trunk/patches/011-buildroot-sdl-image-ttf-config.diff 2008-07-17 08:43:24 UTC (rev 832)
+++ trunk/patches/011-buildroot-sdl-image-ttf-config.diff 2008-07-17 08:45:37 UTC (rev 833)
@@ -1,6 +1,6 @@
--- buildroot.org/buildroot/package/sdl/Config.in 2006-09-08 09:15:13.000000000 +0200
+++ buildroot/package/sdl/Config.in 2006-11-29 12:14:45.000000000 +0100
-@@ -5,3 +5,26 @@
+@@ -5,3 +5,27 @@
help
http://www.libsdl.org/
@@ -20,6 +20,7 @@
+config BR2_PACKAGE_SDL_TTF
+ bool "SDL_ttf"
+ depends on BR2_PACKAGE_SDL
++ select BR2_PACKAGE_FREETYPE
+ default n
+ help
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-07-17 08:43:16
|
Revision: 832
http://armadeus.svn.sourceforge.net/armadeus/?rev=832&view=rev
Author: artemys
Date: 2008-07-17 08:43:24 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
[BUILDROOT] strip cmd was not correct in sdl* packages
Modified Paths:
--------------
trunk/buildroot/package/sdl/sdl_image.mk
trunk/buildroot/package/sdl/sdl_mixer.mk
trunk/buildroot/package/sdl/sdl_net.mk
trunk/buildroot/package/sdl/sdl_water.mk
Modified: trunk/buildroot/package/sdl/sdl_image.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_image.mk 2008-07-17 08:11:14 UTC (rev 831)
+++ trunk/buildroot/package/sdl/sdl_image.mk 2008-07-17 08:43:24 UTC (rev 832)
@@ -53,7 +53,7 @@
$(TARGET_DIR)/usr/lib/libSDL_image.so: $(STAGING_DIR)/usr/lib/libSDL_image.so
cp -dpf $(STAGING_DIR)/usr/lib/libSDL_image*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_image.so
+ -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_image.so
SDL_IMAGE sdl_image: uclibc sdl libpng $(TARGET_DIR)/usr/lib/libSDL_image.so
Modified: trunk/buildroot/package/sdl/sdl_mixer.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_mixer.mk 2008-07-17 08:11:14 UTC (rev 831)
+++ trunk/buildroot/package/sdl/sdl_mixer.mk 2008-07-17 08:43:24 UTC (rev 832)
@@ -45,7 +45,7 @@
$(TARGET_DIR)/usr/lib/libSDL_mixer.so: $(STAGING_DIR)/usr/lib/libSDL_mixer.so
cp -dpf $(STAGING_DIR)/usr/lib/libSDL_mixer*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_mixer.so
+ -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_mixer.so
SDL_MIXER sdl_mixer: sdl $(TARGET_DIR)/usr/lib/libSDL_mixer.so
Modified: trunk/buildroot/package/sdl/sdl_net.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_net.mk 2008-07-17 08:11:14 UTC (rev 831)
+++ trunk/buildroot/package/sdl/sdl_net.mk 2008-07-17 08:43:24 UTC (rev 832)
@@ -45,7 +45,7 @@
$(TARGET_DIR)/usr/lib/libSDL_net.so: $(STAGING_DIR)/usr/lib/libSDL_net.so
cp -dpf $(STAGING_DIR)/usr/lib/libSDL_net*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_net.so
+ -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_net.so
SDL_NET sdl_net: sdl $(TARGET_DIR)/usr/lib/libSDL_net.so
Modified: trunk/buildroot/package/sdl/sdl_water.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_water.mk 2008-07-17 08:11:14 UTC (rev 831)
+++ trunk/buildroot/package/sdl/sdl_water.mk 2008-07-17 08:43:24 UTC (rev 832)
@@ -40,7 +40,7 @@
$(TARGET_DIR)/usr/bin/water: $(STAGING_DIR)/usr/bin/water
cp -dpf $< $(SDL_WATER_DIR)/water320.bmp $(TARGET_DIR)/usr/bin/
- -$(STRIP) --strip-unneeded $@
+ -$(STRIPCMD) --strip-unneeded $@
SDL-WATER sdl-water: uclibc sdl $(TARGET_DIR)/usr/bin/water
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|