From db17e1ab5587c391d631b088a4b5dd95f4d8fc16 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Thu, 21 Jun 2007 09:56:17 +0000 Subject: arm-kernel-shim: Fixed dsmg600 cmdline --- packages/arm-kernel-shim/arm-kernel-shim_1.5.bb | 2 +- packages/arm-kernel-shim/files/config-dsmg600.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb index 4bdf7a86e3..0788f81609 100644 --- a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb +++ b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb @@ -3,7 +3,7 @@ SECTION = "" PRIORITY = "optional" HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" LICENSE = "GPL" -# PR = "r1" +PR = "r1" COMPATIBLE_MACHINE = "(ixp4xx|nslu2)" diff --git a/packages/arm-kernel-shim/files/config-dsmg600.h b/packages/arm-kernel-shim/files/config-dsmg600.h index eda1e9c264..ebe53901b8 100644 --- a/packages/arm-kernel-shim/files/config-dsmg600.h +++ b/packages/arm-kernel-shim/files/config-dsmg600.h @@ -18,6 +18,8 @@ #define MACH_TYPE 964 +#define GUARANTEE_ATAG_CMDLINE + /* Uncomment one of these to switch the CPU into a specific mode. */ //#define FORCE_LITTLEENDIAN //#define FORCE_BIGENDIAN -- cgit v1.2.3 From 9e56bd75f67c0bfc41c0b55b02a2494397a1cfd6 Mon Sep 17 00:00:00 2001 From: Rolf Leggewie Date: Thu, 21 Jun 2007 14:15:07 +0000 Subject: glibmm: update to 2.12.10 * verified successful compilation * verified that no declared dependencies on the old version 2.8.4 exist in OE --- packages/glibmm/glibmm_2.12.10.bb | 23 +++++++++++++++++++++++ packages/glibmm/glibmm_2.8.4.bb | 24 ------------------------ 2 files changed, 23 insertions(+), 24 deletions(-) create mode 100644 packages/glibmm/glibmm_2.12.10.bb delete mode 100644 packages/glibmm/glibmm_2.8.4.bb (limited to 'packages') diff --git a/packages/glibmm/glibmm_2.12.10.bb b/packages/glibmm/glibmm_2.12.10.bb new file mode 100644 index 0000000000..a62d4eb145 --- /dev/null +++ b/packages/glibmm/glibmm_2.12.10.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "C++ bindings for the glib library." +HOMEPAGE = "http://www.gtkmm.org/" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "glib-2.0 libsigc++-2.0" +PR = "r0" + +SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/glibmm/2.12/glibmm-${PV}.tar.bz2" + +inherit autotools pkgconfig flow-lossage + +FILES_${PN} = "${libdir}/lib*.so.*" +FILES_${PN}-dev += "${libdir}/glibmm-2.4/include/" + +LIBV = "2.4.0" + +do_stage () { + autotools_stage_all + + install -m 0644 glib/glibmmconfig.h ${STAGING_INCDIR}/glibmm-2.4 + install -m 0644 scripts/glibmm_check_perl.m4 ${STAGING_DATADIR}/aclocal/ +} diff --git a/packages/glibmm/glibmm_2.8.4.bb b/packages/glibmm/glibmm_2.8.4.bb deleted file mode 100644 index 1819114cb1..0000000000 --- a/packages/glibmm/glibmm_2.8.4.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "C++ bindings for the glib library." -HOMEPAGE = "http://www.gtkmm.org/" -SECTION = "libs" -PRIORITY = "optional" -LICENSE = "LGPL" -DEPENDS = "glib-2.0 libsigc++-2.0" -PR = "r2" - -SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/glibmm/2.8/glibmm-${PV}.tar.bz2" - -inherit autotools pkgconfig flow-lossage - -FILES_${PN} = "${libdir}/lib*.so.*" -FILES_${PN}-dev += "${libdir}/glibmm-2.4/include/" - -LIBV = "2.4.0" - -do_stage () { - autotools_stage_all - - install -m 0644 glib/glibmmconfig.h ${STAGING_INCDIR}/glibmm-2.4 - - install -m 0644 scripts/glibmm_check_perl.m4 ${STAGING_DATADIR}/aclocal/ -} -- cgit v1.2.3 From 1e25d5cdbe470c59c67fdfd34d325c3d9fc52879 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Jun 2007 14:31:15 +0000 Subject: linux.inc: s/arm/${ARCH}/g --- packages/linux/linux.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc index d4f98f0978..3ee5e227f3 100644 --- a/packages/linux/linux.inc +++ b/packages/linux/linux.inc @@ -18,7 +18,11 @@ KERNEL_IMAGETYPE_at32stk1000 = "uImage" KERNEL_IMAGETYPE_at91sam9263ek = "uImage" # Specify the commandline for you device here: + +#boot from mmc CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5" +#boot from nfs +#CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0" do_configure_prepend() { echo "" > ${S}/.config @@ -43,11 +47,11 @@ do_configure_prepend() { do_install_prepend() { if test -e arch/${ARCH}/boot/Image ; then - ln -f arch/arm/boot/Image arch/arm/boot/uImage + ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage fi if test -e arch/${ARCH}/boot/images/uImage ; then - ln -f arch/arm/boot/images/uImage arch/arm/boot/uImage + ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage fi } -- cgit v1.2.3 From fa1cb20696128f0b580187f779aac90b879456f7 Mon Sep 17 00:00:00 2001 From: Rolf Leggewie Date: Thu, 21 Jun 2007 15:47:51 +0000 Subject: cairomm: initial release with version 1.2.4. Partly closes 2544. --- packages/cairo/cairomm_1.2.4.bb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/cairo/cairomm_1.2.4.bb (limited to 'packages') diff --git a/packages/cairo/cairomm_1.2.4.bb b/packages/cairo/cairomm_1.2.4.bb new file mode 100644 index 0000000000..7796a44016 --- /dev/null +++ b/packages/cairo/cairomm_1.2.4.bb @@ -0,0 +1,9 @@ +require cairo.inc + +DEPENDS = "cairo" +DESCRIPTION = "C++ bindings for Cairo graphics library" +PR = "r0" + +SRC_URI = "http://cairographics.org/releases/cairomm-${PV}.tar.gz" + +#EXTRA_OECONF = "--disable-docs" -- cgit v1.2.3 From dc7fec62f475555fbeeec6448a4fd936f9c442d0 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Jun 2007 19:14:14 +0000 Subject: uclibc: add generic armeb config * where 'generic' read 'armv4teb' --- packages/uclibc/uclibc-0.9.29/armeb/.mtn2git_empty | 0 packages/uclibc/uclibc-0.9.29/armeb/uClibc.machine | 70 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 packages/uclibc/uclibc-0.9.29/armeb/.mtn2git_empty create mode 100644 packages/uclibc/uclibc-0.9.29/armeb/uClibc.machine (limited to 'packages') diff --git a/packages/uclibc/uclibc-0.9.29/armeb/.mtn2git_empty b/packages/uclibc/uclibc-0.9.29/armeb/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/uclibc/uclibc-0.9.29/armeb/uClibc.machine b/packages/uclibc/uclibc-0.9.29/armeb/uClibc.machine new file mode 100644 index 0000000000..2d9f63e531 --- /dev/null +++ b/packages/uclibc/uclibc-0.9.29/armeb/uClibc.machine @@ -0,0 +1,70 @@ +# +# Automatically generated make config: don't edit +# Sat May 12 22:07:03 2007 +# +# TARGET_alpha is not set +TARGET_arm=y +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set + +# +# Target Architecture Features and Options +# +TARGET_ARCH="arm" +FORCE_OPTIONS_FOR_ARCH=y +# CONFIG_ARM_OABI is not set +CONFIG_ARM_EABI=y +USE_BX=y +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +# CONFIG_ARM1136JF_S is not set +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +CONFIG_ARM_XSCALE=y +# CONFIG_ARM_IWMMXT is not set +TARGET_SUBARCH="" + +# +# Using ELF file format +# +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_WANTS_BIG_ENDIAN=y +# ARCH_WANTS_LITTLE_ENDIAN is not set +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +# UCLIBC_HAS_FPU is not set +UCLIBC_HAS_SOFT_FLOAT=y +DO_C99_MATH=y +KERNEL_HEADERS="/usr/include" +HAVE_DOT_CONFIG=y + -- cgit v1.2.3 From 03d879f335f9b48f50fad1cfb7385cea88bea176 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Fri, 22 Jun 2007 03:00:06 +0000 Subject: uboot-gta01: * remove outdated patches * remove tools build * add (hackish) fix for eabi situation --- packages/uboot/files/gta01_nand.h | 233 - packages/uboot/files/qt2410.h | 256 - packages/uboot/files/qt2410_nand.h | 256 - packages/uboot/files/qt2410_ram.h | 256 - packages/uboot/files/u-boot-20060807-qt2410.patch | 8435 ------------------ packages/uboot/files/u-boot-20060907-gta01.patch | 901 -- .../uboot/files/u-boot-20061030-gta01bv2.patch | 246 - packages/uboot/files/u-boot-20061030-gta01v4.patch | 132 - .../uboot/files/u-boot-20061030-qt2410-gta01.patch | 9272 -------------------- .../uboot-20070311-tools_makefile_ln_sf.patch | 19 + packages/uboot/files/uboot-eabi-fix-HACK.patch | 197 + .../u-boot-mkimage-gta01-native/.mtn2git_empty | 0 .../bbt-create-optional.patch | 52 - .../bbt-scan-second.patch | 69 - .../boot-from-ram-and-nand.patch | 98 - .../boot-from-ram-reloc.patch | 62 - .../u-boot-mkimage-gta01-native/boot-menu.patch | 769 -- .../u-boot-mkimage-gta01-native/cmd-unzip.patch | 58 - .../u-boot-mkimage-gta01-native/console-ansi.patch | 127 - .../u-boot-mkimage-gta01-native/default-env.patch | 101 - .../u-boot-mkimage-gta01-native/dontask.patch | 22 - .../dynenv-harden.patch | 139 - .../early-powerdown.patch | 40 - .../enable-splash-bmp.patch | 56 - .../u-boot-mkimage-gta01-native/env_nand_oob.patch | 198 - .../u-boot-mkimage-gta01-native/ext2load_hex.patch | 17 - .../u-boot-mkimage-gta01-native/lowlevel_foo.patch | 229 - .../mmcinit-power-up.patch | 73 - .../nand-badisbad.patch | 30 - .../nand-createbbt.patch | 126 - .../nand-dynamic_partitions.patch | 354 - .../u-boot-mkimage-gta01-native/nand-otp.patch | 302 - .../nand-read_write_oob.patch | 23 - .../neo1973-chargefast.patch | 316 - .../preboot-override.patch | 137 - .../u-boot-mkimage-gta01-native/raise-limits.patch | 31 - packages/uboot/u-boot-mkimage-gta01-native/series | 76 - .../splashimage-command.patch | 24 - .../uboot-20061030-neo1973.patch | 2248 ----- .../uboot-20061030-qt2410.patch | 1233 --- .../uboot-arm920_s3c2410_irq_demux.patch | 56 - .../uboot-arm920t-gd_in_irq.patch | 28 - .../uboot-bbt-quiet.patch | 43 - .../uboot-cmd_s3c2410.patch | 175 - .../uboot-cramfs_but_no_jffs2.patch | 41 - .../u-boot-mkimage-gta01-native/uboot-dfu.patch | 2081 ----- .../u-boot-mkimage-gta01-native/uboot-gta02.patch | 1560 ---- .../u-boot-mkimage-gta01-native/uboot-hxd8.patch | 1169 --- .../uboot-license.patch | 712 -- .../uboot-machtypes.patch | 4121 --------- .../uboot-mokoversion.patch | 10 - .../uboot-nand-markbad-reallybad.patch | 20 - .../uboot-neo1973-defaultenv.patch | 31 - .../uboot-neo1973-resume.patch | 113 - .../uboot-s3c2410-misccr-definitions.patch | 45 - .../uboot-s3c2410-mmc.patch | 818 -- .../uboot-s3c2410-nand.patch | 525 -- .../uboot-s3c2410-norelocate_irqvec_cpy.patch | 32 - .../uboot-s3c2410-warnings-fix.patch | 98 - .../uboot-s3c2410_fb.patch | 215 - .../uboot-s3c2410_udc.patch | 1263 --- .../uboot-s3c2440.patch | 1301 --- .../uboot-s3c2443.patch | 256 - .../uboot-smdk2440.patch | 1481 ---- .../uboot-smdk2443.patch | 1411 --- .../uboot-strtoul.patch | 43 - .../uboot-usbtty-acm.patch | 1607 ---- .../u-boot-mkimage-gta01-native/unbusy-i2c.patch | 88 - .../usbdcore-multiple_configs.patch | 63 - .../wakeup-reason-nand-only.patch | 68 - packages/uboot/u-boot-mkimage-gta01-native_oe.bb | 82 - packages/uboot/u-boot-mkimage-gta01-native_svn.bb | 20 - packages/uboot/uboot-gta01_svn.bb | 72 +- packages/uboot/uboot-qt2410_0.0+cvs20061030.bb | 41 - 74 files changed, 264 insertions(+), 46638 deletions(-) delete mode 100644 packages/uboot/files/gta01_nand.h delete mode 100644 packages/uboot/files/qt2410.h delete mode 100644 packages/uboot/files/qt2410_nand.h delete mode 100644 packages/uboot/files/qt2410_ram.h delete mode 100644 packages/uboot/files/u-boot-20060807-qt2410.patch delete mode 100644 packages/uboot/files/u-boot-20060907-gta01.patch delete mode 100644 packages/uboot/files/u-boot-20061030-gta01bv2.patch delete mode 100644 packages/uboot/files/u-boot-20061030-gta01v4.patch delete mode 100644 packages/uboot/files/u-boot-20061030-qt2410-gta01.patch create mode 100644 packages/uboot/files/uboot-20070311-tools_makefile_ln_sf.patch create mode 100644 packages/uboot/files/uboot-eabi-fix-HACK.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/default-env.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/dontask.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/series delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native_oe.bb delete mode 100644 packages/uboot/u-boot-mkimage-gta01-native_svn.bb delete mode 100644 packages/uboot/uboot-qt2410_0.0+cvs20061030.bb (limited to 'packages') diff --git a/packages/uboot/files/gta01_nand.h b/packages/uboot/files/gta01_nand.h deleted file mode 100644 index 04cb743158..0000000000 --- a/packages/uboot/files/gta01_nand.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * (C) Copyright 2006 Harald Welte - * - * Configuation settings for the FIC GTA01 Linux GSM phone - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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 __CONFIG_H -#define __CONFIG_H - -/* we want to start u-boot directly from within NAND flash */ -#define CONFIG_S3C2410_NAND_BOOT 1 - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ - -/* input clock of PLL */ -#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */ - - -#define USE_920T_MMU 1 -#define CONFIG_USE_IRQ 1 - -/* - * Size of malloc() pool - */ -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ - -/* - * Hardware drivers - */ - -/* - * select serial console configuration - */ -#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */ -//#define CONFIG_HWFLOW 1 - -/************************************************************ - * RTC - ************************************************************/ -#define CONFIG_RTC_S3C24X0 1 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -#define CONFIG_BAUDRATE 115200 - -/*********************************************************** - * Command definition - ***********************************************************/ -#define CONFIG_COMMANDS (\ - CFG_CMD_BDI | \ - CFG_CMD_LOADS | \ - CFG_CMD_LAODB | \ - CFG_CMD_IMI | \ - CFG_CMD_CACHE | \ - CFG_CMD_MEMORY | \ - CFG_CMD_ENV | \ - /* CFG_CMD_IRQ | */ \ - CFG_CMD_BOOTD | \ - CFG_CMD_CONSOLE | \ - CFG_CMD_ASKENV | \ - CFG_CMD_RUN | \ - CFG_CMD_ECHO | \ - CFG_CMD_I2C | \ - CFG_CMD_REGINFO | \ - CFG_CMD_IMMAP | \ - CFG_CMD_DATE | \ - CFG_CMD_AUTOSCRIPT | \ - CFG_CMD_BSP | \ - CFG_CMD_ELF | \ - CFG_CMD_MISC | \ - CFG_CMD_USB | \ - CFG_CMD_JFFS2 | \ - CFG_CMD_DIAG | \ - /* CFG_CMD_HWFLOW | */ \ - CFG_CMD_SAVES | \ - CFG_CMD_NAND | \ - CFG_CMD_PORTIO | \ - CFG_CMD_MMC | \ - CFG_CMD_FAT | \ - CFG_CMD_EXT2 | \ - 0) -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -#include - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -/*#define CONFIG_BOOTFILE "elinos-lart" */ -#define CONFIG_BOOTCOMMAND "nand load 0x32000000 0x34000 0x200000; bootm 0x32000000" - -#define CONFIG_DOS_PARTITION 1 - -#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -/* what's this ? it's not used anywhere */ -#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CFG_LONGHELP /* undef to save memory */ -#define CFG_PROMPT "GTA01 # " /* Monitor Command Prompt */ -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -#define CFG_MAXARGS 16 /* max number of command args */ -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ - -#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ - -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ - -#define CFG_LOAD_ADDR 0x33000000 /* default load address */ - -/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -/* it to wrap 100 times (total 1562500) to get 1 sec. */ -#define CFG_HZ 1562500 - -/* valid baudrates */ -#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -#endif - -#define CONFIG_USB_OHCI 1 - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ - -#if 1 -#define CFG_NO_FLASH 1 -#else -#define CFG_MAX_FLASH_SECT 1 -#define CFG_MAX_FLASH_BANKS 1 -#endif - -#define CFG_ENV_IS_IN_NAND 1 -#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ - -#define NAND_MAX_CHIPS 1 -#define CFG_NAND_BASE 0x4e000000 -#define CFG_MAX_NAND_DEVICE 1 - -#define CONFIG_MMC 1 -#define CFG_MMC_BASE 0xff000000 - -/* EXT2 driver */ -#define CONFIG_EXT2 1 - -/* FAT driver in u-boot is broken currently */ -#define CONFIG_FAT 1 -#define CONFIG_SUPPORT_VFAT 1 - -/* JFFS2 driver */ -#define CONFIG_JFFS2_NAND 1 -#define CONFIG_JFFS2_NAND_DEV 0 -#define CONFIG_JFFS2_NAND_OFF 0x634000 -#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 - -/* ATAG configuration */ -#define CONFIG_INITRD_TAG 1 -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_CMDLINE_TAG 1 -#if 0 -#define CONFIG_SERIAL_TAG 1 -#define CONFIG_REVISION_TAG 1 -#endif - -#define CONFIG_DRIVER_S3C24X0_I2C 1 -#define CONFIG_HARD_I2C 1 -#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50707 data sheet */ -#define CFG_I2C_SLAVE 0x7f - - -#if 0 -#define CONFIG_VIDEO -#define CONFIG_VIDEO_S3C2410 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VIDEO_LOGO -#define CONFIG_VGA_AS_SINGLE_DEVICE - -#define VIDEO_KBD_INIT_FCT 0 -#define VIDEO_TSTC_FCT serial_tstc -#define VIDEO_GETC_FCT serial_getc - -#define LCD_VIDEO_ADDR 0x33d00000 -#endif - -#endif /* __CONFIG_H */ diff --git a/packages/uboot/files/qt2410.h b/packages/uboot/files/qt2410.h deleted file mode 100644 index 627f365f86..0000000000 --- a/packages/uboot/files/qt2410.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * Gary Jennejohn - * David Mueller - * - * Configuation settings for the SAMSUNG SMDK2410 board. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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 __CONFIG_H -#define __CONFIG_H - -#if 0 -/* If we want to start u-boot from usb bootloader in NOR flash */ -#define CONFIG_SKIP_RELOCATE_UBOOT 1 -#define CONFIG_SKIP_LOWLEVEL_INIT 1 -#else -/* If we want to start u-boot directly from within NAND flash */ -#define CONFIG_S3C2410_NAND_BOOT 1 -#endif - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ - -/* input clock of PLL */ -#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ - - -#define USE_920T_MMU 1 -#define CONFIG_USE_IRQ 1 -//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ - -/* - * Size of malloc() pool - */ -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ - -/* - * Hardware drivers - */ -#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -#define CS8900_BASE 0x19000300 -#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ - -/* - * select serial console configuration - */ -#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -#define CONFIG_HWFLOW 1 - -/************************************************************ - * RTC - ************************************************************/ -#define CONFIG_RTC_S3C24X0 1 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -#define CONFIG_BAUDRATE 115200 - -/*********************************************************** - * Command definition - ***********************************************************/ -#define CONFIG_COMMANDS \ - (CONFIG_CMD_DFL | \ - CFG_CMD_BSP | \ - CFG_CMD_CACHE | \ - CFG_CMD_DATE | \ - CFG_CMD_DHCP | \ - CFG_CMD_DIAG | \ - CFG_CMD_ELF | \ - CFG_CMD_EXT2 | \ - CFG_CMD_FAT | \ - CFG_CMD_HWFLOW | \ - /* CFG_CMD_IDE | */ \ - /* CFG_CMD_IRQ | */ \ - CFG_CMD_JFFS2 | \ - CFG_CMD_MMC | \ - CFG_CMD_NAND | \ - CFG_CMD_PING | \ - CFG_CMD_PORTIO | \ - CFG_CMD_REGINFO | \ - CFG_CMD_SAVES | \ - CFG_CMD_USB) - -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -#include - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_BOOTARGS "root=/dev/sda1 console=ttySAC0,115200 loglevel=8 rootdelay=10" -/*#define CONFIG_ETHADDR 08:00:3e:26:0a:5b */ -#define CONFIG_NETMASK 255.255.255.0 -#define CONFIG_IPADDR 10.0.0.110 -#define CONFIG_SERVERIP 10.0.0.1 -/*#define CONFIG_BOOTFILE "elinos-lart" */ -#define CONFIG_BOOTCOMMAND "mmcinit; ext2load mmc 0 0x32000000 uImage; bootm 0x32000000" - -#define CONFIG_DOS_PARTITION 1 - -#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -/* what's this ? it's not used anywhere */ -#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CFG_LONGHELP /* undef to save memory */ -#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -#define CFG_MAXARGS 16 /* max number of command args */ -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ - -#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ - -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ - -#define CFG_LOAD_ADDR 0x33000000 /* default load address */ - -/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -/* it to wrap 100 times (total 1562500) to get 1 sec. */ -#define CFG_HZ 1562500 - -/* valid baudrates */ -#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -#endif - -/* IDE/ATA config */ - -#if 0 -#define CFG_IDE_MAXBUS 1 -#define CFG_IDE_MAXDEVICE 2 -#define CFG_IDE_PREINIT 0 - -#define CFG_ATA_BASE_ADDR -#endif - -#define CONFIG_USB_OHCI 1 - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ - -#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ - -#define CFG_FLASH_BASE PHYS_FLASH_1 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ - -#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -#endif - -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ - -#define CFG_ENV_IS_IN_NAND 1 -#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ - -#define NAND_MAX_CHIPS 1 -#define CFG_NAND_BASE 0x4e000000 -#define CFG_MAX_NAND_DEVICE 1 - -#define CONFIG_MMC 1 -#define CFG_MMC_BASE 0xff000000 - -#define CONFIG_EXT2 1 - -/* FAT driver in u-boot is broken currently */ -#define CONFIG_FAT 1 -#define CONFIG_SUPPORT_VFAT - -/* ATAG configuration */ -#define CONFIG_INITRD_TAG 1 -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_CMDLINE_TAG 1 -#if 0 -#define CONFIG_SERIAL_TAG 1 -#define CONFIG_REVISION_TAG 1 -#endif - - -#if 0 -#define CONFIG_VIDEO -#define CONFIG_VIDEO_S3C2410 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VIDEO_LOGO -#define CONFIG_VGA_AS_SINGLE_DEVICE - -#define VIDEO_KBD_INIT_FCT 0 -#define VIDEO_TSTC_FCT serial_tstc -#define VIDEO_GETC_FCT serial_getc - -#define LCD_VIDEO_ADDR 0x33d00000 -#endif - -#endif /* __CONFIG_H */ diff --git a/packages/uboot/files/qt2410_nand.h b/packages/uboot/files/qt2410_nand.h deleted file mode 100644 index 627f365f86..0000000000 --- a/packages/uboot/files/qt2410_nand.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * Gary Jennejohn - * David Mueller - * - * Configuation settings for the SAMSUNG SMDK2410 board. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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 __CONFIG_H -#define __CONFIG_H - -#if 0 -/* If we want to start u-boot from usb bootloader in NOR flash */ -#define CONFIG_SKIP_RELOCATE_UBOOT 1 -#define CONFIG_SKIP_LOWLEVEL_INIT 1 -#else -/* If we want to start u-boot directly from within NAND flash */ -#define CONFIG_S3C2410_NAND_BOOT 1 -#endif - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ - -/* input clock of PLL */ -#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ - - -#define USE_920T_MMU 1 -#define CONFIG_USE_IRQ 1 -//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ - -/* - * Size of malloc() pool - */ -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ - -/* - * Hardware drivers - */ -#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -#define CS8900_BASE 0x19000300 -#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ - -/* - * select serial console configuration - */ -#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -#define CONFIG_HWFLOW 1 - -/************************************************************ - * RTC - ************************************************************/ -#define CONFIG_RTC_S3C24X0 1 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -#define CONFIG_BAUDRATE 115200 - -/*********************************************************** - * Command definition - ***********************************************************/ -#define CONFIG_COMMANDS \ - (CONFIG_CMD_DFL | \ - CFG_CMD_BSP | \ - CFG_CMD_CACHE | \ - CFG_CMD_DATE | \ - CFG_CMD_DHCP | \ - CFG_CMD_DIAG | \ - CFG_CMD_ELF | \ - CFG_CMD_EXT2 | \ - CFG_CMD_FAT | \ - CFG_CMD_HWFLOW | \ - /* CFG_CMD_IDE | */ \ - /* CFG_CMD_IRQ | */ \ - CFG_CMD_JFFS2 | \ - CFG_CMD_MMC | \ - CFG_CMD_NAND | \ - CFG_CMD_PING | \ - CFG_CMD_PORTIO | \ - CFG_CMD_REGINFO | \ - CFG_CMD_SAVES | \ - CFG_CMD_USB) - -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -#include - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_BOOTARGS "root=/dev/sda1 console=ttySAC0,115200 loglevel=8 rootdelay=10" -/*#define CONFIG_ETHADDR 08:00:3e:26:0a:5b */ -#define CONFIG_NETMASK 255.255.255.0 -#define CONFIG_IPADDR 10.0.0.110 -#define CONFIG_SERVERIP 10.0.0.1 -/*#define CONFIG_BOOTFILE "elinos-lart" */ -#define CONFIG_BOOTCOMMAND "mmcinit; ext2load mmc 0 0x32000000 uImage; bootm 0x32000000" - -#define CONFIG_DOS_PARTITION 1 - -#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -/* what's this ? it's not used anywhere */ -#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CFG_LONGHELP /* undef to save memory */ -#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -#define CFG_MAXARGS 16 /* max number of command args */ -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ - -#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ - -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ - -#define CFG_LOAD_ADDR 0x33000000 /* default load address */ - -/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -/* it to wrap 100 times (total 1562500) to get 1 sec. */ -#define CFG_HZ 1562500 - -/* valid baudrates */ -#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -#endif - -/* IDE/ATA config */ - -#if 0 -#define CFG_IDE_MAXBUS 1 -#define CFG_IDE_MAXDEVICE 2 -#define CFG_IDE_PREINIT 0 - -#define CFG_ATA_BASE_ADDR -#endif - -#define CONFIG_USB_OHCI 1 - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ - -#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ - -#define CFG_FLASH_BASE PHYS_FLASH_1 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ - -#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -#endif - -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ - -#define CFG_ENV_IS_IN_NAND 1 -#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ - -#define NAND_MAX_CHIPS 1 -#define CFG_NAND_BASE 0x4e000000 -#define CFG_MAX_NAND_DEVICE 1 - -#define CONFIG_MMC 1 -#define CFG_MMC_BASE 0xff000000 - -#define CONFIG_EXT2 1 - -/* FAT driver in u-boot is broken currently */ -#define CONFIG_FAT 1 -#define CONFIG_SUPPORT_VFAT - -/* ATAG configuration */ -#define CONFIG_INITRD_TAG 1 -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_CMDLINE_TAG 1 -#if 0 -#define CONFIG_SERIAL_TAG 1 -#define CONFIG_REVISION_TAG 1 -#endif - - -#if 0 -#define CONFIG_VIDEO -#define CONFIG_VIDEO_S3C2410 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VIDEO_LOGO -#define CONFIG_VGA_AS_SINGLE_DEVICE - -#define VIDEO_KBD_INIT_FCT 0 -#define VIDEO_TSTC_FCT serial_tstc -#define VIDEO_GETC_FCT serial_getc - -#define LCD_VIDEO_ADDR 0x33d00000 -#endif - -#endif /* __CONFIG_H */ diff --git a/packages/uboot/files/qt2410_ram.h b/packages/uboot/files/qt2410_ram.h deleted file mode 100644 index 62cc88eaf0..0000000000 --- a/packages/uboot/files/qt2410_ram.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * (C) Copyright 2002 - * Sysgo Real-Time Solutions, GmbH - * Marius Groeger - * Gary Jennejohn - * David Mueller - * - * Configuation settings for the SAMSUNG SMDK2410 board. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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 __CONFIG_H -#define __CONFIG_H - -#if 1 -/* If we want to start u-boot from usb bootloader in NOR flash */ -#define CONFIG_SKIP_RELOCATE_UBOOT 1 -#define CONFIG_SKIP_LOWLEVEL_INIT 1 -#else -/* If we want to start u-boot directly from within NAND flash */ -#define CONFIG_S3C2410_NAND_BOOT 1 -#endif - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ - -/* input clock of PLL */ -#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ - - -#define USE_920T_MMU 1 -#define CONFIG_USE_IRQ 1 -//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ - -/* - * Size of malloc() pool - */ -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ - -/* - * Hardware drivers - */ -#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -#define CS8900_BASE 0x19000300 -#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ - -/* - * select serial console configuration - */ -#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -#define CONFIG_HWFLOW 1 - -/************************************************************ - * RTC - ************************************************************/ -#define CONFIG_RTC_S3C24X0 1 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE - -#define CONFIG_BAUDRATE 115200 - -/*********************************************************** - * Command definition - ***********************************************************/ -#define CONFIG_COMMANDS \ - (CONFIG_CMD_DFL | \ - CFG_CMD_BSP | \ - CFG_CMD_CACHE | \ - CFG_CMD_DATE | \ - CFG_CMD_DHCP | \ - CFG_CMD_DIAG | \ - CFG_CMD_ELF | \ - CFG_CMD_EXT2 | \ - CFG_CMD_FAT | \ - CFG_CMD_HWFLOW | \ - /* CFG_CMD_IDE | */ \ - /* CFG_CMD_IRQ | */ \ - CFG_CMD_JFFS2 | \ - CFG_CMD_MMC | \ - CFG_CMD_NAND | \ - CFG_CMD_PING | \ - CFG_CMD_PORTIO | \ - CFG_CMD_REGINFO | \ - CFG_CMD_SAVES | \ - CFG_CMD_USB) - -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -#include - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_BOOTARGS "root=/dev/sda1 console=ttySAC0,115200 loglevel=8 rootdelay=10" -/*#define CONFIG_ETHADDR 08:00:3e:26:0a:5b */ -#define CONFIG_NETMASK 255.255.255.0 -#define CONFIG_IPADDR 10.0.0.110 -#define CONFIG_SERVERIP 10.0.0.1 -/*#define CONFIG_BOOTFILE "elinos-lart" */ -#define CONFIG_BOOTCOMMAND "mmcinit; ext2load mmc 0 0x32000000 uImage; bootm 0x32000000" - -#define CONFIG_DOS_PARTITION 1 - -#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -/* what's this ? it's not used anywhere */ -#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -#endif - -/* - * Miscellaneous configurable options - */ -#define CFG_LONGHELP /* undef to save memory */ -#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -#define CFG_MAXARGS 16 /* max number of command args */ -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ - -#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ - -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ - -#define CFG_LOAD_ADDR 0x33000000 /* default load address */ - -/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -/* it to wrap 100 times (total 1562500) to get 1 sec. */ -#define CFG_HZ 1562500 - -/* valid baudrates */ -#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -#endif - -/* IDE/ATA config */ - -#if 0 -#define CFG_IDE_MAXBUS 1 -#define CFG_IDE_MAXDEVICE 2 -#define CFG_IDE_PREINIT 0 - -#define CFG_ATA_BASE_ADDR -#endif - -#define CONFIG_USB_OHCI 1 - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ - -#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ - -#define CFG_FLASH_BASE PHYS_FLASH_1 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ - -#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -#endif - -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ - -#define CFG_ENV_IS_IN_NAND 1 -#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ - -#define NAND_MAX_CHIPS 1 -#define CFG_NAND_BASE 0x4e000000 -#define CFG_MAX_NAND_DEVICE 1 - -#define CONFIG_MMC 1 -#define CFG_MMC_BASE 0xff000000 - -#define CONFIG_EXT2 1 - -/* FAT driver in u-boot is broken currently */ -#define CONFIG_FAT 1 -#define CONFIG_SUPPORT_VFAT - -/* ATAG configuration */ -#define CONFIG_INITRD_TAG 1 -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_CMDLINE_TAG 1 -#if 0 -#define CONFIG_SERIAL_TAG 1 -#define CONFIG_REVISION_TAG 1 -#endif - - -#if 0 -#define CONFIG_VIDEO -#define CONFIG_VIDEO_S3C2410 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VIDEO_LOGO -#define CONFIG_VGA_AS_SINGLE_DEVICE - -#define VIDEO_KBD_INIT_FCT 0 -#define VIDEO_TSTC_FCT serial_tstc -#define VIDEO_GETC_FCT serial_getc - -#define LCD_VIDEO_ADDR 0x33d00000 -#endif - -#endif /* __CONFIG_H */ diff --git a/packages/uboot/files/u-boot-20060807-qt2410.patch b/packages/uboot/files/u-boot-20060807-qt2410.patch deleted file mode 100644 index ed9f987c81..0000000000 --- a/packages/uboot/files/u-boot-20060807-qt2410.patch +++ /dev/null @@ -1,8435 +0,0 @@ -diff --git a/Makefile b/Makefile -index 128ae59..5d7b5bb 100644 ---- a/Makefile -+++ b/Makefile -@@ -1638,6 +1638,9 @@ omap730p2_cs3boot_config : unconfig - sbc2410x_config: unconfig - @./mkconfig $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 - -+qt2410_config : unconfig -+ @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 -+ - scb9328_config : unconfig - @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx - -diff --git a/board/qt2410/Makefile b/board/qt2410/Makefile -new file mode 100644 -index 0000000..407b256 ---- /dev/null -+++ b/board/qt2410/Makefile -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := qt2410.o flash.o -+SOBJS := lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -diff --git a/board/qt2410/config.mk b/board/qt2410/config.mk -new file mode 100644 -index 0000000..1af85da ---- /dev/null -+++ b/board/qt2410/config.mk -@@ -0,0 +1,25 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# -+# SMDK2410 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -diff --git a/board/qt2410/flash.c b/board/qt2410/flash.c -new file mode 100644 -index 0000000..993946b ---- /dev/null -+++ b/board/qt2410/flash.c -@@ -0,0 +1,433 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Alex Zuepke -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+ulong myflush (void); -+ -+ -+#define FLASH_BANK_SIZE PHYS_FLASH_SIZE -+#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ -+ -+flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -+ -+ -+#define CMD_READ_ARRAY 0x000000F0 -+#define CMD_UNLOCK1 0x000000AA -+#define CMD_UNLOCK2 0x00000055 -+#define CMD_ERASE_SETUP 0x00000080 -+#define CMD_ERASE_CONFIRM 0x00000030 -+#define CMD_PROGRAM 0x000000A0 -+#define CMD_UNLOCK_BYPASS 0x00000020 -+ -+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) -+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) -+ -+#define BIT_ERASE_DONE 0x00000080 -+#define BIT_RDY_MASK 0x00000080 -+#define BIT_PROGRAM_ERROR 0x00000020 -+#define BIT_TIMEOUT 0x80000000 /* our flag */ -+ -+#define READY 1 -+#define ERR 2 -+#define TMO 4 -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+ulong flash_init (void) -+{ -+ int i, j; -+ ulong size = 0; -+ -+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { -+ ulong flashbase = 0; -+ -+ flash_info[i].flash_id = -+#if defined(CONFIG_AMD_LV400) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV400B & FLASH_TYPEMASK); -+#elif defined(CONFIG_AMD_LV800) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV800B & FLASH_TYPEMASK); -+#else -+#error "Unknown flash configured" -+#endif -+ flash_info[i].size = FLASH_BANK_SIZE; -+ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; -+ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); -+ if (i == 0) -+ flashbase = PHYS_FLASH_1; -+ else -+ panic ("configured too many flash banks!\n"); -+ for (j = 0; j < flash_info[i].sector_count; j++) { -+ if (j <= 3) { -+ /* 1st one is 16 KB */ -+ if (j == 0) { -+ flash_info[i].start[j] = -+ flashbase + 0; -+ } -+ -+ /* 2nd and 3rd are both 8 KB */ -+ if ((j == 1) || (j == 2)) { -+ flash_info[i].start[j] = -+ flashbase + 0x4000 + (j - -+ 1) * -+ 0x2000; -+ } -+ -+ /* 4th 32 KB */ -+ if (j == 3) { -+ flash_info[i].start[j] = -+ flashbase + 0x8000; -+ } -+ } else { -+ flash_info[i].start[j] = -+ flashbase + (j - 3) * MAIN_SECT_SIZE; -+ } -+ } -+ size += flash_info[i].size; -+ } -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_FLASH_BASE, -+ CFG_FLASH_BASE + monitor_flash_len - 1, -+ &flash_info[0]); -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_ENV_ADDR, -+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); -+ -+ return size; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+void flash_print_info (flash_info_t * info) -+{ -+ int i; -+ -+ switch (info->flash_id & FLASH_VENDMASK) { -+ case (AMD_MANUFACT & FLASH_VENDMASK): -+ printf ("AMD: "); -+ break; -+ default: -+ printf ("Unknown Vendor "); -+ break; -+ } -+ -+ switch (info->flash_id & FLASH_TYPEMASK) { -+ case (AMD_ID_LV400B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV400BB (4Mbit)\n"); -+ break; -+ case (AMD_ID_LV800B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV800BB (8Mbit)\n"); -+ break; -+ default: -+ printf ("Unknown Chip Type\n"); -+ goto Done; -+ break; -+ } -+ -+ printf (" Size: %ld MB in %d Sectors\n", -+ info->size >> 20, info->sector_count); -+ -+ printf (" Sector Start Addresses:"); -+ for (i = 0; i < info->sector_count; i++) { -+ if ((i % 5) == 0) { -+ printf ("\n "); -+ } -+ printf (" %08lX%s", info->start[i], -+ info->protect[i] ? " (RO)" : " "); -+ } -+ printf ("\n"); -+ -+ Done:; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+int flash_erase (flash_info_t * info, int s_first, int s_last) -+{ -+ ushort result; -+ int iflag, cflag, prot, sect; -+ int rc = ERR_OK; -+ int chip; -+ -+ /* first look for protection bits */ -+ -+ if (info->flash_id == FLASH_UNKNOWN) -+ return ERR_UNKNOWN_FLASH_TYPE; -+ -+ if ((s_first < 0) || (s_first > s_last)) { -+ return ERR_INVAL; -+ } -+ -+ if ((info->flash_id & FLASH_VENDMASK) != -+ (AMD_MANUFACT & FLASH_VENDMASK)) { -+ return ERR_UNKNOWN_FLASH_VENDOR; -+ } -+ -+ prot = 0; -+ for (sect = s_first; sect <= s_last; ++sect) { -+ if (info->protect[sect]) { -+ prot++; -+ } -+ } -+ if (prot) -+ return ERR_PROTECTED; -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ /* Start erase on unprotected sectors */ -+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { -+ printf ("Erasing sector %2d ... ", sect); -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ if (info->protect[sect] == 0) { /* not protected */ -+ vu_short *addr = (vu_short *) (info->start[sect]); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ *addr = CMD_ERASE_CONFIRM; -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > -+ CFG_FLASH_ERASE_TOUT) { -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ chip = TMO; -+ break; -+ } -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_ERASE_DONE) -+ chip = READY; -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) -+ chip = ERR; -+ -+ } while (!chip); -+ -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ -+ if (chip == ERR) { -+ rc = ERR_PROG_ERROR; -+ goto outahere; -+ } -+ if (chip == TMO) { -+ rc = ERR_TIMOUT; -+ goto outahere; -+ } -+ -+ printf ("ok.\n"); -+ } else { /* it was protected */ -+ -+ printf ("protected!\n"); -+ } -+ } -+ -+ if (ctrlc ()) -+ printf ("User Interrupt!\n"); -+ -+ outahere: -+ /* allow flash to settle - wait 10 ms */ -+ udelay_masked (10000); -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash -+ */ -+ -+volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) -+{ -+ vu_short *addr = (vu_short *) dest; -+ ushort result; -+ int rc = ERR_OK; -+ int cflag, iflag; -+ int chip; -+ -+ /* -+ * Check if Flash is (sufficiently) erased -+ */ -+ result = *addr; -+ if ((result & data) != data) -+ return ERR_NOT_ERASED; -+ -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; -+ *addr = CMD_PROGRAM; -+ *addr = data; -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { -+ chip = ERR | TMO; -+ break; -+ } -+ if (!chip && ((result & 0x80) == (data & 0x80))) -+ chip = READY; -+ -+ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { -+ result = *addr; -+ -+ if ((result & 0x80) == (data & 0x80)) -+ chip = READY; -+ else -+ chip = ERR; -+ } -+ -+ } while (!chip); -+ -+ *addr = CMD_READ_ARRAY; -+ -+ if (chip == ERR || *addr != data) -+ rc = ERR_PROG_ERROR; -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash. -+ */ -+ -+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -+{ -+ ulong cp, wp; -+ int l; -+ int i, rc; -+ ushort data; -+ -+ wp = (addr & ~1); /* get lower word aligned address */ -+ -+ /* -+ * handle unaligned start bytes -+ */ -+ if ((l = addr - wp) != 0) { -+ data = 0; -+ for (i = 0, cp = wp; i < l; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ for (; i < 2 && cnt > 0; ++i) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ ++cp; -+ } -+ for (; cnt == 0 && i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ wp += 2; -+ } -+ -+ /* -+ * handle word aligned part -+ */ -+ while (cnt >= 2) { -+ data = *((vu_short *) src); -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ src += 2; -+ wp += 2; -+ cnt -= 2; -+ } -+ -+ if (cnt == 0) { -+ return ERR_OK; -+ } -+ -+ /* -+ * handle unaligned tail bytes -+ */ -+ data = 0; -+ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ } -+ for (; i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ return write_hword (info, wp, data); -+} -diff --git a/board/qt2410/lowlevel_init.S b/board/qt2410/lowlevel_init.S -new file mode 100644 -index 0000000..310f2a0 ---- /dev/null -+++ b/board/qt2410/lowlevel_init.S -@@ -0,0 +1,167 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the Samsung SMDK2410 by -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x0 /* 2clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0x32 -+ .word 0x30 -+ .word 0x30 -diff --git a/board/qt2410/qt2410.c b/board/qt2410/qt2410.c -new file mode 100644 -index 0000000..133b748 ---- /dev/null -+++ b/board/qt2410/qt2410.c -@@ -0,0 +1,130 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#define FCLK_SPEED 1 -+ -+#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ -+#define M_MDIV 0xC3 -+#define M_PDIV 0x4 -+#define M_SDIV 0x1 -+#elif FCLK_SPEED==1 /* Fout = 202.8MHz */ -+#if 0 -+#define M_MDIV 0xA1 -+#define M_PDIV 0x3 -+#define M_SDIV 0x1 -+#else -+#define M_MDIV 0x5c -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+#endif -+ -+#define USB_CLOCK 1 -+ -+#if USB_CLOCK==0 -+#define U_M_MDIV 0xA1 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x1 -+#elif USB_CLOCK==1 -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x00044555; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFF95FFBA; -+ //gpio->GPGUP = 0x0000FFFF; -+ gpio->GPGUP = 0x0000AFEF; -+ gpio->GPHCON = 0x0028FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_QT2410; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -diff --git a/board/qt2410/u-boot.lds b/board/qt2410/u-boot.lds -new file mode 100644 -index 0000000..f4fbf96 ---- /dev/null -+++ b/board/qt2410/u-boot.lds -@@ -0,0 +1,57 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -diff --git a/cpu/arm920t/s3c24x0/Makefile b/cpu/arm920t/s3c24x0/Makefile -index af9e4ef..10f33f2 100644 ---- a/cpu/arm920t/s3c24x0/Makefile -+++ b/cpu/arm920t/s3c24x0/Makefile -@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk - LIB = lib$(SOC).a - - OBJS = i2c.o interrupts.o serial.o speed.o \ -- usb_ohci.o -+ usb_ohci.o mmc.o nand_read.o nand.o - - all: .depend $(LIB) - -diff --git a/cpu/arm920t/s3c24x0/mmc.c b/cpu/arm920t/s3c24x0/mmc.c -new file mode 100644 -index 0000000..b7057e2 ---- /dev/null -+++ b/cpu/arm920t/s3c24x0/mmc.c -@@ -0,0 +1,568 @@ -+/* -+ * u-boot S3C2410 MMC/SD card driver -+ * (C) Copyright 2006 by Harald Welte -+ * -+ * based on u-boot pxa MMC driver and linux/drivers/mmc/s3c2410mci.c -+ * (C) 2005-2005 Thomas Kleffel -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_MMC -+ -+#define CONFIG_MMC_WIDE -+ -+//#define MMC_DEBUG -+ -+#ifdef MMC_DEBUG -+#ifdef debug -+#undef debug -+#endif -+#define debug printf -+#endif -+ -+static S3C2410_SDI *sdi; -+ -+extern int -+fat_register_device(block_dev_desc_t *dev_desc, int part_no); -+ -+static block_dev_desc_t mmc_dev; -+ -+block_dev_desc_t * mmc_get_dev(int dev) -+{ -+ return ((block_dev_desc_t *)&mmc_dev); -+} -+ -+/* -+ * FIXME needs to read cid and csd info to determine block size -+ * and other parameters -+ */ -+static uchar mmc_buf[MMC_BLOCK_SIZE]; -+static mmc_csd_t mmc_csd; -+static int mmc_ready = 0; -+static int wide = 0; -+ -+ -+#define CMD_F_RESP 0x01 -+#define CMD_F_RESP_LONG 0x02 -+ -+static u_int32_t * -+/****************************************************/ -+mmc_cmd(ushort cmd, ulong arg, ushort flags) -+/****************************************************/ -+{ -+ static u_int32_t resp[5]; -+ ulong status; -+ int i; -+ -+ u_int32_t ccon, csta; -+ u_int32_t csta_rdy_bit = S3C2410_SDICMDSTAT_CMDSENT; -+ -+ memset(resp, 0, sizeof(resp)); -+ -+ debug("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags); -+ -+ sdi->SDICSTA = 0xffffffff; -+ sdi->SDIDSTA = 0xffffffff; -+ sdi->SDIFSTA = 0xffffffff; -+ -+ sdi->SDICARG = arg; -+ -+ ccon = cmd & S3C2410_SDICMDCON_INDEX; -+ ccon |= S3C2410_SDICMDCON_SENDERHOST|S3C2410_SDICMDCON_CMDSTART; -+ -+ if (flags & CMD_F_RESP) { -+ ccon |= S3C2410_SDICMDCON_WAITRSP; -+ csta_rdy_bit = S3C2410_SDICMDSTAT_RSPFIN; /* 1 << 9 */ -+ } -+ -+ if (flags & CMD_F_RESP_LONG) -+ ccon |= S3C2410_SDICMDCON_LONGRSP; -+ -+ sdi->SDICCON = ccon; -+ -+ while (1) { -+ csta = sdi->SDICSTA; -+ if (csta & csta_rdy_bit) -+ break; -+ if (csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) { -+ printf("===============> MMC CMD Timeout\n"); -+ sdi->SDICSTA |= S3C2410_SDICMDSTAT_CMDTIMEOUT; -+ break; -+ } -+ } -+ -+ debug("final MMC CMD status 0x%x\n", csta); -+ -+ sdi->SDICSTA |= csta_rdy_bit; -+ -+ if (flags & CMD_F_RESP) { -+ resp[0] = sdi->SDIRSP0; -+ resp[1] = sdi->SDIRSP1; -+ resp[2] = sdi->SDIRSP2; -+ resp[3] = sdi->SDIRSP3; -+ } -+ -+#if 0 -+ for (i=0; i<4; i ++) { -+ debug("MMC resp[%d] = 0x%08x\n", i, resp[i]); -+ } -+#endif -+ -+ return resp; -+} -+ -+#define FIFO_FILL(host) ((host->SDIFSTA & S3C2410_SDIFSTA_COUNTMASK) >> 2) -+ -+static int -+/****************************************************/ -+mmc_block_read(uchar *dst, ulong src, ulong len) -+/****************************************************/ -+{ -+ u_int32_t dcon, fifo; -+ u_int32_t *dst_u32 = (u_int32_t *)dst; -+ u_int32_t *resp; -+ -+ if (len == 0) { -+ return 0; -+ } -+ -+ debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len); -+ -+ /* set block len */ -+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, len, CMD_F_RESP); -+ sdi->SDIBSIZE = len; -+ -+ //sdi->SDIPRE = 0xff; -+ -+ /* setup data */ -+ dcon = (len >> 9) & S3C2410_SDIDCON_BLKNUM_MASK; -+ dcon |= S3C2410_SDIDCON_BLOCKMODE; -+ dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; -+ if (wide) -+ dcon |= S3C2410_SDIDCON_WIDEBUS; -+ sdi->SDIDCON = dcon; -+ -+ /* send read command */ -+ resp = mmc_cmd(MMC_CMD_READ_BLOCK, src, CMD_F_RESP); -+ -+ while (len > 0) { -+ u_int32_t sdidsta = sdi->SDIDSTA; -+ fifo = FIFO_FILL(sdi); -+ if (sdidsta & (S3C2410_SDIDSTA_FIFOFAIL| -+ S3C2410_SDIDSTA_CRCFAIL| -+ S3C2410_SDIDSTA_RXCRCFAIL| -+ S3C2410_SDIDSTA_DATATIMEOUT)) { -+ printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta); -+ return -EIO; -+ } -+ -+ while (fifo--) { -+ //debug("dst_u32 = 0x%08x\n", dst_u32); -+ *(dst_u32++) = sdi->SDIDAT; -+ if (len >= 4) -+ len -= 4; -+ else { -+ len = 0; -+ break; -+ } -+ } -+ } -+ -+#if 1 -+ debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+ while (!(sdi->SDIDSTA & (1 << 4))) {} -+ debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+#endif -+ -+ sdi->SDIDCON = 0; -+ -+#if 0 -+ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH)) -+ printf("mmc_block_read; transfer not finished!\n"); -+#endif -+ -+ return 0; -+} -+ -+static int -+/****************************************************/ -+mmc_block_write(ulong dst, uchar *src, int len) -+/****************************************************/ -+{ -+#if 0 -+ uchar *resp; -+ ushort argh, argl; -+ ulong status; -+ -+ if (len == 0) { -+ return 0; -+ } -+ -+ debug("mmc_block_wr dst %lx src %lx len %d\n", dst, (ulong)src, len); -+ -+ argh = len >> 16; -+ argl = len & 0xffff; -+ -+ /* set block len */ -+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, argh, argl, CMD_F_RESP); -+ -+ /* send write command */ -+ argh = dst >> 16; -+ argl = dst & 0xffff; -+ MMC_STRPCL = MMC_STRPCL_STOP_CLK; -+ MMC_NOB = 1; -+ MMC_BLKLEN = len; -+ resp = mmc_cmd(MMC_CMD_WRITE_BLOCK, dst, CMD_F_RESP, -+ MMC_CMDAT_R1|MMC_CMDAT_WRITE|MMC_CMDAT_BLOCK|MMC_CMDAT_DATA_EN); -+ -+ MMC_I_MASK = ~MMC_I_MASK_TXFIFO_WR_REQ; -+ while (len) { -+ if (MMC_I_REG & MMC_I_REG_TXFIFO_WR_REQ) { -+ int i, bytes = min(32,len); -+ -+ for (i=0; iread_bl_len << 12; -+ mult = csd->c_size_mult1 << 8; -+ blocknr = (csd->c_size+1) * mult; -+ -+ return blocknr * block_len; -+} -+ -+int -+/****************************************************/ -+mmc_init(int verbose) -+/****************************************************/ -+{ -+ int retries, rc = -ENODEV; -+ int is_sd = 0; -+ u_int32_t *resp; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ sdi = S3C2410_GetBase_SDI(); -+ -+ debug("mmc_init(PCLK=%u)\n", get_PCLK()); -+ -+ clk_power->CLKCON |= (1 << 9); -+ -+ /* S3C2410 has some bug that prevents reliable operation at higher speed */ -+ //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIBSIZE = 512; -+ sdi->SDIDTIMER = 0xffff; -+ sdi->SDIIMSK = 0x0; -+ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; -+ udelay(125000); /* FIXME: 74 SDCLK cycles */ -+ -+ mmc_csd.c_size = 0; -+ -+ /* reset */ -+ retries = 10; -+ resp = mmc_cmd(MMC_CMD_RESET, 0, 0); -+ -+ printf("trying to detect SD Card...\n"); -+ while (retries--) { -+ int i; -+ udelay(100000); -+ resp = mmc_cmd(55, 0x00000000, CMD_F_RESP); -+ resp = mmc_cmd(41, 0x00300000, CMD_F_RESP); -+ -+ if (resp[0] & (1 << 31)) { -+ is_sd = 1; -+ break; -+ } -+ } -+ -+ if (retries == 0 && !is_sd) { -+ retries = 10; -+ printf("failed to detect SD Card, trying MMC\n"); -+ resp = mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ffc000, CMD_F_RESP); -+ while (retries-- && resp && !(resp[4] & 0x80)) { -+ debug("resp %x %x\n", resp[0], resp[1]); -+ udelay(50); -+ resp = mmc_cmd(1, 0x00ffff00, CMD_F_RESP); -+ } -+ } -+ -+ /* try to get card id */ -+ resp = mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ /* TODO configure mmc driver depending on card attributes */ -+ mmc_cid_t *cid = (mmc_cid_t *)resp; -+ if (verbose) { -+ printf("MMC found. Card desciption is:\n"); -+ printf("Manufacturer ID = %02x%02x%02x\n", -+ cid->id[0], cid->id[1], cid->id[2]); -+ printf("HW/FW Revision = %x %x\n",cid->hwrev, cid->fwrev); -+ cid->hwrev = cid->fwrev = 0; /* null terminate string */ -+ printf("Product Name = %s\n",cid->name); -+ printf("Serial Number = %02x%02x%02x\n", -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ printf("Month = %d\n",cid->month); -+ printf("Year = %d\n",1997 + cid->year); -+ } -+ /* fill in device description */ -+ mmc_dev.if_type = IF_TYPE_MMC; -+ mmc_dev.part_type = PART_TYPE_DOS; -+ mmc_dev.dev = 0; -+ mmc_dev.lun = 0; -+ mmc_dev.type = 0; -+ /* FIXME fill in the correct size (is set to 32MByte) */ -+ mmc_dev.blksz = 512; -+ mmc_dev.lba = 0x10000; -+ sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x", -+ cid->id[0], cid->id[1], cid->id[2], -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ sprintf(mmc_dev.product,"%s",cid->name); -+ sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev); -+ mmc_dev.removable = 0; -+ mmc_dev.block_read = mmc_bread; -+ -+ /* MMC exists, get CSD too */ -+ resp = mmc_cmd(MMC_CMD_SET_RCA, MMC_DEFAULT_RCA, CMD_F_RESP); -+ if (is_sd) -+ rca = resp[0] >> 16; -+ -+ resp = mmc_cmd(MMC_CMD_SEND_CSD, rca<<16, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ mmc_csd_t *csd = (mmc_csd_t *)resp; -+ memcpy(&mmc_csd, csd, sizeof(csd)); -+ rc = 0; -+ mmc_ready = 1; -+ /* FIXME add verbose printout for csd */ -+ printf("READ_BL_LEN=%u, C_SIZE_MULT=%u, C_SIZE=%u\n", -+ csd->read_bl_len, csd->c_size_mult1, csd->c_size); -+ printf("size = %u\n", mmc_size(csd)); -+ } -+ } -+ -+ resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca<<16, CMD_F_RESP); -+ -+#ifdef CONFIG_MMC_WIDE -+ if (is_sd) { -+ resp = mmc_cmd(55, rca<<16, CMD_F_RESP); -+ resp = mmc_cmd(6, 0x02, CMD_F_RESP); -+ wide = 1; -+ } -+#endif -+ -+ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */ -+ -+ return rc; -+} -+ -+int -+mmc_ident(block_dev_desc_t *dev) -+{ -+ return 0; -+} -+ -+int -+mmc2info(ulong addr) -+{ -+ /* FIXME hard codes to 32 MB device */ -+ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000) { -+ return 1; -+ } -+ return 0; -+} -+ -+#endif /* CONFIG_MMC */ -diff --git a/cpu/arm920t/s3c24x0/nand.c b/cpu/arm920t/s3c24x0/nand.c -new file mode 100644 -index 0000000..f720229 ---- /dev/null -+++ b/cpu/arm920t/s3c24x0/nand.c -@@ -0,0 +1,212 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if 0 -+#define DEBUGN printf -+#else -+#define DEBUGN(x, args ...) {} -+#endif -+ -+#if (CONFIG_COMMANDS & CFG_CMD_NAND) -+#if !defined(CFG_NAND_LEGACY) -+ -+#include -+#include -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+ -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#define S3C2410_NFCONF_EN (1<<15) -+#define S3C2410_NFCONF_512BYTE (1<<14) -+#define S3C2410_NFCONF_4STEP (1<<13) -+#define S3C2410_NFCONF_INITECC (1<<12) -+#define S3C2410_NFCONF_nFCE (1<<11) -+#define S3C2410_NFCONF_TACLS(x) ((x)<<8) -+#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) -+#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) -+ -+static u16 s3c2410_read_word(struct mtd_info *mtd) -+{ -+ unsigned char byte = 0; -+ -+ printf("s3c2410_read_word: WARNING, this function is not implemented yet\n"); -+ return byte; -+} -+ -+static void s3c2410_write_word(struct mtd_info *mtd, u16 word) -+{ -+ printf("s3c2410_write_word: WARNING, this function is not implemented yet\n"); -+} -+ -+static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) -+{ -+ struct nand_chip *chip = mtd->priv; -+ -+ DEBUGN("hwcontrol(): 0x%02x: ", cmd); -+ -+ switch (cmd) { -+ case NAND_CTL_SETNCE: -+ NFCONF &= ~S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_CLRNCE: -+ NFCONF |= S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_SETALE: -+ chip->IO_ADDR_W = NF_BASE + 0x8; -+ DEBUGN("SETALE\n"); -+ break; -+ case NAND_CTL_SETCLE: -+ chip->IO_ADDR_W = NF_BASE + 0x4; -+ DEBUGN("SETCLE\n"); -+ break; -+ default: -+ chip->IO_ADDR_W = NF_BASE + 0xc; -+ break; -+ } -+ return; -+} -+ -+static int s3c2410_dev_ready(struct mtd_info *mtd) -+{ -+ DEBUGN("dev_ready\n"); -+ return (NFSTAT & 0x01); -+} -+ -+static void s3c2410_cmdfunc(struct mtd_info *mtd, unsigned cmd, -+ int column, int page_addr) -+{ -+ DEBUGN("cmdfunc(): 0x%02x, col=%d, page=%d\n", cmd, column, page_addr); -+ -+ switch (cmd) { -+ case NAND_CMD_READ0: -+ case NAND_CMD_READ1: -+ case NAND_CMD_READOOB: -+ NFCMD = cmd; -+ NFADDR = column & 0xff; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_READID: -+ NFCMD = cmd; -+ NFADDR = 0; -+ break; -+ case NAND_CMD_PAGEPROG: -+ NFCMD = cmd; -+ printf("PAGEPROG not implemented\n"); -+ break; -+ case NAND_CMD_ERASE1: -+ NFCMD = cmd; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_ERASE2: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_SEQIN: -+ printf("SEQIN not implemented\n"); -+ break; -+ case NAND_CMD_STATUS: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_RESET: -+ NFCMD = cmd; -+ break; -+ default: -+ break; -+ } -+ -+ while (!s3c2410_dev_ready(mtd)); -+} -+ -+void board_nand_init(struct nand_chip *nand) -+{ -+ u_int32_t cfg; -+ u_int8_t tacls, twrph0, twrph1; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ DEBUGN("board_nand_init()\n"); -+ -+ clk_power->CLKCON |= (1 << 4); -+ -+ /* initialize hardware */ -+ twrph0 = 3; twrph1 = 0; tacls = 0; -+ -+ /* default timings: maximum */ -+ //twrph0 = 8; twrph1 = 8; tacls = 8; -+ -+ cfg = S3C2410_NFCONF_EN; -+ cfg |= S3C2410_NFCONF_TACLS(tacls - 1); -+ cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); -+ cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); -+ -+ //NFCONF = cfg; -+ NFCONF = 0xf842; -+ -+ /* initialize nand_chip data structure */ -+ nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; -+ -+ /* read_buf and write_buf are default */ -+ /* read_byte and write_byte are default */ -+ -+ /* need to override word read/write since default routines try 16bit wide -+ * register access of an (in our case) 8bit register */ -+ nand->read_word = s3c2410_read_word; -+ nand->write_word = s3c2410_write_word; -+ -+ /* hwcontrol always must be implemented */ -+ nand->hwcontrol = s3c2410_hwcontrol; -+ -+ nand->dev_ready = s3c2410_dev_ready; -+ -+ nand->eccmode = NAND_ECC_SOFT; -+ nand->options = 0; -+ //nand->waitfunc = dfc_wait; -+ -+ //nand->cmdfunc = s3c2410_cmdfunc; -+ //nand->autooob = &delta_oob; -+ //nand->badblock_pattern = &delta_bbt_descr; -+ -+#if 0 -+ /* reset */ -+ nand->hwcontrol(NULL, NAND_CTL_SETNCE); -+ nand->cmdfunc(NULL, NAND_CMD_RESET, -1, -1); -+ while (nand->dev_ready(NULL) == 0) {} -+ nand->hwcontrol(NULL, NAND_CTL_CLRNCE); -+#endif -+ -+ DEBUGN("end of nand_init\n"); -+} -+ -+#else -+ #error "U-Boot legacy NAND support not available for S3C2410" -+#endif -+#endif -diff --git a/cpu/arm920t/s3c24x0/nand_read.c b/cpu/arm920t/s3c24x0/nand_read.c -new file mode 100644 -index 0000000..9d97932 ---- /dev/null -+++ b/cpu/arm920t/s3c24x0/nand_read.c -@@ -0,0 +1,75 @@ -+/* -+ * nand_read.c: Simple NAND read functions for booting from NAND -+ * -+ * Taken from GPLv2 licensed vivi bootloader, -+ * Copyright (C) 2002 MIZI Research, Inc. -+ * -+ * Author: Hwang, Chideok -+ * Date : $Date: 2004/02/04 10:37:37 $ -+ * -+ * u-boot integration (C) 2006 by Harald Welte -+ */ -+ -+#include -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#define BUSY 1 -+inline void wait_idle(void) { -+ int i; -+ -+ while(!(NFSTAT & BUSY)) -+ for(i=0; i<10; i++); -+} -+ -+#define NAND_SECTOR_SIZE 512 -+#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) -+ -+/* low level nand read function */ -+int -+nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) -+{ -+ int i, j; -+ -+ if ((start_addr & NAND_BLOCK_MASK) || (size & NAND_BLOCK_MASK)) { -+ return -1; /* invalid alignment */ -+ } -+ -+ /* chip Enable */ -+ NFCONF &= ~0x800; -+ for(i=0; i<10; i++); -+ -+ for(i=start_addr; i < (start_addr + size);) { -+ /* READ0 */ -+ NFCMD = 0; -+ -+ /* Write Address */ -+ NFADDR = i & 0xff; -+ NFADDR = (i >> 9) & 0xff; -+ NFADDR = (i >> 17) & 0xff; -+ NFADDR = (i >> 25) & 0xff; -+ -+ wait_idle(); -+ -+ for(j=0; j < NAND_SECTOR_SIZE; j++, i++) { -+ *buf = (NFDATA & 0xff); -+ buf++; -+ } -+ } -+ -+ /* chip Disable */ -+ NFCONF |= 0x800; /* chip disable */ -+ -+ return 0; -+} -+ -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S -index 346f0d0..232e2c2 100644 ---- a/cpu/arm920t/start.S -+++ b/cpu/arm920t/start.S -@@ -5,6 +5,10 @@ - * Copyright (c) 2002 Alex Züpke - * Copyright (c) 2002 Gary Jennejohn - * -+ * S3C2410 NAND portions -+ * Copyright (c) 2001 MIZI Research, Inc. -+ * Copyright (c) 2006 Harald Welte -+ * - * See file CREDITS for list of people who contributed to this - * project. - * -@@ -27,6 +31,7 @@ - - #include - #include -+#include - - - /* -@@ -161,6 +166,7 @@ #ifndef CONFIG_SKIP_LOWLEVEL_INIT - #endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT -+#ifndef CONFIG_S3C2410_NAND_BOOT - relocate: /* relocate U-Boot to RAM */ - adr r0, _start /* r0 <- current position of code */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ -@@ -177,6 +183,93 @@ copy_loop: - stmia r1!, {r3-r10} /* copy to target address [r1] */ - cmp r0, r2 /* until source end addreee [r2] */ - ble copy_loop -+#else /* NAND_BOOT */ -+relocate: -+copy_myself: -+ /* mov r10, lr */ -+ -+ @ reset NAND -+ mov r1, #S3C2410_NAND_BASE -+ ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 -+ str r2, [r1, #oNFCONF] -+ ldr r2, [r1, #oNFCONF] -+ bic r2, r2, #0x800 @ enable chip -+ str r2, [r1, #oNFCONF] -+ mov r2, #0xff @ RESET command -+ strb r2, [r1, #oNFCMD] -+ mov r3, #0 @ wait -+1: add r3, r3, #0x1 -+ cmp r3, #0xa -+ blt 1b -+2: ldr r2, [r1, #oNFSTAT] @ wait ready -+ tst r2, #0x1 -+ beq 2b -+ ldr r2, [r1, #oNFCONF] -+ orr r2, r2, #0x800 @ disable chip -+ str r2, [r1, #oNFCONF] -+ -+#if 0 -+ @ get ready to call C functions (for nand_read()) -+ ldr sp, DW_STACK_START @ setup stack pointer -+ mov fp, #0 @ no previous frame, so fp=0 -+#else -+ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ -+ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ -+ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ -+#ifdef CONFIG_USE_IRQ -+ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) -+#endif -+ sub sp, r0, #12 /* leave 3 words for abort-stack */ -+#endif -+ -+ @ copy u-boot to RAM -+ ldr r0, _TEXT_BASE -+ mov r1, #0x0 -+ mov r2, #0x30000 -+ bl nand_read_ll -+ -+ tst r0, #0x0 -+ beq ok_nand_read -+#ifdef CONFIG_DEBUG_LL -+bad_nand_read: -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+1: b 1b @ infinite loop -+#endif -+ -+ok_nand_read: -+#ifdef CONFIG_DEBUG_LL -+ ldr r0, STR_OK -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+ -+ @ verify -+ mov r0, #0 -+ @ldr r1, =0x33f00000 -+ ldr r1, _TEXT_BASE -+ mov r2, #0x400 @ 4 bytes * 1024 = 4K-bytes -+go_next: -+ ldr r3, [r0], #4 -+ ldr r4, [r1], #4 -+ teq r3, r4 -+ bne notmatch -+ subs r2, r2, #4 -+ beq done_nand_read -+ bne go_next -+notmatch: -+#ifdef CONFIG_DEBUG_LL -+ sub r0, r0, #4 -+ ldr r1, SerBase -+ bl PrintHexWord -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+1: b 1b -+done_nand_read: -+#endif /* NAND_BOOT */ - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ -diff --git a/drivers/Makefile b/drivers/Makefile -index 9be95c7..eef266a 100644 ---- a/drivers/Makefile -+++ b/drivers/Makefile -@@ -50,7 +50,7 @@ OBJS = 3c589.o 5701rls.o ali512x.o \ - videomodes.o w83c553f.o \ - ks8695eth.o \ - pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ -- rpx_pcmcia.o -+ rpx_pcmcia.o s3c2410_fb.o - - all: $(LIB) - -diff --git a/drivers/cs8900.c b/drivers/cs8900.c -index 082434c..1cce622 100644 ---- a/drivers/cs8900.c -+++ b/drivers/cs8900.c -@@ -120,6 +120,7 @@ void cs8900_get_enetaddr (uchar * addr) - unsigned char env_enetaddr[6]; - char *tmp = getenv ("ethaddr"); - char *end; -+ unsigned short chip_id; - - for (i=0; i<6; i++) { - env_enetaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0; -@@ -128,7 +129,9 @@ void cs8900_get_enetaddr (uchar * addr) - } - - /* verify chip id */ -- if (get_reg_init_bus (PP_ChipID) != 0x630e) -+ chip_id = get_reg_init_bus (PP_ChipID); -+ printf("\ncs8900a chipid 0x%04x\n", chip_id); -+ if (chip_id != 0x630e) - return; - eth_reset (); - if ((get_reg (PP_SelfST) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) == -diff --git a/drivers/s3c2410_fb.c b/drivers/s3c2410_fb.c -new file mode 100644 -index 0000000..fc389a9 ---- /dev/null -+++ b/drivers/s3c2410_fb.c -@@ -0,0 +1,182 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if defined(CONFIG_VIDEO_S3C2410) -+ -+#include -+#include "videomodes.h" -+#include -+/* -+ * Export Graphic Device -+ */ -+GraphicDevice smi; -+ -+#define VIDEO_MEM_SIZE 0x200000 -+ -+/******************************************************************************* -+ * -+ * Init video chip with common Linux graphic modes (lilo) -+ */ -+void *video_hw_init (void) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ GraphicDevice *pGD = (GraphicDevice *)&smi; -+ int videomode; -+ unsigned long t1, hsynch, vsynch; -+ char *penv; -+ int tmp, i, bits_per_pixel; -+ struct ctfb_res_modes *res_mode; -+ struct ctfb_res_modes var_mode; -+ unsigned char videoout; -+ unsigned int *vm; -+ -+ /* Search for video chip */ -+ printf("Video: "); -+ -+ tmp = 0; -+ -+ videomode = CFG_DEFAULT_VIDEO_MODE; -+ /* get video mode via environment */ -+ if ((penv = getenv ("videomode")) != NULL) { -+ /* deceide if it is a string */ -+ if (penv[0] <= '9') { -+ videomode = (int) simple_strtoul (penv, NULL, 16); -+ tmp = 1; -+ } -+ } else { -+ tmp = 1; -+ } -+ if (tmp) { -+ /* parameter are vesa modes */ -+ /* search params */ -+ for (i = 0; i < VESA_MODES_COUNT; i++) { -+ if (vesa_modes[i].vesanr == videomode) -+ break; -+ } -+ if (i == VESA_MODES_COUNT) { -+ printf ("no VESA Mode found, switching to mode 0x%x ", CFG_DEFAULT_VIDEO_MODE); -+ i = 0; -+ } -+ res_mode = -+ (struct ctfb_res_modes *) &res_mode_init[vesa_modes[i]. -+ resindex]; -+ bits_per_pixel = vesa_modes[i].bits_per_pixel; -+ } else { -+ -+ res_mode = (struct ctfb_res_modes *) &var_mode; -+ bits_per_pixel = video_get_params (res_mode, penv); -+ } -+ -+ /* calculate hsynch and vsynch freq (info only) */ -+ t1 = (res_mode->left_margin + res_mode->xres + -+ res_mode->right_margin + res_mode->hsync_len) / 8; -+ t1 *= 8; -+ t1 *= res_mode->pixclock; -+ t1 /= 1000; -+ hsynch = 1000000000L / t1; -+ t1 *= -+ (res_mode->upper_margin + res_mode->yres + -+ res_mode->lower_margin + res_mode->vsync_len); -+ t1 /= 1000; -+ vsynch = 1000000000L / t1; -+ -+ /* fill in Graphic device struct */ -+ sprintf (pGD->modeIdent, "%dx%dx%d %ldkHz %ldHz", res_mode->xres, -+ res_mode->yres, bits_per_pixel, (hsynch / 1000), -+ (vsynch / 1000)); -+ printf ("%s\n", pGD->modeIdent); -+ pGD->winSizeX = res_mode->xres; -+ pGD->winSizeY = res_mode->yres; -+ pGD->plnSizeX = res_mode->xres; -+ pGD->plnSizeY = res_mode->yres; -+ switch (bits_per_pixel) { -+ case 8: -+ pGD->gdfBytesPP = 1; -+ pGD->gdfIndex = GDF__8BIT_INDEX; -+ break; -+ case 15: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_15BIT_555RGB; -+ break; -+ case 16: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ break; -+ case 24: -+ pGD->gdfBytesPP = 3; -+ pGD->gdfIndex = GDF_24BIT_888RGB; -+ break; -+ } -+ -+#if 0 -+ pGD->isaBase = CFG_ISA_IO; -+ pGD->pciBase = pci_mem_base; -+ pGD->dprBase = (pci_mem_base + 0x400000 + 0x8000); -+ pGD->vprBase = (pci_mem_base + 0x400000 + 0xc000); -+ pGD->cprBase = (pci_mem_base + 0x400000 + 0xe000); -+#endif -+ pGD->frameAdrs = LCD_VIDEO_ADDR; -+ pGD->memSize = VIDEO_MEM_SIZE; -+ -+ lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1; -+ lcd->LCDSADDR2 = (LCD_VIDEO_ADDR + 0x4b000) >> 1; -+ lcd->LCDSADDR3 = 0x000000f0; -+ -+ lcd->LCDCON1 = 0x00000479; -+ lcd->LCDCON2 = 0x014fc183; -+ lcd->LCDCON3 = 0x0060ef07; -+ lcd->LCDCON4 = 0x00000003; -+ lcd->LCDCON5 = 0x00000b09; -+ lcd->LPCSEL = 0x00000cf0; -+ -+ pGD->winSizeX = pGD->plnSizeX = 240; -+ pGD->winSizeY = pGD->plnSizeY = 320; -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ -+ /* Enable Display */ -+ videoout = 2; /* Default output is CRT */ -+ if ((penv = getenv ("videoout")) != NULL) { -+ /* deceide if it is a string */ -+ videoout = (int) simple_strtoul (penv, NULL, 16); -+ } -+ -+ printf("clearing video memory\n"); -+ /* Clear video memory */ -+ i = pGD->memSize/4; -+ vm = (unsigned int *)pGD->frameAdrs; -+ while(i--) -+ *vm++ = 0; -+ -+ printf("returning from video_hw_init\n"); -+ return ((void*)&smi); -+} -+ -+void -+video_set_lut (unsigned int index, /* color number */ -+ unsigned char r, /* red */ -+ unsigned char g, /* green */ -+ unsigned char b /* blue */ -+ ) -+{ -+} -+ -+#endif /* CONFIG_VIDEO_S3C2410 */ -diff --git a/drivers/usbdcore_s3c2410.c b/drivers/usbdcore_s3c2410.c -new file mode 100644 -index 0000000..143fdf2 ---- /dev/null -+++ b/drivers/usbdcore_s3c2410.c -@@ -0,0 +1,1609 @@ -+/* -+ * (C) Copyright 2003 -+ * Gerry Hamel, geh@ti.com, Texas Instruments -+ * -+ * Based on -+ * linux/drivers/usb/device/bi/omap.c -+ * TI OMAP1510 USB bus interface driver -+ * -+ * Author: MontaVista Software, Inc. -+ * source@mvista.com -+ * (C) Copyright 2002 -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#include -+ -+#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) -+ -+#include -+ -+#include "usbdcore.h" -+#include "usbdcore_s3c2410.h" -+#include "usbdcore_ep0.h" -+ -+ -+#define UDC_INIT_MDELAY 80 /* Device settle delay */ -+#define UDC_MAX_ENDPOINTS 31 /* Number of endpoints on this UDC */ -+ -+/* Some kind of debugging output... */ -+#if 1 -+#define UDCDBG(str) -+#define UDCDBGA(fmt,args...) -+#else /* The bugs still exists... */ -+#define UDCDBG(str) serial_printf("[%s] %s:%d: " str "\n", __FILE__,__FUNCTION__,__LINE__) -+#define UDCDBGA(fmt,args...) serial_printf("[%s] %s:%d: " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##args) -+#endif -+ -+#if 1 -+#define UDCREG(name) -+#define UDCREGL(name) -+#else /* The bugs still exists... */ -+#define UDCREG(name) serial_printf("%s():%d: %s[%08x]=%.4x\n",__FUNCTION__,__LINE__, (#name), name, inw(name)) /* For 16-bit regs */ -+#define UDCREGL(name) serial_printf("%s():%d: %s[%08x]=%.8x\n",__FUNCTION__,__LINE__, (#name), name, inl(name)) /* For 32-bit regs */ -+#endif -+ -+ -+static struct urb *ep0_urb = NULL; -+ -+static struct usb_device_instance *udc_device; /* Used in interrupt handler */ -+static u16 udc_devstat = 0; /* UDC status (DEVSTAT) */ -+static u32 udc_interrupts = 0; -+ -+static void udc_stall_ep (unsigned int ep_addr); -+ -+ -+static struct usb_endpoint_instance *s3c2410_find_ep (int ep) -+{ -+ int i; -+ -+ for (i = 0; i < udc_device->bus->max_endpoints; i++) { -+ if (udc_device->bus->endpoint_array[i].endpoint_address == ep) -+ return &udc_device->bus->endpoint_array[i]; -+ } -+ return NULL; -+} -+ -+/* ************************************************************************** */ -+/* IO -+ */ -+ -+/* -+ * omap1510_prepare_endpoint_for_rx -+ * -+ * This function implements TRM Figure 14-11. -+ * -+ * The endpoint to prepare for transfer is specified as a physical endpoint -+ * number. For OUT (rx) endpoints 1 through 15, the corresponding endpoint -+ * configuration register is checked to see if the endpoint is ISO or not. -+ * If the OUT endpoint is valid and is non-ISO then its FIFO is enabled. -+ * No action is taken for endpoint 0 or for IN (tx) endpoints 16 through 30. -+ */ -+static void omap1510_prepare_endpoint_for_rx (int ep_addr) -+{ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("omap1510_prepare_endpoint %x", ep_addr); -+ if (((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)) { -+ if ((inw (UDC_EP_RX (ep_num)) & -+ (UDC_EPn_RX_Valid | UDC_EPn_RX_Iso)) == -+ UDC_EPn_RX_Valid) { -+ /* rx endpoint is valid, non-ISO, so enable its FIFO */ -+ outw (UDC_EP_Sel | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ outw (0, UDC_EP_NUM); -+ } -+ } -+} -+ -+/* omap1510_configure_endpoints -+ * -+ * This function implements TRM Figure 14-10. -+ */ -+static void omap1510_configure_endpoints (struct usb_device_instance *device) -+{ -+ int ep; -+ struct usb_bus_instance *bus; -+ struct usb_endpoint_instance *endpoint; -+ unsigned short ep_ptr; -+ unsigned short ep_size; -+ unsigned short ep_isoc; -+ unsigned short ep_doublebuffer; -+ int ep_addr; -+ int packet_size; -+ int buffer_size; -+ int attributes; -+ -+ bus = device->bus; -+ -+ /* There is a dedicated 2048 byte buffer for USB packets that may be -+ * arbitrarily partitioned among the endpoints on 8-byte boundaries. -+ * The first 8 bytes are reserved for receiving setup packets on -+ * endpoint 0. -+ */ -+ ep_ptr = 8; /* reserve the first 8 bytes for the setup fifo */ -+ -+ for (ep = 0; ep < bus->max_endpoints; ep++) { -+ endpoint = bus->endpoint_array + ep; -+ ep_addr = endpoint->endpoint_address; -+ if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* IN endpoint */ -+ packet_size = endpoint->tx_packetSize; -+ attributes = endpoint->tx_attributes; -+ } else { -+ /* OUT endpoint */ -+ packet_size = endpoint->rcv_packetSize; -+ attributes = endpoint->rcv_attributes; -+ } -+ -+ switch (packet_size) { -+ case 0: -+ ep_size = 0; -+ break; -+ case 8: -+ ep_size = 0; -+ break; -+ case 16: -+ ep_size = 1; -+ break; -+ case 32: -+ ep_size = 2; -+ break; -+ case 64: -+ ep_size = 3; -+ break; -+ case 128: -+ ep_size = 4; -+ break; -+ case 256: -+ ep_size = 5; -+ break; -+ case 512: -+ ep_size = 6; -+ break; -+ default: -+ UDCDBGA ("ep 0x%02x has bad packet size %d", -+ ep_addr, packet_size); -+ packet_size = 0; -+ ep_size = 0; -+ break; -+ } -+ -+ switch (attributes & USB_ENDPOINT_XFERTYPE_MASK) { -+ case USB_ENDPOINT_XFER_CONTROL: -+ case USB_ENDPOINT_XFER_BULK: -+ case USB_ENDPOINT_XFER_INT: -+ default: -+ /* A non-isochronous endpoint may optionally be -+ * double-buffered. For now we disable -+ * double-buffering. -+ */ -+ ep_doublebuffer = 0; -+ ep_isoc = 0; -+ if (packet_size > 64) -+ packet_size = 0; -+ if (!ep || !ep_doublebuffer) -+ buffer_size = packet_size; -+ else -+ buffer_size = packet_size * 2; -+ break; -+ case USB_ENDPOINT_XFER_ISOC: -+ /* Isochronous endpoints are always double- -+ * buffered, but the double-buffering bit -+ * in the endpoint configuration register -+ * becomes the msb of the endpoint size so we -+ * set the double-buffering flag to zero. -+ */ -+ ep_doublebuffer = 0; -+ ep_isoc = 1; -+ buffer_size = packet_size * 2; -+ break; -+ } -+ -+ /* check to see if our packet buffer RAM is exhausted */ -+ if ((ep_ptr + buffer_size) > 2048) { -+ UDCDBGA ("out of packet RAM for ep 0x%02x buf size %d", ep_addr, buffer_size); -+ buffer_size = packet_size = 0; -+ } -+ -+ /* force a default configuration for endpoint 0 since it is -+ * always enabled -+ */ -+ if (!ep && ((packet_size < 8) || (packet_size > 64))) { -+ buffer_size = packet_size = 64; -+ ep_size = 3; -+ } -+ -+ if (!ep) { -+ /* configure endpoint 0 */ -+ outw ((ep_size << 12) | (ep_ptr >> 3), UDC_EP0); -+ /*UDCDBGA("ep 0 buffer offset 0x%03x packet size 0x%03x", */ -+ /* ep_ptr, packet_size); */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* IN endpoint */ -+ if (packet_size) { -+ outw ((1 << 15) | (ep_doublebuffer << 14) | -+ (ep_size << 12) | (ep_isoc << 11) | -+ (ep_ptr >> 3), -+ UDC_EP_TX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ UDCDBGA ("IN ep %d buffer offset 0x%03x" -+ " packet size 0x%03x", -+ ep_addr & USB_ENDPOINT_NUMBER_MASK, -+ ep_ptr, packet_size); -+ } else { -+ outw (0, -+ UDC_EP_TX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ } -+ } else { -+ /* OUT endpoint */ -+ if (packet_size) { -+ outw ((1 << 15) | (ep_doublebuffer << 14) | -+ (ep_size << 12) | (ep_isoc << 11) | -+ (ep_ptr >> 3), -+ UDC_EP_RX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ UDCDBGA ("OUT ep %d buffer offset 0x%03x" -+ " packet size 0x%03x", -+ ep_addr & USB_ENDPOINT_NUMBER_MASK, -+ ep_ptr, packet_size); -+ } else { -+ outw (0, -+ UDC_EP_RX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ } -+ } -+ ep_ptr += buffer_size; -+ } -+} -+ -+static void s3c2410_deconfigure_device (void) -+{ -+ int epnum; -+ -+ UDCDBG ("clear Cfg_Lock"); -+ outw (inw (UDC_SYSCON1) & ~UDC_Cfg_Lock, UDC_SYSCON1); -+ UDCREG (UDC_SYSCON1); -+ -+ /* deconfigure all endpoints */ -+ for (epnum = 1; epnum <= 15; epnum++) { -+ outw (0, UDC_EP_RX (epnum)); -+ outw (0, UDC_EP_TX (epnum)); -+ } -+} -+ -+static void s3c2410_configure_device (struct usb_device_instance *device) -+{ -+ u_int32_t tmp; -+ -+ s3c2410_configure_endpoints(device); -+ -+ /* disable EP0-4 SUBD interrupts ? */ -+ outw(0x00, S3C2410_UDC_USB_INT_EN_REG); -+ -+ /* UPLL already configured by board-level init code */ -+ -+ /* configure USB pads to device mode */ -+ tmp = inw(S3C2410_MISCCR); -+ tmp &= ~(S3C2410_MISCCR_USBHOST|S3C2410_MISCCR_USBSUSPND1); -+ outw(tmp, S3C2410_MISCCR); -+ -+ tmp = inb(S3C2410_CLKSLOW); -+ tmp &= ~S3C2410_CLKSLOW_USB_CLK_DISABLE; -+ outw(tmp, S3C2410_CLKSLOW); -+ -+ /* clear interrupt registers */ -+ inb(S3C2410_UDC_EP_INT_REG); -+ inb(S3C2410_UDC_USB_INT_REG); -+ -+ /* enable USB interrupts for RESET and SUSPEND/RESUME */ -+ outb(S3C2410_UDC_USBINT_RESET|S3C2410_UDC_USBINT_SUSPEND, -+ S3C2410_UDC_USB_INT_EN_REG); -+ -+} -+ -+/* omap1510_write_noniso_tx_fifo -+ * -+ * This function implements TRM Figure 14-30. -+ * -+ * If the endpoint has an active tx_urb, then the next packet of data from the -+ * URB is written to the tx FIFO. The total amount of data in the urb is given -+ * by urb->actual_length. The maximum amount of data that can be sent in any -+ * one packet is given by endpoint->tx_packetSize. The number of data bytes -+ * from this URB that have already been transmitted is given by endpoint->sent. -+ * endpoint->last is updated by this routine with the number of data bytes -+ * transmitted in this packet. -+ * -+ * In accordance with Figure 14-30, the EP_NUM register must already have been -+ * written with the value to select the appropriate tx FIFO before this routine -+ * is called. -+ */ -+static void omap1510_write_noniso_tx_fifo (struct usb_endpoint_instance -+ *endpoint) -+{ -+ struct urb *urb = endpoint->tx_urb; -+ -+ if (urb) { -+ unsigned int last, i; -+ -+ UDCDBGA ("urb->buffer %p, buffer_length %d, actual_length %d", -+ urb->buffer, urb->buffer_length, urb->actual_length); -+ if ((last = -+ MIN (urb->actual_length - endpoint->sent, -+ endpoint->tx_packetSize))) { -+ u8 *cp = urb->buffer + endpoint->sent; -+ -+ UDCDBGA ("endpoint->sent %d, tx_packetSize %d, last %d", endpoint->sent, endpoint->tx_packetSize, last); -+ -+ if (((u32) cp & 1) == 0) { /* word aligned? */ -+ outsw (UDC_DATA, cp, last >> 1); -+ } else { /* byte aligned. */ -+ for (i = 0; i < (last >> 1); i++) { -+ u16 w = ((u16) cp[2 * i + 1] << 8) | -+ (u16) cp[2 * i]; -+ outw (w, UDC_DATA); -+ } -+ } -+ if (last & 1) { -+ outb (*(cp + last - 1), UDC_DATA); -+ } -+ } -+ endpoint->last = last; -+ } -+} -+ -+/* omap1510_read_noniso_rx_fifo -+ * -+ * This function implements TRM Figure 14-28. -+ * -+ * If the endpoint has an active rcv_urb, then the next packet of data is read -+ * from the rcv FIFO and written to rcv_urb->buffer at offset -+ * rcv_urb->actual_length to append the packet data to the data from any -+ * previous packets for this transfer. We assume that there is sufficient room -+ * left in the buffer to hold an entire packet of data. -+ * -+ * The return value is the number of bytes read from the FIFO for this packet. -+ * -+ * In accordance with Figure 14-28, the EP_NUM register must already have been -+ * written with the value to select the appropriate rcv FIFO before this routine -+ * is called. -+ */ -+static int omap1510_read_noniso_rx_fifo (struct usb_endpoint_instance -+ *endpoint) -+{ -+ struct urb *urb = endpoint->rcv_urb; -+ int len = 0; -+ -+ if (urb) { -+ len = inw (UDC_RXFSTAT); -+ -+ if (len) { -+ unsigned char *cp = urb->buffer + urb->actual_length; -+ -+ insw (UDC_DATA, cp, len >> 1); -+ if (len & 1) -+ *(cp + len - 1) = inb (UDC_DATA); -+ } -+ } -+ return len; -+} -+ -+/* omap1510_prepare_for_control_write_status -+ * -+ * This function implements TRM Figure 14-17. -+ * -+ * We have to deal here with non-autodecoded control writes that haven't already -+ * been dealt with by ep0_recv_setup. The non-autodecoded standard control -+ * write requests are: set/clear endpoint feature, set configuration, set -+ * interface, and set descriptor. ep0_recv_setup handles set/clear requests for -+ * ENDPOINT_HALT by halting the endpoint for a set request and resetting the -+ * endpoint for a clear request. ep0_recv_setup returns an error for -+ * SET_DESCRIPTOR requests which causes them to be terminated with a stall by -+ * the setup handler. A SET_INTERFACE request is handled by ep0_recv_setup by -+ * generating a DEVICE_SET_INTERFACE event. This leaves only the -+ * SET_CONFIGURATION event for us to deal with here. -+ * -+ */ -+static void omap1510_prepare_for_control_write_status (struct urb *urb) -+{ -+ struct usb_device_request *request = &urb->device_request;; -+ -+ /* check for a SET_CONFIGURATION request */ -+ if (request->bRequest == USB_REQ_SET_CONFIGURATION) { -+ int configuration = le16_to_cpu (request->wValue) & 0xff; -+ unsigned short devstat = inw (UDC_DEVSTAT); -+ -+ if ((devstat & (UDC_ADD | UDC_CFG)) == UDC_ADD) { -+ /* device is currently in ADDRESSED state */ -+ if (configuration) { -+ /* Assume the specified non-zero configuration -+ * value is valid and switch to the CONFIGURED -+ * state. -+ */ -+ outw (UDC_Dev_Cfg, UDC_SYSCON2); -+ } -+ } else if ((devstat & UDC_CFG) == UDC_CFG) { -+ /* device is currently in CONFIGURED state */ -+ if (!configuration) { -+ /* Switch to ADDRESSED state. */ -+ outw (UDC_Clr_Cfg, UDC_SYSCON2); -+ } -+ } -+ } -+ -+ /* select EP0 tx FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ /* clear endpoint (no data bytes in status stage) */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ /* enable the EP0 tx FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the endpoint */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+} -+ -+/* udc_state_transition_up -+ * udc_state_transition_down -+ * -+ * Helper functions to implement device state changes. The device states and -+ * the events that transition between them are: -+ * -+ * STATE_ATTACHED -+ * || /\ -+ * \/ || -+ * DEVICE_HUB_CONFIGURED DEVICE_HUB_RESET -+ * || /\ -+ * \/ || -+ * STATE_POWERED -+ * || /\ -+ * \/ || -+ * DEVICE_RESET DEVICE_POWER_INTERRUPTION -+ * || /\ -+ * \/ || -+ * STATE_DEFAULT -+ * || /\ -+ * \/ || -+ * DEVICE_ADDRESS_ASSIGNED DEVICE_RESET -+ * || /\ -+ * \/ || -+ * STATE_ADDRESSED -+ * || /\ -+ * \/ || -+ * DEVICE_CONFIGURED DEVICE_DE_CONFIGURED -+ * || /\ -+ * \/ || -+ * STATE_CONFIGURED -+ * -+ * udc_state_transition_up transitions up (in the direction from STATE_ATTACHED -+ * to STATE_CONFIGURED) from the specified initial state to the specified final -+ * state, passing through each intermediate state on the way. If the initial -+ * state is at or above (i.e. nearer to STATE_CONFIGURED) the final state, then -+ * no state transitions will take place. -+ * -+ * udc_state_transition_down transitions down (in the direction from -+ * STATE_CONFIGURED to STATE_ATTACHED) from the specified initial state to the -+ * specified final state, passing through each intermediate state on the way. -+ * If the initial state is at or below (i.e. nearer to STATE_ATTACHED) the final -+ * state, then no state transitions will take place. -+ * -+ * These functions must only be called with interrupts disabled. -+ */ -+static void udc_state_transition_up (usb_device_state_t initial, -+ usb_device_state_t final) -+{ -+ if (initial < final) { -+ switch (initial) { -+ case STATE_ATTACHED: -+ usbd_device_event_irq (udc_device, -+ DEVICE_HUB_CONFIGURED, 0); -+ if (final == STATE_POWERED) -+ break; -+ case STATE_POWERED: -+ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); -+ if (final == STATE_DEFAULT) -+ break; -+ case STATE_DEFAULT: -+ usbd_device_event_irq (udc_device, -+ DEVICE_ADDRESS_ASSIGNED, 0); -+ if (final == STATE_ADDRESSED) -+ break; -+ case STATE_ADDRESSED: -+ usbd_device_event_irq (udc_device, DEVICE_CONFIGURED, -+ 0); -+ case STATE_CONFIGURED: -+ break; -+ default: -+ break; -+ } -+ } -+} -+ -+static void udc_state_transition_down (usb_device_state_t initial, -+ usb_device_state_t final) -+{ -+ if (initial > final) { -+ switch (initial) { -+ case STATE_CONFIGURED: -+ usbd_device_event_irq (udc_device, DEVICE_DE_CONFIGURED, 0); -+ if (final == STATE_ADDRESSED) -+ break; -+ case STATE_ADDRESSED: -+ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); -+ if (final == STATE_DEFAULT) -+ break; -+ case STATE_DEFAULT: -+ usbd_device_event_irq (udc_device, DEVICE_POWER_INTERRUPTION, 0); -+ if (final == STATE_POWERED) -+ break; -+ case STATE_POWERED: -+ usbd_device_event_irq (udc_device, DEVICE_HUB_RESET, 0); -+ case STATE_ATTACHED: -+ break; -+ default: -+ break; -+ } -+ } -+} -+ -+/* Handle all device state changes. -+ * This function implements TRM Figure 14-21. -+ */ -+static void omap1510_udc_state_changed (void) -+{ -+ u16 bits; -+ u16 devstat = inw (UDC_DEVSTAT); -+ -+ UDCDBGA ("state changed, devstat %x, old %x", devstat, udc_devstat); -+ -+ bits = devstat ^ udc_devstat; -+ if (bits) { -+ if (bits & UDC_ATT) { -+ if (devstat & UDC_ATT) { -+ UDCDBG ("device attached and powered"); -+ udc_state_transition_up (udc_device->device_state, STATE_POWERED); -+ } else { -+ UDCDBG ("device detached or unpowered"); -+ udc_state_transition_down (udc_device->device_state, STATE_ATTACHED); -+ } -+ } -+ if (bits & UDC_USB_Reset) { -+ if (devstat & UDC_USB_Reset) { -+ UDCDBG ("device reset in progess"); -+ udc_state_transition_down (udc_device->device_state, STATE_POWERED); -+ } else { -+ UDCDBG ("device reset completed"); -+ } -+ } -+ if (bits & UDC_DEF) { -+ if (devstat & UDC_DEF) { -+ UDCDBG ("device entering default state"); -+ udc_state_transition_up (udc_device->device_state, STATE_DEFAULT); -+ } else { -+ UDCDBG ("device leaving default state"); -+ udc_state_transition_down (udc_device->device_state, STATE_POWERED); -+ } -+ } -+ if (bits & UDC_SUS) { -+ if (devstat & UDC_SUS) { -+ UDCDBG ("entering suspended state"); -+ usbd_device_event_irq (udc_device, DEVICE_BUS_INACTIVE, 0); -+ } else { -+ UDCDBG ("leaving suspended state"); -+ usbd_device_event_irq (udc_device, DEVICE_BUS_ACTIVITY, 0); -+ } -+ } -+ if (bits & UDC_R_WK_OK) { -+ UDCDBGA ("remote wakeup %s", (devstat & UDC_R_WK_OK) -+ ? "enabled" : "disabled"); -+ } -+ if (bits & UDC_ADD) { -+ if (devstat & UDC_ADD) { -+ UDCDBG ("default -> addressed"); -+ udc_state_transition_up (udc_device->device_state, STATE_ADDRESSED); -+ } else { -+ UDCDBG ("addressed -> default"); -+ udc_state_transition_down (udc_device->device_state, STATE_DEFAULT); -+ } -+ } -+ if (bits & UDC_CFG) { -+ if (devstat & UDC_CFG) { -+ UDCDBG ("device configured"); -+ /* The ep0_recv_setup function generates the -+ * DEVICE_CONFIGURED event when a -+ * USB_REQ_SET_CONFIGURATION setup packet is -+ * received, so we should already be in the -+ * state STATE_CONFIGURED. -+ */ -+ udc_state_transition_up (udc_device->device_state, STATE_CONFIGURED); -+ } else { -+ UDCDBG ("device deconfigured"); -+ udc_state_transition_down (udc_device->device_state, STATE_ADDRESSED); -+ } -+ } -+ } -+ -+ /* Clear interrupt source */ -+ outw (UDC_DS_Chg, UDC_IRQ_SRC); -+ -+ /* Save current DEVSTAT */ -+ udc_devstat = devstat; -+} -+ -+static void s3c2410_udc_ep0(void) -+{ -+ u_int8_t ep0csr; -+ -+ UDCDBG("-> Entering EP0 handler"); -+ -+ S3C2410_UDC_SETIX(EP0); -+ ep0csr = inb(S3C2410_UDC_IN_CSR1_REG); -+ -+ /* clear stall status */ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SENTSTL) { -+ clear_sp0_sst; -+ /* FIXME */ -+ ep0_idle(); -+ } -+ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SE -+ && dev->ep0state != EP0_IDLE) { -+ clear_ep0_se; -+ ep0_idle(); -+ } -+ -+ switch (dev->ep0state) { -+ case EP0_IDLE: -+ if (ep0crs & S3C2410_UDC_EP0_CSR_OPKRDY) { -+ } -+ break; -+ case EP0_IN_DATA_PHASE: -+ break; -+ case EP0_OUT_DATA_PHASE: -+ break; -+ case EP0_END_XFER: -+ break; -+ case EP0_STALL: -+ set_ep0_ss; -+ break; -+ } -+} -+ -+ -+} -+ -+/* Handle SETUP USB interrupt. -+ * This function implements TRM Figure 14-14. -+ */ -+static void omap1510_udc_setup (struct usb_endpoint_instance *endpoint) -+{ -+ UDCDBG ("-> Entering device setup"); -+ -+ do { -+ const int setup_pktsize = 8; -+ unsigned char *datap = -+ (unsigned char *) &ep0_urb->device_request; -+ -+ /* Gain access to EP 0 setup FIFO */ -+ outw (UDC_Setup_Sel, UDC_EP_NUM); -+ -+ /* Read control request data */ -+ insb (UDC_DATA, datap, setup_pktsize); -+ -+ UDCDBGA ("EP0 setup read [%x %x %x %x %x %x %x %x]", -+ *(datap + 0), *(datap + 1), *(datap + 2), -+ *(datap + 3), *(datap + 4), *(datap + 5), -+ *(datap + 6), *(datap + 7)); -+ -+ /* Reset EP0 setup FIFO */ -+ outw (0, UDC_EP_NUM); -+ } while (inw (UDC_IRQ_SRC) & UDC_Setup); -+ -+ /* Try to process setup packet */ -+ if (ep0_recv_setup (ep0_urb)) { -+ /* Not a setup packet, stall next EP0 transaction */ -+ udc_stall_ep (0); -+ UDCDBG ("can't parse setup packet, still waiting for setup"); -+ return; -+ } -+ -+ /* Check direction */ -+ if ((ep0_urb->device_request.bmRequestType & USB_REQ_DIRECTION_MASK) -+ == USB_REQ_HOST2DEVICE) { -+ UDCDBG ("control write on EP0"); -+ if (le16_to_cpu (ep0_urb->device_request.wLength)) { -+ /* We don't support control write data stages. -+ * The only standard control write request with a data -+ * stage is SET_DESCRIPTOR, and ep0_recv_setup doesn't -+ * support that so we just stall those requests. A -+ * function driver might support a non-standard -+ * write request with a data stage, but it isn't -+ * obvious what we would do with the data if we read it -+ * so we'll just stall it. It seems like the API isn't -+ * quite right here. -+ */ -+#if 0 -+ /* Here is what we would do if we did support control -+ * write data stages. -+ */ -+ ep0_urb->actual_length = 0; -+ outw (0, UDC_EP_NUM); -+ /* enable the EP0 rx FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+#else -+ /* Stall this request */ -+ UDCDBG ("Stalling unsupported EP0 control write data " -+ "stage."); -+ udc_stall_ep (0); -+#endif -+ } else { -+ omap1510_prepare_for_control_write_status (ep0_urb); -+ } -+ } else { -+ UDCDBG ("control read on EP0"); -+ /* The ep0_recv_setup function has already placed our response -+ * packet data in ep0_urb->buffer and the packet length in -+ * ep0_urb->actual_length. -+ */ -+ endpoint->tx_urb = ep0_urb; -+ endpoint->sent = 0; -+ /* select the EP0 tx FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ /* Write packet data to the FIFO. omap1510_write_noniso_tx_fifo -+ * will update endpoint->last with the number of bytes written -+ * to the FIFO. -+ */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable the FIFO to start the packet transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the EP0 tx FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+ -+ UDCDBG ("<- Leaving device setup"); -+} -+ -+/* Handle endpoint 0 RX interrupt -+ * This routine implements TRM Figure 14-16. -+ */ -+static void omap1510_udc_ep0_rx (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short status; -+ -+ UDCDBG ("RX on EP0"); -+ /* select EP0 rx FIFO */ -+ outw (UDC_EP_Sel, UDC_EP_NUM); -+ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ /* Check direction */ -+ if ((ep0_urb->device_request.bmRequestType -+ & USB_REQ_DIRECTION_MASK) == USB_REQ_HOST2DEVICE) { -+ /* This rx interrupt must be for a control write data -+ * stage packet. -+ * -+ * We don't support control write data stages. -+ * We should never end up here. -+ */ -+ -+ /* clear the EP0 rx FIFO */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ -+ /* deselect the EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ -+ UDCDBG ("Stalling unexpected EP0 control write " -+ "data stage packet"); -+ udc_stall_ep (0); -+ } else { -+ /* This rx interrupt must be for a control read status -+ * stage packet. -+ */ -+ UDCDBG ("ACK on EP0 control read status stage packet"); -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBG ("EP0 stall during RX"); -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } else { -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } -+} -+ -+/* Handle endpoint 0 TX interrupt -+ * This routine implements TRM Figure 14-18. -+ */ -+static void omap1510_udc_ep0_tx (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short status; -+ struct usb_device_request *request = &ep0_urb->device_request; -+ -+ UDCDBG ("TX on EP0"); -+ /* select EP0 TX FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ -+ status = inw (UDC_STAT_FLG); -+ if (status & UDC_ACK) { -+ /* Check direction */ -+ if ((request->bmRequestType & USB_REQ_DIRECTION_MASK) == -+ USB_REQ_HOST2DEVICE) { -+ /* This tx interrupt must be for a control write status -+ * stage packet. -+ */ -+ UDCDBG ("ACK on EP0 control write status stage packet"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } else { -+ /* This tx interrupt must be for a control read data -+ * stage packet. -+ */ -+ int wLength = le16_to_cpu (request->wLength); -+ -+ /* Update our count of bytes sent so far in this -+ * transfer. -+ */ -+ endpoint->sent += endpoint->last; -+ -+ /* We are finished with this transfer if we have sent -+ * all of the bytes in our tx urb (urb->actual_length) -+ * unless we need a zero-length terminating packet. We -+ * need a zero-length terminating packet if we returned -+ * fewer bytes than were requested (wLength) by the host, -+ * and the number of bytes we returned is an exact -+ * multiple of the packet size endpoint->tx_packetSize. -+ */ -+ if ((endpoint->sent == ep0_urb->actual_length) -+ && ((ep0_urb->actual_length == wLength) -+ || (endpoint->last != -+ endpoint->tx_packetSize))) { -+ /* Done with control read data stage. */ -+ UDCDBG ("control read data stage complete"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ /* select EP0 RX FIFO to prepare for control -+ * read status stage. -+ */ -+ outw (UDC_EP_Sel, UDC_EP_NUM); -+ /* clear the EP0 RX FIFO */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ /* enable the EP0 RX FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the EP0 RX FIFO */ -+ outw (0, UDC_EP_NUM); -+ } else { -+ /* We still have another packet of data to send -+ * in this control read data stage or else we -+ * need a zero-length terminating packet. -+ */ -+ UDCDBG ("ACK control read data stage packet"); -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable the EP0 tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBG ("EP0 stall during TX"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } else { -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+} -+ -+/* Handle RX transaction on non-ISO endpoint. -+ * This function implements TRM Figure 14-27. -+ * The ep argument is a physical endpoint number for a non-ISO OUT endpoint -+ * in the range 1 to 15. -+ */ -+static void omap1510_udc_epn_rx (int ep) -+{ -+ unsigned short status; -+ -+ /* Check endpoint status */ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ int nbytes; -+ struct usb_endpoint_instance *endpoint = -+ omap1510_find_ep (ep); -+ -+ nbytes = omap1510_read_noniso_rx_fifo (endpoint); -+ usbd_rcv_complete (endpoint, nbytes, 0); -+ -+ /* enable rx FIFO to prepare for next packet */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } else if (status & UDC_STALL) { -+ UDCDBGA ("STALL on RX endpoint %d", ep); -+ } else if (status & UDC_NAK) { -+ UDCDBGA ("NAK on RX ep %d", ep); -+ } else { -+ serial_printf ("omap-bi: RX on ep %d with status %x", ep, -+ status); -+ } -+} -+ -+/* Handle TX transaction on non-ISO endpoint. -+ * This function implements TRM Figure 14-29. -+ * The ep argument is a physical endpoint number for a non-ISO IN endpoint -+ * in the range 16 to 30. -+ */ -+static void omap1510_udc_epn_tx (int ep) -+{ -+ unsigned short status; -+ -+ /*serial_printf("omap1510_udc_epn_tx( %x )\n",ep); */ -+ -+ /* Check endpoint status */ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ struct usb_endpoint_instance *endpoint = -+ omap1510_find_ep (ep); -+ -+ /* We need to transmit a terminating zero-length packet now if -+ * we have sent all of the data in this URB and the transfer -+ * size was an exact multiple of the packet size. -+ */ -+ if (endpoint->tx_urb -+ && (endpoint->last == endpoint->tx_packetSize) -+ && (endpoint->tx_urb->actual_length - endpoint->sent - -+ endpoint->last == 0)) { -+ /* Prepare to transmit a zero-length packet. */ -+ endpoint->sent += endpoint->last; -+ /* write 0 bytes of data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } else if (endpoint->tx_urb -+ && endpoint->tx_urb->actual_length) { -+ /* retire the data that was just sent */ -+ usbd_tx_complete (endpoint); -+ /* Check to see if we have more data ready to transmit -+ * now. -+ */ -+ if (endpoint->tx_urb -+ && endpoint->tx_urb->actual_length) { -+ /* write data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBGA ("STALL on TX endpoint %d", ep); -+ } else if (status & UDC_NAK) { -+ UDCDBGA ("NAK on TX endpoint %d", ep); -+ } else { -+ /*serial_printf("omap-bi: TX on ep %d with status %x\n", ep, status); */ -+ } -+} -+ -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+/* Handle general USB interrupts and dispatch according to type. -+ * This function implements TRM Figure 14-13. -+ */ -+void s3c2410_udc_irq (void) -+{ -+ u_int8_t save_idx = inb(S3C2410_UDC_INDEX_REG); -+ u_int8_t usb_status = inb(S3C2410_UDC_USB_INT_REG); -+ u_int8_t usbd_status = inb(S3C2410_UDC_EP_INT_REG); -+ -+ UDCDBGA("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status, -+ usbd_status); -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESET) { -+ valid_irq++; -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESUME) { -+ valid_irq++; -+ -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_SUSPEND) { -+ valid_irq++; -+ -+ } -+ -+ /* Endpoint Interrupts */ -+ if (usbd_status) { -+ int i; -+ -+ if (usbd_status & S3C2410_UDC_INT_EP0) { -+ s3c2410_udc_ep0(); -+ outb(S3C2410_UDC_INT_EP0, S3C2410_UDC_EP_INT_REG); -+ valid_irq++; -+ } -+ -+ for (i = 1; i < 5; i++) { -+ u_int32_t tmp = 1 << i; -+ -+ if (usbd_status & tmp) { -+ /* FIXME: Handle EP X */ -+ s3c2410_udc_epn(i); -+ outb(tmp, S3C2410_UDC_EP_INT_REG); -+ valid_irq++; -+ } -+ } -+ } -+ outb(save_idx, S3C2410_UDC_INDEX_REG); -+ -+#if 0 -+ if (!(irq_src & ~UDC_SOF_Flg)) /* ignore SOF interrupts ) */ -+ return; -+ -+ UDCDBGA ("< IRQ #%d start >- %x", udc_interrupts, irq_src); -+ /*serial_printf("< IRQ #%d start >- %x\n", udc_interrupts, irq_src); */ -+ -+ if (irq_src & UDC_DS_Chg) { -+ /* Device status changed */ -+ omap1510_udc_state_changed (); -+ valid_irq++; -+ } -+ if (irq_src & UDC_EP0_RX) { -+ /* Endpoint 0 receive */ -+ outw (UDC_EP0_RX, UDC_IRQ_SRC); /* ack interrupt */ -+ omap1510_udc_ep0_rx (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ if (irq_src & UDC_EP0_TX) { -+ /* Endpoint 0 transmit */ -+ outw (UDC_EP0_TX, UDC_IRQ_SRC); /* ack interrupt */ -+ omap1510_udc_ep0_tx (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ if (irq_src & UDC_Setup) { -+ /* Device setup */ -+ omap1510_udc_setup (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ /*if (!valid_irq) */ -+ /* serial_printf("unknown interrupt, IRQ_SRC %.4x\n", irq_src); */ -+#endif -+ UDCDBGA ("< IRQ end >", udc_interrupts); -+ -+ udc_interrupts++; -+} -+ -+/* This function implements TRM Figure 14-26. */ -+void omap1510_udc_noniso_irq (void) -+{ -+ unsigned short epnum; -+ unsigned short irq_src = inw (UDC_IRQ_SRC); -+ int valid_irq = 0; -+ -+ if (!(irq_src & (UDC_EPn_RX | UDC_EPn_TX))) -+ return; -+ -+ UDCDBGA ("non-ISO IRQ, IRQ_SRC %x", inw (UDC_IRQ_SRC)); -+ -+ if (irq_src & UDC_EPn_RX) { /* Endpoint N OUT transaction */ -+ /* Determine the endpoint number for this interrupt */ -+ epnum = (inw (UDC_EPN_STAT) & 0x0f00) >> 8; -+ UDCDBGA ("RX on ep %x", epnum); -+ -+ /* acknowledge interrupt */ -+ outw (UDC_EPn_RX, UDC_IRQ_SRC); -+ -+ if (epnum) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | epnum, UDC_EP_NUM); -+ -+ omap1510_udc_epn_rx (epnum); -+ -+ /* deselect the endpoint FIFO */ -+ outw (epnum, UDC_EP_NUM); -+ } -+ valid_irq++; -+ } -+ if (irq_src & UDC_EPn_TX) { /* Endpoint N IN transaction */ -+ /* Determine the endpoint number for this interrupt */ -+ epnum = (inw (UDC_EPN_STAT) & 0x000f) | USB_DIR_IN; -+ UDCDBGA ("TX on ep %x", epnum); -+ -+ /* acknowledge interrupt */ -+ outw (UDC_EPn_TX, UDC_IRQ_SRC); -+ -+ if (epnum) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | epnum, UDC_EP_NUM); -+ -+ omap1510_udc_epn_tx (epnum); -+ -+ /* deselect the endpoint FIFO */ -+ outw (UDC_EP_Dir | epnum, UDC_EP_NUM); -+ } -+ valid_irq++; -+ } -+ if (!valid_irq) -+ serial_printf (": unknown non-ISO interrupt, IRQ_SRC %.4x\n", -+ irq_src); -+} -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+ -+/* -+ * Start of public functions. -+ */ -+ -+/* Called to start packet transmission. */ -+void udc_endpoint_write (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short epnum = -+ endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("Starting transmit on ep %x", epnum); -+ -+ if (endpoint->tx_urb) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | epnum, UDC_EP_NUM); -+ /* write data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the endpoint FIFO */ -+ outw (UDC_EP_Dir | epnum, UDC_EP_NUM); -+ } -+} -+ -+/* Start to initialize h/w stuff */ -+int udc_init (void) -+{ -+ u16 udc_rev; -+ uchar value; -+ ulong gpio; -+ int i; -+ -+ /* Let the device settle down before we start */ -+ for (i = 0; i < UDC_INIT_MDELAY; i++) udelay(1000); -+ -+ udc_device = NULL; -+ -+ UDCDBG ("starting"); -+ -+ /* Check peripheral reset. Must be 1 to make sure -+ MPU TIPB peripheral reset is inactive */ -+ UDCREG (ARM_RSTCT2); -+ -+ /* Set and check clock control. -+ * We might ought to be using the clock control API to do -+ * this instead of fiddling with the clock registers directly -+ * here. -+ */ -+ outw ((1 << 4) | (1 << 5), CLOCK_CTRL); -+ UDCREG (CLOCK_CTRL); -+ /* Set and check APLL */ -+ outw (0x0008, APLL_CTRL); -+ UDCREG (APLL_CTRL); -+ /* Set and check DPLL */ -+ outw (0x2210, DPLL_CTRL); -+ UDCREG (DPLL_CTRL); -+ /* Set and check SOFT */ -+ outw ((1 << 4) | (1 << 3) | 1, SOFT_REQ); -+ /* Short delay to wait for DPLL */ -+ udelay (1000); -+ -+ /* Print banner with device revision */ -+ udc_rev = inw (UDC_REV) & 0xff; -+ printf ("USB: TI OMAP1510 USB function module rev %d.%d\n", -+ udc_rev >> 4, udc_rev & 0xf); -+ -+#ifdef CONFIG_OMAP_SX1 -+ i2c_read (0x32, 0x04, 1, &value, 1); -+ value |= 0x04; -+ i2c_write (0x32, 0x04, 1, &value, 1); -+ -+ i2c_read (0x32, 0x03, 1, &value, 1); -+ value |= 0x01; -+ i2c_write (0x32, 0x03, 1, &value, 1); -+ -+ gpio = inl(GPIO_PIN_CONTROL_REG); -+ gpio |= 0x0002; /* A_IRDA_OFF */ -+ gpio |= 0x0800; /* A_SWITCH */ -+ gpio |= 0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_PIN_CONTROL_REG); -+ -+ gpio = inl(GPIO_DIR_CONTROL_REG); -+ gpio &= ~0x0002; /* A_IRDA_OFF */ -+ gpio &= ~0x0800; /* A_SWITCH */ -+ gpio &= ~0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_DIR_CONTROL_REG); -+ -+ gpio = inl(GPIO_DATA_OUTPUT_REG); -+ gpio |= 0x0002; /* A_IRDA_OFF */ -+ gpio &= ~0x0800; /* A_SWITCH */ -+ gpio &= ~0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_DATA_OUTPUT_REG); -+#endif -+ -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_MODE, FUNC_MUX_CTRL_0); -+ outl (inl (FUNC_MUX_CTRL_0) & ~UDC_VBUS_CTRL, FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+ -+ /* -+ * At this point, device is ready for configuration... -+ */ -+ -+ UDCDBG ("disable USB interrupts"); -+ outw (0, UDC_IRQ_EN); -+ UDCREG (UDC_IRQ_EN); -+ -+ UDCDBG ("disable USB DMA"); -+ outw (0, UDC_DMA_IRQ_EN); -+ UDCREG (UDC_DMA_IRQ_EN); -+ -+ UDCDBG ("initialize SYSCON1"); -+ outw (UDC_Self_Pwr | UDC_Pullup_En, UDC_SYSCON1); -+ UDCREG (UDC_SYSCON1); -+ -+ return 0; -+} -+ -+/* Stall endpoint */ -+static void udc_stall_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("stall ep_addr %d", ep_addr); -+ -+ /* REVISIT? -+ * The OMAP TRM section 14.2.4.2 says we must check that the FIFO -+ * is empty before halting the endpoint. The current implementation -+ * doesn't check that the FIFO is empty. -+ */ -+ -+ if (!ep_num) { -+ outw (UDC_Stall_Cmd, UDC_SYSCON2); -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) { -+ if (inw (UDC_EP_RX (ep_num)) & UDC_EPn_RX_Valid) { -+ /* we have a valid rx endpoint, so halt it */ -+ outw (UDC_EP_Sel | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_Halt, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ } -+ } else { -+ if (inw (UDC_EP_TX (ep_num)) & UDC_EPn_TX_Valid) { -+ /* we have a valid tx endpoint, so halt it */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_Halt, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ } -+ } -+} -+ -+/* Reset endpoint */ -+#if 0 -+static void udc_reset_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("reset ep_addr %d", ep_addr); -+ -+ if (!ep_num) { -+ /* control endpoint 0 can't be reset */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) { -+ UDCDBGA ("UDC_EP_RX(%d) = 0x%04x", ep_num, -+ inw (UDC_EP_RX (ep_num))); -+ if (inw (UDC_EP_RX (ep_num)) & UDC_EPn_RX_Valid) { -+ /* we have a valid rx endpoint, so reset it */ -+ outw (ep_num | UDC_EP_Sel, UDC_EP_NUM); -+ outw (UDC_Reset_EP, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ UDCDBGA ("OUT endpoint %d reset", ep_num); -+ } -+ } else { -+ UDCDBGA ("UDC_EP_TX(%d) = 0x%04x", ep_num, -+ inw (UDC_EP_TX (ep_num))); -+ /* Resetting of tx endpoints seems to be causing the USB function -+ * module to fail, which causes problems when the driver is -+ * uninstalled. We'll skip resetting tx endpoints for now until -+ * we figure out what the problem is. -+ */ -+#if 0 -+ if (inw (UDC_EP_TX (ep_num)) & UDC_EPn_TX_Valid) { -+ /* we have a valid tx endpoint, so reset it */ -+ outw (ep_num | UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ outw (UDC_Reset_EP, UDC_CTRL); -+ outw (ep_num | UDC_EP_Dir, UDC_EP_NUM); -+ UDCDBGA ("IN endpoint %d reset", ep_num); -+ } -+#endif -+ } -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_check_ep - check logical endpoint -+ * -+ * Return physical endpoint number to use for this logical endpoint or zero if not valid. -+ */ -+#if 0 -+int udc_check_ep (int logical_endpoint, int packetsize) -+{ -+ if ((logical_endpoint == 0x80) || -+ ((logical_endpoint & 0x8f) != logical_endpoint)) { -+ return 0; -+ } -+ -+ switch (packetsize) { -+ case 8: -+ case 16: -+ case 32: -+ case 64: -+ case 128: -+ case 256: -+ case 512: -+ break; -+ default: -+ return 0; -+ } -+ -+ return EP_ADDR_TO_PHYS_EP (logical_endpoint); -+} -+#endif -+ -+/* -+ * udc_setup_ep - setup endpoint -+ * -+ * Associate a physical endpoint with endpoint_instance -+ */ -+void udc_setup_ep (struct usb_device_instance *device, -+ unsigned int ep, struct usb_endpoint_instance *endpoint) -+{ -+ UDCDBGA ("setting up endpoint addr %x", endpoint->endpoint_address); -+ -+ /* This routine gets called by bi_modinit for endpoint 0 and from -+ * bi_config for all of the other endpoints. bi_config gets called -+ * during the DEVICE_CREATE, DEVICE_CONFIGURED, and -+ * DEVICE_SET_INTERFACE events. We need to reconfigure the OMAP packet -+ * RAM after bi_config scans the selected device configuration and -+ * initializes the endpoint structures, but before this routine enables -+ * the OUT endpoint FIFOs. Since bi_config calls this routine in a -+ * loop for endpoints 1 through UDC_MAX_ENDPOINTS, we reconfigure our -+ * packet RAM here when ep==1. -+ * I really hate to do this here, but it seems like the API exported -+ * by the USB bus interface controller driver to the usbd-bi module -+ * isn't quite right so there is no good place to do this. -+ */ -+ if (ep == 1) { -+ omap1510_deconfigure_device (); -+ omap1510_configure_device (device); -+ } -+ -+ if (endpoint && (ep < UDC_MAX_ENDPOINTS)) { -+ int ep_addr = endpoint->endpoint_address; -+ -+ if (!ep_addr) { -+ /* nothing to do for endpoint 0 */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* nothing to do for IN (tx) endpoints */ -+ } else { /* OUT (rx) endpoint */ -+ if (endpoint->rcv_packetSize) { -+ /*struct urb* urb = &(urb_out_array[ep&0xFF]); */ -+ /*urb->endpoint = endpoint; */ -+ /*urb->device = device; */ -+ /*urb->buffer_length = sizeof(urb->buffer); */ -+ -+ /*endpoint->rcv_urb = urb; */ -+ omap1510_prepare_endpoint_for_rx (ep_addr); -+ } -+ } -+ } -+} -+ -+/** -+ * udc_disable_ep - disable endpoint -+ * @ep: -+ * -+ * Disable specified endpoint -+ */ -+#if 0 -+void udc_disable_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ struct usb_endpoint_instance *endpoint = omap1510_find_ep (ep_addr); /*udc_device->bus->endpoint_array + ep; */ -+ -+ UDCDBGA ("disable ep_addr %d", ep_addr); -+ -+ if (!ep_num) { -+ /* nothing to do for endpoint 0 */ ; -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ if (endpoint->tx_packetSize) { -+ /* we have a valid tx endpoint */ -+ /*usbd_flush_tx(endpoint); */ -+ endpoint->tx_urb = NULL; -+ } -+ } else { -+ if (endpoint->rcv_packetSize) { -+ /* we have a valid rx endpoint */ -+ /*usbd_flush_rcv(endpoint); */ -+ endpoint->rcv_urb = NULL; -+ } -+ } -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_connected - is the USB cable connected -+ * -+ * Return non-zero if cable is connected. -+ */ -+#if 0 -+int udc_connected (void) -+{ -+ return ((inw (UDC_DEVSTAT) & UDC_ATT) == UDC_ATT); -+} -+#endif -+ -+/* Turn on the USB connection by enabling the pullup resistor */ -+void udc_connect (void) -+{ -+ UDCDBG ("connect, enable Pullup"); -+} -+ -+/* Turn off the USB connection by disabling the pullup resistor */ -+void udc_disconnect (void) -+{ -+ UDCDBG ("disconnect, disable Pullup"); -+} -+ -+/* ************************************************************************** */ -+ -+ -+/* -+ * udc_disable_interrupts - disable interrupts -+ * switch off interrupts -+ */ -+#if 0 -+void udc_disable_interrupts (struct usb_device_instance *device) -+{ -+ UDCDBG ("disabling all interrupts"); -+ outw (0, UDC_IRQ_EN); -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_ep0_packetsize - return ep0 packetsize -+ */ -+#if 0 -+int udc_ep0_packetsize (void) -+{ -+ return EP0_PACKETSIZE; -+} -+#endif -+ -+/* Switch on the UDC */ -+void udc_enable (struct usb_device_instance *device) -+{ -+ UDCDBGA ("enable device %p, status %d", device, device->status); -+ -+ /* initialize driver state variables */ -+ udc_devstat = 0; -+ -+ /* Save the device structure pointer */ -+ udc_device = device; -+ -+ /* Setup ep0 urb */ -+ if (!ep0_urb) { -+ ep0_urb = -+ usbd_alloc_urb (udc_device, -+ udc_device->bus->endpoint_array); -+ } else { -+ serial_printf ("udc_enable: ep0_urb already allocated %p\n", -+ ep0_urb); -+ } -+ -+#ifdef FIXME -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_CTRL | UDC_VBUS_MODE, -+ FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+#endif -+ -+ s3c2410_configure_device(device); -+} -+ -+/* Switch off the UDC */ -+void udc_disable (void) -+{ -+ UDCDBG ("disable UDC"); -+ -+ s3c2410_deconfigure_device(); -+ -+#ifdef FIXME -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_MODE, FUNC_MUX_CTRL_0); -+ outl (inl (FUNC_MUX_CTRL_0) & ~UDC_VBUS_CTRL, FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+#endif -+ -+ /* Free ep0 URB */ -+ if (ep0_urb) { -+ /*usbd_dealloc_urb(ep0_urb); */ -+ ep0_urb = NULL; -+ } -+ -+ /* Reset device pointer. -+ * We ought to do this here to balance the initialization of udc_device -+ * in udc_enable, but some of our other exported functions get called -+ * by the bus interface driver after udc_disable, so we have to hang on -+ * to the device pointer to avoid a null pointer dereference. */ -+ /* udc_device = NULL; */ -+} -+ -+/** -+ * udc_startup - allow udc code to do any additional startup -+ */ -+void udc_startup_events (struct usb_device_instance *device) -+{ -+ /* The DEVICE_INIT event puts the USB device in the state STATE_INIT. */ -+ usbd_device_event_irq (device, DEVICE_INIT, 0); -+ -+ /* The DEVICE_CREATE event puts the USB device in the state -+ * STATE_ATTACHED. -+ */ -+ usbd_device_event_irq (device, DEVICE_CREATE, 0); -+ -+ /* Some USB controller driver implementations signal -+ * DEVICE_HUB_CONFIGURED and DEVICE_RESET events here. -+ * DEVICE_HUB_CONFIGURED causes a transition to the state STATE_POWERED, -+ * and DEVICE_RESET causes a transition to the state STATE_DEFAULT. -+ * The OMAP USB client controller has the capability to detect when the -+ * USB cable is connected to a powered USB bus via the ATT bit in the -+ * DEVSTAT register, so we will defer the DEVICE_HUB_CONFIGURED and -+ * DEVICE_RESET events until later. -+ */ -+ -+ udc_enable (device); -+} -+ -+#endif -diff --git a/examples/Makefile b/examples/Makefile -index a342d75..082e52e 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -60,7 +60,7 @@ endif - include $(TOPDIR)/config.mk - - SREC = hello_world.srec --BIN = hello_world.bin hello_world -+BIN = hello_world hello_world.bin - - ifeq ($(CPU),mpc8xx) - SREC = test_burst.srec -@@ -122,7 +122,7 @@ clibdir := $(shell dirname `$(CC) $(CFLA - - CPPFLAGS += -I.. - --all: .depend $(OBJS) $(LIB) $(SREC) $(BIN) -+all: .depend $(OBJS) $(LIB) $(BIN) $(SREC) - - ######################################################################### - $(LIB): .depend $(LIBOBJS) -diff --git a/include/asm-arm/arch-s3c24x0/mmc.h b/include/asm-arm/arch-s3c24x0/mmc.h -new file mode 100644 -index 0000000..d9178f3 ---- /dev/null -+++ b/include/asm-arm/arch-s3c24x0/mmc.h -@@ -0,0 +1,112 @@ -+/* -+ * linux/drivers/mmc/mmc_pxa.h -+ * -+ * Author: Vladimir Shebordaev, Igor Oblakov -+ * Copyright: MontaVista Software Inc. -+ * -+ * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $ -+ * -+ * 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. -+ */ -+#ifndef __MMC_PXA_P_H__ -+#define __MMC_PXA_P_H__ -+ -+#include -+ -+#define MMC_DEFAULT_RCA (1<<16) -+ -+#define MMC_BLOCK_SIZE 512 -+#define MMC_CMD_RESET 0 -+#define MMC_CMD_SEND_OP_COND 1 -+#define MMC_CMD_ALL_SEND_CID 2 -+#define MMC_CMD_SET_RCA 3 -+#define MMC_CMD_SELECT_CARD 7 -+#define MMC_CMD_SEND_CSD 9 -+#define MMC_CMD_SEND_CID 10 -+#define MMC_CMD_SEND_STATUS 13 -+#define MMC_CMD_SET_BLOCKLEN 16 -+#define MMC_CMD_READ_BLOCK 17 -+#define MMC_CMD_RD_BLK_MULTI 18 -+#define MMC_CMD_WRITE_BLOCK 24 -+ -+#define MMC_MAX_BLOCK_SIZE 512 -+ -+#define MMC_R1_IDLE_STATE 0x01 -+#define MMC_R1_ERASE_STATE 0x02 -+#define MMC_R1_ILLEGAL_CMD 0x04 -+#define MMC_R1_COM_CRC_ERR 0x08 -+#define MMC_R1_ERASE_SEQ_ERR 0x01 -+#define MMC_R1_ADDR_ERR 0x02 -+#define MMC_R1_PARAM_ERR 0x04 -+ -+#define MMC_R1B_WP_ERASE_SKIP 0x0002 -+#define MMC_R1B_ERR 0x0004 -+#define MMC_R1B_CC_ERR 0x0008 -+#define MMC_R1B_CARD_ECC_ERR 0x0010 -+#define MMC_R1B_WP_VIOLATION 0x0020 -+#define MMC_R1B_ERASE_PARAM 0x0040 -+#define MMC_R1B_OOR 0x0080 -+#define MMC_R1B_IDLE_STATE 0x0100 -+#define MMC_R1B_ERASE_RESET 0x0200 -+#define MMC_R1B_ILLEGAL_CMD 0x0400 -+#define MMC_R1B_COM_CRC_ERR 0x0800 -+#define MMC_R1B_ERASE_SEQ_ERR 0x1000 -+#define MMC_R1B_ADDR_ERR 0x2000 -+#define MMC_R1B_PARAM_ERR 0x4000 -+ -+typedef struct mmc_cid -+{ -+/* FIXME: BYTE_ORDER */ -+ uchar year:4, -+ month:4; -+ uchar sn[3]; -+ uchar fwrev:4, -+ hwrev:4; -+ uchar name[6]; -+ uchar id[3]; -+} mmc_cid_t; -+ -+typedef struct mmc_csd -+{ -+ uchar ecc:2, -+ file_format:2, -+ tmp_write_protect:1, -+ perm_write_protect:1, -+ copy:1, -+ file_format_grp:1; -+ uint64_t content_prot_app:1, -+ rsvd3:4, -+ write_bl_partial:1, -+ write_bl_len:4, -+ r2w_factor:3, -+ default_ecc:2, -+ wp_grp_enable:1, -+ wp_grp_size:5, -+ erase_grp_mult:5, -+ erase_grp_size:5, -+ c_size_mult1:3, -+ vdd_w_curr_max:3, -+ vdd_w_curr_min:3, -+ vdd_r_curr_max:3, -+ vdd_r_curr_min:3, -+ c_size:12, -+ rsvd2:2, -+ dsr_imp:1, -+ read_blk_misalign:1, -+ write_blk_misalign:1, -+ read_bl_partial:1; -+ -+ ushort read_bl_len:4, -+ ccc:12; -+ uchar tran_speed; -+ uchar nsac; -+ uchar taac; -+ uchar rsvd1:2, -+ spec_vers:4, -+ csd_structure:2; -+} mmc_csd_t; -+ -+ -+#endif /* __MMC_PXA_P_H__ */ -diff --git a/include/asm-arm/arch-s3c24x0/regs-sdi.h b/include/asm-arm/arch-s3c24x0/regs-sdi.h -new file mode 100644 -index 0000000..9b5b9d1 ---- /dev/null -+++ b/include/asm-arm/arch-s3c24x0/regs-sdi.h -@@ -0,0 +1,110 @@ -+/* linux/include/asm/arch-s3c2410/regs-sdi.h -+ * -+ * Copyright (c) 2004 Simtec Electronics -+ * http://www.simtec.co.uk/products/SWLINUX/ -+ * -+ * 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. -+ * -+ * S3C2410 MMC/SDIO register definitions -+ * -+ * Changelog: -+ * 18-Aug-2004 Ben Dooks Created initial file -+ * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates -+ * 29-Nov-2004 Ben Dooks Updated Koen's patch -+*/ -+ -+#ifndef __ASM_ARM_REGS_SDI -+#define __ASM_ARM_REGS_SDI "regs-sdi.h" -+ -+#define S3C2440_SDICON_SDRESET (1<<8) -+#define S3C2440_SDICON_MMCCLOCK (1<<5) -+#define S3C2410_SDICON_BYTEORDER (1<<4) -+#define S3C2410_SDICON_SDIOIRQ (1<<3) -+#define S3C2410_SDICON_RWAITEN (1<<2) -+#define S3C2410_SDICON_FIFORESET (1<<1) -+#define S3C2410_SDICON_CLOCKTYPE (1<<0) -+ -+#define S3C2410_SDICMDCON_ABORT (1<<12) -+#define S3C2410_SDICMDCON_WITHDATA (1<<11) -+#define S3C2410_SDICMDCON_LONGRSP (1<<10) -+#define S3C2410_SDICMDCON_WAITRSP (1<<9) -+#define S3C2410_SDICMDCON_CMDSTART (1<<8) -+#define S3C2410_SDICMDCON_SENDERHOST (1<<6) -+#define S3C2410_SDICMDCON_INDEX (0x3f) -+ -+#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) -+#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) -+#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) -+#define S3C2410_SDICMDSTAT_RSPFIN (1<<9) -+#define S3C2410_SDICMDSTAT_XFERING (1<<8) -+#define S3C2410_SDICMDSTAT_INDEX (0xff) -+ -+#define S3C2440_SDIDCON_DS_BYTE (0<<22) -+#define S3C2440_SDIDCON_DS_HALFWORD (1<<22) -+#define S3C2440_SDIDCON_DS_WORD (2<<22) -+#define S3C2410_SDIDCON_IRQPERIOD (1<<21) -+#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) -+#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) -+#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) -+#define S3C2410_SDIDCON_BLOCKMODE (1<<17) -+#define S3C2410_SDIDCON_WIDEBUS (1<<16) -+#define S3C2410_SDIDCON_DMAEN (1<<15) -+#define S3C2410_SDIDCON_STOP (1<<14) -+#define S3C2440_SDIDCON_DATSTART (1<<14) -+#define S3C2410_SDIDCON_DATMODE (3<<12) -+#define S3C2410_SDIDCON_BLKNUM (0x7ff) -+ -+/* constants for S3C2410_SDIDCON_DATMODE */ -+#define S3C2410_SDIDCON_XFER_READY (0<<12) -+#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) -+#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) -+#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) -+ -+#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF) -+#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) -+ -+#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) -+#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) -+#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ -+#define S3C2410_SDIDSTA_CRCFAIL (1<<7) -+#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) -+#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) -+#define S3C2410_SDIDSTA_XFERFINISH (1<<4) -+#define S3C2410_SDIDSTA_BUSYFINISH (1<<3) -+#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ -+#define S3C2410_SDIDSTA_TXDATAON (1<<1) -+#define S3C2410_SDIDSTA_RXDATAON (1<<0) -+ -+#define S3C2440_SDIFSTA_FIFORESET (1<<16) -+#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */ -+#define S3C2410_SDIFSTA_TFDET (1<<13) -+#define S3C2410_SDIFSTA_RFDET (1<<12) -+#define S3C2410_SDIFSTA_TFHALF (1<<11) -+#define S3C2410_SDIFSTA_TFEMPTY (1<<10) -+#define S3C2410_SDIFSTA_RFLAST (1<<9) -+#define S3C2410_SDIFSTA_RFFULL (1<<8) -+#define S3C2410_SDIFSTA_RFHALF (1<<7) -+#define S3C2410_SDIFSTA_COUNTMASK (0x7f) -+ -+#define S3C2410_SDIIMSK_RESPONSECRC (1<<17) -+#define S3C2410_SDIIMSK_CMDSENT (1<<16) -+#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) -+#define S3C2410_SDIIMSK_RESPONSEND (1<<14) -+#define S3C2410_SDIIMSK_READWAIT (1<<13) -+#define S3C2410_SDIIMSK_SDIOIRQ (1<<12) -+#define S3C2410_SDIIMSK_FIFOFAIL (1<<11) -+#define S3C2410_SDIIMSK_CRCSTATUS (1<<10) -+#define S3C2410_SDIIMSK_DATACRC (1<<9) -+#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) -+#define S3C2410_SDIIMSK_DATAFINISH (1<<7) -+#define S3C2410_SDIIMSK_BUSYFINISH (1<<6) -+#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ -+#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) -+#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) -+#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) -+#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) -+#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) -+ -+#endif /* __ASM_ARM_REGS_SDI */ -diff --git a/include/asm-arm/mach-types.h b/include/asm-arm/mach-types.h -index 7d7888e..4e9c6d9 100644 ---- a/include/asm-arm/mach-types.h -+++ b/include/asm-arm/mach-types.h -@@ -424,7 +424,7 @@ #define MACH_TYPE_MT02 4 - #define MACH_TYPE_MPORT3S 411 - #define MACH_TYPE_RA_ALPHA 412 - #define MACH_TYPE_XCEP 413 --#define MACH_TYPE_ARCOM_MERCURY 414 -+#define MACH_TYPE_ARCOM_VULCAN 414 - #define MACH_TYPE_STARGATE 415 - #define MACH_TYPE_ARMADILLOJ 416 - #define MACH_TYPE_ELROY_JACK 417 -@@ -457,7 +457,7 @@ #define MACH_TYPE_ESL_SARVA 4 - #define MACH_TYPE_XM250 444 - #define MACH_TYPE_T6TC1XB 445 - #define MACH_TYPE_ESS710 446 --#define MACH_TYPE_MX3ADS 447 -+#define MACH_TYPE_MX31ADS 447 - #define MACH_TYPE_HIMALAYA 448 - #define MACH_TYPE_BOLFENK 449 - #define MACH_TYPE_AT91RM9200KR 450 -@@ -736,7 +736,308 @@ #define MACH_TYPE_ADSPORTAL 7 - #define MACH_TYPE_LN2410SBC 725 - #define MACH_TYPE_CB3RUFC 726 - #define MACH_TYPE_MP2USB 727 --#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_NTNP425C 728 -+#define MACH_TYPE_COLIBRI 729 -+#define MACH_TYPE_PCM7220 730 -+#define MACH_TYPE_GATEWAY7001 731 -+#define MACH_TYPE_PCM027 732 -+#define MACH_TYPE_CMPXA 733 -+#define MACH_TYPE_ANUBIS 734 -+#define MACH_TYPE_ITE8152 735 -+#define MACH_TYPE_LPC3XXX 736 -+#define MACH_TYPE_PUPPETEER 737 -+#define MACH_TYPE_MACH_VADATECH 738 -+#define MACH_TYPE_E570 739 -+#define MACH_TYPE_X50 740 -+#define MACH_TYPE_RECON 741 -+#define MACH_TYPE_XBOARDGP8 742 -+#define MACH_TYPE_FPIC2 743 -+#define MACH_TYPE_AKITA 744 -+#define MACH_TYPE_A81 745 -+#define MACH_TYPE_SVM_SC25X 746 -+#define MACH_TYPE_VADATECH020 747 -+#define MACH_TYPE_TLI 748 -+#define MACH_TYPE_EDB9315LC 749 -+#define MACH_TYPE_PASSEC 750 -+#define MACH_TYPE_DS_TIGER 751 -+#define MACH_TYPE_E310 752 -+#define MACH_TYPE_E330 753 -+#define MACH_TYPE_RT3000 754 -+#define MACH_TYPE_NOKIA770 755 -+#define MACH_TYPE_PNX0106 756 -+#define MACH_TYPE_HX21XX 757 -+#define MACH_TYPE_FARADAY 758 -+#define MACH_TYPE_SBC9312 759 -+#define MACH_TYPE_BATMAN 760 -+#define MACH_TYPE_JPD201 761 -+#define MACH_TYPE_MIPSA 762 -+#define MACH_TYPE_KACOM 763 -+#define MACH_TYPE_SWARCOCPU 764 -+#define MACH_TYPE_SWARCODSL 765 -+#define MACH_TYPE_BLUEANGEL 766 -+#define MACH_TYPE_HAIRYGRAMA 767 -+#define MACH_TYPE_BANFF 768 -+#define MACH_TYPE_CARMEVA 769 -+#define MACH_TYPE_SAM255 770 -+#define MACH_TYPE_PPM10 771 -+#define MACH_TYPE_EDB9315A 772 -+#define MACH_TYPE_SUNSET 773 -+#define MACH_TYPE_STARGATE2 774 -+#define MACH_TYPE_INTELMOTE2 775 -+#define MACH_TYPE_TRIZEPS4 776 -+#define MACH_TYPE_MAINSTONE2 777 -+#define MACH_TYPE_EZ_IXP42X 778 -+#define MACH_TYPE_TAPWAVE_ZODIAC 779 -+#define MACH_TYPE_UNIVERSALMETER 780 -+#define MACH_TYPE_HICOARM9 781 -+#define MACH_TYPE_PNX4008 782 -+#define MACH_TYPE_KWS6000 783 -+#define MACH_TYPE_PORTUX920T 784 -+#define MACH_TYPE_EZ_X5 785 -+#define MACH_TYPE_OMAP_RUDOLPH 786 -+#define MACH_TYPE_CPUAT91 787 -+#define MACH_TYPE_REA9200 788 -+#define MACH_TYPE_ACTS_PUNE_SA1110 789 -+#define MACH_TYPE_IXP425 790 -+#define MACH_TYPE_ARGONPLUSODYSSEY 791 -+#define MACH_TYPE_PERCH 792 -+#define MACH_TYPE_EIS05R1 793 -+#define MACH_TYPE_PEPPERPAD 794 -+#define MACH_TYPE_SB3010 795 -+#define MACH_TYPE_RM9200 796 -+#define MACH_TYPE_DMA03 797 -+#define MACH_TYPE_ROAD_S101 798 -+#define MACH_TYPE_IQ_NEXTGEN_A 799 -+#define MACH_TYPE_IQ_NEXTGEN_B 800 -+#define MACH_TYPE_IQ_NEXTGEN_C 801 -+#define MACH_TYPE_IQ_NEXTGEN_D 802 -+#define MACH_TYPE_IQ_NEXTGEN_E 803 -+#define MACH_TYPE_MALLOW_AT91 804 -+#define MACH_TYPE_CYBERTRACKER_I 805 -+#define MACH_TYPE_GESBC931X 806 -+#define MACH_TYPE_CENTIPAD 807 -+#define MACH_TYPE_ARMSOC 808 -+#define MACH_TYPE_SE4200 809 -+#define MACH_TYPE_EMS197A 810 -+#define MACH_TYPE_MICRO9 811 -+#define MACH_TYPE_MICRO9L 812 -+#define MACH_TYPE_UC5471DSP 813 -+#define MACH_TYPE_SJ5471ENG 814 -+#define MACH_TYPE_CMPXA26X 815 -+#define MACH_TYPE_NC 816 -+#define MACH_TYPE_OMAP_PALMTE 817 -+#define MACH_TYPE_AJAX52X 818 -+#define MACH_TYPE_SIRIUSTAR 819 -+#define MACH_TYPE_IODATA_HDLG 820 -+#define MACH_TYPE_AT91RM9200UTL 821 -+#define MACH_TYPE_BIOSAFE 822 -+#define MACH_TYPE_MP1000 823 -+#define MACH_TYPE_PARSY 824 -+#define MACH_TYPE_CCXP 825 -+#define MACH_TYPE_OMAP_GSAMPLE 826 -+#define MACH_TYPE_REALVIEW_EB 827 -+#define MACH_TYPE_SAMOA 828 -+#define MACH_TYPE_T3XSCALE 829 -+#define MACH_TYPE_I878 830 -+#define MACH_TYPE_BORZOI 831 -+#define MACH_TYPE_GECKO 832 -+#define MACH_TYPE_DS101 833 -+#define MACH_TYPE_OMAP_PALMTT2 834 -+#define MACH_TYPE_XSCALE_PALMLD 835 -+#define MACH_TYPE_CC9C 836 -+#define MACH_TYPE_SBC1670 837 -+#define MACH_TYPE_IXDP28X5 838 -+#define MACH_TYPE_OMAP_PALMTT 839 -+#define MACH_TYPE_ML696K 840 -+#define MACH_TYPE_ARCOM_ZEUS 841 -+#define MACH_TYPE_OSIRIS 842 -+#define MACH_TYPE_MAESTRO 843 -+#define MACH_TYPE_TUNGE2 844 -+#define MACH_TYPE_IXBBM 845 -+#define MACH_TYPE_MX27 846 -+#define MACH_TYPE_AX8004 847 -+#define MACH_TYPE_AT91SAM9261EK 848 -+#define MACH_TYPE_LOFT 849 -+#define MACH_TYPE_MAGPIE 850 -+#define MACH_TYPE_MX21 851 -+#define MACH_TYPE_MB87M3400 852 -+#define MACH_TYPE_MGUARD_DELTA 853 -+#define MACH_TYPE_DAVINCI_DVDP 854 -+#define MACH_TYPE_HTCUNIVERSAL 855 -+#define MACH_TYPE_TPAD 856 -+#define MACH_TYPE_ROVERP3 857 -+#define MACH_TYPE_JORNADA928 858 -+#define MACH_TYPE_MV88FXX81 859 -+#define MACH_TYPE_STMP36XX 860 -+#define MACH_TYPE_SXNI79524 861 -+#define MACH_TYPE_AMS_DELTA 862 -+#define MACH_TYPE_URANIUM 863 -+#define MACH_TYPE_UCON 864 -+#define MACH_TYPE_NAS100D 865 -+#define MACH_TYPE_L083_1000 866 -+#define MACH_TYPE_EZX 867 -+#define MACH_TYPE_PNX5220 868 -+#define MACH_TYPE_BUTTE 869 -+#define MACH_TYPE_SRM2 870 -+#define MACH_TYPE_DSBR 871 -+#define MACH_TYPE_CRYSTALBALL 872 -+#define MACH_TYPE_TINYPXA27X 873 -+#define MACH_TYPE_HERBIE 874 -+#define MACH_TYPE_MAGICIAN 875 -+#define MACH_TYPE_CM4002 876 -+#define MACH_TYPE_B4 877 -+#define MACH_TYPE_MAUI 878 -+#define MACH_TYPE_CYBERTRACKER_G 879 -+#define MACH_TYPE_NXDKN 880 -+#define MACH_TYPE_MIO8390 881 -+#define MACH_TYPE_OMI_BOARD 882 -+#define MACH_TYPE_MX21CIV 883 -+#define MACH_TYPE_MAHI_CDAC 884 -+#define MACH_TYPE_XSCALE_PALMTX 885 -+#define MACH_TYPE_S3C2413 887 -+#define MACH_TYPE_SAMSYS_EP0 888 -+#define MACH_TYPE_WG302V1 889 -+#define MACH_TYPE_WG302V2 890 -+#define MACH_TYPE_EB42X 891 -+#define MACH_TYPE_IQ331ES 892 -+#define MACH_TYPE_COSYDSP 893 -+#define MACH_TYPE_UPLAT7D 894 -+#define MACH_TYPE_PTDAVINCI 895 -+#define MACH_TYPE_MBUS 896 -+#define MACH_TYPE_NADIA2VB 897 -+#define MACH_TYPE_R1000 898 -+#define MACH_TYPE_HW90250 899 -+#define MACH_TYPE_OMAP_2430SDP 900 -+#define MACH_TYPE_DAVINCI_EVM 901 -+#define MACH_TYPE_OMAP_TORNADO 902 -+#define MACH_TYPE_OLOCREEK 903 -+#define MACH_TYPE_PALMZ72 904 -+#define MACH_TYPE_NXDB500 905 -+#define MACH_TYPE_APF9328 906 -+#define MACH_TYPE_OMAP_WIPOQ 907 -+#define MACH_TYPE_OMAP_TWIP 908 -+#define MACH_TYPE_XSCALE_PALMTREO650 909 -+#define MACH_TYPE_ACUMEN 910 -+#define MACH_TYPE_XP100 911 -+#define MACH_TYPE_FS2410 912 -+#define MACH_TYPE_PXA270_CERF 913 -+#define MACH_TYPE_SQ2FTLPALM 914 -+#define MACH_TYPE_BSEMSERVER 915 -+#define MACH_TYPE_NETCLIENT 916 -+#define MACH_TYPE_XSCALE_PALMTT5 917 -+#define MACH_TYPE_OMAP_PALMTC 918 -+#define MACH_TYPE_OMAP_APOLLON 919 -+#define MACH_TYPE_ARGONLVEVB 920 -+#define MACH_TYPE_REA_2D 921 -+#define MACH_TYPE_TI3E524 922 -+#define MACH_TYPE_ATEB9200 923 -+#define MACH_TYPE_AUCKLAND 924 -+#define MACH_TYPE_AK3320M 925 -+#define MACH_TYPE_DURAMAX 926 -+#define MACH_TYPE_N35 927 -+#define MACH_TYPE_PRONGHORN 928 -+#define MACH_TYPE_FUNDY 929 -+#define MACH_TYPE_LOGICPD_PXA270 930 -+#define MACH_TYPE_CPU777 931 -+#define MACH_TYPE_SIMICON9201 932 -+#define MACH_TYPE_LEAP2_HPM 933 -+#define MACH_TYPE_CM922TXA10 934 -+#define MACH_TYPE_PXA 935 -+#define MACH_TYPE_SANDGATE2 936 -+#define MACH_TYPE_SANDGATE2G 937 -+#define MACH_TYPE_SANDGATE2P 938 -+#define MACH_TYPE_FRED_JACK 939 -+#define MACH_TYPE_TTG_COLOR1 940 -+#define MACH_TYPE_NXEB500HMI 941 -+#define MACH_TYPE_NETDCU8 942 -+#define MACH_TYPE_ML675050_CPU_BOA 943 -+#define MACH_TYPE_NG_FVX538 944 -+#define MACH_TYPE_NG_FVS338 945 -+#define MACH_TYPE_PNX4103 946 -+#define MACH_TYPE_HESDB 947 -+#define MACH_TYPE_XSILO 948 -+#define MACH_TYPE_ESPRESSO 949 -+#define MACH_TYPE_EMLC 950 -+#define MACH_TYPE_SISTERON 951 -+#define MACH_TYPE_RX1950 952 -+#define MACH_TYPE_TSC_VENUS 953 -+#define MACH_TYPE_DS101J 954 -+#define MACH_TYPE_MXC30030ADS 955 -+#define MACH_TYPE_FUJITSU_WIMAXSOC 956 -+#define MACH_TYPE_DUALPCMODEM 957 -+#define MACH_TYPE_GESBC9312 958 -+#define MACH_TYPE_HTCAPACHE 959 -+#define MACH_TYPE_IXDP435 960 -+#define MACH_TYPE_CATPROVT100 961 -+#define MACH_TYPE_PICOTUX1XX 962 -+#define MACH_TYPE_PICOTUX2XX 963 -+#define MACH_TYPE_DSMG600 964 -+#define MACH_TYPE_EMPC2 965 -+#define MACH_TYPE_VENTURA 966 -+#define MACH_TYPE_PHIDGET_SBC 967 -+#define MACH_TYPE_IJ3K 968 -+#define MACH_TYPE_PISGAH 969 -+#define MACH_TYPE_OMAP_FSAMPLE 970 -+#define MACH_TYPE_SG720 971 -+#define MACH_TYPE_REDFOX 972 -+#define MACH_TYPE_MYSH_EP9315_1 973 -+#define MACH_TYPE_TPF106 974 -+#define MACH_TYPE_AT91RM9200KG 975 -+#define MACH_TYPE_SLEDB 976 -+#define MACH_TYPE_ONTRACK 977 -+#define MACH_TYPE_PM1200 978 -+#define MACH_TYPE_ESS24XXX 979 -+#define MACH_TYPE_COREMP7 980 -+#define MACH_TYPE_NEXCODER_6446 981 -+#define MACH_TYPE_STVC8380 982 -+#define MACH_TYPE_TEKLYNX 983 -+#define MACH_TYPE_CARBONADO 984 -+#define MACH_TYPE_SYSMOS_MP730 985 -+#define MACH_TYPE_SNAPPER_CL15 986 -+#define MACH_TYPE_PGIGIM 987 -+#define MACH_TYPE_PTX9160P2 988 -+#define MACH_TYPE_DCORE1 989 -+#define MACH_TYPE_VICTORPXA 990 -+#define MACH_TYPE_MX2DTB 991 -+#define MACH_TYPE_PXA_IREX_ER0100 992 -+#define MACH_TYPE_OMAP_PALMZ71 993 -+#define MACH_TYPE_BARTEC_DEG 994 -+#define MACH_TYPE_HW50251 995 -+#define MACH_TYPE_IBOX 996 -+#define MACH_TYPE_ATLASLH7A404 997 -+#define MACH_TYPE_PT2026 998 -+#define MACH_TYPE_HTCALPINE 999 -+#define MACH_TYPE_BARTEC_VTU 1000 -+#define MACH_TYPE_VCOREII 1001 -+#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_HTCBEETLES 1003 -+#define MACH_TYPE_S3C6400 1004 -+#define MACH_TYPE_S3C2443 1005 -+#define MACH_TYPE_OMAP_LDK 1006 -+#define MACH_TYPE_SMDK2460 1007 -+#define MACH_TYPE_SMDK2440 1008 -+#define MACH_TYPE_SMDK2412 1009 -+#define MACH_TYPE_WEBBOX 1010 -+#define MACH_TYPE_CWWNDP 1011 -+#define MACH_TYPE_DRAGON 1012 -+#define MACH_TYPE_OPENDO_CPU_BOARD 1013 -+#define MACH_TYPE_CCM2200 1014 -+#define MACH_TYPE_ETWARM 1015 -+#define MACH_TYPE_M93030 1016 -+#define MACH_TYPE_CC7U 1017 -+#define MACH_TYPE_MTT_RANGER 1018 -+#define MACH_TYPE_NEXUS 1019 -+#define MACH_TYPE_DESMAN 1020 -+#define MACH_TYPE_BKDE303 1021 -+#define MACH_TYPE_SMDK2413 1022 -+#define MACH_TYPE_AML_M7200 1023 -+#define MACH_TYPE_AML_M5900 1024 -+#define MACH_TYPE_SG640 1025 -+#define MACH_TYPE_EDG79524 1026 -+#define MACH_TYPE_AI2410 1027 -+#define MACH_TYPE_IXP465 1028 -+#define MACH_TYPE_BALLOON3 1029 -+#define MACH_TYPE_QT2410 1108 - - #ifdef CONFIG_ARCH_EBSA110 - # ifdef machine_arch_type -@@ -3541,9 +3842,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_RAMSES - # endif --# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES) -+# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES) - #else --# define machine_is_ramses() (0) -+# define machine_is_mnci() (0) - #endif - - #ifdef CONFIG_ARCH_S28X -@@ -4501,9 +4802,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_M825XX - # endif --# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX) -+# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX) - #else --# define machine_is_m825xx() (0) -+# define machine_is_comcerto() (0) - #endif - - #ifdef CONFIG_SA1100_M7100 -@@ -5658,16 +5959,16 @@ #else - # define machine_is_xcep() (0) - #endif - --#ifdef CONFIG_MACH_ARCOM_MERCURY -+#ifdef CONFIG_MACH_ARCOM_VULCAN - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_ARCOM_MERCURY -+# define machine_arch_type MACH_TYPE_ARCOM_VULCAN - # endif --# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY) -+# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN) - #else --# define machine_is_arcom_mercury() (0) -+# define machine_is_arcom_vulcan() (0) - #endif - - #ifdef CONFIG_MACH_STARGATE -@@ -6054,16 +6355,16 @@ #else - # define machine_is_ess710() (0) - #endif - --#ifdef CONFIG_MACH_MX3ADS -+#ifdef CONFIG_MACH_MX31ADS - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_MX3ADS -+# define machine_arch_type MACH_TYPE_MX31ADS - # endif --# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS) -+# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS) - #else --# define machine_is_mx3ads() (0) -+# define machine_is_mx31ads() (0) - #endif - - #ifdef CONFIG_MACH_HIMALAYA -@@ -7333,9 +7634,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_ARGONPLUSEVB - # endif --# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) -+# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) - #else --# define machine_is_argonplusevb() (0) -+# define machine_is_i30030evb() (0) - #endif - - #ifdef CONFIG_MACH_SCMA11EVB -@@ -7345,9 +7646,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_SCMA11EVB - # endif --# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) -+# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) - #else --# define machine_is_scma11evb() (0) -+# define machine_is_mxc27530evb() (0) - #endif - - #ifdef CONFIG_MACH_SMDK2800 -@@ -8305,9 +8606,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_SCMA11BB - # endif --# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB) -+# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_SCMA11BB) - #else --# define machine_is_scma11bb() (0) -+# define machine_is_mxc27530ads() (0) - #endif - - #ifdef CONFIG_MACH_TRIZEPS3 -@@ -9193,9 +9494,9 @@ # define machine_arch_type __machine_ar - # else - # define machine_arch_type MACH_TYPE_ZEUSEVB - # endif --# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB) -+# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_ZEUSEVB) - #else --# define machine_is_zeusevb() (0) -+# define machine_is_mxc91131evb() (0) - #endif - - #ifdef CONFIG_MACH_P700 -@@ -9402,6 +9703,3630 @@ #else - # define machine_is_mp2usb() (0) - #endif - -+#ifdef CONFIG_MACH_NTNP425C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NTNP425C -+# endif -+# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C) -+#else -+# define machine_is_ntnp425c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COLIBRI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COLIBRI -+# endif -+# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI) -+#else -+# define machine_is_colibri() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM7220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM7220 -+# endif -+# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220) -+#else -+# define machine_is_pcm7220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GATEWAY7001 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GATEWAY7001 -+# endif -+# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001) -+#else -+# define machine_is_gateway7001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM027 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM027 -+# endif -+# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027) -+#else -+# define machine_is_pcm027() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA -+# endif -+# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA) -+#else -+# define machine_is_cmpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ANUBIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ANUBIS -+# endif -+# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS) -+#else -+# define machine_is_anubis() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ITE8152 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ITE8152 -+# endif -+# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152) -+#else -+# define machine_is_ite8152() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LPC3XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LPC3XXX -+# endif -+# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX) -+#else -+# define machine_is_lpc3xxx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PUPPETEER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PUPPETEER -+# endif -+# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER) -+#else -+# define machine_is_puppeteer() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MACH_VADATECH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MACH_VADATECH -+# endif -+# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH) -+#else -+# define machine_is_vt001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E570 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E570 -+# endif -+# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570) -+#else -+# define machine_is_e570() (0) -+#endif -+ -+#ifdef CONFIG_MACH_X50 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_X50 -+# endif -+# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50) -+#else -+# define machine_is_x50() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RECON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RECON -+# endif -+# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON) -+#else -+# define machine_is_recon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XBOARDGP8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XBOARDGP8 -+# endif -+# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8) -+#else -+# define machine_is_xboardgp8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FPIC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FPIC2 -+# endif -+# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2) -+#else -+# define machine_is_fpic2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AKITA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AKITA -+# endif -+# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA) -+#else -+# define machine_is_akita() (0) -+#endif -+ -+#ifdef CONFIG_MACH_A81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_A81 -+# endif -+# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81) -+#else -+# define machine_is_a81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SVM_SC25X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SVM_SC25X -+# endif -+# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X) -+#else -+# define machine_is_svm_sc25x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VADATECH020 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VADATECH020 -+# endif -+# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020) -+#else -+# define machine_is_vt020() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TLI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TLI -+# endif -+# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI) -+#else -+# define machine_is_tli() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315LC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315LC -+# endif -+# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC) -+#else -+# define machine_is_edb9315lc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PASSEC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PASSEC -+# endif -+# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC) -+#else -+# define machine_is_passec() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS_TIGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS_TIGER -+# endif -+# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER) -+#else -+# define machine_is_ds_tiger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E310 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E310 -+# endif -+# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310) -+#else -+# define machine_is_e310() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E330 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E330 -+# endif -+# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330) -+#else -+# define machine_is_e330() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RT3000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RT3000 -+# endif -+# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000) -+#else -+# define machine_is_rt3000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NOKIA770 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NOKIA770 -+# endif -+# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770) -+#else -+# define machine_is_nokia770() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX0106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX0106 -+# endif -+# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106) -+#else -+# define machine_is_pnx0106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HX21XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HX21XX -+# endif -+# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX) -+#else -+# define machine_is_hx21xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FARADAY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FARADAY -+# endif -+# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY) -+#else -+# define machine_is_faraday() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC9312 -+# endif -+# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312) -+#else -+# define machine_is_sbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BATMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BATMAN -+# endif -+# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN) -+#else -+# define machine_is_batman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JPD201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JPD201 -+# endif -+# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201) -+#else -+# define machine_is_jpd201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIPSA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIPSA -+# endif -+# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA) -+#else -+# define machine_is_mipsa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KACOM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KACOM -+# endif -+# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM) -+#else -+# define machine_is_kacom() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCOCPU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCOCPU -+# endif -+# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU) -+#else -+# define machine_is_swarcocpu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCODSL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCODSL -+# endif -+# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL) -+#else -+# define machine_is_swarcodsl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BLUEANGEL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BLUEANGEL -+# endif -+# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL) -+#else -+# define machine_is_blueangel() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HAIRYGRAMA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HAIRYGRAMA -+# endif -+# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA) -+#else -+# define machine_is_hairygrama() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BANFF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BANFF -+# endif -+# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF) -+#else -+# define machine_is_banff() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARMEVA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARMEVA -+# endif -+# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA) -+#else -+# define machine_is_carmeva() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAM255 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAM255 -+# endif -+# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255) -+#else -+# define machine_is_sam255() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PPM10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PPM10 -+# endif -+# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10) -+#else -+# define machine_is_ppm10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315A -+# endif -+# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A) -+#else -+# define machine_is_edb9315a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SUNSET -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SUNSET -+# endif -+# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET) -+#else -+# define machine_is_sunset() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STARGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STARGATE2 -+# endif -+# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2) -+#else -+# define machine_is_stargate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_INTELMOTE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_INTELMOTE2 -+# endif -+# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2) -+#else -+# define machine_is_intelmote2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TRIZEPS4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TRIZEPS4 -+# endif -+# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4) -+#else -+# define machine_is_trizeps4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAINSTONE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAINSTONE2 -+# endif -+# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2) -+#else -+# define machine_is_mainstone2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_IXP42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_IXP42X -+# endif -+# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X) -+#else -+# define machine_is_ez_ixp42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TAPWAVE_ZODIAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC -+# endif -+# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC) -+#else -+# define machine_is_tapwave_zodiac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UNIVERSALMETER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UNIVERSALMETER -+# endif -+# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER) -+#else -+# define machine_is_universalmeter() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HICOARM9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HICOARM9 -+# endif -+# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9) -+#else -+# define machine_is_hicoarm9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4008 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4008 -+# endif -+# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008) -+#else -+# define machine_is_pnx4008() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KWS6000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KWS6000 -+# endif -+# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000) -+#else -+# define machine_is_kws6000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PORTUX920T -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PORTUX920T -+# endif -+# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T) -+#else -+# define machine_is_portux920t() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_X5 -+# endif -+# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5) -+#else -+# define machine_is_ez_x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_RUDOLPH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH -+# endif -+# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH) -+#else -+# define machine_is_omap_rudolph() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPUAT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPUAT91 -+# endif -+# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91) -+#else -+# define machine_is_cpuat91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA9200 -+# endif -+# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200) -+#else -+# define machine_is_rea9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACTS_PUNE_SA1110 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110 -+# endif -+# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110) -+#else -+# define machine_is_acts_pune_sa1110() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP425 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP425 -+# endif -+# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425) -+#else -+# define machine_is_ixp425() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONPLUSODYSSEY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONPLUSODYSSEY -+# endif -+# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_ARGONPLUSODYSSEY) -+#else -+# define machine_is_i30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PERCH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PERCH -+# endif -+# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH) -+#else -+# define machine_is_perch() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EIS05R1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EIS05R1 -+# endif -+# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1) -+#else -+# define machine_is_eis05r1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PEPPERPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PEPPERPAD -+# endif -+# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD) -+#else -+# define machine_is_pepperpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SB3010 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SB3010 -+# endif -+# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010) -+#else -+# define machine_is_sb3010() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RM9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RM9200 -+# endif -+# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200) -+#else -+# define machine_is_rm9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DMA03 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DMA03 -+# endif -+# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03) -+#else -+# define machine_is_dma03() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROAD_S101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROAD_S101 -+# endif -+# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101) -+#else -+# define machine_is_road_s101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A -+# endif -+# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A) -+#else -+# define machine_is_iq_nextgen_a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_B -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B -+# endif -+# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B) -+#else -+# define machine_is_iq_nextgen_b() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C -+# endif -+# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C) -+#else -+# define machine_is_iq_nextgen_c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D -+# endif -+# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D) -+#else -+# define machine_is_iq_nextgen_d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_E -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E -+# endif -+# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E) -+#else -+# define machine_is_iq_nextgen_e() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MALLOW_AT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MALLOW_AT91 -+# endif -+# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91) -+#else -+# define machine_is_mallow_at91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_I -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_I -+# endif -+# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I) -+#else -+# define machine_is_cybertracker_i() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC931X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC931X -+# endif -+# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X) -+#else -+# define machine_is_gesbc931x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CENTIPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CENTIPAD -+# endif -+# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD) -+#else -+# define machine_is_centipad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARMSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARMSOC -+# endif -+# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC) -+#else -+# define machine_is_armsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SE4200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SE4200 -+# endif -+# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200) -+#else -+# define machine_is_se4200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMS197A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMS197A -+# endif -+# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A) -+#else -+# define machine_is_ems197a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9 -+# endif -+# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9) -+#else -+# define machine_is_micro9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9L -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9L -+# endif -+# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L) -+#else -+# define machine_is_micro9l() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UC5471DSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UC5471DSP -+# endif -+# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP) -+#else -+# define machine_is_uc5471dsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SJ5471ENG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SJ5471ENG -+# endif -+# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG) -+#else -+# define machine_is_sj5471eng() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA26X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA26X -+# endif -+# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X) -+#else -+# define machine_is_none() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NC -+# endif -+# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC) -+#else -+# define machine_is_nc1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTE -+# endif -+# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE) -+#else -+# define machine_is_omap_palmte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AJAX52X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AJAX52X -+# endif -+# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X) -+#else -+# define machine_is_ajax52x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIRIUSTAR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIRIUSTAR -+# endif -+# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR) -+#else -+# define machine_is_siriustar() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IODATA_HDLG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IODATA_HDLG -+# endif -+# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG) -+#else -+# define machine_is_iodata_hdlg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200UTL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200UTL -+# endif -+# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL) -+#else -+# define machine_is_at91rm9200utl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BIOSAFE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BIOSAFE -+# endif -+# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE) -+#else -+# define machine_is_biosafe() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MP1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MP1000 -+# endif -+# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000) -+#else -+# define machine_is_mp1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PARSY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PARSY -+# endif -+# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY) -+#else -+# define machine_is_parsy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCXP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCXP -+# endif -+# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP) -+#else -+# define machine_is_ccxp270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_GSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE -+# endif -+# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE) -+#else -+# define machine_is_omap_gsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REALVIEW_EB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REALVIEW_EB -+# endif -+# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB) -+#else -+# define machine_is_realview_eb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMOA -+# endif -+# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA) -+#else -+# define machine_is_samoa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_T3XSCALE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_T3XSCALE -+# endif -+# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE) -+#else -+# define machine_is_t3xscale() (0) -+#endif -+ -+#ifdef CONFIG_MACH_I878 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_I878 -+# endif -+# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878) -+#else -+# define machine_is_i878() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BORZOI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BORZOI -+# endif -+# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI) -+#else -+# define machine_is_borzoi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GECKO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GECKO -+# endif -+# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO) -+#else -+# define machine_is_gecko() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101 -+# endif -+# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101) -+#else -+# define machine_is_ds101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT2 -+# endif -+# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2) -+#else -+# define machine_is_omap_palmtt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMLD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMLD -+# endif -+# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD) -+#else -+# define machine_is_xscale_palmld() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC9C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC9C -+# endif -+# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C) -+#else -+# define machine_is_cc9c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC1670 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC1670 -+# endif -+# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670) -+#else -+# define machine_is_sbc1670() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP28X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP28X5 -+# endif -+# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5) -+#else -+# define machine_is_ixdp28x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT -+# endif -+# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT) -+#else -+# define machine_is_omap_palmtt() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML696K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML696K -+# endif -+# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K) -+#else -+# define machine_is_ml696k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARCOM_ZEUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARCOM_ZEUS -+# endif -+# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS) -+#else -+# define machine_is_arcom_zeus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OSIRIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OSIRIS -+# endif -+# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS) -+#else -+# define machine_is_osiris() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAESTRO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAESTRO -+# endif -+# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO) -+#else -+# define machine_is_maestro() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TUNGE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TUNGE2 -+# endif -+# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2) -+#else -+# define machine_is_tunge2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXBBM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXBBM -+# endif -+# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM) -+#else -+# define machine_is_ixbbm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX27 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX27 -+# endif -+# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27) -+#else -+# define machine_is_mx27ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AX8004 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AX8004 -+# endif -+# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004) -+#else -+# define machine_is_ax8004() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91SAM9261EK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91SAM9261EK -+# endif -+# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK) -+#else -+# define machine_is_at91sam9261ek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOFT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOFT -+# endif -+# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT) -+#else -+# define machine_is_loft() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGPIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGPIE -+# endif -+# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE) -+#else -+# define machine_is_magpie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21 -+# endif -+# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21) -+#else -+# define machine_is_mx21ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MB87M3400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MB87M3400 -+# endif -+# define machine_is_mb87m3400() (machine_arch_type == MACH_TYPE_MB87M3400) -+#else -+# define machine_is_mb87m3400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MGUARD_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MGUARD_DELTA -+# endif -+# define machine_is_mguard_delta() (machine_arch_type == MACH_TYPE_MGUARD_DELTA) -+#else -+# define machine_is_mguard_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_DVDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_DVDP -+# endif -+# define machine_is_davinci_dvdp() (machine_arch_type == MACH_TYPE_DAVINCI_DVDP) -+#else -+# define machine_is_davinci_dvdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCUNIVERSAL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCUNIVERSAL -+# endif -+# define machine_is_htcuniversal() (machine_arch_type == MACH_TYPE_HTCUNIVERSAL) -+#else -+# define machine_is_htcuniversal() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPAD -+# endif -+# define machine_is_tpad() (machine_arch_type == MACH_TYPE_TPAD) -+#else -+# define machine_is_tpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROVERP3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROVERP3 -+# endif -+# define machine_is_roverp3() (machine_arch_type == MACH_TYPE_ROVERP3) -+#else -+# define machine_is_roverp3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JORNADA928 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JORNADA928 -+# endif -+# define machine_is_jornada928() (machine_arch_type == MACH_TYPE_JORNADA928) -+#else -+# define machine_is_jornada928() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MV88FXX81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MV88FXX81 -+# endif -+# define machine_is_mv88fxx81() (machine_arch_type == MACH_TYPE_MV88FXX81) -+#else -+# define machine_is_mv88fxx81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STMP36XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STMP36XX -+# endif -+# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX) -+#else -+# define machine_is_stmp36xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SXNI79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SXNI79524 -+# endif -+# define machine_is_sxni79524() (machine_arch_type == MACH_TYPE_SXNI79524) -+#else -+# define machine_is_sxni79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AMS_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AMS_DELTA -+# endif -+# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA) -+#else -+# define machine_is_ams_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_URANIUM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_URANIUM -+# endif -+# define machine_is_uranium() (machine_arch_type == MACH_TYPE_URANIUM) -+#else -+# define machine_is_uranium() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UCON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UCON -+# endif -+# define machine_is_ucon() (machine_arch_type == MACH_TYPE_UCON) -+#else -+# define machine_is_ucon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NAS100D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NAS100D -+# endif -+# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D) -+#else -+# define machine_is_nas100d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_L083_1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_L083_1000 -+# endif -+# define machine_is_l083() (machine_arch_type == MACH_TYPE_L083_1000) -+#else -+# define machine_is_l083() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZX -+# endif -+# define machine_is_ezx() (machine_arch_type == MACH_TYPE_EZX) -+#else -+# define machine_is_ezx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX5220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX5220 -+# endif -+# define machine_is_pnx5220() (machine_arch_type == MACH_TYPE_PNX5220) -+#else -+# define machine_is_pnx5220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BUTTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BUTTE -+# endif -+# define machine_is_butte() (machine_arch_type == MACH_TYPE_BUTTE) -+#else -+# define machine_is_butte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SRM2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SRM2 -+# endif -+# define machine_is_srm2() (machine_arch_type == MACH_TYPE_SRM2) -+#else -+# define machine_is_srm2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSBR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSBR -+# endif -+# define machine_is_dsbr() (machine_arch_type == MACH_TYPE_DSBR) -+#else -+# define machine_is_dsbr() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CRYSTALBALL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CRYSTALBALL -+# endif -+# define machine_is_crystalball() (machine_arch_type == MACH_TYPE_CRYSTALBALL) -+#else -+# define machine_is_crystalball() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TINYPXA27X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TINYPXA27X -+# endif -+# define machine_is_tinypxa27x() (machine_arch_type == MACH_TYPE_TINYPXA27X) -+#else -+# define machine_is_tinypxa27x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HERBIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HERBIE -+# endif -+# define machine_is_herbie() (machine_arch_type == MACH_TYPE_HERBIE) -+#else -+# define machine_is_herbie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGICIAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGICIAN -+# endif -+# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN) -+#else -+# define machine_is_magician() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM4002 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM4002 -+# endif -+# define machine_is_cm4002() (machine_arch_type == MACH_TYPE_CM4002) -+#else -+# define machine_is_cm4002() (0) -+#endif -+ -+#ifdef CONFIG_MACH_B4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_B4 -+# endif -+# define machine_is_b4() (machine_arch_type == MACH_TYPE_B4) -+#else -+# define machine_is_b4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAUI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAUI -+# endif -+# define machine_is_maui() (machine_arch_type == MACH_TYPE_MAUI) -+#else -+# define machine_is_maui() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_G -+# endif -+# define machine_is_cybertracker_g() (machine_arch_type == MACH_TYPE_CYBERTRACKER_G) -+#else -+# define machine_is_cybertracker_g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDKN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDKN -+# endif -+# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN) -+#else -+# define machine_is_nxdkn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIO8390 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIO8390 -+# endif -+# define machine_is_mio8390() (machine_arch_type == MACH_TYPE_MIO8390) -+#else -+# define machine_is_mio8390() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMI_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMI_BOARD -+# endif -+# define machine_is_omi_board() (machine_arch_type == MACH_TYPE_OMI_BOARD) -+#else -+# define machine_is_omi_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21CIV -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21CIV -+# endif -+# define machine_is_mx21civ() (machine_arch_type == MACH_TYPE_MX21CIV) -+#else -+# define machine_is_mx21civ() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAHI_CDAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAHI_CDAC -+# endif -+# define machine_is_mahi_cdac() (machine_arch_type == MACH_TYPE_MAHI_CDAC) -+#else -+# define machine_is_mahi_cdac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTX -+# endif -+# define machine_is_xscale_palmtx() (machine_arch_type == MACH_TYPE_XSCALE_PALMTX) -+#else -+# define machine_is_xscale_palmtx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2413 -+# endif -+# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413) -+#else -+# define machine_is_s3c2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMSYS_EP0 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMSYS_EP0 -+# endif -+# define machine_is_samsys_ep0() (machine_arch_type == MACH_TYPE_SAMSYS_EP0) -+#else -+# define machine_is_samsys_ep0() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V1 -+# endif -+# define machine_is_wg302v1() (machine_arch_type == MACH_TYPE_WG302V1) -+#else -+# define machine_is_wg302v1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V2 -+# endif -+# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2) -+#else -+# define machine_is_wg302v2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EB42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EB42X -+# endif -+# define machine_is_eb42x() (machine_arch_type == MACH_TYPE_EB42X) -+#else -+# define machine_is_eb42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ331ES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ331ES -+# endif -+# define machine_is_iq331es() (machine_arch_type == MACH_TYPE_IQ331ES) -+#else -+# define machine_is_iq331es() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COSYDSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COSYDSP -+# endif -+# define machine_is_cosydsp() (machine_arch_type == MACH_TYPE_COSYDSP) -+#else -+# define machine_is_cosydsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UPLAT7D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UPLAT7D -+# endif -+# define machine_is_uplat7d_proto() (machine_arch_type == MACH_TYPE_UPLAT7D) -+#else -+# define machine_is_uplat7d_proto() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTDAVINCI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTDAVINCI -+# endif -+# define machine_is_ptdavinci() (machine_arch_type == MACH_TYPE_PTDAVINCI) -+#else -+# define machine_is_ptdavinci() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MBUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MBUS -+# endif -+# define machine_is_mbus() (machine_arch_type == MACH_TYPE_MBUS) -+#else -+# define machine_is_mbus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NADIA2VB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NADIA2VB -+# endif -+# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB) -+#else -+# define machine_is_nadia2vb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_R1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_R1000 -+# endif -+# define machine_is_r1000() (machine_arch_type == MACH_TYPE_R1000) -+#else -+# define machine_is_r1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW90250 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW90250 -+# endif -+# define machine_is_hw90250() (machine_arch_type == MACH_TYPE_HW90250) -+#else -+# define machine_is_hw90250() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_2430SDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_2430SDP -+# endif -+# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP) -+#else -+# define machine_is_omap_2430sdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_EVM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_EVM -+# endif -+# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM) -+#else -+# define machine_is_davinci_evm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TORNADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TORNADO -+# endif -+# define machine_is_omap_tornado() (machine_arch_type == MACH_TYPE_OMAP_TORNADO) -+#else -+# define machine_is_omap_tornado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OLOCREEK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OLOCREEK -+# endif -+# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK) -+#else -+# define machine_is_olocreek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PALMZ72 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PALMZ72 -+# endif -+# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72) -+#else -+# define machine_is_palmz72() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDB500 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDB500 -+# endif -+# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500) -+#else -+# define machine_is_nxdb500() (0) -+#endif -+ -+#ifdef CONFIG_MACH_APF9328 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_APF9328 -+# endif -+# define machine_is_apf9328() (machine_arch_type == MACH_TYPE_APF9328) -+#else -+# define machine_is_apf9328() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_WIPOQ -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_WIPOQ -+# endif -+# define machine_is_omap_wipoq() (machine_arch_type == MACH_TYPE_OMAP_WIPOQ) -+#else -+# define machine_is_omap_wipoq() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TWIP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TWIP -+# endif -+# define machine_is_omap_twip() (machine_arch_type == MACH_TYPE_OMAP_TWIP) -+#else -+# define machine_is_omap_twip() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTREO650 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTREO650 -+# endif -+# define machine_is_xscale_treo650() (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650) -+#else -+# define machine_is_xscale_treo650() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACUMEN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACUMEN -+# endif -+# define machine_is_acumen() (machine_arch_type == MACH_TYPE_ACUMEN) -+#else -+# define machine_is_acumen() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XP100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XP100 -+# endif -+# define machine_is_xp100() (machine_arch_type == MACH_TYPE_XP100) -+#else -+# define machine_is_xp100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FS2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FS2410 -+# endif -+# define machine_is_fs2410() (machine_arch_type == MACH_TYPE_FS2410) -+#else -+# define machine_is_fs2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA270_CERF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA270_CERF -+# endif -+# define machine_is_pxa270_cerf() (machine_arch_type == MACH_TYPE_PXA270_CERF) -+#else -+# define machine_is_pxa270_cerf() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SQ2FTLPALM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SQ2FTLPALM -+# endif -+# define machine_is_sq2ftlpalm() (machine_arch_type == MACH_TYPE_SQ2FTLPALM) -+#else -+# define machine_is_sq2ftlpalm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BSEMSERVER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BSEMSERVER -+# endif -+# define machine_is_bsemserver() (machine_arch_type == MACH_TYPE_BSEMSERVER) -+#else -+# define machine_is_bsemserver() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETCLIENT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETCLIENT -+# endif -+# define machine_is_netclient() (machine_arch_type == MACH_TYPE_NETCLIENT) -+#else -+# define machine_is_netclient() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTT5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTT5 -+# endif -+# define machine_is_xscale_palmtt5() (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5) -+#else -+# define machine_is_xscale_palmtt5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTC -+# endif -+# define machine_is_xscale_palmtc() (machine_arch_type == MACH_TYPE_OMAP_PALMTC) -+#else -+# define machine_is_xscale_palmtc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_APOLLON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_APOLLON -+# endif -+# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON) -+#else -+# define machine_is_omap_apollon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONLVEVB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONLVEVB -+# endif -+# define machine_is_mxc30030evb() (machine_arch_type == MACH_TYPE_ARGONLVEVB) -+#else -+# define machine_is_mxc30030evb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA_2D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA_2D -+# endif -+# define machine_is_rea_2d() (machine_arch_type == MACH_TYPE_REA_2D) -+#else -+# define machine_is_rea_2d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TI3E524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TI3E524 -+# endif -+# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524) -+#else -+# define machine_is_eti3e524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATEB9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATEB9200 -+# endif -+# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200) -+#else -+# define machine_is_ateb9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AUCKLAND -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AUCKLAND -+# endif -+# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND) -+#else -+# define machine_is_auckland() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AK3320M -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AK3320M -+# endif -+# define machine_is_ak3220m() (machine_arch_type == MACH_TYPE_AK3320M) -+#else -+# define machine_is_ak3220m() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DURAMAX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DURAMAX -+# endif -+# define machine_is_duramax() (machine_arch_type == MACH_TYPE_DURAMAX) -+#else -+# define machine_is_duramax() (0) -+#endif -+ -+#ifdef CONFIG_MACH_N35 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_N35 -+# endif -+# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35) -+#else -+# define machine_is_n35() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PRONGHORN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PRONGHORN -+# endif -+# define machine_is_pronghorn() (machine_arch_type == MACH_TYPE_PRONGHORN) -+#else -+# define machine_is_pronghorn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUNDY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUNDY -+# endif -+# define machine_is_fundy() (machine_arch_type == MACH_TYPE_FUNDY) -+#else -+# define machine_is_fundy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOGICPD_PXA270 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOGICPD_PXA270 -+# endif -+# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270) -+#else -+# define machine_is_logicpd_pxa270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPU777 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPU777 -+# endif -+# define machine_is_cpu777() (machine_arch_type == MACH_TYPE_CPU777) -+#else -+# define machine_is_cpu777() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIMICON9201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIMICON9201 -+# endif -+# define machine_is_simicon9201() (machine_arch_type == MACH_TYPE_SIMICON9201) -+#else -+# define machine_is_simicon9201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LEAP2_HPM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LEAP2_HPM -+# endif -+# define machine_is_leap2_hpm() (machine_arch_type == MACH_TYPE_LEAP2_HPM) -+#else -+# define machine_is_leap2_hpm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM922TXA10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM922TXA10 -+# endif -+# define machine_is_cm922txa10() (machine_arch_type == MACH_TYPE_CM922TXA10) -+#else -+# define machine_is_cm922txa10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA -+# endif -+# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA) -+#else -+# define machine_is_sandgate() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2 -+# endif -+# define machine_is_sandgate2() (machine_arch_type == MACH_TYPE_SANDGATE2) -+#else -+# define machine_is_sandgate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2G -+# endif -+# define machine_is_sandgate2g() (machine_arch_type == MACH_TYPE_SANDGATE2G) -+#else -+# define machine_is_sandgate2g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2P -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2P -+# endif -+# define machine_is_sandgate2p() (machine_arch_type == MACH_TYPE_SANDGATE2P) -+#else -+# define machine_is_sandgate2p() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FRED_JACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FRED_JACK -+# endif -+# define machine_is_fred_jack() (machine_arch_type == MACH_TYPE_FRED_JACK) -+#else -+# define machine_is_fred_jack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TTG_COLOR1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TTG_COLOR1 -+# endif -+# define machine_is_ttg_color1() (machine_arch_type == MACH_TYPE_TTG_COLOR1) -+#else -+# define machine_is_ttg_color1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXEB500HMI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXEB500HMI -+# endif -+# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI) -+#else -+# define machine_is_nxeb500hmi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETDCU8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETDCU8 -+# endif -+# define machine_is_netdcu8() (machine_arch_type == MACH_TYPE_NETDCU8) -+#else -+# define machine_is_netdcu8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML675050_CPU_BOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML675050_CPU_BOA -+# endif -+# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA) -+#else -+# define machine_is_ml675050_cpu_boa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVX538 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVX538 -+# endif -+# define machine_is_ng_fvx538() (machine_arch_type == MACH_TYPE_NG_FVX538) -+#else -+# define machine_is_ng_fvx538() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVS338 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVS338 -+# endif -+# define machine_is_ng_fvs338() (machine_arch_type == MACH_TYPE_NG_FVS338) -+#else -+# define machine_is_ng_fvs338() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4103 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4103 -+# endif -+# define machine_is_pnx4103() (machine_arch_type == MACH_TYPE_PNX4103) -+#else -+# define machine_is_pnx4103() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HESDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HESDB -+# endif -+# define machine_is_hesdb() (machine_arch_type == MACH_TYPE_HESDB) -+#else -+# define machine_is_hesdb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSILO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSILO -+# endif -+# define machine_is_xsilo() (machine_arch_type == MACH_TYPE_XSILO) -+#else -+# define machine_is_xsilo() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESPRESSO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESPRESSO -+# endif -+# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO) -+#else -+# define machine_is_espresso() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMLC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMLC -+# endif -+# define machine_is_emlc() (machine_arch_type == MACH_TYPE_EMLC) -+#else -+# define machine_is_emlc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SISTERON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SISTERON -+# endif -+# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON) -+#else -+# define machine_is_sisteron() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RX1950 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RX1950 -+# endif -+# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950) -+#else -+# define machine_is_rx1950() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TSC_VENUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TSC_VENUS -+# endif -+# define machine_is_tsc_venus() (machine_arch_type == MACH_TYPE_TSC_VENUS) -+#else -+# define machine_is_tsc_venus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101J -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101J -+# endif -+# define machine_is_ds101j() (machine_arch_type == MACH_TYPE_DS101J) -+#else -+# define machine_is_ds101j() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MXC30030ADS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MXC30030ADS -+# endif -+# define machine_is_mxc30030ads() (machine_arch_type == MACH_TYPE_MXC30030ADS) -+#else -+# define machine_is_mxc30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUJITSU_WIMAXSOC -+# endif -+# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC) -+#else -+# define machine_is_fujitsu_wimaxsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DUALPCMODEM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DUALPCMODEM -+# endif -+# define machine_is_dualpcmodem() (machine_arch_type == MACH_TYPE_DUALPCMODEM) -+#else -+# define machine_is_dualpcmodem() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC9312 -+# endif -+# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312) -+#else -+# define machine_is_gesbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCAPACHE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCAPACHE -+# endif -+# define machine_is_htcapache() (machine_arch_type == MACH_TYPE_HTCAPACHE) -+#else -+# define machine_is_htcapache() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP435 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP435 -+# endif -+# define machine_is_ixdp435() (machine_arch_type == MACH_TYPE_IXDP435) -+#else -+# define machine_is_ixdp435() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CATPROVT100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CATPROVT100 -+# endif -+# define machine_is_catprovt100() (machine_arch_type == MACH_TYPE_CATPROVT100) -+#else -+# define machine_is_catprovt100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX1XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX1XX -+# endif -+# define machine_is_picotux1xx() (machine_arch_type == MACH_TYPE_PICOTUX1XX) -+#else -+# define machine_is_picotux1xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX2XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX2XX -+# endif -+# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX) -+#else -+# define machine_is_picotux2xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSMG600 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSMG600 -+# endif -+# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600) -+#else -+# define machine_is_dsmg600() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMPC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMPC2 -+# endif -+# define machine_is_empc2() (machine_arch_type == MACH_TYPE_EMPC2) -+#else -+# define machine_is_empc2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VENTURA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VENTURA -+# endif -+# define machine_is_ventura() (machine_arch_type == MACH_TYPE_VENTURA) -+#else -+# define machine_is_ventura() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PHIDGET_SBC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PHIDGET_SBC -+# endif -+# define machine_is_phidget_sbc() (machine_arch_type == MACH_TYPE_PHIDGET_SBC) -+#else -+# define machine_is_phidget_sbc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IJ3K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IJ3K -+# endif -+# define machine_is_ij3k() (machine_arch_type == MACH_TYPE_IJ3K) -+#else -+# define machine_is_ij3k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PISGAH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PISGAH -+# endif -+# define machine_is_pisgah() (machine_arch_type == MACH_TYPE_PISGAH) -+#else -+# define machine_is_pisgah() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_FSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE -+# endif -+# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE) -+#else -+# define machine_is_omap_fsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG720 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG720 -+# endif -+# define machine_is_sg720() (machine_arch_type == MACH_TYPE_SG720) -+#else -+# define machine_is_sg720() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REDFOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REDFOX -+# endif -+# define machine_is_redfox() (machine_arch_type == MACH_TYPE_REDFOX) -+#else -+# define machine_is_redfox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MYSH_EP9315_1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MYSH_EP9315_1 -+# endif -+# define machine_is_mysh_ep9315_1() (machine_arch_type == MACH_TYPE_MYSH_EP9315_1) -+#else -+# define machine_is_mysh_ep9315_1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPF106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPF106 -+# endif -+# define machine_is_tpf106() (machine_arch_type == MACH_TYPE_TPF106) -+#else -+# define machine_is_tpf106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200KG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200KG -+# endif -+# define machine_is_at91rm9200kg() (machine_arch_type == MACH_TYPE_AT91RM9200KG) -+#else -+# define machine_is_at91rm9200kg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SLEDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SLEDB -+# endif -+# define machine_is_racemt2() (machine_arch_type == MACH_TYPE_SLEDB) -+#else -+# define machine_is_racemt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ONTRACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ONTRACK -+# endif -+# define machine_is_ontrack() (machine_arch_type == MACH_TYPE_ONTRACK) -+#else -+# define machine_is_ontrack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PM1200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PM1200 -+# endif -+# define machine_is_pm1200() (machine_arch_type == MACH_TYPE_PM1200) -+#else -+# define machine_is_pm1200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESS24XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESS24XXX -+# endif -+# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX) -+#else -+# define machine_is_ess24562() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COREMP7 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COREMP7 -+# endif -+# define machine_is_coremp7() (machine_arch_type == MACH_TYPE_COREMP7) -+#else -+# define machine_is_coremp7() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXCODER_6446 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXCODER_6446 -+# endif -+# define machine_is_nexcoder_6446() (machine_arch_type == MACH_TYPE_NEXCODER_6446) -+#else -+# define machine_is_nexcoder_6446() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STVC8380 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STVC8380 -+# endif -+# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380) -+#else -+# define machine_is_stvc8380() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TEKLYNX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TEKLYNX -+# endif -+# define machine_is_teklynx() (machine_arch_type == MACH_TYPE_TEKLYNX) -+#else -+# define machine_is_teklynx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARBONADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARBONADO -+# endif -+# define machine_is_carbonado() (machine_arch_type == MACH_TYPE_CARBONADO) -+#else -+# define machine_is_carbonado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SYSMOS_MP730 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SYSMOS_MP730 -+# endif -+# define machine_is_sysmos_mp730() (machine_arch_type == MACH_TYPE_SYSMOS_MP730) -+#else -+# define machine_is_sysmos_mp730() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SNAPPER_CL15 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SNAPPER_CL15 -+# endif -+# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15) -+#else -+# define machine_is_snapper_cl15() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PGIGIM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PGIGIM -+# endif -+# define machine_is_pgigim() (machine_arch_type == MACH_TYPE_PGIGIM) -+#else -+# define machine_is_pgigim() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTX9160P2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTX9160P2 -+# endif -+# define machine_is_ptx9160p2() (machine_arch_type == MACH_TYPE_PTX9160P2) -+#else -+# define machine_is_ptx9160p2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DCORE1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DCORE1 -+# endif -+# define machine_is_dcore1() (machine_arch_type == MACH_TYPE_DCORE1) -+#else -+# define machine_is_dcore1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VICTORPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VICTORPXA -+# endif -+# define machine_is_victorpxa() (machine_arch_type == MACH_TYPE_VICTORPXA) -+#else -+# define machine_is_victorpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX2DTB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX2DTB -+# endif -+# define machine_is_mx2dtb() (machine_arch_type == MACH_TYPE_MX2DTB) -+#else -+# define machine_is_mx2dtb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA_IREX_ER0100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA_IREX_ER0100 -+# endif -+# define machine_is_pxa_irex_er0100() (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100) -+#else -+# define machine_is_pxa_irex_er0100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMZ71 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMZ71 -+# endif -+# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71) -+#else -+# define machine_is_omap_palmz71() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_DEG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_DEG -+# endif -+# define machine_is_bartec_deg() (machine_arch_type == MACH_TYPE_BARTEC_DEG) -+#else -+# define machine_is_bartec_deg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW50251 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW50251 -+# endif -+# define machine_is_hw50251() (machine_arch_type == MACH_TYPE_HW50251) -+#else -+# define machine_is_hw50251() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IBOX -+# endif -+# define machine_is_ibox() (machine_arch_type == MACH_TYPE_IBOX) -+#else -+# define machine_is_ibox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATLASLH7A404 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATLASLH7A404 -+# endif -+# define machine_is_atlaslh7a404() (machine_arch_type == MACH_TYPE_ATLASLH7A404) -+#else -+# define machine_is_atlaslh7a404() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PT2026 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PT2026 -+# endif -+# define machine_is_pt2026() (machine_arch_type == MACH_TYPE_PT2026) -+#else -+# define machine_is_pt2026() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCALPINE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCALPINE -+# endif -+# define machine_is_htcalpine() (machine_arch_type == MACH_TYPE_HTCALPINE) -+#else -+# define machine_is_htcalpine() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_VTU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_VTU -+# endif -+# define machine_is_bartec_vtu() (machine_arch_type == MACH_TYPE_BARTEC_VTU) -+#else -+# define machine_is_bartec_vtu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VCOREII -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VCOREII -+# endif -+# define machine_is_vcoreii() (machine_arch_type == MACH_TYPE_VCOREII) -+#else -+# define machine_is_vcoreii() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PDNB3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PDNB3 -+# endif -+# define machine_is_pdnb3() (machine_arch_type == MACH_TYPE_PDNB3) -+#else -+# define machine_is_pdnb3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCBEETLES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCBEETLES -+# endif -+# define machine_is_htcbeetles() (machine_arch_type == MACH_TYPE_HTCBEETLES) -+#else -+# define machine_is_htcbeetles() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C6400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C6400 -+# endif -+# define machine_is_s3c6400() (machine_arch_type == MACH_TYPE_S3C6400) -+#else -+# define machine_is_s3c6400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2443 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2443 -+# endif -+# define machine_is_s3c2443() (machine_arch_type == MACH_TYPE_S3C2443) -+#else -+# define machine_is_s3c2443() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_LDK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_LDK -+# endif -+# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK) -+#else -+# define machine_is_omap_ldk() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2460 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2460 -+# endif -+# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460) -+#else -+# define machine_is_smdk2460() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2440 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2440 -+# endif -+# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440) -+#else -+# define machine_is_smdk2440() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2412 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2412 -+# endif -+# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412) -+#else -+# define machine_is_smdk2412() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WEBBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WEBBOX -+# endif -+# define machine_is_webbox() (machine_arch_type == MACH_TYPE_WEBBOX) -+#else -+# define machine_is_webbox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CWWNDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CWWNDP -+# endif -+# define machine_is_cwwndp() (machine_arch_type == MACH_TYPE_CWWNDP) -+#else -+# define machine_is_cwwndp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DRAGON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DRAGON -+# endif -+# define machine_is_dragon() (machine_arch_type == MACH_TYPE_DRAGON) -+#else -+# define machine_is_dragon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OPENDO_CPU_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OPENDO_CPU_BOARD -+# endif -+# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD) -+#else -+# define machine_is_opendo_cpu_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCM2200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCM2200 -+# endif -+# define machine_is_ccm2200() (machine_arch_type == MACH_TYPE_CCM2200) -+#else -+# define machine_is_ccm2200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ETWARM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ETWARM -+# endif -+# define machine_is_etwarm() (machine_arch_type == MACH_TYPE_ETWARM) -+#else -+# define machine_is_etwarm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_M93030 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_M93030 -+# endif -+# define machine_is_m93030() (machine_arch_type == MACH_TYPE_M93030) -+#else -+# define machine_is_m93030() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC7U -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC7U -+# endif -+# define machine_is_cc7u() (machine_arch_type == MACH_TYPE_CC7U) -+#else -+# define machine_is_cc7u() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MTT_RANGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MTT_RANGER -+# endif -+# define machine_is_mtt_ranger() (machine_arch_type == MACH_TYPE_MTT_RANGER) -+#else -+# define machine_is_mtt_ranger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXUS -+# endif -+# define machine_is_nexus() (machine_arch_type == MACH_TYPE_NEXUS) -+#else -+# define machine_is_nexus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DESMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DESMAN -+# endif -+# define machine_is_desman() (machine_arch_type == MACH_TYPE_DESMAN) -+#else -+# define machine_is_desman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BKDE303 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BKDE303 -+# endif -+# define machine_is_bkde303() (machine_arch_type == MACH_TYPE_BKDE303) -+#else -+# define machine_is_bkde303() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2413 -+# endif -+# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413) -+#else -+# define machine_is_smdk2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M7200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M7200 -+# endif -+# define machine_is_aml_m7200() (machine_arch_type == MACH_TYPE_AML_M7200) -+#else -+# define machine_is_aml_m7200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M5900 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M5900 -+# endif -+# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900) -+#else -+# define machine_is_aml_m5900() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG640 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG640 -+# endif -+# define machine_is_sg640() (machine_arch_type == MACH_TYPE_SG640) -+#else -+# define machine_is_sg640() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDG79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDG79524 -+# endif -+# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524) -+#else -+# define machine_is_edg79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AI2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AI2410 -+# endif -+# define machine_is_ai2410() (machine_arch_type == MACH_TYPE_AI2410) -+#else -+# define machine_is_ai2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP465 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP465 -+# endif -+# define machine_is_ixp465() (machine_arch_type == MACH_TYPE_IXP465) -+#else -+# define machine_is_ixp465() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BALLOON3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BALLOON3 -+# endif -+# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3) -+#else -+# define machine_is_balloon3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_QT2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_QT2410 -+# endif -+# define machine_is_qt2410() (machine_arch_type == MACH_TYPE_QT2410) -+#else -+# define machine_is_qt2410() (0) -+#endif -+ - /* - * These have not yet been registered - */ -diff --git a/include/configs/qt2410.h b/include/configs/qt2410.h -new file mode 100644 -index 0000000..627f365 ---- /dev/null -+++ b/include/configs/qt2410.h -@@ -0,0 +1,256 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * Gary Jennejohn -+ * David Mueller -+ * -+ * Configuation settings for the SAMSUNG SMDK2410 board. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if 0 -+/* If we want to start u-boot from usb bootloader in NOR flash */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* If we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#endif -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -+#define CS8900_BASE 0x19000300 -+#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -+#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS \ -+ (CONFIG_CMD_DFL | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_DHCP | \ -+ CFG_CMD_DIAG | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_EXT2 | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_HWFLOW | \ -+ /* CFG_CMD_IDE | */ \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PING | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_USB) -+ -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "root=/dev/sda1 console=ttySAC0,115200 loglevel=8 rootdelay=10" -+/*#define CONFIG_ETHADDR 08:00:3e:26:0a:5b */ -+#define CONFIG_NETMASK 255.255.255.0 -+#define CONFIG_IPADDR 10.0.0.110 -+#define CONFIG_SERVERIP 10.0.0.1 -+/*#define CONFIG_BOOTFILE "elinos-lart" */ -+#define CONFIG_BOOTCOMMAND "mmcinit; ext2load mmc 0 0x32000000 uImage; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+/* IDE/ATA config */ -+ -+#if 0 -+#define CFG_IDE_MAXBUS 1 -+#define CFG_IDE_MAXDEVICE 2 -+#define CFG_IDE_PREINIT 0 -+ -+#define CFG_ATA_BASE_ADDR -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -+ -+#define CFG_FLASH_BASE PHYS_FLASH_1 -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -+#if 0 -+#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -+#endif -+ -+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -+#ifdef CONFIG_AMD_LV800 -+#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -+#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -+#endif -+#ifdef CONFIG_AMD_LV400 -+#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -+#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -+#endif -+ -+/* timeout values are in ticks */ -+#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -+#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+#define CONFIG_EXT2 1 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#endif -+ -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#endif /* __CONFIG_H */ -diff --git a/include/s3c2410.h b/include/s3c2410.h -index 86495f6..913521d 100644 ---- a/include/s3c2410.h -+++ b/include/s3c2410.h -@@ -38,12 +38,6 @@ #define S3C24X0_SPI_CHANNELS 2 - #define S3C2410_ECCSIZE 512 - #define S3C2410_ECCBYTES 3 - --typedef enum { -- S3C24X0_UART0, -- S3C24X0_UART1, -- S3C24X0_UART2 --} S3C24X0_UARTS_NR; -- - /* S3C2410 device base addresses */ - #define S3C24X0_MEMCTL_BASE 0x48000000 - #define S3C24X0_USB_HOST_BASE 0x49000000 -@@ -65,9 +59,23 @@ #define S3C24X0_SPI_BASE 0x59000000 - #define S3C2410_SDI_BASE 0x5A000000 - - -+#define oNFCONF 0x00 -+#define oNFCMD 0x04 -+#define oNFADDR 0x08 -+#define oNFDATA 0x0C -+#define oNFSTAT 0x10 -+#define oNFECC 0x14 -+ -+#ifndef __ASSEMBLER__ -+ - /* include common stuff */ - #include - -+typedef enum { -+ S3C24X0_UART0, -+ S3C24X0_UART1, -+ S3C24X0_UART2 -+} S3C24X0_UARTS_NR; - - static inline S3C24X0_MEMCTL * const S3C24X0_GetBase_MEMCTL(void) - { -@@ -142,6 +150,7 @@ static inline S3C2410_SDI * const S3C241 - return (S3C2410_SDI * const)S3C2410_SDI_BASE; - } - -+#endif - - /* ISR */ - #define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) -diff --git a/include/s3c24x0.h b/include/s3c24x0.h -index 71f35a5..557b91f 100644 ---- a/include/s3c24x0.h -+++ b/include/s3c24x0.h -@@ -637,13 +637,7 @@ typedef struct { - S3C24X0_REG32 SDIDCNT; - S3C24X0_REG32 SDIDSTA; - S3C24X0_REG32 SDIFSTA; --#ifdef __BIG_ENDIAN -- S3C24X0_REG8 res[3]; -- S3C24X0_REG8 SDIDAT; --#else -- S3C24X0_REG8 SDIDAT; -- S3C24X0_REG8 res[3]; --#endif -+ S3C24X0_REG32 SDIDAT; - S3C24X0_REG32 SDIIMSK; - } /*__attribute__((__packed__))*/ S3C2410_SDI; - -@@ -1123,11 +1117,7 @@ #define rSDIDatCon (*(volatile unsigned - #define rSDIDatCnt (*(volatile unsigned *)0x5A000030) - #define rSDIDatSta (*(volatile unsigned *)0x5A000034) - #define rSDIFSTA (*(volatile unsigned *)0x5A000038) --#ifdef __BIG_ENDIAN --#define rSDIDAT (*(volatile unsigned char *)0x5A00003F) --#else --#define rSDIDAT (*(volatile unsigned char *)0x5A00003C) --#endif -+#define rSDIDAT (*(volatile unsigned *)0x5A00003C) - #define rSDIIntMsk (*(volatile unsigned *)0x5A000040) - - #endif diff --git a/packages/uboot/files/u-boot-20060907-gta01.patch b/packages/uboot/files/u-boot-20060907-gta01.patch deleted file mode 100644 index 6aa54fa208..0000000000 --- a/packages/uboot/files/u-boot-20060907-gta01.patch +++ /dev/null @@ -1,901 +0,0 @@ -diff --exclude .git -Nru u-boot/Makefile u-boot.new/Makefile ---- u-boot/Makefile 2006-08-11 23:19:07.000000000 +0200 -+++ u-boot.new/Makefile 2006-10-26 13:02:41.000000000 +0200 -@@ -1641,6 +1641,9 @@ - qt2410_config : unconfig - @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 - -+gta01_config : unconfig -+ @./mkconfig $(@:_config=) arm arm920t gta01 NULL s3c24x0 -+ - scb9328_config : unconfig - @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx - -diff --exclude .git -Nru u-boot/board/gta01/Makefile u-boot.new/board/gta01/Makefile ---- u-boot/board/gta01/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/gta01/Makefile 2006-10-25 17:21:44.000000000 +0200 -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := gta01.o -+SOBJS := lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -diff --exclude .git -Nru u-boot/board/gta01/config.mk u-boot.new/board/gta01/config.mk ---- u-boot/board/gta01/config.mk 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/gta01/config.mk 2006-10-25 17:22:09.000000000 +0200 -@@ -0,0 +1,25 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# FIC GTA01 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# -+# GTA01 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -diff --exclude .git -Nru u-boot/board/gta01/gta01.c u-boot.new/board/gta01/gta01.c ---- u-boot/board/gta01/gta01.c 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/gta01/gta01.c 2006-10-25 17:27:50.000000000 +0200 -@@ -0,0 +1,133 @@ -+/* -+ * (C) 2006 by Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if 1 -+//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x3 -+//#define M_SDIV 0x1 -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#else -+#define M_MDIV 0x5c /* Fout = 150.0MHz */ -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+ -+#if 1 -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+#else -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ -+ gpio->GPBCON = 0x00005056; -+ gpio->GPBUP = 0x000007FF; -+ -+ gpio->GPCCON = 0xAAAA12A8; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x00002AA9; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0xA846F0C0; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0008FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_GTA01; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -diff --exclude .git -Nru u-boot/board/gta01/lowlevel_init.S u-boot.new/board/gta01/lowlevel_init.S ---- u-boot/board/gta01/lowlevel_init.S 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/gta01/lowlevel_init.S 2006-10-25 17:20:42.000000000 +0200 -@@ -0,0 +1,171 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the FIC GTA01 by Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0xb2 -+ .word 0x30 -+ .word 0x30 -diff --exclude .git -Nru u-boot/board/gta01/u-boot.lds u-boot.new/board/gta01/u-boot.lds ---- u-boot/board/gta01/u-boot.lds 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/gta01/u-boot.lds 2006-10-25 17:28:02.000000000 +0200 -@@ -0,0 +1,57 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -diff --exclude .git -Nru u-boot/board/qt2410/qt2410.c.old u-boot.new/board/qt2410/qt2410.c.old ---- u-boot/board/qt2410/qt2410.c.old 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/board/qt2410/qt2410.c.old 2006-10-10 11:09:43.000000000 +0200 -@@ -0,0 +1,127 @@ -+/* -+ * (C) 2006 by Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if 1 -+#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+#define M_PDIV 0x3 -+#define M_SDIV 0x1 -+//#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x7 -+//#define M_SDIV 0x0 -+#else -+#define M_MDIV 0x5c /* Fout = 150.0MHz */ -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+ -+#if 1 -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+#else -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x00044555; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFF95FFBA; -+ //gpio->GPGUP = 0x0000FFFF; -+ gpio->GPGUP = 0x0000AFEF; -+ gpio->GPHCON = 0x0028FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_QT2410; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -diff --exclude .git -Nru u-boot/fs/cramfs/cramfs.c u-boot.new/fs/cramfs/cramfs.c ---- u-boot/fs/cramfs/cramfs.c 2006-07-14 12:41:02.000000000 +0200 -+++ u-boot.new/fs/cramfs/cramfs.c 2006-10-26 14:01:41.000000000 +0200 -@@ -27,7 +27,7 @@ - #include - #include - --#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) -+#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS) - - #include - #include -@@ -343,5 +343,22 @@ - } - return 1; - } -- -+#else -+int cramfs_load (char *loadoffset, struct part_info *info, char *filename) -+{ -+ return -1; -+} -+int cramfs_ls (struct part_info *info, char *filename) -+{ -+ return 0; -+} -+int cramfs_info (struct part_info *info) -+{ -+ return 0; -+} -+int cramfs_check (struct part_info *info) -+{ -+ return 0; -+} - #endif /* CFG_FS_CRAMFS */ -+ -diff --exclude .git -Nru u-boot/include/asm-arm/mach-types.h u-boot.new/include/asm-arm/mach-types.h ---- u-boot/include/asm-arm/mach-types.h 2006-08-11 23:19:07.000000000 +0200 -+++ u-boot.new/include/asm-arm/mach-types.h 2006-10-25 23:55:00.000000000 +0200 -@@ -1038,6 +1038,7 @@ - #define MACH_TYPE_IXP465 1028 - #define MACH_TYPE_BALLOON3 1029 - #define MACH_TYPE_QT2410 1108 -+#define MACH_TYPE_GTA01 1182 - - #ifdef CONFIG_ARCH_EBSA110 - # ifdef machine_arch_type -@@ -13327,6 +13328,19 @@ - # define machine_is_qt2410() (0) - #endif - -+#ifdef CONFIG_MACH_GTA01 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GTA01 -+# endif -+# define machine_is_gta01() (machine_arch_type == MACH_TYPE_GTA01) -+#else -+# define machine_is_gta01() (0) -+#endif -+ -+ - /* - * These have not yet been registered - */ -diff --exclude .git -Nru u-boot/include/configs/gta01.h u-boot.new/include/configs/gta01.h ---- u-boot/include/configs/gta01.h 1970-01-01 01:00:00.000000000 +0100 -+++ u-boot.new/include/configs/gta01.h 2006-10-26 20:21:30.000000000 +0200 -@@ -0,0 +1,233 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * Configuation settings for the FIC GTA01 Linux GSM phone -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+/* we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */ -+//#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LAODB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ CFG_CMD_USB | \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_DIAG | \ -+ /* CFG_CMD_HWFLOW | */ \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -+/*#define CONFIG_BOOTFILE "elinos-lart" */ -+#define CONFIG_BOOTCOMMAND "nand load 0x32000000 0x34000 0x200000; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "GTA01 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#if 1 -+#define CFG_NO_FLASH 1 -+#else -+#define CFG_MAX_FLASH_SECT 1 -+#define CFG_MAX_FLASH_BANKS 1 -+#endif -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+/* EXT2 driver */ -+#define CONFIG_EXT2 1 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT 1 -+ -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+#define CONFIG_JFFS2_NAND_OFF 0x634000 -+#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#endif -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50707 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#endif /* __CONFIG_H */ diff --git a/packages/uboot/files/u-boot-20061030-gta01bv2.patch b/packages/uboot/files/u-boot-20061030-gta01bv2.patch deleted file mode 100644 index 9e2d19338e..0000000000 --- a/packages/uboot/files/u-boot-20061030-gta01bv2.patch +++ /dev/null @@ -1,246 +0,0 @@ -This patch adds support for the GTA01Bv2 variant of the FIC GTA01 (Neo1973) phone - -Index: git/Makefile -=================================================================== ---- git.orig/Makefile 2007-01-04 12:22:12.000000000 +0100 -+++ git/Makefile 2007-01-04 12:22:16.000000000 +0100 -@@ -1918,6 +1918,7 @@ - - gta01_config \ - gta01v3_config \ -+gta01bv2_config \ - gta01v4_config : unconfig - @board/gta01/split_by_variant.sh $@ - -Index: git/board/gta01/gta01.c -=================================================================== ---- git.orig/board/gta01/gta01.c 2007-01-04 12:22:12.000000000 +0100 -+++ git/board/gta01/gta01.c 2007-01-04 12:22:16.000000000 +0100 -@@ -35,28 +35,29 @@ - - DECLARE_GLOBAL_DATA_PTR; - --#if 1 -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) - //#define M_MDIV 0xA1 /* Fout = 202.8MHz */ - //#define M_PDIV 0x3 - //#define M_SDIV 0x1 - #define M_MDIV 0x90 /* Fout = 202.8MHz */ - #define M_PDIV 0x7 - #define M_SDIV 0x0 --#else --#define M_MDIV 0x5c /* Fout = 150.0MHz */ --#define M_PDIV 0x4 -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+#if 0 -+#define M_MDIV 0x7d /* Fout = 266MHz */ -+#define M_PDIV 0x1 -+#define M_SDIV 0x1 -+#endif -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 - #define M_SDIV 0x0 -+#else -+#error Please define GTA01 revision - #endif - --#if 1 - #define U_M_MDIV 0x78 - #define U_M_PDIV 0x2 - #define U_M_SDIV 0x3 --#else --#define U_M_MDIV 0x48 --#define U_M_PDIV 0x3 --#define U_M_SDIV 0x2 --#endif - - static inline void delay (unsigned long loops) - { -@@ -137,7 +138,31 @@ - - gpio->GPHCON = 0x0000FAAA; - gpio->GPHUP = 0x000007FF; -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+ gpio->GPACON = 0x005E47FF; - -+ gpio->GPBCON = 0x00145416; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPBDAT |= 0x4; /* Set GBP2 to high (Flash power-up) */ -+ -+ gpio->GPCCON = 0xAAAA12A9; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xA02AAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000aa19; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPFDAT |= 0x4; /* Set GBF2 to high (nGSM_EN) */ -+ -+ gpio->GPGCON = 0xFF40F0C1; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0000FAAA; -+ gpio->GPHUP = 0x000007FF; - #else - #error Please define GTA01 version - #endif -@@ -156,9 +181,11 @@ - - int board_late_init(void) - { -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) - const char mmc_power = 0x8f; -- /* enable D3REG 3.3V (SC/MMC power) */ -+ /* enable D2REG 3.3V (SC/MMC power) */ - i2c_write(0x08, 0x25, 1, &mmc_power, 1); -+#endif - return 0; - } - -@@ -176,5 +203,7 @@ - return 0x00000130; - #elif defined(CONFIG_ARCH_GTA01_v4) - return 0x00000140; -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+ return 0x00000220; - #endif - } -Index: git/board/gta01/split_by_variant.sh -=================================================================== ---- git.orig/board/gta01/split_by_variant.sh 2007-01-04 12:22:12.000000000 +0100 -+++ git/board/gta01/split_by_variant.sh 2007-01-04 12:22:16.000000000 +0100 -@@ -15,16 +15,23 @@ - case "$1" in - gta01v4_config) - echo "#define CONFIG_ARCH_GTA01_v4" > ${obj}include/config.h -+ echo "GTA01_BIG_FLASH=n" > ${obj}board/gta01/config.tmp - ;; - - gta01v3_config) - echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h -+ echo "GTA01_BIG_FLASH=n" > ${obj}board/gta01/config.tmp - ;; - -+ gta01bv2_config) -+ echo "#define CONFIG_ARCH_GTA01B_v2" > ${obj}include/config.h -+ echo "GTA01_BIG_FLASH=y" > ${obj}board/gta01/config.tmp -+ ;; - - *) - echo "$0:: Unrecognised config - using gta01v3_config" - echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h -+ echo "GTA01_BIG_FLASH=n" > ${obj}board/gta01/config.tmp - ;; - - esac -Index: git/include/configs/gta01.h -=================================================================== ---- git.orig/include/configs/gta01.h 2007-01-04 12:22:12.000000000 +0100 -+++ git/include/configs/gta01.h 2007-01-04 12:22:16.000000000 +0100 -@@ -128,6 +128,8 @@ - #define CFG_PROMPT "GTA01v3 # " /* Monitor Command Prompt */ - #elif defined(CONFIG_ARCH_GTA01_v4) - #define CFG_PROMPT "GTA01v4 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+#define CFG_PROMPT "GTA01Bv2 # " /* Monitor Command Prompt */ - #endif - #define CFG_CBSIZE 256 /* Console I/O Buffer Size */ - #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -@@ -166,7 +168,13 @@ - */ - #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ - #define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) - #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ -+#else -+#error Please define GTA01 variant -+#endif - #define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ - - /*----------------------------------------------------------------------- -Index: git/board/gta01/lowlevel_init.S -=================================================================== ---- git.orig/board/gta01/lowlevel_init.S 2007-01-04 12:22:07.000000000 +0100 -+++ git/board/gta01/lowlevel_init.S 2007-01-04 12:22:16.000000000 +0100 -@@ -108,12 +108,16 @@ - #define B5_PMC 0x0 /* normal */ - - #define B6_MT 0x3 /* SDRAM */ --#define B6_Trcd 0x1 -+#define B6_Trcd 0x1 /* 3clk */ -+#if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) - #define B6_SCAN 0x1 /* 9bit */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+#define B6_SCAN 0x2 /* 10bit */ -+#endif - - #define B7_MT 0x3 /* SDRAM */ - #define B7_Trcd 0x1 /* 3clk */ --#define B7_SCAN 0x1 /* 9bit */ -+#define B7_SCAN 0x2 /* 10bit */ - - /* REFRESH parameter */ - #define REFEN 0x1 /* Refresh enable */ -@@ -149,6 +153,19 @@ - orr r1, r1, #0xc0000000 - mcr p15, 0, r1, c1, c0, 0 - -+#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) -+ /* switch on power for NAND */ -+ ldr r0, =0x56000010 /* GPBCON */ -+ ldr r1, [r0] -+ orr r1, r1, #0x10 -+ str r1, [r0] -+ -+ ldr r0, =0x56000014 /* GPBDAT */ -+ ldr r1, [r0] -+ orr r1, r1, #(1 <<2) -+ str r1, [r0] -+#endif -+ - /* everything is fine now */ - mov pc, lr - -Index: git/board/gta01/config.mk -=================================================================== ---- git.orig/board/gta01/config.mk 2007-01-04 12:22:07.000000000 +0100 -+++ git/board/gta01/config.mk 2007-01-04 12:22:16.000000000 +0100 -@@ -8,18 +8,26 @@ - # see http://www.samsung.com/ for more information on SAMSUNG - # - -+# GTA01v3 has 1 bank of 64 MB SDRAM -+# GTA01v4 has 1 bank of 64 MB SDRAM - # --# GTA01 has 1 bank of 64 MB DRAM -+# 3000'0000 to 3400'0000 -+# we load ourself to 33F8'0000 -+# -+# GTA01Bv2 or later has 1 bank of 128 MB SDRAM - # --# 3000'0000 to 3400'0000 -+# 3000'0000 to 3800'0000 -+# we load ourself to 37F8'0000 - # - # Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 - # optionally with a ramdisk at 3080'0000 - # --# we load ourself to 33F8'0000 --# --# download area is 3300'0000 --# -+# download area is 3200'0000 or 3300'0000 - -+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - -+ifeq ($(GTA01_BIG_RAM),y) -+TEXT_BASE = 0x37F80000 -+else - TEXT_BASE = 0x33F80000 -+endif diff --git a/packages/uboot/files/u-boot-20061030-gta01v4.patch b/packages/uboot/files/u-boot-20061030-gta01v4.patch deleted file mode 100644 index 8910dcf831..0000000000 --- a/packages/uboot/files/u-boot-20061030-gta01v4.patch +++ /dev/null @@ -1,132 +0,0 @@ -Index: git/Makefile -=================================================================== ---- git.orig/Makefile 2007-01-04 12:22:08.000000000 +0100 -+++ git/Makefile 2007-01-04 12:22:12.000000000 +0100 -@@ -1916,8 +1916,10 @@ - qt2410_config : unconfig - @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 - --gta01_config : unconfig -- @./mkconfig $(@:_config=) arm arm920t gta01 NULL s3c24x0 -+gta01_config \ -+gta01v3_config \ -+gta01v4_config : unconfig -+ @board/gta01/split_by_variant.sh $@ - - scb9328_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx -Index: git/board/gta01/gta01.c -=================================================================== ---- git.orig/board/gta01/gta01.c 2007-01-04 12:22:08.000000000 +0100 -+++ git/board/gta01/gta01.c 2007-01-04 12:22:12.000000000 +0100 -@@ -90,6 +90,7 @@ - delay (8000); - - /* set up the I/O ports */ -+#if defined(CONFIG_ARCH_GTA01_v3) - gpio->GPACON = 0x007FFFFF; - - gpio->GPBCON = 0x00005056; -@@ -112,6 +113,34 @@ - - gpio->GPHCON = 0x0008FAAA; - gpio->GPHUP = 0x000007FF; -+#elif defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPACON = 0x007FFFFF; //0x005E47FF; -+ -+ gpio->GPBDAT |= 0x4; /* Set GBP2 to high (Flash power-up) */ -+ gpio->GPBCON = 0x00005056; //0x00045016; -+ gpio->GPBUP = 0x000007FF; -+ -+ gpio->GPCCON = 0xAAAA12A9; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xA02AAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000aa09; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0xFF40F0C1; -+ gpio->GPGUP = 0x0000FFFF; -+ -+ gpio->GPHCON = 0x0000FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+#else -+#error Please define GTA01 version -+#endif - - /* arch number of SMDK2410-Board */ - gd->bd->bi_arch_number = MACH_TYPE_GTA01; -@@ -143,5 +172,9 @@ - - u_int32_t get_board_rev(void) - { -+#if defined(CONFIG_ARCH_GTA01_v3) - return 0x00000130; -+#elif defined(CONFIG_ARCH_GTA01_v4) -+ return 0x00000140; -+#endif - } -Index: git/board/gta01/split_by_variant.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/split_by_variant.sh 2007-01-04 12:22:12.000000000 +0100 -@@ -0,0 +1,36 @@ -+#!/bin/sh -+# --------------------------------------------------------- -+# Set the core module defines according to Core Module -+# --------------------------------------------------------- -+# --------------------------------------------------------- -+# Set up the GTA01 type define -+# --------------------------------------------------------- -+ -+mkdir -p ${obj}include -+if [ "$1" == "" ] -+then -+ echo "$0:: No parameters - using GTA01v3 config" -+ echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h -+else -+ case "$1" in -+ gta01v4_config) -+ echo "#define CONFIG_ARCH_GTA01_v4" > ${obj}include/config.h -+ ;; -+ -+ gta01v3_config) -+ echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h -+ ;; -+ -+ -+ *) -+ echo "$0:: Unrecognised config - using gta01v3_config" -+ echo "#define CONFIG_ARCH_GTA01_v3" > ${obj}include/config.h -+ ;; -+ -+ esac -+ -+fi -+# --------------------------------------------------------- -+# Complete the configuration -+# --------------------------------------------------------- -+$MKCONFIG -a gta01 arm arm920t gta01 NULL s3c24x0 -Index: git/include/configs/gta01.h -=================================================================== ---- git.orig/include/configs/gta01.h 2007-01-04 12:22:08.000000000 +0100 -+++ git/include/configs/gta01.h 2007-01-04 12:22:12.000000000 +0100 -@@ -124,7 +124,11 @@ - * Miscellaneous configurable options - */ - #define CFG_LONGHELP /* undef to save memory */ --#define CFG_PROMPT "GTA01 # " /* Monitor Command Prompt */ -+#if defined(CONFIG_ARCH_GTA01_v3) -+#define CFG_PROMPT "GTA01v3 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01_v4) -+#define CFG_PROMPT "GTA01v4 # " /* Monitor Command Prompt */ -+#endif - #define CFG_CBSIZE 256 /* Console I/O Buffer Size */ - #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ - #define CFG_MAXARGS 16 /* max number of command args */ diff --git a/packages/uboot/files/u-boot-20061030-qt2410-gta01.patch b/packages/uboot/files/u-boot-20061030-qt2410-gta01.patch deleted file mode 100644 index 91f85479bc..0000000000 --- a/packages/uboot/files/u-boot-20061030-qt2410-gta01.patch +++ /dev/null @@ -1,9272 +0,0 @@ -Index: git/Makefile -=================================================================== ---- git.orig/Makefile 2007-01-04 12:21:15.000000000 +0100 -+++ git/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -1913,6 +1913,12 @@ - sbc2410x_config: unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 - -+qt2410_config : unconfig -+ @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 -+ -+gta01_config : unconfig -+ @./mkconfig $(@:_config=) arm arm920t gta01 NULL s3c24x0 -+ - scb9328_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx - -Index: git/board/gta01/Makefile -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := gta01.o -+SOBJS := lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -Index: git/board/gta01/config.mk -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/config.mk 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,25 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# FIC GTA01 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# -+# GTA01 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -Index: git/board/gta01/gta01.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/gta01.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,147 @@ -+/* -+ * (C) 2006 by Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if 1 -+//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x3 -+//#define M_SDIV 0x1 -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#else -+#define M_MDIV 0x5c /* Fout = 150.0MHz */ -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+ -+#if 1 -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+#else -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ -+ gpio->GPBCON = 0x00005056; -+ gpio->GPBUP = 0x000007FF; -+ -+ gpio->GPCCON = 0xAAAA12A8; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x00002AA9; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0xA846F0C0; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0008FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_GTA01; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int board_late_init(void) -+{ -+ const char mmc_power = 0x8f; -+ /* enable D3REG 3.3V (SC/MMC power) */ -+ i2c_write(0x08, 0x25, 1, &mmc_power, 1); -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+u_int32_t get_board_rev(void) -+{ -+ return 0x00000130; -+} -Index: git/board/gta01/lowlevel_init.S -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/lowlevel_init.S 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,171 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the FIC GTA01 by Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0xb2 -+ .word 0x30 -+ .word 0x30 -Index: git/board/gta01/u-boot.lds -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/gta01/u-boot.lds 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,57 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: git/board/qt2410/Makefile -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := qt2410.o flash.o -+SOBJS := lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -Index: git/board/qt2410/config.mk -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/config.mk 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,25 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# -+# SMDK2410 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -Index: git/board/qt2410/flash.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/flash.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,435 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Alex Zuepke -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+ulong myflush (void); -+ -+ -+#define FLASH_BANK_SIZE PHYS_FLASH_SIZE -+#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ -+ -+flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -+ -+ -+#define CMD_READ_ARRAY 0x000000F0 -+#define CMD_UNLOCK1 0x000000AA -+#define CMD_UNLOCK2 0x00000055 -+#define CMD_ERASE_SETUP 0x00000080 -+#define CMD_ERASE_CONFIRM 0x00000030 -+#define CMD_PROGRAM 0x000000A0 -+#define CMD_UNLOCK_BYPASS 0x00000020 -+ -+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) -+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) -+ -+#define BIT_ERASE_DONE 0x00000080 -+#define BIT_RDY_MASK 0x00000080 -+#define BIT_PROGRAM_ERROR 0x00000020 -+#define BIT_TIMEOUT 0x80000000 /* our flag */ -+ -+#define READY 1 -+#define ERR 2 -+#define TMO 4 -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+ulong flash_init (void) -+{ -+ int i, j; -+ ulong size = 0; -+ -+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { -+ ulong flashbase = 0; -+ -+ flash_info[i].flash_id = -+#if defined(CONFIG_AMD_LV400) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV400B & FLASH_TYPEMASK); -+#elif defined(CONFIG_AMD_LV800) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV800B & FLASH_TYPEMASK); -+#else -+#error "Unknown flash configured" -+#endif -+ flash_info[i].size = FLASH_BANK_SIZE; -+ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; -+ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); -+ if (i == 0) -+ flashbase = PHYS_FLASH_1; -+ else -+ panic ("configured too many flash banks!\n"); -+ for (j = 0; j < flash_info[i].sector_count; j++) { -+ if (j <= 3) { -+ /* 1st one is 16 KB */ -+ if (j == 0) { -+ flash_info[i].start[j] = -+ flashbase + 0; -+ } -+ -+ /* 2nd and 3rd are both 8 KB */ -+ if ((j == 1) || (j == 2)) { -+ flash_info[i].start[j] = -+ flashbase + 0x4000 + (j - -+ 1) * -+ 0x2000; -+ } -+ -+ /* 4th 32 KB */ -+ if (j == 3) { -+ flash_info[i].start[j] = -+ flashbase + 0x8000; -+ } -+ } else { -+ flash_info[i].start[j] = -+ flashbase + (j - 3) * MAIN_SECT_SIZE; -+ } -+ } -+ size += flash_info[i].size; -+ } -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_FLASH_BASE, -+ CFG_FLASH_BASE + monitor_flash_len - 1, -+ &flash_info[0]); -+ -+#if 0 -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_ENV_ADDR, -+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); -+#endif -+ -+ return size; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+void flash_print_info (flash_info_t * info) -+{ -+ int i; -+ -+ switch (info->flash_id & FLASH_VENDMASK) { -+ case (AMD_MANUFACT & FLASH_VENDMASK): -+ printf ("AMD: "); -+ break; -+ default: -+ printf ("Unknown Vendor "); -+ break; -+ } -+ -+ switch (info->flash_id & FLASH_TYPEMASK) { -+ case (AMD_ID_LV400B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV400BB (4Mbit)\n"); -+ break; -+ case (AMD_ID_LV800B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV800BB (8Mbit)\n"); -+ break; -+ default: -+ printf ("Unknown Chip Type\n"); -+ goto Done; -+ break; -+ } -+ -+ printf (" Size: %ld MB in %d Sectors\n", -+ info->size >> 20, info->sector_count); -+ -+ printf (" Sector Start Addresses:"); -+ for (i = 0; i < info->sector_count; i++) { -+ if ((i % 5) == 0) { -+ printf ("\n "); -+ } -+ printf (" %08lX%s", info->start[i], -+ info->protect[i] ? " (RO)" : " "); -+ } -+ printf ("\n"); -+ -+ Done:; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+int flash_erase (flash_info_t * info, int s_first, int s_last) -+{ -+ ushort result; -+ int iflag, cflag, prot, sect; -+ int rc = ERR_OK; -+ int chip; -+ -+ /* first look for protection bits */ -+ -+ if (info->flash_id == FLASH_UNKNOWN) -+ return ERR_UNKNOWN_FLASH_TYPE; -+ -+ if ((s_first < 0) || (s_first > s_last)) { -+ return ERR_INVAL; -+ } -+ -+ if ((info->flash_id & FLASH_VENDMASK) != -+ (AMD_MANUFACT & FLASH_VENDMASK)) { -+ return ERR_UNKNOWN_FLASH_VENDOR; -+ } -+ -+ prot = 0; -+ for (sect = s_first; sect <= s_last; ++sect) { -+ if (info->protect[sect]) { -+ prot++; -+ } -+ } -+ if (prot) -+ return ERR_PROTECTED; -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ /* Start erase on unprotected sectors */ -+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { -+ printf ("Erasing sector %2d ... ", sect); -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ if (info->protect[sect] == 0) { /* not protected */ -+ vu_short *addr = (vu_short *) (info->start[sect]); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ *addr = CMD_ERASE_CONFIRM; -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > -+ CFG_FLASH_ERASE_TOUT) { -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ chip = TMO; -+ break; -+ } -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_ERASE_DONE) -+ chip = READY; -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) -+ chip = ERR; -+ -+ } while (!chip); -+ -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ -+ if (chip == ERR) { -+ rc = ERR_PROG_ERROR; -+ goto outahere; -+ } -+ if (chip == TMO) { -+ rc = ERR_TIMOUT; -+ goto outahere; -+ } -+ -+ printf ("ok.\n"); -+ } else { /* it was protected */ -+ -+ printf ("protected!\n"); -+ } -+ } -+ -+ if (ctrlc ()) -+ printf ("User Interrupt!\n"); -+ -+ outahere: -+ /* allow flash to settle - wait 10 ms */ -+ udelay_masked (10000); -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash -+ */ -+ -+volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) -+{ -+ vu_short *addr = (vu_short *) dest; -+ ushort result; -+ int rc = ERR_OK; -+ int cflag, iflag; -+ int chip; -+ -+ /* -+ * Check if Flash is (sufficiently) erased -+ */ -+ result = *addr; -+ if ((result & data) != data) -+ return ERR_NOT_ERASED; -+ -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; -+ *addr = CMD_PROGRAM; -+ *addr = data; -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { -+ chip = ERR | TMO; -+ break; -+ } -+ if (!chip && ((result & 0x80) == (data & 0x80))) -+ chip = READY; -+ -+ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { -+ result = *addr; -+ -+ if ((result & 0x80) == (data & 0x80)) -+ chip = READY; -+ else -+ chip = ERR; -+ } -+ -+ } while (!chip); -+ -+ *addr = CMD_READ_ARRAY; -+ -+ if (chip == ERR || *addr != data) -+ rc = ERR_PROG_ERROR; -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash. -+ */ -+ -+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -+{ -+ ulong cp, wp; -+ int l; -+ int i, rc; -+ ushort data; -+ -+ wp = (addr & ~1); /* get lower word aligned address */ -+ -+ /* -+ * handle unaligned start bytes -+ */ -+ if ((l = addr - wp) != 0) { -+ data = 0; -+ for (i = 0, cp = wp; i < l; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ for (; i < 2 && cnt > 0; ++i) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ ++cp; -+ } -+ for (; cnt == 0 && i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ wp += 2; -+ } -+ -+ /* -+ * handle word aligned part -+ */ -+ while (cnt >= 2) { -+ data = *((vu_short *) src); -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ src += 2; -+ wp += 2; -+ cnt -= 2; -+ } -+ -+ if (cnt == 0) { -+ return ERR_OK; -+ } -+ -+ /* -+ * handle unaligned tail bytes -+ */ -+ data = 0; -+ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ } -+ for (; i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ return write_hword (info, wp, data); -+} -Index: git/board/qt2410/lowlevel_init.S -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/lowlevel_init.S 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,173 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the Samsung SMDK2410 by -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0xb2 -+ .word 0x30 -+ .word 0x30 -Index: git/board/qt2410/qt2410.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/qt2410.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,127 @@ -+/* -+ * (C) 2006 by Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if 1 -+//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x3 -+//#define M_SDIV 0x1 -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#else -+#define M_MDIV 0x5c /* Fout = 150.0MHz */ -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+ -+#if 1 -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+#else -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x00044555; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFF95FFBA; -+ //gpio->GPGUP = 0x0000FFFF; -+ gpio->GPGUP = 0x0000AFEF; -+ gpio->GPHCON = 0x0028FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_QT2410; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -Index: git/board/qt2410/u-boot.lds -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/board/qt2410/u-boot.lds 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,57 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: git/common/Makefile -=================================================================== ---- git.orig/common/Makefile 2007-01-04 12:21:15.000000000 +0100 -+++ git/common/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -28,7 +28,7 @@ - AOBJS = - - COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o \ -- cmd_ace.o cmd_autoscript.o \ -+ cmd_ace.o cmd_arm920.o cmd_autoscript.o \ - cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \ - cmd_cache.o cmd_console.o \ - cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \ -Index: git/common/cmd_arm920.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/common/cmd_arm920.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,64 @@ -+/* -+ * (C) Copyright 2003 -+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+/* -+ * Boot support -+ */ -+#include -+#include -+#include /* for print_IPaddr */ -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if (CONFIG_COMMANDS & CFG_CMD_BDI) -+ -+extern unsigned long read_p15_c1(void); -+extern void write_p15_c1(unsigned long); -+ -+int do_arm920 ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ int i; -+ -+ if (strcmp(argv[1], "cp15c1")) { -+ printf("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ if (!strcmp(argv[2], "write")) { -+ ulong val = simple_strtoul(argv[3], NULL, 16); -+ printf("setting cp15c1 to 0x%08x\n", val); -+ write_p15_c1(val); -+ } else if (!strcmp(argv[2], "read")) -+ printf("cp15c1 = 0x%08x\n", read_p15_c1()); -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------- */ -+ -+U_BOOT_CMD( -+ arm920, 4, 1, do_arm920, -+ "arm920_cp15 - print cp15", -+ NULL -+); -+#endif /* CFG_CMD_BDI */ -Index: git/cpu/arm920t/cpu.c -=================================================================== ---- git.orig/cpu/arm920t/cpu.c 2007-01-04 12:21:15.000000000 +0100 -+++ git/cpu/arm920t/cpu.c 2007-01-04 12:21:18.000000000 +0100 -@@ -38,7 +38,7 @@ - #endif - - /* read co-processor 15, register #1 (control register) */ --static unsigned long read_p15_c1 (void) -+unsigned long read_p15_c1 (void) - { - unsigned long value; - -@@ -55,7 +55,7 @@ - } - - /* write to co-processor 15, register #1 (control register) */ --static void write_p15_c1 (unsigned long value) -+void write_p15_c1 (unsigned long value) - { - #ifdef MMU_DEBUG - printf ("write %08lx to p15/c1\n", value); -Index: git/cpu/arm920t/s3c24x0/Makefile -=================================================================== ---- git.orig/cpu/arm920t/s3c24x0/Makefile 2007-01-04 12:21:15.000000000 +0100 -+++ git/cpu/arm920t/s3c24x0/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -26,7 +26,7 @@ - LIB = $(obj)lib$(SOC).a - - COBJS = i2c.o interrupts.o serial.o speed.o \ -- usb_ohci.o -+ usb_ohci.o mmc.o nand_read.o nand.o - - SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -Index: git/cpu/arm920t/s3c24x0/mmc.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/cpu/arm920t/s3c24x0/mmc.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,568 @@ -+/* -+ * u-boot S3C2410 MMC/SD card driver -+ * (C) Copyright 2006 by Harald Welte -+ * -+ * based on u-boot pxa MMC driver and linux/drivers/mmc/s3c2410mci.c -+ * (C) 2005-2005 Thomas Kleffel -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_MMC -+ -+#define CONFIG_MMC_WIDE -+ -+//#define MMC_DEBUG -+ -+#ifdef MMC_DEBUG -+#ifdef debug -+#undef debug -+#endif -+#define debug printf -+#endif -+ -+static S3C2410_SDI *sdi; -+ -+extern int -+fat_register_device(block_dev_desc_t *dev_desc, int part_no); -+ -+static block_dev_desc_t mmc_dev; -+ -+block_dev_desc_t * mmc_get_dev(int dev) -+{ -+ return ((block_dev_desc_t *)&mmc_dev); -+} -+ -+/* -+ * FIXME needs to read cid and csd info to determine block size -+ * and other parameters -+ */ -+static uchar mmc_buf[MMC_BLOCK_SIZE]; -+static mmc_csd_t mmc_csd; -+static int mmc_ready = 0; -+static int wide = 0; -+ -+ -+#define CMD_F_RESP 0x01 -+#define CMD_F_RESP_LONG 0x02 -+ -+static u_int32_t * -+/****************************************************/ -+mmc_cmd(ushort cmd, ulong arg, ushort flags) -+/****************************************************/ -+{ -+ static u_int32_t resp[5]; -+ ulong status; -+ int i; -+ -+ u_int32_t ccon, csta; -+ u_int32_t csta_rdy_bit = S3C2410_SDICMDSTAT_CMDSENT; -+ -+ memset(resp, 0, sizeof(resp)); -+ -+ debug("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags); -+ -+ sdi->SDICSTA = 0xffffffff; -+ sdi->SDIDSTA = 0xffffffff; -+ sdi->SDIFSTA = 0xffffffff; -+ -+ sdi->SDICARG = arg; -+ -+ ccon = cmd & S3C2410_SDICMDCON_INDEX; -+ ccon |= S3C2410_SDICMDCON_SENDERHOST|S3C2410_SDICMDCON_CMDSTART; -+ -+ if (flags & CMD_F_RESP) { -+ ccon |= S3C2410_SDICMDCON_WAITRSP; -+ csta_rdy_bit = S3C2410_SDICMDSTAT_RSPFIN; /* 1 << 9 */ -+ } -+ -+ if (flags & CMD_F_RESP_LONG) -+ ccon |= S3C2410_SDICMDCON_LONGRSP; -+ -+ sdi->SDICCON = ccon; -+ -+ while (1) { -+ csta = sdi->SDICSTA; -+ if (csta & csta_rdy_bit) -+ break; -+ if (csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) { -+ printf("===============> MMC CMD Timeout\n"); -+ sdi->SDICSTA |= S3C2410_SDICMDSTAT_CMDTIMEOUT; -+ break; -+ } -+ } -+ -+ debug("final MMC CMD status 0x%x\n", csta); -+ -+ sdi->SDICSTA |= csta_rdy_bit; -+ -+ if (flags & CMD_F_RESP) { -+ resp[0] = sdi->SDIRSP0; -+ resp[1] = sdi->SDIRSP1; -+ resp[2] = sdi->SDIRSP2; -+ resp[3] = sdi->SDIRSP3; -+ } -+ -+#if 0 -+ for (i=0; i<4; i ++) { -+ debug("MMC resp[%d] = 0x%08x\n", i, resp[i]); -+ } -+#endif -+ -+ return resp; -+} -+ -+#define FIFO_FILL(host) ((host->SDIFSTA & S3C2410_SDIFSTA_COUNTMASK) >> 2) -+ -+static int -+/****************************************************/ -+mmc_block_read(uchar *dst, ulong src, ulong len) -+/****************************************************/ -+{ -+ u_int32_t dcon, fifo; -+ u_int32_t *dst_u32 = (u_int32_t *)dst; -+ u_int32_t *resp; -+ -+ if (len == 0) { -+ return 0; -+ } -+ -+ debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len); -+ -+ /* set block len */ -+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, len, CMD_F_RESP); -+ sdi->SDIBSIZE = len; -+ -+ //sdi->SDIPRE = 0xff; -+ -+ /* setup data */ -+ dcon = (len >> 9) & S3C2410_SDIDCON_BLKNUM_MASK; -+ dcon |= S3C2410_SDIDCON_BLOCKMODE; -+ dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; -+ if (wide) -+ dcon |= S3C2410_SDIDCON_WIDEBUS; -+ sdi->SDIDCON = dcon; -+ -+ /* send read command */ -+ resp = mmc_cmd(MMC_CMD_READ_BLOCK, src, CMD_F_RESP); -+ -+ while (len > 0) { -+ u_int32_t sdidsta = sdi->SDIDSTA; -+ fifo = FIFO_FILL(sdi); -+ if (sdidsta & (S3C2410_SDIDSTA_FIFOFAIL| -+ S3C2410_SDIDSTA_CRCFAIL| -+ S3C2410_SDIDSTA_RXCRCFAIL| -+ S3C2410_SDIDSTA_DATATIMEOUT)) { -+ printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta); -+ return -EIO; -+ } -+ -+ while (fifo--) { -+ //debug("dst_u32 = 0x%08x\n", dst_u32); -+ *(dst_u32++) = sdi->SDIDAT; -+ if (len >= 4) -+ len -= 4; -+ else { -+ len = 0; -+ break; -+ } -+ } -+ } -+ -+#if 1 -+ debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+ while (!(sdi->SDIDSTA & (1 << 4))) {} -+ debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+#endif -+ -+ sdi->SDIDCON = 0; -+ -+#if 0 -+ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH)) -+ printf("mmc_block_read; transfer not finished!\n"); -+#endif -+ -+ return 0; -+} -+ -+static int -+/****************************************************/ -+mmc_block_write(ulong dst, uchar *src, int len) -+/****************************************************/ -+{ -+#if 0 -+ uchar *resp; -+ ushort argh, argl; -+ ulong status; -+ -+ if (len == 0) { -+ return 0; -+ } -+ -+ debug("mmc_block_wr dst %lx src %lx len %d\n", dst, (ulong)src, len); -+ -+ argh = len >> 16; -+ argl = len & 0xffff; -+ -+ /* set block len */ -+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, argh, argl, CMD_F_RESP); -+ -+ /* send write command */ -+ argh = dst >> 16; -+ argl = dst & 0xffff; -+ MMC_STRPCL = MMC_STRPCL_STOP_CLK; -+ MMC_NOB = 1; -+ MMC_BLKLEN = len; -+ resp = mmc_cmd(MMC_CMD_WRITE_BLOCK, dst, CMD_F_RESP, -+ MMC_CMDAT_R1|MMC_CMDAT_WRITE|MMC_CMDAT_BLOCK|MMC_CMDAT_DATA_EN); -+ -+ MMC_I_MASK = ~MMC_I_MASK_TXFIFO_WR_REQ; -+ while (len) { -+ if (MMC_I_REG & MMC_I_REG_TXFIFO_WR_REQ) { -+ int i, bytes = min(32,len); -+ -+ for (i=0; iread_bl_len << 12; -+ mult = csd->c_size_mult1 << 8; -+ blocknr = (csd->c_size+1) * mult; -+ -+ return blocknr * block_len; -+} -+ -+int -+/****************************************************/ -+mmc_init(int verbose) -+/****************************************************/ -+{ -+ int retries, rc = -ENODEV; -+ int is_sd = 0; -+ u_int32_t *resp; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ sdi = S3C2410_GetBase_SDI(); -+ -+ debug("mmc_init(PCLK=%u)\n", get_PCLK()); -+ -+ clk_power->CLKCON |= (1 << 9); -+ -+ /* S3C2410 has some bug that prevents reliable operation at higher speed */ -+ //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIBSIZE = 512; -+ sdi->SDIDTIMER = 0xffff; -+ sdi->SDIIMSK = 0x0; -+ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; -+ udelay(125000); /* FIXME: 74 SDCLK cycles */ -+ -+ mmc_csd.c_size = 0; -+ -+ /* reset */ -+ retries = 10; -+ resp = mmc_cmd(MMC_CMD_RESET, 0, 0); -+ -+ printf("trying to detect SD Card...\n"); -+ while (retries--) { -+ int i; -+ udelay(100000); -+ resp = mmc_cmd(55, 0x00000000, CMD_F_RESP); -+ resp = mmc_cmd(41, 0x00300000, CMD_F_RESP); -+ -+ if (resp[0] & (1 << 31)) { -+ is_sd = 1; -+ break; -+ } -+ } -+ -+ if (retries == 0 && !is_sd) { -+ retries = 10; -+ printf("failed to detect SD Card, trying MMC\n"); -+ resp = mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ffc000, CMD_F_RESP); -+ while (retries-- && resp && !(resp[4] & 0x80)) { -+ debug("resp %x %x\n", resp[0], resp[1]); -+ udelay(50); -+ resp = mmc_cmd(1, 0x00ffff00, CMD_F_RESP); -+ } -+ } -+ -+ /* try to get card id */ -+ resp = mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ /* TODO configure mmc driver depending on card attributes */ -+ mmc_cid_t *cid = (mmc_cid_t *)resp; -+ if (verbose) { -+ printf("MMC found. Card desciption is:\n"); -+ printf("Manufacturer ID = %02x%02x%02x\n", -+ cid->id[0], cid->id[1], cid->id[2]); -+ printf("HW/FW Revision = %x %x\n",cid->hwrev, cid->fwrev); -+ cid->hwrev = cid->fwrev = 0; /* null terminate string */ -+ printf("Product Name = %s\n",cid->name); -+ printf("Serial Number = %02x%02x%02x\n", -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ printf("Month = %d\n",cid->month); -+ printf("Year = %d\n",1997 + cid->year); -+ } -+ /* fill in device description */ -+ mmc_dev.if_type = IF_TYPE_MMC; -+ mmc_dev.part_type = PART_TYPE_DOS; -+ mmc_dev.dev = 0; -+ mmc_dev.lun = 0; -+ mmc_dev.type = 0; -+ /* FIXME fill in the correct size (is set to 32MByte) */ -+ mmc_dev.blksz = 512; -+ mmc_dev.lba = 0x10000; -+ sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x", -+ cid->id[0], cid->id[1], cid->id[2], -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ sprintf(mmc_dev.product,"%s",cid->name); -+ sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev); -+ mmc_dev.removable = 0; -+ mmc_dev.block_read = mmc_bread; -+ -+ /* MMC exists, get CSD too */ -+ resp = mmc_cmd(MMC_CMD_SET_RCA, MMC_DEFAULT_RCA, CMD_F_RESP); -+ if (is_sd) -+ rca = resp[0] >> 16; -+ -+ resp = mmc_cmd(MMC_CMD_SEND_CSD, rca<<16, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ mmc_csd_t *csd = (mmc_csd_t *)resp; -+ memcpy(&mmc_csd, csd, sizeof(csd)); -+ rc = 0; -+ mmc_ready = 1; -+ /* FIXME add verbose printout for csd */ -+ printf("READ_BL_LEN=%u, C_SIZE_MULT=%u, C_SIZE=%u\n", -+ csd->read_bl_len, csd->c_size_mult1, csd->c_size); -+ printf("size = %u\n", mmc_size(csd)); -+ } -+ } -+ -+ resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca<<16, CMD_F_RESP); -+ -+#ifdef CONFIG_MMC_WIDE -+ if (is_sd) { -+ resp = mmc_cmd(55, rca<<16, CMD_F_RESP); -+ resp = mmc_cmd(6, 0x02, CMD_F_RESP); -+ wide = 1; -+ } -+#endif -+ -+ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */ -+ -+ return rc; -+} -+ -+int -+mmc_ident(block_dev_desc_t *dev) -+{ -+ return 0; -+} -+ -+int -+mmc2info(ulong addr) -+{ -+ /* FIXME hard codes to 32 MB device */ -+ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000) { -+ return 1; -+ } -+ return 0; -+} -+ -+#endif /* CONFIG_MMC */ -Index: git/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/cpu/arm920t/s3c24x0/nand.c 2007-01-04 12:21:45.000000000 +0100 -@@ -0,0 +1,213 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if 0 -+#define DEBUGN printf -+#else -+#define DEBUGN(x, args ...) {} -+#endif -+ -+#if (CONFIG_COMMANDS & CFG_CMD_NAND) -+#if !defined(CFG_NAND_LEGACY) -+ -+#include -+#include -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+ -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#define S3C2410_NFCONF_EN (1<<15) -+#define S3C2410_NFCONF_512BYTE (1<<14) -+#define S3C2410_NFCONF_4STEP (1<<13) -+#define S3C2410_NFCONF_INITECC (1<<12) -+#define S3C2410_NFCONF_nFCE (1<<11) -+#define S3C2410_NFCONF_TACLS(x) ((x)<<8) -+#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) -+#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) -+ -+static u16 s3c2410_read_word(struct mtd_info *mtd) -+{ -+ unsigned char byte = 0; -+ -+ printf("s3c2410_read_word: WARNING, this function is not implemented yet\n"); -+ return byte; -+} -+ -+static void s3c2410_write_word(struct mtd_info *mtd, u16 word) -+{ -+ printf("s3c2410_write_word: WARNING, this function is not implemented yet\n"); -+} -+ -+static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) -+{ -+ struct nand_chip *chip = mtd->priv; -+ -+ DEBUGN("hwcontrol(): 0x%02x: ", cmd); -+ -+ switch (cmd) { -+ case NAND_CTL_SETNCE: -+ NFCONF &= ~S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_CLRNCE: -+ NFCONF |= S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_SETALE: -+ chip->IO_ADDR_W = NF_BASE + 0x8; -+ DEBUGN("SETALE\n"); -+ break; -+ case NAND_CTL_SETCLE: -+ chip->IO_ADDR_W = NF_BASE + 0x4; -+ DEBUGN("SETCLE\n"); -+ break; -+ default: -+ chip->IO_ADDR_W = NF_BASE + 0xc; -+ break; -+ } -+ return; -+} -+ -+static int s3c2410_dev_ready(struct mtd_info *mtd) -+{ -+ DEBUGN("dev_ready\n"); -+ return (NFSTAT & 0x01); -+} -+ -+static void s3c2410_cmdfunc(struct mtd_info *mtd, unsigned cmd, -+ int column, int page_addr) -+{ -+ DEBUGN("cmdfunc(): 0x%02x, col=%d, page=%d\n", cmd, column, page_addr); -+ -+ switch (cmd) { -+ case NAND_CMD_READ0: -+ case NAND_CMD_READ1: -+ case NAND_CMD_READOOB: -+ NFCMD = cmd; -+ NFADDR = column & 0xff; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_READID: -+ NFCMD = cmd; -+ NFADDR = 0; -+ break; -+ case NAND_CMD_PAGEPROG: -+ NFCMD = cmd; -+ printf("PAGEPROG not implemented\n"); -+ break; -+ case NAND_CMD_ERASE1: -+ NFCMD = cmd; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_ERASE2: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_SEQIN: -+ printf("SEQIN not implemented\n"); -+ break; -+ case NAND_CMD_STATUS: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_RESET: -+ NFCMD = cmd; -+ break; -+ default: -+ break; -+ } -+ -+ while (!s3c2410_dev_ready(mtd)); -+} -+ -+int board_nand_init(struct nand_chip *nand) -+{ -+ u_int32_t cfg; -+ u_int8_t tacls, twrph0, twrph1; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ DEBUGN("board_nand_init()\n"); -+ -+ clk_power->CLKCON |= (1 << 4); -+ -+ /* initialize hardware */ -+ twrph0 = 3; twrph1 = 0; tacls = 0; -+ -+ /* default timings: maximum */ -+ //twrph0 = 8; twrph1 = 8; tacls = 8; -+ -+ cfg = S3C2410_NFCONF_EN; -+ cfg |= S3C2410_NFCONF_TACLS(tacls - 1); -+ cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); -+ cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); -+ -+ //NFCONF = cfg; -+ NFCONF = 0xf842; -+ -+ /* initialize nand_chip data structure */ -+ nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; -+ -+ /* read_buf and write_buf are default */ -+ /* read_byte and write_byte are default */ -+ -+ /* need to override word read/write since default routines try 16bit wide -+ * register access of an (in our case) 8bit register */ -+ nand->read_word = s3c2410_read_word; -+ nand->write_word = s3c2410_write_word; -+ -+ /* hwcontrol always must be implemented */ -+ nand->hwcontrol = s3c2410_hwcontrol; -+ -+ nand->dev_ready = s3c2410_dev_ready; -+ -+ nand->eccmode = NAND_ECC_SOFT; -+ nand->options = 0; -+ //nand->waitfunc = dfc_wait; -+ -+ //nand->cmdfunc = s3c2410_cmdfunc; -+ //nand->autooob = &delta_oob; -+ //nand->badblock_pattern = &delta_bbt_descr; -+ -+#if 0 -+ /* reset */ -+ nand->hwcontrol(NULL, NAND_CTL_SETNCE); -+ nand->cmdfunc(NULL, NAND_CMD_RESET, -1, -1); -+ while (nand->dev_ready(NULL) == 0) {} -+ nand->hwcontrol(NULL, NAND_CTL_CLRNCE); -+#endif -+ -+ DEBUGN("end of nand_init\n"); -+ return 0; -+} -+ -+#else -+ #error "U-Boot legacy NAND support not available for S3C2410" -+#endif -+#endif -Index: git/cpu/arm920t/s3c24x0/nand_read.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/cpu/arm920t/s3c24x0/nand_read.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,75 @@ -+/* -+ * nand_read.c: Simple NAND read functions for booting from NAND -+ * -+ * Taken from GPLv2 licensed vivi bootloader, -+ * Copyright (C) 2002 MIZI Research, Inc. -+ * -+ * Author: Hwang, Chideok -+ * Date : $Date: 2004/02/04 10:37:37 $ -+ * -+ * u-boot integration (C) 2006 by Harald Welte -+ */ -+ -+#include -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#define BUSY 1 -+inline void wait_idle(void) { -+ int i; -+ -+ while(!(NFSTAT & BUSY)) -+ for(i=0; i<10; i++); -+} -+ -+#define NAND_SECTOR_SIZE 512 -+#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) -+ -+/* low level nand read function */ -+int -+nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) -+{ -+ int i, j; -+ -+ if ((start_addr & NAND_BLOCK_MASK) || (size & NAND_BLOCK_MASK)) { -+ return -1; /* invalid alignment */ -+ } -+ -+ /* chip Enable */ -+ NFCONF &= ~0x800; -+ for(i=0; i<10; i++); -+ -+ for(i=start_addr; i < (start_addr + size);) { -+ /* READ0 */ -+ NFCMD = 0; -+ -+ /* Write Address */ -+ NFADDR = i & 0xff; -+ NFADDR = (i >> 9) & 0xff; -+ NFADDR = (i >> 17) & 0xff; -+ NFADDR = (i >> 25) & 0xff; -+ -+ wait_idle(); -+ -+ for(j=0; j < NAND_SECTOR_SIZE; j++, i++) { -+ *buf = (NFDATA & 0xff); -+ buf++; -+ } -+ } -+ -+ /* chip Disable */ -+ NFCONF |= 0x800; /* chip disable */ -+ -+ return 0; -+} -+ -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -Index: git/cpu/arm920t/start.S -=================================================================== ---- git.orig/cpu/arm920t/start.S 2007-01-04 12:21:15.000000000 +0100 -+++ git/cpu/arm920t/start.S 2007-01-04 12:21:18.000000000 +0100 -@@ -5,6 +5,10 @@ - * Copyright (c) 2002 Alex Züpke - * Copyright (c) 2002 Gary Jennejohn - * -+ * S3C2410 NAND portions -+ * Copyright (c) 2001 MIZI Research, Inc. -+ * Copyright (c) 2006 Harald Welte -+ * - * See file CREDITS for list of people who contributed to this - * project. - * -@@ -27,6 +31,7 @@ - - #include - #include -+#include - - - /* -@@ -158,9 +163,17 @@ - */ - #ifndef CONFIG_SKIP_LOWLEVEL_INIT - bl cpu_init_crit -+#else -+ /* QT2410: configure bank 3 correctly to make ethernet work */ -+ ldr r1, =0x48000000 -+ ldr r2, =0x00001f4c -+ str r2, [r1, #0x10] -+ ldr r2, =0x2211d122 -+ str r2, [r1] - #endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT -+#ifndef CONFIG_S3C2410_NAND_BOOT - relocate: /* relocate U-Boot to RAM */ - adr r0, _start /* r0 <- current position of code */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ -@@ -177,6 +190,93 @@ - stmia r1!, {r3-r10} /* copy to target address [r1] */ - cmp r0, r2 /* until source end addreee [r2] */ - ble copy_loop -+#else /* NAND_BOOT */ -+relocate: -+copy_myself: -+ /* mov r10, lr */ -+ -+ @ reset NAND -+ mov r1, #S3C2410_NAND_BASE -+ ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 -+ str r2, [r1, #oNFCONF] -+ ldr r2, [r1, #oNFCONF] -+ bic r2, r2, #0x800 @ enable chip -+ str r2, [r1, #oNFCONF] -+ mov r2, #0xff @ RESET command -+ strb r2, [r1, #oNFCMD] -+ mov r3, #0 @ wait -+1: add r3, r3, #0x1 -+ cmp r3, #0xa -+ blt 1b -+2: ldr r2, [r1, #oNFSTAT] @ wait ready -+ tst r2, #0x1 -+ beq 2b -+ ldr r2, [r1, #oNFCONF] -+ orr r2, r2, #0x800 @ disable chip -+ str r2, [r1, #oNFCONF] -+ -+#if 0 -+ @ get ready to call C functions (for nand_read()) -+ ldr sp, DW_STACK_START @ setup stack pointer -+ mov fp, #0 @ no previous frame, so fp=0 -+#else -+ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ -+ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ -+ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ -+#ifdef CONFIG_USE_IRQ -+ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) -+#endif -+ sub sp, r0, #12 /* leave 3 words for abort-stack */ -+#endif -+ -+ @ copy u-boot to RAM -+ ldr r0, _TEXT_BASE -+ mov r1, #0x0 -+ mov r2, #0x30000 -+ bl nand_read_ll -+ -+ tst r0, #0x0 -+ beq ok_nand_read -+#ifdef CONFIG_DEBUG_LL -+bad_nand_read: -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+1: b 1b @ infinite loop -+#endif -+ -+ok_nand_read: -+#ifdef CONFIG_DEBUG_LL -+ ldr r0, STR_OK -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+ -+ @ verify -+ mov r0, #0 -+ @ldr r1, =0x33f00000 -+ ldr r1, _TEXT_BASE -+ mov r2, #0x400 @ 4 bytes * 1024 = 4K-bytes -+go_next: -+ ldr r3, [r0], #4 -+ ldr r4, [r1], #4 -+ teq r3, r4 -+ bne notmatch -+ subs r2, r2, #4 -+ beq done_nand_read -+ bne go_next -+notmatch: -+#ifdef CONFIG_DEBUG_LL -+ sub r0, r0, #4 -+ ldr r1, SerBase -+ bl PrintHexWord -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+1: b 1b -+done_nand_read: -+#endif /* NAND_BOOT */ - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ -Index: git/drivers/Makefile -=================================================================== ---- git.orig/drivers/Makefile 2007-01-04 12:21:15.000000000 +0100 -+++ git/drivers/Makefile 2007-01-04 12:21:18.000000000 +0100 -@@ -51,7 +51,7 @@ - ks8695eth.o \ - pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ - rpx_pcmcia.o \ -- fsl_i2c.o -+ fsl_i2c.o s3c2410_fb.o - - SRCS := $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(COBJS)) -Index: git/drivers/cs8900.c -=================================================================== ---- git.orig/drivers/cs8900.c 2007-01-04 12:21:15.000000000 +0100 -+++ git/drivers/cs8900.c 2007-01-04 12:21:18.000000000 +0100 -@@ -120,6 +120,7 @@ - unsigned char env_enetaddr[6]; - char *tmp = getenv ("ethaddr"); - char *end; -+ unsigned short chip_id; - - for (i=0; i<6; i++) { - env_enetaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0; -@@ -128,7 +129,9 @@ - } - - /* verify chip id */ -- if (get_reg_init_bus (PP_ChipID) != 0x630e) -+ chip_id = get_reg_init_bus (PP_ChipID); -+ printf("\ncs8900a chipid 0x%04x\n", chip_id); -+ if (chip_id != 0x630e) - return; - eth_reset (); - if ((get_reg (PP_SelfST) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) == -Index: git/drivers/s3c2410_fb.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/drivers/s3c2410_fb.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,182 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if defined(CONFIG_VIDEO_S3C2410) -+ -+#include -+#include "videomodes.h" -+#include -+/* -+ * Export Graphic Device -+ */ -+GraphicDevice smi; -+ -+#define VIDEO_MEM_SIZE 0x200000 -+ -+/******************************************************************************* -+ * -+ * Init video chip with common Linux graphic modes (lilo) -+ */ -+void *video_hw_init (void) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ GraphicDevice *pGD = (GraphicDevice *)&smi; -+ int videomode; -+ unsigned long t1, hsynch, vsynch; -+ char *penv; -+ int tmp, i, bits_per_pixel; -+ struct ctfb_res_modes *res_mode; -+ struct ctfb_res_modes var_mode; -+ unsigned char videoout; -+ unsigned int *vm; -+ -+ /* Search for video chip */ -+ printf("Video: "); -+ -+ tmp = 0; -+ -+ videomode = CFG_DEFAULT_VIDEO_MODE; -+ /* get video mode via environment */ -+ if ((penv = getenv ("videomode")) != NULL) { -+ /* deceide if it is a string */ -+ if (penv[0] <= '9') { -+ videomode = (int) simple_strtoul (penv, NULL, 16); -+ tmp = 1; -+ } -+ } else { -+ tmp = 1; -+ } -+ if (tmp) { -+ /* parameter are vesa modes */ -+ /* search params */ -+ for (i = 0; i < VESA_MODES_COUNT; i++) { -+ if (vesa_modes[i].vesanr == videomode) -+ break; -+ } -+ if (i == VESA_MODES_COUNT) { -+ printf ("no VESA Mode found, switching to mode 0x%x ", CFG_DEFAULT_VIDEO_MODE); -+ i = 0; -+ } -+ res_mode = -+ (struct ctfb_res_modes *) &res_mode_init[vesa_modes[i]. -+ resindex]; -+ bits_per_pixel = vesa_modes[i].bits_per_pixel; -+ } else { -+ -+ res_mode = (struct ctfb_res_modes *) &var_mode; -+ bits_per_pixel = video_get_params (res_mode, penv); -+ } -+ -+ /* calculate hsynch and vsynch freq (info only) */ -+ t1 = (res_mode->left_margin + res_mode->xres + -+ res_mode->right_margin + res_mode->hsync_len) / 8; -+ t1 *= 8; -+ t1 *= res_mode->pixclock; -+ t1 /= 1000; -+ hsynch = 1000000000L / t1; -+ t1 *= -+ (res_mode->upper_margin + res_mode->yres + -+ res_mode->lower_margin + res_mode->vsync_len); -+ t1 /= 1000; -+ vsynch = 1000000000L / t1; -+ -+ /* fill in Graphic device struct */ -+ sprintf (pGD->modeIdent, "%dx%dx%d %ldkHz %ldHz", res_mode->xres, -+ res_mode->yres, bits_per_pixel, (hsynch / 1000), -+ (vsynch / 1000)); -+ printf ("%s\n", pGD->modeIdent); -+ pGD->winSizeX = res_mode->xres; -+ pGD->winSizeY = res_mode->yres; -+ pGD->plnSizeX = res_mode->xres; -+ pGD->plnSizeY = res_mode->yres; -+ switch (bits_per_pixel) { -+ case 8: -+ pGD->gdfBytesPP = 1; -+ pGD->gdfIndex = GDF__8BIT_INDEX; -+ break; -+ case 15: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_15BIT_555RGB; -+ break; -+ case 16: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ break; -+ case 24: -+ pGD->gdfBytesPP = 3; -+ pGD->gdfIndex = GDF_24BIT_888RGB; -+ break; -+ } -+ -+#if 0 -+ pGD->isaBase = CFG_ISA_IO; -+ pGD->pciBase = pci_mem_base; -+ pGD->dprBase = (pci_mem_base + 0x400000 + 0x8000); -+ pGD->vprBase = (pci_mem_base + 0x400000 + 0xc000); -+ pGD->cprBase = (pci_mem_base + 0x400000 + 0xe000); -+#endif -+ pGD->frameAdrs = LCD_VIDEO_ADDR; -+ pGD->memSize = VIDEO_MEM_SIZE; -+ -+ lcd->LCDSADDR1 = LCD_VIDEO_ADDR >> 1; -+ lcd->LCDSADDR2 = (LCD_VIDEO_ADDR + 0x4b000) >> 1; -+ lcd->LCDSADDR3 = 0x000000f0; -+ -+ lcd->LCDCON1 = 0x00000479; -+ lcd->LCDCON2 = 0x014fc183; -+ lcd->LCDCON3 = 0x0060ef07; -+ lcd->LCDCON4 = 0x00000003; -+ lcd->LCDCON5 = 0x00000b09; -+ lcd->LPCSEL = 0x00000cf0; -+ -+ pGD->winSizeX = pGD->plnSizeX = 240; -+ pGD->winSizeY = pGD->plnSizeY = 320; -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ -+ /* Enable Display */ -+ videoout = 2; /* Default output is CRT */ -+ if ((penv = getenv ("videoout")) != NULL) { -+ /* deceide if it is a string */ -+ videoout = (int) simple_strtoul (penv, NULL, 16); -+ } -+ -+ printf("clearing video memory\n"); -+ /* Clear video memory */ -+ i = pGD->memSize/4; -+ vm = (unsigned int *)pGD->frameAdrs; -+ while(i--) -+ *vm++ = 0; -+ -+ printf("returning from video_hw_init\n"); -+ return ((void*)&smi); -+} -+ -+void -+video_set_lut (unsigned int index, /* color number */ -+ unsigned char r, /* red */ -+ unsigned char g, /* green */ -+ unsigned char b /* blue */ -+ ) -+{ -+} -+ -+#endif /* CONFIG_VIDEO_S3C2410 */ -Index: git/drivers/usbdcore_s3c2410.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/drivers/usbdcore_s3c2410.c 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,1609 @@ -+/* -+ * (C) Copyright 2003 -+ * Gerry Hamel, geh@ti.com, Texas Instruments -+ * -+ * Based on -+ * linux/drivers/usb/device/bi/omap.c -+ * TI OMAP1510 USB bus interface driver -+ * -+ * Author: MontaVista Software, Inc. -+ * source@mvista.com -+ * (C) Copyright 2002 -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#include -+ -+#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) -+ -+#include -+ -+#include "usbdcore.h" -+#include "usbdcore_s3c2410.h" -+#include "usbdcore_ep0.h" -+ -+ -+#define UDC_INIT_MDELAY 80 /* Device settle delay */ -+#define UDC_MAX_ENDPOINTS 31 /* Number of endpoints on this UDC */ -+ -+/* Some kind of debugging output... */ -+#if 1 -+#define UDCDBG(str) -+#define UDCDBGA(fmt,args...) -+#else /* The bugs still exists... */ -+#define UDCDBG(str) serial_printf("[%s] %s:%d: " str "\n", __FILE__,__FUNCTION__,__LINE__) -+#define UDCDBGA(fmt,args...) serial_printf("[%s] %s:%d: " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##args) -+#endif -+ -+#if 1 -+#define UDCREG(name) -+#define UDCREGL(name) -+#else /* The bugs still exists... */ -+#define UDCREG(name) serial_printf("%s():%d: %s[%08x]=%.4x\n",__FUNCTION__,__LINE__, (#name), name, inw(name)) /* For 16-bit regs */ -+#define UDCREGL(name) serial_printf("%s():%d: %s[%08x]=%.8x\n",__FUNCTION__,__LINE__, (#name), name, inl(name)) /* For 32-bit regs */ -+#endif -+ -+ -+static struct urb *ep0_urb = NULL; -+ -+static struct usb_device_instance *udc_device; /* Used in interrupt handler */ -+static u16 udc_devstat = 0; /* UDC status (DEVSTAT) */ -+static u32 udc_interrupts = 0; -+ -+static void udc_stall_ep (unsigned int ep_addr); -+ -+ -+static struct usb_endpoint_instance *s3c2410_find_ep (int ep) -+{ -+ int i; -+ -+ for (i = 0; i < udc_device->bus->max_endpoints; i++) { -+ if (udc_device->bus->endpoint_array[i].endpoint_address == ep) -+ return &udc_device->bus->endpoint_array[i]; -+ } -+ return NULL; -+} -+ -+/* ************************************************************************** */ -+/* IO -+ */ -+ -+/* -+ * omap1510_prepare_endpoint_for_rx -+ * -+ * This function implements TRM Figure 14-11. -+ * -+ * The endpoint to prepare for transfer is specified as a physical endpoint -+ * number. For OUT (rx) endpoints 1 through 15, the corresponding endpoint -+ * configuration register is checked to see if the endpoint is ISO or not. -+ * If the OUT endpoint is valid and is non-ISO then its FIFO is enabled. -+ * No action is taken for endpoint 0 or for IN (tx) endpoints 16 through 30. -+ */ -+static void omap1510_prepare_endpoint_for_rx (int ep_addr) -+{ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("omap1510_prepare_endpoint %x", ep_addr); -+ if (((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)) { -+ if ((inw (UDC_EP_RX (ep_num)) & -+ (UDC_EPn_RX_Valid | UDC_EPn_RX_Iso)) == -+ UDC_EPn_RX_Valid) { -+ /* rx endpoint is valid, non-ISO, so enable its FIFO */ -+ outw (UDC_EP_Sel | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ outw (0, UDC_EP_NUM); -+ } -+ } -+} -+ -+/* omap1510_configure_endpoints -+ * -+ * This function implements TRM Figure 14-10. -+ */ -+static void omap1510_configure_endpoints (struct usb_device_instance *device) -+{ -+ int ep; -+ struct usb_bus_instance *bus; -+ struct usb_endpoint_instance *endpoint; -+ unsigned short ep_ptr; -+ unsigned short ep_size; -+ unsigned short ep_isoc; -+ unsigned short ep_doublebuffer; -+ int ep_addr; -+ int packet_size; -+ int buffer_size; -+ int attributes; -+ -+ bus = device->bus; -+ -+ /* There is a dedicated 2048 byte buffer for USB packets that may be -+ * arbitrarily partitioned among the endpoints on 8-byte boundaries. -+ * The first 8 bytes are reserved for receiving setup packets on -+ * endpoint 0. -+ */ -+ ep_ptr = 8; /* reserve the first 8 bytes for the setup fifo */ -+ -+ for (ep = 0; ep < bus->max_endpoints; ep++) { -+ endpoint = bus->endpoint_array + ep; -+ ep_addr = endpoint->endpoint_address; -+ if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* IN endpoint */ -+ packet_size = endpoint->tx_packetSize; -+ attributes = endpoint->tx_attributes; -+ } else { -+ /* OUT endpoint */ -+ packet_size = endpoint->rcv_packetSize; -+ attributes = endpoint->rcv_attributes; -+ } -+ -+ switch (packet_size) { -+ case 0: -+ ep_size = 0; -+ break; -+ case 8: -+ ep_size = 0; -+ break; -+ case 16: -+ ep_size = 1; -+ break; -+ case 32: -+ ep_size = 2; -+ break; -+ case 64: -+ ep_size = 3; -+ break; -+ case 128: -+ ep_size = 4; -+ break; -+ case 256: -+ ep_size = 5; -+ break; -+ case 512: -+ ep_size = 6; -+ break; -+ default: -+ UDCDBGA ("ep 0x%02x has bad packet size %d", -+ ep_addr, packet_size); -+ packet_size = 0; -+ ep_size = 0; -+ break; -+ } -+ -+ switch (attributes & USB_ENDPOINT_XFERTYPE_MASK) { -+ case USB_ENDPOINT_XFER_CONTROL: -+ case USB_ENDPOINT_XFER_BULK: -+ case USB_ENDPOINT_XFER_INT: -+ default: -+ /* A non-isochronous endpoint may optionally be -+ * double-buffered. For now we disable -+ * double-buffering. -+ */ -+ ep_doublebuffer = 0; -+ ep_isoc = 0; -+ if (packet_size > 64) -+ packet_size = 0; -+ if (!ep || !ep_doublebuffer) -+ buffer_size = packet_size; -+ else -+ buffer_size = packet_size * 2; -+ break; -+ case USB_ENDPOINT_XFER_ISOC: -+ /* Isochronous endpoints are always double- -+ * buffered, but the double-buffering bit -+ * in the endpoint configuration register -+ * becomes the msb of the endpoint size so we -+ * set the double-buffering flag to zero. -+ */ -+ ep_doublebuffer = 0; -+ ep_isoc = 1; -+ buffer_size = packet_size * 2; -+ break; -+ } -+ -+ /* check to see if our packet buffer RAM is exhausted */ -+ if ((ep_ptr + buffer_size) > 2048) { -+ UDCDBGA ("out of packet RAM for ep 0x%02x buf size %d", ep_addr, buffer_size); -+ buffer_size = packet_size = 0; -+ } -+ -+ /* force a default configuration for endpoint 0 since it is -+ * always enabled -+ */ -+ if (!ep && ((packet_size < 8) || (packet_size > 64))) { -+ buffer_size = packet_size = 64; -+ ep_size = 3; -+ } -+ -+ if (!ep) { -+ /* configure endpoint 0 */ -+ outw ((ep_size << 12) | (ep_ptr >> 3), UDC_EP0); -+ /*UDCDBGA("ep 0 buffer offset 0x%03x packet size 0x%03x", */ -+ /* ep_ptr, packet_size); */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* IN endpoint */ -+ if (packet_size) { -+ outw ((1 << 15) | (ep_doublebuffer << 14) | -+ (ep_size << 12) | (ep_isoc << 11) | -+ (ep_ptr >> 3), -+ UDC_EP_TX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ UDCDBGA ("IN ep %d buffer offset 0x%03x" -+ " packet size 0x%03x", -+ ep_addr & USB_ENDPOINT_NUMBER_MASK, -+ ep_ptr, packet_size); -+ } else { -+ outw (0, -+ UDC_EP_TX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ } -+ } else { -+ /* OUT endpoint */ -+ if (packet_size) { -+ outw ((1 << 15) | (ep_doublebuffer << 14) | -+ (ep_size << 12) | (ep_isoc << 11) | -+ (ep_ptr >> 3), -+ UDC_EP_RX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ UDCDBGA ("OUT ep %d buffer offset 0x%03x" -+ " packet size 0x%03x", -+ ep_addr & USB_ENDPOINT_NUMBER_MASK, -+ ep_ptr, packet_size); -+ } else { -+ outw (0, -+ UDC_EP_RX (ep_addr & -+ USB_ENDPOINT_NUMBER_MASK)); -+ } -+ } -+ ep_ptr += buffer_size; -+ } -+} -+ -+static void s3c2410_deconfigure_device (void) -+{ -+ int epnum; -+ -+ UDCDBG ("clear Cfg_Lock"); -+ outw (inw (UDC_SYSCON1) & ~UDC_Cfg_Lock, UDC_SYSCON1); -+ UDCREG (UDC_SYSCON1); -+ -+ /* deconfigure all endpoints */ -+ for (epnum = 1; epnum <= 15; epnum++) { -+ outw (0, UDC_EP_RX (epnum)); -+ outw (0, UDC_EP_TX (epnum)); -+ } -+} -+ -+static void s3c2410_configure_device (struct usb_device_instance *device) -+{ -+ u_int32_t tmp; -+ -+ s3c2410_configure_endpoints(device); -+ -+ /* disable EP0-4 SUBD interrupts ? */ -+ outw(0x00, S3C2410_UDC_USB_INT_EN_REG); -+ -+ /* UPLL already configured by board-level init code */ -+ -+ /* configure USB pads to device mode */ -+ tmp = inw(S3C2410_MISCCR); -+ tmp &= ~(S3C2410_MISCCR_USBHOST|S3C2410_MISCCR_USBSUSPND1); -+ outw(tmp, S3C2410_MISCCR); -+ -+ tmp = inb(S3C2410_CLKSLOW); -+ tmp &= ~S3C2410_CLKSLOW_USB_CLK_DISABLE; -+ outw(tmp, S3C2410_CLKSLOW); -+ -+ /* clear interrupt registers */ -+ inb(S3C2410_UDC_EP_INT_REG); -+ inb(S3C2410_UDC_USB_INT_REG); -+ -+ /* enable USB interrupts for RESET and SUSPEND/RESUME */ -+ outb(S3C2410_UDC_USBINT_RESET|S3C2410_UDC_USBINT_SUSPEND, -+ S3C2410_UDC_USB_INT_EN_REG); -+ -+} -+ -+/* omap1510_write_noniso_tx_fifo -+ * -+ * This function implements TRM Figure 14-30. -+ * -+ * If the endpoint has an active tx_urb, then the next packet of data from the -+ * URB is written to the tx FIFO. The total amount of data in the urb is given -+ * by urb->actual_length. The maximum amount of data that can be sent in any -+ * one packet is given by endpoint->tx_packetSize. The number of data bytes -+ * from this URB that have already been transmitted is given by endpoint->sent. -+ * endpoint->last is updated by this routine with the number of data bytes -+ * transmitted in this packet. -+ * -+ * In accordance with Figure 14-30, the EP_NUM register must already have been -+ * written with the value to select the appropriate tx FIFO before this routine -+ * is called. -+ */ -+static void omap1510_write_noniso_tx_fifo (struct usb_endpoint_instance -+ *endpoint) -+{ -+ struct urb *urb = endpoint->tx_urb; -+ -+ if (urb) { -+ unsigned int last, i; -+ -+ UDCDBGA ("urb->buffer %p, buffer_length %d, actual_length %d", -+ urb->buffer, urb->buffer_length, urb->actual_length); -+ if ((last = -+ MIN (urb->actual_length - endpoint->sent, -+ endpoint->tx_packetSize))) { -+ u8 *cp = urb->buffer + endpoint->sent; -+ -+ UDCDBGA ("endpoint->sent %d, tx_packetSize %d, last %d", endpoint->sent, endpoint->tx_packetSize, last); -+ -+ if (((u32) cp & 1) == 0) { /* word aligned? */ -+ outsw (UDC_DATA, cp, last >> 1); -+ } else { /* byte aligned. */ -+ for (i = 0; i < (last >> 1); i++) { -+ u16 w = ((u16) cp[2 * i + 1] << 8) | -+ (u16) cp[2 * i]; -+ outw (w, UDC_DATA); -+ } -+ } -+ if (last & 1) { -+ outb (*(cp + last - 1), UDC_DATA); -+ } -+ } -+ endpoint->last = last; -+ } -+} -+ -+/* omap1510_read_noniso_rx_fifo -+ * -+ * This function implements TRM Figure 14-28. -+ * -+ * If the endpoint has an active rcv_urb, then the next packet of data is read -+ * from the rcv FIFO and written to rcv_urb->buffer at offset -+ * rcv_urb->actual_length to append the packet data to the data from any -+ * previous packets for this transfer. We assume that there is sufficient room -+ * left in the buffer to hold an entire packet of data. -+ * -+ * The return value is the number of bytes read from the FIFO for this packet. -+ * -+ * In accordance with Figure 14-28, the EP_NUM register must already have been -+ * written with the value to select the appropriate rcv FIFO before this routine -+ * is called. -+ */ -+static int omap1510_read_noniso_rx_fifo (struct usb_endpoint_instance -+ *endpoint) -+{ -+ struct urb *urb = endpoint->rcv_urb; -+ int len = 0; -+ -+ if (urb) { -+ len = inw (UDC_RXFSTAT); -+ -+ if (len) { -+ unsigned char *cp = urb->buffer + urb->actual_length; -+ -+ insw (UDC_DATA, cp, len >> 1); -+ if (len & 1) -+ *(cp + len - 1) = inb (UDC_DATA); -+ } -+ } -+ return len; -+} -+ -+/* omap1510_prepare_for_control_write_status -+ * -+ * This function implements TRM Figure 14-17. -+ * -+ * We have to deal here with non-autodecoded control writes that haven't already -+ * been dealt with by ep0_recv_setup. The non-autodecoded standard control -+ * write requests are: set/clear endpoint feature, set configuration, set -+ * interface, and set descriptor. ep0_recv_setup handles set/clear requests for -+ * ENDPOINT_HALT by halting the endpoint for a set request and resetting the -+ * endpoint for a clear request. ep0_recv_setup returns an error for -+ * SET_DESCRIPTOR requests which causes them to be terminated with a stall by -+ * the setup handler. A SET_INTERFACE request is handled by ep0_recv_setup by -+ * generating a DEVICE_SET_INTERFACE event. This leaves only the -+ * SET_CONFIGURATION event for us to deal with here. -+ * -+ */ -+static void omap1510_prepare_for_control_write_status (struct urb *urb) -+{ -+ struct usb_device_request *request = &urb->device_request;; -+ -+ /* check for a SET_CONFIGURATION request */ -+ if (request->bRequest == USB_REQ_SET_CONFIGURATION) { -+ int configuration = le16_to_cpu (request->wValue) & 0xff; -+ unsigned short devstat = inw (UDC_DEVSTAT); -+ -+ if ((devstat & (UDC_ADD | UDC_CFG)) == UDC_ADD) { -+ /* device is currently in ADDRESSED state */ -+ if (configuration) { -+ /* Assume the specified non-zero configuration -+ * value is valid and switch to the CONFIGURED -+ * state. -+ */ -+ outw (UDC_Dev_Cfg, UDC_SYSCON2); -+ } -+ } else if ((devstat & UDC_CFG) == UDC_CFG) { -+ /* device is currently in CONFIGURED state */ -+ if (!configuration) { -+ /* Switch to ADDRESSED state. */ -+ outw (UDC_Clr_Cfg, UDC_SYSCON2); -+ } -+ } -+ } -+ -+ /* select EP0 tx FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ /* clear endpoint (no data bytes in status stage) */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ /* enable the EP0 tx FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the endpoint */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+} -+ -+/* udc_state_transition_up -+ * udc_state_transition_down -+ * -+ * Helper functions to implement device state changes. The device states and -+ * the events that transition between them are: -+ * -+ * STATE_ATTACHED -+ * || /\ -+ * \/ || -+ * DEVICE_HUB_CONFIGURED DEVICE_HUB_RESET -+ * || /\ -+ * \/ || -+ * STATE_POWERED -+ * || /\ -+ * \/ || -+ * DEVICE_RESET DEVICE_POWER_INTERRUPTION -+ * || /\ -+ * \/ || -+ * STATE_DEFAULT -+ * || /\ -+ * \/ || -+ * DEVICE_ADDRESS_ASSIGNED DEVICE_RESET -+ * || /\ -+ * \/ || -+ * STATE_ADDRESSED -+ * || /\ -+ * \/ || -+ * DEVICE_CONFIGURED DEVICE_DE_CONFIGURED -+ * || /\ -+ * \/ || -+ * STATE_CONFIGURED -+ * -+ * udc_state_transition_up transitions up (in the direction from STATE_ATTACHED -+ * to STATE_CONFIGURED) from the specified initial state to the specified final -+ * state, passing through each intermediate state on the way. If the initial -+ * state is at or above (i.e. nearer to STATE_CONFIGURED) the final state, then -+ * no state transitions will take place. -+ * -+ * udc_state_transition_down transitions down (in the direction from -+ * STATE_CONFIGURED to STATE_ATTACHED) from the specified initial state to the -+ * specified final state, passing through each intermediate state on the way. -+ * If the initial state is at or below (i.e. nearer to STATE_ATTACHED) the final -+ * state, then no state transitions will take place. -+ * -+ * These functions must only be called with interrupts disabled. -+ */ -+static void udc_state_transition_up (usb_device_state_t initial, -+ usb_device_state_t final) -+{ -+ if (initial < final) { -+ switch (initial) { -+ case STATE_ATTACHED: -+ usbd_device_event_irq (udc_device, -+ DEVICE_HUB_CONFIGURED, 0); -+ if (final == STATE_POWERED) -+ break; -+ case STATE_POWERED: -+ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); -+ if (final == STATE_DEFAULT) -+ break; -+ case STATE_DEFAULT: -+ usbd_device_event_irq (udc_device, -+ DEVICE_ADDRESS_ASSIGNED, 0); -+ if (final == STATE_ADDRESSED) -+ break; -+ case STATE_ADDRESSED: -+ usbd_device_event_irq (udc_device, DEVICE_CONFIGURED, -+ 0); -+ case STATE_CONFIGURED: -+ break; -+ default: -+ break; -+ } -+ } -+} -+ -+static void udc_state_transition_down (usb_device_state_t initial, -+ usb_device_state_t final) -+{ -+ if (initial > final) { -+ switch (initial) { -+ case STATE_CONFIGURED: -+ usbd_device_event_irq (udc_device, DEVICE_DE_CONFIGURED, 0); -+ if (final == STATE_ADDRESSED) -+ break; -+ case STATE_ADDRESSED: -+ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); -+ if (final == STATE_DEFAULT) -+ break; -+ case STATE_DEFAULT: -+ usbd_device_event_irq (udc_device, DEVICE_POWER_INTERRUPTION, 0); -+ if (final == STATE_POWERED) -+ break; -+ case STATE_POWERED: -+ usbd_device_event_irq (udc_device, DEVICE_HUB_RESET, 0); -+ case STATE_ATTACHED: -+ break; -+ default: -+ break; -+ } -+ } -+} -+ -+/* Handle all device state changes. -+ * This function implements TRM Figure 14-21. -+ */ -+static void omap1510_udc_state_changed (void) -+{ -+ u16 bits; -+ u16 devstat = inw (UDC_DEVSTAT); -+ -+ UDCDBGA ("state changed, devstat %x, old %x", devstat, udc_devstat); -+ -+ bits = devstat ^ udc_devstat; -+ if (bits) { -+ if (bits & UDC_ATT) { -+ if (devstat & UDC_ATT) { -+ UDCDBG ("device attached and powered"); -+ udc_state_transition_up (udc_device->device_state, STATE_POWERED); -+ } else { -+ UDCDBG ("device detached or unpowered"); -+ udc_state_transition_down (udc_device->device_state, STATE_ATTACHED); -+ } -+ } -+ if (bits & UDC_USB_Reset) { -+ if (devstat & UDC_USB_Reset) { -+ UDCDBG ("device reset in progess"); -+ udc_state_transition_down (udc_device->device_state, STATE_POWERED); -+ } else { -+ UDCDBG ("device reset completed"); -+ } -+ } -+ if (bits & UDC_DEF) { -+ if (devstat & UDC_DEF) { -+ UDCDBG ("device entering default state"); -+ udc_state_transition_up (udc_device->device_state, STATE_DEFAULT); -+ } else { -+ UDCDBG ("device leaving default state"); -+ udc_state_transition_down (udc_device->device_state, STATE_POWERED); -+ } -+ } -+ if (bits & UDC_SUS) { -+ if (devstat & UDC_SUS) { -+ UDCDBG ("entering suspended state"); -+ usbd_device_event_irq (udc_device, DEVICE_BUS_INACTIVE, 0); -+ } else { -+ UDCDBG ("leaving suspended state"); -+ usbd_device_event_irq (udc_device, DEVICE_BUS_ACTIVITY, 0); -+ } -+ } -+ if (bits & UDC_R_WK_OK) { -+ UDCDBGA ("remote wakeup %s", (devstat & UDC_R_WK_OK) -+ ? "enabled" : "disabled"); -+ } -+ if (bits & UDC_ADD) { -+ if (devstat & UDC_ADD) { -+ UDCDBG ("default -> addressed"); -+ udc_state_transition_up (udc_device->device_state, STATE_ADDRESSED); -+ } else { -+ UDCDBG ("addressed -> default"); -+ udc_state_transition_down (udc_device->device_state, STATE_DEFAULT); -+ } -+ } -+ if (bits & UDC_CFG) { -+ if (devstat & UDC_CFG) { -+ UDCDBG ("device configured"); -+ /* The ep0_recv_setup function generates the -+ * DEVICE_CONFIGURED event when a -+ * USB_REQ_SET_CONFIGURATION setup packet is -+ * received, so we should already be in the -+ * state STATE_CONFIGURED. -+ */ -+ udc_state_transition_up (udc_device->device_state, STATE_CONFIGURED); -+ } else { -+ UDCDBG ("device deconfigured"); -+ udc_state_transition_down (udc_device->device_state, STATE_ADDRESSED); -+ } -+ } -+ } -+ -+ /* Clear interrupt source */ -+ outw (UDC_DS_Chg, UDC_IRQ_SRC); -+ -+ /* Save current DEVSTAT */ -+ udc_devstat = devstat; -+} -+ -+static void s3c2410_udc_ep0(void) -+{ -+ u_int8_t ep0csr; -+ -+ UDCDBG("-> Entering EP0 handler"); -+ -+ S3C2410_UDC_SETIX(EP0); -+ ep0csr = inb(S3C2410_UDC_IN_CSR1_REG); -+ -+ /* clear stall status */ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SENTSTL) { -+ clear_sp0_sst; -+ /* FIXME */ -+ ep0_idle(); -+ } -+ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SE -+ && dev->ep0state != EP0_IDLE) { -+ clear_ep0_se; -+ ep0_idle(); -+ } -+ -+ switch (dev->ep0state) { -+ case EP0_IDLE: -+ if (ep0crs & S3C2410_UDC_EP0_CSR_OPKRDY) { -+ } -+ break; -+ case EP0_IN_DATA_PHASE: -+ break; -+ case EP0_OUT_DATA_PHASE: -+ break; -+ case EP0_END_XFER: -+ break; -+ case EP0_STALL: -+ set_ep0_ss; -+ break; -+ } -+} -+ -+ -+} -+ -+/* Handle SETUP USB interrupt. -+ * This function implements TRM Figure 14-14. -+ */ -+static void omap1510_udc_setup (struct usb_endpoint_instance *endpoint) -+{ -+ UDCDBG ("-> Entering device setup"); -+ -+ do { -+ const int setup_pktsize = 8; -+ unsigned char *datap = -+ (unsigned char *) &ep0_urb->device_request; -+ -+ /* Gain access to EP 0 setup FIFO */ -+ outw (UDC_Setup_Sel, UDC_EP_NUM); -+ -+ /* Read control request data */ -+ insb (UDC_DATA, datap, setup_pktsize); -+ -+ UDCDBGA ("EP0 setup read [%x %x %x %x %x %x %x %x]", -+ *(datap + 0), *(datap + 1), *(datap + 2), -+ *(datap + 3), *(datap + 4), *(datap + 5), -+ *(datap + 6), *(datap + 7)); -+ -+ /* Reset EP0 setup FIFO */ -+ outw (0, UDC_EP_NUM); -+ } while (inw (UDC_IRQ_SRC) & UDC_Setup); -+ -+ /* Try to process setup packet */ -+ if (ep0_recv_setup (ep0_urb)) { -+ /* Not a setup packet, stall next EP0 transaction */ -+ udc_stall_ep (0); -+ UDCDBG ("can't parse setup packet, still waiting for setup"); -+ return; -+ } -+ -+ /* Check direction */ -+ if ((ep0_urb->device_request.bmRequestType & USB_REQ_DIRECTION_MASK) -+ == USB_REQ_HOST2DEVICE) { -+ UDCDBG ("control write on EP0"); -+ if (le16_to_cpu (ep0_urb->device_request.wLength)) { -+ /* We don't support control write data stages. -+ * The only standard control write request with a data -+ * stage is SET_DESCRIPTOR, and ep0_recv_setup doesn't -+ * support that so we just stall those requests. A -+ * function driver might support a non-standard -+ * write request with a data stage, but it isn't -+ * obvious what we would do with the data if we read it -+ * so we'll just stall it. It seems like the API isn't -+ * quite right here. -+ */ -+#if 0 -+ /* Here is what we would do if we did support control -+ * write data stages. -+ */ -+ ep0_urb->actual_length = 0; -+ outw (0, UDC_EP_NUM); -+ /* enable the EP0 rx FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+#else -+ /* Stall this request */ -+ UDCDBG ("Stalling unsupported EP0 control write data " -+ "stage."); -+ udc_stall_ep (0); -+#endif -+ } else { -+ omap1510_prepare_for_control_write_status (ep0_urb); -+ } -+ } else { -+ UDCDBG ("control read on EP0"); -+ /* The ep0_recv_setup function has already placed our response -+ * packet data in ep0_urb->buffer and the packet length in -+ * ep0_urb->actual_length. -+ */ -+ endpoint->tx_urb = ep0_urb; -+ endpoint->sent = 0; -+ /* select the EP0 tx FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ /* Write packet data to the FIFO. omap1510_write_noniso_tx_fifo -+ * will update endpoint->last with the number of bytes written -+ * to the FIFO. -+ */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable the FIFO to start the packet transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the EP0 tx FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+ -+ UDCDBG ("<- Leaving device setup"); -+} -+ -+/* Handle endpoint 0 RX interrupt -+ * This routine implements TRM Figure 14-16. -+ */ -+static void omap1510_udc_ep0_rx (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short status; -+ -+ UDCDBG ("RX on EP0"); -+ /* select EP0 rx FIFO */ -+ outw (UDC_EP_Sel, UDC_EP_NUM); -+ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ /* Check direction */ -+ if ((ep0_urb->device_request.bmRequestType -+ & USB_REQ_DIRECTION_MASK) == USB_REQ_HOST2DEVICE) { -+ /* This rx interrupt must be for a control write data -+ * stage packet. -+ * -+ * We don't support control write data stages. -+ * We should never end up here. -+ */ -+ -+ /* clear the EP0 rx FIFO */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ -+ /* deselect the EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ -+ UDCDBG ("Stalling unexpected EP0 control write " -+ "data stage packet"); -+ udc_stall_ep (0); -+ } else { -+ /* This rx interrupt must be for a control read status -+ * stage packet. -+ */ -+ UDCDBG ("ACK on EP0 control read status stage packet"); -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBG ("EP0 stall during RX"); -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } else { -+ /* deselect EP0 rx FIFO */ -+ outw (0, UDC_EP_NUM); -+ } -+} -+ -+/* Handle endpoint 0 TX interrupt -+ * This routine implements TRM Figure 14-18. -+ */ -+static void omap1510_udc_ep0_tx (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short status; -+ struct usb_device_request *request = &ep0_urb->device_request; -+ -+ UDCDBG ("TX on EP0"); -+ /* select EP0 TX FIFO */ -+ outw (UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ -+ status = inw (UDC_STAT_FLG); -+ if (status & UDC_ACK) { -+ /* Check direction */ -+ if ((request->bmRequestType & USB_REQ_DIRECTION_MASK) == -+ USB_REQ_HOST2DEVICE) { -+ /* This tx interrupt must be for a control write status -+ * stage packet. -+ */ -+ UDCDBG ("ACK on EP0 control write status stage packet"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } else { -+ /* This tx interrupt must be for a control read data -+ * stage packet. -+ */ -+ int wLength = le16_to_cpu (request->wLength); -+ -+ /* Update our count of bytes sent so far in this -+ * transfer. -+ */ -+ endpoint->sent += endpoint->last; -+ -+ /* We are finished with this transfer if we have sent -+ * all of the bytes in our tx urb (urb->actual_length) -+ * unless we need a zero-length terminating packet. We -+ * need a zero-length terminating packet if we returned -+ * fewer bytes than were requested (wLength) by the host, -+ * and the number of bytes we returned is an exact -+ * multiple of the packet size endpoint->tx_packetSize. -+ */ -+ if ((endpoint->sent == ep0_urb->actual_length) -+ && ((ep0_urb->actual_length == wLength) -+ || (endpoint->last != -+ endpoint->tx_packetSize))) { -+ /* Done with control read data stage. */ -+ UDCDBG ("control read data stage complete"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ /* select EP0 RX FIFO to prepare for control -+ * read status stage. -+ */ -+ outw (UDC_EP_Sel, UDC_EP_NUM); -+ /* clear the EP0 RX FIFO */ -+ outw (UDC_Clr_EP, UDC_CTRL); -+ /* enable the EP0 RX FIFO */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the EP0 RX FIFO */ -+ outw (0, UDC_EP_NUM); -+ } else { -+ /* We still have another packet of data to send -+ * in this control read data stage or else we -+ * need a zero-length terminating packet. -+ */ -+ UDCDBG ("ACK control read data stage packet"); -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable the EP0 tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBG ("EP0 stall during TX"); -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } else { -+ /* deselect EP0 TX FIFO */ -+ outw (UDC_EP_Dir, UDC_EP_NUM); -+ } -+} -+ -+/* Handle RX transaction on non-ISO endpoint. -+ * This function implements TRM Figure 14-27. -+ * The ep argument is a physical endpoint number for a non-ISO OUT endpoint -+ * in the range 1 to 15. -+ */ -+static void omap1510_udc_epn_rx (int ep) -+{ -+ unsigned short status; -+ -+ /* Check endpoint status */ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ int nbytes; -+ struct usb_endpoint_instance *endpoint = -+ omap1510_find_ep (ep); -+ -+ nbytes = omap1510_read_noniso_rx_fifo (endpoint); -+ usbd_rcv_complete (endpoint, nbytes, 0); -+ -+ /* enable rx FIFO to prepare for next packet */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } else if (status & UDC_STALL) { -+ UDCDBGA ("STALL on RX endpoint %d", ep); -+ } else if (status & UDC_NAK) { -+ UDCDBGA ("NAK on RX ep %d", ep); -+ } else { -+ serial_printf ("omap-bi: RX on ep %d with status %x", ep, -+ status); -+ } -+} -+ -+/* Handle TX transaction on non-ISO endpoint. -+ * This function implements TRM Figure 14-29. -+ * The ep argument is a physical endpoint number for a non-ISO IN endpoint -+ * in the range 16 to 30. -+ */ -+static void omap1510_udc_epn_tx (int ep) -+{ -+ unsigned short status; -+ -+ /*serial_printf("omap1510_udc_epn_tx( %x )\n",ep); */ -+ -+ /* Check endpoint status */ -+ status = inw (UDC_STAT_FLG); -+ -+ if (status & UDC_ACK) { -+ struct usb_endpoint_instance *endpoint = -+ omap1510_find_ep (ep); -+ -+ /* We need to transmit a terminating zero-length packet now if -+ * we have sent all of the data in this URB and the transfer -+ * size was an exact multiple of the packet size. -+ */ -+ if (endpoint->tx_urb -+ && (endpoint->last == endpoint->tx_packetSize) -+ && (endpoint->tx_urb->actual_length - endpoint->sent - -+ endpoint->last == 0)) { -+ /* Prepare to transmit a zero-length packet. */ -+ endpoint->sent += endpoint->last; -+ /* write 0 bytes of data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } else if (endpoint->tx_urb -+ && endpoint->tx_urb->actual_length) { -+ /* retire the data that was just sent */ -+ usbd_tx_complete (endpoint); -+ /* Check to see if we have more data ready to transmit -+ * now. -+ */ -+ if (endpoint->tx_urb -+ && endpoint->tx_urb->actual_length) { -+ /* write data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ } -+ } -+ } else if (status & UDC_STALL) { -+ UDCDBGA ("STALL on TX endpoint %d", ep); -+ } else if (status & UDC_NAK) { -+ UDCDBGA ("NAK on TX endpoint %d", ep); -+ } else { -+ /*serial_printf("omap-bi: TX on ep %d with status %x\n", ep, status); */ -+ } -+} -+ -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+/* Handle general USB interrupts and dispatch according to type. -+ * This function implements TRM Figure 14-13. -+ */ -+void s3c2410_udc_irq (void) -+{ -+ u_int8_t save_idx = inb(S3C2410_UDC_INDEX_REG); -+ u_int8_t usb_status = inb(S3C2410_UDC_USB_INT_REG); -+ u_int8_t usbd_status = inb(S3C2410_UDC_EP_INT_REG); -+ -+ UDCDBGA("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status, -+ usbd_status); -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESET) { -+ valid_irq++; -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESUME) { -+ valid_irq++; -+ -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_SUSPEND) { -+ valid_irq++; -+ -+ } -+ -+ /* Endpoint Interrupts */ -+ if (usbd_status) { -+ int i; -+ -+ if (usbd_status & S3C2410_UDC_INT_EP0) { -+ s3c2410_udc_ep0(); -+ outb(S3C2410_UDC_INT_EP0, S3C2410_UDC_EP_INT_REG); -+ valid_irq++; -+ } -+ -+ for (i = 1; i < 5; i++) { -+ u_int32_t tmp = 1 << i; -+ -+ if (usbd_status & tmp) { -+ /* FIXME: Handle EP X */ -+ s3c2410_udc_epn(i); -+ outb(tmp, S3C2410_UDC_EP_INT_REG); -+ valid_irq++; -+ } -+ } -+ } -+ outb(save_idx, S3C2410_UDC_INDEX_REG); -+ -+#if 0 -+ if (!(irq_src & ~UDC_SOF_Flg)) /* ignore SOF interrupts ) */ -+ return; -+ -+ UDCDBGA ("< IRQ #%d start >- %x", udc_interrupts, irq_src); -+ /*serial_printf("< IRQ #%d start >- %x\n", udc_interrupts, irq_src); */ -+ -+ if (irq_src & UDC_DS_Chg) { -+ /* Device status changed */ -+ omap1510_udc_state_changed (); -+ valid_irq++; -+ } -+ if (irq_src & UDC_EP0_RX) { -+ /* Endpoint 0 receive */ -+ outw (UDC_EP0_RX, UDC_IRQ_SRC); /* ack interrupt */ -+ omap1510_udc_ep0_rx (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ if (irq_src & UDC_EP0_TX) { -+ /* Endpoint 0 transmit */ -+ outw (UDC_EP0_TX, UDC_IRQ_SRC); /* ack interrupt */ -+ omap1510_udc_ep0_tx (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ if (irq_src & UDC_Setup) { -+ /* Device setup */ -+ omap1510_udc_setup (udc_device->bus->endpoint_array + 0); -+ valid_irq++; -+ } -+ /*if (!valid_irq) */ -+ /* serial_printf("unknown interrupt, IRQ_SRC %.4x\n", irq_src); */ -+#endif -+ UDCDBGA ("< IRQ end >", udc_interrupts); -+ -+ udc_interrupts++; -+} -+ -+/* This function implements TRM Figure 14-26. */ -+void omap1510_udc_noniso_irq (void) -+{ -+ unsigned short epnum; -+ unsigned short irq_src = inw (UDC_IRQ_SRC); -+ int valid_irq = 0; -+ -+ if (!(irq_src & (UDC_EPn_RX | UDC_EPn_TX))) -+ return; -+ -+ UDCDBGA ("non-ISO IRQ, IRQ_SRC %x", inw (UDC_IRQ_SRC)); -+ -+ if (irq_src & UDC_EPn_RX) { /* Endpoint N OUT transaction */ -+ /* Determine the endpoint number for this interrupt */ -+ epnum = (inw (UDC_EPN_STAT) & 0x0f00) >> 8; -+ UDCDBGA ("RX on ep %x", epnum); -+ -+ /* acknowledge interrupt */ -+ outw (UDC_EPn_RX, UDC_IRQ_SRC); -+ -+ if (epnum) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | epnum, UDC_EP_NUM); -+ -+ omap1510_udc_epn_rx (epnum); -+ -+ /* deselect the endpoint FIFO */ -+ outw (epnum, UDC_EP_NUM); -+ } -+ valid_irq++; -+ } -+ if (irq_src & UDC_EPn_TX) { /* Endpoint N IN transaction */ -+ /* Determine the endpoint number for this interrupt */ -+ epnum = (inw (UDC_EPN_STAT) & 0x000f) | USB_DIR_IN; -+ UDCDBGA ("TX on ep %x", epnum); -+ -+ /* acknowledge interrupt */ -+ outw (UDC_EPn_TX, UDC_IRQ_SRC); -+ -+ if (epnum) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | epnum, UDC_EP_NUM); -+ -+ omap1510_udc_epn_tx (epnum); -+ -+ /* deselect the endpoint FIFO */ -+ outw (UDC_EP_Dir | epnum, UDC_EP_NUM); -+ } -+ valid_irq++; -+ } -+ if (!valid_irq) -+ serial_printf (": unknown non-ISO interrupt, IRQ_SRC %.4x\n", -+ irq_src); -+} -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+ -+/* -+ * Start of public functions. -+ */ -+ -+/* Called to start packet transmission. */ -+void udc_endpoint_write (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short epnum = -+ endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("Starting transmit on ep %x", epnum); -+ -+ if (endpoint->tx_urb) { -+ /* select the endpoint FIFO */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | epnum, UDC_EP_NUM); -+ /* write data to FIFO */ -+ omap1510_write_noniso_tx_fifo (endpoint); -+ /* enable tx FIFO to start transmission */ -+ outw (UDC_Set_FIFO_En, UDC_CTRL); -+ /* deselect the endpoint FIFO */ -+ outw (UDC_EP_Dir | epnum, UDC_EP_NUM); -+ } -+} -+ -+/* Start to initialize h/w stuff */ -+int udc_init (void) -+{ -+ u16 udc_rev; -+ uchar value; -+ ulong gpio; -+ int i; -+ -+ /* Let the device settle down before we start */ -+ for (i = 0; i < UDC_INIT_MDELAY; i++) udelay(1000); -+ -+ udc_device = NULL; -+ -+ UDCDBG ("starting"); -+ -+ /* Check peripheral reset. Must be 1 to make sure -+ MPU TIPB peripheral reset is inactive */ -+ UDCREG (ARM_RSTCT2); -+ -+ /* Set and check clock control. -+ * We might ought to be using the clock control API to do -+ * this instead of fiddling with the clock registers directly -+ * here. -+ */ -+ outw ((1 << 4) | (1 << 5), CLOCK_CTRL); -+ UDCREG (CLOCK_CTRL); -+ /* Set and check APLL */ -+ outw (0x0008, APLL_CTRL); -+ UDCREG (APLL_CTRL); -+ /* Set and check DPLL */ -+ outw (0x2210, DPLL_CTRL); -+ UDCREG (DPLL_CTRL); -+ /* Set and check SOFT */ -+ outw ((1 << 4) | (1 << 3) | 1, SOFT_REQ); -+ /* Short delay to wait for DPLL */ -+ udelay (1000); -+ -+ /* Print banner with device revision */ -+ udc_rev = inw (UDC_REV) & 0xff; -+ printf ("USB: TI OMAP1510 USB function module rev %d.%d\n", -+ udc_rev >> 4, udc_rev & 0xf); -+ -+#ifdef CONFIG_OMAP_SX1 -+ i2c_read (0x32, 0x04, 1, &value, 1); -+ value |= 0x04; -+ i2c_write (0x32, 0x04, 1, &value, 1); -+ -+ i2c_read (0x32, 0x03, 1, &value, 1); -+ value |= 0x01; -+ i2c_write (0x32, 0x03, 1, &value, 1); -+ -+ gpio = inl(GPIO_PIN_CONTROL_REG); -+ gpio |= 0x0002; /* A_IRDA_OFF */ -+ gpio |= 0x0800; /* A_SWITCH */ -+ gpio |= 0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_PIN_CONTROL_REG); -+ -+ gpio = inl(GPIO_DIR_CONTROL_REG); -+ gpio &= ~0x0002; /* A_IRDA_OFF */ -+ gpio &= ~0x0800; /* A_SWITCH */ -+ gpio &= ~0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_DIR_CONTROL_REG); -+ -+ gpio = inl(GPIO_DATA_OUTPUT_REG); -+ gpio |= 0x0002; /* A_IRDA_OFF */ -+ gpio &= ~0x0800; /* A_SWITCH */ -+ gpio &= ~0x8000; /* A_USB_ON */ -+ outl (gpio, GPIO_DATA_OUTPUT_REG); -+#endif -+ -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_MODE, FUNC_MUX_CTRL_0); -+ outl (inl (FUNC_MUX_CTRL_0) & ~UDC_VBUS_CTRL, FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+ -+ /* -+ * At this point, device is ready for configuration... -+ */ -+ -+ UDCDBG ("disable USB interrupts"); -+ outw (0, UDC_IRQ_EN); -+ UDCREG (UDC_IRQ_EN); -+ -+ UDCDBG ("disable USB DMA"); -+ outw (0, UDC_DMA_IRQ_EN); -+ UDCREG (UDC_DMA_IRQ_EN); -+ -+ UDCDBG ("initialize SYSCON1"); -+ outw (UDC_Self_Pwr | UDC_Pullup_En, UDC_SYSCON1); -+ UDCREG (UDC_SYSCON1); -+ -+ return 0; -+} -+ -+/* Stall endpoint */ -+static void udc_stall_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("stall ep_addr %d", ep_addr); -+ -+ /* REVISIT? -+ * The OMAP TRM section 14.2.4.2 says we must check that the FIFO -+ * is empty before halting the endpoint. The current implementation -+ * doesn't check that the FIFO is empty. -+ */ -+ -+ if (!ep_num) { -+ outw (UDC_Stall_Cmd, UDC_SYSCON2); -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) { -+ if (inw (UDC_EP_RX (ep_num)) & UDC_EPn_RX_Valid) { -+ /* we have a valid rx endpoint, so halt it */ -+ outw (UDC_EP_Sel | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_Halt, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ } -+ } else { -+ if (inw (UDC_EP_TX (ep_num)) & UDC_EPn_TX_Valid) { -+ /* we have a valid tx endpoint, so halt it */ -+ outw (UDC_EP_Sel | UDC_EP_Dir | ep_num, UDC_EP_NUM); -+ outw (UDC_Set_Halt, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ } -+ } -+} -+ -+/* Reset endpoint */ -+#if 0 -+static void udc_reset_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ -+ UDCDBGA ("reset ep_addr %d", ep_addr); -+ -+ if (!ep_num) { -+ /* control endpoint 0 can't be reset */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) { -+ UDCDBGA ("UDC_EP_RX(%d) = 0x%04x", ep_num, -+ inw (UDC_EP_RX (ep_num))); -+ if (inw (UDC_EP_RX (ep_num)) & UDC_EPn_RX_Valid) { -+ /* we have a valid rx endpoint, so reset it */ -+ outw (ep_num | UDC_EP_Sel, UDC_EP_NUM); -+ outw (UDC_Reset_EP, UDC_CTRL); -+ outw (ep_num, UDC_EP_NUM); -+ UDCDBGA ("OUT endpoint %d reset", ep_num); -+ } -+ } else { -+ UDCDBGA ("UDC_EP_TX(%d) = 0x%04x", ep_num, -+ inw (UDC_EP_TX (ep_num))); -+ /* Resetting of tx endpoints seems to be causing the USB function -+ * module to fail, which causes problems when the driver is -+ * uninstalled. We'll skip resetting tx endpoints for now until -+ * we figure out what the problem is. -+ */ -+#if 0 -+ if (inw (UDC_EP_TX (ep_num)) & UDC_EPn_TX_Valid) { -+ /* we have a valid tx endpoint, so reset it */ -+ outw (ep_num | UDC_EP_Dir | UDC_EP_Sel, UDC_EP_NUM); -+ outw (UDC_Reset_EP, UDC_CTRL); -+ outw (ep_num | UDC_EP_Dir, UDC_EP_NUM); -+ UDCDBGA ("IN endpoint %d reset", ep_num); -+ } -+#endif -+ } -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_check_ep - check logical endpoint -+ * -+ * Return physical endpoint number to use for this logical endpoint or zero if not valid. -+ */ -+#if 0 -+int udc_check_ep (int logical_endpoint, int packetsize) -+{ -+ if ((logical_endpoint == 0x80) || -+ ((logical_endpoint & 0x8f) != logical_endpoint)) { -+ return 0; -+ } -+ -+ switch (packetsize) { -+ case 8: -+ case 16: -+ case 32: -+ case 64: -+ case 128: -+ case 256: -+ case 512: -+ break; -+ default: -+ return 0; -+ } -+ -+ return EP_ADDR_TO_PHYS_EP (logical_endpoint); -+} -+#endif -+ -+/* -+ * udc_setup_ep - setup endpoint -+ * -+ * Associate a physical endpoint with endpoint_instance -+ */ -+void udc_setup_ep (struct usb_device_instance *device, -+ unsigned int ep, struct usb_endpoint_instance *endpoint) -+{ -+ UDCDBGA ("setting up endpoint addr %x", endpoint->endpoint_address); -+ -+ /* This routine gets called by bi_modinit for endpoint 0 and from -+ * bi_config for all of the other endpoints. bi_config gets called -+ * during the DEVICE_CREATE, DEVICE_CONFIGURED, and -+ * DEVICE_SET_INTERFACE events. We need to reconfigure the OMAP packet -+ * RAM after bi_config scans the selected device configuration and -+ * initializes the endpoint structures, but before this routine enables -+ * the OUT endpoint FIFOs. Since bi_config calls this routine in a -+ * loop for endpoints 1 through UDC_MAX_ENDPOINTS, we reconfigure our -+ * packet RAM here when ep==1. -+ * I really hate to do this here, but it seems like the API exported -+ * by the USB bus interface controller driver to the usbd-bi module -+ * isn't quite right so there is no good place to do this. -+ */ -+ if (ep == 1) { -+ omap1510_deconfigure_device (); -+ omap1510_configure_device (device); -+ } -+ -+ if (endpoint && (ep < UDC_MAX_ENDPOINTS)) { -+ int ep_addr = endpoint->endpoint_address; -+ -+ if (!ep_addr) { -+ /* nothing to do for endpoint 0 */ -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* nothing to do for IN (tx) endpoints */ -+ } else { /* OUT (rx) endpoint */ -+ if (endpoint->rcv_packetSize) { -+ /*struct urb* urb = &(urb_out_array[ep&0xFF]); */ -+ /*urb->endpoint = endpoint; */ -+ /*urb->device = device; */ -+ /*urb->buffer_length = sizeof(urb->buffer); */ -+ -+ /*endpoint->rcv_urb = urb; */ -+ omap1510_prepare_endpoint_for_rx (ep_addr); -+ } -+ } -+ } -+} -+ -+/** -+ * udc_disable_ep - disable endpoint -+ * @ep: -+ * -+ * Disable specified endpoint -+ */ -+#if 0 -+void udc_disable_ep (unsigned int ep_addr) -+{ -+ /*int ep_addr = PHYS_EP_TO_EP_ADDR(ep); */ -+ int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK; -+ struct usb_endpoint_instance *endpoint = omap1510_find_ep (ep_addr); /*udc_device->bus->endpoint_array + ep; */ -+ -+ UDCDBGA ("disable ep_addr %d", ep_addr); -+ -+ if (!ep_num) { -+ /* nothing to do for endpoint 0 */ ; -+ } else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ if (endpoint->tx_packetSize) { -+ /* we have a valid tx endpoint */ -+ /*usbd_flush_tx(endpoint); */ -+ endpoint->tx_urb = NULL; -+ } -+ } else { -+ if (endpoint->rcv_packetSize) { -+ /* we have a valid rx endpoint */ -+ /*usbd_flush_rcv(endpoint); */ -+ endpoint->rcv_urb = NULL; -+ } -+ } -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_connected - is the USB cable connected -+ * -+ * Return non-zero if cable is connected. -+ */ -+#if 0 -+int udc_connected (void) -+{ -+ return ((inw (UDC_DEVSTAT) & UDC_ATT) == UDC_ATT); -+} -+#endif -+ -+/* Turn on the USB connection by enabling the pullup resistor */ -+void udc_connect (void) -+{ -+ UDCDBG ("connect, enable Pullup"); -+} -+ -+/* Turn off the USB connection by disabling the pullup resistor */ -+void udc_disconnect (void) -+{ -+ UDCDBG ("disconnect, disable Pullup"); -+} -+ -+/* ************************************************************************** */ -+ -+ -+/* -+ * udc_disable_interrupts - disable interrupts -+ * switch off interrupts -+ */ -+#if 0 -+void udc_disable_interrupts (struct usb_device_instance *device) -+{ -+ UDCDBG ("disabling all interrupts"); -+ outw (0, UDC_IRQ_EN); -+} -+#endif -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_ep0_packetsize - return ep0 packetsize -+ */ -+#if 0 -+int udc_ep0_packetsize (void) -+{ -+ return EP0_PACKETSIZE; -+} -+#endif -+ -+/* Switch on the UDC */ -+void udc_enable (struct usb_device_instance *device) -+{ -+ UDCDBGA ("enable device %p, status %d", device, device->status); -+ -+ /* initialize driver state variables */ -+ udc_devstat = 0; -+ -+ /* Save the device structure pointer */ -+ udc_device = device; -+ -+ /* Setup ep0 urb */ -+ if (!ep0_urb) { -+ ep0_urb = -+ usbd_alloc_urb (udc_device, -+ udc_device->bus->endpoint_array); -+ } else { -+ serial_printf ("udc_enable: ep0_urb already allocated %p\n", -+ ep0_urb); -+ } -+ -+#ifdef FIXME -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_CTRL | UDC_VBUS_MODE, -+ FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+#endif -+ -+ s3c2410_configure_device(device); -+} -+ -+/* Switch off the UDC */ -+void udc_disable (void) -+{ -+ UDCDBG ("disable UDC"); -+ -+ s3c2410_deconfigure_device(); -+ -+#ifdef FIXME -+ /* The VBUS_MODE bit selects whether VBUS detection is done via -+ * software (1) or hardware (0). When software detection is -+ * selected, VBUS_CTRL selects whether USB is not connected (0) -+ * or connected (1). -+ */ -+ outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_MODE, FUNC_MUX_CTRL_0); -+ outl (inl (FUNC_MUX_CTRL_0) & ~UDC_VBUS_CTRL, FUNC_MUX_CTRL_0); -+ UDCREGL (FUNC_MUX_CTRL_0); -+#endif -+ -+ /* Free ep0 URB */ -+ if (ep0_urb) { -+ /*usbd_dealloc_urb(ep0_urb); */ -+ ep0_urb = NULL; -+ } -+ -+ /* Reset device pointer. -+ * We ought to do this here to balance the initialization of udc_device -+ * in udc_enable, but some of our other exported functions get called -+ * by the bus interface driver after udc_disable, so we have to hang on -+ * to the device pointer to avoid a null pointer dereference. */ -+ /* udc_device = NULL; */ -+} -+ -+/** -+ * udc_startup - allow udc code to do any additional startup -+ */ -+void udc_startup_events (struct usb_device_instance *device) -+{ -+ /* The DEVICE_INIT event puts the USB device in the state STATE_INIT. */ -+ usbd_device_event_irq (device, DEVICE_INIT, 0); -+ -+ /* The DEVICE_CREATE event puts the USB device in the state -+ * STATE_ATTACHED. -+ */ -+ usbd_device_event_irq (device, DEVICE_CREATE, 0); -+ -+ /* Some USB controller driver implementations signal -+ * DEVICE_HUB_CONFIGURED and DEVICE_RESET events here. -+ * DEVICE_HUB_CONFIGURED causes a transition to the state STATE_POWERED, -+ * and DEVICE_RESET causes a transition to the state STATE_DEFAULT. -+ * The OMAP USB client controller has the capability to detect when the -+ * USB cable is connected to a powered USB bus via the ATT bit in the -+ * DEVSTAT register, so we will defer the DEVICE_HUB_CONFIGURED and -+ * DEVICE_RESET events until later. -+ */ -+ -+ udc_enable (device); -+} -+ -+#endif -Index: git/fs/cramfs/cramfs.c -=================================================================== ---- git.orig/fs/cramfs/cramfs.c 2007-01-04 12:21:15.000000000 +0100 -+++ git/fs/cramfs/cramfs.c 2007-01-04 12:21:18.000000000 +0100 -@@ -27,7 +27,7 @@ - #include - #include - --#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) -+#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS) - - #include - #include -@@ -343,5 +343,22 @@ - } - return 1; - } -- -+#else -+int cramfs_load (char *loadoffset, struct part_info *info, char *filename) -+{ -+ return -1; -+} -+int cramfs_ls (struct part_info *info, char *filename) -+{ -+ return 0; -+} -+int cramfs_info (struct part_info *info) -+{ -+ return 0; -+} -+int cramfs_check (struct part_info *info) -+{ -+ return 0; -+} - #endif /* CFG_FS_CRAMFS */ -+ -Index: git/include/asm-arm/arch-s3c24x0/mmc.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/include/asm-arm/arch-s3c24x0/mmc.h 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,112 @@ -+/* -+ * linux/drivers/mmc/mmc_pxa.h -+ * -+ * Author: Vladimir Shebordaev, Igor Oblakov -+ * Copyright: MontaVista Software Inc. -+ * -+ * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $ -+ * -+ * 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. -+ */ -+#ifndef __MMC_PXA_P_H__ -+#define __MMC_PXA_P_H__ -+ -+#include -+ -+#define MMC_DEFAULT_RCA (1<<16) -+ -+#define MMC_BLOCK_SIZE 512 -+#define MMC_CMD_RESET 0 -+#define MMC_CMD_SEND_OP_COND 1 -+#define MMC_CMD_ALL_SEND_CID 2 -+#define MMC_CMD_SET_RCA 3 -+#define MMC_CMD_SELECT_CARD 7 -+#define MMC_CMD_SEND_CSD 9 -+#define MMC_CMD_SEND_CID 10 -+#define MMC_CMD_SEND_STATUS 13 -+#define MMC_CMD_SET_BLOCKLEN 16 -+#define MMC_CMD_READ_BLOCK 17 -+#define MMC_CMD_RD_BLK_MULTI 18 -+#define MMC_CMD_WRITE_BLOCK 24 -+ -+#define MMC_MAX_BLOCK_SIZE 512 -+ -+#define MMC_R1_IDLE_STATE 0x01 -+#define MMC_R1_ERASE_STATE 0x02 -+#define MMC_R1_ILLEGAL_CMD 0x04 -+#define MMC_R1_COM_CRC_ERR 0x08 -+#define MMC_R1_ERASE_SEQ_ERR 0x01 -+#define MMC_R1_ADDR_ERR 0x02 -+#define MMC_R1_PARAM_ERR 0x04 -+ -+#define MMC_R1B_WP_ERASE_SKIP 0x0002 -+#define MMC_R1B_ERR 0x0004 -+#define MMC_R1B_CC_ERR 0x0008 -+#define MMC_R1B_CARD_ECC_ERR 0x0010 -+#define MMC_R1B_WP_VIOLATION 0x0020 -+#define MMC_R1B_ERASE_PARAM 0x0040 -+#define MMC_R1B_OOR 0x0080 -+#define MMC_R1B_IDLE_STATE 0x0100 -+#define MMC_R1B_ERASE_RESET 0x0200 -+#define MMC_R1B_ILLEGAL_CMD 0x0400 -+#define MMC_R1B_COM_CRC_ERR 0x0800 -+#define MMC_R1B_ERASE_SEQ_ERR 0x1000 -+#define MMC_R1B_ADDR_ERR 0x2000 -+#define MMC_R1B_PARAM_ERR 0x4000 -+ -+typedef struct mmc_cid -+{ -+/* FIXME: BYTE_ORDER */ -+ uchar year:4, -+ month:4; -+ uchar sn[3]; -+ uchar fwrev:4, -+ hwrev:4; -+ uchar name[6]; -+ uchar id[3]; -+} mmc_cid_t; -+ -+typedef struct mmc_csd -+{ -+ uchar ecc:2, -+ file_format:2, -+ tmp_write_protect:1, -+ perm_write_protect:1, -+ copy:1, -+ file_format_grp:1; -+ uint64_t content_prot_app:1, -+ rsvd3:4, -+ write_bl_partial:1, -+ write_bl_len:4, -+ r2w_factor:3, -+ default_ecc:2, -+ wp_grp_enable:1, -+ wp_grp_size:5, -+ erase_grp_mult:5, -+ erase_grp_size:5, -+ c_size_mult1:3, -+ vdd_w_curr_max:3, -+ vdd_w_curr_min:3, -+ vdd_r_curr_max:3, -+ vdd_r_curr_min:3, -+ c_size:12, -+ rsvd2:2, -+ dsr_imp:1, -+ read_blk_misalign:1, -+ write_blk_misalign:1, -+ read_bl_partial:1; -+ -+ ushort read_bl_len:4, -+ ccc:12; -+ uchar tran_speed; -+ uchar nsac; -+ uchar taac; -+ uchar rsvd1:2, -+ spec_vers:4, -+ csd_structure:2; -+} mmc_csd_t; -+ -+ -+#endif /* __MMC_PXA_P_H__ */ -Index: git/include/asm-arm/arch-s3c24x0/regs-sdi.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/include/asm-arm/arch-s3c24x0/regs-sdi.h 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,110 @@ -+/* linux/include/asm/arch-s3c2410/regs-sdi.h -+ * -+ * Copyright (c) 2004 Simtec Electronics -+ * http://www.simtec.co.uk/products/SWLINUX/ -+ * -+ * 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. -+ * -+ * S3C2410 MMC/SDIO register definitions -+ * -+ * Changelog: -+ * 18-Aug-2004 Ben Dooks Created initial file -+ * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates -+ * 29-Nov-2004 Ben Dooks Updated Koen's patch -+*/ -+ -+#ifndef __ASM_ARM_REGS_SDI -+#define __ASM_ARM_REGS_SDI "regs-sdi.h" -+ -+#define S3C2440_SDICON_SDRESET (1<<8) -+#define S3C2440_SDICON_MMCCLOCK (1<<5) -+#define S3C2410_SDICON_BYTEORDER (1<<4) -+#define S3C2410_SDICON_SDIOIRQ (1<<3) -+#define S3C2410_SDICON_RWAITEN (1<<2) -+#define S3C2410_SDICON_FIFORESET (1<<1) -+#define S3C2410_SDICON_CLOCKTYPE (1<<0) -+ -+#define S3C2410_SDICMDCON_ABORT (1<<12) -+#define S3C2410_SDICMDCON_WITHDATA (1<<11) -+#define S3C2410_SDICMDCON_LONGRSP (1<<10) -+#define S3C2410_SDICMDCON_WAITRSP (1<<9) -+#define S3C2410_SDICMDCON_CMDSTART (1<<8) -+#define S3C2410_SDICMDCON_SENDERHOST (1<<6) -+#define S3C2410_SDICMDCON_INDEX (0x3f) -+ -+#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) -+#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) -+#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) -+#define S3C2410_SDICMDSTAT_RSPFIN (1<<9) -+#define S3C2410_SDICMDSTAT_XFERING (1<<8) -+#define S3C2410_SDICMDSTAT_INDEX (0xff) -+ -+#define S3C2440_SDIDCON_DS_BYTE (0<<22) -+#define S3C2440_SDIDCON_DS_HALFWORD (1<<22) -+#define S3C2440_SDIDCON_DS_WORD (2<<22) -+#define S3C2410_SDIDCON_IRQPERIOD (1<<21) -+#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) -+#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) -+#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) -+#define S3C2410_SDIDCON_BLOCKMODE (1<<17) -+#define S3C2410_SDIDCON_WIDEBUS (1<<16) -+#define S3C2410_SDIDCON_DMAEN (1<<15) -+#define S3C2410_SDIDCON_STOP (1<<14) -+#define S3C2440_SDIDCON_DATSTART (1<<14) -+#define S3C2410_SDIDCON_DATMODE (3<<12) -+#define S3C2410_SDIDCON_BLKNUM (0x7ff) -+ -+/* constants for S3C2410_SDIDCON_DATMODE */ -+#define S3C2410_SDIDCON_XFER_READY (0<<12) -+#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) -+#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) -+#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) -+ -+#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF) -+#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) -+ -+#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) -+#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) -+#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ -+#define S3C2410_SDIDSTA_CRCFAIL (1<<7) -+#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) -+#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) -+#define S3C2410_SDIDSTA_XFERFINISH (1<<4) -+#define S3C2410_SDIDSTA_BUSYFINISH (1<<3) -+#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ -+#define S3C2410_SDIDSTA_TXDATAON (1<<1) -+#define S3C2410_SDIDSTA_RXDATAON (1<<0) -+ -+#define S3C2440_SDIFSTA_FIFORESET (1<<16) -+#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */ -+#define S3C2410_SDIFSTA_TFDET (1<<13) -+#define S3C2410_SDIFSTA_RFDET (1<<12) -+#define S3C2410_SDIFSTA_TFHALF (1<<11) -+#define S3C2410_SDIFSTA_TFEMPTY (1<<10) -+#define S3C2410_SDIFSTA_RFLAST (1<<9) -+#define S3C2410_SDIFSTA_RFFULL (1<<8) -+#define S3C2410_SDIFSTA_RFHALF (1<<7) -+#define S3C2410_SDIFSTA_COUNTMASK (0x7f) -+ -+#define S3C2410_SDIIMSK_RESPONSECRC (1<<17) -+#define S3C2410_SDIIMSK_CMDSENT (1<<16) -+#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) -+#define S3C2410_SDIIMSK_RESPONSEND (1<<14) -+#define S3C2410_SDIIMSK_READWAIT (1<<13) -+#define S3C2410_SDIIMSK_SDIOIRQ (1<<12) -+#define S3C2410_SDIIMSK_FIFOFAIL (1<<11) -+#define S3C2410_SDIIMSK_CRCSTATUS (1<<10) -+#define S3C2410_SDIIMSK_DATACRC (1<<9) -+#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) -+#define S3C2410_SDIIMSK_DATAFINISH (1<<7) -+#define S3C2410_SDIIMSK_BUSYFINISH (1<<6) -+#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ -+#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) -+#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) -+#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) -+#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) -+#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) -+ -+#endif /* __ASM_ARM_REGS_SDI */ -Index: git/include/asm-arm/mach-types.h -=================================================================== ---- git.orig/include/asm-arm/mach-types.h 2007-01-04 12:21:15.000000000 +0100 -+++ git/include/asm-arm/mach-types.h 2007-01-04 12:21:18.000000000 +0100 -@@ -424,7 +424,7 @@ - #define MACH_TYPE_MPORT3S 411 - #define MACH_TYPE_RA_ALPHA 412 - #define MACH_TYPE_XCEP 413 --#define MACH_TYPE_ARCOM_MERCURY 414 -+#define MACH_TYPE_ARCOM_VULCAN 414 - #define MACH_TYPE_STARGATE 415 - #define MACH_TYPE_ARMADILLOJ 416 - #define MACH_TYPE_ELROY_JACK 417 -@@ -457,7 +457,7 @@ - #define MACH_TYPE_XM250 444 - #define MACH_TYPE_T6TC1XB 445 - #define MACH_TYPE_ESS710 446 --#define MACH_TYPE_MX3ADS 447 -+#define MACH_TYPE_MX31ADS 447 - #define MACH_TYPE_HIMALAYA 448 - #define MACH_TYPE_BOLFENK 449 - #define MACH_TYPE_AT91RM9200KR 450 -@@ -736,7 +736,309 @@ - #define MACH_TYPE_LN2410SBC 725 - #define MACH_TYPE_CB3RUFC 726 - #define MACH_TYPE_MP2USB 727 --#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_NTNP425C 728 -+#define MACH_TYPE_COLIBRI 729 -+#define MACH_TYPE_PCM7220 730 -+#define MACH_TYPE_GATEWAY7001 731 -+#define MACH_TYPE_PCM027 732 -+#define MACH_TYPE_CMPXA 733 -+#define MACH_TYPE_ANUBIS 734 -+#define MACH_TYPE_ITE8152 735 -+#define MACH_TYPE_LPC3XXX 736 -+#define MACH_TYPE_PUPPETEER 737 -+#define MACH_TYPE_MACH_VADATECH 738 -+#define MACH_TYPE_E570 739 -+#define MACH_TYPE_X50 740 -+#define MACH_TYPE_RECON 741 -+#define MACH_TYPE_XBOARDGP8 742 -+#define MACH_TYPE_FPIC2 743 -+#define MACH_TYPE_AKITA 744 -+#define MACH_TYPE_A81 745 -+#define MACH_TYPE_SVM_SC25X 746 -+#define MACH_TYPE_VADATECH020 747 -+#define MACH_TYPE_TLI 748 -+#define MACH_TYPE_EDB9315LC 749 -+#define MACH_TYPE_PASSEC 750 -+#define MACH_TYPE_DS_TIGER 751 -+#define MACH_TYPE_E310 752 -+#define MACH_TYPE_E330 753 -+#define MACH_TYPE_RT3000 754 -+#define MACH_TYPE_NOKIA770 755 -+#define MACH_TYPE_PNX0106 756 -+#define MACH_TYPE_HX21XX 757 -+#define MACH_TYPE_FARADAY 758 -+#define MACH_TYPE_SBC9312 759 -+#define MACH_TYPE_BATMAN 760 -+#define MACH_TYPE_JPD201 761 -+#define MACH_TYPE_MIPSA 762 -+#define MACH_TYPE_KACOM 763 -+#define MACH_TYPE_SWARCOCPU 764 -+#define MACH_TYPE_SWARCODSL 765 -+#define MACH_TYPE_BLUEANGEL 766 -+#define MACH_TYPE_HAIRYGRAMA 767 -+#define MACH_TYPE_BANFF 768 -+#define MACH_TYPE_CARMEVA 769 -+#define MACH_TYPE_SAM255 770 -+#define MACH_TYPE_PPM10 771 -+#define MACH_TYPE_EDB9315A 772 -+#define MACH_TYPE_SUNSET 773 -+#define MACH_TYPE_STARGATE2 774 -+#define MACH_TYPE_INTELMOTE2 775 -+#define MACH_TYPE_TRIZEPS4 776 -+#define MACH_TYPE_MAINSTONE2 777 -+#define MACH_TYPE_EZ_IXP42X 778 -+#define MACH_TYPE_TAPWAVE_ZODIAC 779 -+#define MACH_TYPE_UNIVERSALMETER 780 -+#define MACH_TYPE_HICOARM9 781 -+#define MACH_TYPE_PNX4008 782 -+#define MACH_TYPE_KWS6000 783 -+#define MACH_TYPE_PORTUX920T 784 -+#define MACH_TYPE_EZ_X5 785 -+#define MACH_TYPE_OMAP_RUDOLPH 786 -+#define MACH_TYPE_CPUAT91 787 -+#define MACH_TYPE_REA9200 788 -+#define MACH_TYPE_ACTS_PUNE_SA1110 789 -+#define MACH_TYPE_IXP425 790 -+#define MACH_TYPE_ARGONPLUSODYSSEY 791 -+#define MACH_TYPE_PERCH 792 -+#define MACH_TYPE_EIS05R1 793 -+#define MACH_TYPE_PEPPERPAD 794 -+#define MACH_TYPE_SB3010 795 -+#define MACH_TYPE_RM9200 796 -+#define MACH_TYPE_DMA03 797 -+#define MACH_TYPE_ROAD_S101 798 -+#define MACH_TYPE_IQ_NEXTGEN_A 799 -+#define MACH_TYPE_IQ_NEXTGEN_B 800 -+#define MACH_TYPE_IQ_NEXTGEN_C 801 -+#define MACH_TYPE_IQ_NEXTGEN_D 802 -+#define MACH_TYPE_IQ_NEXTGEN_E 803 -+#define MACH_TYPE_MALLOW_AT91 804 -+#define MACH_TYPE_CYBERTRACKER_I 805 -+#define MACH_TYPE_GESBC931X 806 -+#define MACH_TYPE_CENTIPAD 807 -+#define MACH_TYPE_ARMSOC 808 -+#define MACH_TYPE_SE4200 809 -+#define MACH_TYPE_EMS197A 810 -+#define MACH_TYPE_MICRO9 811 -+#define MACH_TYPE_MICRO9L 812 -+#define MACH_TYPE_UC5471DSP 813 -+#define MACH_TYPE_SJ5471ENG 814 -+#define MACH_TYPE_CMPXA26X 815 -+#define MACH_TYPE_NC 816 -+#define MACH_TYPE_OMAP_PALMTE 817 -+#define MACH_TYPE_AJAX52X 818 -+#define MACH_TYPE_SIRIUSTAR 819 -+#define MACH_TYPE_IODATA_HDLG 820 -+#define MACH_TYPE_AT91RM9200UTL 821 -+#define MACH_TYPE_BIOSAFE 822 -+#define MACH_TYPE_MP1000 823 -+#define MACH_TYPE_PARSY 824 -+#define MACH_TYPE_CCXP 825 -+#define MACH_TYPE_OMAP_GSAMPLE 826 -+#define MACH_TYPE_REALVIEW_EB 827 -+#define MACH_TYPE_SAMOA 828 -+#define MACH_TYPE_T3XSCALE 829 -+#define MACH_TYPE_I878 830 -+#define MACH_TYPE_BORZOI 831 -+#define MACH_TYPE_GECKO 832 -+#define MACH_TYPE_DS101 833 -+#define MACH_TYPE_OMAP_PALMTT2 834 -+#define MACH_TYPE_XSCALE_PALMLD 835 -+#define MACH_TYPE_CC9C 836 -+#define MACH_TYPE_SBC1670 837 -+#define MACH_TYPE_IXDP28X5 838 -+#define MACH_TYPE_OMAP_PALMTT 839 -+#define MACH_TYPE_ML696K 840 -+#define MACH_TYPE_ARCOM_ZEUS 841 -+#define MACH_TYPE_OSIRIS 842 -+#define MACH_TYPE_MAESTRO 843 -+#define MACH_TYPE_TUNGE2 844 -+#define MACH_TYPE_IXBBM 845 -+#define MACH_TYPE_MX27 846 -+#define MACH_TYPE_AX8004 847 -+#define MACH_TYPE_AT91SAM9261EK 848 -+#define MACH_TYPE_LOFT 849 -+#define MACH_TYPE_MAGPIE 850 -+#define MACH_TYPE_MX21 851 -+#define MACH_TYPE_MB87M3400 852 -+#define MACH_TYPE_MGUARD_DELTA 853 -+#define MACH_TYPE_DAVINCI_DVDP 854 -+#define MACH_TYPE_HTCUNIVERSAL 855 -+#define MACH_TYPE_TPAD 856 -+#define MACH_TYPE_ROVERP3 857 -+#define MACH_TYPE_JORNADA928 858 -+#define MACH_TYPE_MV88FXX81 859 -+#define MACH_TYPE_STMP36XX 860 -+#define MACH_TYPE_SXNI79524 861 -+#define MACH_TYPE_AMS_DELTA 862 -+#define MACH_TYPE_URANIUM 863 -+#define MACH_TYPE_UCON 864 -+#define MACH_TYPE_NAS100D 865 -+#define MACH_TYPE_L083_1000 866 -+#define MACH_TYPE_EZX 867 -+#define MACH_TYPE_PNX5220 868 -+#define MACH_TYPE_BUTTE 869 -+#define MACH_TYPE_SRM2 870 -+#define MACH_TYPE_DSBR 871 -+#define MACH_TYPE_CRYSTALBALL 872 -+#define MACH_TYPE_TINYPXA27X 873 -+#define MACH_TYPE_HERBIE 874 -+#define MACH_TYPE_MAGICIAN 875 -+#define MACH_TYPE_CM4002 876 -+#define MACH_TYPE_B4 877 -+#define MACH_TYPE_MAUI 878 -+#define MACH_TYPE_CYBERTRACKER_G 879 -+#define MACH_TYPE_NXDKN 880 -+#define MACH_TYPE_MIO8390 881 -+#define MACH_TYPE_OMI_BOARD 882 -+#define MACH_TYPE_MX21CIV 883 -+#define MACH_TYPE_MAHI_CDAC 884 -+#define MACH_TYPE_XSCALE_PALMTX 885 -+#define MACH_TYPE_S3C2413 887 -+#define MACH_TYPE_SAMSYS_EP0 888 -+#define MACH_TYPE_WG302V1 889 -+#define MACH_TYPE_WG302V2 890 -+#define MACH_TYPE_EB42X 891 -+#define MACH_TYPE_IQ331ES 892 -+#define MACH_TYPE_COSYDSP 893 -+#define MACH_TYPE_UPLAT7D 894 -+#define MACH_TYPE_PTDAVINCI 895 -+#define MACH_TYPE_MBUS 896 -+#define MACH_TYPE_NADIA2VB 897 -+#define MACH_TYPE_R1000 898 -+#define MACH_TYPE_HW90250 899 -+#define MACH_TYPE_OMAP_2430SDP 900 -+#define MACH_TYPE_DAVINCI_EVM 901 -+#define MACH_TYPE_OMAP_TORNADO 902 -+#define MACH_TYPE_OLOCREEK 903 -+#define MACH_TYPE_PALMZ72 904 -+#define MACH_TYPE_NXDB500 905 -+#define MACH_TYPE_APF9328 906 -+#define MACH_TYPE_OMAP_WIPOQ 907 -+#define MACH_TYPE_OMAP_TWIP 908 -+#define MACH_TYPE_XSCALE_PALMTREO650 909 -+#define MACH_TYPE_ACUMEN 910 -+#define MACH_TYPE_XP100 911 -+#define MACH_TYPE_FS2410 912 -+#define MACH_TYPE_PXA270_CERF 913 -+#define MACH_TYPE_SQ2FTLPALM 914 -+#define MACH_TYPE_BSEMSERVER 915 -+#define MACH_TYPE_NETCLIENT 916 -+#define MACH_TYPE_XSCALE_PALMTT5 917 -+#define MACH_TYPE_OMAP_PALMTC 918 -+#define MACH_TYPE_OMAP_APOLLON 919 -+#define MACH_TYPE_ARGONLVEVB 920 -+#define MACH_TYPE_REA_2D 921 -+#define MACH_TYPE_TI3E524 922 -+#define MACH_TYPE_ATEB9200 923 -+#define MACH_TYPE_AUCKLAND 924 -+#define MACH_TYPE_AK3320M 925 -+#define MACH_TYPE_DURAMAX 926 -+#define MACH_TYPE_N35 927 -+#define MACH_TYPE_PRONGHORN 928 -+#define MACH_TYPE_FUNDY 929 -+#define MACH_TYPE_LOGICPD_PXA270 930 -+#define MACH_TYPE_CPU777 931 -+#define MACH_TYPE_SIMICON9201 932 -+#define MACH_TYPE_LEAP2_HPM 933 -+#define MACH_TYPE_CM922TXA10 934 -+#define MACH_TYPE_PXA 935 -+#define MACH_TYPE_SANDGATE2 936 -+#define MACH_TYPE_SANDGATE2G 937 -+#define MACH_TYPE_SANDGATE2P 938 -+#define MACH_TYPE_FRED_JACK 939 -+#define MACH_TYPE_TTG_COLOR1 940 -+#define MACH_TYPE_NXEB500HMI 941 -+#define MACH_TYPE_NETDCU8 942 -+#define MACH_TYPE_ML675050_CPU_BOA 943 -+#define MACH_TYPE_NG_FVX538 944 -+#define MACH_TYPE_NG_FVS338 945 -+#define MACH_TYPE_PNX4103 946 -+#define MACH_TYPE_HESDB 947 -+#define MACH_TYPE_XSILO 948 -+#define MACH_TYPE_ESPRESSO 949 -+#define MACH_TYPE_EMLC 950 -+#define MACH_TYPE_SISTERON 951 -+#define MACH_TYPE_RX1950 952 -+#define MACH_TYPE_TSC_VENUS 953 -+#define MACH_TYPE_DS101J 954 -+#define MACH_TYPE_MXC30030ADS 955 -+#define MACH_TYPE_FUJITSU_WIMAXSOC 956 -+#define MACH_TYPE_DUALPCMODEM 957 -+#define MACH_TYPE_GESBC9312 958 -+#define MACH_TYPE_HTCAPACHE 959 -+#define MACH_TYPE_IXDP435 960 -+#define MACH_TYPE_CATPROVT100 961 -+#define MACH_TYPE_PICOTUX1XX 962 -+#define MACH_TYPE_PICOTUX2XX 963 -+#define MACH_TYPE_DSMG600 964 -+#define MACH_TYPE_EMPC2 965 -+#define MACH_TYPE_VENTURA 966 -+#define MACH_TYPE_PHIDGET_SBC 967 -+#define MACH_TYPE_IJ3K 968 -+#define MACH_TYPE_PISGAH 969 -+#define MACH_TYPE_OMAP_FSAMPLE 970 -+#define MACH_TYPE_SG720 971 -+#define MACH_TYPE_REDFOX 972 -+#define MACH_TYPE_MYSH_EP9315_1 973 -+#define MACH_TYPE_TPF106 974 -+#define MACH_TYPE_AT91RM9200KG 975 -+#define MACH_TYPE_SLEDB 976 -+#define MACH_TYPE_ONTRACK 977 -+#define MACH_TYPE_PM1200 978 -+#define MACH_TYPE_ESS24XXX 979 -+#define MACH_TYPE_COREMP7 980 -+#define MACH_TYPE_NEXCODER_6446 981 -+#define MACH_TYPE_STVC8380 982 -+#define MACH_TYPE_TEKLYNX 983 -+#define MACH_TYPE_CARBONADO 984 -+#define MACH_TYPE_SYSMOS_MP730 985 -+#define MACH_TYPE_SNAPPER_CL15 986 -+#define MACH_TYPE_PGIGIM 987 -+#define MACH_TYPE_PTX9160P2 988 -+#define MACH_TYPE_DCORE1 989 -+#define MACH_TYPE_VICTORPXA 990 -+#define MACH_TYPE_MX2DTB 991 -+#define MACH_TYPE_PXA_IREX_ER0100 992 -+#define MACH_TYPE_OMAP_PALMZ71 993 -+#define MACH_TYPE_BARTEC_DEG 994 -+#define MACH_TYPE_HW50251 995 -+#define MACH_TYPE_IBOX 996 -+#define MACH_TYPE_ATLASLH7A404 997 -+#define MACH_TYPE_PT2026 998 -+#define MACH_TYPE_HTCALPINE 999 -+#define MACH_TYPE_BARTEC_VTU 1000 -+#define MACH_TYPE_VCOREII 1001 -+#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_HTCBEETLES 1003 -+#define MACH_TYPE_S3C6400 1004 -+#define MACH_TYPE_S3C2443 1005 -+#define MACH_TYPE_OMAP_LDK 1006 -+#define MACH_TYPE_SMDK2460 1007 -+#define MACH_TYPE_SMDK2440 1008 -+#define MACH_TYPE_SMDK2412 1009 -+#define MACH_TYPE_WEBBOX 1010 -+#define MACH_TYPE_CWWNDP 1011 -+#define MACH_TYPE_DRAGON 1012 -+#define MACH_TYPE_OPENDO_CPU_BOARD 1013 -+#define MACH_TYPE_CCM2200 1014 -+#define MACH_TYPE_ETWARM 1015 -+#define MACH_TYPE_M93030 1016 -+#define MACH_TYPE_CC7U 1017 -+#define MACH_TYPE_MTT_RANGER 1018 -+#define MACH_TYPE_NEXUS 1019 -+#define MACH_TYPE_DESMAN 1020 -+#define MACH_TYPE_BKDE303 1021 -+#define MACH_TYPE_SMDK2413 1022 -+#define MACH_TYPE_AML_M7200 1023 -+#define MACH_TYPE_AML_M5900 1024 -+#define MACH_TYPE_SG640 1025 -+#define MACH_TYPE_EDG79524 1026 -+#define MACH_TYPE_AI2410 1027 -+#define MACH_TYPE_IXP465 1028 -+#define MACH_TYPE_BALLOON3 1029 -+#define MACH_TYPE_QT2410 1108 -+#define MACH_TYPE_GTA01 1182 - - #ifdef CONFIG_ARCH_EBSA110 - # ifdef machine_arch_type -@@ -3541,9 +3843,9 @@ - # else - # define machine_arch_type MACH_TYPE_RAMSES - # endif --# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES) -+# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES) - #else --# define machine_is_ramses() (0) -+# define machine_is_mnci() (0) - #endif - - #ifdef CONFIG_ARCH_S28X -@@ -4501,9 +4803,9 @@ - # else - # define machine_arch_type MACH_TYPE_M825XX - # endif --# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX) -+# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX) - #else --# define machine_is_m825xx() (0) -+# define machine_is_comcerto() (0) - #endif - - #ifdef CONFIG_SA1100_M7100 -@@ -5658,16 +5960,16 @@ - # define machine_is_xcep() (0) - #endif - --#ifdef CONFIG_MACH_ARCOM_MERCURY -+#ifdef CONFIG_MACH_ARCOM_VULCAN - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_ARCOM_MERCURY -+# define machine_arch_type MACH_TYPE_ARCOM_VULCAN - # endif --# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY) -+# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN) - #else --# define machine_is_arcom_mercury() (0) -+# define machine_is_arcom_vulcan() (0) - #endif - - #ifdef CONFIG_MACH_STARGATE -@@ -6054,16 +6356,16 @@ - # define machine_is_ess710() (0) - #endif - --#ifdef CONFIG_MACH_MX3ADS -+#ifdef CONFIG_MACH_MX31ADS - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_MX3ADS -+# define machine_arch_type MACH_TYPE_MX31ADS - # endif --# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS) -+# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS) - #else --# define machine_is_mx3ads() (0) -+# define machine_is_mx31ads() (0) - #endif - - #ifdef CONFIG_MACH_HIMALAYA -@@ -7333,9 +7635,9 @@ - # else - # define machine_arch_type MACH_TYPE_ARGONPLUSEVB - # endif --# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) -+# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) - #else --# define machine_is_argonplusevb() (0) -+# define machine_is_i30030evb() (0) - #endif - - #ifdef CONFIG_MACH_SCMA11EVB -@@ -7345,9 +7647,9 @@ - # else - # define machine_arch_type MACH_TYPE_SCMA11EVB - # endif --# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) -+# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) - #else --# define machine_is_scma11evb() (0) -+# define machine_is_mxc27530evb() (0) - #endif - - #ifdef CONFIG_MACH_SMDK2800 -@@ -8305,9 +8607,9 @@ - # else - # define machine_arch_type MACH_TYPE_SCMA11BB - # endif --# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB) -+# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_SCMA11BB) - #else --# define machine_is_scma11bb() (0) -+# define machine_is_mxc27530ads() (0) - #endif - - #ifdef CONFIG_MACH_TRIZEPS3 -@@ -9193,9 +9495,9 @@ - # else - # define machine_arch_type MACH_TYPE_ZEUSEVB - # endif --# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB) -+# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_ZEUSEVB) - #else --# define machine_is_zeusevb() (0) -+# define machine_is_mxc91131evb() (0) - #endif - - #ifdef CONFIG_MACH_P700 -@@ -9402,6 +9704,3643 @@ - # define machine_is_mp2usb() (0) - #endif - -+#ifdef CONFIG_MACH_NTNP425C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NTNP425C -+# endif -+# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C) -+#else -+# define machine_is_ntnp425c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COLIBRI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COLIBRI -+# endif -+# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI) -+#else -+# define machine_is_colibri() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM7220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM7220 -+# endif -+# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220) -+#else -+# define machine_is_pcm7220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GATEWAY7001 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GATEWAY7001 -+# endif -+# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001) -+#else -+# define machine_is_gateway7001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM027 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM027 -+# endif -+# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027) -+#else -+# define machine_is_pcm027() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA -+# endif -+# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA) -+#else -+# define machine_is_cmpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ANUBIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ANUBIS -+# endif -+# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS) -+#else -+# define machine_is_anubis() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ITE8152 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ITE8152 -+# endif -+# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152) -+#else -+# define machine_is_ite8152() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LPC3XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LPC3XXX -+# endif -+# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX) -+#else -+# define machine_is_lpc3xxx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PUPPETEER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PUPPETEER -+# endif -+# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER) -+#else -+# define machine_is_puppeteer() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MACH_VADATECH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MACH_VADATECH -+# endif -+# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH) -+#else -+# define machine_is_vt001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E570 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E570 -+# endif -+# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570) -+#else -+# define machine_is_e570() (0) -+#endif -+ -+#ifdef CONFIG_MACH_X50 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_X50 -+# endif -+# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50) -+#else -+# define machine_is_x50() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RECON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RECON -+# endif -+# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON) -+#else -+# define machine_is_recon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XBOARDGP8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XBOARDGP8 -+# endif -+# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8) -+#else -+# define machine_is_xboardgp8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FPIC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FPIC2 -+# endif -+# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2) -+#else -+# define machine_is_fpic2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AKITA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AKITA -+# endif -+# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA) -+#else -+# define machine_is_akita() (0) -+#endif -+ -+#ifdef CONFIG_MACH_A81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_A81 -+# endif -+# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81) -+#else -+# define machine_is_a81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SVM_SC25X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SVM_SC25X -+# endif -+# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X) -+#else -+# define machine_is_svm_sc25x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VADATECH020 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VADATECH020 -+# endif -+# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020) -+#else -+# define machine_is_vt020() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TLI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TLI -+# endif -+# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI) -+#else -+# define machine_is_tli() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315LC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315LC -+# endif -+# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC) -+#else -+# define machine_is_edb9315lc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PASSEC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PASSEC -+# endif -+# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC) -+#else -+# define machine_is_passec() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS_TIGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS_TIGER -+# endif -+# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER) -+#else -+# define machine_is_ds_tiger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E310 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E310 -+# endif -+# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310) -+#else -+# define machine_is_e310() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E330 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E330 -+# endif -+# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330) -+#else -+# define machine_is_e330() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RT3000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RT3000 -+# endif -+# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000) -+#else -+# define machine_is_rt3000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NOKIA770 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NOKIA770 -+# endif -+# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770) -+#else -+# define machine_is_nokia770() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX0106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX0106 -+# endif -+# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106) -+#else -+# define machine_is_pnx0106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HX21XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HX21XX -+# endif -+# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX) -+#else -+# define machine_is_hx21xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FARADAY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FARADAY -+# endif -+# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY) -+#else -+# define machine_is_faraday() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC9312 -+# endif -+# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312) -+#else -+# define machine_is_sbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BATMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BATMAN -+# endif -+# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN) -+#else -+# define machine_is_batman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JPD201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JPD201 -+# endif -+# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201) -+#else -+# define machine_is_jpd201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIPSA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIPSA -+# endif -+# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA) -+#else -+# define machine_is_mipsa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KACOM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KACOM -+# endif -+# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM) -+#else -+# define machine_is_kacom() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCOCPU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCOCPU -+# endif -+# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU) -+#else -+# define machine_is_swarcocpu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCODSL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCODSL -+# endif -+# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL) -+#else -+# define machine_is_swarcodsl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BLUEANGEL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BLUEANGEL -+# endif -+# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL) -+#else -+# define machine_is_blueangel() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HAIRYGRAMA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HAIRYGRAMA -+# endif -+# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA) -+#else -+# define machine_is_hairygrama() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BANFF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BANFF -+# endif -+# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF) -+#else -+# define machine_is_banff() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARMEVA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARMEVA -+# endif -+# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA) -+#else -+# define machine_is_carmeva() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAM255 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAM255 -+# endif -+# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255) -+#else -+# define machine_is_sam255() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PPM10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PPM10 -+# endif -+# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10) -+#else -+# define machine_is_ppm10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315A -+# endif -+# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A) -+#else -+# define machine_is_edb9315a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SUNSET -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SUNSET -+# endif -+# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET) -+#else -+# define machine_is_sunset() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STARGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STARGATE2 -+# endif -+# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2) -+#else -+# define machine_is_stargate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_INTELMOTE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_INTELMOTE2 -+# endif -+# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2) -+#else -+# define machine_is_intelmote2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TRIZEPS4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TRIZEPS4 -+# endif -+# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4) -+#else -+# define machine_is_trizeps4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAINSTONE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAINSTONE2 -+# endif -+# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2) -+#else -+# define machine_is_mainstone2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_IXP42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_IXP42X -+# endif -+# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X) -+#else -+# define machine_is_ez_ixp42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TAPWAVE_ZODIAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC -+# endif -+# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC) -+#else -+# define machine_is_tapwave_zodiac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UNIVERSALMETER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UNIVERSALMETER -+# endif -+# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER) -+#else -+# define machine_is_universalmeter() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HICOARM9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HICOARM9 -+# endif -+# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9) -+#else -+# define machine_is_hicoarm9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4008 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4008 -+# endif -+# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008) -+#else -+# define machine_is_pnx4008() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KWS6000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KWS6000 -+# endif -+# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000) -+#else -+# define machine_is_kws6000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PORTUX920T -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PORTUX920T -+# endif -+# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T) -+#else -+# define machine_is_portux920t() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_X5 -+# endif -+# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5) -+#else -+# define machine_is_ez_x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_RUDOLPH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH -+# endif -+# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH) -+#else -+# define machine_is_omap_rudolph() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPUAT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPUAT91 -+# endif -+# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91) -+#else -+# define machine_is_cpuat91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA9200 -+# endif -+# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200) -+#else -+# define machine_is_rea9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACTS_PUNE_SA1110 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110 -+# endif -+# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110) -+#else -+# define machine_is_acts_pune_sa1110() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP425 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP425 -+# endif -+# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425) -+#else -+# define machine_is_ixp425() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONPLUSODYSSEY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONPLUSODYSSEY -+# endif -+# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_ARGONPLUSODYSSEY) -+#else -+# define machine_is_i30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PERCH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PERCH -+# endif -+# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH) -+#else -+# define machine_is_perch() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EIS05R1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EIS05R1 -+# endif -+# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1) -+#else -+# define machine_is_eis05r1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PEPPERPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PEPPERPAD -+# endif -+# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD) -+#else -+# define machine_is_pepperpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SB3010 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SB3010 -+# endif -+# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010) -+#else -+# define machine_is_sb3010() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RM9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RM9200 -+# endif -+# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200) -+#else -+# define machine_is_rm9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DMA03 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DMA03 -+# endif -+# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03) -+#else -+# define machine_is_dma03() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROAD_S101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROAD_S101 -+# endif -+# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101) -+#else -+# define machine_is_road_s101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A -+# endif -+# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A) -+#else -+# define machine_is_iq_nextgen_a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_B -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B -+# endif -+# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B) -+#else -+# define machine_is_iq_nextgen_b() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C -+# endif -+# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C) -+#else -+# define machine_is_iq_nextgen_c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D -+# endif -+# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D) -+#else -+# define machine_is_iq_nextgen_d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_E -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E -+# endif -+# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E) -+#else -+# define machine_is_iq_nextgen_e() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MALLOW_AT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MALLOW_AT91 -+# endif -+# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91) -+#else -+# define machine_is_mallow_at91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_I -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_I -+# endif -+# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I) -+#else -+# define machine_is_cybertracker_i() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC931X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC931X -+# endif -+# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X) -+#else -+# define machine_is_gesbc931x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CENTIPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CENTIPAD -+# endif -+# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD) -+#else -+# define machine_is_centipad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARMSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARMSOC -+# endif -+# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC) -+#else -+# define machine_is_armsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SE4200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SE4200 -+# endif -+# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200) -+#else -+# define machine_is_se4200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMS197A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMS197A -+# endif -+# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A) -+#else -+# define machine_is_ems197a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9 -+# endif -+# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9) -+#else -+# define machine_is_micro9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9L -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9L -+# endif -+# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L) -+#else -+# define machine_is_micro9l() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UC5471DSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UC5471DSP -+# endif -+# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP) -+#else -+# define machine_is_uc5471dsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SJ5471ENG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SJ5471ENG -+# endif -+# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG) -+#else -+# define machine_is_sj5471eng() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA26X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA26X -+# endif -+# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X) -+#else -+# define machine_is_none() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NC -+# endif -+# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC) -+#else -+# define machine_is_nc1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTE -+# endif -+# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE) -+#else -+# define machine_is_omap_palmte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AJAX52X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AJAX52X -+# endif -+# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X) -+#else -+# define machine_is_ajax52x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIRIUSTAR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIRIUSTAR -+# endif -+# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR) -+#else -+# define machine_is_siriustar() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IODATA_HDLG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IODATA_HDLG -+# endif -+# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG) -+#else -+# define machine_is_iodata_hdlg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200UTL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200UTL -+# endif -+# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL) -+#else -+# define machine_is_at91rm9200utl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BIOSAFE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BIOSAFE -+# endif -+# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE) -+#else -+# define machine_is_biosafe() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MP1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MP1000 -+# endif -+# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000) -+#else -+# define machine_is_mp1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PARSY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PARSY -+# endif -+# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY) -+#else -+# define machine_is_parsy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCXP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCXP -+# endif -+# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP) -+#else -+# define machine_is_ccxp270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_GSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE -+# endif -+# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE) -+#else -+# define machine_is_omap_gsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REALVIEW_EB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REALVIEW_EB -+# endif -+# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB) -+#else -+# define machine_is_realview_eb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMOA -+# endif -+# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA) -+#else -+# define machine_is_samoa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_T3XSCALE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_T3XSCALE -+# endif -+# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE) -+#else -+# define machine_is_t3xscale() (0) -+#endif -+ -+#ifdef CONFIG_MACH_I878 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_I878 -+# endif -+# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878) -+#else -+# define machine_is_i878() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BORZOI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BORZOI -+# endif -+# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI) -+#else -+# define machine_is_borzoi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GECKO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GECKO -+# endif -+# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO) -+#else -+# define machine_is_gecko() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101 -+# endif -+# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101) -+#else -+# define machine_is_ds101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT2 -+# endif -+# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2) -+#else -+# define machine_is_omap_palmtt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMLD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMLD -+# endif -+# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD) -+#else -+# define machine_is_xscale_palmld() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC9C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC9C -+# endif -+# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C) -+#else -+# define machine_is_cc9c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC1670 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC1670 -+# endif -+# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670) -+#else -+# define machine_is_sbc1670() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP28X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP28X5 -+# endif -+# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5) -+#else -+# define machine_is_ixdp28x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT -+# endif -+# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT) -+#else -+# define machine_is_omap_palmtt() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML696K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML696K -+# endif -+# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K) -+#else -+# define machine_is_ml696k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARCOM_ZEUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARCOM_ZEUS -+# endif -+# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS) -+#else -+# define machine_is_arcom_zeus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OSIRIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OSIRIS -+# endif -+# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS) -+#else -+# define machine_is_osiris() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAESTRO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAESTRO -+# endif -+# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO) -+#else -+# define machine_is_maestro() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TUNGE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TUNGE2 -+# endif -+# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2) -+#else -+# define machine_is_tunge2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXBBM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXBBM -+# endif -+# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM) -+#else -+# define machine_is_ixbbm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX27 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX27 -+# endif -+# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27) -+#else -+# define machine_is_mx27ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AX8004 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AX8004 -+# endif -+# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004) -+#else -+# define machine_is_ax8004() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91SAM9261EK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91SAM9261EK -+# endif -+# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK) -+#else -+# define machine_is_at91sam9261ek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOFT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOFT -+# endif -+# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT) -+#else -+# define machine_is_loft() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGPIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGPIE -+# endif -+# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE) -+#else -+# define machine_is_magpie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21 -+# endif -+# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21) -+#else -+# define machine_is_mx21ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MB87M3400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MB87M3400 -+# endif -+# define machine_is_mb87m3400() (machine_arch_type == MACH_TYPE_MB87M3400) -+#else -+# define machine_is_mb87m3400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MGUARD_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MGUARD_DELTA -+# endif -+# define machine_is_mguard_delta() (machine_arch_type == MACH_TYPE_MGUARD_DELTA) -+#else -+# define machine_is_mguard_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_DVDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_DVDP -+# endif -+# define machine_is_davinci_dvdp() (machine_arch_type == MACH_TYPE_DAVINCI_DVDP) -+#else -+# define machine_is_davinci_dvdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCUNIVERSAL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCUNIVERSAL -+# endif -+# define machine_is_htcuniversal() (machine_arch_type == MACH_TYPE_HTCUNIVERSAL) -+#else -+# define machine_is_htcuniversal() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPAD -+# endif -+# define machine_is_tpad() (machine_arch_type == MACH_TYPE_TPAD) -+#else -+# define machine_is_tpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROVERP3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROVERP3 -+# endif -+# define machine_is_roverp3() (machine_arch_type == MACH_TYPE_ROVERP3) -+#else -+# define machine_is_roverp3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JORNADA928 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JORNADA928 -+# endif -+# define machine_is_jornada928() (machine_arch_type == MACH_TYPE_JORNADA928) -+#else -+# define machine_is_jornada928() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MV88FXX81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MV88FXX81 -+# endif -+# define machine_is_mv88fxx81() (machine_arch_type == MACH_TYPE_MV88FXX81) -+#else -+# define machine_is_mv88fxx81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STMP36XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STMP36XX -+# endif -+# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX) -+#else -+# define machine_is_stmp36xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SXNI79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SXNI79524 -+# endif -+# define machine_is_sxni79524() (machine_arch_type == MACH_TYPE_SXNI79524) -+#else -+# define machine_is_sxni79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AMS_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AMS_DELTA -+# endif -+# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA) -+#else -+# define machine_is_ams_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_URANIUM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_URANIUM -+# endif -+# define machine_is_uranium() (machine_arch_type == MACH_TYPE_URANIUM) -+#else -+# define machine_is_uranium() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UCON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UCON -+# endif -+# define machine_is_ucon() (machine_arch_type == MACH_TYPE_UCON) -+#else -+# define machine_is_ucon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NAS100D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NAS100D -+# endif -+# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D) -+#else -+# define machine_is_nas100d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_L083_1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_L083_1000 -+# endif -+# define machine_is_l083() (machine_arch_type == MACH_TYPE_L083_1000) -+#else -+# define machine_is_l083() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZX -+# endif -+# define machine_is_ezx() (machine_arch_type == MACH_TYPE_EZX) -+#else -+# define machine_is_ezx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX5220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX5220 -+# endif -+# define machine_is_pnx5220() (machine_arch_type == MACH_TYPE_PNX5220) -+#else -+# define machine_is_pnx5220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BUTTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BUTTE -+# endif -+# define machine_is_butte() (machine_arch_type == MACH_TYPE_BUTTE) -+#else -+# define machine_is_butte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SRM2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SRM2 -+# endif -+# define machine_is_srm2() (machine_arch_type == MACH_TYPE_SRM2) -+#else -+# define machine_is_srm2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSBR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSBR -+# endif -+# define machine_is_dsbr() (machine_arch_type == MACH_TYPE_DSBR) -+#else -+# define machine_is_dsbr() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CRYSTALBALL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CRYSTALBALL -+# endif -+# define machine_is_crystalball() (machine_arch_type == MACH_TYPE_CRYSTALBALL) -+#else -+# define machine_is_crystalball() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TINYPXA27X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TINYPXA27X -+# endif -+# define machine_is_tinypxa27x() (machine_arch_type == MACH_TYPE_TINYPXA27X) -+#else -+# define machine_is_tinypxa27x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HERBIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HERBIE -+# endif -+# define machine_is_herbie() (machine_arch_type == MACH_TYPE_HERBIE) -+#else -+# define machine_is_herbie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGICIAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGICIAN -+# endif -+# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN) -+#else -+# define machine_is_magician() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM4002 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM4002 -+# endif -+# define machine_is_cm4002() (machine_arch_type == MACH_TYPE_CM4002) -+#else -+# define machine_is_cm4002() (0) -+#endif -+ -+#ifdef CONFIG_MACH_B4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_B4 -+# endif -+# define machine_is_b4() (machine_arch_type == MACH_TYPE_B4) -+#else -+# define machine_is_b4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAUI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAUI -+# endif -+# define machine_is_maui() (machine_arch_type == MACH_TYPE_MAUI) -+#else -+# define machine_is_maui() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_G -+# endif -+# define machine_is_cybertracker_g() (machine_arch_type == MACH_TYPE_CYBERTRACKER_G) -+#else -+# define machine_is_cybertracker_g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDKN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDKN -+# endif -+# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN) -+#else -+# define machine_is_nxdkn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIO8390 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIO8390 -+# endif -+# define machine_is_mio8390() (machine_arch_type == MACH_TYPE_MIO8390) -+#else -+# define machine_is_mio8390() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMI_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMI_BOARD -+# endif -+# define machine_is_omi_board() (machine_arch_type == MACH_TYPE_OMI_BOARD) -+#else -+# define machine_is_omi_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21CIV -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21CIV -+# endif -+# define machine_is_mx21civ() (machine_arch_type == MACH_TYPE_MX21CIV) -+#else -+# define machine_is_mx21civ() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAHI_CDAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAHI_CDAC -+# endif -+# define machine_is_mahi_cdac() (machine_arch_type == MACH_TYPE_MAHI_CDAC) -+#else -+# define machine_is_mahi_cdac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTX -+# endif -+# define machine_is_xscale_palmtx() (machine_arch_type == MACH_TYPE_XSCALE_PALMTX) -+#else -+# define machine_is_xscale_palmtx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2413 -+# endif -+# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413) -+#else -+# define machine_is_s3c2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMSYS_EP0 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMSYS_EP0 -+# endif -+# define machine_is_samsys_ep0() (machine_arch_type == MACH_TYPE_SAMSYS_EP0) -+#else -+# define machine_is_samsys_ep0() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V1 -+# endif -+# define machine_is_wg302v1() (machine_arch_type == MACH_TYPE_WG302V1) -+#else -+# define machine_is_wg302v1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V2 -+# endif -+# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2) -+#else -+# define machine_is_wg302v2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EB42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EB42X -+# endif -+# define machine_is_eb42x() (machine_arch_type == MACH_TYPE_EB42X) -+#else -+# define machine_is_eb42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ331ES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ331ES -+# endif -+# define machine_is_iq331es() (machine_arch_type == MACH_TYPE_IQ331ES) -+#else -+# define machine_is_iq331es() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COSYDSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COSYDSP -+# endif -+# define machine_is_cosydsp() (machine_arch_type == MACH_TYPE_COSYDSP) -+#else -+# define machine_is_cosydsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UPLAT7D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UPLAT7D -+# endif -+# define machine_is_uplat7d_proto() (machine_arch_type == MACH_TYPE_UPLAT7D) -+#else -+# define machine_is_uplat7d_proto() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTDAVINCI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTDAVINCI -+# endif -+# define machine_is_ptdavinci() (machine_arch_type == MACH_TYPE_PTDAVINCI) -+#else -+# define machine_is_ptdavinci() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MBUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MBUS -+# endif -+# define machine_is_mbus() (machine_arch_type == MACH_TYPE_MBUS) -+#else -+# define machine_is_mbus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NADIA2VB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NADIA2VB -+# endif -+# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB) -+#else -+# define machine_is_nadia2vb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_R1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_R1000 -+# endif -+# define machine_is_r1000() (machine_arch_type == MACH_TYPE_R1000) -+#else -+# define machine_is_r1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW90250 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW90250 -+# endif -+# define machine_is_hw90250() (machine_arch_type == MACH_TYPE_HW90250) -+#else -+# define machine_is_hw90250() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_2430SDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_2430SDP -+# endif -+# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP) -+#else -+# define machine_is_omap_2430sdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_EVM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_EVM -+# endif -+# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM) -+#else -+# define machine_is_davinci_evm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TORNADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TORNADO -+# endif -+# define machine_is_omap_tornado() (machine_arch_type == MACH_TYPE_OMAP_TORNADO) -+#else -+# define machine_is_omap_tornado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OLOCREEK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OLOCREEK -+# endif -+# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK) -+#else -+# define machine_is_olocreek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PALMZ72 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PALMZ72 -+# endif -+# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72) -+#else -+# define machine_is_palmz72() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDB500 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDB500 -+# endif -+# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500) -+#else -+# define machine_is_nxdb500() (0) -+#endif -+ -+#ifdef CONFIG_MACH_APF9328 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_APF9328 -+# endif -+# define machine_is_apf9328() (machine_arch_type == MACH_TYPE_APF9328) -+#else -+# define machine_is_apf9328() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_WIPOQ -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_WIPOQ -+# endif -+# define machine_is_omap_wipoq() (machine_arch_type == MACH_TYPE_OMAP_WIPOQ) -+#else -+# define machine_is_omap_wipoq() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TWIP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TWIP -+# endif -+# define machine_is_omap_twip() (machine_arch_type == MACH_TYPE_OMAP_TWIP) -+#else -+# define machine_is_omap_twip() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTREO650 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTREO650 -+# endif -+# define machine_is_xscale_treo650() (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650) -+#else -+# define machine_is_xscale_treo650() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACUMEN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACUMEN -+# endif -+# define machine_is_acumen() (machine_arch_type == MACH_TYPE_ACUMEN) -+#else -+# define machine_is_acumen() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XP100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XP100 -+# endif -+# define machine_is_xp100() (machine_arch_type == MACH_TYPE_XP100) -+#else -+# define machine_is_xp100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FS2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FS2410 -+# endif -+# define machine_is_fs2410() (machine_arch_type == MACH_TYPE_FS2410) -+#else -+# define machine_is_fs2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA270_CERF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA270_CERF -+# endif -+# define machine_is_pxa270_cerf() (machine_arch_type == MACH_TYPE_PXA270_CERF) -+#else -+# define machine_is_pxa270_cerf() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SQ2FTLPALM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SQ2FTLPALM -+# endif -+# define machine_is_sq2ftlpalm() (machine_arch_type == MACH_TYPE_SQ2FTLPALM) -+#else -+# define machine_is_sq2ftlpalm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BSEMSERVER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BSEMSERVER -+# endif -+# define machine_is_bsemserver() (machine_arch_type == MACH_TYPE_BSEMSERVER) -+#else -+# define machine_is_bsemserver() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETCLIENT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETCLIENT -+# endif -+# define machine_is_netclient() (machine_arch_type == MACH_TYPE_NETCLIENT) -+#else -+# define machine_is_netclient() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTT5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTT5 -+# endif -+# define machine_is_xscale_palmtt5() (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5) -+#else -+# define machine_is_xscale_palmtt5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTC -+# endif -+# define machine_is_xscale_palmtc() (machine_arch_type == MACH_TYPE_OMAP_PALMTC) -+#else -+# define machine_is_xscale_palmtc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_APOLLON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_APOLLON -+# endif -+# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON) -+#else -+# define machine_is_omap_apollon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONLVEVB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONLVEVB -+# endif -+# define machine_is_mxc30030evb() (machine_arch_type == MACH_TYPE_ARGONLVEVB) -+#else -+# define machine_is_mxc30030evb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA_2D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA_2D -+# endif -+# define machine_is_rea_2d() (machine_arch_type == MACH_TYPE_REA_2D) -+#else -+# define machine_is_rea_2d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TI3E524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TI3E524 -+# endif -+# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524) -+#else -+# define machine_is_eti3e524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATEB9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATEB9200 -+# endif -+# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200) -+#else -+# define machine_is_ateb9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AUCKLAND -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AUCKLAND -+# endif -+# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND) -+#else -+# define machine_is_auckland() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AK3320M -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AK3320M -+# endif -+# define machine_is_ak3220m() (machine_arch_type == MACH_TYPE_AK3320M) -+#else -+# define machine_is_ak3220m() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DURAMAX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DURAMAX -+# endif -+# define machine_is_duramax() (machine_arch_type == MACH_TYPE_DURAMAX) -+#else -+# define machine_is_duramax() (0) -+#endif -+ -+#ifdef CONFIG_MACH_N35 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_N35 -+# endif -+# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35) -+#else -+# define machine_is_n35() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PRONGHORN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PRONGHORN -+# endif -+# define machine_is_pronghorn() (machine_arch_type == MACH_TYPE_PRONGHORN) -+#else -+# define machine_is_pronghorn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUNDY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUNDY -+# endif -+# define machine_is_fundy() (machine_arch_type == MACH_TYPE_FUNDY) -+#else -+# define machine_is_fundy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOGICPD_PXA270 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOGICPD_PXA270 -+# endif -+# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270) -+#else -+# define machine_is_logicpd_pxa270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPU777 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPU777 -+# endif -+# define machine_is_cpu777() (machine_arch_type == MACH_TYPE_CPU777) -+#else -+# define machine_is_cpu777() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIMICON9201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIMICON9201 -+# endif -+# define machine_is_simicon9201() (machine_arch_type == MACH_TYPE_SIMICON9201) -+#else -+# define machine_is_simicon9201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LEAP2_HPM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LEAP2_HPM -+# endif -+# define machine_is_leap2_hpm() (machine_arch_type == MACH_TYPE_LEAP2_HPM) -+#else -+# define machine_is_leap2_hpm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM922TXA10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM922TXA10 -+# endif -+# define machine_is_cm922txa10() (machine_arch_type == MACH_TYPE_CM922TXA10) -+#else -+# define machine_is_cm922txa10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA -+# endif -+# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA) -+#else -+# define machine_is_sandgate() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2 -+# endif -+# define machine_is_sandgate2() (machine_arch_type == MACH_TYPE_SANDGATE2) -+#else -+# define machine_is_sandgate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2G -+# endif -+# define machine_is_sandgate2g() (machine_arch_type == MACH_TYPE_SANDGATE2G) -+#else -+# define machine_is_sandgate2g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2P -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2P -+# endif -+# define machine_is_sandgate2p() (machine_arch_type == MACH_TYPE_SANDGATE2P) -+#else -+# define machine_is_sandgate2p() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FRED_JACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FRED_JACK -+# endif -+# define machine_is_fred_jack() (machine_arch_type == MACH_TYPE_FRED_JACK) -+#else -+# define machine_is_fred_jack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TTG_COLOR1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TTG_COLOR1 -+# endif -+# define machine_is_ttg_color1() (machine_arch_type == MACH_TYPE_TTG_COLOR1) -+#else -+# define machine_is_ttg_color1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXEB500HMI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXEB500HMI -+# endif -+# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI) -+#else -+# define machine_is_nxeb500hmi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETDCU8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETDCU8 -+# endif -+# define machine_is_netdcu8() (machine_arch_type == MACH_TYPE_NETDCU8) -+#else -+# define machine_is_netdcu8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML675050_CPU_BOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML675050_CPU_BOA -+# endif -+# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA) -+#else -+# define machine_is_ml675050_cpu_boa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVX538 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVX538 -+# endif -+# define machine_is_ng_fvx538() (machine_arch_type == MACH_TYPE_NG_FVX538) -+#else -+# define machine_is_ng_fvx538() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVS338 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVS338 -+# endif -+# define machine_is_ng_fvs338() (machine_arch_type == MACH_TYPE_NG_FVS338) -+#else -+# define machine_is_ng_fvs338() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4103 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4103 -+# endif -+# define machine_is_pnx4103() (machine_arch_type == MACH_TYPE_PNX4103) -+#else -+# define machine_is_pnx4103() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HESDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HESDB -+# endif -+# define machine_is_hesdb() (machine_arch_type == MACH_TYPE_HESDB) -+#else -+# define machine_is_hesdb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSILO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSILO -+# endif -+# define machine_is_xsilo() (machine_arch_type == MACH_TYPE_XSILO) -+#else -+# define machine_is_xsilo() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESPRESSO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESPRESSO -+# endif -+# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO) -+#else -+# define machine_is_espresso() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMLC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMLC -+# endif -+# define machine_is_emlc() (machine_arch_type == MACH_TYPE_EMLC) -+#else -+# define machine_is_emlc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SISTERON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SISTERON -+# endif -+# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON) -+#else -+# define machine_is_sisteron() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RX1950 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RX1950 -+# endif -+# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950) -+#else -+# define machine_is_rx1950() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TSC_VENUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TSC_VENUS -+# endif -+# define machine_is_tsc_venus() (machine_arch_type == MACH_TYPE_TSC_VENUS) -+#else -+# define machine_is_tsc_venus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101J -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101J -+# endif -+# define machine_is_ds101j() (machine_arch_type == MACH_TYPE_DS101J) -+#else -+# define machine_is_ds101j() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MXC30030ADS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MXC30030ADS -+# endif -+# define machine_is_mxc30030ads() (machine_arch_type == MACH_TYPE_MXC30030ADS) -+#else -+# define machine_is_mxc30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUJITSU_WIMAXSOC -+# endif -+# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC) -+#else -+# define machine_is_fujitsu_wimaxsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DUALPCMODEM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DUALPCMODEM -+# endif -+# define machine_is_dualpcmodem() (machine_arch_type == MACH_TYPE_DUALPCMODEM) -+#else -+# define machine_is_dualpcmodem() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC9312 -+# endif -+# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312) -+#else -+# define machine_is_gesbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCAPACHE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCAPACHE -+# endif -+# define machine_is_htcapache() (machine_arch_type == MACH_TYPE_HTCAPACHE) -+#else -+# define machine_is_htcapache() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP435 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP435 -+# endif -+# define machine_is_ixdp435() (machine_arch_type == MACH_TYPE_IXDP435) -+#else -+# define machine_is_ixdp435() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CATPROVT100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CATPROVT100 -+# endif -+# define machine_is_catprovt100() (machine_arch_type == MACH_TYPE_CATPROVT100) -+#else -+# define machine_is_catprovt100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX1XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX1XX -+# endif -+# define machine_is_picotux1xx() (machine_arch_type == MACH_TYPE_PICOTUX1XX) -+#else -+# define machine_is_picotux1xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX2XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX2XX -+# endif -+# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX) -+#else -+# define machine_is_picotux2xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSMG600 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSMG600 -+# endif -+# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600) -+#else -+# define machine_is_dsmg600() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMPC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMPC2 -+# endif -+# define machine_is_empc2() (machine_arch_type == MACH_TYPE_EMPC2) -+#else -+# define machine_is_empc2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VENTURA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VENTURA -+# endif -+# define machine_is_ventura() (machine_arch_type == MACH_TYPE_VENTURA) -+#else -+# define machine_is_ventura() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PHIDGET_SBC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PHIDGET_SBC -+# endif -+# define machine_is_phidget_sbc() (machine_arch_type == MACH_TYPE_PHIDGET_SBC) -+#else -+# define machine_is_phidget_sbc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IJ3K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IJ3K -+# endif -+# define machine_is_ij3k() (machine_arch_type == MACH_TYPE_IJ3K) -+#else -+# define machine_is_ij3k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PISGAH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PISGAH -+# endif -+# define machine_is_pisgah() (machine_arch_type == MACH_TYPE_PISGAH) -+#else -+# define machine_is_pisgah() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_FSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE -+# endif -+# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE) -+#else -+# define machine_is_omap_fsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG720 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG720 -+# endif -+# define machine_is_sg720() (machine_arch_type == MACH_TYPE_SG720) -+#else -+# define machine_is_sg720() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REDFOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REDFOX -+# endif -+# define machine_is_redfox() (machine_arch_type == MACH_TYPE_REDFOX) -+#else -+# define machine_is_redfox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MYSH_EP9315_1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MYSH_EP9315_1 -+# endif -+# define machine_is_mysh_ep9315_1() (machine_arch_type == MACH_TYPE_MYSH_EP9315_1) -+#else -+# define machine_is_mysh_ep9315_1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPF106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPF106 -+# endif -+# define machine_is_tpf106() (machine_arch_type == MACH_TYPE_TPF106) -+#else -+# define machine_is_tpf106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200KG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200KG -+# endif -+# define machine_is_at91rm9200kg() (machine_arch_type == MACH_TYPE_AT91RM9200KG) -+#else -+# define machine_is_at91rm9200kg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SLEDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SLEDB -+# endif -+# define machine_is_racemt2() (machine_arch_type == MACH_TYPE_SLEDB) -+#else -+# define machine_is_racemt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ONTRACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ONTRACK -+# endif -+# define machine_is_ontrack() (machine_arch_type == MACH_TYPE_ONTRACK) -+#else -+# define machine_is_ontrack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PM1200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PM1200 -+# endif -+# define machine_is_pm1200() (machine_arch_type == MACH_TYPE_PM1200) -+#else -+# define machine_is_pm1200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESS24XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESS24XXX -+# endif -+# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX) -+#else -+# define machine_is_ess24562() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COREMP7 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COREMP7 -+# endif -+# define machine_is_coremp7() (machine_arch_type == MACH_TYPE_COREMP7) -+#else -+# define machine_is_coremp7() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXCODER_6446 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXCODER_6446 -+# endif -+# define machine_is_nexcoder_6446() (machine_arch_type == MACH_TYPE_NEXCODER_6446) -+#else -+# define machine_is_nexcoder_6446() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STVC8380 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STVC8380 -+# endif -+# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380) -+#else -+# define machine_is_stvc8380() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TEKLYNX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TEKLYNX -+# endif -+# define machine_is_teklynx() (machine_arch_type == MACH_TYPE_TEKLYNX) -+#else -+# define machine_is_teklynx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARBONADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARBONADO -+# endif -+# define machine_is_carbonado() (machine_arch_type == MACH_TYPE_CARBONADO) -+#else -+# define machine_is_carbonado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SYSMOS_MP730 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SYSMOS_MP730 -+# endif -+# define machine_is_sysmos_mp730() (machine_arch_type == MACH_TYPE_SYSMOS_MP730) -+#else -+# define machine_is_sysmos_mp730() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SNAPPER_CL15 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SNAPPER_CL15 -+# endif -+# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15) -+#else -+# define machine_is_snapper_cl15() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PGIGIM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PGIGIM -+# endif -+# define machine_is_pgigim() (machine_arch_type == MACH_TYPE_PGIGIM) -+#else -+# define machine_is_pgigim() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTX9160P2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTX9160P2 -+# endif -+# define machine_is_ptx9160p2() (machine_arch_type == MACH_TYPE_PTX9160P2) -+#else -+# define machine_is_ptx9160p2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DCORE1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DCORE1 -+# endif -+# define machine_is_dcore1() (machine_arch_type == MACH_TYPE_DCORE1) -+#else -+# define machine_is_dcore1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VICTORPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VICTORPXA -+# endif -+# define machine_is_victorpxa() (machine_arch_type == MACH_TYPE_VICTORPXA) -+#else -+# define machine_is_victorpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX2DTB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX2DTB -+# endif -+# define machine_is_mx2dtb() (machine_arch_type == MACH_TYPE_MX2DTB) -+#else -+# define machine_is_mx2dtb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA_IREX_ER0100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA_IREX_ER0100 -+# endif -+# define machine_is_pxa_irex_er0100() (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100) -+#else -+# define machine_is_pxa_irex_er0100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMZ71 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMZ71 -+# endif -+# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71) -+#else -+# define machine_is_omap_palmz71() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_DEG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_DEG -+# endif -+# define machine_is_bartec_deg() (machine_arch_type == MACH_TYPE_BARTEC_DEG) -+#else -+# define machine_is_bartec_deg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW50251 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW50251 -+# endif -+# define machine_is_hw50251() (machine_arch_type == MACH_TYPE_HW50251) -+#else -+# define machine_is_hw50251() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IBOX -+# endif -+# define machine_is_ibox() (machine_arch_type == MACH_TYPE_IBOX) -+#else -+# define machine_is_ibox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATLASLH7A404 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATLASLH7A404 -+# endif -+# define machine_is_atlaslh7a404() (machine_arch_type == MACH_TYPE_ATLASLH7A404) -+#else -+# define machine_is_atlaslh7a404() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PT2026 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PT2026 -+# endif -+# define machine_is_pt2026() (machine_arch_type == MACH_TYPE_PT2026) -+#else -+# define machine_is_pt2026() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCALPINE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCALPINE -+# endif -+# define machine_is_htcalpine() (machine_arch_type == MACH_TYPE_HTCALPINE) -+#else -+# define machine_is_htcalpine() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_VTU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_VTU -+# endif -+# define machine_is_bartec_vtu() (machine_arch_type == MACH_TYPE_BARTEC_VTU) -+#else -+# define machine_is_bartec_vtu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VCOREII -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VCOREII -+# endif -+# define machine_is_vcoreii() (machine_arch_type == MACH_TYPE_VCOREII) -+#else -+# define machine_is_vcoreii() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PDNB3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PDNB3 -+# endif -+# define machine_is_pdnb3() (machine_arch_type == MACH_TYPE_PDNB3) -+#else -+# define machine_is_pdnb3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCBEETLES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCBEETLES -+# endif -+# define machine_is_htcbeetles() (machine_arch_type == MACH_TYPE_HTCBEETLES) -+#else -+# define machine_is_htcbeetles() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C6400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C6400 -+# endif -+# define machine_is_s3c6400() (machine_arch_type == MACH_TYPE_S3C6400) -+#else -+# define machine_is_s3c6400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2443 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2443 -+# endif -+# define machine_is_s3c2443() (machine_arch_type == MACH_TYPE_S3C2443) -+#else -+# define machine_is_s3c2443() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_LDK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_LDK -+# endif -+# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK) -+#else -+# define machine_is_omap_ldk() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2460 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2460 -+# endif -+# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460) -+#else -+# define machine_is_smdk2460() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2440 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2440 -+# endif -+# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440) -+#else -+# define machine_is_smdk2440() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2412 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2412 -+# endif -+# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412) -+#else -+# define machine_is_smdk2412() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WEBBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WEBBOX -+# endif -+# define machine_is_webbox() (machine_arch_type == MACH_TYPE_WEBBOX) -+#else -+# define machine_is_webbox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CWWNDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CWWNDP -+# endif -+# define machine_is_cwwndp() (machine_arch_type == MACH_TYPE_CWWNDP) -+#else -+# define machine_is_cwwndp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DRAGON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DRAGON -+# endif -+# define machine_is_dragon() (machine_arch_type == MACH_TYPE_DRAGON) -+#else -+# define machine_is_dragon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OPENDO_CPU_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OPENDO_CPU_BOARD -+# endif -+# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD) -+#else -+# define machine_is_opendo_cpu_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCM2200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCM2200 -+# endif -+# define machine_is_ccm2200() (machine_arch_type == MACH_TYPE_CCM2200) -+#else -+# define machine_is_ccm2200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ETWARM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ETWARM -+# endif -+# define machine_is_etwarm() (machine_arch_type == MACH_TYPE_ETWARM) -+#else -+# define machine_is_etwarm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_M93030 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_M93030 -+# endif -+# define machine_is_m93030() (machine_arch_type == MACH_TYPE_M93030) -+#else -+# define machine_is_m93030() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC7U -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC7U -+# endif -+# define machine_is_cc7u() (machine_arch_type == MACH_TYPE_CC7U) -+#else -+# define machine_is_cc7u() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MTT_RANGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MTT_RANGER -+# endif -+# define machine_is_mtt_ranger() (machine_arch_type == MACH_TYPE_MTT_RANGER) -+#else -+# define machine_is_mtt_ranger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXUS -+# endif -+# define machine_is_nexus() (machine_arch_type == MACH_TYPE_NEXUS) -+#else -+# define machine_is_nexus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DESMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DESMAN -+# endif -+# define machine_is_desman() (machine_arch_type == MACH_TYPE_DESMAN) -+#else -+# define machine_is_desman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BKDE303 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BKDE303 -+# endif -+# define machine_is_bkde303() (machine_arch_type == MACH_TYPE_BKDE303) -+#else -+# define machine_is_bkde303() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2413 -+# endif -+# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413) -+#else -+# define machine_is_smdk2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M7200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M7200 -+# endif -+# define machine_is_aml_m7200() (machine_arch_type == MACH_TYPE_AML_M7200) -+#else -+# define machine_is_aml_m7200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M5900 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M5900 -+# endif -+# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900) -+#else -+# define machine_is_aml_m5900() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG640 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG640 -+# endif -+# define machine_is_sg640() (machine_arch_type == MACH_TYPE_SG640) -+#else -+# define machine_is_sg640() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDG79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDG79524 -+# endif -+# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524) -+#else -+# define machine_is_edg79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AI2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AI2410 -+# endif -+# define machine_is_ai2410() (machine_arch_type == MACH_TYPE_AI2410) -+#else -+# define machine_is_ai2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP465 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP465 -+# endif -+# define machine_is_ixp465() (machine_arch_type == MACH_TYPE_IXP465) -+#else -+# define machine_is_ixp465() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BALLOON3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BALLOON3 -+# endif -+# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3) -+#else -+# define machine_is_balloon3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_QT2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_QT2410 -+# endif -+# define machine_is_qt2410() (machine_arch_type == MACH_TYPE_QT2410) -+#else -+# define machine_is_qt2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GTA01 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GTA01 -+# endif -+# define machine_is_gta01() (machine_arch_type == MACH_TYPE_GTA01) -+#else -+# define machine_is_gta01() (0) -+#endif -+ -+ - /* - * These have not yet been registered - */ -Index: git/include/configs/gta01.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/include/configs/gta01.h 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,233 @@ -+/* -+ * (C) Copyright 2006 Harald Welte -+ * -+ * Configuation settings for the FIC GTA01 Linux GSM phone -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+/* we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */ -+//#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LAODB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ CFG_CMD_USB | \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_DIAG | \ -+ /* CFG_CMD_HWFLOW | */ \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -+#define CONFIG_BOOTCOMMAND "nand read 0x32000000 0x34000 0x200000; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "GTA01 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+/* No NOR flash in this device */ -+#define CFG_NO_FLASH 1 -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+/* EXT2 driver */ -+#define CONFIG_EXT2 1 -+ -+#if 0 -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT 1 -+#endif -+ -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+#define CONFIG_JFFS2_NAND_OFF 0x634000 -+#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#endif -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+/* we have a board_late_init() function */ -+#define BOARD_LATE_INIT 1 -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#endif /* __CONFIG_H */ -Index: git/include/configs/qt2410.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/include/configs/qt2410.h 2007-01-04 12:21:18.000000000 +0100 -@@ -0,0 +1,245 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * Gary Jennejohn -+ * David Mueller -+ * -+ * Configuation settings for the SAMSUNG SMDK2410 board. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if 1 -+/* If we want to start u-boot from usb bootloader in NOR flash */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* If we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#endif -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -+#define CS8900_BASE 0x19000300 -+#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -+#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS \ -+ (CONFIG_CMD_DFL | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_DHCP | \ -+ CFG_CMD_DIAG | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_EXT2 | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_HWFLOW | \ -+ /* CFG_CMD_IDE | */ \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PING | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_USB) -+ -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -+#define CONFIG_ETHADDR 01:ab:cd:ef:fe:dc -+#define CONFIG_NETMASK 255.255.255.0 -+#define CONFIG_IPADDR 10.0.0.110 -+#define CONFIG_SERVERIP 10.0.0.1 -+/*#define CONFIG_BOOTFILE "elinos-lart" */ -+#define CONFIG_BOOTCOMMAND "nand load 0x32000000 0x34000 0x200000; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+/* IDE/ATA config */ -+ -+#if 0 -+#define CFG_IDE_MAXBUS 1 -+#define CFG_IDE_MAXDEVICE 2 -+#define CFG_IDE_PREINIT 0 -+ -+#define CFG_ATA_BASE_ADDR -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -+ -+#define CFG_FLASH_BASE PHYS_FLASH_1 -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -+ -+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -+#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -+#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -+ -+/* timeout values are in ticks */ -+#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -+#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET 0x30000 /* environment after bootloader */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+#define CONFIG_EXT2 1 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT 1 -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#endif -+ -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#endif /* __CONFIG_H */ -Index: git/include/s3c2410.h -=================================================================== ---- git.orig/include/s3c2410.h 2007-01-04 12:21:15.000000000 +0100 -+++ git/include/s3c2410.h 2007-01-04 12:21:18.000000000 +0100 -@@ -38,12 +38,6 @@ - #define S3C2410_ECCSIZE 512 - #define S3C2410_ECCBYTES 3 - --typedef enum { -- S3C24X0_UART0, -- S3C24X0_UART1, -- S3C24X0_UART2 --} S3C24X0_UARTS_NR; -- - /* S3C2410 device base addresses */ - #define S3C24X0_MEMCTL_BASE 0x48000000 - #define S3C24X0_USB_HOST_BASE 0x49000000 -@@ -65,9 +59,23 @@ - #define S3C2410_SDI_BASE 0x5A000000 - - -+#define oNFCONF 0x00 -+#define oNFCMD 0x04 -+#define oNFADDR 0x08 -+#define oNFDATA 0x0C -+#define oNFSTAT 0x10 -+#define oNFECC 0x14 -+ -+#ifndef __ASSEMBLER__ -+ - /* include common stuff */ - #include - -+typedef enum { -+ S3C24X0_UART0, -+ S3C24X0_UART1, -+ S3C24X0_UART2 -+} S3C24X0_UARTS_NR; - - static inline S3C24X0_MEMCTL * const S3C24X0_GetBase_MEMCTL(void) - { -@@ -142,6 +150,7 @@ - return (S3C2410_SDI * const)S3C2410_SDI_BASE; - } - -+#endif - - /* ISR */ - #define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) -Index: git/include/s3c24x0.h -=================================================================== ---- git.orig/include/s3c24x0.h 2007-01-04 12:21:15.000000000 +0100 -+++ git/include/s3c24x0.h 2007-01-04 12:21:18.000000000 +0100 -@@ -637,13 +637,7 @@ - S3C24X0_REG32 SDIDCNT; - S3C24X0_REG32 SDIDSTA; - S3C24X0_REG32 SDIFSTA; --#ifdef __BIG_ENDIAN -- S3C24X0_REG8 res[3]; -- S3C24X0_REG8 SDIDAT; --#else -- S3C24X0_REG8 SDIDAT; -- S3C24X0_REG8 res[3]; --#endif -+ S3C24X0_REG32 SDIDAT; - S3C24X0_REG32 SDIIMSK; - } /*__attribute__((__packed__))*/ S3C2410_SDI; - -@@ -1123,11 +1117,7 @@ - #define rSDIDatCnt (*(volatile unsigned *)0x5A000030) - #define rSDIDatSta (*(volatile unsigned *)0x5A000034) - #define rSDIFSTA (*(volatile unsigned *)0x5A000038) --#ifdef __BIG_ENDIAN --#define rSDIDAT (*(volatile unsigned char *)0x5A00003F) --#else --#define rSDIDAT (*(volatile unsigned char *)0x5A00003C) --#endif -+#define rSDIDAT (*(volatile unsigned *)0x5A00003C) - #define rSDIIntMsk (*(volatile unsigned *)0x5A000040) - - #endif diff --git a/packages/uboot/files/uboot-20070311-tools_makefile_ln_sf.patch b/packages/uboot/files/uboot-20070311-tools_makefile_ln_sf.patch new file mode 100644 index 0000000000..e90cc0de71 --- /dev/null +++ b/packages/uboot/files/uboot-20070311-tools_makefile_ln_sf.patch @@ -0,0 +1,19 @@ +--- a/tools/Makefile 2007-03-11 00:55:44.000000000 +0000 ++++ b/tools/Makefile 2007-03-11 00:55:52.000000000 +0000 +@@ -194,14 +194,14 @@ + + $(obj)environment.c: + @rm -f $(obj)environment.c +- ln -s $(src)../common/environment.c $(obj)environment.c ++ ln -sf $(src)../common/environment.c $(obj)environment.c + + $(obj)environment.o: $(obj)environment.c + $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $< + + $(obj)crc32.c: + @rm -f $(obj)crc32.c +- ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c ++ ln -sf $(src)../lib_generic/crc32.c $(obj)crc32.c + + $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) + $(obj)./bmp_logo $(LOGO_BMP) >$@ diff --git a/packages/uboot/files/uboot-eabi-fix-HACK.patch b/packages/uboot/files/uboot-eabi-fix-HACK.patch new file mode 100644 index 0000000000..65b212917d --- /dev/null +++ b/packages/uboot/files/uboot-eabi-fix-HACK.patch @@ -0,0 +1,197 @@ +Index: git/lib_arm/div0.c +=================================================================== +--- git.orig/lib_arm/div0.c ++++ git/lib_arm/div0.c +@@ -22,9 +22,3 @@ + */ + + /* Replacement (=dummy) for GNU/Linux division-by zero handler */ +-void __div0 (void) +-{ +- extern void hang (void); +- +- hang(); +-} +Index: git/board/neo1973/common/bootmenu.c +=================================================================== +--- git.orig/board/neo1973/common/bootmenu.c ++++ git/board/neo1973/common/bootmenu.c +@@ -118,3 +118,14 @@ void neo1973_bootmenu(void) + bootmenu_add("Factory reset", factory_reset, NULL); + bootmenu(); + } ++ ++void raise() ++{ ++ serial_printf( "*** something's wrong... please reset ***\n" ); ++} ++ ++void abort() ++{ ++ serial_printf( "*** something's wrong... please reset ***\n" ); ++} ++ +Index: git/board/neo1973/gta01/u-boot.lds +=================================================================== +--- git.orig/board/neo1973/gta01/u-boot.lds ++++ git/board/neo1973/gta01/u-boot.lds +@@ -39,6 +39,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/neo1973/gta02/u-boot.lds +=================================================================== +--- git.orig/board/neo1973/gta02/u-boot.lds ++++ git/board/neo1973/gta02/u-boot.lds +@@ -39,6 +39,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/neo1973/common/lowlevel_foo.lds +=================================================================== +--- git.orig/board/neo1973/common/lowlevel_foo.lds ++++ git/board/neo1973/common/lowlevel_foo.lds +@@ -37,6 +37,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/hxd8/hxd8.c +=================================================================== +--- git.orig/board/hxd8/hxd8.c ++++ git/board/hxd8/hxd8.c +@@ -187,3 +187,6 @@ unsigned int dynpart_size[] = { + char *dynpart_names[] = { + "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; + ++void raise() {} ++ ++void abort() {} +Index: git/board/hxd8/u-boot.lds +=================================================================== +--- git.orig/board/hxd8/u-boot.lds ++++ git/board/hxd8/u-boot.lds +@@ -39,6 +39,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/hxd8/lowlevel_foo.lds +=================================================================== +--- git.orig/board/hxd8/lowlevel_foo.lds ++++ git/board/hxd8/lowlevel_foo.lds +@@ -37,6 +37,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/qt2410/qt2410.c +=================================================================== +--- git.orig/board/qt2410/qt2410.c ++++ git/board/qt2410/qt2410.c +@@ -156,3 +156,7 @@ unsigned int dynpart_size[] = { + char *dynpart_names[] = { + "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; + ++void raise() {} ++ ++void abort() {} ++ +Index: git/board/qt2410/u-boot.lds +=================================================================== +--- git.orig/board/qt2410/u-boot.lds ++++ git/board/qt2410/u-boot.lds +@@ -39,6 +39,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -225,7 +225,7 @@ LIBS := $(addprefix $(obj),$(LIBS)) + .PHONY : $(LIBS) + + # Add GCC lib +-PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc ++PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lgcc_eh + + # The "tools" are needed early, so put this first + # Don't include stuff already done in $(LIBS) +Index: git/board/smdk2440/smdk2440.c +=================================================================== +--- git.orig/board/smdk2440/smdk2440.c ++++ git/board/smdk2440/smdk2440.c +@@ -150,3 +150,6 @@ char *dynpart_names[] = { + "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; + + ++void raise() {} ++void abort() {} ++ +Index: git/board/smdk2440/u-boot.lds +=================================================================== +--- git.orig/board/smdk2440/u-boot.lds ++++ git/board/smdk2440/u-boot.lds +@@ -39,6 +39,10 @@ SECTIONS + + . = ALIGN(4); + .rodata : { *(.rodata) } ++ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } ++ __exidx_start = .; ++ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } ++ __exidx_end = .; + + . = ALIGN(4); + .data : { *(.data) } +Index: git/board/neo1973/gta02/gta02.c +=================================================================== +--- git.orig/board/neo1973/gta02/gta02.c ++++ git/board/neo1973/gta02/gta02.c +@@ -321,3 +321,7 @@ int neo1973_set_charge_mode(enum neo1973 + /* FIXME */ + return 0; + } ++ ++void raise() {} ++void abort() {} ++ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty b/packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch b/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch deleted file mode 100644 index d7a2a872e5..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch +++ /dev/null @@ -1,52 +0,0 @@ -This patch makes creation of the BBT optional for the s3c24x0 platform. -It adds: - -- a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT -- one user of this flag, namely s3c24x0 - -Experimental. - -- Werner Almesberger - - -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:29.000000000 +0100 -+++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:54.000000000 +0100 -@@ -169,7 +169,7 @@ - - nand->eccmode = NAND_ECC_SOFT; - #ifdef CONFIG_S3C2410_NAND_BBT -- nand->options = NAND_USE_FLASH_BBT; -+ nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; - #else - nand->options = 0; - #endif -Index: u-boot/drivers/nand/nand_bbt.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:36.000000000 +0100 -+++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 -@@ -678,7 +678,8 @@ - } - create: - /* Create the bad block table by scanning the device ? */ -- if (!(td->options & NAND_BBT_CREATE)) -+ if (!(td->options & NAND_BBT_CREATE) || -+ (this->options & NAND_DONT_CREATE_BBT)) - continue; - - /* Create the table in memory by scanning the chip(s) */ -Index: u-boot/include/linux/mtd/nand.h -=================================================================== ---- u-boot.orig/include/linux/mtd/nand.h 2007-02-16 23:53:08.000000000 +0100 -+++ u-boot/include/linux/mtd/nand.h 2007-02-16 23:53:54.000000000 +0100 -@@ -187,7 +187,8 @@ - * This can only work if we have the ecc bytes directly behind the - * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ - #define NAND_HWECC_SYNDROME 0x00020000 -- -+/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */ -+#define NAND_DONT_CREATE_BBT 0x00040000 - - /* Options set by nand scan */ - /* Nand scan has allocated oob_buf */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch b/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch deleted file mode 100644 index 37b2807908..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch +++ /dev/null @@ -1,69 +0,0 @@ -Scan also the second OOB page for bad block information. - -board/neo1973/gta01/nand.c (board_nand_init): added board-specific badblock - pattern which sets NAND_BBT_SCAN2NDPAGE -drivers/nand/nand_base.c (nand_block_bad): also consider the second page in a - block if NAND_BBT_SCAN2NDPAGE is set - -- Werner Almesberger - -Index: u-boot/board/neo1973/gta01/nand.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/nand.c -+++ u-boot/board/neo1973/gta01/nand.c -@@ -113,9 +113,23 @@ - } - - -+/* Derived from drivers/nand/nand_bbt.c:smallpage_flashbased */ -+ -+static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; -+ -+static struct nand_bbt_descr badblock_pattern = { -+ .options = -+ NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES | NAND_BBT_SCAN2NDPAGE, -+ .offs = 5, -+ .len = 1, -+ .pattern = scan_ff_pattern -+}; -+ -+ - int board_nand_init(struct nand_chip *nand) - { - nand->read_otp = samsung_nand_read_otp; - nand->write_otp = samsung_nand_write_otp; -+ nand->badblock_pattern = &badblock_pattern; - return s3c24x0_nand_init(nand); - } -Index: u-boot/drivers/nand/nand_base.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_base.c -+++ u-boot/drivers/nand/nand_base.c -@@ -421,7 +421,7 @@ - * - * Check, if the block is bad. - */ --static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) -+static int nand_block_bad_page(struct mtd_info *mtd, loff_t ofs, int getchip) - { - int page, chipnr, res = 0; - struct nand_chip *this = mtd->priv; -@@ -460,6 +460,18 @@ - return res; - } - -+static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ if (nand_block_bad_page(mtd, ofs, getchip)) -+ return 1; -+ if (this->badblock_pattern->options & NAND_BBT_SCAN2NDPAGE && -+ nand_block_bad_page(mtd, ofs+(1 << this->page_shift), getchip)) -+ return 1; -+ return 0; -+} -+ - /** - * nand_default_block_markbad - [DEFAULT] mark a block bad - * @mtd: MTD device structure diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch deleted file mode 100644 index fa0de39ab7..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch +++ /dev/null @@ -1,98 +0,0 @@ -Auto-detect whether we're booting from RAM or NAND, and act accordingly. This -allows us to use the same u-boot binary for all boot modes. - -include/configs/neo1973.h: introduced new config option - CONFIG_LL_INIT_NAND_ONLY to perform low-level initialization only when - booting from NAND -include/configs/neo1973.h: got rid of BUILD_FOR_RAM -cpu/arm920t/start.S: detect if we need to boot from NAND at run time (i.e., if - we're running at address 0) - -- Werner Almesberger - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -157,18 +157,26 @@ - str r1, [r0] - #endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ - -- /* -- * we do sys-critical inits only at reboot, -- * not when booting from ram! -- */ - #ifndef CONFIG_SKIP_LOWLEVEL_INIT -+#ifndef CONFIG_LL_INIT_NAND_ONLY - bl cpu_init_crit - #endif -+#endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT --#ifndef CONFIG_S3C2410_NAND_BOOT --relocate: /* relocate U-Boot to RAM */ - adr r0, _start /* r0 <- current position of code */ -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+ /* are we running from NAND ? */ -+#define BWSCON 0x48000000 -+ ldr r1, =BWSCON /* Z = CPU booted from NAND */ -+ ldr r1, [r1] -+ tst r1, #6 /* BWSCON[2:1] = OM[1:0] */ -+ teqeq r0, #0 /* Z &= running at address 0 */ -+ beq nand_load -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -+ -+relocate: /* relocate U-Boot to RAM */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ - cmp r0, r1 /* don't reloc during debug */ - beq done_relocate -@@ -188,10 +196,13 @@ - ldr pc, _done_relocate /* jump to relocated code */ - _done_relocate: - .word done_relocate --done_relocate: --#else /* NAND_BOOT */ --relocate: --copy_myself: -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+nand_load: -+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) -+ bl cpu_init_crit -+#endif -+ - /* mov r10, lr */ - - @ reset NAND -@@ -275,7 +286,8 @@ - #endif - 1: b 1b - done_nand_read: --#endif /* NAND_BOOT */ -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -+done_relocate: - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -26,14 +26,10 @@ - #ifndef __CONFIG_H - #define __CONFIG_H - --#if defined(BUILD_FOR_RAM) --/* If we want to start u-boot from inside RAM */ --#define CONFIG_SKIP_LOWLEVEL_INIT 1 --#else --/* we want to start u-boot directly from within NAND flash */ -+/* we want to be able to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY - #define CONFIG_S3C2410_NAND_BOOT 1 - #define CONFIG_S3C2410_NAND_SKIP_BAD 1 --#endif - - #define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch deleted file mode 100644 index 53a3e05c67..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch +++ /dev/null @@ -1,62 +0,0 @@ -This patch allows us to boot from anywhere in RAM. It mainly sets the stage -for later patches. The only real changes here is the better handling of already -cached code (e.g., if we were started by a previous instance of u-boot), and -that we drop CONFIG_SKIP_RELOCATE_UBOOT from neo1973.h - -cpu/arm920t/start.S: if not relocating, instead of going straight to - stack_setup, jump to done_relocate, which may perform other setup tasks -cpu/arm920t/start.S: after relocating, flush the cache and jump to the new code -include/configs/neo1973.h: remove CONFIG_SKIP_RELOCATE_UBOOT - -- Werner Almesberger - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -171,7 +171,7 @@ relocate: /* relocate U-Boot to RAM - adr r0, _start /* r0 <- current position of code */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ - cmp r0, r1 /* don't reloc during debug */ -- beq stack_setup -+ beq done_relocate - - ldr r2, _armboot_start - ldr r3, _bss_start -@@ -181,8 +181,14 @@ relocate: /* relocate U-Boot to RAM - copy_loop: - ldmia r0!, {r3-r10} /* copy from source address [r0] */ - stmia r1!, {r3-r10} /* copy to target address [r1] */ -- cmp r0, r2 /* until source end addreee [r2] */ -+ cmp r0, r2 /* until source end address [r2] */ - ble copy_loop -+ mov r0, #0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c7, c7, 0 -+ ldr pc, _done_relocate /* jump to relocated code */ -+_done_relocate: -+ .word done_relocate -+done_relocate: - #else /* NAND_BOOT */ - relocate: - copy_myself: -@@ -270,7 +276,7 @@ notmatch: - 1: b 1b - done_nand_read: - #endif /* NAND_BOOT */ --#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ -+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ - stack_setup: -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -28,7 +28,6 @@ - - #if defined(BUILD_FOR_RAM) - /* If we want to start u-boot from inside RAM */ --#define CONFIG_SKIP_RELOCATE_UBOOT 1 - #define CONFIG_SKIP_LOWLEVEL_INIT 1 - #else - /* we want to start u-boot directly from within NAND flash */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch deleted file mode 100644 index 352967ae06..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch +++ /dev/null @@ -1,769 +0,0 @@ -board/neo1973/bootmenu.c: simple configurable boot menu -board/neo1973/neo1973.c (neo1973_new_second): return 1 if a new second has - started since the last call -board/neo1973/neo1973.c (neo1973_on_key_pressed): return 1 if the $POWER key is - pressed -board/neo1973/neo1973.c (board_late_init): make use of neo1973_new_second and - neo1973_on_key_pressed -board/neo1973/neo1973.h: added function prototypes -u-boot/board/neo1973/neo1973.c (board_late_init): enter the boot menu when - "AUX" was pressed at least half the time -u-boot/board/neo1973/neo1973.c (board_late_init): minor code cleanup -u-boot/common/console.c, include/console.h: added "console_poll_hook" to be - called when waiting for console in put in "getc" and "tstc" -board/neo1973/neo1973.c (board_late_init): poll for the boot menu also on RAM - boot, reset, or unknown cause -board/neo1973/neo1973.c (board_late_init): don't look for the power key if - woken up by the charger -board/neo1973/neo1973.h, board/neo1973/neo1973.c, board/neo1973/bootmenu.c: - renamed neo1973_911_key_pressed to neo1973_aux_key_pressed - -- Werner Almesberger - -Index: u-boot/board/neo1973/common/bootmenu.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/bootmenu.c -@@ -0,0 +1,120 @@ -+/* -+ * bootmenu.c - Boot menu -+ * -+ * Copyright (C) 2006-2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+ -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_USBD_DFU -+#include "usbdcore.h" -+#include "usb_dfu.h" -+#endif -+ -+#include "neo1973.h" -+ -+ -+#define DEBOUNCE_LOOPS 1000 /* wild guess */ -+ -+ -+static int debounce(int (*fn)(void), int *last) -+{ -+ int on, i; -+ -+again: -+ on = fn(); -+ if (on != *last) -+ for (i = DEBOUNCE_LOOPS; i; i--) -+ if (on != fn()) -+ goto again; -+ *last = on; -+ return on; -+} -+ -+ -+static int aux_key(void *user) -+{ -+ static int last_aux = -1; -+ -+ return debounce(neo1973_aux_key_pressed, &last_aux); -+} -+ -+ -+static int on_key(void *user) -+{ -+ static int last_on = -1; -+ -+ return debounce(neo1973_on_key_pressed, &last_on); -+} -+ -+ -+static void factory_reset(void *user) -+{ -+ default_env(); -+ run_command("dynpart", 0); -+ run_command("bootd", 0); -+} -+ -+ -+static int seconds(void *user) -+{ -+ return neo1973_new_second(); -+} -+ -+ -+static int system_idle(void) -+{ -+#ifdef CONFIG_USBD_DFU -+ if (system_dfu_state) -+ return *system_dfu_state == DFU_STATE_appIDLE; -+#endif -+ return 1; -+} -+ -+ -+static void poweroff_if_idle(void *user) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ if (system_idle()) -+ neo1973_poweroff(); -+ local_irq_restore(flags); -+} -+ -+ -+static struct bootmenu_setup bootmenu_setup = { -+ .next_key = aux_key, -+ .enter_key = on_key, -+ .seconds = seconds, -+ .idle_action = poweroff_if_idle, -+}; -+ -+ -+void neo1973_bootmenu(void) -+{ -+ bootmenu_add("Boot", NULL, "bootd"); -+ bootmenu_init(&bootmenu_setup); -+ bootmenu_add("Factory reset", factory_reset, NULL); -+ bootmenu(); -+} -Index: u-boot/board/neo1973/gta01/gta01.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/gta01.c -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -229,10 +229,15 @@ int board_late_init(void) - extern unsigned char booted_from_nand; - unsigned char tmp; - char buf[32]; -+ int menu_vote = 0; /* <= 0: no, > 0: yes */ -+ int seconds = 0; - - /* Initialize the Power Management Unit with a safe register set */ - pcf50606_init(); - -+ /* if there's no other reason, must be regular reset */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; -+ - if (!booted_from_nand) - goto woken_by_reset; - -@@ -242,45 +247,41 @@ int board_late_init(void) - setenv("pcf50606_int1", buf); - - if (tmp & PCF50606_INT1_ALARM) { -- /* we've been woken up by RTC alarm or charger insert, boot */ -+ /* we've been woken up by RTC alarm, boot */ - neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; - goto continue_boot; - } - if (tmp & PCF50606_INT1_EXTONR) { -+ /* we've been woken up by charger insert */ - neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; - } - - if (tmp & PCF50606_INT1_ONKEYF) { -- int seconds = 0; -- neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; - /* we've been woken up by a falling edge of the onkey */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; -+ } - -- /* we can't just setenv(bootdelay,-1) because that would -- * accidentially become permanent if the user does saveenv */ -- if (neo1973_911_key_pressed()) -- nobootdelay = 1; -- -- while (1) { -- u_int8_t int1, oocs; -- -- oocs = pcf50606_reg_read(PCF50606_REG_OOCS); -- if (oocs & PFC50606_OOCS_ONKEY) -- break; -- -- int1 = pcf50606_reg_read(PCF50606_REG_INT1); -- if (int1 & PCF50606_INT1_SECOND) -- seconds++; -- -- if (seconds >= POWER_KEY_SECONDS) -- goto continue_boot; -- } -- /* Power off if minimum number of seconds not reached */ -- neo1973_poweroff(); -+ if (neo1973_wakeup_cause == NEO1973_WAKEUP_CHARGER) { -+ /* if we still think it was only a charger insert, boot */ -+ goto continue_boot; - } - - woken_by_reset: -- /* if there's no other reason, must be regular reset */ -- neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; -+ -+ while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET || -+ neo1973_on_key_pressed()) { -+ if (neo1973_aux_key_pressed()) -+ menu_vote++; -+ else -+ menu_vote--; -+ -+ if (neo1973_new_second()) -+ seconds++; -+ if (seconds >= POWER_KEY_SECONDS) -+ goto continue_boot; -+ } -+ /* Power off if minimum number of seconds not reached */ -+ neo1973_poweroff(); - - continue_boot: - jbt6k74_init(); -@@ -304,6 +305,11 @@ continue_boot: - } - #endif - -+ if (menu_vote > 0) { -+ neo1973_bootmenu(); -+ nobootdelay = 1; -+ } -+ - return 0; - } - -@@ -369,7 +375,17 @@ void neo1973_vibrator(int on) - #endif - } - --int neo1973_911_key_pressed(void) -+int neo1973_new_second(void) -+{ -+ return pcf50606_reg_read(PCF50606_REG_INT1) & PCF50606_INT1_SECOND; -+} -+ -+int neo1973_on_key_pressed(void) -+{ -+ return !(pcf50606_reg_read(PCF50606_REG_OOCS) & PFC50606_OOCS_ONKEY); -+} -+ -+int neo1973_aux_key_pressed(void) - { - S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); - if (gpio->GPFDAT & (1 << 6)) -Index: u-boot/board/neo1973/gta01/Makefile -=================================================================== ---- u-boot.orig/board/neo1973/gta01/Makefile -+++ u-boot/board/neo1973/gta01/Makefile -@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk - - LIB = lib$(BOARD).a - --OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o -+OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o - SOBJS := ../common/lowlevel_init.o - - .PHONY: all -Index: u-boot/board/neo1973/common/neo1973.h -=================================================================== ---- u-boot.orig/board/neo1973/common/neo1973.h -+++ u-boot/board/neo1973/common/neo1973.h -@@ -29,4 +29,10 @@ int neo1973_911_key_pressed(void); - const char *neo1973_get_charge_status(void); - int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd); - -+int neo1973_new_second(void); -+int neo1973_on_key_pressed(void); -+int neo1973_aux_key_pressed(void); -+ -+void neo1973_bootmenu(void); -+ - #endif -Index: u-boot/common/console.c -=================================================================== ---- u-boot.orig/common/console.c -+++ u-boot/common/console.c -@@ -160,8 +160,12 @@ void fprintf (int file, const char *fmt, - - /** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/ - -+void (*console_poll_hook)(int activity); -+ - int getc (void) - { -+ while (console_poll_hook && !tstc()); -+ - if (gd->flags & GD_FLG_DEVINIT) { - /* Get from the standard input */ - return fgetc (stdin); -@@ -171,7 +175,7 @@ int getc (void) - return serial_getc (); - } - --int tstc (void) -+static int do_tstc (void) - { - if (gd->flags & GD_FLG_DEVINIT) { - /* Test the standard input */ -@@ -182,6 +186,16 @@ int tstc (void) - return serial_tstc (); - } - -+int tstc (void) -+{ -+ int ret; -+ -+ ret = do_tstc(); -+ if (console_poll_hook) -+ console_poll_hook(ret); -+ return ret; -+} -+ - void putc (const char c) - { - #ifdef CONFIG_SILENT_CONSOLE -Index: u-boot/include/console.h -=================================================================== ---- u-boot.orig/include/console.h -+++ u-boot/include/console.h -@@ -33,6 +33,8 @@ - extern device_t *stdio_devices[] ; - extern char *stdio_names[MAX_FILES] ; - -+extern void (*console_poll_hook)(int activity); -+ - int console_realloc(int top); - - #endif -Index: u-boot/common/Makefile -=================================================================== ---- u-boot.orig/common/Makefile -+++ u-boot/common/Makefile -@@ -50,7 +50,8 @@ COBJS = main.o ACEX1K.o altera.o bedbug. - memsize.o miiphybb.o miiphyutil.o \ - s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \ - usb.o usb_kbd.o usb_storage.o \ -- virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_mfsl.o -+ virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_mfsl.o \ -+ bootmenu.o - - SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) -Index: u-boot/common/bootmenu.c -=================================================================== ---- /dev/null -+++ u-boot/common/bootmenu.c -@@ -0,0 +1,311 @@ -+/* -+ * bootmenu.c - Boot menu -+ * -+ * Copyright (C) 2006-2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+ -+#include -+ -+#ifdef CFG_BOOTMENU -+ -+#include -+#include -+#include -+#include -+ -+ -+extern const char version_string[]; -+ -+ -+#define ANSI_CLEAR "\e[2J" -+#define ANSI_REVERSE "\e[7m" -+#define ANSI_NORMAL "\e[m" -+#define ANSI_GOTOYX "\e[%d;%dH" -+ -+/* -+ * MIN_BOOT_MENU_TIMEOUT ensures that users can't by accident set the timeout -+ * unusably short. -+ */ -+#define MIN_BOOT_MENU_TIMEOUT 10 /* 10 seconds */ -+#define BOOT_MENU_TIMEOUT 60 /* 60 seconds */ -+#define AFTER_COMMAND_WAIT 3 /* wait (2,3] after running commands */ -+#define MAX_MENU_ITEMS 10 /* cut off after that many */ -+ -+#define TOP_ROW 2 -+#define MENU_0_ROW (TOP_ROW+5) -+ -+ -+struct option { -+ const char *label; -+ void (*fn)(void *user); /* run_command if NULL */ -+ void *user; -+}; -+ -+ -+static const struct bootmenu_setup *setup; -+static struct option options[MAX_MENU_ITEMS]; -+static int num_options = 0; -+static int max_width = 0; -+ -+static device_t *bm_con; -+ -+ -+static void bm_printf(const char *fmt, ...) -+{ -+ va_list args; -+ char printbuffer[CFG_PBSIZE]; -+ -+ va_start(args, fmt); -+ vsprintf(printbuffer, fmt, args); -+ va_end(args); -+ -+ bm_con->puts(printbuffer); -+} -+ -+ -+static char *get_option(int n) -+{ -+ char name[] = "menu_XX"; -+ -+ sprintf(name+5, "%d", n); -+ return getenv(name); -+} -+ -+ -+static void print_option(const struct option *option, int reverse) -+{ -+ int n = option-options; -+ -+ bm_printf(ANSI_GOTOYX, MENU_0_ROW+n, 1); -+ if (reverse) -+ bm_printf(ANSI_REVERSE); -+ bm_printf(" %-*s ", max_width, option->label); -+ if (reverse) -+ bm_printf(ANSI_NORMAL); -+} -+ -+ -+static int get_var_positive_int(char *var, int default_value) -+{ -+ const char *s; -+ char *end; -+ int n; -+ -+ s = getenv(var); -+ if (!s) -+ return default_value; -+ n = simple_strtoul(s, &end, 0); -+ if (!*s || *end || n < 1) -+ return default_value; -+ return n; -+} -+ -+ -+static void show_bootmenu(void) -+{ -+ const struct option *option; -+ -+ bm_printf(ANSI_CLEAR ANSI_GOTOYX "%s", TOP_ROW, 1, version_string); -+ bm_printf(ANSI_GOTOYX "*** BOOT MENU ***", TOP_ROW+3, 1); -+ bm_printf(ANSI_GOTOYX, MENU_0_ROW, 1); -+ -+ for (option = options; option != options+num_options; option++) -+ print_option(option, option == options); -+ -+ bm_printf("\n\nPress [AUX] to select, [POWER] to execute.\n"); -+} -+ -+ -+static void redirect_console(int grab) -+{ -+ static device_t *orig_stdout, *orig_stderr; -+ -+ if (grab) { -+ orig_stdout = stdio_devices[stdout]; -+ orig_stderr = stdio_devices[stderr]; -+ stdio_devices[stdout] = bm_con; -+ stdio_devices[stderr] = bm_con; -+ } -+ else { -+ /* -+ * Make this conditional, because the command may also change -+ * the console. -+ */ -+ if (stdio_devices[stdout] == bm_con) -+ stdio_devices[stdout] = orig_stdout; -+ if (stdio_devices[stderr] == bm_con) -+ stdio_devices[stderr] = orig_stderr; -+ } -+} -+ -+ -+static void do_option(const struct option *option) -+{ -+ int seconds, aux; -+ -+ bm_printf(ANSI_CLEAR ANSI_GOTOYX, 1, 1); -+ redirect_console(1); -+ -+ if (option->fn) -+ option->fn(option->user); -+ else -+ run_command(option->user, 0); -+ -+ redirect_console(0); -+ seconds = get_var_positive_int("after_command_wait", -+ AFTER_COMMAND_WAIT); -+ if (seconds) -+ bm_printf("\nPress [AUX] to %s.", -+ option ? "return to boot menu" : "power off"); -+ aux = 1; /* require up-down transition */ -+ while (seconds) { -+ int tmp; -+ -+ tmp = setup->next_key(setup->user); -+ if (tmp && !aux) -+ break; -+ aux = tmp; -+ if (setup->seconds(setup->user)) -+ seconds--; -+ } -+ if (!option) -+ setup->idle_action(setup->idle_action); -+ show_bootmenu(); -+} -+ -+ -+static void bootmenu_hook(int activity) -+{ -+ static int aux = 1, on = 1; -+ static const struct option *option = options; -+ static int seconds = 0; -+ int tmp; -+ -+ if (activity) -+ seconds = 0; -+ tmp = setup->next_key(setup->user); -+ if (tmp && !aux) { -+ print_option(option, 0); -+ option++; -+ if (option == options+num_options) -+ option = options; -+ print_option(option, 1); -+ seconds = 0; -+ } -+ aux = tmp; -+ tmp = setup->enter_key(setup->user); -+ if (tmp && !on) { -+ do_option(option); -+ option = options; -+ seconds = 0; -+ } -+ on = tmp; -+ if (setup->seconds(setup->user)) { -+ int timeout; -+ -+ timeout = get_var_positive_int("boot_menu_timeout", -+ BOOT_MENU_TIMEOUT); -+ if (timeout < MIN_BOOT_MENU_TIMEOUT) -+ timeout = MIN_BOOT_MENU_TIMEOUT; -+ if (++seconds > timeout) { -+ setup->idle_action(setup->idle_action); -+ seconds = 0; -+ } -+ } -+} -+ -+ -+static device_t *find_console(const char *name) -+{ -+ int i; -+ -+ for (i = 1; i != ListNumItems(devlist); i++) { -+ device_t *dev = ListGetPtrToItem(devlist, i); -+ -+ if (!strcmp(name, dev->name)) -+ if (dev->flags & DEV_FLAGS_OUTPUT) -+ return dev; -+ } -+ return NULL; -+} -+ -+ -+void bootmenu_add(const char *label, void (*fn)(void *user), void *user) -+{ -+ int len; -+ -+ options[num_options].label = label; -+ options[num_options].fn = fn; -+ options[num_options].user = user; -+ num_options++; -+ -+ len = strlen(label); -+ if (len > max_width) -+ max_width = len; -+} -+ -+ -+void bootmenu_init(struct bootmenu_setup *__setup) -+{ -+ int n; -+ -+ setup = __setup; -+ for (n = 1; n != MAX_MENU_ITEMS+1; n++) { -+ const char *spec, *colon; -+ -+ spec = get_option(n); -+ if (!spec) -+ continue; -+ colon = strchr(spec, ':'); -+ if (!colon) -+ bootmenu_add(spec, NULL, (char *) spec); -+ else { -+ char *label; -+ int len = colon-spec; -+ -+ label = malloc(len+1); -+ if (!label) -+ return; -+ memcpy(label, spec, len); -+ label[len] = 0; -+ bootmenu_add(label, NULL, (char *) colon+1); -+ } -+ } -+} -+ -+ -+void bootmenu(void) -+{ -+ bm_con = find_console("vga"); -+ if (bm_con && bm_con->start && bm_con->start() < 0) -+ bm_con = NULL; -+ if (!bm_con) -+ bm_con = stdio_devices[stdout]; -+ if (!bm_con) -+ return; -+#if 0 -+ console_assign(stdout, "vga"); -+ console_assign(stderr, "vga"); -+#endif -+ show_bootmenu(); -+ console_poll_hook = bootmenu_hook; -+} -+ -+#endif /* CFG_BOOTMENU */ -Index: u-boot/include/bootmenu.h -=================================================================== ---- /dev/null -+++ u-boot/include/bootmenu.h -@@ -0,0 +1,71 @@ -+/* -+ * bootmenu.h - Boot menu -+ * -+ * Copyright (C) 2006-2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ */ -+ -+#ifndef BOOTMENU_H -+#define BOOTMENU_H -+ -+#define MIN_BOOT_MENU_TIMEOUT 10 /* 10 seconds */ -+#define BOOT_MENU_TIMEOUT 60 /* 60 seconds */ -+#define AFTER_COMMAND_WAIT 3 /* wait (2,3] after running commands */ -+#define MAX_MENU_ITEMS 10 /* cut off after that many */ -+ -+ -+struct bootmenu_setup { -+ /* non-zero while the "next" key is being pressed */ -+ int (*next_key)(void *user); -+ -+ /* non-zero while the "enter" key is being pressed */ -+ int (*enter_key)(void *user); -+ -+ /* return the number of seconds that have passed since the last call -+ to "seconds". It's okay to limit the range to [0, 1]. */ -+ int (*seconds)(void *user); -+ -+ /* action to take if the boot menu times out */ -+ void (*idle_action)(void *user); -+ -+ /* user-specific data, passes "as is" to the functions above */ -+ void *user; -+}; -+ -+ -+/* -+ * Initialize the menu from the environment. -+ */ -+ -+void bootmenu_init(struct bootmenu_setup *setup); -+ -+/* -+ * To add entries on top of the boot menu, call bootmenu_add before -+ * bootmenu_init. To add entries at the end, call it after bootmenu_init. -+ * If "fn" is NULL, the command specified in "user" is executed. -+ */ -+ -+void bootmenu_add(const char *label, void (*fn)(void *user), void *user); -+ -+/* -+ * Run the boot menu. -+ */ -+ -+void bootmenu(void); -+ -+#endif /* !BOOTMENU_H */ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -160,6 +160,8 @@ - /* valid baudrates */ - #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -+#define CFG_BOOTMENU -+ - /*----------------------------------------------------------------------- - * Stack sizes - * diff --git a/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch b/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch deleted file mode 100644 index ee4c1984fc..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch +++ /dev/null @@ -1,58 +0,0 @@ -common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from - memory to memory, and option CONFIG_UNZIP to enable it - -- Werner Almesberger - -Index: u-boot/common/cmd_mem.c -=================================================================== ---- u-boot.orig/common/cmd_mem.c -+++ u-boot/common/cmd_mem.c -@@ -1148,6 +1148,34 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int fl - } - #endif /* CONFIG_CRC32_VERIFY */ - -+ -+#ifdef CONFIG_UNZIP -+int gunzip (void *, int, unsigned char *, unsigned long *); -+ -+int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ unsigned long src, dst; -+ unsigned long src_len = ~0UL, dst_len = ~0UL; -+ int err; -+ -+ switch (argc) { -+ case 4: -+ dst_len = simple_strtoul(argv[3], NULL, 16); -+ /* fall through */ -+ case 3: -+ src = simple_strtoul(argv[1], NULL, 16); -+ dst = simple_strtoul(argv[2], NULL, 16); -+ break; -+ default: -+ printf ("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ return !!gunzip((void *) dst, dst_len, (void *) src, &src_len); -+} -+#endif /* CONFIG_UNZIP */ -+ -+ - /**************************************************/ - #if (CONFIG_COMMANDS & CFG_CMD_MEMORY) - U_BOOT_CMD( -@@ -1251,5 +1279,13 @@ U_BOOT_CMD( - ); - #endif /* CONFIG_MX_CYCLIC */ - -+#ifdef CONFIG_UNZIP -+U_BOOT_CMD( -+ unzip, 4, 1, do_unzip, -+ "unzip - unzip a memory region\n", -+ "srcaddr dstaddr [dstsize]\n" -+); -+#endif /* CONFIG_UNZIP */ -+ - #endif - #endif /* CFG_CMD_MEMORY */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch b/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch deleted file mode 100644 index 2ac5b75dee..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch +++ /dev/null @@ -1,127 +0,0 @@ -drivers/cfb_console.c: added processing of ANSI escape sequences \e[2J, \e[m, - \e[7m, and \e[row;colH -drivers/cfb_console.c (video_putc): make \r return to the beginning of the line - -- Werner Almesberger - -Index: u-boot/drivers/cfb_console.c -=================================================================== ---- u-boot.orig/drivers/cfb_console.c -+++ u-boot/drivers/cfb_console.c -@@ -181,6 +181,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the - - #include - #include -+#include - #include - #include - #ifdef CFG_CMD_DATE -@@ -676,10 +677,96 @@ static void console_newline (void) - - /*****************************************************************************/ - -+static enum { -+ CS_NORMAL = 0, -+ CS_ESC, -+ CS_NUM1, -+ CS_NUM2, -+} state = 0; -+ -+static int num1, num2; -+ -+ -+static void swap_drawing_colors(void) -+{ -+ eorx = fgx; -+ fgx = bgx; -+ bgx = eorx; -+ eorx = fgx ^ bgx; -+} -+ -+ -+static void process_sequence(char c) -+{ -+ static int inverted = 0; -+ int i, inv; -+ -+ switch (c) { -+ case 'J': -+ /* assume num1 == 2 */ -+ for (i = 0; i != CONSOLE_ROWS; i++) -+ console_scrollup(); -+ break; -+ case 'H': -+ if (num1 > CONSOLE_ROWS || num2 > CONSOLE_COLS) -+ break; -+ console_col = num2 ? num2-1 : 0; -+ console_row = num1 ? num1-1 : 0; -+ break; -+ case 'm': -+ inv = num1 == 7; -+ if (num1 && !inv) -+ break; -+ if (inverted != inv) -+ swap_drawing_colors(); -+ inverted = inv; -+ break; -+ } -+} -+ -+ -+static void escape_sequence(char c) -+{ -+ switch (state) { -+ case CS_ESC: -+ state = c == '[' ? CS_NUM1 : CS_NORMAL; -+ num1 = num2 = 0; -+ break; -+ case CS_NUM1: -+ if (isdigit(c)) -+ num1 = num1*10+c-'0'; -+ else if (c == ';') -+ state = CS_NUM2; -+ else { -+ process_sequence(c); -+ state = CS_NORMAL; -+ } -+ break; -+ case CS_NUM2: -+ if (isdigit(c)) -+ num2 = num2*10+c-'0'; -+ else { -+ process_sequence(c); -+ state = CS_NORMAL; -+ } -+ default: -+ /* can't happen */; -+ } -+} -+ -+ - void video_putc (const char c) - { -+ if (state) { -+ escape_sequence(c); -+ CURSOR_SET; -+ return; -+ } -+ - switch (c) { -- case 13: /* ignore */ -+ case 13: /* return to beginning of line */ -+ CURSOR_OFF; -+ console_col = 0; - break; - - case '\n': /* next line */ -@@ -698,6 +785,10 @@ void video_putc (const char c) - console_back (); - break; - -+ case '\e': -+ state = CS_ESC; -+ break; -+ - default: /* draw the char */ - video_putchar (console_col * VIDEO_FONT_WIDTH, - console_row * VIDEO_FONT_HEIGHT, diff --git a/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch b/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch deleted file mode 100644 index b9ae4f29fe..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch +++ /dev/null @@ -1,101 +0,0 @@ -common/env_common.c (default_env): new function that resets the environment to - the default value -common/env_common.c (env_relocate): use default_env instead of own copy -common/env_nand.c (env_relocate_spec): use default_env instead of own copy -include/environment.h: added default_env prototype - -- Werner Almesberger - -Index: u-boot/common/env_common.c -=================================================================== ---- u-boot.orig/common/env_common.c -+++ u-boot/common/env_common.c -@@ -202,6 +202,25 @@ uchar *env_get_addr (int index) - } - } - -+void default_env(void) -+{ -+ if (sizeof(default_environment) > ENV_SIZE) -+ { -+ puts ("*** Error - default environment is too large\n\n"); -+ return; -+ } -+ -+ memset (env_ptr, 0, sizeof(env_t)); -+ memcpy (env_ptr->data, -+ default_environment, -+ sizeof(default_environment)); -+#ifdef CFG_REDUNDAND_ENVIRONMENT -+ env_ptr->flags = 0xFF; -+#endif -+ env_crc_update (); -+ gd->env_valid = 1; -+} -+ - void env_relocate (void) - { - DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__, -@@ -245,23 +264,8 @@ void env_relocate (void) - gd->env_valid = 0; - #endif - -- if (gd->env_valid == 0) { -- if (sizeof(default_environment) > ENV_SIZE) -- { -- puts ("*** Error - default environment is too large\n\n"); -- return; -- } -- -- memset (env_ptr, 0, sizeof(env_t)); -- memcpy (env_ptr->data, -- default_environment, -- sizeof(default_environment)); --#ifdef CFG_REDUNDAND_ENVIRONMENT -- env_ptr->flags = 0xFF; --#endif -- env_crc_update (); -- gd->env_valid = 1; -- } -+ if (gd->env_valid == 0) -+ default_env(); - else { - env_relocate_spec (); - } -Index: u-boot/common/env_nand.c -=================================================================== ---- u-boot.orig/common/env_nand.c -+++ u-boot/common/env_nand.c -@@ -313,19 +313,7 @@ void env_relocate_spec (void) - static void use_default() - { - puts ("*** Warning - bad CRC or NAND, using default environment\n\n"); -- -- if (default_environment_size > CFG_ENV_SIZE){ -- puts ("*** Error - default environment is too large\n\n"); -- return; -- } -- -- memset (env_ptr, 0, sizeof(env_t)); -- memcpy (env_ptr->data, -- default_environment, -- default_environment_size); -- env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE); -- gd->env_valid = 1; -- -+ default_env(); - } - #endif - -Index: u-boot/include/environment.h -=================================================================== ---- u-boot.orig/include/environment.h -+++ u-boot/include/environment.h -@@ -107,4 +107,7 @@ typedef struct environment_s { - unsigned char data[ENV_SIZE]; /* Environment data */ - } env_t; - -+ -+void default_env(void); -+ - #endif /* _ENVIRONMENT_H_ */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch b/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch deleted file mode 100644 index 23d4b13626..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch +++ /dev/null @@ -1,22 +0,0 @@ -common/cmd_nand.c (yes): if the environment variable "dontask" is set to "y" or - "Y", non-interactively assume the answer was "yes". In all other cases, ask. - -- Werner Almesberger - -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c -+++ u-boot/common/cmd_nand.c -@@ -165,8 +165,12 @@ out: - - static int yes(void) - { -+ char *s; - char c; - -+ s = getenv("dontask"); -+ if (s && (s[0] =='y' || s[0] == 'Y') && !s[1]) -+ return 1; - c = getc(); - if (c != 'y' && c != 'Y') - return 0; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch b/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch deleted file mode 100644 index cf12352553..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch +++ /dev/null @@ -1,139 +0,0 @@ -common/cmd_nand.c: globalized arg_off_size -include/util.h: new header to convenience functions, such as arg_off_size -common/cmd_dynenv.c (do_dynenv): use arg_off_size to sanity-check offset and to - allow use of partition name -common/cmd_dynenv.c (do_dynenv): indicate in no uncertain terms when an update - would not work due to Flash bits already cleared -common/cmd_dynenv.c (do_dynenv): update CFG_ENV_OFFSET after successful "dynenv - set", so that we can write the new environment without having to reboot - -- Werner Almesberger - -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c -+++ u-boot/common/cmd_nand.c -@@ -100,7 +100,7 @@ static inline int str2long(char *p, ulon - return (*p != '\0' && *endptr == '\0') ? 1 : 0; - } - --static int -+int - arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size) - { - int idx = nand_curr_device; -Index: u-boot/include/util.h -=================================================================== ---- /dev/null -+++ u-boot/include/util.h -@@ -0,0 +1,33 @@ -+/* -+ * util.h - Convenience functions -+ * -+ * (C) Copyright 2006-2007 OpenMoko, Inc. -+ * Author: Werner Almesberger -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef UTIL_H -+#define UTIL_H -+ -+#include "nand.h" -+ -+ -+/* common/cmd_nand.c */ -+int arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, -+ ulong *size); -+ -+#endif /* UTIL_H */ -Index: u-boot/common/cmd_dynenv.c -=================================================================== ---- u-boot.orig/common/cmd_dynenv.c -+++ u-boot/common/cmd_dynenv.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - - #if defined(CFG_ENV_OFFSET_OOB) -@@ -39,8 +40,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag - if (!buf) - return -ENOMEM; - -+ ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); - if (!strcmp(cmd, "get")) { -- ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); - - if (buf[0] == 'E' && buf[1] == 'N' && - buf[2] == 'V' && buf[3] == '0') -@@ -49,7 +50,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag - printf("No dynamic environment marker in OOB block 0\n"); - - } else if (!strcmp(cmd, "set")) { -- unsigned long addr; -+ unsigned long addr, dummy; -+ - if (argc < 3) - goto usage; - -@@ -57,7 +59,23 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag - buf[1] = 'N'; - buf[2] = 'V'; - buf[3] = '0'; -- addr = simple_strtoul(argv[2], NULL, 16); -+ -+ if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy) < 0) { -+ printf("Offset or partition name expected\n"); -+ goto fail; -+ } -+ if (!ret) { -+ uint8_t tmp[4]; -+ int i; -+ -+ memcpy(&tmp, &addr, 4); -+ for (i = 0; i != 4; i++) -+ if (tmp[i] & ~buf[i+4]) { -+ printf("ERROR: erase OOB block to " -+ "write this value\n"); -+ goto fail; -+ } -+ } - memcpy(buf+4, &addr, 4); - - printf("%02x %02x %02x %02x - %02x %02x %02x %02x\n", -@@ -65,6 +83,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag - buf[4], buf[5], buf[6], buf[7]); - - ret = mtd->write_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); -+ if (!ret) -+ CFG_ENV_OFFSET = addr; - } else - goto usage; - -@@ -72,8 +92,9 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag - return ret; - - usage: -- free(buf); - printf("Usage:\n%s\n", cmdtp->usage); -+fail: -+ free(buf); - return 1; - } - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch b/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch deleted file mode 100644 index 7326c2daa6..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch +++ /dev/null @@ -1,40 +0,0 @@ -Index: u-boot/board/neo1973/neo1973.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/gta01.c -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -68,8 +68,12 @@ DECLARE_GLOBAL_DATA_PTR; - #define U_M_PDIV 0x2 - #define U_M_SDIV 0x3 - -+#define VALID_WAKEUP_REASONS (PCF50606_INT1_ONKEYF | PCF50606_INT1_ALARM) -+ - unsigned int neo1973_wakeup_cause; - extern int nobootdelay; -+static unsigned char int1; -+ - - static inline void delay (unsigned long loops) - { -@@ -179,6 +183,13 @@ int board_init (void) - #error Please define GTA01 version - #endif - -+ i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); -+ int1 = pcf50606_reg_read(PCF50606_REG_INT1); -+ if (!(int1 & VALID_WAKEUP_REASONS) && !neo1973_aux_key_pressed()) { -+ pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY); -+ while (1); -+ } -+ - /* arch number of SMDK2410-Board */ - gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA01; - -@@ -200,7 +211,7 @@ int board_late_init(void) - pcf50606_init(); - - /* obtain wake-up reason, save INT1 in environment */ -- tmp = pcf50606_reg_read(PCF50606_REG_INT1); -+ tmp = int1; //pcf50606_reg_read(PCF50606_REG_INT1); - sprintf(buf, "0x%02x", tmp); - setenv("pcf50606_int1", buf); - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch b/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch deleted file mode 100644 index dcb721c8d3..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch +++ /dev/null @@ -1,56 +0,0 @@ -drivers/cfb_console.c: include asm/byteorder.h for le32_to_cpu and friends - [ shouldn't someone else have found this long ago ? ] -include/configs/neo1973.h (CONFIG_COMMANDS): add CFG_CMD_BMP -include/configs/neo1973.h: enable splash screen and BMP support -include/configs/neo1973.h: remove #if 1 ... #endif around video definitions - -- Werner Almesberger - -Index: u-boot/drivers/cfb_console.c -=================================================================== ---- u-boot.orig/drivers/cfb_console.c -+++ u-boot/drivers/cfb_console.c -@@ -191,6 +191,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the - #if (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) - #include - #include -+#include - #endif /* (CONFIG_COMMANDS & CFG_CMD_BMP) || CONFIG_SPLASH_SCREEN */ - - /*****************************************************************************/ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -86,6 +86,7 @@ - /* CFG_CMD_IRQ | */ \ - CFG_CMD_BOOTD | \ - CFG_CMD_CONSOLE | \ -+ CFG_CMD_BMP | \ - CFG_CMD_ASKENV | \ - CFG_CMD_RUN | \ - CFG_CMD_ECHO | \ -@@ -244,19 +245,21 @@ - /* we have a board_late_init() function */ - #define BOARD_LATE_INIT 1 - --#if 1 - #define CONFIG_VIDEO - #define CONFIG_VIDEO_S3C2410 - #define CONFIG_CFB_CONSOLE - #define CONFIG_VIDEO_LOGO -+#define CONFIG_SPLASH_SCREEN -+#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ -+#define CONFIG_VIDEO_BMP_GZIP - #define CONFIG_VGA_AS_SINGLE_DEVICE -+#define CONFIG_UNZIP - - #define VIDEO_KBD_INIT_FCT 0 - #define VIDEO_TSTC_FCT serial_tstc - #define VIDEO_GETC_FCT serial_getc - - #define LCD_VIDEO_ADDR 0x33d00000 --#endif - - #define CONFIG_S3C2410_NAND_BBT 1 - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch b/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch deleted file mode 100644 index 5a2dd61461..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch +++ /dev/null @@ -1,198 +0,0 @@ -This patch adds support for CFG_ENV_OFFSET_PATCHED and -CFG_ENV_OFFSET_OOB. - -Both try to solve the problem of fixing the environment location in NAND flash -at compile time, which doesn't work well if the NAND flash has a bad block at -exactly that location. - -CFG_ENV_OFFSET_PATCHED puts the environment in a global variable. You can then -use the linker script to put that variable to a fixed location in the u-boot -image. Then you can use bianry patching during the production flash process. - -The idea of CFG_ENV_OFFSET_OOB is to store the environment offset in the NAND -OOB data of block 0. We can do this in case the vendor makes a guarantee that -block 0 never is a factory-default bad block. - -Signed-off-by: Harald Welte - -Index: u-boot/common/env_nand.c -=================================================================== ---- u-boot.orig/common/env_nand.c -+++ u-boot/common/env_nand.c -@@ -271,6 +271,33 @@ - ulong total; - int ret; - -+#if defined(CFG_ENV_OFFSET_OOB) -+ struct mtd_info *mtd = &nand_info[0]; -+ struct nand_chip *this = mtd->priv; -+ int buf_len; -+ uint8_t *buf; -+ -+ buf_len = (1 << this->bbt_erase_shift); -+ buf_len += (buf_len >> this->page_shift) * mtd->oobsize; -+ buf = malloc(buf_len); -+ if (!buf) -+ return; -+ -+ nand_read_raw(mtd, buf, 0, mtd->oobblock, mtd->oobsize); -+ if (buf[mtd->oobblock + 8 + 0] == 'E' && -+ buf[mtd->oobblock + 8 + 1] == 'N' && -+ buf[mtd->oobblock + 8 + 2] == 'V' && -+ buf[mtd->oobblock + 8 + 3] == '0') { -+ CFG_ENV_OFFSET = *((unsigned long *) &buf[mtd->oobblock + 8 + 4]); -+ /* fall through to the normal environment reading code below */ -+ free(buf); -+ puts("Found Environment offset in OOB..\n"); -+ } else { -+ free(buf); -+ return use_default(); -+ } -+#endif -+ - total = CFG_ENV_SIZE; - ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr); - if (ret || total != CFG_ENV_SIZE) -Index: u-boot/common/environment.c -=================================================================== ---- u-boot.orig/common/environment.c -+++ u-boot/common/environment.c -@@ -29,6 +29,12 @@ - #undef __ASSEMBLY__ - #include - -+#if defined(CFG_ENV_OFFSET_PATCHED) -+unsigned long env_offset = CFG_ENV_OFFSET_PATCHED; -+#elif defined(CFG_ENV_OFFSET_OOB) -+unsigned long env_offset = CFG_ENV_OFFSET_OOB; -+#endif -+ - /* - * Handle HOSTS that have prepended - * crap on symbol names, not TARGETS. -Index: u-boot/include/environment.h -=================================================================== ---- u-boot.orig/include/environment.h -+++ u-boot/include/environment.h -@@ -70,6 +70,10 @@ - #endif /* CFG_ENV_IS_IN_FLASH */ - - #if defined(CFG_ENV_IS_IN_NAND) -+#if defined(CFG_ENV_OFFSET_PATCHED) || defined(CFG_ENV_OFFSET_OOB) -+extern unsigned long env_offset; -+#define CFG_ENV_OFFSET env_offset -+#else - # ifndef CFG_ENV_OFFSET - # error "Need to define CFG_ENV_OFFSET when using CFG_ENV_IS_IN_NAND" - # endif -@@ -82,6 +86,7 @@ - # ifdef CFG_ENV_IS_EMBEDDED - # define ENV_IS_EMBEDDED 1 - # endif -+#endif /* CFG_ENV_NAND_PATCHED */ - #endif /* CFG_ENV_IS_IN_NAND */ - - -Index: u-boot/common/Makefile -=================================================================== ---- u-boot.orig/common/Makefile -+++ u-boot/common/Makefile -@@ -31,7 +31,7 @@ - cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \ - cmd_cache.o cmd_console.o \ - cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \ -- cmd_eeprom.o cmd_elf.o cmd_ext2.o \ -+ cmd_dynenv.o cmd_eeprom.o cmd_elf.o cmd_ext2.o \ - cmd_fat.o cmd_fdc.o cmd_fdt.o cmd_fdos.o cmd_flash.o cmd_fpga.o \ - cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \ - cmd_load.o cmd_log.o \ -Index: u-boot/common/cmd_dynenv.c -=================================================================== ---- /dev/null -+++ u-boot/common/cmd_dynenv.c -@@ -0,0 +1,85 @@ -+/* -+ * (C) Copyright 2006-2007 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if defined(CFG_ENV_OFFSET_OOB) -+ -+int do_dynenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ struct mtd_info *mtd = &nand_info[0]; -+ int ret, size = 8; -+ uint8_t *buf; -+ -+ char *cmd = argv[1]; -+ -+ buf = malloc(mtd->oobsize); -+ if (!buf) -+ return -ENOMEM; -+ -+ if (!strcmp(cmd, "get")) { -+ ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); -+ -+ if (buf[0] == 'E' && buf[1] == 'N' && -+ buf[2] == 'V' && buf[3] == '0') -+ printf("0x%08x\n", *((u_int32_t *) &buf[4])); -+ else -+ printf("No dynamic environment marker in OOB block 0\n"); -+ -+ } else if (!strcmp(cmd, "set")) { -+ unsigned long addr; -+ if (argc < 3) -+ goto usage; -+ -+ buf[0] = 'E'; -+ buf[1] = 'N'; -+ buf[2] = 'V'; -+ buf[3] = '0'; -+ addr = simple_strtoul(argv[2], NULL, 16); -+ memcpy(buf+4, &addr, 4); -+ -+ printf("%02x %02x %02x %02x - %02x %02x %02x %02x\n", -+ buf[0], buf[1], buf[2], buf[3], -+ buf[4], buf[5], buf[6], buf[7]); -+ -+ ret = mtd->write_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); -+ } else -+ goto usage; -+ -+ free(buf); -+ return ret; -+ -+usage: -+ free(buf); -+ printf("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+} -+ -+U_BOOT_CMD(dynenv, 3, 1, do_dynenv, -+ "dynenv - dynamically placed (NAND) environment\n", -+ "dynenv set off - set enviromnent offset\n" -+ "dynenv get - get environment offset\n"); -+ -+#endif /* CFG_ENV_OFFSET_OOB */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch b/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch deleted file mode 100644 index ff8e9cd6fc..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch +++ /dev/null @@ -1,17 +0,0 @@ -This patch adds the hex-printing of the file size read by 'ext2load' - -Signed-off-by: Harald Welte - -Index: u-boot.git/common/cmd_ext2.c -=================================================================== ---- u-boot.git.orig/common/cmd_ext2.c 2007-01-02 18:26:17.000000000 +0100 -+++ u-boot.git/common/cmd_ext2.c 2007-01-02 18:26:27.000000000 +0100 -@@ -279,7 +279,7 @@ - /* Loading ok, update default load address */ - load_addr = addr; - -- printf ("\n%ld bytes read\n", filelen); -+ printf ("\n%ld (0x%lx) bytes read\n", filelen, filelen); - sprintf(buf, "%lX", filelen); - setenv("filesize", buf); - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch b/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch deleted file mode 100644 index 715c46ed81..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch +++ /dev/null @@ -1,229 +0,0 @@ -board/neo1973/lowlevel_foo.S: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.S -board/neo1973/lowlevel_foo.lds: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.lds -board/neo1973/Makefile: added building of lowlevel_foo.bin (based on - http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.build.sh) - -Index: u-boot/board/neo1973/common/lowlevel_foo.S -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/lowlevel_foo.S -@@ -0,0 +1,82 @@ -+ -+_start: -+ b reset -+undefvec: -+ b undefvec -+swivec: -+ b swivec -+pabtvec: -+ b pabtvec -+dabtvec: -+ b dabtvec -+rsvdvec: -+ b rsvdvec -+irqvec: -+ b irqvec -+fiqvec: -+ b fiqvec -+ -+reset: -+ /* -+ * set the cpu to SVC32 mode -+ */ -+ mrs r0,cpsr -+ bic r0,r0,#0x1f -+ orr r0,r0,#0xd3 -+ msr cpsr,r0 -+ -+/* turn off the watchdog */ -+#define pWTCON 0x53000000 -+#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ -+#define INTSUBMSK 0x4A00001C -+#define CLKDIVN 0x4C000014 /* clock divisor register */ -+ -+ ldr r0, =pWTCON -+ mov r1, #0x0 -+ str r1, [r0] -+ -+ mov r1, #0xffffffff -+ ldr r0, =INTMSK -+ str r1, [r0] -+ ldr r1, =0x3ff -+ ldr r0, =INTSUBMSK -+ str r1, [r0] -+ -+ /* FCLK:HCLK:PCLK = 1:2:4 */ -+ /* default FCLK is 120 MHz ! */ -+ ldr r0, =CLKDIVN -+ mov r1, #3 -+ str r1, [r0] -+ -+ bl cpu_init_crit -+ ldr r0,=TEXT_BASE -+ mov pc, r0 -+ -+cpu_init_crit: -+ /* -+ * flush v4 I/D caches -+ */ -+ mov r0, #0 -+ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ -+ -+ /* -+ * disable MMU stuff and caches -+ */ -+ mrc p15, 0, r0, c1, c0, 0 -+ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) -+ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) -+ orr r0, r0, #0x00000002 @ set bit 2 (A) Align -+ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache -+ mcr p15, 0, r0, c1, c0, 0 -+ -+ /* -+ * before relocating, we have to setup RAM timing -+ * because memory timing is board-dependend, you will -+ * find a lowlevel_init.S in your board directory. -+ */ -+ mov ip, lr -+ bl lowlevel_init -+ mov lr, ip -+ mov pc, lr -+ -Index: u-boot/board/neo1973/common/lowlevel_foo.lds -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/lowlevel_foo.lds -@@ -0,0 +1,56 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ lowlevel_foo.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/board/neo1973/gta01/Makefile -=================================================================== ---- u-boot.orig/board/neo1973/gta01/Makefile -+++ u-boot/board/neo1973/gta01/Makefile -@@ -28,14 +28,31 @@ - OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o - SOBJS := ../common/lowlevel_init.o - -+.PHONY: all -+ -+all: $(LIB) lowevel_foo.bin -+ - $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) - -+lowlevel_foo.o: ../common/lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o ../common/lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o ../common/lowlevel_init.o ../common/lowlevel_foo.lds -+ $(LD) -T ../common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ ../common/lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ -+ - clean: -- rm -f $(SOBJS) $(OBJS) -+ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o - - distclean: clean -- rm -f $(LIB) core *.bak .depend -+ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin - - ######################################################################### - -Index: u-boot/board/qt2410/Makefile -=================================================================== ---- u-boot.orig/board/qt2410/Makefile -+++ u-boot/board/qt2410/Makefile -@@ -28,14 +28,31 @@ - OBJS := qt2410.o flash.o - SOBJS := lowlevel_init.o - -+.PHONY: all -+ -+all: $(LIB) lowevel_foo.bin -+ - $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) - -+lowlevel_foo.o: ../neo1973/common/lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o ../neo1973/common/lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o lowlevel_init.o \ -+ ../neo1973/common/lowlevel_foo.lds -+ $(LD) -T ../neo1973/common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ - clean: -- rm -f $(SOBJS) $(OBJS) -+ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o - - distclean: clean -- rm -f $(LIB) core *.bak .depend -+ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin - - ######################################################################### - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch b/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch deleted file mode 100644 index fcf54b9fd1..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch +++ /dev/null @@ -1,73 +0,0 @@ -board/neo1973/neo1973.c (board_late_init): moved MMC power-up to separate - function -cpu/arm920t/s3c24x0/mmc.c (mmc_init): call mmc_power_up and return -ENODEV - immediately if there is no card - -- Werner Almesberger - -Index: u-boot/board/neo1973/neo1973.c -=================================================================== ---- u-boot.orig/board/neo1973/neo1973.c -+++ u-boot/board/neo1973/neo1973.c -@@ -223,6 +223,19 @@ int board_init (void) - return 0; - } - -+int mmc_power_up(void) -+{ -+#if defined(CONFIG_ARCH_GTA01B_v4) -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* check if sd card is inserted, and power-up if it is */ -+ if (gpio->GPFDAT & (1 << 5)) -+ return 0; -+ gpio->GPBDAT &= ~(1 << 2); -+#endif /* !CONFIG_ARCH_GTA01B_v4 */ -+ return 1; -+} -+ - int board_late_init(void) - { - unsigned char tmp; -@@ -289,14 +302,8 @@ continue_boot: - /* switch on the backlight */ - neo1973_backlight(1); - --#if defined(CONFIG_ARCH_GTA01B_v4) -- { -- /* check if sd card is inserted, and power-up if it is */ -- S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -- if (!(gpio->GPFDAT & (1 << 5))) -- gpio->GPBDAT &= ~(1 << 2); -- } --#endif -+ /* check if sd card is inserted, and power-up if it is */ -+ mmc_power_up(); - - return 0; - } -Index: u-boot/cpu/arm920t/s3c24x0/mmc.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c -+++ u-boot/cpu/arm920t/s3c24x0/mmc.c -@@ -381,6 +381,11 @@ static void print_sd_cid(const struct sd - cid->crc >> 1, cid->crc & 1); - } - -+int __attribute__((weak)) mmc_power_up(void) -+{ -+ return 1; -+} -+ - int mmc_init(int verbose) - { - int retries, rc = -ENODEV; -@@ -393,6 +398,8 @@ int mmc_init(int verbose) - debug("mmc_init(PCLK=%u)\n", get_PCLK()); - - clk_power->CLKCON |= (1 << 9); -+ if (!mmc_power_up()) -+ return -ENODEV; - - /* S3C2410 has some bug that prevents reliable operation at higher speed */ - //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch deleted file mode 100644 index a5800e2499..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch +++ /dev/null @@ -1,30 +0,0 @@ -This patch makes nand_block_checkbad check both the BBT and the actual -OOB data. This avoids accidently passing blocks as good when BBT and -OOB markers are not synchronized, e.g., before "nand createbbt". - -Experimental. - -- Werner Almesberger - -Index: u-boot/drivers/nand/nand_base.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_base.c -+++ u-boot/drivers/nand/nand_base.c -@@ -517,11 +517,14 @@ static int nand_block_checkbad (struct m - { - struct nand_chip *this = mtd->priv; - -- if (!this->bbt) -- return this->block_bad(mtd, ofs, getchip); -+ if (this->block_bad(mtd, ofs, getchip)) -+ return 1; - - /* Return info from the table */ -- return nand_isbad_bbt (mtd, ofs, allowbbt); -+ if (this->bbt && nand_isbad_bbt (mtd, ofs, allowbbt)) -+ return 1; -+ -+ return 0; - } - - /** diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch deleted file mode 100644 index 74b79da0a9..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch +++ /dev/null @@ -1,126 +0,0 @@ -This patch adds user-requested BBT creation. It includes the following changes: - -- common/cmd_nand.c: move yes/no decision to separate function -- do_nand: ask for confirmation for "nand erase" -- do_nand: add command "nand createbbt" to erase NAND and create a new BBT - -Experimental. - -- Werner Almesberger - - -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c 2007-02-16 23:53:28.000000000 +0100 -+++ u-boot/common/cmd_nand.c 2007-02-16 23:53:57.000000000 +0100 -@@ -163,6 +163,17 @@ - return 0; - } - -+static int yes(void) -+{ -+ char c; -+ -+ c = getc(); -+ if (c != 'y' && c != 'Y') -+ return 0; -+ c = getc(); -+ return c == '\r' || c == '\n'; -+} -+ - int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) - { - int i, dev, ret; -@@ -228,7 +239,8 @@ - strncmp(cmd, "read", 4) != 0 && strncmp(cmd, "write", 5) != 0 && - strcmp(cmd, "scrub") != 0 && strcmp(cmd, "markbad") != 0 && - strcmp(cmd, "biterr") != 0 && -- strcmp(cmd, "lock") != 0 && strcmp(cmd, "unlock") != 0 ) -+ strcmp(cmd, "lock") != 0 && strcmp(cmd, "unlock") != 0 && -+ strcmp(cmd, "createbbt") != 0 ) - goto usage; - - /* the following commands operate on the current device */ -@@ -283,13 +295,23 @@ - "are sure of what you are doing!\n" - "\nReally scrub this NAND flash? \n"); - -- if (getc() == 'y' && getc() == '\r') { -+ if (yes()) { - opts.scrub = 1; - } else { - puts("scrub aborted\n"); - return -1; - } - } -+ else { -+ if (opts.length == nand->size) { -+ puts("Really erase everything ? \n"); -+ if (!yes()) { -+ puts("erase aborted\n"); -+ return -1; -+ } -+ } -+ } -+ - ret = nand_erase_opts(nand, &opts); - printf("%s\n", ret ? "ERROR" : "OK"); - -@@ -458,6 +480,33 @@ - return 0; - } - -+ if (strcmp(cmd, "createbbt") == 0) { -+ struct nand_chip *nand_chip = nand->priv; -+ nand_erase_options_t opts; -+ -+ puts("Create BBT and erase everything ? \n"); -+ if (!yes()) { -+ puts("createbbt aborted\n"); -+ return -1; -+ } -+ memset(&opts, 0, sizeof(opts)); -+ opts.length = nand->size; -+ if (nand_erase_opts(nand, &opts)) { -+ puts("Erase failed\n"); -+ return 1; -+ } -+ nand_chip->options &= ~NAND_DONT_CREATE_BBT; -+ puts("Creating BBT. Please wait ..."); -+ if (nand_default_bbt(nand)) { -+ puts("\nFailed\n"); -+ return 1; -+ } -+ else { -+ puts("\n"); -+ return 0; -+ } -+ } -+ - usage: - printf("Usage:\n%s\n", cmdtp->usage); - return 1; -@@ -478,7 +527,8 @@ - "nand markbad off - mark bad block at offset (UNSAFE)\n" - "nand biterr off - make a bit error at offset (UNSAFE)\n" - "nand lock [tight] [status] - bring nand to lock state or display locked pages\n" -- "nand unlock [offset] [size] - unlock section\n"); -+ "nand unlock [offset] [size] - unlock section\n" -+ "nand createbbt - create bad block table\n"); - - static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, - ulong offset, ulong addr, char *cmd) -Index: u-boot/drivers/nand/nand_bbt.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 -+++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:57.000000000 +0100 -@@ -795,7 +795,8 @@ - - len = mtd->size >> (this->bbt_erase_shift + 2); - /* Allocate memory (2bit per block) */ -- this->bbt = kmalloc (len, GFP_KERNEL); -+ if (!this->bbt) -+ this->bbt = kmalloc (len, GFP_KERNEL); - if (!this->bbt) { - printk (KERN_ERR "nand_scan_bbt: Out of memory\n"); - return -ENOMEM; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch deleted file mode 100644 index ecce004ca6..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch +++ /dev/null @@ -1,354 +0,0 @@ -This patch adds support for 'dynamic partitions'. This basically -works as follows: -* The nand code generates a bad-block-table at the first scan of the chip -* The dynamic partition code calculates the raw partition sizes based on - the bad block table. E.g. if you have a partition of size 0x30000, and there are - two bad blocks (0x4000 each) in it, the raw size will increase to 0x38000, and the - following partitions get shifted towards the end of flash. - -Please note that currently the desired partition sizes are stored at compile-time -in an array in drivers/nand/nand_bbt.c, so this definitely needs to change before -submitting/merging upstream. - -In order to calculate the partiton map (and set mtdparts accordingly), you can use -the 'dynpart' command at the prompt. Use 'saveenv' to make the setting permanent. - -Signed-off-by: Harald Welte - -Index: u-boot/drivers/nand/nand_bbt.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_bbt.c -+++ u-boot/drivers/nand/nand_bbt.c -@@ -1044,9 +1044,86 @@ - switch ((int)res) { - case 0x00: return 0; - case 0x01: return 1; -+ case 0x03: return 1; - case 0x02: return allowbbt ? 0 : 1; - } - return 1; - } - -+#if defined(CONFIG_NAND_DYNPART) -+ -+extern unsigned int dynpart_size[]; -+extern char *dynpart_names[]; -+ -+#define MTDPARTS_MAX_SIZE 512 -+ -+ -+static int skip_offs(const struct nand_chip *this, unsigned int offs) -+{ -+ int block = (int) (offs >> (this->bbt_erase_shift - 1)); -+ u_int8_t bbt = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; -+ -+ return bbt == 3; -+} -+ -+int nand_create_mtd_dynpart(struct mtd_info *mtd) -+{ -+ struct nand_chip *this = mtd->priv; -+ int part; -+ char *mtdparts; -+ unsigned int cur_offs = 0; -+ -+ mtdparts = malloc(MTDPARTS_MAX_SIZE); /* FIXME: bounds checking */ -+ if (!mtdparts) -+ return -ENOMEM; -+ -+ sprintf(mtdparts, "mtdparts=" CFG_NAND_DYNPART_MTD_KERNEL_NAME ":"); -+ -+ for (part = 0; dynpart_size[part] != 0; part++) { -+ unsigned int bb_delta = 0; -+ unsigned int offs = 0; -+ char mtdpart[32]; -+ -+ for (offs = cur_offs; -+ offs < cur_offs + dynpart_size[part] + bb_delta; -+ offs += mtd->erasesize) { -+ if (skip_offs(this, offs)) -+ bb_delta += mtd->erasesize; -+ } -+ -+ /* -+ * Absorb bad blocks immediately following this partition also -+ * into the partition, in order to make next partition start -+ * with a good block. This simplifies handling of the -+ * environment partition. -+ */ -+ while (offs < this->chipsize && skip_offs(this, offs)) { -+ bb_delta += mtd->erasesize; -+ offs += mtd->erasesize; -+ } -+ -+ if (cur_offs + dynpart_size[part] + bb_delta > this->chipsize) -+ dynpart_size[part] = this->chipsize - cur_offs - bb_delta; -+#if 0 -+ printf("partition %u: start = 0x%08x, end=%08x size=%08x, size_inc_bb=%08x\n", -+ part, cur_offs, cur_offs + dynpart_size[part] + bb_delta, -+ dynpart_size[part], dynpart_size[part] + bb_delta); -+#endif -+ cur_offs += dynpart_size[part] + bb_delta; -+ sprintf(mtdpart, "0x%.8x(%.16s),", dynpart_size[part] + bb_delta, -+ dynpart_names[part]); -+ mtdpart[sizeof(mtdpart)-1] = '\0'; -+ strncat(mtdparts, mtdpart, -+ MTDPARTS_MAX_SIZE-strlen(mtdparts)-1); -+ } -+ -+ mtdparts[strlen(mtdparts)-1] = '\0'; -+ printf("mtdparts %s\n", mtdparts); -+ setenv("mtdparts", mtdparts); -+ -+ free(mtdparts); -+ return 0; -+} -+#endif /* CONFIG_NAND_DYNPART */ -+ - #endif -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -99,7 +99,7 @@ - CFG_CMD_ELF | \ - CFG_CMD_MISC | \ - /* CFG_CMD_USB | */ \ -- /* CFG_CMD_JFFS2 | */ \ -+ CFG_CMD_JFFS2 | \ - CFG_CMD_DIAG | \ - /* CFG_CMD_HWFLOW | */ \ - CFG_CMD_SAVES | \ -@@ -212,13 +212,13 @@ - #define CONFIG_FAT 1 - #define CONFIG_SUPPORT_VFAT - --#if 0 -+#if 1 - /* JFFS2 driver */ - #define CONFIG_JFFS2_CMDLINE 1 - #define CONFIG_JFFS2_NAND 1 - #define CONFIG_JFFS2_NAND_DEV 0 --#define CONFIG_JFFS2_NAND_OFF 0x634000 --#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 - #endif - - /* ATAG configuration */ -@@ -257,4 +257,9 @@ - - #define CONFIG_DRIVER_PCF50606 1 - -+#define MTDIDS_DEFAULT "nand0=neo1973-nand" -+#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),16k(u-boot_env),2M(kernel),640k(splash),-(jffs2)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand" -+#define CONFIG_NAND_DYNPART -+ - #endif /* __CONFIG_H */ -Index: u-boot/common/cmd_jffs2.c -=================================================================== ---- u-boot.orig/common/cmd_jffs2.c -+++ u-boot/common/cmd_jffs2.c -@@ -1841,6 +1841,29 @@ - return NULL; - } - -+/* Return the 'net size' of the partition (i.e. excluding any bad blocks) */ -+unsigned int nand_net_part_size(struct part_info *part) -+{ -+ struct mtd_info *mtd; -+ unsigned int offs; -+ unsigned int bb_delta = 0; -+ -+ if (!part || !part->dev || !part->dev->id || -+ part->dev->id->num >= CFG_MAX_NAND_DEVICE) -+ return 0; -+ -+ mtd = &nand_info[part->dev->id->num]; -+ -+ for (offs = part->offset; offs < part->offset + part->size; -+ offs += mtd->erasesize) { -+ if (nand_isbad_bbt(mtd, offs, 0)) -+ bb_delta += mtd->erasesize; -+ } -+ -+ return part->size - bb_delta; -+} -+ -+ - /***************************************************/ - /* U-boot commands */ - /***************************************************/ -@@ -2132,6 +2155,24 @@ - printf ("Usage:\n%s\n", cmdtp->usage); - return 1; - } -+ -+#if defined(CONFIG_NAND_DYNPART) -+extern int nand_create_mtd_dynpart(struct mtd_info *mtd); -+ -+int do_dynpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+#if 0 -+ int i = simple_strtoul(argv[1], NULL, 0); -+ if (i >= CFG_MAX_NAND_DEVICE) -+ return -EINVAL; -+#endif -+ nand_create_mtd_dynpart(&nand_info[0]); -+ -+ return 0; -+} -+#endif /* CONFIG_NAND_DYNPART */ -+ -+ - #endif /* #ifdef CONFIG_JFFS2_CMDLINE */ - - /***************************************************/ -@@ -2197,6 +2238,15 @@ - " := '(' NAME ')'\n" - " := when set to 'ro' makes partition read-only (not used, passed to kernel)\n" - ); -+ -+#if defined(CONFIG_NAND_DYNPART) -+U_BOOT_CMD( -+ dynpart, 1, 1, do_dynpart, -+ "dynpart\t- dynamically calculate partition table based on BBT\n", -+ "\n" -+ " - sets 'mtdparts' according to BBT\n"); -+#endif /* CONFIG_NAND_DYNPART */ -+ - #endif /* #ifdef CONFIG_JFFS2_CMDLINE */ - - /***************************************************/ -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c -+++ u-boot/common/cmd_nand.c -@@ -101,7 +101,7 @@ - } - - int --arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size) -+arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size, int net) - { - int idx = nand_curr_device; - #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE) -@@ -122,10 +122,17 @@ - printf("'%s' is not a number\n", argv[1]); - return -1; - } -- if (*size > part->size) -- *size = part->size; -+ if (*size > part->size) { -+ if (net) -+ *size = nand_net_part_size(part); -+ else -+ *size = part->size; -+ } - } else { -- *size = part->size; -+ if (net) -+ *size = nand_net_part_size(part); -+ else -+ *size = part->size; - } - idx = dev->id->num; - *nand = nand_info[idx]; -@@ -261,7 +268,7 @@ - - printf("\nNAND %s: ", scrub ? "scrub" : "erase"); - /* skip first two or three arguments, look for offset and size */ -- if (arg_off_size(argc - o, argv + o, nand, &off, &size) != 0) -+ if (arg_off_size(argc - o, argv + o, nand, &off, &size, 0) != 0) - return 1; - - memset(&opts, 0, sizeof(opts)); -@@ -323,7 +330,7 @@ - - read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */ - printf("\nNAND %s: ", read ? "read" : "write"); -- if (arg_off_size(argc - 3, argv + 3, nand, &off, &size) != 0) -+ if (arg_off_size(argc - 3, argv + 3, nand, &off, &size, 1) != 0) - return 1; - - s = strchr(cmd, '.'); -@@ -445,7 +452,7 @@ - } - - if (strcmp(cmd, "unlock") == 0) { -- if (arg_off_size(argc - 2, argv + 2, nand, &off, &size) < 0) -+ if (arg_off_size(argc - 2, argv + 2, nand, &off, &size, 0) < 0) - return 1; - - if (!nand_unlock(nand, off, size)) { -Index: u-boot/common/cmd_dynenv.c -=================================================================== ---- u-boot.orig/common/cmd_dynenv.c -+++ u-boot/common/cmd_dynenv.c -@@ -60,7 +60,7 @@ - buf[2] = 'V'; - buf[3] = '0'; - -- if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy) < 0) { -+ if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy, 1) < 0) { - printf("Offset or partition name expected\n"); - goto fail; - } -Index: u-boot/include/util.h -=================================================================== ---- u-boot.orig/include/util.h -+++ u-boot/include/util.h -@@ -28,6 +28,6 @@ - - /* common/cmd_nand.c */ - int arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, -- ulong *size); -+ ulong *size, int net); - - #endif /* UTIL_H */ -Index: u-boot/board/qt2410/qt2410.c -=================================================================== ---- u-boot.orig/board/qt2410/qt2410.c -+++ u-boot/board/qt2410/qt2410.c -@@ -126,3 +126,9 @@ - - return 0; - } -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, 0x4000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -Index: u-boot/board/neo1973/gta01/gta01.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/gta01.c -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -429,3 +434,14 @@ - return 0; - } - -+ -+/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. -+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 -+ images: 640*480*2*2 = 1228800 < 1245184. */ -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, 0x4000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -+ -Index: u-boot/include/configs/qt2410.h -=================================================================== ---- u-boot.orig/include/configs/qt2410.h -+++ u-boot/include/configs/qt2410.h -@@ -283,5 +283,7 @@ - - #define MTDIDS_DEFAULT "nand0=qt2410-nand" - #define MTPARTS_DEFAULT "qt2410-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "qt2410-nand" -+#define CONFIG_NAND_DYNPART - - #endif /* __CONFIG_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch deleted file mode 100644 index b0e9bf4c4b..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch +++ /dev/null @@ -1,302 +0,0 @@ -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c -+++ u-boot/common/cmd_nand.c -@@ -392,6 +392,14 @@ - else - ret = nand->write_oob(nand, off, size, &size, - (u_char *) addr); -+ } else if (s != NULL && !strcmp(s, ".otp")) { -+ /* read out-of-band data */ -+ if (read) -+ ret = nand->read_otp(nand, off, size, &size, -+ (u_char *) addr); -+ else -+ ret = nand->write_otp(nand, off, size, &size, -+ (u_char *) addr); - } else { - if (read) - ret = nand_read(nand, off, &size, (u_char *)addr); -@@ -527,8 +535,9 @@ - "nand - NAND sub-system\n", - "info - show available NAND devices\n" - "nand device [dev] - show or set current device\n" -- "nand read[.jffs2] - addr off|partition size\n" -- "nand write[.jffs2] - addr off|partiton size - read/write `size' bytes starting\n" -+ "nand read[.jffs2, .oob, .otp] addr off|partition size\n" -+ "nand write[.jffs2, .oob, .otp] addr off|partiton size\n" -+ " - read/write `size' bytes starting\n" - " at offset `off' to/from memory address `addr'\n" - "nand erase [clean] [off size] - erase `size' bytes from\n" - " offset `off' (entire device if not specified)\n" -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand.c -+++ u-boot/cpu/arm920t/s3c24x0/nand.c -@@ -205,7 +205,7 @@ - } - #endif - --int board_nand_init(struct nand_chip *nand) -+int s3c24x0_nand_init(struct nand_chip *nand) - { - u_int32_t cfg; - u_int8_t tacls, twrph0, twrph1; -Index: u-boot/drivers/nand/nand_base.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_base.c -+++ u-boot/drivers/nand/nand_base.c -@@ -2042,6 +2042,32 @@ - } - #endif - -+/* -+ * See nand_read_oob and nand_write_oob -+ */ -+ -+static int nand_read_otp(struct mtd_info *mtd, loff_t from, size_t len, -+ size_t *retlen, u_char *buf) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ if (!this->read_otp) -+ return -ENOSYS; -+ return this->read_otp(mtd, from, len, retlen, buf); -+ -+} -+ -+static int nand_write_otp(struct mtd_info *mtd, loff_t to, size_t len, -+ size_t *retlen, const u_char *buf) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ if (!this->write_otp) -+ return -ENOSYS; -+ return this->write_otp(mtd, to, len, retlen, buf); -+} -+ -+ - /** - * single_erease_cmd - [GENERIC] NAND standard block erase command function - * @mtd: MTD device structure -@@ -2613,6 +2639,8 @@ - mtd->write_ecc = nand_write_ecc; - mtd->read_oob = nand_read_oob; - mtd->write_oob = nand_write_oob; -+ mtd->read_otp = nand_read_otp; -+ mtd->write_otp = nand_write_otp; - /* XXX U-BOOT XXX */ - #if 0 - mtd->readv = NULL; -Index: u-boot/include/linux/mtd/mtd.h -=================================================================== ---- u-boot.orig/include/linux/mtd/mtd.h -+++ u-boot/include/linux/mtd/mtd.h -@@ -95,6 +95,9 @@ - int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); - int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); - -+ int (*read_otp) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); -+ int (*write_otp) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); -+ - /* - * Methods to access the protection register area, present in some - * flash devices. The user data is one time programmable but the -Index: u-boot/include/linux/mtd/nand.h -=================================================================== ---- u-boot.orig/include/linux/mtd/nand.h -+++ u-boot/include/linux/mtd/nand.h -@@ -307,6 +307,10 @@ - void (*enable_hwecc)(struct mtd_info *mtd, int mode); - void (*erase_cmd)(struct mtd_info *mtd, int page); - int (*scan_bbt)(struct mtd_info *mtd); -+ int (*read_otp)(struct mtd_info *mtd, loff_t from, -+ size_t len, size_t *retlen, u_char *buf); -+ int (*write_otp) (struct mtd_info *mtd, loff_t to, -+ size_t len, size_t *retlen, const u_char *buf); - int eccmode; - int eccsize; - int eccbytes; -Index: u-boot/board/neo1973/gta01/Makefile -=================================================================== ---- u-boot.orig/board/neo1973/gta01/Makefile -+++ u-boot/board/neo1973/gta01/Makefile -@@ -25,7 +25,7 @@ - - LIB = lib$(BOARD).a - --OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o -+OBJS := gta01.o pcf50606.o nand.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o - SOBJS := ../common/lowlevel_init.o - - .PHONY: all -Index: u-boot/board/neo1973/gta01/nand.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/nand.c -@@ -0,0 +1,121 @@ -+/* -+ * nand.c - Board-specific NAND setup -+ * -+ * Copyright (C) 2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+ -+#include "config.h" /* nand.h needs NAND_MAX_CHIPS */ -+#include "linux/mtd/mtd.h" -+#include "linux/mtd/nand.h" -+#include "asm/errno.h" -+ -+ -+int s3c24x0_nand_init(struct nand_chip *nand); -+ -+ -+static void samsung_nand_begin_otp(struct mtd_info *mtd) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ /* @@@FIXME: this is ugly - we select the NAND chip to send the -+ mode switch commands, knowing that it will be switched off later */ -+ this->select_chip(mtd, 0); -+ /* "magic" mode change */ -+ this->cmdfunc(mtd, 0x30, -1, -1); -+ this->cmdfunc(mtd, 0x65, -1, -1); -+} -+ -+ -+static void samsung_nand_end_otp(struct mtd_info *mtd) -+{ -+ struct nand_chip *this = mtd->priv; -+ -+ /* read/write deselected the chip so now we need to select again */ -+ this->select_chip(mtd, 0); -+ this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); -+ this->select_chip(mtd, -1); -+} -+ -+ -+static loff_t otp_page[] = { -+ 0x15, /* 00-XX-00-00, with XX = 15h-19h */ -+ 0x16, -+ 0x17, -+ 0x18, -+ 0x19, -+ 0x1b, /* 00-1B-00-00 */ -+}; -+ -+#define OTP_PAGES (sizeof(otp_page)/sizeof(*otp_page)) -+ -+ -+static int convert_otp_address(loff_t *addr, size_t *len) -+{ -+ int page; -+ -+ if (*len && *addr >> 9 != (*addr+*len-1) >> 9) -+ return -EINVAL; -+ if (*len > 512) -+ return -EINVAL; -+ page = *addr >> 9; -+ if (page >= OTP_PAGES) -+ return -EINVAL; -+ *addr = otp_page[page] << 9; -+ return 0; -+} -+ -+ -+static int samsung_nand_read_otp(struct mtd_info *mtd, loff_t from, -+ size_t len, size_t *retlen, u_char *buf) -+{ -+ int ret; -+ -+ ret = convert_otp_address(&from, &len); -+ if (ret) -+ return ret; -+ samsung_nand_begin_otp(mtd); -+ ret = mtd->read(mtd, from, len, retlen, buf); -+ samsung_nand_end_otp(mtd); -+ return ret; -+} -+ -+ -+static int samsung_nand_write_otp(struct mtd_info *mtd, loff_t to, -+ size_t len, size_t *retlen, const u_char *buf) -+{ -+ int ret; -+ -+ ret = convert_otp_address(&to, &len); -+ if (ret) -+ return ret; -+ samsung_nand_begin_otp(mtd); -+ ret = mtd->write(mtd, to, len, retlen, buf); -+ samsung_nand_end_otp(mtd); -+ return ret; -+} -+ -+ -+int board_nand_init(struct nand_chip *nand) -+{ -+ nand->read_otp = samsung_nand_read_otp; -+ nand->write_otp = samsung_nand_write_otp; -+ return s3c24x0_nand_init(nand); -+} -Index: u-boot/board/neo1973/gta02/nand.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/nand.c -@@ -0,0 +1,39 @@ -+/* -+ * nand.c - Board-specific NAND setup -+ * -+ * Copyright (C) 2007 by OpenMoko, Inc. -+ * Written by Werner Almesberger -+ * All Rights Reserved -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+ -+#include "config.h" /* nand.h needs NAND_MAX_CHIPS */ -+#include "linux/mtd/mtd.h" -+#include "linux/mtd/nand.h" -+ -+ -+int s3c24x0_nand_init(struct nand_chip *nand); -+ -+ -+/* Add OTP et al later */ -+ -+ -+int board_nand_init(struct nand_chip *nand) -+{ -+ return s3c24x0_nand_init(nand); -+} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch deleted file mode 100644 index 8360409e46..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch +++ /dev/null @@ -1,23 +0,0 @@ -Re-introduce the 'nand read.oob' and 'nand write.oob' commands -that used to exist with the legacy NAND code - -Signed-off-by: Harald Welte -Index: u-boot.git/common/cmd_nand.c -=================================================================== ---- u-boot.git.orig/common/cmd_nand.c 2007-01-26 15:41:13.000000000 +0100 -+++ u-boot.git/common/cmd_nand.c 2007-01-26 15:49:37.000000000 +0100 -@@ -351,6 +351,14 @@ - opts.quiet = quiet; - ret = nand_write_opts(nand, &opts); - } -+ } else if (s != NULL && !strcmp(s, ".oob")) { -+ /* read out-of-band data */ -+ if (read) -+ ret = nand->read_oob(nand, off, size, &size, -+ (u_char *) addr); -+ else -+ ret = nand->write_oob(nand, off, size, &size, -+ (u_char *) addr); - } else { - if (read) - ret = nand_read(nand, off, &size, (u_char *)addr); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch b/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch deleted file mode 100644 index 6f6af2c758..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch +++ /dev/null @@ -1,316 +0,0 @@ -Index: u-boot/drivers/usbtty.c -=================================================================== ---- u-boot.orig/drivers/usbtty.c -+++ u-boot/drivers/usbtty.c -@@ -66,7 +66,7 @@ - /* - * Defines - */ --#define NUM_CONFIGS 1 -+#define NUM_CONFIGS 2 - #define MAX_INTERFACES 2 - #define NUM_ENDPOINTS 3 - #define ACM_TX_ENDPOINT 3 -@@ -192,8 +192,7 @@ - #endif - .bConfigurationValue = 1, - .iConfiguration = STR_CONFIG, -- .bmAttributes = -- BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, -+ .bmAttributes = BMATTRIBUTE_RESERVED, - .bMaxPower = USBTTY_MAXPOWER - }, - /* Interface 1 */ -@@ -294,6 +293,120 @@ - .func_dfu = DFU_FUNC_DESC, - #endif - }, -+ { -+ .configuration_desc ={ -+ .bLength = -+ sizeof(struct usb_configuration_descriptor), -+ .bDescriptorType = USB_DT_CONFIG, -+ .wTotalLength = -+ cpu_to_le16(sizeof(struct acm_config_desc) -+#ifdef CONFIG_USBD_DFU -+ - sizeof(struct usb_interface_descriptor) -+ - sizeof(struct usb_dfu_func_descriptor) -+#endif -+ ), -+ .bNumInterfaces = NUM_ACM_INTERFACES, -+ .bConfigurationValue = 2, -+ .iConfiguration = STR_CONFIG, -+ .bmAttributes = BMATTRIBUTE_RESERVED, -+ .bMaxPower = 50, /* 100mA */ -+ }, -+ /* Interface 1 */ -+ .interface_desc = { -+ .bLength = sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0, -+ .bAlternateSetting = 0, -+ .bNumEndpoints = 0x01, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_CONTROL, -+ .bInterfaceSubClass = COMMUNICATIONS_ACM_SUBCLASS, -+ .bInterfaceProtocol = COMMUNICATIONS_V25TER_PROTOCOL, -+ .iInterface = STR_CTRL_INTERFACE, -+ }, -+ .usb_class_header = { -+ .bFunctionLength = -+ sizeof(struct usb_class_header_function_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_HEADER, -+ .bcdCDC = cpu_to_le16(110), -+ }, -+ .usb_class_call_mgt = { -+ .bFunctionLength = -+ sizeof(struct usb_class_call_management_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_CMF, -+ .bmCapabilities = 0x00, -+ .bDataInterface = 0x01, -+ }, -+ .usb_class_acm = { -+ .bFunctionLength = -+ sizeof(struct usb_class_abstract_control_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_ACMF, -+ .bmCapabilities = 0x00, -+ }, -+ .usb_class_union = { -+ .bFunctionLength = -+ sizeof(struct usb_class_union_function_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_UF, -+ .bMasterInterface = 0x00, -+ .bSlaveInterface0 = 0x01, -+ }, -+ .notification_endpoint = { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x01 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_INT, -+ .wMaxPacketSize -+ = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ -+ /* Interface 2 */ -+ .data_class_interface = { -+ .bLength = -+ sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x01, -+ .bAlternateSetting = 0x00, -+ .bNumEndpoints = 0x02, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_DATA, -+ .bInterfaceSubClass = DATA_INTERFACE_SUBCLASS_NONE, -+ .bInterfaceProtocol = DATA_INTERFACE_PROTOCOL_NONE, -+ .iInterface = STR_DATA_INTERFACE, -+ }, -+ .data_endpoints = { -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x02 | USB_DIR_OUT, -+ .bmAttributes = -+ USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x03 | USB_DIR_IN, -+ .bmAttributes = -+ USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ }, -+ /* We don't add the DFU functional descriptor here since we only -+ * want to do DFU in the high-current charging mode for safety reasons */ -+ }, -+ - }; - - static struct rs232_emu rs232_desc={ -@@ -330,8 +443,7 @@ - .bNumInterfaces = NUM_GSERIAL_INTERFACES, - .bConfigurationValue = 1, - .iConfiguration = STR_CONFIG, -- .bmAttributes = -- BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, -+ .bmAttributes = BMATTRIBUTE_RESERVED, - .bMaxPower = USBTTY_MAXPOWER - }, - .interface_desc = { -@@ -384,6 +496,68 @@ - }, - }, - }, -+ { -+ .configuration_desc ={ -+ .bLength = sizeof(struct usb_configuration_descriptor), -+ .bDescriptorType = USB_DT_CONFIG, -+ .wTotalLength = -+ cpu_to_le16(sizeof(struct gserial_config_desc)), -+ .bNumInterfaces = NUM_GSERIAL_INTERFACES, -+ .bConfigurationValue = 1, -+ .iConfiguration = STR_CONFIG, -+ .bmAttributes = BMATTRIBUTE_RESERVED, -+ .bMaxPower = 50 -+ }, -+ .interface_desc = { -+ { -+ .bLength = -+ sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0, -+ .bAlternateSetting = 0, -+ .bNumEndpoints = NUM_ENDPOINTS, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_VENDOR, -+ .bInterfaceSubClass = -+ COMMUNICATIONS_NO_SUBCLASS, -+ .bInterfaceProtocol = -+ COMMUNICATIONS_NO_PROTOCOL, -+ .iInterface = STR_DATA_INTERFACE -+ }, -+ }, -+ .data_endpoints = { -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x01 | USB_DIR_OUT, -+ .bmAttributes = USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE), -+ .bInterval= 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x02 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x03 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_INT, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ }, -+ }, - }; - - /* -@@ -679,12 +853,14 @@ - bus_instance->maxpacketsize = 64; - bus_instance->serial_number_str = serial_number; - -- /* configuration instance */ -- memset (config_instance, 0, -- sizeof (struct usb_configuration_instance)); -- config_instance->interfaces = interface_count; -- config_instance->configuration_descriptor = configuration_descriptor; -- config_instance->interface_instance_array = interface_instance; -+ /* configuration instances */ -+ for (i = 0; i < NUM_CONFIGS; i++) { -+ memset(&config_instance[i], 0, sizeof(config_instance)); -+ config_instance[i].interfaces = interface_count; -+ /* FIXME: this breaks for the non-ACM case */ -+ config_instance[i].configuration_descriptor = &acm_configuration_descriptors[i]; -+ config_instance[i].interface_instance_array = interface_instance; -+ } - - /* interface instance */ - memset (interface_instance, 0, -@@ -1043,9 +1219,17 @@ - usbtty_configured_flag = 0; - break; - case DEVICE_CONFIGURED: -+ printf("DEVICE_CONFIGURED: %u\n", device->configuration); -+ if (device->configuration == 1) -+ udc_ctrl(UDC_CTRL_500mA_ENABLE, 1); -+ else -+ udc_ctrl(UDC_CTRL_500mA_ENABLE, 0); - usbtty_configured_flag = 1; - break; -- -+ case DEVICE_DE_CONFIGURED: -+ printf("DEVICE_DE_CONFIGURED\n"); -+ udc_ctrl(UDC_CTRL_500mA_ENABLE, 0); -+ break; - case DEVICE_ADDRESS_ASSIGNED: - usbtty_init_endpoints (); - -Index: u-boot/drivers/usbtty.h -=================================================================== ---- u-boot.orig/drivers/usbtty.h -+++ u-boot/drivers/usbtty.h -@@ -60,7 +60,7 @@ - #define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS - - #define USBTTY_BCD_DEVICE 0x00 --#define USBTTY_MAXPOWER 0x00 -+#define USBTTY_MAXPOWER 250 /* 500mA */ - - #define STR_LANG 0x00 - #define STR_MANUFACTURER 0x01 -Index: u-boot/board/neo1973/common/udc.c -=================================================================== ---- u-boot.orig/board/neo1973/common/udc.c -+++ u-boot/board/neo1973/common/udc.c -@@ -2,6 +2,7 @@ - #include - #include - #include -+#include - - void udc_ctrl(enum usbd_event event, int param) - { -@@ -17,6 +18,13 @@ - gpio->GPBDAT &= ~(1 << 9); - #endif - break; -+ case UDC_CTRL_500mA_ENABLE: -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \ -+ defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ -+ defined(CONFIG_ARCH_GTA01B_v4) -+ pcf50606_charge_autofast(param); -+#endif -+ break; - default: - break; - } -Index: u-boot/include/usbdcore.h -=================================================================== ---- u-boot.orig/include/usbdcore.h -+++ u-boot/include/usbdcore.h -@@ -686,8 +686,8 @@ - - enum usbd_event { - UDC_CTRL_PULLUP_ENABLE, -+ UDC_CTRL_500mA_ENABLE, - }; - - void udc_ctrl(enum usbd_event event, int param); - #endif --#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch b/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch deleted file mode 100644 index f32cbde27b..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch +++ /dev/null @@ -1,137 +0,0 @@ -Provide a place where the loader can patch the binary, such that it executes a -command string from RAM. We use this for automated installs, where we can thus -use the same u-boot binary for all stages. - -include/configs/neo1973.h: new option CFG_PREBOOT_OVERRIDE to allow setting of - the preboot command in memory -cpu/arm920t/start.S: added variable "preboot_override" at known location - (_start+0x40) -common/main.c (main_loop): if preboot_override is set, execute the command - string found there -common/env_common.c (env_relocate): if preboot_override is set, always use the - default environment - -- Werner Almesberger - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -77,6 +77,14 @@ _fiq: .word fiq - ************************************************************************* - */ - -+ -+/* Must follow the .balign above, so we get a well-known address ! */ -+#ifdef CFG_PREBOOT_OVERRIDE -+.globl preboot_override -+preboot_override: -+ .word 0 -+#endif -+ - #ifdef CONFIG_S3C2410_NAND_BOOT - .globl booted_from_nand - booted_from_nand: -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -207,6 +207,7 @@ - #define CFG_ENV_IS_IN_NAND 1 - #define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ - #define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ -+#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ - - #define NAND_MAX_CHIPS 1 - #define CFG_NAND_BASE 0x4e000000 -Index: u-boot/common/main.c -=================================================================== ---- u-boot.orig/common/main.c -+++ u-boot/common/main.c -@@ -85,6 +85,11 @@ int do_mdm_init = 0; - extern void mdm_init(void); /* defined in board.c */ - #endif - -+#ifdef CFG_PREBOOT_OVERRIDE -+extern char *preboot_override; -+#endif -+ -+ - /*************************************************************************** - * Watch for 'delay' seconds for autoboot stop or autoboot delay string. - * returns: 0 - no key string, allow autoboot -@@ -306,8 +311,8 @@ void main_loop (void) - char *s; - int bootdelay; - #endif --#ifdef CONFIG_PREBOOT -- char *p; -+#if defined(CONFIG_PREBOOT) || defined(CFG_PREBOOT_OVERRIDE) -+ char *p = NULL; - #endif - #ifdef CONFIG_BOOTCOUNT_LIMIT - unsigned long bootcount = 0; -@@ -364,8 +369,23 @@ void main_loop (void) - install_auto_complete(); - #endif - -+#if defined(CONFIG_PREBOOT) || defined(CFG_PREBOOT_OVERRIDE) - #ifdef CONFIG_PREBOOT -- if ((p = getenv ("preboot")) != NULL) { -+ p = getenv ("preboot"); -+#endif -+#ifdef CFG_PREBOOT_OVERRIDE -+ if (preboot_override) { -+ /* for convenience, preboot_override may end in \n, not \0 */ -+ p = strchr(preboot_override, '\n'); -+ if (p) -+ *p = 0; -+ /* make sure we can overwrite the load area if we want to */ -+ p = strdup(preboot_override); -+ /* clean the image in case we want to flash it */ -+ preboot_override = NULL; -+ } -+#endif /* CFG_PREBOOT_OVERRIDE */ -+ if (p) { - # ifdef CONFIG_AUTOBOOT_KEYED - int prev = disable_ctrlc(1); /* disable Control C checking */ - # endif -@@ -381,7 +401,7 @@ void main_loop (void) - disable_ctrlc(prev); /* restore Control C checking */ - # endif - } --#endif /* CONFIG_PREBOOT */ -+#endif /* CONFIG_PREBOOT || CFG_PREBOOT_OVERRIDE */ - - #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) - s = getenv ("bootdelay"); -Index: u-boot/common/env_common.c -=================================================================== ---- u-boot.orig/common/env_common.c -+++ u-boot/common/env_common.c -@@ -37,6 +37,10 @@ - # define SHOW_BOOT_PROGRESS(arg) - #endif - -+#ifdef CFG_PREBOOT_OVERRIDE -+extern char *preboot_override; -+#endif -+ - DECLARE_GLOBAL_DATA_PTR; - - #ifdef CONFIG_AMIGAONEG3SE -@@ -234,7 +238,14 @@ void env_relocate (void) - puts ("*** Warning - bad CRC, using default environment\n\n"); - SHOW_BOOT_PROGRESS (-1); - #endif -+ } -+ -+#ifdef CFG_PREBOOT_OVERRIDE -+ if (preboot_override) -+ gd->env_valid = 0; -+#endif - -+ if (gd->env_valid == 0) { - if (sizeof(default_environment) > ENV_SIZE) - { - puts ("*** Error - default environment is too large\n\n"); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch b/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch deleted file mode 100644 index a1c381a2cf..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch +++ /dev/null @@ -1,31 +0,0 @@ -include/configs/neo1973.h: increase heap from 128 kB to 400 kB, for BMP image - decompression - [ note: increasing it to 512 kB trips over something. note sure what. - find out. ] -include/configs/neo1973.h: raise number of command line arguments from 16 to 64 - -- Werner Almesberger - -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -54,7 +54,8 @@ - /* - * Size of malloc() pool - */ --#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) -+ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ - #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ - - /* -@@ -142,7 +143,7 @@ - #endif - #define CFG_CBSIZE 256 /* Console I/O Buffer Size */ - #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ --#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_MAXARGS 64 /* max number of command args */ - #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ - - #define CFG_MEMTEST_START 0x30000000 /* memtest works on */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/series b/packages/uboot/u-boot-mkimage-gta01-native/series deleted file mode 100644 index 4fc7d1342f..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/series +++ /dev/null @@ -1,76 +0,0 @@ -# just some local hacks -uboot-machtypes.patch -ext2load_hex.patch -uboot-mokoversion.patch - -# those we want to get mainline -uboot-s3c2410-warnings-fix.patch -uboot-strtoul.patch -uboot-cramfs_but_no_jffs2.patch -nand-read_write_oob.patch -uboot-arm920t-gd_in_irq.patch -uboot-arm920_s3c2410_irq_demux.patch -uboot-s3c2410-nand.patch -uboot-cmd_s3c2410.patch -uboot-s3c2410-mmc.patch -env_nand_oob.patch -dynenv-harden.patch -uboot-s3c2410_fb.patch -uboot-20061030-qt2410.patch -uboot-20061030-neo1973.patch - -# under construction, but intended for mainline -uboot-s3c2410-misccr-definitions.patch - -boot-from-ram-reloc.patch -boot-from-ram-and-nand.patch -wakeup-reason-nand-only.patch -uboot-neo1973-resume.patch - -# this will be somewhat more difficult -nand-dynamic_partitions.patch -uboot-s3c2410-norelocate_irqvec_cpy.patch -uboot-usbtty-acm.patch -uboot-s3c2410_udc.patch - -# those need to be cleaned up -bbt-create-optional.patch -nand-createbbt.patch -dontask.patch -nand-badisbad.patch -uboot-bbt-quiet.patch - -# splash screen -raise-limits.patch -splashimage-command.patch -cmd-unzip.patch -enable-splash-bmp.patch - -# for automated installation -preboot-override.patch -lowlevel_foo.patch - -# move these later, once the dust has settled -default-env.patch -console-ansi.patch -boot-menu.patch - -# those have to be implemented fully -uboot-dfu.patch -uboot-neo1973-defaultenv.patch -uboot-nand-markbad-reallybad.patch -usbdcore-multiple_configs.patch -neo1973-chargefast.patch - -uboot-s3c2440.patch -uboot-smdk2440.patch -uboot-hxd8.patch - -uboot-license.patch - -uboot-gta02.patch -uboot-s3c2443.patch -uboot-smdk2443.patch - -# for review, merge soon -unbusy-i2c.patch diff --git a/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch b/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch deleted file mode 100644 index 8ea48cf484..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch +++ /dev/null @@ -1,24 +0,0 @@ -drivers/cfb_console.c (video_logo): if "splashimage" doesn't contain an - address, use its content as a command - -- Werner Almesberger - -Index: u-boot/drivers/cfb_console.c -=================================================================== ---- u-boot.orig/drivers/cfb_console.c -+++ u-boot/drivers/cfb_console.c -@@ -1121,7 +1121,13 @@ static void *video_logo (void) - ulong addr; - - if ((s = getenv ("splashimage")) != NULL) { -- addr = simple_strtoul (s, NULL, 16); -+ char *end; -+ -+ addr = simple_strtoul (s, &end, 16); -+ if (*end) { -+ run_command(s, 0); -+ return video_fb_address; -+ } - - if (video_display_bitmap (addr, 0, 0) == 0) { - return ((void *) (video_fb_address)); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch deleted file mode 100644 index 7c70244b38..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch +++ /dev/null @@ -1,2248 +0,0 @@ -This patch adds neo1973 'board' (FIC Neo1973 phone) support to u-boot. -Specifically, it adds support for the GTA01v3, GTA01v4, GTA01Bv2 and -GTA01Bv3 hardware revisions. - -Signed-off-by: Harald Welte - -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2009,6 +2009,14 @@ - sbc2410x_config: unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 - -+gta01_config \ -+gta01v3_config \ -+gta01bv2_config \ -+gta01bv3_config \ -+gta01bv4_config \ -+gta01v4_config : unconfig -+ @sh board/neo1973/gta01/split_by_variant.sh $@ -+ - qt2410_config : unconfig - @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 - -Index: u-boot/common/main.c -=================================================================== ---- u-boot.orig/common/main.c -+++ u-boot/common/main.c -@@ -61,6 +61,7 @@ - #undef DEBUG_PARSER - - char console_buffer[CFG_CBSIZE]; /* console I/O buffer */ -+int nobootdelay; - - #ifndef CONFIG_CMDLINE_EDITING - static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen); -@@ -376,7 +377,7 @@ - - debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); - -- if (bootdelay >= 0 && s && !abortboot (bootdelay)) { -+ if (!nobootdelay && bootdelay >= 0 && s && !abortboot (bootdelay)) { - # ifdef CONFIG_AUTOBOOT_KEYED - int prev = disable_ctrlc(1); /* disable Control C checking */ - # endif -Index: u-boot/drivers/Makefile -=================================================================== ---- u-boot.orig/drivers/Makefile -+++ u-boot/drivers/Makefile -@@ -50,6 +50,7 @@ - usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbtty.o \ - videomodes.o w83c553f.o \ - ks8695eth.o \ -+ pcf50606.o \ - pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ - rpx_pcmcia.o \ - fsl_i2c.o s3c2410_fb.o -Index: u-boot/drivers/pcf50606.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/pcf50606.c -@@ -0,0 +1,112 @@ -+ -+#include -+ -+#ifdef CONFIG_DRIVER_PCF50606 -+ -+#include -+#include -+#include -+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -+ -+#define PCF50606_I2C_ADDR 0x08 -+ -+void __pcf50606_reg_write(u_int8_t reg, u_int8_t val) -+{ -+ i2c_write(PCF50606_I2C_ADDR, reg, 1, &val, 1); -+} -+ -+u_int8_t __pcf50606_reg_read(u_int8_t reg) -+{ -+ u_int8_t tmp; -+ i2c_read(PCF50606_I2C_ADDR, reg, 1, &tmp, 1); -+ return tmp; -+} -+ -+void pcf50606_reg_write(u_int8_t reg, u_int8_t val) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ __pcf50606_reg_write(reg, val); -+ local_irq_restore(flags); -+} -+ -+u_int8_t pcf50606_reg_read(u_int8_t reg) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = __pcf50606_reg_read(reg); -+ local_irq_restore(flags); -+ -+ return tmp; -+} -+ -+void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = __pcf50606_reg_read(reg); -+ __pcf50606_reg_write(reg, (val & mask) | (tmp & ~mask)); -+ local_irq_restore(flags); -+} -+ -+void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = pcf50606_reg_read(reg); -+ pcf50606_reg_write(reg, (tmp & ~bits)); -+ local_irq_restore(flags); -+} -+ -+static const u_int8_t regs_valid[] = { -+ PCF50606_REG_OOCS, PCF50606_REG_INT1M, PCF50606_REG_INT2M, -+ PCF50606_REG_INT3M, PCF50606_REG_OOCC1, PCF50606_REG_OOCC2, -+ PCF50606_REG_PSSC, PCF50606_REG_PWROKM, PCF50606_REG_DCDC1, -+ PCF50606_REG_DCDC2, PCF50606_REG_DCDC3, PCF50606_REG_DCDC4, -+ PCF50606_REG_DCDEC1, PCF50606_REG_DCDEC2, PCF50606_REG_DCUDC1, -+ PCF50606_REG_DCUDC2, PCF50606_REG_IOREGC, PCF50606_REG_D1REGC1, -+ PCF50606_REG_D2REGC1, PCF50606_REG_D3REGC1, PCF50606_REG_LPREGC1, -+ PCF50606_REG_LPREGC2, PCF50606_REG_MBCC1, PCF50606_REG_MBCC2, -+ PCF50606_REG_MBCC3, PCF50606_REG_BBCC, PCF50606_REG_ADCC1, -+ PCF50606_REG_ADCC2, PCF50606_REG_ACDC1, PCF50606_REG_BVMC, -+ PCF50606_REG_PWMC1, PCF50606_REG_LEDC1, PCF50606_REG_LEDC2, -+ PCF50606_REG_GPOC1, PCF50606_REG_GPOC2, PCF50606_REG_GPOC3, -+ PCF50606_REG_GPOC4, PCF50606_REG_GPOC5, -+}; -+ -+ -+/* initialize PCF50606 register set */ -+void pcf50606_init(void) -+{ -+ unsigned long flags; -+ int i; -+ -+ local_irq_save(flags); -+ for (i = 0; i < ARRAY_SIZE(regs_valid); i++) { -+ __pcf50606_reg_write(regs_valid[i], -+ pcf50606_initial_regs[regs_valid[i]]); -+ } -+ local_irq_restore(flags); -+} -+ -+void pcf50606_charge_autofast(int on) -+{ -+ if (on) { -+ printf("Enabling automatic fast charge\n"); -+ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, -+ PCF50606_MBCC1_AUTOFST, -+ PCF50606_MBCC1_AUTOFST); -+ } else { -+ printf("Disabling fast charge\n"); -+ pcf50606_reg_write(PCF50606_REG_MBCC1, 0x00); -+ } -+} -+ -+#endif /* CONFIG DRIVER_PCF50606 */ -Index: u-boot/include/pcf50606.h -=================================================================== ---- /dev/null -+++ u-boot/include/pcf50606.h -@@ -0,0 +1,273 @@ -+#ifndef _PCF50606_H -+#define _PCF50606_H -+ -+/* Philips PCF50606 Power Managemnt Unit (PMU) driver -+ * (C) 2006-2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ */ -+ -+enum pfc50606_regs { -+ PCF50606_REG_ID = 0x00, -+ PCF50606_REG_OOCS = 0x01, -+ PCF50606_REG_INT1 = 0x02, /* Interrupt Status */ -+ PCF50606_REG_INT2 = 0x03, /* Interrupt Status */ -+ PCF50606_REG_INT3 = 0x04, /* Interrupt Status */ -+ PCF50606_REG_INT1M = 0x05, /* Interrupt Mask */ -+ PCF50606_REG_INT2M = 0x06, /* Interrupt Mask */ -+ PCF50606_REG_INT3M = 0x07, /* Interrupt Mask */ -+ PCF50606_REG_OOCC1 = 0x08, -+ PCF50606_REG_OOCC2 = 0x09, -+ PCF50606_REG_RTCSC = 0x0a, /* Second */ -+ PCF50606_REG_RTCMN = 0x0b, /* Minute */ -+ PCF50606_REG_RTCHR = 0x0c, /* Hour */ -+ PCF50606_REG_RTCWD = 0x0d, /* Weekday */ -+ PCF50606_REG_RTCDT = 0x0e, /* Day */ -+ PCF50606_REG_RTCMT = 0x0f, /* Month */ -+ PCF50606_REG_RTCYR = 0x10, /* Year */ -+ PCF50606_REG_RTCSCA = 0x11, /* Alarm Second */ -+ PCF50606_REG_RTCMNA = 0x12, /* Alarm Minute */ -+ PCF50606_REG_RTCHRA = 0x13, /* Alarm Hour */ -+ PCF50606_REG_RTCWDA = 0x14, /* Alarm Weekday */ -+ PCF50606_REG_RTCDTA = 0x15, /* Alarm Day */ -+ PCF50606_REG_RTCMTA = 0x16, /* Alarm Month */ -+ PCF50606_REG_RTCYRA = 0x17, /* Alarm Year */ -+ PCF50606_REG_PSSC = 0x18, /* Power sequencing */ -+ PCF50606_REG_PWROKM = 0x19, /* PWROK mask */ -+ PCF50606_REG_PWROKS = 0x1a, /* PWROK status */ -+ PCF50606_REG_DCDC1 = 0x1b, -+ PCF50606_REG_DCDC2 = 0x1c, -+ PCF50606_REG_DCDC3 = 0x1d, -+ PCF50606_REG_DCDC4 = 0x1e, -+ PCF50606_REG_DCDEC1 = 0x1f, -+ PCF50606_REG_DCDEC2 = 0x20, -+ PCF50606_REG_DCUDC1 = 0x21, -+ PCF50606_REG_DCUDC2 = 0x22, -+ PCF50606_REG_IOREGC = 0x23, -+ PCF50606_REG_D1REGC1 = 0x24, -+ PCF50606_REG_D2REGC1 = 0x25, -+ PCF50606_REG_D3REGC1 = 0x26, -+ PCF50606_REG_LPREGC1 = 0x27, -+ PCF50606_REG_LPREGC2 = 0x28, -+ PCF50606_REG_MBCC1 = 0x29, -+ PCF50606_REG_MBCC2 = 0x2a, -+ PCF50606_REG_MBCC3 = 0x2b, -+ PCF50606_REG_MBCS1 = 0x2c, -+ PCF50606_REG_BBCC = 0x2d, -+ PCF50606_REG_ADCC1 = 0x2e, -+ PCF50606_REG_ADCC2 = 0x2f, -+ PCF50606_REG_ADCS1 = 0x30, -+ PCF50606_REG_ADCS2 = 0x31, -+ PCF50606_REG_ADCS3 = 0x32, -+ PCF50606_REG_ACDC1 = 0x33, -+ PCF50606_REG_BVMC = 0x34, -+ PCF50606_REG_PWMC1 = 0x35, -+ PCF50606_REG_LEDC1 = 0x36, -+ PCF50606_REG_LEDC2 = 0x37, -+ PCF50606_REG_GPOC1 = 0x38, -+ PCF50606_REG_GPOC2 = 0x39, -+ PCF50606_REG_GPOC3 = 0x3a, -+ PCF50606_REG_GPOC4 = 0x3b, -+ PCF50606_REG_GPOC5 = 0x3c, -+ __NUM_PCF50606_REGS -+}; -+ -+enum pcf50606_reg_oocs { -+ PFC50606_OOCS_ONKEY = 0x01, -+ PCF50606_OOCS_EXTON = 0x02, -+ PCF50606_OOCS_PWROKRST = 0x04, -+ PCF50606_OOCS_BATOK = 0x08, -+ PCF50606_OOCS_BACKOK = 0x10, -+ PCF50606_OOCS_CHGOK = 0x20, -+ PCF50606_OOCS_TEMPOK = 0x40, -+ PCF50606_OOCS_WDTEXP = 0x80, -+}; -+ -+enum pcf50606_reg_oocc1 { -+ PCF50606_OOCC1_GOSTDBY = 0x01, -+ PCF50606_OOCC1_TOTRST = 0x02, -+ PCF50606_OOCC1_CLK32ON = 0x04, -+ PCF50606_OOCC1_WDTRST = 0x08, -+ PCF50606_OOCC1_RTCWAK = 0x10, -+ PCF50606_OOCC1_CHGWAK = 0x20, -+ PCF50606_OOCC1_EXTONWAK_HIGH = 0x40, -+ PCF50606_OOCC1_EXTONWAK_LOW = 0x80, -+ PCF50606_OOCC1_EXTONWAK_NO_WAKEUP = 0x3f, -+}; -+ -+enum pcf50606_reg_oocc2 { -+ PCF50606_OOCC2_ONKEYDB_NONE = 0x00, -+ PCF50606_OOCC2_ONKEYDB_14ms = 0x01, -+ PCF50606_OOCC2_ONKEYDB_62ms = 0x02, -+ PCF50606_OOCC2_ONKEYDB_500ms = 0x03, -+ PCF50606_OOCC2_EXTONDB_NONE = 0x00, -+ PCF50606_OOCC2_EXTONDB_14ms = 0x04, -+ PCF50606_OOCC2_EXTONDB_62ms = 0x08, -+ PCF50606_OOCC2_EXTONDB_500ms = 0x0c, -+}; -+ -+enum pcf50606_reg_int1 { -+ PCF50606_INT1_ONKEYR = 0x01, /* ONKEY rising edge */ -+ PCF50606_INT1_ONKEYF = 0x02, /* ONKEY falling edge */ -+ PCF50606_INT1_ONKEY1S = 0x04, /* OMKEY at least 1sec low */ -+ PCF50606_INT1_EXTONR = 0x08, /* EXTON rising edge */ -+ PCF50606_INT1_EXTONF = 0x10, /* EXTON falling edge */ -+ PCF50606_INT1_SECOND = 0x40, /* RTC periodic second interrupt */ -+ PCF50606_INT1_ALARM = 0x80, /* RTC alarm time is reached */ -+}; -+ -+enum pcf50606_reg_int2 { -+ PCF50606_INT2_CHGINS = 0x01, /* Charger inserted */ -+ PCF50606_INT2_CHGRM = 0x02, /* Charger removed */ -+ PCF50606_INT2_CHGFOK = 0x04, /* Fast charging OK */ -+ PCF50606_INT2_CHGERR = 0x08, /* Error in charging mode */ -+ PCF50606_INT2_CHGFRDY = 0x10, /* Fast charge completed */ -+ PCF50606_INT2_CHGPROT = 0x20, /* Charging protection interrupt */ -+ PCF50606_INT2_CHGWD10S = 0x40, /* Charger watchdig expires in 10s */ -+ PCF50606_INT2_CHGWDEXP = 0x80, /* Charger watchdog expires */ -+}; -+ -+enum pcf50606_reg_int3 { -+ PCF50606_INT3_ADCRDY = 0x01, /* ADC conversion finished */ -+ PCF50606_INT3_ACDINS = 0x02, /* Accessory inserted */ -+ PCF50606_INT3_ACDREM = 0x04, /* Accessory removed */ -+ PCF50606_INT3_TSCPRES = 0x08, /* Touch screen pressed */ -+ PCF50606_INT3_LOWBAT = 0x40, /* Low battery voltage */ -+ PCF50606_INT3_HIGHTMP = 0x80, /* High temperature */ -+}; -+ -+/* used by PSSC, PWROKM, PWROKS, */ -+enum pcf50606_regu { -+ PCF50606_REGU_DCD = 0x01, /* DCD in phase 2 */ -+ PCF50606_REGU_DCDE = 0x02, /* DCDE in phase 2 */ -+ PCF50606_REGU_DCUD = 0x04, /* DCDU in phase 2 */ -+ PCF50606_REGU_IO = 0x08, /* IO in phase 2 */ -+ PCF50606_REGU_D1 = 0x10, /* D1 in phase 2 */ -+ PCF50606_REGU_D2 = 0x20, /* D2 in phase 2 */ -+ PCF50606_REGU_D3 = 0x40, /* D3 in phase 2 */ -+ PCF50606_REGU_LP = 0x80, /* LP in phase 2 */ -+}; -+ -+enum pcf50606_reg_dcdc4 { -+ PCF50606_DCDC4_MODE_AUTO = 0x00, -+ PCF50606_DCDC4_MODE_PWM = 0x01, -+ PCF50606_DCDC4_MODE_PCF = 0x02, -+ PCF50606_DCDC4_OFF_FLOAT = 0x00, -+ PCF50606_DCDC4_OFF_BYPASS = 0x04, -+ PCF50606_DCDC4_OFF_PULLDOWN = 0x08, -+ PCF50606_DCDC4_CURLIM_500mA = 0x00, -+ PCF50606_DCDC4_CURLIM_750mA = 0x10, -+ PCF50606_DCDC4_CURLIM_1000mA = 0x20, -+ PCF50606_DCDC4_CURLIM_1250mA = 0x30, -+ PCF50606_DCDC4_TOGGLE = 0x40, -+ PCF50606_DCDC4_REGSEL_DCDC2 = 0x80, -+}; -+ -+enum pcf50606_reg_dcdec2 { -+ PCF50606_DCDEC2_MODE_AUTO = 0x00, -+ PCF50606_DCDEC2_MODE_PWM = 0x01, -+ PCF50606_DCDEC2_MODE_PCF = 0x02, -+ PCF50606_DCDEC2_OFF_FLOAT = 0x00, -+ PCF50606_DCDEC2_OFF_BYPASS = 0x04, -+}; -+ -+enum pcf50606_reg_dcudc2 { -+ PCF50606_DCUDC2_MODE_AUTO = 0x00, -+ PCF50606_DCUDC2_MODE_PWM = 0x01, -+ PCF50606_DCUDC2_MODE_PCF = 0x02, -+ PCF50606_DCUDC2_OFF_FLOAT = 0x00, -+ PCF50606_DCUDC2_OFF_BYPASS = 0x04, -+}; -+ -+enum pcf50606_reg_adcc1 { -+ PCF50606_ADCC1_TSCMODACT = 0x01, -+ PCF50606_ADCC1_TSCMODSTB = 0x02, -+ PCF50606_ADCC1_TRATSET = 0x04, -+ PCF50606_ADCC1_NTCSWAPE = 0x08, -+ PCF50606_ADCC1_NTCSWAOFF = 0x10, -+ PCF50606_ADCC1_EXTSYNCBREAK = 0x20, -+ /* reserved */ -+ PCF50606_ADCC1_TSCINT = 0x80, -+}; -+ -+enum pcf50606_reg_adcc2 { -+ PCF50606_ADCC2_ADCSTART = 0x01, -+ /* see enum pcf50606_adcc2_adcmux */ -+ PCF50606_ADCC2_SYNC_NONE = 0x00, -+ PCF50606_ADCC2_SYNC_TXON = 0x20, -+ PCF50606_ADCC2_SYNC_PWREN1 = 0x40, -+ PCF50606_ADCC2_SYNC_PWREN2 = 0x60, -+ PCF50606_ADCC2_RES_10BIT = 0x00, -+ PCF50606_ADCC2_RES_8BIT = 0x80, -+}; -+ -+#define PCF50606_ADCC2_ADCMUX_MASK (0xf << 1) -+ -+#define ADCMUX_SHIFT 1 -+enum pcf50606_adcc2_adcmux { -+ PCF50606_ADCMUX_BATVOLT_RES = 0x0 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_BATVOLT_SUBTR = 0x1 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_ADCIN1_RES = 0x2 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_ADCIN1_SUBTR = 0x3 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_BATTEMP = 0x4 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_ADCIN2 = 0x5 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_ADCIN3 = 0x6 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_ADCIN3_RATIO = 0x7 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_XPOS = 0x8 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_YPOS = 0x9 << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_P1 = 0xa << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_P2 = 0xb << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_BATVOLT_ADCIN1 = 0xc << ADCMUX_SHIFT, -+ PCF50606_ADCMUX_XY_SEQUENCE = 0xe << ADCMUX_SHIFT, -+ PCF50606_P1_P2_RESISTANCE = 0xf << ADCMUX_SHIFT, -+}; -+ -+enum pcf50606_adcs2 { -+ PCF50606_ADCS2_ADCRDY = 0x80, -+}; -+ -+enum pcf50606_reg_mbcc1 { -+ PCF50606_MBCC1_CHGAPE = 0x01, -+ PCF50606_MBCC1_AUTOFST = 0x02, -+#define PCF50606_MBCC1_CHGMOD_MASK 0x1c -+#define PCF50606_MBCC1_CHGMOD_SHIFT 2 -+ PCF50606_MBCC1_CHGMOD_QUAL = 0x00, -+ PCF50606_MBCC1_CHGMOD_PRE = 0x04, -+ PCF50606_MBCC1_CHGMOD_TRICKLE = 0x08, -+ PCF50606_MBCC1_CHGMOD_FAST_CCCV = 0x0c, -+ PCF50606_MBCC1_CHGMOD_FAST_NOCC = 0x10, -+ PCF50606_MBCC1_CHGMOD_FAST_NOCV = 0x14, -+ PCF50606_MBCC1_CHGMOD_FAST_SW = 0x18, -+ PCF50606_MBCC1_CHGMOD_IDLE = 0x1c, -+ PCF50606_MBCC1_DETMOD_LOWCHG = 0x20, -+ PCF50606_MBCC1_DETMOD_WDRST = 0x40, -+}; -+ -+enum pcf50606_reg_bvmc { -+ PCF50606_BVMC_LOWBAT = 0x01, -+ PCF50606_BVMC_THRSHLD_NULL = 0x00, -+ PCF50606_BVMC_THRSHLD_2V8 = 0x02, -+ PCF50606_BVMC_THRSHLD_2V9 = 0x04, -+ PCF50606_BVMC_THRSHLD_3V = 0x08, -+ PCF50606_BVMC_THRSHLD_3V1 = 0x08, -+ PCF50606_BVMC_THRSHLD_3V2 = 0x0a, -+ PCF50606_BVMC_THRSHLD_3V3 = 0x0c, -+ PCF50606_BVMC_THRSHLD_3V4 = 0x0e, -+ PCF50606_BVMC_DISDB = 0x10, -+}; -+ -+/* this is to be provided by the board implementation */ -+extern const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS]; -+ -+void pcf50606_reg_write(u_int8_t reg, u_int8_t val); -+ -+u_int8_t pcf50606_reg_read(u_int8_t reg); -+ -+void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val); -+void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits); -+ -+void pcf50606_init(void); -+void pcf50606_charge_autofast(int on); -+ -+#endif /* _PCF50606_H */ -+ -Index: u-boot/board/neo1973/common/cmd_neo1973.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/cmd_neo1973.c -@@ -0,0 +1,99 @@ -+/* -+ * (C) Copyright 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+/* -+ * Boot support -+ */ -+#include -+#include -+#include /* for print_IPaddr */ -+#include -+ -+#include "neo1973.h" -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if (CONFIG_COMMANDS & CFG_CMD_BDI) -+ -+int do_neo1973 ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ int i; -+ -+ if (!strcmp(argv[1], "info")) { -+ printf("FIC Neo1973 Hardware Revision 0x%04x\n", get_board_rev()); -+ } else if (!strcmp(argv[1], "power-off")) { -+ neo1973_poweroff(); -+ } else if (!strcmp(argv[1], "charger") || !strcmp(argv[1], "charge")) { -+ if (argc < 3) -+ goto out_help; -+ if (!strcmp(argv[2], "status") || !strcmp(argv[2], "state")) { -+ printf("%s\n", neo1973_get_charge_status()); -+ } else if (!strcmp(argv[2], "autofast")) { -+ neo1973_set_charge_mode(NEO1973_CHGCMD_AUTOFAST); -+ } else if (!strcmp(argv[2], "!autofast")) { -+ neo1973_set_charge_mode(NEO1973_CHGCMD_NO_AUTOFAST); -+ } else if (!strcmp(argv[2], "off")) { -+ neo1973_set_charge_mode(NEO1973_CHGCMD_OFF); -+ } else if (!strcmp(argv[2], "fast")) { -+ neo1973_set_charge_mode(NEO1973_CHGCMD_FAST); -+ } else -+ goto out_help; -+ } else if (!strcmp(argv[1], "backlight")) { -+ if (argc < 3) -+ goto out_help; -+ if (!strcmp(argv[2], "on")) -+ neo1973_backlight(1); -+ else -+ neo1973_backlight(0); -+ } else if (!strcmp(argv[1], "vibrator")) { -+ if (argc < 3) -+ goto out_help; -+ if (!strcmp(argv[2], "on")) -+ neo1973_vibrator(1); -+ else -+ neo1973_vibrator(0); -+ } else { -+out_help: -+ printf("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------- */ -+ -+U_BOOT_CMD( -+ neo1973, 4, 1, do_neo1973, -+ "neo1973 - phone specific commands\n", -+ "neo1973 info - display phone informantion\n" -+ "neo1973 power-off - switch off the phone\n" -+ "neo1973 charger status - display charger status\n" -+ "neo1973 charger autofast - enable automatic fast (500mA) charging\n" -+ "neo1973 charger !autofast - disable automatic fast (500mA) charging\n" -+ "neo1973 charger fast - enable fast (500mA) charging\n" -+ "neo1973 charger off - disable charging\n" -+ "neo1973 backlight (on|off) - switch backlight on or off\n" -+ "neo1973 vibrator (on|off) - switch vibrator on or off\n" -+); -+#endif /* CFG_CMD_BDI */ -Index: u-boot/board/neo1973/common/jbt6k74.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/jbt6k74.c -@@ -0,0 +1,420 @@ -+/* u-boot driver for the tpo JBT6K74-AS LCM ASIC -+ * -+ * Copyright (C) 2006-2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ */ -+#include -+#include -+#include -+#include -+#include -+#include "jbt6k74.h" -+ -+#if 0 -+#define DEBUGP(x, args...) printf("%s: " x, __FUNCTION__, ## args); -+#define DEBUGPC(x, args...) printf(x, ## args); -+#else -+#define DEBUGP(x, args...) do { } while (0) -+#define DEBUGPC(x, args...) do { } while (0) -+#endif -+ -+ -+enum jbt_register { -+ JBT_REG_SLEEP_IN = 0x10, -+ JBT_REG_SLEEP_OUT = 0x11, -+ -+ JBT_REG_DISPLAY_OFF = 0x28, -+ JBT_REG_DISPLAY_ON = 0x29, -+ -+ JBT_REG_RGB_FORMAT = 0x3a, -+ JBT_REG_QUAD_RATE = 0x3b, -+ -+ JBT_REG_POWER_ON_OFF = 0xb0, -+ JBT_REG_BOOSTER_OP = 0xb1, -+ JBT_REG_BOOSTER_MODE = 0xb2, -+ JBT_REG_BOOSTER_FREQ = 0xb3, -+ JBT_REG_OPAMP_SYSCLK = 0xb4, -+ JBT_REG_VSC_VOLTAGE = 0xb5, -+ JBT_REG_VCOM_VOLTAGE = 0xb6, -+ JBT_REG_EXT_DISPL = 0xb7, -+ JBT_REG_OUTPUT_CONTROL = 0xb8, -+ JBT_REG_DCCLK_DCEV = 0xb9, -+ JBT_REG_DISPLAY_MODE1 = 0xba, -+ JBT_REG_DISPLAY_MODE2 = 0xbb, -+ JBT_REG_DISPLAY_MODE = 0xbc, -+ JBT_REG_ASW_SLEW = 0xbd, -+ JBT_REG_DUMMY_DISPLAY = 0xbe, -+ JBT_REG_DRIVE_SYSTEM = 0xbf, -+ -+ JBT_REG_SLEEP_OUT_FR_A = 0xc0, -+ JBT_REG_SLEEP_OUT_FR_B = 0xc1, -+ JBT_REG_SLEEP_OUT_FR_C = 0xc2, -+ JBT_REG_SLEEP_IN_LCCNT_D = 0xc3, -+ JBT_REG_SLEEP_IN_LCCNT_E = 0xc4, -+ JBT_REG_SLEEP_IN_LCCNT_F = 0xc5, -+ JBT_REG_SLEEP_IN_LCCNT_G = 0xc6, -+ -+ JBT_REG_GAMMA1_FINE_1 = 0xc7, -+ JBT_REG_GAMMA1_FINE_2 = 0xc8, -+ JBT_REG_GAMMA1_INCLINATION = 0xc9, -+ JBT_REG_GAMMA1_BLUE_OFFSET = 0xca, -+ -+ JBT_REG_BLANK_CONTROL = 0xcf, -+ JBT_REG_BLANK_TH_TV = 0xd0, -+ JBT_REG_CKV_ON_OFF = 0xd1, -+ JBT_REG_CKV_1_2 = 0xd2, -+ JBT_REG_OEV_TIMING = 0xd3, -+ JBT_REG_ASW_TIMING_1 = 0xd4, -+ JBT_REG_ASW_TIMING_2 = 0xd5, -+ -+ JBT_REG_HCLOCK_VGA = 0xec, -+ JBT_REG_HCLOCK_QVGA = 0xed, -+ -+}; -+ -+static const char *jbt_state_names[] = { -+ [JBT_STATE_DEEP_STANDBY] = "deep-standby", -+ [JBT_STATE_SLEEP] = "sleep", -+ [JBT_STATE_NORMAL] = "normal", -+}; -+ -+#define GTA01_SCLK (1 << 7) /* GPG7 */ -+#define GTA01_MOSI (1 << 6) /* GPG6 */ -+#define GTA01_MISO (1 << 5) /* GPG5 */ -+#define GTA01_CS (1 << 3) /* GPG3 */ -+ -+#define SPI_READ ((immr->GPGDAT & GTA01_MISO) != 0) -+ -+#define SPI_CS(bit) if (bit) gpio->GPGDAT |= GTA01_CS; \ -+ else gpio->GPGDAT &= ~GTA01_CS -+ -+#define SPI_SDA(bit) if (bit) gpio->GPGDAT |= GTA01_MOSI; \ -+ else gpio->GPGDAT &= ~GTA01_MOSI -+ -+#define SPI_SCL(bit) if (bit) gpio->GPGDAT |= GTA01_SCLK; \ -+ else gpio->GPGDAT &= ~GTA01_SCLK -+ -+/* 150uS minimum clock cycle, we have two of this plus our other -+ * instructions */ -+#define SPI_DELAY udelay(100) /* 200uS */ -+ -+ -+#define JBT_TX_BUF_SIZE -+struct jbt_info { -+ enum jbt_state state; -+ u_int16_t tx_buf[4]; -+ struct spi_device *spi_dev; -+}; -+ -+static struct jbt_info _jbt, *jbt = &_jbt; -+ -+static int jbt_spi_xfer(int wordnum, int bitlen, u_int16_t *dout) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ u_int16_t tmpdout = 0; -+ int i, j; -+ -+ DEBUGP("spi_xfer: dout %08X wordnum %u bitlen %d\n", -+ *(uint *)dout, wordnum, bitlen); -+ -+ SPI_CS(0); -+ -+ for (i = 0; i < wordnum; i ++) { -+ tmpdout = dout[i]; -+ -+ for (j = 0; j < bitlen; j++) { -+ SPI_SCL(0); -+ if (tmpdout & (1 << bitlen-1)) { -+ SPI_SDA(1); -+ DEBUGPC("1"); -+ } else { -+ SPI_SDA(0); -+ DEBUGPC("0"); -+ } -+ SPI_DELAY; -+ SPI_SCL(1); -+ SPI_DELAY; -+ tmpdout <<= 1; -+ } -+ DEBUGPC(" "); -+ } -+ DEBUGPC("\n"); -+ -+ SPI_CS(1); -+ -+ return 0; -+} -+ -+#define JBT_COMMAND 0x000 -+#define JBT_DATA 0x100 -+ -+static int jbt_reg_write_nodata(struct jbt_info *jbt, u_int8_t reg) -+{ -+ int rc; -+ -+ jbt->tx_buf[0] = JBT_COMMAND | reg; -+ -+ rc = jbt_spi_xfer(1, 9, jbt->tx_buf); -+ -+ return rc; -+} -+ -+ -+static int jbt_reg_write(struct jbt_info *jbt, u_int8_t reg, u_int8_t data) -+{ -+ int rc; -+ -+ jbt->tx_buf[0] = JBT_COMMAND | reg; -+ jbt->tx_buf[1] = JBT_DATA | data; -+ -+ rc = jbt_spi_xfer(2, 9, jbt->tx_buf); -+ -+ return rc; -+} -+ -+static int jbt_reg_write16(struct jbt_info *jbt, u_int8_t reg, u_int16_t data) -+{ -+ int rc; -+ -+ jbt->tx_buf[0] = JBT_COMMAND | reg; -+ jbt->tx_buf[1] = JBT_DATA | (data >> 8); -+ jbt->tx_buf[2] = JBT_DATA | (data & 0xff); -+ -+ rc = jbt_spi_xfer(3, 9, jbt->tx_buf); -+ -+ return rc; -+} -+ -+static int jbt_init_regs(struct jbt_info *jbt) -+{ -+ int rc; -+ -+ DEBUGP("entering\n"); -+ -+ rc = jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE1, 0x01); -+ rc |= jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE2, 0x00); -+ rc |= jbt_reg_write(jbt, JBT_REG_RGB_FORMAT, 0x60); -+ rc |= jbt_reg_write(jbt, JBT_REG_DRIVE_SYSTEM, 0x10); -+ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_OP, 0x56); -+ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_MODE, 0x33); -+ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_FREQ, 0x11); -+ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_FREQ, 0x11); -+ rc |= jbt_reg_write(jbt, JBT_REG_OPAMP_SYSCLK, 0x02); -+ rc |= jbt_reg_write(jbt, JBT_REG_VSC_VOLTAGE, 0x2b); -+ rc |= jbt_reg_write(jbt, JBT_REG_VCOM_VOLTAGE, 0x40); -+ rc |= jbt_reg_write(jbt, JBT_REG_EXT_DISPL, 0x03); -+ rc |= jbt_reg_write(jbt, JBT_REG_DCCLK_DCEV, 0x04); -+ rc |= jbt_reg_write(jbt, JBT_REG_ASW_SLEW, 0x02); -+ rc |= jbt_reg_write(jbt, JBT_REG_DUMMY_DISPLAY, 0x00); -+ -+ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_A, 0x11); -+ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_B, 0x11); -+ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_C, 0x11); -+ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_D, 0x2040); -+ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_E, 0x60c0); -+ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_F, 0x1020); -+ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_G, 0x60c0); -+ -+ rc |= jbt_reg_write16(jbt, JBT_REG_GAMMA1_FINE_1, 0x5533); -+ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_FINE_2, 0x00); -+ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_INCLINATION, 0x00); -+ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_BLUE_OFFSET, 0x00); -+ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_BLUE_OFFSET, 0x00); -+ -+ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_VGA, 0x1f0); -+ rc |= jbt_reg_write(jbt, JBT_REG_BLANK_CONTROL, 0x02); -+ rc |= jbt_reg_write16(jbt, JBT_REG_BLANK_TH_TV, 0x0804); -+ rc |= jbt_reg_write16(jbt, JBT_REG_BLANK_TH_TV, 0x0804); -+ -+ rc |= jbt_reg_write(jbt, JBT_REG_CKV_ON_OFF, 0x01); -+ rc |= jbt_reg_write16(jbt, JBT_REG_CKV_1_2, 0x0000); -+ -+ rc |= jbt_reg_write16(jbt, JBT_REG_OEV_TIMING, 0x0d0e); -+ rc |= jbt_reg_write16(jbt, JBT_REG_ASW_TIMING_1, 0x11a4); -+ rc |= jbt_reg_write(jbt, JBT_REG_ASW_TIMING_2, 0x0e); -+ -+#if 0 -+ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_QVGA, 0x00ff); -+ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_QVGA, 0x00ff); -+#endif -+ -+ return rc; -+} -+ -+static int standby_to_sleep(struct jbt_info *jbt) -+{ -+ int rc; -+ -+ DEBUGP("entering\n"); -+ -+ /* three times command zero */ -+ rc = jbt_reg_write_nodata(jbt, 0x00); -+ udelay(1000); -+ rc = jbt_reg_write_nodata(jbt, 0x00); -+ udelay(1000); -+ rc = jbt_reg_write_nodata(jbt, 0x00); -+ udelay(1000); -+ -+ /* deep standby out */ -+ rc |= jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x17); -+ -+ return rc; -+} -+ -+static int sleep_to_normal(struct jbt_info *jbt) -+{ -+ int rc; -+ DEBUGP("entering\n"); -+ -+ /* RGB I/F on, RAM wirte off, QVGA through, SIGCON enable */ -+ rc = jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE, 0x80); -+ -+ /* Quad mode off */ -+ rc |= jbt_reg_write(jbt, JBT_REG_QUAD_RATE, 0x00); -+ -+ /* AVDD on, XVDD on */ -+ rc |= jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x16); -+ -+ /* Output control */ -+ rc |= jbt_reg_write16(jbt, JBT_REG_OUTPUT_CONTROL, 0xfff9); -+ -+ /* Sleep mode off */ -+ rc |= jbt_reg_write_nodata(jbt, JBT_REG_SLEEP_OUT); -+ -+ /* initialize register set */ -+ rc |= jbt_init_regs(jbt); -+ return rc; -+} -+ -+static int normal_to_sleep(struct jbt_info *jbt) -+{ -+ int rc; -+ DEBUGP("entering\n"); -+ -+ rc = jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_OFF); -+ rc |= jbt_reg_write16(jbt, JBT_REG_OUTPUT_CONTROL, 0x8002); -+ rc |= jbt_reg_write_nodata(jbt, JBT_REG_SLEEP_IN); -+ -+ return rc; -+} -+ -+static int sleep_to_standby(struct jbt_info *jbt) -+{ -+ DEBUGP("entering\n"); -+ return jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x00); -+} -+ -+/* frontend function */ -+int jbt6k74_enter_state(enum jbt_state new_state) -+{ -+ int rc = -EINVAL; -+ -+ DEBUGP("entering(old_state=%u, new_state=%u)\n", jbt->state, new_state); -+ -+ switch (jbt->state) { -+ case JBT_STATE_DEEP_STANDBY: -+ switch (new_state) { -+ case JBT_STATE_DEEP_STANDBY: -+ rc = 0; -+ break; -+ case JBT_STATE_SLEEP: -+ rc = standby_to_sleep(jbt); -+ break; -+ case JBT_STATE_NORMAL: -+ /* first transition into sleep */ -+ rc = standby_to_sleep(jbt); -+ /* then transition into normal */ -+ rc |= sleep_to_normal(jbt); -+ break; -+ } -+ break; -+ case JBT_STATE_SLEEP: -+ switch (new_state) { -+ case JBT_STATE_SLEEP: -+ rc = 0; -+ break; -+ case JBT_STATE_DEEP_STANDBY: -+ rc = sleep_to_standby(jbt); -+ break; -+ case JBT_STATE_NORMAL: -+ rc = sleep_to_normal(jbt); -+ break; -+ } -+ break; -+ case JBT_STATE_NORMAL: -+ switch (new_state) { -+ case JBT_STATE_NORMAL: -+ rc = 0; -+ break; -+ case JBT_STATE_DEEP_STANDBY: -+ /* first transition into sleep */ -+ rc = normal_to_sleep(jbt); -+ /* then transition into deep standby */ -+ rc |= sleep_to_standby(jbt); -+ break; -+ case JBT_STATE_SLEEP: -+ rc = normal_to_sleep(jbt); -+ break; -+ } -+ break; -+ } -+ -+ return rc; -+} -+ -+int jbt6k74_display_onoff(int on) -+{ -+ DEBUGP("entering\n"); -+ if (on) -+ return jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_ON); -+ else -+ return jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_OFF); -+} -+ -+int jbt6k74_init(void) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* initialize SPI for GPIO bitbang */ -+ gpio->GPGCON &= 0xffff033f; -+ gpio->GPGCON |= 0x00005440; -+ -+ /* get LCM out of reset */ -+ gpio->GPCDAT |= (1 << 6); -+ -+ /* according to data sheet: wait 50ms (Tpos of LCM). However, 50ms -+ * seems unreliable with later LCM batches, increasing to 90ms */ -+ udelay(90000); -+ -+ return 0; -+} -+ -+void board_video_init(GraphicDevice *pGD) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ -+ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */ -+ -+ lcd->LCDCON2 = 0x019fc3c1; -+ lcd->LCDCON3 = 0x0039df67; -+ lcd->LCDCON4 = 0x00000007; -+ lcd->LCDCON5 = 0x0001cf09; -+ lcd->LPCSEL = 0x00000000; -+} -Index: u-boot/board/neo1973/common/jbt6k74.h -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/jbt6k74.h -@@ -0,0 +1,14 @@ -+#ifndef _JBT6K74_H -+#define _JBT6K74_H -+ -+enum jbt_state { -+ JBT_STATE_DEEP_STANDBY, -+ JBT_STATE_SLEEP, -+ JBT_STATE_NORMAL, -+}; -+ -+int jbt6k74_init(void); -+int jbt6k74_display_onoff(int on); -+int jbt6k74_enter_state(enum jbt_state new_state); -+ -+#endif -Index: u-boot/board/neo1973/common/lowlevel_init.S -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/lowlevel_init.S -@@ -0,0 +1,187 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the FIC Neo1973 GTA01 by Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 /* 3clk */ -+#if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+#define B6_SCAN 0x1 /* 9bit */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ -+ defined(CONFIG_ARCH_GTA01B_v4) -+#define B6_SCAN 0x2 /* 10bit */ -+#endif -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x2 /* 10bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ adr r0, SMRDATA -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ /* switch on power for NAND */ -+ ldr r0, =0x56000010 /* GPBCON */ -+ ldr r1, [r0] -+ orr r1, r1, #0x10 -+ str r1, [r0] -+ -+ ldr r0, =0x56000014 /* GPBDAT */ -+ ldr r1, [r0] -+ orr r1, r1, #(1 <<2) -+ str r1, [r0] -+#endif -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0xb2 -+ .word 0x30 -+ .word 0x30 -Index: u-boot/board/neo1973/gta01/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/Makefile -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o -+SOBJS := ../common/lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -Index: u-boot/board/neo1973/gta01/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/config.mk -@@ -0,0 +1,34 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# FIC Neo1973 GTA01 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# GTA01v3 has 1 bank of 64 MB SDRAM -+# GTA01v4 has 1 bank of 64 MB SDRAM -+# -+# 3000'0000 to 3400'0000 -+# we load ourself to 33F8'0000 -+# -+# GTA01Bv2 or later has 1 bank of 128 MB SDRAM -+# -+# 3000'0000 to 3800'0000 -+# we load ourself to 37F8'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# download area is 3200'0000 or 3300'0000 -+ -+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp -+ -+ifeq ($(GTA01_BIG_RAM),y) -+# FIXME: TEXT_BASE = 0x37F80000 -+TEXT_BASE = 0x33F80000 -+else -+TEXT_BASE = 0x33F80000 -+endif -Index: u-boot/board/neo1973/gta01/gta01.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -0,0 +1,422 @@ -+/* -+ * (C) 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+#include -+ -+#include "pcf50606.h" -+ -+#include "../common/neo1973.h" -+#include "../common/jbt6k74.h" -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+/* That many seconds the power key needs to be pressed to power up */ -+#define POWER_KEY_SECONDS 2 -+ -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x3 -+//#define M_SDIV 0x1 -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+/* In case the debug board is attached, we cannot go beyond 200 MHz */ -+#if 0 -+#define M_MDIV 0x7d /* Fout = 266MHz */ -+#define M_PDIV 0x1 -+#define M_SDIV 0x1 -+#else -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#endif -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+/* This board doesn't have bus lines at teh debug port, and we can go to 266 */ -+#define M_MDIV 0x7d /* Fout = 266MHz */ -+#define M_PDIV 0x1 -+#define M_SDIV 0x1 -+#else -+#error Please define GTA01 revision -+#endif -+ -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+ -+unsigned int neo1973_wakeup_cause; -+extern int nobootdelay; -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+#if defined(CONFIG_ARCH_GTA01_v3) -+ gpio->GPACON = 0x007FFFFF; -+ -+ gpio->GPBCON = 0x00005055; -+ gpio->GPBUP = 0x000007FF; -+ -+ gpio->GPCCON = 0xAAAA12A8; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x00002AA9; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0xA846F0C0; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0008FAAA; -+ gpio->GPHUP = 0x000007FF; -+#elif defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPACON = 0x005E47FF; -+ -+ gpio->GPBCON = 0x00045015; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (Flash power-up) */ -+ -+ gpio->GPCCON = 0xAAAA12A9; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xA02AAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000aa09; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0xFF40F0C1; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0000FAAA; -+ gpio->GPHUP = 0x000007FF; -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ gpio->GPACON = 0x005E4FFF; -+ -+ gpio->GPBCON = 0x00145415; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (Flash power-up) */ -+ -+ gpio->GPCCON = 0xAAAA12A9; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xA02AAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000aa19; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPFDAT |= 0x4; /* Set GBF2 to high (nGSM_EN) */ -+ -+ gpio->GPGCON = 0xFF40F0C1; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0000FAAA; -+ gpio->GPHUP = 0x000007FF; -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ gpio->GPACON = 0x0005E0FFF; -+ gpio->GPADAT |= (1 << 16); /* Set GPA16 to high (nNAND_WP) */ -+ -+ gpio->GPBCON = 0x00045455; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (SD power down) */ -+ -+ gpio->GPCCON = 0xAAAA12A9; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000aa99; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPFDAT |= 0x4; /* Set GBF2 to high (nGSM_EN) */ -+ -+ gpio->GPGCON = 0xFF14F0F8; -+ gpio->GPGUP = 0x0000AFEF; -+ -+ gpio->GPHCON = 0x0000FAAA; -+ gpio->GPHUP = 0x000007FF; -+#else -+#error Please define GTA01 version -+#endif -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA01; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int board_late_init(void) -+{ -+ unsigned char tmp; -+ char buf[32]; -+ -+ /* Initialize the Power Management Unit with a safe register set */ -+ pcf50606_init(); -+ -+ /* obtain wake-up reason, save INT1 in environment */ -+ tmp = pcf50606_reg_read(PCF50606_REG_INT1); -+ sprintf(buf, "0x%02x", tmp); -+ setenv("pcf50606_int1", buf); -+ -+ if (tmp & PCF50606_INT1_ALARM) { -+ /* we've been woken up by RTC alarm or charger insert, boot */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; -+ goto continue_boot; -+ } -+ if (tmp & PCF50606_INT1_EXTONR) { -+ neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; -+ } -+ -+ if (tmp & PCF50606_INT1_ONKEYF) { -+ int seconds = 0; -+ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; -+ /* we've been woken up by a falling edge of the onkey */ -+ -+ /* we can't just setenv(bootdelay,-1) because that would -+ * accidentially become permanent if the user does saveenv */ -+ if (neo1973_911_key_pressed()) -+ nobootdelay = 1; -+ -+ while (1) { -+ u_int8_t int1, oocs; -+ -+ oocs = pcf50606_reg_read(PCF50606_REG_OOCS); -+ if (oocs & PFC50606_OOCS_ONKEY) -+ break; -+ -+ int1 = pcf50606_reg_read(PCF50606_REG_INT1); -+ if (int1 & PCF50606_INT1_SECOND) -+ seconds++; -+ -+ if (seconds >= POWER_KEY_SECONDS) -+ goto continue_boot; -+ } -+ /* Power off if minimum number of seconds not reached */ -+ neo1973_poweroff(); -+ } -+ -+ /* if there's no other reason, must be regular reset */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; -+ -+continue_boot: -+ jbt6k74_init(); -+ jbt6k74_enter_state(JBT_STATE_NORMAL); -+ jbt6k74_display_onoff(1); -+ -+ /* issue a short pulse with the vibrator */ -+ neo1973_vibrator(1); -+ udelay(50000); -+ neo1973_vibrator(0); -+ -+ /* switch on the backlight */ -+ neo1973_backlight(1); -+ -+#if defined(CONFIG_ARCH_GTA01B_v4) -+ { -+ /* check if sd card is inserted, and power-up if it is */ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (!(gpio->GPFDAT & (1 << 5))) -+ gpio->GPBDAT &= ~(1 << 2); -+ } -+#endif -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+u_int32_t get_board_rev(void) -+{ -+#if defined(CONFIG_ARCH_GTA01_v3) -+ return 0x00000130; -+#elif defined(CONFIG_ARCH_GTA01_v4) -+ return 0x00000140; -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+ return 0x00000220; -+#elif defined(CONFIG_ARCH_GTA01B_v3) -+ return 0x00000230; -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ return 0x00000240; -+#endif -+} -+ -+void neo1973_poweroff(void) -+{ -+ serial_printf("poweroff\n"); -+ udc_disconnect(); -+ pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY); -+ /* don't return to caller */ -+ while (1) ; -+} -+ -+void neo1973_backlight(int on) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (on) -+ gpio->GPBDAT |= 0x01; -+ else -+ gpio->GPBDAT &= ~0x01; -+} -+ -+void neo1973_vibrator(int on) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (on) -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPGDAT |= (1 << 11); /* GPG11 */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ gpio->GPBDAT |= (1 << 10); /* GPB10 */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ gpio->GPBDAT |= (1 << 3); /* GPB3 */ -+#endif -+ else -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPGDAT &= ~(1 << 11); /* GPG11 */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ gpio->GPBDAT &= ~(1 << 10); /* GPB10 */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ gpio->GPBDAT &= ~(1 << 3); /* GPB3 */ -+#endif -+} -+ -+int neo1973_911_key_pressed(void) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (gpio->GPFDAT & (1 << 6)) -+ return 0; -+ return 1; -+} -+ -+static const char *chgstate_names[] = { -+ [PCF50606_MBCC1_CHGMOD_QUAL] = "qualification", -+ [PCF50606_MBCC1_CHGMOD_PRE] = "pre", -+ [PCF50606_MBCC1_CHGMOD_TRICKLE] = "trickle", -+ [PCF50606_MBCC1_CHGMOD_FAST_CCCV] = "fast_cccv", -+ [PCF50606_MBCC1_CHGMOD_FAST_NOCC] = "fast_nocc", -+ [PCF50606_MBCC1_CHGMOD_FAST_NOCV] = "fast_nocv", -+ [PCF50606_MBCC1_CHGMOD_FAST_SW] = "fast_switch", -+ [PCF50606_MBCC1_CHGMOD_IDLE] = "idle", -+}; -+ -+const char *neo1973_get_charge_status(void) -+{ -+ u_int8_t mbcc1 = pcf50606_reg_read(PCF50606_REG_MBCC1); -+ u_int8_t chgmod = (mbcc1 & PCF50606_MBCC1_CHGMOD_MASK); -+ return chgstate_names[chgmod]; -+} -+ -+int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd) -+{ -+ switch (cmd) { -+ case NEO1973_CHGCMD_NONE: -+ break; -+ case NEO1973_CHGCMD_AUTOFAST: -+ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, -+ PCF50606_MBCC1_AUTOFST, -+ PCF50606_MBCC1_AUTOFST); -+ break; -+ case NEO1973_CHGCMD_NO_AUTOFAST: -+ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, -+ PCF50606_MBCC1_AUTOFST, 0); -+ break; -+ case NEO1973_CHGCMD_OFF: -+ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, -+ PCF50606_MBCC1_CHGMOD_MASK, -+ PCF50606_MBCC1_CHGMOD_IDLE); -+ break; -+ -+ case NEO1973_CHGCMD_FAST: -+ case NEO1973_CHGCMD_FASTER: -+ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, -+ PCF50606_MBCC1_CHGMOD_MASK, -+ PCF50606_MBCC1_CHGMOD_FAST_CCCV); -+ break; -+ } -+ return 0; -+} -+ -Index: u-boot/board/neo1973/gta01/pcf50606.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/pcf50606.c -@@ -0,0 +1,100 @@ -+ -+#include -+#include -+ -+/* initial register set for PCF50606 in Neo1973 devices */ -+const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { -+ [PCF50606_REG_OOCS] = 0x00, -+ /* gap */ -+ [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, -+ [PCF50606_REG_INT2M] = 0x00, -+ [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, -+ [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | -+ PCF50606_OOCC1_CHGWAK | -+ PCF50606_OOCC1_EXTONWAK_HIGH, -+ [PCF50606_REG_OOCC2] = PCF50606_OOCC2_ONKEYDB_14ms | -+ PCF50606_OOCC2_EXTONDB_14ms, -+ /* gap */ -+ [PCF50606_REG_PSSC] = 0x00, -+ [PCF50606_REG_PWROKM] = 0x00, -+ /* gap */ -+#if defined(CONFIG_ARCH_GTA01B_v2) -+ [PCF50606_REG_DCDC1] = 0x1e, /* GL_3V3: off */ -+#elif defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_DCDC1] = 0x18, /* GL_1V5: off */ -+#endif -+ [PCF50606_REG_DCDC2] = 0x00, -+ [PCF50606_REG_DCDC3] = 0x00, -+ [PCF50606_REG_DCDC4] = 0x30, /* 1.25A */ -+ -+ [PCF50606_REG_DCDEC1] = 0xe8, /* IO_3V3: on */ -+ [PCF50606_REG_DCDEC2] = 0x00, -+ -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ [PCF50606_REG_DCUDC1] = 0xe3, /* CORE_1V8: 1.8V */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ [PCF50606_REG_DCUDC1] = 0xe4, /* CORE_1V8: 2.1V */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_DCUDC1] = 0xc4, /* CORE_1V8: 2.1V if PWREN2 = HIGH */ -+#endif -+ [PCF50606_REG_DCUDC2] = 0x30, /* 1.25A current limit */ -+ -+#if defined(CONFIG_ARCH_GTA01_v3) -+ [PCF50606_REG_IOREGC] = 0x13, /* VTCXO_2V8: off */ -+#elif defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ -+ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) -+ //see internal bug 94 [PCF50606_REG_IOREGC] = 0x18, /* CODEC_3V3: off */ -+ [PCF50606_REG_IOREGC] = 0xf8, /* CODEC_3V3: on */ -+#endif -+ -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ [PCF50606_REG_D1REGC1] = 0x15, /* VRF_3V: off */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ -+ defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_D1REGC1] = 0x16, /* BT_3V15: off */ -+#endif -+ -+#if defined(CONFIG_ARCH_GTA01_v3) -+ [PCF50606_REG_D2REGC1] = 0xf8, /* SD_3V3: on */ -+#elif defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ -+ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_D2REGC1] = 0x10, /* GL_2V5: off */ -+#endif -+ -+#if defined(CONFIG_ARCH_GTA01_v3) -+ [PCF50606_REG_D3REGC1] = 0x18, /* CODEC_3V3: off */ -+#elif defined(CONFIG_ARCH_GTA01_v4) -+ [PCF50606_REG_D3REGC1] = 0x13, /* VTXCO_2V8: off */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ [PCF50606_REG_D3REGC1] = 0x00, /* USER1: off */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_D3REGC1] = 0xec, /* STBY_1V8: 2.1V */ -+#endif -+ -+ [PCF50606_REG_LPREGC1] = 0xf8, /* LCM_3V3: on */ -+ [PCF50606_REG_LPREGC2] = 0x00, -+ -+ [PCF50606_REG_MBCC1] = 0x01, /* CHGAPE */ -+ [PCF50606_REG_MBCC2] = 0x00, /* unlimited charging */ -+ [PCF50606_REG_MBCC3] = 0x1a, /* 0.2*Ifast, 4.20V */ -+ [PCF50606_REG_BBCC] = 0x1f, /* 400uA */ -+ [PCF50606_REG_ADCC1] = 0x00, -+ [PCF50606_REG_ADCC2] = 0x00, -+ /* gap */ -+#if defined(CONFIG_ARCH_GTA01B_v4) -+ [PCF50606_REG_ACDC1] = 0x86, /* ACD thresh 1.6V, enabled */ -+#else -+ [PCF50606_REG_ACDC1] = 0x00, -+#endif -+ [PCF50606_REG_BVMC] = PCF50606_BVMC_THRSHLD_3V3, -+ [PCF50606_REG_PWMC1] = 0x00, -+ [PCF50606_REG_LEDC1] = 0x00, -+ [PCF50606_REG_LEDC2] = 0x00, -+ [PCF50606_REG_GPOC1] = 0x00, -+ [PCF50606_REG_GPOC2] = 0x00, -+ [PCF50606_REG_GPOC3] = 0x00, -+ [PCF50606_REG_GPOC4] = 0x00, -+ [PCF50606_REG_GPOC5] = 0x00, -+}; -+ -+ -Index: u-boot/board/neo1973/gta01/split_by_variant.sh -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/split_by_variant.sh -@@ -0,0 +1,57 @@ -+#!/bin/sh -+# --------------------------------------------------------- -+# Set the core module defines according to Core Module -+# --------------------------------------------------------- -+# --------------------------------------------------------- -+# Set up the GTA01 type define -+# --------------------------------------------------------- -+ -+CFGINC=${obj}include/config.h -+CFGTMP=${obj}board/neo1973/gta01/config.tmp -+ -+mkdir -p ${obj}include -+if [ "$1" == "" ] -+then -+ echo "$0:: No parameters - using GTA01Bv3 config" -+ echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC -+ echo "GTA01_BIG_RAM=y" > $CFGTMP -+else -+ case "$1" in -+ gta01v4_config) -+ echo "#define CONFIG_ARCH_GTA01_v4" > $CFGINC -+ echo "GTA01_BIG_RAM=n" > $CFGTMP -+ ;; -+ -+ gta01v3_config) -+ echo "#define CONFIG_ARCH_GTA01_v3" > $CFGINC -+ echo "GTA01_BIG_RAM=n" > $CFGTMP -+ ;; -+ -+ gta01bv2_config) -+ echo "#define CONFIG_ARCH_GTA01B_v2" > $CFGINC -+ echo "GTA01_BIG_RAM=y" > $CFGTMP -+ ;; -+ -+ gta01bv3_config) -+ echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC -+ echo "GTA01_BIG_RAM=y" > $CFGTMP -+ ;; -+ -+ gta01bv4_config) -+ echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC -+ echo "GTA01_BIG_RAM=y" > $CFGTMP -+ ;; -+ -+ *) -+ echo "$0:: Unrecognised config - using GTA01Bv4 config" -+ echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC -+ echo "GTA01_BIG_RAM=y" > $CFGTMP -+ ;; -+ -+ esac -+ -+fi -+# --------------------------------------------------------- -+# Complete the configuration -+# --------------------------------------------------------- -+$MKCONFIG -a neo1973_gta01 arm arm920t gta01 neo1973 s3c24x0 -Index: u-boot/board/neo1973/gta01/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta01/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/neo1973_gta01.h -@@ -0,0 +1,265 @@ -+/* -+ * (C) Copyright 2006 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * Configuation settings for the FIC Neo1973 GTA01 Linux GSM phone -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if defined(BUILD_FOR_RAM) -+/* If we want to start u-boot from inside RAM */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+#endif -+ -+#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */ -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LAODB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ /* CFG_CMD_USB | */ \ -+ /* CFG_CMD_JFFS2 | */ \ -+ CFG_CMD_DIAG | \ -+ /* CFG_CMD_HWFLOW | */ \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -+#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x34000 0x200000; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#if defined(CONFIG_ARCH_GTA01_v3) -+#define CFG_PROMPT "GTA01v3 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01_v4) -+#define CFG_PROMPT "GTA01v4 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) -+#define CFG_PROMPT "GTA01Bv2 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01B_v3) -+#define CFG_PROMPT "GTA01Bv3 # " /* Monitor Command Prompt */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) -+#define CFG_PROMPT "GTA01Bv4 # " /* Monitor Command Prompt */ -+#endif -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 16 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#if 0 -+#define CONFIG_USB_OHCI 1 -+#endif -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ -+ defined(CONFIG_ARCH_GTA01B_v4) -+#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ -+#else -+#error Please define GTA01 variant -+#endif -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+/* No NOR flash in this device */ -+#define CFG_NO_FLASH 1 -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+/* EXT2 driver */ -+#define CONFIG_EXT2 1 -+ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 0 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+#define CONFIG_JFFS2_NAND_OFF 0x634000 -+#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#endif -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+/* we have a board_late_init() function */ -+#define BOARD_LATE_INIT 1 -+ -+#if 1 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+#define CONFIG_S3C2410_NAND_HWECC 1 -+ -+#define CONFIG_DRIVER_PCF50606 1 -+ -+#endif /* __CONFIG_H */ -Index: u-boot/board/neo1973/common/neo1973.h -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/neo1973.h -@@ -0,0 +1,32 @@ -+#ifndef _NEO1973_H -+#define _NEO1973_H -+ -+enum wakeup_reason { -+ NEO1973_WAKEUP_NONE, -+ NEO1973_WAKEUP_RESET, -+ NEO1973_WAKEUP_POWER_KEY, -+ NEO1973_WAKEUP_CHARGER, -+ NEO1973_WAKEUP_ALARM, -+}; -+ -+enum neo1973_charger_cmd { -+ NEO1973_CHGCMD_NONE, -+ NEO1973_CHGCMD_AUTOFAST, -+ NEO1973_CHGCMD_NO_AUTOFAST, -+ NEO1973_CHGCMD_OFF, -+ NEO1973_CHGCMD_FAST, -+ NEO1973_CHGCMD_FASTER, -+}; -+ -+extern unsigned int neo1973_wakeup_cause; -+ -+void neo1973_poweroff(void); -+void neo1973_backlight(int on); -+void neo1973_vibrator(int on); -+ -+int neo1973_911_key_pressed(void); -+ -+const char *neo1973_get_charge_status(void); -+int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd); -+ -+#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch deleted file mode 100644 index 343598902f..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch +++ /dev/null @@ -1,1233 +0,0 @@ -This patch adds 'board' support for the Armzone QT2410 -development board to u-boot. - -Signed-off-by: Harald Welte - -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2009,6 +2009,9 @@ - sbc2410x_config: unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 - -+qt2410_config : unconfig -+ @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 -+ - scb9328_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx - -Index: u-boot/board/qt2410/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/Makefile -@@ -0,0 +1,47 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := qt2410.o flash.o -+SOBJS := lowlevel_init.o -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -Index: u-boot/board/qt2410/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/config.mk -@@ -0,0 +1,29 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x511d -+CONFIG_USB_DFU_REVISION=0x0100 -+ -+# -+# SMDK2410 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -Index: u-boot/board/qt2410/flash.c -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/flash.c -@@ -0,0 +1,435 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Alex Zuepke -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+ulong myflush (void); -+ -+ -+#define FLASH_BANK_SIZE PHYS_FLASH_SIZE -+#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ -+ -+flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -+ -+ -+#define CMD_READ_ARRAY 0x000000F0 -+#define CMD_UNLOCK1 0x000000AA -+#define CMD_UNLOCK2 0x00000055 -+#define CMD_ERASE_SETUP 0x00000080 -+#define CMD_ERASE_CONFIRM 0x00000030 -+#define CMD_PROGRAM 0x000000A0 -+#define CMD_UNLOCK_BYPASS 0x00000020 -+ -+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) -+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) -+ -+#define BIT_ERASE_DONE 0x00000080 -+#define BIT_RDY_MASK 0x00000080 -+#define BIT_PROGRAM_ERROR 0x00000020 -+#define BIT_TIMEOUT 0x80000000 /* our flag */ -+ -+#define READY 1 -+#define ERR 2 -+#define TMO 4 -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+ulong flash_init (void) -+{ -+ int i, j; -+ ulong size = 0; -+ -+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { -+ ulong flashbase = 0; -+ -+ flash_info[i].flash_id = -+#if defined(CONFIG_AMD_LV400) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV400B & FLASH_TYPEMASK); -+#elif defined(CONFIG_AMD_LV800) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV800B & FLASH_TYPEMASK); -+#else -+#error "Unknown flash configured" -+#endif -+ flash_info[i].size = FLASH_BANK_SIZE; -+ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; -+ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); -+ if (i == 0) -+ flashbase = PHYS_FLASH_1; -+ else -+ panic ("configured too many flash banks!\n"); -+ for (j = 0; j < flash_info[i].sector_count; j++) { -+ if (j <= 3) { -+ /* 1st one is 16 KB */ -+ if (j == 0) { -+ flash_info[i].start[j] = -+ flashbase + 0; -+ } -+ -+ /* 2nd and 3rd are both 8 KB */ -+ if ((j == 1) || (j == 2)) { -+ flash_info[i].start[j] = -+ flashbase + 0x4000 + (j - -+ 1) * -+ 0x2000; -+ } -+ -+ /* 4th 32 KB */ -+ if (j == 3) { -+ flash_info[i].start[j] = -+ flashbase + 0x8000; -+ } -+ } else { -+ flash_info[i].start[j] = -+ flashbase + (j - 3) * MAIN_SECT_SIZE; -+ } -+ } -+ size += flash_info[i].size; -+ } -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_FLASH_BASE, -+ CFG_FLASH_BASE + monitor_flash_len - 1, -+ &flash_info[0]); -+ -+#if 0 -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_ENV_ADDR, -+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); -+#endif -+ -+ return size; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+void flash_print_info (flash_info_t * info) -+{ -+ int i; -+ -+ switch (info->flash_id & FLASH_VENDMASK) { -+ case (AMD_MANUFACT & FLASH_VENDMASK): -+ printf ("AMD: "); -+ break; -+ default: -+ printf ("Unknown Vendor "); -+ break; -+ } -+ -+ switch (info->flash_id & FLASH_TYPEMASK) { -+ case (AMD_ID_LV400B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV400BB (4Mbit)\n"); -+ break; -+ case (AMD_ID_LV800B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV800BB (8Mbit)\n"); -+ break; -+ default: -+ printf ("Unknown Chip Type\n"); -+ goto Done; -+ break; -+ } -+ -+ printf (" Size: %ld MB in %d Sectors\n", -+ info->size >> 20, info->sector_count); -+ -+ printf (" Sector Start Addresses:"); -+ for (i = 0; i < info->sector_count; i++) { -+ if ((i % 5) == 0) { -+ printf ("\n "); -+ } -+ printf (" %08lX%s", info->start[i], -+ info->protect[i] ? " (RO)" : " "); -+ } -+ printf ("\n"); -+ -+ Done:; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+int flash_erase (flash_info_t * info, int s_first, int s_last) -+{ -+ ushort result; -+ int iflag, cflag, prot, sect; -+ int rc = ERR_OK; -+ int chip; -+ -+ /* first look for protection bits */ -+ -+ if (info->flash_id == FLASH_UNKNOWN) -+ return ERR_UNKNOWN_FLASH_TYPE; -+ -+ if ((s_first < 0) || (s_first > s_last)) { -+ return ERR_INVAL; -+ } -+ -+ if ((info->flash_id & FLASH_VENDMASK) != -+ (AMD_MANUFACT & FLASH_VENDMASK)) { -+ return ERR_UNKNOWN_FLASH_VENDOR; -+ } -+ -+ prot = 0; -+ for (sect = s_first; sect <= s_last; ++sect) { -+ if (info->protect[sect]) { -+ prot++; -+ } -+ } -+ if (prot) -+ return ERR_PROTECTED; -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ /* Start erase on unprotected sectors */ -+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { -+ printf ("Erasing sector %2d ... ", sect); -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ if (info->protect[sect] == 0) { /* not protected */ -+ vu_short *addr = (vu_short *) (info->start[sect]); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ *addr = CMD_ERASE_CONFIRM; -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > -+ CFG_FLASH_ERASE_TOUT) { -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ chip = TMO; -+ break; -+ } -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_ERASE_DONE) -+ chip = READY; -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) -+ chip = ERR; -+ -+ } while (!chip); -+ -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ -+ if (chip == ERR) { -+ rc = ERR_PROG_ERROR; -+ goto outahere; -+ } -+ if (chip == TMO) { -+ rc = ERR_TIMOUT; -+ goto outahere; -+ } -+ -+ printf ("ok.\n"); -+ } else { /* it was protected */ -+ -+ printf ("protected!\n"); -+ } -+ } -+ -+ if (ctrlc ()) -+ printf ("User Interrupt!\n"); -+ -+ outahere: -+ /* allow flash to settle - wait 10 ms */ -+ udelay_masked (10000); -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash -+ */ -+ -+volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) -+{ -+ vu_short *addr = (vu_short *) dest; -+ ushort result; -+ int rc = ERR_OK; -+ int cflag, iflag; -+ int chip; -+ -+ /* -+ * Check if Flash is (sufficiently) erased -+ */ -+ result = *addr; -+ if ((result & data) != data) -+ return ERR_NOT_ERASED; -+ -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; -+ *addr = CMD_PROGRAM; -+ *addr = data; -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { -+ chip = ERR | TMO; -+ break; -+ } -+ if (!chip && ((result & 0x80) == (data & 0x80))) -+ chip = READY; -+ -+ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { -+ result = *addr; -+ -+ if ((result & 0x80) == (data & 0x80)) -+ chip = READY; -+ else -+ chip = ERR; -+ } -+ -+ } while (!chip); -+ -+ *addr = CMD_READ_ARRAY; -+ -+ if (chip == ERR || *addr != data) -+ rc = ERR_PROG_ERROR; -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash. -+ */ -+ -+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -+{ -+ ulong cp, wp; -+ int l; -+ int i, rc; -+ ushort data; -+ -+ wp = (addr & ~1); /* get lower word aligned address */ -+ -+ /* -+ * handle unaligned start bytes -+ */ -+ if ((l = addr - wp) != 0) { -+ data = 0; -+ for (i = 0, cp = wp; i < l; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ for (; i < 2 && cnt > 0; ++i) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ ++cp; -+ } -+ for (; cnt == 0 && i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ wp += 2; -+ } -+ -+ /* -+ * handle word aligned part -+ */ -+ while (cnt >= 2) { -+ data = *((vu_short *) src); -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ src += 2; -+ wp += 2; -+ cnt -= 2; -+ } -+ -+ if (cnt == 0) { -+ return ERR_OK; -+ } -+ -+ /* -+ * handle unaligned tail bytes -+ */ -+ data = 0; -+ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ } -+ for (; i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ return write_hword (info, wp, data); -+} -Index: u-boot/board/qt2410/lowlevel_init.S -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/lowlevel_init.S -@@ -0,0 +1,171 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the Samsung SMDK2410 by -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ adr r0, SMRDATA -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0xb2 -+ .word 0x30 -+ .word 0x30 -Index: u-boot/board/qt2410/qt2410.c -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/qt2410.c -@@ -0,0 +1,152 @@ -+/* -+ * (C) 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if 1 -+//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ -+//#define M_PDIV 0x3 -+//#define M_SDIV 0x1 -+#define M_MDIV 0x90 /* Fout = 202.8MHz */ -+#define M_PDIV 0x7 -+#define M_SDIV 0x0 -+#else -+#define M_MDIV 0x5c /* Fout = 150.0MHz */ -+#define M_PDIV 0x4 -+#define M_SDIV 0x0 -+#endif -+ -+#if 1 -+#define U_M_MDIV 0x78 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x3 -+#else -+#define U_M_MDIV 0x48 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x00044555; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFF95FFBA; -+ //gpio->GPGUP = 0x0000FFFF; -+ gpio->GPGUP = 0x0000AFEF; -+ gpio->GPHCON = 0x0028FAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_QT2410; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+#if defined(CONFIG_USB_DEVICE) -+void udc_ctrl(enum usbd_event event, int param) -+{ -+} -+#endif -+ -+void board_video_init(GraphicDevice *pGD) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ -+ /* FIXME: select LCM type by env variable */ -+ -+ /* Configuration for GTA01 LCM on QT2410 */ -+ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */ -+ -+ lcd->LCDCON2 = 0x019fc3c1; -+ lcd->LCDCON3 = 0x0039df67; -+ lcd->LCDCON4 = 0x00000007; -+ lcd->LCDCON5 = 0x0001cf09; -+ lcd->LPCSEL = 0x00000000; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -Index: u-boot/board/qt2410/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/qt2410/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/include/configs/qt2410.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/qt2410.h -@@ -0,0 +1,287 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * Gary Jennejohn -+ * David Mueller -+ * -+ * Configuation settings for the Armzone QT2410 board. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if 0 -+/* If we want to start u-boot from usb bootloader in NOR flash */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* If we want to start u-boot directly from within NAND flash */ -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+#endif -+ -+#define CFG_UBOOT_SIZE 0x40000 -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+#if 0 -+#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -+#define CS8900_BASE 0x19000300 -+#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -+#endif -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ -+#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LOADB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ CFG_CMD_BMP | \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ /* CFG_CMD_USB | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_DIAG | \ -+ CFG_CMD_HWFLOW | \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+ -+#if 0 -+ CFG_CMD_DHCP | \ -+ CFG_CMD_PING | \ -+ CFG_CMD_NET | \ -+ -+#endif -+ -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" -+#define CONFIG_ETHADDR 01:ab:cd:ef:fe:dc -+#define CONFIG_NETMASK 255.255.255.0 -+#define CONFIG_IPADDR 10.0.0.110 -+#define CONFIG_SERVERIP 10.0.0.1 -+/*#define CONFIG_BOOTFILE "elinos-lart" */ -+#define CONFIG_BOOTCOMMAND "nand load 0x32000000 0x34000 0x200000; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 64 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x511d /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "Armzone" -+#define CONFIG_USBD_PRODUCT_NAME "QT2410 Bootloader " U_BOOT_VERSION -+#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 0x4000 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -+ -+#define CFG_FLASH_BASE PHYS_FLASH_1 -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -+ -+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -+#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -+#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -+ -+/* timeout values are in ticks */ -+#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -+#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+#define CONFIG_EXT2 1 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 1 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_SPLASH_SCREEN -+#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ -+#define CONFIG_VIDEO_BMP_GZIP -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+#define CONFIG_UNZIP -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+ -+#define MTDIDS_DEFAULT "nand0=qt2410-nand" -+#define MTPARTS_DEFAULT "qt2410-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)" -+ -+#endif /* __CONFIG_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch deleted file mode 100644 index b39a268c84..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch +++ /dev/null @@ -1,56 +0,0 @@ -This patch adds a IRQ demultiplexer callback to the arm920 cpu core code, -plus a stub implementation of it for the S3C2410. - -Index: u-boot.git/cpu/arm920t/interrupts.c -=================================================================== ---- u-boot.git.orig/cpu/arm920t/interrupts.c 2007-02-05 22:49:11.000000000 +0100 -+++ u-boot.git/cpu/arm920t/interrupts.c 2007-02-05 23:19:01.000000000 +0100 -@@ -161,11 +161,16 @@ - - void do_irq (struct pt_regs *pt_regs) - { --#if defined (CONFIG_USE_IRQ) && defined (CONFIG_ARCH_INTEGRATOR) -+#if defined (CONFIG_USE_IRQ) -+#if defined (ARM920_IRQ_CALLBACK) -+ ARM920_IRQ_CALLBACK(); -+ return; -+#elif defined (CONFIG_ARCH_INTEGRATOR) - /* ASSUMED to be a timer interrupt */ - /* Just clear it - count handled in */ - /* integratorap.c */ - *(volatile ulong *)(CFG_TIMERBASE + 0x0C) = 0; -+#endif /* ARCH_INTEGRATOR */ - #else - printf ("interrupt request\n"); - show_regs (pt_regs); -Index: u-boot.git/cpu/arm920t/s3c24x0/interrupts.c -=================================================================== ---- u-boot.git.orig/cpu/arm920t/s3c24x0/interrupts.c 2007-02-05 22:49:11.000000000 +0100 -+++ u-boot.git/cpu/arm920t/s3c24x0/interrupts.c 2007-02-05 23:21:35.000000000 +0100 -@@ -216,4 +216,13 @@ - /*NOTREACHED*/ - } - -+#ifdef CONFIG_USE_IRQ -+void s3c2410_irq(void) -+{ -+ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); -+ u_int32_t intpnd = irq->INTPND; -+ -+} -+#endif /* USE_IRQ */ -+ - #endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ -Index: u-boot.git/include/common.h -=================================================================== ---- u-boot.git.orig/include/common.h 2007-02-05 22:49:11.000000000 +0100 -+++ u-boot.git/include/common.h 2007-02-05 23:19:01.000000000 +0100 -@@ -452,6 +452,8 @@ - ulong get_PCI_freq (void); - #endif - #if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X) -+void s3c2410_irq(void); -+#define ARM920_IRQ_CALLBACK s3c2410_irq - ulong get_FCLK (void); - ulong get_HCLK (void); - ulong get_PCLK (void); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch deleted file mode 100644 index b3d7bc1166..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch +++ /dev/null @@ -1,28 +0,0 @@ -This patch allows us to use the 'gd' pointer (and thus environment -and everything else associated with it) from interrupt context on -arm920t. - -Signed-off-by: Harald Welte - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S 2007-02-24 02:35:38.000000000 +0100 -+++ u-boot/cpu/arm920t/start.S 2007-02-24 02:36:01.000000000 +0100 -@@ -474,12 +474,12 @@ - .macro irq_save_user_regs - sub sp, sp, #S_FRAME_SIZE - stmia sp, {r0 - r12} @ Calling r0-r12 -- add r8, sp, #S_PC -- stmdb r8, {sp, lr}^ @ Calling SP, LR -- str lr, [r8, #0] @ Save calling PC -+ add r7, sp, #S_PC -+ stmdb r7, {sp, lr}^ @ Calling SP, LR -+ str lr, [r7, #0] @ Save calling PC - mrs r6, spsr -- str r6, [r8, #4] @ Save CPSR -- str r0, [r8, #8] @ Save OLD_R0 -+ str r6, [r7, #4] @ Save CPSR -+ str r0, [r7, #8] @ Save OLD_R0 - mov r0, sp - .endm - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch deleted file mode 100644 index 9b1febe956..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch +++ /dev/null @@ -1,43 +0,0 @@ -This patch makes the u-boot NAND BBT code a bit more quiet - -Signed-off-by: Harald Welte - -Index: u-boot/drivers/nand/nand_bbt.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:54:02.000000000 +0100 -+++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:54:05.000000000 +0100 -@@ -157,10 +157,6 @@ - this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); - continue; - } -- /* Leave it for now, if its matured we can move this -- * message to MTD_DEBUG_LEVEL0 */ -- printk (KERN_DEBUG "nand_read_bbt: Bad block at 0x%08x\n", -- ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); - /* Factory marked bad or worn out ? */ - if (tmp == 0) - this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); -@@ -229,14 +225,12 @@ - if (td->options & NAND_BBT_VERSION) { - nand_read_raw (mtd, buf, td->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); - td->version[0] = buf[mtd->oobblock + td->veroffs]; -- printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", td->pages[0], td->version[0]); - } - - /* Read the mirror version, if available */ - if (md && (md->options & NAND_BBT_VERSION)) { - nand_read_raw (mtd, buf, md->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); - md->version[0] = buf[mtd->oobblock + md->veroffs]; -- printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", md->pages[0], md->version[0]); - } - - return 1; -@@ -374,8 +368,6 @@ - for (i = 0; i < chips; i++) { - if (td->pages[i] == -1) - printk (KERN_WARNING "Bad block table not found for chip %d\n", i); -- else -- printk (KERN_DEBUG "Bad block table found at page %d, version 0x%02X\n", td->pages[i], td->version[i]); - } - return 0; - } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch deleted file mode 100644 index 993ef4f6f2..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch +++ /dev/null @@ -1,175 +0,0 @@ -This patch adds a new 's3c2410' command which currently supports 's3c2410 speed -{set,get,list} and thus allows dynamic change of the CPU clock. - -Signed-off-by: Harald Welte - -Index: u-boot/cpu/arm920t/s3c24x0/Makefile -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-24 15:14:00.000000000 +0100 -+++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-02-24 15:21:02.000000000 +0100 -@@ -26,7 +26,7 @@ - LIB = $(obj)lib$(SOC).a - - COBJS = i2c.o interrupts.o serial.o speed.o \ -- usb_ohci.o nand_read.o nand.o -+ usb_ohci.o nand_read.o nand.o cmd_s3c2410.o - - SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -Index: u-boot/cpu/arm920t/s3c24x0/cmd_s3c2410.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ u-boot/cpu/arm920t/s3c24x0/cmd_s3c2410.c 2007-02-24 15:22:17.000000000 +0100 -@@ -0,0 +1,152 @@ -+/* -+ * (C) Copyright 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+/* -+ * Boot support -+ */ -+#include -+#include -+#include /* for print_IPaddr */ -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#if (CONFIG_COMMANDS & CFG_CMD_BDI) -+ -+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -+#define MHZ 1000000 -+ -+static void print_cpu_speed(void) -+{ -+ printf("FCLK = %u MHz, HCLK = %u MHz, PCLK = %u MHz\n", -+ get_FCLK()/MHZ, get_HCLK()/MHZ, get_PCLK()/MHZ); -+} -+ -+struct s3c2410_pll_speed { -+ u_int16_t mhz; -+ u_int32_t mpllcon; -+ u_int32_t clkdivn; -+}; -+ -+#define CLKDIVN_1_1_1 0x00 -+#define CLKDIVN_1_2_2 0x02 -+#define CLKDIVN_1_2_4 0x03 -+#define CLKDIVN_1_4_4 0x04 -+ -+static const struct s3c2410_pll_speed pll_configs[] = { -+ { -+ .mhz = 50, -+ .mpllcon = ((0x5c << 12) + (0x4 << 4) + 0x2), -+ .clkdivn = CLKDIVN_1_1_1, -+ }, -+ { -+ .mhz = 101, -+ .mpllcon = ((0x7f << 12) + (0x2 << 4) + 0x2), -+ .clkdivn = CLKDIVN_1_2_2, -+ }, -+ { -+ .mhz = 202, -+ .mpllcon = ((0x90 << 12) + (0x7 << 4) + 0x0), -+ .clkdivn = CLKDIVN_1_2_4, -+ }, -+ { -+ .mhz = 266, -+ .mpllcon = ((0x7d << 12) + (0x1 << 4) + 0x1), -+ .clkdivn = CLKDIVN_1_2_4, -+ }, -+}; -+ -+static void list_cpu_speeds(void) -+{ -+ int i; -+ for (i = 0; i < ARRAY_SIZE(pll_configs); i++) -+ printf("%u MHz\n", pll_configs[i].mhz); -+} -+ -+static int reconfig_mpll(u_int16_t mhz) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(pll_configs); i++) { -+ if (pll_configs[i].mhz == mhz) { -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = pll_configs[i].mpllcon; -+ clk_power->UPLLCON = ((0x78 << 12) + (0x2 << 4) + 0x3), -+ clk_power->CLKDIVN = pll_configs[i].clkdivn; -+ -+ /* If we changed the speed, we need to re-configure -+ * the serial baud rate generator */ -+ serial_setbrg(); -+ return 0; -+ } -+ } -+ return -1; -+} -+ -+int do_s3c2410 ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ if (!strcmp(argv[1], "speed")) { -+ if (argc < 2) -+ goto out_help; -+ if (!strcmp(argv[2], "get")) -+ print_cpu_speed(); -+ else if (!strcmp(argv[2], "list")) -+ list_cpu_speeds(); -+ else if (!strcmp(argv[2], "set")) { -+ unsigned long mhz; -+ if (argc < 3) -+ goto out_help; -+ -+ mhz = simple_strtoul(argv[3], NULL, 10); -+ -+ if (reconfig_mpll(mhz) < 0) -+ printf("error, speed %uMHz unknown\n", mhz); -+ else -+ print_cpu_speed(); -+ } else -+ goto out_help; -+ } else { -+out_help: -+ printf("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+/* -------------------------------------------------------------------- */ -+ -+ -+U_BOOT_CMD( -+ s3c2410, 4, 1, do_s3c2410, -+ "s3c2410 - SoC specific commands\n", -+ "speed get - display current PLL speed config\n" -+ "s3c2410 speed list - display supporte PLL speed configs\n" -+ "s3c2410 speed set - set PLL speed\n" -+); -+ -+#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch deleted file mode 100644 index 349b83697e..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch +++ /dev/null @@ -1,41 +0,0 @@ -Fix building with CRAMFS but not JFFS2 support - -Signed-off-by: Harald Welte - -Index: u-boot/fs/cramfs/cramfs.c -=================================================================== ---- u-boot.orig/fs/cramfs/cramfs.c 2007-02-17 11:46:26.000000000 +0100 -+++ u-boot/fs/cramfs/cramfs.c 2007-02-17 11:54:36.000000000 +0100 -@@ -27,7 +27,7 @@ - #include - #include - --#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) -+#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS) - - #include - #include -Index: u-boot/common/cmd_jffs2.c -=================================================================== ---- u-boot.orig/common/cmd_jffs2.c 2007-02-17 11:47:51.000000000 +0100 -+++ u-boot/common/cmd_jffs2.c 2007-02-17 14:08:25.000000000 +0100 -@@ -170,10 +170,19 @@ - static struct mtd_device *current_dev = NULL; - static u8 current_partnum = 0; - -+#ifdef CFG_CMD_CRAMFS - extern int cramfs_check (struct part_info *info); - extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename); - extern int cramfs_ls (struct part_info *info, char *filename); - extern int cramfs_info (struct part_info *info); -+#else -+/* defining empty macros for function names is ugly but avoids ifdef clutter -+ * all over the code */ -+#define cramfs_check(x) (0) -+#define cramfs_load(x,y,z) (-1) -+#define cramfs_ls(x,y) (0) -+#define cramfs_info(x) (0) -+#endif - - static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num); - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch deleted file mode 100644 index 1122f4894f..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch +++ /dev/null @@ -1,2081 +0,0 @@ -Index: u-boot/drivers/usbdcore_ep0.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_ep0.c -+++ u-boot/drivers/usbdcore_ep0.c -@@ -42,10 +42,15 @@ - */ - - #include -+DECLARE_GLOBAL_DATA_PTR; - - #if defined(CONFIG_USB_DEVICE) - #include "usbdcore.h" - -+#ifdef CONFIG_USBD_DFU -+#include -+#endif -+ - #if 0 - #define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args) - #else -@@ -213,7 +218,7 @@ - urb->buffer = device_descriptor; - urb->actual_length = MIN(sizeof(*device_descriptor), max); - } -- /*dbg_ep0(3, "copied device configuration, actual_length: %x", urb->actual_length); */ -+ dbg_ep0(3, "using device configuration, actual_length: %x", urb->actual_length); - break; - - case USB_DESCRIPTOR_TYPE_CONFIGURATION: -@@ -267,7 +272,24 @@ - return -1; - case USB_DESCRIPTOR_TYPE_ENDPOINT: - return -1; -+ /* This really means "Class Specific Descriptor #1 == USB_DT_DFU */ - case USB_DESCRIPTOR_TYPE_HID: -+#ifdef CONFIG_USBD_DFU -+ { -+ int bNumInterface = -+ le16_to_cpu(urb->device_request.wIndex); -+ -+ /* In runtime mode, we only respond to the DFU INTERFACE, -+ * whereas in DFU mode, we respond for all intrfaces */ -+ if (device->dfu_state != DFU_STATE_appIDLE && -+ device->dfu_state != DFU_STATE_appDETACH || -+ bNumInterface == CONFIG_USBD_DFU_INTERFACE) { -+ urb->buffer = &device->dfu_cfg_desc->func_dfu; -+ urb->actual_length = sizeof(struct usb_dfu_func_descriptor); -+ } else -+ return -1; -+ } -+#else /* CONFIG_USBD_DFU */ - { - return -1; /* unsupported at this time */ - #if 0 -@@ -294,6 +316,7 @@ - max); - #endif - } -+#endif /* CONFIG_USBD_DFU */ - break; - case USB_DESCRIPTOR_TYPE_REPORT: - { -@@ -388,6 +411,24 @@ - le16_to_cpu (request->wLength), - USBD_DEVICE_REQUESTS (request->bRequest)); - -+#ifdef CONFIG_USBD_DFU -+ if ((request->bmRequestType & 0x3f) == USB_TYPE_DFU && -+ (device->dfu_state != DFU_STATE_appIDLE || -+ le16_to_cpu(request->wIndex) == CONFIG_USBD_DFU_INTERFACE)) { -+ int rc = dfu_ep0_handler(urb); -+ switch (rc) { -+ case DFU_EP0_NONE: -+ case DFU_EP0_UNHANDLED: -+ break; -+ case DFU_EP0_ZLP: -+ case DFU_EP0_DATA: -+ return 0; -+ case DFU_EP0_STALL: -+ return -1; -+ } -+ } -+#endif /* CONFIG_USB_DFU */ -+ - /* handle USB Standard Request (c.f. USB Spec table 9-2) */ - if ((request->bmRequestType & USB_REQ_TYPE_MASK) != 0) { - if (device->device_state <= STATE_CONFIGURED) -@@ -570,7 +611,8 @@ - device->interface = le16_to_cpu (request->wIndex); - device->alternate = le16_to_cpu (request->wValue); - /*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ -- serial_printf ("DEVICE_SET_INTERFACE.. event?\n"); -+ usbd_device_event_irq(device, DEVICE_SET_INTERFACE, -+ (request->wIndex << 16 | request->wValue)); - return 0; - - case USB_REQ_GET_STATUS: -Index: u-boot/drivers/usbdfu.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/usbdfu.c -@@ -0,0 +1,1069 @@ -+/* -+ * (C) 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on existing SAM7DFU code from OpenPCD: -+ * (C) Copyright 2006 by Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ * -+ * TODO: -+ * - make NAND support reasonably self-contained and put in apropriate -+ * ifdefs -+ * - add some means of synchronization, i.e. block commandline access -+ * while DFU transfer is in progress, and return to commandline once -+ * we're finished -+ * - add VERIFY support after writing to flash -+ * - sanely free() resources allocated during first uppload/download -+ * request when aborting -+ * - sanely free resources when another alternate interface is selected -+ * -+ * Maybe: -+ * - add something like uImage or some other header that provides CRC -+ * checking? -+ * - make 'dnstate' attached to 'struct usb_device_instance' -+ */ -+ -+#include -+#if defined(CONFIG_USBD_DFU) -+ -+#include -+DECLARE_GLOBAL_DATA_PTR; -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+int mtdparts_init(void); -+extern struct list_head devices; -+ -+#include "usbdcore_s3c2410.h" -+#include "usbtty.h" /* for STR_* defs */ -+ -+#define RET_NOTHING 0 -+#define RET_ZLP 1 -+#define RET_STALL 2 -+ -+volatile enum dfu_state *system_dfu_state; /* for 3rd parties */ -+ -+ -+struct dnload_state { -+ nand_info_t *nand; -+ struct part_info *part; -+ unsigned int part_net_size; /* net sizee (excl. bad blocks) of part */ -+ -+ nand_erase_options_t erase_opts; -+ nand_write_options_t write_opts; -+ nand_read_options_t read_opts; -+ -+ unsigned char *ptr; /* pointer to next empty byte in buffer */ -+ unsigned int off; /* offset of current erase page in flash chip */ -+ unsigned char *buf; /* pointer to allocated erase page buffer */ -+ -+ /* unless doing an atomic transfer, we use the static buffer below. -+ * This saves us from having to clean up dynamic allications in the -+ * various error paths of the code. Also, it will always work, no -+ * matter what the memory situation is. */ -+ unsigned char _buf[0x20000]; /* FIXME: depends flash page size */ -+}; -+ -+static struct dnload_state _dnstate; -+ -+static int dfu_trailer_matching(const struct uboot_dfu_trailer *trailer) -+{ -+ if (trailer->magic != UBOOT_DFU_TRAILER_MAGIC || -+ trailer->version != UBOOT_DFU_TRAILER_V1 || -+ trailer->vendor != CONFIG_USBD_VENDORID || -+ (trailer->product != CONFIG_USBD_PRODUCTID_CDCACM && -+ trailer->product != CONFIG_USBD_PRODUCTID_GSERIAL)) -+ return 0; -+#ifdef CONFIG_REVISION_TAG -+ if (trailer->revision != get_board_rev()) -+ return 0; -+#endif -+ -+ return 1; -+} -+ -+static struct part_info *get_partition_nand(int idx) -+{ -+ struct mtd_device *dev; -+ struct part_info *part; -+ struct list_head *pentry; -+ int i; -+ -+ if (mtdparts_init()) -+ return NULL; -+ if (list_empty(&devices)) -+ return NULL; -+ -+ dev = list_entry(devices.next, struct mtd_device, link); -+ i = 0; -+ list_for_each(pentry, &dev->parts) { -+ if (i == idx) { -+ part = list_entry(pentry, struct part_info, link); -+ return part; -+ } -+ i++; -+ } -+ -+ return NULL; -+} -+ -+#define LOAD_ADDR ((unsigned char *)0x32000000) -+ -+static int initialize_ds_nand(struct usb_device_instance *dev, struct dnload_state *ds) -+{ -+ ds->part = get_partition_nand(dev->alternate - 1); -+ if (!ds->part) { -+ printf("DFU: unable to find partition %u\b", dev->alternate-1); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ ds->nand = &nand_info[ds->part->dev->id->num]; -+ ds->off = ds->part->offset; -+ ds->part_net_size = nand_net_part_size(ds->part); -+ -+ if (ds->nand->erasesize > sizeof(ds->_buf)) { -+ printf("*** Warning - NAND ERASESIZE bigger than static buffer\n"); -+ ds->buf = malloc(ds->nand->erasesize); -+ if (!ds->buf) { -+ printf("DFU: can't allocate %u bytes\n", ds->nand->erasesize); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ } else -+ ds->buf = ds->_buf; -+ -+ ds->ptr = ds->buf; -+ -+ memset(&ds->read_opts, 0, sizeof(ds->read_opts)); -+ -+ memset(&ds->erase_opts, 0, sizeof(ds->erase_opts)); -+ ds->erase_opts.quiet = 1; -+ /* FIXME: do this more dynamic */ -+ if (!strcmp(ds->part->name, "rootfs")) -+ ds->erase_opts.jffs2 = 1; -+ -+ memset(&ds->write_opts, 0, sizeof(ds->write_opts)); -+ ds->write_opts.pad = 1; -+ ds->write_opts.blockalign = 1; -+ ds->write_opts.quiet = 1; -+ -+ debug("initialize_ds_nand(dev=%p, ds=%p): ", dev, ds); -+ debug("nand=%p, ptr=%p, buf=%p, off=0x%x\n", ds->nand, ds->ptr, ds->buf, ds->off); -+ -+ return RET_NOTHING; -+} -+ -+static int erase_flash_verify_nand(struct urb *urb, struct dnload_state *ds, -+ unsigned long erasesize, unsigned long size) -+{ -+ struct usb_device_instance *dev = urb->device; -+ int rc; -+ -+ debug("erase_flash_verify_nand(urb=%p, ds=%p, erase=0x%x size=0x%x)\n", -+ urb, ds, erasesize, size); -+ -+ if (erasesize == ds->nand->erasesize) { -+ /* we're only writing a single block and need to -+ * do bad block skipping / offset adjustments our own */ -+ while (ds->nand->block_isbad(ds->nand, ds->off)) { -+ debug("SKIP_ONE_BLOCK(0x%08x)!!\n", ds->off); -+ ds->off += ds->nand->erasesize; -+ } -+ } -+ -+ /* we have finished one eraseblock, flash it */ -+ ds->erase_opts.offset = ds->off; -+ ds->erase_opts.length = erasesize; -+ debug("Erasing 0x%x bytes @ offset 0x%x (jffs=%u)\n", -+ ds->erase_opts.length, ds->erase_opts.offset, -+ ds->erase_opts.jffs2); -+ rc = nand_erase_opts(ds->nand, &ds->erase_opts); -+ if (rc) { -+ debug("Error erasing\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errERASE; -+ return RET_STALL; -+ } -+ -+ ds->write_opts.buffer = ds->buf; -+ ds->write_opts.length = size; -+ ds->write_opts.offset = ds->off; -+ debug("Writing 0x%x bytes @ offset 0x%x\n", size, ds->off); -+ rc = nand_write_opts(ds->nand, &ds->write_opts); -+ if (rc) { -+ debug("Error writing\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errWRITE; -+ return RET_STALL; -+ } -+ -+ ds->off += size; -+ ds->ptr = ds->buf; -+ -+ /* FIXME: implement verify! */ -+ return RET_NOTHING; -+} -+ -+static int erase_tail_clean_nand(struct urb *urb, struct dnload_state *ds) -+{ -+ struct usb_device_instance *dev = urb->device; -+ int rc; -+ -+ ds->erase_opts.offset = ds->off; -+ ds->erase_opts.length = ds->part->size-ds->off; -+ debug("Erasing 0x%x bytes @ offset 0x%x (jffs=%u)\n", -+ ds->erase_opts.length, ds->erase_opts.offset, -+ ds->erase_opts.jffs2); -+ rc = nand_erase_opts(ds->nand, &ds->erase_opts); -+ if (rc) { -+ debug("Error erasing\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errERASE; -+ return RET_STALL; -+ } -+ -+ ds->off += ds->part->size; /* for consistency */ -+ -+ return RET_NOTHING; -+} -+ -+/* Read the next erase blcok from NAND into buffer */ -+static int read_next_nand(struct urb *urb, struct dnload_state *ds) -+{ -+ struct usb_device_instance *dev = urb->device; -+ int rc; -+ -+ ds->read_opts.buffer = ds->buf; -+ ds->read_opts.length = ds->nand->erasesize; -+ ds->read_opts.offset = ds->off; -+ ds->read_opts.quiet = 1; -+ -+ debug("Reading 0x%x@0x%x to 0x%08p\n", ds->nand->erasesize, -+ ds->off, ds->buf); -+ rc = nand_read_opts(ds->nand, &ds->read_opts); -+ if (rc) { -+ debug("Error reading\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errWRITE; -+ return RET_STALL; -+ } -+ ds->off += ds->nand->erasesize; -+ ds->ptr = ds->buf; -+ -+ return RET_NOTHING; -+} -+ -+ -+static int handle_dnload(struct urb *urb, u_int16_t val, u_int16_t len, int first) -+{ -+ struct usb_device_instance *dev = urb->device; -+ struct dnload_state *ds = &_dnstate; -+ unsigned int actual_len = len; -+ unsigned int remain_len; -+ unsigned long size; -+ int rc; -+ -+ debug("download(len=%u, first=%u) ", len, first); -+ -+ if (len > CONFIG_USBD_DFU_XFER_SIZE) { -+ /* Too big. Not that we'd really care, but it's a -+ * DFU protocol violation */ -+ debug("length exceeds flash page size "); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ -+ if (first) { -+ /* Make sure that we have a valid mtd partition table */ -+ char *mtdp = getenv("mtdparts"); -+ if (!mtdp) -+ run_command("dynpart", 0); -+ } -+ -+ if (len == 0) { -+ debug("zero-size write -> MANIFEST_SYNC "); -+ dev->dfu_state = DFU_STATE_dfuMANIFEST_SYNC; -+ -+ /* cleanup */ -+ switch (dev->alternate) { -+ char buf[12]; -+ case 0: -+ sprintf(buf, "%lx", ds->ptr - ds->buf); -+ setenv("filesize", buf); -+ ds->ptr = ds->buf; -+ break; -+ case 1: -+ if (ds->ptr > -+ ds->buf + sizeof(struct uboot_dfu_trailer)) { -+ struct uboot_dfu_trailer trailer; -+ dfu_trailer_mirror(&trailer, ds->ptr); -+ if (!dfu_trailer_matching(&trailer)) { -+ printf("DFU TRAILER NOT OK\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errTARGET; -+ return RET_STALL; -+ } -+ -+ rc = erase_flash_verify_nand(urb, ds, -+ ds->part->size, -+ ds->part_net_size); -+ /* re-write dynenv marker in OOB */ -+ run_command("dynenv set u-boot_env", 0); -+ } -+ ds->nand = NULL; -+ free(ds->buf); -+ ds->ptr = ds->buf = ds->_buf; -+ break; -+ default: -+ rc = 0; -+ if (ds->ptr > ds->buf) -+ rc = erase_flash_verify_nand(urb, ds, -+ ds->nand->erasesize, -+ ds->nand->erasesize); -+ /* rootfs partition */ -+ if (!rc && dev->alternate == 5) -+ rc = erase_tail_clean_nand(urb, ds); -+ -+ ds->nand = NULL; -+ break; -+ } -+ -+ return RET_ZLP; -+ } -+ -+ if (urb->actual_length != len) { -+ debug("urb->actual_length(%u) != len(%u) ?!? ", -+ urb->actual_length, len); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ -+ if (first && ds->buf && ds->buf != ds->_buf && ds->buf != LOAD_ADDR) { -+ free(ds->buf); -+ ds->buf = ds->_buf; -+ } -+ -+ switch (dev->alternate) { -+ case 0: -+ if (first) { -+ printf("Starting DFU DOWNLOAD to RAM (0x%08p)\n", -+ LOAD_ADDR); -+ ds->buf = LOAD_ADDR; -+ ds->ptr = ds->buf; -+ } -+ -+ memcpy(ds->ptr, urb->buffer, len); -+ ds->ptr += len; -+ break; -+ case 1: -+ if (first) { -+ rc = initialize_ds_nand(dev, ds); -+ if (rc) -+ return rc; -+ ds->buf = malloc(ds->part_net_size); -+ if (!ds->buf) { -+ printf("No memory for atomic buffer!!\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errUNKNOWN; -+ return RET_STALL; -+ } -+ ds->ptr = ds->buf; -+ printf("Starting Atomic DFU DOWNLOAD to partition '%s'\n", -+ ds->part->name); -+ } -+ -+ remain_len = (ds->buf + ds->part_net_size) - ds->ptr; -+ if (remain_len < len) { -+ len = remain_len; -+ printf("End of write exceeds partition end\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ memcpy(ds->ptr, urb->buffer, len); -+ ds->ptr += len; -+ break; -+ default: -+ if (first) { -+ rc = initialize_ds_nand(dev, ds); -+ if (rc) -+ return rc; -+ printf("Starting DFU DOWNLOAD to partition '%s'\n", -+ ds->part->name); -+ } -+ -+ size = ds->nand->erasesize; -+ remain_len = ds->buf + size - ds->ptr; -+ if (remain_len < len) -+ actual_len = remain_len; -+ -+ memcpy(ds->ptr, urb->buffer, actual_len); -+ ds->ptr += actual_len; -+ -+ /* check partition end */ -+ if (ds->off + (ds->ptr - ds->buf) > ds->part->offset + ds->part->size) { -+ printf("End of write exceeds partition end\n"); -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ return RET_STALL; -+ } -+ -+ if (ds->ptr >= ds->buf + size) { -+ rc = erase_flash_verify_nand(urb, ds, -+ ds->nand->erasesize, -+ ds->nand->erasesize); -+ if (rc) -+ return rc; -+ /* copy remainder of data into buffer */ -+ memcpy(ds->ptr, urb->buffer + actual_len, len - actual_len); -+ ds->ptr += (len - actual_len); -+ } -+ break; -+ } -+ -+ return RET_ZLP; -+} -+ -+static int handle_upload(struct urb *urb, u_int16_t val, u_int16_t len, int first) -+{ -+ struct usb_device_instance *dev = urb->device; -+ struct dnload_state *ds = &_dnstate; -+ unsigned int remain; -+ int rc; -+ -+ debug("upload(val=0x%02x, len=%u, first=%u) ", val, len, first); -+ -+ if (len > CONFIG_USBD_DFU_XFER_SIZE) { -+ /* Too big */ -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ dev->dfu_status = DFU_STATUS_errADDRESS; -+ //udc_ep0_send_stall(); -+ debug("Error: Transfer size > CONFIG_USBD_DFU_XFER_SIZE "); -+ return -EINVAL; -+ } -+ -+ switch (dev->alternate) { -+ case 0: -+ if (first) { -+ printf("Starting DFU Upload of RAM (0x%08p)\n", -+ LOAD_ADDR); -+ ds->ptr = ds->buf; -+ } -+ -+ /* FIXME: end at some more dynamic point */ -+ if (ds->ptr + len > LOAD_ADDR + 0x200000) -+ len = (LOAD_ADDR + 0x200000) - ds->ptr; -+ -+ urb->buffer = ds->ptr; -+ urb->actual_length = len; -+ ds->ptr += len; -+ break; -+ default: -+ if (first) { -+ rc = initialize_ds_nand(dev, ds); -+ if (rc) -+ return -EINVAL; -+ printf("Starting DFU Upload of partition '%s'\n", -+ ds->part->name); -+ rc = read_next_nand(urb, ds); -+ if (rc) -+ return -EINVAL; -+ } -+ -+ if (len > ds->nand->erasesize) { -+ printf("We don't support transfers bigger than %u\n", -+ ds->nand->erasesize); -+ len = ds->nand->erasesize; -+ } -+ -+ remain = ds->nand->erasesize - (ds->ptr - ds->buf); -+ if (len < remain) -+ remain = len; -+ -+ debug("copying %u bytes ", remain); -+ urb->buffer = ds->ptr; -+ ds->ptr += remain; -+ urb->actual_length = remain; -+ -+ if (ds->ptr >= ds->buf + ds->nand->erasesize && -+ ds->off < ds->part->offset + ds->part->size) { -+ rc = read_next_nand(urb, ds); -+ if (rc) -+ return -EINVAL; -+ if (len > remain) { -+ debug("copying another %u bytes ", len - remain); -+ memcpy(urb->buffer + remain, ds->ptr, len - remain); -+ ds->ptr += (len - remain); -+ urb->actual_length += (len - remain); -+ } -+ } -+ break; -+ } -+ -+ debug("returning len=%u\n", len); -+ return len; -+} -+ -+static void handle_getstatus(struct urb *urb, int max) -+{ -+ struct usb_device_instance *dev = urb->device; -+ struct dfu_status *dstat = (struct dfu_status *) urb->buffer; -+ -+ debug("getstatus "); -+ -+ if (!urb->buffer || urb->buffer_length < sizeof(*dstat)) { -+ debug("invalid urb! "); -+ return; -+ } -+ -+ switch (dev->dfu_state) { -+ case DFU_STATE_dfuDNLOAD_SYNC: -+ case DFU_STATE_dfuDNBUSY: -+#if 0 -+ if (fsr & AT91C_MC_PROGE) { -+ debug("errPROG "); -+ dev->dfu_status = DFU_STATUS_errPROG; -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ } else if (fsr & AT91C_MC_LOCKE) { -+ debug("errWRITE "); -+ dev->dfu_status = DFU_STATUS_errWRITE; -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ } else if (fsr & AT91C_MC_FRDY) { -+#endif -+ debug("DNLOAD_IDLE "); -+ dev->dfu_state = DFU_STATE_dfuDNLOAD_IDLE; -+#if 0 -+ } else { -+ debug("DNBUSY "); -+ dev->dfu_state = DFU_STATE_dfuDNBUSY; -+ } -+#endif -+ break; -+ case DFU_STATE_dfuMANIFEST_SYNC: -+ break; -+ default: -+ //return; -+ break; -+ } -+ -+ /* send status response */ -+ dstat->bStatus = dev->dfu_status; -+ dstat->bState = dev->dfu_state; -+ dstat->iString = 0; -+ /* FIXME: set dstat->bwPollTimeout */ -+ urb->actual_length = MIN(sizeof(*dstat), max); -+ -+ /* we don't need to explicitly send data here, will -+ * be done by the original caller! */ -+} -+ -+static void handle_getstate(struct urb *urb, int max) -+{ -+ debug("getstate "); -+ -+ if (!urb->buffer || urb->buffer_length < sizeof(u_int8_t)) { -+ debug("invalid urb! "); -+ return; -+ } -+ -+ urb->buffer[0] = urb->device->dfu_state & 0xff; -+ urb->actual_length = sizeof(u_int8_t); -+} -+ -+#ifndef CONFIG_USBD_PRODUCTID_DFU -+#define CONFIG_USBD_PRODUCTID_DFU CONFIG_USBD_PRODUCTID_CDCACM -+#endif -+ -+static const struct usb_device_descriptor dfu_dev_descriptor = { -+ .bLength = USB_DT_DEVICE_SIZE, -+ .bDescriptorType = USB_DT_DEVICE, -+ .bcdUSB = 0x0100, -+ .bDeviceClass = 0x00, -+ .bDeviceSubClass = 0x00, -+ .bDeviceProtocol = 0x00, -+ .bMaxPacketSize0 = EP0_MAX_PACKET_SIZE, -+ .idVendor = CONFIG_USBD_VENDORID, -+ .idProduct = CONFIG_USBD_PRODUCTID_DFU, -+ .bcdDevice = 0x0000, -+ .iManufacturer = DFU_STR_MANUFACTURER, -+ .iProduct = DFU_STR_PRODUCT, -+ .iSerialNumber = DFU_STR_SERIAL, -+ .bNumConfigurations = 0x01, -+}; -+ -+static const struct _dfu_desc dfu_cfg_descriptor = { -+ .ucfg = { -+ .bLength = USB_DT_CONFIG_SIZE, -+ .bDescriptorType = USB_DT_CONFIG, -+ .wTotalLength = USB_DT_CONFIG_SIZE + -+ DFU_NUM_ALTERNATES * USB_DT_INTERFACE_SIZE + -+ USB_DT_DFU_SIZE, -+ .bNumInterfaces = 5, -+ .bConfigurationValue = 1, -+ .iConfiguration = DFU_STR_CONFIG, -+ .bmAttributes = BMATTRIBUTE_RESERVED, -+ .bMaxPower = 50, -+ }, -+ .uif[0] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x00, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT0, -+ }, -+ .uif[1] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x01, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT1, -+ }, -+ .uif[2] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x02, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT2, -+ }, -+ .uif[3] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x03, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT3, -+ }, -+ .uif[4] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x04, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT4, -+ }, -+ .uif[5] = { -+ .bLength = USB_DT_INTERFACE_SIZE, -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x00, -+ .bAlternateSetting = 0x05, -+ .bNumEndpoints = 0x00, -+ .bInterfaceClass = 0xfe, -+ .bInterfaceSubClass = 0x01, -+ .bInterfaceProtocol = 0x02, -+ .iInterface = DFU_STR_ALT5, -+ }, -+ .func_dfu = DFU_FUNC_DESC, -+}; -+ -+int dfu_ep0_handler(struct urb *urb) -+{ -+ int rc, ret = RET_NOTHING; -+ u_int8_t req = urb->device_request.bRequest; -+ u_int16_t val = urb->device_request.wValue; -+ u_int16_t len = urb->device_request.wLength; -+ struct usb_device_instance *dev = urb->device; -+ -+ debug("dfu_ep0(req=0x%x, val=0x%x, len=%u) old_state = %u ", -+ req, val, len, dev->dfu_state); -+ -+ switch (dev->dfu_state) { -+ case DFU_STATE_appIDLE: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ case USB_REQ_DFU_DETACH: -+ dev->dfu_state = DFU_STATE_appDETACH; -+ ret = RET_ZLP; -+ goto out; -+ break; -+ default: -+ ret = RET_STALL; -+ } -+ break; -+ case DFU_STATE_appDETACH: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_appIDLE; -+ ret = RET_STALL; -+ goto out; -+ break; -+ } -+ /* FIXME: implement timer to return to appIDLE */ -+ break; -+ case DFU_STATE_dfuIDLE: -+ switch (req) { -+ case USB_REQ_DFU_DNLOAD: -+ if (len == 0) { -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ goto out; -+ } -+ dev->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; -+ ret = handle_dnload(urb, val, len, 1); -+ break; -+ case USB_REQ_DFU_UPLOAD: -+ dev->dfu_state = DFU_STATE_dfuUPLOAD_IDLE; -+ handle_upload(urb, val, len, 1); -+ break; -+ case USB_REQ_DFU_ABORT: -+ /* no zlp? */ -+ ret = RET_ZLP; -+ break; -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ case USB_REQ_DFU_DETACH: -+ /* Proprietary extension: 'detach' from idle mode and -+ * get back to runtime mode in case of USB Reset. As -+ * much as I dislike this, we just can't use every USB -+ * bus reset to switch back to runtime mode, since at -+ * least the Linux USB stack likes to send a number of resets -+ * in a row :( */ -+ dev->dfu_state = DFU_STATE_dfuMANIFEST_WAIT_RST; -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ goto out; -+ break; -+ } -+ break; -+ case DFU_STATE_dfuDNLOAD_SYNC: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ /* FIXME: state transition depending on block completeness */ -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ goto out; -+ } -+ break; -+ case DFU_STATE_dfuDNBUSY: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ /* FIXME: only accept getstatus if bwPollTimeout -+ * has elapsed */ -+ handle_getstatus(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ goto out; -+ } -+ break; -+ case DFU_STATE_dfuDNLOAD_IDLE: -+ switch (req) { -+ case USB_REQ_DFU_DNLOAD: -+ dev->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; -+ ret = handle_dnload(urb, val, len, 0); -+ break; -+ case USB_REQ_DFU_ABORT: -+ dev->dfu_state = DFU_STATE_dfuIDLE; -+ ret = RET_ZLP; -+ break; -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ break; -+ } -+ break; -+ case DFU_STATE_dfuMANIFEST_SYNC: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ /* We're MainfestationTolerant */ -+ dev->dfu_state = DFU_STATE_dfuIDLE; -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ break; -+ } -+ break; -+ case DFU_STATE_dfuMANIFEST: -+ /* we should never go here */ -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ break; -+ case DFU_STATE_dfuMANIFEST_WAIT_RST: -+ /* we should never go here */ -+ break; -+ case DFU_STATE_dfuUPLOAD_IDLE: -+ switch (req) { -+ case USB_REQ_DFU_UPLOAD: -+ /* state transition if less data then requested */ -+ rc = handle_upload(urb, val, len, 0); -+ if (rc >= 0 && rc < len) -+ dev->dfu_state = DFU_STATE_dfuIDLE; -+ break; -+ case USB_REQ_DFU_ABORT: -+ dev->dfu_state = DFU_STATE_dfuIDLE; -+ /* no zlp? */ -+ ret = RET_ZLP; -+ break; -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ break; -+ } -+ break; -+ case DFU_STATE_dfuERROR: -+ switch (req) { -+ case USB_REQ_DFU_GETSTATUS: -+ handle_getstatus(urb, len); -+ break; -+ case USB_REQ_DFU_GETSTATE: -+ handle_getstate(urb, len); -+ break; -+ case USB_REQ_DFU_CLRSTATUS: -+ dev->dfu_state = DFU_STATE_dfuIDLE; -+ dev->dfu_status = DFU_STATUS_OK; -+ /* no zlp? */ -+ ret = RET_ZLP; -+ break; -+ default: -+ dev->dfu_state = DFU_STATE_dfuERROR; -+ ret = RET_STALL; -+ break; -+ } -+ break; -+ default: -+ return DFU_EP0_UNHANDLED; -+ break; -+ } -+ -+out: -+ debug("new_state = %u, ret = %u\n", dev->dfu_state, ret); -+ -+ switch (ret) { -+ case RET_ZLP: -+ //udc_ep0_send_zlp(); -+ urb->actual_length = 0; -+ return DFU_EP0_ZLP; -+ break; -+ case RET_STALL: -+ //udc_ep0_send_stall(); -+ return DFU_EP0_STALL; -+ break; -+ case RET_NOTHING: -+ break; -+ } -+ -+ return DFU_EP0_DATA; -+} -+ -+void str2wide (char *str, u16 * wide); -+static struct usb_string_descriptor *create_usbstring(char *string) -+{ -+ struct usb_string_descriptor *strdesc; -+ int size = sizeof(*strdesc) + strlen(string)*2; -+ -+ if (size > 255) -+ return NULL; -+ -+ strdesc = malloc(size); -+ if (!strdesc) -+ return NULL; -+ -+ strdesc->bLength = size; -+ strdesc->bDescriptorType = USB_DT_STRING; -+ str2wide(string, strdesc->wData); -+ -+ return strdesc; -+} -+ -+ -+static void dfu_init_strings(struct usb_device_instance *dev) -+{ -+ int i; -+ struct usb_string_descriptor *strdesc; -+ -+ strdesc = create_usbstring(CONFIG_DFU_CFG_STR); -+ usb_strings[DFU_STR_CONFIG] = strdesc; -+ -+ for (i = 0; i < DFU_NUM_ALTERNATES; i++) { -+ if (i == 0) { -+ strdesc = create_usbstring(CONFIG_DFU_ALT0_STR); -+ } else { -+ struct part_info *part = get_partition_nand(i-1); -+ -+ if (part) -+ strdesc = create_usbstring(part->name); -+ else -+ strdesc = -+ create_usbstring("undefined partition"); -+ } -+ if (!strdesc) -+ continue; -+ usb_strings[STR_COUNT+i+1] = strdesc; -+ } -+} -+ -+int dfu_init_instance(struct usb_device_instance *dev) -+{ -+ dev->dfu_dev_desc = &dfu_dev_descriptor; -+ dev->dfu_cfg_desc = &dfu_cfg_descriptor; -+ dev->dfu_state = DFU_STATE_appIDLE; -+ dev->dfu_status = DFU_STATUS_OK; -+ -+ if (system_dfu_state) -+ printf("SURPRISE: system_dfu_state is already set\n"); -+ system_dfu_state = &dev->dfu_state; -+ -+ dfu_init_strings(dev); -+ -+ return 0; -+} -+ -+static int stdout_switched; -+ -+/* event handler for usb device state events */ -+void dfu_event(struct usb_device_instance *device, -+ usb_device_event_t event, int data) -+{ -+ char *out; -+ -+ switch (event) { -+ case DEVICE_RESET: -+ switch (device->dfu_state) { -+ case DFU_STATE_appDETACH: -+ device->dfu_state = DFU_STATE_dfuIDLE; -+ out = getenv("stdout"); -+ if (out && !strcmp(out, "usbtty")) { -+ setenv("stdout", "vga"); -+ setenv("stderr", "vga"); -+ stdout_switched = 1; -+ } -+ printf("DFU: Switching to DFU Mode\n"); -+ break; -+ case DFU_STATE_dfuMANIFEST_WAIT_RST: -+ device->dfu_state = DFU_STATE_appIDLE; -+ printf("DFU: Switching back to Runtime mode\n"); -+ if (stdout_switched) { -+ setenv("stdout", "usbtty"); -+ setenv("stderr", "usbtty"); -+ stdout_switched = 0; -+ } -+ break; -+ default: -+ break; -+ } -+ break; -+ case DEVICE_CONFIGURED: -+ case DEVICE_DE_CONFIGURED: -+ debug("SET_CONFIGURATION(%u) ", device->configuration); -+ /* fallthrough */ -+ case DEVICE_SET_INTERFACE: -+ debug("SET_INTERFACE(%u,%u) old_state = %u ", -+ device->interface, device->alternate, -+ device->dfu_state); -+ switch (device->dfu_state) { -+ case DFU_STATE_appIDLE: -+ case DFU_STATE_appDETACH: -+ case DFU_STATE_dfuIDLE: -+ case DFU_STATE_dfuMANIFEST_WAIT_RST: -+ /* do nothing, we're fine */ -+ break; -+ case DFU_STATE_dfuDNLOAD_SYNC: -+ case DFU_STATE_dfuDNBUSY: -+ case DFU_STATE_dfuDNLOAD_IDLE: -+ case DFU_STATE_dfuMANIFEST: -+ device->dfu_state = DFU_STATE_dfuERROR; -+ device->dfu_status = DFU_STATUS_errNOTDONE; -+ /* FIXME: free malloc()ed buffer! */ -+ break; -+ case DFU_STATE_dfuMANIFEST_SYNC: -+ case DFU_STATE_dfuUPLOAD_IDLE: -+ case DFU_STATE_dfuERROR: -+ device->dfu_state = DFU_STATE_dfuERROR; -+ device->dfu_status = DFU_STATUS_errUNKNOWN; -+ break; -+ } -+ debug("new_state = %u\n", device->dfu_state); -+ break; -+ default: -+ break; -+ } -+} -+#endif /* CONFIG_USBD_DFU */ -Index: u-boot/drivers/Makefile -=================================================================== ---- u-boot.orig/drivers/Makefile -+++ u-boot/drivers/Makefile -@@ -47,7 +47,7 @@ - status_led.o sym53c8xx.o systemace.o ahci.o \ - ti_pci1410a.o tigon3.o tsec.o \ - tsi108_eth.o tsi108_i2c.o tsi108_pci.o \ -- usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ -+ usbdcore.o usbdfu.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ - videomodes.o w83c553f.o \ - ks8695eth.o \ - pcf50606.o \ -Index: u-boot/drivers/usbdcore.c -=================================================================== ---- u-boot.orig/drivers/usbdcore.c -+++ u-boot/drivers/usbdcore.c -@@ -31,6 +31,7 @@ - - #include - #include "usbdcore.h" -+#include - - #define MAX_INTERFACES 2 - -@@ -212,6 +213,10 @@ - */ - struct usb_device_descriptor *usbd_device_device_descriptor (struct usb_device_instance *device, int port) - { -+#ifdef CONFIG_USBD_DFU -+ if (device->dfu_state != DFU_STATE_appIDLE) -+ return device->dfu_dev_desc; -+#endif - return (device->device_descriptor); - } - -@@ -232,6 +237,10 @@ - if (!(configuration_instance = usbd_device_configuration_instance (device, port, configuration))) { - return NULL; - } -+#ifdef CONFIG_USBD_DFU -+ if (device->dfu_state != DFU_STATE_appIDLE) -+ return (&device->dfu_cfg_desc->ucfg); -+#endif - return (configuration_instance->configuration_descriptor); - } - -@@ -253,6 +262,13 @@ - if (!(interface_instance = usbd_device_interface_instance (device, port, configuration, interface))) { - return NULL; - } -+#ifdef CONFIG_USBD_DFU -+ if (device->dfu_state != DFU_STATE_appIDLE) { -+ if (alternate < 0 || alternate >= DFU_NUM_ALTERNATES) -+ return NULL; -+ return &device->dfu_cfg_desc->uif[alternate]; -+ } -+#endif - if ((alternate < 0) || (alternate >= interface_instance->alternates)) { - return NULL; - } -@@ -681,4 +697,7 @@ - /* usbdbg("calling device->event"); */ - device->event(device, event, data); - } -+#ifdef CONFIG_USBD_DFU -+ dfu_event(device, event, data); -+#endif - } -Index: u-boot/drivers/usbtty.c -=================================================================== ---- u-boot.orig/drivers/usbtty.c -+++ u-boot/drivers/usbtty.c -@@ -31,6 +31,8 @@ - #include "usbtty.h" - #include "usb_cdc_acm.h" - #include "usbdescriptors.h" -+#include -+#include - #include /* If defined, override Linux identifiers with - * vendor specific ones */ - -@@ -118,7 +120,7 @@ - static unsigned short rx_endpoint = 0; - static unsigned short tx_endpoint = 0; - static unsigned short interface_count = 0; --static struct usb_string_descriptor *usbtty_string_table[STR_COUNT]; -+static struct usb_string_descriptor *usbtty_string_table[NUM_STRINGS]; - - /* USB Descriptor Strings */ - static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4}; -@@ -169,6 +171,10 @@ - struct usb_interface_descriptor data_class_interface; - struct usb_endpoint_descriptor - data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed)); -+#ifdef CONFIG_USBD_DFU -+ struct usb_interface_descriptor uif_dfu; -+ struct usb_dfu_func_descriptor func_dfu; -+#endif - } __attribute__((packed)); - - static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { -@@ -179,7 +185,11 @@ - .bDescriptorType = USB_DT_CONFIG, - .wTotalLength = - cpu_to_le16(sizeof(struct acm_config_desc)), -+#ifdef CONFIG_USBD_DFU -+ .bNumInterfaces = NUM_ACM_INTERFACES +1, -+#else - .bNumInterfaces = NUM_ACM_INTERFACES, -+#endif - .bConfigurationValue = 1, - .iConfiguration = STR_CONFIG, - .bmAttributes = -@@ -278,6 +288,11 @@ - .bInterval = 0xFF, - }, - }, -+#ifdef CONFIG_USBD_DFU -+ /* Interface 3 */ -+ .uif_dfu = DFU_RT_IF_DESC, -+ .func_dfu = DFU_FUNC_DESC, -+#endif - }, - }; - -@@ -390,7 +405,7 @@ - void usbtty_poll (void); - - /* utility function for converting char* to wide string used by USB */ --static void str2wide (char *str, u16 * wide) -+void str2wide (char *str, u16 * wide) - { - int i; - for (i = 0; i < strlen (str) && str[i]; i++){ -@@ -652,6 +667,9 @@ - device_instance->bus = bus_instance; - device_instance->configurations = NUM_CONFIGS; - device_instance->configuration_instance_array = config_instance; -+#ifdef CONFIG_USBD_DFU -+ dfu_init_instance(device_instance); -+#endif - - /* initialize bus instance */ - memset (bus_instance, 0, sizeof (struct usb_bus_instance)); -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -167,7 +167,7 @@ - */ - #define CONFIG_STACKSIZE (128*1024) /* regular stack */ - #ifdef CONFIG_USE_IRQ --#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ - #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ - #endif - -@@ -184,6 +184,10 @@ - #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" - #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION - #define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ -+#define CONFIG_USBD_DFU_INTERFACE 2 -+ - - /*----------------------------------------------------------------------- - * Physical Memory Map -Index: u-boot/include/usb_dfu.h -=================================================================== ---- /dev/null -+++ u-boot/include/usb_dfu.h -@@ -0,0 +1,99 @@ -+#ifndef _DFU_H -+#define _DFU_H -+ -+/* USB Device Firmware Update Implementation for u-boot -+ * (C) 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on: USB Device Firmware Update Implementation for OpenPCD -+ * (C) 2006 by Harald Welte -+ * -+ * This ought to be compliant to the USB DFU Spec 1.0 as available from -+ * http://www.usb.org/developers/devclass_docs/usbdfu10.pdf -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+ -+/* USB DFU functional descriptor */ -+#define DFU_FUNC_DESC { \ -+ .bLength = USB_DT_DFU_SIZE, \ -+ .bDescriptorType = USB_DT_DFU, \ -+ .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD | USB_DFU_MANIFEST_TOL, \ -+ .wDetachTimeOut = 0xff00, \ -+ .wTransferSize = CONFIG_USBD_DFU_XFER_SIZE, \ -+ .bcdDFUVersion = 0x0100, \ -+} -+ -+/* USB Interface descriptor in Runtime mode */ -+#define DFU_RT_IF_DESC { \ -+ .bLength = USB_DT_INTERFACE_SIZE, \ -+ .bDescriptorType = USB_DT_INTERFACE, \ -+ .bInterfaceNumber = CONFIG_USBD_DFU_INTERFACE, \ -+ .bAlternateSetting = 0x00, \ -+ .bNumEndpoints = 0x00, \ -+ .bInterfaceClass = 0xfe, \ -+ .bInterfaceSubClass = 0x01, \ -+ .bInterfaceProtocol = 0x01, \ -+ .iInterface = DFU_STR_CONFIG, \ -+} -+ -+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -+ -+#define DFU_NUM_ALTERNATES 6 -+ -+#define DFU_STR_MANUFACTURER STR_MANUFACTURER -+#define DFU_STR_PRODUCT STR_PRODUCT -+#define DFU_STR_SERIAL STR_SERIAL -+#define DFU_STR_CONFIG (STR_COUNT) -+#define DFU_STR_ALT0 (STR_COUNT+1) -+#define DFU_STR_ALT1 (STR_COUNT+2) -+#define DFU_STR_ALT2 (STR_COUNT+3) -+#define DFU_STR_ALT3 (STR_COUNT+4) -+#define DFU_STR_ALT4 (STR_COUNT+5) -+#define DFU_STR_ALT5 (STR_COUNT+6) -+#define DFU_STR_COUNT (STR_COUNT+7) -+ -+#define DFU_NUM_STRINGS (STR_COUNT+8) -+ -+#define CONFIG_DFU_CFG_STR "USB Device Firmware Upgrade" -+#define CONFIG_DFU_ALT0_STR "RAM 0x32000000" -+ -+struct _dfu_desc { -+ struct usb_configuration_descriptor ucfg; -+ struct usb_interface_descriptor uif[DFU_NUM_ALTERNATES]; -+ struct usb_dfu_func_descriptor func_dfu; -+}; -+ -+int dfu_init_instance(struct usb_device_instance *dev); -+ -+#define DFU_EP0_NONE 0 -+#define DFU_EP0_UNHANDLED 1 -+#define DFU_EP0_STALL 2 -+#define DFU_EP0_ZLP 3 -+#define DFU_EP0_DATA 4 -+ -+extern volatile enum dfu_state *system_dfu_state; /* for 3rd parties */ -+ -+int dfu_ep0_handler(struct urb *urb); -+ -+void dfu_event(struct usb_device_instance *device, -+ usb_device_event_t event, int data); -+ -+#endif /* _DFU_H */ -Index: u-boot/include/usb_dfu_descriptors.h -=================================================================== ---- /dev/null -+++ u-boot/include/usb_dfu_descriptors.h -@@ -0,0 +1,94 @@ -+#ifndef _USB_DFU_H -+#define _USB_DFU_H -+/* USB Device Firmware Update Implementation for OpenPCD -+ * (C) 2006 by Harald Welte -+ * -+ * Protocol definitions for USB DFU -+ * -+ * This ought to be compliant to the USB DFU Spec 1.0 as available from -+ * http://www.usb.org/developers/devclass_docs/usbdfu10.pdf -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+ -+#define USB_DT_DFU 0x21 -+ -+struct usb_dfu_func_descriptor { -+ u_int8_t bLength; -+ u_int8_t bDescriptorType; -+ u_int8_t bmAttributes; -+#define USB_DFU_CAN_DOWNLOAD (1 << 0) -+#define USB_DFU_CAN_UPLOAD (1 << 1) -+#define USB_DFU_MANIFEST_TOL (1 << 2) -+#define USB_DFU_WILL_DETACH (1 << 3) -+ u_int16_t wDetachTimeOut; -+ u_int16_t wTransferSize; -+ u_int16_t bcdDFUVersion; -+} __attribute__ ((packed)); -+ -+#define USB_DT_DFU_SIZE 9 -+ -+#define USB_TYPE_DFU (USB_TYPE_CLASS|USB_RECIP_INTERFACE) -+ -+/* DFU class-specific requests (Section 3, DFU Rev 1.1) */ -+#define USB_REQ_DFU_DETACH 0x00 -+#define USB_REQ_DFU_DNLOAD 0x01 -+#define USB_REQ_DFU_UPLOAD 0x02 -+#define USB_REQ_DFU_GETSTATUS 0x03 -+#define USB_REQ_DFU_CLRSTATUS 0x04 -+#define USB_REQ_DFU_GETSTATE 0x05 -+#define USB_REQ_DFU_ABORT 0x06 -+ -+struct dfu_status { -+ u_int8_t bStatus; -+ u_int8_t bwPollTimeout[3]; -+ u_int8_t bState; -+ u_int8_t iString; -+} __attribute__((packed)); -+ -+#define DFU_STATUS_OK 0x00 -+#define DFU_STATUS_errTARGET 0x01 -+#define DFU_STATUS_errFILE 0x02 -+#define DFU_STATUS_errWRITE 0x03 -+#define DFU_STATUS_errERASE 0x04 -+#define DFU_STATUS_errCHECK_ERASED 0x05 -+#define DFU_STATUS_errPROG 0x06 -+#define DFU_STATUS_errVERIFY 0x07 -+#define DFU_STATUS_errADDRESS 0x08 -+#define DFU_STATUS_errNOTDONE 0x09 -+#define DFU_STATUS_errFIRMWARE 0x0a -+#define DFU_STATUS_errVENDOR 0x0b -+#define DFU_STATUS_errUSBR 0x0c -+#define DFU_STATUS_errPOR 0x0d -+#define DFU_STATUS_errUNKNOWN 0x0e -+#define DFU_STATUS_errSTALLEDPKT 0x0f -+ -+enum dfu_state { -+ DFU_STATE_appIDLE = 0, -+ DFU_STATE_appDETACH = 1, -+ DFU_STATE_dfuIDLE = 2, -+ DFU_STATE_dfuDNLOAD_SYNC = 3, -+ DFU_STATE_dfuDNBUSY = 4, -+ DFU_STATE_dfuDNLOAD_IDLE = 5, -+ DFU_STATE_dfuMANIFEST_SYNC = 6, -+ DFU_STATE_dfuMANIFEST = 7, -+ DFU_STATE_dfuMANIFEST_WAIT_RST = 8, -+ DFU_STATE_dfuUPLOAD_IDLE = 9, -+ DFU_STATE_dfuERROR = 10, -+}; -+ -+#endif /* _USB_DFU_H */ -Index: u-boot/include/usbdcore.h -=================================================================== ---- u-boot.orig/include/usbdcore.h -+++ u-boot/include/usbdcore.h -@@ -33,6 +33,7 @@ - - #include - #include "usbdescriptors.h" -+#include - - - #define MAX_URBS_QUEUED 5 -@@ -475,7 +476,11 @@ - * function driver to inform it that data has arrived. - */ - -+#ifdef CONFIG_USBD_DFU -+#define URB_BUF_SIZE (128+CONFIG_USBD_DFU_XFER_SIZE) -+#else - #define URB_BUF_SIZE 128 /* in linux we'd malloc this, but in u-boot we prefer static data */ -+#endif - struct urb { - - struct usb_endpoint_instance *endpoint; -@@ -603,6 +608,12 @@ - unsigned long usbd_rxtx_timestamp; - unsigned long usbd_last_rxtx_timestamp; - -+#ifdef CONFIG_USBD_DFU -+ const struct usb_device_descriptor *dfu_dev_desc; -+ const struct _dfu_desc *dfu_cfg_desc; -+ enum dfu_state dfu_state; -+ u_int8_t dfu_status; -+#endif - }; - - /* Bus Interface configuration structure -@@ -632,6 +643,8 @@ - extern char *usbd_device_requests[]; - extern char *usbd_device_descriptors[]; - -+extern struct usb_string_descriptor **usb_strings; -+ - void urb_link_init (urb_link * ul); - void urb_detach (struct urb *urb); - urb_link *first_urb_link (urb_link * hd); -Index: u-boot/drivers/usbtty.h -=================================================================== ---- u-boot.orig/drivers/usbtty.h -+++ u-boot/drivers/usbtty.h -@@ -71,4 +71,10 @@ - #define STR_CTRL_INTERFACE 0x06 - #define STR_COUNT 0x07 - -+#ifdef CONFIG_USBD_DFU -+#define NUM_STRINGS DFU_STR_COUNT -+#else -+#define NUM_STRINGS STR_COUNT -+#endif -+ - #endif -Index: u-boot/include/configs/qt2410.h -=================================================================== ---- u-boot.orig/include/configs/qt2410.h -+++ u-boot/include/configs/qt2410.h -@@ -199,7 +199,8 @@ - #define CONFIG_USBD_PRODUCT_NAME "QT2410 Bootloader " U_BOOT_VERSION - #define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" - #define CONFIG_USBD_DFU 1 --#define CONFIG_USBD_DFU_XFER_SIZE 0x4000 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 -+#define CONFIG_USBD_DFU_INTERFACE 2 - - /*----------------------------------------------------------------------- - * Physical Memory Map -Index: u-boot/tools/Makefile -=================================================================== ---- u-boot.orig/tools/Makefile -+++ u-boot/tools/Makefile -@@ -21,10 +21,10 @@ - # MA 02111-1307 USA - # - --BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX) -+BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX) mkudfu$(SFX) - - OBJ_LINKS = environment.o crc32.o --OBJ_FILES = img2srec.o mkimage.o envcrc.o gen_eth_addr.o bmp_logo.o -+OBJ_FILES = img2srec.o mkimage.o envcrc.o gen_eth_addr.o bmp_logo.o mkudfu.o - - ifeq ($(ARCH),mips) - BIN_FILES += inca-swap-bytes$(SFX) -@@ -137,6 +137,10 @@ - $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ - $(STRIP) $@ - -+$(obj)mkudfu$(SFX): $(obj)mkudfu.o -+ $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ -+ $(STRIP) $@ -+ - $(obj)ncb$(SFX): $(obj)ncb.o - $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ - $(STRIP) $@ -Index: u-boot/tools/mkudfu.c -=================================================================== ---- /dev/null -+++ u-boot/tools/mkudfu.c -@@ -0,0 +1,314 @@ -+/* -+ * USB DFU file trailer tool -+ * (C) Copyright by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on mkimage.c, copyright information as follows: -+ * -+ * (C) Copyright 2000-2004 -+ * DENX Software Engineering -+ * Wolfgang Denk, wd@denx.de -+ * All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#ifndef __WIN32__ -+#include /* for host / network byte order conversions */ -+#endif -+#include -+#include -+#include -+#include -+ -+#if defined(__BEOS__) || defined(__NetBSD__) || defined(__APPLE__) -+#include -+#endif -+ -+#ifdef __WIN32__ -+typedef unsigned int __u32; -+ -+#define SWAP_LONG(x) \ -+ ((__u32)( \ -+ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ -+ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ -+ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ -+ (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) -+typedef unsigned char uint8_t; -+typedef unsigned short uint16_t; -+typedef unsigned int uint32_t; -+ -+#define ntohl(a) SWAP_LONG(a) -+#define htonl(a) SWAP_LONG(a) -+#endif /* __WIN32__ */ -+ -+#ifndef O_BINARY /* should be define'd on __WIN32__ */ -+#define O_BINARY 0 -+#endif -+ -+#include -+ -+extern int errno; -+ -+#ifndef MAP_FAILED -+#define MAP_FAILED (-1) -+#endif -+ -+static char *cmdname; -+ -+static char *datafile; -+static char *imagefile; -+ -+ -+static void usage() -+{ -+ fprintf (stderr, "%s - create / display u-boot DFU trailer\n", cmdname); -+ fprintf (stderr, "Usage: %s -l image\n" -+ " -l ==> list image header information\n" -+ " %s -v VID -p PID -r REV -d data_file image\n", -+ cmdname, cmdname); -+ fprintf (stderr, " -v ==> set vendor ID to 'VID'\n" -+ " -p ==> set product ID system to 'PID'\n" -+ " -r ==> set hardware revision to 'REV'\n" -+ " -d ==> use 'data_file' as input file\n" -+ ); -+ exit (EXIT_FAILURE); -+} -+ -+static void print_trailer(struct uboot_dfu_trailer *trailer) -+{ -+ printf("===> DFU Trailer information:\n"); -+ printf("Trailer Vers.: %d\n", trailer->version); -+ printf("Trailer Length: %d\n", trailer->length); -+ printf("VendorID: 0x%04x\n", trailer->vendor); -+ printf("ProductID: 0x%04x\n", trailer->product); -+ printf("HW Revision: 0x%04x\n", trailer->revision); -+} -+ -+static void copy_file (int ifd, const char *datafile, int pad) -+{ -+ int dfd; -+ struct stat sbuf; -+ unsigned char *ptr; -+ int tail; -+ int zero = 0; -+ int offset = 0; -+ int size; -+ -+ if ((dfd = open(datafile, O_RDONLY|O_BINARY)) < 0) { -+ fprintf (stderr, "%s: Can't open %s: %s\n", -+ cmdname, datafile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ if (fstat(dfd, &sbuf) < 0) { -+ fprintf (stderr, "%s: Can't stat %s: %s\n", -+ cmdname, datafile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ ptr = (unsigned char *)mmap(0, sbuf.st_size, -+ PROT_READ, MAP_SHARED, dfd, 0); -+ if (ptr == (unsigned char *)MAP_FAILED) { -+ fprintf (stderr, "%s: Can't read %s: %s\n", -+ cmdname, datafile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ size = sbuf.st_size - offset; -+ if (write(ifd, ptr + offset, size) != size) { -+ fprintf (stderr, "%s: Write error on %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ if (pad && ((tail = size % 4) != 0)) { -+ -+ if (write(ifd, (char *)&zero, 4-tail) != 4-tail) { -+ fprintf (stderr, "%s: Write error on %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ } -+ -+ (void) munmap((void *)ptr, sbuf.st_size); -+ (void) close (dfd); -+} -+ -+ -+int main(int argc, char **argv) -+{ -+ int ifd; -+ int lflag = 0; -+ struct stat sbuf; -+ u_int16_t opt_vendor, opt_product, opt_revision; -+ struct uboot_dfu_trailer _hdr, _mirror, *hdr = &_hdr; -+ -+ opt_vendor = opt_product = opt_revision = 0; -+ -+ cmdname = *argv; -+ -+ while (--argc > 0 && **++argv == '-') { -+ while (*++*argv) { -+ switch (**argv) { -+ case 'l': -+ lflag = 1; -+ break; -+ case 'v': -+ if (--argc <= 0) -+ usage (); -+ opt_vendor = strtoul(*++argv, NULL, 16); -+ goto NXTARG; -+ case 'p': -+ if (--argc <= 0) -+ usage (); -+ opt_product = strtoul(*++argv, NULL, 16); -+ goto NXTARG; -+ case 'r': -+ if (--argc <= 0) -+ usage (); -+ opt_revision = strtoul(*++argv, NULL, 16); -+ goto NXTARG; -+ case 'd': -+ if (--argc <= 0) -+ usage (); -+ datafile = *++argv; -+ goto NXTARG; -+ case 'h': -+ usage(); -+ break; -+ default: -+ usage(); -+ } -+ } -+NXTARG: ; -+ } -+ -+ if (argc != 1) -+ usage(); -+ -+ imagefile = *argv; -+ -+ if (lflag) -+ ifd = open(imagefile, O_RDONLY|O_BINARY); -+ else -+ ifd = open(imagefile, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0666); -+ -+ if (ifd < 0) { -+ fprintf (stderr, "%s: Can't open %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ if (lflag) { -+ unsigned char *ptr; -+ /* list header information of existing image */ -+ if (fstat(ifd, &sbuf) < 0) { -+ fprintf (stderr, "%s: Can't stat %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ if ((unsigned)sbuf.st_size < sizeof(struct uboot_dfu_trailer)) { -+ fprintf (stderr, -+ "%s: Bad size: \"%s\" is no valid image\n", -+ cmdname, imagefile); -+ exit (EXIT_FAILURE); -+ } -+ -+ ptr = (unsigned char *)mmap(0, sbuf.st_size, -+ PROT_READ, MAP_SHARED, ifd, 0); -+ if ((caddr_t)ptr == (caddr_t)-1) { -+ fprintf (stderr, "%s: Can't read %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ dfu_trailer_mirror(hdr, ptr+sbuf.st_size); -+ -+ if (hdr->magic != UBOOT_DFU_TRAILER_MAGIC) { -+ fprintf (stderr, -+ "%s: Bad Magic Number: \"%s\" is no valid image\n", -+ cmdname, imagefile); -+ exit (EXIT_FAILURE); -+ } -+ -+ /* for multi-file images we need the data part, too */ -+ print_trailer(hdr); -+ -+ (void) munmap((void *)ptr, sbuf.st_size); -+ (void) close (ifd); -+ -+ exit (EXIT_SUCCESS); -+ } -+ -+ /* if we're not listing: */ -+ -+ copy_file (ifd, datafile, 0); -+ -+ memset (hdr, 0, sizeof(struct uboot_dfu_trailer)); -+ -+ /* Build new header */ -+ hdr->version = UBOOT_DFU_TRAILER_V1; -+ hdr->magic = UBOOT_DFU_TRAILER_MAGIC; -+ hdr->length = sizeof(struct uboot_dfu_trailer); -+ hdr->vendor = opt_vendor; -+ hdr->product = opt_product; -+ hdr->revision = opt_revision; -+ -+ print_trailer(hdr); -+ dfu_trailer_mirror(&_mirror, (unsigned char *)hdr+sizeof(*hdr)); -+ -+ if (write(ifd, &_mirror, sizeof(struct uboot_dfu_trailer)) -+ != sizeof(struct uboot_dfu_trailer)) { -+ fprintf (stderr, "%s: Write error on %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ /* We're a bit of paranoid */ -+#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) -+ (void) fdatasync (ifd); -+#else -+ (void) fsync (ifd); -+#endif -+ -+ if (fstat(ifd, &sbuf) < 0) { -+ fprintf (stderr, "%s: Can't stat %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ /* We're a bit of paranoid */ -+#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) -+ (void) fdatasync (ifd); -+#else -+ (void) fsync (ifd); -+#endif -+ -+ if (close(ifd)) { -+ fprintf (stderr, "%s: Write error on %s: %s\n", -+ cmdname, imagefile, strerror(errno)); -+ exit (EXIT_FAILURE); -+ } -+ -+ exit (EXIT_SUCCESS); -+} -Index: u-boot/include/usb_dfu_trailer.h -=================================================================== ---- /dev/null -+++ u-boot/include/usb_dfu_trailer.h -@@ -0,0 +1,31 @@ -+#ifndef _USB_DFU_TRAILER_H -+#define _USB_DFU_TRAILER_H -+ -+/* trailer handling for DFU files */ -+ -+#define UBOOT_DFU_TRAILER_V1 1 -+#define UBOOT_DFU_TRAILER_MAGIC 0x19731978 -+struct uboot_dfu_trailer { -+ u_int32_t magic; -+ u_int16_t version; -+ u_int16_t length; -+ u_int16_t vendor; -+ u_int16_t product; -+ u_int32_t revision; -+} __attribute__((packed)); -+ -+/* we mirror the trailer because we want it to be longer in later versions -+ * while keeping backwards compatibility */ -+static inline void dfu_trailer_mirror(struct uboot_dfu_trailer *trailer, -+ unsigned char *eof) -+{ -+ int i; -+ int len = sizeof(struct uboot_dfu_trailer); -+ unsigned char *src = eof - len; -+ unsigned char *dst = (unsigned char *) trailer; -+ -+ for (i = 0; i < len; i++) -+ dst[len-1-i] = src[i]; -+} -+ -+#endif /* _USB_DFU_TRAILER_H */ -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -261,6 +261,12 @@ - $(obj)u-boot.bin: $(obj)u-boot - $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ - -+$(obj)u-boot.udfu: $(obj)u-boot.bin -+ ./tools/mkudfu -v $(CONFIG_USB_DFU_VENDOR) \ -+ -p $(CONFIG_USB_DFU_PRODUCT) \ -+ -r $(CONFIG_USB_DFU_REVISION) \ -+ -d $< $@ -+ - $(obj)u-boot.img: $(obj)u-boot.bin - ./tools/mkimage -A $(ARCH) -T firmware -C none \ - -a $(TEXT_BASE) -e 0 \ -Index: u-boot/board/neo1973/gta01/split_by_variant.sh -=================================================================== ---- u-boot.orig/board/neo1973/gta01/split_by_variant.sh -+++ u-boot/board/neo1973/gta01/split_by_variant.sh -@@ -15,37 +15,44 @@ - echo "$0:: No parameters - using GTA01Bv3 config" - echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC - echo "GTA01_BIG_RAM=y" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0230" > $CFGTMP - else - case "$1" in - gta01v4_config) - echo "#define CONFIG_ARCH_GTA01_v4" > $CFGINC - echo "GTA01_BIG_RAM=n" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0140" > $CFGTMP - ;; - - gta01v3_config) - echo "#define CONFIG_ARCH_GTA01_v3" > $CFGINC - echo "GTA01_BIG_RAM=n" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0130" > $CFGTMP - ;; - - gta01bv2_config) - echo "#define CONFIG_ARCH_GTA01B_v2" > $CFGINC - echo "GTA01_BIG_RAM=y" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0220" > $CFGTMP - ;; - - gta01bv3_config) - echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC - echo "GTA01_BIG_RAM=y" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0230" > $CFGTMP - ;; - - gta01bv4_config) - echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC - echo "GTA01_BIG_RAM=y" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0240" > $CFGTMP - ;; - - *) - echo "$0:: Unrecognised config - using GTA01Bv4 config" - echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC - echo "GTA01_BIG_RAM=y" > $CFGTMP -+ echo "CONFIG_USB_DFU_REVISION=0x0240" > $CFGTMP - ;; - - esac -Index: u-boot/board/neo1973/gta01/config.mk -=================================================================== ---- u-boot.orig/board/neo1973/gta01/config.mk -+++ u-boot/board/neo1973/gta01/config.mk -@@ -24,6 +24,9 @@ - # - # download area is 3200'0000 or 3300'0000 - -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x5119 -+ - sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - - ifeq ($(GTA01_BIG_RAM),y) diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch deleted file mode 100644 index ca54ebeff7..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch +++ /dev/null @@ -1,1560 +0,0 @@ -Add support for new GTA02 version of Neo1973 - -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2038,6 +2038,10 @@ - sbc2410x_config: unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 - -+gta02_config \ -+gta02v1_config : unconfig -+ @sh board/neo1973/gta02/split_by_variant.sh $@ -+ - gta01_config \ - gta01v3_config \ - gta01bv2_config \ -Index: u-boot/board/neo1973/gta02/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/Makefile -@@ -0,0 +1,64 @@ -+# -+# (C) Copyright 2000, 2001, 2002 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = lib$(BOARD).a -+ -+OBJS := gta02.o pcf50633.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o -+SOBJS := ../common/lowlevel_init.o -+ -+.PHONY: all -+ -+all: $(LIB) lowevel_foo.bin -+ -+$(LIB): $(OBJS) $(SOBJS) -+ $(AR) crv $@ $(OBJS) $(SOBJS) -+ -+lowlevel_foo.o: ../common/lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o ../common/lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o ../common/lowlevel_init.o ../common/lowlevel_foo.lds -+ $(LD) -T ../common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ ../common/lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin -+ -+######################################################################### -+ -+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) -+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ -+ -+-include .depend -+ -+######################################################################### -Index: u-boot/board/neo1973/gta02/gta02.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/gta02.c -@@ -0,0 +1,313 @@ -+/* -+ * (C) 2006-2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on existing S3C2410 startup code in u-boot: -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+#include -+ -+#include "../common/neo1973.h" -+#include "../common/jbt6k74.h" -+ -+#include "pcf50633.h" -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+/* That many seconds the power key needs to be pressed to power up */ -+#define POWER_KEY_SECONDS 2 -+ -+#define M_MDIV 0x7f /* Fout = 405.00MHz */ -+#define M_PDIV 0x2 -+#define M_SDIV 0x1 -+ -+#define U_M_MDIV 0x38 -+#define U_M_PDIV 0x2 -+#define U_M_SDIV 0x2 -+ -+unsigned int neo1973_wakeup_cause; -+extern int nobootdelay; -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+#if defined(CONFIG_ARCH_GTA02_v1) -+ gpio->GPACON = 0x007E1FFF; -+ gpio->GPADAT |= (1 << 16); /* Set GPA16 to high (nNAND_WP) */ -+ -+ gpio->GPBCON = 0x00155555; -+ gpio->GPBUP = 0x000007FF; -+ -+ gpio->GPCCON = 0x55551155; -+ gpio->GPCUP = 0x0000FFFF; -+ -+ gpio->GPDCON = 0x55555555; -+ gpio->GPDUP = 0x0000FFFF; -+ -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ -+ gpio->GPFCON = 0x0000AAAA; -+ gpio->GPFUP = 0x000000FF; -+ -+ gpio->GPGCON = 0x013DFDFA; -+ gpio->GPGUP = 0x0000FFFF; -+ -+ gpio->GPHCON = 0x0028AAAA; -+ gpio->GPHUP = 0x000007FF; -+ -+ gpio->GPJCON = 0x1545541; -+#else -+#error Please define GTA02 version -+#endif -+ -+ /* arch number of SMDK2410-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA02; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int board_late_init(void) -+{ -+ extern unsigned char booted_from_nand; -+ unsigned char tmp; -+ char buf[32]; -+ int menu_vote = 0; /* <= 0: no, > 0: yes */ -+ int seconds = 0; -+ -+ /* Initialize the Power Management Unit with a safe register set */ -+ pcf50633_init(); -+#if 0 -+ /* if there's no other reason, must be regular reset */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; -+ -+ if (!booted_from_nand) -+ goto woken_by_reset; -+ -+ /* obtain wake-up reason, save INT1 in environment */ -+ tmp = pcf50606_reg_read(PCF50606_REG_INT1); -+ sprintf(buf, "0x%02x", tmp); -+ setenv("pcf50606_int1", buf); -+ -+ if (tmp & PCF50606_INT1_ALARM) { -+ /* we've been woken up by RTC alarm, boot */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; -+ goto continue_boot; -+ } -+ if (tmp & PCF50606_INT1_EXTONR) { -+ /* we've been woken up by charger insert */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; -+ } -+ -+ if (tmp & PCF50606_INT1_ONKEYF) { -+ /* we've been woken up by a falling edge of the onkey */ -+ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; -+ } -+ -+ if (neo1973_wakeup_cause == NEO1973_WAKEUP_CHARGER) { -+ /* if we still think it was only a charger insert, boot */ -+ goto continue_boot; -+ } -+ -+woken_by_reset: -+ -+ while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET || -+ neo1973_on_key_pressed()) { -+ if (neo1973_aux_key_pressed()) -+ menu_vote++; -+ else -+ menu_vote--; -+ -+ if (neo1973_new_second()) -+ seconds++; -+ if (seconds >= POWER_KEY_SECONDS) -+ goto continue_boot; -+ } -+ /* Power off if minimum number of seconds not reached */ -+ neo1973_poweroff(); -+ -+continue_boot: -+ jbt6k74_init(); -+ jbt6k74_enter_state(JBT_STATE_NORMAL); -+ jbt6k74_display_onoff(1); -+#endif -+ -+ /* issue a short pulse with the vibrator */ -+ neo1973_vibrator(1); -+ udelay(50000); -+ neo1973_vibrator(0); -+ -+ /* switch on the backlight */ -+ neo1973_backlight(1); -+ -+#if 0 -+ { -+ /* check if sd card is inserted, and power-up if it is */ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (!(gpio->GPFDAT & (1 << 5))) -+ gpio->GPBDAT &= ~(1 << 2); -+ } -+ -+ if (menu_vote > 0) { -+ bootmenu(); -+ nobootdelay = 1; -+ } -+#endif -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+u_int32_t get_board_rev(void) -+{ -+#if defined(CONFIG_ARCH_GTA02_v1) -+ return 0x00000310; -+#endif -+} -+ -+void neo1973_poweroff(void) -+{ -+ printf("poweroff\n"); -+ udc_disconnect(); -+ pcf50633_reg_write(PCF50633_REG_OOCSHDWN, 0x01); -+ /* don't return to caller */ -+ while (1) ; -+} -+ -+void neo1973_backlight(int on) -+{ -+ /* FIXME: PMU based implementation */ -+} -+ -+/* FIXME: shared */ -+void neo1973_vibrator(int on) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (on) -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPGDAT |= (1 << 11); /* GPG11 */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ gpio->GPBDAT |= (1 << 10); /* GPB10 */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) -+ gpio->GPBDAT |= (1 << 3); /* GPB3 */ -+#endif -+ else -+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) -+ gpio->GPGDAT &= ~(1 << 11); /* GPG11 */ -+#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) -+ gpio->GPBDAT &= ~(1 << 10); /* GPB10 */ -+#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) -+ gpio->GPBDAT &= ~(1 << 3); /* GPB3 */ -+#endif -+} -+ -+int neo1973_new_second(void) -+{ -+ return pcf50633_reg_read(PCF50633_REG_INT1) & PCF50633_INT1_SECOND; -+} -+ -+int neo1973_on_key_pressed(void) -+{ -+ return !(pcf50633_reg_read(PCF50633_REG_OOCSTAT) -+ & PCF50633_OOCSTAT_ONKEY); -+} -+ -+/* FIXME: shared */ -+int neo1973_aux_key_pressed(void) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ if (gpio->GPFDAT & (1 << 6)) -+ return 0; -+ return 1; -+} -+ -+/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. -+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 -+ images: 640*480*2*2 = 1228800 < 1245184. */ -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, CFG_ENV_SIZE, 0x200000, 0xa0000, 0x1fce0000, 0 }; -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -+ -+const char *neo1973_get_charge_status(void) -+{ -+ /* FIXME */ -+ return "unknown"; -+} -+ -+int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd) -+{ -+ /* FIXME */ -+ return 0; -+} -Index: u-boot/board/neo1973/gta02/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/include/configs/neo1973_gta02.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/neo1973_gta02.h -@@ -0,0 +1,276 @@ -+/* -+ * (C) Copyright 2007 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * Configuation settings for the FIC Neo1973 GTA02 Linux GSM phone -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+/* we want to be able to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+ -+#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2410 SoC */ -+#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2410 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA02 has this input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) -+ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL3 1 /* we use SERIAL 1 on GTA01 */ -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LAODB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ /* CFG_CMD_BMP | */ \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ /* CFG_CMD_USB | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_DIAG | \ -+ /* CFG_CMD_HWFLOW | */ \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "" -+#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#if defined(CONFIG_ARCH_GTA02_v1) -+#define CFG_PROMPT "GTA02v1 # " /* Monitor Command Prompt */ -+#endif -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 64 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+#define CFG_BOOTMENU -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (128*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#if 0 -+#define CONFIG_USB_OHCI 1 -+#endif -+ -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" -+#define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ -+#define CONFIG_USBD_DFU_INTERFACE 2 -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "usbtty=cdc_acm\0" \ -+ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8\0" \ -+ "" -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+/* No NOR flash in this device */ -+#define CFG_NO_FLASH 1 -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x40000 /* 128k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ -+#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+/* EXT2 driver */ -+#define CONFIG_EXT2 1 -+ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 1 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#endif -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50633 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+/* we have a board_late_init() function */ -+#define BOARD_LATE_INIT 1 -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_SPLASH_SCREEN -+#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ -+#define CONFIG_VIDEO_BMP_GZIP -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+#define CONFIG_UNZIP -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+//#define CONFIG_S3C2410_NAND_HWECC 1 -+ -+#define CONFIG_DRIVER_PCF50633 1 -+ -+#define MTDIDS_DEFAULT "nand0=neo1973-nand" -+#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),128k(u-boot_env),2M(kernel),640k(splash),-(jffs2)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand" -+#define CONFIG_NAND_DYNPART -+ -+#endif /* __CONFIG_H */ -Index: u-boot/board/neo1973/gta02/split_by_variant.sh -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/split_by_variant.sh -@@ -0,0 +1,37 @@ -+#!/bin/sh -+# --------------------------------------------------------- -+# Set the core module defines according to Core Module -+# --------------------------------------------------------- -+# --------------------------------------------------------- -+# Set up the GTA01 type define -+# --------------------------------------------------------- -+ -+CFGINC=${obj}include/config.h -+CFGTMP=${obj}board/neo1973/gta02/config.tmp -+ -+mkdir -p ${obj}include -+if [ "$1" == "" ] -+then -+ echo "$0:: No parameters - using GTA02Bv1 config" -+ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC -+ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP -+else -+ case "$1" in -+ gta02v1_config) -+ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC -+ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP -+ ;; -+ -+ *) -+ echo "$0:: Unrecognised config - using GTA02v1 config" -+ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC -+ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP -+ ;; -+ -+ esac -+ -+fi -+# --------------------------------------------------------- -+# Complete the configuration -+# --------------------------------------------------------- -+$MKCONFIG -a neo1973_gta02 arm arm920t gta02 neo1973 s3c24x0 -Index: u-boot/include/pcf50633.h -=================================================================== ---- /dev/null -+++ u-boot/include/pcf50633.h -@@ -0,0 +1,235 @@ -+#ifndef _PCF50633_H -+#define _PCF50633_H -+ -+/* Philips PCF50633 Power Managemnt Unit (PMU) driver -+ * (C) 2006-2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ */ -+ -+enum pfc50633_regs { -+ PCF50633_REG_VERSION = 0x00, -+ PCF50633_REG_VARIANT = 0x01, -+ PCF50633_REG_INT1 = 0x02, /* Interrupt Status */ -+ PCF50633_REG_INT2 = 0x03, /* Interrupt Status */ -+ PCF50633_REG_INT3 = 0x04, /* Interrupt Status */ -+ PCF50633_REG_INT4 = 0x05, /* Interrupt Status */ -+ PCF50633_REG_INT5 = 0x06, /* Interrupt Status */ -+ PCF50633_REG_INT1M = 0x07, /* Interrupt Mask */ -+ PCF50633_REG_INT2M = 0x08, /* Interrupt Mask */ -+ PCF50633_REG_INT3M = 0x09, /* Interrupt Mask */ -+ PCF50633_REG_INT4M = 0x0a, /* Interrupt Mask */ -+ PCF50633_REG_INT5M = 0x0b, /* Interrupt Mask */ -+ PCF50633_REG_OOCSHDWN = 0x0c, -+ PCF50633_REG_OOCWAKE = 0x0d, -+ PCF50633_REG_OOCTIM1 = 0x0e, -+ PCF50633_REG_OOCTIM2 = 0x0f, -+ PCF50633_REG_OOCMODE = 0x10, -+ PCF50633_REG_OOCCTL = 0x11, -+ PCF50633_REG_OOCSTAT = 0x12, -+ PCF50633_REG_GPIOCTL = 0x13, -+ PCF50633_REG_GPIO1CFG = 0x14, -+ PCF50633_REG_GPIO2CFG = 0x15, -+ PCF50633_REG_GPIO3CFG = 0x16, -+ PCF50633_REG_GPOCFG = 0x17, -+ PCF50633_REG_BVMCTL = 0x18, -+ PCF50633_REG_SVMCTL = 0x19, -+ PCF50633_REG_AUTOOUT = 0x1a, -+ PCF50633_REG_AUTOENA = 0x1b, -+ PCF50633_REG_AUTOCTL = 0x1c, -+ PCF50633_REG_AUTOMXC = 0x1d, -+ PCF50633_REG_DOWN1OUT = 0x1e, -+ PCF50633_REG_DOWN1ENA = 0x1f, -+ PCF50633_REG_DOWN1CTL = 0x20, -+ PCF50633_REG_DOWN1MXC = 0x21, -+ PCF50633_REG_DOWN2OUT = 0x22, -+ PCF50633_REG_DOWN2ENA = 0x23, -+ PCF50633_REG_DOWN2CTL = 0x24, -+ PCF50633_REG_DOWN2MXC = 0x25, -+ PCF50633_REG_MEMLDOOUT = 0x26, -+ PCF50633_REG_MEMLDOENA = 0x27, -+ PCF50633_REG_LEDOUT = 0x28, -+ PCF50633_REG_LEDENA = 0x29, -+ PCF50633_REG_LEDCTL = 0x2a, -+ PCF50633_REG_LEDDIM = 0x2b, -+ /* reserved */ -+ PCF50633_REG_LDO1OUT = 0x2d, -+ PCF50633_REG_LDO1ENA = 0x2e, -+ PCF50633_REG_LDO2OUT = 0x2f, -+ PCF50633_REG_LDO2ENA = 0x30, -+ PCF50633_REG_LDO3OUT = 0x31, -+ PCF50633_REG_LDO3ENA = 0x32, -+ PCF50633_REG_LDO4OUT = 0x33, -+ PCF50633_REG_LDO4ENA = 0x34, -+ PCF50633_REG_LDO5OUT = 0x35, -+ PCF50633_REG_LDO5ENA = 0x36, -+ PCF50633_REG_LDO6OUT = 0x37, -+ PCF50633_REG_LDO6ENA = 0x38, -+ PCF50633_REG_HCLDOOUT = 0x39, -+ PCF50633_REG_HCLDOENA = 0x3a, -+ PCF50633_REG_STBYCTL1 = 0x3b, -+ PCF50633_REG_STBYCTL2 = 0x3c, -+ PCF50633_REG_DEBPF1 = 0x3d, -+ PCF50633_REG_DEBPF2 = 0x3e, -+ PCF50633_REG_DEBPF3 = 0x3f, -+ PCF50633_REG_HCLDOOVL = 0x40, -+ PCF50633_REG_DCDCSTAT = 0x41, -+ PCF50633_REG_LDOSTAT = 0x42, -+ PCF50633_REG_MBCC1 = 0x43, -+ PCF50633_REG_MBCC2 = 0x44, -+ PCF50633_REG_MBCC3 = 0x45, -+ PCF50633_REG_MBCC4 = 0x46, -+ PCF50633_REG_MBCC5 = 0x47, -+ PCF50633_REG_MBCC6 = 0x48, -+ PCF50633_REG_MBCC7 = 0x49, -+ PCF50633_REG_MBCC8 = 0x4a, -+ PCF50633_REG_MBCS1 = 0x4b, -+ PCF50633_REG_MBCS2 = 0x4c, -+ PCF50633_REG_MBCS3 = 0x4d, -+ PCF50633_REG_BBCCTL = 0x4e, -+ PCF50633_REG_ALMGAIN = 0x4f, -+ PCF50633_REG_ALMDATA = 0x50, -+ /* reserved */ -+ PCF50633_REG_ADCC3 = 0x52, -+ PCF50633_REG_ADCC2 = 0x53, -+ PCF50633_REG_ADCC1 = 0x54, -+ PCF50633_REG_ADCS1 = 0x55, -+ PCF50633_REG_ADCS2 = 0x56, -+ PCF50633_REG_ADCS3 = 0x57, -+ /* reserved */ -+ PCF50633_REG_RTCSC = 0x59, /* Second */ -+ PCF50633_REG_RTCMN = 0x5a, /* Minute */ -+ PCF50633_REG_RTCHR = 0x5b, /* Hour */ -+ PCF50633_REG_RTCWD = 0x5c, /* Weekday */ -+ PCF50633_REG_RTCDT = 0x5d, /* Day */ -+ PCF50633_REG_RTCMT = 0x5e, /* Month */ -+ PCF50633_REG_RTCYR = 0x5f, /* Year */ -+ PCF50633_REG_RTCSCA = 0x60, /* Alarm Second */ -+ PCF50633_REG_RTCMNA = 0x61, /* Alarm Minute */ -+ PCF50633_REG_RTCHRA = 0x62, /* Alarm Hour */ -+ PCF50633_REG_RTCWDA = 0x63, /* Alarm Weekday */ -+ PCF50633_REG_RTCDTA = 0x64, /* Alarm Day */ -+ PCF50633_REG_RTCMTA = 0x65, /* Alarm Month */ -+ PCF50633_REG_RTCYRA = 0x66, /* Alarm Year */ -+ -+ PCF50633_REG_MEMBYTE0 = 0x67, -+ PCF50633_REG_MEMBYTE1 = 0x68, -+ PCF50633_REG_MEMBYTE2 = 0x69, -+ PCF50633_REG_MEMBYTE3 = 0x6a, -+ PCF50633_REG_MEMBYTE4 = 0x6b, -+ PCF50633_REG_MEMBYTE5 = 0x6c, -+ PCF50633_REG_MEMBYTE6 = 0x6d, -+ PCF50633_REG_MEMBYTE7 = 0x6e, -+ /* reserved */ -+ PCF50633_REG_DCDCPFM = 0x84, -+ __NUM_PCF50633_REGS -+}; -+ -+enum pcf50633_reg_int1 { -+ PCF50633_INT1_ADPINS = 0x01, /* Adapter inserted */ -+ PCF50633_INT1_ADPREM = 0x02, /* Adapter removed */ -+ PCF50633_INT1_USBINS = 0x04, /* USB inserted */ -+ PCF50633_INT1_USBREM = 0x08, /* USB removed */ -+ /* reserved */ -+ PCF50633_INT1_ALARM = 0x40, /* RTC alarm time is reached */ -+ PCF50633_INT1_SECOND = 0x80, /* RTC periodic second interrupt */ -+}; -+ -+enum pcf50633_reg_int2 { -+ PCF50633_INT2_ONKEYR = 0x01, /* ONKEY rising edge */ -+ PCF50633_INT2_ONKEYF = 0x02, /* ONKEY falling edge */ -+ PCF50633_INT2_EXTON1R = 0x04, /* EXTON1 rising edge */ -+ PCF50633_INT2_EXTON1F = 0x08, /* EXTON1 falling edge */ -+ PCF50633_INT2_EXTON2R = 0x10, /* EXTON2 rising edge */ -+ PCF50633_INT2_EXTON2F = 0x20, /* EXTON2 falling edge */ -+ PCF50633_INT2_EXTON3R = 0x40, /* EXTON3 rising edge */ -+ PCF50633_INT2_EXTON3F = 0x80, /* EXTON3 falling edge */ -+}; -+ -+enum pcf50633_reg_int3 { -+ PCF50633_INT3_BATFULL = 0x01, /* Battery full */ -+ PCF50633_INT3_CHGHALT = 0x02, /* Charger halt */ -+ PCF50633_INT3_THLIMON = 0x04, -+ PCF50633_INT3_THLIMOFF = 0x08, -+ PCF50633_INT3_USBLIMON = 0x10, -+ PCF50633_INT3_USBLIMOFF = 0x20, -+ PCF50633_INT3_ADCRDY = 0x40, /* ADC conversion finished */ -+ PCF50633_INT3_ONKEY1S = 0x80, /* ONKEY pressed 1 second */ -+}; -+ -+enum pcf50633_reg_int4 { -+ PCF50633_INT4_LOWSYS = 0x01, -+ PCF50633_INT4_LOWBAT = 0x02, -+ PCF50633_INT4_HIGHTMP = 0x04, -+ PCF50633_INT4_AUTOPWRFAIL = 0x08, -+ PCF50633_INT4_DWN1PWRFAIL = 0x10, -+ PCF50633_INT4_DWN2PWRFAIL = 0x20, -+ PCF50633_INT4_LEDPWRFAIL = 0x40, -+ PCF50633_INT4_LEDOVP = 0x80, -+}; -+ -+enum pcf50633_reg_int5 { -+ PCF50633_INT4_LDO1PWRFAIL = 0x01, -+ PCF50633_INT4_LDO2PWRFAIL = 0x02, -+ PCF50633_INT4_LDO3PWRFAIL = 0x04, -+ PCF50633_INT4_LDO4PWRFAIL = 0x08, -+ PCF50633_INT4_LDO5PWRFAIL = 0x10, -+ PCF50633_INT4_LDO6PWRFAIL = 0x20, -+ PCF50633_INT4_HCLDOPWRFAIL = 0x40, -+ PCF50633_INT4_HCLDOOVL = 0x80, -+}; -+ -+enum pcf50633_reg_oocwake { -+ PCF50633_OOCWAKE_ONKEY = 0x01, -+ PCF50633_OOCWAKE_EXTON1 = 0x02, -+ PCF50633_OOCWAKE_EXTON2 = 0x04, -+ PCF50633_OOCWAKE_EXTON3 = 0x08, -+ PCF50633_OOCWAKE_RTC = 0x10, -+ /* reserved */ -+ PCF50633_OOCWAKE_USB = 0x40, -+ PCF50633_OOCWAKE_ADP = 0x80, -+}; -+ -+enum pcf50633_reg_mbcc1 { -+ PCF50633_MBCC1_CHGENA = 0x01, /* Charger enable */ -+ PCF50633_MBCC1_AUTOSTOP = 0x02, -+ PCF50633_MBCC1_AUTORES = 0x04, /* automatic resume */ -+ PCF50633_MBCC1_RESUME = 0x08, /* explicit resume cmd */ -+ PCF50633_MBCC1_RESTART = 0x10, /* restart charging */ -+ PCF50633_MBCC1_PREWDTIME_60M = 0x20, /* max. precharging time */ -+ PCF50633_MBCC1_WDTIME_1H = 0x00, -+ PCF50633_MBCC1_WDTIME_2H = 0x40, -+ PCF50633_MBCC1_WDTIME_4H = 0x80, -+ PCF50633_MBCC1_WDTIME_6H = 0xc0, -+}; -+#define PCF50633_MBCC1_WDTIME_MASK 0xc0 -+ -+enum pcf50633_reg_mbcc2 { -+ PCF50633_MBCC2_VBATCOND_2V7 = 0x00, -+ PCF50633_MBCC2_VBATCOND_2V85 = 0x01, -+ PCF50633_MBCC2_VBATCOND_3V = 0x02, -+ PCF50633_MBCC2_VBATCOND_3V15 = 0x03, -+ PCF50633_MBCC2_VMAX_4V = 0x00, -+ PCF50633_MBCC2_VMAX_4V20 = 0x28, -+ PCF50633_MBCC2_VRESDEBTIME_64S = 0x80, /* debounce time (32/64sec) */ -+}; -+#define PCF50633_MBCC2_VBATCOND_MASK 0x03 -+#define PCF50633_MBCC2_VMAX_MASK 0x3c -+ -+#define PCF50633_OOCSTAT_ONKEY 0x01 -+ -+/* this is to be provided by the board implementation */ -+extern const u_int8_t pcf50633_initial_regs[__NUM_PCF50633_REGS]; -+ -+void pcf50633_reg_write(u_int8_t reg, u_int8_t val); -+ -+u_int8_t pcf50633_reg_read(u_int8_t reg); -+ -+void pcf50633_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val); -+void pcf50633_reg_clear_bits(u_int8_t reg, u_int8_t bits); -+ -+void pcf50633_init(void); -+void pcf50633_usb_maxcurrent(unsigned int ma); -+ -+#endif /* _PCF50633_H */ -+ -Index: u-boot/drivers/pcf50633.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/pcf50633.c -@@ -0,0 +1,142 @@ -+#include -+ -+#ifdef CONFIG_DRIVER_PCF50633 -+ -+#include -+#include -+#include -+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -+ -+#define PCF50633_I2C_ADDR 0x73 -+ -+void __pcf50633_reg_write(u_int8_t reg, u_int8_t val) -+{ -+ i2c_write(PCF50633_I2C_ADDR, reg, 1, &val, 1); -+} -+ -+u_int8_t __pcf50633_reg_read(u_int8_t reg) -+{ -+ u_int8_t tmp; -+ i2c_read(PCF50633_I2C_ADDR, reg, 1, &tmp, 1); -+ return tmp; -+} -+ -+void pcf50633_reg_write(u_int8_t reg, u_int8_t val) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ __pcf50633_reg_write(reg, val); -+ local_irq_restore(flags); -+} -+ -+u_int8_t pcf50633_reg_read(u_int8_t reg) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = __pcf50633_reg_read(reg); -+ local_irq_restore(flags); -+ -+ return tmp; -+} -+ -+void pcf50633_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = __pcf50633_reg_read(reg); -+ __pcf50633_reg_write(reg, (val & mask) | (tmp & ~mask)); -+ local_irq_restore(flags); -+} -+ -+void pcf50633_reg_clear_bits(u_int8_t reg, u_int8_t bits) -+{ -+ unsigned long flags; -+ u_int8_t tmp; -+ -+ local_irq_save(flags); -+ tmp = pcf50633_reg_read(reg); -+ pcf50633_reg_write(reg, (tmp & ~bits)); -+ local_irq_restore(flags); -+} -+ -+static const u_int8_t regs_invalid[] = { -+ PCF50633_REG_VERSION, -+ PCF50633_REG_VARIANT, -+ PCF50633_REG_OOCSHDWN, -+ PCF50633_REG_INT1, -+ PCF50633_REG_INT2, -+ PCF50633_REG_INT3, -+ PCF50633_REG_INT4, -+ PCF50633_REG_INT5, -+ PCF50633_REG_OOCSTAT, -+ 0x2c, -+ PCF50633_REG_DCDCSTAT, -+ PCF50633_REG_LDOSTAT, -+ PCF50633_REG_MBCS1, -+ PCF50633_REG_MBCS2, -+ PCF50633_REG_MBCS3, -+ PCF50633_REG_ALMDATA, -+ 0x51, -+ /* 0x55 ... 0x6e: don't write */ -+ /* 0x6f ... 0x83: reserved */ -+}; -+#define PCF50633_LAST_REG 0x55 -+ -+static int reg_is_invalid(u_int8_t reg) -+{ -+ int i; -+ -+ /* all registers above 0x55 (ADCS1) except 0x84 */ -+ if (reg == PCF50633_REG_DCDCPFM) -+ return 0; -+ if (reg >= 0x55) -+ return 1; -+ -+ for (i = 0; i < ARRAY_SIZE(regs_invalid); i++) { -+ if (regs_invalid[i] > reg) -+ return 0; -+ if (regs_invalid[i] == reg) -+ return 1; -+ } -+ -+ return 0; -+} -+ -+ -+/* initialize PCF50633 register set */ -+void pcf50633_init(void) -+{ -+ unsigned long flags; -+ u_int8_t i; -+ -+ local_irq_save(flags); -+ for (i = 0; i < PCF50633_LAST_REG; i++) { -+ if (reg_is_invalid(i)) -+ continue; -+ __pcf50633_reg_write(i, pcf50633_initial_regs[i]); -+ } -+ local_irq_restore(flags); -+} -+ -+void pcf50633_usb_maxcurrent(unsigned int ma) -+{ -+ u_int8_t val; -+ -+ if (ma < 100) -+ val = 0x03; -+ else if (ma < 500) -+ val = 0x00; -+ else if (ma < 1000) -+ val = 0x01; -+ else -+ val = 0x02; -+ -+ return pcf50633_reg_set_bit_mask(PCF50633_REG_MBCC7, 0x03, val); -+} -+ -+#endif /* CONFIG DRIVER_PCF50633 */ -Index: u-boot/board/neo1973/common/lowlevel_init.S -=================================================================== ---- u-boot.orig/board/neo1973/common/lowlevel_init.S -+++ u-boot/board/neo1973/common/lowlevel_init.S -@@ -49,7 +49,7 @@ - #define WAIT (0x1<<2) - #define UBLB (0x1<<3) - --#define B1_BWSCON (DW32) -+#define B1_BWSCON (DW16 + WAIT + UBLB) - #define B2_BWSCON (DW16) - #define B3_BWSCON (DW16 + WAIT + UBLB) - #define B4_BWSCON (DW16) -@@ -68,9 +68,9 @@ - - /* BANK1CON */ - #define B1_Tacs 0x0 /* 0clk */ --#define B1_Tcos 0x0 /* 0clk */ --#define B1_Tacc 0x7 /* 14clk */ --#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tcos 0x1 /* 1clk */ -+#define B1_Tacc 0x4 /* 4clk */ -+#define B1_Tcoh 0x1 /* 1clk */ - #define B1_Tah 0x0 /* 0clk */ - #define B1_Tacp 0x0 - #define B1_PMC 0x0 -@@ -112,7 +112,7 @@ - #if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) - #define B6_SCAN 0x1 /* 9bit */ - #elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ -- defined(CONFIG_ARCH_GTA01B_v4) -+ defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) - #define B6_SCAN 0x2 /* 10bit */ - #endif - -@@ -165,6 +165,18 @@ - str r1, [r0] - #endif - -+#if defined(CONFIG_ARCH_GTA02_v1) -+ /* enable KEEPACT to make sure PMU keeps us alive */ -+ ldr r0, =0x56000000 /* GPJ base */ -+ ldr r1, [r0, #0xd0] /* GPJCON */ -+ orr r1, r1, #(1 << 6) -+ str r1, [r0, #0xd0] -+ -+ ldr r1, [r0, #0xd4] /* GPJDAT */ -+ orr r1, r1, #(1 << 3) -+ str r1, [r0, #0xd4] -+#endif -+ - /* everything is fine now */ - mov pc, lr - -Index: u-boot/board/neo1973/gta02/pcf50633.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/pcf50633.c -@@ -0,0 +1,91 @@ -+ -+#include -+#include -+ -+/* initial register set for PCF50633 in Neo1973 GTA02 devices */ -+const u_int8_t pcf50633_initial_regs[__NUM_PCF50633_REGS] = { -+ /* gap */ -+ [PCF50633_REG_INT1M] = PCF50633_INT1_SECOND, -+ [PCF50633_REG_INT2M] = PCF50633_INT2_EXTON3F | -+ PCF50633_INT2_EXTON3R | -+ PCF50633_INT2_EXTON2F | -+ PCF50633_INT2_EXTON2R | -+ PCF50633_INT2_EXTON1R | -+ PCF50633_INT2_EXTON1F, -+ [PCF50633_REG_INT3M] = PCF50633_INT3_ADCRDY, -+ [PCF50633_REG_INT4M] = 0x00, -+ [PCF50633_REG_INT5M] = 0x00, -+ -+ [PCF50633_REG_OOCWAKE] = 0xd3, /* wake from ONKEY,EXTON!,RTC,USB,ADP */ -+ [PCF50633_REG_OOCTIM1] = 0xaa, /* debounce 14ms everything */ -+ [PCF50633_REG_OOCTIM2] = 0x4a, -+ [PCF50633_REG_OOCMODE] = 0x55, -+ [PCF50633_REG_OOCCTL] = 0x44, -+ -+ [PCF50633_REG_GPIOCTL] = 0x01, /* only GPIO1 is input */ -+ [PCF50633_REG_GPIO2CFG] = 0x00, -+ [PCF50633_REG_GPIO3CFG] = 0x00, -+ [PCF50633_REG_GPOCFG] = 0x00, -+ -+ [PCF50633_REG_SVMCTL] = 0x08, /* 3.10V SYS voltage thresh. */ -+ [PCF50633_REG_BVMCTL] = 0x02, /* 2.80V BAT voltage thresh. */ -+ -+ [PCF50633_REG_STBYCTL1] = 0x00, -+ [PCF50633_REG_STBYCTL2] = 0x00, -+ -+ [PCF50633_REG_DEBPF1] = 0xff, -+ [PCF50633_REG_DEBPF2] = 0xff, -+ [PCF50633_REG_DEBPF2] = 0x3f, -+ -+ [PCF50633_REG_AUTOOUT] = 0x6b, /* 3.300V */ -+ [PCF50633_REG_AUTOENA] = 0x01, /* always on */ -+ [PCF50633_REG_AUTOCTL] = 0x00, /* automatic up/down operation */ -+ [PCF50633_REG_AUTOMXC] = 0x0a, /* 400mA at startup FIXME */ -+ -+ [PCF50633_REG_DOWN1OUT] = 0x1b, /* 1.3V (0x1b * .025V + 0.625V) */ -+ [PCF50633_REG_DOWN1ENA] = 0x02, /* enabled if GPIO1 = HIGH */ -+ [PCF50633_REG_DOWN1CTL] = 0x00, /* no DVM */ -+ [PCF50633_REG_DOWN1MXC] = 0x22, /* limit to 510mA at startup */ -+ -+ [PCF50633_REG_DOWN2OUT] = 0x2f, /* 1.8V (0x2f * .025V + 0.625V) */ -+ [PCF50633_REG_DOWN2ENA] = 0x02, /* enabled if GPIO1 = HIGH */ -+ [PCF50633_REG_DOWN2CTL] = 0x00, /* no DVM */ -+ [PCF50633_REG_DOWN2MXC] = 0x22, /* limit to 510mA at startup */ -+ -+ [PCF50633_REG_MEMLDOOUT] = 0x00, -+ [PCF50633_REG_MEMLDOENA] = 0x00, -+ -+ [PCF50633_REG_LEDOUT] = 0x2f, /* full backlight power */ -+ [PCF50633_REG_LEDENA] = 0x02, /* enabled if GPIO1 = HIGH */ -+ [PCF50633_REG_LEDCTL] = 0x05, /* ovp enabled, ocp 500mA */ -+ [PCF50633_REG_LEDDIM] = 0x20, /* dimming curve */ -+ -+ [PCF50633_REG_LDO1OUT] = 0x04, /* 1.3V (4 * 0.1V + 0.9V) */ -+ [PCF50633_REG_LDO1ENA] = 0x01, /* always on */ -+ -+ [PCF50633_REG_LDO2OUT] = 0x18, /* 3.3V (24 * 0.1V + 0.9V) */ -+ [PCF50633_REG_LDO2ENA] = 0x02, /* enabled if GPIO1 = HIGH */ -+ -+ [PCF50633_REG_LDO3OUT] = 0x15, /* 3.0V (21 * 0.1V + 0.9V) */ -+ [PCF50633_REG_LDO3ENA] = 0x02, /* enabled if GPIO1 = HIGH */ -+ -+ [PCF50633_REG_LDO4ENA] = 0x00, -+ [PCF50633_REG_LDO5ENA] = 0x00, -+ [PCF50633_REG_LDO6ENA] = 0x00, -+ -+ [PCF50633_REG_HCLDOOUT] = 0x18, /* 3.3V (24 * 0.1V + 0.9V) */ -+ [PCF50633_REG_HCLDOENA] = 0x00, /* off by default*/ -+ -+ [PCF50633_REG_DCDCPFM] = 0x00, /* off by default*/ -+ -+ [PCF50633_REG_MBCC1] = 0xe6, -+ [PCF50633_REG_MBCC2] = 0x28, /* Vbatconid=2.7V, Vmax=4.20V */ -+ [PCF50633_REG_MBCC3] = 0x19, /* 25/255 == 98mA pre-charge */ -+ [PCF50633_REG_MBCC4] = 0xff, /* 255/255 == 1A adapter fast */ -+ [PCF50633_REG_MBCC5] = 0x7f, /* 127/255 == 500mA usb fast */ -+ [PCF50633_REG_MBCC6] = 0x00, /* cutoff current 1/32 * Ichg */ -+ [PCF50633_REG_MBCC7] = 0x00, /* 1.6A max bat curr, USB 100mA */ -+ [PCF50633_REG_MBCC8] = 0x00, -+ -+ [PCF50633_REG_BBCCTL] = 0x19, /* 3V, 200uA, on */ -+}; -Index: u-boot/board/neo1973/gta02/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/gta02/config.mk -@@ -0,0 +1,32 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# FIC Neo1973 GTA01 board with S3C2410X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+# GTA01v3 has 1 bank of 64 MB SDRAM -+# GTA01v4 has 1 bank of 64 MB SDRAM -+# -+# 3000'0000 to 3400'0000 -+# we load ourself to 33F8'0000 -+# -+# GTA01Bv2 or later has 1 bank of 128 MB SDRAM -+# -+# 3000'0000 to 3800'0000 -+# we load ourself to 37F8'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# download area is 3200'0000 or 3300'0000 -+ -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x5119 -+ -+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp -+ -+TEXT_BASE = 0x33F80000 -Index: u-boot/drivers/smedia3362.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/smedia3362.c -@@ -0,0 +1,125 @@ -+/* -+ * (C) Copyright 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if defined(CONFIG_VIDEO_GLAMO3362) -+ -+#include -+#include "videomodes.h" -+#include -+#include "smedia3362.h" -+ -+/* -+ * Export Graphic Device -+ */ -+GraphicDevice smi; -+ -+ -+struct glamo_script { -+ u_int16_t reg; -+ u_int16_t val; -+} __attribute__((packed)); -+ -+/* from 'initial glamo 3365 script' */ -+static struct glamo_script gl3362_init_script[] = { -+ /* clock */ -+ { GLAMO_REG_CLOCK_MEMORY, 0x300a }, -+ { GLAMO_REG_CLOCK_LCD, 0x10aa }, -+ { GLAMO_REG_CLOCK_MMC, 0x100a }, -+ { GLAMO_REG_CLOCK_ISP, 0x32aa }, -+ { GLAMO_REG_CLOCK_JPEG, 0x100a }, -+ { GLAMO_REG_CLOCK_3D, 0x302a }, -+ { GLAMO_REG_CLOCK_2D, 0x302a }, -+ //{ GLAMO_REG_CLOCK_RISC1, 0x1aaa }, -+ //{ GLAMO_REG_CLOCK_RISC2, 0x002a }, -+ { GLAMO_REG_CLOCK_MPEG, 0x3aaa }, -+ { GLAMO_REG_CLOCK_MPROC, 0x12aa }, -+ { 0xfffe, 5 }, -+ { GLAMO_REG_CLOCK_HOST, 0x000d }, -+ { GLAMO_REG_CLOCK_MEMORY, 0x000a }I, -+ { GLAMO_REG_CLOCK_LCD, 0x00ee }, -+ { GLAMO_REG_CLOCK_MMC, 0x000a }, -+ { GLAMO_REG_CLOCK_ISP, 0x02aa }, -+ { GLAMO_REG_CLOCK_JPEG, 0x000a }, -+ { GLAMO_REG_CLOCK_3D, 0x002a }, -+ { GLAMO_REG_CLOCK_2D, 0x002a }, -+ //{ GLAMO_REG_CLOCK_RISC1, 0x0aaa }, -+ //{ GLAMO_REG_CLOCK_RISC2, 0x002a }, -+ { GLAMO_REG_CLOCK_MPEG, 0x0aaa }, -+ { GLAMO_REG_CLOCK_MPROC, 0x02aa }, -+ { 0xfffe, 5 }, -+ { GLAMO_REG_PLL_GEN1, 0x061a }, /* PLL1=50MHz, OSCI=32kHz */ -+ { GLAMO_REG_PLL_GEN3, 0x09c3 }, /* PLL2=80MHz, OSCI=32kHz */ -+ { 0xfffe, 5 }, -+ { GLAMO_REG_CLOCK_GEN5_1, 0x18ff }, -+ { GLAMO_REG_CLOCK_GEN5_2, 0x051f }, -+ { GLAMO_REG_CLOCK_GEN6, 0x2000 }, -+ { GLAMO_REG_CLOCK_GEN7, 0x0105 }, -+ { GLAMO_REG_CLOCK_GEN8, 0x0100 }, -+ { GLAMO_REG_CLOCK_GEN10, 0x0017 }, -+ { GLAMO_REG_CLOCK_GEN11, 0x0017 }, -+ -+ /* hostbus interface */ -+ { GLAMO_REG_HOSTBUS(1), 0x0e00 }, -+ { GLAMO_REG_HOSTBUS(2), 0x07ff }, -+ { GLAMO_REG_HOSTBUS(4), 0x0080 }, -+ { GLAMO_REG_HOSTBUS(5), 0x0244 }, -+ { GLAMO_REG_HOSTBUS(6), 0x0600 }, -+ { GLAMO_REG_HOSTBUS(12), 0xf00e }, -+ -+ /* memory */ -+ { GLAMO_REG_MEM_TYPE, 0x0874 }, /* VRAM 8Mbyte */ -+ { GLAMO_REG_MEM_GEN, 0xafaf }, -+ { GLAMO_REG_MEM_TIMING(1), 0x0108 }, -+ { GLAMO_REG_MEM_TIMING(2), 0x0010 }, -+ { GLAMO_REG_MEM_TIMING(3), 0x0000 }, -+ { GLAMO_REG_MEM_TIMING(4), 0x0000 }, -+ { GLAMO_REG_MEM_TIMING(5), 0x0000 }, -+ { GLAMO_REG_MEM_TIMING(6), 0x0000 }, -+ { GLAMO_REG_MEM_TIMING(7), 0x0000 }, -+ { GLAMO_REG_MEM_TIMING(8), 0x1002 }, -+ { GLAMO_REG_MEM_TIMING(9), 0x6006 }, -+ { GLAMO_REG_MEM_TIMING(10), 0x00ff }, -+ { GLAMO_REG_MEM_TIMING(11), 0x0001 }, -+ { GLAMO_REG_MEM_POWER1, 0x0020 }, -+ { GLAMO_REG_MEM_POWRE2, 0x0000 }, -+ { GLAMO_REG_MEM_DRAM1, 0x0000 }, -+ { 0xfffe, 1 }, -+ { GLAMO_REG_MEM_DRAM1, 0xc100 }, -+ { GLAMO_REG_MEM_DRAM2, 0x01d6 }, -+}; -+ -+static int glamo3362_init(void) -+{ -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(gl3362_init_script); i++) { -+ struct glamo_reg *reg = gl3362_init_script[i]; -+ -+ if (reg->reg == 0xfffe) -+ delay(reg->val); -+ else -+ gl3362_reg_write(reg->reg, reg->val); -+ } -+ /* FIXME */ -+} -+ -+#endif /* CONFIG_VIDEO_GLAMO3362 */ -Index: u-boot/drivers/Makefile -=================================================================== ---- u-boot.orig/drivers/Makefile -+++ u-boot/drivers/Makefile -@@ -50,7 +50,7 @@ - usbdcore.o usbdfu.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ - videomodes.o w83c553f.o \ - ks8695eth.o \ -- pcf50606.o \ -+ pcf50606.o pcf50633.o \ - pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ - rpx_pcmcia.o \ - fsl_i2c.o s3c2410_fb.o -Index: u-boot/common/cmd_nand.c -=================================================================== ---- u-boot.orig/common/cmd_nand.c -+++ u-boot/common/cmd_nand.c -@@ -208,8 +208,10 @@ - putc('\n'); - for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) { - if (nand_info[i].name) -- printf("Device %d: %s, sector size %lu KiB\n", -+ printf("Device %d: %s, page size %lu, " -+ "sector size %lu KiB\n", - i, nand_info[i].name, -+ nand_info[i].oobblock, - nand_info[i].erasesize >> 10); - } - return 0; -Index: u-boot/drivers/nand/nand_ids.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_ids.c -+++ u-boot/drivers/nand/nand_ids.c -@@ -67,7 +67,7 @@ - - {"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0}, - -- {"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, -+ //{"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, - - /* These are the new chips with large page size. The pagesize - * and the erasesize is determined from the extended id bytes -Index: u-boot/board/neo1973/common/udc.c -=================================================================== ---- u-boot.orig/board/neo1973/common/udc.c -+++ u-boot/board/neo1973/common/udc.c -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - - void udc_ctrl(enum usbd_event event, int param) - { -@@ -23,6 +24,11 @@ - defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ - defined(CONFIG_ARCH_GTA01B_v4) - pcf50606_charge_autofast(param); -+#elif defined(CONFIG_ARCH_GTA02_v1) -+ if (param) -+ pcf50633_usb_maxcurrent(500); -+ else -+ pcf50633_usb_maxcurrent(0); - #endif - break; - default: diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch deleted file mode 100644 index f85fdea836..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch +++ /dev/null @@ -1,1169 +0,0 @@ -Patch to add HXD8 support - -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2026,6 +2026,9 @@ - qt2410_config : unconfig - @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 - -+hxd8_config : unconfig -+ @$(MKCONFIG) $(@:_config=) arm arm920t hxd8 NULL s3c24x0 -+ - scb9328_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx - -Index: u-boot/board/hxd8/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/Makefile -@@ -0,0 +1,65 @@ -+# -+# (C) Copyright 2000-2006 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = $(obj)lib$(BOARD).a -+ -+COBJS := hxd8.o udc.o pcf50606.o -+SOBJS := lowlevel_init.o -+ -+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -+OBJS := $(addprefix $(obj),$(COBJS)) -+SOBJS := $(addprefix $(obj),$(SOBJS)) -+ -+all: $(LIB) lowevel_foo.bin -+ -+$(LIB): $(obj).depend $(OBJS) $(SOBJS) -+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) -+ -+lowlevel_foo.o: lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds -+ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+# defines $(obj).depend target -+include $(SRCTREE)/rules.mk -+ -+sinclude $(obj).depend -+ -+######################################################################### -Index: u-boot/board/hxd8/hxd8.c -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/hxd8.c -@@ -0,0 +1,189 @@ -+/* -+ * (C) Copyright 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+#include -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#define FCLK_SPEED 1 -+ -+#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ -+#define M_MDIV 0xC3 -+#define M_PDIV 0x4 -+#define M_SDIV 0x1 -+#elif FCLK_SPEED==1 -+#if 0 -+#define M_MDIV 0x6e /* Fout = 399.65MHz */ -+#define M_PDIV 0x3 -+#define M_SDIV 0x1 -+#else -+#define M_MDIV 0x61 /* Fout = 296.35MHz due to wrong PLL capacitors */ -+#define M_PDIV 0x1 -+#define M_SDIV 0x2 -+#endif -+#endif -+ -+#define USB_CLOCK 1 -+ -+#if USB_CLOCK==0 -+#define U_M_MDIV 0xA1 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x1 -+#elif USB_CLOCK==1 -+#define U_M_MDIV 0x3c -+#define U_M_PDIV 0x4 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x005E0FFE; -+ gpio->GPADAT = 0x0001C000; -+ gpio->GPBCON = 0x00045542; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAA02A9; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x0000AAA9; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0x027D0316; -+ gpio->GPGUP = 0x0000FFFF; -+ gpio->GPHCON = 0x0014AAAA; -+ gpio->GPHUP = 0x000007FF; -+ gpio->GPJCON = 0x00000000; -+ -+ /* USB CHG enable */ -+ gpio->GPGDAT |= ( 1 << 11); -+#if 0 -+ /* USB Device Part */ -+ /*GPGCON is reset for USB Device */ -+ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ -+ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ -+ -+ gpio->GPGDAT |= ( 1 << 12); -+ gpio->GPGDAT &= ~( 1 << 12); -+ udelay(20000); -+ gpio->GPGDAT |= ( 1 << 12); -+#endif -+ -+ /* arch number of SMDK2440-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_HXD8; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+void board_video_init(GraphicDevice *pGD) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ -+ lcd->LCDCON1 = 0x0000057b; -+ lcd->LCDCON2 = 0x0143c049; -+ lcd->LCDCON3 = 0x0009df01; -+ lcd->LCDCON4 = 0x00000028; -+ lcd->LCDCON5 = 0x00000b08; -+ -+ lcd->TPAL = 0x01202020; -+ -+ //lcd->LCDCON5 |= (0x01 << 3); -+} -+ -+int board_late_init(void) -+{ -+ /* Initialize the Power Management Unit with a safe register set */ -+ pcf50606_init(); -+ -+ return 0; -+} -+ -+int dram_init(void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+u_int32_t get_board_rev(void) -+{ -+ return 0x00000110; -+} -+ -+/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. -+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 -+ images: 640*480*2*2 = 1228800 < 1245184. */ -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3fd00000, 0 }; -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -Index: u-boot/board/hxd8/lowlevel_init.S -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/lowlevel_init.S -@@ -0,0 +1,171 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the FIC HXD8 by Harald Welte -+ * (C) Copyright 2007 by OpenMoko, Inc. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 /* 3clk */ -+#define B6_SCAN 0x2 /* 10bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x1 /* 3clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* setup asynchronous bus mode */ -+ mrc p15, 0, r1 ,c1 ,c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0x32 -+ .word 0x30 -+ .word 0x30 -Index: u-boot/include/configs/hxd8.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/hxd8.h -@@ -0,0 +1,277 @@ -+/* -+ * (C) Copyright 2007 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * Configuation settings for the FIC HXD8 -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+/* we want to be able to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+ -+#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ -+#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2440 Board */ -+#define CONFIG_HXD8 1 /* on a FIC HXD8 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 16934400/* the HXD8 has this input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) -+ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL3 1 /* we use SERIAL 3 on HXD8 */ -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS (\ -+ CFG_CMD_BDI | \ -+ CFG_CMD_LOADS | \ -+ CFG_CMD_LAODB | \ -+ CFG_CMD_IMI | \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_MEMORY | \ -+ CFG_CMD_ENV | \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_BOOTD | \ -+ CFG_CMD_CONSOLE | \ -+ /* CFG_CMD_BMP | */ \ -+ CFG_CMD_ASKENV | \ -+ CFG_CMD_RUN | \ -+ CFG_CMD_ECHO | \ -+ CFG_CMD_I2C | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_IMMAP | \ -+ CFG_CMD_DATE | \ -+ CFG_CMD_AUTOSCRIPT | \ -+ CFG_CMD_BSP | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_MISC | \ -+ /* CFG_CMD_USB | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_DIAG | \ -+ /* CFG_CMD_HWFLOW | */ \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_FAT | \ -+ CFG_CMD_EXT2 | \ -+ 0) -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "" -+#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 3 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "HXD8 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 64 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x33000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (512*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+#if 0 -+#define CONFIG_USB_OHCI 1 -+#endif -+ -+#if 1 -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x511a /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" -+#define CONFIG_USBD_PRODUCT_NAME "HXD8 Bootloader " U_BOOT_VERSION -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ -+#define CONFIG_USBD_DFU_INTERFACE 2 -+#endif -+#define CFG_CONSOLE_IS_IN_ENV 1 -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "usbtty=cdc_acm\0" \ -+ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC2,115200 console=tty0 loglevel=8\0" \ -+ "" -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ -+#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+/* No NOR flash in this device */ -+#define CFG_NO_FLASH 1 -+ -+#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ -+#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ -+ -+#define NAND_MAX_CHIPS 3 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE NAND_MAX_CHIPS -+#define CFG_NAND_BASE_LIST { CFG_NAND_BASE, CFG_NAND_BASE, CFG_NAND_BASE } -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+/* EXT2 driver */ -+#define CONFIG_EXT2 1 -+ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 1 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#endif -+ -+#define CONFIG_DRIVER_S3C24X0_I2C 1 -+#define CONFIG_HARD_I2C 1 -+#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ -+#define CFG_I2C_SLAVE 0x7f -+ -+/* we have a board_late_init() function */ -+#define BOARD_LATE_INIT 1 -+ -+#if 1 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_SPLASH_SCREEN -+#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ -+#define CONFIG_VIDEO_BMP_GZIP -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+#define CONFIG_UNZIP -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+//#define CONFIG_S3C2410_NAND_HWECC 1 -+ -+#define CONFIG_DRIVER_PCF50606 1 -+ -+#define MTDIDS_DEFAULT "nand0=hxd8-nand" -+#define MTPARTS_DEFAULT "hxd8-nand:256k(u-boot),128k(u-boot_env),2M(kernel),640k(splash),0x3fd00000(jffs2)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "hxd8-nand" -+#define CONFIG_NAND_DYNPART -+ -+#endif /* __CONFIG_H */ -Index: u-boot/board/hxd8/udc.c -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/udc.c -@@ -0,0 +1,30 @@ -+ -+#include -+#include -+#include -+ -+#if defined(CONFIG_USB_DEVICE) -+ -+void udc_ctrl(enum usbd_event event, int param) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ switch (event) { -+ case UDC_CTRL_PULLUP_ENABLE: -+ if (param) -+ gpio->GPBDAT |= (1 << 9); /* GPB9 */ -+ else -+ gpio->GPBDAT &= ~(1 << 9); /* GPB9 */ -+ break; -+ case UDC_CTRL_500mA_ENABLE: -+ if (param) -+ gpio->GPADAT |= (1 << 0); /* GPA0 */ -+ else -+ gpio->GPADAT &= ~(1 << 0); /* GPA0 */ -+ break; -+ default: -+ break; -+ } -+} -+ -+#endif /* CONFIG_USB_DEVICE */ -Index: u-boot/board/hxd8/pcf50606.c -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/pcf50606.c -@@ -0,0 +1,67 @@ -+ -+#include -+#include -+ -+/* initial register set for PCF50606 in HXD8 devices */ -+const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { -+ [PCF50606_REG_OOCS] = 0x00, -+ /* gap */ -+ [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, -+ [PCF50606_REG_INT2M] = PCF50606_INT2_CHGFOK | -+ PCF50606_INT2_CHGERR | -+ PCF50606_INT2_CHGFRDY | -+ PCF50606_INT2_CHGPROT | -+ PCF50606_INT2_CHGWD10S | -+ PCF50606_INT2_CHGWDEXP, -+ [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, -+ [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | -+ PCF50606_OOCC1_CHGWAK & -+ PCF50606_OOCC1_EXTONWAK_NO_WAKEUP, -+ [PCF50606_REG_OOCC2] = PCF50606_OOCC2_ONKEYDB_14ms | -+ PCF50606_OOCC2_EXTONDB_14ms, -+ /* gap */ -+ [PCF50606_REG_PSSC] = 0x00, -+ [PCF50606_REG_PWROKM] = 0x00, -+ /* gap */ -+ [PCF50606_REG_DCDC1] = 0xf0, /* CORE_1V3: on */ -+ [PCF50606_REG_DCDC2] = 0x00, -+ [PCF50606_REG_DCDC3] = 0x00, -+ [PCF50606_REG_DCDC4] = 0x30, /* 1.25A */ -+ -+ [PCF50606_REG_DCDEC1] = 0xe8, /* IO1_3V3: off */ -+ [PCF50606_REG_DCDEC2] = 0x00, -+ -+ [PCF50606_REG_DCUDC1] = 0x08, /* RF_3V3: off */ -+ [PCF50606_REG_DCUDC2] = 0x30, /* 1.25A current limit */ -+ -+ [PCF50606_REG_IOREGC] = 0xf8, /* AUDIO_3V3: on */ -+ -+ [PCF50606_REG_D1REGC1] = 0xf8, /* RC_3V3: on */ -+ -+ [PCF50606_REG_D2REGC1] = 0x18, /* GPS_3V3: off */ -+ -+ [PCF50606_REG_D3REGC1] = 0xf8, /* IO2_3V3: off */ -+ -+ [PCF50606_REG_LPREGC1] = 0xf8, /* LCM_3V3: on */ -+ [PCF50606_REG_LPREGC2] = 0x00, -+ -+ [PCF50606_REG_MBCC1] = 0x00, /* charger unused */ -+ [PCF50606_REG_MBCC2] = 0x00, /* unlimited charging */ -+ [PCF50606_REG_MBCC3] = 0x1a, /* 0.2*Ifast, 4.20V */ -+ [PCF50606_REG_BBCC] = 0x1f, /* 400uA */ -+ [PCF50606_REG_ADCC1] = 0x00, -+ [PCF50606_REG_ADCC2] = 0x00, -+ /* gap */ -+ [PCF50606_REG_ACDC1] = 0x00, -+ [PCF50606_REG_BVMC] = PCF50606_BVMC_THRSHLD_3V3, -+ [PCF50606_REG_PWMC1] = 0x1f, /* clock: 512 DC: 15/16*/ -+ [PCF50606_REG_LEDC1] = 0x00, -+ [PCF50606_REG_LEDC2] = 0x00, -+ [PCF50606_REG_GPOC1] = 0x03, /* PWM ACTIVE */ -+ [PCF50606_REG_GPOC2] = 0x07, /* back light pull low */ -+ [PCF50606_REG_GPOC3] = 0x00, -+ [PCF50606_REG_GPOC4] = 0x00, -+ [PCF50606_REG_GPOC5] = 0x00, -+}; -+ -+ -Index: u-boot/board/hxd8/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/config.mk -@@ -0,0 +1,27 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# FIC HXD8 board with S3C2440X (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x511a -+CONFIG_USB_DFU_REVISION=0x0100 -+ -+# -+# HXD81v011 or later has 1 bank of 128 MB SDRAM -+# -+# 3000'0000 to 3800'0000 -+# we load ourself to 37F8'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# download area is 3200'0000 or 3300'0000 -+ -+# FIXME: TEXT_BASE = 0x37F80000 -+TEXT_BASE = 0x33F80000 -Index: u-boot/board/hxd8/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/board/hxd8/lowlevel_foo.S -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/lowlevel_foo.S -@@ -0,0 +1,87 @@ -+ -+_start: -+ b reset -+undefvec: -+ b undefvec -+swivec: -+ b swivec -+pabtvec: -+ b pabtvec -+dabtvec: -+ b dabtvec -+rsvdvec: -+ b rsvdvec -+irqvec: -+ b irqvec -+fiqvec: -+ b fiqvec -+ -+reset: -+ /* -+ * set the cpu to SVC32 mode -+ */ -+ mrs r0,cpsr -+ bic r0,r0,#0x1f -+ orr r0,r0,#0xd3 -+ msr cpsr,r0 -+ -+/* turn off the watchdog */ -+#define pWTCON 0x53000000 -+#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ -+#define INTSUBMSK 0x4A00001C -+#define CLKDIVN 0x4C000014 /* clock divisor register */ -+#define CAMDIVN 0x4C000018 -+ -+ ldr r0, =pWTCON -+ mov r1, #0x0 -+ str r1, [r0] -+ -+ mov r1, #0xffffffff -+ ldr r0, =INTMSK -+ str r1, [r0] -+ ldr r1, =0x7ff -+ ldr r0, =INTSUBMSK -+ str r1, [r0] -+ -+ /* FCLK:HCLK:PCLK = 1:3:6 */ -+ ldr r0, =CAMDIVN -+ mov r1, #0 -+ str r1, [r0] -+ -+ /* FCLK:HCLK:PCLK = 1:3:6 */ -+ ldr r0, =CLKDIVN -+ mov r1, #7 -+ str r1, [r0] -+ -+ bl cpu_init_crit -+ ldr r0,=TEXT_BASE -+ mov pc, r0 -+ -+cpu_init_crit: -+ /* -+ * flush v4 I/D caches -+ */ -+ mov r0, #0 -+ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ -+ -+ /* -+ * disable MMU stuff and caches -+ */ -+ mrc p15, 0, r0, c1, c0, 0 -+ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) -+ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) -+ orr r0, r0, #0x00000002 @ set bit 2 (A) Align -+ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache -+ mcr p15, 0, r0, c1, c0, 0 -+ -+ /* -+ * before relocating, we have to setup RAM timing -+ * because memory timing is board-dependend, you will -+ * find a lowlevel_init.S in your board directory. -+ */ -+ mov ip, lr -+ bl lowlevel_init -+ mov lr, ip -+ mov pc, lr -+ -Index: u-boot/board/hxd8/lowlevel_foo.lds -=================================================================== ---- /dev/null -+++ u-boot/board/hxd8/lowlevel_foo.lds -@@ -0,0 +1,56 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ lowlevel_foo.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand.c -+++ u-boot/cpu/arm920t/s3c24x0/nand.c -@@ -83,6 +83,59 @@ - #define NFDATA __REGb(NF_BASE + oNFDATA) - #define NFSTAT __REGb(NF_BASE + oNFSTAT) - -+#if defined(CONFIG_HXD8) -+static int hxd8_nand_dev_ready(struct mtd_info *mtd) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ u_int32_t val = gpio->GPCDAT; -+ -+ switch (nand_curr_device) { -+ case 0: -+ return (NFSTAT & 0x01); -+ case 1: /* RnB 3 */ -+ return ((val>>6) & 0x01); -+ case 2: /* RnB 4 */ -+ return ((val>>7) & 0x01); -+ case 3: /* RnB 2 */ -+ return ((val>>5) & 0x01); -+ default: -+ return 0; -+ } -+} -+ -+/* 4G Nand flash chip select function */ -+static void hxd8_nand_select_chip(struct nand_chip *this, int chip) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ if (chip == 0) -+ gpio->GPGDAT &= ~(1 << 1); -+ else -+ gpio->GPGDAT |= (1 << 1); -+ -+ if (chip == 1) -+ gpio->GPADAT &= ~(1 << 15); -+ else -+ gpio->GPADAT |= (1 << 15); -+ -+ if (chip == 2) -+ gpio->GPADAT &= ~(1 << 16); -+ else -+ gpio->GPADAT |= (1 << 16); -+ -+ if (chip == 3) -+ gpio->GPADAT &= ~(1 << 14); -+ else -+ gpio->GPADAT |= (1 << 14); -+ -+ /* UGLY: ew don't have mtd_info pointer, but know that -+ * s3c24xx hwcontrol function does not use it for CLRNCE */ -+ if (chip == -1) -+ this->hwcontrol(NULL, NAND_CTL_CLRNCE); -+ else -+ this->hwcontrol(NULL, NAND_CTL_SETNCE); -+} -+#endif - - static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) - { -@@ -251,6 +304,11 @@ - nand->eccmode = NAND_ECC_SOFT; - #endif - -+#if defined(CONFIG_HXD8) -+ nand->dev_ready = hxd8_nand_dev_ready; -+ nand->select_chip = hxd8_nand_select_chip; -+#endif -+ - #ifdef CONFIG_S3C2410_NAND_BBT - nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; - #else diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch deleted file mode 100644 index 227a97e71a..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch +++ /dev/null @@ -1,712 +0,0 @@ -Index: u-boot/common/Makefile -=================================================================== ---- u-boot.orig/common/Makefile -+++ u-boot/common/Makefile -@@ -34,7 +34,7 @@ - cmd_dynenv.o cmd_eeprom.o cmd_elf.o cmd_ext2.o \ - cmd_fat.o cmd_fdc.o cmd_fdt.o cmd_fdos.o cmd_flash.o cmd_fpga.o \ - cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \ -- cmd_load.o cmd_log.o \ -+ cmd_license.o cmd_load.o cmd_log.o \ - cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \ - cmd_nand.o cmd_net.o cmd_nvedit.o \ - cmd_pci.o cmd_pcmcia.o cmd_portio.o \ -Index: u-boot/common/cmd_license.c -=================================================================== ---- /dev/null -+++ u-boot/common/cmd_license.c -@@ -0,0 +1,57 @@ -+/* -+ * (C) Copyright 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_LICENSE) -+ -+#define LICENSE_MAX 20480 -+#include -+#include -+#include -+int gunzip(void *, int, unsigned char *, unsigned long *); -+ -+int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -+{ -+ char *tok, *dst = malloc(LICENSE_MAX); -+ unsigned long len = LICENSE_MAX; -+ -+ if (!dst) -+ return -1; -+ -+ if (gunzip(dst, LICENSE_MAX, gpl_gz, &len) != 0) { -+ printf("Error uncompressing license text\n"); -+ free(dst); -+ return -1; -+ } -+ puts(dst); -+ free(dst); -+ -+ return 0; -+} -+ -+U_BOOT_CMD(license, 1, 1, do_license, -+ "license - print GPL license text\n", -+ NULL); -+ -+#endif /* CFG_CMD_LICENSE */ -Index: u-boot/include/cmd_confdefs.h -=================================================================== ---- u-boot.orig/include/cmd_confdefs.h -+++ u-boot/include/cmd_confdefs.h -@@ -75,6 +75,7 @@ - #define CFG_CMD_FPGA 0x0000010000000000ULL /* FPGA configuration Support */ - #define CFG_CMD_HWFLOW 0x0000020000000000ULL /* RTS/CTS hw flow control */ - #define CFG_CMD_SAVES 0x0000040000000000ULL /* save S record dump */ -+#define CFG_CMD_LICENSE 0x0000080000000000ULL /* Display GPL License */ - #define CFG_CMD_SPI 0x0000100000000000ULL /* SPI utility */ - #define CFG_CMD_FDOS 0x0000200000000000ULL /* Floppy DOS support */ - #define CFG_CMD_VFD 0x0000400000000000ULL /* VFD support (TRAB) */ -Index: u-boot/include/license.h -=================================================================== ---- /dev/null -+++ u-boot/include/license.h -@@ -0,0 +1,584 @@ -+/* bin2header converting 'gpl.gz' */ -+unsigned char gpl_gz[] = { -+ 0x1f, 0x8b, 0x08, 0x08, 0xb2, 0x10, 0x0d, 0x46, 0x00, 0x03, -+ 0x67, 0x70, 0x6c, 0x00, 0x9d, 0x5b, 0x5d, 0x77, 0xdb, 0x46, -+ 0x92, 0x7d, 0x4e, 0xff, 0x8a, 0x3e, 0x7e, 0x89, 0x74, 0x0e, -+ 0xc3, 0xc4, 0x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, -+ -+}; -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -110,6 +110,7 @@ - CFG_CMD_MMC | \ - CFG_CMD_FAT | \ - CFG_CMD_EXT2 | \ -+ CFG_CMD_LICENSE | \ - 0) - /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ - #include -Index: u-boot/include/configs/hxd8.h -=================================================================== ---- u-boot.orig/include/configs/hxd8.h -+++ u-boot/include/configs/hxd8.h -@@ -110,6 +110,7 @@ - CFG_CMD_MMC | \ - CFG_CMD_FAT | \ - CFG_CMD_EXT2 | \ -+ CFG_CMD_LICENSE | \ - 0) - /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ - #include -Index: u-boot/include/configs/smdk2440.h -=================================================================== ---- u-boot.orig/include/configs/smdk2440.h -+++ u-boot/include/configs/smdk2440.h -@@ -110,6 +110,7 @@ - CFG_CMD_PORTIO | \ - CFG_CMD_REGINFO | \ - CFG_CMD_SAVES | \ -+ CFG_CMD_LICENSE | \ - CFG_CMD_USB) - - /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch deleted file mode 100644 index db3cee6e99..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch +++ /dev/null @@ -1,4121 +0,0 @@ -This adds a more recent version of mach-types.h to u-boot - -Signed-off-by: Harald Welte - -Index: u-boot/include/asm-arm/mach-types.h -=================================================================== ---- u-boot.orig/include/asm-arm/mach-types.h -+++ u-boot/include/asm-arm/mach-types.h -@@ -424,7 +424,7 @@ - #define MACH_TYPE_MPORT3S 411 - #define MACH_TYPE_RA_ALPHA 412 - #define MACH_TYPE_XCEP 413 --#define MACH_TYPE_ARCOM_MERCURY 414 -+#define MACH_TYPE_ARCOM_VULCAN 414 - #define MACH_TYPE_STARGATE 415 - #define MACH_TYPE_ARMADILLOJ 416 - #define MACH_TYPE_ELROY_JACK 417 -@@ -457,7 +457,7 @@ - #define MACH_TYPE_XM250 444 - #define MACH_TYPE_T6TC1XB 445 - #define MACH_TYPE_ESS710 446 --#define MACH_TYPE_MX3ADS 447 -+#define MACH_TYPE_MX31ADS 447 - #define MACH_TYPE_HIMALAYA 448 - #define MACH_TYPE_BOLFENK 449 - #define MACH_TYPE_AT91RM9200KR 450 -@@ -736,7 +736,311 @@ - #define MACH_TYPE_LN2410SBC 725 - #define MACH_TYPE_CB3RUFC 726 - #define MACH_TYPE_MP2USB 727 --#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_NTNP425C 728 -+#define MACH_TYPE_COLIBRI 729 -+#define MACH_TYPE_PCM7220 730 -+#define MACH_TYPE_GATEWAY7001 731 -+#define MACH_TYPE_PCM027 732 -+#define MACH_TYPE_CMPXA 733 -+#define MACH_TYPE_ANUBIS 734 -+#define MACH_TYPE_ITE8152 735 -+#define MACH_TYPE_LPC3XXX 736 -+#define MACH_TYPE_PUPPETEER 737 -+#define MACH_TYPE_MACH_VADATECH 738 -+#define MACH_TYPE_E570 739 -+#define MACH_TYPE_X50 740 -+#define MACH_TYPE_RECON 741 -+#define MACH_TYPE_XBOARDGP8 742 -+#define MACH_TYPE_FPIC2 743 -+#define MACH_TYPE_AKITA 744 -+#define MACH_TYPE_A81 745 -+#define MACH_TYPE_SVM_SC25X 746 -+#define MACH_TYPE_VADATECH020 747 -+#define MACH_TYPE_TLI 748 -+#define MACH_TYPE_EDB9315LC 749 -+#define MACH_TYPE_PASSEC 750 -+#define MACH_TYPE_DS_TIGER 751 -+#define MACH_TYPE_E310 752 -+#define MACH_TYPE_E330 753 -+#define MACH_TYPE_RT3000 754 -+#define MACH_TYPE_NOKIA770 755 -+#define MACH_TYPE_PNX0106 756 -+#define MACH_TYPE_HX21XX 757 -+#define MACH_TYPE_FARADAY 758 -+#define MACH_TYPE_SBC9312 759 -+#define MACH_TYPE_BATMAN 760 -+#define MACH_TYPE_JPD201 761 -+#define MACH_TYPE_MIPSA 762 -+#define MACH_TYPE_KACOM 763 -+#define MACH_TYPE_SWARCOCPU 764 -+#define MACH_TYPE_SWARCODSL 765 -+#define MACH_TYPE_BLUEANGEL 766 -+#define MACH_TYPE_HAIRYGRAMA 767 -+#define MACH_TYPE_BANFF 768 -+#define MACH_TYPE_CARMEVA 769 -+#define MACH_TYPE_SAM255 770 -+#define MACH_TYPE_PPM10 771 -+#define MACH_TYPE_EDB9315A 772 -+#define MACH_TYPE_SUNSET 773 -+#define MACH_TYPE_STARGATE2 774 -+#define MACH_TYPE_INTELMOTE2 775 -+#define MACH_TYPE_TRIZEPS4 776 -+#define MACH_TYPE_MAINSTONE2 777 -+#define MACH_TYPE_EZ_IXP42X 778 -+#define MACH_TYPE_TAPWAVE_ZODIAC 779 -+#define MACH_TYPE_UNIVERSALMETER 780 -+#define MACH_TYPE_HICOARM9 781 -+#define MACH_TYPE_PNX4008 782 -+#define MACH_TYPE_KWS6000 783 -+#define MACH_TYPE_PORTUX920T 784 -+#define MACH_TYPE_EZ_X5 785 -+#define MACH_TYPE_OMAP_RUDOLPH 786 -+#define MACH_TYPE_CPUAT91 787 -+#define MACH_TYPE_REA9200 788 -+#define MACH_TYPE_ACTS_PUNE_SA1110 789 -+#define MACH_TYPE_IXP425 790 -+#define MACH_TYPE_ARGONPLUSODYSSEY 791 -+#define MACH_TYPE_PERCH 792 -+#define MACH_TYPE_EIS05R1 793 -+#define MACH_TYPE_PEPPERPAD 794 -+#define MACH_TYPE_SB3010 795 -+#define MACH_TYPE_RM9200 796 -+#define MACH_TYPE_DMA03 797 -+#define MACH_TYPE_ROAD_S101 798 -+#define MACH_TYPE_IQ_NEXTGEN_A 799 -+#define MACH_TYPE_IQ_NEXTGEN_B 800 -+#define MACH_TYPE_IQ_NEXTGEN_C 801 -+#define MACH_TYPE_IQ_NEXTGEN_D 802 -+#define MACH_TYPE_IQ_NEXTGEN_E 803 -+#define MACH_TYPE_MALLOW_AT91 804 -+#define MACH_TYPE_CYBERTRACKER_I 805 -+#define MACH_TYPE_GESBC931X 806 -+#define MACH_TYPE_CENTIPAD 807 -+#define MACH_TYPE_ARMSOC 808 -+#define MACH_TYPE_SE4200 809 -+#define MACH_TYPE_EMS197A 810 -+#define MACH_TYPE_MICRO9 811 -+#define MACH_TYPE_MICRO9L 812 -+#define MACH_TYPE_UC5471DSP 813 -+#define MACH_TYPE_SJ5471ENG 814 -+#define MACH_TYPE_CMPXA26X 815 -+#define MACH_TYPE_NC 816 -+#define MACH_TYPE_OMAP_PALMTE 817 -+#define MACH_TYPE_AJAX52X 818 -+#define MACH_TYPE_SIRIUSTAR 819 -+#define MACH_TYPE_IODATA_HDLG 820 -+#define MACH_TYPE_AT91RM9200UTL 821 -+#define MACH_TYPE_BIOSAFE 822 -+#define MACH_TYPE_MP1000 823 -+#define MACH_TYPE_PARSY 824 -+#define MACH_TYPE_CCXP 825 -+#define MACH_TYPE_OMAP_GSAMPLE 826 -+#define MACH_TYPE_REALVIEW_EB 827 -+#define MACH_TYPE_SAMOA 828 -+#define MACH_TYPE_T3XSCALE 829 -+#define MACH_TYPE_I878 830 -+#define MACH_TYPE_BORZOI 831 -+#define MACH_TYPE_GECKO 832 -+#define MACH_TYPE_DS101 833 -+#define MACH_TYPE_OMAP_PALMTT2 834 -+#define MACH_TYPE_XSCALE_PALMLD 835 -+#define MACH_TYPE_CC9C 836 -+#define MACH_TYPE_SBC1670 837 -+#define MACH_TYPE_IXDP28X5 838 -+#define MACH_TYPE_OMAP_PALMTT 839 -+#define MACH_TYPE_ML696K 840 -+#define MACH_TYPE_ARCOM_ZEUS 841 -+#define MACH_TYPE_OSIRIS 842 -+#define MACH_TYPE_MAESTRO 843 -+#define MACH_TYPE_TUNGE2 844 -+#define MACH_TYPE_IXBBM 845 -+#define MACH_TYPE_MX27 846 -+#define MACH_TYPE_AX8004 847 -+#define MACH_TYPE_AT91SAM9261EK 848 -+#define MACH_TYPE_LOFT 849 -+#define MACH_TYPE_MAGPIE 850 -+#define MACH_TYPE_MX21 851 -+#define MACH_TYPE_MB87M3400 852 -+#define MACH_TYPE_MGUARD_DELTA 853 -+#define MACH_TYPE_DAVINCI_DVDP 854 -+#define MACH_TYPE_HTCUNIVERSAL 855 -+#define MACH_TYPE_TPAD 856 -+#define MACH_TYPE_ROVERP3 857 -+#define MACH_TYPE_JORNADA928 858 -+#define MACH_TYPE_MV88FXX81 859 -+#define MACH_TYPE_STMP36XX 860 -+#define MACH_TYPE_SXNI79524 861 -+#define MACH_TYPE_AMS_DELTA 862 -+#define MACH_TYPE_URANIUM 863 -+#define MACH_TYPE_UCON 864 -+#define MACH_TYPE_NAS100D 865 -+#define MACH_TYPE_L083_1000 866 -+#define MACH_TYPE_EZX 867 -+#define MACH_TYPE_PNX5220 868 -+#define MACH_TYPE_BUTTE 869 -+#define MACH_TYPE_SRM2 870 -+#define MACH_TYPE_DSBR 871 -+#define MACH_TYPE_CRYSTALBALL 872 -+#define MACH_TYPE_TINYPXA27X 873 -+#define MACH_TYPE_HERBIE 874 -+#define MACH_TYPE_MAGICIAN 875 -+#define MACH_TYPE_CM4002 876 -+#define MACH_TYPE_B4 877 -+#define MACH_TYPE_MAUI 878 -+#define MACH_TYPE_CYBERTRACKER_G 879 -+#define MACH_TYPE_NXDKN 880 -+#define MACH_TYPE_MIO8390 881 -+#define MACH_TYPE_OMI_BOARD 882 -+#define MACH_TYPE_MX21CIV 883 -+#define MACH_TYPE_MAHI_CDAC 884 -+#define MACH_TYPE_XSCALE_PALMTX 885 -+#define MACH_TYPE_S3C2413 887 -+#define MACH_TYPE_SAMSYS_EP0 888 -+#define MACH_TYPE_WG302V1 889 -+#define MACH_TYPE_WG302V2 890 -+#define MACH_TYPE_EB42X 891 -+#define MACH_TYPE_IQ331ES 892 -+#define MACH_TYPE_COSYDSP 893 -+#define MACH_TYPE_UPLAT7D 894 -+#define MACH_TYPE_PTDAVINCI 895 -+#define MACH_TYPE_MBUS 896 -+#define MACH_TYPE_NADIA2VB 897 -+#define MACH_TYPE_R1000 898 -+#define MACH_TYPE_HW90250 899 -+#define MACH_TYPE_OMAP_2430SDP 900 -+#define MACH_TYPE_DAVINCI_EVM 901 -+#define MACH_TYPE_OMAP_TORNADO 902 -+#define MACH_TYPE_OLOCREEK 903 -+#define MACH_TYPE_PALMZ72 904 -+#define MACH_TYPE_NXDB500 905 -+#define MACH_TYPE_APF9328 906 -+#define MACH_TYPE_OMAP_WIPOQ 907 -+#define MACH_TYPE_OMAP_TWIP 908 -+#define MACH_TYPE_XSCALE_PALMTREO650 909 -+#define MACH_TYPE_ACUMEN 910 -+#define MACH_TYPE_XP100 911 -+#define MACH_TYPE_FS2410 912 -+#define MACH_TYPE_PXA270_CERF 913 -+#define MACH_TYPE_SQ2FTLPALM 914 -+#define MACH_TYPE_BSEMSERVER 915 -+#define MACH_TYPE_NETCLIENT 916 -+#define MACH_TYPE_XSCALE_PALMTT5 917 -+#define MACH_TYPE_OMAP_PALMTC 918 -+#define MACH_TYPE_OMAP_APOLLON 919 -+#define MACH_TYPE_ARGONLVEVB 920 -+#define MACH_TYPE_REA_2D 921 -+#define MACH_TYPE_TI3E524 922 -+#define MACH_TYPE_ATEB9200 923 -+#define MACH_TYPE_AUCKLAND 924 -+#define MACH_TYPE_AK3320M 925 -+#define MACH_TYPE_DURAMAX 926 -+#define MACH_TYPE_N35 927 -+#define MACH_TYPE_PRONGHORN 928 -+#define MACH_TYPE_FUNDY 929 -+#define MACH_TYPE_LOGICPD_PXA270 930 -+#define MACH_TYPE_CPU777 931 -+#define MACH_TYPE_SIMICON9201 932 -+#define MACH_TYPE_LEAP2_HPM 933 -+#define MACH_TYPE_CM922TXA10 934 -+#define MACH_TYPE_PXA 935 -+#define MACH_TYPE_SANDGATE2 936 -+#define MACH_TYPE_SANDGATE2G 937 -+#define MACH_TYPE_SANDGATE2P 938 -+#define MACH_TYPE_FRED_JACK 939 -+#define MACH_TYPE_TTG_COLOR1 940 -+#define MACH_TYPE_NXEB500HMI 941 -+#define MACH_TYPE_NETDCU8 942 -+#define MACH_TYPE_ML675050_CPU_BOA 943 -+#define MACH_TYPE_NG_FVX538 944 -+#define MACH_TYPE_NG_FVS338 945 -+#define MACH_TYPE_PNX4103 946 -+#define MACH_TYPE_HESDB 947 -+#define MACH_TYPE_XSILO 948 -+#define MACH_TYPE_ESPRESSO 949 -+#define MACH_TYPE_EMLC 950 -+#define MACH_TYPE_SISTERON 951 -+#define MACH_TYPE_RX1950 952 -+#define MACH_TYPE_TSC_VENUS 953 -+#define MACH_TYPE_DS101J 954 -+#define MACH_TYPE_MXC30030ADS 955 -+#define MACH_TYPE_FUJITSU_WIMAXSOC 956 -+#define MACH_TYPE_DUALPCMODEM 957 -+#define MACH_TYPE_GESBC9312 958 -+#define MACH_TYPE_HTCAPACHE 959 -+#define MACH_TYPE_IXDP435 960 -+#define MACH_TYPE_CATPROVT100 961 -+#define MACH_TYPE_PICOTUX1XX 962 -+#define MACH_TYPE_PICOTUX2XX 963 -+#define MACH_TYPE_DSMG600 964 -+#define MACH_TYPE_EMPC2 965 -+#define MACH_TYPE_VENTURA 966 -+#define MACH_TYPE_PHIDGET_SBC 967 -+#define MACH_TYPE_IJ3K 968 -+#define MACH_TYPE_PISGAH 969 -+#define MACH_TYPE_OMAP_FSAMPLE 970 -+#define MACH_TYPE_SG720 971 -+#define MACH_TYPE_REDFOX 972 -+#define MACH_TYPE_MYSH_EP9315_1 973 -+#define MACH_TYPE_TPF106 974 -+#define MACH_TYPE_AT91RM9200KG 975 -+#define MACH_TYPE_SLEDB 976 -+#define MACH_TYPE_ONTRACK 977 -+#define MACH_TYPE_PM1200 978 -+#define MACH_TYPE_ESS24XXX 979 -+#define MACH_TYPE_COREMP7 980 -+#define MACH_TYPE_NEXCODER_6446 981 -+#define MACH_TYPE_STVC8380 982 -+#define MACH_TYPE_TEKLYNX 983 -+#define MACH_TYPE_CARBONADO 984 -+#define MACH_TYPE_SYSMOS_MP730 985 -+#define MACH_TYPE_SNAPPER_CL15 986 -+#define MACH_TYPE_PGIGIM 987 -+#define MACH_TYPE_PTX9160P2 988 -+#define MACH_TYPE_DCORE1 989 -+#define MACH_TYPE_VICTORPXA 990 -+#define MACH_TYPE_MX2DTB 991 -+#define MACH_TYPE_PXA_IREX_ER0100 992 -+#define MACH_TYPE_OMAP_PALMZ71 993 -+#define MACH_TYPE_BARTEC_DEG 994 -+#define MACH_TYPE_HW50251 995 -+#define MACH_TYPE_IBOX 996 -+#define MACH_TYPE_ATLASLH7A404 997 -+#define MACH_TYPE_PT2026 998 -+#define MACH_TYPE_HTCALPINE 999 -+#define MACH_TYPE_BARTEC_VTU 1000 -+#define MACH_TYPE_VCOREII 1001 -+#define MACH_TYPE_PDNB3 1002 -+#define MACH_TYPE_HTCBEETLES 1003 -+#define MACH_TYPE_S3C6400 1004 -+#define MACH_TYPE_S3C2443 1005 -+#define MACH_TYPE_OMAP_LDK 1006 -+#define MACH_TYPE_SMDK2460 1007 -+#define MACH_TYPE_SMDK2440 1008 -+#define MACH_TYPE_SMDK2412 1009 -+#define MACH_TYPE_WEBBOX 1010 -+#define MACH_TYPE_CWWNDP 1011 -+#define MACH_TYPE_DRAGON 1012 -+#define MACH_TYPE_OPENDO_CPU_BOARD 1013 -+#define MACH_TYPE_CCM2200 1014 -+#define MACH_TYPE_ETWARM 1015 -+#define MACH_TYPE_M93030 1016 -+#define MACH_TYPE_CC7U 1017 -+#define MACH_TYPE_MTT_RANGER 1018 -+#define MACH_TYPE_NEXUS 1019 -+#define MACH_TYPE_DESMAN 1020 -+#define MACH_TYPE_BKDE303 1021 -+#define MACH_TYPE_SMDK2413 1022 -+#define MACH_TYPE_AML_M7200 1023 -+#define MACH_TYPE_AML_M5900 1024 -+#define MACH_TYPE_SG640 1025 -+#define MACH_TYPE_EDG79524 1026 -+#define MACH_TYPE_AI2410 1027 -+#define MACH_TYPE_IXP465 1028 -+#define MACH_TYPE_BALLOON3 1029 -+#define MACH_TYPE_QT2410 1108 -+#define MACH_TYPE_NEO1973_GTA01 1182 -+#define MACH_TYPE_HXD8 1303 -+#define MACH_TYPE_NEO1973_GTA02 1304 - - #ifdef CONFIG_ARCH_EBSA110 - # ifdef machine_arch_type -@@ -3541,9 +3845,9 @@ - # else - # define machine_arch_type MACH_TYPE_RAMSES - # endif --# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES) -+# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES) - #else --# define machine_is_ramses() (0) -+# define machine_is_mnci() (0) - #endif - - #ifdef CONFIG_ARCH_S28X -@@ -4501,9 +4805,9 @@ - # else - # define machine_arch_type MACH_TYPE_M825XX - # endif --# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX) -+# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX) - #else --# define machine_is_m825xx() (0) -+# define machine_is_comcerto() (0) - #endif - - #ifdef CONFIG_SA1100_M7100 -@@ -5658,16 +5962,16 @@ - # define machine_is_xcep() (0) - #endif - --#ifdef CONFIG_MACH_ARCOM_MERCURY -+#ifdef CONFIG_MACH_ARCOM_VULCAN - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_ARCOM_MERCURY -+# define machine_arch_type MACH_TYPE_ARCOM_VULCAN - # endif --# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY) -+# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN) - #else --# define machine_is_arcom_mercury() (0) -+# define machine_is_arcom_vulcan() (0) - #endif - - #ifdef CONFIG_MACH_STARGATE -@@ -6054,16 +6358,16 @@ - # define machine_is_ess710() (0) - #endif - --#ifdef CONFIG_MACH_MX3ADS -+#ifdef CONFIG_MACH_MX31ADS - # ifdef machine_arch_type - # undef machine_arch_type - # define machine_arch_type __machine_arch_type - # else --# define machine_arch_type MACH_TYPE_MX3ADS -+# define machine_arch_type MACH_TYPE_MX31ADS - # endif --# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS) -+# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS) - #else --# define machine_is_mx3ads() (0) -+# define machine_is_mx31ads() (0) - #endif - - #ifdef CONFIG_MACH_HIMALAYA -@@ -7333,9 +7637,9 @@ - # else - # define machine_arch_type MACH_TYPE_ARGONPLUSEVB - # endif --# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) -+# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) - #else --# define machine_is_argonplusevb() (0) -+# define machine_is_i30030evb() (0) - #endif - - #ifdef CONFIG_MACH_SCMA11EVB -@@ -7345,9 +7649,9 @@ - # else - # define machine_arch_type MACH_TYPE_SCMA11EVB - # endif --# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) -+# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) - #else --# define machine_is_scma11evb() (0) -+# define machine_is_mxc27530evb() (0) - #endif - - #ifdef CONFIG_MACH_SMDK2800 -@@ -8305,9 +8609,9 @@ - # else - # define machine_arch_type MACH_TYPE_SCMA11BB - # endif --# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB) -+# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_SCMA11BB) - #else --# define machine_is_scma11bb() (0) -+# define machine_is_mxc27530ads() (0) - #endif - - #ifdef CONFIG_MACH_TRIZEPS3 -@@ -9193,9 +9497,9 @@ - # else - # define machine_arch_type MACH_TYPE_ZEUSEVB - # endif --# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB) -+# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_ZEUSEVB) - #else --# define machine_is_zeusevb() (0) -+# define machine_is_mxc91131evb() (0) - #endif - - #ifdef CONFIG_MACH_P700 -@@ -9402,6 +9706,3667 @@ - # define machine_is_mp2usb() (0) - #endif - -+#ifdef CONFIG_MACH_NTNP425C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NTNP425C -+# endif -+# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C) -+#else -+# define machine_is_ntnp425c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COLIBRI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COLIBRI -+# endif -+# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI) -+#else -+# define machine_is_colibri() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM7220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM7220 -+# endif -+# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220) -+#else -+# define machine_is_pcm7220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GATEWAY7001 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GATEWAY7001 -+# endif -+# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001) -+#else -+# define machine_is_gateway7001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PCM027 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PCM027 -+# endif -+# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027) -+#else -+# define machine_is_pcm027() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA -+# endif -+# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA) -+#else -+# define machine_is_cmpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ANUBIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ANUBIS -+# endif -+# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS) -+#else -+# define machine_is_anubis() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ITE8152 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ITE8152 -+# endif -+# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152) -+#else -+# define machine_is_ite8152() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LPC3XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LPC3XXX -+# endif -+# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX) -+#else -+# define machine_is_lpc3xxx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PUPPETEER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PUPPETEER -+# endif -+# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER) -+#else -+# define machine_is_puppeteer() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MACH_VADATECH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MACH_VADATECH -+# endif -+# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH) -+#else -+# define machine_is_vt001() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E570 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E570 -+# endif -+# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570) -+#else -+# define machine_is_e570() (0) -+#endif -+ -+#ifdef CONFIG_MACH_X50 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_X50 -+# endif -+# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50) -+#else -+# define machine_is_x50() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RECON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RECON -+# endif -+# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON) -+#else -+# define machine_is_recon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XBOARDGP8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XBOARDGP8 -+# endif -+# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8) -+#else -+# define machine_is_xboardgp8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FPIC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FPIC2 -+# endif -+# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2) -+#else -+# define machine_is_fpic2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AKITA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AKITA -+# endif -+# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA) -+#else -+# define machine_is_akita() (0) -+#endif -+ -+#ifdef CONFIG_MACH_A81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_A81 -+# endif -+# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81) -+#else -+# define machine_is_a81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SVM_SC25X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SVM_SC25X -+# endif -+# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X) -+#else -+# define machine_is_svm_sc25x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VADATECH020 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VADATECH020 -+# endif -+# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020) -+#else -+# define machine_is_vt020() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TLI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TLI -+# endif -+# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI) -+#else -+# define machine_is_tli() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315LC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315LC -+# endif -+# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC) -+#else -+# define machine_is_edb9315lc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PASSEC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PASSEC -+# endif -+# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC) -+#else -+# define machine_is_passec() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS_TIGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS_TIGER -+# endif -+# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER) -+#else -+# define machine_is_ds_tiger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E310 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E310 -+# endif -+# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310) -+#else -+# define machine_is_e310() (0) -+#endif -+ -+#ifdef CONFIG_MACH_E330 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_E330 -+# endif -+# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330) -+#else -+# define machine_is_e330() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RT3000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RT3000 -+# endif -+# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000) -+#else -+# define machine_is_rt3000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NOKIA770 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NOKIA770 -+# endif -+# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770) -+#else -+# define machine_is_nokia770() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX0106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX0106 -+# endif -+# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106) -+#else -+# define machine_is_pnx0106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HX21XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HX21XX -+# endif -+# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX) -+#else -+# define machine_is_hx21xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FARADAY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FARADAY -+# endif -+# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY) -+#else -+# define machine_is_faraday() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC9312 -+# endif -+# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312) -+#else -+# define machine_is_sbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BATMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BATMAN -+# endif -+# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN) -+#else -+# define machine_is_batman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JPD201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JPD201 -+# endif -+# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201) -+#else -+# define machine_is_jpd201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIPSA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIPSA -+# endif -+# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA) -+#else -+# define machine_is_mipsa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KACOM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KACOM -+# endif -+# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM) -+#else -+# define machine_is_kacom() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCOCPU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCOCPU -+# endif -+# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU) -+#else -+# define machine_is_swarcocpu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SWARCODSL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SWARCODSL -+# endif -+# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL) -+#else -+# define machine_is_swarcodsl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BLUEANGEL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BLUEANGEL -+# endif -+# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL) -+#else -+# define machine_is_blueangel() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HAIRYGRAMA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HAIRYGRAMA -+# endif -+# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA) -+#else -+# define machine_is_hairygrama() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BANFF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BANFF -+# endif -+# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF) -+#else -+# define machine_is_banff() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARMEVA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARMEVA -+# endif -+# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA) -+#else -+# define machine_is_carmeva() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAM255 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAM255 -+# endif -+# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255) -+#else -+# define machine_is_sam255() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PPM10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PPM10 -+# endif -+# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10) -+#else -+# define machine_is_ppm10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDB9315A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDB9315A -+# endif -+# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A) -+#else -+# define machine_is_edb9315a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SUNSET -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SUNSET -+# endif -+# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET) -+#else -+# define machine_is_sunset() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STARGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STARGATE2 -+# endif -+# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2) -+#else -+# define machine_is_stargate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_INTELMOTE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_INTELMOTE2 -+# endif -+# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2) -+#else -+# define machine_is_intelmote2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TRIZEPS4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TRIZEPS4 -+# endif -+# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4) -+#else -+# define machine_is_trizeps4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAINSTONE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAINSTONE2 -+# endif -+# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2) -+#else -+# define machine_is_mainstone2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_IXP42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_IXP42X -+# endif -+# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X) -+#else -+# define machine_is_ez_ixp42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TAPWAVE_ZODIAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC -+# endif -+# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC) -+#else -+# define machine_is_tapwave_zodiac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UNIVERSALMETER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UNIVERSALMETER -+# endif -+# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER) -+#else -+# define machine_is_universalmeter() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HICOARM9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HICOARM9 -+# endif -+# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9) -+#else -+# define machine_is_hicoarm9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4008 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4008 -+# endif -+# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008) -+#else -+# define machine_is_pnx4008() (0) -+#endif -+ -+#ifdef CONFIG_MACH_KWS6000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_KWS6000 -+# endif -+# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000) -+#else -+# define machine_is_kws6000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PORTUX920T -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PORTUX920T -+# endif -+# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T) -+#else -+# define machine_is_portux920t() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZ_X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZ_X5 -+# endif -+# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5) -+#else -+# define machine_is_ez_x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_RUDOLPH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH -+# endif -+# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH) -+#else -+# define machine_is_omap_rudolph() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPUAT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPUAT91 -+# endif -+# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91) -+#else -+# define machine_is_cpuat91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA9200 -+# endif -+# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200) -+#else -+# define machine_is_rea9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACTS_PUNE_SA1110 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110 -+# endif -+# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110) -+#else -+# define machine_is_acts_pune_sa1110() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP425 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP425 -+# endif -+# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425) -+#else -+# define machine_is_ixp425() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONPLUSODYSSEY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONPLUSODYSSEY -+# endif -+# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_ARGONPLUSODYSSEY) -+#else -+# define machine_is_i30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PERCH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PERCH -+# endif -+# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH) -+#else -+# define machine_is_perch() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EIS05R1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EIS05R1 -+# endif -+# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1) -+#else -+# define machine_is_eis05r1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PEPPERPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PEPPERPAD -+# endif -+# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD) -+#else -+# define machine_is_pepperpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SB3010 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SB3010 -+# endif -+# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010) -+#else -+# define machine_is_sb3010() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RM9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RM9200 -+# endif -+# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200) -+#else -+# define machine_is_rm9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DMA03 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DMA03 -+# endif -+# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03) -+#else -+# define machine_is_dma03() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROAD_S101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROAD_S101 -+# endif -+# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101) -+#else -+# define machine_is_road_s101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A -+# endif -+# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A) -+#else -+# define machine_is_iq_nextgen_a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_B -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B -+# endif -+# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B) -+#else -+# define machine_is_iq_nextgen_b() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C -+# endif -+# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C) -+#else -+# define machine_is_iq_nextgen_c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D -+# endif -+# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D) -+#else -+# define machine_is_iq_nextgen_d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ_NEXTGEN_E -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E -+# endif -+# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E) -+#else -+# define machine_is_iq_nextgen_e() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MALLOW_AT91 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MALLOW_AT91 -+# endif -+# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91) -+#else -+# define machine_is_mallow_at91() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_I -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_I -+# endif -+# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I) -+#else -+# define machine_is_cybertracker_i() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC931X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC931X -+# endif -+# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X) -+#else -+# define machine_is_gesbc931x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CENTIPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CENTIPAD -+# endif -+# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD) -+#else -+# define machine_is_centipad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARMSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARMSOC -+# endif -+# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC) -+#else -+# define machine_is_armsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SE4200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SE4200 -+# endif -+# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200) -+#else -+# define machine_is_se4200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMS197A -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMS197A -+# endif -+# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A) -+#else -+# define machine_is_ems197a() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9 -+# endif -+# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9) -+#else -+# define machine_is_micro9() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MICRO9L -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MICRO9L -+# endif -+# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L) -+#else -+# define machine_is_micro9l() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UC5471DSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UC5471DSP -+# endif -+# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP) -+#else -+# define machine_is_uc5471dsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SJ5471ENG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SJ5471ENG -+# endif -+# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG) -+#else -+# define machine_is_sj5471eng() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CMPXA26X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CMPXA26X -+# endif -+# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X) -+#else -+# define machine_is_none() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NC -+# endif -+# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC) -+#else -+# define machine_is_nc1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTE -+# endif -+# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE) -+#else -+# define machine_is_omap_palmte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AJAX52X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AJAX52X -+# endif -+# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X) -+#else -+# define machine_is_ajax52x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIRIUSTAR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIRIUSTAR -+# endif -+# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR) -+#else -+# define machine_is_siriustar() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IODATA_HDLG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IODATA_HDLG -+# endif -+# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG) -+#else -+# define machine_is_iodata_hdlg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200UTL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200UTL -+# endif -+# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL) -+#else -+# define machine_is_at91rm9200utl() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BIOSAFE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BIOSAFE -+# endif -+# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE) -+#else -+# define machine_is_biosafe() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MP1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MP1000 -+# endif -+# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000) -+#else -+# define machine_is_mp1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PARSY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PARSY -+# endif -+# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY) -+#else -+# define machine_is_parsy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCXP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCXP -+# endif -+# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP) -+#else -+# define machine_is_ccxp270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_GSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE -+# endif -+# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE) -+#else -+# define machine_is_omap_gsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REALVIEW_EB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REALVIEW_EB -+# endif -+# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB) -+#else -+# define machine_is_realview_eb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMOA -+# endif -+# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA) -+#else -+# define machine_is_samoa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_T3XSCALE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_T3XSCALE -+# endif -+# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE) -+#else -+# define machine_is_t3xscale() (0) -+#endif -+ -+#ifdef CONFIG_MACH_I878 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_I878 -+# endif -+# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878) -+#else -+# define machine_is_i878() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BORZOI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BORZOI -+# endif -+# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI) -+#else -+# define machine_is_borzoi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GECKO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GECKO -+# endif -+# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO) -+#else -+# define machine_is_gecko() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101 -+# endif -+# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101) -+#else -+# define machine_is_ds101() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT2 -+# endif -+# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2) -+#else -+# define machine_is_omap_palmtt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMLD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMLD -+# endif -+# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD) -+#else -+# define machine_is_xscale_palmld() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC9C -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC9C -+# endif -+# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C) -+#else -+# define machine_is_cc9c() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SBC1670 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SBC1670 -+# endif -+# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670) -+#else -+# define machine_is_sbc1670() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP28X5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP28X5 -+# endif -+# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5) -+#else -+# define machine_is_ixdp28x5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTT -+# endif -+# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT) -+#else -+# define machine_is_omap_palmtt() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML696K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML696K -+# endif -+# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K) -+#else -+# define machine_is_ml696k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARCOM_ZEUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARCOM_ZEUS -+# endif -+# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS) -+#else -+# define machine_is_arcom_zeus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OSIRIS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OSIRIS -+# endif -+# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS) -+#else -+# define machine_is_osiris() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAESTRO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAESTRO -+# endif -+# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO) -+#else -+# define machine_is_maestro() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TUNGE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TUNGE2 -+# endif -+# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2) -+#else -+# define machine_is_tunge2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXBBM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXBBM -+# endif -+# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM) -+#else -+# define machine_is_ixbbm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX27 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX27 -+# endif -+# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27) -+#else -+# define machine_is_mx27ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AX8004 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AX8004 -+# endif -+# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004) -+#else -+# define machine_is_ax8004() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91SAM9261EK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91SAM9261EK -+# endif -+# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK) -+#else -+# define machine_is_at91sam9261ek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOFT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOFT -+# endif -+# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT) -+#else -+# define machine_is_loft() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGPIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGPIE -+# endif -+# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE) -+#else -+# define machine_is_magpie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21 -+# endif -+# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21) -+#else -+# define machine_is_mx21ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MB87M3400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MB87M3400 -+# endif -+# define machine_is_mb87m3400() (machine_arch_type == MACH_TYPE_MB87M3400) -+#else -+# define machine_is_mb87m3400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MGUARD_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MGUARD_DELTA -+# endif -+# define machine_is_mguard_delta() (machine_arch_type == MACH_TYPE_MGUARD_DELTA) -+#else -+# define machine_is_mguard_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_DVDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_DVDP -+# endif -+# define machine_is_davinci_dvdp() (machine_arch_type == MACH_TYPE_DAVINCI_DVDP) -+#else -+# define machine_is_davinci_dvdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCUNIVERSAL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCUNIVERSAL -+# endif -+# define machine_is_htcuniversal() (machine_arch_type == MACH_TYPE_HTCUNIVERSAL) -+#else -+# define machine_is_htcuniversal() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPAD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPAD -+# endif -+# define machine_is_tpad() (machine_arch_type == MACH_TYPE_TPAD) -+#else -+# define machine_is_tpad() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ROVERP3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ROVERP3 -+# endif -+# define machine_is_roverp3() (machine_arch_type == MACH_TYPE_ROVERP3) -+#else -+# define machine_is_roverp3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_JORNADA928 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_JORNADA928 -+# endif -+# define machine_is_jornada928() (machine_arch_type == MACH_TYPE_JORNADA928) -+#else -+# define machine_is_jornada928() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MV88FXX81 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MV88FXX81 -+# endif -+# define machine_is_mv88fxx81() (machine_arch_type == MACH_TYPE_MV88FXX81) -+#else -+# define machine_is_mv88fxx81() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STMP36XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STMP36XX -+# endif -+# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX) -+#else -+# define machine_is_stmp36xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SXNI79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SXNI79524 -+# endif -+# define machine_is_sxni79524() (machine_arch_type == MACH_TYPE_SXNI79524) -+#else -+# define machine_is_sxni79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AMS_DELTA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AMS_DELTA -+# endif -+# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA) -+#else -+# define machine_is_ams_delta() (0) -+#endif -+ -+#ifdef CONFIG_MACH_URANIUM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_URANIUM -+# endif -+# define machine_is_uranium() (machine_arch_type == MACH_TYPE_URANIUM) -+#else -+# define machine_is_uranium() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UCON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UCON -+# endif -+# define machine_is_ucon() (machine_arch_type == MACH_TYPE_UCON) -+#else -+# define machine_is_ucon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NAS100D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NAS100D -+# endif -+# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D) -+#else -+# define machine_is_nas100d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_L083_1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_L083_1000 -+# endif -+# define machine_is_l083() (machine_arch_type == MACH_TYPE_L083_1000) -+#else -+# define machine_is_l083() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EZX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EZX -+# endif -+# define machine_is_ezx() (machine_arch_type == MACH_TYPE_EZX) -+#else -+# define machine_is_ezx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX5220 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX5220 -+# endif -+# define machine_is_pnx5220() (machine_arch_type == MACH_TYPE_PNX5220) -+#else -+# define machine_is_pnx5220() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BUTTE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BUTTE -+# endif -+# define machine_is_butte() (machine_arch_type == MACH_TYPE_BUTTE) -+#else -+# define machine_is_butte() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SRM2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SRM2 -+# endif -+# define machine_is_srm2() (machine_arch_type == MACH_TYPE_SRM2) -+#else -+# define machine_is_srm2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSBR -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSBR -+# endif -+# define machine_is_dsbr() (machine_arch_type == MACH_TYPE_DSBR) -+#else -+# define machine_is_dsbr() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CRYSTALBALL -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CRYSTALBALL -+# endif -+# define machine_is_crystalball() (machine_arch_type == MACH_TYPE_CRYSTALBALL) -+#else -+# define machine_is_crystalball() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TINYPXA27X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TINYPXA27X -+# endif -+# define machine_is_tinypxa27x() (machine_arch_type == MACH_TYPE_TINYPXA27X) -+#else -+# define machine_is_tinypxa27x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HERBIE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HERBIE -+# endif -+# define machine_is_herbie() (machine_arch_type == MACH_TYPE_HERBIE) -+#else -+# define machine_is_herbie() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAGICIAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAGICIAN -+# endif -+# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN) -+#else -+# define machine_is_magician() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM4002 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM4002 -+# endif -+# define machine_is_cm4002() (machine_arch_type == MACH_TYPE_CM4002) -+#else -+# define machine_is_cm4002() (0) -+#endif -+ -+#ifdef CONFIG_MACH_B4 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_B4 -+# endif -+# define machine_is_b4() (machine_arch_type == MACH_TYPE_B4) -+#else -+# define machine_is_b4() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAUI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAUI -+# endif -+# define machine_is_maui() (machine_arch_type == MACH_TYPE_MAUI) -+#else -+# define machine_is_maui() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CYBERTRACKER_G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CYBERTRACKER_G -+# endif -+# define machine_is_cybertracker_g() (machine_arch_type == MACH_TYPE_CYBERTRACKER_G) -+#else -+# define machine_is_cybertracker_g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDKN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDKN -+# endif -+# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN) -+#else -+# define machine_is_nxdkn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MIO8390 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MIO8390 -+# endif -+# define machine_is_mio8390() (machine_arch_type == MACH_TYPE_MIO8390) -+#else -+# define machine_is_mio8390() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMI_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMI_BOARD -+# endif -+# define machine_is_omi_board() (machine_arch_type == MACH_TYPE_OMI_BOARD) -+#else -+# define machine_is_omi_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX21CIV -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX21CIV -+# endif -+# define machine_is_mx21civ() (machine_arch_type == MACH_TYPE_MX21CIV) -+#else -+# define machine_is_mx21civ() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MAHI_CDAC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MAHI_CDAC -+# endif -+# define machine_is_mahi_cdac() (machine_arch_type == MACH_TYPE_MAHI_CDAC) -+#else -+# define machine_is_mahi_cdac() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTX -+# endif -+# define machine_is_xscale_palmtx() (machine_arch_type == MACH_TYPE_XSCALE_PALMTX) -+#else -+# define machine_is_xscale_palmtx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2413 -+# endif -+# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413) -+#else -+# define machine_is_s3c2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SAMSYS_EP0 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SAMSYS_EP0 -+# endif -+# define machine_is_samsys_ep0() (machine_arch_type == MACH_TYPE_SAMSYS_EP0) -+#else -+# define machine_is_samsys_ep0() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V1 -+# endif -+# define machine_is_wg302v1() (machine_arch_type == MACH_TYPE_WG302V1) -+#else -+# define machine_is_wg302v1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WG302V2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WG302V2 -+# endif -+# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2) -+#else -+# define machine_is_wg302v2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EB42X -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EB42X -+# endif -+# define machine_is_eb42x() (machine_arch_type == MACH_TYPE_EB42X) -+#else -+# define machine_is_eb42x() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IQ331ES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IQ331ES -+# endif -+# define machine_is_iq331es() (machine_arch_type == MACH_TYPE_IQ331ES) -+#else -+# define machine_is_iq331es() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COSYDSP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COSYDSP -+# endif -+# define machine_is_cosydsp() (machine_arch_type == MACH_TYPE_COSYDSP) -+#else -+# define machine_is_cosydsp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_UPLAT7D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_UPLAT7D -+# endif -+# define machine_is_uplat7d_proto() (machine_arch_type == MACH_TYPE_UPLAT7D) -+#else -+# define machine_is_uplat7d_proto() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTDAVINCI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTDAVINCI -+# endif -+# define machine_is_ptdavinci() (machine_arch_type == MACH_TYPE_PTDAVINCI) -+#else -+# define machine_is_ptdavinci() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MBUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MBUS -+# endif -+# define machine_is_mbus() (machine_arch_type == MACH_TYPE_MBUS) -+#else -+# define machine_is_mbus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NADIA2VB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NADIA2VB -+# endif -+# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB) -+#else -+# define machine_is_nadia2vb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_R1000 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_R1000 -+# endif -+# define machine_is_r1000() (machine_arch_type == MACH_TYPE_R1000) -+#else -+# define machine_is_r1000() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW90250 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW90250 -+# endif -+# define machine_is_hw90250() (machine_arch_type == MACH_TYPE_HW90250) -+#else -+# define machine_is_hw90250() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_2430SDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_2430SDP -+# endif -+# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP) -+#else -+# define machine_is_omap_2430sdp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DAVINCI_EVM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DAVINCI_EVM -+# endif -+# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM) -+#else -+# define machine_is_davinci_evm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TORNADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TORNADO -+# endif -+# define machine_is_omap_tornado() (machine_arch_type == MACH_TYPE_OMAP_TORNADO) -+#else -+# define machine_is_omap_tornado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OLOCREEK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OLOCREEK -+# endif -+# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK) -+#else -+# define machine_is_olocreek() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PALMZ72 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PALMZ72 -+# endif -+# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72) -+#else -+# define machine_is_palmz72() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXDB500 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXDB500 -+# endif -+# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500) -+#else -+# define machine_is_nxdb500() (0) -+#endif -+ -+#ifdef CONFIG_MACH_APF9328 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_APF9328 -+# endif -+# define machine_is_apf9328() (machine_arch_type == MACH_TYPE_APF9328) -+#else -+# define machine_is_apf9328() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_WIPOQ -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_WIPOQ -+# endif -+# define machine_is_omap_wipoq() (machine_arch_type == MACH_TYPE_OMAP_WIPOQ) -+#else -+# define machine_is_omap_wipoq() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_TWIP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_TWIP -+# endif -+# define machine_is_omap_twip() (machine_arch_type == MACH_TYPE_OMAP_TWIP) -+#else -+# define machine_is_omap_twip() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTREO650 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTREO650 -+# endif -+# define machine_is_xscale_treo650() (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650) -+#else -+# define machine_is_xscale_treo650() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ACUMEN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ACUMEN -+# endif -+# define machine_is_acumen() (machine_arch_type == MACH_TYPE_ACUMEN) -+#else -+# define machine_is_acumen() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XP100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XP100 -+# endif -+# define machine_is_xp100() (machine_arch_type == MACH_TYPE_XP100) -+#else -+# define machine_is_xp100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FS2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FS2410 -+# endif -+# define machine_is_fs2410() (machine_arch_type == MACH_TYPE_FS2410) -+#else -+# define machine_is_fs2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA270_CERF -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA270_CERF -+# endif -+# define machine_is_pxa270_cerf() (machine_arch_type == MACH_TYPE_PXA270_CERF) -+#else -+# define machine_is_pxa270_cerf() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SQ2FTLPALM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SQ2FTLPALM -+# endif -+# define machine_is_sq2ftlpalm() (machine_arch_type == MACH_TYPE_SQ2FTLPALM) -+#else -+# define machine_is_sq2ftlpalm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BSEMSERVER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BSEMSERVER -+# endif -+# define machine_is_bsemserver() (machine_arch_type == MACH_TYPE_BSEMSERVER) -+#else -+# define machine_is_bsemserver() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETCLIENT -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETCLIENT -+# endif -+# define machine_is_netclient() (machine_arch_type == MACH_TYPE_NETCLIENT) -+#else -+# define machine_is_netclient() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSCALE_PALMTT5 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSCALE_PALMTT5 -+# endif -+# define machine_is_xscale_palmtt5() (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5) -+#else -+# define machine_is_xscale_palmtt5() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMTC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMTC -+# endif -+# define machine_is_xscale_palmtc() (machine_arch_type == MACH_TYPE_OMAP_PALMTC) -+#else -+# define machine_is_xscale_palmtc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_APOLLON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_APOLLON -+# endif -+# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON) -+#else -+# define machine_is_omap_apollon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ARGONLVEVB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ARGONLVEVB -+# endif -+# define machine_is_mxc30030evb() (machine_arch_type == MACH_TYPE_ARGONLVEVB) -+#else -+# define machine_is_mxc30030evb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REA_2D -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REA_2D -+# endif -+# define machine_is_rea_2d() (machine_arch_type == MACH_TYPE_REA_2D) -+#else -+# define machine_is_rea_2d() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TI3E524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TI3E524 -+# endif -+# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524) -+#else -+# define machine_is_eti3e524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATEB9200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATEB9200 -+# endif -+# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200) -+#else -+# define machine_is_ateb9200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AUCKLAND -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AUCKLAND -+# endif -+# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND) -+#else -+# define machine_is_auckland() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AK3320M -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AK3320M -+# endif -+# define machine_is_ak3220m() (machine_arch_type == MACH_TYPE_AK3320M) -+#else -+# define machine_is_ak3220m() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DURAMAX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DURAMAX -+# endif -+# define machine_is_duramax() (machine_arch_type == MACH_TYPE_DURAMAX) -+#else -+# define machine_is_duramax() (0) -+#endif -+ -+#ifdef CONFIG_MACH_N35 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_N35 -+# endif -+# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35) -+#else -+# define machine_is_n35() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PRONGHORN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PRONGHORN -+# endif -+# define machine_is_pronghorn() (machine_arch_type == MACH_TYPE_PRONGHORN) -+#else -+# define machine_is_pronghorn() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUNDY -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUNDY -+# endif -+# define machine_is_fundy() (machine_arch_type == MACH_TYPE_FUNDY) -+#else -+# define machine_is_fundy() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LOGICPD_PXA270 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LOGICPD_PXA270 -+# endif -+# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270) -+#else -+# define machine_is_logicpd_pxa270() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CPU777 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CPU777 -+# endif -+# define machine_is_cpu777() (machine_arch_type == MACH_TYPE_CPU777) -+#else -+# define machine_is_cpu777() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SIMICON9201 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SIMICON9201 -+# endif -+# define machine_is_simicon9201() (machine_arch_type == MACH_TYPE_SIMICON9201) -+#else -+# define machine_is_simicon9201() (0) -+#endif -+ -+#ifdef CONFIG_MACH_LEAP2_HPM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_LEAP2_HPM -+# endif -+# define machine_is_leap2_hpm() (machine_arch_type == MACH_TYPE_LEAP2_HPM) -+#else -+# define machine_is_leap2_hpm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CM922TXA10 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CM922TXA10 -+# endif -+# define machine_is_cm922txa10() (machine_arch_type == MACH_TYPE_CM922TXA10) -+#else -+# define machine_is_cm922txa10() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA -+# endif -+# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA) -+#else -+# define machine_is_sandgate() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2 -+# endif -+# define machine_is_sandgate2() (machine_arch_type == MACH_TYPE_SANDGATE2) -+#else -+# define machine_is_sandgate2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2G -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2G -+# endif -+# define machine_is_sandgate2g() (machine_arch_type == MACH_TYPE_SANDGATE2G) -+#else -+# define machine_is_sandgate2g() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SANDGATE2P -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SANDGATE2P -+# endif -+# define machine_is_sandgate2p() (machine_arch_type == MACH_TYPE_SANDGATE2P) -+#else -+# define machine_is_sandgate2p() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FRED_JACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FRED_JACK -+# endif -+# define machine_is_fred_jack() (machine_arch_type == MACH_TYPE_FRED_JACK) -+#else -+# define machine_is_fred_jack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TTG_COLOR1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TTG_COLOR1 -+# endif -+# define machine_is_ttg_color1() (machine_arch_type == MACH_TYPE_TTG_COLOR1) -+#else -+# define machine_is_ttg_color1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NXEB500HMI -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NXEB500HMI -+# endif -+# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI) -+#else -+# define machine_is_nxeb500hmi() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NETDCU8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NETDCU8 -+# endif -+# define machine_is_netdcu8() (machine_arch_type == MACH_TYPE_NETDCU8) -+#else -+# define machine_is_netdcu8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ML675050_CPU_BOA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ML675050_CPU_BOA -+# endif -+# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA) -+#else -+# define machine_is_ml675050_cpu_boa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVX538 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVX538 -+# endif -+# define machine_is_ng_fvx538() (machine_arch_type == MACH_TYPE_NG_FVX538) -+#else -+# define machine_is_ng_fvx538() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NG_FVS338 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NG_FVS338 -+# endif -+# define machine_is_ng_fvs338() (machine_arch_type == MACH_TYPE_NG_FVS338) -+#else -+# define machine_is_ng_fvs338() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PNX4103 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PNX4103 -+# endif -+# define machine_is_pnx4103() (machine_arch_type == MACH_TYPE_PNX4103) -+#else -+# define machine_is_pnx4103() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HESDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HESDB -+# endif -+# define machine_is_hesdb() (machine_arch_type == MACH_TYPE_HESDB) -+#else -+# define machine_is_hesdb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_XSILO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_XSILO -+# endif -+# define machine_is_xsilo() (machine_arch_type == MACH_TYPE_XSILO) -+#else -+# define machine_is_xsilo() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESPRESSO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESPRESSO -+# endif -+# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO) -+#else -+# define machine_is_espresso() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMLC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMLC -+# endif -+# define machine_is_emlc() (machine_arch_type == MACH_TYPE_EMLC) -+#else -+# define machine_is_emlc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SISTERON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SISTERON -+# endif -+# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON) -+#else -+# define machine_is_sisteron() (0) -+#endif -+ -+#ifdef CONFIG_MACH_RX1950 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_RX1950 -+# endif -+# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950) -+#else -+# define machine_is_rx1950() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TSC_VENUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TSC_VENUS -+# endif -+# define machine_is_tsc_venus() (machine_arch_type == MACH_TYPE_TSC_VENUS) -+#else -+# define machine_is_tsc_venus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DS101J -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DS101J -+# endif -+# define machine_is_ds101j() (machine_arch_type == MACH_TYPE_DS101J) -+#else -+# define machine_is_ds101j() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MXC30030ADS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MXC30030ADS -+# endif -+# define machine_is_mxc30030ads() (machine_arch_type == MACH_TYPE_MXC30030ADS) -+#else -+# define machine_is_mxc30030ads() (0) -+#endif -+ -+#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_FUJITSU_WIMAXSOC -+# endif -+# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC) -+#else -+# define machine_is_fujitsu_wimaxsoc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DUALPCMODEM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DUALPCMODEM -+# endif -+# define machine_is_dualpcmodem() (machine_arch_type == MACH_TYPE_DUALPCMODEM) -+#else -+# define machine_is_dualpcmodem() (0) -+#endif -+ -+#ifdef CONFIG_MACH_GESBC9312 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_GESBC9312 -+# endif -+# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312) -+#else -+# define machine_is_gesbc9312() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCAPACHE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCAPACHE -+# endif -+# define machine_is_htcapache() (machine_arch_type == MACH_TYPE_HTCAPACHE) -+#else -+# define machine_is_htcapache() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXDP435 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXDP435 -+# endif -+# define machine_is_ixdp435() (machine_arch_type == MACH_TYPE_IXDP435) -+#else -+# define machine_is_ixdp435() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CATPROVT100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CATPROVT100 -+# endif -+# define machine_is_catprovt100() (machine_arch_type == MACH_TYPE_CATPROVT100) -+#else -+# define machine_is_catprovt100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX1XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX1XX -+# endif -+# define machine_is_picotux1xx() (machine_arch_type == MACH_TYPE_PICOTUX1XX) -+#else -+# define machine_is_picotux1xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PICOTUX2XX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PICOTUX2XX -+# endif -+# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX) -+#else -+# define machine_is_picotux2xx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DSMG600 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DSMG600 -+# endif -+# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600) -+#else -+# define machine_is_dsmg600() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EMPC2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EMPC2 -+# endif -+# define machine_is_empc2() (machine_arch_type == MACH_TYPE_EMPC2) -+#else -+# define machine_is_empc2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VENTURA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VENTURA -+# endif -+# define machine_is_ventura() (machine_arch_type == MACH_TYPE_VENTURA) -+#else -+# define machine_is_ventura() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PHIDGET_SBC -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PHIDGET_SBC -+# endif -+# define machine_is_phidget_sbc() (machine_arch_type == MACH_TYPE_PHIDGET_SBC) -+#else -+# define machine_is_phidget_sbc() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IJ3K -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IJ3K -+# endif -+# define machine_is_ij3k() (machine_arch_type == MACH_TYPE_IJ3K) -+#else -+# define machine_is_ij3k() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PISGAH -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PISGAH -+# endif -+# define machine_is_pisgah() (machine_arch_type == MACH_TYPE_PISGAH) -+#else -+# define machine_is_pisgah() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_FSAMPLE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE -+# endif -+# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE) -+#else -+# define machine_is_omap_fsample() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG720 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG720 -+# endif -+# define machine_is_sg720() (machine_arch_type == MACH_TYPE_SG720) -+#else -+# define machine_is_sg720() (0) -+#endif -+ -+#ifdef CONFIG_MACH_REDFOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_REDFOX -+# endif -+# define machine_is_redfox() (machine_arch_type == MACH_TYPE_REDFOX) -+#else -+# define machine_is_redfox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MYSH_EP9315_1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MYSH_EP9315_1 -+# endif -+# define machine_is_mysh_ep9315_1() (machine_arch_type == MACH_TYPE_MYSH_EP9315_1) -+#else -+# define machine_is_mysh_ep9315_1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TPF106 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TPF106 -+# endif -+# define machine_is_tpf106() (machine_arch_type == MACH_TYPE_TPF106) -+#else -+# define machine_is_tpf106() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AT91RM9200KG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AT91RM9200KG -+# endif -+# define machine_is_at91rm9200kg() (machine_arch_type == MACH_TYPE_AT91RM9200KG) -+#else -+# define machine_is_at91rm9200kg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SLEDB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SLEDB -+# endif -+# define machine_is_racemt2() (machine_arch_type == MACH_TYPE_SLEDB) -+#else -+# define machine_is_racemt2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ONTRACK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ONTRACK -+# endif -+# define machine_is_ontrack() (machine_arch_type == MACH_TYPE_ONTRACK) -+#else -+# define machine_is_ontrack() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PM1200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PM1200 -+# endif -+# define machine_is_pm1200() (machine_arch_type == MACH_TYPE_PM1200) -+#else -+# define machine_is_pm1200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ESS24XXX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ESS24XXX -+# endif -+# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX) -+#else -+# define machine_is_ess24562() (0) -+#endif -+ -+#ifdef CONFIG_MACH_COREMP7 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_COREMP7 -+# endif -+# define machine_is_coremp7() (machine_arch_type == MACH_TYPE_COREMP7) -+#else -+# define machine_is_coremp7() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXCODER_6446 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXCODER_6446 -+# endif -+# define machine_is_nexcoder_6446() (machine_arch_type == MACH_TYPE_NEXCODER_6446) -+#else -+# define machine_is_nexcoder_6446() (0) -+#endif -+ -+#ifdef CONFIG_MACH_STVC8380 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_STVC8380 -+# endif -+# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380) -+#else -+# define machine_is_stvc8380() (0) -+#endif -+ -+#ifdef CONFIG_MACH_TEKLYNX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_TEKLYNX -+# endif -+# define machine_is_teklynx() (machine_arch_type == MACH_TYPE_TEKLYNX) -+#else -+# define machine_is_teklynx() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CARBONADO -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CARBONADO -+# endif -+# define machine_is_carbonado() (machine_arch_type == MACH_TYPE_CARBONADO) -+#else -+# define machine_is_carbonado() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SYSMOS_MP730 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SYSMOS_MP730 -+# endif -+# define machine_is_sysmos_mp730() (machine_arch_type == MACH_TYPE_SYSMOS_MP730) -+#else -+# define machine_is_sysmos_mp730() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SNAPPER_CL15 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SNAPPER_CL15 -+# endif -+# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15) -+#else -+# define machine_is_snapper_cl15() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PGIGIM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PGIGIM -+# endif -+# define machine_is_pgigim() (machine_arch_type == MACH_TYPE_PGIGIM) -+#else -+# define machine_is_pgigim() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PTX9160P2 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PTX9160P2 -+# endif -+# define machine_is_ptx9160p2() (machine_arch_type == MACH_TYPE_PTX9160P2) -+#else -+# define machine_is_ptx9160p2() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DCORE1 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DCORE1 -+# endif -+# define machine_is_dcore1() (machine_arch_type == MACH_TYPE_DCORE1) -+#else -+# define machine_is_dcore1() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VICTORPXA -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VICTORPXA -+# endif -+# define machine_is_victorpxa() (machine_arch_type == MACH_TYPE_VICTORPXA) -+#else -+# define machine_is_victorpxa() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MX2DTB -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MX2DTB -+# endif -+# define machine_is_mx2dtb() (machine_arch_type == MACH_TYPE_MX2DTB) -+#else -+# define machine_is_mx2dtb() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PXA_IREX_ER0100 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PXA_IREX_ER0100 -+# endif -+# define machine_is_pxa_irex_er0100() (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100) -+#else -+# define machine_is_pxa_irex_er0100() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_PALMZ71 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_PALMZ71 -+# endif -+# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71) -+#else -+# define machine_is_omap_palmz71() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_DEG -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_DEG -+# endif -+# define machine_is_bartec_deg() (machine_arch_type == MACH_TYPE_BARTEC_DEG) -+#else -+# define machine_is_bartec_deg() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HW50251 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HW50251 -+# endif -+# define machine_is_hw50251() (machine_arch_type == MACH_TYPE_HW50251) -+#else -+# define machine_is_hw50251() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IBOX -+# endif -+# define machine_is_ibox() (machine_arch_type == MACH_TYPE_IBOX) -+#else -+# define machine_is_ibox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ATLASLH7A404 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ATLASLH7A404 -+# endif -+# define machine_is_atlaslh7a404() (machine_arch_type == MACH_TYPE_ATLASLH7A404) -+#else -+# define machine_is_atlaslh7a404() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PT2026 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PT2026 -+# endif -+# define machine_is_pt2026() (machine_arch_type == MACH_TYPE_PT2026) -+#else -+# define machine_is_pt2026() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCALPINE -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCALPINE -+# endif -+# define machine_is_htcalpine() (machine_arch_type == MACH_TYPE_HTCALPINE) -+#else -+# define machine_is_htcalpine() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BARTEC_VTU -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BARTEC_VTU -+# endif -+# define machine_is_bartec_vtu() (machine_arch_type == MACH_TYPE_BARTEC_VTU) -+#else -+# define machine_is_bartec_vtu() (0) -+#endif -+ -+#ifdef CONFIG_MACH_VCOREII -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_VCOREII -+# endif -+# define machine_is_vcoreii() (machine_arch_type == MACH_TYPE_VCOREII) -+#else -+# define machine_is_vcoreii() (0) -+#endif -+ -+#ifdef CONFIG_MACH_PDNB3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_PDNB3 -+# endif -+# define machine_is_pdnb3() (machine_arch_type == MACH_TYPE_PDNB3) -+#else -+# define machine_is_pdnb3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HTCBEETLES -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HTCBEETLES -+# endif -+# define machine_is_htcbeetles() (machine_arch_type == MACH_TYPE_HTCBEETLES) -+#else -+# define machine_is_htcbeetles() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C6400 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C6400 -+# endif -+# define machine_is_s3c6400() (machine_arch_type == MACH_TYPE_S3C6400) -+#else -+# define machine_is_s3c6400() (0) -+#endif -+ -+#ifdef CONFIG_MACH_S3C2443 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_S3C2443 -+# endif -+# define machine_is_s3c2443() (machine_arch_type == MACH_TYPE_S3C2443) -+#else -+# define machine_is_s3c2443() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OMAP_LDK -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OMAP_LDK -+# endif -+# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK) -+#else -+# define machine_is_omap_ldk() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2460 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2460 -+# endif -+# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460) -+#else -+# define machine_is_smdk2460() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2440 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2440 -+# endif -+# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440) -+#else -+# define machine_is_smdk2440() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2412 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2412 -+# endif -+# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412) -+#else -+# define machine_is_smdk2412() (0) -+#endif -+ -+#ifdef CONFIG_MACH_WEBBOX -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_WEBBOX -+# endif -+# define machine_is_webbox() (machine_arch_type == MACH_TYPE_WEBBOX) -+#else -+# define machine_is_webbox() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CWWNDP -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CWWNDP -+# endif -+# define machine_is_cwwndp() (machine_arch_type == MACH_TYPE_CWWNDP) -+#else -+# define machine_is_cwwndp() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DRAGON -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DRAGON -+# endif -+# define machine_is_dragon() (machine_arch_type == MACH_TYPE_DRAGON) -+#else -+# define machine_is_dragon() (0) -+#endif -+ -+#ifdef CONFIG_MACH_OPENDO_CPU_BOARD -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_OPENDO_CPU_BOARD -+# endif -+# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD) -+#else -+# define machine_is_opendo_cpu_board() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CCM2200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CCM2200 -+# endif -+# define machine_is_ccm2200() (machine_arch_type == MACH_TYPE_CCM2200) -+#else -+# define machine_is_ccm2200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_ETWARM -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_ETWARM -+# endif -+# define machine_is_etwarm() (machine_arch_type == MACH_TYPE_ETWARM) -+#else -+# define machine_is_etwarm() (0) -+#endif -+ -+#ifdef CONFIG_MACH_M93030 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_M93030 -+# endif -+# define machine_is_m93030() (machine_arch_type == MACH_TYPE_M93030) -+#else -+# define machine_is_m93030() (0) -+#endif -+ -+#ifdef CONFIG_MACH_CC7U -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_CC7U -+# endif -+# define machine_is_cc7u() (machine_arch_type == MACH_TYPE_CC7U) -+#else -+# define machine_is_cc7u() (0) -+#endif -+ -+#ifdef CONFIG_MACH_MTT_RANGER -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_MTT_RANGER -+# endif -+# define machine_is_mtt_ranger() (machine_arch_type == MACH_TYPE_MTT_RANGER) -+#else -+# define machine_is_mtt_ranger() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEXUS -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEXUS -+# endif -+# define machine_is_nexus() (machine_arch_type == MACH_TYPE_NEXUS) -+#else -+# define machine_is_nexus() (0) -+#endif -+ -+#ifdef CONFIG_MACH_DESMAN -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_DESMAN -+# endif -+# define machine_is_desman() (machine_arch_type == MACH_TYPE_DESMAN) -+#else -+# define machine_is_desman() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BKDE303 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BKDE303 -+# endif -+# define machine_is_bkde303() (machine_arch_type == MACH_TYPE_BKDE303) -+#else -+# define machine_is_bkde303() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SMDK2413 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SMDK2413 -+# endif -+# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413) -+#else -+# define machine_is_smdk2413() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M7200 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M7200 -+# endif -+# define machine_is_aml_m7200() (machine_arch_type == MACH_TYPE_AML_M7200) -+#else -+# define machine_is_aml_m7200() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AML_M5900 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AML_M5900 -+# endif -+# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900) -+#else -+# define machine_is_aml_m5900() (0) -+#endif -+ -+#ifdef CONFIG_MACH_SG640 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_SG640 -+# endif -+# define machine_is_sg640() (machine_arch_type == MACH_TYPE_SG640) -+#else -+# define machine_is_sg640() (0) -+#endif -+ -+#ifdef CONFIG_MACH_EDG79524 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_EDG79524 -+# endif -+# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524) -+#else -+# define machine_is_edg79524() (0) -+#endif -+ -+#ifdef CONFIG_MACH_AI2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_AI2410 -+# endif -+# define machine_is_ai2410() (machine_arch_type == MACH_TYPE_AI2410) -+#else -+# define machine_is_ai2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_IXP465 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_IXP465 -+# endif -+# define machine_is_ixp465() (machine_arch_type == MACH_TYPE_IXP465) -+#else -+# define machine_is_ixp465() (0) -+#endif -+ -+#ifdef CONFIG_MACH_BALLOON3 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_BALLOON3 -+# endif -+# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3) -+#else -+# define machine_is_balloon3() (0) -+#endif -+ -+#ifdef CONFIG_MACH_QT2410 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_QT2410 -+# endif -+# define machine_is_qt2410() (machine_arch_type == MACH_TYPE_QT2410) -+#else -+# define machine_is_qt2410() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEO1973_GTA01 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEO1973_GTA01 -+# endif -+# define machine_is_neo1973_gta01() (machine_arch_type == MACH_TYPE_NEO1973_GTA01) -+#else -+# define machine_is_neo1973_gta01() (0) -+#endif -+ -+#ifdef CONFIG_MACH_HXD8 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_HXD8 -+# endif -+# define machine_is_hxd8() (machine_arch_type == MACH_TYPE_HXD8) -+#else -+# define machine_is_neo8() (0) -+#endif -+ -+#ifdef CONFIG_MACH_NEO1973_GTA02 -+# ifdef machine_arch_type -+# undef machine_arch_type -+# define machine_arch_type __machine_arch_type -+# else -+# define machine_arch_type MACH_TYPE_NEO1973_GTA02 -+# endif -+# define machine_is_neo1973_gta02() (machine_arch_type == MACH_TYPE_NEO1973_GTA02) -+#else -+# define machine_is_neo1973_gta02() (0) -+#endif -+ -+ - /* - * These have not yet been registered - */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch deleted file mode 100644 index a44434155e..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: u-boot/tools/setlocalversion -=================================================================== ---- u-boot.orig/tools/setlocalversion 2007-03-26 14:42:58.000000000 +0200 -+++ u-boot/tools/setlocalversion 2007-03-26 14:46:47.000000000 +0200 -@@ -20,3 +20,5 @@ - printf '%s' -dirty - fi - fi -+ -+printf '%s' -moko9 diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch deleted file mode 100644 index d630889e3c..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch +++ /dev/null @@ -1,20 +0,0 @@ -This patch makes sure that the 'nand markbad' command does not only mark a block -'bad' in the bad-block table, but _also_ marks it bad in the OOB area. - -we need this to preserve the bad block status when re-creating the bad block table -at some later point. - -Signed-off-by: Harald Welte -Index: u-boot/drivers/nand/nand_base.c -=================================================================== ---- u-boot.orig/drivers/nand/nand_base.c 2007-03-01 12:47:31.000000000 +0100 -+++ u-boot/drivers/nand/nand_base.c 2007-03-01 12:48:08.000000000 +0100 -@@ -481,7 +481,7 @@ - - /* Do we have a flash based bad block table ? */ - if (this->options & NAND_USE_FLASH_BBT) -- return nand_update_bbt (mtd, ofs); -+ nand_update_bbt (mtd, ofs); - - /* We write two bytes, so we dont have to mess with 16 bit access */ - ofs += mtd->oobsize + (this->badblockpos & ~0x01); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch deleted file mode 100644 index 7e3aa4f480..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h 2007-02-27 00:43:16.000000000 +0100 -+++ u-boot/include/configs/neo1973_gta01.h 2007-02-27 00:47:49.000000000 +0100 -@@ -115,8 +115,8 @@ - #include - - #define CONFIG_BOOTDELAY 3 --#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" --#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x34000 0x200000; bootm 0x32000000" -+#define CONFIG_BOOTARGS "" -+#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" - - #define CONFIG_DOS_PARTITION 1 - -@@ -181,11 +181,14 @@ - #define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ - #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" - #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION --#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" - #define CONFIG_USBD_DFU 1 - #define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ - #define CONFIG_USBD_DFU_INTERFACE 2 - -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "usbtty=cdc_acm\0" \ -+ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8\0" \ -+ "" - - /*----------------------------------------------------------------------- - * Physical Memory Map diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch deleted file mode 100644 index 19d912620d..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch +++ /dev/null @@ -1,113 +0,0 @@ -Resume support for low-level uboot code, Version 5 - -Signed-off-by: Ben Dooks - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S 2007-02-28 03:51:24.000000000 +0100 -+++ u-boot/cpu/arm920t/start.S 2007-03-01 02:43:47.000000000 +0100 -@@ -158,18 +158,68 @@ - str r1, [r0] - # endif - -+ /* default FCLK is 202 MHz ! */ -+#define LOCKTIME 0x4c000000 -+#define UPLLCON 0x4c000008 -+//#define MPLLCFG ((0x90 << 12) + (0x2 << 4) + 0x2) -+#define MPLLCFG ((0x90 << 12) + (0x7 << 4) + 0x0) -+#define UPLLCFG ((0x78 << 12) + (0x2 << 4) + 0x3) -+ ldr r0, =LOCKTIME -+ mov r1, #0xffffff -+ str r1, [r0] -+ -+ ldr r0, =UPLLCON -+ ldr r1, =UPLLCFG -+ str r1, [r0] -+ -+ /* Page 7-19, seven nops between UPLL and MPLL */ -+ nop -+ nop -+ nop -+ nop -+ nop -+ nop -+ nop -+ -+ ldr r1, =MPLLCFG -+ str r1, [r0, #-4] /* MPLLCON */ -+ - /* FCLK:HCLK:PCLK = 1:2:4 */ -- /* default FCLK is 120 MHz ! */ - ldr r0, =CLKDIVN - mov r1, #3 - str r1, [r0] -+ -+#if 1 -+ /* enable uart */ -+ ldr r0, =0x4c00000c /* clkcon */ -+ ldr r1, =0x7fff0 /* all clocks on */ -+ str r1, [r0] -+ -+ /* gpio UART0 init */ -+ ldr r0, =0x56000070 -+ mov r1, #0xaa -+ str r1, [r0] -+ -+ /* init uart */ -+ ldr r0, =0x50000000 -+ mov r1, #0x03 -+ str r1, [r0] -+ ldr r1, =0x245 -+ str r1, [r0, #0x04] -+ mov r1, #0x01 -+ str r1, [r0, #0x08] -+ mov r1, #0x00 -+ str r1, [r0, #0x0c] -+ mov r1, #0x1a -+ str r1, [r0, #0x28] -+#endif -+ - #endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ - - #ifndef CONFIG_SKIP_LOWLEVEL_INIT - #ifndef CONFIG_LL_INIT_NAND_ONLY - bl cpu_init_crit - #endif --#endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT - adr r0, _start /* r0 <- current position of code */ -@@ -202,9 +252,33 @@ - - #ifdef CONFIG_S3C2410_NAND_BOOT - nand_load: -+ /* take sdram out of power down */ -+ ldr r0, =0x56000080 /* misccr */ -+ ldr r1, [ r0 ] -+ bic r1, r1, #(S3C2410_MISCCR_nEN_SCLK0 | S3C2410_MISCCR_nEN_SCLK1 | S3C2410_MISCCR_nEN_SCLKE) -+ str r1, [ r0 ] -+ -+ /* ensure signals stabalise */ -+ mov r1, #128 -+1: subs r1, r1, #1 -+ bpl 1b -+ - #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) - bl cpu_init_crit - #endif -+#if defined(CONFIG_S3C2410) -+ /* ensure some refresh has happened */ -+ ldr r1, =0xfffff -+1: subs r1, r1, #1 -+ bpl 1b -+ -+ /* test for resume */ -+ ldr r1, =0x560000B4 /* gstatus2 */ -+ ldr r0, [ r1 ] -+ tst r0, #0x02 /* is this resume from power down */ -+ ldrne pc, [r1, #4] /* gstatus3 */ -+#endif /* CONFIG_S3C2410 */ -+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */ - - /* mov r10, lr */ - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch deleted file mode 100644 index 6efe24651a..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch +++ /dev/null @@ -1,45 +0,0 @@ -Index: u-boot/include/s3c2410.h -=================================================================== ---- u-boot.orig/include/s3c2410.h -+++ u-boot/include/s3c2410.h -@@ -233,4 +233,40 @@ static inline S3C2410_SDI * S3C2410_GetB - rINTPND;\ - } - /* Wait until rINTPND is changed for the case that the ISR is very short. */ -+ -+#define S3C2410_MISCCR_USBDEV (0<<3) -+#define S3C2410_MISCCR_USBHOST (1<<3) -+ -+#define S3C2410_MISCCR_CLK0_MPLL (0<<4) -+#define S3C2410_MISCCR_CLK0_UPLL (1<<4) -+#define S3C2410_MISCCR_CLK0_FCLK (2<<4) -+#define S3C2410_MISCCR_CLK0_HCLK (3<<4) -+#define S3C2410_MISCCR_CLK0_PCLK (4<<4) -+#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) -+#define S3C2410_MISCCR_CLK0_MASK (7<<4) -+ -+#define S3C2410_MISCCR_CLK1_MPLL (0<<8) -+#define S3C2410_MISCCR_CLK1_UPLL (1<<8) -+#define S3C2410_MISCCR_CLK1_FCLK (2<<8) -+#define S3C2410_MISCCR_CLK1_HCLK (3<<8) -+#define S3C2410_MISCCR_CLK1_PCLK (4<<8) -+#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) -+#define S3C2410_MISCCR_CLK1_MASK (7<<8) -+ -+#define S3C2410_MISCCR_USBSUSPND0 (1<<12) -+#define S3C2410_MISCCR_USBSUSPND1 (1<<13) -+ -+#define S3C2410_MISCCR_nRSTCON (1<<16) -+ -+#define S3C2410_MISCCR_nEN_SCLK0 (1<<17) -+#define S3C2410_MISCCR_nEN_SCLK1 (1<<18) -+#define S3C2410_MISCCR_nEN_SCLKE (1<<19) -+#define S3C2410_MISCCR_SDSLEEP (7<<17) -+ -+#define S3C2410_CLKSLOW_UCLK_OFF (1<<7) -+#define S3C2410_CLKSLOW_MPLL_OFF (1<<5) -+#define S3C2410_CLKSLOW_SLOW (1<<4) -+#define S3C2410_CLKSLOW_SLOWVAL(x) (x) -+#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) -+ - #endif /*__S3C2410_H__*/ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch deleted file mode 100644 index b775beaa07..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch +++ /dev/null @@ -1,818 +0,0 @@ -This patch adds MMC/SD support to the S3C2410 SoC code in -u-boot - -Signed-off-by: Harald Welte - -Index: u-boot/cpu/arm920t/s3c24x0/Makefile -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/Makefile -+++ u-boot/cpu/arm920t/s3c24x0/Makefile -@@ -26,7 +26,7 @@ - LIB = $(obj)lib$(SOC).a - - COBJS = i2c.o interrupts.o serial.o speed.o \ -- usb_ohci.o nand_read.o nand.o cmd_s3c2410.o -+ usb_ohci.o nand_read.o nand.o mmc.o cmd_s3c2410.o - - SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -Index: u-boot/cpu/arm920t/s3c24x0/mmc.c -=================================================================== ---- /dev/null -+++ u-boot/cpu/arm920t/s3c24x0/mmc.c -@@ -0,0 +1,531 @@ -+/* -+ * u-boot S3C2410 MMC/SD card driver -+ * (C) Copyright 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on u-boot pxa MMC driver and linux/drivers/mmc/s3c2410mci.c -+ * (C) 2005-2005 Thomas Kleffel -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_MMC -+ -+#define CONFIG_MMC_WIDE -+ -+static S3C2410_SDI *sdi; -+ -+static block_dev_desc_t mmc_dev; -+ -+block_dev_desc_t * mmc_get_dev(int dev) -+{ -+ return ((block_dev_desc_t *)&mmc_dev); -+} -+ -+/* -+ * FIXME needs to read cid and csd info to determine block size -+ * and other parameters -+ */ -+static uchar mmc_buf[MMC_BLOCK_SIZE]; -+static mmc_csd_t mmc_csd; -+static int mmc_ready = 0; -+static int wide = 0; -+ -+ -+#define CMD_F_RESP 0x01 -+#define CMD_F_RESP_LONG 0x02 -+ -+static u_int32_t *mmc_cmd(ushort cmd, ulong arg, ushort flags) -+{ -+ static u_int32_t resp[5]; -+ -+ u_int32_t ccon, csta; -+ u_int32_t csta_rdy_bit = S3C2410_SDICMDSTAT_CMDSENT; -+ -+ memset(resp, 0, sizeof(resp)); -+ -+ debug("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags); -+ -+ sdi->SDICSTA = 0xffffffff; -+ sdi->SDIDSTA = 0xffffffff; -+ sdi->SDIFSTA = 0xffffffff; -+ -+ sdi->SDICARG = arg; -+ -+ ccon = cmd & S3C2410_SDICMDCON_INDEX; -+ ccon |= S3C2410_SDICMDCON_SENDERHOST|S3C2410_SDICMDCON_CMDSTART; -+ -+ if (flags & CMD_F_RESP) { -+ ccon |= S3C2410_SDICMDCON_WAITRSP; -+ csta_rdy_bit = S3C2410_SDICMDSTAT_RSPFIN; /* 1 << 9 */ -+ } -+ -+ if (flags & CMD_F_RESP_LONG) -+ ccon |= S3C2410_SDICMDCON_LONGRSP; -+ -+ sdi->SDICCON = ccon; -+ -+ while (1) { -+ csta = sdi->SDICSTA; -+ if (csta & csta_rdy_bit) -+ break; -+ if (csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) { -+ printf("===============> MMC CMD Timeout\n"); -+ sdi->SDICSTA |= S3C2410_SDICMDSTAT_CMDTIMEOUT; -+ break; -+ } -+ } -+ -+ debug("final MMC CMD status 0x%x\n", csta); -+ -+ sdi->SDICSTA |= csta_rdy_bit; -+ -+ if (flags & CMD_F_RESP) { -+ resp[0] = sdi->SDIRSP0; -+ resp[1] = sdi->SDIRSP1; -+ resp[2] = sdi->SDIRSP2; -+ resp[3] = sdi->SDIRSP3; -+ } -+ -+ return resp; -+} -+ -+#define FIFO_FILL(host) ((host->SDIFSTA & S3C2410_SDIFSTA_COUNTMASK) >> 2) -+ -+static int mmc_block_read(uchar *dst, ulong src, ulong len) -+{ -+ u_int32_t dcon, fifo; -+ u_int32_t *dst_u32 = (u_int32_t *)dst; -+ u_int32_t *resp; -+ -+ if (len == 0) -+ return 0; -+ -+ debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len); -+ -+ /* set block len */ -+ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, len, CMD_F_RESP); -+ sdi->SDIBSIZE = len; -+ -+ //sdi->SDIPRE = 0xff; -+ -+ /* setup data */ -+ dcon = (len >> 9) & S3C2410_SDIDCON_BLKNUM; -+ dcon |= S3C2410_SDIDCON_BLOCKMODE; -+ dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; -+ if (wide) -+ dcon |= S3C2410_SDIDCON_WIDEBUS; -+ sdi->SDIDCON = dcon; -+ -+ /* send read command */ -+ resp = mmc_cmd(MMC_CMD_READ_BLOCK, src, CMD_F_RESP); -+ -+ while (len > 0) { -+ u_int32_t sdidsta = sdi->SDIDSTA; -+ fifo = FIFO_FILL(sdi); -+ if (sdidsta & (S3C2410_SDIDSTA_FIFOFAIL| -+ S3C2410_SDIDSTA_CRCFAIL| -+ S3C2410_SDIDSTA_RXCRCFAIL| -+ S3C2410_SDIDSTA_DATATIMEOUT)) { -+ printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta); -+ return -EIO; -+ } -+ -+ while (fifo--) { -+ //debug("dst_u32 = 0x%08x\n", dst_u32); -+ *(dst_u32++) = sdi->SDIDAT; -+ if (len >= 4) -+ len -= 4; -+ else { -+ len = 0; -+ break; -+ } -+ } -+ } -+ -+ debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+ while (!(sdi->SDIDSTA & (1 << 4))) {} -+ debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); -+ -+ sdi->SDIDCON = 0; -+ -+ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH)) -+ debug("mmc_block_read; transfer not finished!\n"); -+ -+ return 0; -+} -+ -+static int mmc_block_write(ulong dst, uchar *src, int len) -+{ -+ printf("MMC block write not yet supported on S3C2410!\n"); -+ return -1; -+} -+ -+ -+int mmc_read(ulong src, uchar *dst, int size) -+{ -+ ulong end, part_start, part_end, part_len, aligned_start, aligned_end; -+ ulong mmc_block_size, mmc_block_address; -+ -+ if (size == 0) -+ return 0; -+ -+ if (!mmc_ready) { -+ printf("Please initialize the MMC first\n"); -+ return -1; -+ } -+ -+ mmc_block_size = MMC_BLOCK_SIZE; -+ mmc_block_address = ~(mmc_block_size - 1); -+ -+ src -= CFG_MMC_BASE; -+ end = src + size; -+ part_start = ~mmc_block_address & src; -+ part_end = ~mmc_block_address & end; -+ aligned_start = mmc_block_address & src; -+ aligned_end = mmc_block_address & end; -+ -+ /* all block aligned accesses */ -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if (part_start) { -+ part_len = mmc_block_size - part_start; -+ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) -+ return -1; -+ -+ memcpy(dst, mmc_buf+part_start, part_len); -+ dst += part_len; -+ src += part_len; -+ } -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ for (; src < aligned_end; src += mmc_block_size, dst += mmc_block_size) { -+ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_read((uchar *)(dst), src, mmc_block_size)) < 0) -+ return -1; -+ } -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if (part_end && src < end) { -+ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) -+ return -1; -+ -+ memcpy(dst, mmc_buf, part_end); -+ } -+ return 0; -+} -+ -+int mmc_write(uchar *src, ulong dst, int size) -+{ -+ ulong end, part_start, part_end, part_len, aligned_start, aligned_end; -+ ulong mmc_block_size, mmc_block_address; -+ -+ if (size == 0) -+ return 0; -+ -+ if (!mmc_ready) { -+ printf("Please initialize the MMC first\n"); -+ return -1; -+ } -+ -+ mmc_block_size = MMC_BLOCK_SIZE; -+ mmc_block_address = ~(mmc_block_size - 1); -+ -+ dst -= CFG_MMC_BASE; -+ end = dst + size; -+ part_start = ~mmc_block_address & dst; -+ part_end = ~mmc_block_address & end; -+ aligned_start = mmc_block_address & dst; -+ aligned_end = mmc_block_address & end; -+ -+ /* all block aligned accesses */ -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if (part_start) { -+ part_len = mmc_block_size - part_start; -+ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ (ulong)src, dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) -+ return -1; -+ -+ memcpy(mmc_buf+part_start, src, part_len); -+ if ((mmc_block_write(aligned_start, mmc_buf, mmc_block_size)) < 0) -+ return -1; -+ -+ dst += part_len; -+ src += part_len; -+ } -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size) { -+ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_write(dst, (uchar *)src, mmc_block_size)) < 0) -+ return -1; -+ -+ } -+ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if (part_end && dst < end) { -+ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", -+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); -+ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) -+ return -1; -+ -+ memcpy(mmc_buf, src, part_end); -+ if ((mmc_block_write(aligned_end, mmc_buf, mmc_block_size)) < 0) -+ return -1; -+ -+ } -+ return 0; -+} -+ -+ulong mmc_bread(int dev_num, ulong blknr, ulong blkcnt, void *dst) -+{ -+ int mmc_block_size = MMC_BLOCK_SIZE; -+ ulong src = blknr * mmc_block_size + CFG_MMC_BASE; -+ -+ mmc_read(src, dst, blkcnt*mmc_block_size); -+ return blkcnt; -+} -+ -+/* MMC_DEFAULT_RCA should probably be just 1, but this may break other code -+ that expects it to be shifted. */ -+static u_int16_t rca = MMC_DEFAULT_RCA >> 16; -+ -+static u_int32_t mmc_size(const struct mmc_csd *csd) -+{ -+ u_int32_t block_len, mult, blocknr; -+ -+ block_len = csd->read_bl_len << 12; -+ mult = csd->c_size_mult1 << 8; -+ blocknr = (csd->c_size+1) * mult; -+ -+ return blocknr * block_len; -+} -+ -+struct sd_cid { -+ char pnm_0; /* product name */ -+ char oid_1; /* OEM/application ID */ -+ char oid_0; -+ uint8_t mid; /* manufacturer ID */ -+ char pnm_4; -+ char pnm_3; -+ char pnm_2; -+ char pnm_1; -+ uint8_t psn_2; /* product serial number */ -+ uint8_t psn_1; -+ uint8_t psn_0; /* MSB */ -+ uint8_t prv; /* product revision */ -+ uint8_t crc; /* CRC7 checksum, b0 is unused and set to 1 */ -+ uint8_t mdt_1; /* manufacturing date, LSB, RRRRyyyy yyyymmmm */ -+ uint8_t mdt_0; /* MSB */ -+ uint8_t psn_3; /* LSB */ -+}; -+ -+static void print_mmc_cid(mmc_cid_t *cid) -+{ -+ printf("MMC found. Card desciption is:\n"); -+ printf("Manufacturer ID = %02x%02x%02x\n", -+ cid->id[0], cid->id[1], cid->id[2]); -+ printf("HW/FW Revision = %x %x\n",cid->hwrev, cid->fwrev); -+ cid->hwrev = cid->fwrev = 0; /* null terminate string */ -+ printf("Product Name = %s\n",cid->name); -+ printf("Serial Number = %02x%02x%02x\n", -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ printf("Month = %d\n",cid->month); -+ printf("Year = %d\n",1997 + cid->year); -+} -+ -+static void print_sd_cid(const struct sd_cid *cid) -+{ -+ printf("Manufacturer: 0x%02x, OEM \"%c%c\"\n", -+ cid->mid, cid->oid_0, cid->oid_1); -+ printf("Product name: \"%c%c%c%c%c\", revision %d.%d\n", -+ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, cid->pnm_4, -+ cid->prv >> 4, cid->prv & 15); -+ printf("Serial number: %u\n", -+ cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 | -+ cid->psn_3); -+ printf("Manufacturing date: %d/%d\n", -+ cid->mdt_1 & 15, -+ 2000+((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4)); -+ printf("CRC: 0x%02x, b0 = %d\n", -+ cid->crc >> 1, cid->crc & 1); -+} -+ -+int mmc_init(int verbose) -+{ -+ int retries, rc = -ENODEV; -+ int is_sd = 0; -+ u_int32_t *resp; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ sdi = S3C2410_GetBase_SDI(); -+ -+ debug("mmc_init(PCLK=%u)\n", get_PCLK()); -+ -+ clk_power->CLKCON |= (1 << 9); -+ -+ /* S3C2410 has some bug that prevents reliable operation at higher speed */ -+ //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -+ sdi->SDIBSIZE = 512; -+ sdi->SDIDTIMER = 0xffff; -+ sdi->SDIIMSK = 0x0; -+ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; -+ udelay(125000); /* FIXME: 74 SDCLK cycles */ -+ -+ mmc_csd.c_size = 0; -+ -+ /* reset */ -+ retries = 10; -+ resp = mmc_cmd(MMC_CMD_RESET, 0, 0); -+ -+ printf("trying to detect SD Card...\n"); -+ while (retries--) { -+ udelay(100000); -+ resp = mmc_cmd(55, 0x00000000, CMD_F_RESP); -+ resp = mmc_cmd(41, 0x00300000, CMD_F_RESP); -+ -+ if (resp[0] & (1 << 31)) { -+ is_sd = 1; -+ break; -+ } -+ } -+ -+ if (retries == 0 && !is_sd) { -+ retries = 10; -+ printf("failed to detect SD Card, trying MMC\n"); -+ resp = mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ffc000, CMD_F_RESP); -+ while (retries-- && resp && !(resp[4] & 0x80)) { -+ debug("resp %x %x\n", resp[0], resp[1]); -+ udelay(50); -+ resp = mmc_cmd(1, 0x00ffff00, CMD_F_RESP); -+ } -+ } -+ -+ /* try to get card id */ -+ resp = mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ if (!is_sd) { -+ /* TODO configure mmc driver depending on card -+ attributes */ -+ mmc_cid_t *cid = (mmc_cid_t *)resp; -+ -+ if (verbose) -+ print_mmc_cid(cid); -+ sprintf((char *) mmc_dev.vendor, -+ "Man %02x%02x%02x Snr %02x%02x%02x", -+ cid->id[0], cid->id[1], cid->id[2], -+ cid->sn[0], cid->sn[1], cid->sn[2]); -+ sprintf((char *) mmc_dev.product,"%s",cid->name); -+ sprintf((char *) mmc_dev.revision,"%x %x", -+ cid->hwrev, cid->fwrev); -+ } -+ else { -+ struct sd_cid *cid = (struct sd_cid *) resp; -+ -+ if (verbose) -+ print_sd_cid(cid); -+ sprintf((char *) mmc_dev.vendor, -+ "Man %02 OEM %c%c \"%c%c%c%c%c\"", -+ cid->mid, cid->oid_0, cid->oid_1, -+ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, -+ cid->pnm_4); -+ sprintf((char *) mmc_dev.product, "%d", -+ cid->psn_0 << 24 | cid->psn_1 << 16 | -+ cid->psn_2 << 8 | cid->psn_3); -+ sprintf((char *) mmc_dev.revision, "%d.%d", -+ cid->prv >> 4, cid->prv & 15); -+ } -+ -+ /* fill in device description */ -+ mmc_dev.if_type = IF_TYPE_MMC; -+ mmc_dev.part_type = PART_TYPE_DOS; -+ mmc_dev.dev = 0; -+ mmc_dev.lun = 0; -+ mmc_dev.type = 0; -+ /* FIXME fill in the correct size (is set to 32MByte) */ -+ mmc_dev.blksz = 512; -+ mmc_dev.lba = 0x10000; -+ mmc_dev.removable = 0; -+ mmc_dev.block_read = mmc_bread; -+ -+ /* MMC exists, get CSD too */ -+ resp = mmc_cmd(MMC_CMD_SET_RCA, MMC_DEFAULT_RCA, CMD_F_RESP); -+ if (is_sd) -+ rca = resp[0] >> 16; -+ -+ resp = mmc_cmd(MMC_CMD_SEND_CSD, rca<<16, CMD_F_RESP|CMD_F_RESP_LONG); -+ if (resp) { -+ mmc_csd_t *csd = (mmc_csd_t *)resp; -+ memcpy(&mmc_csd, csd, sizeof(csd)); -+ rc = 0; -+ mmc_ready = 1; -+ /* FIXME add verbose printout for csd */ -+ printf("READ_BL_LEN=%u, C_SIZE_MULT=%u, C_SIZE=%u\n", -+ csd->read_bl_len, csd->c_size_mult1, csd->c_size); -+ printf("size = %u\n", mmc_size(csd)); -+ } -+ } -+ -+ resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca<<16, CMD_F_RESP); -+ -+#ifdef CONFIG_MMC_WIDE -+ if (is_sd) { -+ resp = mmc_cmd(55, rca<<16, CMD_F_RESP); -+ resp = mmc_cmd(6, 0x02, CMD_F_RESP); -+ wide = 1; -+ } -+#endif -+ -+ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */ -+ -+ return rc; -+} -+ -+int -+mmc_ident(block_dev_desc_t *dev) -+{ -+ return 0; -+} -+ -+int -+mmc2info(ulong addr) -+{ -+ /* FIXME hard codes to 32 MB device */ -+ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000) -+ return 1; -+ -+ return 0; -+} -+ -+#endif /* CONFIG_MMC */ -Index: u-boot/include/asm-arm/arch-s3c24x0/mmc.h -=================================================================== ---- /dev/null -+++ u-boot/include/asm-arm/arch-s3c24x0/mmc.h -@@ -0,0 +1,112 @@ -+/* -+ * linux/drivers/mmc/mmc_pxa.h -+ * -+ * Author: Vladimir Shebordaev, Igor Oblakov -+ * Copyright: MontaVista Software Inc. -+ * -+ * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $ -+ * -+ * 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. -+ */ -+#ifndef __MMC_PXA_P_H__ -+#define __MMC_PXA_P_H__ -+ -+#include -+ -+#define MMC_DEFAULT_RCA (1<<16) -+ -+#define MMC_BLOCK_SIZE 512 -+#define MMC_CMD_RESET 0 -+#define MMC_CMD_SEND_OP_COND 1 -+#define MMC_CMD_ALL_SEND_CID 2 -+#define MMC_CMD_SET_RCA 3 -+#define MMC_CMD_SELECT_CARD 7 -+#define MMC_CMD_SEND_CSD 9 -+#define MMC_CMD_SEND_CID 10 -+#define MMC_CMD_SEND_STATUS 13 -+#define MMC_CMD_SET_BLOCKLEN 16 -+#define MMC_CMD_READ_BLOCK 17 -+#define MMC_CMD_RD_BLK_MULTI 18 -+#define MMC_CMD_WRITE_BLOCK 24 -+ -+#define MMC_MAX_BLOCK_SIZE 512 -+ -+#define MMC_R1_IDLE_STATE 0x01 -+#define MMC_R1_ERASE_STATE 0x02 -+#define MMC_R1_ILLEGAL_CMD 0x04 -+#define MMC_R1_COM_CRC_ERR 0x08 -+#define MMC_R1_ERASE_SEQ_ERR 0x01 -+#define MMC_R1_ADDR_ERR 0x02 -+#define MMC_R1_PARAM_ERR 0x04 -+ -+#define MMC_R1B_WP_ERASE_SKIP 0x0002 -+#define MMC_R1B_ERR 0x0004 -+#define MMC_R1B_CC_ERR 0x0008 -+#define MMC_R1B_CARD_ECC_ERR 0x0010 -+#define MMC_R1B_WP_VIOLATION 0x0020 -+#define MMC_R1B_ERASE_PARAM 0x0040 -+#define MMC_R1B_OOR 0x0080 -+#define MMC_R1B_IDLE_STATE 0x0100 -+#define MMC_R1B_ERASE_RESET 0x0200 -+#define MMC_R1B_ILLEGAL_CMD 0x0400 -+#define MMC_R1B_COM_CRC_ERR 0x0800 -+#define MMC_R1B_ERASE_SEQ_ERR 0x1000 -+#define MMC_R1B_ADDR_ERR 0x2000 -+#define MMC_R1B_PARAM_ERR 0x4000 -+ -+typedef struct mmc_cid -+{ -+ /* FIXME: BYTE_ORDER */ -+ uchar year:4, -+ month:4; -+ uchar sn[3]; -+ uchar fwrev:4, -+ hwrev:4; -+ uchar name[6]; -+ uchar id[3]; -+} mmc_cid_t; -+ -+typedef struct mmc_csd -+{ -+ uchar ecc:2, -+ file_format:2, -+ tmp_write_protect:1, -+ perm_write_protect:1, -+ copy:1, -+ file_format_grp:1; -+ uint64_t content_prot_app:1, -+ rsvd3:4, -+ write_bl_partial:1, -+ write_bl_len:4, -+ r2w_factor:3, -+ default_ecc:2, -+ wp_grp_enable:1, -+ wp_grp_size:5, -+ erase_grp_mult:5, -+ erase_grp_size:5, -+ c_size_mult1:3, -+ vdd_w_curr_max:3, -+ vdd_w_curr_min:3, -+ vdd_r_curr_max:3, -+ vdd_r_curr_min:3, -+ c_size:12, -+ rsvd2:2, -+ dsr_imp:1, -+ read_blk_misalign:1, -+ write_blk_misalign:1, -+ read_bl_partial:1; -+ -+ ushort read_bl_len:4, -+ ccc:12; -+ uchar tran_speed; -+ uchar nsac; -+ uchar taac; -+ uchar rsvd1:2, -+ spec_vers:4, -+ csd_structure:2; -+} mmc_csd_t; -+ -+ -+#endif /* __MMC_PXA_P_H__ */ -Index: u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h -=================================================================== ---- /dev/null -+++ u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h -@@ -0,0 +1,110 @@ -+/* linux/include/asm/arch-s3c2410/regs-sdi.h -+ * -+ * Copyright (c) 2004 Simtec Electronics -+ * http://www.simtec.co.uk/products/SWLINUX/ -+ * -+ * 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. -+ * -+ * S3C2410 MMC/SDIO register definitions -+ * -+ * Changelog: -+ * 18-Aug-2004 Ben Dooks Created initial file -+ * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates -+ * 29-Nov-2004 Ben Dooks Updated Koen's patch -+*/ -+ -+#ifndef __ASM_ARM_REGS_SDI -+#define __ASM_ARM_REGS_SDI "regs-sdi.h" -+ -+#define S3C2440_SDICON_SDRESET (1<<8) -+#define S3C2440_SDICON_MMCCLOCK (1<<5) -+#define S3C2410_SDICON_BYTEORDER (1<<4) -+#define S3C2410_SDICON_SDIOIRQ (1<<3) -+#define S3C2410_SDICON_RWAITEN (1<<2) -+#define S3C2410_SDICON_FIFORESET (1<<1) -+#define S3C2410_SDICON_CLOCKTYPE (1<<0) -+ -+#define S3C2410_SDICMDCON_ABORT (1<<12) -+#define S3C2410_SDICMDCON_WITHDATA (1<<11) -+#define S3C2410_SDICMDCON_LONGRSP (1<<10) -+#define S3C2410_SDICMDCON_WAITRSP (1<<9) -+#define S3C2410_SDICMDCON_CMDSTART (1<<8) -+#define S3C2410_SDICMDCON_SENDERHOST (1<<6) -+#define S3C2410_SDICMDCON_INDEX (0x3f) -+ -+#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) -+#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) -+#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) -+#define S3C2410_SDICMDSTAT_RSPFIN (1<<9) -+#define S3C2410_SDICMDSTAT_XFERING (1<<8) -+#define S3C2410_SDICMDSTAT_INDEX (0xff) -+ -+#define S3C2440_SDIDCON_DS_BYTE (0<<22) -+#define S3C2440_SDIDCON_DS_HALFWORD (1<<22) -+#define S3C2440_SDIDCON_DS_WORD (2<<22) -+#define S3C2410_SDIDCON_IRQPERIOD (1<<21) -+#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) -+#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) -+#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) -+#define S3C2410_SDIDCON_BLOCKMODE (1<<17) -+#define S3C2410_SDIDCON_WIDEBUS (1<<16) -+#define S3C2410_SDIDCON_DMAEN (1<<15) -+#define S3C2410_SDIDCON_STOP (1<<14) -+#define S3C2440_SDIDCON_DATSTART (1<<14) -+#define S3C2410_SDIDCON_DATMODE (3<<12) -+#define S3C2410_SDIDCON_BLKNUM (0x7ff) -+ -+/* constants for S3C2410_SDIDCON_DATMODE */ -+#define S3C2410_SDIDCON_XFER_READY (0<<12) -+#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) -+#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) -+#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) -+ -+#define S3C2410_SDIDCNT_BLKNUM_MASK (0xFFF) -+#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) -+ -+#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) -+#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) -+#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ -+#define S3C2410_SDIDSTA_CRCFAIL (1<<7) -+#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) -+#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) -+#define S3C2410_SDIDSTA_XFERFINISH (1<<4) -+#define S3C2410_SDIDSTA_BUSYFINISH (1<<3) -+#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ -+#define S3C2410_SDIDSTA_TXDATAON (1<<1) -+#define S3C2410_SDIDSTA_RXDATAON (1<<0) -+ -+#define S3C2440_SDIFSTA_FIFORESET (1<<16) -+#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */ -+#define S3C2410_SDIFSTA_TFDET (1<<13) -+#define S3C2410_SDIFSTA_RFDET (1<<12) -+#define S3C2410_SDIFSTA_TFHALF (1<<11) -+#define S3C2410_SDIFSTA_TFEMPTY (1<<10) -+#define S3C2410_SDIFSTA_RFLAST (1<<9) -+#define S3C2410_SDIFSTA_RFFULL (1<<8) -+#define S3C2410_SDIFSTA_RFHALF (1<<7) -+#define S3C2410_SDIFSTA_COUNTMASK (0x7f) -+ -+#define S3C2410_SDIIMSK_RESPONSECRC (1<<17) -+#define S3C2410_SDIIMSK_CMDSENT (1<<16) -+#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) -+#define S3C2410_SDIIMSK_RESPONSEND (1<<14) -+#define S3C2410_SDIIMSK_READWAIT (1<<13) -+#define S3C2410_SDIIMSK_SDIOIRQ (1<<12) -+#define S3C2410_SDIIMSK_FIFOFAIL (1<<11) -+#define S3C2410_SDIIMSK_CRCSTATUS (1<<10) -+#define S3C2410_SDIIMSK_DATACRC (1<<9) -+#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) -+#define S3C2410_SDIIMSK_DATAFINISH (1<<7) -+#define S3C2410_SDIIMSK_BUSYFINISH (1<<6) -+#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ -+#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) -+#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) -+#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) -+#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) -+#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) -+ -+#endif /* __ASM_ARM_REGS_SDI */ -Index: u-boot/include/s3c24x0.h -=================================================================== ---- u-boot.orig/include/s3c24x0.h -+++ u-boot/include/s3c24x0.h -@@ -637,13 +637,7 @@ - S3C24X0_REG32 SDIDCNT; - S3C24X0_REG32 SDIDSTA; - S3C24X0_REG32 SDIFSTA; --#ifdef __BIG_ENDIAN -- S3C24X0_REG8 res[3]; -- S3C24X0_REG8 SDIDAT; --#else -- S3C24X0_REG8 SDIDAT; -- S3C24X0_REG8 res[3]; --#endif -+ S3C24X0_REG32 SDIDAT; - S3C24X0_REG32 SDIIMSK; - } /*__attribute__((__packed__))*/ S3C2410_SDI; - -@@ -1123,11 +1117,7 @@ - #define rSDIDatCnt (*(volatile unsigned *)0x5A000030) - #define rSDIDatSta (*(volatile unsigned *)0x5A000034) - #define rSDIFSTA (*(volatile unsigned *)0x5A000038) --#ifdef __BIG_ENDIAN --#define rSDIDAT (*(volatile unsigned char *)0x5A00003F) --#else --#define rSDIDAT (*(volatile unsigned char *)0x5A00003C) --#endif -+#define rSDIDAT (*(volatile unsigned *)0x5A00003C) - #define rSDIIntMsk (*(volatile unsigned *)0x5A000040) - - #endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch deleted file mode 100644 index dc363bbbab..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch +++ /dev/null @@ -1,525 +0,0 @@ -This patch adds NAND (including boot-from-NAND via steppingstone) support to -the S3C2410 SoC code in u-boot - -Signed-off-by: Harald Welte - -Index: u-boot/cpu/arm920t/s3c24x0/Makefile -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-28 03:47:44.000000000 +0100 -+++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-03-01 14:29:32.000000000 +0100 -@@ -26,7 +26,7 @@ - LIB = $(obj)lib$(SOC).a - - COBJS = i2c.o interrupts.o serial.o speed.o \ -- usb_ohci.o -+ usb_ohci.o nand_read.o nand.o - - SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-03-01 14:30:27.000000000 +0100 -@@ -0,0 +1,225 @@ -+/* -+ * (C) Copyright 2006 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if 0 -+#define DEBUGN printf -+#else -+#define DEBUGN(x, args ...) {} -+#endif -+ -+#if (CONFIG_COMMANDS & CFG_CMD_NAND) -+#if !defined(CFG_NAND_LEGACY) -+ -+#include -+#include -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+ -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+#define NFECC0 __REGb(NF_BASE + 0x14) -+#define NFECC1 __REGb(NF_BASE + 0x15) -+#define NFECC2 __REGb(NF_BASE + 0x16) -+ -+#define S3C2410_NFCONF_EN (1<<15) -+#define S3C2410_NFCONF_512BYTE (1<<14) -+#define S3C2410_NFCONF_4STEP (1<<13) -+#define S3C2410_NFCONF_INITECC (1<<12) -+#define S3C2410_NFCONF_nFCE (1<<11) -+#define S3C2410_NFCONF_TACLS(x) ((x)<<8) -+#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) -+#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) -+ -+static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) -+{ -+ struct nand_chip *chip = mtd->priv; -+ -+ DEBUGN("hwcontrol(): 0x%02x: ", cmd); -+ -+ switch (cmd) { -+ case NAND_CTL_SETNCE: -+ NFCONF &= ~S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_CLRNCE: -+ NFCONF |= S3C2410_NFCONF_nFCE; -+ DEBUGN("NFCONF=0x%08x\n", NFCONF); -+ break; -+ case NAND_CTL_SETALE: -+ chip->IO_ADDR_W = NF_BASE + 0x8; -+ DEBUGN("SETALE\n"); -+ break; -+ case NAND_CTL_SETCLE: -+ chip->IO_ADDR_W = NF_BASE + 0x4; -+ DEBUGN("SETCLE\n"); -+ break; -+ default: -+ chip->IO_ADDR_W = NF_BASE + 0xc; -+ break; -+ } -+ return; -+} -+ -+static int s3c2410_dev_ready(struct mtd_info *mtd) -+{ -+ DEBUGN("dev_ready\n"); -+ return (NFSTAT & 0x01); -+} -+ -+static void s3c2410_cmdfunc(struct mtd_info *mtd, unsigned cmd, -+ int column, int page_addr) -+{ -+ DEBUGN("cmdfunc(): 0x%02x, col=%d, page=%d\n", cmd, column, page_addr); -+ -+ switch (cmd) { -+ case NAND_CMD_READ0: -+ case NAND_CMD_READ1: -+ case NAND_CMD_READOOB: -+ NFCMD = cmd; -+ NFADDR = column & 0xff; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_READID: -+ NFCMD = cmd; -+ NFADDR = 0; -+ break; -+ case NAND_CMD_PAGEPROG: -+ NFCMD = cmd; -+ printf("PAGEPROG not implemented\n"); -+ break; -+ case NAND_CMD_ERASE1: -+ NFCMD = cmd; -+ NFADDR = page_addr & 0xff; -+ NFADDR = (page_addr >> 8) & 0xff; -+ NFADDR = (page_addr >> 16) & 0xff; -+ break; -+ case NAND_CMD_ERASE2: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_SEQIN: -+ printf("SEQIN not implemented\n"); -+ break; -+ case NAND_CMD_STATUS: -+ NFCMD = cmd; -+ break; -+ case NAND_CMD_RESET: -+ NFCMD = cmd; -+ break; -+ default: -+ break; -+ } -+ -+ while (!s3c2410_dev_ready(mtd)); -+} -+ -+#ifdef CONFIG_S3C2410_NAND_HWECC -+void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode) -+{ -+ DEBUGN("s3c2410_nand_enable_hwecc(%p, %d)\n", mtd ,mode); -+ NFCONF |= S3C2410_NFCONF_INITECC; -+} -+ -+static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) -+{ -+ ecc_code[0] = NFECC0; -+ ecc_code[1] = NFECC1; -+ ecc_code[2] = NFECC2; -+ DEBUGN("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n", mtd , ecc_code[0], ecc_code[1], ecc_code[2]); -+ -+ return 0; -+} -+ -+int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) -+{ -+ if (read_ecc[0] == calc_ecc[0] && -+ read_ecc[1] == calc_ecc[1] && -+ read_ecc[2] == calc_ecc[2]) -+ return 0; -+ -+ printf("s3c2410_nand_correct_data: not implemented\n"); -+ return -1; -+} -+#endif -+ -+int board_nand_init(struct nand_chip *nand) -+{ -+ u_int32_t cfg; -+ u_int8_t tacls, twrph0, twrph1; -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ DEBUGN("board_nand_init()\n"); -+ -+ clk_power->CLKCON |= (1 << 4); -+ -+ /* initialize hardware */ -+ twrph0 = 3; twrph1 = 0; tacls = 0; -+ -+ cfg = S3C2410_NFCONF_EN; -+ cfg |= S3C2410_NFCONF_TACLS(tacls - 1); -+ cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); -+ cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); -+ -+ NFCONF = cfg; -+ //NFCONF = 0xf842; -+ -+ /* initialize nand_chip data structure */ -+ nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; -+ -+ /* read_buf and write_buf are default */ -+ /* read_byte and write_byte are default */ -+ -+ /* hwcontrol always must be implemented */ -+ nand->hwcontrol = s3c2410_hwcontrol; -+ -+ nand->dev_ready = s3c2410_dev_ready; -+ -+#ifdef CONFIG_S3C2410_NAND_HWECC -+ nand->enable_hwecc = s3c2410_nand_enable_hwecc; -+ nand->calculate_ecc = s3c2410_nand_calculate_ecc; -+ nand->correct_data = s3c2410_nand_correct_data; -+ nand->eccmode = NAND_ECC_HW3_512; -+#else -+ nand->eccmode = NAND_ECC_SOFT; -+#endif -+ -+#ifdef CONFIG_S3C2410_NAND_BBT -+ nand->options = NAND_USE_FLASH_BBT; -+#else -+ nand->options = 0; -+#endif -+ -+ DEBUGN("end of nand_init\n"); -+ -+ return 0; -+} -+ -+#else -+ #error "U-Boot legacy NAND support not available for S3C2410" -+#endif -+#endif -Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ u-boot/cpu/arm920t/s3c24x0/nand_read.c 2007-02-28 03:51:24.000000000 +0100 -@@ -0,0 +1,98 @@ -+/* -+ * nand_read.c: Simple NAND read functions for booting from NAND -+ * -+ * This is used by cpu/arm920/start.S assembler code, -+ * and the board-specific linker script must make sure this -+ * file is linked within the first 4kB of NAND flash. -+ * -+ * Taken from GPLv2 licensed vivi bootloader, -+ * Copyright (C) 2002 MIZI Research, Inc. -+ * -+ * Author: Hwang, Chideok -+ * Date : $Date: 2004/02/04 10:37:37 $ -+ * -+ * u-boot integration and bad-block skipping (C) 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ */ -+ -+#include -+ -+#ifdef CONFIG_S3C2410_NAND_BOOT -+ -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGi(x) (*(volatile unsigned int *)(x)) -+#define NF_BASE 0x4e000000 -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCMD __REGb(NF_BASE + 0x4) -+#define NFADDR __REGb(NF_BASE + 0x8) -+#define NFDATA __REGb(NF_BASE + 0xc) -+#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#define BUSY 1 -+inline void wait_idle(void) -+{ -+ int i; -+ -+ while (!(NFSTAT & BUSY)) -+ for (i=0; i<10; i++); -+} -+ -+#define NAND_SECTOR_SIZE 512 -+#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) -+#define NAND_PAGE_SIZE 0x4000 -+ -+/* low level nand read function */ -+int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) -+{ -+ int i, j; -+ -+ if ((start_addr & NAND_BLOCK_MASK) || (size & NAND_BLOCK_MASK)) -+ return -1; /* invalid alignment */ -+ -+ /* chip Enable */ -+ NFCONF &= ~0x800; -+ for (i=0; i<10; i++); -+ -+ for (i=start_addr; i < (start_addr + size);) { -+#ifdef CONFIG_S3C2410_NAND_SKIP_BAD -+ if (start_addr % NAND_PAGE_SIZE == 0) { -+ unsigned char data; -+ NFCMD = 0x50; -+ NFADDR = 517&0xf; -+ NFADDR = (i >> 9) & 0xff; -+ NFADDR = (i >> 17) & 0xff; -+ NFADDR = (i >> 25) & 0xff; -+ wait_idle(); -+ data = (NFDATA & 0xff); -+ if (data != 0xff) { -+ /* Bad block */ -+ i += NAND_PAGE_SIZE; -+ size += NAND_PAGE_SIZE; -+ continue; -+ } -+ } -+#endif -+ /* READ0 */ -+ NFCMD = 0; -+ -+ /* Write Address */ -+ NFADDR = i & 0xff; -+ NFADDR = (i >> 9) & 0xff; -+ NFADDR = (i >> 17) & 0xff; -+ NFADDR = (i >> 25) & 0xff; -+ -+ wait_idle(); -+ -+ for (j=0; j < NAND_SECTOR_SIZE; j++, i++) { -+ *buf = (NFDATA & 0xff); -+ buf++; -+ } -+ } -+ -+ /* chip Disable */ -+ NFCONF |= 0x800; /* chip disable */ -+ -+ return 0; -+} -+ -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S 2007-02-28 03:47:44.000000000 +0100 -+++ u-boot/cpu/arm920t/start.S 2007-03-01 14:29:22.000000000 +0100 -@@ -5,6 +5,10 @@ - * Copyright (c) 2002 Alex Züpke - * Copyright (c) 2002 Gary Jennejohn - * -+ * S3C2410 NAND portions -+ * Copyright (c) 2001 MIZI Research, Inc. -+ * Copyright (c) 2006 OpenMoko, Inc. (Harald Welte -+ * - * See file CREDITS for list of people who contributed to this - * project. - * -@@ -27,6 +31,7 @@ - - #include - #include -+#include - - - /* -@@ -161,6 +166,7 @@ - #endif - - #ifndef CONFIG_SKIP_RELOCATE_UBOOT -+#ifndef CONFIG_S3C2410_NAND_BOOT - relocate: /* relocate U-Boot to RAM */ - adr r0, _start /* r0 <- current position of code */ - ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ -@@ -177,6 +183,93 @@ - stmia r1!, {r3-r10} /* copy to target address [r1] */ - cmp r0, r2 /* until source end addreee [r2] */ - ble copy_loop -+#else /* NAND_BOOT */ -+relocate: -+copy_myself: -+ /* mov r10, lr */ -+ -+ @ reset NAND -+ mov r1, #S3C2410_NAND_BASE -+ ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 -+ str r2, [r1, #oNFCONF] -+ ldr r2, [r1, #oNFCONF] -+ bic r2, r2, #0x800 @ enable chip -+ str r2, [r1, #oNFCONF] -+ mov r2, #0xff @ RESET command -+ strb r2, [r1, #oNFCMD] -+ mov r3, #0 @ wait -+1: add r3, r3, #0x1 -+ cmp r3, #0xa -+ blt 1b -+2: ldr r2, [r1, #oNFSTAT] @ wait ready -+ tst r2, #0x1 -+ beq 2b -+ ldr r2, [r1, #oNFCONF] -+ orr r2, r2, #0x800 @ disable chip -+ str r2, [r1, #oNFCONF] -+ -+#if 0 -+ @ get ready to call C functions (for nand_read()) -+ ldr sp, DW_STACK_START @ setup stack pointer -+ mov fp, #0 @ no previous frame, so fp=0 -+#else -+ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ -+ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ -+ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ -+#ifdef CONFIG_USE_IRQ -+ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) -+#endif -+ sub sp, r0, #12 /* leave 3 words for abort-stack */ -+#endif -+ -+ @ copy u-boot to RAM -+ ldr r0, _TEXT_BASE -+ mov r1, #0x0 -+ mov r2, #CFG_UBOOT_SIZE -+ bl nand_read_ll -+ -+ tst r0, #0x0 -+ beq ok_nand_read -+#ifdef CONFIG_DEBUG_LL -+bad_nand_read: -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+1: b 1b @ infinite loop -+#endif -+ -+ok_nand_read: -+#ifdef CONFIG_DEBUG_LL -+ ldr r0, STR_OK -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+ -+ @ verify -+ mov r0, #0 -+ @ldr r1, =0x33f00000 -+ ldr r1, _TEXT_BASE -+ mov r2, #0x400 @ 4 bytes * 1024 = 4K-bytes -+go_next: -+ ldr r3, [r0], #4 -+ ldr r4, [r1], #4 -+ teq r3, r4 -+ bne notmatch -+ subs r2, r2, #4 -+ beq done_nand_read -+ bne go_next -+notmatch: -+#ifdef CONFIG_DEBUG_LL -+ sub r0, r0, #4 -+ ldr r1, SerBase -+ bl PrintHexWord -+ ldr r0, STR_FAIL -+ ldr r1, SerBase -+ bl PrintWord -+#endif -+1: b 1b -+done_nand_read: -+#endif /* NAND_BOOT */ - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ -Index: u-boot/include/s3c2410.h -=================================================================== ---- u-boot.orig/include/s3c2410.h 2007-02-28 03:51:24.000000000 +0100 -+++ u-boot/include/s3c2410.h 2007-03-01 14:29:22.000000000 +0100 -@@ -38,12 +38,6 @@ - #define S3C2410_ECCSIZE 512 - #define S3C2410_ECCBYTES 3 - --typedef enum { -- S3C24X0_UART0, -- S3C24X0_UART1, -- S3C24X0_UART2 --} S3C24X0_UARTS_NR; -- - /* S3C2410 device base addresses */ - #define S3C24X0_MEMCTL_BASE 0x48000000 - #define S3C24X0_USB_HOST_BASE 0x49000000 -@@ -65,9 +59,23 @@ - #define S3C2410_SDI_BASE 0x5A000000 - - -+#define oNFCONF 0x00 -+#define oNFCMD 0x04 -+#define oNFADDR 0x08 -+#define oNFDATA 0x0C -+#define oNFSTAT 0x10 -+#define oNFECC 0x14 -+ -+#ifndef __ASSEMBLER__ -+ - /* include common stuff */ - #include - -+typedef enum { -+ S3C24X0_UART0, -+ S3C24X0_UART1, -+ S3C24X0_UART2 -+} S3C24X0_UARTS_NR; - - static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) - { -@@ -142,6 +150,7 @@ - return (S3C2410_SDI * const)S3C2410_SDI_BASE; - } - -+#endif - - /* ISR */ - #define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch deleted file mode 100644 index 0d5a49771d..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch +++ /dev/null @@ -1,32 +0,0 @@ -If we've somehow magically make u-boot end up in RAM (JTAG, ...), then that RAM -is mapped to 0x30000000 and not 0, so we need to copy the interrupt vectors, etc. - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -332,7 +332,23 @@ done_nand_read: - strb r1, [r0] - #endif /* CONFIG_S3C2410_NAND_BOOT */ - done_relocate: --#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ -+ -+#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) -+ /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) -+ ended up in RAM, then that ram is mapped to 0x30000000 and not 0. -+ So we need to copy the interrupt vectors, etc. */ -+ -+ mov r0, #0 -+ ldr r1, _TEXT_BASE -+ mov r2, #0x40 -+irqvec_cpy_next: -+ ldr r3, [r1], #4 -+ str r3, [r0], #4 -+ subs r2, r2, #4 -+ bne irqvec_cpy_next -+#endif /* CONFIG_USE_IRQ */ -+ -+#endif /* !CONFIG_SKIP_RELOCATE_UBOOT */ - - /* Set up the stack */ - stack_setup: diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch deleted file mode 100644 index 8cc442a865..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch +++ /dev/null @@ -1,98 +0,0 @@ -Index: u-boot/include/s3c2410.h -=================================================================== ---- u-boot.orig/include/s3c2410.h 2007-02-16 23:53:20.000000000 +0100 -+++ u-boot/include/s3c2410.h 2007-02-16 23:53:21.000000000 +0100 -@@ -69,75 +69,75 @@ - #include - - --static inline S3C24X0_MEMCTL * const S3C24X0_GetBase_MEMCTL(void) -+static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) - { - return (S3C24X0_MEMCTL * const)S3C24X0_MEMCTL_BASE; - } --static inline S3C24X0_USB_HOST * const S3C24X0_GetBase_USB_HOST(void) -+static inline S3C24X0_USB_HOST * S3C24X0_GetBase_USB_HOST(void) - { - return (S3C24X0_USB_HOST * const)S3C24X0_USB_HOST_BASE; - } --static inline S3C24X0_INTERRUPT * const S3C24X0_GetBase_INTERRUPT(void) -+static inline S3C24X0_INTERRUPT * S3C24X0_GetBase_INTERRUPT(void) - { - return (S3C24X0_INTERRUPT * const)S3C24X0_INTERRUPT_BASE; - } --static inline S3C24X0_DMAS * const S3C24X0_GetBase_DMAS(void) -+static inline S3C24X0_DMAS * S3C24X0_GetBase_DMAS(void) - { - return (S3C24X0_DMAS * const)S3C24X0_DMA_BASE; - } --static inline S3C24X0_CLOCK_POWER * const S3C24X0_GetBase_CLOCK_POWER(void) -+static inline S3C24X0_CLOCK_POWER * S3C24X0_GetBase_CLOCK_POWER(void) - { - return (S3C24X0_CLOCK_POWER * const)S3C24X0_CLOCK_POWER_BASE; - } --static inline S3C24X0_LCD * const S3C24X0_GetBase_LCD(void) -+static inline S3C24X0_LCD * S3C24X0_GetBase_LCD(void) - { - return (S3C24X0_LCD * const)S3C24X0_LCD_BASE; - } --static inline S3C2410_NAND * const S3C2410_GetBase_NAND(void) -+static inline S3C2410_NAND * S3C2410_GetBase_NAND(void) - { - return (S3C2410_NAND * const)S3C2410_NAND_BASE; - } --static inline S3C24X0_UART * const S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) -+static inline S3C24X0_UART * S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) - { - return (S3C24X0_UART * const)(S3C24X0_UART_BASE + (nr * 0x4000)); - } --static inline S3C24X0_TIMERS * const S3C24X0_GetBase_TIMERS(void) -+static inline S3C24X0_TIMERS * S3C24X0_GetBase_TIMERS(void) - { - return (S3C24X0_TIMERS * const)S3C24X0_TIMER_BASE; - } --static inline S3C24X0_USB_DEVICE * const S3C24X0_GetBase_USB_DEVICE(void) -+static inline S3C24X0_USB_DEVICE * S3C24X0_GetBase_USB_DEVICE(void) - { - return (S3C24X0_USB_DEVICE * const)S3C24X0_USB_DEVICE_BASE; - } --static inline S3C24X0_WATCHDOG * const S3C24X0_GetBase_WATCHDOG(void) -+static inline S3C24X0_WATCHDOG * S3C24X0_GetBase_WATCHDOG(void) - { - return (S3C24X0_WATCHDOG * const)S3C24X0_WATCHDOG_BASE; - } --static inline S3C24X0_I2C * const S3C24X0_GetBase_I2C(void) -+static inline S3C24X0_I2C * S3C24X0_GetBase_I2C(void) - { - return (S3C24X0_I2C * const)S3C24X0_I2C_BASE; - } --static inline S3C24X0_I2S * const S3C24X0_GetBase_I2S(void) -+static inline S3C24X0_I2S * S3C24X0_GetBase_I2S(void) - { - return (S3C24X0_I2S * const)S3C24X0_I2S_BASE; - } --static inline S3C24X0_GPIO * const S3C24X0_GetBase_GPIO(void) -+static inline S3C24X0_GPIO * S3C24X0_GetBase_GPIO(void) - { - return (S3C24X0_GPIO * const)S3C24X0_GPIO_BASE; - } --static inline S3C24X0_RTC * const S3C24X0_GetBase_RTC(void) -+static inline S3C24X0_RTC * S3C24X0_GetBase_RTC(void) - { - return (S3C24X0_RTC * const)S3C24X0_RTC_BASE; - } --static inline S3C2410_ADC * const S3C2410_GetBase_ADC(void) -+static inline S3C2410_ADC * S3C2410_GetBase_ADC(void) - { - return (S3C2410_ADC * const)S3C2410_ADC_BASE; - } --static inline S3C24X0_SPI * const S3C24X0_GetBase_SPI(void) -+static inline S3C24X0_SPI * S3C24X0_GetBase_SPI(void) - { - return (S3C24X0_SPI * const)S3C24X0_SPI_BASE; - } --static inline S3C2410_SDI * const S3C2410_GetBase_SDI(void) -+static inline S3C2410_SDI * S3C2410_GetBase_SDI(void) - { - return (S3C2410_SDI * const)S3C2410_SDI_BASE; - } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch deleted file mode 100644 index b50853554b..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch +++ /dev/null @@ -1,215 +0,0 @@ -Index: u-boot/drivers/Makefile -=================================================================== ---- u-boot.orig/drivers/Makefile -+++ u-boot/drivers/Makefile -@@ -52,7 +52,7 @@ - ks8695eth.o \ - pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ - rpx_pcmcia.o \ -- fsl_i2c.o -+ fsl_i2c.o s3c2410_fb.o - - SRCS := $(COBJS:.o=.c) - OBJS := $(addprefix $(obj),$(COBJS)) -Index: u-boot/drivers/s3c2410_fb.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/s3c2410_fb.c -@@ -0,0 +1,166 @@ -+/* -+ * (C) Copyright 2006 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+ -+#if defined(CONFIG_VIDEO_S3C2410) -+ -+#include -+#include "videomodes.h" -+#include -+/* -+ * Export Graphic Device -+ */ -+GraphicDevice smi; -+ -+#define VIDEO_MEM_SIZE 0x200000 /* 480x640x16bit = 614400 bytes */ -+ -+extern void board_video_init(GraphicDevice *pGD); -+ -+/******************************************************************************* -+ * -+ * Init video chip with common Linux graphic modes (lilo) -+ */ -+void *video_hw_init (void) -+{ -+ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); -+ GraphicDevice *pGD = (GraphicDevice *)&smi; -+ int videomode; -+ unsigned long t1, hsynch, vsynch; -+ char *penv; -+ int tmp, i, bits_per_pixel; -+ struct ctfb_res_modes *res_mode; -+ struct ctfb_res_modes var_mode; -+ unsigned char videoout; -+ -+ /* Search for video chip */ -+ printf("Video: "); -+ -+ tmp = 0; -+ -+ videomode = CFG_DEFAULT_VIDEO_MODE; -+ /* get video mode via environment */ -+ if ((penv = getenv ("videomode")) != NULL) { -+ /* deceide if it is a string */ -+ if (penv[0] <= '9') { -+ videomode = (int) simple_strtoul (penv, NULL, 16); -+ tmp = 1; -+ } -+ } else { -+ tmp = 1; -+ } -+ if (tmp) { -+ /* parameter are vesa modes */ -+ /* search params */ -+ for (i = 0; i < VESA_MODES_COUNT; i++) { -+ if (vesa_modes[i].vesanr == videomode) -+ break; -+ } -+ if (i == VESA_MODES_COUNT) { -+ printf ("no VESA Mode found, switching to mode 0x%x ", CFG_DEFAULT_VIDEO_MODE); -+ i = 0; -+ } -+ res_mode = -+ (struct ctfb_res_modes *) &res_mode_init[vesa_modes[i]. -+ resindex]; -+ bits_per_pixel = vesa_modes[i].bits_per_pixel; -+ } else { -+ -+ res_mode = (struct ctfb_res_modes *) &var_mode; -+ bits_per_pixel = video_get_params (res_mode, penv); -+ } -+ -+ /* calculate hsynch and vsynch freq (info only) */ -+ t1 = (res_mode->left_margin + res_mode->xres + -+ res_mode->right_margin + res_mode->hsync_len) / 8; -+ t1 *= 8; -+ t1 *= res_mode->pixclock; -+ t1 /= 1000; -+ hsynch = 1000000000L / t1; -+ t1 *= -+ (res_mode->upper_margin + res_mode->yres + -+ res_mode->lower_margin + res_mode->vsync_len); -+ t1 /= 1000; -+ vsynch = 1000000000L / t1; -+ -+ /* fill in Graphic device struct */ -+ sprintf (pGD->modeIdent, "%dx%dx%d %ldkHz %ldHz", res_mode->xres, -+ res_mode->yres, bits_per_pixel, (hsynch / 1000), -+ (vsynch / 1000)); -+ printf ("%s\n", pGD->modeIdent); -+ pGD->winSizeX = res_mode->xres; -+ pGD->winSizeY = res_mode->yres; -+ pGD->plnSizeX = res_mode->xres; -+ pGD->plnSizeY = res_mode->yres; -+ switch (bits_per_pixel) { -+ case 8: -+ pGD->gdfBytesPP = 1; -+ pGD->gdfIndex = GDF__8BIT_INDEX; -+ break; -+ case 15: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_15BIT_555RGB; -+ break; -+ case 16: -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ break; -+ case 24: -+ pGD->gdfBytesPP = 3; -+ pGD->gdfIndex = GDF_24BIT_888RGB; -+ break; -+ } -+ -+ /* statically configure settings */ -+ pGD->winSizeX = pGD->plnSizeX = 480; -+ pGD->winSizeY = pGD->plnSizeY = 640; -+ pGD->gdfBytesPP = 2; -+ pGD->gdfIndex = GDF_16BIT_565RGB; -+ -+ pGD->frameAdrs = LCD_VIDEO_ADDR; -+ pGD->memSize = VIDEO_MEM_SIZE; -+ -+ board_video_init(pGD); -+ -+ lcd->LCDSADDR1 = pGD->frameAdrs >> 1; -+ -+ /* This marks the end of the frame buffer. */ -+ lcd->LCDSADDR2 = (lcd->LCDSADDR1&0x1fffff) + (pGD->winSizeX+0) * pGD->winSizeY; -+ lcd->LCDSADDR3 = pGD->winSizeX; -+ -+ /* Clear video memory */ -+ memset(pGD->frameAdrs, 0, pGD->memSize); -+ -+ /* Enable Display */ -+ lcd->LCDCON1 |= 0x01; /* ENVID = 1 */ -+ -+ return ((void*)&smi); -+} -+ -+void -+video_set_lut (unsigned int index, /* color number */ -+ unsigned char r, /* red */ -+ unsigned char g, /* green */ -+ unsigned char b /* blue */ -+ ) -+{ -+} -+ -+#endif /* CONFIG_VIDEO_S3C2410 */ -Index: u-boot/drivers/cfb_console.c -=================================================================== ---- u-boot.orig/drivers/cfb_console.c -+++ u-boot/drivers/cfb_console.c -@@ -141,6 +141,14 @@ - #endif - - /*****************************************************************************/ -+/* Defines for the S3C2410 driver */ -+/*****************************************************************************/ -+#ifdef CONFIG_VIDEO_S3C2410 -+/* it actually is little-endian, but the host CPU, too ! */ -+//#define VIDEO_FB_LITTLE_ENDIAN -+#endif -+ -+/*****************************************************************************/ - /* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc */ - /*****************************************************************************/ - #include -@@ -307,6 +315,11 @@ - #define SHORTSWAP32(x) (x) - #endif - -+#ifdef CONFIG_VIDEO_S3C2410 -+#undef SHORTSWAP32 -+#define SHORTSWAP32(x) ((((x) & 0xffff) << 16) | (((x) >> 16) & 0xffff)) -+#endif -+ - #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE) - #define PRINTD(x) printf(x) - #else diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch deleted file mode 100644 index 16bee3e26a..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch +++ /dev/null @@ -1,1263 +0,0 @@ -USB Device Controller Driver for Samsung S3C2410 SoC - -Index: u-boot/drivers/Makefile -=================================================================== ---- u-boot.orig/drivers/Makefile -+++ u-boot/drivers/Makefile -@@ -47,7 +47,7 @@ - status_led.o sym53c8xx.o systemace.o ahci.o \ - ti_pci1410a.o tigon3.o tsec.o \ - tsi108_eth.o tsi108_i2c.o tsi108_pci.o \ -- usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbtty.o \ -+ usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ - videomodes.o w83c553f.o \ - ks8695eth.o \ - pcf50606.o \ -Index: u-boot/drivers/usbdcore_s3c2410.c -=================================================================== ---- /dev/null -+++ u-boot/drivers/usbdcore_s3c2410.c -@@ -0,0 +1,730 @@ -+/* S3C2410 USB Device Controller Driver for u-boot -+ * -+ * (C) Copyright 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * based on Linux' s3c2410_udc.c, which is -+ * Copyright (C) 2004-2006 Herbert Pötzl - Arnaud Patard -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#include -+ -+#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) -+ -+#include -+ -+/* we can't use the regular debug macros since the console might be -+ * set to usbtty, which would cause deadlocks! */ -+#ifdef DEBUG -+#undef debug -+#undef debugX -+#define debug(fmt,args...) serial_printf (fmt ,##args) -+#define debugX(level,fmt,args...) if (DEBUG>=level) serial_printf(fmt,##args) -+#endif -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#include -+#include -+ -+#include "usbdcore.h" -+#include "usbdcore_s3c2410.h" -+#include "usbdcore_ep0.h" -+#include -+ -+enum ep0_state { -+ EP0_IDLE, -+ EP0_IN_DATA_PHASE, -+ EP0_OUT_DATA_PHASE, -+ EP0_END_XFER, -+ EP0_STALL, -+}; -+ -+static struct urb *ep0_urb = NULL; -+ -+static struct usb_device_instance *udc_device; /* Used in interrupt handler */ -+ -+static inline int fifo_count_out(void) -+{ -+ int tmp; -+ -+ tmp = inl(S3C2410_UDC_OUT_FIFO_CNT2_REG) << 8; -+ tmp |= inl(S3C2410_UDC_OUT_FIFO_CNT1_REG); -+ -+ return tmp & 0xffff; -+} -+ -+static const unsigned long ep_fifo_reg[S3C2410_UDC_NUM_ENDPOINTS] = { -+ S3C2410_UDC_EP0_FIFO_REG, -+ S3C2410_UDC_EP1_FIFO_REG, -+ S3C2410_UDC_EP2_FIFO_REG, -+ S3C2410_UDC_EP3_FIFO_REG, -+ S3C2410_UDC_EP4_FIFO_REG, -+}; -+ -+static int s3c2410_write_noniso_tx_fifo(struct usb_endpoint_instance *endpoint) -+{ -+ struct urb *urb = endpoint->tx_urb; -+ unsigned int last, i; -+ unsigned int ep = endpoint->endpoint_address & 0x7f; -+ unsigned long fifo_reg = ep_fifo_reg[ep]; -+ -+ /* WARNING: don't ever put serial debug printf's in non-error codepaths -+ * here, it is called from the time critical EP0 codepath ! */ -+ -+ if (!urb || ep >= S3C2410_UDC_NUM_ENDPOINTS) { -+ serial_printf("no urb or wrong endpoint\n"); -+ return -1; -+ } -+ -+ S3C2410_UDC_SETIX(ep); -+ if ((last = MIN(urb->actual_length - endpoint->sent, -+ endpoint->tx_packetSize))) { -+ u8 *cp = urb->buffer + endpoint->sent; -+ -+ for (i = 0; i < last; i++) -+ outb(*(cp+i), fifo_reg); -+ } -+ endpoint->last = last; -+ -+ if (endpoint->sent + last < urb->actual_length) { -+ /* not all data has been transmitted so far */ -+ return 0; -+ } -+ -+ if (last == endpoint->tx_packetSize) { -+ /* we need to send one more packet (ZLP) */ -+ return 0; -+ } -+ -+ return 1; -+} -+ -+ -+static void s3c2410_deconfigure_device (void) -+{ -+ /* FIXME: Implement this */ -+} -+ -+static void s3c2410_configure_device (struct usb_device_instance *device) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ S3C24X0_CLOCK_POWER * const cpower = S3C24X0_GetBase_CLOCK_POWER(); -+ -+ /* disable EP0-4 SUBD interrupts ? */ -+ outl(0x00, S3C2410_UDC_USB_INT_EN_REG); -+ -+ /* UPLL already configured by board-level init code */ -+ -+ /* configure USB pads to device mode */ -+ gpio->MISCCR &= ~(S3C2410_MISCCR_USBHOST|S3C2410_MISCCR_USBSUSPND1); -+ -+ /* don't disable USB clock */ -+ cpower->CLKSLOW &= ~S3C2410_CLKSLOW_UCLK_OFF; -+ -+ /* clear interrupt registers */ -+ inl(S3C2410_UDC_EP_INT_REG); -+ inl(S3C2410_UDC_USB_INT_REG); -+ outl(0xff, S3C2410_UDC_EP_INT_REG); -+ outl(0xff, S3C2410_UDC_USB_INT_REG); -+ -+ /* enable USB interrupts for RESET and SUSPEND/RESUME */ -+ outl(S3C2410_UDC_USBINT_RESET|S3C2410_UDC_USBINT_SUSPEND, -+ S3C2410_UDC_USB_INT_EN_REG); -+} -+ -+static void udc_set_address(unsigned char address) -+{ -+ address |= 0x80; /* ADDR_UPDATE bit */ -+ outl(address, S3C2410_UDC_FUNC_ADDR_REG); -+} -+ -+extern struct usb_device_descriptor device_descriptor; -+ -+static void s3c2410_udc_ep0(void) -+{ -+ u_int8_t ep0csr; -+ struct usb_endpoint_instance *ep0 = udc_device->bus->endpoint_array; -+ -+ S3C2410_UDC_SETIX(0); -+ ep0csr = inl(S3C2410_UDC_IN_CSR1_REG); -+ -+ /* clear stall status */ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SENTSTL) { -+ serial_printf("Clearing SENT_STALL\n"); -+ clear_ep0_sst(); -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SOPKTRDY) -+ clear_ep0_opr(); -+ ep0->state = EP0_IDLE; -+ return; -+ } -+ -+ /* clear setup end */ -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SE -+ /* && ep0->state != EP0_IDLE */) { -+ serial_printf("Clearing SETUP_END\n"); -+ clear_ep0_se(); -+#if 1 -+ if (ep0csr & S3C2410_UDC_EP0_CSR_SOPKTRDY) { -+ /* Flush FIFO */ -+ while (inl(S3C2410_UDC_OUT_FIFO_CNT1_REG)) -+ inl(S3C2410_UDC_EP0_FIFO_REG); -+ clear_ep0_opr(); -+ } -+#endif -+ ep0->state = EP0_IDLE; -+ return; -+ } -+ -+ /* Don't ever put [serial] debugging in non-error codepaths here, it -+ * will violate the tight timing constraints of this USB Device -+ * controller (and lead to bus enumeration failures) */ -+ -+ switch (ep0->state) { -+ int i, fifo_count; -+ unsigned char *datap; -+ case EP0_IDLE: -+ if (!(ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY)) -+ break; -+ -+ datap = (unsigned char *) &ep0_urb->device_request; -+ /* host->device packet has been received */ -+ -+ /* pull it out of the fifo */ -+ fifo_count = fifo_count_out(); -+ for (i = 0; i < fifo_count; i++) { -+ *datap = (unsigned char)inl(S3C2410_UDC_EP0_FIFO_REG); -+ datap++; -+ } -+ if (fifo_count != 8) { -+ debug("STRANGE FIFO COUNT: %u bytes\n", fifo_count); -+ set_ep0_ss(); -+ return; -+ } -+ -+ if (ep0_urb->device_request.wLength == 0) { -+ if (ep0_recv_setup(ep0_urb)) { -+ /* Not a setup packet, stall next EP0 transaction */ -+ debug("can't parse setup packet1\n"); -+ set_ep0_ss(); -+ set_ep0_de_out(); -+ ep0->state = EP0_IDLE; -+ return; -+ } -+ /* There are some requests with which we need to deal -+ * manually here */ -+ switch (ep0_urb->device_request.bRequest) { -+ case USB_REQ_SET_CONFIGURATION: -+ if (!ep0_urb->device_request.wValue) -+ usbd_device_event_irq(udc_device, -+ DEVICE_DE_CONFIGURED, 0); -+ else -+ usbd_device_event_irq(udc_device, -+ DEVICE_CONFIGURED, 0); -+ break; -+ case USB_REQ_SET_ADDRESS: -+ udc_set_address(udc_device->address); -+ usbd_device_event_irq(udc_device, -+ DEVICE_ADDRESS_ASSIGNED, 0); -+ break; -+ default: -+ break; -+ } -+ set_ep0_de_out(); -+ ep0->state = EP0_IDLE; -+ } else { -+ if ((ep0_urb->device_request.bmRequestType & USB_REQ_DIRECTION_MASK) -+ == USB_REQ_HOST2DEVICE) { -+ clear_ep0_opr(); -+ ep0->state = EP0_OUT_DATA_PHASE; -+ ep0_urb->buffer = ep0_urb->buffer_data; -+ ep0_urb->buffer_length = sizeof(ep0_urb->buffer_data); -+ ep0_urb->actual_length = 0; -+ } else { -+ ep0->state = EP0_IN_DATA_PHASE; -+ -+ if (ep0_recv_setup(ep0_urb)) { -+ /* Not a setup packet, stall next EP0 transaction */ -+ debug("can't parse setup packet2\n"); -+ set_ep0_ss(); -+ //set_ep0_de_out(); -+ ep0->state = EP0_IDLE; -+ return; -+ } -+ clear_ep0_opr(); -+ ep0->tx_urb = ep0_urb; -+ ep0->sent = ep0->last = 0; -+ -+ if (s3c2410_write_noniso_tx_fifo(ep0)) { -+ ep0->state = EP0_IDLE; -+ set_ep0_de_in(); -+ } else -+ set_ep0_ipr(); -+ } -+ } -+ break; -+ case EP0_IN_DATA_PHASE: -+ if (!(ep0csr & S3C2410_UDC_EP0_CSR_IPKRDY)) { -+ ep0->sent += ep0->last; -+ -+ if (s3c2410_write_noniso_tx_fifo(ep0)) { -+ ep0->state = EP0_IDLE; -+ set_ep0_de_in(); -+ } else -+ set_ep0_ipr(); -+ } -+ break; -+ case EP0_OUT_DATA_PHASE: -+ if (ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY) { -+ u32 urb_avail = ep0_urb->buffer_length - ep0_urb->actual_length; -+ u_int8_t *cp = ep0_urb->buffer + ep0_urb->actual_length; -+ int i, fifo_count; -+ -+ fifo_count = fifo_count_out(); -+ if (fifo_count < urb_avail) -+ urb_avail = fifo_count; -+ -+ for (i = 0; i < urb_avail; i++) -+ *cp++ = inl(S3C2410_UDC_EP0_FIFO_REG); -+ -+ ep0_urb->actual_length += urb_avail; -+ -+ if (fifo_count < ep0->rcv_packetSize || -+ ep0_urb->actual_length >= ep0_urb->device_request.wLength) { -+ ep0->state = EP0_IDLE; -+ if (ep0_recv_setup(ep0_urb)) { -+ /* Not a setup packet, stall next EP0 transaction */ -+ debug("can't parse setup packet3\n"); -+ set_ep0_ss(); -+ //set_ep0_de_out(); -+ return; -+ } -+ set_ep0_de_out(); -+ } else -+ clear_ep0_opr(); -+ } -+ break; -+ case EP0_END_XFER: -+ ep0->state = EP0_IDLE; -+ break; -+ case EP0_STALL: -+ //set_ep0_ss; -+ ep0->state = EP0_IDLE; -+ break; -+ } -+} -+ -+ -+static void s3c2410_udc_epn(int ep) -+{ -+ struct usb_endpoint_instance *endpoint; -+ struct urb *urb; -+ u32 ep_csr1; -+ -+ if (ep >= S3C2410_UDC_NUM_ENDPOINTS) -+ return; -+ -+ endpoint = &udc_device->bus->endpoint_array[ep]; -+ -+ S3C2410_UDC_SETIX(ep); -+ -+ if (endpoint->endpoint_address & USB_DIR_IN) { -+ /* IN transfer (device to host) */ -+ ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG); -+ debug("for ep=%u, CSR1=0x%x ", ep, ep_csr1); -+ -+ urb = endpoint->tx_urb; -+ if (ep_csr1 & S3C2410_UDC_ICSR1_SENTSTL) { -+ /* Stall handshake */ -+ debug("stall\n"); -+ outl(0x00, S3C2410_UDC_IN_CSR1_REG); -+ return; -+ } -+ if (!(ep_csr1 & S3C2410_UDC_ICSR1_PKTRDY) && urb && -+ urb->actual_length) { -+ -+ debug("completing previously send data "); -+ usbd_tx_complete(endpoint); -+ -+ /* push pending data into FIFO */ -+ if ((endpoint->last == endpoint->tx_packetSize) && -+ (urb->actual_length - endpoint->sent - endpoint->last == 0)) { -+ endpoint->sent += endpoint->last; -+ /* Write 0 bytes of data (ZLP) */ -+ debug("ZLP "); -+ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); -+ } else { -+ /* write actual data to fifo */ -+ debug("TX_DATA "); -+ s3c2410_write_noniso_tx_fifo(endpoint); -+ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); -+ } -+ } -+ debug("\n"); -+ } else { -+ /* OUT transfer (host to device) */ -+ ep_csr1 = inl(S3C2410_UDC_OUT_CSR1_REG); -+ debug("for ep=%u, CSR1=0x%x ", ep, ep_csr1); -+ -+ urb = endpoint->rcv_urb; -+ if (ep_csr1 & S3C2410_UDC_OCSR1_SENTSTL) { -+ /* Stall handshake */ -+ outl(0x00, S3C2410_UDC_IN_CSR1_REG); -+ return; -+ } -+ if ((ep_csr1 & S3C2410_UDC_OCSR1_PKTRDY) && urb) { -+ /* Read pending data from fifo */ -+ u32 fifo_count = fifo_count_out(); -+ int is_last = 0; -+ u32 i, urb_avail = urb->buffer_length - urb->actual_length; -+ u8 *cp = urb->buffer + urb->actual_length; -+ -+ if (fifo_count < endpoint->rcv_packetSize) -+ is_last = 1; -+ -+ debug("fifo_count=%u is_last=%, urb_avail=%u)\n", -+ fifo_count, is_last, urb_avail); -+ -+ if (fifo_count < urb_avail) -+ urb_avail = fifo_count; -+ -+ for (i = 0; i < urb_avail; i++) -+ *cp++ = inb(ep_fifo_reg[ep]); -+ -+ if (is_last) -+ outl(ep_csr1 & ~S3C2410_UDC_OCSR1_PKTRDY, -+ S3C2410_UDC_OUT_CSR1_REG); -+ -+ usbd_rcv_complete(endpoint, urb_avail, 0); -+ } -+ } -+ -+ urb = endpoint->rcv_urb; -+} -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+/* this is just an empty wrapper for usbtty who assumes polling operation */ -+void udc_irq(void) -+{ -+} -+ -+/* Handle general USB interrupts and dispatch according to type. -+ * This function implements TRM Figure 14-13. -+ */ -+void s3c2410_udc_irq(void) -+{ -+ struct usb_endpoint_instance *ep0 = udc_device->bus->endpoint_array; -+ u_int32_t save_idx = inl(S3C2410_UDC_INDEX_REG); -+ -+ /* read interrupt sources */ -+ u_int32_t usb_status = inl(S3C2410_UDC_USB_INT_REG); -+ u_int32_t usbd_status = inl(S3C2410_UDC_EP_INT_REG); -+ -+ //debug("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status, usbd_status); -+ -+ /* clear interrupts */ -+ outl(usb_status, S3C2410_UDC_USB_INT_REG); -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESET) { -+ //serial_putc('R'); -+ debug("RESET pwr=0x%x\n", inl(S3C2410_UDC_PWR_REG)); -+ udc_setup_ep(udc_device, 0, ep0); -+ outl(S3C2410_UDC_EP0_CSR_SSE|S3C2410_UDC_EP0_CSR_SOPKTRDY, S3C2410_UDC_EP0_CSR_REG); -+ ep0->state = EP0_IDLE; -+ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_RESUME) { -+ debug("RESUME\n"); -+ usbd_device_event_irq(udc_device, DEVICE_BUS_ACTIVITY, 0); -+ } -+ -+ if (usb_status & S3C2410_UDC_USBINT_SUSPEND) { -+ debug("SUSPEND\n"); -+ usbd_device_event_irq(udc_device, DEVICE_BUS_INACTIVE, 0); -+ } -+ -+ /* Endpoint Interrupts */ -+ if (usbd_status) { -+ int i; -+ -+ if (usbd_status & S3C2410_UDC_INT_EP0) { -+ outl(S3C2410_UDC_INT_EP0, S3C2410_UDC_EP_INT_REG); -+ s3c2410_udc_ep0(); -+ } -+ -+ for (i = 1; i < 5; i++) { -+ u_int32_t tmp = 1 << i; -+ -+ if (usbd_status & tmp) { -+ /* FIXME: Handle EP X */ -+ outl(tmp, S3C2410_UDC_EP_INT_REG); -+ s3c2410_udc_epn(i); -+ } -+ } -+ } -+ S3C2410_UDC_SETIX(save_idx); -+} -+ -+/* -+------------------------------------------------------------------------------- -+*/ -+ -+ -+/* -+ * Start of public functions. -+ */ -+ -+/* Called to start packet transmission. */ -+void udc_endpoint_write (struct usb_endpoint_instance *endpoint) -+{ -+ unsigned short epnum = -+ endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK; -+ -+ debug("Entering for ep %x ", epnum); -+ -+ if (endpoint->tx_urb) { -+ u32 ep_csr1; -+ debug("We have an URB, transmitting\n"); -+ -+ s3c2410_write_noniso_tx_fifo(endpoint); -+ -+ S3C2410_UDC_SETIX(epnum); -+ -+ ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG); -+ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); -+ } else -+ debug("\n"); -+} -+ -+/* Start to initialize h/w stuff */ -+int udc_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); -+ -+ udc_device = NULL; -+ -+ /* Set and check clock control. -+ * We might ought to be using the clock control API to do -+ * this instead of fiddling with the clock registers directly -+ * here. -+ */ -+ clk_power->CLKCON |= (1 << 7); -+ -+ /* Print banner with device revision */ -+ printf("USB: S3C2410 USB Deviced\n"); -+ -+ /* -+ * At this point, device is ready for configuration... -+ */ -+ outl(0x00, S3C2410_UDC_EP_INT_EN_REG); -+ outl(0x00, S3C2410_UDC_USB_INT_EN_REG); -+ -+ irq->INTMSK &= ~BIT_USBD; -+ -+ return 0; -+} -+ -+/* -+ * udc_setup_ep - setup endpoint -+ * -+ * Associate a physical endpoint with endpoint_instance -+ */ -+int udc_setup_ep (struct usb_device_instance *device, -+ unsigned int ep, struct usb_endpoint_instance *endpoint) -+{ -+ int ep_addr = endpoint->endpoint_address; -+ int packet_size; -+ int attributes; -+ u_int32_t maxp; -+ -+ S3C2410_UDC_SETIX(ep); -+ -+ if (ep) { -+ if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { -+ /* IN endpoint */ -+ outl(S3C2410_UDC_ICSR1_FFLUSH|S3C2410_UDC_ICSR1_CLRDT, -+ S3C2410_UDC_IN_CSR1_REG); -+ outl(S3C2410_UDC_ICSR2_MODEIN, S3C2410_UDC_IN_CSR2_REG); -+ packet_size = endpoint->tx_packetSize; -+ attributes = endpoint->tx_attributes; -+ } else { -+ /* OUT endpoint */ -+ outl(S3C2410_UDC_ICSR1_CLRDT, S3C2410_UDC_IN_CSR1_REG); -+ outl(0, S3C2410_UDC_IN_CSR2_REG); -+ outl(S3C2410_UDC_OCSR1_FFLUSH|S3C2410_UDC_OCSR1_CLRDT, -+ S3C2410_UDC_OUT_CSR1_REG); -+ outl(0, S3C2410_UDC_OUT_CSR2_REG); -+ packet_size = endpoint->rcv_packetSize; -+ attributes = endpoint->rcv_attributes; -+ } -+ } else -+ packet_size = endpoint->tx_packetSize; -+ -+ switch (packet_size) { -+ case 8: -+ maxp = S3C2410_UDC_MAXP_8; -+ break; -+ case 16: -+ maxp = S3C2410_UDC_MAXP_16; -+ break; -+ case 32: -+ maxp = S3C2410_UDC_MAXP_32; -+ break; -+ case 64: -+ maxp = S3C2410_UDC_MAXP_64; -+ break; -+ default: -+ debug("invalid packet size %u\n", packet_size); -+ return -1; -+ } -+ -+ debug("setting up endpoint %u addr %x packet_size %u maxp %u\n", ep, -+ endpoint->endpoint_address, packet_size, maxp); -+ -+ /* Set maximum packet size */ -+ writel(maxp, S3C2410_UDC_MAXP_REG); -+ -+ return 0; -+} -+ -+/* ************************************************************************** */ -+ -+/** -+ * udc_connected - is the USB cable connected -+ * -+ * Return non-zero if cable is connected. -+ */ -+#if 0 -+int udc_connected (void) -+{ -+ return ((inw (UDC_DEVSTAT) & UDC_ATT) == UDC_ATT); -+} -+#endif -+ -+/* Turn on the USB connection by enabling the pullup resistor */ -+void udc_connect (void) -+{ -+ debug("connect, enable Pullup\n"); -+ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); -+ -+ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 0); -+ udelay(10000); -+ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 1); -+ -+ irq->INTMSK &= ~BIT_USBD; -+} -+ -+/* Turn off the USB connection by disabling the pullup resistor */ -+void udc_disconnect (void) -+{ -+ debug("disconnect, disable Pullup\n"); -+ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); -+ -+ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 0); -+ -+ /* Disable interrupt (we don't want to get interrupts while the kernel -+ * is relocating itself */ -+ irq->INTMSK |= BIT_USBD; -+} -+ -+/* Switch on the UDC */ -+void udc_enable (struct usb_device_instance *device) -+{ -+ debug("enable device %p, status %d\n", device, device->status); -+ -+ /* Save the device structure pointer */ -+ udc_device = device; -+ -+ /* Setup ep0 urb */ -+ if (!ep0_urb) -+ ep0_urb = usbd_alloc_urb(udc_device, -+ udc_device->bus->endpoint_array); -+ else -+ serial_printf("udc_enable: ep0_urb already allocated %p\n", -+ ep0_urb); -+ -+ s3c2410_configure_device(device); -+} -+ -+/* Switch off the UDC */ -+void udc_disable (void) -+{ -+ debug("disable UDC\n"); -+ -+ s3c2410_deconfigure_device(); -+ -+ /* Free ep0 URB */ -+ if (ep0_urb) { -+ /*usbd_dealloc_urb(ep0_urb); */ -+ ep0_urb = NULL; -+ } -+ -+ /* Reset device pointer. -+ * We ought to do this here to balance the initialization of udc_device -+ * in udc_enable, but some of our other exported functions get called -+ * by the bus interface driver after udc_disable, so we have to hang on -+ * to the device pointer to avoid a null pointer dereference. */ -+ /* udc_device = NULL; */ -+} -+ -+/** -+ * udc_startup - allow udc code to do any additional startup -+ */ -+void udc_startup_events (struct usb_device_instance *device) -+{ -+ /* The DEVICE_INIT event puts the USB device in the state STATE_INIT. */ -+ usbd_device_event_irq (device, DEVICE_INIT, 0); -+ -+ /* The DEVICE_CREATE event puts the USB device in the state -+ * STATE_ATTACHED. -+ */ -+ usbd_device_event_irq (device, DEVICE_CREATE, 0); -+ -+ /* Some USB controller driver implementations signal -+ * DEVICE_HUB_CONFIGURED and DEVICE_RESET events here. -+ * DEVICE_HUB_CONFIGURED causes a transition to the state STATE_POWERED, -+ * and DEVICE_RESET causes a transition to the state STATE_DEFAULT. -+ * The OMAP USB client controller has the capability to detect when the -+ * USB cable is connected to a powered USB bus via the ATT bit in the -+ * DEVSTAT register, so we will defer the DEVICE_HUB_CONFIGURED and -+ * DEVICE_RESET events until later. -+ */ -+ -+ /* The GTA01 can detect usb device attachment, but we just assume being -+ * attached for now (go to STATE_POWERED) */ -+ usbd_device_event_irq (device, DEVICE_HUB_CONFIGURED, 0); -+ -+ udc_enable (device); -+} -+ -+void udc_set_nak(int epid) -+{ -+ /* FIXME: implement this */ -+} -+ -+void udc_unset_nak(int epid) -+{ -+ /* FIXME: implement this */ -+} -+ -+#endif /* CONFIG_S3C2410 && CONFIG_USB_DEVICE */ -Index: u-boot/drivers/usbdcore_s3c2410.h -=================================================================== ---- /dev/null -+++ u-boot/drivers/usbdcore_s3c2410.h -@@ -0,0 +1,273 @@ -+/* linux/include/asm/arch-s3c2410/regs-udc.h -+ * -+ * Copyright (C) 2004 Herbert Poetzl -+ * -+ * This include file 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. -+ * -+ * Changelog: -+ * 01-08-2004 Initial creation -+ * 12-09-2004 Cleanup for submission -+ * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition -+ * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA -+ * 10-01-2007 Modify for u-boot -+ */ -+ -+#ifndef __ASM_ARCH_REGS_UDC_H -+#define __ASM_ARCH_REGS_UDC_H -+ -+#define S3C2410_UDC_REG_BASE_PHYS 0x52000000 -+#define S3C2410_UDC_NUM_ENDPOINTS 5 -+ -+#define S3C2410_USBDREG(x) (x + S3C2410_UDC_REG_BASE_PHYS) -+ -+#define S3C2410_UDC_FUNC_ADDR_REG S3C2410_USBDREG(0x0140) -+#define S3C2410_UDC_PWR_REG S3C2410_USBDREG(0x0144) -+#define S3C2410_UDC_EP_INT_REG S3C2410_USBDREG(0x0148) -+ -+#define S3C2410_UDC_USB_INT_REG S3C2410_USBDREG(0x0158) -+#define S3C2410_UDC_EP_INT_EN_REG S3C2410_USBDREG(0x015c) -+ -+#define S3C2410_UDC_USB_INT_EN_REG S3C2410_USBDREG(0x016c) -+ -+#define S3C2410_UDC_FRAME_NUM1_REG S3C2410_USBDREG(0x0170) -+#define S3C2410_UDC_FRAME_NUM2_REG S3C2410_USBDREG(0x0174) -+ -+#define S3C2410_UDC_EP0_FIFO_REG S3C2410_USBDREG(0x01c0) -+#define S3C2410_UDC_EP1_FIFO_REG S3C2410_USBDREG(0x01c4) -+#define S3C2410_UDC_EP2_FIFO_REG S3C2410_USBDREG(0x01c8) -+#define S3C2410_UDC_EP3_FIFO_REG S3C2410_USBDREG(0x01cc) -+#define S3C2410_UDC_EP4_FIFO_REG S3C2410_USBDREG(0x01d0) -+ -+#define S3C2410_UDC_EP1_DMA_CON S3C2410_USBDREG(0x0200) -+#define S3C2410_UDC_EP1_DMA_UNIT S3C2410_USBDREG(0x0204) -+#define S3C2410_UDC_EP1_DMA_FIFO S3C2410_USBDREG(0x0208) -+#define S3C2410_UDC_EP1_DMA_TTC_L S3C2410_USBDREG(0x020c) -+#define S3C2410_UDC_EP1_DMA_TTC_M S3C2410_USBDREG(0x0210) -+#define S3C2410_UDC_EP1_DMA_TTC_H S3C2410_USBDREG(0x0214) -+ -+#define S3C2410_UDC_EP2_DMA_CON S3C2410_USBDREG(0x0218) -+#define S3C2410_UDC_EP2_DMA_UNIT S3C2410_USBDREG(0x021c) -+#define S3C2410_UDC_EP2_DMA_FIFO S3C2410_USBDREG(0x0220) -+#define S3C2410_UDC_EP2_DMA_TTC_L S3C2410_USBDREG(0x0224) -+#define S3C2410_UDC_EP2_DMA_TTC_M S3C2410_USBDREG(0x0228) -+#define S3C2410_UDC_EP2_DMA_TTC_H S3C2410_USBDREG(0x022c) -+ -+#define S3C2410_UDC_EP3_DMA_CON S3C2410_USBDREG(0x0240) -+#define S3C2410_UDC_EP3_DMA_UNIT S3C2410_USBDREG(0x0244) -+#define S3C2410_UDC_EP3_DMA_FIFO S3C2410_USBDREG(0x0248) -+#define S3C2410_UDC_EP3_DMA_TTC_L S3C2410_USBDREG(0x024c) -+#define S3C2410_UDC_EP3_DMA_TTC_M S3C2410_USBDREG(0x0250) -+#define S3C2410_UDC_EP3_DMA_TTC_H S3C2410_USBDREG(0x0254) -+ -+#define S3C2410_UDC_EP4_DMA_CON S3C2410_USBDREG(0x0258) -+#define S3C2410_UDC_EP4_DMA_UNIT S3C2410_USBDREG(0x025c) -+#define S3C2410_UDC_EP4_DMA_FIFO S3C2410_USBDREG(0x0260) -+#define S3C2410_UDC_EP4_DMA_TTC_L S3C2410_USBDREG(0x0264) -+#define S3C2410_UDC_EP4_DMA_TTC_M S3C2410_USBDREG(0x0268) -+#define S3C2410_UDC_EP4_DMA_TTC_H S3C2410_USBDREG(0x026c) -+ -+#define S3C2410_UDC_INDEX_REG S3C2410_USBDREG(0x0178) -+ -+/* indexed registers */ -+ -+#define S3C2410_UDC_MAXP_REG S3C2410_USBDREG(0x0180) -+ -+#define S3C2410_UDC_EP0_CSR_REG S3C2410_USBDREG(0x0184) -+ -+#define S3C2410_UDC_IN_CSR1_REG S3C2410_USBDREG(0x0184) -+#define S3C2410_UDC_IN_CSR2_REG S3C2410_USBDREG(0x0188) -+ -+#define S3C2410_UDC_OUT_CSR1_REG S3C2410_USBDREG(0x0190) -+#define S3C2410_UDC_OUT_CSR2_REG S3C2410_USBDREG(0x0194) -+#define S3C2410_UDC_OUT_FIFO_CNT1_REG S3C2410_USBDREG(0x0198) -+#define S3C2410_UDC_OUT_FIFO_CNT2_REG S3C2410_USBDREG(0x019c) -+ -+ -+ -+#define S3C2410_UDC_PWR_ISOUP (1<<7) // R/W -+#define S3C2410_UDC_PWR_RESET (1<<3) // R -+#define S3C2410_UDC_PWR_RESUME (1<<2) // R/W -+#define S3C2410_UDC_PWR_SUSPEND (1<<1) // R -+#define S3C2410_UDC_PWR_ENSUSPEND (1<<0) // R/W -+ -+#define S3C2410_UDC_PWR_DEFAULT 0x00 -+ -+#define S3C2410_UDC_INT_EP4 (1<<4) // R/W (clear only) -+#define S3C2410_UDC_INT_EP3 (1<<3) // R/W (clear only) -+#define S3C2410_UDC_INT_EP2 (1<<2) // R/W (clear only) -+#define S3C2410_UDC_INT_EP1 (1<<1) // R/W (clear only) -+#define S3C2410_UDC_INT_EP0 (1<<0) // R/W (clear only) -+ -+#define S3C2410_UDC_USBINT_RESET (1<<2) // R/W (clear only) -+#define S3C2410_UDC_USBINT_RESUME (1<<1) // R/W (clear only) -+#define S3C2410_UDC_USBINT_SUSPEND (1<<0) // R/W (clear only) -+ -+#define S3C2410_UDC_INTE_EP4 (1<<4) // R/W -+#define S3C2410_UDC_INTE_EP3 (1<<3) // R/W -+#define S3C2410_UDC_INTE_EP2 (1<<2) // R/W -+#define S3C2410_UDC_INTE_EP1 (1<<1) // R/W -+#define S3C2410_UDC_INTE_EP0 (1<<0) // R/W -+ -+#define S3C2410_UDC_USBINTE_RESET (1<<2) // R/W -+#define S3C2410_UDC_USBINTE_SUSPEND (1<<0) // R/W -+ -+ -+#define S3C2410_UDC_INDEX_EP0 (0x00) -+#define S3C2410_UDC_INDEX_EP1 (0x01) // ?? -+#define S3C2410_UDC_INDEX_EP2 (0x02) // ?? -+#define S3C2410_UDC_INDEX_EP3 (0x03) // ?? -+#define S3C2410_UDC_INDEX_EP4 (0x04) // ?? -+ -+#define S3C2410_UDC_ICSR1_CLRDT (1<<6) // R/W -+#define S3C2410_UDC_ICSR1_SENTSTL (1<<5) // R/W (clear only) -+#define S3C2410_UDC_ICSR1_SENDSTL (1<<4) // R/W -+#define S3C2410_UDC_ICSR1_FFLUSH (1<<3) // W (set only) -+#define S3C2410_UDC_ICSR1_UNDRUN (1<<2) // R/W (clear only) -+#define S3C2410_UDC_ICSR1_PKTRDY (1<<0) // R/W (set only) -+ -+#define S3C2410_UDC_ICSR2_AUTOSET (1<<7) // R/W -+#define S3C2410_UDC_ICSR2_ISO (1<<6) // R/W -+#define S3C2410_UDC_ICSR2_MODEIN (1<<5) // R/W -+#define S3C2410_UDC_ICSR2_DMAIEN (1<<4) // R/W -+ -+#define S3C2410_UDC_OCSR1_CLRDT (1<<7) // R/W -+#define S3C2410_UDC_OCSR1_SENTSTL (1<<6) // R/W (clear only) -+#define S3C2410_UDC_OCSR1_SENDSTL (1<<5) // R/W -+#define S3C2410_UDC_OCSR1_FFLUSH (1<<4) // R/W -+#define S3C2410_UDC_OCSR1_DERROR (1<<3) // R -+#define S3C2410_UDC_OCSR1_OVRRUN (1<<2) // R/W (clear only) -+#define S3C2410_UDC_OCSR1_PKTRDY (1<<0) // R/W (clear only) -+ -+#define S3C2410_UDC_OCSR2_AUTOCLR (1<<7) // R/W -+#define S3C2410_UDC_OCSR2_ISO (1<<6) // R/W -+#define S3C2410_UDC_OCSR2_DMAIEN (1<<5) // R/W -+ -+#define S3C2410_UDC_SETIX(X) writel(X, S3C2410_UDC_INDEX_REG) -+ -+#define S3C2410_UDC_EP0_CSR_OPKRDY (1<<0) -+#define S3C2410_UDC_EP0_CSR_IPKRDY (1<<1) -+#define S3C2410_UDC_EP0_CSR_SENTSTL (1<<2) -+#define S3C2410_UDC_EP0_CSR_DE (1<<3) -+#define S3C2410_UDC_EP0_CSR_SE (1<<4) -+#define S3C2410_UDC_EP0_CSR_SENDSTL (1<<5) -+#define S3C2410_UDC_EP0_CSR_SOPKTRDY (1<<6) -+#define S3C2410_UDC_EP0_CSR_SSE (1<<7) -+ -+#define S3C2410_UDC_MAXP_8 (1<<0) -+#define S3C2410_UDC_MAXP_16 (1<<1) -+#define S3C2410_UDC_MAXP_32 (1<<2) -+#define S3C2410_UDC_MAXP_64 (1<<3) -+ -+/****************** MACROS ******************/ -+#define BIT_MASK 0xFF -+ -+#if 1 -+#define maskl(v,m,a) \ -+ writel((readl(a) & ~(m))|((v)&(m)), (a)) -+#else -+#define maskl(v,m,a) do { \ -+ unsigned long foo = readl(a); \ -+ unsigned long bar = (foo & ~(m)) | ((v)&(m)); \ -+ serial_printf("0x%08x:0x%x->0x%x\n", (a), foo, bar); \ -+ writel(bar, (a)); \ -+} while(0) -+#endif -+ -+#define clear_ep0_sst() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ writel(0x00, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define clear_ep0_se() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl(S3C2410_UDC_EP0_CSR_SSE, \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define clear_ep0_opr() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl(S3C2410_UDC_EP0_CSR_SOPKTRDY, \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_ipr() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl(S3C2410_UDC_EP0_CSR_IPKRDY, \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_de() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl(S3C2410_UDC_EP0_CSR_DE, \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_ss() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl(S3C2410_UDC_EP0_CSR_SENDSTL, \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_de_out() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl((S3C2410_UDC_EP0_CSR_SOPKTRDY \ -+ | S3C2410_UDC_EP0_CSR_DE), \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_sse_out() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl((S3C2410_UDC_EP0_CSR_SOPKTRDY \ -+ | S3C2410_UDC_EP0_CSR_SSE), \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+#define set_ep0_de_in() do { \ -+ S3C2410_UDC_SETIX(0); \ -+ maskl((S3C2410_UDC_EP0_CSR_IPKRDY \ -+ | S3C2410_UDC_EP0_CSR_DE), \ -+ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ -+} while(0) -+ -+ -+#if 0 -+ -+#define clear_stall_ep1_out(base) do { \ -+ S3C2410_UDC_SETIX(base,EP1); \ -+ orl(0,base+S3C2410_UDC_OUT_CSR1_REG); \ -+} while(0) -+ -+ -+#define clear_stall_ep2_out(base) do { \ -+ S3C2410_UDC_SETIX(base,EP2); \ -+ orl(0, base+S3C2410_UDC_OUT_CSR1_REG); \ -+} while(0) -+ -+ -+#define clear_stall_ep3_out(base) do { \ -+ S3C2410_UDC_SETIX(base,EP3); \ -+ orl(0,base+S3C2410_UDC_OUT_CSR1_REG); \ -+} while(0) -+ -+ -+#define clear_stall_ep4_out(base) do { \ -+ S3C2410_UDC_SETIX(base,EP4); \ -+ orl(0, base+S3C2410_UDC_OUT_CSR1_REG); \ -+} while(0) -+ -+#endif -+ -+/* S3C2410 Endpoint parameters */ -+#define EP0_MAX_PACKET_SIZE 16 -+#define UDC_OUT_ENDPOINT 2 -+#define UDC_OUT_PACKET_SIZE 64 -+#define UDC_IN_ENDPOINT 1 -+#define UDC_IN_PACKET_SIZE 64 -+#define UDC_INT_ENDPOINT 5 -+#define UDC_INT_PACKET_SIZE 16 -+#define UDC_BULK_PACKET_SIZE 16 -+ -+#endif -Index: u-boot/drivers/usbdcore_ep0.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_ep0.c -+++ u-boot/drivers/usbdcore_ep0.c -@@ -43,7 +43,7 @@ - - #include - --#if defined(CONFIG_OMAP1510) && defined(CONFIG_USB_DEVICE) -+#if defined(CONFIG_USB_DEVICE) - #include "usbdcore.h" - - #if 0 -@@ -187,9 +187,13 @@ - if (!urb || !urb->buffer || !urb->buffer_length - || (urb->buffer_length < 255)) { - dbg_ep0 (2, "invalid urb %p", urb); -+ serial_printf("invalid urb %p", urb); - return -1L; - } - -+ /* re-initialize the ep0 buffer pointer */ -+ urb->buffer = (u8 *) urb->buffer_data; -+ - /* setup tx urb */ - urb->actual_length = 0; - cp = urb->buffer; -@@ -206,17 +210,8 @@ - usbd_device_device_descriptor (device, port))) { - return -1; - } -- /* copy descriptor for this device */ -- copy_config (urb, device_descriptor, -- sizeof (struct usb_device_descriptor), -- max); -- -- /* correct the correct control endpoint 0 max packet size into the descriptor */ -- device_descriptor = -- (struct usb_device_descriptor *) urb->buffer; -- device_descriptor->bMaxPacketSize0 = -- urb->device->bus->maxpacketsize; -- -+ urb->buffer = device_descriptor; -+ urb->actual_length = MIN(sizeof(*device_descriptor), max); - } - /*dbg_ep0(3, "copied device configuration, actual_length: %x", urb->actual_length); */ - break; -@@ -250,11 +245,9 @@ - index); - return -1; - } -- copy_config (urb, configuration_descriptor, -- sizeof (struct -- usb_configuration_descriptor), -- max); -- -+ urb->buffer = configuration_descriptor; -+ urb->actual_length = -+ MIN(le16_to_cpu(configuration_descriptor->wTotalLength), max); - } - break; - -@@ -376,6 +369,7 @@ - dbg_ep0 (0, "entering ep0_recv_setup()"); - if (!urb || !urb->device) { - dbg_ep0 (3, "invalid URB %p", urb); -+ serial_printf("invalid URB %p", urb); - return -1; - } - -@@ -400,6 +394,7 @@ - return device->cdc_recv_setup(request, urb); - dbg_ep0 (1, "non standard request: %x", - request->bmRequestType & USB_REQ_TYPE_MASK); -+ serial_printf("non standard request: %x", request->bmRequestType & USB_REQ_TYPE_MASK); - return -1; /* Stall here */ - } - -@@ -448,6 +443,8 @@ - dbg_ep0 (1, "request %s not allowed in UNKNOWN state: %s", - USBD_DEVICE_REQUESTS (request->bRequest), - usbd_device_states[device->device_state]); -+ serial_printf("request %s not allowed in UNKNOWN state: %s", USBD_DEVICE_REQUESTS (request->bRequest), usbd_device_states[device->device_state]); -+ break; - return -1; - } - -@@ -545,7 +542,8 @@ - /*dbg_ep0(2, "address: %d %d %d", */ - /* request->wValue, le16_to_cpu(request->wValue), device->address); */ - -- serial_printf ("DEVICE_ADDRESS_ASSIGNED.. event?\n"); -+ //serial_printf ("DEVICE_ADDRESS_ASSIGNED.. event?\n"); -+ //udc_set_address(device->address); - return 0; - - case USB_REQ_SET_DESCRIPTOR: /* XXX should we support this? */ -Index: u-boot/include/configs/neo1973_gta01.h -=================================================================== ---- u-boot.orig/include/configs/neo1973_gta01.h -+++ u-boot/include/configs/neo1973_gta01.h -@@ -173,6 +173,16 @@ - #define CONFIG_USB_OHCI 1 - #endif - -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" -+#define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION -+#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" -+ - /*----------------------------------------------------------------------- - * Physical Memory Map - */ -Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c -+++ u-boot/cpu/arm920t/s3c24x0/interrupts.c -@@ -222,6 +222,13 @@ - S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); - u_int32_t intpnd = irq->INTPND; - -+#ifdef CONFIG_USB_DEVICE -+ if (intpnd & BIT_USBD) { -+ s3c2410_udc_irq(); -+ irq->SRCPND = BIT_USBD; -+ irq->INTPND = BIT_USBD; -+ } -+#endif /* USB_DEVICE */ - } - #endif /* USE_IRQ */ - -Index: u-boot/drivers/usbtty.h -=================================================================== ---- u-boot.orig/drivers/usbtty.h -+++ u-boot/drivers/usbtty.h -@@ -29,6 +29,8 @@ - #include "usbdcore_mpc8xx.h" - #elif defined(CONFIG_OMAP1510) - #include "usbdcore_omap1510.h" -+#elif defined(CONFIG_S3C2410) -+#include "usbdcore_s3c2410.h" - #endif - - #include -Index: u-boot/board/neo1973/common/cmd_neo1973.c -=================================================================== ---- u-boot.orig/board/neo1973/common/cmd_neo1973.c -+++ u-boot/board/neo1973/common/cmd_neo1973.c -@@ -72,6 +72,18 @@ - neo1973_vibrator(1); - else - neo1973_vibrator(0); -+ } else if (!strcmp(argv[1], "udc")) { -+ if (argc < 3) -+ goto out_help; -+ if (!strcmp(argv[2], "udc")) { -+ if (argc < 4) -+ goto out_help; -+ if (!strcmp(argv[3], "on")) -+ udc_connect(); -+ else -+ udc_disconnect(); -+ } else -+ goto out_help; - } else { - out_help: - printf("Usage:\n%s\n", cmdtp->usage); -@@ -95,5 +107,6 @@ - "neo1973 charger off - disable charging\n" - "neo1973 backlight (on|off) - switch backlight on or off\n" - "neo1973 vibrator (on|off) - switch vibrator on or off\n" -+ "neo1973 udc pullup (on|off) - switch pull-up on or off\n" - ); - #endif /* CFG_CMD_BDI */ -Index: u-boot/board/neo1973/gta01/Makefile -=================================================================== ---- u-boot.orig/board/neo1973/gta01/Makefile -+++ u-boot/board/neo1973/gta01/Makefile -@@ -25,7 +25,7 @@ - - LIB = lib$(BOARD).a - --OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o -+OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o - SOBJS := ../common/lowlevel_init.o - - $(LIB): $(OBJS) $(SOBJS) -Index: u-boot/board/neo1973/common/udc.c -=================================================================== ---- /dev/null -+++ u-boot/board/neo1973/common/udc.c -@@ -0,0 +1,23 @@ -+ -+#include -+#include -+#include -+ -+void udc_ctrl(enum usbd_event event, int param) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ switch (event) { -+ case UDC_CTRL_PULLUP_ENABLE: -+#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ -+ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) -+ if (param) -+ gpio->GPBDAT |= (1 << 9); -+ else -+ gpio->GPBDAT &= ~(1 << 9); -+#endif -+ break; -+ default: -+ break; -+ } -+} -Index: u-boot/include/usbdcore.h -=================================================================== ---- u-boot.orig/include/usbdcore.h -+++ u-boot/include/usbdcore.h -@@ -671,4 +671,10 @@ - void usbd_rcv_complete(struct usb_endpoint_instance *endpoint, int len, int urb_bad); - void usbd_tx_complete (struct usb_endpoint_instance *endpoint); - -+enum usbd_event { -+ UDC_CTRL_PULLUP_ENABLE, -+}; -+ -+void udc_ctrl(enum usbd_event event, int param); -+#endif - #endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch deleted file mode 100644 index da0fb8cf2d..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch +++ /dev/null @@ -1,1301 +0,0 @@ -Add proper support for S3C2440 CPU's - -Index: u-boot/include/s3c24x0.h -=================================================================== ---- u-boot.orig/include/s3c24x0.h -+++ u-boot/include/s3c24x0.h -@@ -82,7 +82,7 @@ - S3C24X0_REG32 PRIORITY; - S3C24X0_REG32 INTPND; - S3C24X0_REG32 INTOFFSET; --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - S3C24X0_REG32 SUBSRCPND; - S3C24X0_REG32 INTSUBMSK; - #endif -@@ -92,11 +92,11 @@ - /* DMAS (see manual chapter 8) */ - typedef struct { - S3C24X0_REG32 DISRC; --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - S3C24X0_REG32 DISRCC; - #endif - S3C24X0_REG32 DIDST; --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - S3C24X0_REG32 DIDSTC; - #endif - S3C24X0_REG32 DCON; -@@ -107,7 +107,7 @@ - #ifdef CONFIG_S3C2400 - S3C24X0_REG32 res[1]; - #endif --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - S3C24X0_REG32 res[7]; - #endif - } /*__attribute__((__packed__))*/ S3C24X0_DMA; -@@ -126,6 +126,9 @@ - S3C24X0_REG32 CLKCON; - S3C24X0_REG32 CLKSLOW; - S3C24X0_REG32 CLKDIVN; -+#ifdef CONFIG_S3C2440 -+ S3C24X0_REG32 CAMDIVN; -+#endif - } /*__attribute__((__packed__))*/ S3C24X0_CLOCK_POWER; - - -@@ -145,7 +148,7 @@ - S3C24X0_REG32 res[8]; - S3C24X0_REG32 DITHMODE; - S3C24X0_REG32 TPAL; --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - S3C24X0_REG32 LCDINTPND; - S3C24X0_REG32 LCDSRCPND; - S3C24X0_REG32 LCDINTMSK; -@@ -157,6 +160,9 @@ - /* NAND FLASH (see S3C2410 manual chapter 6) */ - typedef struct { - S3C24X0_REG32 NFCONF; -+#ifdef CONFIG_S3C2440 -+ S3C24X0_REG32 NFCONT; -+#endif - S3C24X0_REG32 NFCMD; - S3C24X0_REG32 NFADDR; - S3C24X0_REG32 NFDATA; -@@ -164,6 +170,15 @@ - S3C24X0_REG32 NFECC; - } /*__attribute__((__packed__))*/ S3C2410_NAND; - -+/* NAND FLASH (see S3C2440 manual chapter 6) */ -+typedef struct { -+ S3C24X0_REG32 NFCONF; -+ S3C24X0_REG32 NFCMD; -+ S3C24X0_REG32 NFADDR; -+ S3C24X0_REG32 NFDATA; -+ S3C24X0_REG32 NFSTAT; -+ S3C24X0_REG32 NFECC; -+} /*__attribute__((__packed__))*/ S3C2440_NAND; - - /* UART (see manual chapter 11) */ - typedef struct { -@@ -451,6 +466,65 @@ - S3C24X0_REG32 GSTATUS3; - S3C24X0_REG32 GSTATUS4; - #endif -+#ifdef CONFIG_S3C2440 -+ S3C24X0_REG32 GPACON; -+ S3C24X0_REG32 GPADAT; -+ S3C24X0_REG32 res1[2]; -+ S3C24X0_REG32 GPBCON; -+ S3C24X0_REG32 GPBDAT; -+ S3C24X0_REG32 GPBUP; -+ S3C24X0_REG32 res2; -+ S3C24X0_REG32 GPCCON; -+ S3C24X0_REG32 GPCDAT; -+ S3C24X0_REG32 GPCUP; -+ S3C24X0_REG32 res3; -+ S3C24X0_REG32 GPDCON; -+ S3C24X0_REG32 GPDDAT; -+ S3C24X0_REG32 GPDUP; -+ S3C24X0_REG32 res4; -+ S3C24X0_REG32 GPECON; -+ S3C24X0_REG32 GPEDAT; -+ S3C24X0_REG32 GPEUP; -+ S3C24X0_REG32 res5; -+ S3C24X0_REG32 GPFCON; -+ S3C24X0_REG32 GPFDAT; -+ S3C24X0_REG32 GPFUP; -+ S3C24X0_REG32 res6; -+ S3C24X0_REG32 GPGCON; -+ S3C24X0_REG32 GPGDAT; -+ S3C24X0_REG32 GPGUP; -+ S3C24X0_REG32 res7; -+ S3C24X0_REG32 GPHCON; -+ S3C24X0_REG32 GPHDAT; -+ S3C24X0_REG32 GPHUP; -+ S3C24X0_REG32 res8; -+ -+ S3C24X0_REG32 MISCCR; -+ S3C24X0_REG32 DCLKCON; -+ S3C24X0_REG32 EXTINT0; -+ S3C24X0_REG32 EXTINT1; -+ S3C24X0_REG32 EXTINT2; -+ S3C24X0_REG32 EINTFLT0; -+ S3C24X0_REG32 EINTFLT1; -+ S3C24X0_REG32 EINTFLT2; -+ S3C24X0_REG32 EINTFLT3; -+ S3C24X0_REG32 EINTMASK; -+ S3C24X0_REG32 EINTPEND; -+ S3C24X0_REG32 GSTATUS0; -+ S3C24X0_REG32 GSTATUS1; -+ S3C24X0_REG32 GSTATUS2; -+ S3C24X0_REG32 GSTATUS3; -+ S3C24X0_REG32 GSTATUS4; -+ -+ S3C24X0_REG32 res9; -+ S3C24X0_REG32 DSC0; -+ S3C24X0_REG32 DSC1; -+ S3C24X0_REG32 MSLCON; -+ S3C24X0_REG32 GPJCON; -+ S3C24X0_REG32 GPJDAT; -+ S3C24X0_REG32 GPJUP; -+ S3C24X0_REG32 res10; -+#endif - } /*__attribute__((__packed__))*/ S3C24X0_GPIO; - - -@@ -637,8 +711,13 @@ - S3C24X0_REG32 SDIDCNT; - S3C24X0_REG32 SDIDSTA; - S3C24X0_REG32 SDIFSTA; -+#if defined(CONFIG_S3C2410) - S3C24X0_REG32 SDIDAT; - S3C24X0_REG32 SDIIMSK; -+#elif defined(CONFIG_S3C2440) -+ S3C24X0_REG32 SDIIMSK; -+ S3C24X0_REG32 SDIDAT; -+#endif - } /*__attribute__((__packed__))*/ S3C2410_SDI; - - -Index: u-boot/rtc/s3c24x0_rtc.c -=================================================================== ---- u-boot.orig/rtc/s3c24x0_rtc.c -+++ u-boot/rtc/s3c24x0_rtc.c -@@ -34,6 +34,8 @@ - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - - #include -Index: u-boot/include/s3c2440.h -=================================================================== ---- /dev/null -+++ u-boot/include/s3c2440.h -@@ -0,0 +1,300 @@ -+/* -+ * (C) Copyright 2003 -+ * David Müller ELSOFT AG Switzerland. d.mueller@elsoft.ch -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+/************************************************ -+ * NAME : s3c2440.h -+ * Version : 2007. -+ * -+ * Based on S3C2410X User's manual Rev 1.1 -+ ************************************************/ -+ -+#ifndef __S3C2440_H__ -+#define __S3C2440_H__ -+ -+#define S3C24X0_UART_CHANNELS 3 -+#define S3C24X0_SPI_CHANNELS 2 -+ -+/* S3C2440 only supports 512 Byte HW ECC */ -+#define S3C2440_ECCSIZE 512 -+#define S3C2440_ECCBYTES 3 -+ -+/* S3C2440 device base addresses */ -+#define S3C24X0_MEMCTL_BASE 0x48000000 -+#define S3C24X0_USB_HOST_BASE 0x49000000 -+#define S3C24X0_INTERRUPT_BASE 0x4A000000 -+#define S3C24X0_DMA_BASE 0x4B000000 -+#define S3C24X0_CLOCK_POWER_BASE 0x4C000000 -+#define S3C24X0_LCD_BASE 0x4D000000 -+#define S3C2440_NAND_BASE 0x4E000000 -+#define S3C24X0_UART_BASE 0x50000000 -+#define S3C24X0_TIMER_BASE 0x51000000 -+#define S3C24X0_USB_DEVICE_BASE 0x52000140 -+#define USB_DEVICE_PHYS_ADR 0x52000000 -+#define S3C24X0_WATCHDOG_BASE 0x53000000 -+#define S3C24X0_I2C_BASE 0x54000000 -+#define S3C24X0_I2S_BASE 0x55000000 -+#define S3C24X0_GPIO_BASE 0x56000000 -+#define S3C24X0_RTC_BASE 0x57000000 -+#define S3C2440_ADC_BASE 0x58000000 -+#define S3C24X0_SPI_BASE 0x59000000 -+#define S3C2440_SDI_BASE 0x5A000000 -+ -+#define oNFCONF 0x00 -+#define oNFCONT 0x04 -+ -+#ifndef __ASSEMBLER__ -+ -+/* include common stuff */ -+#include -+ -+typedef enum { -+ S3C24X0_UART0, -+ S3C24X0_UART1, -+ S3C24X0_UART2 -+} S3C24X0_UARTS_NR; -+ -+static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) -+{ -+ return (S3C24X0_MEMCTL * const)S3C24X0_MEMCTL_BASE; -+} -+static inline S3C24X0_USB_HOST * S3C24X0_GetBase_USB_HOST(void) -+{ -+ return (S3C24X0_USB_HOST * const)S3C24X0_USB_HOST_BASE; -+} -+static inline S3C24X0_INTERRUPT * S3C24X0_GetBase_INTERRUPT(void) -+{ -+ return (S3C24X0_INTERRUPT * const)S3C24X0_INTERRUPT_BASE; -+} -+static inline S3C24X0_DMAS * S3C24X0_GetBase_DMAS(void) -+{ -+ return (S3C24X0_DMAS * const)S3C24X0_DMA_BASE; -+} -+static inline S3C24X0_CLOCK_POWER * S3C24X0_GetBase_CLOCK_POWER(void) -+{ -+ return (S3C24X0_CLOCK_POWER * const)S3C24X0_CLOCK_POWER_BASE; -+} -+static inline S3C24X0_LCD * S3C24X0_GetBase_LCD(void) -+{ -+ return (S3C24X0_LCD * const)S3C24X0_LCD_BASE; -+} -+static inline S3C2440_NAND * S3C2440_GetBase_NAND(void) -+{ -+ return (S3C2440_NAND * const)S3C2440_NAND_BASE; -+} -+static inline S3C24X0_UART * S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) -+{ -+ return (S3C24X0_UART * const)(S3C24X0_UART_BASE + (nr * 0x4000)); -+} -+static inline S3C24X0_TIMERS * S3C24X0_GetBase_TIMERS(void) -+{ -+ return (S3C24X0_TIMERS * const)S3C24X0_TIMER_BASE; -+} -+static inline S3C24X0_USB_DEVICE * S3C24X0_GetBase_USB_DEVICE(void) -+{ -+ return (S3C24X0_USB_DEVICE * const)S3C24X0_USB_DEVICE_BASE; -+} -+static inline S3C24X0_WATCHDOG * S3C24X0_GetBase_WATCHDOG(void) -+{ -+ return (S3C24X0_WATCHDOG * const)S3C24X0_WATCHDOG_BASE; -+} -+static inline S3C24X0_I2C * S3C24X0_GetBase_I2C(void) -+{ -+ return (S3C24X0_I2C * const)S3C24X0_I2C_BASE; -+} -+static inline S3C24X0_I2S * S3C24X0_GetBase_I2S(void) -+{ -+ return (S3C24X0_I2S * const)S3C24X0_I2S_BASE; -+} -+static inline S3C24X0_GPIO * S3C24X0_GetBase_GPIO(void) -+{ -+ return (S3C24X0_GPIO * const)S3C24X0_GPIO_BASE; -+} -+static inline S3C24X0_RTC * S3C24X0_GetBase_RTC(void) -+{ -+ return (S3C24X0_RTC * const)S3C24X0_RTC_BASE; -+} -+/* -+static inline S3C2440_ADC * S3C2440_GetBase_ADC(void) -+{ -+ return (S3C2440_ADC * const)S3C2440_ADC_BASE; -+} -+static inline S3C24X0_SPI * S3C24X0_GetBase_SPI(void) -+{ -+ return (S3C24X0_SPI * const)S3C24X0_SPI_BASE; -+} -+*/ -+static inline S3C2410_SDI * S3C2410_GetBase_SDI(void) -+{ -+ return (S3C2410_SDI * const)S3C2440_SDI_BASE; -+} -+ -+#endif /* __ASSEMBLER__ */ -+ -+/* ISR */ -+#define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) -+#define pISR_UNDEF (*(unsigned *)(_ISR_STARTADDRESS+0x4)) -+#define pISR_SWI (*(unsigned *)(_ISR_STARTADDRESS+0x8)) -+#define pISR_PABORT (*(unsigned *)(_ISR_STARTADDRESS+0xC)) -+#define pISR_DABORT (*(unsigned *)(_ISR_STARTADDRESS+0x10)) -+#define pISR_RESERVED (*(unsigned *)(_ISR_STARTADDRESS+0x14)) -+#define pISR_IRQ (*(unsigned *)(_ISR_STARTADDRESS+0x18)) -+#define pISR_FIQ (*(unsigned *)(_ISR_STARTADDRESS+0x1C)) -+ -+#define pISR_EINT0 (*(unsigned *)(_ISR_STARTADDRESS+0x20)) -+#define pISR_EINT1 (*(unsigned *)(_ISR_STARTADDRESS+0x24)) -+#define pISR_EINT2 (*(unsigned *)(_ISR_STARTADDRESS+0x28)) -+#define pISR_EINT3 (*(unsigned *)(_ISR_STARTADDRESS+0x2C)) -+#define pISR_EINT4_7 (*(unsigned *)(_ISR_STARTADDRESS+0x30)) -+#define pISR_EINT8_23 (*(unsigned *)(_ISR_STARTADDRESS+0x34)) -+#define pISR_BAT_FLT (*(unsigned *)(_ISR_STARTADDRESS+0x3C)) -+#define pISR_TICK (*(unsigned *)(_ISR_STARTADDRESS+0x40)) -+#define pISR_WDT (*(unsigned *)(_ISR_STARTADDRESS+0x44)) -+#define pISR_TIMER0 (*(unsigned *)(_ISR_STARTADDRESS+0x48)) -+#define pISR_TIMER1 (*(unsigned *)(_ISR_STARTADDRESS+0x4C)) -+#define pISR_TIMER2 (*(unsigned *)(_ISR_STARTADDRESS+0x50)) -+#define pISR_TIMER3 (*(unsigned *)(_ISR_STARTADDRESS+0x54)) -+#define pISR_TIMER4 (*(unsigned *)(_ISR_STARTADDRESS+0x58)) -+#define pISR_UART2 (*(unsigned *)(_ISR_STARTADDRESS+0x5C)) -+#define pISR_NOTUSED (*(unsigned *)(_ISR_STARTADDRESS+0x60)) -+#define pISR_DMA0 (*(unsigned *)(_ISR_STARTADDRESS+0x64)) -+#define pISR_DMA1 (*(unsigned *)(_ISR_STARTADDRESS+0x68)) -+#define pISR_DMA2 (*(unsigned *)(_ISR_STARTADDRESS+0x6C)) -+#define pISR_DMA3 (*(unsigned *)(_ISR_STARTADDRESS+0x70)) -+#define pISR_SDI (*(unsigned *)(_ISR_STARTADDRESS+0x74)) -+#define pISR_SPI0 (*(unsigned *)(_ISR_STARTADDRESS+0x78)) -+#define pISR_UART1 (*(unsigned *)(_ISR_STARTADDRESS+0x7C)) -+#define pISR_USBD (*(unsigned *)(_ISR_STARTADDRESS+0x84)) -+#define pISR_USBH (*(unsigned *)(_ISR_STARTADDRESS+0x88)) -+#define pISR_IIC (*(unsigned *)(_ISR_STARTADDRESS+0x8C)) -+#define pISR_UART0 (*(unsigned *)(_ISR_STARTADDRESS+0x90)) -+#define pISR_SPI1 (*(unsigned *)(_ISR_STARTADDRESS+0x94)) -+#define pISR_RTC (*(unsigned *)(_ISR_STARTADDRESS+0x98)) -+#define pISR_ADC (*(unsigned *)(_ISR_STARTADDRESS+0xA0)) -+ -+ -+/* PENDING BIT */ -+#define BIT_EINT0 (0x1) -+#define BIT_EINT1 (0x1<<1) -+#define BIT_EINT2 (0x1<<2) -+#define BIT_EINT3 (0x1<<3) -+#define BIT_EINT4_7 (0x1<<4) -+#define BIT_EINT8_23 (0x1<<5) -+#define BIT_BAT_FLT (0x1<<7) -+#define BIT_TICK (0x1<<8) -+#define BIT_WDT (0x1<<9) -+#define BIT_TIMER0 (0x1<<10) -+#define BIT_TIMER1 (0x1<<11) -+#define BIT_TIMER2 (0x1<<12) -+#define BIT_TIMER3 (0x1<<13) -+#define BIT_TIMER4 (0x1<<14) -+#define BIT_UART2 (0x1<<15) -+#define BIT_LCD (0x1<<16) -+#define BIT_DMA0 (0x1<<17) -+#define BIT_DMA1 (0x1<<18) -+#define BIT_DMA2 (0x1<<19) -+#define BIT_DMA3 (0x1<<20) -+#define BIT_SDI (0x1<<21) -+#define BIT_SPI0 (0x1<<22) -+#define BIT_UART1 (0x1<<23) -+#define BIT_USBD (0x1<<25) -+#define BIT_USBH (0x1<<26) -+#define BIT_IIC (0x1<<27) -+#define BIT_UART0 (0x1<<28) -+#define BIT_SPI1 (0x1<<29) -+#define BIT_RTC (0x1<<30) -+#define BIT_ADC (0x1<<31) -+#define BIT_ALLMSK (0xFFFFFFFF) -+ -+#define ClearPending(bit) {\ -+ rSRCPND = bit;\ -+ rINTPND = bit;\ -+ rINTPND;\ -+ } -+/* Wait until rINTPND is changed for the case that the ISR is very short. */ -+ -+#define __REG(x) (*(volatile unsigned long *)(x)) -+#define __REGl(x) (*(volatile unsigned long *)(x)) -+#define __REGw(x) (*(volatile unsigned short *)(x)) -+#define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REG2(x,y) (*(volatile unsigned long *)((x) + (y))) -+ -+/* -+ * * Nand flash controller -+ * */ -+ -+#define NFDATA8 (*(volatile unsigned char *)0x4E000010) -+#define NFDATA16 (*(volatile unsigned short *)0x4E000010) -+#define NFDATA32 (*(volatile unsigned *)0x4E000010) -+ -+#define NFCONF __REG(0x4E000000) -+#define NFCONT __REG(0x4E000004) -+#define NFCMD __REG(0x4E000008) -+#define NFADDR __REGb(0x4E00000C) -+#define NFMECCD0 __REG(0x4E000014) -+#define NFMECCD1 __REG(0x4E000018) -+#define NFSECCD __REG(0x4E00001C) -+#define NFSTAT __REG(0x4E000020) -+#define NFESTAT0 __REG(0x4E000024) -+#define NFESTAT1 __REG(0x4E000028) -+#define NFMECC0 __REG(0x4E00002C) -+#define NFMECC1 __REG(0x4E000030) -+#define NFSECC __REG(0x4E000034) -+#define NFSBLK __REG(0x4E000038) -+ -+ -+#define S3C2410_MISCCR_USBDEV (0<<3) -+#define S3C2410_MISCCR_USBHOST (1<<3) -+ -+#define S3C2410_MISCCR_CLK0_MPLL (0<<4) -+#define S3C2410_MISCCR_CLK0_UPLL (1<<4) -+#define S3C2410_MISCCR_CLK0_FCLK (2<<4) -+#define S3C2410_MISCCR_CLK0_HCLK (3<<4) -+#define S3C2410_MISCCR_CLK0_PCLK (4<<4) -+#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) -+#define S3C2410_MISCCR_CLK0_MASK (7<<4) -+ -+#define S3C2410_MISCCR_CLK1_MPLL (0<<8) -+#define S3C2410_MISCCR_CLK1_UPLL (1<<8) -+#define S3C2410_MISCCR_CLK1_FCLK (2<<8) -+#define S3C2410_MISCCR_CLK1_HCLK (3<<8) -+#define S3C2410_MISCCR_CLK1_PCLK (4<<8) -+#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) -+#define S3C2410_MISCCR_CLK1_MASK (7<<8) -+ -+#define S3C2410_MISCCR_USBSUSPND0 (1<<12) -+#define S3C2410_MISCCR_USBSUSPND1 (1<<13) -+ -+#define S3C2410_MISCCR_nRSTCON (1<<16) -+ -+#define S3C2410_MISCCR_nEN_SCLK0 (1<<17) -+#define S3C2410_MISCCR_nEN_SCLK1 (1<<18) -+#define S3C2410_MISCCR_nEN_SCLKE (1<<19) -+#define S3C2410_MISCCR_SDSLEEP (7<<17) -+ -+#define S3C2410_CLKSLOW_UCLK_OFF (1<<7) -+#define S3C2410_CLKSLOW_MPLL_OFF (1<<5) -+#define S3C2410_CLKSLOW_SLOW (1<<4) -+#define S3C2410_CLKSLOW_SLOWVAL(x) (x) -+#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) -+ -+#endif /*__S3C2440_H__*/ -Index: u-boot/include/common.h -=================================================================== ---- u-boot.orig/include/common.h -+++ u-boot/include/common.h -@@ -454,7 +454,7 @@ - ulong get_OPB_freq (void); - ulong get_PCI_freq (void); - #endif --#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X) -+#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || defined(CONFIG_LH7A40X) - void s3c2410_irq(void); - #define ARM920_IRQ_CALLBACK s3c2410_irq - ulong get_FCLK (void); -Index: u-boot/cpu/arm920t/s3c24x0/usb_ohci.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/usb_ohci.c -+++ u-boot/cpu/arm920t/s3c24x0/usb_ohci.c -@@ -44,6 +44,8 @@ - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - - #include -Index: u-boot/cpu/arm920t/s3c24x0/speed.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/speed.c -+++ u-boot/cpu/arm920t/s3c24x0/speed.c -@@ -30,12 +30,15 @@ - */ - - #include --#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) -+#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ -+ defined (CONFIG_S3C2440) || defined (CONFIG_TRAB) - - #if defined(CONFIG_S3C2400) - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - - #define MPLL 0 -@@ -66,8 +69,12 @@ - m = ((r & 0xFF000) >> 12) + 8; - p = ((r & 0x003F0) >> 4) + 2; - s = r & 0x3; -- -+#ifndef CONFIG_S3C2440 - return((CONFIG_SYS_CLK_FREQ * m) / (p << s)); -+#else -+ /* To avoid integer overflow, changed the calc order */ -+ return( 2 * m * (CONFIG_SYS_CLK_FREQ / (p << s )) ); -+#endif - } - - /* return FCLK frequency */ -@@ -81,7 +88,21 @@ - { - S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); - -+#ifndef CONFIG_S3C2440 - return((clk_power->CLKDIVN & 0x2) ? get_FCLK()/2 : get_FCLK()); -+#else -+ switch (clk_power->CLKDIVN & 0x6) { -+ case 0x0: -+ return get_FCLK(); -+ case 0x2: -+ return get_FCLK()/2; -+ case 0x4: -+ return (clk_power->CAMDIVN & 0x200) ? get_FCLK()/8 : get_FCLK()/4; -+ case 0x6: -+ return (clk_power->CAMDIVN & 0x100) ? get_FCLK()/6 : get_FCLK()/3; -+ } -+ return 0; -+#endif - } - - /* return PCLK frequency */ -@@ -98,4 +119,5 @@ - return(get_PLLCLK(UPLL)); - } - --#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ -+#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || -+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ -Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c -+++ u-boot/cpu/arm920t/s3c24x0/interrupts.c -@@ -30,13 +30,16 @@ - */ - - #include --#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) -+#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ -+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) - - #include - #if defined(CONFIG_S3C2400) - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - - int timer_load_val = 0; -@@ -59,6 +62,7 @@ - /* use PWM Timer 4 because it has no output */ - /* prescaler for Timer 4 is 16 */ - timers->TCFG0 = 0x0f00; -+#ifndef CONFIG_S3C2440 - if (timer_load_val == 0) - { - /* -@@ -68,6 +72,9 @@ - */ - timer_load_val = get_PCLK()/(2 * 16 * 100); - } -+#else -+ timer_load_val = get_PCLK()/(2 * 16 * 100); -+#endif - /* load value for 10 ms timeout */ - lastdec = timers->TCNTB4 = timer_load_val; - /* auto load, manual update of Timer 4 */ -@@ -178,6 +185,7 @@ - tbclk = timer_load_val * 100; - #elif defined(CONFIG_SBC2410X) || \ - defined(CONFIG_SMDK2410) || \ -+ defined(CONFIG_SMDK2440) || \ - defined(CONFIG_VCMA9) - tbclk = CFG_HZ; - #else -@@ -232,4 +240,5 @@ - } - #endif /* USE_IRQ */ - --#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ -+#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || -+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ -Index: u-boot/cpu/arm920t/s3c24x0/serial.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/serial.c -+++ u-boot/cpu/arm920t/s3c24x0/serial.c -@@ -19,12 +19,15 @@ - */ - - #include --#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) -+#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ -+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) - - #if defined(CONFIG_S3C2400) || defined(CONFIG_TRAB) - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - - DECLARE_GLOBAL_DATA_PTR; -@@ -180,4 +183,5 @@ - } - } - --#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ -+#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || -+ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ -Index: u-boot/cpu/arm920t/s3c24x0/i2c.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/i2c.c -+++ u-boot/cpu/arm920t/s3c24x0/i2c.c -@@ -34,6 +34,8 @@ - #include - #elif defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include - #endif - #include - -@@ -63,7 +65,7 @@ - { - S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); - --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - return (gpio->GPEDAT & 0x8000) >> 15; - #endif - #ifdef CONFIG_S3C2400 -@@ -82,7 +84,7 @@ - { - S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); - --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - gpio->GPEDAT = (gpio->GPEDAT & ~0x4000) | (x&1) << 14; - #endif - #ifdef CONFIG_S3C2400 -@@ -139,7 +141,7 @@ - } - - if ((status & I2CSTAT_BSY) || GetI2CSDA () == 0) { --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - ulong old_gpecon = gpio->GPECON; - #endif - #ifdef CONFIG_S3C2400 -@@ -147,7 +149,7 @@ - #endif - /* bus still busy probably by (most) previously interrupted transfer */ - --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - /* set I2CSDA and I2CSCL (GPE15, GPE14) to GPIO */ - gpio->GPECON = (gpio->GPECON & ~0xF0000000) | 0x10000000; - #endif -@@ -171,7 +173,7 @@ - udelay (1000); - - /* restore pin functions */ --#ifdef CONFIG_S3C2410 -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - gpio->GPECON = old_gpecon; - #endif - #ifdef CONFIG_S3C2400 -Index: u-boot/drivers/usbdcore_s3c2410.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_s3c2410.c -+++ u-boot/drivers/usbdcore_s3c2410.c -@@ -24,7 +24,7 @@ - - #include - --#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) -+#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) && defined(CONFIG_USB_DEVICE) - - #include - -Index: u-boot/drivers/usbtty.h -=================================================================== ---- u-boot.orig/drivers/usbtty.h -+++ u-boot/drivers/usbtty.h -@@ -29,7 +29,7 @@ - #include "usbdcore_mpc8xx.h" - #elif defined(CONFIG_OMAP1510) - #include "usbdcore_omap1510.h" --#elif defined(CONFIG_S3C2410) -+#elif defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - #include "usbdcore_s3c2410.h" - #endif - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -31,7 +31,11 @@ - - #include - #include -+#if defined(CONFIG_S3C2410) - #include -+#elif defined(CONFIG_S3C2440) -+#include -+#endif - - - /* -@@ -142,14 +146,32 @@ - # define pWTCON 0x15300000 - # define INTMSK 0x14400008 /* Interupt-Controller base addresses */ - # define CLKDIVN 0x14800014 /* clock divisor register */ --#elif defined(CONFIG_S3C2410) -+#elif defined(CONFIG_S3C2410) || defined (CONFIG_S3C2440) - # define pWTCON 0x53000000 - # define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ - # define INTSUBMSK 0x4A00001C - # define CLKDIVN 0x4C000014 /* clock divisor register */ - #endif - --#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) -+#if defined(CONFIG_S3C2410) -+# define INTSUBMSK_val 0x7ff -+# define MPLLCON_val ((0x90 << 12) + (0x7 << 4) + 0x0) /* 202 MHz */ -+# define UPLLCON_val ((0x78 << 12) + (0x2 << 4) + 0x3) -+# define CLKDIVN_val 3 /* FCLK:HCLK:PCLK = 1:2:4 */ -+#elif defined(CONFIG_S3C2440) -+# define INTSUBMSK_val 0xffff -+#if (CONFIG_SYS_CLK_FREQ == 16934400) -+# define MPLLCON_val ((0x61 << 12) + (0x1 << 4) + 0x2) /* 296.35 MHz */ -+# define UPLLCON_val ((0x3c << 12) + (0x4 << 4) + 0x2) /* 47.98 MHz */ -+#else if (CONFIG_SYS_CLK_FREQ == 12000000) -+# define MPLLCON_val ((0x44 << 12) + (0x1 << 4) + 0x1) /* 304.00 MHz */ -+# define UPLLCON_val ((0x38 << 12) + (0x2 << 4) + 0x2) /* 48.00 MHz */ -+#endif -+# define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ -+# define CAMDIVN 0x4C000018 -+#endif -+ -+#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - ldr r0, =pWTCON - mov r1, #0x0 - str r1, [r0] -@@ -160,24 +182,34 @@ - mov r1, #0xffffffff - ldr r0, =INTMSK - str r1, [r0] --# if defined(CONFIG_S3C2410) -- ldr r1, =0x3ff -+# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) -+ ldr r1, =INTSUBMSK_val - ldr r0, =INTSUBMSK - str r1, [r0] - # endif - -- /* default FCLK is 202 MHz ! */ -+#if defined(CONFIG_S3C2440) -+ /* Make sure we get FCLK:HCLK:PCLK = 1:3:6 */ -+ ldr r0, =CAMDIVN -+ mov r1, #0 -+ str r1, [r0] -+#endif -+ -+ /* Clock asynchronous mode */ -+ mrc p15, 0, r1, c1, c0, 0 -+ orr r1, r1, #0xc0000000 -+ mcr p15, 0, r1, c1, c0, 0 -+ -+ - #define LOCKTIME 0x4c000000 - #define UPLLCON 0x4c000008 --//#define MPLLCFG ((0x90 << 12) + (0x2 << 4) + 0x2) --#define MPLLCFG ((0x90 << 12) + (0x7 << 4) + 0x0) --#define UPLLCFG ((0x78 << 12) + (0x2 << 4) + 0x3) -+ - ldr r0, =LOCKTIME - mov r1, #0xffffff - str r1, [r0] - - ldr r0, =UPLLCON -- ldr r1, =UPLLCFG -+ ldr r1, =UPLLCON_val - str r1, [r0] - - /* Page 7-19, seven nops between UPLL and MPLL */ -@@ -189,12 +221,12 @@ - nop - nop - -- ldr r1, =MPLLCFG -+ ldr r1, =MPLLCON_val - str r1, [r0, #-4] /* MPLLCON */ - - /* FCLK:HCLK:PCLK = 1:2:4 */ - ldr r0, =CLKDIVN -- mov r1, #3 -+ mov r1, #CLKDIVN_val - str r1, [r0] - - #if 1 -@@ -222,7 +254,7 @@ - str r1, [r0, #0x28] - #endif - --#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ -+#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */ - - #ifndef CONFIG_SKIP_LOWLEVEL_INIT - #ifndef CONFIG_LL_INIT_NAND_ONLY -@@ -279,7 +311,7 @@ - #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) - bl cpu_init_crit - #endif --#if defined(CONFIG_S3C2410) -+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) - /* ensure some refresh has happened */ - ldr r1, =0xfffff - 1: subs r1, r1, #1 -@@ -290,11 +322,12 @@ - ldr r0, [ r1 ] - tst r0, #0x02 /* is this resume from power down */ - ldrne pc, [r1, #4] /* gstatus3 */ --#endif /* CONFIG_S3C2410 */ -+#endif /* CONFIG_S3C2410 || CONFIG_S3C2440 */ - #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ - - /* mov r10, lr */ - -+#if defined(CONFIG_S3C2410) - @ reset NAND - mov r1, #S3C2410_NAND_BASE - ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 -@@ -314,6 +347,17 @@ - ldr r2, [r1, #oNFCONF] - orr r2, r2, #0x800 @ disable chip - str r2, [r1, #oNFCONF] -+#elif defined(CONFIG_S3C2440) -+ mov r1, #S3C2440_NAND_BASE -+ ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 -+ ldr r3, [r1, #oNFCONF] -+ orr r3, r3, r2 -+ str r3, [r1, #oNFCONF] -+ -+ ldr r3, [r1, #oNFCONT] -+ orr r3, r3, #1 @ enable nand controller -+ str r3, [r1, #oNFCONT] -+#endif - - #if 0 - @ get ready to call C functions (for nand_read()) -@@ -382,7 +426,7 @@ - #endif /* CONFIG_S3C2410_NAND_BOOT */ - done_relocate: - --#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) -+#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) - /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) - ended up in RAM, then that ram is mapped to 0x30000000 and not 0. - So we need to copy the interrupt vectors, etc. */ -Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand_read.c -+++ u-boot/cpu/arm920t/s3c24x0/nand_read.c -@@ -16,30 +16,141 @@ - */ - - #include -+#include - - #ifdef CONFIG_S3C2410_NAND_BOOT - - #define __REGb(x) (*(volatile unsigned char *)(x)) -+#define __REGw(x) (*(volatile unsigned short *)(x)) - #define __REGi(x) (*(volatile unsigned int *)(x)) - #define NF_BASE 0x4e000000 -+#if defined(CONFIG_S3C2410) - #define NFCONF __REGi(NF_BASE + 0x0) - #define NFCMD __REGb(NF_BASE + 0x4) - #define NFADDR __REGb(NF_BASE + 0x8) - #define NFDATA __REGb(NF_BASE + 0xc) - #define NFSTAT __REGb(NF_BASE + 0x10) -+#define NFSTAT_BUSY 1 -+#define nand_select() (NFCONF &= ~0x800) -+#define nand_deselect() (NFCONF |= 0x800) -+#define nand_clear_RnB() do {} while (0) -+#elif defined(CONFIG_S3C2440) -+#define NFCONF __REGi(NF_BASE + 0x0) -+#define NFCONT __REGi(NF_BASE + 0x4) -+#define NFCMD __REGb(NF_BASE + 0x8) -+#define NFADDR __REGb(NF_BASE + 0xc) -+#define NFDATA __REGb(NF_BASE + 0x10) -+#define NFDATA16 __REGw(NF_BASE + 0x10) -+#define NFSTAT __REGb(NF_BASE + 0x20) -+#define NFSTAT_BUSY 1 -+#define nand_select() (NFCONT &= ~(1 << 1)) -+#define nand_deselect() (NFCONT |= (1 << 1)) -+#define nand_clear_RnB() (NFSTAT |= (1 << 2)) -+#endif - --#define BUSY 1 --inline void wait_idle(void) -+static inline void nand_wait(void) - { - int i; - -- while (!(NFSTAT & BUSY)) -+ while (!(NFSTAT & NFSTAT_BUSY)) - for (i=0; i<10; i++); - } - --#define NAND_SECTOR_SIZE 512 --#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) --#define NAND_PAGE_SIZE 0x4000 -+#if defined(CONFIG_S3C2410) -+/* configuration for 2410 with 512byte sized flash */ -+#define NAND_PAGE_SIZE 512 -+#define BAD_BLOCK_OFFSET 517 -+#define NAND_BLOCK_MASK (NAND_PAGE_SIZE - 1) -+#define NAND_BLOCK_SIZE 0x4000 -+#else -+/* configuration for 2440 with 2048byte sized flash */ -+#define NAND_5_ADDR_CYCLE -+#define NAND_PAGE_SIZE 2048 -+#define BAD_BLOCK_OFFSET NAND_PAGE_SIZE -+#define NAND_BLOCK_MASK (NAND_PAGE_SIZE - 1) -+#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE * 64) -+#endif -+ -+/* compile time failure in case of an invalid configuration */ -+#if defined(CONFIG_S3C2410) && (NAND_PAGE_SIZE != 512) -+#error "S3C2410 does not support nand page size != 512" -+#endif -+ -+static int is_bad_block(unsigned long i) -+{ -+ unsigned char data; -+ unsigned long page_num; -+ -+ /* FIXME: do this twice, for first and second page in block */ -+ -+ nand_clear_RnB(); -+#if (NAND_PAGE_SIZE == 512) -+ NFCMD = NAND_CMD_READOOB; /* 0x50 */ -+ NFADDR = BAD_BLOCK_OFFSET & 0xf; -+ NFADDR = (i >> 9) & 0xff; -+ NFADDR = (i >> 17) & 0xff; -+ NFADDR = (i >> 25) & 0xff; -+#elif (NAND_PAGE_SIZE == 2048) -+ page_num = i >> 11; /* addr / 2048 */ -+ NFCMD = NAND_CMD_READ0; -+ NFADDR = BAD_BLOCK_OFFSET & 0xff; -+ NFADDR = (BAD_BLOCK_OFFSET >> 8) & 0xff; -+ NFADDR = page_num & 0xff; -+ NFADDR = (page_num >> 8) & 0xff; -+ NFADDR = (page_num >> 16) & 0xff; -+ NFCMD = NAND_CMD_READSTART; -+#endif -+ nand_wait(); -+ data = (NFDATA & 0xff); -+ if (data != 0xff) -+ return 1; -+ -+ return 0; -+} -+ -+static int nand_read_page_ll(unsigned char *buf, unsigned long addr) -+{ -+ unsigned short *ptr16 = (unsigned short *)buf; -+ unsigned int i, page_num; -+ -+ nand_clear_RnB(); -+ -+ NFCMD = NAND_CMD_READ0; -+ -+#if (NAND_PAGE_SIZE == 512) -+ /* Write Address */ -+ NFADDR = addr & 0xff; -+ NFADDR = (addr >> 9) & 0xff; -+ NFADDR = (addr >> 17) & 0xff; -+ NFADDR = (addr >> 25) & 0xff; -+#elif (NAND_PAGE_SIZE == 2048) -+ page_num = addr >> 11; /* addr / 2048 */ -+ /* Write Address */ -+ NFADDR = 0; -+ NFADDR = 0; -+ NFADDR = page_num & 0xff; -+ NFADDR = (page_num >> 8) & 0xff; -+ NFADDR = (page_num >> 16) & 0xff; -+ NFCMD = NAND_CMD_READSTART; -+#else -+#error "unsupported nand page size" -+#endif -+ nand_wait(); -+ -+#if defined(CONFIG_S3C2410) -+ for (i = 0; i < NAND_PAGE_SIZE; i++) { -+ *buf = (NFDATA & 0xff); -+ buf++; -+ } -+#elif defined(CONFIG_S3C2440) -+ for (i = 0; i < NAND_PAGE_SIZE/2; i++) { -+ *ptr16 = NFDATA16; -+ ptr16++; -+ } -+#endif -+ -+ return NAND_PAGE_SIZE; -+} - - /* low level nand read function */ - int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) -@@ -50,47 +161,28 @@ - return -1; /* invalid alignment */ - - /* chip Enable */ -- NFCONF &= ~0x800; -+ nand_select(); -+ nand_clear_RnB(); - for (i=0; i<10; i++); - - for (i=start_addr; i < (start_addr + size);) { - #ifdef CONFIG_S3C2410_NAND_SKIP_BAD -- if (start_addr % NAND_PAGE_SIZE == 0) { -- unsigned char data; -- NFCMD = 0x50; -- NFADDR = 517&0xf; -- NFADDR = (i >> 9) & 0xff; -- NFADDR = (i >> 17) & 0xff; -- NFADDR = (i >> 25) & 0xff; -- wait_idle(); -- data = (NFDATA & 0xff); -- if (data != 0xff) { -+ if (start_addr % NAND_BLOCK_SIZE == 0) { -+ if (is_bad_block(i)) { - /* Bad block */ -- i += NAND_PAGE_SIZE; -- size += NAND_PAGE_SIZE; -+ i += NAND_BLOCK_SIZE; -+ size += NAND_BLOCK_SIZE; - continue; - } - } - #endif -- /* READ0 */ -- NFCMD = 0; -- -- /* Write Address */ -- NFADDR = i & 0xff; -- NFADDR = (i >> 9) & 0xff; -- NFADDR = (i >> 17) & 0xff; -- NFADDR = (i >> 25) & 0xff; -- -- wait_idle(); -- -- for (j=0; j < NAND_SECTOR_SIZE; j++, i++) { -- *buf = (NFDATA & 0xff); -- buf++; -- } -+ j = nand_read_page_ll(buf, i); -+ i += j; -+ buf += j; - } - - /* chip Disable */ -- NFCONF |= 0x800; /* chip disable */ -+ nand_deselect(); - - return 0; - } -Index: u-boot/cpu/arm920t/s3c24x0/nand.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/nand.c -+++ u-boot/cpu/arm920t/s3c24x0/nand.c -@@ -36,24 +36,54 @@ - #define __REGi(x) (*(volatile unsigned int *)(x)) - - #define NF_BASE 0x4e000000 -+ - #define NFCONF __REGi(NF_BASE + 0x0) --#define NFCMD __REGb(NF_BASE + 0x4) --#define NFADDR __REGb(NF_BASE + 0x8) --#define NFDATA __REGb(NF_BASE + 0xc) --#define NFSTAT __REGb(NF_BASE + 0x10) -+ -+#if defined(CONFIG_S3C2410) -+ -+#define oNFCMD 0x4 -+#define oNFADDR 0x8 -+#define oNFDATA 0xc -+#define oNFSTAT 0x10 - #define NFECC0 __REGb(NF_BASE + 0x14) - #define NFECC1 __REGb(NF_BASE + 0x15) - #define NFECC2 __REGb(NF_BASE + 0x16) -+#define NFCONF_nFCE (1<<11) - - #define S3C2410_NFCONF_EN (1<<15) - #define S3C2410_NFCONF_512BYTE (1<<14) - #define S3C2410_NFCONF_4STEP (1<<13) - #define S3C2410_NFCONF_INITECC (1<<12) --#define S3C2410_NFCONF_nFCE (1<<11) - #define S3C2410_NFCONF_TACLS(x) ((x)<<8) - #define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) - #define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) - -+#elif defined(CONFIG_S3C2440) -+ -+#define oNFCMD 0x8 -+#define oNFADDR 0xc -+#define oNFDATA 0x10 -+#define oNFSTAT 0x20 -+ -+#define NFCONT __REGi(NF_BASE + 0x04) -+#define NFMECC0 __REGi(NF_BASE + 0x2C) -+#define NFCONF_nFCE (1<<1) -+#define S3C2440_NFCONF_INITECC (1<<4) -+#define S3C2440_NFCONF_MAINECCLOCK (1<<5) -+#define nand_select() (NFCONT &= ~(1 << 1)) -+#define nand_deselect() (NFCONT |= (1 << 1)) -+#define nand_clear_RnB() (NFSTAT |= (1 << 2)) -+#define nand_detect_RB() { while(!(NFSTAT&(1<<2))); } -+#define nand_wait() { while(!(NFSTAT & 0x4)); } /* RnB_TransDectect */ -+ -+#endif -+ -+#define NFCMD __REGb(NF_BASE + oNFCMD) -+#define NFADDR __REGb(NF_BASE + oNFADDR) -+#define NFDATA __REGb(NF_BASE + oNFDATA) -+#define NFSTAT __REGb(NF_BASE + oNFSTAT) -+ -+ - static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) - { - struct nand_chip *chip = mtd->priv; -@@ -62,23 +92,31 @@ - - switch (cmd) { - case NAND_CTL_SETNCE: -- NFCONF &= ~S3C2410_NFCONF_nFCE; -+#if defined(CONFIG_S3C2410) -+ NFCONF &= ~NFCONF_nFCE; -+#elif defined(CONFIG_S3C2440) -+ NFCONT &= ~NFCONF_nFCE; -+#endif - DEBUGN("NFCONF=0x%08x\n", NFCONF); - break; - case NAND_CTL_CLRNCE: -- NFCONF |= S3C2410_NFCONF_nFCE; -+#if defined(CONFIG_S3C2410) -+ NFCONF |= NFCONF_nFCE; -+#elif defined(CONFIG_S3C2440) -+ NFCONT &= ~NFCONF_nFCE; -+#endif - DEBUGN("NFCONF=0x%08x\n", NFCONF); - break; - case NAND_CTL_SETALE: -- chip->IO_ADDR_W = NF_BASE + 0x8; -+ chip->IO_ADDR_W = NF_BASE + oNFADDR; - DEBUGN("SETALE\n"); - break; - case NAND_CTL_SETCLE: -- chip->IO_ADDR_W = NF_BASE + 0x4; -+ chip->IO_ADDR_W = NF_BASE + oNFCMD; - DEBUGN("SETCLE\n"); - break; - default: -- chip->IO_ADDR_W = NF_BASE + 0xc; -+ chip->IO_ADDR_W = NF_BASE + oNFDATA; - break; - } - return; -@@ -180,16 +218,21 @@ - /* initialize hardware */ - twrph0 = 3; twrph1 = 0; tacls = 0; - -+#if defined(CONFIG_S3C2410) - cfg = S3C2410_NFCONF_EN; - cfg |= S3C2410_NFCONF_TACLS(tacls - 1); - cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); - cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); - - NFCONF = cfg; -- //NFCONF = 0xf842; -+#elif defined(CONFIG_S3C2440) -+ twrph0 = 7; twrph1 = 7; tacls = 7; -+ NFCONF = (tacls<<12)|(twrph0<<8)|(twrph1<<4)|(0<<0); -+ NFCONT = (0<<13)|(0<<12)|(0<<10)|(0<<9)|(0<<8)|(1<<6)|(1<<5)|(1<<4)|(1<<1)|(1<<0); -+#endif - - /* initialize nand_chip data structure */ -- nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; -+ nand->IO_ADDR_R = nand->IO_ADDR_W = NF_BASE + oNFDATA; - - /* read_buf and write_buf are default */ - /* read_byte and write_byte are default */ -@@ -214,12 +257,23 @@ - nand->options = 0; - #endif - -+#if defined(CONFIG_S3C2440) -+/* -+ nand_select(); -+ nand_clear_RnB(); -+ NFCMD = NAND_CMD_RESET; -+ { volatile int i; for (i = 0; i < 10; i ++); } -+ nand_detect_RB(); -+ nand_deselect(); -+*/ -+#endif -+ - DEBUGN("end of nand_init\n"); - - return 0; - } - - #else -- #error "U-Boot legacy NAND support not available for S3C2410" -+ #error "U-Boot legacy NAND support not available for S3C24xx" - #endif - #endif -Index: u-boot/cpu/arm920t/s3c24x0/mmc.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c -+++ u-boot/cpu/arm920t/s3c24x0/mmc.c -@@ -137,6 +137,9 @@ - dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; - if (wide) - dcon |= S3C2410_SDIDCON_WIDEBUS; -+#if defined(CONFIG_S3C2440) -+ dcon |= S3C2440_SDIDCON_DS_WORD | S3C2440_SDIDCON_DATSTART; -+#endif - sdi->SDIDCON = dcon; - - /* send read command */ -@@ -394,13 +397,18 @@ - - clk_power->CLKCON |= (1 << 9); - -+ sdi->SDIBSIZE = 512; -+#if defined(CONFIG_S3C2410) - /* S3C2410 has some bug that prevents reliable operation at higher speed */ - //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -- sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ -- sdi->SDIBSIZE = 512; -+ sdi->SDIPRE = 0x02; /* 2410: SDCLK = PCLK/2 / (SDIPRE+1) = 11MHz */ - sdi->SDIDTIMER = 0xffff; -+#elif defined(CONFIG_S3C2440) -+ sdi->SDIPRE = 0x05; /* 2410: SDCLK = PCLK / (SDIPRE+1) = 11MHz */ -+ sdi->SDIDTIMER = 0x7fffff; -+#endif - sdi->SDIIMSK = 0x0; -- sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; -+ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2410_SDICON_CLOCKTYPE; - udelay(125000); /* FIXME: 74 SDCLK cycles */ - - mmc_csd.c_size = 0; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch deleted file mode 100644 index 62ae5592ab..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch +++ /dev/null @@ -1,256 +0,0 @@ -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -35,6 +35,8 @@ - #include - #elif defined(CONFIG_S3C2440) - #include -+#elif defined(CONFIG_S3C2443) -+#include - #endif - - -@@ -164,9 +166,15 @@ - # define UPLLCON_val ((0x3c << 12) + (0x4 << 4) + 0x2) - # define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ - # define CAMDIVN 0x4C000018 -+#elif defined(CONFIG_S3C2443) -+# define INTSUBMSK_val 0x1fffffff -+# define EPLLCON_val ((40 << 16) | (1 << 8) | (1)) /* 96 MHz */ -+# define MPLLCON_val ((81 << 16) | (2 << 8) | (0)) /* 1068 MHz */ -+# define CLKDIV0_val ((8 << 9) | (1 << 4) | (1 << 3) | (1 << 2) - #endif - --#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) -+#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \ -+ defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) - ldr r0, =pWTCON - mov r1, #0x0 - str r1, [r0] -@@ -177,7 +185,7 @@ - mov r1, #0xffffffff - ldr r0, =INTMSK - str r1, [r0] --# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) -+# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) - ldr r1, =INTSUBMSK_val - ldr r0, =INTSUBMSK - str r1, [r0] -@@ -196,6 +204,43 @@ - mcr p15, 0, r1, c1, c0, 0 - - -+#if defined(CONFIG_S3C2443) -+#define LOCKCON0 0x4c000000 -+#define LOCKCON1 0x4c000004 -+#define MPLLCON 0x4c000010 -+#define EPLLCON 0x4c000018 -+ -+ ldr r0, =CLKDIV0 -+ ldr r1, =CLKDIV0_val -+ str r1, [r0] -+ -+ /* set safe (way too long) locktime for both PLLs */ -+ ldr r0, =LOCKCON0 -+ mov r1, #0xffffff -+ str r1, [r0] -+ ldr r0, =LOCKCON1 -+ str r1, [r0] -+ -+ /* configure MPLL */ -+ ldr r0, =MPLLCON -+ ldr r1, =MPLLCON_val -+ str r1, [r0] -+ -+ /* select MPLL clock out for SYSCLK */ -+ ldr r0, =CLKSRC -+ ldr r1, [r0] -+ orr r1, r1, #0x10 -+ str r1, [r0] -+ -+#if 0 -+ /* configure EPLL */ -+ ldr r0, =EPLLCON -+ ldr r1, =EPLLCON_val -+ str r1, [r0] -+#endif -+ -+ -+#else /* i.e. 2440, 2410 and 2440 */ - #define LOCKTIME 0x4c000000 - #define UPLLCON 0x4c000008 - -@@ -223,6 +268,7 @@ - ldr r0, =CLKDIVN - mov r1, #CLKDIVN_val - str r1, [r0] -+#endif - - #if 1 - /* enable uart */ -@@ -249,7 +295,7 @@ - str r1, [r0, #0x28] - #endif - --#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */ -+#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 || CONFIG_S3C2443 */ - - #ifndef CONFIG_SKIP_LOWLEVEL_INIT - #ifndef CONFIG_LL_INIT_NAND_ONLY -Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c -=================================================================== ---- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c -+++ u-boot/cpu/arm920t/s3c24x0/interrupts.c -@@ -31,7 +31,8 @@ - - #include - #if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ -- defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) -+ defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) || \ -+ defined (CONFIG_TRAB) - - #include - #if defined(CONFIG_S3C2400) -@@ -40,6 +41,8 @@ - #include - #elif defined(CONFIG_S3C2440) - #include -+#elif defined(CONFIG_S3C2443) -+#include - #endif - - int timer_load_val = 0; -@@ -186,6 +189,7 @@ - #elif defined(CONFIG_SBC2410X) || \ - defined(CONFIG_SMDK2410) || \ - defined(CONFIG_SMDK2440) || \ -+ defined(CONFIG_SMDK2443) || \ - defined(CONFIG_VCMA9) - tbclk = CFG_HZ; - #else -Index: u-boot/drivers/usbdcore_s3c2410.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_s3c2410.c -+++ u-boot/drivers/usbdcore_s3c2410.c -@@ -24,7 +24,8 @@ - - #include - --#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) && defined(CONFIG_USB_DEVICE) -+#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || \ -+ defined(CONFIG_S3C2443)) && defined(CONFIG_USB_DEVICE) - - #include - -Index: u-boot/include/s3c2443.h -=================================================================== ---- /dev/null -+++ u-boot/include/s3c2443.h -@@ -0,0 +1,106 @@ -+/* -+ * (C) Copyright 2007 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __S3C2443_H -+#define __S3C2443_H -+ -+#include -+ -+/* CLOCK & POWER MANAGEMENT (see S3C2443 manual chapter 2) */ -+typedef struct { -+ S3C24X0_REG32 LOCKCON0; -+ S3C24X0_REG32 LOCKCON1; -+ S3C24X0_REG32 OSCSET; -+ S3C24X0_REG32 res1; -+ S3C24X0_REG32 MPLLCON; -+ S3C24X0_REG32 res2; -+ S3C24X0_REG32 EPLLCON; -+ S3C24X0_REG32 res3; -+ S3C24X0_REG32 CLKSRC; -+ S3C24X0_REG32 CLKDIV0; -+ S3C24X0_REG32 CLKDIV1; -+ S3C24X0_REG32 res4; -+ S3C24X0_REG32 HCLKCON; -+ S3C24X0_REG32 PCLKCON; -+ S3C24X0_REG32 SCLKCON; -+ S3C24X0_REG32 res5; -+ S3C24X0_REG32 PWRMODE; -+ S3C24X0_REG32 SWRST; -+ S3C24X0_REG32 res6[2]; -+ S3C24X0_REG32 BUSPRI0; -+ S3C24X0_REG32 res7[3]; -+} /*__attribute__((__packed__))*/ S3C2443_CLOCK_POWER; -+ -+/* NAND FLASH (see S3C2443 manual chapter 7) */ -+typedef struct { -+ S3C24X0_REG32 NFCONF; -+ S3C24X0_REG32 NFCONT; -+ S3C24X0_REG32 NFCMD; -+ S3C24X0_REG32 NFADDR; -+ S3C24X0_REG32 NFDATA; -+ S3C24X0_REG32 NFMECCD0; -+ S3C24X0_REG32 NFMECCD1; -+ S3C24X0_REG32 NFSECCD; -+ S3C24X0_REG32 NFSBLK; -+ S3C24X0_REG32 NFEBLK; -+ S3C24X0_REG32 NFSTAT; -+ S3C24X0_REG32 NFECCERR0; -+ S3C24X0_REG32 NFECCERR1; -+ S3C24X0_REG32 NFMECC0; -+ S3C24X0_REG32 NFMECC1; -+ S3C24X0_REG32 NFSECC; -+ S3C24X0_REG32 NFMLCBITPT; -+} /*__attribute__((__packed__))*/ S3C2443_NAND; -+ -+/* STATIC MEMORY (see S3C2443 manual chapter 5) */ -+struct s3c2443_sm_bank { -+ S3C24X0_REG32 SMBIDCYR; -+ S3C24X0_REG32 SMBWSTRDR; -+ S3C24X0_REG32 SMBWSTWRR; -+ S3C24X0_REG32 SMBWSTOENR; -+ S3C24X0_REG32 SMBWSTWENR; -+ S3C24X0_REG32 SMBCR; -+ S3C24X0_REG32 SMBSR; -+ S3C24X0_REG32 SMBWSTBRDR; -+}; -+ -+typedef struct { -+ struct s3c2443_sm_bank bank[5]; /* 0x4f000000..0x4f0000bf */ -+ S3C24X0_REG32 res[0x40]; /* 0x4f0000c0..0x4f0000ff */ -+ S3C24X0_REG32 SMBONETYPER; -+ S3C24X0_REG32 SMCSR; -+ S3C24X0_REG32 SMCCR; -+} /*__attribute__((__packed__))*/ S3C2443_SMEM; -+ -+ -+/* MOBILE DRAM (see S3C2443 manual chapter 6) */ -+typedef struct { -+ S3C24X0_REG32 BANKCFG; -+ S3C24X0_REG32 BANKCON1; -+ S3C24X0_REG32 BANKCON2; -+ S3C24X0_REG32 BANKCON3; -+ S3C24X0_REG32 REFRESH; -+ S3C24X0_REG32 TIMEOUT; -+} /*__attribute__((__packed__))*/ S3C2443_MDRAM -+ -+#endif /* __S3C2443_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch deleted file mode 100644 index 09392ad2cf..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch +++ /dev/null @@ -1,1481 +0,0 @@ -Add support for the Samsung SMDK2440 development board - -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2035,6 +2035,9 @@ - smdk2410_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0 - -+smdk2440_config : unconfig -+ @$(MKCONFIG) $(@:_config=) arm arm920t smdk2440 NULL s3c24x0 -+ - SX1_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm925t sx1 - -Index: u-boot/include/configs/smdk2440.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/smdk2440.h -@@ -0,0 +1,296 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * Gary Jennejohn -+ * David Mueller -+ * -+ * Configuation settings for the SAMSUNG SMDK2440 board. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if 0 -+/* If we want to start u-boot from usb bootloader in NOR flash */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* If we want to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+#endif -+ -+#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ -+#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2440 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 16934400/* SMDK2440 has 16.9344MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -+#define CS8900_BASE 0x19000300 -+#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2440 */ -+#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS \ -+ (CONFIG_CMD_DFL | \ -+ /*CFG_CMD_BSP | */ \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_DATE | \ -+ /*CFG_CMD_DHCP | */ \ -+ CFG_CMD_DIAG | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_EXT2 | \ -+ CFG_CMD_FAT | \ -+ /*CFG_CMD_HWFLOW | */ \ -+ /* CFG_CMD_IDE | */ \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PING | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_USB) -+ -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC2,115200 loglevel=8" -+#define CONFIG_ETHADDR 00:0c:20:02:0a:5b -+#define CONFIG_NETMASK 255.255.255.0 -+#define CONFIG_IPADDR 192.168.1.100 -+#define CONFIG_SERVERIP 192.168.1.21 -+/*#define CONFIG_BOOTFILE "elinos-lart" */ -+//#define CONFIG_BOOTCOMMAND "nand read 0x32000000 0x34000 0x200000; bootm" -+#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x100000 0x200000; bootm" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "SMDK2440 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 32 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x32000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (512*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+/* IDE/ATA config */ -+ -+#if 0 -+#define CFG_IDE_MAXBUS 1 -+#define CFG_IDE_MAXDEVICE 2 -+#define CFG_IDE_PREINIT 0 -+ -+#define CFG_ATA_BASE_ADDR -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* FIC */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x511b /* SMDK2440 CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc." -+#define CONFIG_USBD_PRODUCT_NAME "S3C2440 Bootloader " U_BOOT_VERSION -+#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 -+#define CONFIG_USBD_DFU_INTERFACE 2 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+ -+#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -+ -+#define CFG_FLASH_BASE PHYS_FLASH_1 -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -+#if 0 -+#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -+#endif -+ -+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -+#ifdef CONFIG_AMD_LV800 -+#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -+#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -+#endif -+#ifdef CONFIG_AMD_LV400 -+#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -+#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -+#endif -+ -+/* timeout values are in ticks */ -+#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -+#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET_OOB 1 -+#define CFG_PREBOOT_OVERRIDE 1 -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+#define CONFIG_EXT2 1 -+ -+#define CONFIG_NEW_QT2440 0 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 1 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#endif -+ -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+//#define CONFIG_S3C2410_NAND_HWECC 1 -+ -+#define CFG_NAND_YAFFS_WRITE -+#define CFG_NAND_YAFFS1_NEW_OOB_LAYOUT -+ -+#define MTDIDS_DEFAULT "nand0=smdk2440-nand" -+#define MTPARTS_DEFAULT "smdk2440-nand:0x00100000(u-boot),0x00200000(kernel),0x00200000(update),0x00100000(splash),0x01400000(jffs2),-(temp)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "smdk2440-nand" -+#define CONFIG_NAND_DYNPART -+ -+#endif /* __CONFIG_H */ -Index: u-boot/include/configs/smdk2440nand.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/smdk2440nand.h -@@ -0,0 +1,47 @@ -+/* -+ * (C) Copyright 2004 -+ * Samsung Electronics : SW.LEE -+ * -+ * 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 __SMDK2440_NAND_H -+#define __SMDK2440_NAND_H -+ -+#define CFG_ENV_NAND_BLOCK 8 -+ -+#if 0 //old flash -+#define NAND_OOB_SIZE (16) -+#define NAND_PAGES_IN_BLOCK (32) -+#define NAND_PAGE_SIZE (512) -+ -+#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE*NAND_PAGES_IN_BLOCK) -+#define NAND_BLOCK_MASK (NAND_BLOCK_SIZE - 1) -+#define NAND_PAGE_MASK (NAND_PAGE_SIZE - 1) -+#else //new flash -+#define NAND_OOB_SIZE (64) -+#define NAND_PAGES_IN_BLOCK (64) -+#define NAND_PAGE_SIZE (2048) -+ -+#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE*NAND_PAGES_IN_BLOCK) -+#define NAND_BLOCK_MASK (NAND_BLOCK_SIZE - 1) -+#define NAND_PAGE_MASK (NAND_PAGE_SIZE - 1) -+ -+#endif -+ -+ -+ -+//#define NAND_3_ADDR_CYCLE 1 -+//#define S3C24X0_16BIT_NAND 1 -+ -+#ifdef KINGFISH -+#undef S3C24X0_16BIT_NAND -+#define S3C24X0_16BIT_NAND 1 -+#endif -+ -+#endif -+ -Index: u-boot/board/smdk2440/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/Makefile -@@ -0,0 +1,67 @@ -+# -+# (C) Copyright 2000-2006 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = $(obj)lib$(BOARD).a -+ -+COBJS := smdk2440.o flash.o udc.o -+SOBJS := lowlevel_init.o -+ -+.PHONY: all -+ -+all: $(LIB) lowlevel_foo.bin -+ -+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -+OBJS := $(addprefix $(obj),$(COBJS)) -+SOBJS := $(addprefix $(obj),$(SOBJS)) -+ -+$(LIB): $(obj).depend $(OBJS) $(SOBJS) -+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) -+ -+lowlevel_foo.o: lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds -+ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowlevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+# defines $(obj).depend target -+include $(SRCTREE)/rules.mk -+ -+sinclude $(obj).depend -+ -+######################################################################### -Index: u-boot/board/smdk2440/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/config.mk -@@ -0,0 +1,29 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# SAMSUNG SMDK2440 board with S3C2440 (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x511b -+CONFIG_USB_DFU_REVISION=0x0100 -+ -+# -+# SMDK2440 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -Index: u-boot/board/smdk2440/flash.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/flash.c -@@ -0,0 +1,433 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Alex Zuepke -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+ulong myflush (void); -+ -+ -+#define FLASH_BANK_SIZE PHYS_FLASH_SIZE -+#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ -+ -+flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -+ -+ -+#define CMD_READ_ARRAY 0x000000F0 -+#define CMD_UNLOCK1 0x000000AA -+#define CMD_UNLOCK2 0x00000055 -+#define CMD_ERASE_SETUP 0x00000080 -+#define CMD_ERASE_CONFIRM 0x00000030 -+#define CMD_PROGRAM 0x000000A0 -+#define CMD_UNLOCK_BYPASS 0x00000020 -+ -+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) -+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) -+ -+#define BIT_ERASE_DONE 0x00000080 -+#define BIT_RDY_MASK 0x00000080 -+#define BIT_PROGRAM_ERROR 0x00000020 -+#define BIT_TIMEOUT 0x80000000 /* our flag */ -+ -+#define READY 1 -+#define ERR 2 -+#define TMO 4 -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+ulong flash_init (void) -+{ -+ int i, j; -+ ulong size = 0; -+ -+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { -+ ulong flashbase = 0; -+ -+ flash_info[i].flash_id = -+#if defined(CONFIG_AMD_LV400) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV400B & FLASH_TYPEMASK); -+#elif defined(CONFIG_AMD_LV800) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV800B & FLASH_TYPEMASK); -+#else -+#error "Unknown flash configured" -+#endif -+ flash_info[i].size = FLASH_BANK_SIZE; -+ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; -+ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); -+ if (i == 0) -+ flashbase = PHYS_FLASH_1; -+ else -+ panic ("configured too many flash banks!\n"); -+ for (j = 0; j < flash_info[i].sector_count; j++) { -+ if (j <= 3) { -+ /* 1st one is 16 KB */ -+ if (j == 0) { -+ flash_info[i].start[j] = -+ flashbase + 0; -+ } -+ -+ /* 2nd and 3rd are both 8 KB */ -+ if ((j == 1) || (j == 2)) { -+ flash_info[i].start[j] = -+ flashbase + 0x4000 + (j - -+ 1) * -+ 0x2000; -+ } -+ -+ /* 4th 32 KB */ -+ if (j == 3) { -+ flash_info[i].start[j] = -+ flashbase + 0x8000; -+ } -+ } else { -+ flash_info[i].start[j] = -+ flashbase + (j - 3) * MAIN_SECT_SIZE; -+ } -+ } -+ size += flash_info[i].size; -+ } -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_FLASH_BASE, -+ CFG_FLASH_BASE + monitor_flash_len - 1, -+ &flash_info[0]); -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_ENV_ADDR, -+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); -+ -+ return size; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+void flash_print_info (flash_info_t * info) -+{ -+ int i; -+ -+ switch (info->flash_id & FLASH_VENDMASK) { -+ case (AMD_MANUFACT & FLASH_VENDMASK): -+ printf ("AMD: "); -+ break; -+ default: -+ printf ("Unknown Vendor "); -+ break; -+ } -+ -+ switch (info->flash_id & FLASH_TYPEMASK) { -+ case (AMD_ID_LV400B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV400BB (4Mbit)\n"); -+ break; -+ case (AMD_ID_LV800B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV800BB (8Mbit)\n"); -+ break; -+ default: -+ printf ("Unknown Chip Type\n"); -+ goto Done; -+ break; -+ } -+ -+ printf (" Size: %ld MB in %d Sectors\n", -+ info->size >> 20, info->sector_count); -+ -+ printf (" Sector Start Addresses:"); -+ for (i = 0; i < info->sector_count; i++) { -+ if ((i % 5) == 0) { -+ printf ("\n "); -+ } -+ printf (" %08lX%s", info->start[i], -+ info->protect[i] ? " (RO)" : " "); -+ } -+ printf ("\n"); -+ -+ Done:; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+int flash_erase (flash_info_t * info, int s_first, int s_last) -+{ -+ ushort result; -+ int iflag, cflag, prot, sect; -+ int rc = ERR_OK; -+ int chip; -+ -+ /* first look for protection bits */ -+ -+ if (info->flash_id == FLASH_UNKNOWN) -+ return ERR_UNKNOWN_FLASH_TYPE; -+ -+ if ((s_first < 0) || (s_first > s_last)) { -+ return ERR_INVAL; -+ } -+ -+ if ((info->flash_id & FLASH_VENDMASK) != -+ (AMD_MANUFACT & FLASH_VENDMASK)) { -+ return ERR_UNKNOWN_FLASH_VENDOR; -+ } -+ -+ prot = 0; -+ for (sect = s_first; sect <= s_last; ++sect) { -+ if (info->protect[sect]) { -+ prot++; -+ } -+ } -+ if (prot) -+ return ERR_PROTECTED; -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ /* Start erase on unprotected sectors */ -+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { -+ printf ("Erasing sector %2d ... ", sect); -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ if (info->protect[sect] == 0) { /* not protected */ -+ vu_short *addr = (vu_short *) (info->start[sect]); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ *addr = CMD_ERASE_CONFIRM; -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > -+ CFG_FLASH_ERASE_TOUT) { -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ chip = TMO; -+ break; -+ } -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_ERASE_DONE) -+ chip = READY; -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) -+ chip = ERR; -+ -+ } while (!chip); -+ -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ -+ if (chip == ERR) { -+ rc = ERR_PROG_ERROR; -+ goto outahere; -+ } -+ if (chip == TMO) { -+ rc = ERR_TIMOUT; -+ goto outahere; -+ } -+ -+ printf ("ok.\n"); -+ } else { /* it was protected */ -+ -+ printf ("protected!\n"); -+ } -+ } -+ -+ if (ctrlc ()) -+ printf ("User Interrupt!\n"); -+ -+ outahere: -+ /* allow flash to settle - wait 10 ms */ -+ udelay_masked (10000); -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash -+ */ -+ -+volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) -+{ -+ vu_short *addr = (vu_short *) dest; -+ ushort result; -+ int rc = ERR_OK; -+ int cflag, iflag; -+ int chip; -+ -+ /* -+ * Check if Flash is (sufficiently) erased -+ */ -+ result = *addr; -+ if ((result & data) != data) -+ return ERR_NOT_ERASED; -+ -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; -+ *addr = CMD_PROGRAM; -+ *addr = data; -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { -+ chip = ERR | TMO; -+ break; -+ } -+ if (!chip && ((result & 0x80) == (data & 0x80))) -+ chip = READY; -+ -+ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { -+ result = *addr; -+ -+ if ((result & 0x80) == (data & 0x80)) -+ chip = READY; -+ else -+ chip = ERR; -+ } -+ -+ } while (!chip); -+ -+ *addr = CMD_READ_ARRAY; -+ -+ if (chip == ERR || *addr != data) -+ rc = ERR_PROG_ERROR; -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash. -+ */ -+ -+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -+{ -+ ulong cp, wp; -+ int l; -+ int i, rc; -+ ushort data; -+ -+ wp = (addr & ~1); /* get lower word aligned address */ -+ -+ /* -+ * handle unaligned start bytes -+ */ -+ if ((l = addr - wp) != 0) { -+ data = 0; -+ for (i = 0, cp = wp; i < l; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ for (; i < 2 && cnt > 0; ++i) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ ++cp; -+ } -+ for (; cnt == 0 && i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ wp += 2; -+ } -+ -+ /* -+ * handle word aligned part -+ */ -+ while (cnt >= 2) { -+ data = *((vu_short *) src); -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ src += 2; -+ wp += 2; -+ cnt -= 2; -+ } -+ -+ if (cnt == 0) { -+ return ERR_OK; -+ } -+ -+ /* -+ * handle unaligned tail bytes -+ */ -+ data = 0; -+ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ } -+ for (; i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ return write_hword (info, wp, data); -+} -Index: u-boot/board/smdk2440/lowlevel_init.S -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/lowlevel_init.S -@@ -0,0 +1,167 @@ -+/* -+ * Memory Setup stuff - taken from blob memsetup.S -+ * -+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and -+ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * -+ * Modified for the Samsung SMDK2410 by -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x0 /* 2clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0x32 -+ .word 0x30 -+ .word 0x30 -Index: u-boot/board/smdk2440/smdk2440.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/smdk2440.c -@@ -0,0 +1,152 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Marius Groeger -+ * -+ * (C) Copyright 2002 -+ * David Mueller, ELSOFT AG, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#define FCLK_SPEED 1 -+ -+#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ -+#define M_MDIV 0xC3 -+#define M_PDIV 0x4 -+#define M_SDIV 0x1 -+#elif FCLK_SPEED==1 /* Fout = 399.65MHz */ -+#define M_MDIV 0x6e -+#define M_PDIV 0x3 -+#define M_SDIV 0x1 -+#endif -+ -+#define USB_CLOCK 1 -+ -+#if USB_CLOCK==0 -+#define U_M_MDIV 0xA1 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x1 -+#elif USB_CLOCK==1 -+#define U_M_MDIV 0x3c -+#define U_M_PDIV 0x4 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x002a9655; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFD95FFBA; -+ gpio->GPGUP = 0x0000FFFF; -+#ifdef CONFIG_SERIAL3 -+ gpio->GPHCON = 0x002AAAAA; -+#else -+ gpio->GPHCON = 0x002AFAAA; -+#endif -+ gpio->GPHUP = 0x000007FF; -+ -+ gpio->GPJCON = 0x2AAAAAA; -+ -+#if 0 -+ /* USB Device Part */ -+ /*GPGCON is reset for USB Device */ -+ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ -+ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ -+ -+ gpio->GPGDAT |= ( 1 << 12) ; -+ gpio->GPGDAT &= ~( 1 << 12) ; -+ udelay(20000); -+ gpio->GPGDAT |= ( 1 << 12) ; -+#endif -+ -+ /* arch number of SMDK2440-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_S3C2440; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. -+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 -+ images: 640*480*2*2 = 1228800 < 1245184. */ -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -+ -Index: u-boot/board/smdk2440/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/board/smdk2440/udc.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/udc.c -@@ -0,0 +1,23 @@ -+ -+#include -+#include -+#include -+ -+void udc_ctrl(enum usbd_event event, int param) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ switch (event) { -+ case UDC_CTRL_PULLUP_ENABLE: -+ if (param) -+ gpio->GPGDAT |= (1 << 12); -+ else -+ gpio->GPGDAT &= ~(1 << 12); -+ break; -+ case UDC_CTRL_500mA_ENABLE: -+ /* IGNORE */ -+ break; -+ default: -+ break; -+ } -+} -Index: u-boot/board/smdk2440/lowlevel_foo.S -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/lowlevel_foo.S -@@ -0,0 +1,82 @@ -+ -+_start: -+ b reset -+undefvec: -+ b undefvec -+swivec: -+ b swivec -+pabtvec: -+ b pabtvec -+dabtvec: -+ b dabtvec -+rsvdvec: -+ b rsvdvec -+irqvec: -+ b irqvec -+fiqvec: -+ b fiqvec -+ -+reset: -+ /* -+ * set the cpu to SVC32 mode -+ */ -+ mrs r0,cpsr -+ bic r0,r0,#0x1f -+ orr r0,r0,#0xd3 -+ msr cpsr,r0 -+ -+/* turn off the watchdog */ -+#define pWTCON 0x53000000 -+#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ -+#define INTSUBMSK 0x4A00001C -+#define CLKDIVN 0x4C000014 /* clock divisor register */ -+ -+ ldr r0, =pWTCON -+ mov r1, #0x0 -+ str r1, [r0] -+ -+ mov r1, #0xffffffff -+ ldr r0, =INTMSK -+ str r1, [r0] -+ ldr r1, =0x3ff -+ ldr r0, =INTSUBMSK -+ str r1, [r0] -+ -+ /* FCLK:HCLK:PCLK = 1:2:4 */ -+ /* default FCLK is 120 MHz ! */ -+ ldr r0, =CLKDIVN -+ mov r1, #3 -+ str r1, [r0] -+ -+ bl cpu_init_crit -+ ldr r0,=TEXT_BASE -+ mov pc, r0 -+ -+cpu_init_crit: -+ /* -+ * flush v4 I/D caches -+ */ -+ mov r0, #0 -+ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ -+ -+ /* -+ * disable MMU stuff and caches -+ */ -+ mrc p15, 0, r0, c1, c0, 0 -+ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) -+ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) -+ orr r0, r0, #0x00000002 @ set bit 2 (A) Align -+ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache -+ mcr p15, 0, r0, c1, c0, 0 -+ -+ /* -+ * before relocating, we have to setup RAM timing -+ * because memory timing is board-dependend, you will -+ * find a lowlevel_init.S in your board directory. -+ */ -+ mov ip, lr -+ bl lowlevel_init -+ mov lr, ip -+ mov pc, lr -+ -Index: u-boot/board/smdk2440/lowlevel_foo.lds -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2440/lowlevel_foo.lds -@@ -0,0 +1,56 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ lowlevel_foo.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch deleted file mode 100644 index 5757cc078b..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch +++ /dev/null @@ -1,1411 +0,0 @@ -Index: u-boot/Makefile -=================================================================== ---- u-boot.orig/Makefile -+++ u-boot/Makefile -@@ -2045,6 +2045,9 @@ - smdk2440_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t smdk2440 NULL s3c24x0 - -+smdk2443_config : unconfig -+ @$(MKCONFIG) $(@:_config=) arm arm920t smdk2443 NULL s3c24x0 -+ - SX1_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm925t sx1 - -Index: u-boot/board/smdk2443/Makefile -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/Makefile -@@ -0,0 +1,67 @@ -+# -+# (C) Copyright 2000-2006 -+# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License as -+# published by the Free Software Foundation; either version 2 of -+# the License, or (at your option) any later version. -+# -+# 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 $(TOPDIR)/config.mk -+ -+LIB = $(obj)lib$(BOARD).a -+ -+COBJS := smdk2443.o flash.o udc.o -+SOBJS := lowlevel_init.o -+ -+.PHONY: all -+ -+all: $(LIB) lowlevel_foo.bin -+ -+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -+OBJS := $(addprefix $(obj),$(COBJS)) -+SOBJS := $(addprefix $(obj),$(SOBJS)) -+ -+$(LIB): $(obj).depend $(OBJS) $(SOBJS) -+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) -+ -+lowlevel_foo.o: lowlevel_foo.S -+ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ -+ -o lowlevel_foo.o lowlevel_foo.S -+ -+lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds -+ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ -+ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo -+ -+lowlevel_foo.bin: lowlevel_foo -+ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ -+ lowlevel_foo lowlevel_foo.bin -+ -+clean: -+ rm -f $(SOBJS) $(OBJS) -+ -+distclean: clean -+ rm -f $(LIB) core *.bak .depend -+ -+######################################################################### -+ -+# defines $(obj).depend target -+include $(SRCTREE)/rules.mk -+ -+sinclude $(obj).depend -+ -+######################################################################### -Index: u-boot/board/smdk2443/smdk2443.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/smdk2443.c -@@ -0,0 +1,147 @@ -+/* -+ * (C) Copyright 2006 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#define FCLK_SPEED 1 -+ -+#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ -+#define M_MDIV 0xC3 -+#define M_PDIV 0x4 -+#define M_SDIV 0x1 -+#elif FCLK_SPEED==1 /* Fout = 399.65MHz */ -+#define M_MDIV 0x6e -+#define M_PDIV 0x3 -+#define M_SDIV 0x1 -+#endif -+ -+#define USB_CLOCK 1 -+ -+#if USB_CLOCK==0 -+#define U_M_MDIV 0xA1 -+#define U_M_PDIV 0x3 -+#define U_M_SDIV 0x1 -+#elif USB_CLOCK==1 -+#define U_M_MDIV 0x3c -+#define U_M_PDIV 0x4 -+#define U_M_SDIV 0x2 -+#endif -+ -+static inline void delay (unsigned long loops) -+{ -+ __asm__ volatile ("1:\n" -+ "subs %0, %1, #1\n" -+ "bne 1b":"=r" (loops):"0" (loops)); -+} -+ -+/* -+ * Miscellaneous platform dependent initialisations -+ */ -+ -+int board_init (void) -+{ -+ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ /* to reduce PLL lock time, adjust the LOCKTIME register */ -+ clk_power->LOCKTIME = 0xFFFFFF; -+ -+ /* configure MPLL */ -+ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (4000); -+ -+ /* configure UPLL */ -+ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); -+ -+ /* some delay between MPLL and UPLL */ -+ delay (8000); -+ -+ /* set up the I/O ports */ -+ gpio->GPACON = 0x007FFFFF; -+ gpio->GPBCON = 0x00044555; -+ gpio->GPBUP = 0x000007FF; -+ gpio->GPCCON = 0xAAAAAAAA; -+ gpio->GPCUP = 0x0000FFFF; -+ gpio->GPDCON = 0xAAAAAAAA; -+ gpio->GPDUP = 0x0000FFFF; -+ gpio->GPECON = 0xAAAAAAAA; -+ gpio->GPEUP = 0x0000FFFF; -+ gpio->GPFCON = 0x000055AA; -+ gpio->GPFUP = 0x000000FF; -+ gpio->GPGCON = 0xFD95FFBA; -+ gpio->GPGUP = 0x0000FFFF; -+#ifdef CONFIG_SERIAL3 -+ gpio->GPHCON = 0x002AAAAA; -+#else -+ gpio->GPHCON = 0x002AFAAA; -+#endif -+ gpio->GPHUP = 0x000007FF; -+ -+#if 0 -+ /* USB Device Part */ -+ /*GPGCON is reset for USB Device */ -+ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ -+ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ -+ -+ gpio->GPGDAT |= ( 1 << 12) ; -+ gpio->GPGDAT &= ~( 1 << 12) ; -+ udelay(20000); -+ gpio->GPGDAT |= ( 1 << 12) ; -+#endif -+ -+ /* arch number of SMDK2440-Board */ -+ gd->bd->bi_arch_number = MACH_TYPE_S3C2440; -+ -+ /* adress of boot parameters */ -+ gd->bd->bi_boot_params = 0x30000100; -+ -+ icache_enable(); -+ dcache_enable(); -+ -+ return 0; -+} -+ -+int dram_init (void) -+{ -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+ -+ return 0; -+} -+ -+/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. -+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 -+ images: 640*480*2*2 = 1228800 < 1245184. */ -+ -+unsigned int dynpart_size[] = { -+ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; -+ -+char *dynpart_names[] = { -+ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; -+ -+ -Index: u-boot/board/smdk2443/u-boot.lds -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/u-boot.lds -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ cpu/arm920t/start.o (.text) -+ cpu/arm920t/s3c24x0/nand_read.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/include/configs/smdk2443.h -=================================================================== ---- /dev/null -+++ u-boot/include/configs/smdk2443.h -@@ -0,0 +1,289 @@ -+/* -+ * (C) Copyright 2007 OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * Configuation settings for the SAMSUNG SMDK2443 board. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 __CONFIG_H -+#define __CONFIG_H -+ -+#if 0 -+/* If we want to start u-boot from usb bootloader in NOR flash */ -+#define CONFIG_SKIP_RELOCATE_UBOOT 1 -+#define CONFIG_SKIP_LOWLEVEL_INIT 1 -+#else -+/* If we want to start u-boot directly from within NAND flash */ -+#define CONFIG_LL_INIT_NAND_ONLY -+#define CONFIG_S3C2410_NAND_BOOT 1 -+#define CONFIG_S3C2410_NAND_SKIP_BAD 1 -+#endif -+ -+#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ -+ -+/* -+ * High Level Configuration Options -+ * (easy to change) -+ */ -+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ -+#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ -+#define CONFIG_SMDK2443 1 /* on a SAMSUNG SMDK2440 Board */ -+ -+/* input clock of PLL */ -+#define CONFIG_SYS_CLK_FREQ 16934400/* SMDK2440 has 16.9344MHz input clock */ -+ -+ -+#define USE_920T_MMU 1 -+#define CONFIG_USE_IRQ 1 -+ -+/* -+ * Size of malloc() pool -+ */ -+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) -+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ -+ -+/* -+ * Hardware drivers -+ */ -+#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ -+#define CS8900_BASE 0x19000300 -+#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ -+ -+/* -+ * select serial console configuration -+ */ -+#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2440 */ -+#define CONFIG_HWFLOW 1 -+ -+/************************************************************ -+ * RTC -+ ************************************************************/ -+#define CONFIG_RTC_S3C24X0 1 -+ -+/* allow to overwrite serial and ethaddr */ -+#define CONFIG_ENV_OVERWRITE -+ -+#define CONFIG_BAUDRATE 115200 -+ -+/*********************************************************** -+ * Command definition -+ ***********************************************************/ -+#define CONFIG_COMMANDS \ -+ (CONFIG_CMD_DFL | \ -+ /*CFG_CMD_BSP | */ \ -+ CFG_CMD_CACHE | \ -+ CFG_CMD_DATE | \ -+ /*CFG_CMD_DHCP | */ \ -+ CFG_CMD_DIAG | \ -+ CFG_CMD_ELF | \ -+ CFG_CMD_EXT2 | \ -+ CFG_CMD_FAT | \ -+ /*CFG_CMD_HWFLOW | */ \ -+ /* CFG_CMD_IDE | */ \ -+ /* CFG_CMD_IRQ | */ \ -+ CFG_CMD_JFFS2 | \ -+ CFG_CMD_MMC | \ -+ CFG_CMD_NAND | \ -+ CFG_CMD_PING | \ -+ CFG_CMD_PORTIO | \ -+ CFG_CMD_REGINFO | \ -+ CFG_CMD_SAVES | \ -+ CFG_CMD_LICENSE | \ -+ CFG_CMD_USB) -+ -+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -+#include -+ -+#define CONFIG_BOOTDELAY 3 -+#define CONFIG_BOOTARGS "root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC2,115200 loglevel=8" -+#define CONFIG_ETHADDR 00:0c:20:02:0a:5b -+#define CONFIG_NETMASK 255.255.255.0 -+#define CONFIG_IPADDR 192.168.1.100 -+#define CONFIG_SERVERIP 192.168.1.21 -+#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x100000 0x200000; bootm" -+ -+#define CONFIG_DOS_PARTITION 1 -+ -+#if (CONFIG_COMMANDS & CFG_CMD_KGDB) -+#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ -+/* what's this ? it's not used anywhere */ -+#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ -+#endif -+ -+/* -+ * Miscellaneous configurable options -+ */ -+#define CFG_LONGHELP /* undef to save memory */ -+#define CFG_PROMPT "SMDK2443 # " /* Monitor Command Prompt */ -+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ -+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ -+#define CFG_MAXARGS 32 /* max number of command args */ -+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ -+ -+#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ -+#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ -+ -+#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ -+ -+#define CFG_LOAD_ADDR 0x32000000 /* default load address */ -+ -+/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ -+/* it to wrap 100 times (total 1562500) to get 1 sec. */ -+#define CFG_HZ 1562500 -+ -+/* valid baudrates */ -+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -+ -+/*----------------------------------------------------------------------- -+ * Stack sizes -+ * -+ * The stack sizes are set up in start.S using the settings below -+ */ -+#define CONFIG_STACKSIZE (512*1024) /* regular stack */ -+#ifdef CONFIG_USE_IRQ -+#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ -+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ -+#endif -+ -+/* IDE/ATA config */ -+ -+#if 0 -+#define CFG_IDE_MAXBUS 1 -+#define CFG_IDE_MAXDEVICE 2 -+#define CFG_IDE_PREINIT 0 -+ -+#define CFG_ATA_BASE_ADDR -+#endif -+ -+#define CONFIG_USB_OHCI 1 -+ -+#define CONFIG_USB_DEVICE 1 -+#define CONFIG_USB_TTY 1 -+#define CFG_CONSOLE_IS_IN_ENV 1 -+#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "FiWin" -+#define CONFIG_USBD_PRODUCT_NAME "S3C2443 Bootloader " U_BOOT_VERSION -+#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" -+#define CONFIG_USBD_DFU 1 -+#define CONFIG_USBD_DFU_XFER_SIZE 4096 -+#define CONFIG_USBD_DFU_INTERFACE 2 -+ -+/*----------------------------------------------------------------------- -+ * Physical Memory Map -+ */ -+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -+#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ -+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ -+ -+#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -+ -+#define CFG_FLASH_BASE PHYS_FLASH_1 -+ -+/*----------------------------------------------------------------------- -+ * FLASH and environment organization -+ */ -+ -+#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ -+#if 0 -+#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ -+#endif -+ -+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ -+#ifdef CONFIG_AMD_LV800 -+#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ -+#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ -+#endif -+#ifdef CONFIG_AMD_LV400 -+#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ -+#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ -+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ -+#endif -+ -+/* timeout values are in ticks */ -+#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ -+#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ -+ -+#define CFG_ENV_IS_IN_NAND 1 -+#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ -+#define CFG_ENV_OFFSET_OOB 1 -+#define CFG_PREBOOT_OVERRIDE 1 -+ -+#define NAND_MAX_CHIPS 1 -+#define CFG_NAND_BASE 0x4e000000 -+#define CFG_MAX_NAND_DEVICE 1 -+ -+#define CONFIG_MMC 1 -+#define CFG_MMC_BASE 0xff000000 -+ -+#define CONFIG_EXT2 1 -+ -+/* FAT driver in u-boot is broken currently */ -+#define CONFIG_FAT 1 -+#define CONFIG_SUPPORT_VFAT -+ -+#if 1 -+/* JFFS2 driver */ -+#define CONFIG_JFFS2_CMDLINE 1 -+#define CONFIG_JFFS2_NAND 1 -+#define CONFIG_JFFS2_NAND_DEV 0 -+//#define CONFIG_JFFS2_NAND_OFF 0x634000 -+//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 -+#endif -+ -+/* ATAG configuration */ -+#define CONFIG_INITRD_TAG 1 -+#define CONFIG_SETUP_MEMORY_TAGS 1 -+#define CONFIG_CMDLINE_TAG 1 -+#if 0 -+#define CONFIG_SERIAL_TAG 1 -+#define CONFIG_REVISION_TAG 1 -+#endif -+ -+ -+#if 0 -+#define CONFIG_VIDEO -+#define CONFIG_VIDEO_S3C2410 -+#define CONFIG_CFB_CONSOLE -+#define CONFIG_VIDEO_LOGO -+#define CONFIG_VGA_AS_SINGLE_DEVICE -+ -+#define VIDEO_KBD_INIT_FCT 0 -+#define VIDEO_TSTC_FCT serial_tstc -+#define VIDEO_GETC_FCT serial_getc -+ -+#define LCD_VIDEO_ADDR 0x33d00000 -+#endif -+ -+#define CONFIG_S3C2410_NAND_BBT 1 -+//#define CONFIG_S3C2410_NAND_HWECC 1 -+ -+#define CFG_NAND_YAFFS_WRITE -+#define CFG_NAND_YAFFS1_NEW_OOB_LAYOUT -+ -+#define MTDIDS_DEFAULT "nand0=smdk2443-nand" -+#define MTPARTS_DEFAULT "smdk2443-nand:0x00100000(u-boot),0x00200000(kernel),0x00200000(update),0x00100000(splash),0x01400000(jffs2),-(temp)" -+#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "smdk2443-nand" -+#define CONFIG_NAND_DYNPART -+ -+#endif /* __CONFIG_H */ -Index: u-boot/board/smdk2443/lowlevel_foo.S -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/lowlevel_foo.S -@@ -0,0 +1,82 @@ -+ -+_start: -+ b reset -+undefvec: -+ b undefvec -+swivec: -+ b swivec -+pabtvec: -+ b pabtvec -+dabtvec: -+ b dabtvec -+rsvdvec: -+ b rsvdvec -+irqvec: -+ b irqvec -+fiqvec: -+ b fiqvec -+ -+reset: -+ /* -+ * set the cpu to SVC32 mode -+ */ -+ mrs r0,cpsr -+ bic r0,r0,#0x1f -+ orr r0,r0,#0xd3 -+ msr cpsr,r0 -+ -+/* turn off the watchdog */ -+#define pWTCON 0x53000000 -+#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ -+#define INTSUBMSK 0x4A00001C -+#define CLKDIVN 0x4C000014 /* clock divisor register */ -+ -+ ldr r0, =pWTCON -+ mov r1, #0x0 -+ str r1, [r0] -+ -+ mov r1, #0xffffffff -+ ldr r0, =INTMSK -+ str r1, [r0] -+ ldr r1, =0x3ff -+ ldr r0, =INTSUBMSK -+ str r1, [r0] -+ -+ /* FCLK:HCLK:PCLK = 1:2:4 */ -+ /* default FCLK is 120 MHz ! */ -+ ldr r0, =CLKDIVN -+ mov r1, #3 -+ str r1, [r0] -+ -+ bl cpu_init_crit -+ ldr r0,=TEXT_BASE -+ mov pc, r0 -+ -+cpu_init_crit: -+ /* -+ * flush v4 I/D caches -+ */ -+ mov r0, #0 -+ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ -+ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ -+ -+ /* -+ * disable MMU stuff and caches -+ */ -+ mrc p15, 0, r0, c1, c0, 0 -+ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) -+ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) -+ orr r0, r0, #0x00000002 @ set bit 2 (A) Align -+ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache -+ mcr p15, 0, r0, c1, c0, 0 -+ -+ /* -+ * before relocating, we have to setup RAM timing -+ * because memory timing is board-dependend, you will -+ * find a lowlevel_init.S in your board directory. -+ */ -+ mov ip, lr -+ bl lowlevel_init -+ mov lr, ip -+ mov pc, lr -+ -Index: u-boot/board/smdk2443/lowlevel_init.S -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/lowlevel_init.S -@@ -0,0 +1,163 @@ -+/* -+ * SMDK2443 Memory Setup -+ * -+ * Copyright (C) 2007 by OpenMoko, Inc. -+ * Author: Harald Welte -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+#include -+ -+ -+/* some parameters for the board */ -+ -+/* -+ * -+ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S -+ * -+ * Copyright (C) 2002 Samsung Electronics SW.LEE -+ * -+ */ -+ -+#define BWSCON 0x48000000 -+ -+/* BWSCON */ -+#define DW8 (0x0) -+#define DW16 (0x1) -+#define DW32 (0x2) -+#define WAIT (0x1<<2) -+#define UBLB (0x1<<3) -+ -+#define B1_BWSCON (DW32) -+#define B2_BWSCON (DW16) -+#define B3_BWSCON (DW16 + WAIT + UBLB) -+#define B4_BWSCON (DW16) -+#define B5_BWSCON (DW16) -+#define B6_BWSCON (DW32) -+#define B7_BWSCON (DW32) -+ -+/* BANK0CON */ -+#define B0_Tacs 0x0 /* 0clk */ -+#define B0_Tcos 0x0 /* 0clk */ -+#define B0_Tacc 0x7 /* 14clk */ -+#define B0_Tcoh 0x0 /* 0clk */ -+#define B0_Tah 0x0 /* 0clk */ -+#define B0_Tacp 0x0 -+#define B0_PMC 0x0 /* normal */ -+ -+/* BANK1CON */ -+#define B1_Tacs 0x0 /* 0clk */ -+#define B1_Tcos 0x0 /* 0clk */ -+#define B1_Tacc 0x7 /* 14clk */ -+#define B1_Tcoh 0x0 /* 0clk */ -+#define B1_Tah 0x0 /* 0clk */ -+#define B1_Tacp 0x0 -+#define B1_PMC 0x0 -+ -+#define B2_Tacs 0x0 -+#define B2_Tcos 0x0 -+#define B2_Tacc 0x7 -+#define B2_Tcoh 0x0 -+#define B2_Tah 0x0 -+#define B2_Tacp 0x0 -+#define B2_PMC 0x0 -+ -+#define B3_Tacs 0x0 /* 0clk */ -+#define B3_Tcos 0x3 /* 4clk */ -+#define B3_Tacc 0x7 /* 14clk */ -+#define B3_Tcoh 0x1 /* 1clk */ -+#define B3_Tah 0x0 /* 0clk */ -+#define B3_Tacp 0x3 /* 6clk */ -+#define B3_PMC 0x0 /* normal */ -+ -+#define B4_Tacs 0x0 /* 0clk */ -+#define B4_Tcos 0x0 /* 0clk */ -+#define B4_Tacc 0x7 /* 14clk */ -+#define B4_Tcoh 0x0 /* 0clk */ -+#define B4_Tah 0x0 /* 0clk */ -+#define B4_Tacp 0x0 -+#define B4_PMC 0x0 /* normal */ -+ -+#define B5_Tacs 0x0 /* 0clk */ -+#define B5_Tcos 0x0 /* 0clk */ -+#define B5_Tacc 0x7 /* 14clk */ -+#define B5_Tcoh 0x0 /* 0clk */ -+#define B5_Tah 0x0 /* 0clk */ -+#define B5_Tacp 0x0 -+#define B5_PMC 0x0 /* normal */ -+ -+#define B6_MT 0x3 /* SDRAM */ -+#define B6_Trcd 0x1 -+#define B6_SCAN 0x1 /* 9bit */ -+ -+#define B7_MT 0x3 /* SDRAM */ -+#define B7_Trcd 0x1 /* 3clk */ -+#define B7_SCAN 0x1 /* 9bit */ -+ -+/* REFRESH parameter */ -+#define REFEN 0x1 /* Refresh enable */ -+#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ -+#define Trp 0x0 /* 2clk */ -+#define Trc 0x3 /* 7clk */ -+#define Tchr 0x2 /* 3clk */ -+#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ -+/**************************************/ -+ -+_TEXT_BASE: -+ .word TEXT_BASE -+ -+.globl lowlevel_init -+lowlevel_init: -+ /* memory control configuration */ -+ /* make r0 relative the current location so that it */ -+ /* reads SMRDATA out of FLASH rather than memory ! */ -+ ldr r0, =SMRDATA -+ ldr r1, _TEXT_BASE -+ sub r0, r0, r1 -+ ldr r1, =BWSCON /* Bus Width Status Controller */ -+ add r2, r0, #13*4 -+0: -+ ldr r3, [r0], #4 -+ str r3, [r1], #4 -+ cmp r2, r0 -+ bne 0b -+ -+ /* everything is fine now */ -+ mov pc, lr -+ -+ .ltorg -+/* the literal pools origin */ -+ -+SMRDATA: -+ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) -+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) -+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) -+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) -+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) -+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) -+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) -+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) -+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) -+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) -+ .word 0x32 -+ .word 0x30 -+ .word 0x30 -Index: u-boot/board/smdk2443/config.mk -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/config.mk -@@ -0,0 +1,29 @@ -+# -+# (C) Copyright 2002 -+# Gary Jennejohn, DENX Software Engineering, -+# David Mueller, ELSOFT AG, -+# -+# SAMSUNG SMDK2443 board with S3C2443 (ARM920T) cpu -+# -+# see http://www.samsung.com/ for more information on SAMSUNG -+# -+ -+CONFIG_USB_DFU_VENDOR=0x1457 -+CONFIG_USB_DFU_PRODUCT=0x511c -+CONFIG_USB_DFU_REVISION=0x0100 -+ -+# -+# SMDK2443 has 1 bank of 64 MB DRAM -+# -+# 3000'0000 to 3400'0000 -+# -+# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -+# optionally with a ramdisk at 3080'0000 -+# -+# we load ourself to 33F8'0000 -+# -+# download area is 3300'0000 -+# -+ -+ -+TEXT_BASE = 0x33F80000 -Index: u-boot/board/smdk2443/lowlevel_foo.lds -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/lowlevel_foo.lds -@@ -0,0 +1,56 @@ -+/* -+ * (C) Copyright 2002 -+ * Gary Jennejohn, DENX Software Engineering, -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ */ -+ -+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -+OUTPUT_ARCH(arm) -+ENTRY(_start) -+SECTIONS -+{ -+ . = 0x00000000; -+ -+ . = ALIGN(4); -+ .text : -+ { -+ lowlevel_foo.o (.text) -+ *(.text) -+ } -+ -+ . = ALIGN(4); -+ .rodata : { *(.rodata) } -+ -+ . = ALIGN(4); -+ .data : { *(.data) } -+ -+ . = ALIGN(4); -+ .got : { *(.got) } -+ -+ . = .; -+ __u_boot_cmd_start = .; -+ .u_boot_cmd : { *(.u_boot_cmd) } -+ __u_boot_cmd_end = .; -+ -+ . = ALIGN(4); -+ __bss_start = .; -+ .bss : { *(.bss) } -+ _end = .; -+} -Index: u-boot/board/smdk2443/flash.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/flash.c -@@ -0,0 +1,433 @@ -+/* -+ * (C) Copyright 2002 -+ * Sysgo Real-Time Solutions, GmbH -+ * Alex Zuepke -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * 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 -+ -+ulong myflush (void); -+ -+ -+#define FLASH_BANK_SIZE PHYS_FLASH_SIZE -+#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ -+ -+flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; -+ -+ -+#define CMD_READ_ARRAY 0x000000F0 -+#define CMD_UNLOCK1 0x000000AA -+#define CMD_UNLOCK2 0x00000055 -+#define CMD_ERASE_SETUP 0x00000080 -+#define CMD_ERASE_CONFIRM 0x00000030 -+#define CMD_PROGRAM 0x000000A0 -+#define CMD_UNLOCK_BYPASS 0x00000020 -+ -+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) -+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) -+ -+#define BIT_ERASE_DONE 0x00000080 -+#define BIT_RDY_MASK 0x00000080 -+#define BIT_PROGRAM_ERROR 0x00000020 -+#define BIT_TIMEOUT 0x80000000 /* our flag */ -+ -+#define READY 1 -+#define ERR 2 -+#define TMO 4 -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+ulong flash_init (void) -+{ -+ int i, j; -+ ulong size = 0; -+ -+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { -+ ulong flashbase = 0; -+ -+ flash_info[i].flash_id = -+#if defined(CONFIG_AMD_LV400) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV400B & FLASH_TYPEMASK); -+#elif defined(CONFIG_AMD_LV800) -+ (AMD_MANUFACT & FLASH_VENDMASK) | -+ (AMD_ID_LV800B & FLASH_TYPEMASK); -+#else -+#error "Unknown flash configured" -+#endif -+ flash_info[i].size = FLASH_BANK_SIZE; -+ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; -+ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); -+ if (i == 0) -+ flashbase = PHYS_FLASH_1; -+ else -+ panic ("configured too many flash banks!\n"); -+ for (j = 0; j < flash_info[i].sector_count; j++) { -+ if (j <= 3) { -+ /* 1st one is 16 KB */ -+ if (j == 0) { -+ flash_info[i].start[j] = -+ flashbase + 0; -+ } -+ -+ /* 2nd and 3rd are both 8 KB */ -+ if ((j == 1) || (j == 2)) { -+ flash_info[i].start[j] = -+ flashbase + 0x4000 + (j - -+ 1) * -+ 0x2000; -+ } -+ -+ /* 4th 32 KB */ -+ if (j == 3) { -+ flash_info[i].start[j] = -+ flashbase + 0x8000; -+ } -+ } else { -+ flash_info[i].start[j] = -+ flashbase + (j - 3) * MAIN_SECT_SIZE; -+ } -+ } -+ size += flash_info[i].size; -+ } -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_FLASH_BASE, -+ CFG_FLASH_BASE + monitor_flash_len - 1, -+ &flash_info[0]); -+ -+ flash_protect (FLAG_PROTECT_SET, -+ CFG_ENV_ADDR, -+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); -+ -+ return size; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+void flash_print_info (flash_info_t * info) -+{ -+ int i; -+ -+ switch (info->flash_id & FLASH_VENDMASK) { -+ case (AMD_MANUFACT & FLASH_VENDMASK): -+ printf ("AMD: "); -+ break; -+ default: -+ printf ("Unknown Vendor "); -+ break; -+ } -+ -+ switch (info->flash_id & FLASH_TYPEMASK) { -+ case (AMD_ID_LV400B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV400BB (4Mbit)\n"); -+ break; -+ case (AMD_ID_LV800B & FLASH_TYPEMASK): -+ printf ("1x Amd29LV800BB (8Mbit)\n"); -+ break; -+ default: -+ printf ("Unknown Chip Type\n"); -+ goto Done; -+ break; -+ } -+ -+ printf (" Size: %ld MB in %d Sectors\n", -+ info->size >> 20, info->sector_count); -+ -+ printf (" Sector Start Addresses:"); -+ for (i = 0; i < info->sector_count; i++) { -+ if ((i % 5) == 0) { -+ printf ("\n "); -+ } -+ printf (" %08lX%s", info->start[i], -+ info->protect[i] ? " (RO)" : " "); -+ } -+ printf ("\n"); -+ -+ Done:; -+} -+ -+/*----------------------------------------------------------------------- -+ */ -+ -+int flash_erase (flash_info_t * info, int s_first, int s_last) -+{ -+ ushort result; -+ int iflag, cflag, prot, sect; -+ int rc = ERR_OK; -+ int chip; -+ -+ /* first look for protection bits */ -+ -+ if (info->flash_id == FLASH_UNKNOWN) -+ return ERR_UNKNOWN_FLASH_TYPE; -+ -+ if ((s_first < 0) || (s_first > s_last)) { -+ return ERR_INVAL; -+ } -+ -+ if ((info->flash_id & FLASH_VENDMASK) != -+ (AMD_MANUFACT & FLASH_VENDMASK)) { -+ return ERR_UNKNOWN_FLASH_VENDOR; -+ } -+ -+ prot = 0; -+ for (sect = s_first; sect <= s_last; ++sect) { -+ if (info->protect[sect]) { -+ prot++; -+ } -+ } -+ if (prot) -+ return ERR_PROTECTED; -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ /* Start erase on unprotected sectors */ -+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { -+ printf ("Erasing sector %2d ... ", sect); -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ if (info->protect[sect] == 0) { /* not protected */ -+ vu_short *addr = (vu_short *) (info->start[sect]); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ *addr = CMD_ERASE_CONFIRM; -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > -+ CFG_FLASH_ERASE_TOUT) { -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ chip = TMO; -+ break; -+ } -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_ERASE_DONE) -+ chip = READY; -+ -+ if (!chip -+ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) -+ chip = ERR; -+ -+ } while (!chip); -+ -+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; -+ -+ if (chip == ERR) { -+ rc = ERR_PROG_ERROR; -+ goto outahere; -+ } -+ if (chip == TMO) { -+ rc = ERR_TIMOUT; -+ goto outahere; -+ } -+ -+ printf ("ok.\n"); -+ } else { /* it was protected */ -+ -+ printf ("protected!\n"); -+ } -+ } -+ -+ if (ctrlc ()) -+ printf ("User Interrupt!\n"); -+ -+ outahere: -+ /* allow flash to settle - wait 10 ms */ -+ udelay_masked (10000); -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash -+ */ -+ -+volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) -+{ -+ vu_short *addr = (vu_short *) dest; -+ ushort result; -+ int rc = ERR_OK; -+ int cflag, iflag; -+ int chip; -+ -+ /* -+ * Check if Flash is (sufficiently) erased -+ */ -+ result = *addr; -+ if ((result & data) != data) -+ return ERR_NOT_ERASED; -+ -+ -+ /* -+ * Disable interrupts which might cause a timeout -+ * here. Remember that our exception vectors are -+ * at address 0 in the flash, and we don't want a -+ * (ticker) exception to happen while the flash -+ * chip is in programming mode. -+ */ -+ cflag = icache_status (); -+ icache_disable (); -+ iflag = disable_interrupts (); -+ -+ MEM_FLASH_ADDR1 = CMD_UNLOCK1; -+ MEM_FLASH_ADDR2 = CMD_UNLOCK2; -+ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; -+ *addr = CMD_PROGRAM; -+ *addr = data; -+ -+ /* arm simple, non interrupt dependent timer */ -+ reset_timer_masked (); -+ -+ /* wait until flash is ready */ -+ chip = 0; -+ do { -+ result = *addr; -+ -+ /* check timeout */ -+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { -+ chip = ERR | TMO; -+ break; -+ } -+ if (!chip && ((result & 0x80) == (data & 0x80))) -+ chip = READY; -+ -+ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { -+ result = *addr; -+ -+ if ((result & 0x80) == (data & 0x80)) -+ chip = READY; -+ else -+ chip = ERR; -+ } -+ -+ } while (!chip); -+ -+ *addr = CMD_READ_ARRAY; -+ -+ if (chip == ERR || *addr != data) -+ rc = ERR_PROG_ERROR; -+ -+ if (iflag) -+ enable_interrupts (); -+ -+ if (cflag) -+ icache_enable (); -+ -+ return rc; -+} -+ -+/*----------------------------------------------------------------------- -+ * Copy memory to flash. -+ */ -+ -+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -+{ -+ ulong cp, wp; -+ int l; -+ int i, rc; -+ ushort data; -+ -+ wp = (addr & ~1); /* get lower word aligned address */ -+ -+ /* -+ * handle unaligned start bytes -+ */ -+ if ((l = addr - wp) != 0) { -+ data = 0; -+ for (i = 0, cp = wp; i < l; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ for (; i < 2 && cnt > 0; ++i) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ ++cp; -+ } -+ for (; cnt == 0 && i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ wp += 2; -+ } -+ -+ /* -+ * handle word aligned part -+ */ -+ while (cnt >= 2) { -+ data = *((vu_short *) src); -+ if ((rc = write_hword (info, wp, data)) != 0) { -+ return (rc); -+ } -+ src += 2; -+ wp += 2; -+ cnt -= 2; -+ } -+ -+ if (cnt == 0) { -+ return ERR_OK; -+ } -+ -+ /* -+ * handle unaligned tail bytes -+ */ -+ data = 0; -+ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { -+ data = (data >> 8) | (*src++ << 8); -+ --cnt; -+ } -+ for (; i < 2; ++i, ++cp) { -+ data = (data >> 8) | (*(uchar *) cp << 8); -+ } -+ -+ return write_hword (info, wp, data); -+} -Index: u-boot/board/smdk2443/udc.c -=================================================================== ---- /dev/null -+++ u-boot/board/smdk2443/udc.c -@@ -0,0 +1,23 @@ -+ -+#include -+#include -+#include -+ -+void udc_ctrl(enum usbd_event event, int param) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+ switch (event) { -+ case UDC_CTRL_PULLUP_ENABLE: -+ if (param) -+ gpio->GPGDAT |= (1 << 12); -+ else -+ gpio->GPGDAT &= ~(1 << 12); -+ break; -+ case UDC_CTRL_500mA_ENABLE: -+ /* IGNORE */ -+ break; -+ default: -+ break; -+ } -+} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch deleted file mode 100644 index a88e94b006..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch +++ /dev/null @@ -1,43 +0,0 @@ -Make simple_strtoul work with upper-case hex numbers. - -Signed-off-by: Harald Welte - -Index: u-boot/lib_generic/vsprintf.c -=================================================================== ---- u-boot.orig/lib_generic/vsprintf.c -+++ u-boot/lib_generic/vsprintf.c -@@ -25,21 +25,22 @@ unsigned long simple_strtoul(const char - { - unsigned long result = 0,value; - -- if (*cp == '0') { -- cp++; -- if ((*cp == 'x') && isxdigit(cp[1])) { -- base = 16; -- cp++; -- } -- if (!base) { -- base = 8; -- } -- } - if (!base) { - base = 10; -+ if (*cp == '0') { -+ base = 8; -+ cp++; -+ if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { -+ cp++; -+ base = 16; -+ } -+ } -+ } else if (base == 16) { -+ if (cp[0] == '0' && toupper(cp[1]) == 'X') -+ cp += 2; - } -- while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) -- ? toupper(*cp) : *cp)-'A'+10) < base) { -+ while (isxdigit(*cp) && -+ (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { - result = result*base + value; - cp++; - } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch deleted file mode 100644 index 722a227aa6..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch +++ /dev/null @@ -1,1607 +0,0 @@ -This patch adds cdc_acm interoperability to u-boot usbtty. - -It was taken (almost blindly) from the Linux for Siemens SX1 project on -handhelds.org. Please don't complain to me about coding style issues -or whitespace changes in this one - HW. - -Index: u-boot/drivers/usbtty.c -=================================================================== ---- u-boot.orig/drivers/usbtty.c 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/drivers/usbtty.c 2007-02-08 21:11:55.000000000 +0100 -@@ -1,6 +1,9 @@ - /* - * (C) Copyright 2003 - * Gerry Hamel, geh@ti.com, Texas Instruments -+ * -+ * (C) Copyright 2006 -+ * Bryan O'Donoghue, bodonoghue codehermit.ie - * - * 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 -@@ -22,26 +25,61 @@ - - #ifdef CONFIG_USB_TTY - -+#include - #include - #include - #include "usbtty.h" -+#include "usb_cdc_acm.h" -+#include "usbdescriptors.h" -+#include /* If defined, override Linux identifiers with -+ * vendor specific ones */ - - #if 0 --#define TTYDBG(fmt,args...) serial_printf("[%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args) -+//+++ debug print into memory buffer,like kernel log -+static char* log_buf = 0x10e00000; // somewhere in RAM -+static char log_str[512]; -+#define TTYDBG(fmt,args...)\ -+ sprintf(log_str,"\n[%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args);\ -+ memcpy(log_buf, log_str, strlen(log_str));\ -+ log_buf+=strlen(log_str);\ -+ strcpy(log_buf,"\n---------------------------------------------------")\ -+//--- - #else - #define TTYDBG(fmt,args...) do{}while(0) - #endif - - #if 0 --#define TTYERR(fmt,args...) serial_printf("ERROR![%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args) -+#define TTYDBG(fmt,args...)\ -+ serial_printf("[%s] %s %d: "fmt"\n", __FILE__,__FUNCTION__,__LINE__,##args) -+#endif -+ -+#if 0 -+#define TTYERR(fmt,args...)\ -+ serial_printf("ERROR![%s] %s %d: "fmt"\n", __FILE__,__FUNCTION__,\ -+ __LINE__,##args) - #else - #define TTYERR(fmt,args...) do{}while(0) - #endif - - /* -+ * Defines -+ */ -+#define NUM_CONFIGS 1 -+#define MAX_INTERFACES 2 -+#define NUM_ENDPOINTS 3 -+#define ACM_TX_ENDPOINT 3 -+#define ACM_RX_ENDPOINT 2 -+#define GSERIAL_TX_ENDPOINT 2 -+#define GSERIAL_RX_ENDPOINT 1 -+#define NUM_ACM_INTERFACES 2 -+#define NUM_GSERIAL_INTERFACES 1 -+#define CONFIG_USBD_DATA_INTERFACE_STR "Bulk Data Interface" -+#define CONFIG_USBD_CTRL_INTERFACE_STR "Control Interface" -+ -+/* - * Buffers to hold input and output data - */ --#define USBTTY_BUFFER_SIZE 256 -+#define USBTTY_BUFFER_SIZE 2048 - static circbuf_t usbtty_input; - static circbuf_t usbtty_output; - -@@ -50,157 +88,336 @@ - * Instance variables - */ - static device_t usbttydev; --static struct usb_device_instance device_instance[1]; --static struct usb_bus_instance bus_instance[1]; -+static struct usb_device_instance device_instance[1]; -+static struct usb_bus_instance bus_instance[1]; - static struct usb_configuration_instance config_instance[NUM_CONFIGS]; --static struct usb_interface_instance interface_instance[NUM_INTERFACES]; --static struct usb_alternate_instance alternate_instance[NUM_INTERFACES]; --static struct usb_endpoint_instance endpoint_instance[NUM_ENDPOINTS+1]; /* one extra for control endpoint */ -- --/* -- * Static allocation of urbs -- */ --#define RECV_ENDPOINT 1 --#define TX_ENDPOINT 2 -+static struct usb_interface_instance interface_instance[MAX_INTERFACES]; -+static struct usb_alternate_instance alternate_instance[MAX_INTERFACES]; -+/* one extra for control endpoint */ -+static struct usb_endpoint_instance endpoint_instance[NUM_ENDPOINTS+1]; - - /* - * Global flag - */ - int usbtty_configured_flag = 0; - -- - /* - * Serial number - */ - static char serial_number[16]; - -+ - /* -- * Descriptors -+ * Descriptors, Strings, Local variables. - */ -+ -+/* defined and used by usbdcore_ep0.c */ -+extern struct usb_string_descriptor **usb_strings; -+ -+/* Indicies, References */ -+static unsigned short rx_endpoint = 0; -+static unsigned short tx_endpoint = 0; -+static unsigned short interface_count = 0; -+static struct usb_string_descriptor *usbtty_string_table[STR_COUNT]; -+ -+/* USB Descriptor Strings */ - static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4}; - static u8 wstrManufacturer[2 + 2*(sizeof(CONFIG_USBD_MANUFACTURER)-1)]; - static u8 wstrProduct[2 + 2*(sizeof(CONFIG_USBD_PRODUCT_NAME)-1)]; - static u8 wstrSerial[2 + 2*(sizeof(serial_number) - 1)]; - static u8 wstrConfiguration[2 + 2*(sizeof(CONFIG_USBD_CONFIGURATION_STR)-1)]; --static u8 wstrInterface[2 + 2*(sizeof(CONFIG_USBD_INTERFACE_STR)-1)]; -- --static struct usb_string_descriptor *usbtty_string_table[] = { -- (struct usb_string_descriptor*)wstrLang, -- (struct usb_string_descriptor*)wstrManufacturer, -- (struct usb_string_descriptor*)wstrProduct, -- (struct usb_string_descriptor*)wstrSerial, -- (struct usb_string_descriptor*)wstrConfiguration, -- (struct usb_string_descriptor*)wstrInterface --}; --extern struct usb_string_descriptor **usb_strings; /* defined and used by omap1510_ep0.c */ -+static u8 wstrDataInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; -+static u8 wstrCtrlInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; - -+/* Standard USB Data Structures */ -+static struct usb_interface_descriptor interface_descriptors[MAX_INTERFACES]; -+static struct usb_endpoint_descriptor *ep_descriptor_ptrs[NUM_ENDPOINTS]; -+static struct usb_configuration_descriptor *configuration_descriptor = 0; - static struct usb_device_descriptor device_descriptor = { -- bLength: sizeof(struct usb_device_descriptor), -- bDescriptorType: USB_DT_DEVICE, -- bcdUSB: USB_BCD_VERSION, -- bDeviceClass: USBTTY_DEVICE_CLASS, -- bDeviceSubClass: USBTTY_DEVICE_SUBCLASS, -- bDeviceProtocol: USBTTY_DEVICE_PROTOCOL, -- bMaxPacketSize0: EP0_MAX_PACKET_SIZE, -- idVendor: CONFIG_USBD_VENDORID, -- idProduct: CONFIG_USBD_PRODUCTID, -- bcdDevice: USBTTY_BCD_DEVICE, -- iManufacturer: STR_MANUFACTURER, -- iProduct: STR_PRODUCT, -- iSerialNumber: STR_SERIAL, -- bNumConfigurations: NUM_CONFIGS -- }; --static struct usb_configuration_descriptor config_descriptors[NUM_CONFIGS] = { -- { -- bLength: sizeof(struct usb_configuration_descriptor), -- bDescriptorType: USB_DT_CONFIG, -- wTotalLength: (sizeof(struct usb_configuration_descriptor)*NUM_CONFIGS) + -- (sizeof(struct usb_interface_descriptor)*NUM_INTERFACES) + -- (sizeof(struct usb_endpoint_descriptor)*NUM_ENDPOINTS), -- bNumInterfaces: NUM_INTERFACES, -- bConfigurationValue: 1, -- iConfiguration: STR_CONFIG, -- bmAttributes: BMATTRIBUTE_SELF_POWERED | BMATTRIBUTE_RESERVED, -- bMaxPower: USBTTY_MAXPOWER -- }, --}; --static struct usb_interface_descriptor interface_descriptors[NUM_INTERFACES] = { -- { -- bLength: sizeof(struct usb_interface_descriptor), -- bDescriptorType: USB_DT_INTERFACE, -- bInterfaceNumber: 0, -- bAlternateSetting: 0, -- bNumEndpoints: NUM_ENDPOINTS, -- bInterfaceClass: USBTTY_INTERFACE_CLASS, -- bInterfaceSubClass: USBTTY_INTERFACE_SUBCLASS, -- bInterfaceProtocol: USBTTY_INTERFACE_PROTOCOL, -- iInterface: STR_INTERFACE -- }, -+ .bLength = sizeof(struct usb_device_descriptor), -+ .bDescriptorType = USB_DT_DEVICE, -+ .bcdUSB = cpu_to_le16(USB_BCD_VERSION), -+ .bDeviceSubClass = 0x00, -+ .bDeviceProtocol = 0x00, -+ .bMaxPacketSize0 = EP0_MAX_PACKET_SIZE, -+ .idVendor = cpu_to_le16(CONFIG_USBD_VENDORID), -+ .bcdDevice = cpu_to_le16(USBTTY_BCD_DEVICE), -+ .iManufacturer = STR_MANUFACTURER, -+ .iProduct = STR_PRODUCT, -+ .iSerialNumber = STR_SERIAL, -+ .bNumConfigurations = NUM_CONFIGS - }; --static struct usb_endpoint_descriptor ep_descriptors[NUM_ENDPOINTS] = { -- { -- bLength: sizeof(struct usb_endpoint_descriptor), -- bDescriptorType: USB_DT_ENDPOINT, -- bEndpointAddress: CONFIG_USBD_SERIAL_OUT_ENDPOINT | USB_DIR_OUT, -- bmAttributes: USB_ENDPOINT_XFER_BULK, -- wMaxPacketSize: CONFIG_USBD_SERIAL_OUT_PKTSIZE, -- bInterval: 0 -- }, -- { -- bLength: sizeof(struct usb_endpoint_descriptor), -- bDescriptorType: USB_DT_ENDPOINT, -- bEndpointAddress: CONFIG_USBD_SERIAL_IN_ENDPOINT | USB_DIR_IN, -- bmAttributes: USB_ENDPOINT_XFER_BULK, -- wMaxPacketSize: CONFIG_USBD_SERIAL_IN_PKTSIZE, -- bInterval: 0 -- }, -- { -- bLength: sizeof(struct usb_endpoint_descriptor), -- bDescriptorType: USB_DT_ENDPOINT, -- bEndpointAddress: CONFIG_USBD_SERIAL_INT_ENDPOINT | USB_DIR_IN, -- bmAttributes: USB_ENDPOINT_XFER_INT, -- wMaxPacketSize: CONFIG_USBD_SERIAL_INT_PKTSIZE, -- bInterval: 0 -- }, --}; --static struct usb_endpoint_descriptor *ep_descriptor_ptrs[NUM_ENDPOINTS] = { -- &(ep_descriptors[0]), -- &(ep_descriptors[1]), -- &(ep_descriptors[2]), -+ -+ -+/* -+ * Static CDC ACM specific descriptors -+ */ -+ -+struct acm_config_desc { -+ struct usb_configuration_descriptor configuration_desc; -+ -+ /* Master Interface */ -+ struct usb_interface_descriptor interface_desc; -+ -+ struct usb_class_header_function_descriptor usb_class_header; -+ struct usb_class_call_management_descriptor usb_class_call_mgt; -+ struct usb_class_abstract_control_descriptor usb_class_acm; -+ struct usb_class_union_function_descriptor usb_class_union; -+ struct usb_endpoint_descriptor notification_endpoint; -+ -+ /* Slave Interface */ -+ struct usb_interface_descriptor data_class_interface; -+ struct usb_endpoint_descriptor -+ data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed)); -+} __attribute__((packed)); -+ -+static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { -+ { -+ .configuration_desc ={ -+ .bLength = -+ sizeof(struct usb_configuration_descriptor), -+ .bDescriptorType = USB_DT_CONFIG, -+ .wTotalLength = -+ cpu_to_le16(sizeof(struct acm_config_desc)), -+ .bNumInterfaces = NUM_ACM_INTERFACES, -+ .bConfigurationValue = 1, -+ .iConfiguration = STR_CONFIG, -+ .bmAttributes = -+ BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, -+ .bMaxPower = USBTTY_MAXPOWER -+ }, -+ /* Interface 1 */ -+ .interface_desc = { -+ .bLength = sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0, -+ .bAlternateSetting = 0, -+ .bNumEndpoints = 0x01, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_CONTROL, -+ .bInterfaceSubClass = COMMUNICATIONS_ACM_SUBCLASS, -+ .bInterfaceProtocol = COMMUNICATIONS_V25TER_PROTOCOL, -+ .iInterface = STR_CTRL_INTERFACE, -+ }, -+ .usb_class_header = { -+ .bFunctionLength = -+ sizeof(struct usb_class_header_function_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_HEADER, -+ .bcdCDC = cpu_to_le16(110), -+ }, -+ .usb_class_call_mgt = { -+ .bFunctionLength = -+ sizeof(struct usb_class_call_management_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_CMF, -+ .bmCapabilities = 0x00, -+ .bDataInterface = 0x01, -+ }, -+ .usb_class_acm = { -+ .bFunctionLength = -+ sizeof(struct usb_class_abstract_control_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_ACMF, -+ .bmCapabilities = 0x00, -+ }, -+ .usb_class_union = { -+ .bFunctionLength = -+ sizeof(struct usb_class_union_function_descriptor), -+ .bDescriptorType = CS_INTERFACE, -+ .bDescriptorSubtype = USB_ST_UF, -+ .bMasterInterface = 0x00, -+ .bSlaveInterface0 = 0x01, -+ }, -+ .notification_endpoint = { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x01 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_INT, -+ .wMaxPacketSize -+ = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ -+ /* Interface 2 */ -+ .data_class_interface = { -+ .bLength = -+ sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0x01, -+ .bAlternateSetting = 0x00, -+ .bNumEndpoints = 0x02, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_DATA, -+ .bInterfaceSubClass = DATA_INTERFACE_SUBCLASS_NONE, -+ .bInterfaceProtocol = DATA_INTERFACE_PROTOCOL_NONE, -+ .iInterface = STR_DATA_INTERFACE, -+ }, -+ .data_endpoints = { -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x02 | USB_DIR_OUT, -+ .bmAttributes = -+ USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x03 | USB_DIR_IN, -+ .bmAttributes = -+ USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ }, -+ }, -+}; -+ -+static struct rs232_emu rs232_desc={ -+ .dter = 115200, -+ .stop_bits = 0x00, -+ .parity = 0x00, -+ .data_bits = 0x08 - }; - --/* utility function for converting char* to wide string used by USB */ --static void str2wide (char *str, u16 * wide) --{ -- int i; - -- for (i = 0; i < strlen (str) && str[i]; i++) -- wide[i] = (u16) str[i]; --} -+/* -+ * Static Generic Serial specific data -+ */ -+ -+ -+struct gserial_config_desc { -+ -+ struct usb_configuration_descriptor configuration_desc; -+ struct usb_interface_descriptor -+ interface_desc[NUM_GSERIAL_INTERFACES] __attribute__((packed)); -+ struct usb_endpoint_descriptor -+ data_endpoints[NUM_ENDPOINTS] __attribute__((packed)); -+ -+} __attribute__((packed)); -+ -+static struct gserial_config_desc -+gserial_configuration_descriptors[NUM_CONFIGS] ={ -+ { -+ .configuration_desc ={ -+ .bLength = sizeof(struct usb_configuration_descriptor), -+ .bDescriptorType = USB_DT_CONFIG, -+ .wTotalLength = -+ cpu_to_le16(sizeof(struct gserial_config_desc)), -+ .bNumInterfaces = NUM_GSERIAL_INTERFACES, -+ .bConfigurationValue = 1, -+ .iConfiguration = STR_CONFIG, -+ .bmAttributes = -+ BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, -+ .bMaxPower = USBTTY_MAXPOWER -+ }, -+ .interface_desc = { -+ { -+ .bLength = -+ sizeof(struct usb_interface_descriptor), -+ .bDescriptorType = USB_DT_INTERFACE, -+ .bInterfaceNumber = 0, -+ .bAlternateSetting = 0, -+ .bNumEndpoints = NUM_ENDPOINTS, -+ .bInterfaceClass = -+ COMMUNICATIONS_INTERFACE_CLASS_VENDOR, -+ .bInterfaceSubClass = -+ COMMUNICATIONS_NO_SUBCLASS, -+ .bInterfaceProtocol = -+ COMMUNICATIONS_NO_PROTOCOL, -+ .iInterface = STR_DATA_INTERFACE -+ }, -+ }, -+ .data_endpoints = { -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x01 | USB_DIR_OUT, -+ .bmAttributes = USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE), -+ .bInterval= 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x02 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_BULK, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ { -+ .bLength = -+ sizeof(struct usb_endpoint_descriptor), -+ .bDescriptorType = USB_DT_ENDPOINT, -+ .bEndpointAddress = 0x03 | USB_DIR_IN, -+ .bmAttributes = USB_ENDPOINT_XFER_INT, -+ .wMaxPacketSize = -+ cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), -+ .bInterval = 0xFF, -+ }, -+ }, -+ }, -+}; - - /* -- * Prototypes -+ * Static Function Prototypes - */ -+ - static void usbtty_init_strings (void); - static void usbtty_init_instances (void); - static void usbtty_init_endpoints (void); -- -+static void usbtty_init_terminal_type(short type); - static void usbtty_event_handler (struct usb_device_instance *device, -- usb_device_event_t event, int data); -+ usb_device_event_t event, int data); -+static int usbtty_cdc_setup(struct usb_device_request *request, -+ struct urb *urb); - static int usbtty_configured (void); -- - static int write_buffer (circbuf_t * buf); - static int fill_buffer (circbuf_t * buf); - - void usbtty_poll (void); --static void pretend_interrupts (void); - -+/* utility function for converting char* to wide string used by USB */ -+static void str2wide (char *str, u16 * wide) -+{ -+ int i; -+ for (i = 0; i < strlen (str) && str[i]; i++){ -+ #if defined(__LITTLE_ENDIAN) -+ wide[i] = (u16) str[i]; -+ #elif defined(__BIG_ENDIAN) -+ wide[i] = ((u16)(str[i])<<8); -+ #else -+ #error "__LITTLE_ENDIAN or __BIG_ENDIAN undefined" -+ #endif -+ } -+} - - /* - * Test whether a character is in the RX buffer - */ -+ - int usbtty_tstc (void) - { -+ struct usb_endpoint_instance *endpoint = -+ &endpoint_instance[rx_endpoint]; -+ -+ /* If no input data exists, allow more RX to be accepted */ -+ if(usbtty_input.size <= 0){ -+ udc_unset_nak(endpoint->endpoint_address&0x03); -+ } -+ - usbtty_poll (); - return (usbtty_input.size > 0); - } -@@ -210,15 +427,21 @@ - * otherwise. When the function is succesfull, the character read is - * written into its argument c. - */ -+ - int usbtty_getc (void) - { - char c; -+ struct usb_endpoint_instance *endpoint = -+ &endpoint_instance[rx_endpoint]; - - while (usbtty_input.size <= 0) { -+ udc_unset_nak(endpoint->endpoint_address&0x03); - usbtty_poll (); - } - - buf_pop (&usbtty_input, &c, 1); -+ udc_set_nak(endpoint->endpoint_address&0x03); -+ - return c; - } - -@@ -238,7 +461,6 @@ - } - } - -- - /* usbtty_puts() helper function for finding the next '\n' in a string */ - static int next_nl_pos (const char *s) - { -@@ -252,8 +474,9 @@ - } - - /* -- * Output a string to the usb client port. -+ * Output a string to the usb client port - implementing flow control - */ -+ - static void __usbtty_puts (const char *str, int len) - { - int maxlen = usbtty_output.totalsize; -@@ -261,22 +484,19 @@ - - /* break str into chunks < buffer size, if needed */ - while (len > 0) { -- space = maxlen - usbtty_output.size; -+ usbtty_poll (); - -+ space = maxlen - usbtty_output.size; - /* Empty buffer here, if needed, to ensure space... */ -- if (space <= 0) { -+ if (space) { - write_buffer (&usbtty_output); -- space = maxlen - usbtty_output.size; -- if (space <= 0) { -- space = len; /* allow old data to be overwritten. */ -- } -- } -- -- n = MIN (space, MIN (len, maxlen)); -- buf_push (&usbtty_output, str, n); -+ -+ n = MIN (space, MIN (len, maxlen)); -+ buf_push (&usbtty_output, str, n); - -- str += n; -- len -= n; -+ str += n; -+ len -= n; -+ } - } - } - -@@ -313,8 +533,10 @@ - { - int rc; - char * sn; -+ char * tt; - int snlen; - -+ /* Get serial number */ - if (!(sn = getenv("serial#"))) { - sn = "000000000000"; - } -@@ -327,6 +549,14 @@ - memcpy (serial_number, sn, snlen); - serial_number[snlen] = '\0'; - -+ /* Decide on which type of UDC device to be. -+ */ -+ -+ if(!(tt = getenv("usbtty"))) { -+ tt = "generic"; -+ } -+ usbtty_init_terminal_type(strcmp(tt,"cdc_acm")); -+ - /* prepare buffers... */ - buf_init (&usbtty_input, USBTTY_BUFFER_SIZE); - buf_init (&usbtty_output, USBTTY_BUFFER_SIZE); -@@ -337,7 +567,7 @@ - usbtty_init_strings (); - usbtty_init_instances (); - -- udc_startup_events (device_instance); /* Enable our device, initialize udc pointers */ -+ udc_startup_events (device_instance);/* Enable dev, init udc pointers */ - udc_connect (); /* Enable pullup for host detection */ - - usbtty_init_endpoints (); -@@ -362,34 +592,52 @@ - { - struct usb_string_descriptor *string; - -+ usbtty_string_table[STR_LANG] = -+ (struct usb_string_descriptor*)wstrLang; -+ - string = (struct usb_string_descriptor *) wstrManufacturer; -- string->bLength = sizeof (wstrManufacturer); -+ string->bLength = sizeof(wstrManufacturer); - string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_MANUFACTURER, string->wData); -+ usbtty_string_table[STR_MANUFACTURER]=string; -+ - - string = (struct usb_string_descriptor *) wstrProduct; -- string->bLength = sizeof (wstrProduct); -+ string->bLength = sizeof(wstrProduct); - string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_PRODUCT_NAME, string->wData); -+ usbtty_string_table[STR_PRODUCT]=string; -+ - - string = (struct usb_string_descriptor *) wstrSerial; -- string->bLength = 2 + 2*strlen(serial_number); -+ string->bLength = sizeof(serial_number); - string->bDescriptorType = USB_DT_STRING; - str2wide (serial_number, string->wData); -+ usbtty_string_table[STR_SERIAL]=string; -+ - - string = (struct usb_string_descriptor *) wstrConfiguration; -- string->bLength = sizeof (wstrConfiguration); -+ string->bLength = sizeof(wstrConfiguration); - string->bDescriptorType = USB_DT_STRING; - str2wide (CONFIG_USBD_CONFIGURATION_STR, string->wData); -+ usbtty_string_table[STR_CONFIG]=string; -+ -+ -+ string = (struct usb_string_descriptor *) wstrDataInterface; -+ string->bLength = sizeof(wstrDataInterface); -+ string->bDescriptorType = USB_DT_STRING; -+ str2wide (CONFIG_USBD_DATA_INTERFACE_STR, string->wData); -+ usbtty_string_table[STR_DATA_INTERFACE]=string; - -- string = (struct usb_string_descriptor *) wstrInterface; -- string->bLength = sizeof (wstrInterface); -+ string = (struct usb_string_descriptor *) wstrCtrlInterface; -+ string->bLength = sizeof(wstrCtrlInterface); - string->bDescriptorType = USB_DT_STRING; -- str2wide (CONFIG_USBD_INTERFACE_STR, string->wData); -+ str2wide (CONFIG_USBD_CTRL_INTERFACE_STR, string->wData); -+ usbtty_string_table[STR_CTRL_INTERFACE]=string; - - /* Now, initialize the string table for ep0 handling */ - usb_strings = usbtty_string_table; --} -+} - - static void usbtty_init_instances (void) - { -@@ -400,6 +648,7 @@ - device_instance->device_state = STATE_INIT; - device_instance->device_descriptor = &device_descriptor; - device_instance->event = usbtty_event_handler; -+ device_instance->cdc_recv_setup = usbtty_cdc_setup; - device_instance->bus = bus_instance; - device_instance->configurations = NUM_CONFIGS; - device_instance->configuration_instance_array = config_instance; -@@ -415,8 +664,8 @@ - /* configuration instance */ - memset (config_instance, 0, - sizeof (struct usb_configuration_instance)); -- config_instance->interfaces = NUM_INTERFACES; -- config_instance->configuration_descriptor = config_descriptors; -+ config_instance->interfaces = interface_count; -+ config_instance->configuration_descriptor = configuration_descriptor; - config_instance->interface_instance_array = interface_instance; - - /* interface instance */ -@@ -447,17 +696,22 @@ - sizeof (struct usb_endpoint_instance)); - - endpoint_instance[i].endpoint_address = -- ep_descriptors[i - 1].bEndpointAddress; -+ ep_descriptor_ptrs[i - 1]->bEndpointAddress; - -- endpoint_instance[i].rcv_packetSize = -- ep_descriptors[i - 1].wMaxPacketSize; - endpoint_instance[i].rcv_attributes = -- ep_descriptors[i - 1].bmAttributes; -+ ep_descriptor_ptrs[i - 1]->bmAttributes; -+ -+ endpoint_instance[i].rcv_packetSize = -+ le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize); -+ -+ endpoint_instance[i].tx_attributes = -+ ep_descriptor_ptrs[i - 1]->bmAttributes; - - endpoint_instance[i].tx_packetSize = -- ep_descriptors[i - 1].wMaxPacketSize; -+ le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize); -+ - endpoint_instance[i].tx_attributes = -- ep_descriptors[i - 1].bmAttributes; -+ ep_descriptor_ptrs[i - 1]->bmAttributes; - - urb_link_init (&endpoint_instance[i].rcv); - urb_link_init (&endpoint_instance[i].rdy); -@@ -480,13 +734,79 @@ - int i; - - bus_instance->max_endpoints = NUM_ENDPOINTS + 1; -- for (i = 0; i <= NUM_ENDPOINTS; i++) { -+ for (i = 1; i <= NUM_ENDPOINTS; i++) { - udc_setup_ep (device_instance, i, &endpoint_instance[i]); - } - } - -+/* usbtty_init_terminal_type -+ * -+ * Do some late binding for our device type. -+ */ -+static void usbtty_init_terminal_type(short type) -+{ -+ switch(type){ -+ /* CDC ACM */ -+ case 0: -+ /* Assign endpoint descriptors */ -+ ep_descriptor_ptrs[0] = -+ &acm_configuration_descriptors[0].notification_endpoint; -+ ep_descriptor_ptrs[1] = -+ &acm_configuration_descriptors[0].data_endpoints[0]; -+ ep_descriptor_ptrs[2] = -+ &acm_configuration_descriptors[0].data_endpoints[1]; -+ -+ /* Enumerate Device Descriptor */ -+ device_descriptor.bDeviceClass = -+ COMMUNICATIONS_DEVICE_CLASS; -+ device_descriptor.idProduct = -+ cpu_to_le16(CONFIG_USBD_PRODUCTID_CDCACM); -+ -+ /* Assign endpoint indices */ -+ tx_endpoint = ACM_TX_ENDPOINT; -+ rx_endpoint = ACM_RX_ENDPOINT; -+ -+ /* Configuration Descriptor */ -+ configuration_descriptor = -+ (struct usb_configuration_descriptor*) -+ &acm_configuration_descriptors; -+ -+ /* Interface count */ -+ interface_count = NUM_ACM_INTERFACES; -+ break; -+ -+ /* BULK IN/OUT & Default */ -+ case 1: -+ default: -+ /* Assign endpoint descriptors */ -+ ep_descriptor_ptrs[0] = -+ &gserial_configuration_descriptors[0].data_endpoints[0]; -+ ep_descriptor_ptrs[1] = -+ &gserial_configuration_descriptors[0].data_endpoints[1]; -+ ep_descriptor_ptrs[2] = -+ &gserial_configuration_descriptors[0].data_endpoints[2]; -+ -+ /* Enumerate Device Descriptor */ -+ device_descriptor.bDeviceClass = 0xFF; -+ device_descriptor.idProduct = -+ cpu_to_le16(CONFIG_USBD_PRODUCTID_GSERIAL); -+ -+ /* Assign endpoint indices */ -+ tx_endpoint = GSERIAL_TX_ENDPOINT; -+ rx_endpoint = GSERIAL_RX_ENDPOINT; -+ -+ /* Configuration Descriptor */ -+ configuration_descriptor = -+ (struct usb_configuration_descriptor*) -+ &gserial_configuration_descriptors; -+ -+ /* Interface count */ -+ interface_count = NUM_GSERIAL_INTERFACES; -+ break; -+ } -+} - --/*********************************************************************************/ -+/******************************************************************************/ - - static struct urb *next_urb (struct usb_device_instance *device, - struct usb_endpoint_instance *endpoint) -@@ -522,82 +842,179 @@ - - static int write_buffer (circbuf_t * buf) - { -- if (!usbtty_configured ()) { -- return 0; -- } -+ if (!usbtty_configured ()) { -+ return 0; -+ } -+ -+ if (buf->size) { -+ -+ struct usb_endpoint_instance *endpoint = -+ &endpoint_instance[tx_endpoint]; -+ struct urb *current_urb = NULL; -+ char *dest; -+ -+ int space_avail; -+ int popnum, popped; -+ int total = 0; -+ -+ /* Break buffer into urb sized pieces, and link each to the endpoint */ -+ while (buf->size > 0) { -+ TTYDBG ("buf->size= %d",buf->size); -+ current_urb = next_urb (device_instance, endpoint); -+ if (!current_urb) { -+ TTYDBG ("current_urb is NULL, buf->size %d\n", -+ buf->size); -+ return total; -+ } -+ -+ dest = current_urb->buffer + -+ current_urb->actual_length; -+ -+ space_avail = -+ current_urb->buffer_length - -+ current_urb->actual_length; -+ TTYDBG ("space_avail= %d",space_avail); -+ popnum = MIN (space_avail, buf->size); -+ if (popnum == 0) -+ break; -+ -+ popped = buf_pop (buf, dest, popnum); -+ TTYDBG ("popped= %d, %s",popped, dest); -+ if (popped == 0) -+ break; -+ current_urb->actual_length += popped; -+ total += popped; -+ -+ /* If endpoint->last == 0, then transfers have not started on this endpoint */ -+ if (endpoint->last == 0) { -+ udc_endpoint_write (endpoint); -+ } -+ -+ } /* end while */ -+ TTYDBG (" total= %d",total); -+ return total; -+ } /* end if tx_urb */ - -- if (buf->size) { -+ return 0; -+} -+// static int write_buffer (circbuf_t * buf) -+// { -+// if (!usbtty_configured ()) { -+// return 0; -+// } -+// -+// struct usb_endpoint_instance *endpoint = -+// &endpoint_instance[tx_endpoint]; -+// struct urb *current_urb = NULL; -+// -+// current_urb = next_urb (device_instance, endpoint); -+// /* TX data still exists - send it now -+// */ -+// if(endpoint->sent < current_urb->actual_length){ -+// if(udc_endpoint_write (endpoint)){ -+// /* Write pre-empted by RX */ -+// return -1; -+// } -+// } -+// -+// if (buf->size) { -+// char *dest; -+// -+// int space_avail; -+// int popnum, popped; -+// int total = 0; -+// -+// /* Break buffer into urb sized pieces, -+// * and link each to the endpoint -+// */ -+// while (buf->size > 0) { -+// -+// if (!current_urb) { -+// TTYERR ("current_urb is NULL, buf->size %d\n", -+// buf->size); -+// return total; -+// } -+// -+// dest = (char*)current_urb->buffer + -+// current_urb->actual_length; -+// -+// space_avail = -+// current_urb->buffer_length - -+// current_urb->actual_length; -+// popnum = MIN (space_avail, buf->size); -+// if (popnum == 0) -+// break; -+// -+// popped = buf_pop (buf, dest, popnum); -+// if (popped == 0) -+// break; -+// current_urb->actual_length += popped; -+// total += popped; -+// -+// /* If endpoint->last == 0, then transfers have -+// * not started on this endpoint -+// */ -+// if (endpoint->last == 0) { -+// if(udc_endpoint_write (endpoint)){ -+// /* Write pre-empted by RX */ -+// return -1; -+// } -+// } -+// -+// }/* end while */ -+// return total; -+// } -+// -+// return 0; -+// } - -- struct usb_endpoint_instance *endpoint = -- &endpoint_instance[TX_ENDPOINT]; -- struct urb *current_urb = NULL; -- char *dest; -- -- int space_avail; -- int popnum, popped; -- int total = 0; -- -- /* Break buffer into urb sized pieces, and link each to the endpoint */ -- while (buf->size > 0) { -- current_urb = next_urb (device_instance, endpoint); -- if (!current_urb) { -- TTYERR ("current_urb is NULL, buf->size %d\n", -- buf->size); -- return total; -- } -- -- dest = current_urb->buffer + -- current_urb->actual_length; -- -- space_avail = -- current_urb->buffer_length - -- current_urb->actual_length; -- popnum = MIN (space_avail, buf->size); -- if (popnum == 0) -- break; -- -- popped = buf_pop (buf, dest, popnum); -- if (popped == 0) -- break; -- current_urb->actual_length += popped; -- total += popped; -- -- /* If endpoint->last == 0, then transfers have not started on this endpoint */ -- if (endpoint->last == 0) { -- udc_endpoint_write (endpoint); -- } -- -- } /* end while */ -- return total; -- } /* end if tx_urb */ -+static int fill_buffer (circbuf_t * buf) -+{ -+ struct usb_endpoint_instance *endpoint = -+ &endpoint_instance[rx_endpoint]; - -- return 0; --} -+ if (endpoint->rcv_urb && endpoint->rcv_urb->actual_length) { -+ unsigned int nb = endpoint->rcv_urb->actual_length; -+ char *src = (char *) endpoint->rcv_urb->buffer; - -+ buf_push (buf, src, nb); -+ endpoint->rcv_urb->actual_length = 0; -+ -+ TTYDBG ("nb= %d",nb); -+ return nb; -+ } -+ -+ return 0; -+} -+/* - static int fill_buffer (circbuf_t * buf) - { - struct usb_endpoint_instance *endpoint = -- &endpoint_instance[RECV_ENDPOINT]; -+ &endpoint_instance[rx_endpoint]; - - if (endpoint->rcv_urb && endpoint->rcv_urb->actual_length) { -- unsigned int nb = endpoint->rcv_urb->actual_length; -+ unsigned int nb = 0; - char *src = (char *) endpoint->rcv_urb->buffer; -+ unsigned int rx_avail = buf->totalsize - buf->size; - -- buf_push (buf, src, nb); -- endpoint->rcv_urb->actual_length = 0; -+ if(rx_avail >= endpoint->rcv_urb->actual_length){ - -+ nb = endpoint->rcv_urb->actual_length; -+ buf_push (buf, src, nb); -+ endpoint->rcv_urb->actual_length = 0; -+ -+ } - return nb; - } -- - return 0; - } -- -+*/ - static int usbtty_configured (void) - { - return usbtty_configured_flag; - } - --/*********************************************************************************/ -+/******************************************************************************/ - - static void usbtty_event_handler (struct usb_device_instance *device, - usb_device_event_t event, int data) -@@ -619,8 +1036,34 @@ - } - } - --/*********************************************************************************/ -+/******************************************************************************/ - -+int usbtty_cdc_setup(struct usb_device_request *request, struct urb *urb) -+{ -+ switch (request->bRequest){ -+ -+ case ACM_SET_CONTROL_LINE_STATE: /* Implies DTE ready */ -+ break; -+ case ACM_SEND_ENCAPSULATED_COMMAND : /* Required */ -+ break; -+ case ACM_SET_LINE_ENCODING : /* DTE stop/parity bits -+ * per character */ -+ break; -+ case ACM_GET_ENCAPSULATED_RESPONSE : /* request response */ -+ break; -+ case ACM_GET_LINE_ENCODING : /* request DTE rate, -+ * stop/parity bits */ -+ memcpy (urb->buffer , &rs232_desc, sizeof(rs232_desc)); -+ urb->actual_length = sizeof(rs232_desc); -+ -+ break; -+ default: -+ return 1; -+ } -+ return 0; -+} -+ -+/******************************************************************************/ - - /* - * Since interrupt handling has not yet been implemented, we use this function -@@ -630,36 +1073,29 @@ - void usbtty_poll (void) - { - /* New interrupts? */ -- pretend_interrupts (); -+ udc_irq(); - -- /* Write any output data to host buffer (do this before checking interrupts to avoid missing one) */ -+ /* Write any output data to host buffer -+ * (do this before checking interrupts to avoid missing one) -+ */ - if (usbtty_configured ()) { - write_buffer (&usbtty_output); - } - - /* New interrupts? */ -- pretend_interrupts (); -- -- /* Check for new data from host.. (do this after checking interrupts to get latest data) */ -+ udc_irq(); -+ -+ /* Check for new data from host.. -+ * (do this after checking interrupts to get latest data) -+ */ - if (usbtty_configured ()) { - fill_buffer (&usbtty_input); - } - - /* New interrupts? */ -- pretend_interrupts (); --} -+ udc_irq(); - --static void pretend_interrupts (void) --{ -- /* Loop while we have interrupts. -- * If we don't do this, the input chain -- * polling delay is likely to miss -- * host requests. -- */ -- while (inw (UDC_IRQ_SRC) & ~UDC_SOF_Flg) { -- /* Handle any new IRQs */ -- omap1510_udc_irq (); -- omap1510_udc_noniso_irq (); -- } - } -+ -+ - #endif -Index: u-boot/drivers/usbtty.h -=================================================================== ---- u-boot.orig/drivers/usbtty.h 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/drivers/usbtty.h 2007-02-08 21:11:55.000000000 +0100 -@@ -2,6 +2,9 @@ - * (C) Copyright 2003 - * Gerry Hamel, geh@ti.com, Texas Instruments - * -+ * (C) Copyright 2006 -+ * Bryan O'Donoghue, bodonoghue codehermit.ie, CodeHermit -+ * - * 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 -@@ -21,44 +24,49 @@ - #ifndef __USB_TTY_H__ - #define __USB_TTY_H__ - -- - #include "usbdcore.h" -+#if defined(CONFIG_PPC) -+#include "usbdcore_mpc8xx.h" -+#elif defined(CONFIG_OMAP1510) - #include "usbdcore_omap1510.h" -+#endif - -+#include -+#include - --#define NUM_CONFIGS 1 --#define NUM_INTERFACES 1 --#define NUM_ENDPOINTS 3 -+/* If no VendorID/ProductID is defined in config.h, pretend to be Linux -+ * DO NOT Reuse this Vendor/Product setup with protocol incompatible devices */ - --#define EP0_MAX_PACKET_SIZE 64 -+#ifndef CONFIG_USBD_VENDORID -+#define CONFIG_USBD_VENDORID 0x0525 /* Linux/NetChip */ -+#define CONFIG_USBD_PRODUCTID_GSERIAL 0xa4a6 /* gserial */ -+#define CONFIG_USBD_PRODUCTID_CDCACM 0xa4a7 /* CDC ACM */ -+#define CONFIG_USBD_MANUFACTURER "Das U-Boot" -+#define CONFIG_USBD_PRODUCT_NAME U_BOOT_VERSION -+#endif /* CONFIG_USBD_VENDORID */ - - #define CONFIG_USBD_CONFIGURATION_STR "TTY via USB" --#define CONFIG_USBD_INTERFACE_STR "Simple Serial Data Interface - Bulk Mode" -- -- --#define CONFIG_USBD_SERIAL_OUT_ENDPOINT 2 --#define CONFIG_USBD_SERIAL_OUT_PKTSIZE 64 --#define CONFIG_USBD_SERIAL_IN_ENDPOINT 1 --#define CONFIG_USBD_SERIAL_IN_PKTSIZE 64 --#define CONFIG_USBD_SERIAL_INT_ENDPOINT 5 --#define CONFIG_USBD_SERIAL_INT_PKTSIZE 16 - -+#define CONFIG_USBD_SERIAL_OUT_ENDPOINT UDC_OUT_ENDPOINT -+#define CONFIG_USBD_SERIAL_OUT_PKTSIZE UDC_OUT_PACKET_SIZE -+#define CONFIG_USBD_SERIAL_IN_ENDPOINT UDC_IN_ENDPOINT -+#define CONFIG_USBD_SERIAL_IN_PKTSIZE UDC_IN_PACKET_SIZE -+#define CONFIG_USBD_SERIAL_INT_ENDPOINT UDC_INT_ENDPOINT -+#define CONFIG_USBD_SERIAL_INT_PKTSIZE UDC_INT_PACKET_SIZE -+#define CONFIG_USBD_SERIAL_BULK_PKTSIZE UDC_BULK_PACKET_SIZE - - #define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS --#define USBTTY_DEVICE_SUBCLASS COMMUNICATIONS_NO_SUBCLASS --#define USBTTY_DEVICE_PROTOCOL COMMUNICATIONS_NO_PROTOCOL - --#define USBTTY_INTERFACE_CLASS 0xFF /* Vendor Specific */ --#define USBTTY_INTERFACE_SUBCLASS 0x02 --#define USBTTY_INTERFACE_PROTOCOL 0x01 -- --#define USBTTY_BCD_DEVICE 0x0 --#define USBTTY_MAXPOWER 0x0 -- --#define STR_MANUFACTURER 1 --#define STR_PRODUCT 2 --#define STR_SERIAL 3 --#define STR_CONFIG 4 --#define STR_INTERFACE 5 -+#define USBTTY_BCD_DEVICE 0x00 -+#define USBTTY_MAXPOWER 0x00 -+ -+#define STR_LANG 0x00 -+#define STR_MANUFACTURER 0x01 -+#define STR_PRODUCT 0x02 -+#define STR_SERIAL 0x03 -+#define STR_CONFIG 0x04 -+#define STR_DATA_INTERFACE 0x05 -+#define STR_CTRL_INTERFACE 0x06 -+#define STR_COUNT 0x07 - - #endif -Index: u-boot/drivers/usbdcore_omap1510.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_omap1510.c 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/drivers/usbdcore_omap1510.c 2007-02-08 21:11:55.000000000 +0100 -@@ -960,7 +960,7 @@ - /* Handle general USB interrupts and dispatch according to type. - * This function implements TRM Figure 14-13. - */ --void omap1510_udc_irq (void) -+static void omap1510_udc_irq (void) - { - u16 irq_src = inw (UDC_IRQ_SRC); - int valid_irq = 0; -@@ -1000,7 +1000,7 @@ - } - - /* This function implements TRM Figure 14-26. */ --void omap1510_udc_noniso_irq (void) -+static void omap1510_udc_noniso_irq (void) - { - unsigned short epnum; - unsigned short irq_src = inw (UDC_IRQ_SRC); -@@ -1054,6 +1054,20 @@ - irq_src); - } - -+void udc_irq(void) -+{ -+ /* Loop while we have interrupts. -+ * If we don't do this, the input chain -+ * polling delay is likely to miss -+ * host requests. -+ */ -+ while (inw (UDC_IRQ_SRC) & ~UDC_SOF_Flg) { -+ /* Handle any new IRQs */ -+ omap1510_udc_irq (); -+ omap1510_udc_noniso_irq (); -+ } -+} -+ - /* - ------------------------------------------------------------------------------- - */ -Index: u-boot/include/usb_cdc_acm.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ u-boot/include/usb_cdc_acm.h 2007-02-08 21:11:55.000000000 +0100 -@@ -0,0 +1,43 @@ -+/* -+ * (C) Copyright 2006 -+ * Bryan O'Donoghue, deckard codehermit.ie, CodeHermit -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+/* ACM Control Requests */ -+#define ACM_SEND_ENCAPSULATED_COMMAND 0x00 -+#define ACM_GET_ENCAPSULATED_RESPONSE 0x01 -+#define ACM_SET_COMM_FEATURE 0x02 -+#define ACM_GET_COMM_FEATRUE 0x03 -+#define ACM_CLEAR_COMM_FEATURE 0x04 -+#define ACM_SET_LINE_ENCODING 0x20 -+#define ACM_GET_LINE_ENCODING 0x21 -+#define ACM_SET_CONTROL_LINE_STATE 0x22 -+#define ACM_SEND_BREAK 0x23 -+ -+/* ACM Notification Codes */ -+#define ACM_NETWORK_CONNECTION 0x00 -+#define ACM_RESPONSE_AVAILABLE 0x01 -+#define ACM_SERIAL_STATE 0x20 -+ -+/* Format of response expected by a ACM_GET_LINE_ENCODING request */ -+struct rs232_emu{ -+ unsigned long dter; -+ unsigned char stop_bits; -+ unsigned char parity; -+ unsigned char data_bits; -+}__attribute__((packed)); -Index: u-boot/include/usbdcore_omap1510.h -=================================================================== ---- u-boot.orig/include/usbdcore_omap1510.h 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/include/usbdcore_omap1510.h 2007-02-08 21:11:55.000000000 +0100 -@@ -161,13 +161,23 @@ - #define UDC_VBUS_CTRL (1 << 19) - #define UDC_VBUS_MODE (1 << 18) - -- --void omap1510_udc_irq(void); --void omap1510_udc_noniso_irq(void); -- -+/* OMAP Endpoint parameters */ -+#define EP0_MAX_PACKET_SIZE 64 -+#define UDC_OUT_ENDPOINT 2 -+#define UDC_OUT_PACKET_SIZE 64 -+#define UDC_IN_ENDPOINT 1 -+#define UDC_IN_PACKET_SIZE 64 -+#define UDC_INT_ENDPOINT 5 -+#define UDC_INT_PACKET_SIZE 16 -+#define UDC_BULK_PACKET_SIZE 16 -+ -+void udc_irq (void); -+/* Flow control */ -+void udc_set_nak(int epid); -+void udc_unset_nak (int epid); - - /* Higher level functions for abstracting away from specific device */ --void udc_endpoint_write(struct usb_endpoint_instance *endpoint); -+int udc_endpoint_write(struct usb_endpoint_instance *endpoint); - - int udc_init (void); - -Index: u-boot/include/usbdescriptors.h -=================================================================== ---- u-boot.orig/include/usbdescriptors.h 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/include/usbdescriptors.h 2007-02-08 21:11:55.000000000 +0100 -@@ -92,15 +92,17 @@ - #define COMMUNICATIONS_DEVICE_CLASS 0x02 - - /* c.f. CDC 4.2 Table 15 */ --#define COMMUNICATIONS_INTERFACE_CLASS 0x02 -+#define COMMUNICATIONS_INTERFACE_CLASS_CONTROL 0x02 -+#define COMMUNICATIONS_INTERFACE_CLASS_DATA 0x0A -+#define COMMUNICATIONS_INTERFACE_CLASS_VENDOR 0x0FF - - /* c.f. CDC 4.3 Table 16 */ --#define COMMUNICATIONS_NO_SUBCLASS 0x00 -+#define COMMUNICATIONS_NO_SUBCLASS 0x00 - #define COMMUNICATIONS_DLCM_SUBCLASS 0x01 --#define COMMUNICATIONS_ACM_SUBCLASS 0x02 --#define COMMUNICATIONS_TCM_SUBCLASS 0x03 -+#define COMMUNICATIONS_ACM_SUBCLASS 0x02 -+#define COMMUNICATIONS_TCM_SUBCLASS 0x03 - #define COMMUNICATIONS_MCCM_SUBCLASS 0x04 --#define COMMUNICATIONS_CCM_SUBCLASS 0x05 -+#define COMMUNICATIONS_CCM_SUBCLASS 0x05 - #define COMMUNICATIONS_ENCM_SUBCLASS 0x06 - #define COMMUNICATIONS_ANCM_SUBCLASS 0x07 - -@@ -110,15 +112,22 @@ - #define COMMUNICATIONS_MDLM_SUBCLASS 0x0a - #define COMMUNICATIONS_OBEX_SUBCLASS 0x0b - --/* c.f. CDC 4.6 Table 18 */ -+/* c.f. CDC 4.4 Table 17 */ -+#define COMMUNICATIONS_NO_PROTOCOL 0x00 -+#define COMMUNICATIONS_V25TER_PROTOCOL 0x01 /*Common AT Hayes compatible*/ -+ -+/* c.f. CDC 4.5 Table 18 */ - #define DATA_INTERFACE_CLASS 0x0a - -+/* c.f. CDC 4.6 No Table */ -+#define DATA_INTERFACE_SUBCLASS_NONE 0x00 /* No subclass pertinent */ -+ - /* c.f. CDC 4.7 Table 19 */ --#define COMMUNICATIONS_NO_PROTOCOL 0x00 -+#define DATA_INTERFACE_PROTOCOL_NONE 0x00 /* No class protcol required */ - - - /* c.f. CDC 5.2.3 Table 24 */ --#define CS_INTERFACE 0x24 -+#define CS_INTERFACE 0x24 - #define CS_ENDPOINT 0x25 - - /* -@@ -128,7 +137,7 @@ - * c.f. WMCD 5.3 Table 5.3 - */ - --#define USB_ST_HEADER 0x00 -+#define USB_ST_HEADER 0x00 - #define USB_ST_CMF 0x01 - #define USB_ST_ACMF 0x02 - #define USB_ST_DLMF 0x03 -@@ -137,18 +146,18 @@ - #define USB_ST_UF 0x06 - #define USB_ST_CSF 0x07 - #define USB_ST_TOMF 0x08 --#define USB_ST_USBTF 0x09 -+#define USB_ST_USBTF 0x09 - #define USB_ST_NCT 0x0a - #define USB_ST_PUF 0x0b - #define USB_ST_EUF 0x0c - #define USB_ST_MCMF 0x0d - #define USB_ST_CCMF 0x0e - #define USB_ST_ENF 0x0f --#define USB_ST_ATMNF 0x10 -+#define USB_ST_ATMNF 0x10 - - #define USB_ST_WHCM 0x11 - #define USB_ST_MDLM 0x12 --#define USB_ST_MDLMD 0x13 -+#define USB_ST_MDLMD 0x13 - #define USB_ST_DMM 0x14 - #define USB_ST_OBEX 0x15 - #define USB_ST_CS 0x16 -@@ -312,7 +321,8 @@ - u8 bDescriptorType; - u8 bDescriptorSubtype; /* 0x06 */ - u8 bMasterInterface; -- u8 bSlaveInterface0[0]; -+ //u8 bSlaveInterface0[0]; -+ u8 bSlaveInterface0; - } __attribute__ ((packed)); - - struct usb_class_country_selection_descriptor { -Index: u-boot/include/usbdcore.h -=================================================================== ---- u-boot.orig/include/usbdcore.h 2007-02-08 21:11:27.000000000 +0100 -+++ u-boot/include/usbdcore.h 2007-02-08 21:11:55.000000000 +0100 -@@ -576,6 +576,9 @@ - - void (*event) (struct usb_device_instance *device, usb_device_event_t event, int data); - -+ /* Do cdc device specific control requests */ -+ int (*cdc_recv_setup)(struct usb_device_request *request, struct urb *urb); -+ - /* bus interface */ - struct usb_bus_instance *bus; /* which bus interface driver */ - -Index: u-boot/drivers/usbdcore_ep0.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-08 21:12:05.000000000 +0100 -+++ u-boot/drivers/usbdcore_ep0.c 2007-02-08 21:12:08.000000000 +0100 -@@ -223,7 +223,6 @@ - - case USB_DESCRIPTOR_TYPE_CONFIGURATION: - { -- int bNumInterface; - struct usb_configuration_descriptor - *configuration_descriptor; - struct usb_device_descriptor *device_descriptor; -@@ -256,105 +255,6 @@ - usb_configuration_descriptor), - max); - -- -- /* iterate across interfaces for specified configuration */ -- dbg_ep0 (0, "bNumInterfaces: %d", -- configuration_descriptor->bNumInterfaces); -- for (bNumInterface = 0; -- bNumInterface < -- configuration_descriptor->bNumInterfaces; -- bNumInterface++) { -- -- int bAlternateSetting; -- struct usb_interface_instance -- *interface_instance; -- -- dbg_ep0 (3, "[%d] bNumInterfaces: %d", -- bNumInterface, -- configuration_descriptor->bNumInterfaces); -- -- if (! (interface_instance = usbd_device_interface_instance (device, -- port, index, bNumInterface))) -- { -- dbg_ep0 (3, "[%d] interface_instance NULL", -- bNumInterface); -- return -1; -- } -- /* iterate across interface alternates */ -- for (bAlternateSetting = 0; -- bAlternateSetting < interface_instance->alternates; -- bAlternateSetting++) { -- /*int class; */ -- int bNumEndpoint; -- struct usb_interface_descriptor *interface_descriptor; -- -- struct usb_alternate_instance *alternate_instance; -- -- dbg_ep0 (3, "[%d:%d] alternates: %d", -- bNumInterface, -- bAlternateSetting, -- interface_instance->alternates); -- -- if (! (alternate_instance = usbd_device_alternate_instance (device, port, index, bNumInterface, bAlternateSetting))) { -- dbg_ep0 (3, "[%d] alternate_instance NULL", -- bNumInterface); -- return -1; -- } -- /* copy descriptor for this interface */ -- copy_config (urb, alternate_instance->interface_descriptor, -- sizeof (struct usb_interface_descriptor), -- max); -- -- /*dbg_ep0(3, "[%d:%d] classes: %d endpoints: %d", bNumInterface, bAlternateSetting, */ -- /* alternate_instance->classes, alternate_instance->endpoints); */ -- -- /* iterate across classes for this alternate interface */ --#if 0 -- for (class = 0; -- class < alternate_instance->classes; -- class++) { -- struct usb_class_descriptor *class_descriptor; -- /*dbg_ep0(3, "[%d:%d:%d] classes: %d", bNumInterface, bAlternateSetting, */ -- /* class, alternate_instance->classes); */ -- if (!(class_descriptor = usbd_device_class_descriptor_index (device, port, index, bNumInterface, bAlternateSetting, class))) { -- dbg_ep0 (3, "[%d] class NULL", -- class); -- return -1; -- } -- /* copy descriptor for this class */ -- copy_config (urb, class_descriptor, -- sizeof (struct usb_class_descriptor), -- max); -- } --#endif -- -- /* iterate across endpoints for this alternate interface */ -- interface_descriptor = alternate_instance->interface_descriptor; -- for (bNumEndpoint = 0; -- bNumEndpoint < alternate_instance->endpoints; -- bNumEndpoint++) { -- struct usb_endpoint_descriptor *endpoint_descriptor; -- dbg_ep0 (3, "[%d:%d:%d] endpoint: %d", -- bNumInterface, -- bAlternateSetting, -- bNumEndpoint, -- interface_descriptor-> -- bNumEndpoints); -- if (!(endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, index, bNumInterface, bAlternateSetting, bNumEndpoint))) { -- dbg_ep0 (3, "[%d] endpoint NULL", -- bNumEndpoint); -- return -1; -- } -- /* copy descriptor for this endpoint */ -- copy_config (urb, endpoint_descriptor, -- sizeof (struct usb_endpoint_descriptor), -- max); -- } -- } -- } -- dbg_ep0 (3, "lengths: %d %d", -- le16_to_cpu (configuration_descriptor->wTotalLength), -- urb->actual_length); - } - break; - -@@ -363,6 +263,7 @@ - struct usb_string_descriptor *string_descriptor; - - if (!(string_descriptor = usbd_get_string (index))) { -+ dbg_ep0(0, "Invalid string index %u\n", index); - return -1; - } - /*dbg_ep0(3, "string_descriptor: %p", string_descriptor); */ -@@ -495,6 +396,8 @@ - - /* handle USB Standard Request (c.f. USB Spec table 9-2) */ - if ((request->bmRequestType & USB_REQ_TYPE_MASK) != 0) { -+ if (device->device_state <= STATE_CONFIGURED) -+ return device->cdc_recv_setup(request, urb); - dbg_ep0 (1, "non standard request: %x", - request->bmRequestType & USB_REQ_TYPE_MASK); - return -1; /* Stall here */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch b/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch deleted file mode 100644 index 680b301620..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch +++ /dev/null @@ -1,88 +0,0 @@ -board/neo1973/gta01/gta01.c: added logic to detect pending PMU interrupts -board/neo1973/gta01/gta01.c (neo1973_new_second, neo1973_on_key_pressed): only - poll PMU if there is a pending interrupt -board/neo1973/gta01/pcf50606.c (pcf50606_initial_regs): cleared (unmasked) - SECONDM in INT1M - -- Werner Almesberger - -Index: u-boot/board/neo1973/gta01/gta01.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/gta01.c -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -375,19 +375,60 @@ - #endif - } - -+static int pwr_int_pending(void) -+{ -+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ -+#if defined(CONFIG_ARCH_GTA01B_v4) -+ return !(gpio->GPGDAT & (1 << 1)); /* EINT9/GPG1 */ -+#else -+ return !(gpio->GPGDAT & (1 << 8)); /* EINT16/GPG8 */ -+#endif /* !CONFIG_ARCH_GTA01B_v4 */ -+} -+ -+static int have_int1(uint8_t mask) -+{ -+ static uint8_t pending = 0; -+ -+ if (pwr_int_pending()) { -+ /* -+ * We retrieve all interupts, so that we clear any stray ones -+ * in INT2 and INT3. -+ */ -+ uint8_t int1,int2,int3; -+ -+ int1 = pcf50606_reg_read(PCF50606_REG_INT1); -+ int2 = pcf50606_reg_read(PCF50606_REG_INT2); -+ int3 = pcf50606_reg_read(PCF50606_REG_INT3); -+ pending |= int1; -+ } -+ if (!(pending & mask)) -+ return 0; -+ pending &= ~mask; -+ return 1; -+} -+ - int neo1973_new_second(void) - { -- return pcf50606_reg_read(PCF50606_REG_INT1) & PCF50606_INT1_SECOND; -+ return have_int1(PCF50606_INT1_SECOND); - } - - int neo1973_on_key_pressed(void) - { -- return !(pcf50606_reg_read(PCF50606_REG_OOCS) & PFC50606_OOCS_ONKEY); -+ static int pressed = -1; -+ -+ if (pressed == -1 || -+ have_int1(PCF50606_INT1_ONKEYF | PCF50606_INT1_ONKEYR)) { -+ pressed = !(pcf50606_reg_read(PCF50606_REG_OOCS) & -+ PFC50606_OOCS_ONKEY); -+} -+ return pressed; - } - - int neo1973_aux_key_pressed(void) - { - S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); -+ - if (gpio->GPFDAT & (1 << 6)) - return 0; - return 1; -Index: u-boot/board/neo1973/gta01/pcf50606.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/pcf50606.c -+++ u-boot/board/neo1973/gta01/pcf50606.c -@@ -6,7 +6,7 @@ - const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { - [PCF50606_REG_OOCS] = 0x00, - /* gap */ -- [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, -+ [PCF50606_REG_INT1M] = 0x00, - [PCF50606_REG_INT2M] = 0x00, - [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, - [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | diff --git a/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch b/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch deleted file mode 100644 index 339289699a..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch +++ /dev/null @@ -1,63 +0,0 @@ -This patch fixes bugs in usbdcore*.c related to the use of devices -with multiple configurations. - -The original code made mistakes about the meaning of configuration value and -configuration index, and the resulting off-by-one errors resulted in: - -* SET_CONFIGURATION always selected the first configuration, no matter what - wValue is being passed. -* GET_DESCRIPTOR/CONFIGURATION always returned the descriptor for the first - configuration (index 0). - -Signed-off-by: Harald Welte - -Index: u-boot/drivers/usbdcore_ep0.c -=================================================================== ---- u-boot.orig/drivers/usbdcore_ep0.c 2007-03-14 20:29:05.000000000 +0100 -+++ u-boot/drivers/usbdcore_ep0.c 2007-03-14 20:29:06.000000000 +0100 -@@ -233,8 +233,8 @@ - return -1; - } - /*dbg_ep0(2, "%d %d", index, device_descriptor->bNumConfigurations); */ -- if (index > device_descriptor->bNumConfigurations) { -- dbg_ep0 (0, "index too large: %d > %d", index, -+ if (index >= device_descriptor->bNumConfigurations) { -+ dbg_ep0 (0, "index too large: %d >= %d", index, - device_descriptor-> - bNumConfigurations); - return -1; -@@ -593,13 +593,8 @@ - - case USB_REQ_SET_CONFIGURATION: - /* c.f. 9.4.7 - the top half of wValue is reserved */ -- /* */ -- if ((device->configuration = -- le16_to_cpu (request->wValue) & 0x7f) != 0) { -- /* c.f. 9.4.7 - zero is the default or addressed state, in our case this */ -- /* is the same is configuration zero */ -- device->configuration = 0; /* TBR - ?????? */ -- } -+ device->configuration = le16_to_cpu(request->wValue) & 0xff; -+ - /* reset interface and alternate settings */ - device->interface = device->alternate = 0; - -Index: u-boot/drivers/usbdcore.c -=================================================================== ---- u-boot.orig/drivers/usbdcore.c 2007-03-14 20:29:05.000000000 +0100 -+++ u-boot/drivers/usbdcore.c 2007-03-14 20:37:37.000000000 +0100 -@@ -147,12 +147,9 @@ - static struct usb_configuration_instance *usbd_device_configuration_instance (struct usb_device_instance *device, - unsigned int port, unsigned int configuration) - { -- /* XXX */ -- configuration = configuration ? configuration - 1 : 0; -- -- if (configuration >= device->configurations) { -+ if (configuration >= device->configurations) - return NULL; -- } -+ - return device->configuration_instance_array + configuration; - } - diff --git a/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch b/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch deleted file mode 100644 index 132a9f8da5..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch +++ /dev/null @@ -1,68 +0,0 @@ -This patch should get rid of spurious poweroff after booting from RAM. -Experimental. - -cpu/arm920t/start.S: record in global variable "booted_from_nand" whether we - booted from NAND or not -board/neo1973/neo1973.c (board_late_init): if booted from RAM, assume that - wakeup cause was "reset", and skip poweroff check - -- Werner Almesberger - -Index: u-boot/board/neo1973/gta01/gta01.c -=================================================================== ---- u-boot.orig/board/neo1973/gta01/gta01.c -+++ u-boot/board/neo1973/gta01/gta01.c -@@ -226,12 +226,16 @@ - - int board_late_init(void) - { -+ extern unsigned char booted_from_nand; - unsigned char tmp; - char buf[32]; - - /* Initialize the Power Management Unit with a safe register set */ - pcf50606_init(); - -+ if (!booted_from_nand) -+ goto woken_by_reset; -+ - /* obtain wake-up reason, save INT1 in environment */ - tmp = pcf50606_reg_read(PCF50606_REG_INT1); - sprintf(buf, "0x%02x", tmp); -@@ -274,6 +278,7 @@ - neo1973_poweroff(); - } - -+woken_by_reset: - /* if there's no other reason, must be regular reset */ - neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; - -Index: u-boot/cpu/arm920t/start.S -=================================================================== ---- u-boot.orig/cpu/arm920t/start.S -+++ u-boot/cpu/arm920t/start.S -@@ -77,6 +77,14 @@ - ************************************************************************* - */ - -+#ifdef CONFIG_S3C2410_NAND_BOOT -+.globl booted_from_nand -+booted_from_nand: -+ .word 0 -+_booted_from_nand: -+ .word booted_from_nand -+#endif /* CONFIG_S3C2410_NAND_BOOT */ -+ - _TEXT_BASE: - .word TEXT_BASE - -@@ -281,6 +289,9 @@ - #endif - 1: b 1b - done_nand_read: -+ ldr r0, _booted_from_nand -+ mov r1, #1 -+ strb r1, [r0] - #endif /* CONFIG_S3C2410_NAND_BOOT */ - done_relocate: - #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native_oe.bb b/packages/uboot/u-boot-mkimage-gta01-native_oe.bb deleted file mode 100644 index 65c413c8d7..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native_oe.bb +++ /dev/null @@ -1,82 +0,0 @@ -require uboot-gta01_svn.bb - -PV = "1.2.0+git9912121f7ed804ea58fd62f3f230b5dcfc357d88svn2238" - -SRC_URI = "git://www.denx.de/git/u-boot.git/;protocol=git;tag=9912121f7ed804ea58fd62f3f230b5dcfc357d88 \ -file://uboot-machtypes.patch;patch=1 \ -file://ext2load_hex.patch;patch=1 \ -file://uboot-mokoversion.patch;patch=1 \ -file://uboot-s3c2410-warnings-fix.patch;patch=1 \ -file://uboot-strtoul.patch;patch=1 \ -file://uboot-cramfs_but_no_jffs2.patch;patch=1 \ -file://nand-read_write_oob.patch;patch=1 \ -file://uboot-arm920t-gd_in_irq.patch;patch=1 \ -file://uboot-arm920_s3c2410_irq_demux.patch;patch=1 \ -file://uboot-s3c2410-nand.patch;patch=1 \ -file://uboot-cmd_s3c2410.patch;patch=1 \ -file://uboot-s3c2410-mmc.patch;patch=1 \ -file://env_nand_oob.patch;patch=1 \ -file://dynenv-harden.patch;patch=1 \ -file://uboot-s3c2410_fb.patch;patch=1 \ -file://uboot-20061030-qt2410.patch;patch=1 \ -file://uboot-20061030-neo1973.patch;patch=1 \ -file://uboot-s3c2410-misccr-definitions.patch;patch=1 \ -file://boot-from-ram-reloc.patch;patch=1 \ -file://boot-from-ram-and-nand.patch;patch=1 \ -file://wakeup-reason-nand-only.patch;patch=1 \ -file://uboot-neo1973-resume.patch;patch=1 \ -file://nand-dynamic_partitions.patch;patch=1 \ -file://uboot-s3c2410-norelocate_irqvec_cpy.patch;patch=1 \ -file://uboot-usbtty-acm.patch;patch=1 \ -file://uboot-s3c2410_udc.patch;patch=1 \ -file://bbt-create-optional.patch;patch=1 \ -file://nand-createbbt.patch;patch=1 \ -file://dontask.patch;patch=1 \ -file://nand-badisbad.patch;patch=1 \ -file://uboot-bbt-quiet.patch;patch=1 \ -file://raise-limits.patch;patch=1 \ -file://splashimage-command.patch;patch=1 \ -file://cmd-unzip.patch;patch=1 \ -file://enable-splash-bmp.patch;patch=1 \ -file://preboot-override.patch;patch=1 \ -file://lowlevel_foo.patch;patch=1 \ -file://default-env.patch;patch=1 \ -file://console-ansi.patch;patch=1 \ -file://boot-menu.patch;patch=1 \ -file://uboot-dfu.patch;patch=1 \ -file://uboot-neo1973-defaultenv.patch;patch=1 \ -file://uboot-nand-markbad-reallybad.patch;patch=1 \ -file://usbdcore-multiple_configs.patch;patch=1 \ -file://neo1973-chargefast.patch;patch=1 \ -file://uboot-s3c2440.patch;patch=1 \ -file://uboot-smdk2440.patch;patch=1 \ -file://uboot-hxd8.patch;patch=1 \ -file://uboot-license.patch;patch=1 \ -file://uboot-gta02.patch;patch=1 \ -file://uboot-s3c2443.patch;patch=1 \ -file://uboot-smdk2443.patch;patch=1 \ -file://unbusy-i2c.patch;patch=1 \ -" - -PROVIDES = "" -TARGET_LDFLAGS = "" - -do_quilt() { -: -} - -do_compile () { - chmod +x board/neo1973/gta01/split_by_variant.sh - oe_runmake gta01bv3_config - oe_runmake clean - oe_runmake tools -} - -do_deploy () { - install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage -} - -do_deploy[dirs] = "${S}" -addtask deploy before do_package after do_install - - diff --git a/packages/uboot/u-boot-mkimage-gta01-native_svn.bb b/packages/uboot/u-boot-mkimage-gta01-native_svn.bb deleted file mode 100644 index 90b3bbef5a..0000000000 --- a/packages/uboot/u-boot-mkimage-gta01-native_svn.bb +++ /dev/null @@ -1,20 +0,0 @@ -require uboot-gta01_svn.bb - -DEFAULT_PREFERENCE = "-1" - -PROVIDES = "" -TARGET_LDFLAGS = "" - -do_compile () { - chmod +x board/neo1973/gta01/split_by_variant.sh - oe_runmake gta01bv3_config - oe_runmake clean - oe_runmake tools -} - -do_deploy () { - install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage -} - -do_deploy[dirs] = "${S}" -addtask deploy before do_package after do_install diff --git a/packages/uboot/uboot-gta01_svn.bb b/packages/uboot/uboot-gta01_svn.bb index d026efccc1..2cf50c78bd 100644 --- a/packages/uboot/uboot-gta01_svn.bb +++ b/packages/uboot/uboot-gta01_svn.bb @@ -4,55 +4,79 @@ LICENSE = "GPL" SECTION = "bootloader" PRIORITY = "optional" PV = "1.2.0+svn${SRCDATE}" -PR = "r3" +PR = "r10" PROVIDES = "virtual/bootloader" S = "${WORKDIR}/git" SRC_URI = "git://www.denx.de/git/u-boot.git/;protocol=git \ svn://svn.openmoko.org/trunk/src/target/u-boot;module=patches;proto=http \ - file://fix-arm920t-eabi.patch;patch=1" + file://uboot-eabi-fix-HACK.patch \ + file://uboot-20070311-tools_makefile_ln_sf.patch;patch=1 \ +" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" TARGET_LDFLAGS = "" -UBOOT_MACHINES = "gta01v3 gta01v4 gta01bv2 gta01bv3" +UBOOT_MACHINES = "gta01bv2 gta01bv3 gta01bv4 smdk2440 hxd8 qt2410 gta02v1" do_quilt() { - mv ${WORKDIR}/patches ${S}/patches - cd ${S} - quilt push -av + mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av rm -Rf patches .pc } +do_svnrev() { + FILE=${S}/tools/setlocalversion + OLDFILE=$FILE.old + NEWFILE=$FILE.new + cp $FILE $OLDFILE + LINES=`cat $OLDFILE | wc -l` + LINES_WE_WANT=$(($LINES-1)) + LASTLINE=`cat $OLDFILE | tail -n 1` + cat $OLDFILE | head -n $LINES_WE_WANT > $NEWFILE + echo ${LASTLINE}_${PR} >> $NEWFILE + rm $FILE && mv $NEWFILE $FILE +} + +do_configure_prepend() { + find . -name "*.mk" -exec sed -i 's,-mabi=apcs-gnu,,' {} \; + find . -name "Makefile" -exec sed -i 's,-mabi=apcs-gnu,,' {} \; + cat ${WORKDIR}/uboot-eabi-fix-HACK.patch |patch -p1 +} + do_compile () { - chmod +x board/neo1973/split_by_variant.sh - for type in ram nand + chmod +x board/neo1973/gta*/split_by_variant.sh + for mach in ${UBOOT_MACHINES} do - for mach in ${UBOOT_MACHINES} - do - oe_runmake ${mach}_config - oe_runmake clean - if [ ${type} == "ram" ]; then - echo 'PLATFORM_RELFLAGS += -DBUILD_FOR_RAM' >> board/neo1973/config.tmp - fi - oe_runmake all - mv u-boot.bin u-boot_${mach}_${type}.bin - done + oe_runmake ${mach}_config + oe_runmake clean + oe_runmake all + oe_runmake u-boot.udfu + if [ -f u-boot.udfu ]; then + mv u-boot.udfu u-boot_${mach}.bin + else + mv u-boot.bin u-boot_${mach}.bin + fi + if [ -f board/${mach}/lowlevel_foo.bin ]; then + mv board/${mach}/lowlevel_foo.bin lowlevel_foo_${mach}.bin + fi done } do_deploy () { install -d ${DEPLOY_DIR_IMAGE} - for type in nand ram + for mach in ${UBOOT_MACHINES} do - for mach in ${UBOOT_MACHINES} - do - install ${S}/u-boot_${mach}_${type}.bin ${DEPLOY_DIR_IMAGE}/u-boot_${type}-${mach}-${DATETIME}.bin - done + install ${S}/u-boot_${mach}.bin \ + ${DEPLOY_DIR_IMAGE}/u-boot-${mach}-${PR}.bin + if [ -f ${S}/lowlevel_foo_${mach}.bin ]; then + install ${S}/lowlevel_foo_${mach}.bin \ + ${DEPLOY_DIR_IMAGE}/lowlevel_foo-${mach}-${PR}.bin + fi done install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage } do_deploy[dirs] = "${S}" -addtask deploy before do_build after do_compile +addtask deploy before do_package after do_install addtask quilt before do_patch after do_unpack +addtask svnrev before do_patch after do_quilt diff --git a/packages/uboot/uboot-qt2410_0.0+cvs20061030.bb b/packages/uboot/uboot-qt2410_0.0+cvs20061030.bb deleted file mode 100644 index 102030f147..0000000000 --- a/packages/uboot/uboot-qt2410_0.0+cvs20061030.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "U-boot bootloader w/ armzone qt2410 support" -SECTION = "bootloader" -PRIORITY = "optional" -LICENSE = "GPL" -SRCDATE := "${PV}" -PR = "r0" - -PROVIDES = "virtual/bootloader" -S = "${WORKDIR}/git" - -SRC_URI = "git://www.denx.de/git/u-boot.git/;protocol=git \ - file://u-boot-20061030-qt2410-gta01.patch;patch=1 \ - file://qt2410_*.h" - -EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" -TARGET_LDFLAGS = "" -UBOOT_MACHINE = "qt2410_config" - -inherit base - -do_compile () { - for type in nand ram - do - install -m 0644 ${WORKDIR}/qt2410_${type}.h include/configs/qt2410.h - oe_runmake ${UBOOT_MACHINE} - oe_runmake all - mv u-boot.bin u-boot_$type.bin - done -} - -do_deploy () { - install -d ${DEPLOY_DIR_IMAGE} - for type in nand ram - do - install ${S}/u-boot_$type.bin ${DEPLOY_DIR_IMAGE}/u-boot_$type-${MACHINE}-${DATETIME}.bin - done - install -m 0755 tools/mkimage ${STAGING_BINDIR}/uboot-mkimage -} - -do_deploy[dirs] = "${S}" -addtask deploy before do_build after do_compile -- cgit v1.2.3 From 091b3d8bc19da5d599e2d3b97c05bf2b5fdadde0 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Fri, 22 Jun 2007 03:16:21 +0000 Subject: linux-gta01: * remove outdated cruft * add 2.6.21.3 kernel --- packages/linux/gta01-kernel_2.6.bb | 1 - .../linux/linux-gta01/defconfig-2.6.20-fic-gta01 | 1781 ------------------- .../linux/linux-gta01/defconfig-2.6.21.1-fic-gta01 | 1842 ------------------- .../linux/linux-gta01/defconfig-2.6.21.3-fic-gta01 | 1857 ++++++++++++++++++++ packages/linux/linux-gta01/defconfig-fic-gta01 | 1621 ----------------- .../linux/linux-gta01/udc-nomodule-misccr.patch | 22 - packages/linux/linux-gta01_2.6.17.14.bb | 101 -- packages/linux/linux-gta01_2.6.17.7.bb | 97 - packages/linux/linux-gta01_2.6.20.bb | 102 -- packages/linux/linux-gta01_2.6.21.1.bb | 10 - packages/linux/linux-gta01_2.6.21.3.bb | 10 + 11 files changed, 1867 insertions(+), 5577 deletions(-) delete mode 100644 packages/linux/gta01-kernel_2.6.bb delete mode 100644 packages/linux/linux-gta01/defconfig-2.6.20-fic-gta01 delete mode 100644 packages/linux/linux-gta01/defconfig-2.6.21.1-fic-gta01 create mode 100644 packages/linux/linux-gta01/defconfig-2.6.21.3-fic-gta01 delete mode 100644 packages/linux/linux-gta01/defconfig-fic-gta01 delete mode 100644 packages/linux/linux-gta01/udc-nomodule-misccr.patch delete mode 100644 packages/linux/linux-gta01_2.6.17.14.bb delete mode 100644 packages/linux/linux-gta01_2.6.17.7.bb delete mode 100644 packages/linux/linux-gta01_2.6.20.bb delete mode 100644 packages/linux/linux-gta01_2.6.21.1.bb create mode 100644 packages/linux/linux-gta01_2.6.21.3.bb (limited to 'packages') diff --git a/packages/linux/gta01-kernel_2.6.bb b/packages/linux/gta01-kernel_2.6.bb deleted file mode 100644 index eaafb7e7b2..0000000000 --- a/packages/linux/gta01-kernel_2.6.bb +++ /dev/null @@ -1 +0,0 @@ -require linux-gta01_2.6.17.14.bb diff --git a/packages/linux/linux-gta01/defconfig-2.6.20-fic-gta01 b/packages/linux/linux-gta01/defconfig-2.6.20-fic-gta01 deleted file mode 100644 index e0a885fa0d..0000000000 --- a/packages/linux/linux-gta01/defconfig-2.6.20-fic-gta01 +++ /dev/null @@ -1,1781 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.20 -# Thu Feb 15 23:04:12 2007 -# -CONFIG_ARM=y -# CONFIG_GENERIC_TIME is not set -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-moko8" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=m -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=m -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -CONFIG_ARCH_S3C2410=y -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set - -# -# S3C24XX Implementations -# -# CONFIG_MACH_AML_M5900 is not set -# CONFIG_MACH_ANUBIS is not set -# CONFIG_MACH_OSIRIS is not set -# CONFIG_ARCH_BAST is not set -# CONFIG_ARCH_H1940 is not set -# CONFIG_MACH_N30 is not set -# CONFIG_ARCH_SMDK2410 is not set -CONFIG_MACH_QT2410=y -CONFIG_MACH_GTA01=y -# CONFIG_ARCH_S3C2440 is not set -# CONFIG_MACH_SMDK2413 is not set -# CONFIG_MACH_VR1000 is not set -# CONFIG_MACH_RX3715 is not set -# CONFIG_MACH_OTOM is not set -# CONFIG_MACH_NEXCODER_2440 is not set -# CONFIG_MACH_VSTMS is not set -CONFIG_S3C2410_CLOCK=y -CONFIG_S3C2410_PM=y -CONFIG_CPU_S3C2410_DMA=y -CONFIG_CPU_S3C2410=y - -# -# S3C2410 Boot -# -# CONFIG_S3C2410_BOOT_WATCHDOG is not set -CONFIG_S3C2410_BOOT_ERROR_RESET=y - -# -# S3C2410 Setup -# -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set -# CONFIG_S3C2410_PM_DEBUG is not set -# CONFIG_S3C2410_PM_CHECK is not set -CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4T=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 -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=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 - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=200 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySAC0,115200n8 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -# CONFIG_FPE_NWFPE is not set -CONFIG_FPE_FASTFPE=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -CONFIG_PM_DEBUG=y -CONFIG_DISABLE_CONSOLE_SUSPEND=y -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -CONFIG_TCP_MD5SIG=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK_SUPPORT=y -# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -# CONFIG_IP_NF_MATCH_RECENT is not set -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -# CONFIG_IP6_NF_RAW is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -# CONFIG_NET_CLS_POLICE is not set -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -# CONFIG_BT_HCIUART is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set -CONFIG_FIB_RULES=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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=y -CONFIG_MTD_NAND_VERIFY_WRITE=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_MTD_NAND_S3C2410_BBT=y -# CONFIG_MTD_NAND_S3C2410_DEBUG is not set -CONFIG_MTD_NAND_S3C2410_HWECC=y -CONFIG_MTD_NAND_S3C2410_CLKSTOP=y -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -# CONFIG_SCSI_TGT is not set -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set -CONFIG_NET_PCI=y -CONFIG_CS89x0=m - -# -# 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=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_KEYBOARD_GTA01=y -CONFIG_KEYBOARD_QT2410=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -CONFIG_TOUCHSCREEN_S3C2410=y -# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_UCB1400 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_NR_TTY_DEVICES=4 -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_S3C2410=y -CONFIG_SERIAL_S3C2410_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=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_S3C2410_WATCHDOG=m - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TS0710_MUX is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_S3C2410=y -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -CONFIG_SENSORS_PCF50606=y -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y -CONFIG_SPI_S3C24XX_GPIO=y -CONFIG_SPI_S3C24XX=y - -# -# SPI Protocol Masters -# -CONFIG_SPI_SLAVE_JBT6K74=y - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU 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_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F 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_LM70 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_PC87427 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83793 is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_TIFM_CORE is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m - -# -# LED drivers -# -CONFIG_LEDS_S3C24XX=m - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_S3C2410=y -# CONFIG_FB_S3C2410_DEBUG is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -CONFIG_FONT_6x11=y -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 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=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_DEVICE=y -CONFIG_BACKLIGHT_GTA01=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# SoC audio support -# -CONFIG_SND_SOC=y - -# -# Soc Platforms -# - -# -# SoC Audio for the Intel PXA2xx -# - -# -# SoC Audio for the Atmel AT91 -# - -# -# SoC Audio for the Freescale i.MX -# - -# -# SoC Audio for the Samsung S3C24XX -# -CONFIG_SND_S3C24XX_SOC=y -CONFIG_SND_S3C24XX_SOC_I2S=y -CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=y - -# -# Soc Codecs -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8750 is not set -CONFIG_SND_SOC_WM8753=y -# CONFIG_SND_SOC_WM8772 is not set -# CONFIG_SND_SOC_WM8971 is not set -# CONFIG_SND_SOC_WM8956 is not set -# CONFIG_SND_SOC_WM8960 is not set -CONFIG_SND_SOC_WM8976=y -# CONFIG_SND_SOC_WM8974 is not set -# CONFIG_SND_SOC_WM8980 is not set -# CONFIG_SND_SOC_WM9713 is not set -# CONFIG_SND_SOC_WM9712 is not set -# CONFIG_SND_SOC_UDA1380 is not set -# CONFIG_SND_SOC_AK4535 is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# HID Devices -# -CONFIG_HID=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=m -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -CONFIG_USB_GADGET_S3C2410=y -CONFIG_USB_S3C2410=y -# CONFIG_USB_S3C2410_DEBUG is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -# CONFIG_MMC_TIFM_SD is not set -CONFIG_MMC_S3C=m - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DEBUG=y - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -CONFIG_RTC_DRV_S3C=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -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_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# 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_YAFFS_FS is not set -# CONFIG_YAFFS_YAFFS1 is not set -# CONFIG_YAFFS_DOES_ECC is not set -# CONFIG_YAFFS_YAFFS2 is not set -# CONFIG_YAFFS_AUTO_YAFFS2 is not set -# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set -# CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS is not set -# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set -# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set -# CONFIG_YAFFS_SHORT_NAMES_IN_RAM is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR 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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# 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=m -CONFIG_NLS_CODEPAGE_950=m -# 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=m -# 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=m - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_ERRORS is not set -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set -CONFIG_DEBUG_S3C2410_PORT=y -CONFIG_DEBUG_S3C2410_UART=0 - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_LRW=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_IOMAP_COPY=y diff --git a/packages/linux/linux-gta01/defconfig-2.6.21.1-fic-gta01 b/packages/linux/linux-gta01/defconfig-2.6.21.1-fic-gta01 deleted file mode 100644 index 9f2ff3de21..0000000000 --- a/packages/linux/linux-gta01/defconfig-2.6.21.1-fic-gta01 +++ /dev/null @@ -1,1842 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.1 -# Fri May 18 12:58:24 2007 -# -CONFIG_ARM=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_GENERIC_GPIO=y -# CONFIG_GENERIC_TIME is not set -CONFIG_MMU=y -CONFIG_NO_IOPORT=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-moko10" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=m -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=m -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_NS9XXX is not set -# CONFIG_ARCH_PNX4008 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -CONFIG_ARCH_S3C2410=y -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -CONFIG_PLAT_S3C24XX=y -CONFIG_CPU_S3C244X=y -# CONFIG_S3C2410_BOOT_WATCHDOG is not set -CONFIG_S3C2410_BOOT_ERROR_RESET=y -CONFIG_S3C2410_PM_DEBUG=y -# CONFIG_S3C2410_PM_CHECK is not set -CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set -CONFIG_MACH_SMDK=y - -# -# S3C2400 Machines -# -CONFIG_CPU_S3C2410=y -CONFIG_CPU_S3C2410_DMA=y -CONFIG_S3C2410_PM=y -CONFIG_S3C2410_GPIO=y -CONFIG_S3C2410_CLOCK=y - -# -# S3C2410 Machines -# -# CONFIG_ARCH_SMDK2410 is not set -# CONFIG_ARCH_H1940 is not set -# CONFIG_MACH_N30 is not set -# CONFIG_ARCH_BAST is not set -# CONFIG_MACH_OTOM is not set -# CONFIG_MACH_AML_M5900 is not set -# CONFIG_MACH_VR1000 is not set -# CONFIG_MACH_QT2410 is not set -CONFIG_MACH_NEO1973_GTA01=y - -# -# S3C2412 Machines -# -# CONFIG_MACH_SMDK2413 is not set -# CONFIG_MACH_VSTMS is not set -CONFIG_CPU_S3C2440=y -CONFIG_S3C2440_DMA=y - -# -# S3C2440 Machines -# -# CONFIG_MACH_ANUBIS is not set -# CONFIG_MACH_OSIRIS is not set -# CONFIG_MACH_RX3715 is not set -CONFIG_ARCH_S3C2440=y -# CONFIG_MACH_NEXCODER_2440 is not set -CONFIG_SMDK2440_CPU2440=y -CONFIG_MACH_HXD8=y - -# -# S3C2442 Machines -# -# CONFIG_SMDK2440_CPU2442 is not set - -# -# S3C2443 Machines -# -# CONFIG_MACH_SMDK2443 is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4T=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 -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=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 -# CONFIG_OUTER_CACHE is not set - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=200 -CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE=" ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug" -# CONFIG_XIP_KERNEL is not set -CONFIG_KEXEC=y - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -# CONFIG_FPE_NWFPE is not set -CONFIG_FPE_FASTFPE=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=m - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_LEGACY is not set -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM_EMULATION=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -CONFIG_XFRM_MIGRATE=y -CONFIG_NET_KEY=m -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_MULTIPATH is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -CONFIG_TCP_MD5SIG=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NF_CONNTRACK_ENABLED=m -CONFIG_NF_CONNTRACK_SUPPORT=y -# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_ACCT=y -CONFIG_NF_CONNTRACK_MARK=y -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CT_PROTO_SCTP=m -# CONFIG_NF_CONNTRACK_AMANDA is not set -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m - -# -# IP: Netfilter Configuration -# -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -# CONFIG_IP_NF_MATCH_RECENT is not set -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_TFTP=m -# CONFIG_NF_NAT_AMANDA is not set -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_NF_CONNTRACK_IPV6=m -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -# CONFIG_IP6_NF_RAW is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -CONFIG_LLC=y -# 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_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_FIFO=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -# CONFIG_NET_CLS_POLICE is not set -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -# CONFIG_BT_HCIUART is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set -CONFIG_FIB_RULES=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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=y -CONFIG_MTD_NAND_VERIFY_WRITE=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_MTD_NAND_S3C2410_BBT=y -# CONFIG_MTD_NAND_S3C2410_DEBUG is not set -CONFIG_MTD_NAND_S3C2410_HWECC=y -CONFIG_MTD_NAND_S3C2410_CLKSTOP=y -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNPACPI is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -# CONFIG_SCSI_TGT is not set -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -CONFIG_SCSI_SCAN_ASYNC=y - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_STOWAWAY=m -CONFIG_KEYBOARD_GPIO=m -CONFIG_KEYBOARD_GTA01=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -CONFIG_TOUCHSCREEN_S3C2410=y -# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_UCB1400 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_NR_TTY_DEVICES=4 -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_S3C2410=y -CONFIG_SERIAL_S3C2410_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=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_S3C2410_WATCHDOG=m - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TS0710_MUX is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_S3C2410=y -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -CONFIG_SENSORS_PCF50606=y -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_SENSORS_TSL256X is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y -CONFIG_SPI_S3C24XX=y -CONFIG_SPI_S3C24XX_GPIO=y - -# -# SPI Protocol Masters -# -# CONFIG_SPI_AT25 is not set -CONFIG_SPI_SLAVE_JBT6K74=y - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1029 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F 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_LM70 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_PC87427 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83793 is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multifunction device drivers -# -# CONFIG_MFD_SM501 is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# -# CONFIG_LEDS_S3C24XX is not set -CONFIG_LEDS_GTA01=y - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_GTA01=y -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_S3C2410=y -CONFIG_FB_S3C2410_DEBUG=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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -CONFIG_FONT_6x11=y -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 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=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# SoC audio support -# -CONFIG_SND_SOC=y - -# -# SoC Platforms -# - -# -# SoC Audio for the Atmel AT91 -# - -# -# SoC Audio for the Freescale i.MX -# - -# -# SoC Audio for the Intel PXA2xx -# - -# -# SoC Audio for the Samsung S3C24XX -# -CONFIG_SND_S3C24XX_SOC=y -CONFIG_SND_S3C24XX_SOC_I2S=y -CONFIG_SND_S3C24XX_SOC_SMDK2440=m -CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=y -CONFIG_SND_SOC_WM8753=y -CONFIG_SND_SOC_UDA1380=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=m -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set -CONFIG_USB_GTCO=m - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET_MII=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRCABLE=m -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_MOS7720=m -CONFIG_USB_SERIAL_MOS7840=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -CONFIG_USB_BERRY_CHARGE=m -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TRANCEVIBRATOR=m -CONFIG_USB_IOWARRIOR=m -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -CONFIG_USB_GADGET_S3C2410=y -CONFIG_USB_S3C2410=y -# CONFIG_USB_S3C2410_DEBUG is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_S3C=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set -CONFIG_RTC_DEBUG=y - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -CONFIG_RTC_DRV_S3C=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_XFS_RT is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -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_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# 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_YAFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR 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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# 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=m -CONFIG_NLS_CODEPAGE_950=m -# 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=m -# 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=m - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set -CONFIG_DEBUG_S3C2410_PORT=y -CONFIG_DEBUG_S3C2410_UART=0 - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_LRW=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_FCRYPT=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_CAMELLIA=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y diff --git a/packages/linux/linux-gta01/defconfig-2.6.21.3-fic-gta01 b/packages/linux/linux-gta01/defconfig-2.6.21.3-fic-gta01 new file mode 100644 index 0000000000..16b2ac1dab --- /dev/null +++ b/packages/linux/linux-gta01/defconfig-2.6.21.3-fic-gta01 @@ -0,0 +1,1857 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21.3 +# Mon Jun 11 18:32:32 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +# CONFIG_GENERIC_TIME is not set +CONFIG_MMU=y +CONFIG_NO_IOPORT=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-moko10" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=m +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=m +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +CONFIG_ARCH_S3C2410=y +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +CONFIG_PLAT_S3C24XX=y +CONFIG_CPU_S3C244X=y +# CONFIG_S3C2410_BOOT_WATCHDOG is not set +CONFIG_S3C2410_BOOT_ERROR_RESET=y +CONFIG_S3C2410_PM_DEBUG=y +# CONFIG_S3C2410_PM_CHECK is not set +CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 +CONFIG_S3C2410_DMA=y +# CONFIG_S3C2410_DMA_DEBUG is not set +CONFIG_MACH_SMDK=y + +# +# S3C2400 Machines +# +CONFIG_CPU_S3C2410=y +CONFIG_CPU_S3C2410_DMA=y +CONFIG_S3C2410_PM=y +CONFIG_S3C2410_GPIO=y +CONFIG_S3C2410_CLOCK=y + +# +# S3C2410 Machines +# +# CONFIG_ARCH_SMDK2410 is not set +# CONFIG_ARCH_H1940 is not set +# CONFIG_MACH_N30 is not set +# CONFIG_ARCH_BAST is not set +# CONFIG_MACH_OTOM is not set +# CONFIG_MACH_AML_M5900 is not set +# CONFIG_MACH_VR1000 is not set +CONFIG_MACH_QT2410=y +CONFIG_MACH_NEO1973_GTA01=y + +# +# S3C2412 Machines +# +# CONFIG_MACH_SMDK2413 is not set +# CONFIG_MACH_VSTMS is not set +CONFIG_CPU_S3C2440=y +CONFIG_S3C2440_DMA=y + +# +# S3C2440 Machines +# +# CONFIG_MACH_ANUBIS is not set +# CONFIG_MACH_OSIRIS is not set +# CONFIG_MACH_RX3715 is not set +CONFIG_ARCH_S3C2440=y +# CONFIG_MACH_NEXCODER_2440 is not set +CONFIG_SMDK2440_CPU2440=y +CONFIG_MACH_HXD8=y +# CONFIG_MACH_NEO1973_GTA02 is not set + +# +# S3C2442 Machines +# +# CONFIG_SMDK2440_CPU2442 is not set + +# +# S3C2443 Machines +# +# CONFIG_MACH_SMDK2443 is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_ARM920T=y +CONFIG_CPU_32v4T=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 +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=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 +# CONFIG_OUTER_CACHE is not set + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=200 +# CONFIG_AEABI is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySAC0,115200n8 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug" +# CONFIG_XIP_KERNEL is not set +CONFIG_KEXEC=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +CONFIG_FPE_FASTFPE=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +CONFIG_PM_DEBUG=y +CONFIG_DISABLE_CONSOLE_SUSPEND=y +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=m +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_MIGRATE=y +CONFIG_NET_KEY=m +CONFIG_NET_KEY_MIGRATE=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_MULTIPATH is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=m +CONFIG_INET_XFRM_MODE_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=m +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_TCP_MD5SIG=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +# CONFIG_IPV6_MIP6 is not set +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +CONFIG_IPV6_TUNNEL=m +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK_ENABLED=m +CONFIG_NF_CONNTRACK_SUPPORT=y +# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CT_ACCT=y +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +# CONFIG_NF_CONNTRACK_AMANDA is not set +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_TOS=m +# CONFIG_IP_NF_MATCH_RECENT is not set +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +# CONFIG_NF_NAT_AMANDA is not set +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_NF_CONNTRACK_IPV6=m +# CONFIG_IP6_NF_QUEUE is not set +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_HL=m +# CONFIG_IP6_NF_RAW is not set + +# +# Bridge: Netfilter Configuration +# +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_BRIDGE=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +CONFIG_LLC=y +# 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_NET_SCH_CLK_JIFFIES is not set +CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +# CONFIG_NET_CLS_POLICE is not set +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +# CONFIG_IEEE80211 is not set +CONFIG_FIB_RULES=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE 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_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM 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=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND_IDS=y +CONFIG_MTD_NAND_S3C2410=y +CONFIG_MTD_NAND_S3C2410_BBT=y +# CONFIG_MTD_NAND_S3C2410_DEBUG is not set +CONFIG_MTD_NAND_S3C2410_HWECC=y +CONFIG_MTD_NAND_S3C2410_CLKSTOP=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_UB=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +CONFIG_NET_PCI=y +CONFIG_CS89x0=m + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=m + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_KEYBOARD_STOWAWAY=m +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_GTA01=y +CONFIG_KEYBOARD_QT2410=y +CONFIG_INPUT_MOUSE=y +# CONFIG_MOUSE_PS2 is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +CONFIG_TOUCHSCREEN_S3C2410=y +# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_NR_TTY_DEVICES=4 +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_S3C2410=y +CONFIG_SERIAL_S3C2410_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=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_S3C2410_WATCHDOG=m + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TS0710_MUX is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# 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_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +CONFIG_I2C_S3C2410=y +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +CONFIG_SENSORS_PCF50606=y +# CONFIG_SENSORS_PCF50633 is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +CONFIG_SENSORS_TSL256X=m +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_BITBANG=y +CONFIG_SPI_S3C24XX=y +CONFIG_SPI_S3C24XX_GPIO=y + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set +CONFIG_SPI_SLAVE_JBT6K74=y + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F 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_LM70 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_PC87427 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +CONFIG_LEDS_S3C24XX=m +CONFIG_LEDS_GTA01=y + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GTA01=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_S3C2410=y +CONFIG_FB_S3C2410_DEBUG=y +# CONFIG_FB_GLAMO is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +CONFIG_FONT_6x11=y +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 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=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA ARM devices +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=m + +# +# SoC audio support +# +CONFIG_SND_SOC=y + +# +# SoC Platforms +# + +# +# SoC Audio for the Atmel AT91 +# + +# +# SoC Audio for the Freescale i.MX +# + +# +# SoC Audio for the Intel PXA2xx +# + +# +# SoC Audio for the Samsung S3C24XX +# +CONFIG_SND_S3C24XX_SOC=m +CONFIG_SND_S3C24XX_SOC_I2S=m +CONFIG_SND_S3C24XX_SOC_SMDK2440=m +CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m +CONFIG_SND_SOC_WM8753=m +CONFIG_SND_SOC_UDA1380=m + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_LIBUSUAL=y + +# +# USB Input Devices +# +CONFIG_USB_HID=m +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_GTCO=m + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET_MII=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +# CONFIG_USB_SERIAL_DEBUG is not set +CONFIG_USB_EZUSB=y + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +CONFIG_USB_BERRY_CHARGE=m +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +CONFIG_USB_GADGET_S3C2410=y +CONFIG_USB_S3C2410=y +# CONFIG_USB_S3C2410_DEBUG is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_S3C=m + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +CONFIG_RTC_DEBUG=y + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set + +# +# RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +CONFIG_RTC_DRV_S3C=m +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_TEST is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=y +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +CONFIG_CONFIGFS_FS=m + +# +# 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_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set +CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 +# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set +# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set +CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_FS_XATTR 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_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +# CONFIG_ROOT_NFS is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_WEAK_PW_HASH=y +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# 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=m +CONFIG_NLS_CODEPAGE_950=m +# 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=m +# 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=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_LIST is not set +CONFIG_FRAME_POINTER=y +CONFIG_FORCED_INLINING=y +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_USER is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set +CONFIG_DEBUG_S3C2410_PORT=y +CONFIG_DEBUG_S3C2410_UART=0 + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y diff --git a/packages/linux/linux-gta01/defconfig-fic-gta01 b/packages/linux/linux-gta01/defconfig-fic-gta01 deleted file mode 100644 index 40adbcd1a1..0000000000 --- a/packages/linux/linux-gta01/defconfig-fic-gta01 +++ /dev/null @@ -1,1621 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17.14 -# Tue Feb 13 20:26:21 2007 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-moko7" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=m -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=m -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# 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_EP93XX 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_IXP23XX 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=y -# 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_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set - -# -# S3C24XX Implementations -# -# CONFIG_MACH_ANUBIS is not set -# CONFIG_MACH_OSIRIS is not set -# CONFIG_ARCH_BAST is not set -# CONFIG_ARCH_H1940 is not set -# CONFIG_MACH_N30 is not set -# CONFIG_ARCH_SMDK2410 is not set -CONFIG_MACH_QT2410=y -CONFIG_MACH_GTA01=y -# CONFIG_ARCH_S3C2440 is not set -# CONFIG_MACH_VR1000 is not set -# CONFIG_MACH_RX3715 is not set -# CONFIG_MACH_OTOM is not set -# CONFIG_MACH_NEXCODER_2440 is not set -CONFIG_CPU_S3C2410=y - -# -# S3C2410 Boot -# -CONFIG_S3C2410_BOOT_ERROR_RESET=y - -# -# S3C2410 Setup -# -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set -CONFIG_S3C2410_PM_DEBUG=y -CONFIG_S3C2410_PM_CHECK=y -CONFIG_S3C2410_PM_CHECK_CHUNKSIZE=64 -CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 - -# -# 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 - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=200 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySAC0,115200n8 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -# CONFIG_FPE_NWFPE is not set -CONFIG_FPE_FASTFPE=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -CONFIG_PM_DEBUG=y -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -# CONFIG_IP_NF_CONNTRACK_MARK is not set -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -# CONFIG_IP_NF_MATCH_RECENT is not set -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -# CONFIG_IP_NF_TARGET_SAME is not set -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -# CONFIG_IP6_NF_RAW is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -# CONFIG_CLS_U32_MARK is not set -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -# CONFIG_NET_CLS_POLICE is not set -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -# CONFIG_BT_HCIUART is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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=y -CONFIG_MTD_NAND_VERIFY_WRITE=y -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_S3C2410=y -CONFIG_MTD_NAND_S3C2410_BBT=y -# CONFIG_MTD_NAND_S3C2410_DEBUG is not set -# CONFIG_MTD_NAND_S3C2410_HWECC is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_UB=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set -CONFIG_NET_PCI=y -CONFIG_CS89x0=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=m -CONFIG_PPP_MULTILINK=y -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_GTA01=m -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -CONFIG_TOUCHSCREEN_S3C2410=y -# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT 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_S3C2410=y -CONFIG_SERIAL_S3C2410_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -CONFIG_S3C2410_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -# CONFIG_TS0710_MUX is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_PARPORT_LIGHT is not set -CONFIG_I2C_S3C2410=y -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -CONFIG_SENSORS_PCF50606=y -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y -CONFIG_SPI_S3C24XX_GPIO=y -CONFIG_SPI_S3C24XX=y - -# -# SPI Protocol Masters -# -CONFIG_SPI_SLAVE_JBT6K74=y - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID 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_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F 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_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_FIRMWARE_EDID=y -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_S3C2410=y -# CONFIG_FB_S3C2410_DEBUG is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -CONFIG_FONT_6x11=y -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 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=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_DEVICE=y -CONFIG_BACKLIGHT_GTA01=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# - -# -# USB devices -# -# CONFIG_SND_USB_AUDIO is not set - -# -# SoC audio support -# -CONFIG_SND_SOC=y - -# -# Soc Platforms -# - -# -# SoC Audio for the Intel PXA2xx -# - -# -# SoC Audio for the Atmel AT91 -# - -# -# SoC Audio for the Freescale i.MX -# - -# -# SoC Audio for the Samsung S3C24XX -# -CONFIG_SND_S3C24XX_SOC=m -CONFIG_SND_S3C24XX_SOC_I2S=m -CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m - -# -# Soc Codecs -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8750 is not set -CONFIG_SND_SOC_WM8753=m -# CONFIG_SND_SOC_WM8772 is not set -# CONFIG_SND_SOC_WM8971 is not set -# CONFIG_SND_SOC_WM8956 is not set -# CONFIG_SND_SOC_WM8960 is not set -CONFIG_SND_SOC_WM8976=m -# CONFIG_SND_SOC_WM8974 is not set -# CONFIG_SND_SOC_WM8980 is not set -# CONFIG_SND_SOC_WM9713 is not set -# CONFIG_SND_SOC_WM9712 is not set -# CONFIG_SND_SOC_UDA1380 is not set -# CONFIG_SND_SOC_AK4535 is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ANYDATA=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -CONFIG_USB_GADGET_S3C2410=y -CONFIG_USB_S3C2410=y -# CONFIG_USB_S3C2410_DEBUG is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_S3C=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=y -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -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_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# 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=m -CONFIG_JFFS_FS_VERBOSE=0 -# CONFIG_JFFS_PROC_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# 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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# 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 -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# 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=m -CONFIG_NLS_CODEPAGE_950=m -# 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=m -# 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=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_UNWIND_INFO=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_ERRORS is not set -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set -CONFIG_DEBUG_S3C2410_PORT=y -CONFIG_DEBUG_S3C2410_UART=0 - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# 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=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m diff --git a/packages/linux/linux-gta01/udc-nomodule-misccr.patch b/packages/linux/linux-gta01/udc-nomodule-misccr.patch deleted file mode 100644 index 0f84b56c2a..0000000000 --- a/packages/linux/linux-gta01/udc-nomodule-misccr.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: linux-2.6.17.14-fic1/drivers/usb/gadget/s3c2410_udc.c -=================================================================== ---- linux-2.6.17.14-fic1.orig/drivers/usb/gadget/s3c2410_udc.c 2006-11-03 01:22:14.000000000 +0100 -+++ linux-2.6.17.14-fic1/drivers/usb/gadget/s3c2410_udc.c 2006-11-03 12:41:52.000000000 +0100 -@@ -1492,7 +1492,7 @@ - return -ENODEV; - if (udc->driver) - return -EBUSY; -- if (!driver->bind || !driver->unbind || !driver->setup -+ if (!driver->bind || !driver->setup - || driver->speed == USB_SPEED_UNKNOWN) - return -EINVAL; - -@@ -1700,6 +1700,8 @@ - } - dprintk(DEBUG_VERBOSE, "%s: got irq %i\n", gadget_name, IRQ_USBD); - -+ s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST|S3C2410_MISCCR_USBSUSPND0|S3C2410_MISCCR_USBSUSPND1, 0); -+ - #ifdef ENABLE_SYSFS - /* create device files */ - device_create_file(&pdev->dev, &dev_attr_regs); diff --git a/packages/linux/linux-gta01_2.6.17.14.bb b/packages/linux/linux-gta01_2.6.17.14.bb deleted file mode 100644 index 8f3c37753a..0000000000 --- a/packages/linux/linux-gta01_2.6.17.14.bb +++ /dev/null @@ -1,101 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for FIC Neo1973 (GTA01)" -SECTION = "kernel" -AUTHOR = "Harald Welte " -HOMEPAGE = "N/A" -LICENSE = "GPL" -DEPENDS += "uboot-gta01" -MOKOR = "moko7" -PR = "${MOKOR}-r1" - -inherit kernel - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-gta01" -#HWSRC = "http://people.gta01.openmoko.org/laforge/src/kernel/20060806" - -############################################################## -# source and patches -# -SRC_URI = "http://ftp.de.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.14.tar.bz2 \ - svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=https \ - file://defconfig-${MACHINE}" -S = "${WORKDIR}/linux-2.6.17.14" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_MACHINE = 'fic-gta01' - -CMDLINE_CON = "console=ttySAC0,115200n8" -#CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG}" - -############################################################### -# module configs specific to this kernel -# -module_autoload_ohci-hcd = "ohci-hcd" -module_autoload_g_ether = "g_ether" -#module_autoload_snd-pcm-oss = "snd-pcm-oss" -#module_autoload_snd-soc-corgi_c7x0 = "snd-soc-s3c24xx" - -do_prepatch() { - mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av - rm -Rf patches .pc -} - -do_configure() { - #install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# put into deploy directory and append u-boot header -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib - arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin - rm -f linux.bin.gz - gzip -9 linux.bin - uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin - rm -f linux.bin.gz -} - -do_deploy[dirs] = "${S}" - -addtask prepatch before do_patch after do_unpack -addtask deploy before do_package after do_install - diff --git a/packages/linux/linux-gta01_2.6.17.7.bb b/packages/linux/linux-gta01_2.6.17.7.bb deleted file mode 100644 index cf4bfeb8ea..0000000000 --- a/packages/linux/linux-gta01_2.6.17.7.bb +++ /dev/null @@ -1,97 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for FIC GTA01" -SECTION = "kernel" -AUTHOR = "Harald Welte " -HOMEPAGE = "N/A" -LICENSE = "GPL" -DEPENDS += "uboot-gta01" -PR = "r4" - -inherit kernel - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-gta01" -HWSRC = "http://people.gta01.hmw-consulting.de/laforge/src/kernel/20060806" - -############################################################## -# source and patches -# -SRC_URI = "http://people.gta01.hmw-consulting.de/laforge/tmp/linux-2.6.17.7-gta01-lcm.tar.bz2 \ - file://defconfig-${MACHINE}" -S = "${WORKDIR}/linux-2.6.17.7-new" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_MACHINE = 'fic-gta01' - -CMDLINE_CON = "console=ttySAC0,115200n8" -#CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG}" - -############################################################### -# module configs specific to this kernel -# -#module_autoload_pxaficp_ir = "pxaficp_ir" -#module_autoload_snd-pcm-oss = "snd-pcm-oss" - -do_prepatch() { - mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av - rm -Rf patches .pc -} - -do_configure() { - #install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# put into deploy directory and append u-boot header -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${MACHINE}.tgz -C ${D} lib - arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin - rm -f linux.bin.gz - gzip -9 linux.bin - uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "Kernel Image QT2410" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${MACHINE}-${DATETIME}.bin - rm -f linux.bin.gz -} - -do_deploy[dirs] = "${S}" - -addtask prepatch before do_patch after do_unpack -addtask deploy before do_package after do_install - diff --git a/packages/linux/linux-gta01_2.6.20.bb b/packages/linux/linux-gta01_2.6.20.bb deleted file mode 100644 index 2c8fe80b33..0000000000 --- a/packages/linux/linux-gta01_2.6.20.bb +++ /dev/null @@ -1,102 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for FIC Neo1973 (GTA01)" -SECTION = "kernel" -AUTHOR = "Harald Welte " -HOMEPAGE = "N/A" -LICENSE = "GPL" -DEPENDS += "u-boot-mkimage-gta01-native" -MOKOR = "moko8" -PR = "${MOKOR}-r2" - -VANILLA_VERSION = "2.6.20" - -inherit kernel - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-gta01" - -############################################################## -# source and patches -# -SRC_URI = "http://ftp.de.kernel.org/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.tar.bz2 \ - svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http \ - file://defconfig-${VANILLA_VERSION}-${MACHINE}" -S = "${WORKDIR}/linux-${VANILLA_VERSION}" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_MACHINE = 'fic-gta01' - -CMDLINE_CON = "" -#CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG}" - -############################################################### -# module configs specific to this kernel -# -module_autoload_ohci-hcd = "ohci-hcd" -module_autoload_g_ether = "g_ether" -#module_autoload_snd-pcm-oss = "snd-pcm-oss" -#module_autoload_snd-soc-corgi_c7x0 = "snd-soc-s3c24xx" - -do_prepatch() { - mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av - rm -Rf patches .pc -} - -do_configure() { - #install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${VANILLA_VERSION}-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${VANILLA_VERSION}-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# put into deploy directory and append u-boot header -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib - ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin - rm -f linux.bin.gz - gzip -9 linux.bin - uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin - rm -f linux.bin.gz -} - -do_deploy[dirs] = "${S}" - -addtask prepatch before do_patch after do_unpack -addtask deploy before do_package after do_install - diff --git a/packages/linux/linux-gta01_2.6.21.1.bb b/packages/linux/linux-gta01_2.6.21.1.bb deleted file mode 100644 index a9bf11126b..0000000000 --- a/packages/linux/linux-gta01_2.6.21.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -require linux-gta01.inc - -DEFAULT_PREFERENCE = "-6" - -MOKOR = "moko10" -PR = "${MOKOR}-r0" -VANILLA_VERSION = "2.6.21.1" - -SRC_URI += "svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http" - diff --git a/packages/linux/linux-gta01_2.6.21.3.bb b/packages/linux/linux-gta01_2.6.21.3.bb new file mode 100644 index 0000000000..cccc4dd6a1 --- /dev/null +++ b/packages/linux/linux-gta01_2.6.21.3.bb @@ -0,0 +1,10 @@ +require linux-gta01.inc + +SRC_URI += "svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http" +SRC_URI += "file://fix-EVIOCGRAB-semantics.patch;patch=1" + +MOKOR = "moko10" +PR = "${MOKOR}-r3" + +VANILLA_VERSION = "2.6.21.3" + -- cgit v1.2.3 From 58e05a60e40da361733c66906cd3a26cf5b75097 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Fri, 22 Jun 2007 03:22:29 +0000 Subject: linux-gta01: update .inc --- packages/linux/linux-gta01.inc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'packages') diff --git a/packages/linux/linux-gta01.inc b/packages/linux/linux-gta01.inc index ee3c09e908..a338c6e9dc 100644 --- a/packages/linux/linux-gta01.inc +++ b/packages/linux/linux-gta01.inc @@ -3,7 +3,7 @@ SECTION = "kernel" AUTHOR = "Harald Welte " HOMEPAGE = "N/A" LICENSE = "GPL" -DEPENDS += "u-boot-mkimage-gta01-native" +DEPENDS += "quilt-native uboot-gta01" inherit kernel @@ -12,7 +12,7 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-gta01" ############################################################## # source and patches # -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.tar.bz2 \ +SRC_URI = "http://ftp.de.kernel.org/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.tar.bz2 \ file://defconfig-${VANILLA_VERSION}-${MACHINE}" S = "${WORKDIR}/linux-${VANILLA_VERSION}" @@ -22,9 +22,10 @@ S = "${WORKDIR}/linux-${VANILLA_VERSION}" FILES_kernel-image = "" ALLOW_EMPTY = "1" +COMPATIBLE_HOST = "arm.*-linux" COMPATIBLE_MACHINE = 'fic-gta01' -CMDLINE_CON = "" +CMDLINE_CON = "console=ttySAC0,115200n8" #CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" # uncomment if you want to boot over NFS #CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" @@ -37,10 +38,15 @@ CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDL ############################################################### # module configs specific to this kernel # + +# usb module_autoload_ohci-hcd = "ohci-hcd" +module_autoload_hci_usb = "hci_usb" module_autoload_g_ether = "g_ether" -#module_autoload_snd-pcm-oss = "snd-pcm-oss" -#module_autoload_snd-soc-corgi_c7x0 = "snd-soc-s3c24xx" +# audio +module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-neo1973-wm8753" +# sd/mmc +module_autoload_s3cmci = "s3cmci" do_prepatch() { mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av @@ -48,6 +54,8 @@ do_prepatch() { } do_configure() { + #install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm + if [ ! -e ${WORKDIR}/defconfig-${VANILLA_VERSION}-${MACHINE} ]; then die "No default configuration for ${MACHINE} available." fi @@ -79,12 +87,12 @@ do_configure() { # do_deploy() { install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin + install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib - ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin + arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin rm -f linux.bin.gz gzip -9 linux.bin - uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin + ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin rm -f linux.bin.gz } -- cgit v1.2.3 From e3a8f3cae69897452d0d1f98b3130060ab81a497 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Fri, 22 Jun 2007 03:54:59 +0000 Subject: linux-gta01: add missing patch, make it build --- packages/linux/linux-gta01.inc | 2 +- .../linux-gta01/fix-EVIOCGRAB-semantics.patch | 97 ++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch (limited to 'packages') diff --git a/packages/linux/linux-gta01.inc b/packages/linux/linux-gta01.inc index a338c6e9dc..915e5633af 100644 --- a/packages/linux/linux-gta01.inc +++ b/packages/linux/linux-gta01.inc @@ -89,7 +89,7 @@ do_deploy() { install -d ${DEPLOY_DIR_IMAGE} install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib - arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin + ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin rm -f linux.bin.gz gzip -9 linux.bin ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin diff --git a/packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch b/packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch new file mode 100644 index 0000000000..3c96faa271 --- /dev/null +++ b/packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch @@ -0,0 +1,97 @@ +diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c +index 12c7ab8..c7e741b 100644 +--- a/drivers/input/evdev.c ++++ b/drivers/input/evdev.c +@@ -29,7 +29,7 @@ struct evdev { + char name[16]; + struct input_handle handle; + wait_queue_head_t wait; +- struct evdev_list *grab; ++ int grab; + struct list_head list; + }; + +@@ -37,6 +37,7 @@ struct evdev_list { + struct input_event buffer[EVDEV_BUFFER_SIZE]; + int head; + int tail; ++ int grab; + struct fasync_struct *fasync; + struct evdev *evdev; + struct list_head node; +@@ -49,8 +50,7 @@ static void evdev_event(struct input_han + struct evdev *evdev = handle->private; + struct evdev_list *list; + +- if (evdev->grab) { +- list = evdev->grab; ++ list_for_each_entry(list, &evdev->list, node) { + + do_gettimeofday(&list->buffer[list->head].time); + list->buffer[list->head].type = type; +@@ -59,17 +59,7 @@ static void evdev_event(struct input_han + list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1); + + kill_fasync(&list->fasync, SIGIO, POLL_IN); +- } else +- list_for_each_entry(list, &evdev->list, node) { +- +- do_gettimeofday(&list->buffer[list->head].time); +- list->buffer[list->head].type = type; +- list->buffer[list->head].code = code; +- list->buffer[list->head].value = value; +- list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1); +- +- kill_fasync(&list->fasync, SIGIO, POLL_IN); +- } ++ } + + wake_up_interruptible(&evdev->wait); + } +@@ -104,9 +94,10 @@ static int evdev_release(struct inode * + { + struct evdev_list *list = file->private_data; + +- if (list->evdev->grab == list) { +- input_release_device(&list->evdev->handle); +- list->evdev->grab = NULL; ++ if (list->grab) { ++ if(!--list->evdev->grab && list->evdev->exist) ++ input_release_device(&list->evdev->handle); ++ list->grab = 0; + } + + evdev_fasync(-1, file, 0); +@@ -483,17 +474,19 @@ static long evdev_ioctl_handler(struct f + + case EVIOCGRAB: + if (p) { +- if (evdev->grab) +- return -EBUSY; +- if (input_grab_device(&evdev->handle)) ++ if (list->grab) + return -EBUSY; +- evdev->grab = list; ++ if (!evdev->grab++) ++ if (input_grab_device(&evdev->handle)) ++ return -EBUSY; ++ list->grab = 0; + return 0; + } else { +- if (evdev->grab != list) ++ if (!list->grab) + return -EINVAL; +- input_release_device(&evdev->handle); +- evdev->grab = NULL; ++ if (!--evdev->grab) ++ input_release_device(&evdev->handle); ++ list->grab = 0; + return 0; + } + +- +To unsubscribe from this list: send the line "unsubscribe linux-kernel" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html +Please read the FAQ at http://www.tux.org/lkml/ + -- cgit v1.2.3 From 5d946375b12e7f15a42f47cdf922f170dce9c718 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 22 Jun 2007 06:59:19 +0000 Subject: u-boot-mkimage-gta01-native: re-add till uboot-utils actually works --- .../u-boot-mkimage-gta01-native/.mtn2git_empty | 0 .../bbt-create-optional.patch | 52 + .../bbt-scan-second.patch | 69 + .../boot-from-ram-and-nand.patch | 98 + .../boot-from-ram-reloc.patch | 62 + .../u-boot-mkimage-gta01-native/boot-menu.patch | 769 ++++ .../u-boot-mkimage-gta01-native/cmd-unzip.patch | 58 + .../u-boot-mkimage-gta01-native/console-ansi.patch | 127 + .../u-boot-mkimage-gta01-native/default-env.patch | 101 + .../u-boot-mkimage-gta01-native/dontask.patch | 22 + .../dynenv-harden.patch | 139 + .../early-powerdown.patch | 40 + .../enable-splash-bmp.patch | 56 + .../u-boot-mkimage-gta01-native/env_nand_oob.patch | 198 + .../u-boot-mkimage-gta01-native/ext2load_hex.patch | 17 + .../u-boot-mkimage-gta01-native/lowlevel_foo.patch | 229 ++ .../mmcinit-power-up.patch | 73 + .../nand-badisbad.patch | 30 + .../nand-createbbt.patch | 126 + .../nand-dynamic_partitions.patch | 354 ++ .../u-boot-mkimage-gta01-native/nand-otp.patch | 302 ++ .../nand-read_write_oob.patch | 23 + .../neo1973-chargefast.patch | 316 ++ .../preboot-override.patch | 137 + .../u-boot-mkimage-gta01-native/raise-limits.patch | 31 + packages/uboot/u-boot-mkimage-gta01-native/series | 76 + .../splashimage-command.patch | 24 + .../uboot-20061030-neo1973.patch | 2248 +++++++++++ .../uboot-20061030-qt2410.patch | 1233 ++++++ .../uboot-arm920_s3c2410_irq_demux.patch | 56 + .../uboot-arm920t-gd_in_irq.patch | 28 + .../uboot-bbt-quiet.patch | 43 + .../uboot-cmd_s3c2410.patch | 175 + .../uboot-cramfs_but_no_jffs2.patch | 41 + .../u-boot-mkimage-gta01-native/uboot-dfu.patch | 2081 ++++++++++ .../u-boot-mkimage-gta01-native/uboot-gta02.patch | 1560 ++++++++ .../u-boot-mkimage-gta01-native/uboot-hxd8.patch | 1169 ++++++ .../uboot-license.patch | 712 ++++ .../uboot-machtypes.patch | 4121 ++++++++++++++++++++ .../uboot-mokoversion.patch | 10 + .../uboot-nand-markbad-reallybad.patch | 20 + .../uboot-neo1973-defaultenv.patch | 31 + .../uboot-neo1973-resume.patch | 113 + .../uboot-s3c2410-misccr-definitions.patch | 45 + .../uboot-s3c2410-mmc.patch | 818 ++++ .../uboot-s3c2410-nand.patch | 525 +++ .../uboot-s3c2410-norelocate_irqvec_cpy.patch | 32 + .../uboot-s3c2410-warnings-fix.patch | 98 + .../uboot-s3c2410_fb.patch | 215 + .../uboot-s3c2410_udc.patch | 1263 ++++++ .../uboot-s3c2440.patch | 1301 ++++++ .../uboot-s3c2443.patch | 256 ++ .../uboot-smdk2440.patch | 1481 +++++++ .../uboot-smdk2443.patch | 1411 +++++++ .../uboot-strtoul.patch | 43 + .../uboot-usbtty-acm.patch | 1607 ++++++++ .../u-boot-mkimage-gta01-native/unbusy-i2c.patch | 88 + .../usbdcore-multiple_configs.patch | 63 + .../wakeup-reason-nand-only.patch | 68 + packages/uboot/u-boot-mkimage-gta01-native_oe.bb | 83 + packages/uboot/u-boot_1.1.4.bb | 4 + 61 files changed, 26571 insertions(+) create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/default-env.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/dontask.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/series create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch create mode 100644 packages/uboot/u-boot-mkimage-gta01-native_oe.bb (limited to 'packages') diff --git a/packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty b/packages/uboot/u-boot-mkimage-gta01-native/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch b/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch new file mode 100644 index 0000000000..d7a2a872e5 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch @@ -0,0 +1,52 @@ +This patch makes creation of the BBT optional for the s3c24x0 platform. +It adds: + +- a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT +- one user of this flag, namely s3c24x0 + +Experimental. + +- Werner Almesberger + + +Index: u-boot/cpu/arm920t/s3c24x0/nand.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:29.000000000 +0100 ++++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-02-16 23:53:54.000000000 +0100 +@@ -169,7 +169,7 @@ + + nand->eccmode = NAND_ECC_SOFT; + #ifdef CONFIG_S3C2410_NAND_BBT +- nand->options = NAND_USE_FLASH_BBT; ++ nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; + #else + nand->options = 0; + #endif +Index: u-boot/drivers/nand/nand_bbt.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:36.000000000 +0100 ++++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 +@@ -678,7 +678,8 @@ + } + create: + /* Create the bad block table by scanning the device ? */ +- if (!(td->options & NAND_BBT_CREATE)) ++ if (!(td->options & NAND_BBT_CREATE) || ++ (this->options & NAND_DONT_CREATE_BBT)) + continue; + + /* Create the table in memory by scanning the chip(s) */ +Index: u-boot/include/linux/mtd/nand.h +=================================================================== +--- u-boot.orig/include/linux/mtd/nand.h 2007-02-16 23:53:08.000000000 +0100 ++++ u-boot/include/linux/mtd/nand.h 2007-02-16 23:53:54.000000000 +0100 +@@ -187,7 +187,8 @@ + * This can only work if we have the ecc bytes directly behind the + * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ + #define NAND_HWECC_SYNDROME 0x00020000 +- ++/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */ ++#define NAND_DONT_CREATE_BBT 0x00040000 + + /* Options set by nand scan */ + /* Nand scan has allocated oob_buf */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch b/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch new file mode 100644 index 0000000000..37b2807908 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch @@ -0,0 +1,69 @@ +Scan also the second OOB page for bad block information. + +board/neo1973/gta01/nand.c (board_nand_init): added board-specific badblock + pattern which sets NAND_BBT_SCAN2NDPAGE +drivers/nand/nand_base.c (nand_block_bad): also consider the second page in a + block if NAND_BBT_SCAN2NDPAGE is set + +- Werner Almesberger + +Index: u-boot/board/neo1973/gta01/nand.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/nand.c ++++ u-boot/board/neo1973/gta01/nand.c +@@ -113,9 +113,23 @@ + } + + ++/* Derived from drivers/nand/nand_bbt.c:smallpage_flashbased */ ++ ++static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; ++ ++static struct nand_bbt_descr badblock_pattern = { ++ .options = ++ NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES | NAND_BBT_SCAN2NDPAGE, ++ .offs = 5, ++ .len = 1, ++ .pattern = scan_ff_pattern ++}; ++ ++ + int board_nand_init(struct nand_chip *nand) + { + nand->read_otp = samsung_nand_read_otp; + nand->write_otp = samsung_nand_write_otp; ++ nand->badblock_pattern = &badblock_pattern; + return s3c24x0_nand_init(nand); + } +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c ++++ u-boot/drivers/nand/nand_base.c +@@ -421,7 +421,7 @@ + * + * Check, if the block is bad. + */ +-static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) ++static int nand_block_bad_page(struct mtd_info *mtd, loff_t ofs, int getchip) + { + int page, chipnr, res = 0; + struct nand_chip *this = mtd->priv; +@@ -460,6 +460,18 @@ + return res; + } + ++static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) ++{ ++ struct nand_chip *this = mtd->priv; ++ ++ if (nand_block_bad_page(mtd, ofs, getchip)) ++ return 1; ++ if (this->badblock_pattern->options & NAND_BBT_SCAN2NDPAGE && ++ nand_block_bad_page(mtd, ofs+(1 << this->page_shift), getchip)) ++ return 1; ++ return 0; ++} ++ + /** + * nand_default_block_markbad - [DEFAULT] mark a block bad + * @mtd: MTD device structure diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch new file mode 100644 index 0000000000..fa0de39ab7 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch @@ -0,0 +1,98 @@ +Auto-detect whether we're booting from RAM or NAND, and act accordingly. This +allows us to use the same u-boot binary for all boot modes. + +include/configs/neo1973.h: introduced new config option + CONFIG_LL_INIT_NAND_ONLY to perform low-level initialization only when + booting from NAND +include/configs/neo1973.h: got rid of BUILD_FOR_RAM +cpu/arm920t/start.S: detect if we need to boot from NAND at run time (i.e., if + we're running at address 0) + +- Werner Almesberger + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -157,18 +157,26 @@ + str r1, [r0] + #endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ + +- /* +- * we do sys-critical inits only at reboot, +- * not when booting from ram! +- */ + #ifndef CONFIG_SKIP_LOWLEVEL_INIT ++#ifndef CONFIG_LL_INIT_NAND_ONLY + bl cpu_init_crit + #endif ++#endif + + #ifndef CONFIG_SKIP_RELOCATE_UBOOT +-#ifndef CONFIG_S3C2410_NAND_BOOT +-relocate: /* relocate U-Boot to RAM */ + adr r0, _start /* r0 <- current position of code */ ++ ++#ifdef CONFIG_S3C2410_NAND_BOOT ++ /* are we running from NAND ? */ ++#define BWSCON 0x48000000 ++ ldr r1, =BWSCON /* Z = CPU booted from NAND */ ++ ldr r1, [r1] ++ tst r1, #6 /* BWSCON[2:1] = OM[1:0] */ ++ teqeq r0, #0 /* Z &= running at address 0 */ ++ beq nand_load ++#endif /* CONFIG_S3C2410_NAND_BOOT */ ++ ++relocate: /* relocate U-Boot to RAM */ + ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ + cmp r0, r1 /* don't reloc during debug */ + beq done_relocate +@@ -188,10 +196,13 @@ + ldr pc, _done_relocate /* jump to relocated code */ + _done_relocate: + .word done_relocate +-done_relocate: +-#else /* NAND_BOOT */ +-relocate: +-copy_myself: ++ ++#ifdef CONFIG_S3C2410_NAND_BOOT ++nand_load: ++#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) ++ bl cpu_init_crit ++#endif ++ + /* mov r10, lr */ + + @ reset NAND +@@ -275,7 +286,8 @@ + #endif + 1: b 1b + done_nand_read: +-#endif /* NAND_BOOT */ ++#endif /* CONFIG_S3C2410_NAND_BOOT */ ++done_relocate: + #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ + + /* Set up the stack */ +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -26,14 +26,10 @@ + #ifndef __CONFIG_H + #define __CONFIG_H + +-#if defined(BUILD_FOR_RAM) +-/* If we want to start u-boot from inside RAM */ +-#define CONFIG_SKIP_LOWLEVEL_INIT 1 +-#else +-/* we want to start u-boot directly from within NAND flash */ ++/* we want to be able to start u-boot directly from within NAND flash */ ++#define CONFIG_LL_INIT_NAND_ONLY + #define CONFIG_S3C2410_NAND_BOOT 1 + #define CONFIG_S3C2410_NAND_SKIP_BAD 1 +-#endif + + #define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch new file mode 100644 index 0000000000..53a3e05c67 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch @@ -0,0 +1,62 @@ +This patch allows us to boot from anywhere in RAM. It mainly sets the stage +for later patches. The only real changes here is the better handling of already +cached code (e.g., if we were started by a previous instance of u-boot), and +that we drop CONFIG_SKIP_RELOCATE_UBOOT from neo1973.h + +cpu/arm920t/start.S: if not relocating, instead of going straight to + stack_setup, jump to done_relocate, which may perform other setup tasks +cpu/arm920t/start.S: after relocating, flush the cache and jump to the new code +include/configs/neo1973.h: remove CONFIG_SKIP_RELOCATE_UBOOT + +- Werner Almesberger + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -171,7 +171,7 @@ relocate: /* relocate U-Boot to RAM + adr r0, _start /* r0 <- current position of code */ + ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ + cmp r0, r1 /* don't reloc during debug */ +- beq stack_setup ++ beq done_relocate + + ldr r2, _armboot_start + ldr r3, _bss_start +@@ -181,8 +181,14 @@ relocate: /* relocate U-Boot to RAM + copy_loop: + ldmia r0!, {r3-r10} /* copy from source address [r0] */ + stmia r1!, {r3-r10} /* copy to target address [r1] */ +- cmp r0, r2 /* until source end addreee [r2] */ ++ cmp r0, r2 /* until source end address [r2] */ + ble copy_loop ++ mov r0, #0 /* flush v3/v4 cache */ ++ mcr p15, 0, r0, c7, c7, 0 ++ ldr pc, _done_relocate /* jump to relocated code */ ++_done_relocate: ++ .word done_relocate ++done_relocate: + #else /* NAND_BOOT */ + relocate: + copy_myself: +@@ -270,7 +276,7 @@ notmatch: + 1: b 1b + done_nand_read: + #endif /* NAND_BOOT */ +-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ ++#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ + + /* Set up the stack */ + stack_setup: +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -28,7 +28,6 @@ + + #if defined(BUILD_FOR_RAM) + /* If we want to start u-boot from inside RAM */ +-#define CONFIG_SKIP_RELOCATE_UBOOT 1 + #define CONFIG_SKIP_LOWLEVEL_INIT 1 + #else + /* we want to start u-boot directly from within NAND flash */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch b/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch new file mode 100644 index 0000000000..352967ae06 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch @@ -0,0 +1,769 @@ +board/neo1973/bootmenu.c: simple configurable boot menu +board/neo1973/neo1973.c (neo1973_new_second): return 1 if a new second has + started since the last call +board/neo1973/neo1973.c (neo1973_on_key_pressed): return 1 if the $POWER key is + pressed +board/neo1973/neo1973.c (board_late_init): make use of neo1973_new_second and + neo1973_on_key_pressed +board/neo1973/neo1973.h: added function prototypes +u-boot/board/neo1973/neo1973.c (board_late_init): enter the boot menu when + "AUX" was pressed at least half the time +u-boot/board/neo1973/neo1973.c (board_late_init): minor code cleanup +u-boot/common/console.c, include/console.h: added "console_poll_hook" to be + called when waiting for console in put in "getc" and "tstc" +board/neo1973/neo1973.c (board_late_init): poll for the boot menu also on RAM + boot, reset, or unknown cause +board/neo1973/neo1973.c (board_late_init): don't look for the power key if + woken up by the charger +board/neo1973/neo1973.h, board/neo1973/neo1973.c, board/neo1973/bootmenu.c: + renamed neo1973_911_key_pressed to neo1973_aux_key_pressed + +- Werner Almesberger + +Index: u-boot/board/neo1973/common/bootmenu.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/bootmenu.c +@@ -0,0 +1,120 @@ ++/* ++ * bootmenu.c - Boot menu ++ * ++ * Copyright (C) 2006-2007 by OpenMoko, Inc. ++ * Written by Werner Almesberger ++ * All Rights Reserved ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++ ++#include ++#include ++#include ++#include ++ ++#ifdef CONFIG_USBD_DFU ++#include "usbdcore.h" ++#include "usb_dfu.h" ++#endif ++ ++#include "neo1973.h" ++ ++ ++#define DEBOUNCE_LOOPS 1000 /* wild guess */ ++ ++ ++static int debounce(int (*fn)(void), int *last) ++{ ++ int on, i; ++ ++again: ++ on = fn(); ++ if (on != *last) ++ for (i = DEBOUNCE_LOOPS; i; i--) ++ if (on != fn()) ++ goto again; ++ *last = on; ++ return on; ++} ++ ++ ++static int aux_key(void *user) ++{ ++ static int last_aux = -1; ++ ++ return debounce(neo1973_aux_key_pressed, &last_aux); ++} ++ ++ ++static int on_key(void *user) ++{ ++ static int last_on = -1; ++ ++ return debounce(neo1973_on_key_pressed, &last_on); ++} ++ ++ ++static void factory_reset(void *user) ++{ ++ default_env(); ++ run_command("dynpart", 0); ++ run_command("bootd", 0); ++} ++ ++ ++static int seconds(void *user) ++{ ++ return neo1973_new_second(); ++} ++ ++ ++static int system_idle(void) ++{ ++#ifdef CONFIG_USBD_DFU ++ if (system_dfu_state) ++ return *system_dfu_state == DFU_STATE_appIDLE; ++#endif ++ return 1; ++} ++ ++ ++static void poweroff_if_idle(void *user) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ if (system_idle()) ++ neo1973_poweroff(); ++ local_irq_restore(flags); ++} ++ ++ ++static struct bootmenu_setup bootmenu_setup = { ++ .next_key = aux_key, ++ .enter_key = on_key, ++ .seconds = seconds, ++ .idle_action = poweroff_if_idle, ++}; ++ ++ ++void neo1973_bootmenu(void) ++{ ++ bootmenu_add("Boot", NULL, "bootd"); ++ bootmenu_init(&bootmenu_setup); ++ bootmenu_add("Factory reset", factory_reset, NULL); ++ bootmenu(); ++} +Index: u-boot/board/neo1973/gta01/gta01.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/gta01.c ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -229,10 +229,15 @@ int board_late_init(void) + extern unsigned char booted_from_nand; + unsigned char tmp; + char buf[32]; ++ int menu_vote = 0; /* <= 0: no, > 0: yes */ ++ int seconds = 0; + + /* Initialize the Power Management Unit with a safe register set */ + pcf50606_init(); + ++ /* if there's no other reason, must be regular reset */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; ++ + if (!booted_from_nand) + goto woken_by_reset; + +@@ -242,45 +247,41 @@ int board_late_init(void) + setenv("pcf50606_int1", buf); + + if (tmp & PCF50606_INT1_ALARM) { +- /* we've been woken up by RTC alarm or charger insert, boot */ ++ /* we've been woken up by RTC alarm, boot */ + neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; + goto continue_boot; + } + if (tmp & PCF50606_INT1_EXTONR) { ++ /* we've been woken up by charger insert */ + neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; + } + + if (tmp & PCF50606_INT1_ONKEYF) { +- int seconds = 0; +- neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; + /* we've been woken up by a falling edge of the onkey */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; ++ } + +- /* we can't just setenv(bootdelay,-1) because that would +- * accidentially become permanent if the user does saveenv */ +- if (neo1973_911_key_pressed()) +- nobootdelay = 1; +- +- while (1) { +- u_int8_t int1, oocs; +- +- oocs = pcf50606_reg_read(PCF50606_REG_OOCS); +- if (oocs & PFC50606_OOCS_ONKEY) +- break; +- +- int1 = pcf50606_reg_read(PCF50606_REG_INT1); +- if (int1 & PCF50606_INT1_SECOND) +- seconds++; +- +- if (seconds >= POWER_KEY_SECONDS) +- goto continue_boot; +- } +- /* Power off if minimum number of seconds not reached */ +- neo1973_poweroff(); ++ if (neo1973_wakeup_cause == NEO1973_WAKEUP_CHARGER) { ++ /* if we still think it was only a charger insert, boot */ ++ goto continue_boot; + } + + woken_by_reset: +- /* if there's no other reason, must be regular reset */ +- neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; ++ ++ while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET || ++ neo1973_on_key_pressed()) { ++ if (neo1973_aux_key_pressed()) ++ menu_vote++; ++ else ++ menu_vote--; ++ ++ if (neo1973_new_second()) ++ seconds++; ++ if (seconds >= POWER_KEY_SECONDS) ++ goto continue_boot; ++ } ++ /* Power off if minimum number of seconds not reached */ ++ neo1973_poweroff(); + + continue_boot: + jbt6k74_init(); +@@ -304,6 +305,11 @@ continue_boot: + } + #endif + ++ if (menu_vote > 0) { ++ neo1973_bootmenu(); ++ nobootdelay = 1; ++ } ++ + return 0; + } + +@@ -369,7 +375,17 @@ void neo1973_vibrator(int on) + #endif + } + +-int neo1973_911_key_pressed(void) ++int neo1973_new_second(void) ++{ ++ return pcf50606_reg_read(PCF50606_REG_INT1) & PCF50606_INT1_SECOND; ++} ++ ++int neo1973_on_key_pressed(void) ++{ ++ return !(pcf50606_reg_read(PCF50606_REG_OOCS) & PFC50606_OOCS_ONKEY); ++} ++ ++int neo1973_aux_key_pressed(void) + { + S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); + if (gpio->GPFDAT & (1 << 6)) +Index: u-boot/board/neo1973/gta01/Makefile +=================================================================== +--- u-boot.orig/board/neo1973/gta01/Makefile ++++ u-boot/board/neo1973/gta01/Makefile +@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk + + LIB = lib$(BOARD).a + +-OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ++OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o + SOBJS := ../common/lowlevel_init.o + + .PHONY: all +Index: u-boot/board/neo1973/common/neo1973.h +=================================================================== +--- u-boot.orig/board/neo1973/common/neo1973.h ++++ u-boot/board/neo1973/common/neo1973.h +@@ -29,4 +29,10 @@ int neo1973_911_key_pressed(void); + const char *neo1973_get_charge_status(void); + int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd); + ++int neo1973_new_second(void); ++int neo1973_on_key_pressed(void); ++int neo1973_aux_key_pressed(void); ++ ++void neo1973_bootmenu(void); ++ + #endif +Index: u-boot/common/console.c +=================================================================== +--- u-boot.orig/common/console.c ++++ u-boot/common/console.c +@@ -160,8 +160,12 @@ void fprintf (int file, const char *fmt, + + /** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/ + ++void (*console_poll_hook)(int activity); ++ + int getc (void) + { ++ while (console_poll_hook && !tstc()); ++ + if (gd->flags & GD_FLG_DEVINIT) { + /* Get from the standard input */ + return fgetc (stdin); +@@ -171,7 +175,7 @@ int getc (void) + return serial_getc (); + } + +-int tstc (void) ++static int do_tstc (void) + { + if (gd->flags & GD_FLG_DEVINIT) { + /* Test the standard input */ +@@ -182,6 +186,16 @@ int tstc (void) + return serial_tstc (); + } + ++int tstc (void) ++{ ++ int ret; ++ ++ ret = do_tstc(); ++ if (console_poll_hook) ++ console_poll_hook(ret); ++ return ret; ++} ++ + void putc (const char c) + { + #ifdef CONFIG_SILENT_CONSOLE +Index: u-boot/include/console.h +=================================================================== +--- u-boot.orig/include/console.h ++++ u-boot/include/console.h +@@ -33,6 +33,8 @@ + extern device_t *stdio_devices[] ; + extern char *stdio_names[MAX_FILES] ; + ++extern void (*console_poll_hook)(int activity); ++ + int console_realloc(int top); + + #endif +Index: u-boot/common/Makefile +=================================================================== +--- u-boot.orig/common/Makefile ++++ u-boot/common/Makefile +@@ -50,7 +50,8 @@ COBJS = main.o ACEX1K.o altera.o bedbug. + memsize.o miiphybb.o miiphyutil.o \ + s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \ + usb.o usb_kbd.o usb_storage.o \ +- virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_mfsl.o ++ virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_mfsl.o \ ++ bootmenu.o + + SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c) + OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS)) +Index: u-boot/common/bootmenu.c +=================================================================== +--- /dev/null ++++ u-boot/common/bootmenu.c +@@ -0,0 +1,311 @@ ++/* ++ * bootmenu.c - Boot menu ++ * ++ * Copyright (C) 2006-2007 by OpenMoko, Inc. ++ * Written by Werner Almesberger ++ * All Rights Reserved ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++ ++#include ++ ++#ifdef CFG_BOOTMENU ++ ++#include ++#include ++#include ++#include ++ ++ ++extern const char version_string[]; ++ ++ ++#define ANSI_CLEAR "\e[2J" ++#define ANSI_REVERSE "\e[7m" ++#define ANSI_NORMAL "\e[m" ++#define ANSI_GOTOYX "\e[%d;%dH" ++ ++/* ++ * MIN_BOOT_MENU_TIMEOUT ensures that users can't by accident set the timeout ++ * unusably short. ++ */ ++#define MIN_BOOT_MENU_TIMEOUT 10 /* 10 seconds */ ++#define BOOT_MENU_TIMEOUT 60 /* 60 seconds */ ++#define AFTER_COMMAND_WAIT 3 /* wait (2,3] after running commands */ ++#define MAX_MENU_ITEMS 10 /* cut off after that many */ ++ ++#define TOP_ROW 2 ++#define MENU_0_ROW (TOP_ROW+5) ++ ++ ++struct option { ++ const char *label; ++ void (*fn)(void *user); /* run_command if NULL */ ++ void *user; ++}; ++ ++ ++static const struct bootmenu_setup *setup; ++static struct option options[MAX_MENU_ITEMS]; ++static int num_options = 0; ++static int max_width = 0; ++ ++static device_t *bm_con; ++ ++ ++static void bm_printf(const char *fmt, ...) ++{ ++ va_list args; ++ char printbuffer[CFG_PBSIZE]; ++ ++ va_start(args, fmt); ++ vsprintf(printbuffer, fmt, args); ++ va_end(args); ++ ++ bm_con->puts(printbuffer); ++} ++ ++ ++static char *get_option(int n) ++{ ++ char name[] = "menu_XX"; ++ ++ sprintf(name+5, "%d", n); ++ return getenv(name); ++} ++ ++ ++static void print_option(const struct option *option, int reverse) ++{ ++ int n = option-options; ++ ++ bm_printf(ANSI_GOTOYX, MENU_0_ROW+n, 1); ++ if (reverse) ++ bm_printf(ANSI_REVERSE); ++ bm_printf(" %-*s ", max_width, option->label); ++ if (reverse) ++ bm_printf(ANSI_NORMAL); ++} ++ ++ ++static int get_var_positive_int(char *var, int default_value) ++{ ++ const char *s; ++ char *end; ++ int n; ++ ++ s = getenv(var); ++ if (!s) ++ return default_value; ++ n = simple_strtoul(s, &end, 0); ++ if (!*s || *end || n < 1) ++ return default_value; ++ return n; ++} ++ ++ ++static void show_bootmenu(void) ++{ ++ const struct option *option; ++ ++ bm_printf(ANSI_CLEAR ANSI_GOTOYX "%s", TOP_ROW, 1, version_string); ++ bm_printf(ANSI_GOTOYX "*** BOOT MENU ***", TOP_ROW+3, 1); ++ bm_printf(ANSI_GOTOYX, MENU_0_ROW, 1); ++ ++ for (option = options; option != options+num_options; option++) ++ print_option(option, option == options); ++ ++ bm_printf("\n\nPress [AUX] to select, [POWER] to execute.\n"); ++} ++ ++ ++static void redirect_console(int grab) ++{ ++ static device_t *orig_stdout, *orig_stderr; ++ ++ if (grab) { ++ orig_stdout = stdio_devices[stdout]; ++ orig_stderr = stdio_devices[stderr]; ++ stdio_devices[stdout] = bm_con; ++ stdio_devices[stderr] = bm_con; ++ } ++ else { ++ /* ++ * Make this conditional, because the command may also change ++ * the console. ++ */ ++ if (stdio_devices[stdout] == bm_con) ++ stdio_devices[stdout] = orig_stdout; ++ if (stdio_devices[stderr] == bm_con) ++ stdio_devices[stderr] = orig_stderr; ++ } ++} ++ ++ ++static void do_option(const struct option *option) ++{ ++ int seconds, aux; ++ ++ bm_printf(ANSI_CLEAR ANSI_GOTOYX, 1, 1); ++ redirect_console(1); ++ ++ if (option->fn) ++ option->fn(option->user); ++ else ++ run_command(option->user, 0); ++ ++ redirect_console(0); ++ seconds = get_var_positive_int("after_command_wait", ++ AFTER_COMMAND_WAIT); ++ if (seconds) ++ bm_printf("\nPress [AUX] to %s.", ++ option ? "return to boot menu" : "power off"); ++ aux = 1; /* require up-down transition */ ++ while (seconds) { ++ int tmp; ++ ++ tmp = setup->next_key(setup->user); ++ if (tmp && !aux) ++ break; ++ aux = tmp; ++ if (setup->seconds(setup->user)) ++ seconds--; ++ } ++ if (!option) ++ setup->idle_action(setup->idle_action); ++ show_bootmenu(); ++} ++ ++ ++static void bootmenu_hook(int activity) ++{ ++ static int aux = 1, on = 1; ++ static const struct option *option = options; ++ static int seconds = 0; ++ int tmp; ++ ++ if (activity) ++ seconds = 0; ++ tmp = setup->next_key(setup->user); ++ if (tmp && !aux) { ++ print_option(option, 0); ++ option++; ++ if (option == options+num_options) ++ option = options; ++ print_option(option, 1); ++ seconds = 0; ++ } ++ aux = tmp; ++ tmp = setup->enter_key(setup->user); ++ if (tmp && !on) { ++ do_option(option); ++ option = options; ++ seconds = 0; ++ } ++ on = tmp; ++ if (setup->seconds(setup->user)) { ++ int timeout; ++ ++ timeout = get_var_positive_int("boot_menu_timeout", ++ BOOT_MENU_TIMEOUT); ++ if (timeout < MIN_BOOT_MENU_TIMEOUT) ++ timeout = MIN_BOOT_MENU_TIMEOUT; ++ if (++seconds > timeout) { ++ setup->idle_action(setup->idle_action); ++ seconds = 0; ++ } ++ } ++} ++ ++ ++static device_t *find_console(const char *name) ++{ ++ int i; ++ ++ for (i = 1; i != ListNumItems(devlist); i++) { ++ device_t *dev = ListGetPtrToItem(devlist, i); ++ ++ if (!strcmp(name, dev->name)) ++ if (dev->flags & DEV_FLAGS_OUTPUT) ++ return dev; ++ } ++ return NULL; ++} ++ ++ ++void bootmenu_add(const char *label, void (*fn)(void *user), void *user) ++{ ++ int len; ++ ++ options[num_options].label = label; ++ options[num_options].fn = fn; ++ options[num_options].user = user; ++ num_options++; ++ ++ len = strlen(label); ++ if (len > max_width) ++ max_width = len; ++} ++ ++ ++void bootmenu_init(struct bootmenu_setup *__setup) ++{ ++ int n; ++ ++ setup = __setup; ++ for (n = 1; n != MAX_MENU_ITEMS+1; n++) { ++ const char *spec, *colon; ++ ++ spec = get_option(n); ++ if (!spec) ++ continue; ++ colon = strchr(spec, ':'); ++ if (!colon) ++ bootmenu_add(spec, NULL, (char *) spec); ++ else { ++ char *label; ++ int len = colon-spec; ++ ++ label = malloc(len+1); ++ if (!label) ++ return; ++ memcpy(label, spec, len); ++ label[len] = 0; ++ bootmenu_add(label, NULL, (char *) colon+1); ++ } ++ } ++} ++ ++ ++void bootmenu(void) ++{ ++ bm_con = find_console("vga"); ++ if (bm_con && bm_con->start && bm_con->start() < 0) ++ bm_con = NULL; ++ if (!bm_con) ++ bm_con = stdio_devices[stdout]; ++ if (!bm_con) ++ return; ++#if 0 ++ console_assign(stdout, "vga"); ++ console_assign(stderr, "vga"); ++#endif ++ show_bootmenu(); ++ console_poll_hook = bootmenu_hook; ++} ++ ++#endif /* CFG_BOOTMENU */ +Index: u-boot/include/bootmenu.h +=================================================================== +--- /dev/null ++++ u-boot/include/bootmenu.h +@@ -0,0 +1,71 @@ ++/* ++ * bootmenu.h - Boot menu ++ * ++ * Copyright (C) 2006-2007 by OpenMoko, Inc. ++ * Written by Werner Almesberger ++ * All Rights Reserved ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#ifndef BOOTMENU_H ++#define BOOTMENU_H ++ ++#define MIN_BOOT_MENU_TIMEOUT 10 /* 10 seconds */ ++#define BOOT_MENU_TIMEOUT 60 /* 60 seconds */ ++#define AFTER_COMMAND_WAIT 3 /* wait (2,3] after running commands */ ++#define MAX_MENU_ITEMS 10 /* cut off after that many */ ++ ++ ++struct bootmenu_setup { ++ /* non-zero while the "next" key is being pressed */ ++ int (*next_key)(void *user); ++ ++ /* non-zero while the "enter" key is being pressed */ ++ int (*enter_key)(void *user); ++ ++ /* return the number of seconds that have passed since the last call ++ to "seconds". It's okay to limit the range to [0, 1]. */ ++ int (*seconds)(void *user); ++ ++ /* action to take if the boot menu times out */ ++ void (*idle_action)(void *user); ++ ++ /* user-specific data, passes "as is" to the functions above */ ++ void *user; ++}; ++ ++ ++/* ++ * Initialize the menu from the environment. ++ */ ++ ++void bootmenu_init(struct bootmenu_setup *setup); ++ ++/* ++ * To add entries on top of the boot menu, call bootmenu_add before ++ * bootmenu_init. To add entries at the end, call it after bootmenu_init. ++ * If "fn" is NULL, the command specified in "user" is executed. ++ */ ++ ++void bootmenu_add(const char *label, void (*fn)(void *user), void *user); ++ ++/* ++ * Run the boot menu. ++ */ ++ ++void bootmenu(void); ++ ++#endif /* !BOOTMENU_H */ +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -160,6 +160,8 @@ + /* valid baudrates */ + #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } + ++#define CFG_BOOTMENU ++ + /*----------------------------------------------------------------------- + * Stack sizes + * diff --git a/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch b/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch new file mode 100644 index 0000000000..ee4c1984fc --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch @@ -0,0 +1,58 @@ +common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from + memory to memory, and option CONFIG_UNZIP to enable it + +- Werner Almesberger + +Index: u-boot/common/cmd_mem.c +=================================================================== +--- u-boot.orig/common/cmd_mem.c ++++ u-boot/common/cmd_mem.c +@@ -1148,6 +1148,34 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int fl + } + #endif /* CONFIG_CRC32_VERIFY */ + ++ ++#ifdef CONFIG_UNZIP ++int gunzip (void *, int, unsigned char *, unsigned long *); ++ ++int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ unsigned long src, dst; ++ unsigned long src_len = ~0UL, dst_len = ~0UL; ++ int err; ++ ++ switch (argc) { ++ case 4: ++ dst_len = simple_strtoul(argv[3], NULL, 16); ++ /* fall through */ ++ case 3: ++ src = simple_strtoul(argv[1], NULL, 16); ++ dst = simple_strtoul(argv[2], NULL, 16); ++ break; ++ default: ++ printf ("Usage:\n%s\n", cmdtp->usage); ++ return 1; ++ } ++ ++ return !!gunzip((void *) dst, dst_len, (void *) src, &src_len); ++} ++#endif /* CONFIG_UNZIP */ ++ ++ + /**************************************************/ + #if (CONFIG_COMMANDS & CFG_CMD_MEMORY) + U_BOOT_CMD( +@@ -1251,5 +1279,13 @@ U_BOOT_CMD( + ); + #endif /* CONFIG_MX_CYCLIC */ + ++#ifdef CONFIG_UNZIP ++U_BOOT_CMD( ++ unzip, 4, 1, do_unzip, ++ "unzip - unzip a memory region\n", ++ "srcaddr dstaddr [dstsize]\n" ++); ++#endif /* CONFIG_UNZIP */ ++ + #endif + #endif /* CFG_CMD_MEMORY */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch b/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch new file mode 100644 index 0000000000..2ac5b75dee --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch @@ -0,0 +1,127 @@ +drivers/cfb_console.c: added processing of ANSI escape sequences \e[2J, \e[m, + \e[7m, and \e[row;colH +drivers/cfb_console.c (video_putc): make \r return to the beginning of the line + +- Werner Almesberger + +Index: u-boot/drivers/cfb_console.c +=================================================================== +--- u-boot.orig/drivers/cfb_console.c ++++ u-boot/drivers/cfb_console.c +@@ -181,6 +181,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the + + #include + #include ++#include + #include + #include + #ifdef CFG_CMD_DATE +@@ -676,10 +677,96 @@ static void console_newline (void) + + /*****************************************************************************/ + ++static enum { ++ CS_NORMAL = 0, ++ CS_ESC, ++ CS_NUM1, ++ CS_NUM2, ++} state = 0; ++ ++static int num1, num2; ++ ++ ++static void swap_drawing_colors(void) ++{ ++ eorx = fgx; ++ fgx = bgx; ++ bgx = eorx; ++ eorx = fgx ^ bgx; ++} ++ ++ ++static void process_sequence(char c) ++{ ++ static int inverted = 0; ++ int i, inv; ++ ++ switch (c) { ++ case 'J': ++ /* assume num1 == 2 */ ++ for (i = 0; i != CONSOLE_ROWS; i++) ++ console_scrollup(); ++ break; ++ case 'H': ++ if (num1 > CONSOLE_ROWS || num2 > CONSOLE_COLS) ++ break; ++ console_col = num2 ? num2-1 : 0; ++ console_row = num1 ? num1-1 : 0; ++ break; ++ case 'm': ++ inv = num1 == 7; ++ if (num1 && !inv) ++ break; ++ if (inverted != inv) ++ swap_drawing_colors(); ++ inverted = inv; ++ break; ++ } ++} ++ ++ ++static void escape_sequence(char c) ++{ ++ switch (state) { ++ case CS_ESC: ++ state = c == '[' ? CS_NUM1 : CS_NORMAL; ++ num1 = num2 = 0; ++ break; ++ case CS_NUM1: ++ if (isdigit(c)) ++ num1 = num1*10+c-'0'; ++ else if (c == ';') ++ state = CS_NUM2; ++ else { ++ process_sequence(c); ++ state = CS_NORMAL; ++ } ++ break; ++ case CS_NUM2: ++ if (isdigit(c)) ++ num2 = num2*10+c-'0'; ++ else { ++ process_sequence(c); ++ state = CS_NORMAL; ++ } ++ default: ++ /* can't happen */; ++ } ++} ++ ++ + void video_putc (const char c) + { ++ if (state) { ++ escape_sequence(c); ++ CURSOR_SET; ++ return; ++ } ++ + switch (c) { +- case 13: /* ignore */ ++ case 13: /* return to beginning of line */ ++ CURSOR_OFF; ++ console_col = 0; + break; + + case '\n': /* next line */ +@@ -698,6 +785,10 @@ void video_putc (const char c) + console_back (); + break; + ++ case '\e': ++ state = CS_ESC; ++ break; ++ + default: /* draw the char */ + video_putchar (console_col * VIDEO_FONT_WIDTH, + console_row * VIDEO_FONT_HEIGHT, diff --git a/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch b/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch new file mode 100644 index 0000000000..b9ae4f29fe --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/default-env.patch @@ -0,0 +1,101 @@ +common/env_common.c (default_env): new function that resets the environment to + the default value +common/env_common.c (env_relocate): use default_env instead of own copy +common/env_nand.c (env_relocate_spec): use default_env instead of own copy +include/environment.h: added default_env prototype + +- Werner Almesberger + +Index: u-boot/common/env_common.c +=================================================================== +--- u-boot.orig/common/env_common.c ++++ u-boot/common/env_common.c +@@ -202,6 +202,25 @@ uchar *env_get_addr (int index) + } + } + ++void default_env(void) ++{ ++ if (sizeof(default_environment) > ENV_SIZE) ++ { ++ puts ("*** Error - default environment is too large\n\n"); ++ return; ++ } ++ ++ memset (env_ptr, 0, sizeof(env_t)); ++ memcpy (env_ptr->data, ++ default_environment, ++ sizeof(default_environment)); ++#ifdef CFG_REDUNDAND_ENVIRONMENT ++ env_ptr->flags = 0xFF; ++#endif ++ env_crc_update (); ++ gd->env_valid = 1; ++} ++ + void env_relocate (void) + { + DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__, +@@ -245,23 +264,8 @@ void env_relocate (void) + gd->env_valid = 0; + #endif + +- if (gd->env_valid == 0) { +- if (sizeof(default_environment) > ENV_SIZE) +- { +- puts ("*** Error - default environment is too large\n\n"); +- return; +- } +- +- memset (env_ptr, 0, sizeof(env_t)); +- memcpy (env_ptr->data, +- default_environment, +- sizeof(default_environment)); +-#ifdef CFG_REDUNDAND_ENVIRONMENT +- env_ptr->flags = 0xFF; +-#endif +- env_crc_update (); +- gd->env_valid = 1; +- } ++ if (gd->env_valid == 0) ++ default_env(); + else { + env_relocate_spec (); + } +Index: u-boot/common/env_nand.c +=================================================================== +--- u-boot.orig/common/env_nand.c ++++ u-boot/common/env_nand.c +@@ -313,19 +313,7 @@ void env_relocate_spec (void) + static void use_default() + { + puts ("*** Warning - bad CRC or NAND, using default environment\n\n"); +- +- if (default_environment_size > CFG_ENV_SIZE){ +- puts ("*** Error - default environment is too large\n\n"); +- return; +- } +- +- memset (env_ptr, 0, sizeof(env_t)); +- memcpy (env_ptr->data, +- default_environment, +- default_environment_size); +- env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE); +- gd->env_valid = 1; +- ++ default_env(); + } + #endif + +Index: u-boot/include/environment.h +=================================================================== +--- u-boot.orig/include/environment.h ++++ u-boot/include/environment.h +@@ -107,4 +107,7 @@ typedef struct environment_s { + unsigned char data[ENV_SIZE]; /* Environment data */ + } env_t; + ++ ++void default_env(void); ++ + #endif /* _ENVIRONMENT_H_ */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch b/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch new file mode 100644 index 0000000000..23d4b13626 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/dontask.patch @@ -0,0 +1,22 @@ +common/cmd_nand.c (yes): if the environment variable "dontask" is set to "y" or + "Y", non-interactively assume the answer was "yes". In all other cases, ask. + +- Werner Almesberger + +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c ++++ u-boot/common/cmd_nand.c +@@ -165,8 +165,12 @@ out: + + static int yes(void) + { ++ char *s; + char c; + ++ s = getenv("dontask"); ++ if (s && (s[0] =='y' || s[0] == 'Y') && !s[1]) ++ return 1; + c = getc(); + if (c != 'y' && c != 'Y') + return 0; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch b/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch new file mode 100644 index 0000000000..cf12352553 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch @@ -0,0 +1,139 @@ +common/cmd_nand.c: globalized arg_off_size +include/util.h: new header to convenience functions, such as arg_off_size +common/cmd_dynenv.c (do_dynenv): use arg_off_size to sanity-check offset and to + allow use of partition name +common/cmd_dynenv.c (do_dynenv): indicate in no uncertain terms when an update + would not work due to Flash bits already cleared +common/cmd_dynenv.c (do_dynenv): update CFG_ENV_OFFSET after successful "dynenv + set", so that we can write the new environment without having to reboot + +- Werner Almesberger + +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c ++++ u-boot/common/cmd_nand.c +@@ -100,7 +100,7 @@ static inline int str2long(char *p, ulon + return (*p != '\0' && *endptr == '\0') ? 1 : 0; + } + +-static int ++int + arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size) + { + int idx = nand_curr_device; +Index: u-boot/include/util.h +=================================================================== +--- /dev/null ++++ u-boot/include/util.h +@@ -0,0 +1,33 @@ ++/* ++ * util.h - Convenience functions ++ * ++ * (C) Copyright 2006-2007 OpenMoko, Inc. ++ * Author: Werner Almesberger ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#ifndef UTIL_H ++#define UTIL_H ++ ++#include "nand.h" ++ ++ ++/* common/cmd_nand.c */ ++int arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ++ ulong *size); ++ ++#endif /* UTIL_H */ +Index: u-boot/common/cmd_dynenv.c +=================================================================== +--- u-boot.orig/common/cmd_dynenv.c ++++ u-boot/common/cmd_dynenv.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + + #if defined(CFG_ENV_OFFSET_OOB) +@@ -39,8 +40,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag + if (!buf) + return -ENOMEM; + ++ ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); + if (!strcmp(cmd, "get")) { +- ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); + + if (buf[0] == 'E' && buf[1] == 'N' && + buf[2] == 'V' && buf[3] == '0') +@@ -49,7 +50,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag + printf("No dynamic environment marker in OOB block 0\n"); + + } else if (!strcmp(cmd, "set")) { +- unsigned long addr; ++ unsigned long addr, dummy; ++ + if (argc < 3) + goto usage; + +@@ -57,7 +59,23 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag + buf[1] = 'N'; + buf[2] = 'V'; + buf[3] = '0'; +- addr = simple_strtoul(argv[2], NULL, 16); ++ ++ if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy) < 0) { ++ printf("Offset or partition name expected\n"); ++ goto fail; ++ } ++ if (!ret) { ++ uint8_t tmp[4]; ++ int i; ++ ++ memcpy(&tmp, &addr, 4); ++ for (i = 0; i != 4; i++) ++ if (tmp[i] & ~buf[i+4]) { ++ printf("ERROR: erase OOB block to " ++ "write this value\n"); ++ goto fail; ++ } ++ } + memcpy(buf+4, &addr, 4); + + printf("%02x %02x %02x %02x - %02x %02x %02x %02x\n", +@@ -65,6 +83,8 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag + buf[4], buf[5], buf[6], buf[7]); + + ret = mtd->write_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); ++ if (!ret) ++ CFG_ENV_OFFSET = addr; + } else + goto usage; + +@@ -72,8 +92,9 @@ int do_dynenv(cmd_tbl_t *cmdtp, int flag + return ret; + + usage: +- free(buf); + printf("Usage:\n%s\n", cmdtp->usage); ++fail: ++ free(buf); + return 1; + } + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch b/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch new file mode 100644 index 0000000000..7326c2daa6 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch @@ -0,0 +1,40 @@ +Index: u-boot/board/neo1973/neo1973.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/gta01.c ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -68,8 +68,12 @@ DECLARE_GLOBAL_DATA_PTR; + #define U_M_PDIV 0x2 + #define U_M_SDIV 0x3 + ++#define VALID_WAKEUP_REASONS (PCF50606_INT1_ONKEYF | PCF50606_INT1_ALARM) ++ + unsigned int neo1973_wakeup_cause; + extern int nobootdelay; ++static unsigned char int1; ++ + + static inline void delay (unsigned long loops) + { +@@ -179,6 +183,13 @@ int board_init (void) + #error Please define GTA01 version + #endif + ++ i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); ++ int1 = pcf50606_reg_read(PCF50606_REG_INT1); ++ if (!(int1 & VALID_WAKEUP_REASONS) && !neo1973_aux_key_pressed()) { ++ pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY); ++ while (1); ++ } ++ + /* arch number of SMDK2410-Board */ + gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA01; + +@@ -200,7 +211,7 @@ int board_late_init(void) + pcf50606_init(); + + /* obtain wake-up reason, save INT1 in environment */ +- tmp = pcf50606_reg_read(PCF50606_REG_INT1); ++ tmp = int1; //pcf50606_reg_read(PCF50606_REG_INT1); + sprintf(buf, "0x%02x", tmp); + setenv("pcf50606_int1", buf); + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch b/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch new file mode 100644 index 0000000000..dcb721c8d3 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch @@ -0,0 +1,56 @@ +drivers/cfb_console.c: include asm/byteorder.h for le32_to_cpu and friends + [ shouldn't someone else have found this long ago ? ] +include/configs/neo1973.h (CONFIG_COMMANDS): add CFG_CMD_BMP +include/configs/neo1973.h: enable splash screen and BMP support +include/configs/neo1973.h: remove #if 1 ... #endif around video definitions + +- Werner Almesberger + +Index: u-boot/drivers/cfb_console.c +=================================================================== +--- u-boot.orig/drivers/cfb_console.c ++++ u-boot/drivers/cfb_console.c +@@ -191,6 +191,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the + #if (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) + #include + #include ++#include + #endif /* (CONFIG_COMMANDS & CFG_CMD_BMP) || CONFIG_SPLASH_SCREEN */ + + /*****************************************************************************/ +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -86,6 +86,7 @@ + /* CFG_CMD_IRQ | */ \ + CFG_CMD_BOOTD | \ + CFG_CMD_CONSOLE | \ ++ CFG_CMD_BMP | \ + CFG_CMD_ASKENV | \ + CFG_CMD_RUN | \ + CFG_CMD_ECHO | \ +@@ -244,19 +245,21 @@ + /* we have a board_late_init() function */ + #define BOARD_LATE_INIT 1 + +-#if 1 + #define CONFIG_VIDEO + #define CONFIG_VIDEO_S3C2410 + #define CONFIG_CFB_CONSOLE + #define CONFIG_VIDEO_LOGO ++#define CONFIG_SPLASH_SCREEN ++#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ ++#define CONFIG_VIDEO_BMP_GZIP + #define CONFIG_VGA_AS_SINGLE_DEVICE ++#define CONFIG_UNZIP + + #define VIDEO_KBD_INIT_FCT 0 + #define VIDEO_TSTC_FCT serial_tstc + #define VIDEO_GETC_FCT serial_getc + + #define LCD_VIDEO_ADDR 0x33d00000 +-#endif + + #define CONFIG_S3C2410_NAND_BBT 1 + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch b/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch new file mode 100644 index 0000000000..5a2dd61461 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch @@ -0,0 +1,198 @@ +This patch adds support for CFG_ENV_OFFSET_PATCHED and +CFG_ENV_OFFSET_OOB. + +Both try to solve the problem of fixing the environment location in NAND flash +at compile time, which doesn't work well if the NAND flash has a bad block at +exactly that location. + +CFG_ENV_OFFSET_PATCHED puts the environment in a global variable. You can then +use the linker script to put that variable to a fixed location in the u-boot +image. Then you can use bianry patching during the production flash process. + +The idea of CFG_ENV_OFFSET_OOB is to store the environment offset in the NAND +OOB data of block 0. We can do this in case the vendor makes a guarantee that +block 0 never is a factory-default bad block. + +Signed-off-by: Harald Welte + +Index: u-boot/common/env_nand.c +=================================================================== +--- u-boot.orig/common/env_nand.c ++++ u-boot/common/env_nand.c +@@ -271,6 +271,33 @@ + ulong total; + int ret; + ++#if defined(CFG_ENV_OFFSET_OOB) ++ struct mtd_info *mtd = &nand_info[0]; ++ struct nand_chip *this = mtd->priv; ++ int buf_len; ++ uint8_t *buf; ++ ++ buf_len = (1 << this->bbt_erase_shift); ++ buf_len += (buf_len >> this->page_shift) * mtd->oobsize; ++ buf = malloc(buf_len); ++ if (!buf) ++ return; ++ ++ nand_read_raw(mtd, buf, 0, mtd->oobblock, mtd->oobsize); ++ if (buf[mtd->oobblock + 8 + 0] == 'E' && ++ buf[mtd->oobblock + 8 + 1] == 'N' && ++ buf[mtd->oobblock + 8 + 2] == 'V' && ++ buf[mtd->oobblock + 8 + 3] == '0') { ++ CFG_ENV_OFFSET = *((unsigned long *) &buf[mtd->oobblock + 8 + 4]); ++ /* fall through to the normal environment reading code below */ ++ free(buf); ++ puts("Found Environment offset in OOB..\n"); ++ } else { ++ free(buf); ++ return use_default(); ++ } ++#endif ++ + total = CFG_ENV_SIZE; + ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr); + if (ret || total != CFG_ENV_SIZE) +Index: u-boot/common/environment.c +=================================================================== +--- u-boot.orig/common/environment.c ++++ u-boot/common/environment.c +@@ -29,6 +29,12 @@ + #undef __ASSEMBLY__ + #include + ++#if defined(CFG_ENV_OFFSET_PATCHED) ++unsigned long env_offset = CFG_ENV_OFFSET_PATCHED; ++#elif defined(CFG_ENV_OFFSET_OOB) ++unsigned long env_offset = CFG_ENV_OFFSET_OOB; ++#endif ++ + /* + * Handle HOSTS that have prepended + * crap on symbol names, not TARGETS. +Index: u-boot/include/environment.h +=================================================================== +--- u-boot.orig/include/environment.h ++++ u-boot/include/environment.h +@@ -70,6 +70,10 @@ + #endif /* CFG_ENV_IS_IN_FLASH */ + + #if defined(CFG_ENV_IS_IN_NAND) ++#if defined(CFG_ENV_OFFSET_PATCHED) || defined(CFG_ENV_OFFSET_OOB) ++extern unsigned long env_offset; ++#define CFG_ENV_OFFSET env_offset ++#else + # ifndef CFG_ENV_OFFSET + # error "Need to define CFG_ENV_OFFSET when using CFG_ENV_IS_IN_NAND" + # endif +@@ -82,6 +86,7 @@ + # ifdef CFG_ENV_IS_EMBEDDED + # define ENV_IS_EMBEDDED 1 + # endif ++#endif /* CFG_ENV_NAND_PATCHED */ + #endif /* CFG_ENV_IS_IN_NAND */ + + +Index: u-boot/common/Makefile +=================================================================== +--- u-boot.orig/common/Makefile ++++ u-boot/common/Makefile +@@ -31,7 +31,7 @@ + cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \ + cmd_cache.o cmd_console.o \ + cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \ +- cmd_eeprom.o cmd_elf.o cmd_ext2.o \ ++ cmd_dynenv.o cmd_eeprom.o cmd_elf.o cmd_ext2.o \ + cmd_fat.o cmd_fdc.o cmd_fdt.o cmd_fdos.o cmd_flash.o cmd_fpga.o \ + cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \ + cmd_load.o cmd_log.o \ +Index: u-boot/common/cmd_dynenv.c +=================================================================== +--- /dev/null ++++ u-boot/common/cmd_dynenv.c +@@ -0,0 +1,85 @@ ++/* ++ * (C) Copyright 2006-2007 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if defined(CFG_ENV_OFFSET_OOB) ++ ++int do_dynenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ struct mtd_info *mtd = &nand_info[0]; ++ int ret, size = 8; ++ uint8_t *buf; ++ ++ char *cmd = argv[1]; ++ ++ buf = malloc(mtd->oobsize); ++ if (!buf) ++ return -ENOMEM; ++ ++ if (!strcmp(cmd, "get")) { ++ ret = mtd->read_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); ++ ++ if (buf[0] == 'E' && buf[1] == 'N' && ++ buf[2] == 'V' && buf[3] == '0') ++ printf("0x%08x\n", *((u_int32_t *) &buf[4])); ++ else ++ printf("No dynamic environment marker in OOB block 0\n"); ++ ++ } else if (!strcmp(cmd, "set")) { ++ unsigned long addr; ++ if (argc < 3) ++ goto usage; ++ ++ buf[0] = 'E'; ++ buf[1] = 'N'; ++ buf[2] = 'V'; ++ buf[3] = '0'; ++ addr = simple_strtoul(argv[2], NULL, 16); ++ memcpy(buf+4, &addr, 4); ++ ++ printf("%02x %02x %02x %02x - %02x %02x %02x %02x\n", ++ buf[0], buf[1], buf[2], buf[3], ++ buf[4], buf[5], buf[6], buf[7]); ++ ++ ret = mtd->write_oob(mtd, 8, size, (size_t *) &size, (u_char *) buf); ++ } else ++ goto usage; ++ ++ free(buf); ++ return ret; ++ ++usage: ++ free(buf); ++ printf("Usage:\n%s\n", cmdtp->usage); ++ return 1; ++} ++ ++U_BOOT_CMD(dynenv, 3, 1, do_dynenv, ++ "dynenv - dynamically placed (NAND) environment\n", ++ "dynenv set off - set enviromnent offset\n" ++ "dynenv get - get environment offset\n"); ++ ++#endif /* CFG_ENV_OFFSET_OOB */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch b/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch new file mode 100644 index 0000000000..ff8e9cd6fc --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch @@ -0,0 +1,17 @@ +This patch adds the hex-printing of the file size read by 'ext2load' + +Signed-off-by: Harald Welte + +Index: u-boot.git/common/cmd_ext2.c +=================================================================== +--- u-boot.git.orig/common/cmd_ext2.c 2007-01-02 18:26:17.000000000 +0100 ++++ u-boot.git/common/cmd_ext2.c 2007-01-02 18:26:27.000000000 +0100 +@@ -279,7 +279,7 @@ + /* Loading ok, update default load address */ + load_addr = addr; + +- printf ("\n%ld bytes read\n", filelen); ++ printf ("\n%ld (0x%lx) bytes read\n", filelen, filelen); + sprintf(buf, "%lX", filelen); + setenv("filesize", buf); + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch b/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch new file mode 100644 index 0000000000..715c46ed81 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch @@ -0,0 +1,229 @@ +board/neo1973/lowlevel_foo.S: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.S +board/neo1973/lowlevel_foo.lds: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.lds +board/neo1973/Makefile: added building of lowlevel_foo.bin (based on + http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.build.sh) + +Index: u-boot/board/neo1973/common/lowlevel_foo.S +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/lowlevel_foo.S +@@ -0,0 +1,82 @@ ++ ++_start: ++ b reset ++undefvec: ++ b undefvec ++swivec: ++ b swivec ++pabtvec: ++ b pabtvec ++dabtvec: ++ b dabtvec ++rsvdvec: ++ b rsvdvec ++irqvec: ++ b irqvec ++fiqvec: ++ b fiqvec ++ ++reset: ++ /* ++ * set the cpu to SVC32 mode ++ */ ++ mrs r0,cpsr ++ bic r0,r0,#0x1f ++ orr r0,r0,#0xd3 ++ msr cpsr,r0 ++ ++/* turn off the watchdog */ ++#define pWTCON 0x53000000 ++#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ ++#define INTSUBMSK 0x4A00001C ++#define CLKDIVN 0x4C000014 /* clock divisor register */ ++ ++ ldr r0, =pWTCON ++ mov r1, #0x0 ++ str r1, [r0] ++ ++ mov r1, #0xffffffff ++ ldr r0, =INTMSK ++ str r1, [r0] ++ ldr r1, =0x3ff ++ ldr r0, =INTSUBMSK ++ str r1, [r0] ++ ++ /* FCLK:HCLK:PCLK = 1:2:4 */ ++ /* default FCLK is 120 MHz ! */ ++ ldr r0, =CLKDIVN ++ mov r1, #3 ++ str r1, [r0] ++ ++ bl cpu_init_crit ++ ldr r0,=TEXT_BASE ++ mov pc, r0 ++ ++cpu_init_crit: ++ /* ++ * flush v4 I/D caches ++ */ ++ mov r0, #0 ++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ ++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ ++ ++ /* ++ * disable MMU stuff and caches ++ */ ++ mrc p15, 0, r0, c1, c0, 0 ++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) ++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) ++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align ++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache ++ mcr p15, 0, r0, c1, c0, 0 ++ ++ /* ++ * before relocating, we have to setup RAM timing ++ * because memory timing is board-dependend, you will ++ * find a lowlevel_init.S in your board directory. ++ */ ++ mov ip, lr ++ bl lowlevel_init ++ mov lr, ip ++ mov pc, lr ++ +Index: u-boot/board/neo1973/common/lowlevel_foo.lds +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/lowlevel_foo.lds +@@ -0,0 +1,56 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ lowlevel_foo.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/board/neo1973/gta01/Makefile +=================================================================== +--- u-boot.orig/board/neo1973/gta01/Makefile ++++ u-boot/board/neo1973/gta01/Makefile +@@ -28,14 +28,31 @@ + OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o + SOBJS := ../common/lowlevel_init.o + ++.PHONY: all ++ ++all: $(LIB) lowevel_foo.bin ++ + $(LIB): $(OBJS) $(SOBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) + ++lowlevel_foo.o: ../common/lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o ../common/lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o ../common/lowlevel_init.o ../common/lowlevel_foo.lds ++ $(LD) -T ../common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ ../common/lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ ++ + clean: +- rm -f $(SOBJS) $(OBJS) ++ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o + + distclean: clean +- rm -f $(LIB) core *.bak .depend ++ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin + + ######################################################################### + +Index: u-boot/board/qt2410/Makefile +=================================================================== +--- u-boot.orig/board/qt2410/Makefile ++++ u-boot/board/qt2410/Makefile +@@ -28,14 +28,31 @@ + OBJS := qt2410.o flash.o + SOBJS := lowlevel_init.o + ++.PHONY: all ++ ++all: $(LIB) lowevel_foo.bin ++ + $(LIB): $(OBJS) $(SOBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) + ++lowlevel_foo.o: ../neo1973/common/lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o ../neo1973/common/lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o lowlevel_init.o \ ++ ../neo1973/common/lowlevel_foo.lds ++ $(LD) -T ../neo1973/common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ + clean: +- rm -f $(SOBJS) $(OBJS) ++ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o + + distclean: clean +- rm -f $(LIB) core *.bak .depend ++ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin + + ######################################################################### + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch b/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch new file mode 100644 index 0000000000..fcf54b9fd1 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch @@ -0,0 +1,73 @@ +board/neo1973/neo1973.c (board_late_init): moved MMC power-up to separate + function +cpu/arm920t/s3c24x0/mmc.c (mmc_init): call mmc_power_up and return -ENODEV + immediately if there is no card + +- Werner Almesberger + +Index: u-boot/board/neo1973/neo1973.c +=================================================================== +--- u-boot.orig/board/neo1973/neo1973.c ++++ u-boot/board/neo1973/neo1973.c +@@ -223,6 +223,19 @@ int board_init (void) + return 0; + } + ++int mmc_power_up(void) ++{ ++#if defined(CONFIG_ARCH_GTA01B_v4) ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* check if sd card is inserted, and power-up if it is */ ++ if (gpio->GPFDAT & (1 << 5)) ++ return 0; ++ gpio->GPBDAT &= ~(1 << 2); ++#endif /* !CONFIG_ARCH_GTA01B_v4 */ ++ return 1; ++} ++ + int board_late_init(void) + { + unsigned char tmp; +@@ -289,14 +302,8 @@ continue_boot: + /* switch on the backlight */ + neo1973_backlight(1); + +-#if defined(CONFIG_ARCH_GTA01B_v4) +- { +- /* check if sd card is inserted, and power-up if it is */ +- S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); +- if (!(gpio->GPFDAT & (1 << 5))) +- gpio->GPBDAT &= ~(1 << 2); +- } +-#endif ++ /* check if sd card is inserted, and power-up if it is */ ++ mmc_power_up(); + + return 0; + } +Index: u-boot/cpu/arm920t/s3c24x0/mmc.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c ++++ u-boot/cpu/arm920t/s3c24x0/mmc.c +@@ -381,6 +381,11 @@ static void print_sd_cid(const struct sd + cid->crc >> 1, cid->crc & 1); + } + ++int __attribute__((weak)) mmc_power_up(void) ++{ ++ return 1; ++} ++ + int mmc_init(int verbose) + { + int retries, rc = -ENODEV; +@@ -393,6 +398,8 @@ int mmc_init(int verbose) + debug("mmc_init(PCLK=%u)\n", get_PCLK()); + + clk_power->CLKCON |= (1 << 9); ++ if (!mmc_power_up()) ++ return -ENODEV; + + /* S3C2410 has some bug that prevents reliable operation at higher speed */ + //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch new file mode 100644 index 0000000000..a5800e2499 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch @@ -0,0 +1,30 @@ +This patch makes nand_block_checkbad check both the BBT and the actual +OOB data. This avoids accidently passing blocks as good when BBT and +OOB markers are not synchronized, e.g., before "nand createbbt". + +Experimental. + +- Werner Almesberger + +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c ++++ u-boot/drivers/nand/nand_base.c +@@ -517,11 +517,14 @@ static int nand_block_checkbad (struct m + { + struct nand_chip *this = mtd->priv; + +- if (!this->bbt) +- return this->block_bad(mtd, ofs, getchip); ++ if (this->block_bad(mtd, ofs, getchip)) ++ return 1; + + /* Return info from the table */ +- return nand_isbad_bbt (mtd, ofs, allowbbt); ++ if (this->bbt && nand_isbad_bbt (mtd, ofs, allowbbt)) ++ return 1; ++ ++ return 0; + } + + /** diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch new file mode 100644 index 0000000000..74b79da0a9 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch @@ -0,0 +1,126 @@ +This patch adds user-requested BBT creation. It includes the following changes: + +- common/cmd_nand.c: move yes/no decision to separate function +- do_nand: ask for confirmation for "nand erase" +- do_nand: add command "nand createbbt" to erase NAND and create a new BBT + +Experimental. + +- Werner Almesberger + + +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c 2007-02-16 23:53:28.000000000 +0100 ++++ u-boot/common/cmd_nand.c 2007-02-16 23:53:57.000000000 +0100 +@@ -163,6 +163,17 @@ + return 0; + } + ++static int yes(void) ++{ ++ char c; ++ ++ c = getc(); ++ if (c != 'y' && c != 'Y') ++ return 0; ++ c = getc(); ++ return c == '\r' || c == '\n'; ++} ++ + int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) + { + int i, dev, ret; +@@ -228,7 +239,8 @@ + strncmp(cmd, "read", 4) != 0 && strncmp(cmd, "write", 5) != 0 && + strcmp(cmd, "scrub") != 0 && strcmp(cmd, "markbad") != 0 && + strcmp(cmd, "biterr") != 0 && +- strcmp(cmd, "lock") != 0 && strcmp(cmd, "unlock") != 0 ) ++ strcmp(cmd, "lock") != 0 && strcmp(cmd, "unlock") != 0 && ++ strcmp(cmd, "createbbt") != 0 ) + goto usage; + + /* the following commands operate on the current device */ +@@ -283,13 +295,23 @@ + "are sure of what you are doing!\n" + "\nReally scrub this NAND flash? \n"); + +- if (getc() == 'y' && getc() == '\r') { ++ if (yes()) { + opts.scrub = 1; + } else { + puts("scrub aborted\n"); + return -1; + } + } ++ else { ++ if (opts.length == nand->size) { ++ puts("Really erase everything ? \n"); ++ if (!yes()) { ++ puts("erase aborted\n"); ++ return -1; ++ } ++ } ++ } ++ + ret = nand_erase_opts(nand, &opts); + printf("%s\n", ret ? "ERROR" : "OK"); + +@@ -458,6 +480,33 @@ + return 0; + } + ++ if (strcmp(cmd, "createbbt") == 0) { ++ struct nand_chip *nand_chip = nand->priv; ++ nand_erase_options_t opts; ++ ++ puts("Create BBT and erase everything ? \n"); ++ if (!yes()) { ++ puts("createbbt aborted\n"); ++ return -1; ++ } ++ memset(&opts, 0, sizeof(opts)); ++ opts.length = nand->size; ++ if (nand_erase_opts(nand, &opts)) { ++ puts("Erase failed\n"); ++ return 1; ++ } ++ nand_chip->options &= ~NAND_DONT_CREATE_BBT; ++ puts("Creating BBT. Please wait ..."); ++ if (nand_default_bbt(nand)) { ++ puts("\nFailed\n"); ++ return 1; ++ } ++ else { ++ puts("\n"); ++ return 0; ++ } ++ } ++ + usage: + printf("Usage:\n%s\n", cmdtp->usage); + return 1; +@@ -478,7 +527,8 @@ + "nand markbad off - mark bad block at offset (UNSAFE)\n" + "nand biterr off - make a bit error at offset (UNSAFE)\n" + "nand lock [tight] [status] - bring nand to lock state or display locked pages\n" +- "nand unlock [offset] [size] - unlock section\n"); ++ "nand unlock [offset] [size] - unlock section\n" ++ "nand createbbt - create bad block table\n"); + + static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, + ulong offset, ulong addr, char *cmd) +Index: u-boot/drivers/nand/nand_bbt.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:54.000000000 +0100 ++++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:57.000000000 +0100 +@@ -795,7 +795,8 @@ + + len = mtd->size >> (this->bbt_erase_shift + 2); + /* Allocate memory (2bit per block) */ +- this->bbt = kmalloc (len, GFP_KERNEL); ++ if (!this->bbt) ++ this->bbt = kmalloc (len, GFP_KERNEL); + if (!this->bbt) { + printk (KERN_ERR "nand_scan_bbt: Out of memory\n"); + return -ENOMEM; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch new file mode 100644 index 0000000000..ecce004ca6 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch @@ -0,0 +1,354 @@ +This patch adds support for 'dynamic partitions'. This basically +works as follows: +* The nand code generates a bad-block-table at the first scan of the chip +* The dynamic partition code calculates the raw partition sizes based on + the bad block table. E.g. if you have a partition of size 0x30000, and there are + two bad blocks (0x4000 each) in it, the raw size will increase to 0x38000, and the + following partitions get shifted towards the end of flash. + +Please note that currently the desired partition sizes are stored at compile-time +in an array in drivers/nand/nand_bbt.c, so this definitely needs to change before +submitting/merging upstream. + +In order to calculate the partiton map (and set mtdparts accordingly), you can use +the 'dynpart' command at the prompt. Use 'saveenv' to make the setting permanent. + +Signed-off-by: Harald Welte + +Index: u-boot/drivers/nand/nand_bbt.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_bbt.c ++++ u-boot/drivers/nand/nand_bbt.c +@@ -1044,9 +1044,86 @@ + switch ((int)res) { + case 0x00: return 0; + case 0x01: return 1; ++ case 0x03: return 1; + case 0x02: return allowbbt ? 0 : 1; + } + return 1; + } + ++#if defined(CONFIG_NAND_DYNPART) ++ ++extern unsigned int dynpart_size[]; ++extern char *dynpart_names[]; ++ ++#define MTDPARTS_MAX_SIZE 512 ++ ++ ++static int skip_offs(const struct nand_chip *this, unsigned int offs) ++{ ++ int block = (int) (offs >> (this->bbt_erase_shift - 1)); ++ u_int8_t bbt = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; ++ ++ return bbt == 3; ++} ++ ++int nand_create_mtd_dynpart(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ int part; ++ char *mtdparts; ++ unsigned int cur_offs = 0; ++ ++ mtdparts = malloc(MTDPARTS_MAX_SIZE); /* FIXME: bounds checking */ ++ if (!mtdparts) ++ return -ENOMEM; ++ ++ sprintf(mtdparts, "mtdparts=" CFG_NAND_DYNPART_MTD_KERNEL_NAME ":"); ++ ++ for (part = 0; dynpart_size[part] != 0; part++) { ++ unsigned int bb_delta = 0; ++ unsigned int offs = 0; ++ char mtdpart[32]; ++ ++ for (offs = cur_offs; ++ offs < cur_offs + dynpart_size[part] + bb_delta; ++ offs += mtd->erasesize) { ++ if (skip_offs(this, offs)) ++ bb_delta += mtd->erasesize; ++ } ++ ++ /* ++ * Absorb bad blocks immediately following this partition also ++ * into the partition, in order to make next partition start ++ * with a good block. This simplifies handling of the ++ * environment partition. ++ */ ++ while (offs < this->chipsize && skip_offs(this, offs)) { ++ bb_delta += mtd->erasesize; ++ offs += mtd->erasesize; ++ } ++ ++ if (cur_offs + dynpart_size[part] + bb_delta > this->chipsize) ++ dynpart_size[part] = this->chipsize - cur_offs - bb_delta; ++#if 0 ++ printf("partition %u: start = 0x%08x, end=%08x size=%08x, size_inc_bb=%08x\n", ++ part, cur_offs, cur_offs + dynpart_size[part] + bb_delta, ++ dynpart_size[part], dynpart_size[part] + bb_delta); ++#endif ++ cur_offs += dynpart_size[part] + bb_delta; ++ sprintf(mtdpart, "0x%.8x(%.16s),", dynpart_size[part] + bb_delta, ++ dynpart_names[part]); ++ mtdpart[sizeof(mtdpart)-1] = '\0'; ++ strncat(mtdparts, mtdpart, ++ MTDPARTS_MAX_SIZE-strlen(mtdparts)-1); ++ } ++ ++ mtdparts[strlen(mtdparts)-1] = '\0'; ++ printf("mtdparts %s\n", mtdparts); ++ setenv("mtdparts", mtdparts); ++ ++ free(mtdparts); ++ return 0; ++} ++#endif /* CONFIG_NAND_DYNPART */ ++ + #endif +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -99,7 +99,7 @@ + CFG_CMD_ELF | \ + CFG_CMD_MISC | \ + /* CFG_CMD_USB | */ \ +- /* CFG_CMD_JFFS2 | */ \ ++ CFG_CMD_JFFS2 | \ + CFG_CMD_DIAG | \ + /* CFG_CMD_HWFLOW | */ \ + CFG_CMD_SAVES | \ +@@ -212,13 +212,13 @@ + #define CONFIG_FAT 1 + #define CONFIG_SUPPORT_VFAT + +-#if 0 ++#if 1 + /* JFFS2 driver */ + #define CONFIG_JFFS2_CMDLINE 1 + #define CONFIG_JFFS2_NAND 1 + #define CONFIG_JFFS2_NAND_DEV 0 +-#define CONFIG_JFFS2_NAND_OFF 0x634000 +-#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 + #endif + + /* ATAG configuration */ +@@ -257,4 +257,9 @@ + + #define CONFIG_DRIVER_PCF50606 1 + ++#define MTDIDS_DEFAULT "nand0=neo1973-nand" ++#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),16k(u-boot_env),2M(kernel),640k(splash),-(jffs2)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand" ++#define CONFIG_NAND_DYNPART ++ + #endif /* __CONFIG_H */ +Index: u-boot/common/cmd_jffs2.c +=================================================================== +--- u-boot.orig/common/cmd_jffs2.c ++++ u-boot/common/cmd_jffs2.c +@@ -1841,6 +1841,29 @@ + return NULL; + } + ++/* Return the 'net size' of the partition (i.e. excluding any bad blocks) */ ++unsigned int nand_net_part_size(struct part_info *part) ++{ ++ struct mtd_info *mtd; ++ unsigned int offs; ++ unsigned int bb_delta = 0; ++ ++ if (!part || !part->dev || !part->dev->id || ++ part->dev->id->num >= CFG_MAX_NAND_DEVICE) ++ return 0; ++ ++ mtd = &nand_info[part->dev->id->num]; ++ ++ for (offs = part->offset; offs < part->offset + part->size; ++ offs += mtd->erasesize) { ++ if (nand_isbad_bbt(mtd, offs, 0)) ++ bb_delta += mtd->erasesize; ++ } ++ ++ return part->size - bb_delta; ++} ++ ++ + /***************************************************/ + /* U-boot commands */ + /***************************************************/ +@@ -2132,6 +2155,24 @@ + printf ("Usage:\n%s\n", cmdtp->usage); + return 1; + } ++ ++#if defined(CONFIG_NAND_DYNPART) ++extern int nand_create_mtd_dynpart(struct mtd_info *mtd); ++ ++int do_dynpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++#if 0 ++ int i = simple_strtoul(argv[1], NULL, 0); ++ if (i >= CFG_MAX_NAND_DEVICE) ++ return -EINVAL; ++#endif ++ nand_create_mtd_dynpart(&nand_info[0]); ++ ++ return 0; ++} ++#endif /* CONFIG_NAND_DYNPART */ ++ ++ + #endif /* #ifdef CONFIG_JFFS2_CMDLINE */ + + /***************************************************/ +@@ -2197,6 +2238,15 @@ + " := '(' NAME ')'\n" + " := when set to 'ro' makes partition read-only (not used, passed to kernel)\n" + ); ++ ++#if defined(CONFIG_NAND_DYNPART) ++U_BOOT_CMD( ++ dynpart, 1, 1, do_dynpart, ++ "dynpart\t- dynamically calculate partition table based on BBT\n", ++ "\n" ++ " - sets 'mtdparts' according to BBT\n"); ++#endif /* CONFIG_NAND_DYNPART */ ++ + #endif /* #ifdef CONFIG_JFFS2_CMDLINE */ + + /***************************************************/ +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c ++++ u-boot/common/cmd_nand.c +@@ -101,7 +101,7 @@ + } + + int +-arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size) ++arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size, int net) + { + int idx = nand_curr_device; + #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE) +@@ -122,10 +122,17 @@ + printf("'%s' is not a number\n", argv[1]); + return -1; + } +- if (*size > part->size) +- *size = part->size; ++ if (*size > part->size) { ++ if (net) ++ *size = nand_net_part_size(part); ++ else ++ *size = part->size; ++ } + } else { +- *size = part->size; ++ if (net) ++ *size = nand_net_part_size(part); ++ else ++ *size = part->size; + } + idx = dev->id->num; + *nand = nand_info[idx]; +@@ -261,7 +268,7 @@ + + printf("\nNAND %s: ", scrub ? "scrub" : "erase"); + /* skip first two or three arguments, look for offset and size */ +- if (arg_off_size(argc - o, argv + o, nand, &off, &size) != 0) ++ if (arg_off_size(argc - o, argv + o, nand, &off, &size, 0) != 0) + return 1; + + memset(&opts, 0, sizeof(opts)); +@@ -323,7 +330,7 @@ + + read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */ + printf("\nNAND %s: ", read ? "read" : "write"); +- if (arg_off_size(argc - 3, argv + 3, nand, &off, &size) != 0) ++ if (arg_off_size(argc - 3, argv + 3, nand, &off, &size, 1) != 0) + return 1; + + s = strchr(cmd, '.'); +@@ -445,7 +452,7 @@ + } + + if (strcmp(cmd, "unlock") == 0) { +- if (arg_off_size(argc - 2, argv + 2, nand, &off, &size) < 0) ++ if (arg_off_size(argc - 2, argv + 2, nand, &off, &size, 0) < 0) + return 1; + + if (!nand_unlock(nand, off, size)) { +Index: u-boot/common/cmd_dynenv.c +=================================================================== +--- u-boot.orig/common/cmd_dynenv.c ++++ u-boot/common/cmd_dynenv.c +@@ -60,7 +60,7 @@ + buf[2] = 'V'; + buf[3] = '0'; + +- if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy) < 0) { ++ if (arg_off_size(argc-2, argv+2, mtd, &addr, &dummy, 1) < 0) { + printf("Offset or partition name expected\n"); + goto fail; + } +Index: u-boot/include/util.h +=================================================================== +--- u-boot.orig/include/util.h ++++ u-boot/include/util.h +@@ -28,6 +28,6 @@ + + /* common/cmd_nand.c */ + int arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, +- ulong *size); ++ ulong *size, int net); + + #endif /* UTIL_H */ +Index: u-boot/board/qt2410/qt2410.c +=================================================================== +--- u-boot.orig/board/qt2410/qt2410.c ++++ u-boot/board/qt2410/qt2410.c +@@ -126,3 +126,9 @@ + + return 0; + } ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, 0x4000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ +Index: u-boot/board/neo1973/gta01/gta01.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/gta01.c ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -429,3 +434,14 @@ + return 0; + } + ++ ++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. ++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 ++ images: 640*480*2*2 = 1228800 < 1245184. */ ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, 0x4000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ ++ +Index: u-boot/include/configs/qt2410.h +=================================================================== +--- u-boot.orig/include/configs/qt2410.h ++++ u-boot/include/configs/qt2410.h +@@ -283,5 +283,7 @@ + + #define MTDIDS_DEFAULT "nand0=qt2410-nand" + #define MTPARTS_DEFAULT "qt2410-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "qt2410-nand" ++#define CONFIG_NAND_DYNPART + + #endif /* __CONFIG_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch new file mode 100644 index 0000000000..b0e9bf4c4b --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch @@ -0,0 +1,302 @@ +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c ++++ u-boot/common/cmd_nand.c +@@ -392,6 +392,14 @@ + else + ret = nand->write_oob(nand, off, size, &size, + (u_char *) addr); ++ } else if (s != NULL && !strcmp(s, ".otp")) { ++ /* read out-of-band data */ ++ if (read) ++ ret = nand->read_otp(nand, off, size, &size, ++ (u_char *) addr); ++ else ++ ret = nand->write_otp(nand, off, size, &size, ++ (u_char *) addr); + } else { + if (read) + ret = nand_read(nand, off, &size, (u_char *)addr); +@@ -527,8 +535,9 @@ + "nand - NAND sub-system\n", + "info - show available NAND devices\n" + "nand device [dev] - show or set current device\n" +- "nand read[.jffs2] - addr off|partition size\n" +- "nand write[.jffs2] - addr off|partiton size - read/write `size' bytes starting\n" ++ "nand read[.jffs2, .oob, .otp] addr off|partition size\n" ++ "nand write[.jffs2, .oob, .otp] addr off|partiton size\n" ++ " - read/write `size' bytes starting\n" + " at offset `off' to/from memory address `addr'\n" + "nand erase [clean] [off size] - erase `size' bytes from\n" + " offset `off' (entire device if not specified)\n" +Index: u-boot/cpu/arm920t/s3c24x0/nand.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c ++++ u-boot/cpu/arm920t/s3c24x0/nand.c +@@ -205,7 +205,7 @@ + } + #endif + +-int board_nand_init(struct nand_chip *nand) ++int s3c24x0_nand_init(struct nand_chip *nand) + { + u_int32_t cfg; + u_int8_t tacls, twrph0, twrph1; +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c ++++ u-boot/drivers/nand/nand_base.c +@@ -2042,6 +2042,32 @@ + } + #endif + ++/* ++ * See nand_read_oob and nand_write_oob ++ */ ++ ++static int nand_read_otp(struct mtd_info *mtd, loff_t from, size_t len, ++ size_t *retlen, u_char *buf) ++{ ++ struct nand_chip *this = mtd->priv; ++ ++ if (!this->read_otp) ++ return -ENOSYS; ++ return this->read_otp(mtd, from, len, retlen, buf); ++ ++} ++ ++static int nand_write_otp(struct mtd_info *mtd, loff_t to, size_t len, ++ size_t *retlen, const u_char *buf) ++{ ++ struct nand_chip *this = mtd->priv; ++ ++ if (!this->write_otp) ++ return -ENOSYS; ++ return this->write_otp(mtd, to, len, retlen, buf); ++} ++ ++ + /** + * single_erease_cmd - [GENERIC] NAND standard block erase command function + * @mtd: MTD device structure +@@ -2613,6 +2639,8 @@ + mtd->write_ecc = nand_write_ecc; + mtd->read_oob = nand_read_oob; + mtd->write_oob = nand_write_oob; ++ mtd->read_otp = nand_read_otp; ++ mtd->write_otp = nand_write_otp; + /* XXX U-BOOT XXX */ + #if 0 + mtd->readv = NULL; +Index: u-boot/include/linux/mtd/mtd.h +=================================================================== +--- u-boot.orig/include/linux/mtd/mtd.h ++++ u-boot/include/linux/mtd/mtd.h +@@ -95,6 +95,9 @@ + int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); + int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); + ++ int (*read_otp) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); ++ int (*write_otp) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); ++ + /* + * Methods to access the protection register area, present in some + * flash devices. The user data is one time programmable but the +Index: u-boot/include/linux/mtd/nand.h +=================================================================== +--- u-boot.orig/include/linux/mtd/nand.h ++++ u-boot/include/linux/mtd/nand.h +@@ -307,6 +307,10 @@ + void (*enable_hwecc)(struct mtd_info *mtd, int mode); + void (*erase_cmd)(struct mtd_info *mtd, int page); + int (*scan_bbt)(struct mtd_info *mtd); ++ int (*read_otp)(struct mtd_info *mtd, loff_t from, ++ size_t len, size_t *retlen, u_char *buf); ++ int (*write_otp) (struct mtd_info *mtd, loff_t to, ++ size_t len, size_t *retlen, const u_char *buf); + int eccmode; + int eccsize; + int eccbytes; +Index: u-boot/board/neo1973/gta01/Makefile +=================================================================== +--- u-boot.orig/board/neo1973/gta01/Makefile ++++ u-boot/board/neo1973/gta01/Makefile +@@ -25,7 +25,7 @@ + + LIB = lib$(BOARD).a + +-OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o ++OBJS := gta01.o pcf50606.o nand.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o + SOBJS := ../common/lowlevel_init.o + + .PHONY: all +Index: u-boot/board/neo1973/gta01/nand.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/nand.c +@@ -0,0 +1,121 @@ ++/* ++ * nand.c - Board-specific NAND setup ++ * ++ * Copyright (C) 2007 by OpenMoko, Inc. ++ * Written by Werner Almesberger ++ * All Rights Reserved ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++ ++#include "config.h" /* nand.h needs NAND_MAX_CHIPS */ ++#include "linux/mtd/mtd.h" ++#include "linux/mtd/nand.h" ++#include "asm/errno.h" ++ ++ ++int s3c24x0_nand_init(struct nand_chip *nand); ++ ++ ++static void samsung_nand_begin_otp(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ ++ /* @@@FIXME: this is ugly - we select the NAND chip to send the ++ mode switch commands, knowing that it will be switched off later */ ++ this->select_chip(mtd, 0); ++ /* "magic" mode change */ ++ this->cmdfunc(mtd, 0x30, -1, -1); ++ this->cmdfunc(mtd, 0x65, -1, -1); ++} ++ ++ ++static void samsung_nand_end_otp(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ ++ /* read/write deselected the chip so now we need to select again */ ++ this->select_chip(mtd, 0); ++ this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); ++ this->select_chip(mtd, -1); ++} ++ ++ ++static loff_t otp_page[] = { ++ 0x15, /* 00-XX-00-00, with XX = 15h-19h */ ++ 0x16, ++ 0x17, ++ 0x18, ++ 0x19, ++ 0x1b, /* 00-1B-00-00 */ ++}; ++ ++#define OTP_PAGES (sizeof(otp_page)/sizeof(*otp_page)) ++ ++ ++static int convert_otp_address(loff_t *addr, size_t *len) ++{ ++ int page; ++ ++ if (*len && *addr >> 9 != (*addr+*len-1) >> 9) ++ return -EINVAL; ++ if (*len > 512) ++ return -EINVAL; ++ page = *addr >> 9; ++ if (page >= OTP_PAGES) ++ return -EINVAL; ++ *addr = otp_page[page] << 9; ++ return 0; ++} ++ ++ ++static int samsung_nand_read_otp(struct mtd_info *mtd, loff_t from, ++ size_t len, size_t *retlen, u_char *buf) ++{ ++ int ret; ++ ++ ret = convert_otp_address(&from, &len); ++ if (ret) ++ return ret; ++ samsung_nand_begin_otp(mtd); ++ ret = mtd->read(mtd, from, len, retlen, buf); ++ samsung_nand_end_otp(mtd); ++ return ret; ++} ++ ++ ++static int samsung_nand_write_otp(struct mtd_info *mtd, loff_t to, ++ size_t len, size_t *retlen, const u_char *buf) ++{ ++ int ret; ++ ++ ret = convert_otp_address(&to, &len); ++ if (ret) ++ return ret; ++ samsung_nand_begin_otp(mtd); ++ ret = mtd->write(mtd, to, len, retlen, buf); ++ samsung_nand_end_otp(mtd); ++ return ret; ++} ++ ++ ++int board_nand_init(struct nand_chip *nand) ++{ ++ nand->read_otp = samsung_nand_read_otp; ++ nand->write_otp = samsung_nand_write_otp; ++ return s3c24x0_nand_init(nand); ++} +Index: u-boot/board/neo1973/gta02/nand.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/nand.c +@@ -0,0 +1,39 @@ ++/* ++ * nand.c - Board-specific NAND setup ++ * ++ * Copyright (C) 2007 by OpenMoko, Inc. ++ * Written by Werner Almesberger ++ * All Rights Reserved ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++ ++#include "config.h" /* nand.h needs NAND_MAX_CHIPS */ ++#include "linux/mtd/mtd.h" ++#include "linux/mtd/nand.h" ++ ++ ++int s3c24x0_nand_init(struct nand_chip *nand); ++ ++ ++/* Add OTP et al later */ ++ ++ ++int board_nand_init(struct nand_chip *nand) ++{ ++ return s3c24x0_nand_init(nand); ++} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch b/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch new file mode 100644 index 0000000000..8360409e46 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch @@ -0,0 +1,23 @@ +Re-introduce the 'nand read.oob' and 'nand write.oob' commands +that used to exist with the legacy NAND code + +Signed-off-by: Harald Welte +Index: u-boot.git/common/cmd_nand.c +=================================================================== +--- u-boot.git.orig/common/cmd_nand.c 2007-01-26 15:41:13.000000000 +0100 ++++ u-boot.git/common/cmd_nand.c 2007-01-26 15:49:37.000000000 +0100 +@@ -351,6 +351,14 @@ + opts.quiet = quiet; + ret = nand_write_opts(nand, &opts); + } ++ } else if (s != NULL && !strcmp(s, ".oob")) { ++ /* read out-of-band data */ ++ if (read) ++ ret = nand->read_oob(nand, off, size, &size, ++ (u_char *) addr); ++ else ++ ret = nand->write_oob(nand, off, size, &size, ++ (u_char *) addr); + } else { + if (read) + ret = nand_read(nand, off, &size, (u_char *)addr); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch b/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch new file mode 100644 index 0000000000..6f6af2c758 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch @@ -0,0 +1,316 @@ +Index: u-boot/drivers/usbtty.c +=================================================================== +--- u-boot.orig/drivers/usbtty.c ++++ u-boot/drivers/usbtty.c +@@ -66,7 +66,7 @@ + /* + * Defines + */ +-#define NUM_CONFIGS 1 ++#define NUM_CONFIGS 2 + #define MAX_INTERFACES 2 + #define NUM_ENDPOINTS 3 + #define ACM_TX_ENDPOINT 3 +@@ -192,8 +192,7 @@ + #endif + .bConfigurationValue = 1, + .iConfiguration = STR_CONFIG, +- .bmAttributes = +- BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, ++ .bmAttributes = BMATTRIBUTE_RESERVED, + .bMaxPower = USBTTY_MAXPOWER + }, + /* Interface 1 */ +@@ -294,6 +293,120 @@ + .func_dfu = DFU_FUNC_DESC, + #endif + }, ++ { ++ .configuration_desc ={ ++ .bLength = ++ sizeof(struct usb_configuration_descriptor), ++ .bDescriptorType = USB_DT_CONFIG, ++ .wTotalLength = ++ cpu_to_le16(sizeof(struct acm_config_desc) ++#ifdef CONFIG_USBD_DFU ++ - sizeof(struct usb_interface_descriptor) ++ - sizeof(struct usb_dfu_func_descriptor) ++#endif ++ ), ++ .bNumInterfaces = NUM_ACM_INTERFACES, ++ .bConfigurationValue = 2, ++ .iConfiguration = STR_CONFIG, ++ .bmAttributes = BMATTRIBUTE_RESERVED, ++ .bMaxPower = 50, /* 100mA */ ++ }, ++ /* Interface 1 */ ++ .interface_desc = { ++ .bLength = sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bAlternateSetting = 0, ++ .bNumEndpoints = 0x01, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_CONTROL, ++ .bInterfaceSubClass = COMMUNICATIONS_ACM_SUBCLASS, ++ .bInterfaceProtocol = COMMUNICATIONS_V25TER_PROTOCOL, ++ .iInterface = STR_CTRL_INTERFACE, ++ }, ++ .usb_class_header = { ++ .bFunctionLength = ++ sizeof(struct usb_class_header_function_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_HEADER, ++ .bcdCDC = cpu_to_le16(110), ++ }, ++ .usb_class_call_mgt = { ++ .bFunctionLength = ++ sizeof(struct usb_class_call_management_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_CMF, ++ .bmCapabilities = 0x00, ++ .bDataInterface = 0x01, ++ }, ++ .usb_class_acm = { ++ .bFunctionLength = ++ sizeof(struct usb_class_abstract_control_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_ACMF, ++ .bmCapabilities = 0x00, ++ }, ++ .usb_class_union = { ++ .bFunctionLength = ++ sizeof(struct usb_class_union_function_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_UF, ++ .bMasterInterface = 0x00, ++ .bSlaveInterface0 = 0x01, ++ }, ++ .notification_endpoint = { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x01 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_INT, ++ .wMaxPacketSize ++ = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ ++ /* Interface 2 */ ++ .data_class_interface = { ++ .bLength = ++ sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x01, ++ .bAlternateSetting = 0x00, ++ .bNumEndpoints = 0x02, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_DATA, ++ .bInterfaceSubClass = DATA_INTERFACE_SUBCLASS_NONE, ++ .bInterfaceProtocol = DATA_INTERFACE_PROTOCOL_NONE, ++ .iInterface = STR_DATA_INTERFACE, ++ }, ++ .data_endpoints = { ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x02 | USB_DIR_OUT, ++ .bmAttributes = ++ USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x03 | USB_DIR_IN, ++ .bmAttributes = ++ USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ }, ++ /* We don't add the DFU functional descriptor here since we only ++ * want to do DFU in the high-current charging mode for safety reasons */ ++ }, ++ + }; + + static struct rs232_emu rs232_desc={ +@@ -330,8 +443,7 @@ + .bNumInterfaces = NUM_GSERIAL_INTERFACES, + .bConfigurationValue = 1, + .iConfiguration = STR_CONFIG, +- .bmAttributes = +- BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, ++ .bmAttributes = BMATTRIBUTE_RESERVED, + .bMaxPower = USBTTY_MAXPOWER + }, + .interface_desc = { +@@ -384,6 +496,68 @@ + }, + }, + }, ++ { ++ .configuration_desc ={ ++ .bLength = sizeof(struct usb_configuration_descriptor), ++ .bDescriptorType = USB_DT_CONFIG, ++ .wTotalLength = ++ cpu_to_le16(sizeof(struct gserial_config_desc)), ++ .bNumInterfaces = NUM_GSERIAL_INTERFACES, ++ .bConfigurationValue = 1, ++ .iConfiguration = STR_CONFIG, ++ .bmAttributes = BMATTRIBUTE_RESERVED, ++ .bMaxPower = 50 ++ }, ++ .interface_desc = { ++ { ++ .bLength = ++ sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bAlternateSetting = 0, ++ .bNumEndpoints = NUM_ENDPOINTS, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_VENDOR, ++ .bInterfaceSubClass = ++ COMMUNICATIONS_NO_SUBCLASS, ++ .bInterfaceProtocol = ++ COMMUNICATIONS_NO_PROTOCOL, ++ .iInterface = STR_DATA_INTERFACE ++ }, ++ }, ++ .data_endpoints = { ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x01 | USB_DIR_OUT, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE), ++ .bInterval= 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x02 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x03 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_INT, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ }, ++ }, + }; + + /* +@@ -679,12 +853,14 @@ + bus_instance->maxpacketsize = 64; + bus_instance->serial_number_str = serial_number; + +- /* configuration instance */ +- memset (config_instance, 0, +- sizeof (struct usb_configuration_instance)); +- config_instance->interfaces = interface_count; +- config_instance->configuration_descriptor = configuration_descriptor; +- config_instance->interface_instance_array = interface_instance; ++ /* configuration instances */ ++ for (i = 0; i < NUM_CONFIGS; i++) { ++ memset(&config_instance[i], 0, sizeof(config_instance)); ++ config_instance[i].interfaces = interface_count; ++ /* FIXME: this breaks for the non-ACM case */ ++ config_instance[i].configuration_descriptor = &acm_configuration_descriptors[i]; ++ config_instance[i].interface_instance_array = interface_instance; ++ } + + /* interface instance */ + memset (interface_instance, 0, +@@ -1043,9 +1219,17 @@ + usbtty_configured_flag = 0; + break; + case DEVICE_CONFIGURED: ++ printf("DEVICE_CONFIGURED: %u\n", device->configuration); ++ if (device->configuration == 1) ++ udc_ctrl(UDC_CTRL_500mA_ENABLE, 1); ++ else ++ udc_ctrl(UDC_CTRL_500mA_ENABLE, 0); + usbtty_configured_flag = 1; + break; +- ++ case DEVICE_DE_CONFIGURED: ++ printf("DEVICE_DE_CONFIGURED\n"); ++ udc_ctrl(UDC_CTRL_500mA_ENABLE, 0); ++ break; + case DEVICE_ADDRESS_ASSIGNED: + usbtty_init_endpoints (); + +Index: u-boot/drivers/usbtty.h +=================================================================== +--- u-boot.orig/drivers/usbtty.h ++++ u-boot/drivers/usbtty.h +@@ -60,7 +60,7 @@ + #define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS + + #define USBTTY_BCD_DEVICE 0x00 +-#define USBTTY_MAXPOWER 0x00 ++#define USBTTY_MAXPOWER 250 /* 500mA */ + + #define STR_LANG 0x00 + #define STR_MANUFACTURER 0x01 +Index: u-boot/board/neo1973/common/udc.c +=================================================================== +--- u-boot.orig/board/neo1973/common/udc.c ++++ u-boot/board/neo1973/common/udc.c +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + + void udc_ctrl(enum usbd_event event, int param) + { +@@ -17,6 +18,13 @@ + gpio->GPBDAT &= ~(1 << 9); + #endif + break; ++ case UDC_CTRL_500mA_ENABLE: ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \ ++ defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ ++ defined(CONFIG_ARCH_GTA01B_v4) ++ pcf50606_charge_autofast(param); ++#endif ++ break; + default: + break; + } +Index: u-boot/include/usbdcore.h +=================================================================== +--- u-boot.orig/include/usbdcore.h ++++ u-boot/include/usbdcore.h +@@ -686,8 +686,8 @@ + + enum usbd_event { + UDC_CTRL_PULLUP_ENABLE, ++ UDC_CTRL_500mA_ENABLE, + }; + + void udc_ctrl(enum usbd_event event, int param); + #endif +-#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch b/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch new file mode 100644 index 0000000000..f32cbde27b --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch @@ -0,0 +1,137 @@ +Provide a place where the loader can patch the binary, such that it executes a +command string from RAM. We use this for automated installs, where we can thus +use the same u-boot binary for all stages. + +include/configs/neo1973.h: new option CFG_PREBOOT_OVERRIDE to allow setting of + the preboot command in memory +cpu/arm920t/start.S: added variable "preboot_override" at known location + (_start+0x40) +common/main.c (main_loop): if preboot_override is set, execute the command + string found there +common/env_common.c (env_relocate): if preboot_override is set, always use the + default environment + +- Werner Almesberger + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -77,6 +77,14 @@ _fiq: .word fiq + ************************************************************************* + */ + ++ ++/* Must follow the .balign above, so we get a well-known address ! */ ++#ifdef CFG_PREBOOT_OVERRIDE ++.globl preboot_override ++preboot_override: ++ .word 0 ++#endif ++ + #ifdef CONFIG_S3C2410_NAND_BOOT + .globl booted_from_nand + booted_from_nand: +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -207,6 +207,7 @@ + #define CFG_ENV_IS_IN_NAND 1 + #define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ + #define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ ++#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ + + #define NAND_MAX_CHIPS 1 + #define CFG_NAND_BASE 0x4e000000 +Index: u-boot/common/main.c +=================================================================== +--- u-boot.orig/common/main.c ++++ u-boot/common/main.c +@@ -85,6 +85,11 @@ int do_mdm_init = 0; + extern void mdm_init(void); /* defined in board.c */ + #endif + ++#ifdef CFG_PREBOOT_OVERRIDE ++extern char *preboot_override; ++#endif ++ ++ + /*************************************************************************** + * Watch for 'delay' seconds for autoboot stop or autoboot delay string. + * returns: 0 - no key string, allow autoboot +@@ -306,8 +311,8 @@ void main_loop (void) + char *s; + int bootdelay; + #endif +-#ifdef CONFIG_PREBOOT +- char *p; ++#if defined(CONFIG_PREBOOT) || defined(CFG_PREBOOT_OVERRIDE) ++ char *p = NULL; + #endif + #ifdef CONFIG_BOOTCOUNT_LIMIT + unsigned long bootcount = 0; +@@ -364,8 +369,23 @@ void main_loop (void) + install_auto_complete(); + #endif + ++#if defined(CONFIG_PREBOOT) || defined(CFG_PREBOOT_OVERRIDE) + #ifdef CONFIG_PREBOOT +- if ((p = getenv ("preboot")) != NULL) { ++ p = getenv ("preboot"); ++#endif ++#ifdef CFG_PREBOOT_OVERRIDE ++ if (preboot_override) { ++ /* for convenience, preboot_override may end in \n, not \0 */ ++ p = strchr(preboot_override, '\n'); ++ if (p) ++ *p = 0; ++ /* make sure we can overwrite the load area if we want to */ ++ p = strdup(preboot_override); ++ /* clean the image in case we want to flash it */ ++ preboot_override = NULL; ++ } ++#endif /* CFG_PREBOOT_OVERRIDE */ ++ if (p) { + # ifdef CONFIG_AUTOBOOT_KEYED + int prev = disable_ctrlc(1); /* disable Control C checking */ + # endif +@@ -381,7 +401,7 @@ void main_loop (void) + disable_ctrlc(prev); /* restore Control C checking */ + # endif + } +-#endif /* CONFIG_PREBOOT */ ++#endif /* CONFIG_PREBOOT || CFG_PREBOOT_OVERRIDE */ + + #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) + s = getenv ("bootdelay"); +Index: u-boot/common/env_common.c +=================================================================== +--- u-boot.orig/common/env_common.c ++++ u-boot/common/env_common.c +@@ -37,6 +37,10 @@ + # define SHOW_BOOT_PROGRESS(arg) + #endif + ++#ifdef CFG_PREBOOT_OVERRIDE ++extern char *preboot_override; ++#endif ++ + DECLARE_GLOBAL_DATA_PTR; + + #ifdef CONFIG_AMIGAONEG3SE +@@ -234,7 +238,14 @@ void env_relocate (void) + puts ("*** Warning - bad CRC, using default environment\n\n"); + SHOW_BOOT_PROGRESS (-1); + #endif ++ } ++ ++#ifdef CFG_PREBOOT_OVERRIDE ++ if (preboot_override) ++ gd->env_valid = 0; ++#endif + ++ if (gd->env_valid == 0) { + if (sizeof(default_environment) > ENV_SIZE) + { + puts ("*** Error - default environment is too large\n\n"); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch b/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch new file mode 100644 index 0000000000..a1c381a2cf --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch @@ -0,0 +1,31 @@ +include/configs/neo1973.h: increase heap from 128 kB to 400 kB, for BMP image + decompression + [ note: increasing it to 512 kB trips over something. note sure what. + find out. ] +include/configs/neo1973.h: raise number of command line arguments from 16 to 64 + +- Werner Almesberger + +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -54,7 +54,8 @@ + /* + * Size of malloc() pool + */ +-#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) ++ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ + #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ + + /* +@@ -142,7 +143,7 @@ + #endif + #define CFG_CBSIZE 256 /* Console I/O Buffer Size */ + #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ +-#define CFG_MAXARGS 16 /* max number of command args */ ++#define CFG_MAXARGS 64 /* max number of command args */ + #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ + + #define CFG_MEMTEST_START 0x30000000 /* memtest works on */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/series b/packages/uboot/u-boot-mkimage-gta01-native/series new file mode 100644 index 0000000000..4fc7d1342f --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/series @@ -0,0 +1,76 @@ +# just some local hacks +uboot-machtypes.patch +ext2load_hex.patch +uboot-mokoversion.patch + +# those we want to get mainline +uboot-s3c2410-warnings-fix.patch +uboot-strtoul.patch +uboot-cramfs_but_no_jffs2.patch +nand-read_write_oob.patch +uboot-arm920t-gd_in_irq.patch +uboot-arm920_s3c2410_irq_demux.patch +uboot-s3c2410-nand.patch +uboot-cmd_s3c2410.patch +uboot-s3c2410-mmc.patch +env_nand_oob.patch +dynenv-harden.patch +uboot-s3c2410_fb.patch +uboot-20061030-qt2410.patch +uboot-20061030-neo1973.patch + +# under construction, but intended for mainline +uboot-s3c2410-misccr-definitions.patch + +boot-from-ram-reloc.patch +boot-from-ram-and-nand.patch +wakeup-reason-nand-only.patch +uboot-neo1973-resume.patch + +# this will be somewhat more difficult +nand-dynamic_partitions.patch +uboot-s3c2410-norelocate_irqvec_cpy.patch +uboot-usbtty-acm.patch +uboot-s3c2410_udc.patch + +# those need to be cleaned up +bbt-create-optional.patch +nand-createbbt.patch +dontask.patch +nand-badisbad.patch +uboot-bbt-quiet.patch + +# splash screen +raise-limits.patch +splashimage-command.patch +cmd-unzip.patch +enable-splash-bmp.patch + +# for automated installation +preboot-override.patch +lowlevel_foo.patch + +# move these later, once the dust has settled +default-env.patch +console-ansi.patch +boot-menu.patch + +# those have to be implemented fully +uboot-dfu.patch +uboot-neo1973-defaultenv.patch +uboot-nand-markbad-reallybad.patch +usbdcore-multiple_configs.patch +neo1973-chargefast.patch + +uboot-s3c2440.patch +uboot-smdk2440.patch +uboot-hxd8.patch + +uboot-license.patch + +uboot-gta02.patch +uboot-s3c2443.patch +uboot-smdk2443.patch + +# for review, merge soon +unbusy-i2c.patch diff --git a/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch b/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch new file mode 100644 index 0000000000..8ea48cf484 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch @@ -0,0 +1,24 @@ +drivers/cfb_console.c (video_logo): if "splashimage" doesn't contain an + address, use its content as a command + +- Werner Almesberger + +Index: u-boot/drivers/cfb_console.c +=================================================================== +--- u-boot.orig/drivers/cfb_console.c ++++ u-boot/drivers/cfb_console.c +@@ -1121,7 +1121,13 @@ static void *video_logo (void) + ulong addr; + + if ((s = getenv ("splashimage")) != NULL) { +- addr = simple_strtoul (s, NULL, 16); ++ char *end; ++ ++ addr = simple_strtoul (s, &end, 16); ++ if (*end) { ++ run_command(s, 0); ++ return video_fb_address; ++ } + + if (video_display_bitmap (addr, 0, 0) == 0) { + return ((void *) (video_fb_address)); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch new file mode 100644 index 0000000000..7c70244b38 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch @@ -0,0 +1,2248 @@ +This patch adds neo1973 'board' (FIC Neo1973 phone) support to u-boot. +Specifically, it adds support for the GTA01v3, GTA01v4, GTA01Bv2 and +GTA01Bv3 hardware revisions. + +Signed-off-by: Harald Welte + +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2009,6 +2009,14 @@ + sbc2410x_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 + ++gta01_config \ ++gta01v3_config \ ++gta01bv2_config \ ++gta01bv3_config \ ++gta01bv4_config \ ++gta01v4_config : unconfig ++ @sh board/neo1973/gta01/split_by_variant.sh $@ ++ + qt2410_config : unconfig + @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 + +Index: u-boot/common/main.c +=================================================================== +--- u-boot.orig/common/main.c ++++ u-boot/common/main.c +@@ -61,6 +61,7 @@ + #undef DEBUG_PARSER + + char console_buffer[CFG_CBSIZE]; /* console I/O buffer */ ++int nobootdelay; + + #ifndef CONFIG_CMDLINE_EDITING + static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen); +@@ -376,7 +377,7 @@ + + debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); + +- if (bootdelay >= 0 && s && !abortboot (bootdelay)) { ++ if (!nobootdelay && bootdelay >= 0 && s && !abortboot (bootdelay)) { + # ifdef CONFIG_AUTOBOOT_KEYED + int prev = disable_ctrlc(1); /* disable Control C checking */ + # endif +Index: u-boot/drivers/Makefile +=================================================================== +--- u-boot.orig/drivers/Makefile ++++ u-boot/drivers/Makefile +@@ -50,6 +50,7 @@ + usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbtty.o \ + videomodes.o w83c553f.o \ + ks8695eth.o \ ++ pcf50606.o \ + pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ + rpx_pcmcia.o \ + fsl_i2c.o s3c2410_fb.o +Index: u-boot/drivers/pcf50606.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/pcf50606.c +@@ -0,0 +1,112 @@ ++ ++#include ++ ++#ifdef CONFIG_DRIVER_PCF50606 ++ ++#include ++#include ++#include ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++ ++#define PCF50606_I2C_ADDR 0x08 ++ ++void __pcf50606_reg_write(u_int8_t reg, u_int8_t val) ++{ ++ i2c_write(PCF50606_I2C_ADDR, reg, 1, &val, 1); ++} ++ ++u_int8_t __pcf50606_reg_read(u_int8_t reg) ++{ ++ u_int8_t tmp; ++ i2c_read(PCF50606_I2C_ADDR, reg, 1, &tmp, 1); ++ return tmp; ++} ++ ++void pcf50606_reg_write(u_int8_t reg, u_int8_t val) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ __pcf50606_reg_write(reg, val); ++ local_irq_restore(flags); ++} ++ ++u_int8_t pcf50606_reg_read(u_int8_t reg) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = __pcf50606_reg_read(reg); ++ local_irq_restore(flags); ++ ++ return tmp; ++} ++ ++void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = __pcf50606_reg_read(reg); ++ __pcf50606_reg_write(reg, (val & mask) | (tmp & ~mask)); ++ local_irq_restore(flags); ++} ++ ++void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = pcf50606_reg_read(reg); ++ pcf50606_reg_write(reg, (tmp & ~bits)); ++ local_irq_restore(flags); ++} ++ ++static const u_int8_t regs_valid[] = { ++ PCF50606_REG_OOCS, PCF50606_REG_INT1M, PCF50606_REG_INT2M, ++ PCF50606_REG_INT3M, PCF50606_REG_OOCC1, PCF50606_REG_OOCC2, ++ PCF50606_REG_PSSC, PCF50606_REG_PWROKM, PCF50606_REG_DCDC1, ++ PCF50606_REG_DCDC2, PCF50606_REG_DCDC3, PCF50606_REG_DCDC4, ++ PCF50606_REG_DCDEC1, PCF50606_REG_DCDEC2, PCF50606_REG_DCUDC1, ++ PCF50606_REG_DCUDC2, PCF50606_REG_IOREGC, PCF50606_REG_D1REGC1, ++ PCF50606_REG_D2REGC1, PCF50606_REG_D3REGC1, PCF50606_REG_LPREGC1, ++ PCF50606_REG_LPREGC2, PCF50606_REG_MBCC1, PCF50606_REG_MBCC2, ++ PCF50606_REG_MBCC3, PCF50606_REG_BBCC, PCF50606_REG_ADCC1, ++ PCF50606_REG_ADCC2, PCF50606_REG_ACDC1, PCF50606_REG_BVMC, ++ PCF50606_REG_PWMC1, PCF50606_REG_LEDC1, PCF50606_REG_LEDC2, ++ PCF50606_REG_GPOC1, PCF50606_REG_GPOC2, PCF50606_REG_GPOC3, ++ PCF50606_REG_GPOC4, PCF50606_REG_GPOC5, ++}; ++ ++ ++/* initialize PCF50606 register set */ ++void pcf50606_init(void) ++{ ++ unsigned long flags; ++ int i; ++ ++ local_irq_save(flags); ++ for (i = 0; i < ARRAY_SIZE(regs_valid); i++) { ++ __pcf50606_reg_write(regs_valid[i], ++ pcf50606_initial_regs[regs_valid[i]]); ++ } ++ local_irq_restore(flags); ++} ++ ++void pcf50606_charge_autofast(int on) ++{ ++ if (on) { ++ printf("Enabling automatic fast charge\n"); ++ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, ++ PCF50606_MBCC1_AUTOFST, ++ PCF50606_MBCC1_AUTOFST); ++ } else { ++ printf("Disabling fast charge\n"); ++ pcf50606_reg_write(PCF50606_REG_MBCC1, 0x00); ++ } ++} ++ ++#endif /* CONFIG DRIVER_PCF50606 */ +Index: u-boot/include/pcf50606.h +=================================================================== +--- /dev/null ++++ u-boot/include/pcf50606.h +@@ -0,0 +1,273 @@ ++#ifndef _PCF50606_H ++#define _PCF50606_H ++ ++/* Philips PCF50606 Power Managemnt Unit (PMU) driver ++ * (C) 2006-2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ */ ++ ++enum pfc50606_regs { ++ PCF50606_REG_ID = 0x00, ++ PCF50606_REG_OOCS = 0x01, ++ PCF50606_REG_INT1 = 0x02, /* Interrupt Status */ ++ PCF50606_REG_INT2 = 0x03, /* Interrupt Status */ ++ PCF50606_REG_INT3 = 0x04, /* Interrupt Status */ ++ PCF50606_REG_INT1M = 0x05, /* Interrupt Mask */ ++ PCF50606_REG_INT2M = 0x06, /* Interrupt Mask */ ++ PCF50606_REG_INT3M = 0x07, /* Interrupt Mask */ ++ PCF50606_REG_OOCC1 = 0x08, ++ PCF50606_REG_OOCC2 = 0x09, ++ PCF50606_REG_RTCSC = 0x0a, /* Second */ ++ PCF50606_REG_RTCMN = 0x0b, /* Minute */ ++ PCF50606_REG_RTCHR = 0x0c, /* Hour */ ++ PCF50606_REG_RTCWD = 0x0d, /* Weekday */ ++ PCF50606_REG_RTCDT = 0x0e, /* Day */ ++ PCF50606_REG_RTCMT = 0x0f, /* Month */ ++ PCF50606_REG_RTCYR = 0x10, /* Year */ ++ PCF50606_REG_RTCSCA = 0x11, /* Alarm Second */ ++ PCF50606_REG_RTCMNA = 0x12, /* Alarm Minute */ ++ PCF50606_REG_RTCHRA = 0x13, /* Alarm Hour */ ++ PCF50606_REG_RTCWDA = 0x14, /* Alarm Weekday */ ++ PCF50606_REG_RTCDTA = 0x15, /* Alarm Day */ ++ PCF50606_REG_RTCMTA = 0x16, /* Alarm Month */ ++ PCF50606_REG_RTCYRA = 0x17, /* Alarm Year */ ++ PCF50606_REG_PSSC = 0x18, /* Power sequencing */ ++ PCF50606_REG_PWROKM = 0x19, /* PWROK mask */ ++ PCF50606_REG_PWROKS = 0x1a, /* PWROK status */ ++ PCF50606_REG_DCDC1 = 0x1b, ++ PCF50606_REG_DCDC2 = 0x1c, ++ PCF50606_REG_DCDC3 = 0x1d, ++ PCF50606_REG_DCDC4 = 0x1e, ++ PCF50606_REG_DCDEC1 = 0x1f, ++ PCF50606_REG_DCDEC2 = 0x20, ++ PCF50606_REG_DCUDC1 = 0x21, ++ PCF50606_REG_DCUDC2 = 0x22, ++ PCF50606_REG_IOREGC = 0x23, ++ PCF50606_REG_D1REGC1 = 0x24, ++ PCF50606_REG_D2REGC1 = 0x25, ++ PCF50606_REG_D3REGC1 = 0x26, ++ PCF50606_REG_LPREGC1 = 0x27, ++ PCF50606_REG_LPREGC2 = 0x28, ++ PCF50606_REG_MBCC1 = 0x29, ++ PCF50606_REG_MBCC2 = 0x2a, ++ PCF50606_REG_MBCC3 = 0x2b, ++ PCF50606_REG_MBCS1 = 0x2c, ++ PCF50606_REG_BBCC = 0x2d, ++ PCF50606_REG_ADCC1 = 0x2e, ++ PCF50606_REG_ADCC2 = 0x2f, ++ PCF50606_REG_ADCS1 = 0x30, ++ PCF50606_REG_ADCS2 = 0x31, ++ PCF50606_REG_ADCS3 = 0x32, ++ PCF50606_REG_ACDC1 = 0x33, ++ PCF50606_REG_BVMC = 0x34, ++ PCF50606_REG_PWMC1 = 0x35, ++ PCF50606_REG_LEDC1 = 0x36, ++ PCF50606_REG_LEDC2 = 0x37, ++ PCF50606_REG_GPOC1 = 0x38, ++ PCF50606_REG_GPOC2 = 0x39, ++ PCF50606_REG_GPOC3 = 0x3a, ++ PCF50606_REG_GPOC4 = 0x3b, ++ PCF50606_REG_GPOC5 = 0x3c, ++ __NUM_PCF50606_REGS ++}; ++ ++enum pcf50606_reg_oocs { ++ PFC50606_OOCS_ONKEY = 0x01, ++ PCF50606_OOCS_EXTON = 0x02, ++ PCF50606_OOCS_PWROKRST = 0x04, ++ PCF50606_OOCS_BATOK = 0x08, ++ PCF50606_OOCS_BACKOK = 0x10, ++ PCF50606_OOCS_CHGOK = 0x20, ++ PCF50606_OOCS_TEMPOK = 0x40, ++ PCF50606_OOCS_WDTEXP = 0x80, ++}; ++ ++enum pcf50606_reg_oocc1 { ++ PCF50606_OOCC1_GOSTDBY = 0x01, ++ PCF50606_OOCC1_TOTRST = 0x02, ++ PCF50606_OOCC1_CLK32ON = 0x04, ++ PCF50606_OOCC1_WDTRST = 0x08, ++ PCF50606_OOCC1_RTCWAK = 0x10, ++ PCF50606_OOCC1_CHGWAK = 0x20, ++ PCF50606_OOCC1_EXTONWAK_HIGH = 0x40, ++ PCF50606_OOCC1_EXTONWAK_LOW = 0x80, ++ PCF50606_OOCC1_EXTONWAK_NO_WAKEUP = 0x3f, ++}; ++ ++enum pcf50606_reg_oocc2 { ++ PCF50606_OOCC2_ONKEYDB_NONE = 0x00, ++ PCF50606_OOCC2_ONKEYDB_14ms = 0x01, ++ PCF50606_OOCC2_ONKEYDB_62ms = 0x02, ++ PCF50606_OOCC2_ONKEYDB_500ms = 0x03, ++ PCF50606_OOCC2_EXTONDB_NONE = 0x00, ++ PCF50606_OOCC2_EXTONDB_14ms = 0x04, ++ PCF50606_OOCC2_EXTONDB_62ms = 0x08, ++ PCF50606_OOCC2_EXTONDB_500ms = 0x0c, ++}; ++ ++enum pcf50606_reg_int1 { ++ PCF50606_INT1_ONKEYR = 0x01, /* ONKEY rising edge */ ++ PCF50606_INT1_ONKEYF = 0x02, /* ONKEY falling edge */ ++ PCF50606_INT1_ONKEY1S = 0x04, /* OMKEY at least 1sec low */ ++ PCF50606_INT1_EXTONR = 0x08, /* EXTON rising edge */ ++ PCF50606_INT1_EXTONF = 0x10, /* EXTON falling edge */ ++ PCF50606_INT1_SECOND = 0x40, /* RTC periodic second interrupt */ ++ PCF50606_INT1_ALARM = 0x80, /* RTC alarm time is reached */ ++}; ++ ++enum pcf50606_reg_int2 { ++ PCF50606_INT2_CHGINS = 0x01, /* Charger inserted */ ++ PCF50606_INT2_CHGRM = 0x02, /* Charger removed */ ++ PCF50606_INT2_CHGFOK = 0x04, /* Fast charging OK */ ++ PCF50606_INT2_CHGERR = 0x08, /* Error in charging mode */ ++ PCF50606_INT2_CHGFRDY = 0x10, /* Fast charge completed */ ++ PCF50606_INT2_CHGPROT = 0x20, /* Charging protection interrupt */ ++ PCF50606_INT2_CHGWD10S = 0x40, /* Charger watchdig expires in 10s */ ++ PCF50606_INT2_CHGWDEXP = 0x80, /* Charger watchdog expires */ ++}; ++ ++enum pcf50606_reg_int3 { ++ PCF50606_INT3_ADCRDY = 0x01, /* ADC conversion finished */ ++ PCF50606_INT3_ACDINS = 0x02, /* Accessory inserted */ ++ PCF50606_INT3_ACDREM = 0x04, /* Accessory removed */ ++ PCF50606_INT3_TSCPRES = 0x08, /* Touch screen pressed */ ++ PCF50606_INT3_LOWBAT = 0x40, /* Low battery voltage */ ++ PCF50606_INT3_HIGHTMP = 0x80, /* High temperature */ ++}; ++ ++/* used by PSSC, PWROKM, PWROKS, */ ++enum pcf50606_regu { ++ PCF50606_REGU_DCD = 0x01, /* DCD in phase 2 */ ++ PCF50606_REGU_DCDE = 0x02, /* DCDE in phase 2 */ ++ PCF50606_REGU_DCUD = 0x04, /* DCDU in phase 2 */ ++ PCF50606_REGU_IO = 0x08, /* IO in phase 2 */ ++ PCF50606_REGU_D1 = 0x10, /* D1 in phase 2 */ ++ PCF50606_REGU_D2 = 0x20, /* D2 in phase 2 */ ++ PCF50606_REGU_D3 = 0x40, /* D3 in phase 2 */ ++ PCF50606_REGU_LP = 0x80, /* LP in phase 2 */ ++}; ++ ++enum pcf50606_reg_dcdc4 { ++ PCF50606_DCDC4_MODE_AUTO = 0x00, ++ PCF50606_DCDC4_MODE_PWM = 0x01, ++ PCF50606_DCDC4_MODE_PCF = 0x02, ++ PCF50606_DCDC4_OFF_FLOAT = 0x00, ++ PCF50606_DCDC4_OFF_BYPASS = 0x04, ++ PCF50606_DCDC4_OFF_PULLDOWN = 0x08, ++ PCF50606_DCDC4_CURLIM_500mA = 0x00, ++ PCF50606_DCDC4_CURLIM_750mA = 0x10, ++ PCF50606_DCDC4_CURLIM_1000mA = 0x20, ++ PCF50606_DCDC4_CURLIM_1250mA = 0x30, ++ PCF50606_DCDC4_TOGGLE = 0x40, ++ PCF50606_DCDC4_REGSEL_DCDC2 = 0x80, ++}; ++ ++enum pcf50606_reg_dcdec2 { ++ PCF50606_DCDEC2_MODE_AUTO = 0x00, ++ PCF50606_DCDEC2_MODE_PWM = 0x01, ++ PCF50606_DCDEC2_MODE_PCF = 0x02, ++ PCF50606_DCDEC2_OFF_FLOAT = 0x00, ++ PCF50606_DCDEC2_OFF_BYPASS = 0x04, ++}; ++ ++enum pcf50606_reg_dcudc2 { ++ PCF50606_DCUDC2_MODE_AUTO = 0x00, ++ PCF50606_DCUDC2_MODE_PWM = 0x01, ++ PCF50606_DCUDC2_MODE_PCF = 0x02, ++ PCF50606_DCUDC2_OFF_FLOAT = 0x00, ++ PCF50606_DCUDC2_OFF_BYPASS = 0x04, ++}; ++ ++enum pcf50606_reg_adcc1 { ++ PCF50606_ADCC1_TSCMODACT = 0x01, ++ PCF50606_ADCC1_TSCMODSTB = 0x02, ++ PCF50606_ADCC1_TRATSET = 0x04, ++ PCF50606_ADCC1_NTCSWAPE = 0x08, ++ PCF50606_ADCC1_NTCSWAOFF = 0x10, ++ PCF50606_ADCC1_EXTSYNCBREAK = 0x20, ++ /* reserved */ ++ PCF50606_ADCC1_TSCINT = 0x80, ++}; ++ ++enum pcf50606_reg_adcc2 { ++ PCF50606_ADCC2_ADCSTART = 0x01, ++ /* see enum pcf50606_adcc2_adcmux */ ++ PCF50606_ADCC2_SYNC_NONE = 0x00, ++ PCF50606_ADCC2_SYNC_TXON = 0x20, ++ PCF50606_ADCC2_SYNC_PWREN1 = 0x40, ++ PCF50606_ADCC2_SYNC_PWREN2 = 0x60, ++ PCF50606_ADCC2_RES_10BIT = 0x00, ++ PCF50606_ADCC2_RES_8BIT = 0x80, ++}; ++ ++#define PCF50606_ADCC2_ADCMUX_MASK (0xf << 1) ++ ++#define ADCMUX_SHIFT 1 ++enum pcf50606_adcc2_adcmux { ++ PCF50606_ADCMUX_BATVOLT_RES = 0x0 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_BATVOLT_SUBTR = 0x1 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_ADCIN1_RES = 0x2 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_ADCIN1_SUBTR = 0x3 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_BATTEMP = 0x4 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_ADCIN2 = 0x5 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_ADCIN3 = 0x6 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_ADCIN3_RATIO = 0x7 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_XPOS = 0x8 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_YPOS = 0x9 << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_P1 = 0xa << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_P2 = 0xb << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_BATVOLT_ADCIN1 = 0xc << ADCMUX_SHIFT, ++ PCF50606_ADCMUX_XY_SEQUENCE = 0xe << ADCMUX_SHIFT, ++ PCF50606_P1_P2_RESISTANCE = 0xf << ADCMUX_SHIFT, ++}; ++ ++enum pcf50606_adcs2 { ++ PCF50606_ADCS2_ADCRDY = 0x80, ++}; ++ ++enum pcf50606_reg_mbcc1 { ++ PCF50606_MBCC1_CHGAPE = 0x01, ++ PCF50606_MBCC1_AUTOFST = 0x02, ++#define PCF50606_MBCC1_CHGMOD_MASK 0x1c ++#define PCF50606_MBCC1_CHGMOD_SHIFT 2 ++ PCF50606_MBCC1_CHGMOD_QUAL = 0x00, ++ PCF50606_MBCC1_CHGMOD_PRE = 0x04, ++ PCF50606_MBCC1_CHGMOD_TRICKLE = 0x08, ++ PCF50606_MBCC1_CHGMOD_FAST_CCCV = 0x0c, ++ PCF50606_MBCC1_CHGMOD_FAST_NOCC = 0x10, ++ PCF50606_MBCC1_CHGMOD_FAST_NOCV = 0x14, ++ PCF50606_MBCC1_CHGMOD_FAST_SW = 0x18, ++ PCF50606_MBCC1_CHGMOD_IDLE = 0x1c, ++ PCF50606_MBCC1_DETMOD_LOWCHG = 0x20, ++ PCF50606_MBCC1_DETMOD_WDRST = 0x40, ++}; ++ ++enum pcf50606_reg_bvmc { ++ PCF50606_BVMC_LOWBAT = 0x01, ++ PCF50606_BVMC_THRSHLD_NULL = 0x00, ++ PCF50606_BVMC_THRSHLD_2V8 = 0x02, ++ PCF50606_BVMC_THRSHLD_2V9 = 0x04, ++ PCF50606_BVMC_THRSHLD_3V = 0x08, ++ PCF50606_BVMC_THRSHLD_3V1 = 0x08, ++ PCF50606_BVMC_THRSHLD_3V2 = 0x0a, ++ PCF50606_BVMC_THRSHLD_3V3 = 0x0c, ++ PCF50606_BVMC_THRSHLD_3V4 = 0x0e, ++ PCF50606_BVMC_DISDB = 0x10, ++}; ++ ++/* this is to be provided by the board implementation */ ++extern const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS]; ++ ++void pcf50606_reg_write(u_int8_t reg, u_int8_t val); ++ ++u_int8_t pcf50606_reg_read(u_int8_t reg); ++ ++void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val); ++void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits); ++ ++void pcf50606_init(void); ++void pcf50606_charge_autofast(int on); ++ ++#endif /* _PCF50606_H */ ++ +Index: u-boot/board/neo1973/common/cmd_neo1973.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/cmd_neo1973.c +@@ -0,0 +1,99 @@ ++/* ++ * (C) Copyright 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++/* ++ * Boot support ++ */ ++#include ++#include ++#include /* for print_IPaddr */ ++#include ++ ++#include "neo1973.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#if (CONFIG_COMMANDS & CFG_CMD_BDI) ++ ++int do_neo1973 ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ int i; ++ ++ if (!strcmp(argv[1], "info")) { ++ printf("FIC Neo1973 Hardware Revision 0x%04x\n", get_board_rev()); ++ } else if (!strcmp(argv[1], "power-off")) { ++ neo1973_poweroff(); ++ } else if (!strcmp(argv[1], "charger") || !strcmp(argv[1], "charge")) { ++ if (argc < 3) ++ goto out_help; ++ if (!strcmp(argv[2], "status") || !strcmp(argv[2], "state")) { ++ printf("%s\n", neo1973_get_charge_status()); ++ } else if (!strcmp(argv[2], "autofast")) { ++ neo1973_set_charge_mode(NEO1973_CHGCMD_AUTOFAST); ++ } else if (!strcmp(argv[2], "!autofast")) { ++ neo1973_set_charge_mode(NEO1973_CHGCMD_NO_AUTOFAST); ++ } else if (!strcmp(argv[2], "off")) { ++ neo1973_set_charge_mode(NEO1973_CHGCMD_OFF); ++ } else if (!strcmp(argv[2], "fast")) { ++ neo1973_set_charge_mode(NEO1973_CHGCMD_FAST); ++ } else ++ goto out_help; ++ } else if (!strcmp(argv[1], "backlight")) { ++ if (argc < 3) ++ goto out_help; ++ if (!strcmp(argv[2], "on")) ++ neo1973_backlight(1); ++ else ++ neo1973_backlight(0); ++ } else if (!strcmp(argv[1], "vibrator")) { ++ if (argc < 3) ++ goto out_help; ++ if (!strcmp(argv[2], "on")) ++ neo1973_vibrator(1); ++ else ++ neo1973_vibrator(0); ++ } else { ++out_help: ++ printf("Usage:\n%s\n", cmdtp->usage); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------- */ ++ ++U_BOOT_CMD( ++ neo1973, 4, 1, do_neo1973, ++ "neo1973 - phone specific commands\n", ++ "neo1973 info - display phone informantion\n" ++ "neo1973 power-off - switch off the phone\n" ++ "neo1973 charger status - display charger status\n" ++ "neo1973 charger autofast - enable automatic fast (500mA) charging\n" ++ "neo1973 charger !autofast - disable automatic fast (500mA) charging\n" ++ "neo1973 charger fast - enable fast (500mA) charging\n" ++ "neo1973 charger off - disable charging\n" ++ "neo1973 backlight (on|off) - switch backlight on or off\n" ++ "neo1973 vibrator (on|off) - switch vibrator on or off\n" ++); ++#endif /* CFG_CMD_BDI */ +Index: u-boot/board/neo1973/common/jbt6k74.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/jbt6k74.c +@@ -0,0 +1,420 @@ ++/* u-boot driver for the tpo JBT6K74-AS LCM ASIC ++ * ++ * Copyright (C) 2006-2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ */ ++#include ++#include ++#include ++#include ++#include ++#include "jbt6k74.h" ++ ++#if 0 ++#define DEBUGP(x, args...) printf("%s: " x, __FUNCTION__, ## args); ++#define DEBUGPC(x, args...) printf(x, ## args); ++#else ++#define DEBUGP(x, args...) do { } while (0) ++#define DEBUGPC(x, args...) do { } while (0) ++#endif ++ ++ ++enum jbt_register { ++ JBT_REG_SLEEP_IN = 0x10, ++ JBT_REG_SLEEP_OUT = 0x11, ++ ++ JBT_REG_DISPLAY_OFF = 0x28, ++ JBT_REG_DISPLAY_ON = 0x29, ++ ++ JBT_REG_RGB_FORMAT = 0x3a, ++ JBT_REG_QUAD_RATE = 0x3b, ++ ++ JBT_REG_POWER_ON_OFF = 0xb0, ++ JBT_REG_BOOSTER_OP = 0xb1, ++ JBT_REG_BOOSTER_MODE = 0xb2, ++ JBT_REG_BOOSTER_FREQ = 0xb3, ++ JBT_REG_OPAMP_SYSCLK = 0xb4, ++ JBT_REG_VSC_VOLTAGE = 0xb5, ++ JBT_REG_VCOM_VOLTAGE = 0xb6, ++ JBT_REG_EXT_DISPL = 0xb7, ++ JBT_REG_OUTPUT_CONTROL = 0xb8, ++ JBT_REG_DCCLK_DCEV = 0xb9, ++ JBT_REG_DISPLAY_MODE1 = 0xba, ++ JBT_REG_DISPLAY_MODE2 = 0xbb, ++ JBT_REG_DISPLAY_MODE = 0xbc, ++ JBT_REG_ASW_SLEW = 0xbd, ++ JBT_REG_DUMMY_DISPLAY = 0xbe, ++ JBT_REG_DRIVE_SYSTEM = 0xbf, ++ ++ JBT_REG_SLEEP_OUT_FR_A = 0xc0, ++ JBT_REG_SLEEP_OUT_FR_B = 0xc1, ++ JBT_REG_SLEEP_OUT_FR_C = 0xc2, ++ JBT_REG_SLEEP_IN_LCCNT_D = 0xc3, ++ JBT_REG_SLEEP_IN_LCCNT_E = 0xc4, ++ JBT_REG_SLEEP_IN_LCCNT_F = 0xc5, ++ JBT_REG_SLEEP_IN_LCCNT_G = 0xc6, ++ ++ JBT_REG_GAMMA1_FINE_1 = 0xc7, ++ JBT_REG_GAMMA1_FINE_2 = 0xc8, ++ JBT_REG_GAMMA1_INCLINATION = 0xc9, ++ JBT_REG_GAMMA1_BLUE_OFFSET = 0xca, ++ ++ JBT_REG_BLANK_CONTROL = 0xcf, ++ JBT_REG_BLANK_TH_TV = 0xd0, ++ JBT_REG_CKV_ON_OFF = 0xd1, ++ JBT_REG_CKV_1_2 = 0xd2, ++ JBT_REG_OEV_TIMING = 0xd3, ++ JBT_REG_ASW_TIMING_1 = 0xd4, ++ JBT_REG_ASW_TIMING_2 = 0xd5, ++ ++ JBT_REG_HCLOCK_VGA = 0xec, ++ JBT_REG_HCLOCK_QVGA = 0xed, ++ ++}; ++ ++static const char *jbt_state_names[] = { ++ [JBT_STATE_DEEP_STANDBY] = "deep-standby", ++ [JBT_STATE_SLEEP] = "sleep", ++ [JBT_STATE_NORMAL] = "normal", ++}; ++ ++#define GTA01_SCLK (1 << 7) /* GPG7 */ ++#define GTA01_MOSI (1 << 6) /* GPG6 */ ++#define GTA01_MISO (1 << 5) /* GPG5 */ ++#define GTA01_CS (1 << 3) /* GPG3 */ ++ ++#define SPI_READ ((immr->GPGDAT & GTA01_MISO) != 0) ++ ++#define SPI_CS(bit) if (bit) gpio->GPGDAT |= GTA01_CS; \ ++ else gpio->GPGDAT &= ~GTA01_CS ++ ++#define SPI_SDA(bit) if (bit) gpio->GPGDAT |= GTA01_MOSI; \ ++ else gpio->GPGDAT &= ~GTA01_MOSI ++ ++#define SPI_SCL(bit) if (bit) gpio->GPGDAT |= GTA01_SCLK; \ ++ else gpio->GPGDAT &= ~GTA01_SCLK ++ ++/* 150uS minimum clock cycle, we have two of this plus our other ++ * instructions */ ++#define SPI_DELAY udelay(100) /* 200uS */ ++ ++ ++#define JBT_TX_BUF_SIZE ++struct jbt_info { ++ enum jbt_state state; ++ u_int16_t tx_buf[4]; ++ struct spi_device *spi_dev; ++}; ++ ++static struct jbt_info _jbt, *jbt = &_jbt; ++ ++static int jbt_spi_xfer(int wordnum, int bitlen, u_int16_t *dout) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ u_int16_t tmpdout = 0; ++ int i, j; ++ ++ DEBUGP("spi_xfer: dout %08X wordnum %u bitlen %d\n", ++ *(uint *)dout, wordnum, bitlen); ++ ++ SPI_CS(0); ++ ++ for (i = 0; i < wordnum; i ++) { ++ tmpdout = dout[i]; ++ ++ for (j = 0; j < bitlen; j++) { ++ SPI_SCL(0); ++ if (tmpdout & (1 << bitlen-1)) { ++ SPI_SDA(1); ++ DEBUGPC("1"); ++ } else { ++ SPI_SDA(0); ++ DEBUGPC("0"); ++ } ++ SPI_DELAY; ++ SPI_SCL(1); ++ SPI_DELAY; ++ tmpdout <<= 1; ++ } ++ DEBUGPC(" "); ++ } ++ DEBUGPC("\n"); ++ ++ SPI_CS(1); ++ ++ return 0; ++} ++ ++#define JBT_COMMAND 0x000 ++#define JBT_DATA 0x100 ++ ++static int jbt_reg_write_nodata(struct jbt_info *jbt, u_int8_t reg) ++{ ++ int rc; ++ ++ jbt->tx_buf[0] = JBT_COMMAND | reg; ++ ++ rc = jbt_spi_xfer(1, 9, jbt->tx_buf); ++ ++ return rc; ++} ++ ++ ++static int jbt_reg_write(struct jbt_info *jbt, u_int8_t reg, u_int8_t data) ++{ ++ int rc; ++ ++ jbt->tx_buf[0] = JBT_COMMAND | reg; ++ jbt->tx_buf[1] = JBT_DATA | data; ++ ++ rc = jbt_spi_xfer(2, 9, jbt->tx_buf); ++ ++ return rc; ++} ++ ++static int jbt_reg_write16(struct jbt_info *jbt, u_int8_t reg, u_int16_t data) ++{ ++ int rc; ++ ++ jbt->tx_buf[0] = JBT_COMMAND | reg; ++ jbt->tx_buf[1] = JBT_DATA | (data >> 8); ++ jbt->tx_buf[2] = JBT_DATA | (data & 0xff); ++ ++ rc = jbt_spi_xfer(3, 9, jbt->tx_buf); ++ ++ return rc; ++} ++ ++static int jbt_init_regs(struct jbt_info *jbt) ++{ ++ int rc; ++ ++ DEBUGP("entering\n"); ++ ++ rc = jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE1, 0x01); ++ rc |= jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE2, 0x00); ++ rc |= jbt_reg_write(jbt, JBT_REG_RGB_FORMAT, 0x60); ++ rc |= jbt_reg_write(jbt, JBT_REG_DRIVE_SYSTEM, 0x10); ++ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_OP, 0x56); ++ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_MODE, 0x33); ++ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_FREQ, 0x11); ++ rc |= jbt_reg_write(jbt, JBT_REG_BOOSTER_FREQ, 0x11); ++ rc |= jbt_reg_write(jbt, JBT_REG_OPAMP_SYSCLK, 0x02); ++ rc |= jbt_reg_write(jbt, JBT_REG_VSC_VOLTAGE, 0x2b); ++ rc |= jbt_reg_write(jbt, JBT_REG_VCOM_VOLTAGE, 0x40); ++ rc |= jbt_reg_write(jbt, JBT_REG_EXT_DISPL, 0x03); ++ rc |= jbt_reg_write(jbt, JBT_REG_DCCLK_DCEV, 0x04); ++ rc |= jbt_reg_write(jbt, JBT_REG_ASW_SLEW, 0x02); ++ rc |= jbt_reg_write(jbt, JBT_REG_DUMMY_DISPLAY, 0x00); ++ ++ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_A, 0x11); ++ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_B, 0x11); ++ rc |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_C, 0x11); ++ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_D, 0x2040); ++ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_E, 0x60c0); ++ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_F, 0x1020); ++ rc |= jbt_reg_write16(jbt, JBT_REG_SLEEP_IN_LCCNT_G, 0x60c0); ++ ++ rc |= jbt_reg_write16(jbt, JBT_REG_GAMMA1_FINE_1, 0x5533); ++ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_FINE_2, 0x00); ++ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_INCLINATION, 0x00); ++ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_BLUE_OFFSET, 0x00); ++ rc |= jbt_reg_write(jbt, JBT_REG_GAMMA1_BLUE_OFFSET, 0x00); ++ ++ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_VGA, 0x1f0); ++ rc |= jbt_reg_write(jbt, JBT_REG_BLANK_CONTROL, 0x02); ++ rc |= jbt_reg_write16(jbt, JBT_REG_BLANK_TH_TV, 0x0804); ++ rc |= jbt_reg_write16(jbt, JBT_REG_BLANK_TH_TV, 0x0804); ++ ++ rc |= jbt_reg_write(jbt, JBT_REG_CKV_ON_OFF, 0x01); ++ rc |= jbt_reg_write16(jbt, JBT_REG_CKV_1_2, 0x0000); ++ ++ rc |= jbt_reg_write16(jbt, JBT_REG_OEV_TIMING, 0x0d0e); ++ rc |= jbt_reg_write16(jbt, JBT_REG_ASW_TIMING_1, 0x11a4); ++ rc |= jbt_reg_write(jbt, JBT_REG_ASW_TIMING_2, 0x0e); ++ ++#if 0 ++ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_QVGA, 0x00ff); ++ rc |= jbt_reg_write16(jbt, JBT_REG_HCLOCK_QVGA, 0x00ff); ++#endif ++ ++ return rc; ++} ++ ++static int standby_to_sleep(struct jbt_info *jbt) ++{ ++ int rc; ++ ++ DEBUGP("entering\n"); ++ ++ /* three times command zero */ ++ rc = jbt_reg_write_nodata(jbt, 0x00); ++ udelay(1000); ++ rc = jbt_reg_write_nodata(jbt, 0x00); ++ udelay(1000); ++ rc = jbt_reg_write_nodata(jbt, 0x00); ++ udelay(1000); ++ ++ /* deep standby out */ ++ rc |= jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x17); ++ ++ return rc; ++} ++ ++static int sleep_to_normal(struct jbt_info *jbt) ++{ ++ int rc; ++ DEBUGP("entering\n"); ++ ++ /* RGB I/F on, RAM wirte off, QVGA through, SIGCON enable */ ++ rc = jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE, 0x80); ++ ++ /* Quad mode off */ ++ rc |= jbt_reg_write(jbt, JBT_REG_QUAD_RATE, 0x00); ++ ++ /* AVDD on, XVDD on */ ++ rc |= jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x16); ++ ++ /* Output control */ ++ rc |= jbt_reg_write16(jbt, JBT_REG_OUTPUT_CONTROL, 0xfff9); ++ ++ /* Sleep mode off */ ++ rc |= jbt_reg_write_nodata(jbt, JBT_REG_SLEEP_OUT); ++ ++ /* initialize register set */ ++ rc |= jbt_init_regs(jbt); ++ return rc; ++} ++ ++static int normal_to_sleep(struct jbt_info *jbt) ++{ ++ int rc; ++ DEBUGP("entering\n"); ++ ++ rc = jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_OFF); ++ rc |= jbt_reg_write16(jbt, JBT_REG_OUTPUT_CONTROL, 0x8002); ++ rc |= jbt_reg_write_nodata(jbt, JBT_REG_SLEEP_IN); ++ ++ return rc; ++} ++ ++static int sleep_to_standby(struct jbt_info *jbt) ++{ ++ DEBUGP("entering\n"); ++ return jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x00); ++} ++ ++/* frontend function */ ++int jbt6k74_enter_state(enum jbt_state new_state) ++{ ++ int rc = -EINVAL; ++ ++ DEBUGP("entering(old_state=%u, new_state=%u)\n", jbt->state, new_state); ++ ++ switch (jbt->state) { ++ case JBT_STATE_DEEP_STANDBY: ++ switch (new_state) { ++ case JBT_STATE_DEEP_STANDBY: ++ rc = 0; ++ break; ++ case JBT_STATE_SLEEP: ++ rc = standby_to_sleep(jbt); ++ break; ++ case JBT_STATE_NORMAL: ++ /* first transition into sleep */ ++ rc = standby_to_sleep(jbt); ++ /* then transition into normal */ ++ rc |= sleep_to_normal(jbt); ++ break; ++ } ++ break; ++ case JBT_STATE_SLEEP: ++ switch (new_state) { ++ case JBT_STATE_SLEEP: ++ rc = 0; ++ break; ++ case JBT_STATE_DEEP_STANDBY: ++ rc = sleep_to_standby(jbt); ++ break; ++ case JBT_STATE_NORMAL: ++ rc = sleep_to_normal(jbt); ++ break; ++ } ++ break; ++ case JBT_STATE_NORMAL: ++ switch (new_state) { ++ case JBT_STATE_NORMAL: ++ rc = 0; ++ break; ++ case JBT_STATE_DEEP_STANDBY: ++ /* first transition into sleep */ ++ rc = normal_to_sleep(jbt); ++ /* then transition into deep standby */ ++ rc |= sleep_to_standby(jbt); ++ break; ++ case JBT_STATE_SLEEP: ++ rc = normal_to_sleep(jbt); ++ break; ++ } ++ break; ++ } ++ ++ return rc; ++} ++ ++int jbt6k74_display_onoff(int on) ++{ ++ DEBUGP("entering\n"); ++ if (on) ++ return jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_ON); ++ else ++ return jbt_reg_write_nodata(jbt, JBT_REG_DISPLAY_OFF); ++} ++ ++int jbt6k74_init(void) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* initialize SPI for GPIO bitbang */ ++ gpio->GPGCON &= 0xffff033f; ++ gpio->GPGCON |= 0x00005440; ++ ++ /* get LCM out of reset */ ++ gpio->GPCDAT |= (1 << 6); ++ ++ /* according to data sheet: wait 50ms (Tpos of LCM). However, 50ms ++ * seems unreliable with later LCM batches, increasing to 90ms */ ++ udelay(90000); ++ ++ return 0; ++} ++ ++void board_video_init(GraphicDevice *pGD) ++{ ++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); ++ ++ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */ ++ ++ lcd->LCDCON2 = 0x019fc3c1; ++ lcd->LCDCON3 = 0x0039df67; ++ lcd->LCDCON4 = 0x00000007; ++ lcd->LCDCON5 = 0x0001cf09; ++ lcd->LPCSEL = 0x00000000; ++} +Index: u-boot/board/neo1973/common/jbt6k74.h +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/jbt6k74.h +@@ -0,0 +1,14 @@ ++#ifndef _JBT6K74_H ++#define _JBT6K74_H ++ ++enum jbt_state { ++ JBT_STATE_DEEP_STANDBY, ++ JBT_STATE_SLEEP, ++ JBT_STATE_NORMAL, ++}; ++ ++int jbt6k74_init(void); ++int jbt6k74_display_onoff(int on); ++int jbt6k74_enter_state(enum jbt_state new_state); ++ ++#endif +Index: u-boot/board/neo1973/common/lowlevel_init.S +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/lowlevel_init.S +@@ -0,0 +1,187 @@ ++/* ++ * Memory Setup stuff - taken from blob memsetup.S ++ * ++ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and ++ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) ++ * ++ * Modified for the FIC Neo1973 GTA01 by Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++ ++/* some parameters for the board */ ++ ++/* ++ * ++ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S ++ * ++ * Copyright (C) 2002 Samsung Electronics SW.LEE ++ * ++ */ ++ ++#define BWSCON 0x48000000 ++ ++/* BWSCON */ ++#define DW8 (0x0) ++#define DW16 (0x1) ++#define DW32 (0x2) ++#define WAIT (0x1<<2) ++#define UBLB (0x1<<3) ++ ++#define B1_BWSCON (DW32) ++#define B2_BWSCON (DW16) ++#define B3_BWSCON (DW16 + WAIT + UBLB) ++#define B4_BWSCON (DW16) ++#define B5_BWSCON (DW16) ++#define B6_BWSCON (DW32) ++#define B7_BWSCON (DW32) ++ ++/* BANK0CON */ ++#define B0_Tacs 0x0 /* 0clk */ ++#define B0_Tcos 0x0 /* 0clk */ ++#define B0_Tacc 0x7 /* 14clk */ ++#define B0_Tcoh 0x0 /* 0clk */ ++#define B0_Tah 0x0 /* 0clk */ ++#define B0_Tacp 0x0 ++#define B0_PMC 0x0 /* normal */ ++ ++/* BANK1CON */ ++#define B1_Tacs 0x0 /* 0clk */ ++#define B1_Tcos 0x0 /* 0clk */ ++#define B1_Tacc 0x7 /* 14clk */ ++#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tah 0x0 /* 0clk */ ++#define B1_Tacp 0x0 ++#define B1_PMC 0x0 ++ ++#define B2_Tacs 0x0 ++#define B2_Tcos 0x0 ++#define B2_Tacc 0x7 ++#define B2_Tcoh 0x0 ++#define B2_Tah 0x0 ++#define B2_Tacp 0x0 ++#define B2_PMC 0x0 ++ ++#define B3_Tacs 0x0 /* 0clk */ ++#define B3_Tcos 0x3 /* 4clk */ ++#define B3_Tacc 0x7 /* 14clk */ ++#define B3_Tcoh 0x1 /* 1clk */ ++#define B3_Tah 0x0 /* 0clk */ ++#define B3_Tacp 0x3 /* 6clk */ ++#define B3_PMC 0x0 /* normal */ ++ ++#define B4_Tacs 0x0 /* 0clk */ ++#define B4_Tcos 0x0 /* 0clk */ ++#define B4_Tacc 0x7 /* 14clk */ ++#define B4_Tcoh 0x0 /* 0clk */ ++#define B4_Tah 0x0 /* 0clk */ ++#define B4_Tacp 0x0 ++#define B4_PMC 0x0 /* normal */ ++ ++#define B5_Tacs 0x0 /* 0clk */ ++#define B5_Tcos 0x0 /* 0clk */ ++#define B5_Tacc 0x7 /* 14clk */ ++#define B5_Tcoh 0x0 /* 0clk */ ++#define B5_Tah 0x0 /* 0clk */ ++#define B5_Tacp 0x0 ++#define B5_PMC 0x0 /* normal */ ++ ++#define B6_MT 0x3 /* SDRAM */ ++#define B6_Trcd 0x1 /* 3clk */ ++#if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++#define B6_SCAN 0x1 /* 9bit */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ ++ defined(CONFIG_ARCH_GTA01B_v4) ++#define B6_SCAN 0x2 /* 10bit */ ++#endif ++ ++#define B7_MT 0x3 /* SDRAM */ ++#define B7_Trcd 0x1 /* 3clk */ ++#define B7_SCAN 0x2 /* 10bit */ ++ ++/* REFRESH parameter */ ++#define REFEN 0x1 /* Refresh enable */ ++#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ ++#define Trp 0x1 /* 3clk */ ++#define Trc 0x3 /* 7clk */ ++#define Tchr 0x2 /* 3clk */ ++//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ ++#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ ++/**************************************/ ++ ++_TEXT_BASE: ++ .word TEXT_BASE ++ ++.globl lowlevel_init ++lowlevel_init: ++ /* memory control configuration */ ++ /* make r0 relative the current location so that it */ ++ /* reads SMRDATA out of FLASH rather than memory ! */ ++ adr r0, SMRDATA ++ ldr r1, =BWSCON /* Bus Width Status Controller */ ++ add r2, r0, #13*4 ++0: ++ ldr r3, [r0], #4 ++ str r3, [r1], #4 ++ cmp r2, r0 ++ bne 0b ++ ++ /* setup asynchronous bus mode */ ++ mrc p15, 0, r1 ,c1 ,c0, 0 ++ orr r1, r1, #0xc0000000 ++ mcr p15, 0, r1, c1, c0, 0 ++ ++#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ /* switch on power for NAND */ ++ ldr r0, =0x56000010 /* GPBCON */ ++ ldr r1, [r0] ++ orr r1, r1, #0x10 ++ str r1, [r0] ++ ++ ldr r0, =0x56000014 /* GPBDAT */ ++ ldr r1, [r0] ++ orr r1, r1, #(1 <<2) ++ str r1, [r0] ++#endif ++ ++ /* everything is fine now */ ++ mov pc, lr ++ ++ .ltorg ++/* the literal pools origin */ ++ ++SMRDATA: ++ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) ++ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ++ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ++ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ++ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ++ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ++ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ++ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ++ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ++ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ++ .word 0xb2 ++ .word 0x30 ++ .word 0x30 +Index: u-boot/board/neo1973/gta01/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/Makefile +@@ -0,0 +1,47 @@ ++# ++# (C) Copyright 2000, 2001, 2002 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = lib$(BOARD).a ++ ++OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ++SOBJS := ../common/lowlevel_init.o ++ ++$(LIB): $(OBJS) $(SOBJS) ++ $(AR) crv $@ $(OBJS) $(SOBJS) ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) ++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ ++ ++-include .depend ++ ++######################################################################### +Index: u-boot/board/neo1973/gta01/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/config.mk +@@ -0,0 +1,34 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# FIC Neo1973 GTA01 board with S3C2410X (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++# GTA01v3 has 1 bank of 64 MB SDRAM ++# GTA01v4 has 1 bank of 64 MB SDRAM ++# ++# 3000'0000 to 3400'0000 ++# we load ourself to 33F8'0000 ++# ++# GTA01Bv2 or later has 1 bank of 128 MB SDRAM ++# ++# 3000'0000 to 3800'0000 ++# we load ourself to 37F8'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# download area is 3200'0000 or 3300'0000 ++ ++sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ++ ++ifeq ($(GTA01_BIG_RAM),y) ++# FIXME: TEXT_BASE = 0x37F80000 ++TEXT_BASE = 0x33F80000 ++else ++TEXT_BASE = 0x33F80000 ++endif +Index: u-boot/board/neo1973/gta01/gta01.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -0,0 +1,422 @@ ++/* ++ * (C) 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on existing S3C2410 startup code in u-boot: ++ * ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++#include ++ ++#include "pcf50606.h" ++ ++#include "../common/neo1973.h" ++#include "../common/jbt6k74.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++/* That many seconds the power key needs to be pressed to power up */ ++#define POWER_KEY_SECONDS 2 ++ ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ ++//#define M_PDIV 0x3 ++//#define M_SDIV 0x1 ++#define M_MDIV 0x90 /* Fout = 202.8MHz */ ++#define M_PDIV 0x7 ++#define M_SDIV 0x0 ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++/* In case the debug board is attached, we cannot go beyond 200 MHz */ ++#if 0 ++#define M_MDIV 0x7d /* Fout = 266MHz */ ++#define M_PDIV 0x1 ++#define M_SDIV 0x1 ++#else ++#define M_MDIV 0x90 /* Fout = 202.8MHz */ ++#define M_PDIV 0x7 ++#define M_SDIV 0x0 ++#endif ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++/* This board doesn't have bus lines at teh debug port, and we can go to 266 */ ++#define M_MDIV 0x7d /* Fout = 266MHz */ ++#define M_PDIV 0x1 ++#define M_SDIV 0x1 ++#else ++#error Please define GTA01 revision ++#endif ++ ++#define U_M_MDIV 0x78 ++#define U_M_PDIV 0x2 ++#define U_M_SDIV 0x3 ++ ++unsigned int neo1973_wakeup_cause; ++extern int nobootdelay; ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++#if defined(CONFIG_ARCH_GTA01_v3) ++ gpio->GPACON = 0x007FFFFF; ++ ++ gpio->GPBCON = 0x00005055; ++ gpio->GPBUP = 0x000007FF; ++ ++ gpio->GPCCON = 0xAAAA12A8; ++ gpio->GPCUP = 0x0000FFFF; ++ ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ ++ gpio->GPFCON = 0x00002AA9; ++ gpio->GPFUP = 0x000000FF; ++ ++ gpio->GPGCON = 0xA846F0C0; ++ gpio->GPGUP = 0x0000AFEF; ++ ++ gpio->GPHCON = 0x0008FAAA; ++ gpio->GPHUP = 0x000007FF; ++#elif defined(CONFIG_ARCH_GTA01_v4) ++ gpio->GPACON = 0x005E47FF; ++ ++ gpio->GPBCON = 0x00045015; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (Flash power-up) */ ++ ++ gpio->GPCCON = 0xAAAA12A9; ++ gpio->GPCUP = 0x0000FFFF; ++ ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ ++ gpio->GPECON = 0xA02AAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ ++ gpio->GPFCON = 0x0000aa09; ++ gpio->GPFUP = 0x000000FF; ++ ++ gpio->GPGCON = 0xFF40F0C1; ++ gpio->GPGUP = 0x0000AFEF; ++ ++ gpio->GPHCON = 0x0000FAAA; ++ gpio->GPHUP = 0x000007FF; ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ gpio->GPACON = 0x005E4FFF; ++ ++ gpio->GPBCON = 0x00145415; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (Flash power-up) */ ++ ++ gpio->GPCCON = 0xAAAA12A9; ++ gpio->GPCUP = 0x0000FFFF; ++ ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ ++ gpio->GPECON = 0xA02AAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ ++ gpio->GPFCON = 0x0000aa19; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPFDAT |= 0x4; /* Set GBF2 to high (nGSM_EN) */ ++ ++ gpio->GPGCON = 0xFF40F0C1; ++ gpio->GPGUP = 0x0000AFEF; ++ ++ gpio->GPHCON = 0x0000FAAA; ++ gpio->GPHUP = 0x000007FF; ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ gpio->GPACON = 0x0005E0FFF; ++ gpio->GPADAT |= (1 << 16); /* Set GPA16 to high (nNAND_WP) */ ++ ++ gpio->GPBCON = 0x00045455; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPBDAT |= 0x4; /* Set GPB2 to high (SD power down) */ ++ ++ gpio->GPCCON = 0xAAAA12A9; ++ gpio->GPCUP = 0x0000FFFF; ++ ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ ++ gpio->GPFCON = 0x0000aa99; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPFDAT |= 0x4; /* Set GBF2 to high (nGSM_EN) */ ++ ++ gpio->GPGCON = 0xFF14F0F8; ++ gpio->GPGUP = 0x0000AFEF; ++ ++ gpio->GPHCON = 0x0000FAAA; ++ gpio->GPHUP = 0x000007FF; ++#else ++#error Please define GTA01 version ++#endif ++ ++ /* arch number of SMDK2410-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA01; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++int board_late_init(void) ++{ ++ unsigned char tmp; ++ char buf[32]; ++ ++ /* Initialize the Power Management Unit with a safe register set */ ++ pcf50606_init(); ++ ++ /* obtain wake-up reason, save INT1 in environment */ ++ tmp = pcf50606_reg_read(PCF50606_REG_INT1); ++ sprintf(buf, "0x%02x", tmp); ++ setenv("pcf50606_int1", buf); ++ ++ if (tmp & PCF50606_INT1_ALARM) { ++ /* we've been woken up by RTC alarm or charger insert, boot */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; ++ goto continue_boot; ++ } ++ if (tmp & PCF50606_INT1_EXTONR) { ++ neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; ++ } ++ ++ if (tmp & PCF50606_INT1_ONKEYF) { ++ int seconds = 0; ++ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; ++ /* we've been woken up by a falling edge of the onkey */ ++ ++ /* we can't just setenv(bootdelay,-1) because that would ++ * accidentially become permanent if the user does saveenv */ ++ if (neo1973_911_key_pressed()) ++ nobootdelay = 1; ++ ++ while (1) { ++ u_int8_t int1, oocs; ++ ++ oocs = pcf50606_reg_read(PCF50606_REG_OOCS); ++ if (oocs & PFC50606_OOCS_ONKEY) ++ break; ++ ++ int1 = pcf50606_reg_read(PCF50606_REG_INT1); ++ if (int1 & PCF50606_INT1_SECOND) ++ seconds++; ++ ++ if (seconds >= POWER_KEY_SECONDS) ++ goto continue_boot; ++ } ++ /* Power off if minimum number of seconds not reached */ ++ neo1973_poweroff(); ++ } ++ ++ /* if there's no other reason, must be regular reset */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; ++ ++continue_boot: ++ jbt6k74_init(); ++ jbt6k74_enter_state(JBT_STATE_NORMAL); ++ jbt6k74_display_onoff(1); ++ ++ /* issue a short pulse with the vibrator */ ++ neo1973_vibrator(1); ++ udelay(50000); ++ neo1973_vibrator(0); ++ ++ /* switch on the backlight */ ++ neo1973_backlight(1); ++ ++#if defined(CONFIG_ARCH_GTA01B_v4) ++ { ++ /* check if sd card is inserted, and power-up if it is */ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (!(gpio->GPFDAT & (1 << 5))) ++ gpio->GPBDAT &= ~(1 << 2); ++ } ++#endif ++ ++ return 0; ++} ++ ++int dram_init (void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++u_int32_t get_board_rev(void) ++{ ++#if defined(CONFIG_ARCH_GTA01_v3) ++ return 0x00000130; ++#elif defined(CONFIG_ARCH_GTA01_v4) ++ return 0x00000140; ++#elif defined(CONFIG_ARCH_GTA01B_v2) ++ return 0x00000220; ++#elif defined(CONFIG_ARCH_GTA01B_v3) ++ return 0x00000230; ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ return 0x00000240; ++#endif ++} ++ ++void neo1973_poweroff(void) ++{ ++ serial_printf("poweroff\n"); ++ udc_disconnect(); ++ pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY); ++ /* don't return to caller */ ++ while (1) ; ++} ++ ++void neo1973_backlight(int on) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (on) ++ gpio->GPBDAT |= 0x01; ++ else ++ gpio->GPBDAT &= ~0x01; ++} ++ ++void neo1973_vibrator(int on) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (on) ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ gpio->GPGDAT |= (1 << 11); /* GPG11 */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ gpio->GPBDAT |= (1 << 10); /* GPB10 */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ gpio->GPBDAT |= (1 << 3); /* GPB3 */ ++#endif ++ else ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ gpio->GPGDAT &= ~(1 << 11); /* GPG11 */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ gpio->GPBDAT &= ~(1 << 10); /* GPB10 */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ gpio->GPBDAT &= ~(1 << 3); /* GPB3 */ ++#endif ++} ++ ++int neo1973_911_key_pressed(void) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (gpio->GPFDAT & (1 << 6)) ++ return 0; ++ return 1; ++} ++ ++static const char *chgstate_names[] = { ++ [PCF50606_MBCC1_CHGMOD_QUAL] = "qualification", ++ [PCF50606_MBCC1_CHGMOD_PRE] = "pre", ++ [PCF50606_MBCC1_CHGMOD_TRICKLE] = "trickle", ++ [PCF50606_MBCC1_CHGMOD_FAST_CCCV] = "fast_cccv", ++ [PCF50606_MBCC1_CHGMOD_FAST_NOCC] = "fast_nocc", ++ [PCF50606_MBCC1_CHGMOD_FAST_NOCV] = "fast_nocv", ++ [PCF50606_MBCC1_CHGMOD_FAST_SW] = "fast_switch", ++ [PCF50606_MBCC1_CHGMOD_IDLE] = "idle", ++}; ++ ++const char *neo1973_get_charge_status(void) ++{ ++ u_int8_t mbcc1 = pcf50606_reg_read(PCF50606_REG_MBCC1); ++ u_int8_t chgmod = (mbcc1 & PCF50606_MBCC1_CHGMOD_MASK); ++ return chgstate_names[chgmod]; ++} ++ ++int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd) ++{ ++ switch (cmd) { ++ case NEO1973_CHGCMD_NONE: ++ break; ++ case NEO1973_CHGCMD_AUTOFAST: ++ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, ++ PCF50606_MBCC1_AUTOFST, ++ PCF50606_MBCC1_AUTOFST); ++ break; ++ case NEO1973_CHGCMD_NO_AUTOFAST: ++ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, ++ PCF50606_MBCC1_AUTOFST, 0); ++ break; ++ case NEO1973_CHGCMD_OFF: ++ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, ++ PCF50606_MBCC1_CHGMOD_MASK, ++ PCF50606_MBCC1_CHGMOD_IDLE); ++ break; ++ ++ case NEO1973_CHGCMD_FAST: ++ case NEO1973_CHGCMD_FASTER: ++ pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1, ++ PCF50606_MBCC1_CHGMOD_MASK, ++ PCF50606_MBCC1_CHGMOD_FAST_CCCV); ++ break; ++ } ++ return 0; ++} ++ +Index: u-boot/board/neo1973/gta01/pcf50606.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/pcf50606.c +@@ -0,0 +1,100 @@ ++ ++#include ++#include ++ ++/* initial register set for PCF50606 in Neo1973 devices */ ++const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { ++ [PCF50606_REG_OOCS] = 0x00, ++ /* gap */ ++ [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, ++ [PCF50606_REG_INT2M] = 0x00, ++ [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, ++ [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | ++ PCF50606_OOCC1_CHGWAK | ++ PCF50606_OOCC1_EXTONWAK_HIGH, ++ [PCF50606_REG_OOCC2] = PCF50606_OOCC2_ONKEYDB_14ms | ++ PCF50606_OOCC2_EXTONDB_14ms, ++ /* gap */ ++ [PCF50606_REG_PSSC] = 0x00, ++ [PCF50606_REG_PWROKM] = 0x00, ++ /* gap */ ++#if defined(CONFIG_ARCH_GTA01B_v2) ++ [PCF50606_REG_DCDC1] = 0x1e, /* GL_3V3: off */ ++#elif defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_DCDC1] = 0x18, /* GL_1V5: off */ ++#endif ++ [PCF50606_REG_DCDC2] = 0x00, ++ [PCF50606_REG_DCDC3] = 0x00, ++ [PCF50606_REG_DCDC4] = 0x30, /* 1.25A */ ++ ++ [PCF50606_REG_DCDEC1] = 0xe8, /* IO_3V3: on */ ++ [PCF50606_REG_DCDEC2] = 0x00, ++ ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ [PCF50606_REG_DCUDC1] = 0xe3, /* CORE_1V8: 1.8V */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ [PCF50606_REG_DCUDC1] = 0xe4, /* CORE_1V8: 2.1V */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_DCUDC1] = 0xc4, /* CORE_1V8: 2.1V if PWREN2 = HIGH */ ++#endif ++ [PCF50606_REG_DCUDC2] = 0x30, /* 1.25A current limit */ ++ ++#if defined(CONFIG_ARCH_GTA01_v3) ++ [PCF50606_REG_IOREGC] = 0x13, /* VTCXO_2V8: off */ ++#elif defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ ++ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) ++ //see internal bug 94 [PCF50606_REG_IOREGC] = 0x18, /* CODEC_3V3: off */ ++ [PCF50606_REG_IOREGC] = 0xf8, /* CODEC_3V3: on */ ++#endif ++ ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ [PCF50606_REG_D1REGC1] = 0x15, /* VRF_3V: off */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ ++ defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_D1REGC1] = 0x16, /* BT_3V15: off */ ++#endif ++ ++#if defined(CONFIG_ARCH_GTA01_v3) ++ [PCF50606_REG_D2REGC1] = 0xf8, /* SD_3V3: on */ ++#elif defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ ++ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_D2REGC1] = 0x10, /* GL_2V5: off */ ++#endif ++ ++#if defined(CONFIG_ARCH_GTA01_v3) ++ [PCF50606_REG_D3REGC1] = 0x18, /* CODEC_3V3: off */ ++#elif defined(CONFIG_ARCH_GTA01_v4) ++ [PCF50606_REG_D3REGC1] = 0x13, /* VTXCO_2V8: off */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ [PCF50606_REG_D3REGC1] = 0x00, /* USER1: off */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_D3REGC1] = 0xec, /* STBY_1V8: 2.1V */ ++#endif ++ ++ [PCF50606_REG_LPREGC1] = 0xf8, /* LCM_3V3: on */ ++ [PCF50606_REG_LPREGC2] = 0x00, ++ ++ [PCF50606_REG_MBCC1] = 0x01, /* CHGAPE */ ++ [PCF50606_REG_MBCC2] = 0x00, /* unlimited charging */ ++ [PCF50606_REG_MBCC3] = 0x1a, /* 0.2*Ifast, 4.20V */ ++ [PCF50606_REG_BBCC] = 0x1f, /* 400uA */ ++ [PCF50606_REG_ADCC1] = 0x00, ++ [PCF50606_REG_ADCC2] = 0x00, ++ /* gap */ ++#if defined(CONFIG_ARCH_GTA01B_v4) ++ [PCF50606_REG_ACDC1] = 0x86, /* ACD thresh 1.6V, enabled */ ++#else ++ [PCF50606_REG_ACDC1] = 0x00, ++#endif ++ [PCF50606_REG_BVMC] = PCF50606_BVMC_THRSHLD_3V3, ++ [PCF50606_REG_PWMC1] = 0x00, ++ [PCF50606_REG_LEDC1] = 0x00, ++ [PCF50606_REG_LEDC2] = 0x00, ++ [PCF50606_REG_GPOC1] = 0x00, ++ [PCF50606_REG_GPOC2] = 0x00, ++ [PCF50606_REG_GPOC3] = 0x00, ++ [PCF50606_REG_GPOC4] = 0x00, ++ [PCF50606_REG_GPOC5] = 0x00, ++}; ++ ++ +Index: u-boot/board/neo1973/gta01/split_by_variant.sh +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/split_by_variant.sh +@@ -0,0 +1,57 @@ ++#!/bin/sh ++# --------------------------------------------------------- ++# Set the core module defines according to Core Module ++# --------------------------------------------------------- ++# --------------------------------------------------------- ++# Set up the GTA01 type define ++# --------------------------------------------------------- ++ ++CFGINC=${obj}include/config.h ++CFGTMP=${obj}board/neo1973/gta01/config.tmp ++ ++mkdir -p ${obj}include ++if [ "$1" == "" ] ++then ++ echo "$0:: No parameters - using GTA01Bv3 config" ++ echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC ++ echo "GTA01_BIG_RAM=y" > $CFGTMP ++else ++ case "$1" in ++ gta01v4_config) ++ echo "#define CONFIG_ARCH_GTA01_v4" > $CFGINC ++ echo "GTA01_BIG_RAM=n" > $CFGTMP ++ ;; ++ ++ gta01v3_config) ++ echo "#define CONFIG_ARCH_GTA01_v3" > $CFGINC ++ echo "GTA01_BIG_RAM=n" > $CFGTMP ++ ;; ++ ++ gta01bv2_config) ++ echo "#define CONFIG_ARCH_GTA01B_v2" > $CFGINC ++ echo "GTA01_BIG_RAM=y" > $CFGTMP ++ ;; ++ ++ gta01bv3_config) ++ echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC ++ echo "GTA01_BIG_RAM=y" > $CFGTMP ++ ;; ++ ++ gta01bv4_config) ++ echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC ++ echo "GTA01_BIG_RAM=y" > $CFGTMP ++ ;; ++ ++ *) ++ echo "$0:: Unrecognised config - using GTA01Bv4 config" ++ echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC ++ echo "GTA01_BIG_RAM=y" > $CFGTMP ++ ;; ++ ++ esac ++ ++fi ++# --------------------------------------------------------- ++# Complete the configuration ++# --------------------------------------------------------- ++$MKCONFIG -a neo1973_gta01 arm arm920t gta01 neo1973 s3c24x0 +Index: u-boot/board/neo1973/gta01/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta01/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/neo1973_gta01.h +@@ -0,0 +1,265 @@ ++/* ++ * (C) Copyright 2006 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * Configuation settings for the FIC Neo1973 GTA01 Linux GSM phone ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++#if defined(BUILD_FOR_RAM) ++/* If we want to start u-boot from inside RAM */ ++#define CONFIG_SKIP_RELOCATE_UBOOT 1 ++#define CONFIG_SKIP_LOWLEVEL_INIT 1 ++#else ++/* we want to start u-boot directly from within NAND flash */ ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++#endif ++ ++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ ++#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024) ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */ ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS (\ ++ CFG_CMD_BDI | \ ++ CFG_CMD_LOADS | \ ++ CFG_CMD_LAODB | \ ++ CFG_CMD_IMI | \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_MEMORY | \ ++ CFG_CMD_ENV | \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_BOOTD | \ ++ CFG_CMD_CONSOLE | \ ++ CFG_CMD_ASKENV | \ ++ CFG_CMD_RUN | \ ++ CFG_CMD_ECHO | \ ++ CFG_CMD_I2C | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_IMMAP | \ ++ CFG_CMD_DATE | \ ++ CFG_CMD_AUTOSCRIPT | \ ++ CFG_CMD_BSP | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_MISC | \ ++ /* CFG_CMD_USB | */ \ ++ /* CFG_CMD_JFFS2 | */ \ ++ CFG_CMD_DIAG | \ ++ /* CFG_CMD_HWFLOW | */ \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_FAT | \ ++ CFG_CMD_EXT2 | \ ++ 0) ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" ++#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x34000 0x200000; bootm 0x32000000" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#if defined(CONFIG_ARCH_GTA01_v3) ++#define CFG_PROMPT "GTA01v3 # " /* Monitor Command Prompt */ ++#elif defined(CONFIG_ARCH_GTA01_v4) ++#define CFG_PROMPT "GTA01v4 # " /* Monitor Command Prompt */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) ++#define CFG_PROMPT "GTA01Bv2 # " /* Monitor Command Prompt */ ++#elif defined(CONFIG_ARCH_GTA01B_v3) ++#define CFG_PROMPT "GTA01Bv3 # " /* Monitor Command Prompt */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) ++#define CFG_PROMPT "GTA01Bv4 # " /* Monitor Command Prompt */ ++#endif ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 16 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x33000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (128*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++#if 0 ++#define CONFIG_USB_OHCI 1 ++#endif ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ ++ defined(CONFIG_ARCH_GTA01B_v4) ++#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ ++#else ++#error Please define GTA01 variant ++#endif ++#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++/* No NOR flash in this device */ ++#define CFG_NO_FLASH 1 ++ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ ++#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ ++ ++#define NAND_MAX_CHIPS 1 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE 1 ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++/* EXT2 driver */ ++#define CONFIG_EXT2 1 ++ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 0 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++#define CONFIG_JFFS2_NAND_OFF 0x634000 ++#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++#define CONFIG_REVISION_TAG 1 ++#if 0 ++#define CONFIG_SERIAL_TAG 1 ++#endif ++ ++#define CONFIG_DRIVER_S3C24X0_I2C 1 ++#define CONFIG_HARD_I2C 1 ++#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ ++#define CFG_I2C_SLAVE 0x7f ++ ++/* we have a board_late_init() function */ ++#define BOARD_LATE_INIT 1 ++ ++#if 1 ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++#endif ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++#define CONFIG_S3C2410_NAND_HWECC 1 ++ ++#define CONFIG_DRIVER_PCF50606 1 ++ ++#endif /* __CONFIG_H */ +Index: u-boot/board/neo1973/common/neo1973.h +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/neo1973.h +@@ -0,0 +1,32 @@ ++#ifndef _NEO1973_H ++#define _NEO1973_H ++ ++enum wakeup_reason { ++ NEO1973_WAKEUP_NONE, ++ NEO1973_WAKEUP_RESET, ++ NEO1973_WAKEUP_POWER_KEY, ++ NEO1973_WAKEUP_CHARGER, ++ NEO1973_WAKEUP_ALARM, ++}; ++ ++enum neo1973_charger_cmd { ++ NEO1973_CHGCMD_NONE, ++ NEO1973_CHGCMD_AUTOFAST, ++ NEO1973_CHGCMD_NO_AUTOFAST, ++ NEO1973_CHGCMD_OFF, ++ NEO1973_CHGCMD_FAST, ++ NEO1973_CHGCMD_FASTER, ++}; ++ ++extern unsigned int neo1973_wakeup_cause; ++ ++void neo1973_poweroff(void); ++void neo1973_backlight(int on); ++void neo1973_vibrator(int on); ++ ++int neo1973_911_key_pressed(void); ++ ++const char *neo1973_get_charge_status(void); ++int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd); ++ ++#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch new file mode 100644 index 0000000000..343598902f --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch @@ -0,0 +1,1233 @@ +This patch adds 'board' support for the Armzone QT2410 +development board to u-boot. + +Signed-off-by: Harald Welte + +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2009,6 +2009,9 @@ + sbc2410x_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 + ++qt2410_config : unconfig ++ @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 ++ + scb9328_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx + +Index: u-boot/board/qt2410/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/Makefile +@@ -0,0 +1,47 @@ ++# ++# (C) Copyright 2000, 2001, 2002 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = lib$(BOARD).a ++ ++OBJS := qt2410.o flash.o ++SOBJS := lowlevel_init.o ++ ++$(LIB): $(OBJS) $(SOBJS) ++ $(AR) crv $@ $(OBJS) $(SOBJS) ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) ++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ ++ ++-include .depend ++ ++######################################################################### +Index: u-boot/board/qt2410/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/config.mk +@@ -0,0 +1,29 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x511d ++CONFIG_USB_DFU_REVISION=0x0100 ++ ++# ++# SMDK2410 has 1 bank of 64 MB DRAM ++# ++# 3000'0000 to 3400'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# we load ourself to 33F8'0000 ++# ++# download area is 3300'0000 ++# ++ ++ ++TEXT_BASE = 0x33F80000 +Index: u-boot/board/qt2410/flash.c +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/flash.c +@@ -0,0 +1,435 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Alex Zuepke ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ ++ulong myflush (void); ++ ++ ++#define FLASH_BANK_SIZE PHYS_FLASH_SIZE ++#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ ++ ++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; ++ ++ ++#define CMD_READ_ARRAY 0x000000F0 ++#define CMD_UNLOCK1 0x000000AA ++#define CMD_UNLOCK2 0x00000055 ++#define CMD_ERASE_SETUP 0x00000080 ++#define CMD_ERASE_CONFIRM 0x00000030 ++#define CMD_PROGRAM 0x000000A0 ++#define CMD_UNLOCK_BYPASS 0x00000020 ++ ++#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) ++#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) ++ ++#define BIT_ERASE_DONE 0x00000080 ++#define BIT_RDY_MASK 0x00000080 ++#define BIT_PROGRAM_ERROR 0x00000020 ++#define BIT_TIMEOUT 0x80000000 /* our flag */ ++ ++#define READY 1 ++#define ERR 2 ++#define TMO 4 ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++ulong flash_init (void) ++{ ++ int i, j; ++ ulong size = 0; ++ ++ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { ++ ulong flashbase = 0; ++ ++ flash_info[i].flash_id = ++#if defined(CONFIG_AMD_LV400) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV400B & FLASH_TYPEMASK); ++#elif defined(CONFIG_AMD_LV800) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV800B & FLASH_TYPEMASK); ++#else ++#error "Unknown flash configured" ++#endif ++ flash_info[i].size = FLASH_BANK_SIZE; ++ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; ++ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); ++ if (i == 0) ++ flashbase = PHYS_FLASH_1; ++ else ++ panic ("configured too many flash banks!\n"); ++ for (j = 0; j < flash_info[i].sector_count; j++) { ++ if (j <= 3) { ++ /* 1st one is 16 KB */ ++ if (j == 0) { ++ flash_info[i].start[j] = ++ flashbase + 0; ++ } ++ ++ /* 2nd and 3rd are both 8 KB */ ++ if ((j == 1) || (j == 2)) { ++ flash_info[i].start[j] = ++ flashbase + 0x4000 + (j - ++ 1) * ++ 0x2000; ++ } ++ ++ /* 4th 32 KB */ ++ if (j == 3) { ++ flash_info[i].start[j] = ++ flashbase + 0x8000; ++ } ++ } else { ++ flash_info[i].start[j] = ++ flashbase + (j - 3) * MAIN_SECT_SIZE; ++ } ++ } ++ size += flash_info[i].size; ++ } ++ ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_FLASH_BASE, ++ CFG_FLASH_BASE + monitor_flash_len - 1, ++ &flash_info[0]); ++ ++#if 0 ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_ENV_ADDR, ++ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); ++#endif ++ ++ return size; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++void flash_print_info (flash_info_t * info) ++{ ++ int i; ++ ++ switch (info->flash_id & FLASH_VENDMASK) { ++ case (AMD_MANUFACT & FLASH_VENDMASK): ++ printf ("AMD: "); ++ break; ++ default: ++ printf ("Unknown Vendor "); ++ break; ++ } ++ ++ switch (info->flash_id & FLASH_TYPEMASK) { ++ case (AMD_ID_LV400B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV400BB (4Mbit)\n"); ++ break; ++ case (AMD_ID_LV800B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV800BB (8Mbit)\n"); ++ break; ++ default: ++ printf ("Unknown Chip Type\n"); ++ goto Done; ++ break; ++ } ++ ++ printf (" Size: %ld MB in %d Sectors\n", ++ info->size >> 20, info->sector_count); ++ ++ printf (" Sector Start Addresses:"); ++ for (i = 0; i < info->sector_count; i++) { ++ if ((i % 5) == 0) { ++ printf ("\n "); ++ } ++ printf (" %08lX%s", info->start[i], ++ info->protect[i] ? " (RO)" : " "); ++ } ++ printf ("\n"); ++ ++ Done:; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++int flash_erase (flash_info_t * info, int s_first, int s_last) ++{ ++ ushort result; ++ int iflag, cflag, prot, sect; ++ int rc = ERR_OK; ++ int chip; ++ ++ /* first look for protection bits */ ++ ++ if (info->flash_id == FLASH_UNKNOWN) ++ return ERR_UNKNOWN_FLASH_TYPE; ++ ++ if ((s_first < 0) || (s_first > s_last)) { ++ return ERR_INVAL; ++ } ++ ++ if ((info->flash_id & FLASH_VENDMASK) != ++ (AMD_MANUFACT & FLASH_VENDMASK)) { ++ return ERR_UNKNOWN_FLASH_VENDOR; ++ } ++ ++ prot = 0; ++ for (sect = s_first; sect <= s_last; ++sect) { ++ if (info->protect[sect]) { ++ prot++; ++ } ++ } ++ if (prot) ++ return ERR_PROTECTED; ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ /* Start erase on unprotected sectors */ ++ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { ++ printf ("Erasing sector %2d ... ", sect); ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ if (info->protect[sect] == 0) { /* not protected */ ++ vu_short *addr = (vu_short *) (info->start[sect]); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ *addr = CMD_ERASE_CONFIRM; ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > ++ CFG_FLASH_ERASE_TOUT) { ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ chip = TMO; ++ break; ++ } ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_ERASE_DONE) ++ chip = READY; ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) ++ chip = ERR; ++ ++ } while (!chip); ++ ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ ++ if (chip == ERR) { ++ rc = ERR_PROG_ERROR; ++ goto outahere; ++ } ++ if (chip == TMO) { ++ rc = ERR_TIMOUT; ++ goto outahere; ++ } ++ ++ printf ("ok.\n"); ++ } else { /* it was protected */ ++ ++ printf ("protected!\n"); ++ } ++ } ++ ++ if (ctrlc ()) ++ printf ("User Interrupt!\n"); ++ ++ outahere: ++ /* allow flash to settle - wait 10 ms */ ++ udelay_masked (10000); ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash ++ */ ++ ++volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) ++{ ++ vu_short *addr = (vu_short *) dest; ++ ushort result; ++ int rc = ERR_OK; ++ int cflag, iflag; ++ int chip; ++ ++ /* ++ * Check if Flash is (sufficiently) erased ++ */ ++ result = *addr; ++ if ((result & data) != data) ++ return ERR_NOT_ERASED; ++ ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; ++ *addr = CMD_PROGRAM; ++ *addr = data; ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { ++ chip = ERR | TMO; ++ break; ++ } ++ if (!chip && ((result & 0x80) == (data & 0x80))) ++ chip = READY; ++ ++ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { ++ result = *addr; ++ ++ if ((result & 0x80) == (data & 0x80)) ++ chip = READY; ++ else ++ chip = ERR; ++ } ++ ++ } while (!chip); ++ ++ *addr = CMD_READ_ARRAY; ++ ++ if (chip == ERR || *addr != data) ++ rc = ERR_PROG_ERROR; ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash. ++ */ ++ ++int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) ++{ ++ ulong cp, wp; ++ int l; ++ int i, rc; ++ ushort data; ++ ++ wp = (addr & ~1); /* get lower word aligned address */ ++ ++ /* ++ * handle unaligned start bytes ++ */ ++ if ((l = addr - wp) != 0) { ++ data = 0; ++ for (i = 0, cp = wp; i < l; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ for (; i < 2 && cnt > 0; ++i) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ ++cp; ++ } ++ for (; cnt == 0 && i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ wp += 2; ++ } ++ ++ /* ++ * handle word aligned part ++ */ ++ while (cnt >= 2) { ++ data = *((vu_short *) src); ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ src += 2; ++ wp += 2; ++ cnt -= 2; ++ } ++ ++ if (cnt == 0) { ++ return ERR_OK; ++ } ++ ++ /* ++ * handle unaligned tail bytes ++ */ ++ data = 0; ++ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ } ++ for (; i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ return write_hword (info, wp, data); ++} +Index: u-boot/board/qt2410/lowlevel_init.S +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/lowlevel_init.S +@@ -0,0 +1,171 @@ ++/* ++ * Memory Setup stuff - taken from blob memsetup.S ++ * ++ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and ++ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) ++ * ++ * Modified for the Samsung SMDK2410 by ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++ ++/* some parameters for the board */ ++ ++/* ++ * ++ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S ++ * ++ * Copyright (C) 2002 Samsung Electronics SW.LEE ++ * ++ */ ++ ++#define BWSCON 0x48000000 ++ ++/* BWSCON */ ++#define DW8 (0x0) ++#define DW16 (0x1) ++#define DW32 (0x2) ++#define WAIT (0x1<<2) ++#define UBLB (0x1<<3) ++ ++#define B1_BWSCON (DW32) ++#define B2_BWSCON (DW16) ++#define B3_BWSCON (DW16 + WAIT + UBLB) ++#define B4_BWSCON (DW16) ++#define B5_BWSCON (DW16) ++#define B6_BWSCON (DW32) ++#define B7_BWSCON (DW32) ++ ++/* BANK0CON */ ++#define B0_Tacs 0x0 /* 0clk */ ++#define B0_Tcos 0x0 /* 0clk */ ++#define B0_Tacc 0x7 /* 14clk */ ++#define B0_Tcoh 0x0 /* 0clk */ ++#define B0_Tah 0x0 /* 0clk */ ++#define B0_Tacp 0x0 ++#define B0_PMC 0x0 /* normal */ ++ ++/* BANK1CON */ ++#define B1_Tacs 0x0 /* 0clk */ ++#define B1_Tcos 0x0 /* 0clk */ ++#define B1_Tacc 0x7 /* 14clk */ ++#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tah 0x0 /* 0clk */ ++#define B1_Tacp 0x0 ++#define B1_PMC 0x0 ++ ++#define B2_Tacs 0x0 ++#define B2_Tcos 0x0 ++#define B2_Tacc 0x7 ++#define B2_Tcoh 0x0 ++#define B2_Tah 0x0 ++#define B2_Tacp 0x0 ++#define B2_PMC 0x0 ++ ++#define B3_Tacs 0x0 /* 0clk */ ++#define B3_Tcos 0x3 /* 4clk */ ++#define B3_Tacc 0x7 /* 14clk */ ++#define B3_Tcoh 0x1 /* 1clk */ ++#define B3_Tah 0x0 /* 0clk */ ++#define B3_Tacp 0x3 /* 6clk */ ++#define B3_PMC 0x0 /* normal */ ++ ++#define B4_Tacs 0x0 /* 0clk */ ++#define B4_Tcos 0x0 /* 0clk */ ++#define B4_Tacc 0x7 /* 14clk */ ++#define B4_Tcoh 0x0 /* 0clk */ ++#define B4_Tah 0x0 /* 0clk */ ++#define B4_Tacp 0x0 ++#define B4_PMC 0x0 /* normal */ ++ ++#define B5_Tacs 0x0 /* 0clk */ ++#define B5_Tcos 0x0 /* 0clk */ ++#define B5_Tacc 0x7 /* 14clk */ ++#define B5_Tcoh 0x0 /* 0clk */ ++#define B5_Tah 0x0 /* 0clk */ ++#define B5_Tacp 0x0 ++#define B5_PMC 0x0 /* normal */ ++ ++#define B6_MT 0x3 /* SDRAM */ ++#define B6_Trcd 0x1 ++#define B6_SCAN 0x1 /* 9bit */ ++ ++#define B7_MT 0x3 /* SDRAM */ ++#define B7_Trcd 0x1 /* 3clk */ ++#define B7_SCAN 0x1 /* 9bit */ ++ ++/* REFRESH parameter */ ++#define REFEN 0x1 /* Refresh enable */ ++#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ ++#define Trp 0x1 /* 3clk */ ++#define Trc 0x3 /* 7clk */ ++#define Tchr 0x2 /* 3clk */ ++//#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ ++#define REFCNT 997 /* period=17.5us, HCLK=60Mhz, (2048+1-15.6*60) */ ++/**************************************/ ++ ++_TEXT_BASE: ++ .word TEXT_BASE ++ ++.globl lowlevel_init ++lowlevel_init: ++ /* memory control configuration */ ++ /* make r0 relative the current location so that it */ ++ /* reads SMRDATA out of FLASH rather than memory ! */ ++ adr r0, SMRDATA ++ ldr r1, =BWSCON /* Bus Width Status Controller */ ++ add r2, r0, #13*4 ++0: ++ ldr r3, [r0], #4 ++ str r3, [r1], #4 ++ cmp r2, r0 ++ bne 0b ++ ++ /* setup asynchronous bus mode */ ++ mrc p15, 0, r1 ,c1 ,c0, 0 ++ orr r1, r1, #0xc0000000 ++ mcr p15, 0, r1, c1, c0, 0 ++ ++ /* everything is fine now */ ++ mov pc, lr ++ ++ .ltorg ++/* the literal pools origin */ ++ ++SMRDATA: ++ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) ++ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ++ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ++ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ++ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ++ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ++ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ++ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ++ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ++ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ++ .word 0xb2 ++ .word 0x30 ++ .word 0x30 +Index: u-boot/board/qt2410/qt2410.c +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/qt2410.c +@@ -0,0 +1,152 @@ ++/* ++ * (C) 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on existing S3C2410 startup code in u-boot: ++ * ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#if 1 ++//#define M_MDIV 0xA1 /* Fout = 202.8MHz */ ++//#define M_PDIV 0x3 ++//#define M_SDIV 0x1 ++#define M_MDIV 0x90 /* Fout = 202.8MHz */ ++#define M_PDIV 0x7 ++#define M_SDIV 0x0 ++#else ++#define M_MDIV 0x5c /* Fout = 150.0MHz */ ++#define M_PDIV 0x4 ++#define M_SDIV 0x0 ++#endif ++ ++#if 1 ++#define U_M_MDIV 0x78 ++#define U_M_PDIV 0x2 ++#define U_M_SDIV 0x3 ++#else ++#define U_M_MDIV 0x48 ++#define U_M_PDIV 0x3 ++#define U_M_SDIV 0x2 ++#endif ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++ gpio->GPACON = 0x007FFFFF; ++ gpio->GPBCON = 0x00044555; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPCCON = 0xAAAAAAAA; ++ gpio->GPCUP = 0x0000FFFF; ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ gpio->GPFCON = 0x000055AA; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPGCON = 0xFF95FFBA; ++ //gpio->GPGUP = 0x0000FFFF; ++ gpio->GPGUP = 0x0000AFEF; ++ gpio->GPHCON = 0x0028FAAA; ++ gpio->GPHUP = 0x000007FF; ++ ++ /* arch number of SMDK2410-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_QT2410; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++#if defined(CONFIG_USB_DEVICE) ++void udc_ctrl(enum usbd_event event, int param) ++{ ++} ++#endif ++ ++void board_video_init(GraphicDevice *pGD) ++{ ++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); ++ ++ /* FIXME: select LCM type by env variable */ ++ ++ /* Configuration for GTA01 LCM on QT2410 */ ++ lcd->LCDCON1 = 0x00000178; /* CLKVAL=1, BPPMODE=16bpp, TFT, ENVID=0 */ ++ ++ lcd->LCDCON2 = 0x019fc3c1; ++ lcd->LCDCON3 = 0x0039df67; ++ lcd->LCDCON4 = 0x00000007; ++ lcd->LCDCON5 = 0x0001cf09; ++ lcd->LPCSEL = 0x00000000; ++} ++ ++int dram_init (void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} +Index: u-boot/board/qt2410/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/qt2410/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/include/configs/qt2410.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/qt2410.h +@@ -0,0 +1,287 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * Gary Jennejohn ++ * David Mueller ++ * ++ * Configuation settings for the Armzone QT2410 board. ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++#if 0 ++/* If we want to start u-boot from usb bootloader in NOR flash */ ++#define CONFIG_SKIP_RELOCATE_UBOOT 1 ++#define CONFIG_SKIP_LOWLEVEL_INIT 1 ++#else ++/* If we want to start u-boot directly from within NAND flash */ ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++#endif ++ ++#define CFG_UBOOT_SIZE 0x40000 ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ ++#define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++#if 0 ++#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ ++#define CS8900_BASE 0x19000300 ++#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ ++#endif ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410 */ ++#define CONFIG_HWFLOW 1 ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS (\ ++ CFG_CMD_BDI | \ ++ CFG_CMD_LOADS | \ ++ CFG_CMD_LOADB | \ ++ CFG_CMD_IMI | \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_MEMORY | \ ++ CFG_CMD_ENV | \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_BOOTD | \ ++ CFG_CMD_CONSOLE | \ ++ CFG_CMD_BMP | \ ++ CFG_CMD_ASKENV | \ ++ CFG_CMD_RUN | \ ++ CFG_CMD_ECHO | \ ++ CFG_CMD_I2C | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_IMMAP | \ ++ CFG_CMD_DATE | \ ++ CFG_CMD_AUTOSCRIPT | \ ++ CFG_CMD_BSP | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_MISC | \ ++ /* CFG_CMD_USB | */ \ ++ CFG_CMD_JFFS2 | \ ++ CFG_CMD_DIAG | \ ++ CFG_CMD_HWFLOW | \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_FAT | \ ++ CFG_CMD_EXT2 | \ ++ 0) ++ ++#if 0 ++ CFG_CMD_DHCP | \ ++ CFG_CMD_PING | \ ++ CFG_CMD_NET | \ ++ ++#endif ++ ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" ++#define CONFIG_ETHADDR 01:ab:cd:ef:fe:dc ++#define CONFIG_NETMASK 255.255.255.0 ++#define CONFIG_IPADDR 10.0.0.110 ++#define CONFIG_SERVERIP 10.0.0.1 ++/*#define CONFIG_BOOTFILE "elinos-lart" */ ++#define CONFIG_BOOTCOMMAND "nand load 0x32000000 0x34000 0x200000; bootm 0x32000000" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#define CFG_PROMPT "QT2410 # " /* Monitor Command Prompt */ ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 64 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x33000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (128*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++#define CONFIG_USB_OHCI 1 ++ ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x511d /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "Armzone" ++#define CONFIG_USBD_PRODUCT_NAME "QT2410 Bootloader " U_BOOT_VERSION ++#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 0x4000 ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ ++#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ ++ ++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ ++ ++#define CFG_FLASH_BASE PHYS_FLASH_1 ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ ++ ++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ ++#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ ++#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ ++ ++/* timeout values are in ticks */ ++#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ ++#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ ++ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */ ++#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ ++ ++#define NAND_MAX_CHIPS 1 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE 1 ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++#define CONFIG_EXT2 1 ++ ++/* FAT driver in u-boot is broken currently */ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 1 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++ ++#define CONFIG_DRIVER_S3C24X0_I2C 1 ++#define CONFIG_HARD_I2C 1 ++#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ ++#define CFG_I2C_SLAVE 0x7f ++ ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_SPLASH_SCREEN ++#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ ++#define CONFIG_VIDEO_BMP_GZIP ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++#define CONFIG_UNZIP ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++ ++#define MTDIDS_DEFAULT "nand0=qt2410-nand" ++#define MTPARTS_DEFAULT "qt2410-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)" ++ ++#endif /* __CONFIG_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch new file mode 100644 index 0000000000..b39a268c84 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch @@ -0,0 +1,56 @@ +This patch adds a IRQ demultiplexer callback to the arm920 cpu core code, +plus a stub implementation of it for the S3C2410. + +Index: u-boot.git/cpu/arm920t/interrupts.c +=================================================================== +--- u-boot.git.orig/cpu/arm920t/interrupts.c 2007-02-05 22:49:11.000000000 +0100 ++++ u-boot.git/cpu/arm920t/interrupts.c 2007-02-05 23:19:01.000000000 +0100 +@@ -161,11 +161,16 @@ + + void do_irq (struct pt_regs *pt_regs) + { +-#if defined (CONFIG_USE_IRQ) && defined (CONFIG_ARCH_INTEGRATOR) ++#if defined (CONFIG_USE_IRQ) ++#if defined (ARM920_IRQ_CALLBACK) ++ ARM920_IRQ_CALLBACK(); ++ return; ++#elif defined (CONFIG_ARCH_INTEGRATOR) + /* ASSUMED to be a timer interrupt */ + /* Just clear it - count handled in */ + /* integratorap.c */ + *(volatile ulong *)(CFG_TIMERBASE + 0x0C) = 0; ++#endif /* ARCH_INTEGRATOR */ + #else + printf ("interrupt request\n"); + show_regs (pt_regs); +Index: u-boot.git/cpu/arm920t/s3c24x0/interrupts.c +=================================================================== +--- u-boot.git.orig/cpu/arm920t/s3c24x0/interrupts.c 2007-02-05 22:49:11.000000000 +0100 ++++ u-boot.git/cpu/arm920t/s3c24x0/interrupts.c 2007-02-05 23:21:35.000000000 +0100 +@@ -216,4 +216,13 @@ + /*NOTREACHED*/ + } + ++#ifdef CONFIG_USE_IRQ ++void s3c2410_irq(void) ++{ ++ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); ++ u_int32_t intpnd = irq->INTPND; ++ ++} ++#endif /* USE_IRQ */ ++ + #endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ +Index: u-boot.git/include/common.h +=================================================================== +--- u-boot.git.orig/include/common.h 2007-02-05 22:49:11.000000000 +0100 ++++ u-boot.git/include/common.h 2007-02-05 23:19:01.000000000 +0100 +@@ -452,6 +452,8 @@ + ulong get_PCI_freq (void); + #endif + #if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X) ++void s3c2410_irq(void); ++#define ARM920_IRQ_CALLBACK s3c2410_irq + ulong get_FCLK (void); + ulong get_HCLK (void); + ulong get_PCLK (void); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch new file mode 100644 index 0000000000..b3d7bc1166 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch @@ -0,0 +1,28 @@ +This patch allows us to use the 'gd' pointer (and thus environment +and everything else associated with it) from interrupt context on +arm920t. + +Signed-off-by: Harald Welte + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S 2007-02-24 02:35:38.000000000 +0100 ++++ u-boot/cpu/arm920t/start.S 2007-02-24 02:36:01.000000000 +0100 +@@ -474,12 +474,12 @@ + .macro irq_save_user_regs + sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ Calling r0-r12 +- add r8, sp, #S_PC +- stmdb r8, {sp, lr}^ @ Calling SP, LR +- str lr, [r8, #0] @ Save calling PC ++ add r7, sp, #S_PC ++ stmdb r7, {sp, lr}^ @ Calling SP, LR ++ str lr, [r7, #0] @ Save calling PC + mrs r6, spsr +- str r6, [r8, #4] @ Save CPSR +- str r0, [r8, #8] @ Save OLD_R0 ++ str r6, [r7, #4] @ Save CPSR ++ str r0, [r7, #8] @ Save OLD_R0 + mov r0, sp + .endm + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch new file mode 100644 index 0000000000..9b1febe956 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch @@ -0,0 +1,43 @@ +This patch makes the u-boot NAND BBT code a bit more quiet + +Signed-off-by: Harald Welte + +Index: u-boot/drivers/nand/nand_bbt.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:54:02.000000000 +0100 ++++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:54:05.000000000 +0100 +@@ -157,10 +157,6 @@ + this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); + continue; + } +- /* Leave it for now, if its matured we can move this +- * message to MTD_DEBUG_LEVEL0 */ +- printk (KERN_DEBUG "nand_read_bbt: Bad block at 0x%08x\n", +- ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); + /* Factory marked bad or worn out ? */ + if (tmp == 0) + this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); +@@ -229,14 +225,12 @@ + if (td->options & NAND_BBT_VERSION) { + nand_read_raw (mtd, buf, td->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); + td->version[0] = buf[mtd->oobblock + td->veroffs]; +- printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", td->pages[0], td->version[0]); + } + + /* Read the mirror version, if available */ + if (md && (md->options & NAND_BBT_VERSION)) { + nand_read_raw (mtd, buf, md->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); + md->version[0] = buf[mtd->oobblock + md->veroffs]; +- printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", md->pages[0], md->version[0]); + } + + return 1; +@@ -374,8 +368,6 @@ + for (i = 0; i < chips; i++) { + if (td->pages[i] == -1) + printk (KERN_WARNING "Bad block table not found for chip %d\n", i); +- else +- printk (KERN_DEBUG "Bad block table found at page %d, version 0x%02X\n", td->pages[i], td->version[i]); + } + return 0; + } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch new file mode 100644 index 0000000000..993ef4f6f2 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch @@ -0,0 +1,175 @@ +This patch adds a new 's3c2410' command which currently supports 's3c2410 speed +{set,get,list} and thus allows dynamic change of the CPU clock. + +Signed-off-by: Harald Welte + +Index: u-boot/cpu/arm920t/s3c24x0/Makefile +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-24 15:14:00.000000000 +0100 ++++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-02-24 15:21:02.000000000 +0100 +@@ -26,7 +26,7 @@ + LIB = $(obj)lib$(SOC).a + + COBJS = i2c.o interrupts.o serial.o speed.o \ +- usb_ohci.o nand_read.o nand.o ++ usb_ohci.o nand_read.o nand.o cmd_s3c2410.o + + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +Index: u-boot/cpu/arm920t/s3c24x0/cmd_s3c2410.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ u-boot/cpu/arm920t/s3c24x0/cmd_s3c2410.c 2007-02-24 15:22:17.000000000 +0100 +@@ -0,0 +1,152 @@ ++/* ++ * (C) Copyright 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++/* ++ * Boot support ++ */ ++#include ++#include ++#include /* for print_IPaddr */ ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#if (CONFIG_COMMANDS & CFG_CMD_BDI) ++ ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++#define MHZ 1000000 ++ ++static void print_cpu_speed(void) ++{ ++ printf("FCLK = %u MHz, HCLK = %u MHz, PCLK = %u MHz\n", ++ get_FCLK()/MHZ, get_HCLK()/MHZ, get_PCLK()/MHZ); ++} ++ ++struct s3c2410_pll_speed { ++ u_int16_t mhz; ++ u_int32_t mpllcon; ++ u_int32_t clkdivn; ++}; ++ ++#define CLKDIVN_1_1_1 0x00 ++#define CLKDIVN_1_2_2 0x02 ++#define CLKDIVN_1_2_4 0x03 ++#define CLKDIVN_1_4_4 0x04 ++ ++static const struct s3c2410_pll_speed pll_configs[] = { ++ { ++ .mhz = 50, ++ .mpllcon = ((0x5c << 12) + (0x4 << 4) + 0x2), ++ .clkdivn = CLKDIVN_1_1_1, ++ }, ++ { ++ .mhz = 101, ++ .mpllcon = ((0x7f << 12) + (0x2 << 4) + 0x2), ++ .clkdivn = CLKDIVN_1_2_2, ++ }, ++ { ++ .mhz = 202, ++ .mpllcon = ((0x90 << 12) + (0x7 << 4) + 0x0), ++ .clkdivn = CLKDIVN_1_2_4, ++ }, ++ { ++ .mhz = 266, ++ .mpllcon = ((0x7d << 12) + (0x1 << 4) + 0x1), ++ .clkdivn = CLKDIVN_1_2_4, ++ }, ++}; ++ ++static void list_cpu_speeds(void) ++{ ++ int i; ++ for (i = 0; i < ARRAY_SIZE(pll_configs); i++) ++ printf("%u MHz\n", pll_configs[i].mhz); ++} ++ ++static int reconfig_mpll(u_int16_t mhz) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(pll_configs); i++) { ++ if (pll_configs[i].mhz == mhz) { ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = pll_configs[i].mpllcon; ++ clk_power->UPLLCON = ((0x78 << 12) + (0x2 << 4) + 0x3), ++ clk_power->CLKDIVN = pll_configs[i].clkdivn; ++ ++ /* If we changed the speed, we need to re-configure ++ * the serial baud rate generator */ ++ serial_setbrg(); ++ return 0; ++ } ++ } ++ return -1; ++} ++ ++int do_s3c2410 ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ if (!strcmp(argv[1], "speed")) { ++ if (argc < 2) ++ goto out_help; ++ if (!strcmp(argv[2], "get")) ++ print_cpu_speed(); ++ else if (!strcmp(argv[2], "list")) ++ list_cpu_speeds(); ++ else if (!strcmp(argv[2], "set")) { ++ unsigned long mhz; ++ if (argc < 3) ++ goto out_help; ++ ++ mhz = simple_strtoul(argv[3], NULL, 10); ++ ++ if (reconfig_mpll(mhz) < 0) ++ printf("error, speed %uMHz unknown\n", mhz); ++ else ++ print_cpu_speed(); ++ } else ++ goto out_help; ++ } else { ++out_help: ++ printf("Usage:\n%s\n", cmdtp->usage); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* -------------------------------------------------------------------- */ ++ ++ ++U_BOOT_CMD( ++ s3c2410, 4, 1, do_s3c2410, ++ "s3c2410 - SoC specific commands\n", ++ "speed get - display current PLL speed config\n" ++ "s3c2410 speed list - display supporte PLL speed configs\n" ++ "s3c2410 speed set - set PLL speed\n" ++); ++ ++#endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch new file mode 100644 index 0000000000..349b83697e --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch @@ -0,0 +1,41 @@ +Fix building with CRAMFS but not JFFS2 support + +Signed-off-by: Harald Welte + +Index: u-boot/fs/cramfs/cramfs.c +=================================================================== +--- u-boot.orig/fs/cramfs/cramfs.c 2007-02-17 11:46:26.000000000 +0100 ++++ u-boot/fs/cramfs/cramfs.c 2007-02-17 11:54:36.000000000 +0100 +@@ -27,7 +27,7 @@ + #include + #include + +-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) ++#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS) + + #include + #include +Index: u-boot/common/cmd_jffs2.c +=================================================================== +--- u-boot.orig/common/cmd_jffs2.c 2007-02-17 11:47:51.000000000 +0100 ++++ u-boot/common/cmd_jffs2.c 2007-02-17 14:08:25.000000000 +0100 +@@ -170,10 +170,19 @@ + static struct mtd_device *current_dev = NULL; + static u8 current_partnum = 0; + ++#ifdef CFG_CMD_CRAMFS + extern int cramfs_check (struct part_info *info); + extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename); + extern int cramfs_ls (struct part_info *info, char *filename); + extern int cramfs_info (struct part_info *info); ++#else ++/* defining empty macros for function names is ugly but avoids ifdef clutter ++ * all over the code */ ++#define cramfs_check(x) (0) ++#define cramfs_load(x,y,z) (-1) ++#define cramfs_ls(x,y) (0) ++#define cramfs_info(x) (0) ++#endif + + static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num); + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch new file mode 100644 index 0000000000..1122f4894f --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch @@ -0,0 +1,2081 @@ +Index: u-boot/drivers/usbdcore_ep0.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_ep0.c ++++ u-boot/drivers/usbdcore_ep0.c +@@ -42,10 +42,15 @@ + */ + + #include ++DECLARE_GLOBAL_DATA_PTR; + + #if defined(CONFIG_USB_DEVICE) + #include "usbdcore.h" + ++#ifdef CONFIG_USBD_DFU ++#include ++#endif ++ + #if 0 + #define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args) + #else +@@ -213,7 +218,7 @@ + urb->buffer = device_descriptor; + urb->actual_length = MIN(sizeof(*device_descriptor), max); + } +- /*dbg_ep0(3, "copied device configuration, actual_length: %x", urb->actual_length); */ ++ dbg_ep0(3, "using device configuration, actual_length: %x", urb->actual_length); + break; + + case USB_DESCRIPTOR_TYPE_CONFIGURATION: +@@ -267,7 +272,24 @@ + return -1; + case USB_DESCRIPTOR_TYPE_ENDPOINT: + return -1; ++ /* This really means "Class Specific Descriptor #1 == USB_DT_DFU */ + case USB_DESCRIPTOR_TYPE_HID: ++#ifdef CONFIG_USBD_DFU ++ { ++ int bNumInterface = ++ le16_to_cpu(urb->device_request.wIndex); ++ ++ /* In runtime mode, we only respond to the DFU INTERFACE, ++ * whereas in DFU mode, we respond for all intrfaces */ ++ if (device->dfu_state != DFU_STATE_appIDLE && ++ device->dfu_state != DFU_STATE_appDETACH || ++ bNumInterface == CONFIG_USBD_DFU_INTERFACE) { ++ urb->buffer = &device->dfu_cfg_desc->func_dfu; ++ urb->actual_length = sizeof(struct usb_dfu_func_descriptor); ++ } else ++ return -1; ++ } ++#else /* CONFIG_USBD_DFU */ + { + return -1; /* unsupported at this time */ + #if 0 +@@ -294,6 +316,7 @@ + max); + #endif + } ++#endif /* CONFIG_USBD_DFU */ + break; + case USB_DESCRIPTOR_TYPE_REPORT: + { +@@ -388,6 +411,24 @@ + le16_to_cpu (request->wLength), + USBD_DEVICE_REQUESTS (request->bRequest)); + ++#ifdef CONFIG_USBD_DFU ++ if ((request->bmRequestType & 0x3f) == USB_TYPE_DFU && ++ (device->dfu_state != DFU_STATE_appIDLE || ++ le16_to_cpu(request->wIndex) == CONFIG_USBD_DFU_INTERFACE)) { ++ int rc = dfu_ep0_handler(urb); ++ switch (rc) { ++ case DFU_EP0_NONE: ++ case DFU_EP0_UNHANDLED: ++ break; ++ case DFU_EP0_ZLP: ++ case DFU_EP0_DATA: ++ return 0; ++ case DFU_EP0_STALL: ++ return -1; ++ } ++ } ++#endif /* CONFIG_USB_DFU */ ++ + /* handle USB Standard Request (c.f. USB Spec table 9-2) */ + if ((request->bmRequestType & USB_REQ_TYPE_MASK) != 0) { + if (device->device_state <= STATE_CONFIGURED) +@@ -570,7 +611,8 @@ + device->interface = le16_to_cpu (request->wIndex); + device->alternate = le16_to_cpu (request->wValue); + /*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ +- serial_printf ("DEVICE_SET_INTERFACE.. event?\n"); ++ usbd_device_event_irq(device, DEVICE_SET_INTERFACE, ++ (request->wIndex << 16 | request->wValue)); + return 0; + + case USB_REQ_GET_STATUS: +Index: u-boot/drivers/usbdfu.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/usbdfu.c +@@ -0,0 +1,1069 @@ ++/* ++ * (C) 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on existing SAM7DFU code from OpenPCD: ++ * (C) Copyright 2006 by Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ * ++ * TODO: ++ * - make NAND support reasonably self-contained and put in apropriate ++ * ifdefs ++ * - add some means of synchronization, i.e. block commandline access ++ * while DFU transfer is in progress, and return to commandline once ++ * we're finished ++ * - add VERIFY support after writing to flash ++ * - sanely free() resources allocated during first uppload/download ++ * request when aborting ++ * - sanely free resources when another alternate interface is selected ++ * ++ * Maybe: ++ * - add something like uImage or some other header that provides CRC ++ * checking? ++ * - make 'dnstate' attached to 'struct usb_device_instance' ++ */ ++ ++#include ++#if defined(CONFIG_USBD_DFU) ++ ++#include ++DECLARE_GLOBAL_DATA_PTR; ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++int mtdparts_init(void); ++extern struct list_head devices; ++ ++#include "usbdcore_s3c2410.h" ++#include "usbtty.h" /* for STR_* defs */ ++ ++#define RET_NOTHING 0 ++#define RET_ZLP 1 ++#define RET_STALL 2 ++ ++volatile enum dfu_state *system_dfu_state; /* for 3rd parties */ ++ ++ ++struct dnload_state { ++ nand_info_t *nand; ++ struct part_info *part; ++ unsigned int part_net_size; /* net sizee (excl. bad blocks) of part */ ++ ++ nand_erase_options_t erase_opts; ++ nand_write_options_t write_opts; ++ nand_read_options_t read_opts; ++ ++ unsigned char *ptr; /* pointer to next empty byte in buffer */ ++ unsigned int off; /* offset of current erase page in flash chip */ ++ unsigned char *buf; /* pointer to allocated erase page buffer */ ++ ++ /* unless doing an atomic transfer, we use the static buffer below. ++ * This saves us from having to clean up dynamic allications in the ++ * various error paths of the code. Also, it will always work, no ++ * matter what the memory situation is. */ ++ unsigned char _buf[0x20000]; /* FIXME: depends flash page size */ ++}; ++ ++static struct dnload_state _dnstate; ++ ++static int dfu_trailer_matching(const struct uboot_dfu_trailer *trailer) ++{ ++ if (trailer->magic != UBOOT_DFU_TRAILER_MAGIC || ++ trailer->version != UBOOT_DFU_TRAILER_V1 || ++ trailer->vendor != CONFIG_USBD_VENDORID || ++ (trailer->product != CONFIG_USBD_PRODUCTID_CDCACM && ++ trailer->product != CONFIG_USBD_PRODUCTID_GSERIAL)) ++ return 0; ++#ifdef CONFIG_REVISION_TAG ++ if (trailer->revision != get_board_rev()) ++ return 0; ++#endif ++ ++ return 1; ++} ++ ++static struct part_info *get_partition_nand(int idx) ++{ ++ struct mtd_device *dev; ++ struct part_info *part; ++ struct list_head *pentry; ++ int i; ++ ++ if (mtdparts_init()) ++ return NULL; ++ if (list_empty(&devices)) ++ return NULL; ++ ++ dev = list_entry(devices.next, struct mtd_device, link); ++ i = 0; ++ list_for_each(pentry, &dev->parts) { ++ if (i == idx) { ++ part = list_entry(pentry, struct part_info, link); ++ return part; ++ } ++ i++; ++ } ++ ++ return NULL; ++} ++ ++#define LOAD_ADDR ((unsigned char *)0x32000000) ++ ++static int initialize_ds_nand(struct usb_device_instance *dev, struct dnload_state *ds) ++{ ++ ds->part = get_partition_nand(dev->alternate - 1); ++ if (!ds->part) { ++ printf("DFU: unable to find partition %u\b", dev->alternate-1); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ ds->nand = &nand_info[ds->part->dev->id->num]; ++ ds->off = ds->part->offset; ++ ds->part_net_size = nand_net_part_size(ds->part); ++ ++ if (ds->nand->erasesize > sizeof(ds->_buf)) { ++ printf("*** Warning - NAND ERASESIZE bigger than static buffer\n"); ++ ds->buf = malloc(ds->nand->erasesize); ++ if (!ds->buf) { ++ printf("DFU: can't allocate %u bytes\n", ds->nand->erasesize); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ } else ++ ds->buf = ds->_buf; ++ ++ ds->ptr = ds->buf; ++ ++ memset(&ds->read_opts, 0, sizeof(ds->read_opts)); ++ ++ memset(&ds->erase_opts, 0, sizeof(ds->erase_opts)); ++ ds->erase_opts.quiet = 1; ++ /* FIXME: do this more dynamic */ ++ if (!strcmp(ds->part->name, "rootfs")) ++ ds->erase_opts.jffs2 = 1; ++ ++ memset(&ds->write_opts, 0, sizeof(ds->write_opts)); ++ ds->write_opts.pad = 1; ++ ds->write_opts.blockalign = 1; ++ ds->write_opts.quiet = 1; ++ ++ debug("initialize_ds_nand(dev=%p, ds=%p): ", dev, ds); ++ debug("nand=%p, ptr=%p, buf=%p, off=0x%x\n", ds->nand, ds->ptr, ds->buf, ds->off); ++ ++ return RET_NOTHING; ++} ++ ++static int erase_flash_verify_nand(struct urb *urb, struct dnload_state *ds, ++ unsigned long erasesize, unsigned long size) ++{ ++ struct usb_device_instance *dev = urb->device; ++ int rc; ++ ++ debug("erase_flash_verify_nand(urb=%p, ds=%p, erase=0x%x size=0x%x)\n", ++ urb, ds, erasesize, size); ++ ++ if (erasesize == ds->nand->erasesize) { ++ /* we're only writing a single block and need to ++ * do bad block skipping / offset adjustments our own */ ++ while (ds->nand->block_isbad(ds->nand, ds->off)) { ++ debug("SKIP_ONE_BLOCK(0x%08x)!!\n", ds->off); ++ ds->off += ds->nand->erasesize; ++ } ++ } ++ ++ /* we have finished one eraseblock, flash it */ ++ ds->erase_opts.offset = ds->off; ++ ds->erase_opts.length = erasesize; ++ debug("Erasing 0x%x bytes @ offset 0x%x (jffs=%u)\n", ++ ds->erase_opts.length, ds->erase_opts.offset, ++ ds->erase_opts.jffs2); ++ rc = nand_erase_opts(ds->nand, &ds->erase_opts); ++ if (rc) { ++ debug("Error erasing\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errERASE; ++ return RET_STALL; ++ } ++ ++ ds->write_opts.buffer = ds->buf; ++ ds->write_opts.length = size; ++ ds->write_opts.offset = ds->off; ++ debug("Writing 0x%x bytes @ offset 0x%x\n", size, ds->off); ++ rc = nand_write_opts(ds->nand, &ds->write_opts); ++ if (rc) { ++ debug("Error writing\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errWRITE; ++ return RET_STALL; ++ } ++ ++ ds->off += size; ++ ds->ptr = ds->buf; ++ ++ /* FIXME: implement verify! */ ++ return RET_NOTHING; ++} ++ ++static int erase_tail_clean_nand(struct urb *urb, struct dnload_state *ds) ++{ ++ struct usb_device_instance *dev = urb->device; ++ int rc; ++ ++ ds->erase_opts.offset = ds->off; ++ ds->erase_opts.length = ds->part->size-ds->off; ++ debug("Erasing 0x%x bytes @ offset 0x%x (jffs=%u)\n", ++ ds->erase_opts.length, ds->erase_opts.offset, ++ ds->erase_opts.jffs2); ++ rc = nand_erase_opts(ds->nand, &ds->erase_opts); ++ if (rc) { ++ debug("Error erasing\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errERASE; ++ return RET_STALL; ++ } ++ ++ ds->off += ds->part->size; /* for consistency */ ++ ++ return RET_NOTHING; ++} ++ ++/* Read the next erase blcok from NAND into buffer */ ++static int read_next_nand(struct urb *urb, struct dnload_state *ds) ++{ ++ struct usb_device_instance *dev = urb->device; ++ int rc; ++ ++ ds->read_opts.buffer = ds->buf; ++ ds->read_opts.length = ds->nand->erasesize; ++ ds->read_opts.offset = ds->off; ++ ds->read_opts.quiet = 1; ++ ++ debug("Reading 0x%x@0x%x to 0x%08p\n", ds->nand->erasesize, ++ ds->off, ds->buf); ++ rc = nand_read_opts(ds->nand, &ds->read_opts); ++ if (rc) { ++ debug("Error reading\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errWRITE; ++ return RET_STALL; ++ } ++ ds->off += ds->nand->erasesize; ++ ds->ptr = ds->buf; ++ ++ return RET_NOTHING; ++} ++ ++ ++static int handle_dnload(struct urb *urb, u_int16_t val, u_int16_t len, int first) ++{ ++ struct usb_device_instance *dev = urb->device; ++ struct dnload_state *ds = &_dnstate; ++ unsigned int actual_len = len; ++ unsigned int remain_len; ++ unsigned long size; ++ int rc; ++ ++ debug("download(len=%u, first=%u) ", len, first); ++ ++ if (len > CONFIG_USBD_DFU_XFER_SIZE) { ++ /* Too big. Not that we'd really care, but it's a ++ * DFU protocol violation */ ++ debug("length exceeds flash page size "); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ ++ if (first) { ++ /* Make sure that we have a valid mtd partition table */ ++ char *mtdp = getenv("mtdparts"); ++ if (!mtdp) ++ run_command("dynpart", 0); ++ } ++ ++ if (len == 0) { ++ debug("zero-size write -> MANIFEST_SYNC "); ++ dev->dfu_state = DFU_STATE_dfuMANIFEST_SYNC; ++ ++ /* cleanup */ ++ switch (dev->alternate) { ++ char buf[12]; ++ case 0: ++ sprintf(buf, "%lx", ds->ptr - ds->buf); ++ setenv("filesize", buf); ++ ds->ptr = ds->buf; ++ break; ++ case 1: ++ if (ds->ptr > ++ ds->buf + sizeof(struct uboot_dfu_trailer)) { ++ struct uboot_dfu_trailer trailer; ++ dfu_trailer_mirror(&trailer, ds->ptr); ++ if (!dfu_trailer_matching(&trailer)) { ++ printf("DFU TRAILER NOT OK\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errTARGET; ++ return RET_STALL; ++ } ++ ++ rc = erase_flash_verify_nand(urb, ds, ++ ds->part->size, ++ ds->part_net_size); ++ /* re-write dynenv marker in OOB */ ++ run_command("dynenv set u-boot_env", 0); ++ } ++ ds->nand = NULL; ++ free(ds->buf); ++ ds->ptr = ds->buf = ds->_buf; ++ break; ++ default: ++ rc = 0; ++ if (ds->ptr > ds->buf) ++ rc = erase_flash_verify_nand(urb, ds, ++ ds->nand->erasesize, ++ ds->nand->erasesize); ++ /* rootfs partition */ ++ if (!rc && dev->alternate == 5) ++ rc = erase_tail_clean_nand(urb, ds); ++ ++ ds->nand = NULL; ++ break; ++ } ++ ++ return RET_ZLP; ++ } ++ ++ if (urb->actual_length != len) { ++ debug("urb->actual_length(%u) != len(%u) ?!? ", ++ urb->actual_length, len); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ ++ if (first && ds->buf && ds->buf != ds->_buf && ds->buf != LOAD_ADDR) { ++ free(ds->buf); ++ ds->buf = ds->_buf; ++ } ++ ++ switch (dev->alternate) { ++ case 0: ++ if (first) { ++ printf("Starting DFU DOWNLOAD to RAM (0x%08p)\n", ++ LOAD_ADDR); ++ ds->buf = LOAD_ADDR; ++ ds->ptr = ds->buf; ++ } ++ ++ memcpy(ds->ptr, urb->buffer, len); ++ ds->ptr += len; ++ break; ++ case 1: ++ if (first) { ++ rc = initialize_ds_nand(dev, ds); ++ if (rc) ++ return rc; ++ ds->buf = malloc(ds->part_net_size); ++ if (!ds->buf) { ++ printf("No memory for atomic buffer!!\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errUNKNOWN; ++ return RET_STALL; ++ } ++ ds->ptr = ds->buf; ++ printf("Starting Atomic DFU DOWNLOAD to partition '%s'\n", ++ ds->part->name); ++ } ++ ++ remain_len = (ds->buf + ds->part_net_size) - ds->ptr; ++ if (remain_len < len) { ++ len = remain_len; ++ printf("End of write exceeds partition end\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ memcpy(ds->ptr, urb->buffer, len); ++ ds->ptr += len; ++ break; ++ default: ++ if (first) { ++ rc = initialize_ds_nand(dev, ds); ++ if (rc) ++ return rc; ++ printf("Starting DFU DOWNLOAD to partition '%s'\n", ++ ds->part->name); ++ } ++ ++ size = ds->nand->erasesize; ++ remain_len = ds->buf + size - ds->ptr; ++ if (remain_len < len) ++ actual_len = remain_len; ++ ++ memcpy(ds->ptr, urb->buffer, actual_len); ++ ds->ptr += actual_len; ++ ++ /* check partition end */ ++ if (ds->off + (ds->ptr - ds->buf) > ds->part->offset + ds->part->size) { ++ printf("End of write exceeds partition end\n"); ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ return RET_STALL; ++ } ++ ++ if (ds->ptr >= ds->buf + size) { ++ rc = erase_flash_verify_nand(urb, ds, ++ ds->nand->erasesize, ++ ds->nand->erasesize); ++ if (rc) ++ return rc; ++ /* copy remainder of data into buffer */ ++ memcpy(ds->ptr, urb->buffer + actual_len, len - actual_len); ++ ds->ptr += (len - actual_len); ++ } ++ break; ++ } ++ ++ return RET_ZLP; ++} ++ ++static int handle_upload(struct urb *urb, u_int16_t val, u_int16_t len, int first) ++{ ++ struct usb_device_instance *dev = urb->device; ++ struct dnload_state *ds = &_dnstate; ++ unsigned int remain; ++ int rc; ++ ++ debug("upload(val=0x%02x, len=%u, first=%u) ", val, len, first); ++ ++ if (len > CONFIG_USBD_DFU_XFER_SIZE) { ++ /* Too big */ ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ dev->dfu_status = DFU_STATUS_errADDRESS; ++ //udc_ep0_send_stall(); ++ debug("Error: Transfer size > CONFIG_USBD_DFU_XFER_SIZE "); ++ return -EINVAL; ++ } ++ ++ switch (dev->alternate) { ++ case 0: ++ if (first) { ++ printf("Starting DFU Upload of RAM (0x%08p)\n", ++ LOAD_ADDR); ++ ds->ptr = ds->buf; ++ } ++ ++ /* FIXME: end at some more dynamic point */ ++ if (ds->ptr + len > LOAD_ADDR + 0x200000) ++ len = (LOAD_ADDR + 0x200000) - ds->ptr; ++ ++ urb->buffer = ds->ptr; ++ urb->actual_length = len; ++ ds->ptr += len; ++ break; ++ default: ++ if (first) { ++ rc = initialize_ds_nand(dev, ds); ++ if (rc) ++ return -EINVAL; ++ printf("Starting DFU Upload of partition '%s'\n", ++ ds->part->name); ++ rc = read_next_nand(urb, ds); ++ if (rc) ++ return -EINVAL; ++ } ++ ++ if (len > ds->nand->erasesize) { ++ printf("We don't support transfers bigger than %u\n", ++ ds->nand->erasesize); ++ len = ds->nand->erasesize; ++ } ++ ++ remain = ds->nand->erasesize - (ds->ptr - ds->buf); ++ if (len < remain) ++ remain = len; ++ ++ debug("copying %u bytes ", remain); ++ urb->buffer = ds->ptr; ++ ds->ptr += remain; ++ urb->actual_length = remain; ++ ++ if (ds->ptr >= ds->buf + ds->nand->erasesize && ++ ds->off < ds->part->offset + ds->part->size) { ++ rc = read_next_nand(urb, ds); ++ if (rc) ++ return -EINVAL; ++ if (len > remain) { ++ debug("copying another %u bytes ", len - remain); ++ memcpy(urb->buffer + remain, ds->ptr, len - remain); ++ ds->ptr += (len - remain); ++ urb->actual_length += (len - remain); ++ } ++ } ++ break; ++ } ++ ++ debug("returning len=%u\n", len); ++ return len; ++} ++ ++static void handle_getstatus(struct urb *urb, int max) ++{ ++ struct usb_device_instance *dev = urb->device; ++ struct dfu_status *dstat = (struct dfu_status *) urb->buffer; ++ ++ debug("getstatus "); ++ ++ if (!urb->buffer || urb->buffer_length < sizeof(*dstat)) { ++ debug("invalid urb! "); ++ return; ++ } ++ ++ switch (dev->dfu_state) { ++ case DFU_STATE_dfuDNLOAD_SYNC: ++ case DFU_STATE_dfuDNBUSY: ++#if 0 ++ if (fsr & AT91C_MC_PROGE) { ++ debug("errPROG "); ++ dev->dfu_status = DFU_STATUS_errPROG; ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ } else if (fsr & AT91C_MC_LOCKE) { ++ debug("errWRITE "); ++ dev->dfu_status = DFU_STATUS_errWRITE; ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ } else if (fsr & AT91C_MC_FRDY) { ++#endif ++ debug("DNLOAD_IDLE "); ++ dev->dfu_state = DFU_STATE_dfuDNLOAD_IDLE; ++#if 0 ++ } else { ++ debug("DNBUSY "); ++ dev->dfu_state = DFU_STATE_dfuDNBUSY; ++ } ++#endif ++ break; ++ case DFU_STATE_dfuMANIFEST_SYNC: ++ break; ++ default: ++ //return; ++ break; ++ } ++ ++ /* send status response */ ++ dstat->bStatus = dev->dfu_status; ++ dstat->bState = dev->dfu_state; ++ dstat->iString = 0; ++ /* FIXME: set dstat->bwPollTimeout */ ++ urb->actual_length = MIN(sizeof(*dstat), max); ++ ++ /* we don't need to explicitly send data here, will ++ * be done by the original caller! */ ++} ++ ++static void handle_getstate(struct urb *urb, int max) ++{ ++ debug("getstate "); ++ ++ if (!urb->buffer || urb->buffer_length < sizeof(u_int8_t)) { ++ debug("invalid urb! "); ++ return; ++ } ++ ++ urb->buffer[0] = urb->device->dfu_state & 0xff; ++ urb->actual_length = sizeof(u_int8_t); ++} ++ ++#ifndef CONFIG_USBD_PRODUCTID_DFU ++#define CONFIG_USBD_PRODUCTID_DFU CONFIG_USBD_PRODUCTID_CDCACM ++#endif ++ ++static const struct usb_device_descriptor dfu_dev_descriptor = { ++ .bLength = USB_DT_DEVICE_SIZE, ++ .bDescriptorType = USB_DT_DEVICE, ++ .bcdUSB = 0x0100, ++ .bDeviceClass = 0x00, ++ .bDeviceSubClass = 0x00, ++ .bDeviceProtocol = 0x00, ++ .bMaxPacketSize0 = EP0_MAX_PACKET_SIZE, ++ .idVendor = CONFIG_USBD_VENDORID, ++ .idProduct = CONFIG_USBD_PRODUCTID_DFU, ++ .bcdDevice = 0x0000, ++ .iManufacturer = DFU_STR_MANUFACTURER, ++ .iProduct = DFU_STR_PRODUCT, ++ .iSerialNumber = DFU_STR_SERIAL, ++ .bNumConfigurations = 0x01, ++}; ++ ++static const struct _dfu_desc dfu_cfg_descriptor = { ++ .ucfg = { ++ .bLength = USB_DT_CONFIG_SIZE, ++ .bDescriptorType = USB_DT_CONFIG, ++ .wTotalLength = USB_DT_CONFIG_SIZE + ++ DFU_NUM_ALTERNATES * USB_DT_INTERFACE_SIZE + ++ USB_DT_DFU_SIZE, ++ .bNumInterfaces = 5, ++ .bConfigurationValue = 1, ++ .iConfiguration = DFU_STR_CONFIG, ++ .bmAttributes = BMATTRIBUTE_RESERVED, ++ .bMaxPower = 50, ++ }, ++ .uif[0] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x00, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT0, ++ }, ++ .uif[1] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x01, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT1, ++ }, ++ .uif[2] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x02, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT2, ++ }, ++ .uif[3] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x03, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT3, ++ }, ++ .uif[4] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x04, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT4, ++ }, ++ .uif[5] = { ++ .bLength = USB_DT_INTERFACE_SIZE, ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x00, ++ .bAlternateSetting = 0x05, ++ .bNumEndpoints = 0x00, ++ .bInterfaceClass = 0xfe, ++ .bInterfaceSubClass = 0x01, ++ .bInterfaceProtocol = 0x02, ++ .iInterface = DFU_STR_ALT5, ++ }, ++ .func_dfu = DFU_FUNC_DESC, ++}; ++ ++int dfu_ep0_handler(struct urb *urb) ++{ ++ int rc, ret = RET_NOTHING; ++ u_int8_t req = urb->device_request.bRequest; ++ u_int16_t val = urb->device_request.wValue; ++ u_int16_t len = urb->device_request.wLength; ++ struct usb_device_instance *dev = urb->device; ++ ++ debug("dfu_ep0(req=0x%x, val=0x%x, len=%u) old_state = %u ", ++ req, val, len, dev->dfu_state); ++ ++ switch (dev->dfu_state) { ++ case DFU_STATE_appIDLE: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ case USB_REQ_DFU_DETACH: ++ dev->dfu_state = DFU_STATE_appDETACH; ++ ret = RET_ZLP; ++ goto out; ++ break; ++ default: ++ ret = RET_STALL; ++ } ++ break; ++ case DFU_STATE_appDETACH: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_appIDLE; ++ ret = RET_STALL; ++ goto out; ++ break; ++ } ++ /* FIXME: implement timer to return to appIDLE */ ++ break; ++ case DFU_STATE_dfuIDLE: ++ switch (req) { ++ case USB_REQ_DFU_DNLOAD: ++ if (len == 0) { ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ goto out; ++ } ++ dev->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; ++ ret = handle_dnload(urb, val, len, 1); ++ break; ++ case USB_REQ_DFU_UPLOAD: ++ dev->dfu_state = DFU_STATE_dfuUPLOAD_IDLE; ++ handle_upload(urb, val, len, 1); ++ break; ++ case USB_REQ_DFU_ABORT: ++ /* no zlp? */ ++ ret = RET_ZLP; ++ break; ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ case USB_REQ_DFU_DETACH: ++ /* Proprietary extension: 'detach' from idle mode and ++ * get back to runtime mode in case of USB Reset. As ++ * much as I dislike this, we just can't use every USB ++ * bus reset to switch back to runtime mode, since at ++ * least the Linux USB stack likes to send a number of resets ++ * in a row :( */ ++ dev->dfu_state = DFU_STATE_dfuMANIFEST_WAIT_RST; ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ goto out; ++ break; ++ } ++ break; ++ case DFU_STATE_dfuDNLOAD_SYNC: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ /* FIXME: state transition depending on block completeness */ ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ goto out; ++ } ++ break; ++ case DFU_STATE_dfuDNBUSY: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ /* FIXME: only accept getstatus if bwPollTimeout ++ * has elapsed */ ++ handle_getstatus(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ goto out; ++ } ++ break; ++ case DFU_STATE_dfuDNLOAD_IDLE: ++ switch (req) { ++ case USB_REQ_DFU_DNLOAD: ++ dev->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; ++ ret = handle_dnload(urb, val, len, 0); ++ break; ++ case USB_REQ_DFU_ABORT: ++ dev->dfu_state = DFU_STATE_dfuIDLE; ++ ret = RET_ZLP; ++ break; ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ break; ++ } ++ break; ++ case DFU_STATE_dfuMANIFEST_SYNC: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ /* We're MainfestationTolerant */ ++ dev->dfu_state = DFU_STATE_dfuIDLE; ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ break; ++ } ++ break; ++ case DFU_STATE_dfuMANIFEST: ++ /* we should never go here */ ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ break; ++ case DFU_STATE_dfuMANIFEST_WAIT_RST: ++ /* we should never go here */ ++ break; ++ case DFU_STATE_dfuUPLOAD_IDLE: ++ switch (req) { ++ case USB_REQ_DFU_UPLOAD: ++ /* state transition if less data then requested */ ++ rc = handle_upload(urb, val, len, 0); ++ if (rc >= 0 && rc < len) ++ dev->dfu_state = DFU_STATE_dfuIDLE; ++ break; ++ case USB_REQ_DFU_ABORT: ++ dev->dfu_state = DFU_STATE_dfuIDLE; ++ /* no zlp? */ ++ ret = RET_ZLP; ++ break; ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ break; ++ } ++ break; ++ case DFU_STATE_dfuERROR: ++ switch (req) { ++ case USB_REQ_DFU_GETSTATUS: ++ handle_getstatus(urb, len); ++ break; ++ case USB_REQ_DFU_GETSTATE: ++ handle_getstate(urb, len); ++ break; ++ case USB_REQ_DFU_CLRSTATUS: ++ dev->dfu_state = DFU_STATE_dfuIDLE; ++ dev->dfu_status = DFU_STATUS_OK; ++ /* no zlp? */ ++ ret = RET_ZLP; ++ break; ++ default: ++ dev->dfu_state = DFU_STATE_dfuERROR; ++ ret = RET_STALL; ++ break; ++ } ++ break; ++ default: ++ return DFU_EP0_UNHANDLED; ++ break; ++ } ++ ++out: ++ debug("new_state = %u, ret = %u\n", dev->dfu_state, ret); ++ ++ switch (ret) { ++ case RET_ZLP: ++ //udc_ep0_send_zlp(); ++ urb->actual_length = 0; ++ return DFU_EP0_ZLP; ++ break; ++ case RET_STALL: ++ //udc_ep0_send_stall(); ++ return DFU_EP0_STALL; ++ break; ++ case RET_NOTHING: ++ break; ++ } ++ ++ return DFU_EP0_DATA; ++} ++ ++void str2wide (char *str, u16 * wide); ++static struct usb_string_descriptor *create_usbstring(char *string) ++{ ++ struct usb_string_descriptor *strdesc; ++ int size = sizeof(*strdesc) + strlen(string)*2; ++ ++ if (size > 255) ++ return NULL; ++ ++ strdesc = malloc(size); ++ if (!strdesc) ++ return NULL; ++ ++ strdesc->bLength = size; ++ strdesc->bDescriptorType = USB_DT_STRING; ++ str2wide(string, strdesc->wData); ++ ++ return strdesc; ++} ++ ++ ++static void dfu_init_strings(struct usb_device_instance *dev) ++{ ++ int i; ++ struct usb_string_descriptor *strdesc; ++ ++ strdesc = create_usbstring(CONFIG_DFU_CFG_STR); ++ usb_strings[DFU_STR_CONFIG] = strdesc; ++ ++ for (i = 0; i < DFU_NUM_ALTERNATES; i++) { ++ if (i == 0) { ++ strdesc = create_usbstring(CONFIG_DFU_ALT0_STR); ++ } else { ++ struct part_info *part = get_partition_nand(i-1); ++ ++ if (part) ++ strdesc = create_usbstring(part->name); ++ else ++ strdesc = ++ create_usbstring("undefined partition"); ++ } ++ if (!strdesc) ++ continue; ++ usb_strings[STR_COUNT+i+1] = strdesc; ++ } ++} ++ ++int dfu_init_instance(struct usb_device_instance *dev) ++{ ++ dev->dfu_dev_desc = &dfu_dev_descriptor; ++ dev->dfu_cfg_desc = &dfu_cfg_descriptor; ++ dev->dfu_state = DFU_STATE_appIDLE; ++ dev->dfu_status = DFU_STATUS_OK; ++ ++ if (system_dfu_state) ++ printf("SURPRISE: system_dfu_state is already set\n"); ++ system_dfu_state = &dev->dfu_state; ++ ++ dfu_init_strings(dev); ++ ++ return 0; ++} ++ ++static int stdout_switched; ++ ++/* event handler for usb device state events */ ++void dfu_event(struct usb_device_instance *device, ++ usb_device_event_t event, int data) ++{ ++ char *out; ++ ++ switch (event) { ++ case DEVICE_RESET: ++ switch (device->dfu_state) { ++ case DFU_STATE_appDETACH: ++ device->dfu_state = DFU_STATE_dfuIDLE; ++ out = getenv("stdout"); ++ if (out && !strcmp(out, "usbtty")) { ++ setenv("stdout", "vga"); ++ setenv("stderr", "vga"); ++ stdout_switched = 1; ++ } ++ printf("DFU: Switching to DFU Mode\n"); ++ break; ++ case DFU_STATE_dfuMANIFEST_WAIT_RST: ++ device->dfu_state = DFU_STATE_appIDLE; ++ printf("DFU: Switching back to Runtime mode\n"); ++ if (stdout_switched) { ++ setenv("stdout", "usbtty"); ++ setenv("stderr", "usbtty"); ++ stdout_switched = 0; ++ } ++ break; ++ default: ++ break; ++ } ++ break; ++ case DEVICE_CONFIGURED: ++ case DEVICE_DE_CONFIGURED: ++ debug("SET_CONFIGURATION(%u) ", device->configuration); ++ /* fallthrough */ ++ case DEVICE_SET_INTERFACE: ++ debug("SET_INTERFACE(%u,%u) old_state = %u ", ++ device->interface, device->alternate, ++ device->dfu_state); ++ switch (device->dfu_state) { ++ case DFU_STATE_appIDLE: ++ case DFU_STATE_appDETACH: ++ case DFU_STATE_dfuIDLE: ++ case DFU_STATE_dfuMANIFEST_WAIT_RST: ++ /* do nothing, we're fine */ ++ break; ++ case DFU_STATE_dfuDNLOAD_SYNC: ++ case DFU_STATE_dfuDNBUSY: ++ case DFU_STATE_dfuDNLOAD_IDLE: ++ case DFU_STATE_dfuMANIFEST: ++ device->dfu_state = DFU_STATE_dfuERROR; ++ device->dfu_status = DFU_STATUS_errNOTDONE; ++ /* FIXME: free malloc()ed buffer! */ ++ break; ++ case DFU_STATE_dfuMANIFEST_SYNC: ++ case DFU_STATE_dfuUPLOAD_IDLE: ++ case DFU_STATE_dfuERROR: ++ device->dfu_state = DFU_STATE_dfuERROR; ++ device->dfu_status = DFU_STATUS_errUNKNOWN; ++ break; ++ } ++ debug("new_state = %u\n", device->dfu_state); ++ break; ++ default: ++ break; ++ } ++} ++#endif /* CONFIG_USBD_DFU */ +Index: u-boot/drivers/Makefile +=================================================================== +--- u-boot.orig/drivers/Makefile ++++ u-boot/drivers/Makefile +@@ -47,7 +47,7 @@ + status_led.o sym53c8xx.o systemace.o ahci.o \ + ti_pci1410a.o tigon3.o tsec.o \ + tsi108_eth.o tsi108_i2c.o tsi108_pci.o \ +- usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ ++ usbdcore.o usbdfu.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ + videomodes.o w83c553f.o \ + ks8695eth.o \ + pcf50606.o \ +Index: u-boot/drivers/usbdcore.c +=================================================================== +--- u-boot.orig/drivers/usbdcore.c ++++ u-boot/drivers/usbdcore.c +@@ -31,6 +31,7 @@ + + #include + #include "usbdcore.h" ++#include + + #define MAX_INTERFACES 2 + +@@ -212,6 +213,10 @@ + */ + struct usb_device_descriptor *usbd_device_device_descriptor (struct usb_device_instance *device, int port) + { ++#ifdef CONFIG_USBD_DFU ++ if (device->dfu_state != DFU_STATE_appIDLE) ++ return device->dfu_dev_desc; ++#endif + return (device->device_descriptor); + } + +@@ -232,6 +237,10 @@ + if (!(configuration_instance = usbd_device_configuration_instance (device, port, configuration))) { + return NULL; + } ++#ifdef CONFIG_USBD_DFU ++ if (device->dfu_state != DFU_STATE_appIDLE) ++ return (&device->dfu_cfg_desc->ucfg); ++#endif + return (configuration_instance->configuration_descriptor); + } + +@@ -253,6 +262,13 @@ + if (!(interface_instance = usbd_device_interface_instance (device, port, configuration, interface))) { + return NULL; + } ++#ifdef CONFIG_USBD_DFU ++ if (device->dfu_state != DFU_STATE_appIDLE) { ++ if (alternate < 0 || alternate >= DFU_NUM_ALTERNATES) ++ return NULL; ++ return &device->dfu_cfg_desc->uif[alternate]; ++ } ++#endif + if ((alternate < 0) || (alternate >= interface_instance->alternates)) { + return NULL; + } +@@ -681,4 +697,7 @@ + /* usbdbg("calling device->event"); */ + device->event(device, event, data); + } ++#ifdef CONFIG_USBD_DFU ++ dfu_event(device, event, data); ++#endif + } +Index: u-boot/drivers/usbtty.c +=================================================================== +--- u-boot.orig/drivers/usbtty.c ++++ u-boot/drivers/usbtty.c +@@ -31,6 +31,8 @@ + #include "usbtty.h" + #include "usb_cdc_acm.h" + #include "usbdescriptors.h" ++#include ++#include + #include /* If defined, override Linux identifiers with + * vendor specific ones */ + +@@ -118,7 +120,7 @@ + static unsigned short rx_endpoint = 0; + static unsigned short tx_endpoint = 0; + static unsigned short interface_count = 0; +-static struct usb_string_descriptor *usbtty_string_table[STR_COUNT]; ++static struct usb_string_descriptor *usbtty_string_table[NUM_STRINGS]; + + /* USB Descriptor Strings */ + static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4}; +@@ -169,6 +171,10 @@ + struct usb_interface_descriptor data_class_interface; + struct usb_endpoint_descriptor + data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed)); ++#ifdef CONFIG_USBD_DFU ++ struct usb_interface_descriptor uif_dfu; ++ struct usb_dfu_func_descriptor func_dfu; ++#endif + } __attribute__((packed)); + + static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { +@@ -179,7 +185,11 @@ + .bDescriptorType = USB_DT_CONFIG, + .wTotalLength = + cpu_to_le16(sizeof(struct acm_config_desc)), ++#ifdef CONFIG_USBD_DFU ++ .bNumInterfaces = NUM_ACM_INTERFACES +1, ++#else + .bNumInterfaces = NUM_ACM_INTERFACES, ++#endif + .bConfigurationValue = 1, + .iConfiguration = STR_CONFIG, + .bmAttributes = +@@ -278,6 +288,11 @@ + .bInterval = 0xFF, + }, + }, ++#ifdef CONFIG_USBD_DFU ++ /* Interface 3 */ ++ .uif_dfu = DFU_RT_IF_DESC, ++ .func_dfu = DFU_FUNC_DESC, ++#endif + }, + }; + +@@ -390,7 +405,7 @@ + void usbtty_poll (void); + + /* utility function for converting char* to wide string used by USB */ +-static void str2wide (char *str, u16 * wide) ++void str2wide (char *str, u16 * wide) + { + int i; + for (i = 0; i < strlen (str) && str[i]; i++){ +@@ -652,6 +667,9 @@ + device_instance->bus = bus_instance; + device_instance->configurations = NUM_CONFIGS; + device_instance->configuration_instance_array = config_instance; ++#ifdef CONFIG_USBD_DFU ++ dfu_init_instance(device_instance); ++#endif + + /* initialize bus instance */ + memset (bus_instance, 0, sizeof (struct usb_bus_instance)); +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -167,7 +167,7 @@ + */ + #define CONFIG_STACKSIZE (128*1024) /* regular stack */ + #ifdef CONFIG_USE_IRQ +-#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ + #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ + #endif + +@@ -184,6 +184,10 @@ + #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" + #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION + #define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ ++#define CONFIG_USBD_DFU_INTERFACE 2 ++ + + /*----------------------------------------------------------------------- + * Physical Memory Map +Index: u-boot/include/usb_dfu.h +=================================================================== +--- /dev/null ++++ u-boot/include/usb_dfu.h +@@ -0,0 +1,99 @@ ++#ifndef _DFU_H ++#define _DFU_H ++ ++/* USB Device Firmware Update Implementation for u-boot ++ * (C) 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on: USB Device Firmware Update Implementation for OpenPCD ++ * (C) 2006 by Harald Welte ++ * ++ * This ought to be compliant to the USB DFU Spec 1.0 as available from ++ * http://www.usb.org/developers/devclass_docs/usbdfu10.pdf ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++ ++/* USB DFU functional descriptor */ ++#define DFU_FUNC_DESC { \ ++ .bLength = USB_DT_DFU_SIZE, \ ++ .bDescriptorType = USB_DT_DFU, \ ++ .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD | USB_DFU_MANIFEST_TOL, \ ++ .wDetachTimeOut = 0xff00, \ ++ .wTransferSize = CONFIG_USBD_DFU_XFER_SIZE, \ ++ .bcdDFUVersion = 0x0100, \ ++} ++ ++/* USB Interface descriptor in Runtime mode */ ++#define DFU_RT_IF_DESC { \ ++ .bLength = USB_DT_INTERFACE_SIZE, \ ++ .bDescriptorType = USB_DT_INTERFACE, \ ++ .bInterfaceNumber = CONFIG_USBD_DFU_INTERFACE, \ ++ .bAlternateSetting = 0x00, \ ++ .bNumEndpoints = 0x00, \ ++ .bInterfaceClass = 0xfe, \ ++ .bInterfaceSubClass = 0x01, \ ++ .bInterfaceProtocol = 0x01, \ ++ .iInterface = DFU_STR_CONFIG, \ ++} ++ ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++ ++#define DFU_NUM_ALTERNATES 6 ++ ++#define DFU_STR_MANUFACTURER STR_MANUFACTURER ++#define DFU_STR_PRODUCT STR_PRODUCT ++#define DFU_STR_SERIAL STR_SERIAL ++#define DFU_STR_CONFIG (STR_COUNT) ++#define DFU_STR_ALT0 (STR_COUNT+1) ++#define DFU_STR_ALT1 (STR_COUNT+2) ++#define DFU_STR_ALT2 (STR_COUNT+3) ++#define DFU_STR_ALT3 (STR_COUNT+4) ++#define DFU_STR_ALT4 (STR_COUNT+5) ++#define DFU_STR_ALT5 (STR_COUNT+6) ++#define DFU_STR_COUNT (STR_COUNT+7) ++ ++#define DFU_NUM_STRINGS (STR_COUNT+8) ++ ++#define CONFIG_DFU_CFG_STR "USB Device Firmware Upgrade" ++#define CONFIG_DFU_ALT0_STR "RAM 0x32000000" ++ ++struct _dfu_desc { ++ struct usb_configuration_descriptor ucfg; ++ struct usb_interface_descriptor uif[DFU_NUM_ALTERNATES]; ++ struct usb_dfu_func_descriptor func_dfu; ++}; ++ ++int dfu_init_instance(struct usb_device_instance *dev); ++ ++#define DFU_EP0_NONE 0 ++#define DFU_EP0_UNHANDLED 1 ++#define DFU_EP0_STALL 2 ++#define DFU_EP0_ZLP 3 ++#define DFU_EP0_DATA 4 ++ ++extern volatile enum dfu_state *system_dfu_state; /* for 3rd parties */ ++ ++int dfu_ep0_handler(struct urb *urb); ++ ++void dfu_event(struct usb_device_instance *device, ++ usb_device_event_t event, int data); ++ ++#endif /* _DFU_H */ +Index: u-boot/include/usb_dfu_descriptors.h +=================================================================== +--- /dev/null ++++ u-boot/include/usb_dfu_descriptors.h +@@ -0,0 +1,94 @@ ++#ifndef _USB_DFU_H ++#define _USB_DFU_H ++/* USB Device Firmware Update Implementation for OpenPCD ++ * (C) 2006 by Harald Welte ++ * ++ * Protocol definitions for USB DFU ++ * ++ * This ought to be compliant to the USB DFU Spec 1.0 as available from ++ * http://www.usb.org/developers/devclass_docs/usbdfu10.pdf ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#include ++ ++#define USB_DT_DFU 0x21 ++ ++struct usb_dfu_func_descriptor { ++ u_int8_t bLength; ++ u_int8_t bDescriptorType; ++ u_int8_t bmAttributes; ++#define USB_DFU_CAN_DOWNLOAD (1 << 0) ++#define USB_DFU_CAN_UPLOAD (1 << 1) ++#define USB_DFU_MANIFEST_TOL (1 << 2) ++#define USB_DFU_WILL_DETACH (1 << 3) ++ u_int16_t wDetachTimeOut; ++ u_int16_t wTransferSize; ++ u_int16_t bcdDFUVersion; ++} __attribute__ ((packed)); ++ ++#define USB_DT_DFU_SIZE 9 ++ ++#define USB_TYPE_DFU (USB_TYPE_CLASS|USB_RECIP_INTERFACE) ++ ++/* DFU class-specific requests (Section 3, DFU Rev 1.1) */ ++#define USB_REQ_DFU_DETACH 0x00 ++#define USB_REQ_DFU_DNLOAD 0x01 ++#define USB_REQ_DFU_UPLOAD 0x02 ++#define USB_REQ_DFU_GETSTATUS 0x03 ++#define USB_REQ_DFU_CLRSTATUS 0x04 ++#define USB_REQ_DFU_GETSTATE 0x05 ++#define USB_REQ_DFU_ABORT 0x06 ++ ++struct dfu_status { ++ u_int8_t bStatus; ++ u_int8_t bwPollTimeout[3]; ++ u_int8_t bState; ++ u_int8_t iString; ++} __attribute__((packed)); ++ ++#define DFU_STATUS_OK 0x00 ++#define DFU_STATUS_errTARGET 0x01 ++#define DFU_STATUS_errFILE 0x02 ++#define DFU_STATUS_errWRITE 0x03 ++#define DFU_STATUS_errERASE 0x04 ++#define DFU_STATUS_errCHECK_ERASED 0x05 ++#define DFU_STATUS_errPROG 0x06 ++#define DFU_STATUS_errVERIFY 0x07 ++#define DFU_STATUS_errADDRESS 0x08 ++#define DFU_STATUS_errNOTDONE 0x09 ++#define DFU_STATUS_errFIRMWARE 0x0a ++#define DFU_STATUS_errVENDOR 0x0b ++#define DFU_STATUS_errUSBR 0x0c ++#define DFU_STATUS_errPOR 0x0d ++#define DFU_STATUS_errUNKNOWN 0x0e ++#define DFU_STATUS_errSTALLEDPKT 0x0f ++ ++enum dfu_state { ++ DFU_STATE_appIDLE = 0, ++ DFU_STATE_appDETACH = 1, ++ DFU_STATE_dfuIDLE = 2, ++ DFU_STATE_dfuDNLOAD_SYNC = 3, ++ DFU_STATE_dfuDNBUSY = 4, ++ DFU_STATE_dfuDNLOAD_IDLE = 5, ++ DFU_STATE_dfuMANIFEST_SYNC = 6, ++ DFU_STATE_dfuMANIFEST = 7, ++ DFU_STATE_dfuMANIFEST_WAIT_RST = 8, ++ DFU_STATE_dfuUPLOAD_IDLE = 9, ++ DFU_STATE_dfuERROR = 10, ++}; ++ ++#endif /* _USB_DFU_H */ +Index: u-boot/include/usbdcore.h +=================================================================== +--- u-boot.orig/include/usbdcore.h ++++ u-boot/include/usbdcore.h +@@ -33,6 +33,7 @@ + + #include + #include "usbdescriptors.h" ++#include + + + #define MAX_URBS_QUEUED 5 +@@ -475,7 +476,11 @@ + * function driver to inform it that data has arrived. + */ + ++#ifdef CONFIG_USBD_DFU ++#define URB_BUF_SIZE (128+CONFIG_USBD_DFU_XFER_SIZE) ++#else + #define URB_BUF_SIZE 128 /* in linux we'd malloc this, but in u-boot we prefer static data */ ++#endif + struct urb { + + struct usb_endpoint_instance *endpoint; +@@ -603,6 +608,12 @@ + unsigned long usbd_rxtx_timestamp; + unsigned long usbd_last_rxtx_timestamp; + ++#ifdef CONFIG_USBD_DFU ++ const struct usb_device_descriptor *dfu_dev_desc; ++ const struct _dfu_desc *dfu_cfg_desc; ++ enum dfu_state dfu_state; ++ u_int8_t dfu_status; ++#endif + }; + + /* Bus Interface configuration structure +@@ -632,6 +643,8 @@ + extern char *usbd_device_requests[]; + extern char *usbd_device_descriptors[]; + ++extern struct usb_string_descriptor **usb_strings; ++ + void urb_link_init (urb_link * ul); + void urb_detach (struct urb *urb); + urb_link *first_urb_link (urb_link * hd); +Index: u-boot/drivers/usbtty.h +=================================================================== +--- u-boot.orig/drivers/usbtty.h ++++ u-boot/drivers/usbtty.h +@@ -71,4 +71,10 @@ + #define STR_CTRL_INTERFACE 0x06 + #define STR_COUNT 0x07 + ++#ifdef CONFIG_USBD_DFU ++#define NUM_STRINGS DFU_STR_COUNT ++#else ++#define NUM_STRINGS STR_COUNT ++#endif ++ + #endif +Index: u-boot/include/configs/qt2410.h +=================================================================== +--- u-boot.orig/include/configs/qt2410.h ++++ u-boot/include/configs/qt2410.h +@@ -199,7 +199,8 @@ + #define CONFIG_USBD_PRODUCT_NAME "QT2410 Bootloader " U_BOOT_VERSION + #define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" + #define CONFIG_USBD_DFU 1 +-#define CONFIG_USBD_DFU_XFER_SIZE 0x4000 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 ++#define CONFIG_USBD_DFU_INTERFACE 2 + + /*----------------------------------------------------------------------- + * Physical Memory Map +Index: u-boot/tools/Makefile +=================================================================== +--- u-boot.orig/tools/Makefile ++++ u-boot/tools/Makefile +@@ -21,10 +21,10 @@ + # MA 02111-1307 USA + # + +-BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX) ++BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX) mkudfu$(SFX) + + OBJ_LINKS = environment.o crc32.o +-OBJ_FILES = img2srec.o mkimage.o envcrc.o gen_eth_addr.o bmp_logo.o ++OBJ_FILES = img2srec.o mkimage.o envcrc.o gen_eth_addr.o bmp_logo.o mkudfu.o + + ifeq ($(ARCH),mips) + BIN_FILES += inca-swap-bytes$(SFX) +@@ -137,6 +137,10 @@ + $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ + $(STRIP) $@ + ++$(obj)mkudfu$(SFX): $(obj)mkudfu.o ++ $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ ++ $(STRIP) $@ ++ + $(obj)ncb$(SFX): $(obj)ncb.o + $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ + $(STRIP) $@ +Index: u-boot/tools/mkudfu.c +=================================================================== +--- /dev/null ++++ u-boot/tools/mkudfu.c +@@ -0,0 +1,314 @@ ++/* ++ * USB DFU file trailer tool ++ * (C) Copyright by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on mkimage.c, copyright information as follows: ++ * ++ * (C) Copyright 2000-2004 ++ * DENX Software Engineering ++ * Wolfgang Denk, wd@denx.de ++ * All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#ifndef __WIN32__ ++#include /* for host / network byte order conversions */ ++#endif ++#include ++#include ++#include ++#include ++ ++#if defined(__BEOS__) || defined(__NetBSD__) || defined(__APPLE__) ++#include ++#endif ++ ++#ifdef __WIN32__ ++typedef unsigned int __u32; ++ ++#define SWAP_LONG(x) \ ++ ((__u32)( \ ++ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ ++ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ ++ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ ++ (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) ++typedef unsigned char uint8_t; ++typedef unsigned short uint16_t; ++typedef unsigned int uint32_t; ++ ++#define ntohl(a) SWAP_LONG(a) ++#define htonl(a) SWAP_LONG(a) ++#endif /* __WIN32__ */ ++ ++#ifndef O_BINARY /* should be define'd on __WIN32__ */ ++#define O_BINARY 0 ++#endif ++ ++#include ++ ++extern int errno; ++ ++#ifndef MAP_FAILED ++#define MAP_FAILED (-1) ++#endif ++ ++static char *cmdname; ++ ++static char *datafile; ++static char *imagefile; ++ ++ ++static void usage() ++{ ++ fprintf (stderr, "%s - create / display u-boot DFU trailer\n", cmdname); ++ fprintf (stderr, "Usage: %s -l image\n" ++ " -l ==> list image header information\n" ++ " %s -v VID -p PID -r REV -d data_file image\n", ++ cmdname, cmdname); ++ fprintf (stderr, " -v ==> set vendor ID to 'VID'\n" ++ " -p ==> set product ID system to 'PID'\n" ++ " -r ==> set hardware revision to 'REV'\n" ++ " -d ==> use 'data_file' as input file\n" ++ ); ++ exit (EXIT_FAILURE); ++} ++ ++static void print_trailer(struct uboot_dfu_trailer *trailer) ++{ ++ printf("===> DFU Trailer information:\n"); ++ printf("Trailer Vers.: %d\n", trailer->version); ++ printf("Trailer Length: %d\n", trailer->length); ++ printf("VendorID: 0x%04x\n", trailer->vendor); ++ printf("ProductID: 0x%04x\n", trailer->product); ++ printf("HW Revision: 0x%04x\n", trailer->revision); ++} ++ ++static void copy_file (int ifd, const char *datafile, int pad) ++{ ++ int dfd; ++ struct stat sbuf; ++ unsigned char *ptr; ++ int tail; ++ int zero = 0; ++ int offset = 0; ++ int size; ++ ++ if ((dfd = open(datafile, O_RDONLY|O_BINARY)) < 0) { ++ fprintf (stderr, "%s: Can't open %s: %s\n", ++ cmdname, datafile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ if (fstat(dfd, &sbuf) < 0) { ++ fprintf (stderr, "%s: Can't stat %s: %s\n", ++ cmdname, datafile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ ptr = (unsigned char *)mmap(0, sbuf.st_size, ++ PROT_READ, MAP_SHARED, dfd, 0); ++ if (ptr == (unsigned char *)MAP_FAILED) { ++ fprintf (stderr, "%s: Can't read %s: %s\n", ++ cmdname, datafile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ size = sbuf.st_size - offset; ++ if (write(ifd, ptr + offset, size) != size) { ++ fprintf (stderr, "%s: Write error on %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ if (pad && ((tail = size % 4) != 0)) { ++ ++ if (write(ifd, (char *)&zero, 4-tail) != 4-tail) { ++ fprintf (stderr, "%s: Write error on %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ } ++ ++ (void) munmap((void *)ptr, sbuf.st_size); ++ (void) close (dfd); ++} ++ ++ ++int main(int argc, char **argv) ++{ ++ int ifd; ++ int lflag = 0; ++ struct stat sbuf; ++ u_int16_t opt_vendor, opt_product, opt_revision; ++ struct uboot_dfu_trailer _hdr, _mirror, *hdr = &_hdr; ++ ++ opt_vendor = opt_product = opt_revision = 0; ++ ++ cmdname = *argv; ++ ++ while (--argc > 0 && **++argv == '-') { ++ while (*++*argv) { ++ switch (**argv) { ++ case 'l': ++ lflag = 1; ++ break; ++ case 'v': ++ if (--argc <= 0) ++ usage (); ++ opt_vendor = strtoul(*++argv, NULL, 16); ++ goto NXTARG; ++ case 'p': ++ if (--argc <= 0) ++ usage (); ++ opt_product = strtoul(*++argv, NULL, 16); ++ goto NXTARG; ++ case 'r': ++ if (--argc <= 0) ++ usage (); ++ opt_revision = strtoul(*++argv, NULL, 16); ++ goto NXTARG; ++ case 'd': ++ if (--argc <= 0) ++ usage (); ++ datafile = *++argv; ++ goto NXTARG; ++ case 'h': ++ usage(); ++ break; ++ default: ++ usage(); ++ } ++ } ++NXTARG: ; ++ } ++ ++ if (argc != 1) ++ usage(); ++ ++ imagefile = *argv; ++ ++ if (lflag) ++ ifd = open(imagefile, O_RDONLY|O_BINARY); ++ else ++ ifd = open(imagefile, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0666); ++ ++ if (ifd < 0) { ++ fprintf (stderr, "%s: Can't open %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ if (lflag) { ++ unsigned char *ptr; ++ /* list header information of existing image */ ++ if (fstat(ifd, &sbuf) < 0) { ++ fprintf (stderr, "%s: Can't stat %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ if ((unsigned)sbuf.st_size < sizeof(struct uboot_dfu_trailer)) { ++ fprintf (stderr, ++ "%s: Bad size: \"%s\" is no valid image\n", ++ cmdname, imagefile); ++ exit (EXIT_FAILURE); ++ } ++ ++ ptr = (unsigned char *)mmap(0, sbuf.st_size, ++ PROT_READ, MAP_SHARED, ifd, 0); ++ if ((caddr_t)ptr == (caddr_t)-1) { ++ fprintf (stderr, "%s: Can't read %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ dfu_trailer_mirror(hdr, ptr+sbuf.st_size); ++ ++ if (hdr->magic != UBOOT_DFU_TRAILER_MAGIC) { ++ fprintf (stderr, ++ "%s: Bad Magic Number: \"%s\" is no valid image\n", ++ cmdname, imagefile); ++ exit (EXIT_FAILURE); ++ } ++ ++ /* for multi-file images we need the data part, too */ ++ print_trailer(hdr); ++ ++ (void) munmap((void *)ptr, sbuf.st_size); ++ (void) close (ifd); ++ ++ exit (EXIT_SUCCESS); ++ } ++ ++ /* if we're not listing: */ ++ ++ copy_file (ifd, datafile, 0); ++ ++ memset (hdr, 0, sizeof(struct uboot_dfu_trailer)); ++ ++ /* Build new header */ ++ hdr->version = UBOOT_DFU_TRAILER_V1; ++ hdr->magic = UBOOT_DFU_TRAILER_MAGIC; ++ hdr->length = sizeof(struct uboot_dfu_trailer); ++ hdr->vendor = opt_vendor; ++ hdr->product = opt_product; ++ hdr->revision = opt_revision; ++ ++ print_trailer(hdr); ++ dfu_trailer_mirror(&_mirror, (unsigned char *)hdr+sizeof(*hdr)); ++ ++ if (write(ifd, &_mirror, sizeof(struct uboot_dfu_trailer)) ++ != sizeof(struct uboot_dfu_trailer)) { ++ fprintf (stderr, "%s: Write error on %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ /* We're a bit of paranoid */ ++#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) ++ (void) fdatasync (ifd); ++#else ++ (void) fsync (ifd); ++#endif ++ ++ if (fstat(ifd, &sbuf) < 0) { ++ fprintf (stderr, "%s: Can't stat %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ /* We're a bit of paranoid */ ++#if defined(_POSIX_SYNCHRONIZED_IO) && !defined(__sun__) && !defined(__FreeBSD__) ++ (void) fdatasync (ifd); ++#else ++ (void) fsync (ifd); ++#endif ++ ++ if (close(ifd)) { ++ fprintf (stderr, "%s: Write error on %s: %s\n", ++ cmdname, imagefile, strerror(errno)); ++ exit (EXIT_FAILURE); ++ } ++ ++ exit (EXIT_SUCCESS); ++} +Index: u-boot/include/usb_dfu_trailer.h +=================================================================== +--- /dev/null ++++ u-boot/include/usb_dfu_trailer.h +@@ -0,0 +1,31 @@ ++#ifndef _USB_DFU_TRAILER_H ++#define _USB_DFU_TRAILER_H ++ ++/* trailer handling for DFU files */ ++ ++#define UBOOT_DFU_TRAILER_V1 1 ++#define UBOOT_DFU_TRAILER_MAGIC 0x19731978 ++struct uboot_dfu_trailer { ++ u_int32_t magic; ++ u_int16_t version; ++ u_int16_t length; ++ u_int16_t vendor; ++ u_int16_t product; ++ u_int32_t revision; ++} __attribute__((packed)); ++ ++/* we mirror the trailer because we want it to be longer in later versions ++ * while keeping backwards compatibility */ ++static inline void dfu_trailer_mirror(struct uboot_dfu_trailer *trailer, ++ unsigned char *eof) ++{ ++ int i; ++ int len = sizeof(struct uboot_dfu_trailer); ++ unsigned char *src = eof - len; ++ unsigned char *dst = (unsigned char *) trailer; ++ ++ for (i = 0; i < len; i++) ++ dst[len-1-i] = src[i]; ++} ++ ++#endif /* _USB_DFU_TRAILER_H */ +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -261,6 +261,12 @@ + $(obj)u-boot.bin: $(obj)u-boot + $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ + ++$(obj)u-boot.udfu: $(obj)u-boot.bin ++ ./tools/mkudfu -v $(CONFIG_USB_DFU_VENDOR) \ ++ -p $(CONFIG_USB_DFU_PRODUCT) \ ++ -r $(CONFIG_USB_DFU_REVISION) \ ++ -d $< $@ ++ + $(obj)u-boot.img: $(obj)u-boot.bin + ./tools/mkimage -A $(ARCH) -T firmware -C none \ + -a $(TEXT_BASE) -e 0 \ +Index: u-boot/board/neo1973/gta01/split_by_variant.sh +=================================================================== +--- u-boot.orig/board/neo1973/gta01/split_by_variant.sh ++++ u-boot/board/neo1973/gta01/split_by_variant.sh +@@ -15,37 +15,44 @@ + echo "$0:: No parameters - using GTA01Bv3 config" + echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC + echo "GTA01_BIG_RAM=y" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0230" > $CFGTMP + else + case "$1" in + gta01v4_config) + echo "#define CONFIG_ARCH_GTA01_v4" > $CFGINC + echo "GTA01_BIG_RAM=n" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0140" > $CFGTMP + ;; + + gta01v3_config) + echo "#define CONFIG_ARCH_GTA01_v3" > $CFGINC + echo "GTA01_BIG_RAM=n" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0130" > $CFGTMP + ;; + + gta01bv2_config) + echo "#define CONFIG_ARCH_GTA01B_v2" > $CFGINC + echo "GTA01_BIG_RAM=y" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0220" > $CFGTMP + ;; + + gta01bv3_config) + echo "#define CONFIG_ARCH_GTA01B_v3" > $CFGINC + echo "GTA01_BIG_RAM=y" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0230" > $CFGTMP + ;; + + gta01bv4_config) + echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC + echo "GTA01_BIG_RAM=y" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0240" > $CFGTMP + ;; + + *) + echo "$0:: Unrecognised config - using GTA01Bv4 config" + echo "#define CONFIG_ARCH_GTA01B_v4" > $CFGINC + echo "GTA01_BIG_RAM=y" > $CFGTMP ++ echo "CONFIG_USB_DFU_REVISION=0x0240" > $CFGTMP + ;; + + esac +Index: u-boot/board/neo1973/gta01/config.mk +=================================================================== +--- u-boot.orig/board/neo1973/gta01/config.mk ++++ u-boot/board/neo1973/gta01/config.mk +@@ -24,6 +24,9 @@ + # + # download area is 3200'0000 or 3300'0000 + ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x5119 ++ + sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + + ifeq ($(GTA01_BIG_RAM),y) diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch new file mode 100644 index 0000000000..ca54ebeff7 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch @@ -0,0 +1,1560 @@ +Add support for new GTA02 version of Neo1973 + +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2038,6 +2038,10 @@ + sbc2410x_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 + ++gta02_config \ ++gta02v1_config : unconfig ++ @sh board/neo1973/gta02/split_by_variant.sh $@ ++ + gta01_config \ + gta01v3_config \ + gta01bv2_config \ +Index: u-boot/board/neo1973/gta02/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/Makefile +@@ -0,0 +1,64 @@ ++# ++# (C) Copyright 2000, 2001, 2002 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = lib$(BOARD).a ++ ++OBJS := gta02.o pcf50633.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o ../common/bootmenu.o ++SOBJS := ../common/lowlevel_init.o ++ ++.PHONY: all ++ ++all: $(LIB) lowevel_foo.bin ++ ++$(LIB): $(OBJS) $(SOBJS) ++ $(AR) crv $@ $(OBJS) $(SOBJS) ++ ++lowlevel_foo.o: ../common/lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o ../common/lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o ../common/lowlevel_init.o ../common/lowlevel_foo.lds ++ $(LD) -T ../common/lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ ../common/lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin ++ ++######################################################################### ++ ++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) ++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ ++ ++-include .depend ++ ++######################################################################### +Index: u-boot/board/neo1973/gta02/gta02.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/gta02.c +@@ -0,0 +1,313 @@ ++/* ++ * (C) 2006-2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on existing S3C2410 startup code in u-boot: ++ * ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++#include ++ ++#include "../common/neo1973.h" ++#include "../common/jbt6k74.h" ++ ++#include "pcf50633.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++/* That many seconds the power key needs to be pressed to power up */ ++#define POWER_KEY_SECONDS 2 ++ ++#define M_MDIV 0x7f /* Fout = 405.00MHz */ ++#define M_PDIV 0x2 ++#define M_SDIV 0x1 ++ ++#define U_M_MDIV 0x38 ++#define U_M_PDIV 0x2 ++#define U_M_SDIV 0x2 ++ ++unsigned int neo1973_wakeup_cause; ++extern int nobootdelay; ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++#if defined(CONFIG_ARCH_GTA02_v1) ++ gpio->GPACON = 0x007E1FFF; ++ gpio->GPADAT |= (1 << 16); /* Set GPA16 to high (nNAND_WP) */ ++ ++ gpio->GPBCON = 0x00155555; ++ gpio->GPBUP = 0x000007FF; ++ ++ gpio->GPCCON = 0x55551155; ++ gpio->GPCUP = 0x0000FFFF; ++ ++ gpio->GPDCON = 0x55555555; ++ gpio->GPDUP = 0x0000FFFF; ++ ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ ++ gpio->GPFCON = 0x0000AAAA; ++ gpio->GPFUP = 0x000000FF; ++ ++ gpio->GPGCON = 0x013DFDFA; ++ gpio->GPGUP = 0x0000FFFF; ++ ++ gpio->GPHCON = 0x0028AAAA; ++ gpio->GPHUP = 0x000007FF; ++ ++ gpio->GPJCON = 0x1545541; ++#else ++#error Please define GTA02 version ++#endif ++ ++ /* arch number of SMDK2410-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_NEO1973_GTA02; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++int board_late_init(void) ++{ ++ extern unsigned char booted_from_nand; ++ unsigned char tmp; ++ char buf[32]; ++ int menu_vote = 0; /* <= 0: no, > 0: yes */ ++ int seconds = 0; ++ ++ /* Initialize the Power Management Unit with a safe register set */ ++ pcf50633_init(); ++#if 0 ++ /* if there's no other reason, must be regular reset */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; ++ ++ if (!booted_from_nand) ++ goto woken_by_reset; ++ ++ /* obtain wake-up reason, save INT1 in environment */ ++ tmp = pcf50606_reg_read(PCF50606_REG_INT1); ++ sprintf(buf, "0x%02x", tmp); ++ setenv("pcf50606_int1", buf); ++ ++ if (tmp & PCF50606_INT1_ALARM) { ++ /* we've been woken up by RTC alarm, boot */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_ALARM; ++ goto continue_boot; ++ } ++ if (tmp & PCF50606_INT1_EXTONR) { ++ /* we've been woken up by charger insert */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_CHARGER; ++ } ++ ++ if (tmp & PCF50606_INT1_ONKEYF) { ++ /* we've been woken up by a falling edge of the onkey */ ++ neo1973_wakeup_cause = NEO1973_WAKEUP_POWER_KEY; ++ } ++ ++ if (neo1973_wakeup_cause == NEO1973_WAKEUP_CHARGER) { ++ /* if we still think it was only a charger insert, boot */ ++ goto continue_boot; ++ } ++ ++woken_by_reset: ++ ++ while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET || ++ neo1973_on_key_pressed()) { ++ if (neo1973_aux_key_pressed()) ++ menu_vote++; ++ else ++ menu_vote--; ++ ++ if (neo1973_new_second()) ++ seconds++; ++ if (seconds >= POWER_KEY_SECONDS) ++ goto continue_boot; ++ } ++ /* Power off if minimum number of seconds not reached */ ++ neo1973_poweroff(); ++ ++continue_boot: ++ jbt6k74_init(); ++ jbt6k74_enter_state(JBT_STATE_NORMAL); ++ jbt6k74_display_onoff(1); ++#endif ++ ++ /* issue a short pulse with the vibrator */ ++ neo1973_vibrator(1); ++ udelay(50000); ++ neo1973_vibrator(0); ++ ++ /* switch on the backlight */ ++ neo1973_backlight(1); ++ ++#if 0 ++ { ++ /* check if sd card is inserted, and power-up if it is */ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (!(gpio->GPFDAT & (1 << 5))) ++ gpio->GPBDAT &= ~(1 << 2); ++ } ++ ++ if (menu_vote > 0) { ++ bootmenu(); ++ nobootdelay = 1; ++ } ++#endif ++ ++ return 0; ++} ++ ++int dram_init (void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++u_int32_t get_board_rev(void) ++{ ++#if defined(CONFIG_ARCH_GTA02_v1) ++ return 0x00000310; ++#endif ++} ++ ++void neo1973_poweroff(void) ++{ ++ printf("poweroff\n"); ++ udc_disconnect(); ++ pcf50633_reg_write(PCF50633_REG_OOCSHDWN, 0x01); ++ /* don't return to caller */ ++ while (1) ; ++} ++ ++void neo1973_backlight(int on) ++{ ++ /* FIXME: PMU based implementation */ ++} ++ ++/* FIXME: shared */ ++void neo1973_vibrator(int on) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (on) ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ gpio->GPGDAT |= (1 << 11); /* GPG11 */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ gpio->GPBDAT |= (1 << 10); /* GPB10 */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) ++ gpio->GPBDAT |= (1 << 3); /* GPB3 */ ++#endif ++ else ++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) ++ gpio->GPGDAT &= ~(1 << 11); /* GPG11 */ ++#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) ++ gpio->GPBDAT &= ~(1 << 10); /* GPB10 */ ++#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) ++ gpio->GPBDAT &= ~(1 << 3); /* GPB3 */ ++#endif ++} ++ ++int neo1973_new_second(void) ++{ ++ return pcf50633_reg_read(PCF50633_REG_INT1) & PCF50633_INT1_SECOND; ++} ++ ++int neo1973_on_key_pressed(void) ++{ ++ return !(pcf50633_reg_read(PCF50633_REG_OOCSTAT) ++ & PCF50633_OOCSTAT_ONKEY); ++} ++ ++/* FIXME: shared */ ++int neo1973_aux_key_pressed(void) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ if (gpio->GPFDAT & (1 << 6)) ++ return 0; ++ return 1; ++} ++ ++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. ++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 ++ images: 640*480*2*2 = 1228800 < 1245184. */ ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, CFG_ENV_SIZE, 0x200000, 0xa0000, 0x1fce0000, 0 }; ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ ++ ++const char *neo1973_get_charge_status(void) ++{ ++ /* FIXME */ ++ return "unknown"; ++} ++ ++int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd) ++{ ++ /* FIXME */ ++ return 0; ++} +Index: u-boot/board/neo1973/gta02/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/include/configs/neo1973_gta02.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/neo1973_gta02.h +@@ -0,0 +1,276 @@ ++/* ++ * (C) Copyright 2007 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * Configuation settings for the FIC Neo1973 GTA02 Linux GSM phone ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++/* we want to be able to start u-boot directly from within NAND flash */ ++#define CONFIG_LL_INIT_NAND_ONLY ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++ ++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2410 SoC */ ++#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2410 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 12000000/* the GTA02 has this input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024) ++ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL3 1 /* we use SERIAL 1 on GTA01 */ ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS (\ ++ CFG_CMD_BDI | \ ++ CFG_CMD_LOADS | \ ++ CFG_CMD_LAODB | \ ++ CFG_CMD_IMI | \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_MEMORY | \ ++ CFG_CMD_ENV | \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_BOOTD | \ ++ CFG_CMD_CONSOLE | \ ++ /* CFG_CMD_BMP | */ \ ++ CFG_CMD_ASKENV | \ ++ CFG_CMD_RUN | \ ++ CFG_CMD_ECHO | \ ++ CFG_CMD_I2C | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_IMMAP | \ ++ CFG_CMD_DATE | \ ++ CFG_CMD_AUTOSCRIPT | \ ++ CFG_CMD_BSP | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_MISC | \ ++ /* CFG_CMD_USB | */ \ ++ CFG_CMD_JFFS2 | \ ++ CFG_CMD_DIAG | \ ++ /* CFG_CMD_HWFLOW | */ \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_FAT | \ ++ CFG_CMD_EXT2 | \ ++ 0) ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "" ++#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#if defined(CONFIG_ARCH_GTA02_v1) ++#define CFG_PROMPT "GTA02v1 # " /* Monitor Command Prompt */ ++#endif ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 64 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x33000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++#define CFG_BOOTMENU ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (128*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++#if 0 ++#define CONFIG_USB_OHCI 1 ++#endif ++ ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" ++#define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ ++#define CONFIG_USBD_DFU_INTERFACE 2 ++ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ "usbtty=cdc_acm\0" \ ++ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8\0" \ ++ "" ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ ++#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++/* No NOR flash in this device */ ++#define CFG_NO_FLASH 1 ++ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_SIZE 0x40000 /* 128k Total Size of Environment Sector */ ++#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ ++#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ ++ ++#define NAND_MAX_CHIPS 1 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE 1 ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++/* EXT2 driver */ ++#define CONFIG_EXT2 1 ++ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 1 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++#define CONFIG_REVISION_TAG 1 ++#if 0 ++#define CONFIG_SERIAL_TAG 1 ++#endif ++ ++#define CONFIG_DRIVER_S3C24X0_I2C 1 ++#define CONFIG_HARD_I2C 1 ++#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50633 data sheet */ ++#define CFG_I2C_SLAVE 0x7f ++ ++/* we have a board_late_init() function */ ++#define BOARD_LATE_INIT 1 ++ ++#if 0 ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_SPLASH_SCREEN ++#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ ++#define CONFIG_VIDEO_BMP_GZIP ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++#define CONFIG_UNZIP ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++#endif ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++//#define CONFIG_S3C2410_NAND_HWECC 1 ++ ++#define CONFIG_DRIVER_PCF50633 1 ++ ++#define MTDIDS_DEFAULT "nand0=neo1973-nand" ++#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),128k(u-boot_env),2M(kernel),640k(splash),-(jffs2)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand" ++#define CONFIG_NAND_DYNPART ++ ++#endif /* __CONFIG_H */ +Index: u-boot/board/neo1973/gta02/split_by_variant.sh +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/split_by_variant.sh +@@ -0,0 +1,37 @@ ++#!/bin/sh ++# --------------------------------------------------------- ++# Set the core module defines according to Core Module ++# --------------------------------------------------------- ++# --------------------------------------------------------- ++# Set up the GTA01 type define ++# --------------------------------------------------------- ++ ++CFGINC=${obj}include/config.h ++CFGTMP=${obj}board/neo1973/gta02/config.tmp ++ ++mkdir -p ${obj}include ++if [ "$1" == "" ] ++then ++ echo "$0:: No parameters - using GTA02Bv1 config" ++ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC ++ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP ++else ++ case "$1" in ++ gta02v1_config) ++ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC ++ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP ++ ;; ++ ++ *) ++ echo "$0:: Unrecognised config - using GTA02v1 config" ++ echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC ++ echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP ++ ;; ++ ++ esac ++ ++fi ++# --------------------------------------------------------- ++# Complete the configuration ++# --------------------------------------------------------- ++$MKCONFIG -a neo1973_gta02 arm arm920t gta02 neo1973 s3c24x0 +Index: u-boot/include/pcf50633.h +=================================================================== +--- /dev/null ++++ u-boot/include/pcf50633.h +@@ -0,0 +1,235 @@ ++#ifndef _PCF50633_H ++#define _PCF50633_H ++ ++/* Philips PCF50633 Power Managemnt Unit (PMU) driver ++ * (C) 2006-2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ */ ++ ++enum pfc50633_regs { ++ PCF50633_REG_VERSION = 0x00, ++ PCF50633_REG_VARIANT = 0x01, ++ PCF50633_REG_INT1 = 0x02, /* Interrupt Status */ ++ PCF50633_REG_INT2 = 0x03, /* Interrupt Status */ ++ PCF50633_REG_INT3 = 0x04, /* Interrupt Status */ ++ PCF50633_REG_INT4 = 0x05, /* Interrupt Status */ ++ PCF50633_REG_INT5 = 0x06, /* Interrupt Status */ ++ PCF50633_REG_INT1M = 0x07, /* Interrupt Mask */ ++ PCF50633_REG_INT2M = 0x08, /* Interrupt Mask */ ++ PCF50633_REG_INT3M = 0x09, /* Interrupt Mask */ ++ PCF50633_REG_INT4M = 0x0a, /* Interrupt Mask */ ++ PCF50633_REG_INT5M = 0x0b, /* Interrupt Mask */ ++ PCF50633_REG_OOCSHDWN = 0x0c, ++ PCF50633_REG_OOCWAKE = 0x0d, ++ PCF50633_REG_OOCTIM1 = 0x0e, ++ PCF50633_REG_OOCTIM2 = 0x0f, ++ PCF50633_REG_OOCMODE = 0x10, ++ PCF50633_REG_OOCCTL = 0x11, ++ PCF50633_REG_OOCSTAT = 0x12, ++ PCF50633_REG_GPIOCTL = 0x13, ++ PCF50633_REG_GPIO1CFG = 0x14, ++ PCF50633_REG_GPIO2CFG = 0x15, ++ PCF50633_REG_GPIO3CFG = 0x16, ++ PCF50633_REG_GPOCFG = 0x17, ++ PCF50633_REG_BVMCTL = 0x18, ++ PCF50633_REG_SVMCTL = 0x19, ++ PCF50633_REG_AUTOOUT = 0x1a, ++ PCF50633_REG_AUTOENA = 0x1b, ++ PCF50633_REG_AUTOCTL = 0x1c, ++ PCF50633_REG_AUTOMXC = 0x1d, ++ PCF50633_REG_DOWN1OUT = 0x1e, ++ PCF50633_REG_DOWN1ENA = 0x1f, ++ PCF50633_REG_DOWN1CTL = 0x20, ++ PCF50633_REG_DOWN1MXC = 0x21, ++ PCF50633_REG_DOWN2OUT = 0x22, ++ PCF50633_REG_DOWN2ENA = 0x23, ++ PCF50633_REG_DOWN2CTL = 0x24, ++ PCF50633_REG_DOWN2MXC = 0x25, ++ PCF50633_REG_MEMLDOOUT = 0x26, ++ PCF50633_REG_MEMLDOENA = 0x27, ++ PCF50633_REG_LEDOUT = 0x28, ++ PCF50633_REG_LEDENA = 0x29, ++ PCF50633_REG_LEDCTL = 0x2a, ++ PCF50633_REG_LEDDIM = 0x2b, ++ /* reserved */ ++ PCF50633_REG_LDO1OUT = 0x2d, ++ PCF50633_REG_LDO1ENA = 0x2e, ++ PCF50633_REG_LDO2OUT = 0x2f, ++ PCF50633_REG_LDO2ENA = 0x30, ++ PCF50633_REG_LDO3OUT = 0x31, ++ PCF50633_REG_LDO3ENA = 0x32, ++ PCF50633_REG_LDO4OUT = 0x33, ++ PCF50633_REG_LDO4ENA = 0x34, ++ PCF50633_REG_LDO5OUT = 0x35, ++ PCF50633_REG_LDO5ENA = 0x36, ++ PCF50633_REG_LDO6OUT = 0x37, ++ PCF50633_REG_LDO6ENA = 0x38, ++ PCF50633_REG_HCLDOOUT = 0x39, ++ PCF50633_REG_HCLDOENA = 0x3a, ++ PCF50633_REG_STBYCTL1 = 0x3b, ++ PCF50633_REG_STBYCTL2 = 0x3c, ++ PCF50633_REG_DEBPF1 = 0x3d, ++ PCF50633_REG_DEBPF2 = 0x3e, ++ PCF50633_REG_DEBPF3 = 0x3f, ++ PCF50633_REG_HCLDOOVL = 0x40, ++ PCF50633_REG_DCDCSTAT = 0x41, ++ PCF50633_REG_LDOSTAT = 0x42, ++ PCF50633_REG_MBCC1 = 0x43, ++ PCF50633_REG_MBCC2 = 0x44, ++ PCF50633_REG_MBCC3 = 0x45, ++ PCF50633_REG_MBCC4 = 0x46, ++ PCF50633_REG_MBCC5 = 0x47, ++ PCF50633_REG_MBCC6 = 0x48, ++ PCF50633_REG_MBCC7 = 0x49, ++ PCF50633_REG_MBCC8 = 0x4a, ++ PCF50633_REG_MBCS1 = 0x4b, ++ PCF50633_REG_MBCS2 = 0x4c, ++ PCF50633_REG_MBCS3 = 0x4d, ++ PCF50633_REG_BBCCTL = 0x4e, ++ PCF50633_REG_ALMGAIN = 0x4f, ++ PCF50633_REG_ALMDATA = 0x50, ++ /* reserved */ ++ PCF50633_REG_ADCC3 = 0x52, ++ PCF50633_REG_ADCC2 = 0x53, ++ PCF50633_REG_ADCC1 = 0x54, ++ PCF50633_REG_ADCS1 = 0x55, ++ PCF50633_REG_ADCS2 = 0x56, ++ PCF50633_REG_ADCS3 = 0x57, ++ /* reserved */ ++ PCF50633_REG_RTCSC = 0x59, /* Second */ ++ PCF50633_REG_RTCMN = 0x5a, /* Minute */ ++ PCF50633_REG_RTCHR = 0x5b, /* Hour */ ++ PCF50633_REG_RTCWD = 0x5c, /* Weekday */ ++ PCF50633_REG_RTCDT = 0x5d, /* Day */ ++ PCF50633_REG_RTCMT = 0x5e, /* Month */ ++ PCF50633_REG_RTCYR = 0x5f, /* Year */ ++ PCF50633_REG_RTCSCA = 0x60, /* Alarm Second */ ++ PCF50633_REG_RTCMNA = 0x61, /* Alarm Minute */ ++ PCF50633_REG_RTCHRA = 0x62, /* Alarm Hour */ ++ PCF50633_REG_RTCWDA = 0x63, /* Alarm Weekday */ ++ PCF50633_REG_RTCDTA = 0x64, /* Alarm Day */ ++ PCF50633_REG_RTCMTA = 0x65, /* Alarm Month */ ++ PCF50633_REG_RTCYRA = 0x66, /* Alarm Year */ ++ ++ PCF50633_REG_MEMBYTE0 = 0x67, ++ PCF50633_REG_MEMBYTE1 = 0x68, ++ PCF50633_REG_MEMBYTE2 = 0x69, ++ PCF50633_REG_MEMBYTE3 = 0x6a, ++ PCF50633_REG_MEMBYTE4 = 0x6b, ++ PCF50633_REG_MEMBYTE5 = 0x6c, ++ PCF50633_REG_MEMBYTE6 = 0x6d, ++ PCF50633_REG_MEMBYTE7 = 0x6e, ++ /* reserved */ ++ PCF50633_REG_DCDCPFM = 0x84, ++ __NUM_PCF50633_REGS ++}; ++ ++enum pcf50633_reg_int1 { ++ PCF50633_INT1_ADPINS = 0x01, /* Adapter inserted */ ++ PCF50633_INT1_ADPREM = 0x02, /* Adapter removed */ ++ PCF50633_INT1_USBINS = 0x04, /* USB inserted */ ++ PCF50633_INT1_USBREM = 0x08, /* USB removed */ ++ /* reserved */ ++ PCF50633_INT1_ALARM = 0x40, /* RTC alarm time is reached */ ++ PCF50633_INT1_SECOND = 0x80, /* RTC periodic second interrupt */ ++}; ++ ++enum pcf50633_reg_int2 { ++ PCF50633_INT2_ONKEYR = 0x01, /* ONKEY rising edge */ ++ PCF50633_INT2_ONKEYF = 0x02, /* ONKEY falling edge */ ++ PCF50633_INT2_EXTON1R = 0x04, /* EXTON1 rising edge */ ++ PCF50633_INT2_EXTON1F = 0x08, /* EXTON1 falling edge */ ++ PCF50633_INT2_EXTON2R = 0x10, /* EXTON2 rising edge */ ++ PCF50633_INT2_EXTON2F = 0x20, /* EXTON2 falling edge */ ++ PCF50633_INT2_EXTON3R = 0x40, /* EXTON3 rising edge */ ++ PCF50633_INT2_EXTON3F = 0x80, /* EXTON3 falling edge */ ++}; ++ ++enum pcf50633_reg_int3 { ++ PCF50633_INT3_BATFULL = 0x01, /* Battery full */ ++ PCF50633_INT3_CHGHALT = 0x02, /* Charger halt */ ++ PCF50633_INT3_THLIMON = 0x04, ++ PCF50633_INT3_THLIMOFF = 0x08, ++ PCF50633_INT3_USBLIMON = 0x10, ++ PCF50633_INT3_USBLIMOFF = 0x20, ++ PCF50633_INT3_ADCRDY = 0x40, /* ADC conversion finished */ ++ PCF50633_INT3_ONKEY1S = 0x80, /* ONKEY pressed 1 second */ ++}; ++ ++enum pcf50633_reg_int4 { ++ PCF50633_INT4_LOWSYS = 0x01, ++ PCF50633_INT4_LOWBAT = 0x02, ++ PCF50633_INT4_HIGHTMP = 0x04, ++ PCF50633_INT4_AUTOPWRFAIL = 0x08, ++ PCF50633_INT4_DWN1PWRFAIL = 0x10, ++ PCF50633_INT4_DWN2PWRFAIL = 0x20, ++ PCF50633_INT4_LEDPWRFAIL = 0x40, ++ PCF50633_INT4_LEDOVP = 0x80, ++}; ++ ++enum pcf50633_reg_int5 { ++ PCF50633_INT4_LDO1PWRFAIL = 0x01, ++ PCF50633_INT4_LDO2PWRFAIL = 0x02, ++ PCF50633_INT4_LDO3PWRFAIL = 0x04, ++ PCF50633_INT4_LDO4PWRFAIL = 0x08, ++ PCF50633_INT4_LDO5PWRFAIL = 0x10, ++ PCF50633_INT4_LDO6PWRFAIL = 0x20, ++ PCF50633_INT4_HCLDOPWRFAIL = 0x40, ++ PCF50633_INT4_HCLDOOVL = 0x80, ++}; ++ ++enum pcf50633_reg_oocwake { ++ PCF50633_OOCWAKE_ONKEY = 0x01, ++ PCF50633_OOCWAKE_EXTON1 = 0x02, ++ PCF50633_OOCWAKE_EXTON2 = 0x04, ++ PCF50633_OOCWAKE_EXTON3 = 0x08, ++ PCF50633_OOCWAKE_RTC = 0x10, ++ /* reserved */ ++ PCF50633_OOCWAKE_USB = 0x40, ++ PCF50633_OOCWAKE_ADP = 0x80, ++}; ++ ++enum pcf50633_reg_mbcc1 { ++ PCF50633_MBCC1_CHGENA = 0x01, /* Charger enable */ ++ PCF50633_MBCC1_AUTOSTOP = 0x02, ++ PCF50633_MBCC1_AUTORES = 0x04, /* automatic resume */ ++ PCF50633_MBCC1_RESUME = 0x08, /* explicit resume cmd */ ++ PCF50633_MBCC1_RESTART = 0x10, /* restart charging */ ++ PCF50633_MBCC1_PREWDTIME_60M = 0x20, /* max. precharging time */ ++ PCF50633_MBCC1_WDTIME_1H = 0x00, ++ PCF50633_MBCC1_WDTIME_2H = 0x40, ++ PCF50633_MBCC1_WDTIME_4H = 0x80, ++ PCF50633_MBCC1_WDTIME_6H = 0xc0, ++}; ++#define PCF50633_MBCC1_WDTIME_MASK 0xc0 ++ ++enum pcf50633_reg_mbcc2 { ++ PCF50633_MBCC2_VBATCOND_2V7 = 0x00, ++ PCF50633_MBCC2_VBATCOND_2V85 = 0x01, ++ PCF50633_MBCC2_VBATCOND_3V = 0x02, ++ PCF50633_MBCC2_VBATCOND_3V15 = 0x03, ++ PCF50633_MBCC2_VMAX_4V = 0x00, ++ PCF50633_MBCC2_VMAX_4V20 = 0x28, ++ PCF50633_MBCC2_VRESDEBTIME_64S = 0x80, /* debounce time (32/64sec) */ ++}; ++#define PCF50633_MBCC2_VBATCOND_MASK 0x03 ++#define PCF50633_MBCC2_VMAX_MASK 0x3c ++ ++#define PCF50633_OOCSTAT_ONKEY 0x01 ++ ++/* this is to be provided by the board implementation */ ++extern const u_int8_t pcf50633_initial_regs[__NUM_PCF50633_REGS]; ++ ++void pcf50633_reg_write(u_int8_t reg, u_int8_t val); ++ ++u_int8_t pcf50633_reg_read(u_int8_t reg); ++ ++void pcf50633_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val); ++void pcf50633_reg_clear_bits(u_int8_t reg, u_int8_t bits); ++ ++void pcf50633_init(void); ++void pcf50633_usb_maxcurrent(unsigned int ma); ++ ++#endif /* _PCF50633_H */ ++ +Index: u-boot/drivers/pcf50633.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/pcf50633.c +@@ -0,0 +1,142 @@ ++#include ++ ++#ifdef CONFIG_DRIVER_PCF50633 ++ ++#include ++#include ++#include ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++ ++#define PCF50633_I2C_ADDR 0x73 ++ ++void __pcf50633_reg_write(u_int8_t reg, u_int8_t val) ++{ ++ i2c_write(PCF50633_I2C_ADDR, reg, 1, &val, 1); ++} ++ ++u_int8_t __pcf50633_reg_read(u_int8_t reg) ++{ ++ u_int8_t tmp; ++ i2c_read(PCF50633_I2C_ADDR, reg, 1, &tmp, 1); ++ return tmp; ++} ++ ++void pcf50633_reg_write(u_int8_t reg, u_int8_t val) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ __pcf50633_reg_write(reg, val); ++ local_irq_restore(flags); ++} ++ ++u_int8_t pcf50633_reg_read(u_int8_t reg) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = __pcf50633_reg_read(reg); ++ local_irq_restore(flags); ++ ++ return tmp; ++} ++ ++void pcf50633_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = __pcf50633_reg_read(reg); ++ __pcf50633_reg_write(reg, (val & mask) | (tmp & ~mask)); ++ local_irq_restore(flags); ++} ++ ++void pcf50633_reg_clear_bits(u_int8_t reg, u_int8_t bits) ++{ ++ unsigned long flags; ++ u_int8_t tmp; ++ ++ local_irq_save(flags); ++ tmp = pcf50633_reg_read(reg); ++ pcf50633_reg_write(reg, (tmp & ~bits)); ++ local_irq_restore(flags); ++} ++ ++static const u_int8_t regs_invalid[] = { ++ PCF50633_REG_VERSION, ++ PCF50633_REG_VARIANT, ++ PCF50633_REG_OOCSHDWN, ++ PCF50633_REG_INT1, ++ PCF50633_REG_INT2, ++ PCF50633_REG_INT3, ++ PCF50633_REG_INT4, ++ PCF50633_REG_INT5, ++ PCF50633_REG_OOCSTAT, ++ 0x2c, ++ PCF50633_REG_DCDCSTAT, ++ PCF50633_REG_LDOSTAT, ++ PCF50633_REG_MBCS1, ++ PCF50633_REG_MBCS2, ++ PCF50633_REG_MBCS3, ++ PCF50633_REG_ALMDATA, ++ 0x51, ++ /* 0x55 ... 0x6e: don't write */ ++ /* 0x6f ... 0x83: reserved */ ++}; ++#define PCF50633_LAST_REG 0x55 ++ ++static int reg_is_invalid(u_int8_t reg) ++{ ++ int i; ++ ++ /* all registers above 0x55 (ADCS1) except 0x84 */ ++ if (reg == PCF50633_REG_DCDCPFM) ++ return 0; ++ if (reg >= 0x55) ++ return 1; ++ ++ for (i = 0; i < ARRAY_SIZE(regs_invalid); i++) { ++ if (regs_invalid[i] > reg) ++ return 0; ++ if (regs_invalid[i] == reg) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ ++/* initialize PCF50633 register set */ ++void pcf50633_init(void) ++{ ++ unsigned long flags; ++ u_int8_t i; ++ ++ local_irq_save(flags); ++ for (i = 0; i < PCF50633_LAST_REG; i++) { ++ if (reg_is_invalid(i)) ++ continue; ++ __pcf50633_reg_write(i, pcf50633_initial_regs[i]); ++ } ++ local_irq_restore(flags); ++} ++ ++void pcf50633_usb_maxcurrent(unsigned int ma) ++{ ++ u_int8_t val; ++ ++ if (ma < 100) ++ val = 0x03; ++ else if (ma < 500) ++ val = 0x00; ++ else if (ma < 1000) ++ val = 0x01; ++ else ++ val = 0x02; ++ ++ return pcf50633_reg_set_bit_mask(PCF50633_REG_MBCC7, 0x03, val); ++} ++ ++#endif /* CONFIG DRIVER_PCF50633 */ +Index: u-boot/board/neo1973/common/lowlevel_init.S +=================================================================== +--- u-boot.orig/board/neo1973/common/lowlevel_init.S ++++ u-boot/board/neo1973/common/lowlevel_init.S +@@ -49,7 +49,7 @@ + #define WAIT (0x1<<2) + #define UBLB (0x1<<3) + +-#define B1_BWSCON (DW32) ++#define B1_BWSCON (DW16 + WAIT + UBLB) + #define B2_BWSCON (DW16) + #define B3_BWSCON (DW16 + WAIT + UBLB) + #define B4_BWSCON (DW16) +@@ -68,9 +68,9 @@ + + /* BANK1CON */ + #define B1_Tacs 0x0 /* 0clk */ +-#define B1_Tcos 0x0 /* 0clk */ +-#define B1_Tacc 0x7 /* 14clk */ +-#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tcos 0x1 /* 1clk */ ++#define B1_Tacc 0x4 /* 4clk */ ++#define B1_Tcoh 0x1 /* 1clk */ + #define B1_Tah 0x0 /* 0clk */ + #define B1_Tacp 0x0 + #define B1_PMC 0x0 +@@ -112,7 +112,7 @@ + #if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) + #define B6_SCAN 0x1 /* 9bit */ + #elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ +- defined(CONFIG_ARCH_GTA01B_v4) ++ defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) + #define B6_SCAN 0x2 /* 10bit */ + #endif + +@@ -165,6 +165,18 @@ + str r1, [r0] + #endif + ++#if defined(CONFIG_ARCH_GTA02_v1) ++ /* enable KEEPACT to make sure PMU keeps us alive */ ++ ldr r0, =0x56000000 /* GPJ base */ ++ ldr r1, [r0, #0xd0] /* GPJCON */ ++ orr r1, r1, #(1 << 6) ++ str r1, [r0, #0xd0] ++ ++ ldr r1, [r0, #0xd4] /* GPJDAT */ ++ orr r1, r1, #(1 << 3) ++ str r1, [r0, #0xd4] ++#endif ++ + /* everything is fine now */ + mov pc, lr + +Index: u-boot/board/neo1973/gta02/pcf50633.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/pcf50633.c +@@ -0,0 +1,91 @@ ++ ++#include ++#include ++ ++/* initial register set for PCF50633 in Neo1973 GTA02 devices */ ++const u_int8_t pcf50633_initial_regs[__NUM_PCF50633_REGS] = { ++ /* gap */ ++ [PCF50633_REG_INT1M] = PCF50633_INT1_SECOND, ++ [PCF50633_REG_INT2M] = PCF50633_INT2_EXTON3F | ++ PCF50633_INT2_EXTON3R | ++ PCF50633_INT2_EXTON2F | ++ PCF50633_INT2_EXTON2R | ++ PCF50633_INT2_EXTON1R | ++ PCF50633_INT2_EXTON1F, ++ [PCF50633_REG_INT3M] = PCF50633_INT3_ADCRDY, ++ [PCF50633_REG_INT4M] = 0x00, ++ [PCF50633_REG_INT5M] = 0x00, ++ ++ [PCF50633_REG_OOCWAKE] = 0xd3, /* wake from ONKEY,EXTON!,RTC,USB,ADP */ ++ [PCF50633_REG_OOCTIM1] = 0xaa, /* debounce 14ms everything */ ++ [PCF50633_REG_OOCTIM2] = 0x4a, ++ [PCF50633_REG_OOCMODE] = 0x55, ++ [PCF50633_REG_OOCCTL] = 0x44, ++ ++ [PCF50633_REG_GPIOCTL] = 0x01, /* only GPIO1 is input */ ++ [PCF50633_REG_GPIO2CFG] = 0x00, ++ [PCF50633_REG_GPIO3CFG] = 0x00, ++ [PCF50633_REG_GPOCFG] = 0x00, ++ ++ [PCF50633_REG_SVMCTL] = 0x08, /* 3.10V SYS voltage thresh. */ ++ [PCF50633_REG_BVMCTL] = 0x02, /* 2.80V BAT voltage thresh. */ ++ ++ [PCF50633_REG_STBYCTL1] = 0x00, ++ [PCF50633_REG_STBYCTL2] = 0x00, ++ ++ [PCF50633_REG_DEBPF1] = 0xff, ++ [PCF50633_REG_DEBPF2] = 0xff, ++ [PCF50633_REG_DEBPF2] = 0x3f, ++ ++ [PCF50633_REG_AUTOOUT] = 0x6b, /* 3.300V */ ++ [PCF50633_REG_AUTOENA] = 0x01, /* always on */ ++ [PCF50633_REG_AUTOCTL] = 0x00, /* automatic up/down operation */ ++ [PCF50633_REG_AUTOMXC] = 0x0a, /* 400mA at startup FIXME */ ++ ++ [PCF50633_REG_DOWN1OUT] = 0x1b, /* 1.3V (0x1b * .025V + 0.625V) */ ++ [PCF50633_REG_DOWN1ENA] = 0x02, /* enabled if GPIO1 = HIGH */ ++ [PCF50633_REG_DOWN1CTL] = 0x00, /* no DVM */ ++ [PCF50633_REG_DOWN1MXC] = 0x22, /* limit to 510mA at startup */ ++ ++ [PCF50633_REG_DOWN2OUT] = 0x2f, /* 1.8V (0x2f * .025V + 0.625V) */ ++ [PCF50633_REG_DOWN2ENA] = 0x02, /* enabled if GPIO1 = HIGH */ ++ [PCF50633_REG_DOWN2CTL] = 0x00, /* no DVM */ ++ [PCF50633_REG_DOWN2MXC] = 0x22, /* limit to 510mA at startup */ ++ ++ [PCF50633_REG_MEMLDOOUT] = 0x00, ++ [PCF50633_REG_MEMLDOENA] = 0x00, ++ ++ [PCF50633_REG_LEDOUT] = 0x2f, /* full backlight power */ ++ [PCF50633_REG_LEDENA] = 0x02, /* enabled if GPIO1 = HIGH */ ++ [PCF50633_REG_LEDCTL] = 0x05, /* ovp enabled, ocp 500mA */ ++ [PCF50633_REG_LEDDIM] = 0x20, /* dimming curve */ ++ ++ [PCF50633_REG_LDO1OUT] = 0x04, /* 1.3V (4 * 0.1V + 0.9V) */ ++ [PCF50633_REG_LDO1ENA] = 0x01, /* always on */ ++ ++ [PCF50633_REG_LDO2OUT] = 0x18, /* 3.3V (24 * 0.1V + 0.9V) */ ++ [PCF50633_REG_LDO2ENA] = 0x02, /* enabled if GPIO1 = HIGH */ ++ ++ [PCF50633_REG_LDO3OUT] = 0x15, /* 3.0V (21 * 0.1V + 0.9V) */ ++ [PCF50633_REG_LDO3ENA] = 0x02, /* enabled if GPIO1 = HIGH */ ++ ++ [PCF50633_REG_LDO4ENA] = 0x00, ++ [PCF50633_REG_LDO5ENA] = 0x00, ++ [PCF50633_REG_LDO6ENA] = 0x00, ++ ++ [PCF50633_REG_HCLDOOUT] = 0x18, /* 3.3V (24 * 0.1V + 0.9V) */ ++ [PCF50633_REG_HCLDOENA] = 0x00, /* off by default*/ ++ ++ [PCF50633_REG_DCDCPFM] = 0x00, /* off by default*/ ++ ++ [PCF50633_REG_MBCC1] = 0xe6, ++ [PCF50633_REG_MBCC2] = 0x28, /* Vbatconid=2.7V, Vmax=4.20V */ ++ [PCF50633_REG_MBCC3] = 0x19, /* 25/255 == 98mA pre-charge */ ++ [PCF50633_REG_MBCC4] = 0xff, /* 255/255 == 1A adapter fast */ ++ [PCF50633_REG_MBCC5] = 0x7f, /* 127/255 == 500mA usb fast */ ++ [PCF50633_REG_MBCC6] = 0x00, /* cutoff current 1/32 * Ichg */ ++ [PCF50633_REG_MBCC7] = 0x00, /* 1.6A max bat curr, USB 100mA */ ++ [PCF50633_REG_MBCC8] = 0x00, ++ ++ [PCF50633_REG_BBCCTL] = 0x19, /* 3V, 200uA, on */ ++}; +Index: u-boot/board/neo1973/gta02/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/gta02/config.mk +@@ -0,0 +1,32 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# FIC Neo1973 GTA01 board with S3C2410X (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++# GTA01v3 has 1 bank of 64 MB SDRAM ++# GTA01v4 has 1 bank of 64 MB SDRAM ++# ++# 3000'0000 to 3400'0000 ++# we load ourself to 33F8'0000 ++# ++# GTA01Bv2 or later has 1 bank of 128 MB SDRAM ++# ++# 3000'0000 to 3800'0000 ++# we load ourself to 37F8'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# download area is 3200'0000 or 3300'0000 ++ ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x5119 ++ ++sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp ++ ++TEXT_BASE = 0x33F80000 +Index: u-boot/drivers/smedia3362.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/smedia3362.c +@@ -0,0 +1,125 @@ ++/* ++ * (C) Copyright 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++ ++#if defined(CONFIG_VIDEO_GLAMO3362) ++ ++#include ++#include "videomodes.h" ++#include ++#include "smedia3362.h" ++ ++/* ++ * Export Graphic Device ++ */ ++GraphicDevice smi; ++ ++ ++struct glamo_script { ++ u_int16_t reg; ++ u_int16_t val; ++} __attribute__((packed)); ++ ++/* from 'initial glamo 3365 script' */ ++static struct glamo_script gl3362_init_script[] = { ++ /* clock */ ++ { GLAMO_REG_CLOCK_MEMORY, 0x300a }, ++ { GLAMO_REG_CLOCK_LCD, 0x10aa }, ++ { GLAMO_REG_CLOCK_MMC, 0x100a }, ++ { GLAMO_REG_CLOCK_ISP, 0x32aa }, ++ { GLAMO_REG_CLOCK_JPEG, 0x100a }, ++ { GLAMO_REG_CLOCK_3D, 0x302a }, ++ { GLAMO_REG_CLOCK_2D, 0x302a }, ++ //{ GLAMO_REG_CLOCK_RISC1, 0x1aaa }, ++ //{ GLAMO_REG_CLOCK_RISC2, 0x002a }, ++ { GLAMO_REG_CLOCK_MPEG, 0x3aaa }, ++ { GLAMO_REG_CLOCK_MPROC, 0x12aa }, ++ { 0xfffe, 5 }, ++ { GLAMO_REG_CLOCK_HOST, 0x000d }, ++ { GLAMO_REG_CLOCK_MEMORY, 0x000a }I, ++ { GLAMO_REG_CLOCK_LCD, 0x00ee }, ++ { GLAMO_REG_CLOCK_MMC, 0x000a }, ++ { GLAMO_REG_CLOCK_ISP, 0x02aa }, ++ { GLAMO_REG_CLOCK_JPEG, 0x000a }, ++ { GLAMO_REG_CLOCK_3D, 0x002a }, ++ { GLAMO_REG_CLOCK_2D, 0x002a }, ++ //{ GLAMO_REG_CLOCK_RISC1, 0x0aaa }, ++ //{ GLAMO_REG_CLOCK_RISC2, 0x002a }, ++ { GLAMO_REG_CLOCK_MPEG, 0x0aaa }, ++ { GLAMO_REG_CLOCK_MPROC, 0x02aa }, ++ { 0xfffe, 5 }, ++ { GLAMO_REG_PLL_GEN1, 0x061a }, /* PLL1=50MHz, OSCI=32kHz */ ++ { GLAMO_REG_PLL_GEN3, 0x09c3 }, /* PLL2=80MHz, OSCI=32kHz */ ++ { 0xfffe, 5 }, ++ { GLAMO_REG_CLOCK_GEN5_1, 0x18ff }, ++ { GLAMO_REG_CLOCK_GEN5_2, 0x051f }, ++ { GLAMO_REG_CLOCK_GEN6, 0x2000 }, ++ { GLAMO_REG_CLOCK_GEN7, 0x0105 }, ++ { GLAMO_REG_CLOCK_GEN8, 0x0100 }, ++ { GLAMO_REG_CLOCK_GEN10, 0x0017 }, ++ { GLAMO_REG_CLOCK_GEN11, 0x0017 }, ++ ++ /* hostbus interface */ ++ { GLAMO_REG_HOSTBUS(1), 0x0e00 }, ++ { GLAMO_REG_HOSTBUS(2), 0x07ff }, ++ { GLAMO_REG_HOSTBUS(4), 0x0080 }, ++ { GLAMO_REG_HOSTBUS(5), 0x0244 }, ++ { GLAMO_REG_HOSTBUS(6), 0x0600 }, ++ { GLAMO_REG_HOSTBUS(12), 0xf00e }, ++ ++ /* memory */ ++ { GLAMO_REG_MEM_TYPE, 0x0874 }, /* VRAM 8Mbyte */ ++ { GLAMO_REG_MEM_GEN, 0xafaf }, ++ { GLAMO_REG_MEM_TIMING(1), 0x0108 }, ++ { GLAMO_REG_MEM_TIMING(2), 0x0010 }, ++ { GLAMO_REG_MEM_TIMING(3), 0x0000 }, ++ { GLAMO_REG_MEM_TIMING(4), 0x0000 }, ++ { GLAMO_REG_MEM_TIMING(5), 0x0000 }, ++ { GLAMO_REG_MEM_TIMING(6), 0x0000 }, ++ { GLAMO_REG_MEM_TIMING(7), 0x0000 }, ++ { GLAMO_REG_MEM_TIMING(8), 0x1002 }, ++ { GLAMO_REG_MEM_TIMING(9), 0x6006 }, ++ { GLAMO_REG_MEM_TIMING(10), 0x00ff }, ++ { GLAMO_REG_MEM_TIMING(11), 0x0001 }, ++ { GLAMO_REG_MEM_POWER1, 0x0020 }, ++ { GLAMO_REG_MEM_POWRE2, 0x0000 }, ++ { GLAMO_REG_MEM_DRAM1, 0x0000 }, ++ { 0xfffe, 1 }, ++ { GLAMO_REG_MEM_DRAM1, 0xc100 }, ++ { GLAMO_REG_MEM_DRAM2, 0x01d6 }, ++}; ++ ++static int glamo3362_init(void) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(gl3362_init_script); i++) { ++ struct glamo_reg *reg = gl3362_init_script[i]; ++ ++ if (reg->reg == 0xfffe) ++ delay(reg->val); ++ else ++ gl3362_reg_write(reg->reg, reg->val); ++ } ++ /* FIXME */ ++} ++ ++#endif /* CONFIG_VIDEO_GLAMO3362 */ +Index: u-boot/drivers/Makefile +=================================================================== +--- u-boot.orig/drivers/Makefile ++++ u-boot/drivers/Makefile +@@ -50,7 +50,7 @@ + usbdcore.o usbdfu.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ + videomodes.o w83c553f.o \ + ks8695eth.o \ +- pcf50606.o \ ++ pcf50606.o pcf50633.o \ + pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ + rpx_pcmcia.o \ + fsl_i2c.o s3c2410_fb.o +Index: u-boot/common/cmd_nand.c +=================================================================== +--- u-boot.orig/common/cmd_nand.c ++++ u-boot/common/cmd_nand.c +@@ -208,8 +208,10 @@ + putc('\n'); + for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) { + if (nand_info[i].name) +- printf("Device %d: %s, sector size %lu KiB\n", ++ printf("Device %d: %s, page size %lu, " ++ "sector size %lu KiB\n", + i, nand_info[i].name, ++ nand_info[i].oobblock, + nand_info[i].erasesize >> 10); + } + return 0; +Index: u-boot/drivers/nand/nand_ids.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_ids.c ++++ u-boot/drivers/nand/nand_ids.c +@@ -67,7 +67,7 @@ + + {"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0}, + +- {"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, ++ //{"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, + + /* These are the new chips with large page size. The pagesize + * and the erasesize is determined from the extended id bytes +Index: u-boot/board/neo1973/common/udc.c +=================================================================== +--- u-boot.orig/board/neo1973/common/udc.c ++++ u-boot/board/neo1973/common/udc.c +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + + void udc_ctrl(enum usbd_event event, int param) + { +@@ -23,6 +24,11 @@ + defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ + defined(CONFIG_ARCH_GTA01B_v4) + pcf50606_charge_autofast(param); ++#elif defined(CONFIG_ARCH_GTA02_v1) ++ if (param) ++ pcf50633_usb_maxcurrent(500); ++ else ++ pcf50633_usb_maxcurrent(0); + #endif + break; + default: diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch new file mode 100644 index 0000000000..f85fdea836 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch @@ -0,0 +1,1169 @@ +Patch to add HXD8 support + +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2026,6 +2026,9 @@ + qt2410_config : unconfig + @./mkconfig $(@:_config=) arm arm920t qt2410 NULL s3c24x0 + ++hxd8_config : unconfig ++ @$(MKCONFIG) $(@:_config=) arm arm920t hxd8 NULL s3c24x0 ++ + scb9328_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx + +Index: u-boot/board/hxd8/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/Makefile +@@ -0,0 +1,65 @@ ++# ++# (C) Copyright 2000-2006 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = $(obj)lib$(BOARD).a ++ ++COBJS := hxd8.o udc.o pcf50606.o ++SOBJS := lowlevel_init.o ++ ++SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) ++OBJS := $(addprefix $(obj),$(COBJS)) ++SOBJS := $(addprefix $(obj),$(SOBJS)) ++ ++all: $(LIB) lowevel_foo.bin ++ ++$(LIB): $(obj).depend $(OBJS) $(SOBJS) ++ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) ++ ++lowlevel_foo.o: lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds ++ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++# defines $(obj).depend target ++include $(SRCTREE)/rules.mk ++ ++sinclude $(obj).depend ++ ++######################################################################### +Index: u-boot/board/hxd8/hxd8.c +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/hxd8.c +@@ -0,0 +1,189 @@ ++/* ++ * (C) Copyright 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#define FCLK_SPEED 1 ++ ++#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ ++#define M_MDIV 0xC3 ++#define M_PDIV 0x4 ++#define M_SDIV 0x1 ++#elif FCLK_SPEED==1 ++#if 0 ++#define M_MDIV 0x6e /* Fout = 399.65MHz */ ++#define M_PDIV 0x3 ++#define M_SDIV 0x1 ++#else ++#define M_MDIV 0x61 /* Fout = 296.35MHz due to wrong PLL capacitors */ ++#define M_PDIV 0x1 ++#define M_SDIV 0x2 ++#endif ++#endif ++ ++#define USB_CLOCK 1 ++ ++#if USB_CLOCK==0 ++#define U_M_MDIV 0xA1 ++#define U_M_PDIV 0x3 ++#define U_M_SDIV 0x1 ++#elif USB_CLOCK==1 ++#define U_M_MDIV 0x3c ++#define U_M_PDIV 0x4 ++#define U_M_SDIV 0x2 ++#endif ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++ gpio->GPACON = 0x005E0FFE; ++ gpio->GPADAT = 0x0001C000; ++ gpio->GPBCON = 0x00045542; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPCCON = 0xAAAA02A9; ++ gpio->GPCUP = 0x0000FFFF; ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ gpio->GPFCON = 0x0000AAA9; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPGCON = 0x027D0316; ++ gpio->GPGUP = 0x0000FFFF; ++ gpio->GPHCON = 0x0014AAAA; ++ gpio->GPHUP = 0x000007FF; ++ gpio->GPJCON = 0x00000000; ++ ++ /* USB CHG enable */ ++ gpio->GPGDAT |= ( 1 << 11); ++#if 0 ++ /* USB Device Part */ ++ /*GPGCON is reset for USB Device */ ++ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ ++ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ ++ ++ gpio->GPGDAT |= ( 1 << 12); ++ gpio->GPGDAT &= ~( 1 << 12); ++ udelay(20000); ++ gpio->GPGDAT |= ( 1 << 12); ++#endif ++ ++ /* arch number of SMDK2440-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_HXD8; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++void board_video_init(GraphicDevice *pGD) ++{ ++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); ++ ++ lcd->LCDCON1 = 0x0000057b; ++ lcd->LCDCON2 = 0x0143c049; ++ lcd->LCDCON3 = 0x0009df01; ++ lcd->LCDCON4 = 0x00000028; ++ lcd->LCDCON5 = 0x00000b08; ++ ++ lcd->TPAL = 0x01202020; ++ ++ //lcd->LCDCON5 |= (0x01 << 3); ++} ++ ++int board_late_init(void) ++{ ++ /* Initialize the Power Management Unit with a safe register set */ ++ pcf50606_init(); ++ ++ return 0; ++} ++ ++int dram_init(void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++u_int32_t get_board_rev(void) ++{ ++ return 0x00000110; ++} ++ ++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. ++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 ++ images: 640*480*2*2 = 1228800 < 1245184. */ ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3fd00000, 0 }; ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ +Index: u-boot/board/hxd8/lowlevel_init.S +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/lowlevel_init.S +@@ -0,0 +1,171 @@ ++/* ++ * Memory Setup stuff - taken from blob memsetup.S ++ * ++ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and ++ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) ++ * ++ * Modified for the FIC HXD8 by Harald Welte ++ * (C) Copyright 2007 by OpenMoko, Inc. ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++ ++/* some parameters for the board */ ++ ++/* ++ * ++ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S ++ * ++ * Copyright (C) 2002 Samsung Electronics SW.LEE ++ * ++ */ ++ ++#define BWSCON 0x48000000 ++ ++/* BWSCON */ ++#define DW8 (0x0) ++#define DW16 (0x1) ++#define DW32 (0x2) ++#define WAIT (0x1<<2) ++#define UBLB (0x1<<3) ++ ++#define B1_BWSCON (DW32) ++#define B2_BWSCON (DW16) ++#define B3_BWSCON (DW16 + WAIT + UBLB) ++#define B4_BWSCON (DW16) ++#define B5_BWSCON (DW16) ++#define B6_BWSCON (DW32) ++#define B7_BWSCON (DW32) ++ ++/* BANK0CON */ ++#define B0_Tacs 0x0 /* 0clk */ ++#define B0_Tcos 0x0 /* 0clk */ ++#define B0_Tacc 0x7 /* 14clk */ ++#define B0_Tcoh 0x0 /* 0clk */ ++#define B0_Tah 0x0 /* 0clk */ ++#define B0_Tacp 0x0 ++#define B0_PMC 0x0 /* normal */ ++ ++/* BANK1CON */ ++#define B1_Tacs 0x0 /* 0clk */ ++#define B1_Tcos 0x0 /* 0clk */ ++#define B1_Tacc 0x7 /* 14clk */ ++#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tah 0x0 /* 0clk */ ++#define B1_Tacp 0x0 ++#define B1_PMC 0x0 ++ ++#define B2_Tacs 0x0 ++#define B2_Tcos 0x0 ++#define B2_Tacc 0x7 ++#define B2_Tcoh 0x0 ++#define B2_Tah 0x0 ++#define B2_Tacp 0x0 ++#define B2_PMC 0x0 ++ ++#define B3_Tacs 0x0 /* 0clk */ ++#define B3_Tcos 0x3 /* 4clk */ ++#define B3_Tacc 0x7 /* 14clk */ ++#define B3_Tcoh 0x1 /* 1clk */ ++#define B3_Tah 0x0 /* 0clk */ ++#define B3_Tacp 0x3 /* 6clk */ ++#define B3_PMC 0x0 /* normal */ ++ ++#define B4_Tacs 0x0 /* 0clk */ ++#define B4_Tcos 0x0 /* 0clk */ ++#define B4_Tacc 0x7 /* 14clk */ ++#define B4_Tcoh 0x0 /* 0clk */ ++#define B4_Tah 0x0 /* 0clk */ ++#define B4_Tacp 0x0 ++#define B4_PMC 0x0 /* normal */ ++ ++#define B5_Tacs 0x0 /* 0clk */ ++#define B5_Tcos 0x0 /* 0clk */ ++#define B5_Tacc 0x7 /* 14clk */ ++#define B5_Tcoh 0x0 /* 0clk */ ++#define B5_Tah 0x0 /* 0clk */ ++#define B5_Tacp 0x0 ++#define B5_PMC 0x0 /* normal */ ++ ++#define B6_MT 0x3 /* SDRAM */ ++#define B6_Trcd 0x1 /* 3clk */ ++#define B6_SCAN 0x2 /* 10bit */ ++ ++#define B7_MT 0x3 /* SDRAM */ ++#define B7_Trcd 0x1 /* 3clk */ ++#define B7_SCAN 0x1 /* 9bit */ ++ ++/* REFRESH parameter */ ++#define REFEN 0x1 /* Refresh enable */ ++#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ ++#define Trp 0x1 /* 3clk */ ++#define Trc 0x3 /* 7clk */ ++#define Tchr 0x2 /* 3clk */ ++#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ ++/**************************************/ ++ ++_TEXT_BASE: ++ .word TEXT_BASE ++ ++.globl lowlevel_init ++lowlevel_init: ++ /* memory control configuration */ ++ /* make r0 relative the current location so that it */ ++ /* reads SMRDATA out of FLASH rather than memory ! */ ++ ldr r0, =SMRDATA ++ ldr r1, _TEXT_BASE ++ sub r0, r0, r1 ++ ldr r1, =BWSCON /* Bus Width Status Controller */ ++ add r2, r0, #13*4 ++0: ++ ldr r3, [r0], #4 ++ str r3, [r1], #4 ++ cmp r2, r0 ++ bne 0b ++ ++ /* setup asynchronous bus mode */ ++ mrc p15, 0, r1 ,c1 ,c0, 0 ++ orr r1, r1, #0xc0000000 ++ mcr p15, 0, r1, c1, c0, 0 ++ ++ /* everything is fine now */ ++ mov pc, lr ++ ++ .ltorg ++/* the literal pools origin */ ++ ++SMRDATA: ++ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) ++ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ++ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ++ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ++ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ++ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ++ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ++ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ++ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ++ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ++ .word 0x32 ++ .word 0x30 ++ .word 0x30 +Index: u-boot/include/configs/hxd8.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/hxd8.h +@@ -0,0 +1,277 @@ ++/* ++ * (C) Copyright 2007 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * Configuation settings for the FIC HXD8 ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++/* we want to be able to start u-boot directly from within NAND flash */ ++#define CONFIG_LL_INIT_NAND_ONLY ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++ ++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ ++#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2440 Board */ ++#define CONFIG_HXD8 1 /* on a FIC HXD8 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 16934400/* the HXD8 has this input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) ++ /* >> CFG_VIDEO_LOGO_MAX_SIZE */ ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL3 1 /* we use SERIAL 3 on HXD8 */ ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS (\ ++ CFG_CMD_BDI | \ ++ CFG_CMD_LOADS | \ ++ CFG_CMD_LAODB | \ ++ CFG_CMD_IMI | \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_MEMORY | \ ++ CFG_CMD_ENV | \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_BOOTD | \ ++ CFG_CMD_CONSOLE | \ ++ /* CFG_CMD_BMP | */ \ ++ CFG_CMD_ASKENV | \ ++ CFG_CMD_RUN | \ ++ CFG_CMD_ECHO | \ ++ CFG_CMD_I2C | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_IMMAP | \ ++ CFG_CMD_DATE | \ ++ CFG_CMD_AUTOSCRIPT | \ ++ CFG_CMD_BSP | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_MISC | \ ++ /* CFG_CMD_USB | */ \ ++ CFG_CMD_JFFS2 | \ ++ CFG_CMD_DIAG | \ ++ /* CFG_CMD_HWFLOW | */ \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_FAT | \ ++ CFG_CMD_EXT2 | \ ++ 0) ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "" ++#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 3 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#define CFG_PROMPT "HXD8 # " /* Monitor Command Prompt */ ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 64 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x33000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (512*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++#if 0 ++#define CONFIG_USB_OHCI 1 ++#endif ++ ++#if 1 ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x511a /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" ++#define CONFIG_USBD_PRODUCT_NAME "HXD8 Bootloader " U_BOOT_VERSION ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ ++#define CONFIG_USBD_DFU_INTERFACE 2 ++#endif ++#define CFG_CONSOLE_IS_IN_ENV 1 ++ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ "usbtty=cdc_acm\0" \ ++ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC2,115200 console=tty0 loglevel=8\0" \ ++ "" ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ ++#define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */ ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++/* No NOR flash in this device */ ++#define CFG_NO_FLASH 1 ++ ++#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */ ++#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */ ++ ++#define NAND_MAX_CHIPS 3 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE NAND_MAX_CHIPS ++#define CFG_NAND_BASE_LIST { CFG_NAND_BASE, CFG_NAND_BASE, CFG_NAND_BASE } ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++/* EXT2 driver */ ++#define CONFIG_EXT2 1 ++ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 1 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++#define CONFIG_REVISION_TAG 1 ++#if 0 ++#define CONFIG_SERIAL_TAG 1 ++#endif ++ ++#define CONFIG_DRIVER_S3C24X0_I2C 1 ++#define CONFIG_HARD_I2C 1 ++#define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */ ++#define CFG_I2C_SLAVE 0x7f ++ ++/* we have a board_late_init() function */ ++#define BOARD_LATE_INIT 1 ++ ++#if 1 ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_SPLASH_SCREEN ++#define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */ ++#define CONFIG_VIDEO_BMP_GZIP ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++#define CONFIG_UNZIP ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++#endif ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++//#define CONFIG_S3C2410_NAND_HWECC 1 ++ ++#define CONFIG_DRIVER_PCF50606 1 ++ ++#define MTDIDS_DEFAULT "nand0=hxd8-nand" ++#define MTPARTS_DEFAULT "hxd8-nand:256k(u-boot),128k(u-boot_env),2M(kernel),640k(splash),0x3fd00000(jffs2)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "hxd8-nand" ++#define CONFIG_NAND_DYNPART ++ ++#endif /* __CONFIG_H */ +Index: u-boot/board/hxd8/udc.c +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/udc.c +@@ -0,0 +1,30 @@ ++ ++#include ++#include ++#include ++ ++#if defined(CONFIG_USB_DEVICE) ++ ++void udc_ctrl(enum usbd_event event, int param) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ switch (event) { ++ case UDC_CTRL_PULLUP_ENABLE: ++ if (param) ++ gpio->GPBDAT |= (1 << 9); /* GPB9 */ ++ else ++ gpio->GPBDAT &= ~(1 << 9); /* GPB9 */ ++ break; ++ case UDC_CTRL_500mA_ENABLE: ++ if (param) ++ gpio->GPADAT |= (1 << 0); /* GPA0 */ ++ else ++ gpio->GPADAT &= ~(1 << 0); /* GPA0 */ ++ break; ++ default: ++ break; ++ } ++} ++ ++#endif /* CONFIG_USB_DEVICE */ +Index: u-boot/board/hxd8/pcf50606.c +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/pcf50606.c +@@ -0,0 +1,67 @@ ++ ++#include ++#include ++ ++/* initial register set for PCF50606 in HXD8 devices */ ++const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { ++ [PCF50606_REG_OOCS] = 0x00, ++ /* gap */ ++ [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, ++ [PCF50606_REG_INT2M] = PCF50606_INT2_CHGFOK | ++ PCF50606_INT2_CHGERR | ++ PCF50606_INT2_CHGFRDY | ++ PCF50606_INT2_CHGPROT | ++ PCF50606_INT2_CHGWD10S | ++ PCF50606_INT2_CHGWDEXP, ++ [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, ++ [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | ++ PCF50606_OOCC1_CHGWAK & ++ PCF50606_OOCC1_EXTONWAK_NO_WAKEUP, ++ [PCF50606_REG_OOCC2] = PCF50606_OOCC2_ONKEYDB_14ms | ++ PCF50606_OOCC2_EXTONDB_14ms, ++ /* gap */ ++ [PCF50606_REG_PSSC] = 0x00, ++ [PCF50606_REG_PWROKM] = 0x00, ++ /* gap */ ++ [PCF50606_REG_DCDC1] = 0xf0, /* CORE_1V3: on */ ++ [PCF50606_REG_DCDC2] = 0x00, ++ [PCF50606_REG_DCDC3] = 0x00, ++ [PCF50606_REG_DCDC4] = 0x30, /* 1.25A */ ++ ++ [PCF50606_REG_DCDEC1] = 0xe8, /* IO1_3V3: off */ ++ [PCF50606_REG_DCDEC2] = 0x00, ++ ++ [PCF50606_REG_DCUDC1] = 0x08, /* RF_3V3: off */ ++ [PCF50606_REG_DCUDC2] = 0x30, /* 1.25A current limit */ ++ ++ [PCF50606_REG_IOREGC] = 0xf8, /* AUDIO_3V3: on */ ++ ++ [PCF50606_REG_D1REGC1] = 0xf8, /* RC_3V3: on */ ++ ++ [PCF50606_REG_D2REGC1] = 0x18, /* GPS_3V3: off */ ++ ++ [PCF50606_REG_D3REGC1] = 0xf8, /* IO2_3V3: off */ ++ ++ [PCF50606_REG_LPREGC1] = 0xf8, /* LCM_3V3: on */ ++ [PCF50606_REG_LPREGC2] = 0x00, ++ ++ [PCF50606_REG_MBCC1] = 0x00, /* charger unused */ ++ [PCF50606_REG_MBCC2] = 0x00, /* unlimited charging */ ++ [PCF50606_REG_MBCC3] = 0x1a, /* 0.2*Ifast, 4.20V */ ++ [PCF50606_REG_BBCC] = 0x1f, /* 400uA */ ++ [PCF50606_REG_ADCC1] = 0x00, ++ [PCF50606_REG_ADCC2] = 0x00, ++ /* gap */ ++ [PCF50606_REG_ACDC1] = 0x00, ++ [PCF50606_REG_BVMC] = PCF50606_BVMC_THRSHLD_3V3, ++ [PCF50606_REG_PWMC1] = 0x1f, /* clock: 512 DC: 15/16*/ ++ [PCF50606_REG_LEDC1] = 0x00, ++ [PCF50606_REG_LEDC2] = 0x00, ++ [PCF50606_REG_GPOC1] = 0x03, /* PWM ACTIVE */ ++ [PCF50606_REG_GPOC2] = 0x07, /* back light pull low */ ++ [PCF50606_REG_GPOC3] = 0x00, ++ [PCF50606_REG_GPOC4] = 0x00, ++ [PCF50606_REG_GPOC5] = 0x00, ++}; ++ ++ +Index: u-boot/board/hxd8/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/config.mk +@@ -0,0 +1,27 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# FIC HXD8 board with S3C2440X (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x511a ++CONFIG_USB_DFU_REVISION=0x0100 ++ ++# ++# HXD81v011 or later has 1 bank of 128 MB SDRAM ++# ++# 3000'0000 to 3800'0000 ++# we load ourself to 37F8'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# download area is 3200'0000 or 3300'0000 ++ ++# FIXME: TEXT_BASE = 0x37F80000 ++TEXT_BASE = 0x33F80000 +Index: u-boot/board/hxd8/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/board/hxd8/lowlevel_foo.S +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/lowlevel_foo.S +@@ -0,0 +1,87 @@ ++ ++_start: ++ b reset ++undefvec: ++ b undefvec ++swivec: ++ b swivec ++pabtvec: ++ b pabtvec ++dabtvec: ++ b dabtvec ++rsvdvec: ++ b rsvdvec ++irqvec: ++ b irqvec ++fiqvec: ++ b fiqvec ++ ++reset: ++ /* ++ * set the cpu to SVC32 mode ++ */ ++ mrs r0,cpsr ++ bic r0,r0,#0x1f ++ orr r0,r0,#0xd3 ++ msr cpsr,r0 ++ ++/* turn off the watchdog */ ++#define pWTCON 0x53000000 ++#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ ++#define INTSUBMSK 0x4A00001C ++#define CLKDIVN 0x4C000014 /* clock divisor register */ ++#define CAMDIVN 0x4C000018 ++ ++ ldr r0, =pWTCON ++ mov r1, #0x0 ++ str r1, [r0] ++ ++ mov r1, #0xffffffff ++ ldr r0, =INTMSK ++ str r1, [r0] ++ ldr r1, =0x7ff ++ ldr r0, =INTSUBMSK ++ str r1, [r0] ++ ++ /* FCLK:HCLK:PCLK = 1:3:6 */ ++ ldr r0, =CAMDIVN ++ mov r1, #0 ++ str r1, [r0] ++ ++ /* FCLK:HCLK:PCLK = 1:3:6 */ ++ ldr r0, =CLKDIVN ++ mov r1, #7 ++ str r1, [r0] ++ ++ bl cpu_init_crit ++ ldr r0,=TEXT_BASE ++ mov pc, r0 ++ ++cpu_init_crit: ++ /* ++ * flush v4 I/D caches ++ */ ++ mov r0, #0 ++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ ++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ ++ ++ /* ++ * disable MMU stuff and caches ++ */ ++ mrc p15, 0, r0, c1, c0, 0 ++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) ++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) ++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align ++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache ++ mcr p15, 0, r0, c1, c0, 0 ++ ++ /* ++ * before relocating, we have to setup RAM timing ++ * because memory timing is board-dependend, you will ++ * find a lowlevel_init.S in your board directory. ++ */ ++ mov ip, lr ++ bl lowlevel_init ++ mov lr, ip ++ mov pc, lr ++ +Index: u-boot/board/hxd8/lowlevel_foo.lds +=================================================================== +--- /dev/null ++++ u-boot/board/hxd8/lowlevel_foo.lds +@@ -0,0 +1,56 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ lowlevel_foo.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/cpu/arm920t/s3c24x0/nand.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c ++++ u-boot/cpu/arm920t/s3c24x0/nand.c +@@ -83,6 +83,59 @@ + #define NFDATA __REGb(NF_BASE + oNFDATA) + #define NFSTAT __REGb(NF_BASE + oNFSTAT) + ++#if defined(CONFIG_HXD8) ++static int hxd8_nand_dev_ready(struct mtd_info *mtd) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ u_int32_t val = gpio->GPCDAT; ++ ++ switch (nand_curr_device) { ++ case 0: ++ return (NFSTAT & 0x01); ++ case 1: /* RnB 3 */ ++ return ((val>>6) & 0x01); ++ case 2: /* RnB 4 */ ++ return ((val>>7) & 0x01); ++ case 3: /* RnB 2 */ ++ return ((val>>5) & 0x01); ++ default: ++ return 0; ++ } ++} ++ ++/* 4G Nand flash chip select function */ ++static void hxd8_nand_select_chip(struct nand_chip *this, int chip) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ if (chip == 0) ++ gpio->GPGDAT &= ~(1 << 1); ++ else ++ gpio->GPGDAT |= (1 << 1); ++ ++ if (chip == 1) ++ gpio->GPADAT &= ~(1 << 15); ++ else ++ gpio->GPADAT |= (1 << 15); ++ ++ if (chip == 2) ++ gpio->GPADAT &= ~(1 << 16); ++ else ++ gpio->GPADAT |= (1 << 16); ++ ++ if (chip == 3) ++ gpio->GPADAT &= ~(1 << 14); ++ else ++ gpio->GPADAT |= (1 << 14); ++ ++ /* UGLY: ew don't have mtd_info pointer, but know that ++ * s3c24xx hwcontrol function does not use it for CLRNCE */ ++ if (chip == -1) ++ this->hwcontrol(NULL, NAND_CTL_CLRNCE); ++ else ++ this->hwcontrol(NULL, NAND_CTL_SETNCE); ++} ++#endif + + static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) + { +@@ -251,6 +304,11 @@ + nand->eccmode = NAND_ECC_SOFT; + #endif + ++#if defined(CONFIG_HXD8) ++ nand->dev_ready = hxd8_nand_dev_ready; ++ nand->select_chip = hxd8_nand_select_chip; ++#endif ++ + #ifdef CONFIG_S3C2410_NAND_BBT + nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT; + #else diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch new file mode 100644 index 0000000000..227a97e71a --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch @@ -0,0 +1,712 @@ +Index: u-boot/common/Makefile +=================================================================== +--- u-boot.orig/common/Makefile ++++ u-boot/common/Makefile +@@ -34,7 +34,7 @@ + cmd_dynenv.o cmd_eeprom.o cmd_elf.o cmd_ext2.o \ + cmd_fat.o cmd_fdc.o cmd_fdt.o cmd_fdos.o cmd_flash.o cmd_fpga.o \ + cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \ +- cmd_load.o cmd_log.o \ ++ cmd_license.o cmd_load.o cmd_log.o \ + cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \ + cmd_nand.o cmd_net.o cmd_nvedit.o \ + cmd_pci.o cmd_pcmcia.o cmd_portio.o \ +Index: u-boot/common/cmd_license.c +=================================================================== +--- /dev/null ++++ u-boot/common/cmd_license.c +@@ -0,0 +1,57 @@ ++/* ++ * (C) Copyright 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_LICENSE) ++ ++#define LICENSE_MAX 20480 ++#include ++#include ++#include ++int gunzip(void *, int, unsigned char *, unsigned long *); ++ ++int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ++{ ++ char *tok, *dst = malloc(LICENSE_MAX); ++ unsigned long len = LICENSE_MAX; ++ ++ if (!dst) ++ return -1; ++ ++ if (gunzip(dst, LICENSE_MAX, gpl_gz, &len) != 0) { ++ printf("Error uncompressing license text\n"); ++ free(dst); ++ return -1; ++ } ++ puts(dst); ++ free(dst); ++ ++ return 0; ++} ++ ++U_BOOT_CMD(license, 1, 1, do_license, ++ "license - print GPL license text\n", ++ NULL); ++ ++#endif /* CFG_CMD_LICENSE */ +Index: u-boot/include/cmd_confdefs.h +=================================================================== +--- u-boot.orig/include/cmd_confdefs.h ++++ u-boot/include/cmd_confdefs.h +@@ -75,6 +75,7 @@ + #define CFG_CMD_FPGA 0x0000010000000000ULL /* FPGA configuration Support */ + #define CFG_CMD_HWFLOW 0x0000020000000000ULL /* RTS/CTS hw flow control */ + #define CFG_CMD_SAVES 0x0000040000000000ULL /* save S record dump */ ++#define CFG_CMD_LICENSE 0x0000080000000000ULL /* Display GPL License */ + #define CFG_CMD_SPI 0x0000100000000000ULL /* SPI utility */ + #define CFG_CMD_FDOS 0x0000200000000000ULL /* Floppy DOS support */ + #define CFG_CMD_VFD 0x0000400000000000ULL /* VFD support (TRAB) */ +Index: u-boot/include/license.h +=================================================================== +--- /dev/null ++++ u-boot/include/license.h +@@ -0,0 +1,584 @@ ++/* bin2header converting 'gpl.gz' */ ++unsigned char gpl_gz[] = { ++ 0x1f, 0x8b, 0x08, 0x08, 0xb2, 0x10, 0x0d, 0x46, 0x00, 0x03, ++ 0x67, 0x70, 0x6c, 0x00, 0x9d, 0x5b, 0x5d, 0x77, 0xdb, 0x46, ++ 0x92, 0x7d, 0x4e, 0xff, 0x8a, 0x3e, 0x7e, 0x89, 0x74, 0x0e, ++ 0xc3, 0xc4, 0x9e, 0x9d, 0xdd, 0x49, 0xfc, 0x44, 0x49, 0x94, ++ 0xcd, 0x1d, 0x99, 0x52, 0x48, 0xca, 0x8e, 0x1f, 0x41, 0xb2, ++ 0x29, 0x62, 0x0c, 0x02, 0x5c, 0x7c, 0x48, 0xe6, 0xbf, 0xdf, ++ 0x7b, 0xab, 0xba, 0x81, 0x06, 0x49, 0x25, 0xb3, 0x9b, 0x93, ++ 0xc4, 0x16, 0x09, 0x54, 0xd7, 0x77, 0xdd, 0xaa, 0x2e, 0xfd, ++ 0xf0, 0x83, 0xc5, 0x3f, 0x1f, 0xa6, 0x8f, 0xf6, 0xc3, 0x78, ++ 0x3a, 0x9e, 0x8d, 0xee, 0xec, 0xc3, 0xe3, 0xd5, 0xdd, 0xe4, ++ 0xda, 0xe2, 0xbf, 0xf1, 0x74, 0x3e, 0x36, 0x3f, 0xc8, 0x03, ++ 0xf8, 0xe7, 0xb3, 0x2b, 0xab, 0xb4, 0xc8, 0xed, 0xbb, 0x81, ++ 0xfd, 0xef, 0x26, 0x77, 0xf6, 0xed, 0xaf, 0xbf, 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xe3, 0xec, 0xc4, 0xc7, 0x70, 0xf2, 0x3d, 0x54, 0x48, ++ 0x92, 0xe2, 0x6b, 0xad, 0x41, 0x82, 0x93, 0xcd, 0x2f, 0x07, ++ 0xe2, 0x03, 0x76, 0x72, 0x8b, 0xa3, 0xae, 0x3f, 0x7a, 0xeb, ++ 0xd9, 0x5e, 0xd4, 0x7e, 0xb5, 0x1f, 0x61, 0x8a, 0xab, 0x31, ++ 0x1e, 0x1b, 0xdd, 0x7c, 0x9e, 0x30, 0xf3, 0xe8, 0x39, 0x06, ++ 0xb1, 0x30, 0x9f, 0x78, 0x9d, 0xdc, 0x7b, 0x0a, 0x5e, 0x8f, ++ 0xed, 0x4e, 0x3f, 0xa2, 0x44, 0x9f, 0x3f, 0xb3, 0xbd, 0x6f, ++ 0xfe, 0x17, 0x84, 0xf3, 0x1b, 0xef, 0x12, 0x3b, 0x00, 0x00, ++ ++}; +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -110,6 +110,7 @@ + CFG_CMD_MMC | \ + CFG_CMD_FAT | \ + CFG_CMD_EXT2 | \ ++ CFG_CMD_LICENSE | \ + 0) + /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ + #include +Index: u-boot/include/configs/hxd8.h +=================================================================== +--- u-boot.orig/include/configs/hxd8.h ++++ u-boot/include/configs/hxd8.h +@@ -110,6 +110,7 @@ + CFG_CMD_MMC | \ + CFG_CMD_FAT | \ + CFG_CMD_EXT2 | \ ++ CFG_CMD_LICENSE | \ + 0) + /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ + #include +Index: u-boot/include/configs/smdk2440.h +=================================================================== +--- u-boot.orig/include/configs/smdk2440.h ++++ u-boot/include/configs/smdk2440.h +@@ -110,6 +110,7 @@ + CFG_CMD_PORTIO | \ + CFG_CMD_REGINFO | \ + CFG_CMD_SAVES | \ ++ CFG_CMD_LICENSE | \ + CFG_CMD_USB) + + /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch new file mode 100644 index 0000000000..db3cee6e99 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch @@ -0,0 +1,4121 @@ +This adds a more recent version of mach-types.h to u-boot + +Signed-off-by: Harald Welte + +Index: u-boot/include/asm-arm/mach-types.h +=================================================================== +--- u-boot.orig/include/asm-arm/mach-types.h ++++ u-boot/include/asm-arm/mach-types.h +@@ -424,7 +424,7 @@ + #define MACH_TYPE_MPORT3S 411 + #define MACH_TYPE_RA_ALPHA 412 + #define MACH_TYPE_XCEP 413 +-#define MACH_TYPE_ARCOM_MERCURY 414 ++#define MACH_TYPE_ARCOM_VULCAN 414 + #define MACH_TYPE_STARGATE 415 + #define MACH_TYPE_ARMADILLOJ 416 + #define MACH_TYPE_ELROY_JACK 417 +@@ -457,7 +457,7 @@ + #define MACH_TYPE_XM250 444 + #define MACH_TYPE_T6TC1XB 445 + #define MACH_TYPE_ESS710 446 +-#define MACH_TYPE_MX3ADS 447 ++#define MACH_TYPE_MX31ADS 447 + #define MACH_TYPE_HIMALAYA 448 + #define MACH_TYPE_BOLFENK 449 + #define MACH_TYPE_AT91RM9200KR 450 +@@ -736,7 +736,311 @@ + #define MACH_TYPE_LN2410SBC 725 + #define MACH_TYPE_CB3RUFC 726 + #define MACH_TYPE_MP2USB 727 +-#define MACH_TYPE_PDNB3 1002 ++#define MACH_TYPE_NTNP425C 728 ++#define MACH_TYPE_COLIBRI 729 ++#define MACH_TYPE_PCM7220 730 ++#define MACH_TYPE_GATEWAY7001 731 ++#define MACH_TYPE_PCM027 732 ++#define MACH_TYPE_CMPXA 733 ++#define MACH_TYPE_ANUBIS 734 ++#define MACH_TYPE_ITE8152 735 ++#define MACH_TYPE_LPC3XXX 736 ++#define MACH_TYPE_PUPPETEER 737 ++#define MACH_TYPE_MACH_VADATECH 738 ++#define MACH_TYPE_E570 739 ++#define MACH_TYPE_X50 740 ++#define MACH_TYPE_RECON 741 ++#define MACH_TYPE_XBOARDGP8 742 ++#define MACH_TYPE_FPIC2 743 ++#define MACH_TYPE_AKITA 744 ++#define MACH_TYPE_A81 745 ++#define MACH_TYPE_SVM_SC25X 746 ++#define MACH_TYPE_VADATECH020 747 ++#define MACH_TYPE_TLI 748 ++#define MACH_TYPE_EDB9315LC 749 ++#define MACH_TYPE_PASSEC 750 ++#define MACH_TYPE_DS_TIGER 751 ++#define MACH_TYPE_E310 752 ++#define MACH_TYPE_E330 753 ++#define MACH_TYPE_RT3000 754 ++#define MACH_TYPE_NOKIA770 755 ++#define MACH_TYPE_PNX0106 756 ++#define MACH_TYPE_HX21XX 757 ++#define MACH_TYPE_FARADAY 758 ++#define MACH_TYPE_SBC9312 759 ++#define MACH_TYPE_BATMAN 760 ++#define MACH_TYPE_JPD201 761 ++#define MACH_TYPE_MIPSA 762 ++#define MACH_TYPE_KACOM 763 ++#define MACH_TYPE_SWARCOCPU 764 ++#define MACH_TYPE_SWARCODSL 765 ++#define MACH_TYPE_BLUEANGEL 766 ++#define MACH_TYPE_HAIRYGRAMA 767 ++#define MACH_TYPE_BANFF 768 ++#define MACH_TYPE_CARMEVA 769 ++#define MACH_TYPE_SAM255 770 ++#define MACH_TYPE_PPM10 771 ++#define MACH_TYPE_EDB9315A 772 ++#define MACH_TYPE_SUNSET 773 ++#define MACH_TYPE_STARGATE2 774 ++#define MACH_TYPE_INTELMOTE2 775 ++#define MACH_TYPE_TRIZEPS4 776 ++#define MACH_TYPE_MAINSTONE2 777 ++#define MACH_TYPE_EZ_IXP42X 778 ++#define MACH_TYPE_TAPWAVE_ZODIAC 779 ++#define MACH_TYPE_UNIVERSALMETER 780 ++#define MACH_TYPE_HICOARM9 781 ++#define MACH_TYPE_PNX4008 782 ++#define MACH_TYPE_KWS6000 783 ++#define MACH_TYPE_PORTUX920T 784 ++#define MACH_TYPE_EZ_X5 785 ++#define MACH_TYPE_OMAP_RUDOLPH 786 ++#define MACH_TYPE_CPUAT91 787 ++#define MACH_TYPE_REA9200 788 ++#define MACH_TYPE_ACTS_PUNE_SA1110 789 ++#define MACH_TYPE_IXP425 790 ++#define MACH_TYPE_ARGONPLUSODYSSEY 791 ++#define MACH_TYPE_PERCH 792 ++#define MACH_TYPE_EIS05R1 793 ++#define MACH_TYPE_PEPPERPAD 794 ++#define MACH_TYPE_SB3010 795 ++#define MACH_TYPE_RM9200 796 ++#define MACH_TYPE_DMA03 797 ++#define MACH_TYPE_ROAD_S101 798 ++#define MACH_TYPE_IQ_NEXTGEN_A 799 ++#define MACH_TYPE_IQ_NEXTGEN_B 800 ++#define MACH_TYPE_IQ_NEXTGEN_C 801 ++#define MACH_TYPE_IQ_NEXTGEN_D 802 ++#define MACH_TYPE_IQ_NEXTGEN_E 803 ++#define MACH_TYPE_MALLOW_AT91 804 ++#define MACH_TYPE_CYBERTRACKER_I 805 ++#define MACH_TYPE_GESBC931X 806 ++#define MACH_TYPE_CENTIPAD 807 ++#define MACH_TYPE_ARMSOC 808 ++#define MACH_TYPE_SE4200 809 ++#define MACH_TYPE_EMS197A 810 ++#define MACH_TYPE_MICRO9 811 ++#define MACH_TYPE_MICRO9L 812 ++#define MACH_TYPE_UC5471DSP 813 ++#define MACH_TYPE_SJ5471ENG 814 ++#define MACH_TYPE_CMPXA26X 815 ++#define MACH_TYPE_NC 816 ++#define MACH_TYPE_OMAP_PALMTE 817 ++#define MACH_TYPE_AJAX52X 818 ++#define MACH_TYPE_SIRIUSTAR 819 ++#define MACH_TYPE_IODATA_HDLG 820 ++#define MACH_TYPE_AT91RM9200UTL 821 ++#define MACH_TYPE_BIOSAFE 822 ++#define MACH_TYPE_MP1000 823 ++#define MACH_TYPE_PARSY 824 ++#define MACH_TYPE_CCXP 825 ++#define MACH_TYPE_OMAP_GSAMPLE 826 ++#define MACH_TYPE_REALVIEW_EB 827 ++#define MACH_TYPE_SAMOA 828 ++#define MACH_TYPE_T3XSCALE 829 ++#define MACH_TYPE_I878 830 ++#define MACH_TYPE_BORZOI 831 ++#define MACH_TYPE_GECKO 832 ++#define MACH_TYPE_DS101 833 ++#define MACH_TYPE_OMAP_PALMTT2 834 ++#define MACH_TYPE_XSCALE_PALMLD 835 ++#define MACH_TYPE_CC9C 836 ++#define MACH_TYPE_SBC1670 837 ++#define MACH_TYPE_IXDP28X5 838 ++#define MACH_TYPE_OMAP_PALMTT 839 ++#define MACH_TYPE_ML696K 840 ++#define MACH_TYPE_ARCOM_ZEUS 841 ++#define MACH_TYPE_OSIRIS 842 ++#define MACH_TYPE_MAESTRO 843 ++#define MACH_TYPE_TUNGE2 844 ++#define MACH_TYPE_IXBBM 845 ++#define MACH_TYPE_MX27 846 ++#define MACH_TYPE_AX8004 847 ++#define MACH_TYPE_AT91SAM9261EK 848 ++#define MACH_TYPE_LOFT 849 ++#define MACH_TYPE_MAGPIE 850 ++#define MACH_TYPE_MX21 851 ++#define MACH_TYPE_MB87M3400 852 ++#define MACH_TYPE_MGUARD_DELTA 853 ++#define MACH_TYPE_DAVINCI_DVDP 854 ++#define MACH_TYPE_HTCUNIVERSAL 855 ++#define MACH_TYPE_TPAD 856 ++#define MACH_TYPE_ROVERP3 857 ++#define MACH_TYPE_JORNADA928 858 ++#define MACH_TYPE_MV88FXX81 859 ++#define MACH_TYPE_STMP36XX 860 ++#define MACH_TYPE_SXNI79524 861 ++#define MACH_TYPE_AMS_DELTA 862 ++#define MACH_TYPE_URANIUM 863 ++#define MACH_TYPE_UCON 864 ++#define MACH_TYPE_NAS100D 865 ++#define MACH_TYPE_L083_1000 866 ++#define MACH_TYPE_EZX 867 ++#define MACH_TYPE_PNX5220 868 ++#define MACH_TYPE_BUTTE 869 ++#define MACH_TYPE_SRM2 870 ++#define MACH_TYPE_DSBR 871 ++#define MACH_TYPE_CRYSTALBALL 872 ++#define MACH_TYPE_TINYPXA27X 873 ++#define MACH_TYPE_HERBIE 874 ++#define MACH_TYPE_MAGICIAN 875 ++#define MACH_TYPE_CM4002 876 ++#define MACH_TYPE_B4 877 ++#define MACH_TYPE_MAUI 878 ++#define MACH_TYPE_CYBERTRACKER_G 879 ++#define MACH_TYPE_NXDKN 880 ++#define MACH_TYPE_MIO8390 881 ++#define MACH_TYPE_OMI_BOARD 882 ++#define MACH_TYPE_MX21CIV 883 ++#define MACH_TYPE_MAHI_CDAC 884 ++#define MACH_TYPE_XSCALE_PALMTX 885 ++#define MACH_TYPE_S3C2413 887 ++#define MACH_TYPE_SAMSYS_EP0 888 ++#define MACH_TYPE_WG302V1 889 ++#define MACH_TYPE_WG302V2 890 ++#define MACH_TYPE_EB42X 891 ++#define MACH_TYPE_IQ331ES 892 ++#define MACH_TYPE_COSYDSP 893 ++#define MACH_TYPE_UPLAT7D 894 ++#define MACH_TYPE_PTDAVINCI 895 ++#define MACH_TYPE_MBUS 896 ++#define MACH_TYPE_NADIA2VB 897 ++#define MACH_TYPE_R1000 898 ++#define MACH_TYPE_HW90250 899 ++#define MACH_TYPE_OMAP_2430SDP 900 ++#define MACH_TYPE_DAVINCI_EVM 901 ++#define MACH_TYPE_OMAP_TORNADO 902 ++#define MACH_TYPE_OLOCREEK 903 ++#define MACH_TYPE_PALMZ72 904 ++#define MACH_TYPE_NXDB500 905 ++#define MACH_TYPE_APF9328 906 ++#define MACH_TYPE_OMAP_WIPOQ 907 ++#define MACH_TYPE_OMAP_TWIP 908 ++#define MACH_TYPE_XSCALE_PALMTREO650 909 ++#define MACH_TYPE_ACUMEN 910 ++#define MACH_TYPE_XP100 911 ++#define MACH_TYPE_FS2410 912 ++#define MACH_TYPE_PXA270_CERF 913 ++#define MACH_TYPE_SQ2FTLPALM 914 ++#define MACH_TYPE_BSEMSERVER 915 ++#define MACH_TYPE_NETCLIENT 916 ++#define MACH_TYPE_XSCALE_PALMTT5 917 ++#define MACH_TYPE_OMAP_PALMTC 918 ++#define MACH_TYPE_OMAP_APOLLON 919 ++#define MACH_TYPE_ARGONLVEVB 920 ++#define MACH_TYPE_REA_2D 921 ++#define MACH_TYPE_TI3E524 922 ++#define MACH_TYPE_ATEB9200 923 ++#define MACH_TYPE_AUCKLAND 924 ++#define MACH_TYPE_AK3320M 925 ++#define MACH_TYPE_DURAMAX 926 ++#define MACH_TYPE_N35 927 ++#define MACH_TYPE_PRONGHORN 928 ++#define MACH_TYPE_FUNDY 929 ++#define MACH_TYPE_LOGICPD_PXA270 930 ++#define MACH_TYPE_CPU777 931 ++#define MACH_TYPE_SIMICON9201 932 ++#define MACH_TYPE_LEAP2_HPM 933 ++#define MACH_TYPE_CM922TXA10 934 ++#define MACH_TYPE_PXA 935 ++#define MACH_TYPE_SANDGATE2 936 ++#define MACH_TYPE_SANDGATE2G 937 ++#define MACH_TYPE_SANDGATE2P 938 ++#define MACH_TYPE_FRED_JACK 939 ++#define MACH_TYPE_TTG_COLOR1 940 ++#define MACH_TYPE_NXEB500HMI 941 ++#define MACH_TYPE_NETDCU8 942 ++#define MACH_TYPE_ML675050_CPU_BOA 943 ++#define MACH_TYPE_NG_FVX538 944 ++#define MACH_TYPE_NG_FVS338 945 ++#define MACH_TYPE_PNX4103 946 ++#define MACH_TYPE_HESDB 947 ++#define MACH_TYPE_XSILO 948 ++#define MACH_TYPE_ESPRESSO 949 ++#define MACH_TYPE_EMLC 950 ++#define MACH_TYPE_SISTERON 951 ++#define MACH_TYPE_RX1950 952 ++#define MACH_TYPE_TSC_VENUS 953 ++#define MACH_TYPE_DS101J 954 ++#define MACH_TYPE_MXC30030ADS 955 ++#define MACH_TYPE_FUJITSU_WIMAXSOC 956 ++#define MACH_TYPE_DUALPCMODEM 957 ++#define MACH_TYPE_GESBC9312 958 ++#define MACH_TYPE_HTCAPACHE 959 ++#define MACH_TYPE_IXDP435 960 ++#define MACH_TYPE_CATPROVT100 961 ++#define MACH_TYPE_PICOTUX1XX 962 ++#define MACH_TYPE_PICOTUX2XX 963 ++#define MACH_TYPE_DSMG600 964 ++#define MACH_TYPE_EMPC2 965 ++#define MACH_TYPE_VENTURA 966 ++#define MACH_TYPE_PHIDGET_SBC 967 ++#define MACH_TYPE_IJ3K 968 ++#define MACH_TYPE_PISGAH 969 ++#define MACH_TYPE_OMAP_FSAMPLE 970 ++#define MACH_TYPE_SG720 971 ++#define MACH_TYPE_REDFOX 972 ++#define MACH_TYPE_MYSH_EP9315_1 973 ++#define MACH_TYPE_TPF106 974 ++#define MACH_TYPE_AT91RM9200KG 975 ++#define MACH_TYPE_SLEDB 976 ++#define MACH_TYPE_ONTRACK 977 ++#define MACH_TYPE_PM1200 978 ++#define MACH_TYPE_ESS24XXX 979 ++#define MACH_TYPE_COREMP7 980 ++#define MACH_TYPE_NEXCODER_6446 981 ++#define MACH_TYPE_STVC8380 982 ++#define MACH_TYPE_TEKLYNX 983 ++#define MACH_TYPE_CARBONADO 984 ++#define MACH_TYPE_SYSMOS_MP730 985 ++#define MACH_TYPE_SNAPPER_CL15 986 ++#define MACH_TYPE_PGIGIM 987 ++#define MACH_TYPE_PTX9160P2 988 ++#define MACH_TYPE_DCORE1 989 ++#define MACH_TYPE_VICTORPXA 990 ++#define MACH_TYPE_MX2DTB 991 ++#define MACH_TYPE_PXA_IREX_ER0100 992 ++#define MACH_TYPE_OMAP_PALMZ71 993 ++#define MACH_TYPE_BARTEC_DEG 994 ++#define MACH_TYPE_HW50251 995 ++#define MACH_TYPE_IBOX 996 ++#define MACH_TYPE_ATLASLH7A404 997 ++#define MACH_TYPE_PT2026 998 ++#define MACH_TYPE_HTCALPINE 999 ++#define MACH_TYPE_BARTEC_VTU 1000 ++#define MACH_TYPE_VCOREII 1001 ++#define MACH_TYPE_PDNB3 1002 ++#define MACH_TYPE_HTCBEETLES 1003 ++#define MACH_TYPE_S3C6400 1004 ++#define MACH_TYPE_S3C2443 1005 ++#define MACH_TYPE_OMAP_LDK 1006 ++#define MACH_TYPE_SMDK2460 1007 ++#define MACH_TYPE_SMDK2440 1008 ++#define MACH_TYPE_SMDK2412 1009 ++#define MACH_TYPE_WEBBOX 1010 ++#define MACH_TYPE_CWWNDP 1011 ++#define MACH_TYPE_DRAGON 1012 ++#define MACH_TYPE_OPENDO_CPU_BOARD 1013 ++#define MACH_TYPE_CCM2200 1014 ++#define MACH_TYPE_ETWARM 1015 ++#define MACH_TYPE_M93030 1016 ++#define MACH_TYPE_CC7U 1017 ++#define MACH_TYPE_MTT_RANGER 1018 ++#define MACH_TYPE_NEXUS 1019 ++#define MACH_TYPE_DESMAN 1020 ++#define MACH_TYPE_BKDE303 1021 ++#define MACH_TYPE_SMDK2413 1022 ++#define MACH_TYPE_AML_M7200 1023 ++#define MACH_TYPE_AML_M5900 1024 ++#define MACH_TYPE_SG640 1025 ++#define MACH_TYPE_EDG79524 1026 ++#define MACH_TYPE_AI2410 1027 ++#define MACH_TYPE_IXP465 1028 ++#define MACH_TYPE_BALLOON3 1029 ++#define MACH_TYPE_QT2410 1108 ++#define MACH_TYPE_NEO1973_GTA01 1182 ++#define MACH_TYPE_HXD8 1303 ++#define MACH_TYPE_NEO1973_GTA02 1304 + + #ifdef CONFIG_ARCH_EBSA110 + # ifdef machine_arch_type +@@ -3541,9 +3845,9 @@ + # else + # define machine_arch_type MACH_TYPE_RAMSES + # endif +-# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES) ++# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES) + #else +-# define machine_is_ramses() (0) ++# define machine_is_mnci() (0) + #endif + + #ifdef CONFIG_ARCH_S28X +@@ -4501,9 +4805,9 @@ + # else + # define machine_arch_type MACH_TYPE_M825XX + # endif +-# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX) ++# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX) + #else +-# define machine_is_m825xx() (0) ++# define machine_is_comcerto() (0) + #endif + + #ifdef CONFIG_SA1100_M7100 +@@ -5658,16 +5962,16 @@ + # define machine_is_xcep() (0) + #endif + +-#ifdef CONFIG_MACH_ARCOM_MERCURY ++#ifdef CONFIG_MACH_ARCOM_VULCAN + # ifdef machine_arch_type + # undef machine_arch_type + # define machine_arch_type __machine_arch_type + # else +-# define machine_arch_type MACH_TYPE_ARCOM_MERCURY ++# define machine_arch_type MACH_TYPE_ARCOM_VULCAN + # endif +-# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY) ++# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN) + #else +-# define machine_is_arcom_mercury() (0) ++# define machine_is_arcom_vulcan() (0) + #endif + + #ifdef CONFIG_MACH_STARGATE +@@ -6054,16 +6358,16 @@ + # define machine_is_ess710() (0) + #endif + +-#ifdef CONFIG_MACH_MX3ADS ++#ifdef CONFIG_MACH_MX31ADS + # ifdef machine_arch_type + # undef machine_arch_type + # define machine_arch_type __machine_arch_type + # else +-# define machine_arch_type MACH_TYPE_MX3ADS ++# define machine_arch_type MACH_TYPE_MX31ADS + # endif +-# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS) ++# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS) + #else +-# define machine_is_mx3ads() (0) ++# define machine_is_mx31ads() (0) + #endif + + #ifdef CONFIG_MACH_HIMALAYA +@@ -7333,9 +7637,9 @@ + # else + # define machine_arch_type MACH_TYPE_ARGONPLUSEVB + # endif +-# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) ++# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB) + #else +-# define machine_is_argonplusevb() (0) ++# define machine_is_i30030evb() (0) + #endif + + #ifdef CONFIG_MACH_SCMA11EVB +@@ -7345,9 +7649,9 @@ + # else + # define machine_arch_type MACH_TYPE_SCMA11EVB + # endif +-# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) ++# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_SCMA11EVB) + #else +-# define machine_is_scma11evb() (0) ++# define machine_is_mxc27530evb() (0) + #endif + + #ifdef CONFIG_MACH_SMDK2800 +@@ -8305,9 +8609,9 @@ + # else + # define machine_arch_type MACH_TYPE_SCMA11BB + # endif +-# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB) ++# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_SCMA11BB) + #else +-# define machine_is_scma11bb() (0) ++# define machine_is_mxc27530ads() (0) + #endif + + #ifdef CONFIG_MACH_TRIZEPS3 +@@ -9193,9 +9497,9 @@ + # else + # define machine_arch_type MACH_TYPE_ZEUSEVB + # endif +-# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB) ++# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_ZEUSEVB) + #else +-# define machine_is_zeusevb() (0) ++# define machine_is_mxc91131evb() (0) + #endif + + #ifdef CONFIG_MACH_P700 +@@ -9402,6 +9706,3667 @@ + # define machine_is_mp2usb() (0) + #endif + ++#ifdef CONFIG_MACH_NTNP425C ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NTNP425C ++# endif ++# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C) ++#else ++# define machine_is_ntnp425c() (0) ++#endif ++ ++#ifdef CONFIG_MACH_COLIBRI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_COLIBRI ++# endif ++# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI) ++#else ++# define machine_is_colibri() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PCM7220 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PCM7220 ++# endif ++# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220) ++#else ++# define machine_is_pcm7220() (0) ++#endif ++ ++#ifdef CONFIG_MACH_GATEWAY7001 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_GATEWAY7001 ++# endif ++# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001) ++#else ++# define machine_is_gateway7001() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PCM027 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PCM027 ++# endif ++# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027) ++#else ++# define machine_is_pcm027() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CMPXA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CMPXA ++# endif ++# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA) ++#else ++# define machine_is_cmpxa() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ANUBIS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ANUBIS ++# endif ++# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS) ++#else ++# define machine_is_anubis() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ITE8152 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ITE8152 ++# endif ++# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152) ++#else ++# define machine_is_ite8152() (0) ++#endif ++ ++#ifdef CONFIG_MACH_LPC3XXX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_LPC3XXX ++# endif ++# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX) ++#else ++# define machine_is_lpc3xxx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PUPPETEER ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PUPPETEER ++# endif ++# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER) ++#else ++# define machine_is_puppeteer() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MACH_VADATECH ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MACH_VADATECH ++# endif ++# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH) ++#else ++# define machine_is_vt001() (0) ++#endif ++ ++#ifdef CONFIG_MACH_E570 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_E570 ++# endif ++# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570) ++#else ++# define machine_is_e570() (0) ++#endif ++ ++#ifdef CONFIG_MACH_X50 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_X50 ++# endif ++# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50) ++#else ++# define machine_is_x50() (0) ++#endif ++ ++#ifdef CONFIG_MACH_RECON ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_RECON ++# endif ++# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON) ++#else ++# define machine_is_recon() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XBOARDGP8 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XBOARDGP8 ++# endif ++# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8) ++#else ++# define machine_is_xboardgp8() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FPIC2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FPIC2 ++# endif ++# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2) ++#else ++# define machine_is_fpic2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AKITA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AKITA ++# endif ++# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA) ++#else ++# define machine_is_akita() (0) ++#endif ++ ++#ifdef CONFIG_MACH_A81 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_A81 ++# endif ++# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81) ++#else ++# define machine_is_a81() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SVM_SC25X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SVM_SC25X ++# endif ++# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X) ++#else ++# define machine_is_svm_sc25x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_VADATECH020 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_VADATECH020 ++# endif ++# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020) ++#else ++# define machine_is_vt020() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TLI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TLI ++# endif ++# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI) ++#else ++# define machine_is_tli() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EDB9315LC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EDB9315LC ++# endif ++# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC) ++#else ++# define machine_is_edb9315lc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PASSEC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PASSEC ++# endif ++# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC) ++#else ++# define machine_is_passec() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DS_TIGER ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DS_TIGER ++# endif ++# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER) ++#else ++# define machine_is_ds_tiger() (0) ++#endif ++ ++#ifdef CONFIG_MACH_E310 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_E310 ++# endif ++# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310) ++#else ++# define machine_is_e310() (0) ++#endif ++ ++#ifdef CONFIG_MACH_E330 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_E330 ++# endif ++# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330) ++#else ++# define machine_is_e330() (0) ++#endif ++ ++#ifdef CONFIG_MACH_RT3000 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_RT3000 ++# endif ++# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000) ++#else ++# define machine_is_rt3000() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NOKIA770 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NOKIA770 ++# endif ++# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770) ++#else ++# define machine_is_nokia770() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PNX0106 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PNX0106 ++# endif ++# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106) ++#else ++# define machine_is_pnx0106() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HX21XX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HX21XX ++# endif ++# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX) ++#else ++# define machine_is_hx21xx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FARADAY ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FARADAY ++# endif ++# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY) ++#else ++# define machine_is_faraday() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SBC9312 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SBC9312 ++# endif ++# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312) ++#else ++# define machine_is_sbc9312() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BATMAN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BATMAN ++# endif ++# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN) ++#else ++# define machine_is_batman() (0) ++#endif ++ ++#ifdef CONFIG_MACH_JPD201 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_JPD201 ++# endif ++# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201) ++#else ++# define machine_is_jpd201() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MIPSA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MIPSA ++# endif ++# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA) ++#else ++# define machine_is_mipsa() (0) ++#endif ++ ++#ifdef CONFIG_MACH_KACOM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_KACOM ++# endif ++# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM) ++#else ++# define machine_is_kacom() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SWARCOCPU ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SWARCOCPU ++# endif ++# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU) ++#else ++# define machine_is_swarcocpu() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SWARCODSL ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SWARCODSL ++# endif ++# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL) ++#else ++# define machine_is_swarcodsl() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BLUEANGEL ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BLUEANGEL ++# endif ++# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL) ++#else ++# define machine_is_blueangel() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HAIRYGRAMA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HAIRYGRAMA ++# endif ++# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA) ++#else ++# define machine_is_hairygrama() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BANFF ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BANFF ++# endif ++# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF) ++#else ++# define machine_is_banff() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CARMEVA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CARMEVA ++# endif ++# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA) ++#else ++# define machine_is_carmeva() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SAM255 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SAM255 ++# endif ++# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255) ++#else ++# define machine_is_sam255() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PPM10 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PPM10 ++# endif ++# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10) ++#else ++# define machine_is_ppm10() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EDB9315A ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EDB9315A ++# endif ++# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A) ++#else ++# define machine_is_edb9315a() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SUNSET ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SUNSET ++# endif ++# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET) ++#else ++# define machine_is_sunset() (0) ++#endif ++ ++#ifdef CONFIG_MACH_STARGATE2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_STARGATE2 ++# endif ++# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2) ++#else ++# define machine_is_stargate2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_INTELMOTE2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_INTELMOTE2 ++# endif ++# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2) ++#else ++# define machine_is_intelmote2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TRIZEPS4 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TRIZEPS4 ++# endif ++# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4) ++#else ++# define machine_is_trizeps4() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAINSTONE2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAINSTONE2 ++# endif ++# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2) ++#else ++# define machine_is_mainstone2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EZ_IXP42X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EZ_IXP42X ++# endif ++# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X) ++#else ++# define machine_is_ez_ixp42x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TAPWAVE_ZODIAC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC ++# endif ++# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC) ++#else ++# define machine_is_tapwave_zodiac() (0) ++#endif ++ ++#ifdef CONFIG_MACH_UNIVERSALMETER ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_UNIVERSALMETER ++# endif ++# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER) ++#else ++# define machine_is_universalmeter() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HICOARM9 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HICOARM9 ++# endif ++# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9) ++#else ++# define machine_is_hicoarm9() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PNX4008 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PNX4008 ++# endif ++# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008) ++#else ++# define machine_is_pnx4008() (0) ++#endif ++ ++#ifdef CONFIG_MACH_KWS6000 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_KWS6000 ++# endif ++# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000) ++#else ++# define machine_is_kws6000() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PORTUX920T ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PORTUX920T ++# endif ++# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T) ++#else ++# define machine_is_portux920t() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EZ_X5 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EZ_X5 ++# endif ++# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5) ++#else ++# define machine_is_ez_x5() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_RUDOLPH ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH ++# endif ++# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH) ++#else ++# define machine_is_omap_rudolph() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CPUAT91 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CPUAT91 ++# endif ++# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91) ++#else ++# define machine_is_cpuat91() (0) ++#endif ++ ++#ifdef CONFIG_MACH_REA9200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_REA9200 ++# endif ++# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200) ++#else ++# define machine_is_rea9200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ACTS_PUNE_SA1110 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110 ++# endif ++# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110) ++#else ++# define machine_is_acts_pune_sa1110() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IXP425 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IXP425 ++# endif ++# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425) ++#else ++# define machine_is_ixp425() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ARGONPLUSODYSSEY ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ARGONPLUSODYSSEY ++# endif ++# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_ARGONPLUSODYSSEY) ++#else ++# define machine_is_i30030ads() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PERCH ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PERCH ++# endif ++# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH) ++#else ++# define machine_is_perch() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EIS05R1 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EIS05R1 ++# endif ++# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1) ++#else ++# define machine_is_eis05r1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PEPPERPAD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PEPPERPAD ++# endif ++# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD) ++#else ++# define machine_is_pepperpad() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SB3010 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SB3010 ++# endif ++# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010) ++#else ++# define machine_is_sb3010() (0) ++#endif ++ ++#ifdef CONFIG_MACH_RM9200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_RM9200 ++# endif ++# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200) ++#else ++# define machine_is_rm9200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DMA03 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DMA03 ++# endif ++# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03) ++#else ++# define machine_is_dma03() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ROAD_S101 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ROAD_S101 ++# endif ++# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101) ++#else ++# define machine_is_road_s101() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ_NEXTGEN_A ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A ++# endif ++# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A) ++#else ++# define machine_is_iq_nextgen_a() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ_NEXTGEN_B ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B ++# endif ++# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B) ++#else ++# define machine_is_iq_nextgen_b() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ_NEXTGEN_C ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C ++# endif ++# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C) ++#else ++# define machine_is_iq_nextgen_c() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ_NEXTGEN_D ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D ++# endif ++# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D) ++#else ++# define machine_is_iq_nextgen_d() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ_NEXTGEN_E ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E ++# endif ++# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E) ++#else ++# define machine_is_iq_nextgen_e() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MALLOW_AT91 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MALLOW_AT91 ++# endif ++# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91) ++#else ++# define machine_is_mallow_at91() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CYBERTRACKER_I ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CYBERTRACKER_I ++# endif ++# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I) ++#else ++# define machine_is_cybertracker_i() (0) ++#endif ++ ++#ifdef CONFIG_MACH_GESBC931X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_GESBC931X ++# endif ++# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X) ++#else ++# define machine_is_gesbc931x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CENTIPAD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CENTIPAD ++# endif ++# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD) ++#else ++# define machine_is_centipad() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ARMSOC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ARMSOC ++# endif ++# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC) ++#else ++# define machine_is_armsoc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SE4200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SE4200 ++# endif ++# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200) ++#else ++# define machine_is_se4200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EMS197A ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EMS197A ++# endif ++# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A) ++#else ++# define machine_is_ems197a() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MICRO9 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MICRO9 ++# endif ++# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9) ++#else ++# define machine_is_micro9() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MICRO9L ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MICRO9L ++# endif ++# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L) ++#else ++# define machine_is_micro9l() (0) ++#endif ++ ++#ifdef CONFIG_MACH_UC5471DSP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_UC5471DSP ++# endif ++# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP) ++#else ++# define machine_is_uc5471dsp() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SJ5471ENG ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SJ5471ENG ++# endif ++# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG) ++#else ++# define machine_is_sj5471eng() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CMPXA26X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CMPXA26X ++# endif ++# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X) ++#else ++# define machine_is_none() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NC ++# endif ++# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC) ++#else ++# define machine_is_nc1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_PALMTE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_PALMTE ++# endif ++# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE) ++#else ++# define machine_is_omap_palmte() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AJAX52X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AJAX52X ++# endif ++# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X) ++#else ++# define machine_is_ajax52x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SIRIUSTAR ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SIRIUSTAR ++# endif ++# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR) ++#else ++# define machine_is_siriustar() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IODATA_HDLG ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IODATA_HDLG ++# endif ++# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG) ++#else ++# define machine_is_iodata_hdlg() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AT91RM9200UTL ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AT91RM9200UTL ++# endif ++# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL) ++#else ++# define machine_is_at91rm9200utl() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BIOSAFE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BIOSAFE ++# endif ++# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE) ++#else ++# define machine_is_biosafe() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MP1000 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MP1000 ++# endif ++# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000) ++#else ++# define machine_is_mp1000() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PARSY ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PARSY ++# endif ++# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY) ++#else ++# define machine_is_parsy() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CCXP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CCXP ++# endif ++# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP) ++#else ++# define machine_is_ccxp270() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_GSAMPLE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE ++# endif ++# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE) ++#else ++# define machine_is_omap_gsample() (0) ++#endif ++ ++#ifdef CONFIG_MACH_REALVIEW_EB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_REALVIEW_EB ++# endif ++# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB) ++#else ++# define machine_is_realview_eb() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SAMOA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SAMOA ++# endif ++# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA) ++#else ++# define machine_is_samoa() (0) ++#endif ++ ++#ifdef CONFIG_MACH_T3XSCALE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_T3XSCALE ++# endif ++# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE) ++#else ++# define machine_is_t3xscale() (0) ++#endif ++ ++#ifdef CONFIG_MACH_I878 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_I878 ++# endif ++# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878) ++#else ++# define machine_is_i878() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BORZOI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BORZOI ++# endif ++# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI) ++#else ++# define machine_is_borzoi() (0) ++#endif ++ ++#ifdef CONFIG_MACH_GECKO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_GECKO ++# endif ++# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO) ++#else ++# define machine_is_gecko() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DS101 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DS101 ++# endif ++# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101) ++#else ++# define machine_is_ds101() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_PALMTT2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_PALMTT2 ++# endif ++# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2) ++#else ++# define machine_is_omap_palmtt2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XSCALE_PALMLD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XSCALE_PALMLD ++# endif ++# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD) ++#else ++# define machine_is_xscale_palmld() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CC9C ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CC9C ++# endif ++# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C) ++#else ++# define machine_is_cc9c() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SBC1670 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SBC1670 ++# endif ++# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670) ++#else ++# define machine_is_sbc1670() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IXDP28X5 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IXDP28X5 ++# endif ++# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5) ++#else ++# define machine_is_ixdp28x5() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_PALMTT ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_PALMTT ++# endif ++# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT) ++#else ++# define machine_is_omap_palmtt() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ML696K ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ML696K ++# endif ++# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K) ++#else ++# define machine_is_ml696k() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ARCOM_ZEUS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ARCOM_ZEUS ++# endif ++# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS) ++#else ++# define machine_is_arcom_zeus() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OSIRIS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OSIRIS ++# endif ++# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS) ++#else ++# define machine_is_osiris() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAESTRO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAESTRO ++# endif ++# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO) ++#else ++# define machine_is_maestro() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TUNGE2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TUNGE2 ++# endif ++# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2) ++#else ++# define machine_is_tunge2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IXBBM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IXBBM ++# endif ++# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM) ++#else ++# define machine_is_ixbbm() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MX27 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MX27 ++# endif ++# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27) ++#else ++# define machine_is_mx27ads() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AX8004 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AX8004 ++# endif ++# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004) ++#else ++# define machine_is_ax8004() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AT91SAM9261EK ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AT91SAM9261EK ++# endif ++# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK) ++#else ++# define machine_is_at91sam9261ek() (0) ++#endif ++ ++#ifdef CONFIG_MACH_LOFT ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_LOFT ++# endif ++# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT) ++#else ++# define machine_is_loft() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAGPIE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAGPIE ++# endif ++# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE) ++#else ++# define machine_is_magpie() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MX21 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MX21 ++# endif ++# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21) ++#else ++# define machine_is_mx21ads() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MB87M3400 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MB87M3400 ++# endif ++# define machine_is_mb87m3400() (machine_arch_type == MACH_TYPE_MB87M3400) ++#else ++# define machine_is_mb87m3400() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MGUARD_DELTA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MGUARD_DELTA ++# endif ++# define machine_is_mguard_delta() (machine_arch_type == MACH_TYPE_MGUARD_DELTA) ++#else ++# define machine_is_mguard_delta() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DAVINCI_DVDP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DAVINCI_DVDP ++# endif ++# define machine_is_davinci_dvdp() (machine_arch_type == MACH_TYPE_DAVINCI_DVDP) ++#else ++# define machine_is_davinci_dvdp() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HTCUNIVERSAL ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HTCUNIVERSAL ++# endif ++# define machine_is_htcuniversal() (machine_arch_type == MACH_TYPE_HTCUNIVERSAL) ++#else ++# define machine_is_htcuniversal() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TPAD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TPAD ++# endif ++# define machine_is_tpad() (machine_arch_type == MACH_TYPE_TPAD) ++#else ++# define machine_is_tpad() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ROVERP3 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ROVERP3 ++# endif ++# define machine_is_roverp3() (machine_arch_type == MACH_TYPE_ROVERP3) ++#else ++# define machine_is_roverp3() (0) ++#endif ++ ++#ifdef CONFIG_MACH_JORNADA928 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_JORNADA928 ++# endif ++# define machine_is_jornada928() (machine_arch_type == MACH_TYPE_JORNADA928) ++#else ++# define machine_is_jornada928() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MV88FXX81 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MV88FXX81 ++# endif ++# define machine_is_mv88fxx81() (machine_arch_type == MACH_TYPE_MV88FXX81) ++#else ++# define machine_is_mv88fxx81() (0) ++#endif ++ ++#ifdef CONFIG_MACH_STMP36XX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_STMP36XX ++# endif ++# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX) ++#else ++# define machine_is_stmp36xx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SXNI79524 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SXNI79524 ++# endif ++# define machine_is_sxni79524() (machine_arch_type == MACH_TYPE_SXNI79524) ++#else ++# define machine_is_sxni79524() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AMS_DELTA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AMS_DELTA ++# endif ++# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA) ++#else ++# define machine_is_ams_delta() (0) ++#endif ++ ++#ifdef CONFIG_MACH_URANIUM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_URANIUM ++# endif ++# define machine_is_uranium() (machine_arch_type == MACH_TYPE_URANIUM) ++#else ++# define machine_is_uranium() (0) ++#endif ++ ++#ifdef CONFIG_MACH_UCON ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_UCON ++# endif ++# define machine_is_ucon() (machine_arch_type == MACH_TYPE_UCON) ++#else ++# define machine_is_ucon() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NAS100D ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NAS100D ++# endif ++# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D) ++#else ++# define machine_is_nas100d() (0) ++#endif ++ ++#ifdef CONFIG_MACH_L083_1000 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_L083_1000 ++# endif ++# define machine_is_l083() (machine_arch_type == MACH_TYPE_L083_1000) ++#else ++# define machine_is_l083() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EZX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EZX ++# endif ++# define machine_is_ezx() (machine_arch_type == MACH_TYPE_EZX) ++#else ++# define machine_is_ezx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PNX5220 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PNX5220 ++# endif ++# define machine_is_pnx5220() (machine_arch_type == MACH_TYPE_PNX5220) ++#else ++# define machine_is_pnx5220() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BUTTE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BUTTE ++# endif ++# define machine_is_butte() (machine_arch_type == MACH_TYPE_BUTTE) ++#else ++# define machine_is_butte() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SRM2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SRM2 ++# endif ++# define machine_is_srm2() (machine_arch_type == MACH_TYPE_SRM2) ++#else ++# define machine_is_srm2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DSBR ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DSBR ++# endif ++# define machine_is_dsbr() (machine_arch_type == MACH_TYPE_DSBR) ++#else ++# define machine_is_dsbr() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CRYSTALBALL ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CRYSTALBALL ++# endif ++# define machine_is_crystalball() (machine_arch_type == MACH_TYPE_CRYSTALBALL) ++#else ++# define machine_is_crystalball() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TINYPXA27X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TINYPXA27X ++# endif ++# define machine_is_tinypxa27x() (machine_arch_type == MACH_TYPE_TINYPXA27X) ++#else ++# define machine_is_tinypxa27x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HERBIE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HERBIE ++# endif ++# define machine_is_herbie() (machine_arch_type == MACH_TYPE_HERBIE) ++#else ++# define machine_is_herbie() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAGICIAN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAGICIAN ++# endif ++# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN) ++#else ++# define machine_is_magician() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CM4002 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CM4002 ++# endif ++# define machine_is_cm4002() (machine_arch_type == MACH_TYPE_CM4002) ++#else ++# define machine_is_cm4002() (0) ++#endif ++ ++#ifdef CONFIG_MACH_B4 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_B4 ++# endif ++# define machine_is_b4() (machine_arch_type == MACH_TYPE_B4) ++#else ++# define machine_is_b4() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAUI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAUI ++# endif ++# define machine_is_maui() (machine_arch_type == MACH_TYPE_MAUI) ++#else ++# define machine_is_maui() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CYBERTRACKER_G ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CYBERTRACKER_G ++# endif ++# define machine_is_cybertracker_g() (machine_arch_type == MACH_TYPE_CYBERTRACKER_G) ++#else ++# define machine_is_cybertracker_g() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NXDKN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NXDKN ++# endif ++# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN) ++#else ++# define machine_is_nxdkn() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MIO8390 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MIO8390 ++# endif ++# define machine_is_mio8390() (machine_arch_type == MACH_TYPE_MIO8390) ++#else ++# define machine_is_mio8390() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMI_BOARD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMI_BOARD ++# endif ++# define machine_is_omi_board() (machine_arch_type == MACH_TYPE_OMI_BOARD) ++#else ++# define machine_is_omi_board() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MX21CIV ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MX21CIV ++# endif ++# define machine_is_mx21civ() (machine_arch_type == MACH_TYPE_MX21CIV) ++#else ++# define machine_is_mx21civ() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MAHI_CDAC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MAHI_CDAC ++# endif ++# define machine_is_mahi_cdac() (machine_arch_type == MACH_TYPE_MAHI_CDAC) ++#else ++# define machine_is_mahi_cdac() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XSCALE_PALMTX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XSCALE_PALMTX ++# endif ++# define machine_is_xscale_palmtx() (machine_arch_type == MACH_TYPE_XSCALE_PALMTX) ++#else ++# define machine_is_xscale_palmtx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_S3C2413 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_S3C2413 ++# endif ++# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413) ++#else ++# define machine_is_s3c2413() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SAMSYS_EP0 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SAMSYS_EP0 ++# endif ++# define machine_is_samsys_ep0() (machine_arch_type == MACH_TYPE_SAMSYS_EP0) ++#else ++# define machine_is_samsys_ep0() (0) ++#endif ++ ++#ifdef CONFIG_MACH_WG302V1 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_WG302V1 ++# endif ++# define machine_is_wg302v1() (machine_arch_type == MACH_TYPE_WG302V1) ++#else ++# define machine_is_wg302v1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_WG302V2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_WG302V2 ++# endif ++# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2) ++#else ++# define machine_is_wg302v2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EB42X ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EB42X ++# endif ++# define machine_is_eb42x() (machine_arch_type == MACH_TYPE_EB42X) ++#else ++# define machine_is_eb42x() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IQ331ES ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IQ331ES ++# endif ++# define machine_is_iq331es() (machine_arch_type == MACH_TYPE_IQ331ES) ++#else ++# define machine_is_iq331es() (0) ++#endif ++ ++#ifdef CONFIG_MACH_COSYDSP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_COSYDSP ++# endif ++# define machine_is_cosydsp() (machine_arch_type == MACH_TYPE_COSYDSP) ++#else ++# define machine_is_cosydsp() (0) ++#endif ++ ++#ifdef CONFIG_MACH_UPLAT7D ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_UPLAT7D ++# endif ++# define machine_is_uplat7d_proto() (machine_arch_type == MACH_TYPE_UPLAT7D) ++#else ++# define machine_is_uplat7d_proto() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PTDAVINCI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PTDAVINCI ++# endif ++# define machine_is_ptdavinci() (machine_arch_type == MACH_TYPE_PTDAVINCI) ++#else ++# define machine_is_ptdavinci() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MBUS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MBUS ++# endif ++# define machine_is_mbus() (machine_arch_type == MACH_TYPE_MBUS) ++#else ++# define machine_is_mbus() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NADIA2VB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NADIA2VB ++# endif ++# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB) ++#else ++# define machine_is_nadia2vb() (0) ++#endif ++ ++#ifdef CONFIG_MACH_R1000 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_R1000 ++# endif ++# define machine_is_r1000() (machine_arch_type == MACH_TYPE_R1000) ++#else ++# define machine_is_r1000() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HW90250 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HW90250 ++# endif ++# define machine_is_hw90250() (machine_arch_type == MACH_TYPE_HW90250) ++#else ++# define machine_is_hw90250() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_2430SDP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_2430SDP ++# endif ++# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP) ++#else ++# define machine_is_omap_2430sdp() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DAVINCI_EVM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DAVINCI_EVM ++# endif ++# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM) ++#else ++# define machine_is_davinci_evm() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_TORNADO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_TORNADO ++# endif ++# define machine_is_omap_tornado() (machine_arch_type == MACH_TYPE_OMAP_TORNADO) ++#else ++# define machine_is_omap_tornado() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OLOCREEK ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OLOCREEK ++# endif ++# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK) ++#else ++# define machine_is_olocreek() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PALMZ72 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PALMZ72 ++# endif ++# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72) ++#else ++# define machine_is_palmz72() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NXDB500 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NXDB500 ++# endif ++# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500) ++#else ++# define machine_is_nxdb500() (0) ++#endif ++ ++#ifdef CONFIG_MACH_APF9328 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_APF9328 ++# endif ++# define machine_is_apf9328() (machine_arch_type == MACH_TYPE_APF9328) ++#else ++# define machine_is_apf9328() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_WIPOQ ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_WIPOQ ++# endif ++# define machine_is_omap_wipoq() (machine_arch_type == MACH_TYPE_OMAP_WIPOQ) ++#else ++# define machine_is_omap_wipoq() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_TWIP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_TWIP ++# endif ++# define machine_is_omap_twip() (machine_arch_type == MACH_TYPE_OMAP_TWIP) ++#else ++# define machine_is_omap_twip() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XSCALE_PALMTREO650 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XSCALE_PALMTREO650 ++# endif ++# define machine_is_xscale_treo650() (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650) ++#else ++# define machine_is_xscale_treo650() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ACUMEN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ACUMEN ++# endif ++# define machine_is_acumen() (machine_arch_type == MACH_TYPE_ACUMEN) ++#else ++# define machine_is_acumen() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XP100 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XP100 ++# endif ++# define machine_is_xp100() (machine_arch_type == MACH_TYPE_XP100) ++#else ++# define machine_is_xp100() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FS2410 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FS2410 ++# endif ++# define machine_is_fs2410() (machine_arch_type == MACH_TYPE_FS2410) ++#else ++# define machine_is_fs2410() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PXA270_CERF ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PXA270_CERF ++# endif ++# define machine_is_pxa270_cerf() (machine_arch_type == MACH_TYPE_PXA270_CERF) ++#else ++# define machine_is_pxa270_cerf() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SQ2FTLPALM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SQ2FTLPALM ++# endif ++# define machine_is_sq2ftlpalm() (machine_arch_type == MACH_TYPE_SQ2FTLPALM) ++#else ++# define machine_is_sq2ftlpalm() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BSEMSERVER ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BSEMSERVER ++# endif ++# define machine_is_bsemserver() (machine_arch_type == MACH_TYPE_BSEMSERVER) ++#else ++# define machine_is_bsemserver() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NETCLIENT ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NETCLIENT ++# endif ++# define machine_is_netclient() (machine_arch_type == MACH_TYPE_NETCLIENT) ++#else ++# define machine_is_netclient() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XSCALE_PALMTT5 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XSCALE_PALMTT5 ++# endif ++# define machine_is_xscale_palmtt5() (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5) ++#else ++# define machine_is_xscale_palmtt5() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_PALMTC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_PALMTC ++# endif ++# define machine_is_xscale_palmtc() (machine_arch_type == MACH_TYPE_OMAP_PALMTC) ++#else ++# define machine_is_xscale_palmtc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_APOLLON ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_APOLLON ++# endif ++# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON) ++#else ++# define machine_is_omap_apollon() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ARGONLVEVB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ARGONLVEVB ++# endif ++# define machine_is_mxc30030evb() (machine_arch_type == MACH_TYPE_ARGONLVEVB) ++#else ++# define machine_is_mxc30030evb() (0) ++#endif ++ ++#ifdef CONFIG_MACH_REA_2D ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_REA_2D ++# endif ++# define machine_is_rea_2d() (machine_arch_type == MACH_TYPE_REA_2D) ++#else ++# define machine_is_rea_2d() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TI3E524 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TI3E524 ++# endif ++# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524) ++#else ++# define machine_is_eti3e524() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ATEB9200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ATEB9200 ++# endif ++# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200) ++#else ++# define machine_is_ateb9200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AUCKLAND ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AUCKLAND ++# endif ++# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND) ++#else ++# define machine_is_auckland() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AK3320M ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AK3320M ++# endif ++# define machine_is_ak3220m() (machine_arch_type == MACH_TYPE_AK3320M) ++#else ++# define machine_is_ak3220m() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DURAMAX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DURAMAX ++# endif ++# define machine_is_duramax() (machine_arch_type == MACH_TYPE_DURAMAX) ++#else ++# define machine_is_duramax() (0) ++#endif ++ ++#ifdef CONFIG_MACH_N35 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_N35 ++# endif ++# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35) ++#else ++# define machine_is_n35() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PRONGHORN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PRONGHORN ++# endif ++# define machine_is_pronghorn() (machine_arch_type == MACH_TYPE_PRONGHORN) ++#else ++# define machine_is_pronghorn() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FUNDY ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FUNDY ++# endif ++# define machine_is_fundy() (machine_arch_type == MACH_TYPE_FUNDY) ++#else ++# define machine_is_fundy() (0) ++#endif ++ ++#ifdef CONFIG_MACH_LOGICPD_PXA270 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_LOGICPD_PXA270 ++# endif ++# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270) ++#else ++# define machine_is_logicpd_pxa270() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CPU777 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CPU777 ++# endif ++# define machine_is_cpu777() (machine_arch_type == MACH_TYPE_CPU777) ++#else ++# define machine_is_cpu777() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SIMICON9201 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SIMICON9201 ++# endif ++# define machine_is_simicon9201() (machine_arch_type == MACH_TYPE_SIMICON9201) ++#else ++# define machine_is_simicon9201() (0) ++#endif ++ ++#ifdef CONFIG_MACH_LEAP2_HPM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_LEAP2_HPM ++# endif ++# define machine_is_leap2_hpm() (machine_arch_type == MACH_TYPE_LEAP2_HPM) ++#else ++# define machine_is_leap2_hpm() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CM922TXA10 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CM922TXA10 ++# endif ++# define machine_is_cm922txa10() (machine_arch_type == MACH_TYPE_CM922TXA10) ++#else ++# define machine_is_cm922txa10() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PXA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PXA ++# endif ++# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA) ++#else ++# define machine_is_sandgate() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SANDGATE2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SANDGATE2 ++# endif ++# define machine_is_sandgate2() (machine_arch_type == MACH_TYPE_SANDGATE2) ++#else ++# define machine_is_sandgate2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SANDGATE2G ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SANDGATE2G ++# endif ++# define machine_is_sandgate2g() (machine_arch_type == MACH_TYPE_SANDGATE2G) ++#else ++# define machine_is_sandgate2g() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SANDGATE2P ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SANDGATE2P ++# endif ++# define machine_is_sandgate2p() (machine_arch_type == MACH_TYPE_SANDGATE2P) ++#else ++# define machine_is_sandgate2p() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FRED_JACK ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FRED_JACK ++# endif ++# define machine_is_fred_jack() (machine_arch_type == MACH_TYPE_FRED_JACK) ++#else ++# define machine_is_fred_jack() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TTG_COLOR1 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TTG_COLOR1 ++# endif ++# define machine_is_ttg_color1() (machine_arch_type == MACH_TYPE_TTG_COLOR1) ++#else ++# define machine_is_ttg_color1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NXEB500HMI ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NXEB500HMI ++# endif ++# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI) ++#else ++# define machine_is_nxeb500hmi() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NETDCU8 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NETDCU8 ++# endif ++# define machine_is_netdcu8() (machine_arch_type == MACH_TYPE_NETDCU8) ++#else ++# define machine_is_netdcu8() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ML675050_CPU_BOA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ML675050_CPU_BOA ++# endif ++# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA) ++#else ++# define machine_is_ml675050_cpu_boa() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NG_FVX538 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NG_FVX538 ++# endif ++# define machine_is_ng_fvx538() (machine_arch_type == MACH_TYPE_NG_FVX538) ++#else ++# define machine_is_ng_fvx538() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NG_FVS338 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NG_FVS338 ++# endif ++# define machine_is_ng_fvs338() (machine_arch_type == MACH_TYPE_NG_FVS338) ++#else ++# define machine_is_ng_fvs338() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PNX4103 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PNX4103 ++# endif ++# define machine_is_pnx4103() (machine_arch_type == MACH_TYPE_PNX4103) ++#else ++# define machine_is_pnx4103() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HESDB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HESDB ++# endif ++# define machine_is_hesdb() (machine_arch_type == MACH_TYPE_HESDB) ++#else ++# define machine_is_hesdb() (0) ++#endif ++ ++#ifdef CONFIG_MACH_XSILO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_XSILO ++# endif ++# define machine_is_xsilo() (machine_arch_type == MACH_TYPE_XSILO) ++#else ++# define machine_is_xsilo() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ESPRESSO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ESPRESSO ++# endif ++# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO) ++#else ++# define machine_is_espresso() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EMLC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EMLC ++# endif ++# define machine_is_emlc() (machine_arch_type == MACH_TYPE_EMLC) ++#else ++# define machine_is_emlc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SISTERON ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SISTERON ++# endif ++# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON) ++#else ++# define machine_is_sisteron() (0) ++#endif ++ ++#ifdef CONFIG_MACH_RX1950 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_RX1950 ++# endif ++# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950) ++#else ++# define machine_is_rx1950() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TSC_VENUS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TSC_VENUS ++# endif ++# define machine_is_tsc_venus() (machine_arch_type == MACH_TYPE_TSC_VENUS) ++#else ++# define machine_is_tsc_venus() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DS101J ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DS101J ++# endif ++# define machine_is_ds101j() (machine_arch_type == MACH_TYPE_DS101J) ++#else ++# define machine_is_ds101j() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MXC30030ADS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MXC30030ADS ++# endif ++# define machine_is_mxc30030ads() (machine_arch_type == MACH_TYPE_MXC30030ADS) ++#else ++# define machine_is_mxc30030ads() (0) ++#endif ++ ++#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_FUJITSU_WIMAXSOC ++# endif ++# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC) ++#else ++# define machine_is_fujitsu_wimaxsoc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DUALPCMODEM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DUALPCMODEM ++# endif ++# define machine_is_dualpcmodem() (machine_arch_type == MACH_TYPE_DUALPCMODEM) ++#else ++# define machine_is_dualpcmodem() (0) ++#endif ++ ++#ifdef CONFIG_MACH_GESBC9312 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_GESBC9312 ++# endif ++# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312) ++#else ++# define machine_is_gesbc9312() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HTCAPACHE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HTCAPACHE ++# endif ++# define machine_is_htcapache() (machine_arch_type == MACH_TYPE_HTCAPACHE) ++#else ++# define machine_is_htcapache() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IXDP435 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IXDP435 ++# endif ++# define machine_is_ixdp435() (machine_arch_type == MACH_TYPE_IXDP435) ++#else ++# define machine_is_ixdp435() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CATPROVT100 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CATPROVT100 ++# endif ++# define machine_is_catprovt100() (machine_arch_type == MACH_TYPE_CATPROVT100) ++#else ++# define machine_is_catprovt100() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PICOTUX1XX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PICOTUX1XX ++# endif ++# define machine_is_picotux1xx() (machine_arch_type == MACH_TYPE_PICOTUX1XX) ++#else ++# define machine_is_picotux1xx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PICOTUX2XX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PICOTUX2XX ++# endif ++# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX) ++#else ++# define machine_is_picotux2xx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DSMG600 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DSMG600 ++# endif ++# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600) ++#else ++# define machine_is_dsmg600() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EMPC2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EMPC2 ++# endif ++# define machine_is_empc2() (machine_arch_type == MACH_TYPE_EMPC2) ++#else ++# define machine_is_empc2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_VENTURA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_VENTURA ++# endif ++# define machine_is_ventura() (machine_arch_type == MACH_TYPE_VENTURA) ++#else ++# define machine_is_ventura() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PHIDGET_SBC ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PHIDGET_SBC ++# endif ++# define machine_is_phidget_sbc() (machine_arch_type == MACH_TYPE_PHIDGET_SBC) ++#else ++# define machine_is_phidget_sbc() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IJ3K ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IJ3K ++# endif ++# define machine_is_ij3k() (machine_arch_type == MACH_TYPE_IJ3K) ++#else ++# define machine_is_ij3k() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PISGAH ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PISGAH ++# endif ++# define machine_is_pisgah() (machine_arch_type == MACH_TYPE_PISGAH) ++#else ++# define machine_is_pisgah() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_FSAMPLE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE ++# endif ++# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE) ++#else ++# define machine_is_omap_fsample() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SG720 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SG720 ++# endif ++# define machine_is_sg720() (machine_arch_type == MACH_TYPE_SG720) ++#else ++# define machine_is_sg720() (0) ++#endif ++ ++#ifdef CONFIG_MACH_REDFOX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_REDFOX ++# endif ++# define machine_is_redfox() (machine_arch_type == MACH_TYPE_REDFOX) ++#else ++# define machine_is_redfox() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MYSH_EP9315_1 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MYSH_EP9315_1 ++# endif ++# define machine_is_mysh_ep9315_1() (machine_arch_type == MACH_TYPE_MYSH_EP9315_1) ++#else ++# define machine_is_mysh_ep9315_1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TPF106 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TPF106 ++# endif ++# define machine_is_tpf106() (machine_arch_type == MACH_TYPE_TPF106) ++#else ++# define machine_is_tpf106() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AT91RM9200KG ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AT91RM9200KG ++# endif ++# define machine_is_at91rm9200kg() (machine_arch_type == MACH_TYPE_AT91RM9200KG) ++#else ++# define machine_is_at91rm9200kg() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SLEDB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SLEDB ++# endif ++# define machine_is_racemt2() (machine_arch_type == MACH_TYPE_SLEDB) ++#else ++# define machine_is_racemt2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ONTRACK ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ONTRACK ++# endif ++# define machine_is_ontrack() (machine_arch_type == MACH_TYPE_ONTRACK) ++#else ++# define machine_is_ontrack() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PM1200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PM1200 ++# endif ++# define machine_is_pm1200() (machine_arch_type == MACH_TYPE_PM1200) ++#else ++# define machine_is_pm1200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ESS24XXX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ESS24XXX ++# endif ++# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX) ++#else ++# define machine_is_ess24562() (0) ++#endif ++ ++#ifdef CONFIG_MACH_COREMP7 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_COREMP7 ++# endif ++# define machine_is_coremp7() (machine_arch_type == MACH_TYPE_COREMP7) ++#else ++# define machine_is_coremp7() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NEXCODER_6446 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NEXCODER_6446 ++# endif ++# define machine_is_nexcoder_6446() (machine_arch_type == MACH_TYPE_NEXCODER_6446) ++#else ++# define machine_is_nexcoder_6446() (0) ++#endif ++ ++#ifdef CONFIG_MACH_STVC8380 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_STVC8380 ++# endif ++# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380) ++#else ++# define machine_is_stvc8380() (0) ++#endif ++ ++#ifdef CONFIG_MACH_TEKLYNX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_TEKLYNX ++# endif ++# define machine_is_teklynx() (machine_arch_type == MACH_TYPE_TEKLYNX) ++#else ++# define machine_is_teklynx() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CARBONADO ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CARBONADO ++# endif ++# define machine_is_carbonado() (machine_arch_type == MACH_TYPE_CARBONADO) ++#else ++# define machine_is_carbonado() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SYSMOS_MP730 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SYSMOS_MP730 ++# endif ++# define machine_is_sysmos_mp730() (machine_arch_type == MACH_TYPE_SYSMOS_MP730) ++#else ++# define machine_is_sysmos_mp730() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SNAPPER_CL15 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SNAPPER_CL15 ++# endif ++# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15) ++#else ++# define machine_is_snapper_cl15() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PGIGIM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PGIGIM ++# endif ++# define machine_is_pgigim() (machine_arch_type == MACH_TYPE_PGIGIM) ++#else ++# define machine_is_pgigim() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PTX9160P2 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PTX9160P2 ++# endif ++# define machine_is_ptx9160p2() (machine_arch_type == MACH_TYPE_PTX9160P2) ++#else ++# define machine_is_ptx9160p2() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DCORE1 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DCORE1 ++# endif ++# define machine_is_dcore1() (machine_arch_type == MACH_TYPE_DCORE1) ++#else ++# define machine_is_dcore1() (0) ++#endif ++ ++#ifdef CONFIG_MACH_VICTORPXA ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_VICTORPXA ++# endif ++# define machine_is_victorpxa() (machine_arch_type == MACH_TYPE_VICTORPXA) ++#else ++# define machine_is_victorpxa() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MX2DTB ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MX2DTB ++# endif ++# define machine_is_mx2dtb() (machine_arch_type == MACH_TYPE_MX2DTB) ++#else ++# define machine_is_mx2dtb() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PXA_IREX_ER0100 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PXA_IREX_ER0100 ++# endif ++# define machine_is_pxa_irex_er0100() (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100) ++#else ++# define machine_is_pxa_irex_er0100() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_PALMZ71 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_PALMZ71 ++# endif ++# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71) ++#else ++# define machine_is_omap_palmz71() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BARTEC_DEG ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BARTEC_DEG ++# endif ++# define machine_is_bartec_deg() (machine_arch_type == MACH_TYPE_BARTEC_DEG) ++#else ++# define machine_is_bartec_deg() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HW50251 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HW50251 ++# endif ++# define machine_is_hw50251() (machine_arch_type == MACH_TYPE_HW50251) ++#else ++# define machine_is_hw50251() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IBOX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IBOX ++# endif ++# define machine_is_ibox() (machine_arch_type == MACH_TYPE_IBOX) ++#else ++# define machine_is_ibox() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ATLASLH7A404 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ATLASLH7A404 ++# endif ++# define machine_is_atlaslh7a404() (machine_arch_type == MACH_TYPE_ATLASLH7A404) ++#else ++# define machine_is_atlaslh7a404() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PT2026 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PT2026 ++# endif ++# define machine_is_pt2026() (machine_arch_type == MACH_TYPE_PT2026) ++#else ++# define machine_is_pt2026() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HTCALPINE ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HTCALPINE ++# endif ++# define machine_is_htcalpine() (machine_arch_type == MACH_TYPE_HTCALPINE) ++#else ++# define machine_is_htcalpine() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BARTEC_VTU ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BARTEC_VTU ++# endif ++# define machine_is_bartec_vtu() (machine_arch_type == MACH_TYPE_BARTEC_VTU) ++#else ++# define machine_is_bartec_vtu() (0) ++#endif ++ ++#ifdef CONFIG_MACH_VCOREII ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_VCOREII ++# endif ++# define machine_is_vcoreii() (machine_arch_type == MACH_TYPE_VCOREII) ++#else ++# define machine_is_vcoreii() (0) ++#endif ++ ++#ifdef CONFIG_MACH_PDNB3 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_PDNB3 ++# endif ++# define machine_is_pdnb3() (machine_arch_type == MACH_TYPE_PDNB3) ++#else ++# define machine_is_pdnb3() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HTCBEETLES ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HTCBEETLES ++# endif ++# define machine_is_htcbeetles() (machine_arch_type == MACH_TYPE_HTCBEETLES) ++#else ++# define machine_is_htcbeetles() (0) ++#endif ++ ++#ifdef CONFIG_MACH_S3C6400 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_S3C6400 ++# endif ++# define machine_is_s3c6400() (machine_arch_type == MACH_TYPE_S3C6400) ++#else ++# define machine_is_s3c6400() (0) ++#endif ++ ++#ifdef CONFIG_MACH_S3C2443 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_S3C2443 ++# endif ++# define machine_is_s3c2443() (machine_arch_type == MACH_TYPE_S3C2443) ++#else ++# define machine_is_s3c2443() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OMAP_LDK ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OMAP_LDK ++# endif ++# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK) ++#else ++# define machine_is_omap_ldk() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SMDK2460 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SMDK2460 ++# endif ++# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460) ++#else ++# define machine_is_smdk2460() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SMDK2440 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SMDK2440 ++# endif ++# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440) ++#else ++# define machine_is_smdk2440() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SMDK2412 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SMDK2412 ++# endif ++# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412) ++#else ++# define machine_is_smdk2412() (0) ++#endif ++ ++#ifdef CONFIG_MACH_WEBBOX ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_WEBBOX ++# endif ++# define machine_is_webbox() (machine_arch_type == MACH_TYPE_WEBBOX) ++#else ++# define machine_is_webbox() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CWWNDP ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CWWNDP ++# endif ++# define machine_is_cwwndp() (machine_arch_type == MACH_TYPE_CWWNDP) ++#else ++# define machine_is_cwwndp() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DRAGON ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DRAGON ++# endif ++# define machine_is_dragon() (machine_arch_type == MACH_TYPE_DRAGON) ++#else ++# define machine_is_dragon() (0) ++#endif ++ ++#ifdef CONFIG_MACH_OPENDO_CPU_BOARD ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_OPENDO_CPU_BOARD ++# endif ++# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD) ++#else ++# define machine_is_opendo_cpu_board() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CCM2200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CCM2200 ++# endif ++# define machine_is_ccm2200() (machine_arch_type == MACH_TYPE_CCM2200) ++#else ++# define machine_is_ccm2200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_ETWARM ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_ETWARM ++# endif ++# define machine_is_etwarm() (machine_arch_type == MACH_TYPE_ETWARM) ++#else ++# define machine_is_etwarm() (0) ++#endif ++ ++#ifdef CONFIG_MACH_M93030 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_M93030 ++# endif ++# define machine_is_m93030() (machine_arch_type == MACH_TYPE_M93030) ++#else ++# define machine_is_m93030() (0) ++#endif ++ ++#ifdef CONFIG_MACH_CC7U ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_CC7U ++# endif ++# define machine_is_cc7u() (machine_arch_type == MACH_TYPE_CC7U) ++#else ++# define machine_is_cc7u() (0) ++#endif ++ ++#ifdef CONFIG_MACH_MTT_RANGER ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_MTT_RANGER ++# endif ++# define machine_is_mtt_ranger() (machine_arch_type == MACH_TYPE_MTT_RANGER) ++#else ++# define machine_is_mtt_ranger() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NEXUS ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NEXUS ++# endif ++# define machine_is_nexus() (machine_arch_type == MACH_TYPE_NEXUS) ++#else ++# define machine_is_nexus() (0) ++#endif ++ ++#ifdef CONFIG_MACH_DESMAN ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_DESMAN ++# endif ++# define machine_is_desman() (machine_arch_type == MACH_TYPE_DESMAN) ++#else ++# define machine_is_desman() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BKDE303 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BKDE303 ++# endif ++# define machine_is_bkde303() (machine_arch_type == MACH_TYPE_BKDE303) ++#else ++# define machine_is_bkde303() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SMDK2413 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SMDK2413 ++# endif ++# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413) ++#else ++# define machine_is_smdk2413() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AML_M7200 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AML_M7200 ++# endif ++# define machine_is_aml_m7200() (machine_arch_type == MACH_TYPE_AML_M7200) ++#else ++# define machine_is_aml_m7200() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AML_M5900 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AML_M5900 ++# endif ++# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900) ++#else ++# define machine_is_aml_m5900() (0) ++#endif ++ ++#ifdef CONFIG_MACH_SG640 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_SG640 ++# endif ++# define machine_is_sg640() (machine_arch_type == MACH_TYPE_SG640) ++#else ++# define machine_is_sg640() (0) ++#endif ++ ++#ifdef CONFIG_MACH_EDG79524 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_EDG79524 ++# endif ++# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524) ++#else ++# define machine_is_edg79524() (0) ++#endif ++ ++#ifdef CONFIG_MACH_AI2410 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_AI2410 ++# endif ++# define machine_is_ai2410() (machine_arch_type == MACH_TYPE_AI2410) ++#else ++# define machine_is_ai2410() (0) ++#endif ++ ++#ifdef CONFIG_MACH_IXP465 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_IXP465 ++# endif ++# define machine_is_ixp465() (machine_arch_type == MACH_TYPE_IXP465) ++#else ++# define machine_is_ixp465() (0) ++#endif ++ ++#ifdef CONFIG_MACH_BALLOON3 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_BALLOON3 ++# endif ++# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3) ++#else ++# define machine_is_balloon3() (0) ++#endif ++ ++#ifdef CONFIG_MACH_QT2410 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_QT2410 ++# endif ++# define machine_is_qt2410() (machine_arch_type == MACH_TYPE_QT2410) ++#else ++# define machine_is_qt2410() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NEO1973_GTA01 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NEO1973_GTA01 ++# endif ++# define machine_is_neo1973_gta01() (machine_arch_type == MACH_TYPE_NEO1973_GTA01) ++#else ++# define machine_is_neo1973_gta01() (0) ++#endif ++ ++#ifdef CONFIG_MACH_HXD8 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_HXD8 ++# endif ++# define machine_is_hxd8() (machine_arch_type == MACH_TYPE_HXD8) ++#else ++# define machine_is_neo8() (0) ++#endif ++ ++#ifdef CONFIG_MACH_NEO1973_GTA02 ++# ifdef machine_arch_type ++# undef machine_arch_type ++# define machine_arch_type __machine_arch_type ++# else ++# define machine_arch_type MACH_TYPE_NEO1973_GTA02 ++# endif ++# define machine_is_neo1973_gta02() (machine_arch_type == MACH_TYPE_NEO1973_GTA02) ++#else ++# define machine_is_neo1973_gta02() (0) ++#endif ++ ++ + /* + * These have not yet been registered + */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch new file mode 100644 index 0000000000..a44434155e --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch @@ -0,0 +1,10 @@ +Index: u-boot/tools/setlocalversion +=================================================================== +--- u-boot.orig/tools/setlocalversion 2007-03-26 14:42:58.000000000 +0200 ++++ u-boot/tools/setlocalversion 2007-03-26 14:46:47.000000000 +0200 +@@ -20,3 +20,5 @@ + printf '%s' -dirty + fi + fi ++ ++printf '%s' -moko9 diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch new file mode 100644 index 0000000000..d630889e3c --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch @@ -0,0 +1,20 @@ +This patch makes sure that the 'nand markbad' command does not only mark a block +'bad' in the bad-block table, but _also_ marks it bad in the OOB area. + +we need this to preserve the bad block status when re-creating the bad block table +at some later point. + +Signed-off-by: Harald Welte +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c 2007-03-01 12:47:31.000000000 +0100 ++++ u-boot/drivers/nand/nand_base.c 2007-03-01 12:48:08.000000000 +0100 +@@ -481,7 +481,7 @@ + + /* Do we have a flash based bad block table ? */ + if (this->options & NAND_USE_FLASH_BBT) +- return nand_update_bbt (mtd, ofs); ++ nand_update_bbt (mtd, ofs); + + /* We write two bytes, so we dont have to mess with 16 bit access */ + ofs += mtd->oobsize + (this->badblockpos & ~0x01); diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch new file mode 100644 index 0000000000..7e3aa4f480 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch @@ -0,0 +1,31 @@ +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h 2007-02-27 00:43:16.000000000 +0100 ++++ u-boot/include/configs/neo1973_gta01.h 2007-02-27 00:47:49.000000000 +0100 +@@ -115,8 +115,8 @@ + #include + + #define CONFIG_BOOTDELAY 3 +-#define CONFIG_BOOTARGS "rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8" +-#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x34000 0x200000; bootm 0x32000000" ++#define CONFIG_BOOTARGS "" ++#define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000" + + #define CONFIG_DOS_PARTITION 1 + +@@ -181,11 +181,14 @@ + #define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ + #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" + #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION +-#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" + #define CONFIG_USBD_DFU 1 + #define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */ + #define CONFIG_USBD_DFU_INTERFACE 2 + ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ "usbtty=cdc_acm\0" \ ++ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8\0" \ ++ "" + + /*----------------------------------------------------------------------- + * Physical Memory Map diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch new file mode 100644 index 0000000000..19d912620d --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch @@ -0,0 +1,113 @@ +Resume support for low-level uboot code, Version 5 + +Signed-off-by: Ben Dooks + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S 2007-02-28 03:51:24.000000000 +0100 ++++ u-boot/cpu/arm920t/start.S 2007-03-01 02:43:47.000000000 +0100 +@@ -158,18 +158,68 @@ + str r1, [r0] + # endif + ++ /* default FCLK is 202 MHz ! */ ++#define LOCKTIME 0x4c000000 ++#define UPLLCON 0x4c000008 ++//#define MPLLCFG ((0x90 << 12) + (0x2 << 4) + 0x2) ++#define MPLLCFG ((0x90 << 12) + (0x7 << 4) + 0x0) ++#define UPLLCFG ((0x78 << 12) + (0x2 << 4) + 0x3) ++ ldr r0, =LOCKTIME ++ mov r1, #0xffffff ++ str r1, [r0] ++ ++ ldr r0, =UPLLCON ++ ldr r1, =UPLLCFG ++ str r1, [r0] ++ ++ /* Page 7-19, seven nops between UPLL and MPLL */ ++ nop ++ nop ++ nop ++ nop ++ nop ++ nop ++ nop ++ ++ ldr r1, =MPLLCFG ++ str r1, [r0, #-4] /* MPLLCON */ ++ + /* FCLK:HCLK:PCLK = 1:2:4 */ +- /* default FCLK is 120 MHz ! */ + ldr r0, =CLKDIVN + mov r1, #3 + str r1, [r0] ++ ++#if 1 ++ /* enable uart */ ++ ldr r0, =0x4c00000c /* clkcon */ ++ ldr r1, =0x7fff0 /* all clocks on */ ++ str r1, [r0] ++ ++ /* gpio UART0 init */ ++ ldr r0, =0x56000070 ++ mov r1, #0xaa ++ str r1, [r0] ++ ++ /* init uart */ ++ ldr r0, =0x50000000 ++ mov r1, #0x03 ++ str r1, [r0] ++ ldr r1, =0x245 ++ str r1, [r0, #0x04] ++ mov r1, #0x01 ++ str r1, [r0, #0x08] ++ mov r1, #0x00 ++ str r1, [r0, #0x0c] ++ mov r1, #0x1a ++ str r1, [r0, #0x28] ++#endif ++ + #endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ + + #ifndef CONFIG_SKIP_LOWLEVEL_INIT + #ifndef CONFIG_LL_INIT_NAND_ONLY + bl cpu_init_crit + #endif +-#endif + + #ifndef CONFIG_SKIP_RELOCATE_UBOOT + adr r0, _start /* r0 <- current position of code */ +@@ -202,9 +252,33 @@ + + #ifdef CONFIG_S3C2410_NAND_BOOT + nand_load: ++ /* take sdram out of power down */ ++ ldr r0, =0x56000080 /* misccr */ ++ ldr r1, [ r0 ] ++ bic r1, r1, #(S3C2410_MISCCR_nEN_SCLK0 | S3C2410_MISCCR_nEN_SCLK1 | S3C2410_MISCCR_nEN_SCLKE) ++ str r1, [ r0 ] ++ ++ /* ensure signals stabalise */ ++ mov r1, #128 ++1: subs r1, r1, #1 ++ bpl 1b ++ + #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) + bl cpu_init_crit + #endif ++#if defined(CONFIG_S3C2410) ++ /* ensure some refresh has happened */ ++ ldr r1, =0xfffff ++1: subs r1, r1, #1 ++ bpl 1b ++ ++ /* test for resume */ ++ ldr r1, =0x560000B4 /* gstatus2 */ ++ ldr r0, [ r1 ] ++ tst r0, #0x02 /* is this resume from power down */ ++ ldrne pc, [r1, #4] /* gstatus3 */ ++#endif /* CONFIG_S3C2410 */ ++#endif /* CONFIG_SKIP_LOWLEVEL_INIT */ + + /* mov r10, lr */ + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch new file mode 100644 index 0000000000..6efe24651a --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch @@ -0,0 +1,45 @@ +Index: u-boot/include/s3c2410.h +=================================================================== +--- u-boot.orig/include/s3c2410.h ++++ u-boot/include/s3c2410.h +@@ -233,4 +233,40 @@ static inline S3C2410_SDI * S3C2410_GetB + rINTPND;\ + } + /* Wait until rINTPND is changed for the case that the ISR is very short. */ ++ ++#define S3C2410_MISCCR_USBDEV (0<<3) ++#define S3C2410_MISCCR_USBHOST (1<<3) ++ ++#define S3C2410_MISCCR_CLK0_MPLL (0<<4) ++#define S3C2410_MISCCR_CLK0_UPLL (1<<4) ++#define S3C2410_MISCCR_CLK0_FCLK (2<<4) ++#define S3C2410_MISCCR_CLK0_HCLK (3<<4) ++#define S3C2410_MISCCR_CLK0_PCLK (4<<4) ++#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) ++#define S3C2410_MISCCR_CLK0_MASK (7<<4) ++ ++#define S3C2410_MISCCR_CLK1_MPLL (0<<8) ++#define S3C2410_MISCCR_CLK1_UPLL (1<<8) ++#define S3C2410_MISCCR_CLK1_FCLK (2<<8) ++#define S3C2410_MISCCR_CLK1_HCLK (3<<8) ++#define S3C2410_MISCCR_CLK1_PCLK (4<<8) ++#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) ++#define S3C2410_MISCCR_CLK1_MASK (7<<8) ++ ++#define S3C2410_MISCCR_USBSUSPND0 (1<<12) ++#define S3C2410_MISCCR_USBSUSPND1 (1<<13) ++ ++#define S3C2410_MISCCR_nRSTCON (1<<16) ++ ++#define S3C2410_MISCCR_nEN_SCLK0 (1<<17) ++#define S3C2410_MISCCR_nEN_SCLK1 (1<<18) ++#define S3C2410_MISCCR_nEN_SCLKE (1<<19) ++#define S3C2410_MISCCR_SDSLEEP (7<<17) ++ ++#define S3C2410_CLKSLOW_UCLK_OFF (1<<7) ++#define S3C2410_CLKSLOW_MPLL_OFF (1<<5) ++#define S3C2410_CLKSLOW_SLOW (1<<4) ++#define S3C2410_CLKSLOW_SLOWVAL(x) (x) ++#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) ++ + #endif /*__S3C2410_H__*/ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch new file mode 100644 index 0000000000..b775beaa07 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch @@ -0,0 +1,818 @@ +This patch adds MMC/SD support to the S3C2410 SoC code in +u-boot + +Signed-off-by: Harald Welte + +Index: u-boot/cpu/arm920t/s3c24x0/Makefile +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/Makefile ++++ u-boot/cpu/arm920t/s3c24x0/Makefile +@@ -26,7 +26,7 @@ + LIB = $(obj)lib$(SOC).a + + COBJS = i2c.o interrupts.o serial.o speed.o \ +- usb_ohci.o nand_read.o nand.o cmd_s3c2410.o ++ usb_ohci.o nand_read.o nand.o mmc.o cmd_s3c2410.o + + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +Index: u-boot/cpu/arm920t/s3c24x0/mmc.c +=================================================================== +--- /dev/null ++++ u-boot/cpu/arm920t/s3c24x0/mmc.c +@@ -0,0 +1,531 @@ ++/* ++ * u-boot S3C2410 MMC/SD card driver ++ * (C) Copyright 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on u-boot pxa MMC driver and linux/drivers/mmc/s3c2410mci.c ++ * (C) 2005-2005 Thomas Kleffel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef CONFIG_MMC ++ ++#define CONFIG_MMC_WIDE ++ ++static S3C2410_SDI *sdi; ++ ++static block_dev_desc_t mmc_dev; ++ ++block_dev_desc_t * mmc_get_dev(int dev) ++{ ++ return ((block_dev_desc_t *)&mmc_dev); ++} ++ ++/* ++ * FIXME needs to read cid and csd info to determine block size ++ * and other parameters ++ */ ++static uchar mmc_buf[MMC_BLOCK_SIZE]; ++static mmc_csd_t mmc_csd; ++static int mmc_ready = 0; ++static int wide = 0; ++ ++ ++#define CMD_F_RESP 0x01 ++#define CMD_F_RESP_LONG 0x02 ++ ++static u_int32_t *mmc_cmd(ushort cmd, ulong arg, ushort flags) ++{ ++ static u_int32_t resp[5]; ++ ++ u_int32_t ccon, csta; ++ u_int32_t csta_rdy_bit = S3C2410_SDICMDSTAT_CMDSENT; ++ ++ memset(resp, 0, sizeof(resp)); ++ ++ debug("mmc_cmd CMD%d arg=0x%08x flags=%x\n", cmd, arg, flags); ++ ++ sdi->SDICSTA = 0xffffffff; ++ sdi->SDIDSTA = 0xffffffff; ++ sdi->SDIFSTA = 0xffffffff; ++ ++ sdi->SDICARG = arg; ++ ++ ccon = cmd & S3C2410_SDICMDCON_INDEX; ++ ccon |= S3C2410_SDICMDCON_SENDERHOST|S3C2410_SDICMDCON_CMDSTART; ++ ++ if (flags & CMD_F_RESP) { ++ ccon |= S3C2410_SDICMDCON_WAITRSP; ++ csta_rdy_bit = S3C2410_SDICMDSTAT_RSPFIN; /* 1 << 9 */ ++ } ++ ++ if (flags & CMD_F_RESP_LONG) ++ ccon |= S3C2410_SDICMDCON_LONGRSP; ++ ++ sdi->SDICCON = ccon; ++ ++ while (1) { ++ csta = sdi->SDICSTA; ++ if (csta & csta_rdy_bit) ++ break; ++ if (csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) { ++ printf("===============> MMC CMD Timeout\n"); ++ sdi->SDICSTA |= S3C2410_SDICMDSTAT_CMDTIMEOUT; ++ break; ++ } ++ } ++ ++ debug("final MMC CMD status 0x%x\n", csta); ++ ++ sdi->SDICSTA |= csta_rdy_bit; ++ ++ if (flags & CMD_F_RESP) { ++ resp[0] = sdi->SDIRSP0; ++ resp[1] = sdi->SDIRSP1; ++ resp[2] = sdi->SDIRSP2; ++ resp[3] = sdi->SDIRSP3; ++ } ++ ++ return resp; ++} ++ ++#define FIFO_FILL(host) ((host->SDIFSTA & S3C2410_SDIFSTA_COUNTMASK) >> 2) ++ ++static int mmc_block_read(uchar *dst, ulong src, ulong len) ++{ ++ u_int32_t dcon, fifo; ++ u_int32_t *dst_u32 = (u_int32_t *)dst; ++ u_int32_t *resp; ++ ++ if (len == 0) ++ return 0; ++ ++ debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len); ++ ++ /* set block len */ ++ resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, len, CMD_F_RESP); ++ sdi->SDIBSIZE = len; ++ ++ //sdi->SDIPRE = 0xff; ++ ++ /* setup data */ ++ dcon = (len >> 9) & S3C2410_SDIDCON_BLKNUM; ++ dcon |= S3C2410_SDIDCON_BLOCKMODE; ++ dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; ++ if (wide) ++ dcon |= S3C2410_SDIDCON_WIDEBUS; ++ sdi->SDIDCON = dcon; ++ ++ /* send read command */ ++ resp = mmc_cmd(MMC_CMD_READ_BLOCK, src, CMD_F_RESP); ++ ++ while (len > 0) { ++ u_int32_t sdidsta = sdi->SDIDSTA; ++ fifo = FIFO_FILL(sdi); ++ if (sdidsta & (S3C2410_SDIDSTA_FIFOFAIL| ++ S3C2410_SDIDSTA_CRCFAIL| ++ S3C2410_SDIDSTA_RXCRCFAIL| ++ S3C2410_SDIDSTA_DATATIMEOUT)) { ++ printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta); ++ return -EIO; ++ } ++ ++ while (fifo--) { ++ //debug("dst_u32 = 0x%08x\n", dst_u32); ++ *(dst_u32++) = sdi->SDIDAT; ++ if (len >= 4) ++ len -= 4; ++ else { ++ len = 0; ++ break; ++ } ++ } ++ } ++ ++ debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); ++ while (!(sdi->SDIDSTA & (1 << 4))) {} ++ debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA); ++ ++ sdi->SDIDCON = 0; ++ ++ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH)) ++ debug("mmc_block_read; transfer not finished!\n"); ++ ++ return 0; ++} ++ ++static int mmc_block_write(ulong dst, uchar *src, int len) ++{ ++ printf("MMC block write not yet supported on S3C2410!\n"); ++ return -1; ++} ++ ++ ++int mmc_read(ulong src, uchar *dst, int size) ++{ ++ ulong end, part_start, part_end, part_len, aligned_start, aligned_end; ++ ulong mmc_block_size, mmc_block_address; ++ ++ if (size == 0) ++ return 0; ++ ++ if (!mmc_ready) { ++ printf("Please initialize the MMC first\n"); ++ return -1; ++ } ++ ++ mmc_block_size = MMC_BLOCK_SIZE; ++ mmc_block_address = ~(mmc_block_size - 1); ++ ++ src -= CFG_MMC_BASE; ++ end = src + size; ++ part_start = ~mmc_block_address & src; ++ part_end = ~mmc_block_address & end; ++ aligned_start = mmc_block_address & src; ++ aligned_end = mmc_block_address & end; ++ ++ /* all block aligned accesses */ ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if (part_start) { ++ part_len = mmc_block_size - part_start; ++ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) ++ return -1; ++ ++ memcpy(dst, mmc_buf+part_start, part_len); ++ dst += part_len; ++ src += part_len; ++ } ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ for (; src < aligned_end; src += mmc_block_size, dst += mmc_block_size) { ++ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_read((uchar *)(dst), src, mmc_block_size)) < 0) ++ return -1; ++ } ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if (part_end && src < end) { ++ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) ++ return -1; ++ ++ memcpy(dst, mmc_buf, part_end); ++ } ++ return 0; ++} ++ ++int mmc_write(uchar *src, ulong dst, int size) ++{ ++ ulong end, part_start, part_end, part_len, aligned_start, aligned_end; ++ ulong mmc_block_size, mmc_block_address; ++ ++ if (size == 0) ++ return 0; ++ ++ if (!mmc_ready) { ++ printf("Please initialize the MMC first\n"); ++ return -1; ++ } ++ ++ mmc_block_size = MMC_BLOCK_SIZE; ++ mmc_block_address = ~(mmc_block_size - 1); ++ ++ dst -= CFG_MMC_BASE; ++ end = dst + size; ++ part_start = ~mmc_block_address & dst; ++ part_end = ~mmc_block_address & end; ++ aligned_start = mmc_block_address & dst; ++ aligned_end = mmc_block_address & end; ++ ++ /* all block aligned accesses */ ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if (part_start) { ++ part_len = mmc_block_size - part_start; ++ debug("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ (ulong)src, dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) < 0) ++ return -1; ++ ++ memcpy(mmc_buf+part_start, src, part_len); ++ if ((mmc_block_write(aligned_start, mmc_buf, mmc_block_size)) < 0) ++ return -1; ++ ++ dst += part_len; ++ src += part_len; ++ } ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size) { ++ debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_write(dst, (uchar *)src, mmc_block_size)) < 0) ++ return -1; ++ ++ } ++ debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if (part_end && dst < end) { ++ debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n", ++ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end); ++ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) ++ return -1; ++ ++ memcpy(mmc_buf, src, part_end); ++ if ((mmc_block_write(aligned_end, mmc_buf, mmc_block_size)) < 0) ++ return -1; ++ ++ } ++ return 0; ++} ++ ++ulong mmc_bread(int dev_num, ulong blknr, ulong blkcnt, void *dst) ++{ ++ int mmc_block_size = MMC_BLOCK_SIZE; ++ ulong src = blknr * mmc_block_size + CFG_MMC_BASE; ++ ++ mmc_read(src, dst, blkcnt*mmc_block_size); ++ return blkcnt; ++} ++ ++/* MMC_DEFAULT_RCA should probably be just 1, but this may break other code ++ that expects it to be shifted. */ ++static u_int16_t rca = MMC_DEFAULT_RCA >> 16; ++ ++static u_int32_t mmc_size(const struct mmc_csd *csd) ++{ ++ u_int32_t block_len, mult, blocknr; ++ ++ block_len = csd->read_bl_len << 12; ++ mult = csd->c_size_mult1 << 8; ++ blocknr = (csd->c_size+1) * mult; ++ ++ return blocknr * block_len; ++} ++ ++struct sd_cid { ++ char pnm_0; /* product name */ ++ char oid_1; /* OEM/application ID */ ++ char oid_0; ++ uint8_t mid; /* manufacturer ID */ ++ char pnm_4; ++ char pnm_3; ++ char pnm_2; ++ char pnm_1; ++ uint8_t psn_2; /* product serial number */ ++ uint8_t psn_1; ++ uint8_t psn_0; /* MSB */ ++ uint8_t prv; /* product revision */ ++ uint8_t crc; /* CRC7 checksum, b0 is unused and set to 1 */ ++ uint8_t mdt_1; /* manufacturing date, LSB, RRRRyyyy yyyymmmm */ ++ uint8_t mdt_0; /* MSB */ ++ uint8_t psn_3; /* LSB */ ++}; ++ ++static void print_mmc_cid(mmc_cid_t *cid) ++{ ++ printf("MMC found. Card desciption is:\n"); ++ printf("Manufacturer ID = %02x%02x%02x\n", ++ cid->id[0], cid->id[1], cid->id[2]); ++ printf("HW/FW Revision = %x %x\n",cid->hwrev, cid->fwrev); ++ cid->hwrev = cid->fwrev = 0; /* null terminate string */ ++ printf("Product Name = %s\n",cid->name); ++ printf("Serial Number = %02x%02x%02x\n", ++ cid->sn[0], cid->sn[1], cid->sn[2]); ++ printf("Month = %d\n",cid->month); ++ printf("Year = %d\n",1997 + cid->year); ++} ++ ++static void print_sd_cid(const struct sd_cid *cid) ++{ ++ printf("Manufacturer: 0x%02x, OEM \"%c%c\"\n", ++ cid->mid, cid->oid_0, cid->oid_1); ++ printf("Product name: \"%c%c%c%c%c\", revision %d.%d\n", ++ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, cid->pnm_4, ++ cid->prv >> 4, cid->prv & 15); ++ printf("Serial number: %u\n", ++ cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 | ++ cid->psn_3); ++ printf("Manufacturing date: %d/%d\n", ++ cid->mdt_1 & 15, ++ 2000+((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4)); ++ printf("CRC: 0x%02x, b0 = %d\n", ++ cid->crc >> 1, cid->crc & 1); ++} ++ ++int mmc_init(int verbose) ++{ ++ int retries, rc = -ENODEV; ++ int is_sd = 0; ++ u_int32_t *resp; ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ ++ sdi = S3C2410_GetBase_SDI(); ++ ++ debug("mmc_init(PCLK=%u)\n", get_PCLK()); ++ ++ clk_power->CLKCON |= (1 << 9); ++ ++ /* S3C2410 has some bug that prevents reliable operation at higher speed */ ++ //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ ++ sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ ++ sdi->SDIBSIZE = 512; ++ sdi->SDIDTIMER = 0xffff; ++ sdi->SDIIMSK = 0x0; ++ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; ++ udelay(125000); /* FIXME: 74 SDCLK cycles */ ++ ++ mmc_csd.c_size = 0; ++ ++ /* reset */ ++ retries = 10; ++ resp = mmc_cmd(MMC_CMD_RESET, 0, 0); ++ ++ printf("trying to detect SD Card...\n"); ++ while (retries--) { ++ udelay(100000); ++ resp = mmc_cmd(55, 0x00000000, CMD_F_RESP); ++ resp = mmc_cmd(41, 0x00300000, CMD_F_RESP); ++ ++ if (resp[0] & (1 << 31)) { ++ is_sd = 1; ++ break; ++ } ++ } ++ ++ if (retries == 0 && !is_sd) { ++ retries = 10; ++ printf("failed to detect SD Card, trying MMC\n"); ++ resp = mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ffc000, CMD_F_RESP); ++ while (retries-- && resp && !(resp[4] & 0x80)) { ++ debug("resp %x %x\n", resp[0], resp[1]); ++ udelay(50); ++ resp = mmc_cmd(1, 0x00ffff00, CMD_F_RESP); ++ } ++ } ++ ++ /* try to get card id */ ++ resp = mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, CMD_F_RESP|CMD_F_RESP_LONG); ++ if (resp) { ++ if (!is_sd) { ++ /* TODO configure mmc driver depending on card ++ attributes */ ++ mmc_cid_t *cid = (mmc_cid_t *)resp; ++ ++ if (verbose) ++ print_mmc_cid(cid); ++ sprintf((char *) mmc_dev.vendor, ++ "Man %02x%02x%02x Snr %02x%02x%02x", ++ cid->id[0], cid->id[1], cid->id[2], ++ cid->sn[0], cid->sn[1], cid->sn[2]); ++ sprintf((char *) mmc_dev.product,"%s",cid->name); ++ sprintf((char *) mmc_dev.revision,"%x %x", ++ cid->hwrev, cid->fwrev); ++ } ++ else { ++ struct sd_cid *cid = (struct sd_cid *) resp; ++ ++ if (verbose) ++ print_sd_cid(cid); ++ sprintf((char *) mmc_dev.vendor, ++ "Man %02 OEM %c%c \"%c%c%c%c%c\"", ++ cid->mid, cid->oid_0, cid->oid_1, ++ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, ++ cid->pnm_4); ++ sprintf((char *) mmc_dev.product, "%d", ++ cid->psn_0 << 24 | cid->psn_1 << 16 | ++ cid->psn_2 << 8 | cid->psn_3); ++ sprintf((char *) mmc_dev.revision, "%d.%d", ++ cid->prv >> 4, cid->prv & 15); ++ } ++ ++ /* fill in device description */ ++ mmc_dev.if_type = IF_TYPE_MMC; ++ mmc_dev.part_type = PART_TYPE_DOS; ++ mmc_dev.dev = 0; ++ mmc_dev.lun = 0; ++ mmc_dev.type = 0; ++ /* FIXME fill in the correct size (is set to 32MByte) */ ++ mmc_dev.blksz = 512; ++ mmc_dev.lba = 0x10000; ++ mmc_dev.removable = 0; ++ mmc_dev.block_read = mmc_bread; ++ ++ /* MMC exists, get CSD too */ ++ resp = mmc_cmd(MMC_CMD_SET_RCA, MMC_DEFAULT_RCA, CMD_F_RESP); ++ if (is_sd) ++ rca = resp[0] >> 16; ++ ++ resp = mmc_cmd(MMC_CMD_SEND_CSD, rca<<16, CMD_F_RESP|CMD_F_RESP_LONG); ++ if (resp) { ++ mmc_csd_t *csd = (mmc_csd_t *)resp; ++ memcpy(&mmc_csd, csd, sizeof(csd)); ++ rc = 0; ++ mmc_ready = 1; ++ /* FIXME add verbose printout for csd */ ++ printf("READ_BL_LEN=%u, C_SIZE_MULT=%u, C_SIZE=%u\n", ++ csd->read_bl_len, csd->c_size_mult1, csd->c_size); ++ printf("size = %u\n", mmc_size(csd)); ++ } ++ } ++ ++ resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca<<16, CMD_F_RESP); ++ ++#ifdef CONFIG_MMC_WIDE ++ if (is_sd) { ++ resp = mmc_cmd(55, rca<<16, CMD_F_RESP); ++ resp = mmc_cmd(6, 0x02, CMD_F_RESP); ++ wide = 1; ++ } ++#endif ++ ++ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */ ++ ++ return rc; ++} ++ ++int ++mmc_ident(block_dev_desc_t *dev) ++{ ++ return 0; ++} ++ ++int ++mmc2info(ulong addr) ++{ ++ /* FIXME hard codes to 32 MB device */ ++ if (addr >= CFG_MMC_BASE && addr < CFG_MMC_BASE + 0x02000000) ++ return 1; ++ ++ return 0; ++} ++ ++#endif /* CONFIG_MMC */ +Index: u-boot/include/asm-arm/arch-s3c24x0/mmc.h +=================================================================== +--- /dev/null ++++ u-boot/include/asm-arm/arch-s3c24x0/mmc.h +@@ -0,0 +1,112 @@ ++/* ++ * linux/drivers/mmc/mmc_pxa.h ++ * ++ * Author: Vladimir Shebordaev, Igor Oblakov ++ * Copyright: MontaVista Software Inc. ++ * ++ * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $ ++ * ++ * 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. ++ */ ++#ifndef __MMC_PXA_P_H__ ++#define __MMC_PXA_P_H__ ++ ++#include ++ ++#define MMC_DEFAULT_RCA (1<<16) ++ ++#define MMC_BLOCK_SIZE 512 ++#define MMC_CMD_RESET 0 ++#define MMC_CMD_SEND_OP_COND 1 ++#define MMC_CMD_ALL_SEND_CID 2 ++#define MMC_CMD_SET_RCA 3 ++#define MMC_CMD_SELECT_CARD 7 ++#define MMC_CMD_SEND_CSD 9 ++#define MMC_CMD_SEND_CID 10 ++#define MMC_CMD_SEND_STATUS 13 ++#define MMC_CMD_SET_BLOCKLEN 16 ++#define MMC_CMD_READ_BLOCK 17 ++#define MMC_CMD_RD_BLK_MULTI 18 ++#define MMC_CMD_WRITE_BLOCK 24 ++ ++#define MMC_MAX_BLOCK_SIZE 512 ++ ++#define MMC_R1_IDLE_STATE 0x01 ++#define MMC_R1_ERASE_STATE 0x02 ++#define MMC_R1_ILLEGAL_CMD 0x04 ++#define MMC_R1_COM_CRC_ERR 0x08 ++#define MMC_R1_ERASE_SEQ_ERR 0x01 ++#define MMC_R1_ADDR_ERR 0x02 ++#define MMC_R1_PARAM_ERR 0x04 ++ ++#define MMC_R1B_WP_ERASE_SKIP 0x0002 ++#define MMC_R1B_ERR 0x0004 ++#define MMC_R1B_CC_ERR 0x0008 ++#define MMC_R1B_CARD_ECC_ERR 0x0010 ++#define MMC_R1B_WP_VIOLATION 0x0020 ++#define MMC_R1B_ERASE_PARAM 0x0040 ++#define MMC_R1B_OOR 0x0080 ++#define MMC_R1B_IDLE_STATE 0x0100 ++#define MMC_R1B_ERASE_RESET 0x0200 ++#define MMC_R1B_ILLEGAL_CMD 0x0400 ++#define MMC_R1B_COM_CRC_ERR 0x0800 ++#define MMC_R1B_ERASE_SEQ_ERR 0x1000 ++#define MMC_R1B_ADDR_ERR 0x2000 ++#define MMC_R1B_PARAM_ERR 0x4000 ++ ++typedef struct mmc_cid ++{ ++ /* FIXME: BYTE_ORDER */ ++ uchar year:4, ++ month:4; ++ uchar sn[3]; ++ uchar fwrev:4, ++ hwrev:4; ++ uchar name[6]; ++ uchar id[3]; ++} mmc_cid_t; ++ ++typedef struct mmc_csd ++{ ++ uchar ecc:2, ++ file_format:2, ++ tmp_write_protect:1, ++ perm_write_protect:1, ++ copy:1, ++ file_format_grp:1; ++ uint64_t content_prot_app:1, ++ rsvd3:4, ++ write_bl_partial:1, ++ write_bl_len:4, ++ r2w_factor:3, ++ default_ecc:2, ++ wp_grp_enable:1, ++ wp_grp_size:5, ++ erase_grp_mult:5, ++ erase_grp_size:5, ++ c_size_mult1:3, ++ vdd_w_curr_max:3, ++ vdd_w_curr_min:3, ++ vdd_r_curr_max:3, ++ vdd_r_curr_min:3, ++ c_size:12, ++ rsvd2:2, ++ dsr_imp:1, ++ read_blk_misalign:1, ++ write_blk_misalign:1, ++ read_bl_partial:1; ++ ++ ushort read_bl_len:4, ++ ccc:12; ++ uchar tran_speed; ++ uchar nsac; ++ uchar taac; ++ uchar rsvd1:2, ++ spec_vers:4, ++ csd_structure:2; ++} mmc_csd_t; ++ ++ ++#endif /* __MMC_PXA_P_H__ */ +Index: u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h +=================================================================== +--- /dev/null ++++ u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h +@@ -0,0 +1,110 @@ ++/* linux/include/asm/arch-s3c2410/regs-sdi.h ++ * ++ * Copyright (c) 2004 Simtec Electronics ++ * http://www.simtec.co.uk/products/SWLINUX/ ++ * ++ * 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. ++ * ++ * S3C2410 MMC/SDIO register definitions ++ * ++ * Changelog: ++ * 18-Aug-2004 Ben Dooks Created initial file ++ * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates ++ * 29-Nov-2004 Ben Dooks Updated Koen's patch ++*/ ++ ++#ifndef __ASM_ARM_REGS_SDI ++#define __ASM_ARM_REGS_SDI "regs-sdi.h" ++ ++#define S3C2440_SDICON_SDRESET (1<<8) ++#define S3C2440_SDICON_MMCCLOCK (1<<5) ++#define S3C2410_SDICON_BYTEORDER (1<<4) ++#define S3C2410_SDICON_SDIOIRQ (1<<3) ++#define S3C2410_SDICON_RWAITEN (1<<2) ++#define S3C2410_SDICON_FIFORESET (1<<1) ++#define S3C2410_SDICON_CLOCKTYPE (1<<0) ++ ++#define S3C2410_SDICMDCON_ABORT (1<<12) ++#define S3C2410_SDICMDCON_WITHDATA (1<<11) ++#define S3C2410_SDICMDCON_LONGRSP (1<<10) ++#define S3C2410_SDICMDCON_WAITRSP (1<<9) ++#define S3C2410_SDICMDCON_CMDSTART (1<<8) ++#define S3C2410_SDICMDCON_SENDERHOST (1<<6) ++#define S3C2410_SDICMDCON_INDEX (0x3f) ++ ++#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) ++#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) ++#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) ++#define S3C2410_SDICMDSTAT_RSPFIN (1<<9) ++#define S3C2410_SDICMDSTAT_XFERING (1<<8) ++#define S3C2410_SDICMDSTAT_INDEX (0xff) ++ ++#define S3C2440_SDIDCON_DS_BYTE (0<<22) ++#define S3C2440_SDIDCON_DS_HALFWORD (1<<22) ++#define S3C2440_SDIDCON_DS_WORD (2<<22) ++#define S3C2410_SDIDCON_IRQPERIOD (1<<21) ++#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) ++#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) ++#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) ++#define S3C2410_SDIDCON_BLOCKMODE (1<<17) ++#define S3C2410_SDIDCON_WIDEBUS (1<<16) ++#define S3C2410_SDIDCON_DMAEN (1<<15) ++#define S3C2410_SDIDCON_STOP (1<<14) ++#define S3C2440_SDIDCON_DATSTART (1<<14) ++#define S3C2410_SDIDCON_DATMODE (3<<12) ++#define S3C2410_SDIDCON_BLKNUM (0x7ff) ++ ++/* constants for S3C2410_SDIDCON_DATMODE */ ++#define S3C2410_SDIDCON_XFER_READY (0<<12) ++#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) ++#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) ++#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) ++ ++#define S3C2410_SDIDCNT_BLKNUM_MASK (0xFFF) ++#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) ++ ++#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) ++#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) ++#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ ++#define S3C2410_SDIDSTA_CRCFAIL (1<<7) ++#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) ++#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) ++#define S3C2410_SDIDSTA_XFERFINISH (1<<4) ++#define S3C2410_SDIDSTA_BUSYFINISH (1<<3) ++#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ ++#define S3C2410_SDIDSTA_TXDATAON (1<<1) ++#define S3C2410_SDIDSTA_RXDATAON (1<<0) ++ ++#define S3C2440_SDIFSTA_FIFORESET (1<<16) ++#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */ ++#define S3C2410_SDIFSTA_TFDET (1<<13) ++#define S3C2410_SDIFSTA_RFDET (1<<12) ++#define S3C2410_SDIFSTA_TFHALF (1<<11) ++#define S3C2410_SDIFSTA_TFEMPTY (1<<10) ++#define S3C2410_SDIFSTA_RFLAST (1<<9) ++#define S3C2410_SDIFSTA_RFFULL (1<<8) ++#define S3C2410_SDIFSTA_RFHALF (1<<7) ++#define S3C2410_SDIFSTA_COUNTMASK (0x7f) ++ ++#define S3C2410_SDIIMSK_RESPONSECRC (1<<17) ++#define S3C2410_SDIIMSK_CMDSENT (1<<16) ++#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) ++#define S3C2410_SDIIMSK_RESPONSEND (1<<14) ++#define S3C2410_SDIIMSK_READWAIT (1<<13) ++#define S3C2410_SDIIMSK_SDIOIRQ (1<<12) ++#define S3C2410_SDIIMSK_FIFOFAIL (1<<11) ++#define S3C2410_SDIIMSK_CRCSTATUS (1<<10) ++#define S3C2410_SDIIMSK_DATACRC (1<<9) ++#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) ++#define S3C2410_SDIIMSK_DATAFINISH (1<<7) ++#define S3C2410_SDIIMSK_BUSYFINISH (1<<6) ++#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ ++#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) ++#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) ++#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) ++#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) ++#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) ++ ++#endif /* __ASM_ARM_REGS_SDI */ +Index: u-boot/include/s3c24x0.h +=================================================================== +--- u-boot.orig/include/s3c24x0.h ++++ u-boot/include/s3c24x0.h +@@ -637,13 +637,7 @@ + S3C24X0_REG32 SDIDCNT; + S3C24X0_REG32 SDIDSTA; + S3C24X0_REG32 SDIFSTA; +-#ifdef __BIG_ENDIAN +- S3C24X0_REG8 res[3]; +- S3C24X0_REG8 SDIDAT; +-#else +- S3C24X0_REG8 SDIDAT; +- S3C24X0_REG8 res[3]; +-#endif ++ S3C24X0_REG32 SDIDAT; + S3C24X0_REG32 SDIIMSK; + } /*__attribute__((__packed__))*/ S3C2410_SDI; + +@@ -1123,11 +1117,7 @@ + #define rSDIDatCnt (*(volatile unsigned *)0x5A000030) + #define rSDIDatSta (*(volatile unsigned *)0x5A000034) + #define rSDIFSTA (*(volatile unsigned *)0x5A000038) +-#ifdef __BIG_ENDIAN +-#define rSDIDAT (*(volatile unsigned char *)0x5A00003F) +-#else +-#define rSDIDAT (*(volatile unsigned char *)0x5A00003C) +-#endif ++#define rSDIDAT (*(volatile unsigned *)0x5A00003C) + #define rSDIIntMsk (*(volatile unsigned *)0x5A000040) + + #endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch new file mode 100644 index 0000000000..dc363bbbab --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch @@ -0,0 +1,525 @@ +This patch adds NAND (including boot-from-NAND via steppingstone) support to +the S3C2410 SoC code in u-boot + +Signed-off-by: Harald Welte + +Index: u-boot/cpu/arm920t/s3c24x0/Makefile +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-28 03:47:44.000000000 +0100 ++++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-03-01 14:29:32.000000000 +0100 +@@ -26,7 +26,7 @@ + LIB = $(obj)lib$(SOC).a + + COBJS = i2c.o interrupts.o serial.o speed.o \ +- usb_ohci.o ++ usb_ohci.o nand_read.o nand.o + + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +Index: u-boot/cpu/arm920t/s3c24x0/nand.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-03-01 14:30:27.000000000 +0100 +@@ -0,0 +1,225 @@ ++/* ++ * (C) Copyright 2006 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++ ++#if 0 ++#define DEBUGN printf ++#else ++#define DEBUGN(x, args ...) {} ++#endif ++ ++#if (CONFIG_COMMANDS & CFG_CMD_NAND) ++#if !defined(CFG_NAND_LEGACY) ++ ++#include ++#include ++ ++#define __REGb(x) (*(volatile unsigned char *)(x)) ++#define __REGi(x) (*(volatile unsigned int *)(x)) ++ ++#define NF_BASE 0x4e000000 ++#define NFCONF __REGi(NF_BASE + 0x0) ++#define NFCMD __REGb(NF_BASE + 0x4) ++#define NFADDR __REGb(NF_BASE + 0x8) ++#define NFDATA __REGb(NF_BASE + 0xc) ++#define NFSTAT __REGb(NF_BASE + 0x10) ++#define NFECC0 __REGb(NF_BASE + 0x14) ++#define NFECC1 __REGb(NF_BASE + 0x15) ++#define NFECC2 __REGb(NF_BASE + 0x16) ++ ++#define S3C2410_NFCONF_EN (1<<15) ++#define S3C2410_NFCONF_512BYTE (1<<14) ++#define S3C2410_NFCONF_4STEP (1<<13) ++#define S3C2410_NFCONF_INITECC (1<<12) ++#define S3C2410_NFCONF_nFCE (1<<11) ++#define S3C2410_NFCONF_TACLS(x) ((x)<<8) ++#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) ++#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) ++ ++static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) ++{ ++ struct nand_chip *chip = mtd->priv; ++ ++ DEBUGN("hwcontrol(): 0x%02x: ", cmd); ++ ++ switch (cmd) { ++ case NAND_CTL_SETNCE: ++ NFCONF &= ~S3C2410_NFCONF_nFCE; ++ DEBUGN("NFCONF=0x%08x\n", NFCONF); ++ break; ++ case NAND_CTL_CLRNCE: ++ NFCONF |= S3C2410_NFCONF_nFCE; ++ DEBUGN("NFCONF=0x%08x\n", NFCONF); ++ break; ++ case NAND_CTL_SETALE: ++ chip->IO_ADDR_W = NF_BASE + 0x8; ++ DEBUGN("SETALE\n"); ++ break; ++ case NAND_CTL_SETCLE: ++ chip->IO_ADDR_W = NF_BASE + 0x4; ++ DEBUGN("SETCLE\n"); ++ break; ++ default: ++ chip->IO_ADDR_W = NF_BASE + 0xc; ++ break; ++ } ++ return; ++} ++ ++static int s3c2410_dev_ready(struct mtd_info *mtd) ++{ ++ DEBUGN("dev_ready\n"); ++ return (NFSTAT & 0x01); ++} ++ ++static void s3c2410_cmdfunc(struct mtd_info *mtd, unsigned cmd, ++ int column, int page_addr) ++{ ++ DEBUGN("cmdfunc(): 0x%02x, col=%d, page=%d\n", cmd, column, page_addr); ++ ++ switch (cmd) { ++ case NAND_CMD_READ0: ++ case NAND_CMD_READ1: ++ case NAND_CMD_READOOB: ++ NFCMD = cmd; ++ NFADDR = column & 0xff; ++ NFADDR = page_addr & 0xff; ++ NFADDR = (page_addr >> 8) & 0xff; ++ NFADDR = (page_addr >> 16) & 0xff; ++ break; ++ case NAND_CMD_READID: ++ NFCMD = cmd; ++ NFADDR = 0; ++ break; ++ case NAND_CMD_PAGEPROG: ++ NFCMD = cmd; ++ printf("PAGEPROG not implemented\n"); ++ break; ++ case NAND_CMD_ERASE1: ++ NFCMD = cmd; ++ NFADDR = page_addr & 0xff; ++ NFADDR = (page_addr >> 8) & 0xff; ++ NFADDR = (page_addr >> 16) & 0xff; ++ break; ++ case NAND_CMD_ERASE2: ++ NFCMD = cmd; ++ break; ++ case NAND_CMD_SEQIN: ++ printf("SEQIN not implemented\n"); ++ break; ++ case NAND_CMD_STATUS: ++ NFCMD = cmd; ++ break; ++ case NAND_CMD_RESET: ++ NFCMD = cmd; ++ break; ++ default: ++ break; ++ } ++ ++ while (!s3c2410_dev_ready(mtd)); ++} ++ ++#ifdef CONFIG_S3C2410_NAND_HWECC ++void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode) ++{ ++ DEBUGN("s3c2410_nand_enable_hwecc(%p, %d)\n", mtd ,mode); ++ NFCONF |= S3C2410_NFCONF_INITECC; ++} ++ ++static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) ++{ ++ ecc_code[0] = NFECC0; ++ ecc_code[1] = NFECC1; ++ ecc_code[2] = NFECC2; ++ DEBUGN("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n", mtd , ecc_code[0], ecc_code[1], ecc_code[2]); ++ ++ return 0; ++} ++ ++int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) ++{ ++ if (read_ecc[0] == calc_ecc[0] && ++ read_ecc[1] == calc_ecc[1] && ++ read_ecc[2] == calc_ecc[2]) ++ return 0; ++ ++ printf("s3c2410_nand_correct_data: not implemented\n"); ++ return -1; ++} ++#endif ++ ++int board_nand_init(struct nand_chip *nand) ++{ ++ u_int32_t cfg; ++ u_int8_t tacls, twrph0, twrph1; ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ ++ DEBUGN("board_nand_init()\n"); ++ ++ clk_power->CLKCON |= (1 << 4); ++ ++ /* initialize hardware */ ++ twrph0 = 3; twrph1 = 0; tacls = 0; ++ ++ cfg = S3C2410_NFCONF_EN; ++ cfg |= S3C2410_NFCONF_TACLS(tacls - 1); ++ cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); ++ cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); ++ ++ NFCONF = cfg; ++ //NFCONF = 0xf842; ++ ++ /* initialize nand_chip data structure */ ++ nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; ++ ++ /* read_buf and write_buf are default */ ++ /* read_byte and write_byte are default */ ++ ++ /* hwcontrol always must be implemented */ ++ nand->hwcontrol = s3c2410_hwcontrol; ++ ++ nand->dev_ready = s3c2410_dev_ready; ++ ++#ifdef CONFIG_S3C2410_NAND_HWECC ++ nand->enable_hwecc = s3c2410_nand_enable_hwecc; ++ nand->calculate_ecc = s3c2410_nand_calculate_ecc; ++ nand->correct_data = s3c2410_nand_correct_data; ++ nand->eccmode = NAND_ECC_HW3_512; ++#else ++ nand->eccmode = NAND_ECC_SOFT; ++#endif ++ ++#ifdef CONFIG_S3C2410_NAND_BBT ++ nand->options = NAND_USE_FLASH_BBT; ++#else ++ nand->options = 0; ++#endif ++ ++ DEBUGN("end of nand_init\n"); ++ ++ return 0; ++} ++ ++#else ++ #error "U-Boot legacy NAND support not available for S3C2410" ++#endif ++#endif +Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ u-boot/cpu/arm920t/s3c24x0/nand_read.c 2007-02-28 03:51:24.000000000 +0100 +@@ -0,0 +1,98 @@ ++/* ++ * nand_read.c: Simple NAND read functions for booting from NAND ++ * ++ * This is used by cpu/arm920/start.S assembler code, ++ * and the board-specific linker script must make sure this ++ * file is linked within the first 4kB of NAND flash. ++ * ++ * Taken from GPLv2 licensed vivi bootloader, ++ * Copyright (C) 2002 MIZI Research, Inc. ++ * ++ * Author: Hwang, Chideok ++ * Date : $Date: 2004/02/04 10:37:37 $ ++ * ++ * u-boot integration and bad-block skipping (C) 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ */ ++ ++#include ++ ++#ifdef CONFIG_S3C2410_NAND_BOOT ++ ++#define __REGb(x) (*(volatile unsigned char *)(x)) ++#define __REGi(x) (*(volatile unsigned int *)(x)) ++#define NF_BASE 0x4e000000 ++#define NFCONF __REGi(NF_BASE + 0x0) ++#define NFCMD __REGb(NF_BASE + 0x4) ++#define NFADDR __REGb(NF_BASE + 0x8) ++#define NFDATA __REGb(NF_BASE + 0xc) ++#define NFSTAT __REGb(NF_BASE + 0x10) ++ ++#define BUSY 1 ++inline void wait_idle(void) ++{ ++ int i; ++ ++ while (!(NFSTAT & BUSY)) ++ for (i=0; i<10; i++); ++} ++ ++#define NAND_SECTOR_SIZE 512 ++#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) ++#define NAND_PAGE_SIZE 0x4000 ++ ++/* low level nand read function */ ++int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) ++{ ++ int i, j; ++ ++ if ((start_addr & NAND_BLOCK_MASK) || (size & NAND_BLOCK_MASK)) ++ return -1; /* invalid alignment */ ++ ++ /* chip Enable */ ++ NFCONF &= ~0x800; ++ for (i=0; i<10; i++); ++ ++ for (i=start_addr; i < (start_addr + size);) { ++#ifdef CONFIG_S3C2410_NAND_SKIP_BAD ++ if (start_addr % NAND_PAGE_SIZE == 0) { ++ unsigned char data; ++ NFCMD = 0x50; ++ NFADDR = 517&0xf; ++ NFADDR = (i >> 9) & 0xff; ++ NFADDR = (i >> 17) & 0xff; ++ NFADDR = (i >> 25) & 0xff; ++ wait_idle(); ++ data = (NFDATA & 0xff); ++ if (data != 0xff) { ++ /* Bad block */ ++ i += NAND_PAGE_SIZE; ++ size += NAND_PAGE_SIZE; ++ continue; ++ } ++ } ++#endif ++ /* READ0 */ ++ NFCMD = 0; ++ ++ /* Write Address */ ++ NFADDR = i & 0xff; ++ NFADDR = (i >> 9) & 0xff; ++ NFADDR = (i >> 17) & 0xff; ++ NFADDR = (i >> 25) & 0xff; ++ ++ wait_idle(); ++ ++ for (j=0; j < NAND_SECTOR_SIZE; j++, i++) { ++ *buf = (NFDATA & 0xff); ++ buf++; ++ } ++ } ++ ++ /* chip Disable */ ++ NFCONF |= 0x800; /* chip disable */ ++ ++ return 0; ++} ++ ++#endif /* CONFIG_S3C2410_NAND_BOOT */ +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S 2007-02-28 03:47:44.000000000 +0100 ++++ u-boot/cpu/arm920t/start.S 2007-03-01 14:29:22.000000000 +0100 +@@ -5,6 +5,10 @@ + * Copyright (c) 2002 Alex Züpke + * Copyright (c) 2002 Gary Jennejohn + * ++ * S3C2410 NAND portions ++ * Copyright (c) 2001 MIZI Research, Inc. ++ * Copyright (c) 2006 OpenMoko, Inc. (Harald Welte ++ * + * See file CREDITS for list of people who contributed to this + * project. + * +@@ -27,6 +31,7 @@ + + #include + #include ++#include + + + /* +@@ -161,6 +166,7 @@ + #endif + + #ifndef CONFIG_SKIP_RELOCATE_UBOOT ++#ifndef CONFIG_S3C2410_NAND_BOOT + relocate: /* relocate U-Boot to RAM */ + adr r0, _start /* r0 <- current position of code */ + ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ +@@ -177,6 +183,93 @@ + stmia r1!, {r3-r10} /* copy to target address [r1] */ + cmp r0, r2 /* until source end addreee [r2] */ + ble copy_loop ++#else /* NAND_BOOT */ ++relocate: ++copy_myself: ++ /* mov r10, lr */ ++ ++ @ reset NAND ++ mov r1, #S3C2410_NAND_BASE ++ ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 ++ str r2, [r1, #oNFCONF] ++ ldr r2, [r1, #oNFCONF] ++ bic r2, r2, #0x800 @ enable chip ++ str r2, [r1, #oNFCONF] ++ mov r2, #0xff @ RESET command ++ strb r2, [r1, #oNFCMD] ++ mov r3, #0 @ wait ++1: add r3, r3, #0x1 ++ cmp r3, #0xa ++ blt 1b ++2: ldr r2, [r1, #oNFSTAT] @ wait ready ++ tst r2, #0x1 ++ beq 2b ++ ldr r2, [r1, #oNFCONF] ++ orr r2, r2, #0x800 @ disable chip ++ str r2, [r1, #oNFCONF] ++ ++#if 0 ++ @ get ready to call C functions (for nand_read()) ++ ldr sp, DW_STACK_START @ setup stack pointer ++ mov fp, #0 @ no previous frame, so fp=0 ++#else ++ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ ++ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ ++ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ ++#ifdef CONFIG_USE_IRQ ++ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) ++#endif ++ sub sp, r0, #12 /* leave 3 words for abort-stack */ ++#endif ++ ++ @ copy u-boot to RAM ++ ldr r0, _TEXT_BASE ++ mov r1, #0x0 ++ mov r2, #CFG_UBOOT_SIZE ++ bl nand_read_ll ++ ++ tst r0, #0x0 ++ beq ok_nand_read ++#ifdef CONFIG_DEBUG_LL ++bad_nand_read: ++ ldr r0, STR_FAIL ++ ldr r1, SerBase ++ bl PrintWord ++1: b 1b @ infinite loop ++#endif ++ ++ok_nand_read: ++#ifdef CONFIG_DEBUG_LL ++ ldr r0, STR_OK ++ ldr r1, SerBase ++ bl PrintWord ++#endif ++ ++ @ verify ++ mov r0, #0 ++ @ldr r1, =0x33f00000 ++ ldr r1, _TEXT_BASE ++ mov r2, #0x400 @ 4 bytes * 1024 = 4K-bytes ++go_next: ++ ldr r3, [r0], #4 ++ ldr r4, [r1], #4 ++ teq r3, r4 ++ bne notmatch ++ subs r2, r2, #4 ++ beq done_nand_read ++ bne go_next ++notmatch: ++#ifdef CONFIG_DEBUG_LL ++ sub r0, r0, #4 ++ ldr r1, SerBase ++ bl PrintHexWord ++ ldr r0, STR_FAIL ++ ldr r1, SerBase ++ bl PrintWord ++#endif ++1: b 1b ++done_nand_read: ++#endif /* NAND_BOOT */ + #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ + + /* Set up the stack */ +Index: u-boot/include/s3c2410.h +=================================================================== +--- u-boot.orig/include/s3c2410.h 2007-02-28 03:51:24.000000000 +0100 ++++ u-boot/include/s3c2410.h 2007-03-01 14:29:22.000000000 +0100 +@@ -38,12 +38,6 @@ + #define S3C2410_ECCSIZE 512 + #define S3C2410_ECCBYTES 3 + +-typedef enum { +- S3C24X0_UART0, +- S3C24X0_UART1, +- S3C24X0_UART2 +-} S3C24X0_UARTS_NR; +- + /* S3C2410 device base addresses */ + #define S3C24X0_MEMCTL_BASE 0x48000000 + #define S3C24X0_USB_HOST_BASE 0x49000000 +@@ -65,9 +59,23 @@ + #define S3C2410_SDI_BASE 0x5A000000 + + ++#define oNFCONF 0x00 ++#define oNFCMD 0x04 ++#define oNFADDR 0x08 ++#define oNFDATA 0x0C ++#define oNFSTAT 0x10 ++#define oNFECC 0x14 ++ ++#ifndef __ASSEMBLER__ ++ + /* include common stuff */ + #include + ++typedef enum { ++ S3C24X0_UART0, ++ S3C24X0_UART1, ++ S3C24X0_UART2 ++} S3C24X0_UARTS_NR; + + static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) + { +@@ -142,6 +150,7 @@ + return (S3C2410_SDI * const)S3C2410_SDI_BASE; + } + ++#endif + + /* ISR */ + #define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch new file mode 100644 index 0000000000..0d5a49771d --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch @@ -0,0 +1,32 @@ +If we've somehow magically make u-boot end up in RAM (JTAG, ...), then that RAM +is mapped to 0x30000000 and not 0, so we need to copy the interrupt vectors, etc. + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -332,7 +332,23 @@ done_nand_read: + strb r1, [r0] + #endif /* CONFIG_S3C2410_NAND_BOOT */ + done_relocate: +-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ ++ ++#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) ++ /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) ++ ended up in RAM, then that ram is mapped to 0x30000000 and not 0. ++ So we need to copy the interrupt vectors, etc. */ ++ ++ mov r0, #0 ++ ldr r1, _TEXT_BASE ++ mov r2, #0x40 ++irqvec_cpy_next: ++ ldr r3, [r1], #4 ++ str r3, [r0], #4 ++ subs r2, r2, #4 ++ bne irqvec_cpy_next ++#endif /* CONFIG_USE_IRQ */ ++ ++#endif /* !CONFIG_SKIP_RELOCATE_UBOOT */ + + /* Set up the stack */ + stack_setup: diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch new file mode 100644 index 0000000000..8cc442a865 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch @@ -0,0 +1,98 @@ +Index: u-boot/include/s3c2410.h +=================================================================== +--- u-boot.orig/include/s3c2410.h 2007-02-16 23:53:20.000000000 +0100 ++++ u-boot/include/s3c2410.h 2007-02-16 23:53:21.000000000 +0100 +@@ -69,75 +69,75 @@ + #include + + +-static inline S3C24X0_MEMCTL * const S3C24X0_GetBase_MEMCTL(void) ++static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) + { + return (S3C24X0_MEMCTL * const)S3C24X0_MEMCTL_BASE; + } +-static inline S3C24X0_USB_HOST * const S3C24X0_GetBase_USB_HOST(void) ++static inline S3C24X0_USB_HOST * S3C24X0_GetBase_USB_HOST(void) + { + return (S3C24X0_USB_HOST * const)S3C24X0_USB_HOST_BASE; + } +-static inline S3C24X0_INTERRUPT * const S3C24X0_GetBase_INTERRUPT(void) ++static inline S3C24X0_INTERRUPT * S3C24X0_GetBase_INTERRUPT(void) + { + return (S3C24X0_INTERRUPT * const)S3C24X0_INTERRUPT_BASE; + } +-static inline S3C24X0_DMAS * const S3C24X0_GetBase_DMAS(void) ++static inline S3C24X0_DMAS * S3C24X0_GetBase_DMAS(void) + { + return (S3C24X0_DMAS * const)S3C24X0_DMA_BASE; + } +-static inline S3C24X0_CLOCK_POWER * const S3C24X0_GetBase_CLOCK_POWER(void) ++static inline S3C24X0_CLOCK_POWER * S3C24X0_GetBase_CLOCK_POWER(void) + { + return (S3C24X0_CLOCK_POWER * const)S3C24X0_CLOCK_POWER_BASE; + } +-static inline S3C24X0_LCD * const S3C24X0_GetBase_LCD(void) ++static inline S3C24X0_LCD * S3C24X0_GetBase_LCD(void) + { + return (S3C24X0_LCD * const)S3C24X0_LCD_BASE; + } +-static inline S3C2410_NAND * const S3C2410_GetBase_NAND(void) ++static inline S3C2410_NAND * S3C2410_GetBase_NAND(void) + { + return (S3C2410_NAND * const)S3C2410_NAND_BASE; + } +-static inline S3C24X0_UART * const S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) ++static inline S3C24X0_UART * S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) + { + return (S3C24X0_UART * const)(S3C24X0_UART_BASE + (nr * 0x4000)); + } +-static inline S3C24X0_TIMERS * const S3C24X0_GetBase_TIMERS(void) ++static inline S3C24X0_TIMERS * S3C24X0_GetBase_TIMERS(void) + { + return (S3C24X0_TIMERS * const)S3C24X0_TIMER_BASE; + } +-static inline S3C24X0_USB_DEVICE * const S3C24X0_GetBase_USB_DEVICE(void) ++static inline S3C24X0_USB_DEVICE * S3C24X0_GetBase_USB_DEVICE(void) + { + return (S3C24X0_USB_DEVICE * const)S3C24X0_USB_DEVICE_BASE; + } +-static inline S3C24X0_WATCHDOG * const S3C24X0_GetBase_WATCHDOG(void) ++static inline S3C24X0_WATCHDOG * S3C24X0_GetBase_WATCHDOG(void) + { + return (S3C24X0_WATCHDOG * const)S3C24X0_WATCHDOG_BASE; + } +-static inline S3C24X0_I2C * const S3C24X0_GetBase_I2C(void) ++static inline S3C24X0_I2C * S3C24X0_GetBase_I2C(void) + { + return (S3C24X0_I2C * const)S3C24X0_I2C_BASE; + } +-static inline S3C24X0_I2S * const S3C24X0_GetBase_I2S(void) ++static inline S3C24X0_I2S * S3C24X0_GetBase_I2S(void) + { + return (S3C24X0_I2S * const)S3C24X0_I2S_BASE; + } +-static inline S3C24X0_GPIO * const S3C24X0_GetBase_GPIO(void) ++static inline S3C24X0_GPIO * S3C24X0_GetBase_GPIO(void) + { + return (S3C24X0_GPIO * const)S3C24X0_GPIO_BASE; + } +-static inline S3C24X0_RTC * const S3C24X0_GetBase_RTC(void) ++static inline S3C24X0_RTC * S3C24X0_GetBase_RTC(void) + { + return (S3C24X0_RTC * const)S3C24X0_RTC_BASE; + } +-static inline S3C2410_ADC * const S3C2410_GetBase_ADC(void) ++static inline S3C2410_ADC * S3C2410_GetBase_ADC(void) + { + return (S3C2410_ADC * const)S3C2410_ADC_BASE; + } +-static inline S3C24X0_SPI * const S3C24X0_GetBase_SPI(void) ++static inline S3C24X0_SPI * S3C24X0_GetBase_SPI(void) + { + return (S3C24X0_SPI * const)S3C24X0_SPI_BASE; + } +-static inline S3C2410_SDI * const S3C2410_GetBase_SDI(void) ++static inline S3C2410_SDI * S3C2410_GetBase_SDI(void) + { + return (S3C2410_SDI * const)S3C2410_SDI_BASE; + } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch new file mode 100644 index 0000000000..b50853554b --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch @@ -0,0 +1,215 @@ +Index: u-boot/drivers/Makefile +=================================================================== +--- u-boot.orig/drivers/Makefile ++++ u-boot/drivers/Makefile +@@ -52,7 +52,7 @@ + ks8695eth.o \ + pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \ + rpx_pcmcia.o \ +- fsl_i2c.o ++ fsl_i2c.o s3c2410_fb.o + + SRCS := $(COBJS:.o=.c) + OBJS := $(addprefix $(obj),$(COBJS)) +Index: u-boot/drivers/s3c2410_fb.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/s3c2410_fb.c +@@ -0,0 +1,166 @@ ++/* ++ * (C) Copyright 2006 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++ ++#if defined(CONFIG_VIDEO_S3C2410) ++ ++#include ++#include "videomodes.h" ++#include ++/* ++ * Export Graphic Device ++ */ ++GraphicDevice smi; ++ ++#define VIDEO_MEM_SIZE 0x200000 /* 480x640x16bit = 614400 bytes */ ++ ++extern void board_video_init(GraphicDevice *pGD); ++ ++/******************************************************************************* ++ * ++ * Init video chip with common Linux graphic modes (lilo) ++ */ ++void *video_hw_init (void) ++{ ++ S3C24X0_LCD * const lcd = S3C24X0_GetBase_LCD(); ++ GraphicDevice *pGD = (GraphicDevice *)&smi; ++ int videomode; ++ unsigned long t1, hsynch, vsynch; ++ char *penv; ++ int tmp, i, bits_per_pixel; ++ struct ctfb_res_modes *res_mode; ++ struct ctfb_res_modes var_mode; ++ unsigned char videoout; ++ ++ /* Search for video chip */ ++ printf("Video: "); ++ ++ tmp = 0; ++ ++ videomode = CFG_DEFAULT_VIDEO_MODE; ++ /* get video mode via environment */ ++ if ((penv = getenv ("videomode")) != NULL) { ++ /* deceide if it is a string */ ++ if (penv[0] <= '9') { ++ videomode = (int) simple_strtoul (penv, NULL, 16); ++ tmp = 1; ++ } ++ } else { ++ tmp = 1; ++ } ++ if (tmp) { ++ /* parameter are vesa modes */ ++ /* search params */ ++ for (i = 0; i < VESA_MODES_COUNT; i++) { ++ if (vesa_modes[i].vesanr == videomode) ++ break; ++ } ++ if (i == VESA_MODES_COUNT) { ++ printf ("no VESA Mode found, switching to mode 0x%x ", CFG_DEFAULT_VIDEO_MODE); ++ i = 0; ++ } ++ res_mode = ++ (struct ctfb_res_modes *) &res_mode_init[vesa_modes[i]. ++ resindex]; ++ bits_per_pixel = vesa_modes[i].bits_per_pixel; ++ } else { ++ ++ res_mode = (struct ctfb_res_modes *) &var_mode; ++ bits_per_pixel = video_get_params (res_mode, penv); ++ } ++ ++ /* calculate hsynch and vsynch freq (info only) */ ++ t1 = (res_mode->left_margin + res_mode->xres + ++ res_mode->right_margin + res_mode->hsync_len) / 8; ++ t1 *= 8; ++ t1 *= res_mode->pixclock; ++ t1 /= 1000; ++ hsynch = 1000000000L / t1; ++ t1 *= ++ (res_mode->upper_margin + res_mode->yres + ++ res_mode->lower_margin + res_mode->vsync_len); ++ t1 /= 1000; ++ vsynch = 1000000000L / t1; ++ ++ /* fill in Graphic device struct */ ++ sprintf (pGD->modeIdent, "%dx%dx%d %ldkHz %ldHz", res_mode->xres, ++ res_mode->yres, bits_per_pixel, (hsynch / 1000), ++ (vsynch / 1000)); ++ printf ("%s\n", pGD->modeIdent); ++ pGD->winSizeX = res_mode->xres; ++ pGD->winSizeY = res_mode->yres; ++ pGD->plnSizeX = res_mode->xres; ++ pGD->plnSizeY = res_mode->yres; ++ switch (bits_per_pixel) { ++ case 8: ++ pGD->gdfBytesPP = 1; ++ pGD->gdfIndex = GDF__8BIT_INDEX; ++ break; ++ case 15: ++ pGD->gdfBytesPP = 2; ++ pGD->gdfIndex = GDF_15BIT_555RGB; ++ break; ++ case 16: ++ pGD->gdfBytesPP = 2; ++ pGD->gdfIndex = GDF_16BIT_565RGB; ++ break; ++ case 24: ++ pGD->gdfBytesPP = 3; ++ pGD->gdfIndex = GDF_24BIT_888RGB; ++ break; ++ } ++ ++ /* statically configure settings */ ++ pGD->winSizeX = pGD->plnSizeX = 480; ++ pGD->winSizeY = pGD->plnSizeY = 640; ++ pGD->gdfBytesPP = 2; ++ pGD->gdfIndex = GDF_16BIT_565RGB; ++ ++ pGD->frameAdrs = LCD_VIDEO_ADDR; ++ pGD->memSize = VIDEO_MEM_SIZE; ++ ++ board_video_init(pGD); ++ ++ lcd->LCDSADDR1 = pGD->frameAdrs >> 1; ++ ++ /* This marks the end of the frame buffer. */ ++ lcd->LCDSADDR2 = (lcd->LCDSADDR1&0x1fffff) + (pGD->winSizeX+0) * pGD->winSizeY; ++ lcd->LCDSADDR3 = pGD->winSizeX; ++ ++ /* Clear video memory */ ++ memset(pGD->frameAdrs, 0, pGD->memSize); ++ ++ /* Enable Display */ ++ lcd->LCDCON1 |= 0x01; /* ENVID = 1 */ ++ ++ return ((void*)&smi); ++} ++ ++void ++video_set_lut (unsigned int index, /* color number */ ++ unsigned char r, /* red */ ++ unsigned char g, /* green */ ++ unsigned char b /* blue */ ++ ) ++{ ++} ++ ++#endif /* CONFIG_VIDEO_S3C2410 */ +Index: u-boot/drivers/cfb_console.c +=================================================================== +--- u-boot.orig/drivers/cfb_console.c ++++ u-boot/drivers/cfb_console.c +@@ -141,6 +141,14 @@ + #endif + + /*****************************************************************************/ ++/* Defines for the S3C2410 driver */ ++/*****************************************************************************/ ++#ifdef CONFIG_VIDEO_S3C2410 ++/* it actually is little-endian, but the host CPU, too ! */ ++//#define VIDEO_FB_LITTLE_ENDIAN ++#endif ++ ++/*****************************************************************************/ + /* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc */ + /*****************************************************************************/ + #include +@@ -307,6 +315,11 @@ + #define SHORTSWAP32(x) (x) + #endif + ++#ifdef CONFIG_VIDEO_S3C2410 ++#undef SHORTSWAP32 ++#define SHORTSWAP32(x) ((((x) & 0xffff) << 16) | (((x) >> 16) & 0xffff)) ++#endif ++ + #if defined(DEBUG) || defined(DEBUG_CFB_CONSOLE) + #define PRINTD(x) printf(x) + #else diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch new file mode 100644 index 0000000000..16bee3e26a --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch @@ -0,0 +1,1263 @@ +USB Device Controller Driver for Samsung S3C2410 SoC + +Index: u-boot/drivers/Makefile +=================================================================== +--- u-boot.orig/drivers/Makefile ++++ u-boot/drivers/Makefile +@@ -47,7 +47,7 @@ + status_led.o sym53c8xx.o systemace.o ahci.o \ + ti_pci1410a.o tigon3.o tsec.o \ + tsi108_eth.o tsi108_i2c.o tsi108_pci.o \ +- usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbtty.o \ ++ usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o usbtty.o \ + videomodes.o w83c553f.o \ + ks8695eth.o \ + pcf50606.o \ +Index: u-boot/drivers/usbdcore_s3c2410.c +=================================================================== +--- /dev/null ++++ u-boot/drivers/usbdcore_s3c2410.c +@@ -0,0 +1,730 @@ ++/* S3C2410 USB Device Controller Driver for u-boot ++ * ++ * (C) Copyright 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * based on Linux' s3c2410_udc.c, which is ++ * Copyright (C) 2004-2006 Herbert Pötzl - Arnaud Patard ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#include ++ ++#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) ++ ++#include ++ ++/* we can't use the regular debug macros since the console might be ++ * set to usbtty, which would cause deadlocks! */ ++#ifdef DEBUG ++#undef debug ++#undef debugX ++#define debug(fmt,args...) serial_printf (fmt ,##args) ++#define debugX(level,fmt,args...) if (DEBUG>=level) serial_printf(fmt,##args) ++#endif ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#include ++#include ++ ++#include "usbdcore.h" ++#include "usbdcore_s3c2410.h" ++#include "usbdcore_ep0.h" ++#include ++ ++enum ep0_state { ++ EP0_IDLE, ++ EP0_IN_DATA_PHASE, ++ EP0_OUT_DATA_PHASE, ++ EP0_END_XFER, ++ EP0_STALL, ++}; ++ ++static struct urb *ep0_urb = NULL; ++ ++static struct usb_device_instance *udc_device; /* Used in interrupt handler */ ++ ++static inline int fifo_count_out(void) ++{ ++ int tmp; ++ ++ tmp = inl(S3C2410_UDC_OUT_FIFO_CNT2_REG) << 8; ++ tmp |= inl(S3C2410_UDC_OUT_FIFO_CNT1_REG); ++ ++ return tmp & 0xffff; ++} ++ ++static const unsigned long ep_fifo_reg[S3C2410_UDC_NUM_ENDPOINTS] = { ++ S3C2410_UDC_EP0_FIFO_REG, ++ S3C2410_UDC_EP1_FIFO_REG, ++ S3C2410_UDC_EP2_FIFO_REG, ++ S3C2410_UDC_EP3_FIFO_REG, ++ S3C2410_UDC_EP4_FIFO_REG, ++}; ++ ++static int s3c2410_write_noniso_tx_fifo(struct usb_endpoint_instance *endpoint) ++{ ++ struct urb *urb = endpoint->tx_urb; ++ unsigned int last, i; ++ unsigned int ep = endpoint->endpoint_address & 0x7f; ++ unsigned long fifo_reg = ep_fifo_reg[ep]; ++ ++ /* WARNING: don't ever put serial debug printf's in non-error codepaths ++ * here, it is called from the time critical EP0 codepath ! */ ++ ++ if (!urb || ep >= S3C2410_UDC_NUM_ENDPOINTS) { ++ serial_printf("no urb or wrong endpoint\n"); ++ return -1; ++ } ++ ++ S3C2410_UDC_SETIX(ep); ++ if ((last = MIN(urb->actual_length - endpoint->sent, ++ endpoint->tx_packetSize))) { ++ u8 *cp = urb->buffer + endpoint->sent; ++ ++ for (i = 0; i < last; i++) ++ outb(*(cp+i), fifo_reg); ++ } ++ endpoint->last = last; ++ ++ if (endpoint->sent + last < urb->actual_length) { ++ /* not all data has been transmitted so far */ ++ return 0; ++ } ++ ++ if (last == endpoint->tx_packetSize) { ++ /* we need to send one more packet (ZLP) */ ++ return 0; ++ } ++ ++ return 1; ++} ++ ++ ++static void s3c2410_deconfigure_device (void) ++{ ++ /* FIXME: Implement this */ ++} ++ ++static void s3c2410_configure_device (struct usb_device_instance *device) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ S3C24X0_CLOCK_POWER * const cpower = S3C24X0_GetBase_CLOCK_POWER(); ++ ++ /* disable EP0-4 SUBD interrupts ? */ ++ outl(0x00, S3C2410_UDC_USB_INT_EN_REG); ++ ++ /* UPLL already configured by board-level init code */ ++ ++ /* configure USB pads to device mode */ ++ gpio->MISCCR &= ~(S3C2410_MISCCR_USBHOST|S3C2410_MISCCR_USBSUSPND1); ++ ++ /* don't disable USB clock */ ++ cpower->CLKSLOW &= ~S3C2410_CLKSLOW_UCLK_OFF; ++ ++ /* clear interrupt registers */ ++ inl(S3C2410_UDC_EP_INT_REG); ++ inl(S3C2410_UDC_USB_INT_REG); ++ outl(0xff, S3C2410_UDC_EP_INT_REG); ++ outl(0xff, S3C2410_UDC_USB_INT_REG); ++ ++ /* enable USB interrupts for RESET and SUSPEND/RESUME */ ++ outl(S3C2410_UDC_USBINT_RESET|S3C2410_UDC_USBINT_SUSPEND, ++ S3C2410_UDC_USB_INT_EN_REG); ++} ++ ++static void udc_set_address(unsigned char address) ++{ ++ address |= 0x80; /* ADDR_UPDATE bit */ ++ outl(address, S3C2410_UDC_FUNC_ADDR_REG); ++} ++ ++extern struct usb_device_descriptor device_descriptor; ++ ++static void s3c2410_udc_ep0(void) ++{ ++ u_int8_t ep0csr; ++ struct usb_endpoint_instance *ep0 = udc_device->bus->endpoint_array; ++ ++ S3C2410_UDC_SETIX(0); ++ ep0csr = inl(S3C2410_UDC_IN_CSR1_REG); ++ ++ /* clear stall status */ ++ if (ep0csr & S3C2410_UDC_EP0_CSR_SENTSTL) { ++ serial_printf("Clearing SENT_STALL\n"); ++ clear_ep0_sst(); ++ if (ep0csr & S3C2410_UDC_EP0_CSR_SOPKTRDY) ++ clear_ep0_opr(); ++ ep0->state = EP0_IDLE; ++ return; ++ } ++ ++ /* clear setup end */ ++ if (ep0csr & S3C2410_UDC_EP0_CSR_SE ++ /* && ep0->state != EP0_IDLE */) { ++ serial_printf("Clearing SETUP_END\n"); ++ clear_ep0_se(); ++#if 1 ++ if (ep0csr & S3C2410_UDC_EP0_CSR_SOPKTRDY) { ++ /* Flush FIFO */ ++ while (inl(S3C2410_UDC_OUT_FIFO_CNT1_REG)) ++ inl(S3C2410_UDC_EP0_FIFO_REG); ++ clear_ep0_opr(); ++ } ++#endif ++ ep0->state = EP0_IDLE; ++ return; ++ } ++ ++ /* Don't ever put [serial] debugging in non-error codepaths here, it ++ * will violate the tight timing constraints of this USB Device ++ * controller (and lead to bus enumeration failures) */ ++ ++ switch (ep0->state) { ++ int i, fifo_count; ++ unsigned char *datap; ++ case EP0_IDLE: ++ if (!(ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY)) ++ break; ++ ++ datap = (unsigned char *) &ep0_urb->device_request; ++ /* host->device packet has been received */ ++ ++ /* pull it out of the fifo */ ++ fifo_count = fifo_count_out(); ++ for (i = 0; i < fifo_count; i++) { ++ *datap = (unsigned char)inl(S3C2410_UDC_EP0_FIFO_REG); ++ datap++; ++ } ++ if (fifo_count != 8) { ++ debug("STRANGE FIFO COUNT: %u bytes\n", fifo_count); ++ set_ep0_ss(); ++ return; ++ } ++ ++ if (ep0_urb->device_request.wLength == 0) { ++ if (ep0_recv_setup(ep0_urb)) { ++ /* Not a setup packet, stall next EP0 transaction */ ++ debug("can't parse setup packet1\n"); ++ set_ep0_ss(); ++ set_ep0_de_out(); ++ ep0->state = EP0_IDLE; ++ return; ++ } ++ /* There are some requests with which we need to deal ++ * manually here */ ++ switch (ep0_urb->device_request.bRequest) { ++ case USB_REQ_SET_CONFIGURATION: ++ if (!ep0_urb->device_request.wValue) ++ usbd_device_event_irq(udc_device, ++ DEVICE_DE_CONFIGURED, 0); ++ else ++ usbd_device_event_irq(udc_device, ++ DEVICE_CONFIGURED, 0); ++ break; ++ case USB_REQ_SET_ADDRESS: ++ udc_set_address(udc_device->address); ++ usbd_device_event_irq(udc_device, ++ DEVICE_ADDRESS_ASSIGNED, 0); ++ break; ++ default: ++ break; ++ } ++ set_ep0_de_out(); ++ ep0->state = EP0_IDLE; ++ } else { ++ if ((ep0_urb->device_request.bmRequestType & USB_REQ_DIRECTION_MASK) ++ == USB_REQ_HOST2DEVICE) { ++ clear_ep0_opr(); ++ ep0->state = EP0_OUT_DATA_PHASE; ++ ep0_urb->buffer = ep0_urb->buffer_data; ++ ep0_urb->buffer_length = sizeof(ep0_urb->buffer_data); ++ ep0_urb->actual_length = 0; ++ } else { ++ ep0->state = EP0_IN_DATA_PHASE; ++ ++ if (ep0_recv_setup(ep0_urb)) { ++ /* Not a setup packet, stall next EP0 transaction */ ++ debug("can't parse setup packet2\n"); ++ set_ep0_ss(); ++ //set_ep0_de_out(); ++ ep0->state = EP0_IDLE; ++ return; ++ } ++ clear_ep0_opr(); ++ ep0->tx_urb = ep0_urb; ++ ep0->sent = ep0->last = 0; ++ ++ if (s3c2410_write_noniso_tx_fifo(ep0)) { ++ ep0->state = EP0_IDLE; ++ set_ep0_de_in(); ++ } else ++ set_ep0_ipr(); ++ } ++ } ++ break; ++ case EP0_IN_DATA_PHASE: ++ if (!(ep0csr & S3C2410_UDC_EP0_CSR_IPKRDY)) { ++ ep0->sent += ep0->last; ++ ++ if (s3c2410_write_noniso_tx_fifo(ep0)) { ++ ep0->state = EP0_IDLE; ++ set_ep0_de_in(); ++ } else ++ set_ep0_ipr(); ++ } ++ break; ++ case EP0_OUT_DATA_PHASE: ++ if (ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY) { ++ u32 urb_avail = ep0_urb->buffer_length - ep0_urb->actual_length; ++ u_int8_t *cp = ep0_urb->buffer + ep0_urb->actual_length; ++ int i, fifo_count; ++ ++ fifo_count = fifo_count_out(); ++ if (fifo_count < urb_avail) ++ urb_avail = fifo_count; ++ ++ for (i = 0; i < urb_avail; i++) ++ *cp++ = inl(S3C2410_UDC_EP0_FIFO_REG); ++ ++ ep0_urb->actual_length += urb_avail; ++ ++ if (fifo_count < ep0->rcv_packetSize || ++ ep0_urb->actual_length >= ep0_urb->device_request.wLength) { ++ ep0->state = EP0_IDLE; ++ if (ep0_recv_setup(ep0_urb)) { ++ /* Not a setup packet, stall next EP0 transaction */ ++ debug("can't parse setup packet3\n"); ++ set_ep0_ss(); ++ //set_ep0_de_out(); ++ return; ++ } ++ set_ep0_de_out(); ++ } else ++ clear_ep0_opr(); ++ } ++ break; ++ case EP0_END_XFER: ++ ep0->state = EP0_IDLE; ++ break; ++ case EP0_STALL: ++ //set_ep0_ss; ++ ep0->state = EP0_IDLE; ++ break; ++ } ++} ++ ++ ++static void s3c2410_udc_epn(int ep) ++{ ++ struct usb_endpoint_instance *endpoint; ++ struct urb *urb; ++ u32 ep_csr1; ++ ++ if (ep >= S3C2410_UDC_NUM_ENDPOINTS) ++ return; ++ ++ endpoint = &udc_device->bus->endpoint_array[ep]; ++ ++ S3C2410_UDC_SETIX(ep); ++ ++ if (endpoint->endpoint_address & USB_DIR_IN) { ++ /* IN transfer (device to host) */ ++ ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG); ++ debug("for ep=%u, CSR1=0x%x ", ep, ep_csr1); ++ ++ urb = endpoint->tx_urb; ++ if (ep_csr1 & S3C2410_UDC_ICSR1_SENTSTL) { ++ /* Stall handshake */ ++ debug("stall\n"); ++ outl(0x00, S3C2410_UDC_IN_CSR1_REG); ++ return; ++ } ++ if (!(ep_csr1 & S3C2410_UDC_ICSR1_PKTRDY) && urb && ++ urb->actual_length) { ++ ++ debug("completing previously send data "); ++ usbd_tx_complete(endpoint); ++ ++ /* push pending data into FIFO */ ++ if ((endpoint->last == endpoint->tx_packetSize) && ++ (urb->actual_length - endpoint->sent - endpoint->last == 0)) { ++ endpoint->sent += endpoint->last; ++ /* Write 0 bytes of data (ZLP) */ ++ debug("ZLP "); ++ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); ++ } else { ++ /* write actual data to fifo */ ++ debug("TX_DATA "); ++ s3c2410_write_noniso_tx_fifo(endpoint); ++ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); ++ } ++ } ++ debug("\n"); ++ } else { ++ /* OUT transfer (host to device) */ ++ ep_csr1 = inl(S3C2410_UDC_OUT_CSR1_REG); ++ debug("for ep=%u, CSR1=0x%x ", ep, ep_csr1); ++ ++ urb = endpoint->rcv_urb; ++ if (ep_csr1 & S3C2410_UDC_OCSR1_SENTSTL) { ++ /* Stall handshake */ ++ outl(0x00, S3C2410_UDC_IN_CSR1_REG); ++ return; ++ } ++ if ((ep_csr1 & S3C2410_UDC_OCSR1_PKTRDY) && urb) { ++ /* Read pending data from fifo */ ++ u32 fifo_count = fifo_count_out(); ++ int is_last = 0; ++ u32 i, urb_avail = urb->buffer_length - urb->actual_length; ++ u8 *cp = urb->buffer + urb->actual_length; ++ ++ if (fifo_count < endpoint->rcv_packetSize) ++ is_last = 1; ++ ++ debug("fifo_count=%u is_last=%, urb_avail=%u)\n", ++ fifo_count, is_last, urb_avail); ++ ++ if (fifo_count < urb_avail) ++ urb_avail = fifo_count; ++ ++ for (i = 0; i < urb_avail; i++) ++ *cp++ = inb(ep_fifo_reg[ep]); ++ ++ if (is_last) ++ outl(ep_csr1 & ~S3C2410_UDC_OCSR1_PKTRDY, ++ S3C2410_UDC_OUT_CSR1_REG); ++ ++ usbd_rcv_complete(endpoint, urb_avail, 0); ++ } ++ } ++ ++ urb = endpoint->rcv_urb; ++} ++ ++/* ++------------------------------------------------------------------------------- ++*/ ++ ++/* this is just an empty wrapper for usbtty who assumes polling operation */ ++void udc_irq(void) ++{ ++} ++ ++/* Handle general USB interrupts and dispatch according to type. ++ * This function implements TRM Figure 14-13. ++ */ ++void s3c2410_udc_irq(void) ++{ ++ struct usb_endpoint_instance *ep0 = udc_device->bus->endpoint_array; ++ u_int32_t save_idx = inl(S3C2410_UDC_INDEX_REG); ++ ++ /* read interrupt sources */ ++ u_int32_t usb_status = inl(S3C2410_UDC_USB_INT_REG); ++ u_int32_t usbd_status = inl(S3C2410_UDC_EP_INT_REG); ++ ++ //debug("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status, usbd_status); ++ ++ /* clear interrupts */ ++ outl(usb_status, S3C2410_UDC_USB_INT_REG); ++ ++ if (usb_status & S3C2410_UDC_USBINT_RESET) { ++ //serial_putc('R'); ++ debug("RESET pwr=0x%x\n", inl(S3C2410_UDC_PWR_REG)); ++ udc_setup_ep(udc_device, 0, ep0); ++ outl(S3C2410_UDC_EP0_CSR_SSE|S3C2410_UDC_EP0_CSR_SOPKTRDY, S3C2410_UDC_EP0_CSR_REG); ++ ep0->state = EP0_IDLE; ++ usbd_device_event_irq (udc_device, DEVICE_RESET, 0); ++ } ++ ++ if (usb_status & S3C2410_UDC_USBINT_RESUME) { ++ debug("RESUME\n"); ++ usbd_device_event_irq(udc_device, DEVICE_BUS_ACTIVITY, 0); ++ } ++ ++ if (usb_status & S3C2410_UDC_USBINT_SUSPEND) { ++ debug("SUSPEND\n"); ++ usbd_device_event_irq(udc_device, DEVICE_BUS_INACTIVE, 0); ++ } ++ ++ /* Endpoint Interrupts */ ++ if (usbd_status) { ++ int i; ++ ++ if (usbd_status & S3C2410_UDC_INT_EP0) { ++ outl(S3C2410_UDC_INT_EP0, S3C2410_UDC_EP_INT_REG); ++ s3c2410_udc_ep0(); ++ } ++ ++ for (i = 1; i < 5; i++) { ++ u_int32_t tmp = 1 << i; ++ ++ if (usbd_status & tmp) { ++ /* FIXME: Handle EP X */ ++ outl(tmp, S3C2410_UDC_EP_INT_REG); ++ s3c2410_udc_epn(i); ++ } ++ } ++ } ++ S3C2410_UDC_SETIX(save_idx); ++} ++ ++/* ++------------------------------------------------------------------------------- ++*/ ++ ++ ++/* ++ * Start of public functions. ++ */ ++ ++/* Called to start packet transmission. */ ++void udc_endpoint_write (struct usb_endpoint_instance *endpoint) ++{ ++ unsigned short epnum = ++ endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK; ++ ++ debug("Entering for ep %x ", epnum); ++ ++ if (endpoint->tx_urb) { ++ u32 ep_csr1; ++ debug("We have an URB, transmitting\n"); ++ ++ s3c2410_write_noniso_tx_fifo(endpoint); ++ ++ S3C2410_UDC_SETIX(epnum); ++ ++ ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG); ++ outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); ++ } else ++ debug("\n"); ++} ++ ++/* Start to initialize h/w stuff */ ++int udc_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); ++ ++ udc_device = NULL; ++ ++ /* Set and check clock control. ++ * We might ought to be using the clock control API to do ++ * this instead of fiddling with the clock registers directly ++ * here. ++ */ ++ clk_power->CLKCON |= (1 << 7); ++ ++ /* Print banner with device revision */ ++ printf("USB: S3C2410 USB Deviced\n"); ++ ++ /* ++ * At this point, device is ready for configuration... ++ */ ++ outl(0x00, S3C2410_UDC_EP_INT_EN_REG); ++ outl(0x00, S3C2410_UDC_USB_INT_EN_REG); ++ ++ irq->INTMSK &= ~BIT_USBD; ++ ++ return 0; ++} ++ ++/* ++ * udc_setup_ep - setup endpoint ++ * ++ * Associate a physical endpoint with endpoint_instance ++ */ ++int udc_setup_ep (struct usb_device_instance *device, ++ unsigned int ep, struct usb_endpoint_instance *endpoint) ++{ ++ int ep_addr = endpoint->endpoint_address; ++ int packet_size; ++ int attributes; ++ u_int32_t maxp; ++ ++ S3C2410_UDC_SETIX(ep); ++ ++ if (ep) { ++ if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { ++ /* IN endpoint */ ++ outl(S3C2410_UDC_ICSR1_FFLUSH|S3C2410_UDC_ICSR1_CLRDT, ++ S3C2410_UDC_IN_CSR1_REG); ++ outl(S3C2410_UDC_ICSR2_MODEIN, S3C2410_UDC_IN_CSR2_REG); ++ packet_size = endpoint->tx_packetSize; ++ attributes = endpoint->tx_attributes; ++ } else { ++ /* OUT endpoint */ ++ outl(S3C2410_UDC_ICSR1_CLRDT, S3C2410_UDC_IN_CSR1_REG); ++ outl(0, S3C2410_UDC_IN_CSR2_REG); ++ outl(S3C2410_UDC_OCSR1_FFLUSH|S3C2410_UDC_OCSR1_CLRDT, ++ S3C2410_UDC_OUT_CSR1_REG); ++ outl(0, S3C2410_UDC_OUT_CSR2_REG); ++ packet_size = endpoint->rcv_packetSize; ++ attributes = endpoint->rcv_attributes; ++ } ++ } else ++ packet_size = endpoint->tx_packetSize; ++ ++ switch (packet_size) { ++ case 8: ++ maxp = S3C2410_UDC_MAXP_8; ++ break; ++ case 16: ++ maxp = S3C2410_UDC_MAXP_16; ++ break; ++ case 32: ++ maxp = S3C2410_UDC_MAXP_32; ++ break; ++ case 64: ++ maxp = S3C2410_UDC_MAXP_64; ++ break; ++ default: ++ debug("invalid packet size %u\n", packet_size); ++ return -1; ++ } ++ ++ debug("setting up endpoint %u addr %x packet_size %u maxp %u\n", ep, ++ endpoint->endpoint_address, packet_size, maxp); ++ ++ /* Set maximum packet size */ ++ writel(maxp, S3C2410_UDC_MAXP_REG); ++ ++ return 0; ++} ++ ++/* ************************************************************************** */ ++ ++/** ++ * udc_connected - is the USB cable connected ++ * ++ * Return non-zero if cable is connected. ++ */ ++#if 0 ++int udc_connected (void) ++{ ++ return ((inw (UDC_DEVSTAT) & UDC_ATT) == UDC_ATT); ++} ++#endif ++ ++/* Turn on the USB connection by enabling the pullup resistor */ ++void udc_connect (void) ++{ ++ debug("connect, enable Pullup\n"); ++ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); ++ ++ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 0); ++ udelay(10000); ++ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 1); ++ ++ irq->INTMSK &= ~BIT_USBD; ++} ++ ++/* Turn off the USB connection by disabling the pullup resistor */ ++void udc_disconnect (void) ++{ ++ debug("disconnect, disable Pullup\n"); ++ S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); ++ ++ udc_ctrl(UDC_CTRL_PULLUP_ENABLE, 0); ++ ++ /* Disable interrupt (we don't want to get interrupts while the kernel ++ * is relocating itself */ ++ irq->INTMSK |= BIT_USBD; ++} ++ ++/* Switch on the UDC */ ++void udc_enable (struct usb_device_instance *device) ++{ ++ debug("enable device %p, status %d\n", device, device->status); ++ ++ /* Save the device structure pointer */ ++ udc_device = device; ++ ++ /* Setup ep0 urb */ ++ if (!ep0_urb) ++ ep0_urb = usbd_alloc_urb(udc_device, ++ udc_device->bus->endpoint_array); ++ else ++ serial_printf("udc_enable: ep0_urb already allocated %p\n", ++ ep0_urb); ++ ++ s3c2410_configure_device(device); ++} ++ ++/* Switch off the UDC */ ++void udc_disable (void) ++{ ++ debug("disable UDC\n"); ++ ++ s3c2410_deconfigure_device(); ++ ++ /* Free ep0 URB */ ++ if (ep0_urb) { ++ /*usbd_dealloc_urb(ep0_urb); */ ++ ep0_urb = NULL; ++ } ++ ++ /* Reset device pointer. ++ * We ought to do this here to balance the initialization of udc_device ++ * in udc_enable, but some of our other exported functions get called ++ * by the bus interface driver after udc_disable, so we have to hang on ++ * to the device pointer to avoid a null pointer dereference. */ ++ /* udc_device = NULL; */ ++} ++ ++/** ++ * udc_startup - allow udc code to do any additional startup ++ */ ++void udc_startup_events (struct usb_device_instance *device) ++{ ++ /* The DEVICE_INIT event puts the USB device in the state STATE_INIT. */ ++ usbd_device_event_irq (device, DEVICE_INIT, 0); ++ ++ /* The DEVICE_CREATE event puts the USB device in the state ++ * STATE_ATTACHED. ++ */ ++ usbd_device_event_irq (device, DEVICE_CREATE, 0); ++ ++ /* Some USB controller driver implementations signal ++ * DEVICE_HUB_CONFIGURED and DEVICE_RESET events here. ++ * DEVICE_HUB_CONFIGURED causes a transition to the state STATE_POWERED, ++ * and DEVICE_RESET causes a transition to the state STATE_DEFAULT. ++ * The OMAP USB client controller has the capability to detect when the ++ * USB cable is connected to a powered USB bus via the ATT bit in the ++ * DEVSTAT register, so we will defer the DEVICE_HUB_CONFIGURED and ++ * DEVICE_RESET events until later. ++ */ ++ ++ /* The GTA01 can detect usb device attachment, but we just assume being ++ * attached for now (go to STATE_POWERED) */ ++ usbd_device_event_irq (device, DEVICE_HUB_CONFIGURED, 0); ++ ++ udc_enable (device); ++} ++ ++void udc_set_nak(int epid) ++{ ++ /* FIXME: implement this */ ++} ++ ++void udc_unset_nak(int epid) ++{ ++ /* FIXME: implement this */ ++} ++ ++#endif /* CONFIG_S3C2410 && CONFIG_USB_DEVICE */ +Index: u-boot/drivers/usbdcore_s3c2410.h +=================================================================== +--- /dev/null ++++ u-boot/drivers/usbdcore_s3c2410.h +@@ -0,0 +1,273 @@ ++/* linux/include/asm/arch-s3c2410/regs-udc.h ++ * ++ * Copyright (C) 2004 Herbert Poetzl ++ * ++ * This include file 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. ++ * ++ * Changelog: ++ * 01-08-2004 Initial creation ++ * 12-09-2004 Cleanup for submission ++ * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition ++ * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA ++ * 10-01-2007 Modify for u-boot ++ */ ++ ++#ifndef __ASM_ARCH_REGS_UDC_H ++#define __ASM_ARCH_REGS_UDC_H ++ ++#define S3C2410_UDC_REG_BASE_PHYS 0x52000000 ++#define S3C2410_UDC_NUM_ENDPOINTS 5 ++ ++#define S3C2410_USBDREG(x) (x + S3C2410_UDC_REG_BASE_PHYS) ++ ++#define S3C2410_UDC_FUNC_ADDR_REG S3C2410_USBDREG(0x0140) ++#define S3C2410_UDC_PWR_REG S3C2410_USBDREG(0x0144) ++#define S3C2410_UDC_EP_INT_REG S3C2410_USBDREG(0x0148) ++ ++#define S3C2410_UDC_USB_INT_REG S3C2410_USBDREG(0x0158) ++#define S3C2410_UDC_EP_INT_EN_REG S3C2410_USBDREG(0x015c) ++ ++#define S3C2410_UDC_USB_INT_EN_REG S3C2410_USBDREG(0x016c) ++ ++#define S3C2410_UDC_FRAME_NUM1_REG S3C2410_USBDREG(0x0170) ++#define S3C2410_UDC_FRAME_NUM2_REG S3C2410_USBDREG(0x0174) ++ ++#define S3C2410_UDC_EP0_FIFO_REG S3C2410_USBDREG(0x01c0) ++#define S3C2410_UDC_EP1_FIFO_REG S3C2410_USBDREG(0x01c4) ++#define S3C2410_UDC_EP2_FIFO_REG S3C2410_USBDREG(0x01c8) ++#define S3C2410_UDC_EP3_FIFO_REG S3C2410_USBDREG(0x01cc) ++#define S3C2410_UDC_EP4_FIFO_REG S3C2410_USBDREG(0x01d0) ++ ++#define S3C2410_UDC_EP1_DMA_CON S3C2410_USBDREG(0x0200) ++#define S3C2410_UDC_EP1_DMA_UNIT S3C2410_USBDREG(0x0204) ++#define S3C2410_UDC_EP1_DMA_FIFO S3C2410_USBDREG(0x0208) ++#define S3C2410_UDC_EP1_DMA_TTC_L S3C2410_USBDREG(0x020c) ++#define S3C2410_UDC_EP1_DMA_TTC_M S3C2410_USBDREG(0x0210) ++#define S3C2410_UDC_EP1_DMA_TTC_H S3C2410_USBDREG(0x0214) ++ ++#define S3C2410_UDC_EP2_DMA_CON S3C2410_USBDREG(0x0218) ++#define S3C2410_UDC_EP2_DMA_UNIT S3C2410_USBDREG(0x021c) ++#define S3C2410_UDC_EP2_DMA_FIFO S3C2410_USBDREG(0x0220) ++#define S3C2410_UDC_EP2_DMA_TTC_L S3C2410_USBDREG(0x0224) ++#define S3C2410_UDC_EP2_DMA_TTC_M S3C2410_USBDREG(0x0228) ++#define S3C2410_UDC_EP2_DMA_TTC_H S3C2410_USBDREG(0x022c) ++ ++#define S3C2410_UDC_EP3_DMA_CON S3C2410_USBDREG(0x0240) ++#define S3C2410_UDC_EP3_DMA_UNIT S3C2410_USBDREG(0x0244) ++#define S3C2410_UDC_EP3_DMA_FIFO S3C2410_USBDREG(0x0248) ++#define S3C2410_UDC_EP3_DMA_TTC_L S3C2410_USBDREG(0x024c) ++#define S3C2410_UDC_EP3_DMA_TTC_M S3C2410_USBDREG(0x0250) ++#define S3C2410_UDC_EP3_DMA_TTC_H S3C2410_USBDREG(0x0254) ++ ++#define S3C2410_UDC_EP4_DMA_CON S3C2410_USBDREG(0x0258) ++#define S3C2410_UDC_EP4_DMA_UNIT S3C2410_USBDREG(0x025c) ++#define S3C2410_UDC_EP4_DMA_FIFO S3C2410_USBDREG(0x0260) ++#define S3C2410_UDC_EP4_DMA_TTC_L S3C2410_USBDREG(0x0264) ++#define S3C2410_UDC_EP4_DMA_TTC_M S3C2410_USBDREG(0x0268) ++#define S3C2410_UDC_EP4_DMA_TTC_H S3C2410_USBDREG(0x026c) ++ ++#define S3C2410_UDC_INDEX_REG S3C2410_USBDREG(0x0178) ++ ++/* indexed registers */ ++ ++#define S3C2410_UDC_MAXP_REG S3C2410_USBDREG(0x0180) ++ ++#define S3C2410_UDC_EP0_CSR_REG S3C2410_USBDREG(0x0184) ++ ++#define S3C2410_UDC_IN_CSR1_REG S3C2410_USBDREG(0x0184) ++#define S3C2410_UDC_IN_CSR2_REG S3C2410_USBDREG(0x0188) ++ ++#define S3C2410_UDC_OUT_CSR1_REG S3C2410_USBDREG(0x0190) ++#define S3C2410_UDC_OUT_CSR2_REG S3C2410_USBDREG(0x0194) ++#define S3C2410_UDC_OUT_FIFO_CNT1_REG S3C2410_USBDREG(0x0198) ++#define S3C2410_UDC_OUT_FIFO_CNT2_REG S3C2410_USBDREG(0x019c) ++ ++ ++ ++#define S3C2410_UDC_PWR_ISOUP (1<<7) // R/W ++#define S3C2410_UDC_PWR_RESET (1<<3) // R ++#define S3C2410_UDC_PWR_RESUME (1<<2) // R/W ++#define S3C2410_UDC_PWR_SUSPEND (1<<1) // R ++#define S3C2410_UDC_PWR_ENSUSPEND (1<<0) // R/W ++ ++#define S3C2410_UDC_PWR_DEFAULT 0x00 ++ ++#define S3C2410_UDC_INT_EP4 (1<<4) // R/W (clear only) ++#define S3C2410_UDC_INT_EP3 (1<<3) // R/W (clear only) ++#define S3C2410_UDC_INT_EP2 (1<<2) // R/W (clear only) ++#define S3C2410_UDC_INT_EP1 (1<<1) // R/W (clear only) ++#define S3C2410_UDC_INT_EP0 (1<<0) // R/W (clear only) ++ ++#define S3C2410_UDC_USBINT_RESET (1<<2) // R/W (clear only) ++#define S3C2410_UDC_USBINT_RESUME (1<<1) // R/W (clear only) ++#define S3C2410_UDC_USBINT_SUSPEND (1<<0) // R/W (clear only) ++ ++#define S3C2410_UDC_INTE_EP4 (1<<4) // R/W ++#define S3C2410_UDC_INTE_EP3 (1<<3) // R/W ++#define S3C2410_UDC_INTE_EP2 (1<<2) // R/W ++#define S3C2410_UDC_INTE_EP1 (1<<1) // R/W ++#define S3C2410_UDC_INTE_EP0 (1<<0) // R/W ++ ++#define S3C2410_UDC_USBINTE_RESET (1<<2) // R/W ++#define S3C2410_UDC_USBINTE_SUSPEND (1<<0) // R/W ++ ++ ++#define S3C2410_UDC_INDEX_EP0 (0x00) ++#define S3C2410_UDC_INDEX_EP1 (0x01) // ?? ++#define S3C2410_UDC_INDEX_EP2 (0x02) // ?? ++#define S3C2410_UDC_INDEX_EP3 (0x03) // ?? ++#define S3C2410_UDC_INDEX_EP4 (0x04) // ?? ++ ++#define S3C2410_UDC_ICSR1_CLRDT (1<<6) // R/W ++#define S3C2410_UDC_ICSR1_SENTSTL (1<<5) // R/W (clear only) ++#define S3C2410_UDC_ICSR1_SENDSTL (1<<4) // R/W ++#define S3C2410_UDC_ICSR1_FFLUSH (1<<3) // W (set only) ++#define S3C2410_UDC_ICSR1_UNDRUN (1<<2) // R/W (clear only) ++#define S3C2410_UDC_ICSR1_PKTRDY (1<<0) // R/W (set only) ++ ++#define S3C2410_UDC_ICSR2_AUTOSET (1<<7) // R/W ++#define S3C2410_UDC_ICSR2_ISO (1<<6) // R/W ++#define S3C2410_UDC_ICSR2_MODEIN (1<<5) // R/W ++#define S3C2410_UDC_ICSR2_DMAIEN (1<<4) // R/W ++ ++#define S3C2410_UDC_OCSR1_CLRDT (1<<7) // R/W ++#define S3C2410_UDC_OCSR1_SENTSTL (1<<6) // R/W (clear only) ++#define S3C2410_UDC_OCSR1_SENDSTL (1<<5) // R/W ++#define S3C2410_UDC_OCSR1_FFLUSH (1<<4) // R/W ++#define S3C2410_UDC_OCSR1_DERROR (1<<3) // R ++#define S3C2410_UDC_OCSR1_OVRRUN (1<<2) // R/W (clear only) ++#define S3C2410_UDC_OCSR1_PKTRDY (1<<0) // R/W (clear only) ++ ++#define S3C2410_UDC_OCSR2_AUTOCLR (1<<7) // R/W ++#define S3C2410_UDC_OCSR2_ISO (1<<6) // R/W ++#define S3C2410_UDC_OCSR2_DMAIEN (1<<5) // R/W ++ ++#define S3C2410_UDC_SETIX(X) writel(X, S3C2410_UDC_INDEX_REG) ++ ++#define S3C2410_UDC_EP0_CSR_OPKRDY (1<<0) ++#define S3C2410_UDC_EP0_CSR_IPKRDY (1<<1) ++#define S3C2410_UDC_EP0_CSR_SENTSTL (1<<2) ++#define S3C2410_UDC_EP0_CSR_DE (1<<3) ++#define S3C2410_UDC_EP0_CSR_SE (1<<4) ++#define S3C2410_UDC_EP0_CSR_SENDSTL (1<<5) ++#define S3C2410_UDC_EP0_CSR_SOPKTRDY (1<<6) ++#define S3C2410_UDC_EP0_CSR_SSE (1<<7) ++ ++#define S3C2410_UDC_MAXP_8 (1<<0) ++#define S3C2410_UDC_MAXP_16 (1<<1) ++#define S3C2410_UDC_MAXP_32 (1<<2) ++#define S3C2410_UDC_MAXP_64 (1<<3) ++ ++/****************** MACROS ******************/ ++#define BIT_MASK 0xFF ++ ++#if 1 ++#define maskl(v,m,a) \ ++ writel((readl(a) & ~(m))|((v)&(m)), (a)) ++#else ++#define maskl(v,m,a) do { \ ++ unsigned long foo = readl(a); \ ++ unsigned long bar = (foo & ~(m)) | ((v)&(m)); \ ++ serial_printf("0x%08x:0x%x->0x%x\n", (a), foo, bar); \ ++ writel(bar, (a)); \ ++} while(0) ++#endif ++ ++#define clear_ep0_sst() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ writel(0x00, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define clear_ep0_se() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl(S3C2410_UDC_EP0_CSR_SSE, \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define clear_ep0_opr() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl(S3C2410_UDC_EP0_CSR_SOPKTRDY, \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_ipr() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl(S3C2410_UDC_EP0_CSR_IPKRDY, \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_de() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl(S3C2410_UDC_EP0_CSR_DE, \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_ss() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl(S3C2410_UDC_EP0_CSR_SENDSTL, \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_de_out() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl((S3C2410_UDC_EP0_CSR_SOPKTRDY \ ++ | S3C2410_UDC_EP0_CSR_DE), \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_sse_out() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl((S3C2410_UDC_EP0_CSR_SOPKTRDY \ ++ | S3C2410_UDC_EP0_CSR_SSE), \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++#define set_ep0_de_in() do { \ ++ S3C2410_UDC_SETIX(0); \ ++ maskl((S3C2410_UDC_EP0_CSR_IPKRDY \ ++ | S3C2410_UDC_EP0_CSR_DE), \ ++ BIT_MASK, S3C2410_UDC_EP0_CSR_REG); \ ++} while(0) ++ ++ ++#if 0 ++ ++#define clear_stall_ep1_out(base) do { \ ++ S3C2410_UDC_SETIX(base,EP1); \ ++ orl(0,base+S3C2410_UDC_OUT_CSR1_REG); \ ++} while(0) ++ ++ ++#define clear_stall_ep2_out(base) do { \ ++ S3C2410_UDC_SETIX(base,EP2); \ ++ orl(0, base+S3C2410_UDC_OUT_CSR1_REG); \ ++} while(0) ++ ++ ++#define clear_stall_ep3_out(base) do { \ ++ S3C2410_UDC_SETIX(base,EP3); \ ++ orl(0,base+S3C2410_UDC_OUT_CSR1_REG); \ ++} while(0) ++ ++ ++#define clear_stall_ep4_out(base) do { \ ++ S3C2410_UDC_SETIX(base,EP4); \ ++ orl(0, base+S3C2410_UDC_OUT_CSR1_REG); \ ++} while(0) ++ ++#endif ++ ++/* S3C2410 Endpoint parameters */ ++#define EP0_MAX_PACKET_SIZE 16 ++#define UDC_OUT_ENDPOINT 2 ++#define UDC_OUT_PACKET_SIZE 64 ++#define UDC_IN_ENDPOINT 1 ++#define UDC_IN_PACKET_SIZE 64 ++#define UDC_INT_ENDPOINT 5 ++#define UDC_INT_PACKET_SIZE 16 ++#define UDC_BULK_PACKET_SIZE 16 ++ ++#endif +Index: u-boot/drivers/usbdcore_ep0.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_ep0.c ++++ u-boot/drivers/usbdcore_ep0.c +@@ -43,7 +43,7 @@ + + #include + +-#if defined(CONFIG_OMAP1510) && defined(CONFIG_USB_DEVICE) ++#if defined(CONFIG_USB_DEVICE) + #include "usbdcore.h" + + #if 0 +@@ -187,9 +187,13 @@ + if (!urb || !urb->buffer || !urb->buffer_length + || (urb->buffer_length < 255)) { + dbg_ep0 (2, "invalid urb %p", urb); ++ serial_printf("invalid urb %p", urb); + return -1L; + } + ++ /* re-initialize the ep0 buffer pointer */ ++ urb->buffer = (u8 *) urb->buffer_data; ++ + /* setup tx urb */ + urb->actual_length = 0; + cp = urb->buffer; +@@ -206,17 +210,8 @@ + usbd_device_device_descriptor (device, port))) { + return -1; + } +- /* copy descriptor for this device */ +- copy_config (urb, device_descriptor, +- sizeof (struct usb_device_descriptor), +- max); +- +- /* correct the correct control endpoint 0 max packet size into the descriptor */ +- device_descriptor = +- (struct usb_device_descriptor *) urb->buffer; +- device_descriptor->bMaxPacketSize0 = +- urb->device->bus->maxpacketsize; +- ++ urb->buffer = device_descriptor; ++ urb->actual_length = MIN(sizeof(*device_descriptor), max); + } + /*dbg_ep0(3, "copied device configuration, actual_length: %x", urb->actual_length); */ + break; +@@ -250,11 +245,9 @@ + index); + return -1; + } +- copy_config (urb, configuration_descriptor, +- sizeof (struct +- usb_configuration_descriptor), +- max); +- ++ urb->buffer = configuration_descriptor; ++ urb->actual_length = ++ MIN(le16_to_cpu(configuration_descriptor->wTotalLength), max); + } + break; + +@@ -376,6 +369,7 @@ + dbg_ep0 (0, "entering ep0_recv_setup()"); + if (!urb || !urb->device) { + dbg_ep0 (3, "invalid URB %p", urb); ++ serial_printf("invalid URB %p", urb); + return -1; + } + +@@ -400,6 +394,7 @@ + return device->cdc_recv_setup(request, urb); + dbg_ep0 (1, "non standard request: %x", + request->bmRequestType & USB_REQ_TYPE_MASK); ++ serial_printf("non standard request: %x", request->bmRequestType & USB_REQ_TYPE_MASK); + return -1; /* Stall here */ + } + +@@ -448,6 +443,8 @@ + dbg_ep0 (1, "request %s not allowed in UNKNOWN state: %s", + USBD_DEVICE_REQUESTS (request->bRequest), + usbd_device_states[device->device_state]); ++ serial_printf("request %s not allowed in UNKNOWN state: %s", USBD_DEVICE_REQUESTS (request->bRequest), usbd_device_states[device->device_state]); ++ break; + return -1; + } + +@@ -545,7 +542,8 @@ + /*dbg_ep0(2, "address: %d %d %d", */ + /* request->wValue, le16_to_cpu(request->wValue), device->address); */ + +- serial_printf ("DEVICE_ADDRESS_ASSIGNED.. event?\n"); ++ //serial_printf ("DEVICE_ADDRESS_ASSIGNED.. event?\n"); ++ //udc_set_address(device->address); + return 0; + + case USB_REQ_SET_DESCRIPTOR: /* XXX should we support this? */ +Index: u-boot/include/configs/neo1973_gta01.h +=================================================================== +--- u-boot.orig/include/configs/neo1973_gta01.h ++++ u-boot/include/configs/neo1973_gta01.h +@@ -173,6 +173,16 @@ + #define CONFIG_USB_OHCI 1 + #endif + ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc" ++#define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION ++#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" ++ + /*----------------------------------------------------------------------- + * Physical Memory Map + */ +Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c ++++ u-boot/cpu/arm920t/s3c24x0/interrupts.c +@@ -222,6 +222,13 @@ + S3C24X0_INTERRUPT * irq = S3C24X0_GetBase_INTERRUPT(); + u_int32_t intpnd = irq->INTPND; + ++#ifdef CONFIG_USB_DEVICE ++ if (intpnd & BIT_USBD) { ++ s3c2410_udc_irq(); ++ irq->SRCPND = BIT_USBD; ++ irq->INTPND = BIT_USBD; ++ } ++#endif /* USB_DEVICE */ + } + #endif /* USE_IRQ */ + +Index: u-boot/drivers/usbtty.h +=================================================================== +--- u-boot.orig/drivers/usbtty.h ++++ u-boot/drivers/usbtty.h +@@ -29,6 +29,8 @@ + #include "usbdcore_mpc8xx.h" + #elif defined(CONFIG_OMAP1510) + #include "usbdcore_omap1510.h" ++#elif defined(CONFIG_S3C2410) ++#include "usbdcore_s3c2410.h" + #endif + + #include +Index: u-boot/board/neo1973/common/cmd_neo1973.c +=================================================================== +--- u-boot.orig/board/neo1973/common/cmd_neo1973.c ++++ u-boot/board/neo1973/common/cmd_neo1973.c +@@ -72,6 +72,18 @@ + neo1973_vibrator(1); + else + neo1973_vibrator(0); ++ } else if (!strcmp(argv[1], "udc")) { ++ if (argc < 3) ++ goto out_help; ++ if (!strcmp(argv[2], "udc")) { ++ if (argc < 4) ++ goto out_help; ++ if (!strcmp(argv[3], "on")) ++ udc_connect(); ++ else ++ udc_disconnect(); ++ } else ++ goto out_help; + } else { + out_help: + printf("Usage:\n%s\n", cmdtp->usage); +@@ -95,5 +107,6 @@ + "neo1973 charger off - disable charging\n" + "neo1973 backlight (on|off) - switch backlight on or off\n" + "neo1973 vibrator (on|off) - switch vibrator on or off\n" ++ "neo1973 udc pullup (on|off) - switch pull-up on or off\n" + ); + #endif /* CFG_CMD_BDI */ +Index: u-boot/board/neo1973/gta01/Makefile +=================================================================== +--- u-boot.orig/board/neo1973/gta01/Makefile ++++ u-boot/board/neo1973/gta01/Makefile +@@ -25,7 +25,7 @@ + + LIB = lib$(BOARD).a + +-OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ++OBJS := gta01.o pcf50606.o ../common/cmd_neo1973.o ../common/jbt6k74.o ../common/udc.o + SOBJS := ../common/lowlevel_init.o + + $(LIB): $(OBJS) $(SOBJS) +Index: u-boot/board/neo1973/common/udc.c +=================================================================== +--- /dev/null ++++ u-boot/board/neo1973/common/udc.c +@@ -0,0 +1,23 @@ ++ ++#include ++#include ++#include ++ ++void udc_ctrl(enum usbd_event event, int param) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ switch (event) { ++ case UDC_CTRL_PULLUP_ENABLE: ++#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \ ++ defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) ++ if (param) ++ gpio->GPBDAT |= (1 << 9); ++ else ++ gpio->GPBDAT &= ~(1 << 9); ++#endif ++ break; ++ default: ++ break; ++ } ++} +Index: u-boot/include/usbdcore.h +=================================================================== +--- u-boot.orig/include/usbdcore.h ++++ u-boot/include/usbdcore.h +@@ -671,4 +671,10 @@ + void usbd_rcv_complete(struct usb_endpoint_instance *endpoint, int len, int urb_bad); + void usbd_tx_complete (struct usb_endpoint_instance *endpoint); + ++enum usbd_event { ++ UDC_CTRL_PULLUP_ENABLE, ++}; ++ ++void udc_ctrl(enum usbd_event event, int param); ++#endif + #endif diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch new file mode 100644 index 0000000000..da0fb8cf2d --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch @@ -0,0 +1,1301 @@ +Add proper support for S3C2440 CPU's + +Index: u-boot/include/s3c24x0.h +=================================================================== +--- u-boot.orig/include/s3c24x0.h ++++ u-boot/include/s3c24x0.h +@@ -82,7 +82,7 @@ + S3C24X0_REG32 PRIORITY; + S3C24X0_REG32 INTPND; + S3C24X0_REG32 INTOFFSET; +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + S3C24X0_REG32 SUBSRCPND; + S3C24X0_REG32 INTSUBMSK; + #endif +@@ -92,11 +92,11 @@ + /* DMAS (see manual chapter 8) */ + typedef struct { + S3C24X0_REG32 DISRC; +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + S3C24X0_REG32 DISRCC; + #endif + S3C24X0_REG32 DIDST; +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + S3C24X0_REG32 DIDSTC; + #endif + S3C24X0_REG32 DCON; +@@ -107,7 +107,7 @@ + #ifdef CONFIG_S3C2400 + S3C24X0_REG32 res[1]; + #endif +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + S3C24X0_REG32 res[7]; + #endif + } /*__attribute__((__packed__))*/ S3C24X0_DMA; +@@ -126,6 +126,9 @@ + S3C24X0_REG32 CLKCON; + S3C24X0_REG32 CLKSLOW; + S3C24X0_REG32 CLKDIVN; ++#ifdef CONFIG_S3C2440 ++ S3C24X0_REG32 CAMDIVN; ++#endif + } /*__attribute__((__packed__))*/ S3C24X0_CLOCK_POWER; + + +@@ -145,7 +148,7 @@ + S3C24X0_REG32 res[8]; + S3C24X0_REG32 DITHMODE; + S3C24X0_REG32 TPAL; +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + S3C24X0_REG32 LCDINTPND; + S3C24X0_REG32 LCDSRCPND; + S3C24X0_REG32 LCDINTMSK; +@@ -157,6 +160,9 @@ + /* NAND FLASH (see S3C2410 manual chapter 6) */ + typedef struct { + S3C24X0_REG32 NFCONF; ++#ifdef CONFIG_S3C2440 ++ S3C24X0_REG32 NFCONT; ++#endif + S3C24X0_REG32 NFCMD; + S3C24X0_REG32 NFADDR; + S3C24X0_REG32 NFDATA; +@@ -164,6 +170,15 @@ + S3C24X0_REG32 NFECC; + } /*__attribute__((__packed__))*/ S3C2410_NAND; + ++/* NAND FLASH (see S3C2440 manual chapter 6) */ ++typedef struct { ++ S3C24X0_REG32 NFCONF; ++ S3C24X0_REG32 NFCMD; ++ S3C24X0_REG32 NFADDR; ++ S3C24X0_REG32 NFDATA; ++ S3C24X0_REG32 NFSTAT; ++ S3C24X0_REG32 NFECC; ++} /*__attribute__((__packed__))*/ S3C2440_NAND; + + /* UART (see manual chapter 11) */ + typedef struct { +@@ -451,6 +466,65 @@ + S3C24X0_REG32 GSTATUS3; + S3C24X0_REG32 GSTATUS4; + #endif ++#ifdef CONFIG_S3C2440 ++ S3C24X0_REG32 GPACON; ++ S3C24X0_REG32 GPADAT; ++ S3C24X0_REG32 res1[2]; ++ S3C24X0_REG32 GPBCON; ++ S3C24X0_REG32 GPBDAT; ++ S3C24X0_REG32 GPBUP; ++ S3C24X0_REG32 res2; ++ S3C24X0_REG32 GPCCON; ++ S3C24X0_REG32 GPCDAT; ++ S3C24X0_REG32 GPCUP; ++ S3C24X0_REG32 res3; ++ S3C24X0_REG32 GPDCON; ++ S3C24X0_REG32 GPDDAT; ++ S3C24X0_REG32 GPDUP; ++ S3C24X0_REG32 res4; ++ S3C24X0_REG32 GPECON; ++ S3C24X0_REG32 GPEDAT; ++ S3C24X0_REG32 GPEUP; ++ S3C24X0_REG32 res5; ++ S3C24X0_REG32 GPFCON; ++ S3C24X0_REG32 GPFDAT; ++ S3C24X0_REG32 GPFUP; ++ S3C24X0_REG32 res6; ++ S3C24X0_REG32 GPGCON; ++ S3C24X0_REG32 GPGDAT; ++ S3C24X0_REG32 GPGUP; ++ S3C24X0_REG32 res7; ++ S3C24X0_REG32 GPHCON; ++ S3C24X0_REG32 GPHDAT; ++ S3C24X0_REG32 GPHUP; ++ S3C24X0_REG32 res8; ++ ++ S3C24X0_REG32 MISCCR; ++ S3C24X0_REG32 DCLKCON; ++ S3C24X0_REG32 EXTINT0; ++ S3C24X0_REG32 EXTINT1; ++ S3C24X0_REG32 EXTINT2; ++ S3C24X0_REG32 EINTFLT0; ++ S3C24X0_REG32 EINTFLT1; ++ S3C24X0_REG32 EINTFLT2; ++ S3C24X0_REG32 EINTFLT3; ++ S3C24X0_REG32 EINTMASK; ++ S3C24X0_REG32 EINTPEND; ++ S3C24X0_REG32 GSTATUS0; ++ S3C24X0_REG32 GSTATUS1; ++ S3C24X0_REG32 GSTATUS2; ++ S3C24X0_REG32 GSTATUS3; ++ S3C24X0_REG32 GSTATUS4; ++ ++ S3C24X0_REG32 res9; ++ S3C24X0_REG32 DSC0; ++ S3C24X0_REG32 DSC1; ++ S3C24X0_REG32 MSLCON; ++ S3C24X0_REG32 GPJCON; ++ S3C24X0_REG32 GPJDAT; ++ S3C24X0_REG32 GPJUP; ++ S3C24X0_REG32 res10; ++#endif + } /*__attribute__((__packed__))*/ S3C24X0_GPIO; + + +@@ -637,8 +711,13 @@ + S3C24X0_REG32 SDIDCNT; + S3C24X0_REG32 SDIDSTA; + S3C24X0_REG32 SDIFSTA; ++#if defined(CONFIG_S3C2410) + S3C24X0_REG32 SDIDAT; + S3C24X0_REG32 SDIIMSK; ++#elif defined(CONFIG_S3C2440) ++ S3C24X0_REG32 SDIIMSK; ++ S3C24X0_REG32 SDIDAT; ++#endif + } /*__attribute__((__packed__))*/ S3C2410_SDI; + + +Index: u-boot/rtc/s3c24x0_rtc.c +=================================================================== +--- u-boot.orig/rtc/s3c24x0_rtc.c ++++ u-boot/rtc/s3c24x0_rtc.c +@@ -34,6 +34,8 @@ + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + + #include +Index: u-boot/include/s3c2440.h +=================================================================== +--- /dev/null ++++ u-boot/include/s3c2440.h +@@ -0,0 +1,300 @@ ++/* ++ * (C) Copyright 2003 ++ * David Müller ELSOFT AG Switzerland. d.mueller@elsoft.ch ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++/************************************************ ++ * NAME : s3c2440.h ++ * Version : 2007. ++ * ++ * Based on S3C2410X User's manual Rev 1.1 ++ ************************************************/ ++ ++#ifndef __S3C2440_H__ ++#define __S3C2440_H__ ++ ++#define S3C24X0_UART_CHANNELS 3 ++#define S3C24X0_SPI_CHANNELS 2 ++ ++/* S3C2440 only supports 512 Byte HW ECC */ ++#define S3C2440_ECCSIZE 512 ++#define S3C2440_ECCBYTES 3 ++ ++/* S3C2440 device base addresses */ ++#define S3C24X0_MEMCTL_BASE 0x48000000 ++#define S3C24X0_USB_HOST_BASE 0x49000000 ++#define S3C24X0_INTERRUPT_BASE 0x4A000000 ++#define S3C24X0_DMA_BASE 0x4B000000 ++#define S3C24X0_CLOCK_POWER_BASE 0x4C000000 ++#define S3C24X0_LCD_BASE 0x4D000000 ++#define S3C2440_NAND_BASE 0x4E000000 ++#define S3C24X0_UART_BASE 0x50000000 ++#define S3C24X0_TIMER_BASE 0x51000000 ++#define S3C24X0_USB_DEVICE_BASE 0x52000140 ++#define USB_DEVICE_PHYS_ADR 0x52000000 ++#define S3C24X0_WATCHDOG_BASE 0x53000000 ++#define S3C24X0_I2C_BASE 0x54000000 ++#define S3C24X0_I2S_BASE 0x55000000 ++#define S3C24X0_GPIO_BASE 0x56000000 ++#define S3C24X0_RTC_BASE 0x57000000 ++#define S3C2440_ADC_BASE 0x58000000 ++#define S3C24X0_SPI_BASE 0x59000000 ++#define S3C2440_SDI_BASE 0x5A000000 ++ ++#define oNFCONF 0x00 ++#define oNFCONT 0x04 ++ ++#ifndef __ASSEMBLER__ ++ ++/* include common stuff */ ++#include ++ ++typedef enum { ++ S3C24X0_UART0, ++ S3C24X0_UART1, ++ S3C24X0_UART2 ++} S3C24X0_UARTS_NR; ++ ++static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void) ++{ ++ return (S3C24X0_MEMCTL * const)S3C24X0_MEMCTL_BASE; ++} ++static inline S3C24X0_USB_HOST * S3C24X0_GetBase_USB_HOST(void) ++{ ++ return (S3C24X0_USB_HOST * const)S3C24X0_USB_HOST_BASE; ++} ++static inline S3C24X0_INTERRUPT * S3C24X0_GetBase_INTERRUPT(void) ++{ ++ return (S3C24X0_INTERRUPT * const)S3C24X0_INTERRUPT_BASE; ++} ++static inline S3C24X0_DMAS * S3C24X0_GetBase_DMAS(void) ++{ ++ return (S3C24X0_DMAS * const)S3C24X0_DMA_BASE; ++} ++static inline S3C24X0_CLOCK_POWER * S3C24X0_GetBase_CLOCK_POWER(void) ++{ ++ return (S3C24X0_CLOCK_POWER * const)S3C24X0_CLOCK_POWER_BASE; ++} ++static inline S3C24X0_LCD * S3C24X0_GetBase_LCD(void) ++{ ++ return (S3C24X0_LCD * const)S3C24X0_LCD_BASE; ++} ++static inline S3C2440_NAND * S3C2440_GetBase_NAND(void) ++{ ++ return (S3C2440_NAND * const)S3C2440_NAND_BASE; ++} ++static inline S3C24X0_UART * S3C24X0_GetBase_UART(S3C24X0_UARTS_NR nr) ++{ ++ return (S3C24X0_UART * const)(S3C24X0_UART_BASE + (nr * 0x4000)); ++} ++static inline S3C24X0_TIMERS * S3C24X0_GetBase_TIMERS(void) ++{ ++ return (S3C24X0_TIMERS * const)S3C24X0_TIMER_BASE; ++} ++static inline S3C24X0_USB_DEVICE * S3C24X0_GetBase_USB_DEVICE(void) ++{ ++ return (S3C24X0_USB_DEVICE * const)S3C24X0_USB_DEVICE_BASE; ++} ++static inline S3C24X0_WATCHDOG * S3C24X0_GetBase_WATCHDOG(void) ++{ ++ return (S3C24X0_WATCHDOG * const)S3C24X0_WATCHDOG_BASE; ++} ++static inline S3C24X0_I2C * S3C24X0_GetBase_I2C(void) ++{ ++ return (S3C24X0_I2C * const)S3C24X0_I2C_BASE; ++} ++static inline S3C24X0_I2S * S3C24X0_GetBase_I2S(void) ++{ ++ return (S3C24X0_I2S * const)S3C24X0_I2S_BASE; ++} ++static inline S3C24X0_GPIO * S3C24X0_GetBase_GPIO(void) ++{ ++ return (S3C24X0_GPIO * const)S3C24X0_GPIO_BASE; ++} ++static inline S3C24X0_RTC * S3C24X0_GetBase_RTC(void) ++{ ++ return (S3C24X0_RTC * const)S3C24X0_RTC_BASE; ++} ++/* ++static inline S3C2440_ADC * S3C2440_GetBase_ADC(void) ++{ ++ return (S3C2440_ADC * const)S3C2440_ADC_BASE; ++} ++static inline S3C24X0_SPI * S3C24X0_GetBase_SPI(void) ++{ ++ return (S3C24X0_SPI * const)S3C24X0_SPI_BASE; ++} ++*/ ++static inline S3C2410_SDI * S3C2410_GetBase_SDI(void) ++{ ++ return (S3C2410_SDI * const)S3C2440_SDI_BASE; ++} ++ ++#endif /* __ASSEMBLER__ */ ++ ++/* ISR */ ++#define pISR_RESET (*(unsigned *)(_ISR_STARTADDRESS+0x0)) ++#define pISR_UNDEF (*(unsigned *)(_ISR_STARTADDRESS+0x4)) ++#define pISR_SWI (*(unsigned *)(_ISR_STARTADDRESS+0x8)) ++#define pISR_PABORT (*(unsigned *)(_ISR_STARTADDRESS+0xC)) ++#define pISR_DABORT (*(unsigned *)(_ISR_STARTADDRESS+0x10)) ++#define pISR_RESERVED (*(unsigned *)(_ISR_STARTADDRESS+0x14)) ++#define pISR_IRQ (*(unsigned *)(_ISR_STARTADDRESS+0x18)) ++#define pISR_FIQ (*(unsigned *)(_ISR_STARTADDRESS+0x1C)) ++ ++#define pISR_EINT0 (*(unsigned *)(_ISR_STARTADDRESS+0x20)) ++#define pISR_EINT1 (*(unsigned *)(_ISR_STARTADDRESS+0x24)) ++#define pISR_EINT2 (*(unsigned *)(_ISR_STARTADDRESS+0x28)) ++#define pISR_EINT3 (*(unsigned *)(_ISR_STARTADDRESS+0x2C)) ++#define pISR_EINT4_7 (*(unsigned *)(_ISR_STARTADDRESS+0x30)) ++#define pISR_EINT8_23 (*(unsigned *)(_ISR_STARTADDRESS+0x34)) ++#define pISR_BAT_FLT (*(unsigned *)(_ISR_STARTADDRESS+0x3C)) ++#define pISR_TICK (*(unsigned *)(_ISR_STARTADDRESS+0x40)) ++#define pISR_WDT (*(unsigned *)(_ISR_STARTADDRESS+0x44)) ++#define pISR_TIMER0 (*(unsigned *)(_ISR_STARTADDRESS+0x48)) ++#define pISR_TIMER1 (*(unsigned *)(_ISR_STARTADDRESS+0x4C)) ++#define pISR_TIMER2 (*(unsigned *)(_ISR_STARTADDRESS+0x50)) ++#define pISR_TIMER3 (*(unsigned *)(_ISR_STARTADDRESS+0x54)) ++#define pISR_TIMER4 (*(unsigned *)(_ISR_STARTADDRESS+0x58)) ++#define pISR_UART2 (*(unsigned *)(_ISR_STARTADDRESS+0x5C)) ++#define pISR_NOTUSED (*(unsigned *)(_ISR_STARTADDRESS+0x60)) ++#define pISR_DMA0 (*(unsigned *)(_ISR_STARTADDRESS+0x64)) ++#define pISR_DMA1 (*(unsigned *)(_ISR_STARTADDRESS+0x68)) ++#define pISR_DMA2 (*(unsigned *)(_ISR_STARTADDRESS+0x6C)) ++#define pISR_DMA3 (*(unsigned *)(_ISR_STARTADDRESS+0x70)) ++#define pISR_SDI (*(unsigned *)(_ISR_STARTADDRESS+0x74)) ++#define pISR_SPI0 (*(unsigned *)(_ISR_STARTADDRESS+0x78)) ++#define pISR_UART1 (*(unsigned *)(_ISR_STARTADDRESS+0x7C)) ++#define pISR_USBD (*(unsigned *)(_ISR_STARTADDRESS+0x84)) ++#define pISR_USBH (*(unsigned *)(_ISR_STARTADDRESS+0x88)) ++#define pISR_IIC (*(unsigned *)(_ISR_STARTADDRESS+0x8C)) ++#define pISR_UART0 (*(unsigned *)(_ISR_STARTADDRESS+0x90)) ++#define pISR_SPI1 (*(unsigned *)(_ISR_STARTADDRESS+0x94)) ++#define pISR_RTC (*(unsigned *)(_ISR_STARTADDRESS+0x98)) ++#define pISR_ADC (*(unsigned *)(_ISR_STARTADDRESS+0xA0)) ++ ++ ++/* PENDING BIT */ ++#define BIT_EINT0 (0x1) ++#define BIT_EINT1 (0x1<<1) ++#define BIT_EINT2 (0x1<<2) ++#define BIT_EINT3 (0x1<<3) ++#define BIT_EINT4_7 (0x1<<4) ++#define BIT_EINT8_23 (0x1<<5) ++#define BIT_BAT_FLT (0x1<<7) ++#define BIT_TICK (0x1<<8) ++#define BIT_WDT (0x1<<9) ++#define BIT_TIMER0 (0x1<<10) ++#define BIT_TIMER1 (0x1<<11) ++#define BIT_TIMER2 (0x1<<12) ++#define BIT_TIMER3 (0x1<<13) ++#define BIT_TIMER4 (0x1<<14) ++#define BIT_UART2 (0x1<<15) ++#define BIT_LCD (0x1<<16) ++#define BIT_DMA0 (0x1<<17) ++#define BIT_DMA1 (0x1<<18) ++#define BIT_DMA2 (0x1<<19) ++#define BIT_DMA3 (0x1<<20) ++#define BIT_SDI (0x1<<21) ++#define BIT_SPI0 (0x1<<22) ++#define BIT_UART1 (0x1<<23) ++#define BIT_USBD (0x1<<25) ++#define BIT_USBH (0x1<<26) ++#define BIT_IIC (0x1<<27) ++#define BIT_UART0 (0x1<<28) ++#define BIT_SPI1 (0x1<<29) ++#define BIT_RTC (0x1<<30) ++#define BIT_ADC (0x1<<31) ++#define BIT_ALLMSK (0xFFFFFFFF) ++ ++#define ClearPending(bit) {\ ++ rSRCPND = bit;\ ++ rINTPND = bit;\ ++ rINTPND;\ ++ } ++/* Wait until rINTPND is changed for the case that the ISR is very short. */ ++ ++#define __REG(x) (*(volatile unsigned long *)(x)) ++#define __REGl(x) (*(volatile unsigned long *)(x)) ++#define __REGw(x) (*(volatile unsigned short *)(x)) ++#define __REGb(x) (*(volatile unsigned char *)(x)) ++#define __REG2(x,y) (*(volatile unsigned long *)((x) + (y))) ++ ++/* ++ * * Nand flash controller ++ * */ ++ ++#define NFDATA8 (*(volatile unsigned char *)0x4E000010) ++#define NFDATA16 (*(volatile unsigned short *)0x4E000010) ++#define NFDATA32 (*(volatile unsigned *)0x4E000010) ++ ++#define NFCONF __REG(0x4E000000) ++#define NFCONT __REG(0x4E000004) ++#define NFCMD __REG(0x4E000008) ++#define NFADDR __REGb(0x4E00000C) ++#define NFMECCD0 __REG(0x4E000014) ++#define NFMECCD1 __REG(0x4E000018) ++#define NFSECCD __REG(0x4E00001C) ++#define NFSTAT __REG(0x4E000020) ++#define NFESTAT0 __REG(0x4E000024) ++#define NFESTAT1 __REG(0x4E000028) ++#define NFMECC0 __REG(0x4E00002C) ++#define NFMECC1 __REG(0x4E000030) ++#define NFSECC __REG(0x4E000034) ++#define NFSBLK __REG(0x4E000038) ++ ++ ++#define S3C2410_MISCCR_USBDEV (0<<3) ++#define S3C2410_MISCCR_USBHOST (1<<3) ++ ++#define S3C2410_MISCCR_CLK0_MPLL (0<<4) ++#define S3C2410_MISCCR_CLK0_UPLL (1<<4) ++#define S3C2410_MISCCR_CLK0_FCLK (2<<4) ++#define S3C2410_MISCCR_CLK0_HCLK (3<<4) ++#define S3C2410_MISCCR_CLK0_PCLK (4<<4) ++#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) ++#define S3C2410_MISCCR_CLK0_MASK (7<<4) ++ ++#define S3C2410_MISCCR_CLK1_MPLL (0<<8) ++#define S3C2410_MISCCR_CLK1_UPLL (1<<8) ++#define S3C2410_MISCCR_CLK1_FCLK (2<<8) ++#define S3C2410_MISCCR_CLK1_HCLK (3<<8) ++#define S3C2410_MISCCR_CLK1_PCLK (4<<8) ++#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) ++#define S3C2410_MISCCR_CLK1_MASK (7<<8) ++ ++#define S3C2410_MISCCR_USBSUSPND0 (1<<12) ++#define S3C2410_MISCCR_USBSUSPND1 (1<<13) ++ ++#define S3C2410_MISCCR_nRSTCON (1<<16) ++ ++#define S3C2410_MISCCR_nEN_SCLK0 (1<<17) ++#define S3C2410_MISCCR_nEN_SCLK1 (1<<18) ++#define S3C2410_MISCCR_nEN_SCLKE (1<<19) ++#define S3C2410_MISCCR_SDSLEEP (7<<17) ++ ++#define S3C2410_CLKSLOW_UCLK_OFF (1<<7) ++#define S3C2410_CLKSLOW_MPLL_OFF (1<<5) ++#define S3C2410_CLKSLOW_SLOW (1<<4) ++#define S3C2410_CLKSLOW_SLOWVAL(x) (x) ++#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) ++ ++#endif /*__S3C2440_H__*/ +Index: u-boot/include/common.h +=================================================================== +--- u-boot.orig/include/common.h ++++ u-boot/include/common.h +@@ -454,7 +454,7 @@ + ulong get_OPB_freq (void); + ulong get_PCI_freq (void); + #endif +-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X) ++#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || defined(CONFIG_LH7A40X) + void s3c2410_irq(void); + #define ARM920_IRQ_CALLBACK s3c2410_irq + ulong get_FCLK (void); +Index: u-boot/cpu/arm920t/s3c24x0/usb_ohci.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/usb_ohci.c ++++ u-boot/cpu/arm920t/s3c24x0/usb_ohci.c +@@ -44,6 +44,8 @@ + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + + #include +Index: u-boot/cpu/arm920t/s3c24x0/speed.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/speed.c ++++ u-boot/cpu/arm920t/s3c24x0/speed.c +@@ -30,12 +30,15 @@ + */ + + #include +-#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) ++#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ ++ defined (CONFIG_S3C2440) || defined (CONFIG_TRAB) + + #if defined(CONFIG_S3C2400) + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + + #define MPLL 0 +@@ -66,8 +69,12 @@ + m = ((r & 0xFF000) >> 12) + 8; + p = ((r & 0x003F0) >> 4) + 2; + s = r & 0x3; +- ++#ifndef CONFIG_S3C2440 + return((CONFIG_SYS_CLK_FREQ * m) / (p << s)); ++#else ++ /* To avoid integer overflow, changed the calc order */ ++ return( 2 * m * (CONFIG_SYS_CLK_FREQ / (p << s )) ); ++#endif + } + + /* return FCLK frequency */ +@@ -81,7 +88,21 @@ + { + S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); + ++#ifndef CONFIG_S3C2440 + return((clk_power->CLKDIVN & 0x2) ? get_FCLK()/2 : get_FCLK()); ++#else ++ switch (clk_power->CLKDIVN & 0x6) { ++ case 0x0: ++ return get_FCLK(); ++ case 0x2: ++ return get_FCLK()/2; ++ case 0x4: ++ return (clk_power->CAMDIVN & 0x200) ? get_FCLK()/8 : get_FCLK()/4; ++ case 0x6: ++ return (clk_power->CAMDIVN & 0x100) ? get_FCLK()/6 : get_FCLK()/3; ++ } ++ return 0; ++#endif + } + + /* return PCLK frequency */ +@@ -98,4 +119,5 @@ + return(get_PLLCLK(UPLL)); + } + +-#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ ++#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || ++ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ +Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c ++++ u-boot/cpu/arm920t/s3c24x0/interrupts.c +@@ -30,13 +30,16 @@ + */ + + #include +-#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) ++#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ ++ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) + + #include + #if defined(CONFIG_S3C2400) + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + + int timer_load_val = 0; +@@ -59,6 +62,7 @@ + /* use PWM Timer 4 because it has no output */ + /* prescaler for Timer 4 is 16 */ + timers->TCFG0 = 0x0f00; ++#ifndef CONFIG_S3C2440 + if (timer_load_val == 0) + { + /* +@@ -68,6 +72,9 @@ + */ + timer_load_val = get_PCLK()/(2 * 16 * 100); + } ++#else ++ timer_load_val = get_PCLK()/(2 * 16 * 100); ++#endif + /* load value for 10 ms timeout */ + lastdec = timers->TCNTB4 = timer_load_val; + /* auto load, manual update of Timer 4 */ +@@ -178,6 +185,7 @@ + tbclk = timer_load_val * 100; + #elif defined(CONFIG_SBC2410X) || \ + defined(CONFIG_SMDK2410) || \ ++ defined(CONFIG_SMDK2440) || \ + defined(CONFIG_VCMA9) + tbclk = CFG_HZ; + #else +@@ -232,4 +240,5 @@ + } + #endif /* USE_IRQ */ + +-#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ ++#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || ++ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ +Index: u-boot/cpu/arm920t/s3c24x0/serial.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/serial.c ++++ u-boot/cpu/arm920t/s3c24x0/serial.c +@@ -19,12 +19,15 @@ + */ + + #include +-#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) ++#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ ++ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) + + #if defined(CONFIG_S3C2400) || defined(CONFIG_TRAB) + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + + DECLARE_GLOBAL_DATA_PTR; +@@ -180,4 +183,5 @@ + } + } + +-#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */ ++#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || ++ defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) */ +Index: u-boot/cpu/arm920t/s3c24x0/i2c.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/i2c.c ++++ u-boot/cpu/arm920t/s3c24x0/i2c.c +@@ -34,6 +34,8 @@ + #include + #elif defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include + #endif + #include + +@@ -63,7 +65,7 @@ + { + S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); + +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + return (gpio->GPEDAT & 0x8000) >> 15; + #endif + #ifdef CONFIG_S3C2400 +@@ -82,7 +84,7 @@ + { + S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); + +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + gpio->GPEDAT = (gpio->GPEDAT & ~0x4000) | (x&1) << 14; + #endif + #ifdef CONFIG_S3C2400 +@@ -139,7 +141,7 @@ + } + + if ((status & I2CSTAT_BSY) || GetI2CSDA () == 0) { +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + ulong old_gpecon = gpio->GPECON; + #endif + #ifdef CONFIG_S3C2400 +@@ -147,7 +149,7 @@ + #endif + /* bus still busy probably by (most) previously interrupted transfer */ + +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + /* set I2CSDA and I2CSCL (GPE15, GPE14) to GPIO */ + gpio->GPECON = (gpio->GPECON & ~0xF0000000) | 0x10000000; + #endif +@@ -171,7 +173,7 @@ + udelay (1000); + + /* restore pin functions */ +-#ifdef CONFIG_S3C2410 ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + gpio->GPECON = old_gpecon; + #endif + #ifdef CONFIG_S3C2400 +Index: u-boot/drivers/usbdcore_s3c2410.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_s3c2410.c ++++ u-boot/drivers/usbdcore_s3c2410.c +@@ -24,7 +24,7 @@ + + #include + +-#if defined(CONFIG_S3C2410) && defined(CONFIG_USB_DEVICE) ++#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) && defined(CONFIG_USB_DEVICE) + + #include + +Index: u-boot/drivers/usbtty.h +=================================================================== +--- u-boot.orig/drivers/usbtty.h ++++ u-boot/drivers/usbtty.h +@@ -29,7 +29,7 @@ + #include "usbdcore_mpc8xx.h" + #elif defined(CONFIG_OMAP1510) + #include "usbdcore_omap1510.h" +-#elif defined(CONFIG_S3C2410) ++#elif defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + #include "usbdcore_s3c2410.h" + #endif + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -31,7 +31,11 @@ + + #include + #include ++#if defined(CONFIG_S3C2410) + #include ++#elif defined(CONFIG_S3C2440) ++#include ++#endif + + + /* +@@ -142,14 +146,32 @@ + # define pWTCON 0x15300000 + # define INTMSK 0x14400008 /* Interupt-Controller base addresses */ + # define CLKDIVN 0x14800014 /* clock divisor register */ +-#elif defined(CONFIG_S3C2410) ++#elif defined(CONFIG_S3C2410) || defined (CONFIG_S3C2440) + # define pWTCON 0x53000000 + # define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ + # define INTSUBMSK 0x4A00001C + # define CLKDIVN 0x4C000014 /* clock divisor register */ + #endif + +-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) ++#if defined(CONFIG_S3C2410) ++# define INTSUBMSK_val 0x7ff ++# define MPLLCON_val ((0x90 << 12) + (0x7 << 4) + 0x0) /* 202 MHz */ ++# define UPLLCON_val ((0x78 << 12) + (0x2 << 4) + 0x3) ++# define CLKDIVN_val 3 /* FCLK:HCLK:PCLK = 1:2:4 */ ++#elif defined(CONFIG_S3C2440) ++# define INTSUBMSK_val 0xffff ++#if (CONFIG_SYS_CLK_FREQ == 16934400) ++# define MPLLCON_val ((0x61 << 12) + (0x1 << 4) + 0x2) /* 296.35 MHz */ ++# define UPLLCON_val ((0x3c << 12) + (0x4 << 4) + 0x2) /* 47.98 MHz */ ++#else if (CONFIG_SYS_CLK_FREQ == 12000000) ++# define MPLLCON_val ((0x44 << 12) + (0x1 << 4) + 0x1) /* 304.00 MHz */ ++# define UPLLCON_val ((0x38 << 12) + (0x2 << 4) + 0x2) /* 48.00 MHz */ ++#endif ++# define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ ++# define CAMDIVN 0x4C000018 ++#endif ++ ++#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + ldr r0, =pWTCON + mov r1, #0x0 + str r1, [r0] +@@ -160,24 +182,34 @@ + mov r1, #0xffffffff + ldr r0, =INTMSK + str r1, [r0] +-# if defined(CONFIG_S3C2410) +- ldr r1, =0x3ff ++# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) ++ ldr r1, =INTSUBMSK_val + ldr r0, =INTSUBMSK + str r1, [r0] + # endif + +- /* default FCLK is 202 MHz ! */ ++#if defined(CONFIG_S3C2440) ++ /* Make sure we get FCLK:HCLK:PCLK = 1:3:6 */ ++ ldr r0, =CAMDIVN ++ mov r1, #0 ++ str r1, [r0] ++#endif ++ ++ /* Clock asynchronous mode */ ++ mrc p15, 0, r1, c1, c0, 0 ++ orr r1, r1, #0xc0000000 ++ mcr p15, 0, r1, c1, c0, 0 ++ ++ + #define LOCKTIME 0x4c000000 + #define UPLLCON 0x4c000008 +-//#define MPLLCFG ((0x90 << 12) + (0x2 << 4) + 0x2) +-#define MPLLCFG ((0x90 << 12) + (0x7 << 4) + 0x0) +-#define UPLLCFG ((0x78 << 12) + (0x2 << 4) + 0x3) ++ + ldr r0, =LOCKTIME + mov r1, #0xffffff + str r1, [r0] + + ldr r0, =UPLLCON +- ldr r1, =UPLLCFG ++ ldr r1, =UPLLCON_val + str r1, [r0] + + /* Page 7-19, seven nops between UPLL and MPLL */ +@@ -189,12 +221,12 @@ + nop + nop + +- ldr r1, =MPLLCFG ++ ldr r1, =MPLLCON_val + str r1, [r0, #-4] /* MPLLCON */ + + /* FCLK:HCLK:PCLK = 1:2:4 */ + ldr r0, =CLKDIVN +- mov r1, #3 ++ mov r1, #CLKDIVN_val + str r1, [r0] + + #if 1 +@@ -222,7 +254,7 @@ + str r1, [r0, #0x28] + #endif + +-#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ ++#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */ + + #ifndef CONFIG_SKIP_LOWLEVEL_INIT + #ifndef CONFIG_LL_INIT_NAND_ONLY +@@ -279,7 +311,7 @@ + #if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY) + bl cpu_init_crit + #endif +-#if defined(CONFIG_S3C2410) ++#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + /* ensure some refresh has happened */ + ldr r1, =0xfffff + 1: subs r1, r1, #1 +@@ -290,11 +322,12 @@ + ldr r0, [ r1 ] + tst r0, #0x02 /* is this resume from power down */ + ldrne pc, [r1, #4] /* gstatus3 */ +-#endif /* CONFIG_S3C2410 */ ++#endif /* CONFIG_S3C2410 || CONFIG_S3C2440 */ + #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ + + /* mov r10, lr */ + ++#if defined(CONFIG_S3C2410) + @ reset NAND + mov r1, #S3C2410_NAND_BASE + ldr r2, =0xf842 @ initial value enable tacls=3,rph0=6,rph1=0 +@@ -314,6 +347,17 @@ + ldr r2, [r1, #oNFCONF] + orr r2, r2, #0x800 @ disable chip + str r2, [r1, #oNFCONF] ++#elif defined(CONFIG_S3C2440) ++ mov r1, #S3C2440_NAND_BASE ++ ldr r2, =0xfff0 @ initial value tacls=3,rph0=7,rph1=7 ++ ldr r3, [r1, #oNFCONF] ++ orr r3, r3, r2 ++ str r3, [r1, #oNFCONF] ++ ++ ldr r3, [r1, #oNFCONT] ++ orr r3, r3, #1 @ enable nand controller ++ str r3, [r1, #oNFCONT] ++#endif + + #if 0 + @ get ready to call C functions (for nand_read()) +@@ -382,7 +426,7 @@ + #endif /* CONFIG_S3C2410_NAND_BOOT */ + done_relocate: + +-#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410) ++#if defined(CONFIG_USE_IRQ) && (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) + /* In the case of the S3C2410, if we've somehow magically (JTAG, ...) + ended up in RAM, then that ram is mapped to 0x30000000 and not 0. + So we need to copy the interrupt vectors, etc. */ +Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/nand_read.c ++++ u-boot/cpu/arm920t/s3c24x0/nand_read.c +@@ -16,30 +16,141 @@ + */ + + #include ++#include + + #ifdef CONFIG_S3C2410_NAND_BOOT + + #define __REGb(x) (*(volatile unsigned char *)(x)) ++#define __REGw(x) (*(volatile unsigned short *)(x)) + #define __REGi(x) (*(volatile unsigned int *)(x)) + #define NF_BASE 0x4e000000 ++#if defined(CONFIG_S3C2410) + #define NFCONF __REGi(NF_BASE + 0x0) + #define NFCMD __REGb(NF_BASE + 0x4) + #define NFADDR __REGb(NF_BASE + 0x8) + #define NFDATA __REGb(NF_BASE + 0xc) + #define NFSTAT __REGb(NF_BASE + 0x10) ++#define NFSTAT_BUSY 1 ++#define nand_select() (NFCONF &= ~0x800) ++#define nand_deselect() (NFCONF |= 0x800) ++#define nand_clear_RnB() do {} while (0) ++#elif defined(CONFIG_S3C2440) ++#define NFCONF __REGi(NF_BASE + 0x0) ++#define NFCONT __REGi(NF_BASE + 0x4) ++#define NFCMD __REGb(NF_BASE + 0x8) ++#define NFADDR __REGb(NF_BASE + 0xc) ++#define NFDATA __REGb(NF_BASE + 0x10) ++#define NFDATA16 __REGw(NF_BASE + 0x10) ++#define NFSTAT __REGb(NF_BASE + 0x20) ++#define NFSTAT_BUSY 1 ++#define nand_select() (NFCONT &= ~(1 << 1)) ++#define nand_deselect() (NFCONT |= (1 << 1)) ++#define nand_clear_RnB() (NFSTAT |= (1 << 2)) ++#endif + +-#define BUSY 1 +-inline void wait_idle(void) ++static inline void nand_wait(void) + { + int i; + +- while (!(NFSTAT & BUSY)) ++ while (!(NFSTAT & NFSTAT_BUSY)) + for (i=0; i<10; i++); + } + +-#define NAND_SECTOR_SIZE 512 +-#define NAND_BLOCK_MASK (NAND_SECTOR_SIZE - 1) +-#define NAND_PAGE_SIZE 0x4000 ++#if defined(CONFIG_S3C2410) ++/* configuration for 2410 with 512byte sized flash */ ++#define NAND_PAGE_SIZE 512 ++#define BAD_BLOCK_OFFSET 517 ++#define NAND_BLOCK_MASK (NAND_PAGE_SIZE - 1) ++#define NAND_BLOCK_SIZE 0x4000 ++#else ++/* configuration for 2440 with 2048byte sized flash */ ++#define NAND_5_ADDR_CYCLE ++#define NAND_PAGE_SIZE 2048 ++#define BAD_BLOCK_OFFSET NAND_PAGE_SIZE ++#define NAND_BLOCK_MASK (NAND_PAGE_SIZE - 1) ++#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE * 64) ++#endif ++ ++/* compile time failure in case of an invalid configuration */ ++#if defined(CONFIG_S3C2410) && (NAND_PAGE_SIZE != 512) ++#error "S3C2410 does not support nand page size != 512" ++#endif ++ ++static int is_bad_block(unsigned long i) ++{ ++ unsigned char data; ++ unsigned long page_num; ++ ++ /* FIXME: do this twice, for first and second page in block */ ++ ++ nand_clear_RnB(); ++#if (NAND_PAGE_SIZE == 512) ++ NFCMD = NAND_CMD_READOOB; /* 0x50 */ ++ NFADDR = BAD_BLOCK_OFFSET & 0xf; ++ NFADDR = (i >> 9) & 0xff; ++ NFADDR = (i >> 17) & 0xff; ++ NFADDR = (i >> 25) & 0xff; ++#elif (NAND_PAGE_SIZE == 2048) ++ page_num = i >> 11; /* addr / 2048 */ ++ NFCMD = NAND_CMD_READ0; ++ NFADDR = BAD_BLOCK_OFFSET & 0xff; ++ NFADDR = (BAD_BLOCK_OFFSET >> 8) & 0xff; ++ NFADDR = page_num & 0xff; ++ NFADDR = (page_num >> 8) & 0xff; ++ NFADDR = (page_num >> 16) & 0xff; ++ NFCMD = NAND_CMD_READSTART; ++#endif ++ nand_wait(); ++ data = (NFDATA & 0xff); ++ if (data != 0xff) ++ return 1; ++ ++ return 0; ++} ++ ++static int nand_read_page_ll(unsigned char *buf, unsigned long addr) ++{ ++ unsigned short *ptr16 = (unsigned short *)buf; ++ unsigned int i, page_num; ++ ++ nand_clear_RnB(); ++ ++ NFCMD = NAND_CMD_READ0; ++ ++#if (NAND_PAGE_SIZE == 512) ++ /* Write Address */ ++ NFADDR = addr & 0xff; ++ NFADDR = (addr >> 9) & 0xff; ++ NFADDR = (addr >> 17) & 0xff; ++ NFADDR = (addr >> 25) & 0xff; ++#elif (NAND_PAGE_SIZE == 2048) ++ page_num = addr >> 11; /* addr / 2048 */ ++ /* Write Address */ ++ NFADDR = 0; ++ NFADDR = 0; ++ NFADDR = page_num & 0xff; ++ NFADDR = (page_num >> 8) & 0xff; ++ NFADDR = (page_num >> 16) & 0xff; ++ NFCMD = NAND_CMD_READSTART; ++#else ++#error "unsupported nand page size" ++#endif ++ nand_wait(); ++ ++#if defined(CONFIG_S3C2410) ++ for (i = 0; i < NAND_PAGE_SIZE; i++) { ++ *buf = (NFDATA & 0xff); ++ buf++; ++ } ++#elif defined(CONFIG_S3C2440) ++ for (i = 0; i < NAND_PAGE_SIZE/2; i++) { ++ *ptr16 = NFDATA16; ++ ptr16++; ++ } ++#endif ++ ++ return NAND_PAGE_SIZE; ++} + + /* low level nand read function */ + int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) +@@ -50,47 +161,28 @@ + return -1; /* invalid alignment */ + + /* chip Enable */ +- NFCONF &= ~0x800; ++ nand_select(); ++ nand_clear_RnB(); + for (i=0; i<10; i++); + + for (i=start_addr; i < (start_addr + size);) { + #ifdef CONFIG_S3C2410_NAND_SKIP_BAD +- if (start_addr % NAND_PAGE_SIZE == 0) { +- unsigned char data; +- NFCMD = 0x50; +- NFADDR = 517&0xf; +- NFADDR = (i >> 9) & 0xff; +- NFADDR = (i >> 17) & 0xff; +- NFADDR = (i >> 25) & 0xff; +- wait_idle(); +- data = (NFDATA & 0xff); +- if (data != 0xff) { ++ if (start_addr % NAND_BLOCK_SIZE == 0) { ++ if (is_bad_block(i)) { + /* Bad block */ +- i += NAND_PAGE_SIZE; +- size += NAND_PAGE_SIZE; ++ i += NAND_BLOCK_SIZE; ++ size += NAND_BLOCK_SIZE; + continue; + } + } + #endif +- /* READ0 */ +- NFCMD = 0; +- +- /* Write Address */ +- NFADDR = i & 0xff; +- NFADDR = (i >> 9) & 0xff; +- NFADDR = (i >> 17) & 0xff; +- NFADDR = (i >> 25) & 0xff; +- +- wait_idle(); +- +- for (j=0; j < NAND_SECTOR_SIZE; j++, i++) { +- *buf = (NFDATA & 0xff); +- buf++; +- } ++ j = nand_read_page_ll(buf, i); ++ i += j; ++ buf += j; + } + + /* chip Disable */ +- NFCONF |= 0x800; /* chip disable */ ++ nand_deselect(); + + return 0; + } +Index: u-boot/cpu/arm920t/s3c24x0/nand.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c ++++ u-boot/cpu/arm920t/s3c24x0/nand.c +@@ -36,24 +36,54 @@ + #define __REGi(x) (*(volatile unsigned int *)(x)) + + #define NF_BASE 0x4e000000 ++ + #define NFCONF __REGi(NF_BASE + 0x0) +-#define NFCMD __REGb(NF_BASE + 0x4) +-#define NFADDR __REGb(NF_BASE + 0x8) +-#define NFDATA __REGb(NF_BASE + 0xc) +-#define NFSTAT __REGb(NF_BASE + 0x10) ++ ++#if defined(CONFIG_S3C2410) ++ ++#define oNFCMD 0x4 ++#define oNFADDR 0x8 ++#define oNFDATA 0xc ++#define oNFSTAT 0x10 + #define NFECC0 __REGb(NF_BASE + 0x14) + #define NFECC1 __REGb(NF_BASE + 0x15) + #define NFECC2 __REGb(NF_BASE + 0x16) ++#define NFCONF_nFCE (1<<11) + + #define S3C2410_NFCONF_EN (1<<15) + #define S3C2410_NFCONF_512BYTE (1<<14) + #define S3C2410_NFCONF_4STEP (1<<13) + #define S3C2410_NFCONF_INITECC (1<<12) +-#define S3C2410_NFCONF_nFCE (1<<11) + #define S3C2410_NFCONF_TACLS(x) ((x)<<8) + #define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) + #define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) + ++#elif defined(CONFIG_S3C2440) ++ ++#define oNFCMD 0x8 ++#define oNFADDR 0xc ++#define oNFDATA 0x10 ++#define oNFSTAT 0x20 ++ ++#define NFCONT __REGi(NF_BASE + 0x04) ++#define NFMECC0 __REGi(NF_BASE + 0x2C) ++#define NFCONF_nFCE (1<<1) ++#define S3C2440_NFCONF_INITECC (1<<4) ++#define S3C2440_NFCONF_MAINECCLOCK (1<<5) ++#define nand_select() (NFCONT &= ~(1 << 1)) ++#define nand_deselect() (NFCONT |= (1 << 1)) ++#define nand_clear_RnB() (NFSTAT |= (1 << 2)) ++#define nand_detect_RB() { while(!(NFSTAT&(1<<2))); } ++#define nand_wait() { while(!(NFSTAT & 0x4)); } /* RnB_TransDectect */ ++ ++#endif ++ ++#define NFCMD __REGb(NF_BASE + oNFCMD) ++#define NFADDR __REGb(NF_BASE + oNFADDR) ++#define NFDATA __REGb(NF_BASE + oNFDATA) ++#define NFSTAT __REGb(NF_BASE + oNFSTAT) ++ ++ + static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd) + { + struct nand_chip *chip = mtd->priv; +@@ -62,23 +92,31 @@ + + switch (cmd) { + case NAND_CTL_SETNCE: +- NFCONF &= ~S3C2410_NFCONF_nFCE; ++#if defined(CONFIG_S3C2410) ++ NFCONF &= ~NFCONF_nFCE; ++#elif defined(CONFIG_S3C2440) ++ NFCONT &= ~NFCONF_nFCE; ++#endif + DEBUGN("NFCONF=0x%08x\n", NFCONF); + break; + case NAND_CTL_CLRNCE: +- NFCONF |= S3C2410_NFCONF_nFCE; ++#if defined(CONFIG_S3C2410) ++ NFCONF |= NFCONF_nFCE; ++#elif defined(CONFIG_S3C2440) ++ NFCONT &= ~NFCONF_nFCE; ++#endif + DEBUGN("NFCONF=0x%08x\n", NFCONF); + break; + case NAND_CTL_SETALE: +- chip->IO_ADDR_W = NF_BASE + 0x8; ++ chip->IO_ADDR_W = NF_BASE + oNFADDR; + DEBUGN("SETALE\n"); + break; + case NAND_CTL_SETCLE: +- chip->IO_ADDR_W = NF_BASE + 0x4; ++ chip->IO_ADDR_W = NF_BASE + oNFCMD; + DEBUGN("SETCLE\n"); + break; + default: +- chip->IO_ADDR_W = NF_BASE + 0xc; ++ chip->IO_ADDR_W = NF_BASE + oNFDATA; + break; + } + return; +@@ -180,16 +218,21 @@ + /* initialize hardware */ + twrph0 = 3; twrph1 = 0; tacls = 0; + ++#if defined(CONFIG_S3C2410) + cfg = S3C2410_NFCONF_EN; + cfg |= S3C2410_NFCONF_TACLS(tacls - 1); + cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); + cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); + + NFCONF = cfg; +- //NFCONF = 0xf842; ++#elif defined(CONFIG_S3C2440) ++ twrph0 = 7; twrph1 = 7; tacls = 7; ++ NFCONF = (tacls<<12)|(twrph0<<8)|(twrph1<<4)|(0<<0); ++ NFCONT = (0<<13)|(0<<12)|(0<<10)|(0<<9)|(0<<8)|(1<<6)|(1<<5)|(1<<4)|(1<<1)|(1<<0); ++#endif + + /* initialize nand_chip data structure */ +- nand->IO_ADDR_R = nand->IO_ADDR_W = 0x4e00000c; ++ nand->IO_ADDR_R = nand->IO_ADDR_W = NF_BASE + oNFDATA; + + /* read_buf and write_buf are default */ + /* read_byte and write_byte are default */ +@@ -214,12 +257,23 @@ + nand->options = 0; + #endif + ++#if defined(CONFIG_S3C2440) ++/* ++ nand_select(); ++ nand_clear_RnB(); ++ NFCMD = NAND_CMD_RESET; ++ { volatile int i; for (i = 0; i < 10; i ++); } ++ nand_detect_RB(); ++ nand_deselect(); ++*/ ++#endif ++ + DEBUGN("end of nand_init\n"); + + return 0; + } + + #else +- #error "U-Boot legacy NAND support not available for S3C2410" ++ #error "U-Boot legacy NAND support not available for S3C24xx" + #endif + #endif +Index: u-boot/cpu/arm920t/s3c24x0/mmc.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c ++++ u-boot/cpu/arm920t/s3c24x0/mmc.c +@@ -137,6 +137,9 @@ + dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART; + if (wide) + dcon |= S3C2410_SDIDCON_WIDEBUS; ++#if defined(CONFIG_S3C2440) ++ dcon |= S3C2440_SDIDCON_DS_WORD | S3C2440_SDIDCON_DATSTART; ++#endif + sdi->SDIDCON = dcon; + + /* send read command */ +@@ -394,13 +397,18 @@ + + clk_power->CLKCON |= (1 << 9); + ++ sdi->SDIBSIZE = 512; ++#if defined(CONFIG_S3C2410) + /* S3C2410 has some bug that prevents reliable operation at higher speed */ + //sdi->SDIPRE = 0x3e; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ +- sdi->SDIPRE = 0x02; /* SDCLK = PCLK/2 / (SDIPRE+1) = 396kHz */ +- sdi->SDIBSIZE = 512; ++ sdi->SDIPRE = 0x02; /* 2410: SDCLK = PCLK/2 / (SDIPRE+1) = 11MHz */ + sdi->SDIDTIMER = 0xffff; ++#elif defined(CONFIG_S3C2440) ++ sdi->SDIPRE = 0x05; /* 2410: SDCLK = PCLK / (SDIPRE+1) = 11MHz */ ++ sdi->SDIDTIMER = 0x7fffff; ++#endif + sdi->SDIIMSK = 0x0; +- sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2440_SDICON_MMCCLOCK; ++ sdi->SDICON = S3C2410_SDICON_FIFORESET|S3C2410_SDICON_CLOCKTYPE; + udelay(125000); /* FIXME: 74 SDCLK cycles */ + + mmc_csd.c_size = 0; diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch new file mode 100644 index 0000000000..62ae5592ab --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch @@ -0,0 +1,256 @@ +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -35,6 +35,8 @@ + #include + #elif defined(CONFIG_S3C2440) + #include ++#elif defined(CONFIG_S3C2443) ++#include + #endif + + +@@ -164,9 +166,15 @@ + # define UPLLCON_val ((0x3c << 12) + (0x4 << 4) + 0x2) + # define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ + # define CAMDIVN 0x4C000018 ++#elif defined(CONFIG_S3C2443) ++# define INTSUBMSK_val 0x1fffffff ++# define EPLLCON_val ((40 << 16) | (1 << 8) | (1)) /* 96 MHz */ ++# define MPLLCON_val ((81 << 16) | (2 << 8) | (0)) /* 1068 MHz */ ++# define CLKDIV0_val ((8 << 9) | (1 << 4) | (1 << 3) | (1 << 2) + #endif + +-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) ++#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \ ++ defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) + ldr r0, =pWTCON + mov r1, #0x0 + str r1, [r0] +@@ -177,7 +185,7 @@ + mov r1, #0xffffffff + ldr r0, =INTMSK + str r1, [r0] +-# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) ++# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) + ldr r1, =INTSUBMSK_val + ldr r0, =INTSUBMSK + str r1, [r0] +@@ -196,6 +204,43 @@ + mcr p15, 0, r1, c1, c0, 0 + + ++#if defined(CONFIG_S3C2443) ++#define LOCKCON0 0x4c000000 ++#define LOCKCON1 0x4c000004 ++#define MPLLCON 0x4c000010 ++#define EPLLCON 0x4c000018 ++ ++ ldr r0, =CLKDIV0 ++ ldr r1, =CLKDIV0_val ++ str r1, [r0] ++ ++ /* set safe (way too long) locktime for both PLLs */ ++ ldr r0, =LOCKCON0 ++ mov r1, #0xffffff ++ str r1, [r0] ++ ldr r0, =LOCKCON1 ++ str r1, [r0] ++ ++ /* configure MPLL */ ++ ldr r0, =MPLLCON ++ ldr r1, =MPLLCON_val ++ str r1, [r0] ++ ++ /* select MPLL clock out for SYSCLK */ ++ ldr r0, =CLKSRC ++ ldr r1, [r0] ++ orr r1, r1, #0x10 ++ str r1, [r0] ++ ++#if 0 ++ /* configure EPLL */ ++ ldr r0, =EPLLCON ++ ldr r1, =EPLLCON_val ++ str r1, [r0] ++#endif ++ ++ ++#else /* i.e. 2440, 2410 and 2440 */ + #define LOCKTIME 0x4c000000 + #define UPLLCON 0x4c000008 + +@@ -223,6 +268,7 @@ + ldr r0, =CLKDIVN + mov r1, #CLKDIVN_val + str r1, [r0] ++#endif + + #if 1 + /* enable uart */ +@@ -249,7 +295,7 @@ + str r1, [r0, #0x28] + #endif + +-#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */ ++#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 || CONFIG_S3C2443 */ + + #ifndef CONFIG_SKIP_LOWLEVEL_INIT + #ifndef CONFIG_LL_INIT_NAND_ONLY +Index: u-boot/cpu/arm920t/s3c24x0/interrupts.c +=================================================================== +--- u-boot.orig/cpu/arm920t/s3c24x0/interrupts.c ++++ u-boot/cpu/arm920t/s3c24x0/interrupts.c +@@ -31,7 +31,8 @@ + + #include + #if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || \ +- defined(CONFIG_S3C2440) || defined (CONFIG_TRAB) ++ defined(CONFIG_S3C2440) || defined(CONFIG_S3C2443) || \ ++ defined (CONFIG_TRAB) + + #include + #if defined(CONFIG_S3C2400) +@@ -40,6 +41,8 @@ + #include + #elif defined(CONFIG_S3C2440) + #include ++#elif defined(CONFIG_S3C2443) ++#include + #endif + + int timer_load_val = 0; +@@ -186,6 +189,7 @@ + #elif defined(CONFIG_SBC2410X) || \ + defined(CONFIG_SMDK2410) || \ + defined(CONFIG_SMDK2440) || \ ++ defined(CONFIG_SMDK2443) || \ + defined(CONFIG_VCMA9) + tbclk = CFG_HZ; + #else +Index: u-boot/drivers/usbdcore_s3c2410.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_s3c2410.c ++++ u-boot/drivers/usbdcore_s3c2410.c +@@ -24,7 +24,8 @@ + + #include + +-#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)) && defined(CONFIG_USB_DEVICE) ++#if (defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) || \ ++ defined(CONFIG_S3C2443)) && defined(CONFIG_USB_DEVICE) + + #include + +Index: u-boot/include/s3c2443.h +=================================================================== +--- /dev/null ++++ u-boot/include/s3c2443.h +@@ -0,0 +1,106 @@ ++/* ++ * (C) Copyright 2007 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __S3C2443_H ++#define __S3C2443_H ++ ++#include ++ ++/* CLOCK & POWER MANAGEMENT (see S3C2443 manual chapter 2) */ ++typedef struct { ++ S3C24X0_REG32 LOCKCON0; ++ S3C24X0_REG32 LOCKCON1; ++ S3C24X0_REG32 OSCSET; ++ S3C24X0_REG32 res1; ++ S3C24X0_REG32 MPLLCON; ++ S3C24X0_REG32 res2; ++ S3C24X0_REG32 EPLLCON; ++ S3C24X0_REG32 res3; ++ S3C24X0_REG32 CLKSRC; ++ S3C24X0_REG32 CLKDIV0; ++ S3C24X0_REG32 CLKDIV1; ++ S3C24X0_REG32 res4; ++ S3C24X0_REG32 HCLKCON; ++ S3C24X0_REG32 PCLKCON; ++ S3C24X0_REG32 SCLKCON; ++ S3C24X0_REG32 res5; ++ S3C24X0_REG32 PWRMODE; ++ S3C24X0_REG32 SWRST; ++ S3C24X0_REG32 res6[2]; ++ S3C24X0_REG32 BUSPRI0; ++ S3C24X0_REG32 res7[3]; ++} /*__attribute__((__packed__))*/ S3C2443_CLOCK_POWER; ++ ++/* NAND FLASH (see S3C2443 manual chapter 7) */ ++typedef struct { ++ S3C24X0_REG32 NFCONF; ++ S3C24X0_REG32 NFCONT; ++ S3C24X0_REG32 NFCMD; ++ S3C24X0_REG32 NFADDR; ++ S3C24X0_REG32 NFDATA; ++ S3C24X0_REG32 NFMECCD0; ++ S3C24X0_REG32 NFMECCD1; ++ S3C24X0_REG32 NFSECCD; ++ S3C24X0_REG32 NFSBLK; ++ S3C24X0_REG32 NFEBLK; ++ S3C24X0_REG32 NFSTAT; ++ S3C24X0_REG32 NFECCERR0; ++ S3C24X0_REG32 NFECCERR1; ++ S3C24X0_REG32 NFMECC0; ++ S3C24X0_REG32 NFMECC1; ++ S3C24X0_REG32 NFSECC; ++ S3C24X0_REG32 NFMLCBITPT; ++} /*__attribute__((__packed__))*/ S3C2443_NAND; ++ ++/* STATIC MEMORY (see S3C2443 manual chapter 5) */ ++struct s3c2443_sm_bank { ++ S3C24X0_REG32 SMBIDCYR; ++ S3C24X0_REG32 SMBWSTRDR; ++ S3C24X0_REG32 SMBWSTWRR; ++ S3C24X0_REG32 SMBWSTOENR; ++ S3C24X0_REG32 SMBWSTWENR; ++ S3C24X0_REG32 SMBCR; ++ S3C24X0_REG32 SMBSR; ++ S3C24X0_REG32 SMBWSTBRDR; ++}; ++ ++typedef struct { ++ struct s3c2443_sm_bank bank[5]; /* 0x4f000000..0x4f0000bf */ ++ S3C24X0_REG32 res[0x40]; /* 0x4f0000c0..0x4f0000ff */ ++ S3C24X0_REG32 SMBONETYPER; ++ S3C24X0_REG32 SMCSR; ++ S3C24X0_REG32 SMCCR; ++} /*__attribute__((__packed__))*/ S3C2443_SMEM; ++ ++ ++/* MOBILE DRAM (see S3C2443 manual chapter 6) */ ++typedef struct { ++ S3C24X0_REG32 BANKCFG; ++ S3C24X0_REG32 BANKCON1; ++ S3C24X0_REG32 BANKCON2; ++ S3C24X0_REG32 BANKCON3; ++ S3C24X0_REG32 REFRESH; ++ S3C24X0_REG32 TIMEOUT; ++} /*__attribute__((__packed__))*/ S3C2443_MDRAM ++ ++#endif /* __S3C2443_H */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch new file mode 100644 index 0000000000..09392ad2cf --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch @@ -0,0 +1,1481 @@ +Add support for the Samsung SMDK2440 development board + +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2035,6 +2035,9 @@ + smdk2410_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0 + ++smdk2440_config : unconfig ++ @$(MKCONFIG) $(@:_config=) arm arm920t smdk2440 NULL s3c24x0 ++ + SX1_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm925t sx1 + +Index: u-boot/include/configs/smdk2440.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/smdk2440.h +@@ -0,0 +1,296 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * Gary Jennejohn ++ * David Mueller ++ * ++ * Configuation settings for the SAMSUNG SMDK2440 board. ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++#if 0 ++/* If we want to start u-boot from usb bootloader in NOR flash */ ++#define CONFIG_SKIP_RELOCATE_UBOOT 1 ++#define CONFIG_SKIP_LOWLEVEL_INIT 1 ++#else ++/* If we want to start u-boot directly from within NAND flash */ ++#define CONFIG_LL_INIT_NAND_ONLY ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++#endif ++ ++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ ++#define CONFIG_SMDK2440 1 /* on a SAMSUNG SMDK2440 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 16934400/* SMDK2440 has 16.9344MHz input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++//#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ ++#define CS8900_BASE 0x19000300 ++#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2440 */ ++#define CONFIG_HWFLOW 1 ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS \ ++ (CONFIG_CMD_DFL | \ ++ /*CFG_CMD_BSP | */ \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_DATE | \ ++ /*CFG_CMD_DHCP | */ \ ++ CFG_CMD_DIAG | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_EXT2 | \ ++ CFG_CMD_FAT | \ ++ /*CFG_CMD_HWFLOW | */ \ ++ /* CFG_CMD_IDE | */ \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_JFFS2 | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PING | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_USB) ++ ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC2,115200 loglevel=8" ++#define CONFIG_ETHADDR 00:0c:20:02:0a:5b ++#define CONFIG_NETMASK 255.255.255.0 ++#define CONFIG_IPADDR 192.168.1.100 ++#define CONFIG_SERVERIP 192.168.1.21 ++/*#define CONFIG_BOOTFILE "elinos-lart" */ ++//#define CONFIG_BOOTCOMMAND "nand read 0x32000000 0x34000 0x200000; bootm" ++#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x100000 0x200000; bootm" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#define CFG_PROMPT "SMDK2440 # " /* Monitor Command Prompt */ ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 32 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x32000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (512*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++/* IDE/ATA config */ ++ ++#if 0 ++#define CFG_IDE_MAXBUS 1 ++#define CFG_IDE_MAXDEVICE 2 ++#define CFG_IDE_PREINIT 0 ++ ++#define CFG_ATA_BASE_ADDR ++#endif ++ ++#define CONFIG_USB_OHCI 1 ++ ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* FIC */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x511b /* SMDK2440 CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc." ++#define CONFIG_USBD_PRODUCT_NAME "S3C2440 Bootloader " U_BOOT_VERSION ++#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 ++#define CONFIG_USBD_DFU_INTERFACE 2 ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ ++ ++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ ++ ++#define CFG_FLASH_BASE PHYS_FLASH_1 ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ ++#if 0 ++#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ ++#endif ++ ++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ ++#ifdef CONFIG_AMD_LV800 ++#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ ++#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ ++#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ ++#endif ++#ifdef CONFIG_AMD_LV400 ++#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ ++#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ ++#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ ++#endif ++ ++/* timeout values are in ticks */ ++#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ ++#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ ++ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ ++#define CFG_ENV_OFFSET_OOB 1 ++#define CFG_PREBOOT_OVERRIDE 1 ++ ++#define NAND_MAX_CHIPS 1 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE 1 ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++#define CONFIG_EXT2 1 ++ ++#define CONFIG_NEW_QT2440 0 ++ ++/* FAT driver in u-boot is broken currently */ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 1 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++#if 0 ++#define CONFIG_SERIAL_TAG 1 ++#define CONFIG_REVISION_TAG 1 ++#endif ++ ++ ++#if 0 ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++#endif ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++//#define CONFIG_S3C2410_NAND_HWECC 1 ++ ++#define CFG_NAND_YAFFS_WRITE ++#define CFG_NAND_YAFFS1_NEW_OOB_LAYOUT ++ ++#define MTDIDS_DEFAULT "nand0=smdk2440-nand" ++#define MTPARTS_DEFAULT "smdk2440-nand:0x00100000(u-boot),0x00200000(kernel),0x00200000(update),0x00100000(splash),0x01400000(jffs2),-(temp)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "smdk2440-nand" ++#define CONFIG_NAND_DYNPART ++ ++#endif /* __CONFIG_H */ +Index: u-boot/include/configs/smdk2440nand.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/smdk2440nand.h +@@ -0,0 +1,47 @@ ++/* ++ * (C) Copyright 2004 ++ * Samsung Electronics : SW.LEE ++ * ++ * 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 __SMDK2440_NAND_H ++#define __SMDK2440_NAND_H ++ ++#define CFG_ENV_NAND_BLOCK 8 ++ ++#if 0 //old flash ++#define NAND_OOB_SIZE (16) ++#define NAND_PAGES_IN_BLOCK (32) ++#define NAND_PAGE_SIZE (512) ++ ++#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE*NAND_PAGES_IN_BLOCK) ++#define NAND_BLOCK_MASK (NAND_BLOCK_SIZE - 1) ++#define NAND_PAGE_MASK (NAND_PAGE_SIZE - 1) ++#else //new flash ++#define NAND_OOB_SIZE (64) ++#define NAND_PAGES_IN_BLOCK (64) ++#define NAND_PAGE_SIZE (2048) ++ ++#define NAND_BLOCK_SIZE (NAND_PAGE_SIZE*NAND_PAGES_IN_BLOCK) ++#define NAND_BLOCK_MASK (NAND_BLOCK_SIZE - 1) ++#define NAND_PAGE_MASK (NAND_PAGE_SIZE - 1) ++ ++#endif ++ ++ ++ ++//#define NAND_3_ADDR_CYCLE 1 ++//#define S3C24X0_16BIT_NAND 1 ++ ++#ifdef KINGFISH ++#undef S3C24X0_16BIT_NAND ++#define S3C24X0_16BIT_NAND 1 ++#endif ++ ++#endif ++ +Index: u-boot/board/smdk2440/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/Makefile +@@ -0,0 +1,67 @@ ++# ++# (C) Copyright 2000-2006 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = $(obj)lib$(BOARD).a ++ ++COBJS := smdk2440.o flash.o udc.o ++SOBJS := lowlevel_init.o ++ ++.PHONY: all ++ ++all: $(LIB) lowlevel_foo.bin ++ ++SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) ++OBJS := $(addprefix $(obj),$(COBJS)) ++SOBJS := $(addprefix $(obj),$(SOBJS)) ++ ++$(LIB): $(obj).depend $(OBJS) $(SOBJS) ++ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) ++ ++lowlevel_foo.o: lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds ++ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowlevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++# defines $(obj).depend target ++include $(SRCTREE)/rules.mk ++ ++sinclude $(obj).depend ++ ++######################################################################### +Index: u-boot/board/smdk2440/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/config.mk +@@ -0,0 +1,29 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# SAMSUNG SMDK2440 board with S3C2440 (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x511b ++CONFIG_USB_DFU_REVISION=0x0100 ++ ++# ++# SMDK2440 has 1 bank of 64 MB DRAM ++# ++# 3000'0000 to 3400'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# we load ourself to 33F8'0000 ++# ++# download area is 3300'0000 ++# ++ ++ ++TEXT_BASE = 0x33F80000 +Index: u-boot/board/smdk2440/flash.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/flash.c +@@ -0,0 +1,433 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Alex Zuepke ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ ++ulong myflush (void); ++ ++ ++#define FLASH_BANK_SIZE PHYS_FLASH_SIZE ++#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ ++ ++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; ++ ++ ++#define CMD_READ_ARRAY 0x000000F0 ++#define CMD_UNLOCK1 0x000000AA ++#define CMD_UNLOCK2 0x00000055 ++#define CMD_ERASE_SETUP 0x00000080 ++#define CMD_ERASE_CONFIRM 0x00000030 ++#define CMD_PROGRAM 0x000000A0 ++#define CMD_UNLOCK_BYPASS 0x00000020 ++ ++#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) ++#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) ++ ++#define BIT_ERASE_DONE 0x00000080 ++#define BIT_RDY_MASK 0x00000080 ++#define BIT_PROGRAM_ERROR 0x00000020 ++#define BIT_TIMEOUT 0x80000000 /* our flag */ ++ ++#define READY 1 ++#define ERR 2 ++#define TMO 4 ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++ulong flash_init (void) ++{ ++ int i, j; ++ ulong size = 0; ++ ++ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { ++ ulong flashbase = 0; ++ ++ flash_info[i].flash_id = ++#if defined(CONFIG_AMD_LV400) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV400B & FLASH_TYPEMASK); ++#elif defined(CONFIG_AMD_LV800) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV800B & FLASH_TYPEMASK); ++#else ++#error "Unknown flash configured" ++#endif ++ flash_info[i].size = FLASH_BANK_SIZE; ++ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; ++ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); ++ if (i == 0) ++ flashbase = PHYS_FLASH_1; ++ else ++ panic ("configured too many flash banks!\n"); ++ for (j = 0; j < flash_info[i].sector_count; j++) { ++ if (j <= 3) { ++ /* 1st one is 16 KB */ ++ if (j == 0) { ++ flash_info[i].start[j] = ++ flashbase + 0; ++ } ++ ++ /* 2nd and 3rd are both 8 KB */ ++ if ((j == 1) || (j == 2)) { ++ flash_info[i].start[j] = ++ flashbase + 0x4000 + (j - ++ 1) * ++ 0x2000; ++ } ++ ++ /* 4th 32 KB */ ++ if (j == 3) { ++ flash_info[i].start[j] = ++ flashbase + 0x8000; ++ } ++ } else { ++ flash_info[i].start[j] = ++ flashbase + (j - 3) * MAIN_SECT_SIZE; ++ } ++ } ++ size += flash_info[i].size; ++ } ++ ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_FLASH_BASE, ++ CFG_FLASH_BASE + monitor_flash_len - 1, ++ &flash_info[0]); ++ ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_ENV_ADDR, ++ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); ++ ++ return size; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++void flash_print_info (flash_info_t * info) ++{ ++ int i; ++ ++ switch (info->flash_id & FLASH_VENDMASK) { ++ case (AMD_MANUFACT & FLASH_VENDMASK): ++ printf ("AMD: "); ++ break; ++ default: ++ printf ("Unknown Vendor "); ++ break; ++ } ++ ++ switch (info->flash_id & FLASH_TYPEMASK) { ++ case (AMD_ID_LV400B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV400BB (4Mbit)\n"); ++ break; ++ case (AMD_ID_LV800B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV800BB (8Mbit)\n"); ++ break; ++ default: ++ printf ("Unknown Chip Type\n"); ++ goto Done; ++ break; ++ } ++ ++ printf (" Size: %ld MB in %d Sectors\n", ++ info->size >> 20, info->sector_count); ++ ++ printf (" Sector Start Addresses:"); ++ for (i = 0; i < info->sector_count; i++) { ++ if ((i % 5) == 0) { ++ printf ("\n "); ++ } ++ printf (" %08lX%s", info->start[i], ++ info->protect[i] ? " (RO)" : " "); ++ } ++ printf ("\n"); ++ ++ Done:; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++int flash_erase (flash_info_t * info, int s_first, int s_last) ++{ ++ ushort result; ++ int iflag, cflag, prot, sect; ++ int rc = ERR_OK; ++ int chip; ++ ++ /* first look for protection bits */ ++ ++ if (info->flash_id == FLASH_UNKNOWN) ++ return ERR_UNKNOWN_FLASH_TYPE; ++ ++ if ((s_first < 0) || (s_first > s_last)) { ++ return ERR_INVAL; ++ } ++ ++ if ((info->flash_id & FLASH_VENDMASK) != ++ (AMD_MANUFACT & FLASH_VENDMASK)) { ++ return ERR_UNKNOWN_FLASH_VENDOR; ++ } ++ ++ prot = 0; ++ for (sect = s_first; sect <= s_last; ++sect) { ++ if (info->protect[sect]) { ++ prot++; ++ } ++ } ++ if (prot) ++ return ERR_PROTECTED; ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ /* Start erase on unprotected sectors */ ++ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { ++ printf ("Erasing sector %2d ... ", sect); ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ if (info->protect[sect] == 0) { /* not protected */ ++ vu_short *addr = (vu_short *) (info->start[sect]); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ *addr = CMD_ERASE_CONFIRM; ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > ++ CFG_FLASH_ERASE_TOUT) { ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ chip = TMO; ++ break; ++ } ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_ERASE_DONE) ++ chip = READY; ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) ++ chip = ERR; ++ ++ } while (!chip); ++ ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ ++ if (chip == ERR) { ++ rc = ERR_PROG_ERROR; ++ goto outahere; ++ } ++ if (chip == TMO) { ++ rc = ERR_TIMOUT; ++ goto outahere; ++ } ++ ++ printf ("ok.\n"); ++ } else { /* it was protected */ ++ ++ printf ("protected!\n"); ++ } ++ } ++ ++ if (ctrlc ()) ++ printf ("User Interrupt!\n"); ++ ++ outahere: ++ /* allow flash to settle - wait 10 ms */ ++ udelay_masked (10000); ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash ++ */ ++ ++volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) ++{ ++ vu_short *addr = (vu_short *) dest; ++ ushort result; ++ int rc = ERR_OK; ++ int cflag, iflag; ++ int chip; ++ ++ /* ++ * Check if Flash is (sufficiently) erased ++ */ ++ result = *addr; ++ if ((result & data) != data) ++ return ERR_NOT_ERASED; ++ ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; ++ *addr = CMD_PROGRAM; ++ *addr = data; ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { ++ chip = ERR | TMO; ++ break; ++ } ++ if (!chip && ((result & 0x80) == (data & 0x80))) ++ chip = READY; ++ ++ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { ++ result = *addr; ++ ++ if ((result & 0x80) == (data & 0x80)) ++ chip = READY; ++ else ++ chip = ERR; ++ } ++ ++ } while (!chip); ++ ++ *addr = CMD_READ_ARRAY; ++ ++ if (chip == ERR || *addr != data) ++ rc = ERR_PROG_ERROR; ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash. ++ */ ++ ++int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) ++{ ++ ulong cp, wp; ++ int l; ++ int i, rc; ++ ushort data; ++ ++ wp = (addr & ~1); /* get lower word aligned address */ ++ ++ /* ++ * handle unaligned start bytes ++ */ ++ if ((l = addr - wp) != 0) { ++ data = 0; ++ for (i = 0, cp = wp; i < l; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ for (; i < 2 && cnt > 0; ++i) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ ++cp; ++ } ++ for (; cnt == 0 && i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ wp += 2; ++ } ++ ++ /* ++ * handle word aligned part ++ */ ++ while (cnt >= 2) { ++ data = *((vu_short *) src); ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ src += 2; ++ wp += 2; ++ cnt -= 2; ++ } ++ ++ if (cnt == 0) { ++ return ERR_OK; ++ } ++ ++ /* ++ * handle unaligned tail bytes ++ */ ++ data = 0; ++ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ } ++ for (; i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ return write_hword (info, wp, data); ++} +Index: u-boot/board/smdk2440/lowlevel_init.S +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/lowlevel_init.S +@@ -0,0 +1,167 @@ ++/* ++ * Memory Setup stuff - taken from blob memsetup.S ++ * ++ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and ++ * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) ++ * ++ * Modified for the Samsung SMDK2410 by ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++ ++/* some parameters for the board */ ++ ++/* ++ * ++ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S ++ * ++ * Copyright (C) 2002 Samsung Electronics SW.LEE ++ * ++ */ ++ ++#define BWSCON 0x48000000 ++ ++/* BWSCON */ ++#define DW8 (0x0) ++#define DW16 (0x1) ++#define DW32 (0x2) ++#define WAIT (0x1<<2) ++#define UBLB (0x1<<3) ++ ++#define B1_BWSCON (DW32) ++#define B2_BWSCON (DW16) ++#define B3_BWSCON (DW16 + WAIT + UBLB) ++#define B4_BWSCON (DW16) ++#define B5_BWSCON (DW16) ++#define B6_BWSCON (DW32) ++#define B7_BWSCON (DW32) ++ ++/* BANK0CON */ ++#define B0_Tacs 0x0 /* 0clk */ ++#define B0_Tcos 0x0 /* 0clk */ ++#define B0_Tacc 0x7 /* 14clk */ ++#define B0_Tcoh 0x0 /* 0clk */ ++#define B0_Tah 0x0 /* 0clk */ ++#define B0_Tacp 0x0 ++#define B0_PMC 0x0 /* normal */ ++ ++/* BANK1CON */ ++#define B1_Tacs 0x0 /* 0clk */ ++#define B1_Tcos 0x0 /* 0clk */ ++#define B1_Tacc 0x7 /* 14clk */ ++#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tah 0x0 /* 0clk */ ++#define B1_Tacp 0x0 ++#define B1_PMC 0x0 ++ ++#define B2_Tacs 0x0 ++#define B2_Tcos 0x0 ++#define B2_Tacc 0x7 ++#define B2_Tcoh 0x0 ++#define B2_Tah 0x0 ++#define B2_Tacp 0x0 ++#define B2_PMC 0x0 ++ ++#define B3_Tacs 0x0 /* 0clk */ ++#define B3_Tcos 0x3 /* 4clk */ ++#define B3_Tacc 0x7 /* 14clk */ ++#define B3_Tcoh 0x1 /* 1clk */ ++#define B3_Tah 0x0 /* 0clk */ ++#define B3_Tacp 0x3 /* 6clk */ ++#define B3_PMC 0x0 /* normal */ ++ ++#define B4_Tacs 0x0 /* 0clk */ ++#define B4_Tcos 0x0 /* 0clk */ ++#define B4_Tacc 0x7 /* 14clk */ ++#define B4_Tcoh 0x0 /* 0clk */ ++#define B4_Tah 0x0 /* 0clk */ ++#define B4_Tacp 0x0 ++#define B4_PMC 0x0 /* normal */ ++ ++#define B5_Tacs 0x0 /* 0clk */ ++#define B5_Tcos 0x0 /* 0clk */ ++#define B5_Tacc 0x7 /* 14clk */ ++#define B5_Tcoh 0x0 /* 0clk */ ++#define B5_Tah 0x0 /* 0clk */ ++#define B5_Tacp 0x0 ++#define B5_PMC 0x0 /* normal */ ++ ++#define B6_MT 0x3 /* SDRAM */ ++#define B6_Trcd 0x1 ++#define B6_SCAN 0x1 /* 9bit */ ++ ++#define B7_MT 0x3 /* SDRAM */ ++#define B7_Trcd 0x1 /* 3clk */ ++#define B7_SCAN 0x1 /* 9bit */ ++ ++/* REFRESH parameter */ ++#define REFEN 0x1 /* Refresh enable */ ++#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ ++#define Trp 0x0 /* 2clk */ ++#define Trc 0x3 /* 7clk */ ++#define Tchr 0x2 /* 3clk */ ++#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ ++/**************************************/ ++ ++_TEXT_BASE: ++ .word TEXT_BASE ++ ++.globl lowlevel_init ++lowlevel_init: ++ /* memory control configuration */ ++ /* make r0 relative the current location so that it */ ++ /* reads SMRDATA out of FLASH rather than memory ! */ ++ ldr r0, =SMRDATA ++ ldr r1, _TEXT_BASE ++ sub r0, r0, r1 ++ ldr r1, =BWSCON /* Bus Width Status Controller */ ++ add r2, r0, #13*4 ++0: ++ ldr r3, [r0], #4 ++ str r3, [r1], #4 ++ cmp r2, r0 ++ bne 0b ++ ++ /* everything is fine now */ ++ mov pc, lr ++ ++ .ltorg ++/* the literal pools origin */ ++ ++SMRDATA: ++ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) ++ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ++ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ++ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ++ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ++ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ++ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ++ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ++ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ++ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ++ .word 0x32 ++ .word 0x30 ++ .word 0x30 +Index: u-boot/board/smdk2440/smdk2440.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/smdk2440.c +@@ -0,0 +1,152 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Marius Groeger ++ * ++ * (C) Copyright 2002 ++ * David Mueller, ELSOFT AG, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#define FCLK_SPEED 1 ++ ++#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ ++#define M_MDIV 0xC3 ++#define M_PDIV 0x4 ++#define M_SDIV 0x1 ++#elif FCLK_SPEED==1 /* Fout = 399.65MHz */ ++#define M_MDIV 0x6e ++#define M_PDIV 0x3 ++#define M_SDIV 0x1 ++#endif ++ ++#define USB_CLOCK 1 ++ ++#if USB_CLOCK==0 ++#define U_M_MDIV 0xA1 ++#define U_M_PDIV 0x3 ++#define U_M_SDIV 0x1 ++#elif USB_CLOCK==1 ++#define U_M_MDIV 0x3c ++#define U_M_PDIV 0x4 ++#define U_M_SDIV 0x2 ++#endif ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++ gpio->GPACON = 0x007FFFFF; ++ gpio->GPBCON = 0x002a9655; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPCCON = 0xAAAAAAAA; ++ gpio->GPCUP = 0x0000FFFF; ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ gpio->GPFCON = 0x000055AA; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPGCON = 0xFD95FFBA; ++ gpio->GPGUP = 0x0000FFFF; ++#ifdef CONFIG_SERIAL3 ++ gpio->GPHCON = 0x002AAAAA; ++#else ++ gpio->GPHCON = 0x002AFAAA; ++#endif ++ gpio->GPHUP = 0x000007FF; ++ ++ gpio->GPJCON = 0x2AAAAAA; ++ ++#if 0 ++ /* USB Device Part */ ++ /*GPGCON is reset for USB Device */ ++ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ ++ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ ++ ++ gpio->GPGDAT |= ( 1 << 12) ; ++ gpio->GPGDAT &= ~( 1 << 12) ; ++ udelay(20000); ++ gpio->GPGDAT |= ( 1 << 12) ; ++#endif ++ ++ /* arch number of SMDK2440-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_S3C2440; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++int dram_init (void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. ++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 ++ images: 640*480*2*2 = 1228800 < 1245184. */ ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ ++ +Index: u-boot/board/smdk2440/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/board/smdk2440/udc.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/udc.c +@@ -0,0 +1,23 @@ ++ ++#include ++#include ++#include ++ ++void udc_ctrl(enum usbd_event event, int param) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ switch (event) { ++ case UDC_CTRL_PULLUP_ENABLE: ++ if (param) ++ gpio->GPGDAT |= (1 << 12); ++ else ++ gpio->GPGDAT &= ~(1 << 12); ++ break; ++ case UDC_CTRL_500mA_ENABLE: ++ /* IGNORE */ ++ break; ++ default: ++ break; ++ } ++} +Index: u-boot/board/smdk2440/lowlevel_foo.S +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/lowlevel_foo.S +@@ -0,0 +1,82 @@ ++ ++_start: ++ b reset ++undefvec: ++ b undefvec ++swivec: ++ b swivec ++pabtvec: ++ b pabtvec ++dabtvec: ++ b dabtvec ++rsvdvec: ++ b rsvdvec ++irqvec: ++ b irqvec ++fiqvec: ++ b fiqvec ++ ++reset: ++ /* ++ * set the cpu to SVC32 mode ++ */ ++ mrs r0,cpsr ++ bic r0,r0,#0x1f ++ orr r0,r0,#0xd3 ++ msr cpsr,r0 ++ ++/* turn off the watchdog */ ++#define pWTCON 0x53000000 ++#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ ++#define INTSUBMSK 0x4A00001C ++#define CLKDIVN 0x4C000014 /* clock divisor register */ ++ ++ ldr r0, =pWTCON ++ mov r1, #0x0 ++ str r1, [r0] ++ ++ mov r1, #0xffffffff ++ ldr r0, =INTMSK ++ str r1, [r0] ++ ldr r1, =0x3ff ++ ldr r0, =INTSUBMSK ++ str r1, [r0] ++ ++ /* FCLK:HCLK:PCLK = 1:2:4 */ ++ /* default FCLK is 120 MHz ! */ ++ ldr r0, =CLKDIVN ++ mov r1, #3 ++ str r1, [r0] ++ ++ bl cpu_init_crit ++ ldr r0,=TEXT_BASE ++ mov pc, r0 ++ ++cpu_init_crit: ++ /* ++ * flush v4 I/D caches ++ */ ++ mov r0, #0 ++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ ++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ ++ ++ /* ++ * disable MMU stuff and caches ++ */ ++ mrc p15, 0, r0, c1, c0, 0 ++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) ++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) ++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align ++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache ++ mcr p15, 0, r0, c1, c0, 0 ++ ++ /* ++ * before relocating, we have to setup RAM timing ++ * because memory timing is board-dependend, you will ++ * find a lowlevel_init.S in your board directory. ++ */ ++ mov ip, lr ++ bl lowlevel_init ++ mov lr, ip ++ mov pc, lr ++ +Index: u-boot/board/smdk2440/lowlevel_foo.lds +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2440/lowlevel_foo.lds +@@ -0,0 +1,56 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ lowlevel_foo.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch new file mode 100644 index 0000000000..5757cc078b --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch @@ -0,0 +1,1411 @@ +Index: u-boot/Makefile +=================================================================== +--- u-boot.orig/Makefile ++++ u-boot/Makefile +@@ -2045,6 +2045,9 @@ + smdk2440_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t smdk2440 NULL s3c24x0 + ++smdk2443_config : unconfig ++ @$(MKCONFIG) $(@:_config=) arm arm920t smdk2443 NULL s3c24x0 ++ + SX1_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm925t sx1 + +Index: u-boot/board/smdk2443/Makefile +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/Makefile +@@ -0,0 +1,67 @@ ++# ++# (C) Copyright 2000-2006 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# 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 $(TOPDIR)/config.mk ++ ++LIB = $(obj)lib$(BOARD).a ++ ++COBJS := smdk2443.o flash.o udc.o ++SOBJS := lowlevel_init.o ++ ++.PHONY: all ++ ++all: $(LIB) lowlevel_foo.bin ++ ++SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) ++OBJS := $(addprefix $(obj),$(COBJS)) ++SOBJS := $(addprefix $(obj),$(SOBJS)) ++ ++$(LIB): $(obj).depend $(OBJS) $(SOBJS) ++ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) ++ ++lowlevel_foo.o: lowlevel_foo.S ++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \ ++ -o lowlevel_foo.o lowlevel_foo.S ++ ++lowlevel_foo: lowlevel_foo.o lowlevel_init.o lowlevel_foo.lds ++ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \ ++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo ++ ++lowlevel_foo.bin: lowlevel_foo ++ $(CROSS_COMPILE)objcopy --gap-fill=0xff -O binary \ ++ lowlevel_foo lowlevel_foo.bin ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++# defines $(obj).depend target ++include $(SRCTREE)/rules.mk ++ ++sinclude $(obj).depend ++ ++######################################################################### +Index: u-boot/board/smdk2443/smdk2443.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/smdk2443.c +@@ -0,0 +1,147 @@ ++/* ++ * (C) Copyright 2006 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#define FCLK_SPEED 1 ++ ++#if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ ++#define M_MDIV 0xC3 ++#define M_PDIV 0x4 ++#define M_SDIV 0x1 ++#elif FCLK_SPEED==1 /* Fout = 399.65MHz */ ++#define M_MDIV 0x6e ++#define M_PDIV 0x3 ++#define M_SDIV 0x1 ++#endif ++ ++#define USB_CLOCK 1 ++ ++#if USB_CLOCK==0 ++#define U_M_MDIV 0xA1 ++#define U_M_PDIV 0x3 ++#define U_M_SDIV 0x1 ++#elif USB_CLOCK==1 ++#define U_M_MDIV 0x3c ++#define U_M_PDIV 0x4 ++#define U_M_SDIV 0x2 ++#endif ++ ++static inline void delay (unsigned long loops) ++{ ++ __asm__ volatile ("1:\n" ++ "subs %0, %1, #1\n" ++ "bne 1b":"=r" (loops):"0" (loops)); ++} ++ ++/* ++ * Miscellaneous platform dependent initialisations ++ */ ++ ++int board_init (void) ++{ ++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ /* to reduce PLL lock time, adjust the LOCKTIME register */ ++ clk_power->LOCKTIME = 0xFFFFFF; ++ ++ /* configure MPLL */ ++ clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (4000); ++ ++ /* configure UPLL */ ++ clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); ++ ++ /* some delay between MPLL and UPLL */ ++ delay (8000); ++ ++ /* set up the I/O ports */ ++ gpio->GPACON = 0x007FFFFF; ++ gpio->GPBCON = 0x00044555; ++ gpio->GPBUP = 0x000007FF; ++ gpio->GPCCON = 0xAAAAAAAA; ++ gpio->GPCUP = 0x0000FFFF; ++ gpio->GPDCON = 0xAAAAAAAA; ++ gpio->GPDUP = 0x0000FFFF; ++ gpio->GPECON = 0xAAAAAAAA; ++ gpio->GPEUP = 0x0000FFFF; ++ gpio->GPFCON = 0x000055AA; ++ gpio->GPFUP = 0x000000FF; ++ gpio->GPGCON = 0xFD95FFBA; ++ gpio->GPGUP = 0x0000FFFF; ++#ifdef CONFIG_SERIAL3 ++ gpio->GPHCON = 0x002AAAAA; ++#else ++ gpio->GPHCON = 0x002AFAAA; ++#endif ++ gpio->GPHUP = 0x000007FF; ++ ++#if 0 ++ /* USB Device Part */ ++ /*GPGCON is reset for USB Device */ ++ gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */ ++ gpio->GPGUP = gpio->GPGUP | ( 1 << 12); /* Pull up disable */ ++ ++ gpio->GPGDAT |= ( 1 << 12) ; ++ gpio->GPGDAT &= ~( 1 << 12) ; ++ udelay(20000); ++ gpio->GPGDAT |= ( 1 << 12) ; ++#endif ++ ++ /* arch number of SMDK2440-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_S3C2440; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = 0x30000100; ++ ++ icache_enable(); ++ dcache_enable(); ++ ++ return 0; ++} ++ ++int dram_init (void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++/* The sum of all part_size[]s must equal to the NAND size, i.e., 0x4000000. ++ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480 ++ images: 640*480*2*2 = 1228800 < 1245184. */ ++ ++unsigned int dynpart_size[] = { ++ CFG_UBOOT_SIZE, 0x20000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE, 0 }; ++ ++char *dynpart_names[] = { ++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs", NULL }; ++ ++ +Index: u-boot/board/smdk2443/u-boot.lds +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/u-boot.lds +@@ -0,0 +1,58 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ cpu/arm920t/s3c24x0/nand_read.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/include/configs/smdk2443.h +=================================================================== +--- /dev/null ++++ u-boot/include/configs/smdk2443.h +@@ -0,0 +1,289 @@ ++/* ++ * (C) Copyright 2007 OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * Configuation settings for the SAMSUNG SMDK2443 board. ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 __CONFIG_H ++#define __CONFIG_H ++ ++#if 0 ++/* If we want to start u-boot from usb bootloader in NOR flash */ ++#define CONFIG_SKIP_RELOCATE_UBOOT 1 ++#define CONFIG_SKIP_LOWLEVEL_INIT 1 ++#else ++/* If we want to start u-boot directly from within NAND flash */ ++#define CONFIG_LL_INIT_NAND_ONLY ++#define CONFIG_S3C2410_NAND_BOOT 1 ++#define CONFIG_S3C2410_NAND_SKIP_BAD 1 ++#endif ++ ++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */ ++ ++/* ++ * High Level Configuration Options ++ * (easy to change) ++ */ ++#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ ++#define CONFIG_S3C2440 1 /* in a SAMSUNG S3C2440 SoC */ ++#define CONFIG_SMDK2443 1 /* on a SAMSUNG SMDK2440 Board */ ++ ++/* input clock of PLL */ ++#define CONFIG_SYS_CLK_FREQ 16934400/* SMDK2440 has 16.9344MHz input clock */ ++ ++ ++#define USE_920T_MMU 1 ++#define CONFIG_USE_IRQ 1 ++ ++/* ++ * Size of malloc() pool ++ */ ++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 2048*1024) ++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ ++ ++/* ++ * Hardware drivers ++ */ ++#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */ ++#define CS8900_BASE 0x19000300 ++#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ ++ ++/* ++ * select serial console configuration ++ */ ++#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2440 */ ++#define CONFIG_HWFLOW 1 ++ ++/************************************************************ ++ * RTC ++ ************************************************************/ ++#define CONFIG_RTC_S3C24X0 1 ++ ++/* allow to overwrite serial and ethaddr */ ++#define CONFIG_ENV_OVERWRITE ++ ++#define CONFIG_BAUDRATE 115200 ++ ++/*********************************************************** ++ * Command definition ++ ***********************************************************/ ++#define CONFIG_COMMANDS \ ++ (CONFIG_CMD_DFL | \ ++ /*CFG_CMD_BSP | */ \ ++ CFG_CMD_CACHE | \ ++ CFG_CMD_DATE | \ ++ /*CFG_CMD_DHCP | */ \ ++ CFG_CMD_DIAG | \ ++ CFG_CMD_ELF | \ ++ CFG_CMD_EXT2 | \ ++ CFG_CMD_FAT | \ ++ /*CFG_CMD_HWFLOW | */ \ ++ /* CFG_CMD_IDE | */ \ ++ /* CFG_CMD_IRQ | */ \ ++ CFG_CMD_JFFS2 | \ ++ CFG_CMD_MMC | \ ++ CFG_CMD_NAND | \ ++ CFG_CMD_PING | \ ++ CFG_CMD_PORTIO | \ ++ CFG_CMD_REGINFO | \ ++ CFG_CMD_SAVES | \ ++ CFG_CMD_LICENSE | \ ++ CFG_CMD_USB) ++ ++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ ++#include ++ ++#define CONFIG_BOOTDELAY 3 ++#define CONFIG_BOOTARGS "root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC2,115200 loglevel=8" ++#define CONFIG_ETHADDR 00:0c:20:02:0a:5b ++#define CONFIG_NETMASK 255.255.255.0 ++#define CONFIG_IPADDR 192.168.1.100 ++#define CONFIG_SERVERIP 192.168.1.21 ++#define CONFIG_BOOTCOMMAND "nand read.e 0x32000000 0x100000 0x200000; bootm" ++ ++#define CONFIG_DOS_PARTITION 1 ++ ++#if (CONFIG_COMMANDS & CFG_CMD_KGDB) ++#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ ++/* what's this ? it's not used anywhere */ ++#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ ++#endif ++ ++/* ++ * Miscellaneous configurable options ++ */ ++#define CFG_LONGHELP /* undef to save memory */ ++#define CFG_PROMPT "SMDK2443 # " /* Monitor Command Prompt */ ++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ ++#define CFG_MAXARGS 32 /* max number of command args */ ++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ ++ ++#define CFG_MEMTEST_START 0x30000000 /* memtest works on */ ++#define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */ ++ ++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ ++ ++#define CFG_LOAD_ADDR 0x32000000 /* default load address */ ++ ++/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */ ++/* it to wrap 100 times (total 1562500) to get 1 sec. */ ++#define CFG_HZ 1562500 ++ ++/* valid baudrates */ ++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } ++ ++/*----------------------------------------------------------------------- ++ * Stack sizes ++ * ++ * The stack sizes are set up in start.S using the settings below ++ */ ++#define CONFIG_STACKSIZE (512*1024) /* regular stack */ ++#ifdef CONFIG_USE_IRQ ++#define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */ ++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */ ++#endif ++ ++/* IDE/ATA config */ ++ ++#if 0 ++#define CFG_IDE_MAXBUS 1 ++#define CFG_IDE_MAXDEVICE 2 ++#define CFG_IDE_PREINIT 0 ++ ++#define CFG_ATA_BASE_ADDR ++#endif ++ ++#define CONFIG_USB_OHCI 1 ++ ++#define CONFIG_USB_DEVICE 1 ++#define CONFIG_USB_TTY 1 ++#define CFG_CONSOLE_IS_IN_ENV 1 ++#define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "FiWin" ++#define CONFIG_USBD_PRODUCT_NAME "S3C2443 Bootloader " U_BOOT_VERSION ++#define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0" ++#define CONFIG_USBD_DFU 1 ++#define CONFIG_USBD_DFU_XFER_SIZE 4096 ++#define CONFIG_USBD_DFU_INTERFACE 2 ++ ++/*----------------------------------------------------------------------- ++ * Physical Memory Map ++ */ ++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ ++#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */ ++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ ++ ++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ ++ ++#define CFG_FLASH_BASE PHYS_FLASH_1 ++ ++/*----------------------------------------------------------------------- ++ * FLASH and environment organization ++ */ ++ ++#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */ ++#if 0 ++#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */ ++#endif ++ ++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ ++#ifdef CONFIG_AMD_LV800 ++#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ ++#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ ++#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */ ++#endif ++#ifdef CONFIG_AMD_LV400 ++#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ ++#define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ ++#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000) /* addr of environment */ ++#endif ++ ++/* timeout values are in ticks */ ++#define CFG_FLASH_ERASE_TOUT (5*CFG_HZ) /* Timeout for Flash Erase */ ++#define CFG_FLASH_WRITE_TOUT (5*CFG_HZ) /* Timeout for Flash Write */ ++ ++#define CFG_ENV_IS_IN_NAND 1 ++#define CFG_ENV_SIZE 0x20000 /* 128k Total Size of Environment Sector */ ++#define CFG_ENV_OFFSET_OOB 1 ++#define CFG_PREBOOT_OVERRIDE 1 ++ ++#define NAND_MAX_CHIPS 1 ++#define CFG_NAND_BASE 0x4e000000 ++#define CFG_MAX_NAND_DEVICE 1 ++ ++#define CONFIG_MMC 1 ++#define CFG_MMC_BASE 0xff000000 ++ ++#define CONFIG_EXT2 1 ++ ++/* FAT driver in u-boot is broken currently */ ++#define CONFIG_FAT 1 ++#define CONFIG_SUPPORT_VFAT ++ ++#if 1 ++/* JFFS2 driver */ ++#define CONFIG_JFFS2_CMDLINE 1 ++#define CONFIG_JFFS2_NAND 1 ++#define CONFIG_JFFS2_NAND_DEV 0 ++//#define CONFIG_JFFS2_NAND_OFF 0x634000 ++//#define CONFIG_JFFS2_NAND_SIZE 0x39cc000 ++#endif ++ ++/* ATAG configuration */ ++#define CONFIG_INITRD_TAG 1 ++#define CONFIG_SETUP_MEMORY_TAGS 1 ++#define CONFIG_CMDLINE_TAG 1 ++#if 0 ++#define CONFIG_SERIAL_TAG 1 ++#define CONFIG_REVISION_TAG 1 ++#endif ++ ++ ++#if 0 ++#define CONFIG_VIDEO ++#define CONFIG_VIDEO_S3C2410 ++#define CONFIG_CFB_CONSOLE ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_VGA_AS_SINGLE_DEVICE ++ ++#define VIDEO_KBD_INIT_FCT 0 ++#define VIDEO_TSTC_FCT serial_tstc ++#define VIDEO_GETC_FCT serial_getc ++ ++#define LCD_VIDEO_ADDR 0x33d00000 ++#endif ++ ++#define CONFIG_S3C2410_NAND_BBT 1 ++//#define CONFIG_S3C2410_NAND_HWECC 1 ++ ++#define CFG_NAND_YAFFS_WRITE ++#define CFG_NAND_YAFFS1_NEW_OOB_LAYOUT ++ ++#define MTDIDS_DEFAULT "nand0=smdk2443-nand" ++#define MTPARTS_DEFAULT "smdk2443-nand:0x00100000(u-boot),0x00200000(kernel),0x00200000(update),0x00100000(splash),0x01400000(jffs2),-(temp)" ++#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "smdk2443-nand" ++#define CONFIG_NAND_DYNPART ++ ++#endif /* __CONFIG_H */ +Index: u-boot/board/smdk2443/lowlevel_foo.S +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/lowlevel_foo.S +@@ -0,0 +1,82 @@ ++ ++_start: ++ b reset ++undefvec: ++ b undefvec ++swivec: ++ b swivec ++pabtvec: ++ b pabtvec ++dabtvec: ++ b dabtvec ++rsvdvec: ++ b rsvdvec ++irqvec: ++ b irqvec ++fiqvec: ++ b fiqvec ++ ++reset: ++ /* ++ * set the cpu to SVC32 mode ++ */ ++ mrs r0,cpsr ++ bic r0,r0,#0x1f ++ orr r0,r0,#0xd3 ++ msr cpsr,r0 ++ ++/* turn off the watchdog */ ++#define pWTCON 0x53000000 ++#define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ ++#define INTSUBMSK 0x4A00001C ++#define CLKDIVN 0x4C000014 /* clock divisor register */ ++ ++ ldr r0, =pWTCON ++ mov r1, #0x0 ++ str r1, [r0] ++ ++ mov r1, #0xffffffff ++ ldr r0, =INTMSK ++ str r1, [r0] ++ ldr r1, =0x3ff ++ ldr r0, =INTSUBMSK ++ str r1, [r0] ++ ++ /* FCLK:HCLK:PCLK = 1:2:4 */ ++ /* default FCLK is 120 MHz ! */ ++ ldr r0, =CLKDIVN ++ mov r1, #3 ++ str r1, [r0] ++ ++ bl cpu_init_crit ++ ldr r0,=TEXT_BASE ++ mov pc, r0 ++ ++cpu_init_crit: ++ /* ++ * flush v4 I/D caches ++ */ ++ mov r0, #0 ++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ ++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ ++ ++ /* ++ * disable MMU stuff and caches ++ */ ++ mrc p15, 0, r0, c1, c0, 0 ++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) ++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) ++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align ++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache ++ mcr p15, 0, r0, c1, c0, 0 ++ ++ /* ++ * before relocating, we have to setup RAM timing ++ * because memory timing is board-dependend, you will ++ * find a lowlevel_init.S in your board directory. ++ */ ++ mov ip, lr ++ bl lowlevel_init ++ mov lr, ip ++ mov pc, lr ++ +Index: u-boot/board/smdk2443/lowlevel_init.S +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/lowlevel_init.S +@@ -0,0 +1,163 @@ ++/* ++ * SMDK2443 Memory Setup ++ * ++ * Copyright (C) 2007 by OpenMoko, Inc. ++ * Author: Harald Welte ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++#include ++ ++ ++/* some parameters for the board */ ++ ++/* ++ * ++ * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S ++ * ++ * Copyright (C) 2002 Samsung Electronics SW.LEE ++ * ++ */ ++ ++#define BWSCON 0x48000000 ++ ++/* BWSCON */ ++#define DW8 (0x0) ++#define DW16 (0x1) ++#define DW32 (0x2) ++#define WAIT (0x1<<2) ++#define UBLB (0x1<<3) ++ ++#define B1_BWSCON (DW32) ++#define B2_BWSCON (DW16) ++#define B3_BWSCON (DW16 + WAIT + UBLB) ++#define B4_BWSCON (DW16) ++#define B5_BWSCON (DW16) ++#define B6_BWSCON (DW32) ++#define B7_BWSCON (DW32) ++ ++/* BANK0CON */ ++#define B0_Tacs 0x0 /* 0clk */ ++#define B0_Tcos 0x0 /* 0clk */ ++#define B0_Tacc 0x7 /* 14clk */ ++#define B0_Tcoh 0x0 /* 0clk */ ++#define B0_Tah 0x0 /* 0clk */ ++#define B0_Tacp 0x0 ++#define B0_PMC 0x0 /* normal */ ++ ++/* BANK1CON */ ++#define B1_Tacs 0x0 /* 0clk */ ++#define B1_Tcos 0x0 /* 0clk */ ++#define B1_Tacc 0x7 /* 14clk */ ++#define B1_Tcoh 0x0 /* 0clk */ ++#define B1_Tah 0x0 /* 0clk */ ++#define B1_Tacp 0x0 ++#define B1_PMC 0x0 ++ ++#define B2_Tacs 0x0 ++#define B2_Tcos 0x0 ++#define B2_Tacc 0x7 ++#define B2_Tcoh 0x0 ++#define B2_Tah 0x0 ++#define B2_Tacp 0x0 ++#define B2_PMC 0x0 ++ ++#define B3_Tacs 0x0 /* 0clk */ ++#define B3_Tcos 0x3 /* 4clk */ ++#define B3_Tacc 0x7 /* 14clk */ ++#define B3_Tcoh 0x1 /* 1clk */ ++#define B3_Tah 0x0 /* 0clk */ ++#define B3_Tacp 0x3 /* 6clk */ ++#define B3_PMC 0x0 /* normal */ ++ ++#define B4_Tacs 0x0 /* 0clk */ ++#define B4_Tcos 0x0 /* 0clk */ ++#define B4_Tacc 0x7 /* 14clk */ ++#define B4_Tcoh 0x0 /* 0clk */ ++#define B4_Tah 0x0 /* 0clk */ ++#define B4_Tacp 0x0 ++#define B4_PMC 0x0 /* normal */ ++ ++#define B5_Tacs 0x0 /* 0clk */ ++#define B5_Tcos 0x0 /* 0clk */ ++#define B5_Tacc 0x7 /* 14clk */ ++#define B5_Tcoh 0x0 /* 0clk */ ++#define B5_Tah 0x0 /* 0clk */ ++#define B5_Tacp 0x0 ++#define B5_PMC 0x0 /* normal */ ++ ++#define B6_MT 0x3 /* SDRAM */ ++#define B6_Trcd 0x1 ++#define B6_SCAN 0x1 /* 9bit */ ++ ++#define B7_MT 0x3 /* SDRAM */ ++#define B7_Trcd 0x1 /* 3clk */ ++#define B7_SCAN 0x1 /* 9bit */ ++ ++/* REFRESH parameter */ ++#define REFEN 0x1 /* Refresh enable */ ++#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */ ++#define Trp 0x0 /* 2clk */ ++#define Trc 0x3 /* 7clk */ ++#define Tchr 0x2 /* 3clk */ ++#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */ ++/**************************************/ ++ ++_TEXT_BASE: ++ .word TEXT_BASE ++ ++.globl lowlevel_init ++lowlevel_init: ++ /* memory control configuration */ ++ /* make r0 relative the current location so that it */ ++ /* reads SMRDATA out of FLASH rather than memory ! */ ++ ldr r0, =SMRDATA ++ ldr r1, _TEXT_BASE ++ sub r0, r0, r1 ++ ldr r1, =BWSCON /* Bus Width Status Controller */ ++ add r2, r0, #13*4 ++0: ++ ldr r3, [r0], #4 ++ str r3, [r1], #4 ++ cmp r2, r0 ++ bne 0b ++ ++ /* everything is fine now */ ++ mov pc, lr ++ ++ .ltorg ++/* the literal pools origin */ ++ ++SMRDATA: ++ .word (0+(B1_BWSCON<<4)+(B2_BWSCON<<8)+(B3_BWSCON<<12)+(B4_BWSCON<<16)+(B5_BWSCON<<20)+(B6_BWSCON<<24)+(B7_BWSCON<<28)) ++ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ++ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ++ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ++ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ++ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ++ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ++ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ++ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ++ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ++ .word 0x32 ++ .word 0x30 ++ .word 0x30 +Index: u-boot/board/smdk2443/config.mk +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/config.mk +@@ -0,0 +1,29 @@ ++# ++# (C) Copyright 2002 ++# Gary Jennejohn, DENX Software Engineering, ++# David Mueller, ELSOFT AG, ++# ++# SAMSUNG SMDK2443 board with S3C2443 (ARM920T) cpu ++# ++# see http://www.samsung.com/ for more information on SAMSUNG ++# ++ ++CONFIG_USB_DFU_VENDOR=0x1457 ++CONFIG_USB_DFU_PRODUCT=0x511c ++CONFIG_USB_DFU_REVISION=0x0100 ++ ++# ++# SMDK2443 has 1 bank of 64 MB DRAM ++# ++# 3000'0000 to 3400'0000 ++# ++# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 ++# optionally with a ramdisk at 3080'0000 ++# ++# we load ourself to 33F8'0000 ++# ++# download area is 3300'0000 ++# ++ ++ ++TEXT_BASE = 0x33F80000 +Index: u-boot/board/smdk2443/lowlevel_foo.lds +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/lowlevel_foo.lds +@@ -0,0 +1,56 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ lowlevel_foo.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +Index: u-boot/board/smdk2443/flash.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/flash.c +@@ -0,0 +1,433 @@ ++/* ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Alex Zuepke ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * 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 ++ ++ulong myflush (void); ++ ++ ++#define FLASH_BANK_SIZE PHYS_FLASH_SIZE ++#define MAIN_SECT_SIZE 0x10000 /* 64 KB */ ++ ++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; ++ ++ ++#define CMD_READ_ARRAY 0x000000F0 ++#define CMD_UNLOCK1 0x000000AA ++#define CMD_UNLOCK2 0x00000055 ++#define CMD_ERASE_SETUP 0x00000080 ++#define CMD_ERASE_CONFIRM 0x00000030 ++#define CMD_PROGRAM 0x000000A0 ++#define CMD_UNLOCK_BYPASS 0x00000020 ++ ++#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00000555 << 1))) ++#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x000002AA << 1))) ++ ++#define BIT_ERASE_DONE 0x00000080 ++#define BIT_RDY_MASK 0x00000080 ++#define BIT_PROGRAM_ERROR 0x00000020 ++#define BIT_TIMEOUT 0x80000000 /* our flag */ ++ ++#define READY 1 ++#define ERR 2 ++#define TMO 4 ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++ulong flash_init (void) ++{ ++ int i, j; ++ ulong size = 0; ++ ++ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { ++ ulong flashbase = 0; ++ ++ flash_info[i].flash_id = ++#if defined(CONFIG_AMD_LV400) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV400B & FLASH_TYPEMASK); ++#elif defined(CONFIG_AMD_LV800) ++ (AMD_MANUFACT & FLASH_VENDMASK) | ++ (AMD_ID_LV800B & FLASH_TYPEMASK); ++#else ++#error "Unknown flash configured" ++#endif ++ flash_info[i].size = FLASH_BANK_SIZE; ++ flash_info[i].sector_count = CFG_MAX_FLASH_SECT; ++ memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT); ++ if (i == 0) ++ flashbase = PHYS_FLASH_1; ++ else ++ panic ("configured too many flash banks!\n"); ++ for (j = 0; j < flash_info[i].sector_count; j++) { ++ if (j <= 3) { ++ /* 1st one is 16 KB */ ++ if (j == 0) { ++ flash_info[i].start[j] = ++ flashbase + 0; ++ } ++ ++ /* 2nd and 3rd are both 8 KB */ ++ if ((j == 1) || (j == 2)) { ++ flash_info[i].start[j] = ++ flashbase + 0x4000 + (j - ++ 1) * ++ 0x2000; ++ } ++ ++ /* 4th 32 KB */ ++ if (j == 3) { ++ flash_info[i].start[j] = ++ flashbase + 0x8000; ++ } ++ } else { ++ flash_info[i].start[j] = ++ flashbase + (j - 3) * MAIN_SECT_SIZE; ++ } ++ } ++ size += flash_info[i].size; ++ } ++ ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_FLASH_BASE, ++ CFG_FLASH_BASE + monitor_flash_len - 1, ++ &flash_info[0]); ++ ++ flash_protect (FLAG_PROTECT_SET, ++ CFG_ENV_ADDR, ++ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); ++ ++ return size; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++void flash_print_info (flash_info_t * info) ++{ ++ int i; ++ ++ switch (info->flash_id & FLASH_VENDMASK) { ++ case (AMD_MANUFACT & FLASH_VENDMASK): ++ printf ("AMD: "); ++ break; ++ default: ++ printf ("Unknown Vendor "); ++ break; ++ } ++ ++ switch (info->flash_id & FLASH_TYPEMASK) { ++ case (AMD_ID_LV400B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV400BB (4Mbit)\n"); ++ break; ++ case (AMD_ID_LV800B & FLASH_TYPEMASK): ++ printf ("1x Amd29LV800BB (8Mbit)\n"); ++ break; ++ default: ++ printf ("Unknown Chip Type\n"); ++ goto Done; ++ break; ++ } ++ ++ printf (" Size: %ld MB in %d Sectors\n", ++ info->size >> 20, info->sector_count); ++ ++ printf (" Sector Start Addresses:"); ++ for (i = 0; i < info->sector_count; i++) { ++ if ((i % 5) == 0) { ++ printf ("\n "); ++ } ++ printf (" %08lX%s", info->start[i], ++ info->protect[i] ? " (RO)" : " "); ++ } ++ printf ("\n"); ++ ++ Done:; ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++int flash_erase (flash_info_t * info, int s_first, int s_last) ++{ ++ ushort result; ++ int iflag, cflag, prot, sect; ++ int rc = ERR_OK; ++ int chip; ++ ++ /* first look for protection bits */ ++ ++ if (info->flash_id == FLASH_UNKNOWN) ++ return ERR_UNKNOWN_FLASH_TYPE; ++ ++ if ((s_first < 0) || (s_first > s_last)) { ++ return ERR_INVAL; ++ } ++ ++ if ((info->flash_id & FLASH_VENDMASK) != ++ (AMD_MANUFACT & FLASH_VENDMASK)) { ++ return ERR_UNKNOWN_FLASH_VENDOR; ++ } ++ ++ prot = 0; ++ for (sect = s_first; sect <= s_last; ++sect) { ++ if (info->protect[sect]) { ++ prot++; ++ } ++ } ++ if (prot) ++ return ERR_PROTECTED; ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ /* Start erase on unprotected sectors */ ++ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { ++ printf ("Erasing sector %2d ... ", sect); ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ if (info->protect[sect] == 0) { /* not protected */ ++ vu_short *addr = (vu_short *) (info->start[sect]); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ *addr = CMD_ERASE_CONFIRM; ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > ++ CFG_FLASH_ERASE_TOUT) { ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ chip = TMO; ++ break; ++ } ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_ERASE_DONE) ++ chip = READY; ++ ++ if (!chip ++ && (result & 0xFFFF) & BIT_PROGRAM_ERROR) ++ chip = ERR; ++ ++ } while (!chip); ++ ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ ++ if (chip == ERR) { ++ rc = ERR_PROG_ERROR; ++ goto outahere; ++ } ++ if (chip == TMO) { ++ rc = ERR_TIMOUT; ++ goto outahere; ++ } ++ ++ printf ("ok.\n"); ++ } else { /* it was protected */ ++ ++ printf ("protected!\n"); ++ } ++ } ++ ++ if (ctrlc ()) ++ printf ("User Interrupt!\n"); ++ ++ outahere: ++ /* allow flash to settle - wait 10 ms */ ++ udelay_masked (10000); ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash ++ */ ++ ++volatile static int write_hword (flash_info_t * info, ulong dest, ushort data) ++{ ++ vu_short *addr = (vu_short *) dest; ++ ushort result; ++ int rc = ERR_OK; ++ int cflag, iflag; ++ int chip; ++ ++ /* ++ * Check if Flash is (sufficiently) erased ++ */ ++ result = *addr; ++ if ((result & data) != data) ++ return ERR_NOT_ERASED; ++ ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS; ++ *addr = CMD_PROGRAM; ++ *addr = data; ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ /* wait until flash is ready */ ++ chip = 0; ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { ++ chip = ERR | TMO; ++ break; ++ } ++ if (!chip && ((result & 0x80) == (data & 0x80))) ++ chip = READY; ++ ++ if (!chip && ((result & 0xFFFF) & BIT_PROGRAM_ERROR)) { ++ result = *addr; ++ ++ if ((result & 0x80) == (data & 0x80)) ++ chip = READY; ++ else ++ chip = ERR; ++ } ++ ++ } while (!chip); ++ ++ *addr = CMD_READ_ARRAY; ++ ++ if (chip == ERR || *addr != data) ++ rc = ERR_PROG_ERROR; ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash. ++ */ ++ ++int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) ++{ ++ ulong cp, wp; ++ int l; ++ int i, rc; ++ ushort data; ++ ++ wp = (addr & ~1); /* get lower word aligned address */ ++ ++ /* ++ * handle unaligned start bytes ++ */ ++ if ((l = addr - wp) != 0) { ++ data = 0; ++ for (i = 0, cp = wp; i < l; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ for (; i < 2 && cnt > 0; ++i) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ ++cp; ++ } ++ for (; cnt == 0 && i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ wp += 2; ++ } ++ ++ /* ++ * handle word aligned part ++ */ ++ while (cnt >= 2) { ++ data = *((vu_short *) src); ++ if ((rc = write_hword (info, wp, data)) != 0) { ++ return (rc); ++ } ++ src += 2; ++ wp += 2; ++ cnt -= 2; ++ } ++ ++ if (cnt == 0) { ++ return ERR_OK; ++ } ++ ++ /* ++ * handle unaligned tail bytes ++ */ ++ data = 0; ++ for (i = 0, cp = wp; i < 2 && cnt > 0; ++i, ++cp) { ++ data = (data >> 8) | (*src++ << 8); ++ --cnt; ++ } ++ for (; i < 2; ++i, ++cp) { ++ data = (data >> 8) | (*(uchar *) cp << 8); ++ } ++ ++ return write_hword (info, wp, data); ++} +Index: u-boot/board/smdk2443/udc.c +=================================================================== +--- /dev/null ++++ u-boot/board/smdk2443/udc.c +@@ -0,0 +1,23 @@ ++ ++#include ++#include ++#include ++ ++void udc_ctrl(enum usbd_event event, int param) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++ switch (event) { ++ case UDC_CTRL_PULLUP_ENABLE: ++ if (param) ++ gpio->GPGDAT |= (1 << 12); ++ else ++ gpio->GPGDAT &= ~(1 << 12); ++ break; ++ case UDC_CTRL_500mA_ENABLE: ++ /* IGNORE */ ++ break; ++ default: ++ break; ++ } ++} diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch new file mode 100644 index 0000000000..a88e94b006 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch @@ -0,0 +1,43 @@ +Make simple_strtoul work with upper-case hex numbers. + +Signed-off-by: Harald Welte + +Index: u-boot/lib_generic/vsprintf.c +=================================================================== +--- u-boot.orig/lib_generic/vsprintf.c ++++ u-boot/lib_generic/vsprintf.c +@@ -25,21 +25,22 @@ unsigned long simple_strtoul(const char + { + unsigned long result = 0,value; + +- if (*cp == '0') { +- cp++; +- if ((*cp == 'x') && isxdigit(cp[1])) { +- base = 16; +- cp++; +- } +- if (!base) { +- base = 8; +- } +- } + if (!base) { + base = 10; ++ if (*cp == '0') { ++ base = 8; ++ cp++; ++ if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { ++ cp++; ++ base = 16; ++ } ++ } ++ } else if (base == 16) { ++ if (cp[0] == '0' && toupper(cp[1]) == 'X') ++ cp += 2; + } +- while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) +- ? toupper(*cp) : *cp)-'A'+10) < base) { ++ while (isxdigit(*cp) && ++ (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { + result = result*base + value; + cp++; + } diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch new file mode 100644 index 0000000000..722a227aa6 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch @@ -0,0 +1,1607 @@ +This patch adds cdc_acm interoperability to u-boot usbtty. + +It was taken (almost blindly) from the Linux for Siemens SX1 project on +handhelds.org. Please don't complain to me about coding style issues +or whitespace changes in this one - HW. + +Index: u-boot/drivers/usbtty.c +=================================================================== +--- u-boot.orig/drivers/usbtty.c 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/drivers/usbtty.c 2007-02-08 21:11:55.000000000 +0100 +@@ -1,6 +1,9 @@ + /* + * (C) Copyright 2003 + * Gerry Hamel, geh@ti.com, Texas Instruments ++ * ++ * (C) Copyright 2006 ++ * Bryan O'Donoghue, bodonoghue codehermit.ie + * + * 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 +@@ -22,26 +25,61 @@ + + #ifdef CONFIG_USB_TTY + ++#include + #include + #include + #include "usbtty.h" ++#include "usb_cdc_acm.h" ++#include "usbdescriptors.h" ++#include /* If defined, override Linux identifiers with ++ * vendor specific ones */ + + #if 0 +-#define TTYDBG(fmt,args...) serial_printf("[%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args) ++//+++ debug print into memory buffer,like kernel log ++static char* log_buf = 0x10e00000; // somewhere in RAM ++static char log_str[512]; ++#define TTYDBG(fmt,args...)\ ++ sprintf(log_str,"\n[%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args);\ ++ memcpy(log_buf, log_str, strlen(log_str));\ ++ log_buf+=strlen(log_str);\ ++ strcpy(log_buf,"\n---------------------------------------------------")\ ++//--- + #else + #define TTYDBG(fmt,args...) do{}while(0) + #endif + + #if 0 +-#define TTYERR(fmt,args...) serial_printf("ERROR![%s] %s %d: "fmt, __FILE__,__FUNCTION__,__LINE__,##args) ++#define TTYDBG(fmt,args...)\ ++ serial_printf("[%s] %s %d: "fmt"\n", __FILE__,__FUNCTION__,__LINE__,##args) ++#endif ++ ++#if 0 ++#define TTYERR(fmt,args...)\ ++ serial_printf("ERROR![%s] %s %d: "fmt"\n", __FILE__,__FUNCTION__,\ ++ __LINE__,##args) + #else + #define TTYERR(fmt,args...) do{}while(0) + #endif + + /* ++ * Defines ++ */ ++#define NUM_CONFIGS 1 ++#define MAX_INTERFACES 2 ++#define NUM_ENDPOINTS 3 ++#define ACM_TX_ENDPOINT 3 ++#define ACM_RX_ENDPOINT 2 ++#define GSERIAL_TX_ENDPOINT 2 ++#define GSERIAL_RX_ENDPOINT 1 ++#define NUM_ACM_INTERFACES 2 ++#define NUM_GSERIAL_INTERFACES 1 ++#define CONFIG_USBD_DATA_INTERFACE_STR "Bulk Data Interface" ++#define CONFIG_USBD_CTRL_INTERFACE_STR "Control Interface" ++ ++/* + * Buffers to hold input and output data + */ +-#define USBTTY_BUFFER_SIZE 256 ++#define USBTTY_BUFFER_SIZE 2048 + static circbuf_t usbtty_input; + static circbuf_t usbtty_output; + +@@ -50,157 +88,336 @@ + * Instance variables + */ + static device_t usbttydev; +-static struct usb_device_instance device_instance[1]; +-static struct usb_bus_instance bus_instance[1]; ++static struct usb_device_instance device_instance[1]; ++static struct usb_bus_instance bus_instance[1]; + static struct usb_configuration_instance config_instance[NUM_CONFIGS]; +-static struct usb_interface_instance interface_instance[NUM_INTERFACES]; +-static struct usb_alternate_instance alternate_instance[NUM_INTERFACES]; +-static struct usb_endpoint_instance endpoint_instance[NUM_ENDPOINTS+1]; /* one extra for control endpoint */ +- +-/* +- * Static allocation of urbs +- */ +-#define RECV_ENDPOINT 1 +-#define TX_ENDPOINT 2 ++static struct usb_interface_instance interface_instance[MAX_INTERFACES]; ++static struct usb_alternate_instance alternate_instance[MAX_INTERFACES]; ++/* one extra for control endpoint */ ++static struct usb_endpoint_instance endpoint_instance[NUM_ENDPOINTS+1]; + + /* + * Global flag + */ + int usbtty_configured_flag = 0; + +- + /* + * Serial number + */ + static char serial_number[16]; + ++ + /* +- * Descriptors ++ * Descriptors, Strings, Local variables. + */ ++ ++/* defined and used by usbdcore_ep0.c */ ++extern struct usb_string_descriptor **usb_strings; ++ ++/* Indicies, References */ ++static unsigned short rx_endpoint = 0; ++static unsigned short tx_endpoint = 0; ++static unsigned short interface_count = 0; ++static struct usb_string_descriptor *usbtty_string_table[STR_COUNT]; ++ ++/* USB Descriptor Strings */ + static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4}; + static u8 wstrManufacturer[2 + 2*(sizeof(CONFIG_USBD_MANUFACTURER)-1)]; + static u8 wstrProduct[2 + 2*(sizeof(CONFIG_USBD_PRODUCT_NAME)-1)]; + static u8 wstrSerial[2 + 2*(sizeof(serial_number) - 1)]; + static u8 wstrConfiguration[2 + 2*(sizeof(CONFIG_USBD_CONFIGURATION_STR)-1)]; +-static u8 wstrInterface[2 + 2*(sizeof(CONFIG_USBD_INTERFACE_STR)-1)]; +- +-static struct usb_string_descriptor *usbtty_string_table[] = { +- (struct usb_string_descriptor*)wstrLang, +- (struct usb_string_descriptor*)wstrManufacturer, +- (struct usb_string_descriptor*)wstrProduct, +- (struct usb_string_descriptor*)wstrSerial, +- (struct usb_string_descriptor*)wstrConfiguration, +- (struct usb_string_descriptor*)wstrInterface +-}; +-extern struct usb_string_descriptor **usb_strings; /* defined and used by omap1510_ep0.c */ ++static u8 wstrDataInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; ++static u8 wstrCtrlInterface[2 + 2*(sizeof(CONFIG_USBD_DATA_INTERFACE_STR)-1)]; + ++/* Standard USB Data Structures */ ++static struct usb_interface_descriptor interface_descriptors[MAX_INTERFACES]; ++static struct usb_endpoint_descriptor *ep_descriptor_ptrs[NUM_ENDPOINTS]; ++static struct usb_configuration_descriptor *configuration_descriptor = 0; + static struct usb_device_descriptor device_descriptor = { +- bLength: sizeof(struct usb_device_descriptor), +- bDescriptorType: USB_DT_DEVICE, +- bcdUSB: USB_BCD_VERSION, +- bDeviceClass: USBTTY_DEVICE_CLASS, +- bDeviceSubClass: USBTTY_DEVICE_SUBCLASS, +- bDeviceProtocol: USBTTY_DEVICE_PROTOCOL, +- bMaxPacketSize0: EP0_MAX_PACKET_SIZE, +- idVendor: CONFIG_USBD_VENDORID, +- idProduct: CONFIG_USBD_PRODUCTID, +- bcdDevice: USBTTY_BCD_DEVICE, +- iManufacturer: STR_MANUFACTURER, +- iProduct: STR_PRODUCT, +- iSerialNumber: STR_SERIAL, +- bNumConfigurations: NUM_CONFIGS +- }; +-static struct usb_configuration_descriptor config_descriptors[NUM_CONFIGS] = { +- { +- bLength: sizeof(struct usb_configuration_descriptor), +- bDescriptorType: USB_DT_CONFIG, +- wTotalLength: (sizeof(struct usb_configuration_descriptor)*NUM_CONFIGS) + +- (sizeof(struct usb_interface_descriptor)*NUM_INTERFACES) + +- (sizeof(struct usb_endpoint_descriptor)*NUM_ENDPOINTS), +- bNumInterfaces: NUM_INTERFACES, +- bConfigurationValue: 1, +- iConfiguration: STR_CONFIG, +- bmAttributes: BMATTRIBUTE_SELF_POWERED | BMATTRIBUTE_RESERVED, +- bMaxPower: USBTTY_MAXPOWER +- }, +-}; +-static struct usb_interface_descriptor interface_descriptors[NUM_INTERFACES] = { +- { +- bLength: sizeof(struct usb_interface_descriptor), +- bDescriptorType: USB_DT_INTERFACE, +- bInterfaceNumber: 0, +- bAlternateSetting: 0, +- bNumEndpoints: NUM_ENDPOINTS, +- bInterfaceClass: USBTTY_INTERFACE_CLASS, +- bInterfaceSubClass: USBTTY_INTERFACE_SUBCLASS, +- bInterfaceProtocol: USBTTY_INTERFACE_PROTOCOL, +- iInterface: STR_INTERFACE +- }, ++ .bLength = sizeof(struct usb_device_descriptor), ++ .bDescriptorType = USB_DT_DEVICE, ++ .bcdUSB = cpu_to_le16(USB_BCD_VERSION), ++ .bDeviceSubClass = 0x00, ++ .bDeviceProtocol = 0x00, ++ .bMaxPacketSize0 = EP0_MAX_PACKET_SIZE, ++ .idVendor = cpu_to_le16(CONFIG_USBD_VENDORID), ++ .bcdDevice = cpu_to_le16(USBTTY_BCD_DEVICE), ++ .iManufacturer = STR_MANUFACTURER, ++ .iProduct = STR_PRODUCT, ++ .iSerialNumber = STR_SERIAL, ++ .bNumConfigurations = NUM_CONFIGS + }; +-static struct usb_endpoint_descriptor ep_descriptors[NUM_ENDPOINTS] = { +- { +- bLength: sizeof(struct usb_endpoint_descriptor), +- bDescriptorType: USB_DT_ENDPOINT, +- bEndpointAddress: CONFIG_USBD_SERIAL_OUT_ENDPOINT | USB_DIR_OUT, +- bmAttributes: USB_ENDPOINT_XFER_BULK, +- wMaxPacketSize: CONFIG_USBD_SERIAL_OUT_PKTSIZE, +- bInterval: 0 +- }, +- { +- bLength: sizeof(struct usb_endpoint_descriptor), +- bDescriptorType: USB_DT_ENDPOINT, +- bEndpointAddress: CONFIG_USBD_SERIAL_IN_ENDPOINT | USB_DIR_IN, +- bmAttributes: USB_ENDPOINT_XFER_BULK, +- wMaxPacketSize: CONFIG_USBD_SERIAL_IN_PKTSIZE, +- bInterval: 0 +- }, +- { +- bLength: sizeof(struct usb_endpoint_descriptor), +- bDescriptorType: USB_DT_ENDPOINT, +- bEndpointAddress: CONFIG_USBD_SERIAL_INT_ENDPOINT | USB_DIR_IN, +- bmAttributes: USB_ENDPOINT_XFER_INT, +- wMaxPacketSize: CONFIG_USBD_SERIAL_INT_PKTSIZE, +- bInterval: 0 +- }, +-}; +-static struct usb_endpoint_descriptor *ep_descriptor_ptrs[NUM_ENDPOINTS] = { +- &(ep_descriptors[0]), +- &(ep_descriptors[1]), +- &(ep_descriptors[2]), ++ ++ ++/* ++ * Static CDC ACM specific descriptors ++ */ ++ ++struct acm_config_desc { ++ struct usb_configuration_descriptor configuration_desc; ++ ++ /* Master Interface */ ++ struct usb_interface_descriptor interface_desc; ++ ++ struct usb_class_header_function_descriptor usb_class_header; ++ struct usb_class_call_management_descriptor usb_class_call_mgt; ++ struct usb_class_abstract_control_descriptor usb_class_acm; ++ struct usb_class_union_function_descriptor usb_class_union; ++ struct usb_endpoint_descriptor notification_endpoint; ++ ++ /* Slave Interface */ ++ struct usb_interface_descriptor data_class_interface; ++ struct usb_endpoint_descriptor ++ data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed)); ++} __attribute__((packed)); ++ ++static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = { ++ { ++ .configuration_desc ={ ++ .bLength = ++ sizeof(struct usb_configuration_descriptor), ++ .bDescriptorType = USB_DT_CONFIG, ++ .wTotalLength = ++ cpu_to_le16(sizeof(struct acm_config_desc)), ++ .bNumInterfaces = NUM_ACM_INTERFACES, ++ .bConfigurationValue = 1, ++ .iConfiguration = STR_CONFIG, ++ .bmAttributes = ++ BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, ++ .bMaxPower = USBTTY_MAXPOWER ++ }, ++ /* Interface 1 */ ++ .interface_desc = { ++ .bLength = sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bAlternateSetting = 0, ++ .bNumEndpoints = 0x01, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_CONTROL, ++ .bInterfaceSubClass = COMMUNICATIONS_ACM_SUBCLASS, ++ .bInterfaceProtocol = COMMUNICATIONS_V25TER_PROTOCOL, ++ .iInterface = STR_CTRL_INTERFACE, ++ }, ++ .usb_class_header = { ++ .bFunctionLength = ++ sizeof(struct usb_class_header_function_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_HEADER, ++ .bcdCDC = cpu_to_le16(110), ++ }, ++ .usb_class_call_mgt = { ++ .bFunctionLength = ++ sizeof(struct usb_class_call_management_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_CMF, ++ .bmCapabilities = 0x00, ++ .bDataInterface = 0x01, ++ }, ++ .usb_class_acm = { ++ .bFunctionLength = ++ sizeof(struct usb_class_abstract_control_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_ACMF, ++ .bmCapabilities = 0x00, ++ }, ++ .usb_class_union = { ++ .bFunctionLength = ++ sizeof(struct usb_class_union_function_descriptor), ++ .bDescriptorType = CS_INTERFACE, ++ .bDescriptorSubtype = USB_ST_UF, ++ .bMasterInterface = 0x00, ++ .bSlaveInterface0 = 0x01, ++ }, ++ .notification_endpoint = { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x01 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_INT, ++ .wMaxPacketSize ++ = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ ++ /* Interface 2 */ ++ .data_class_interface = { ++ .bLength = ++ sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0x01, ++ .bAlternateSetting = 0x00, ++ .bNumEndpoints = 0x02, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_DATA, ++ .bInterfaceSubClass = DATA_INTERFACE_SUBCLASS_NONE, ++ .bInterfaceProtocol = DATA_INTERFACE_PROTOCOL_NONE, ++ .iInterface = STR_DATA_INTERFACE, ++ }, ++ .data_endpoints = { ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x02 | USB_DIR_OUT, ++ .bmAttributes = ++ USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x03 | USB_DIR_IN, ++ .bmAttributes = ++ USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ }, ++ }, ++}; ++ ++static struct rs232_emu rs232_desc={ ++ .dter = 115200, ++ .stop_bits = 0x00, ++ .parity = 0x00, ++ .data_bits = 0x08 + }; + +-/* utility function for converting char* to wide string used by USB */ +-static void str2wide (char *str, u16 * wide) +-{ +- int i; + +- for (i = 0; i < strlen (str) && str[i]; i++) +- wide[i] = (u16) str[i]; +-} ++/* ++ * Static Generic Serial specific data ++ */ ++ ++ ++struct gserial_config_desc { ++ ++ struct usb_configuration_descriptor configuration_desc; ++ struct usb_interface_descriptor ++ interface_desc[NUM_GSERIAL_INTERFACES] __attribute__((packed)); ++ struct usb_endpoint_descriptor ++ data_endpoints[NUM_ENDPOINTS] __attribute__((packed)); ++ ++} __attribute__((packed)); ++ ++static struct gserial_config_desc ++gserial_configuration_descriptors[NUM_CONFIGS] ={ ++ { ++ .configuration_desc ={ ++ .bLength = sizeof(struct usb_configuration_descriptor), ++ .bDescriptorType = USB_DT_CONFIG, ++ .wTotalLength = ++ cpu_to_le16(sizeof(struct gserial_config_desc)), ++ .bNumInterfaces = NUM_GSERIAL_INTERFACES, ++ .bConfigurationValue = 1, ++ .iConfiguration = STR_CONFIG, ++ .bmAttributes = ++ BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED, ++ .bMaxPower = USBTTY_MAXPOWER ++ }, ++ .interface_desc = { ++ { ++ .bLength = ++ sizeof(struct usb_interface_descriptor), ++ .bDescriptorType = USB_DT_INTERFACE, ++ .bInterfaceNumber = 0, ++ .bAlternateSetting = 0, ++ .bNumEndpoints = NUM_ENDPOINTS, ++ .bInterfaceClass = ++ COMMUNICATIONS_INTERFACE_CLASS_VENDOR, ++ .bInterfaceSubClass = ++ COMMUNICATIONS_NO_SUBCLASS, ++ .bInterfaceProtocol = ++ COMMUNICATIONS_NO_PROTOCOL, ++ .iInterface = STR_DATA_INTERFACE ++ }, ++ }, ++ .data_endpoints = { ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x01 | USB_DIR_OUT, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE), ++ .bInterval= 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x02 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ { ++ .bLength = ++ sizeof(struct usb_endpoint_descriptor), ++ .bDescriptorType = USB_DT_ENDPOINT, ++ .bEndpointAddress = 0x03 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_INT, ++ .wMaxPacketSize = ++ cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE), ++ .bInterval = 0xFF, ++ }, ++ }, ++ }, ++}; + + /* +- * Prototypes ++ * Static Function Prototypes + */ ++ + static void usbtty_init_strings (void); + static void usbtty_init_instances (void); + static void usbtty_init_endpoints (void); +- ++static void usbtty_init_terminal_type(short type); + static void usbtty_event_handler (struct usb_device_instance *device, +- usb_device_event_t event, int data); ++ usb_device_event_t event, int data); ++static int usbtty_cdc_setup(struct usb_device_request *request, ++ struct urb *urb); + static int usbtty_configured (void); +- + static int write_buffer (circbuf_t * buf); + static int fill_buffer (circbuf_t * buf); + + void usbtty_poll (void); +-static void pretend_interrupts (void); + ++/* utility function for converting char* to wide string used by USB */ ++static void str2wide (char *str, u16 * wide) ++{ ++ int i; ++ for (i = 0; i < strlen (str) && str[i]; i++){ ++ #if defined(__LITTLE_ENDIAN) ++ wide[i] = (u16) str[i]; ++ #elif defined(__BIG_ENDIAN) ++ wide[i] = ((u16)(str[i])<<8); ++ #else ++ #error "__LITTLE_ENDIAN or __BIG_ENDIAN undefined" ++ #endif ++ } ++} + + /* + * Test whether a character is in the RX buffer + */ ++ + int usbtty_tstc (void) + { ++ struct usb_endpoint_instance *endpoint = ++ &endpoint_instance[rx_endpoint]; ++ ++ /* If no input data exists, allow more RX to be accepted */ ++ if(usbtty_input.size <= 0){ ++ udc_unset_nak(endpoint->endpoint_address&0x03); ++ } ++ + usbtty_poll (); + return (usbtty_input.size > 0); + } +@@ -210,15 +427,21 @@ + * otherwise. When the function is succesfull, the character read is + * written into its argument c. + */ ++ + int usbtty_getc (void) + { + char c; ++ struct usb_endpoint_instance *endpoint = ++ &endpoint_instance[rx_endpoint]; + + while (usbtty_input.size <= 0) { ++ udc_unset_nak(endpoint->endpoint_address&0x03); + usbtty_poll (); + } + + buf_pop (&usbtty_input, &c, 1); ++ udc_set_nak(endpoint->endpoint_address&0x03); ++ + return c; + } + +@@ -238,7 +461,6 @@ + } + } + +- + /* usbtty_puts() helper function for finding the next '\n' in a string */ + static int next_nl_pos (const char *s) + { +@@ -252,8 +474,9 @@ + } + + /* +- * Output a string to the usb client port. ++ * Output a string to the usb client port - implementing flow control + */ ++ + static void __usbtty_puts (const char *str, int len) + { + int maxlen = usbtty_output.totalsize; +@@ -261,22 +484,19 @@ + + /* break str into chunks < buffer size, if needed */ + while (len > 0) { +- space = maxlen - usbtty_output.size; ++ usbtty_poll (); + ++ space = maxlen - usbtty_output.size; + /* Empty buffer here, if needed, to ensure space... */ +- if (space <= 0) { ++ if (space) { + write_buffer (&usbtty_output); +- space = maxlen - usbtty_output.size; +- if (space <= 0) { +- space = len; /* allow old data to be overwritten. */ +- } +- } +- +- n = MIN (space, MIN (len, maxlen)); +- buf_push (&usbtty_output, str, n); ++ ++ n = MIN (space, MIN (len, maxlen)); ++ buf_push (&usbtty_output, str, n); + +- str += n; +- len -= n; ++ str += n; ++ len -= n; ++ } + } + } + +@@ -313,8 +533,10 @@ + { + int rc; + char * sn; ++ char * tt; + int snlen; + ++ /* Get serial number */ + if (!(sn = getenv("serial#"))) { + sn = "000000000000"; + } +@@ -327,6 +549,14 @@ + memcpy (serial_number, sn, snlen); + serial_number[snlen] = '\0'; + ++ /* Decide on which type of UDC device to be. ++ */ ++ ++ if(!(tt = getenv("usbtty"))) { ++ tt = "generic"; ++ } ++ usbtty_init_terminal_type(strcmp(tt,"cdc_acm")); ++ + /* prepare buffers... */ + buf_init (&usbtty_input, USBTTY_BUFFER_SIZE); + buf_init (&usbtty_output, USBTTY_BUFFER_SIZE); +@@ -337,7 +567,7 @@ + usbtty_init_strings (); + usbtty_init_instances (); + +- udc_startup_events (device_instance); /* Enable our device, initialize udc pointers */ ++ udc_startup_events (device_instance);/* Enable dev, init udc pointers */ + udc_connect (); /* Enable pullup for host detection */ + + usbtty_init_endpoints (); +@@ -362,34 +592,52 @@ + { + struct usb_string_descriptor *string; + ++ usbtty_string_table[STR_LANG] = ++ (struct usb_string_descriptor*)wstrLang; ++ + string = (struct usb_string_descriptor *) wstrManufacturer; +- string->bLength = sizeof (wstrManufacturer); ++ string->bLength = sizeof(wstrManufacturer); + string->bDescriptorType = USB_DT_STRING; + str2wide (CONFIG_USBD_MANUFACTURER, string->wData); ++ usbtty_string_table[STR_MANUFACTURER]=string; ++ + + string = (struct usb_string_descriptor *) wstrProduct; +- string->bLength = sizeof (wstrProduct); ++ string->bLength = sizeof(wstrProduct); + string->bDescriptorType = USB_DT_STRING; + str2wide (CONFIG_USBD_PRODUCT_NAME, string->wData); ++ usbtty_string_table[STR_PRODUCT]=string; ++ + + string = (struct usb_string_descriptor *) wstrSerial; +- string->bLength = 2 + 2*strlen(serial_number); ++ string->bLength = sizeof(serial_number); + string->bDescriptorType = USB_DT_STRING; + str2wide (serial_number, string->wData); ++ usbtty_string_table[STR_SERIAL]=string; ++ + + string = (struct usb_string_descriptor *) wstrConfiguration; +- string->bLength = sizeof (wstrConfiguration); ++ string->bLength = sizeof(wstrConfiguration); + string->bDescriptorType = USB_DT_STRING; + str2wide (CONFIG_USBD_CONFIGURATION_STR, string->wData); ++ usbtty_string_table[STR_CONFIG]=string; ++ ++ ++ string = (struct usb_string_descriptor *) wstrDataInterface; ++ string->bLength = sizeof(wstrDataInterface); ++ string->bDescriptorType = USB_DT_STRING; ++ str2wide (CONFIG_USBD_DATA_INTERFACE_STR, string->wData); ++ usbtty_string_table[STR_DATA_INTERFACE]=string; + +- string = (struct usb_string_descriptor *) wstrInterface; +- string->bLength = sizeof (wstrInterface); ++ string = (struct usb_string_descriptor *) wstrCtrlInterface; ++ string->bLength = sizeof(wstrCtrlInterface); + string->bDescriptorType = USB_DT_STRING; +- str2wide (CONFIG_USBD_INTERFACE_STR, string->wData); ++ str2wide (CONFIG_USBD_CTRL_INTERFACE_STR, string->wData); ++ usbtty_string_table[STR_CTRL_INTERFACE]=string; + + /* Now, initialize the string table for ep0 handling */ + usb_strings = usbtty_string_table; +-} ++} + + static void usbtty_init_instances (void) + { +@@ -400,6 +648,7 @@ + device_instance->device_state = STATE_INIT; + device_instance->device_descriptor = &device_descriptor; + device_instance->event = usbtty_event_handler; ++ device_instance->cdc_recv_setup = usbtty_cdc_setup; + device_instance->bus = bus_instance; + device_instance->configurations = NUM_CONFIGS; + device_instance->configuration_instance_array = config_instance; +@@ -415,8 +664,8 @@ + /* configuration instance */ + memset (config_instance, 0, + sizeof (struct usb_configuration_instance)); +- config_instance->interfaces = NUM_INTERFACES; +- config_instance->configuration_descriptor = config_descriptors; ++ config_instance->interfaces = interface_count; ++ config_instance->configuration_descriptor = configuration_descriptor; + config_instance->interface_instance_array = interface_instance; + + /* interface instance */ +@@ -447,17 +696,22 @@ + sizeof (struct usb_endpoint_instance)); + + endpoint_instance[i].endpoint_address = +- ep_descriptors[i - 1].bEndpointAddress; ++ ep_descriptor_ptrs[i - 1]->bEndpointAddress; + +- endpoint_instance[i].rcv_packetSize = +- ep_descriptors[i - 1].wMaxPacketSize; + endpoint_instance[i].rcv_attributes = +- ep_descriptors[i - 1].bmAttributes; ++ ep_descriptor_ptrs[i - 1]->bmAttributes; ++ ++ endpoint_instance[i].rcv_packetSize = ++ le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize); ++ ++ endpoint_instance[i].tx_attributes = ++ ep_descriptor_ptrs[i - 1]->bmAttributes; + + endpoint_instance[i].tx_packetSize = +- ep_descriptors[i - 1].wMaxPacketSize; ++ le16_to_cpu(ep_descriptor_ptrs[i - 1]->wMaxPacketSize); ++ + endpoint_instance[i].tx_attributes = +- ep_descriptors[i - 1].bmAttributes; ++ ep_descriptor_ptrs[i - 1]->bmAttributes; + + urb_link_init (&endpoint_instance[i].rcv); + urb_link_init (&endpoint_instance[i].rdy); +@@ -480,13 +734,79 @@ + int i; + + bus_instance->max_endpoints = NUM_ENDPOINTS + 1; +- for (i = 0; i <= NUM_ENDPOINTS; i++) { ++ for (i = 1; i <= NUM_ENDPOINTS; i++) { + udc_setup_ep (device_instance, i, &endpoint_instance[i]); + } + } + ++/* usbtty_init_terminal_type ++ * ++ * Do some late binding for our device type. ++ */ ++static void usbtty_init_terminal_type(short type) ++{ ++ switch(type){ ++ /* CDC ACM */ ++ case 0: ++ /* Assign endpoint descriptors */ ++ ep_descriptor_ptrs[0] = ++ &acm_configuration_descriptors[0].notification_endpoint; ++ ep_descriptor_ptrs[1] = ++ &acm_configuration_descriptors[0].data_endpoints[0]; ++ ep_descriptor_ptrs[2] = ++ &acm_configuration_descriptors[0].data_endpoints[1]; ++ ++ /* Enumerate Device Descriptor */ ++ device_descriptor.bDeviceClass = ++ COMMUNICATIONS_DEVICE_CLASS; ++ device_descriptor.idProduct = ++ cpu_to_le16(CONFIG_USBD_PRODUCTID_CDCACM); ++ ++ /* Assign endpoint indices */ ++ tx_endpoint = ACM_TX_ENDPOINT; ++ rx_endpoint = ACM_RX_ENDPOINT; ++ ++ /* Configuration Descriptor */ ++ configuration_descriptor = ++ (struct usb_configuration_descriptor*) ++ &acm_configuration_descriptors; ++ ++ /* Interface count */ ++ interface_count = NUM_ACM_INTERFACES; ++ break; ++ ++ /* BULK IN/OUT & Default */ ++ case 1: ++ default: ++ /* Assign endpoint descriptors */ ++ ep_descriptor_ptrs[0] = ++ &gserial_configuration_descriptors[0].data_endpoints[0]; ++ ep_descriptor_ptrs[1] = ++ &gserial_configuration_descriptors[0].data_endpoints[1]; ++ ep_descriptor_ptrs[2] = ++ &gserial_configuration_descriptors[0].data_endpoints[2]; ++ ++ /* Enumerate Device Descriptor */ ++ device_descriptor.bDeviceClass = 0xFF; ++ device_descriptor.idProduct = ++ cpu_to_le16(CONFIG_USBD_PRODUCTID_GSERIAL); ++ ++ /* Assign endpoint indices */ ++ tx_endpoint = GSERIAL_TX_ENDPOINT; ++ rx_endpoint = GSERIAL_RX_ENDPOINT; ++ ++ /* Configuration Descriptor */ ++ configuration_descriptor = ++ (struct usb_configuration_descriptor*) ++ &gserial_configuration_descriptors; ++ ++ /* Interface count */ ++ interface_count = NUM_GSERIAL_INTERFACES; ++ break; ++ } ++} + +-/*********************************************************************************/ ++/******************************************************************************/ + + static struct urb *next_urb (struct usb_device_instance *device, + struct usb_endpoint_instance *endpoint) +@@ -522,82 +842,179 @@ + + static int write_buffer (circbuf_t * buf) + { +- if (!usbtty_configured ()) { +- return 0; +- } ++ if (!usbtty_configured ()) { ++ return 0; ++ } ++ ++ if (buf->size) { ++ ++ struct usb_endpoint_instance *endpoint = ++ &endpoint_instance[tx_endpoint]; ++ struct urb *current_urb = NULL; ++ char *dest; ++ ++ int space_avail; ++ int popnum, popped; ++ int total = 0; ++ ++ /* Break buffer into urb sized pieces, and link each to the endpoint */ ++ while (buf->size > 0) { ++ TTYDBG ("buf->size= %d",buf->size); ++ current_urb = next_urb (device_instance, endpoint); ++ if (!current_urb) { ++ TTYDBG ("current_urb is NULL, buf->size %d\n", ++ buf->size); ++ return total; ++ } ++ ++ dest = current_urb->buffer + ++ current_urb->actual_length; ++ ++ space_avail = ++ current_urb->buffer_length - ++ current_urb->actual_length; ++ TTYDBG ("space_avail= %d",space_avail); ++ popnum = MIN (space_avail, buf->size); ++ if (popnum == 0) ++ break; ++ ++ popped = buf_pop (buf, dest, popnum); ++ TTYDBG ("popped= %d, %s",popped, dest); ++ if (popped == 0) ++ break; ++ current_urb->actual_length += popped; ++ total += popped; ++ ++ /* If endpoint->last == 0, then transfers have not started on this endpoint */ ++ if (endpoint->last == 0) { ++ udc_endpoint_write (endpoint); ++ } ++ ++ } /* end while */ ++ TTYDBG (" total= %d",total); ++ return total; ++ } /* end if tx_urb */ + +- if (buf->size) { ++ return 0; ++} ++// static int write_buffer (circbuf_t * buf) ++// { ++// if (!usbtty_configured ()) { ++// return 0; ++// } ++// ++// struct usb_endpoint_instance *endpoint = ++// &endpoint_instance[tx_endpoint]; ++// struct urb *current_urb = NULL; ++// ++// current_urb = next_urb (device_instance, endpoint); ++// /* TX data still exists - send it now ++// */ ++// if(endpoint->sent < current_urb->actual_length){ ++// if(udc_endpoint_write (endpoint)){ ++// /* Write pre-empted by RX */ ++// return -1; ++// } ++// } ++// ++// if (buf->size) { ++// char *dest; ++// ++// int space_avail; ++// int popnum, popped; ++// int total = 0; ++// ++// /* Break buffer into urb sized pieces, ++// * and link each to the endpoint ++// */ ++// while (buf->size > 0) { ++// ++// if (!current_urb) { ++// TTYERR ("current_urb is NULL, buf->size %d\n", ++// buf->size); ++// return total; ++// } ++// ++// dest = (char*)current_urb->buffer + ++// current_urb->actual_length; ++// ++// space_avail = ++// current_urb->buffer_length - ++// current_urb->actual_length; ++// popnum = MIN (space_avail, buf->size); ++// if (popnum == 0) ++// break; ++// ++// popped = buf_pop (buf, dest, popnum); ++// if (popped == 0) ++// break; ++// current_urb->actual_length += popped; ++// total += popped; ++// ++// /* If endpoint->last == 0, then transfers have ++// * not started on this endpoint ++// */ ++// if (endpoint->last == 0) { ++// if(udc_endpoint_write (endpoint)){ ++// /* Write pre-empted by RX */ ++// return -1; ++// } ++// } ++// ++// }/* end while */ ++// return total; ++// } ++// ++// return 0; ++// } + +- struct usb_endpoint_instance *endpoint = +- &endpoint_instance[TX_ENDPOINT]; +- struct urb *current_urb = NULL; +- char *dest; +- +- int space_avail; +- int popnum, popped; +- int total = 0; +- +- /* Break buffer into urb sized pieces, and link each to the endpoint */ +- while (buf->size > 0) { +- current_urb = next_urb (device_instance, endpoint); +- if (!current_urb) { +- TTYERR ("current_urb is NULL, buf->size %d\n", +- buf->size); +- return total; +- } +- +- dest = current_urb->buffer + +- current_urb->actual_length; +- +- space_avail = +- current_urb->buffer_length - +- current_urb->actual_length; +- popnum = MIN (space_avail, buf->size); +- if (popnum == 0) +- break; +- +- popped = buf_pop (buf, dest, popnum); +- if (popped == 0) +- break; +- current_urb->actual_length += popped; +- total += popped; +- +- /* If endpoint->last == 0, then transfers have not started on this endpoint */ +- if (endpoint->last == 0) { +- udc_endpoint_write (endpoint); +- } +- +- } /* end while */ +- return total; +- } /* end if tx_urb */ ++static int fill_buffer (circbuf_t * buf) ++{ ++ struct usb_endpoint_instance *endpoint = ++ &endpoint_instance[rx_endpoint]; + +- return 0; +-} ++ if (endpoint->rcv_urb && endpoint->rcv_urb->actual_length) { ++ unsigned int nb = endpoint->rcv_urb->actual_length; ++ char *src = (char *) endpoint->rcv_urb->buffer; + ++ buf_push (buf, src, nb); ++ endpoint->rcv_urb->actual_length = 0; ++ ++ TTYDBG ("nb= %d",nb); ++ return nb; ++ } ++ ++ return 0; ++} ++/* + static int fill_buffer (circbuf_t * buf) + { + struct usb_endpoint_instance *endpoint = +- &endpoint_instance[RECV_ENDPOINT]; ++ &endpoint_instance[rx_endpoint]; + + if (endpoint->rcv_urb && endpoint->rcv_urb->actual_length) { +- unsigned int nb = endpoint->rcv_urb->actual_length; ++ unsigned int nb = 0; + char *src = (char *) endpoint->rcv_urb->buffer; ++ unsigned int rx_avail = buf->totalsize - buf->size; + +- buf_push (buf, src, nb); +- endpoint->rcv_urb->actual_length = 0; ++ if(rx_avail >= endpoint->rcv_urb->actual_length){ + ++ nb = endpoint->rcv_urb->actual_length; ++ buf_push (buf, src, nb); ++ endpoint->rcv_urb->actual_length = 0; ++ ++ } + return nb; + } +- + return 0; + } +- ++*/ + static int usbtty_configured (void) + { + return usbtty_configured_flag; + } + +-/*********************************************************************************/ ++/******************************************************************************/ + + static void usbtty_event_handler (struct usb_device_instance *device, + usb_device_event_t event, int data) +@@ -619,8 +1036,34 @@ + } + } + +-/*********************************************************************************/ ++/******************************************************************************/ + ++int usbtty_cdc_setup(struct usb_device_request *request, struct urb *urb) ++{ ++ switch (request->bRequest){ ++ ++ case ACM_SET_CONTROL_LINE_STATE: /* Implies DTE ready */ ++ break; ++ case ACM_SEND_ENCAPSULATED_COMMAND : /* Required */ ++ break; ++ case ACM_SET_LINE_ENCODING : /* DTE stop/parity bits ++ * per character */ ++ break; ++ case ACM_GET_ENCAPSULATED_RESPONSE : /* request response */ ++ break; ++ case ACM_GET_LINE_ENCODING : /* request DTE rate, ++ * stop/parity bits */ ++ memcpy (urb->buffer , &rs232_desc, sizeof(rs232_desc)); ++ urb->actual_length = sizeof(rs232_desc); ++ ++ break; ++ default: ++ return 1; ++ } ++ return 0; ++} ++ ++/******************************************************************************/ + + /* + * Since interrupt handling has not yet been implemented, we use this function +@@ -630,36 +1073,29 @@ + void usbtty_poll (void) + { + /* New interrupts? */ +- pretend_interrupts (); ++ udc_irq(); + +- /* Write any output data to host buffer (do this before checking interrupts to avoid missing one) */ ++ /* Write any output data to host buffer ++ * (do this before checking interrupts to avoid missing one) ++ */ + if (usbtty_configured ()) { + write_buffer (&usbtty_output); + } + + /* New interrupts? */ +- pretend_interrupts (); +- +- /* Check for new data from host.. (do this after checking interrupts to get latest data) */ ++ udc_irq(); ++ ++ /* Check for new data from host.. ++ * (do this after checking interrupts to get latest data) ++ */ + if (usbtty_configured ()) { + fill_buffer (&usbtty_input); + } + + /* New interrupts? */ +- pretend_interrupts (); +-} ++ udc_irq(); + +-static void pretend_interrupts (void) +-{ +- /* Loop while we have interrupts. +- * If we don't do this, the input chain +- * polling delay is likely to miss +- * host requests. +- */ +- while (inw (UDC_IRQ_SRC) & ~UDC_SOF_Flg) { +- /* Handle any new IRQs */ +- omap1510_udc_irq (); +- omap1510_udc_noniso_irq (); +- } + } ++ ++ + #endif +Index: u-boot/drivers/usbtty.h +=================================================================== +--- u-boot.orig/drivers/usbtty.h 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/drivers/usbtty.h 2007-02-08 21:11:55.000000000 +0100 +@@ -2,6 +2,9 @@ + * (C) Copyright 2003 + * Gerry Hamel, geh@ti.com, Texas Instruments + * ++ * (C) Copyright 2006 ++ * Bryan O'Donoghue, bodonoghue codehermit.ie, CodeHermit ++ * + * 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 +@@ -21,44 +24,49 @@ + #ifndef __USB_TTY_H__ + #define __USB_TTY_H__ + +- + #include "usbdcore.h" ++#if defined(CONFIG_PPC) ++#include "usbdcore_mpc8xx.h" ++#elif defined(CONFIG_OMAP1510) + #include "usbdcore_omap1510.h" ++#endif + ++#include ++#include + +-#define NUM_CONFIGS 1 +-#define NUM_INTERFACES 1 +-#define NUM_ENDPOINTS 3 ++/* If no VendorID/ProductID is defined in config.h, pretend to be Linux ++ * DO NOT Reuse this Vendor/Product setup with protocol incompatible devices */ + +-#define EP0_MAX_PACKET_SIZE 64 ++#ifndef CONFIG_USBD_VENDORID ++#define CONFIG_USBD_VENDORID 0x0525 /* Linux/NetChip */ ++#define CONFIG_USBD_PRODUCTID_GSERIAL 0xa4a6 /* gserial */ ++#define CONFIG_USBD_PRODUCTID_CDCACM 0xa4a7 /* CDC ACM */ ++#define CONFIG_USBD_MANUFACTURER "Das U-Boot" ++#define CONFIG_USBD_PRODUCT_NAME U_BOOT_VERSION ++#endif /* CONFIG_USBD_VENDORID */ + + #define CONFIG_USBD_CONFIGURATION_STR "TTY via USB" +-#define CONFIG_USBD_INTERFACE_STR "Simple Serial Data Interface - Bulk Mode" +- +- +-#define CONFIG_USBD_SERIAL_OUT_ENDPOINT 2 +-#define CONFIG_USBD_SERIAL_OUT_PKTSIZE 64 +-#define CONFIG_USBD_SERIAL_IN_ENDPOINT 1 +-#define CONFIG_USBD_SERIAL_IN_PKTSIZE 64 +-#define CONFIG_USBD_SERIAL_INT_ENDPOINT 5 +-#define CONFIG_USBD_SERIAL_INT_PKTSIZE 16 + ++#define CONFIG_USBD_SERIAL_OUT_ENDPOINT UDC_OUT_ENDPOINT ++#define CONFIG_USBD_SERIAL_OUT_PKTSIZE UDC_OUT_PACKET_SIZE ++#define CONFIG_USBD_SERIAL_IN_ENDPOINT UDC_IN_ENDPOINT ++#define CONFIG_USBD_SERIAL_IN_PKTSIZE UDC_IN_PACKET_SIZE ++#define CONFIG_USBD_SERIAL_INT_ENDPOINT UDC_INT_ENDPOINT ++#define CONFIG_USBD_SERIAL_INT_PKTSIZE UDC_INT_PACKET_SIZE ++#define CONFIG_USBD_SERIAL_BULK_PKTSIZE UDC_BULK_PACKET_SIZE + + #define USBTTY_DEVICE_CLASS COMMUNICATIONS_DEVICE_CLASS +-#define USBTTY_DEVICE_SUBCLASS COMMUNICATIONS_NO_SUBCLASS +-#define USBTTY_DEVICE_PROTOCOL COMMUNICATIONS_NO_PROTOCOL + +-#define USBTTY_INTERFACE_CLASS 0xFF /* Vendor Specific */ +-#define USBTTY_INTERFACE_SUBCLASS 0x02 +-#define USBTTY_INTERFACE_PROTOCOL 0x01 +- +-#define USBTTY_BCD_DEVICE 0x0 +-#define USBTTY_MAXPOWER 0x0 +- +-#define STR_MANUFACTURER 1 +-#define STR_PRODUCT 2 +-#define STR_SERIAL 3 +-#define STR_CONFIG 4 +-#define STR_INTERFACE 5 ++#define USBTTY_BCD_DEVICE 0x00 ++#define USBTTY_MAXPOWER 0x00 ++ ++#define STR_LANG 0x00 ++#define STR_MANUFACTURER 0x01 ++#define STR_PRODUCT 0x02 ++#define STR_SERIAL 0x03 ++#define STR_CONFIG 0x04 ++#define STR_DATA_INTERFACE 0x05 ++#define STR_CTRL_INTERFACE 0x06 ++#define STR_COUNT 0x07 + + #endif +Index: u-boot/drivers/usbdcore_omap1510.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_omap1510.c 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/drivers/usbdcore_omap1510.c 2007-02-08 21:11:55.000000000 +0100 +@@ -960,7 +960,7 @@ + /* Handle general USB interrupts and dispatch according to type. + * This function implements TRM Figure 14-13. + */ +-void omap1510_udc_irq (void) ++static void omap1510_udc_irq (void) + { + u16 irq_src = inw (UDC_IRQ_SRC); + int valid_irq = 0; +@@ -1000,7 +1000,7 @@ + } + + /* This function implements TRM Figure 14-26. */ +-void omap1510_udc_noniso_irq (void) ++static void omap1510_udc_noniso_irq (void) + { + unsigned short epnum; + unsigned short irq_src = inw (UDC_IRQ_SRC); +@@ -1054,6 +1054,20 @@ + irq_src); + } + ++void udc_irq(void) ++{ ++ /* Loop while we have interrupts. ++ * If we don't do this, the input chain ++ * polling delay is likely to miss ++ * host requests. ++ */ ++ while (inw (UDC_IRQ_SRC) & ~UDC_SOF_Flg) { ++ /* Handle any new IRQs */ ++ omap1510_udc_irq (); ++ omap1510_udc_noniso_irq (); ++ } ++} ++ + /* + ------------------------------------------------------------------------------- + */ +Index: u-boot/include/usb_cdc_acm.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ u-boot/include/usb_cdc_acm.h 2007-02-08 21:11:55.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * (C) Copyright 2006 ++ * Bryan O'Donoghue, deckard codehermit.ie, CodeHermit ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ */ ++ ++/* ACM Control Requests */ ++#define ACM_SEND_ENCAPSULATED_COMMAND 0x00 ++#define ACM_GET_ENCAPSULATED_RESPONSE 0x01 ++#define ACM_SET_COMM_FEATURE 0x02 ++#define ACM_GET_COMM_FEATRUE 0x03 ++#define ACM_CLEAR_COMM_FEATURE 0x04 ++#define ACM_SET_LINE_ENCODING 0x20 ++#define ACM_GET_LINE_ENCODING 0x21 ++#define ACM_SET_CONTROL_LINE_STATE 0x22 ++#define ACM_SEND_BREAK 0x23 ++ ++/* ACM Notification Codes */ ++#define ACM_NETWORK_CONNECTION 0x00 ++#define ACM_RESPONSE_AVAILABLE 0x01 ++#define ACM_SERIAL_STATE 0x20 ++ ++/* Format of response expected by a ACM_GET_LINE_ENCODING request */ ++struct rs232_emu{ ++ unsigned long dter; ++ unsigned char stop_bits; ++ unsigned char parity; ++ unsigned char data_bits; ++}__attribute__((packed)); +Index: u-boot/include/usbdcore_omap1510.h +=================================================================== +--- u-boot.orig/include/usbdcore_omap1510.h 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/include/usbdcore_omap1510.h 2007-02-08 21:11:55.000000000 +0100 +@@ -161,13 +161,23 @@ + #define UDC_VBUS_CTRL (1 << 19) + #define UDC_VBUS_MODE (1 << 18) + +- +-void omap1510_udc_irq(void); +-void omap1510_udc_noniso_irq(void); +- ++/* OMAP Endpoint parameters */ ++#define EP0_MAX_PACKET_SIZE 64 ++#define UDC_OUT_ENDPOINT 2 ++#define UDC_OUT_PACKET_SIZE 64 ++#define UDC_IN_ENDPOINT 1 ++#define UDC_IN_PACKET_SIZE 64 ++#define UDC_INT_ENDPOINT 5 ++#define UDC_INT_PACKET_SIZE 16 ++#define UDC_BULK_PACKET_SIZE 16 ++ ++void udc_irq (void); ++/* Flow control */ ++void udc_set_nak(int epid); ++void udc_unset_nak (int epid); + + /* Higher level functions for abstracting away from specific device */ +-void udc_endpoint_write(struct usb_endpoint_instance *endpoint); ++int udc_endpoint_write(struct usb_endpoint_instance *endpoint); + + int udc_init (void); + +Index: u-boot/include/usbdescriptors.h +=================================================================== +--- u-boot.orig/include/usbdescriptors.h 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/include/usbdescriptors.h 2007-02-08 21:11:55.000000000 +0100 +@@ -92,15 +92,17 @@ + #define COMMUNICATIONS_DEVICE_CLASS 0x02 + + /* c.f. CDC 4.2 Table 15 */ +-#define COMMUNICATIONS_INTERFACE_CLASS 0x02 ++#define COMMUNICATIONS_INTERFACE_CLASS_CONTROL 0x02 ++#define COMMUNICATIONS_INTERFACE_CLASS_DATA 0x0A ++#define COMMUNICATIONS_INTERFACE_CLASS_VENDOR 0x0FF + + /* c.f. CDC 4.3 Table 16 */ +-#define COMMUNICATIONS_NO_SUBCLASS 0x00 ++#define COMMUNICATIONS_NO_SUBCLASS 0x00 + #define COMMUNICATIONS_DLCM_SUBCLASS 0x01 +-#define COMMUNICATIONS_ACM_SUBCLASS 0x02 +-#define COMMUNICATIONS_TCM_SUBCLASS 0x03 ++#define COMMUNICATIONS_ACM_SUBCLASS 0x02 ++#define COMMUNICATIONS_TCM_SUBCLASS 0x03 + #define COMMUNICATIONS_MCCM_SUBCLASS 0x04 +-#define COMMUNICATIONS_CCM_SUBCLASS 0x05 ++#define COMMUNICATIONS_CCM_SUBCLASS 0x05 + #define COMMUNICATIONS_ENCM_SUBCLASS 0x06 + #define COMMUNICATIONS_ANCM_SUBCLASS 0x07 + +@@ -110,15 +112,22 @@ + #define COMMUNICATIONS_MDLM_SUBCLASS 0x0a + #define COMMUNICATIONS_OBEX_SUBCLASS 0x0b + +-/* c.f. CDC 4.6 Table 18 */ ++/* c.f. CDC 4.4 Table 17 */ ++#define COMMUNICATIONS_NO_PROTOCOL 0x00 ++#define COMMUNICATIONS_V25TER_PROTOCOL 0x01 /*Common AT Hayes compatible*/ ++ ++/* c.f. CDC 4.5 Table 18 */ + #define DATA_INTERFACE_CLASS 0x0a + ++/* c.f. CDC 4.6 No Table */ ++#define DATA_INTERFACE_SUBCLASS_NONE 0x00 /* No subclass pertinent */ ++ + /* c.f. CDC 4.7 Table 19 */ +-#define COMMUNICATIONS_NO_PROTOCOL 0x00 ++#define DATA_INTERFACE_PROTOCOL_NONE 0x00 /* No class protcol required */ + + + /* c.f. CDC 5.2.3 Table 24 */ +-#define CS_INTERFACE 0x24 ++#define CS_INTERFACE 0x24 + #define CS_ENDPOINT 0x25 + + /* +@@ -128,7 +137,7 @@ + * c.f. WMCD 5.3 Table 5.3 + */ + +-#define USB_ST_HEADER 0x00 ++#define USB_ST_HEADER 0x00 + #define USB_ST_CMF 0x01 + #define USB_ST_ACMF 0x02 + #define USB_ST_DLMF 0x03 +@@ -137,18 +146,18 @@ + #define USB_ST_UF 0x06 + #define USB_ST_CSF 0x07 + #define USB_ST_TOMF 0x08 +-#define USB_ST_USBTF 0x09 ++#define USB_ST_USBTF 0x09 + #define USB_ST_NCT 0x0a + #define USB_ST_PUF 0x0b + #define USB_ST_EUF 0x0c + #define USB_ST_MCMF 0x0d + #define USB_ST_CCMF 0x0e + #define USB_ST_ENF 0x0f +-#define USB_ST_ATMNF 0x10 ++#define USB_ST_ATMNF 0x10 + + #define USB_ST_WHCM 0x11 + #define USB_ST_MDLM 0x12 +-#define USB_ST_MDLMD 0x13 ++#define USB_ST_MDLMD 0x13 + #define USB_ST_DMM 0x14 + #define USB_ST_OBEX 0x15 + #define USB_ST_CS 0x16 +@@ -312,7 +321,8 @@ + u8 bDescriptorType; + u8 bDescriptorSubtype; /* 0x06 */ + u8 bMasterInterface; +- u8 bSlaveInterface0[0]; ++ //u8 bSlaveInterface0[0]; ++ u8 bSlaveInterface0; + } __attribute__ ((packed)); + + struct usb_class_country_selection_descriptor { +Index: u-boot/include/usbdcore.h +=================================================================== +--- u-boot.orig/include/usbdcore.h 2007-02-08 21:11:27.000000000 +0100 ++++ u-boot/include/usbdcore.h 2007-02-08 21:11:55.000000000 +0100 +@@ -576,6 +576,9 @@ + + void (*event) (struct usb_device_instance *device, usb_device_event_t event, int data); + ++ /* Do cdc device specific control requests */ ++ int (*cdc_recv_setup)(struct usb_device_request *request, struct urb *urb); ++ + /* bus interface */ + struct usb_bus_instance *bus; /* which bus interface driver */ + +Index: u-boot/drivers/usbdcore_ep0.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-08 21:12:05.000000000 +0100 ++++ u-boot/drivers/usbdcore_ep0.c 2007-02-08 21:12:08.000000000 +0100 +@@ -223,7 +223,6 @@ + + case USB_DESCRIPTOR_TYPE_CONFIGURATION: + { +- int bNumInterface; + struct usb_configuration_descriptor + *configuration_descriptor; + struct usb_device_descriptor *device_descriptor; +@@ -256,105 +255,6 @@ + usb_configuration_descriptor), + max); + +- +- /* iterate across interfaces for specified configuration */ +- dbg_ep0 (0, "bNumInterfaces: %d", +- configuration_descriptor->bNumInterfaces); +- for (bNumInterface = 0; +- bNumInterface < +- configuration_descriptor->bNumInterfaces; +- bNumInterface++) { +- +- int bAlternateSetting; +- struct usb_interface_instance +- *interface_instance; +- +- dbg_ep0 (3, "[%d] bNumInterfaces: %d", +- bNumInterface, +- configuration_descriptor->bNumInterfaces); +- +- if (! (interface_instance = usbd_device_interface_instance (device, +- port, index, bNumInterface))) +- { +- dbg_ep0 (3, "[%d] interface_instance NULL", +- bNumInterface); +- return -1; +- } +- /* iterate across interface alternates */ +- for (bAlternateSetting = 0; +- bAlternateSetting < interface_instance->alternates; +- bAlternateSetting++) { +- /*int class; */ +- int bNumEndpoint; +- struct usb_interface_descriptor *interface_descriptor; +- +- struct usb_alternate_instance *alternate_instance; +- +- dbg_ep0 (3, "[%d:%d] alternates: %d", +- bNumInterface, +- bAlternateSetting, +- interface_instance->alternates); +- +- if (! (alternate_instance = usbd_device_alternate_instance (device, port, index, bNumInterface, bAlternateSetting))) { +- dbg_ep0 (3, "[%d] alternate_instance NULL", +- bNumInterface); +- return -1; +- } +- /* copy descriptor for this interface */ +- copy_config (urb, alternate_instance->interface_descriptor, +- sizeof (struct usb_interface_descriptor), +- max); +- +- /*dbg_ep0(3, "[%d:%d] classes: %d endpoints: %d", bNumInterface, bAlternateSetting, */ +- /* alternate_instance->classes, alternate_instance->endpoints); */ +- +- /* iterate across classes for this alternate interface */ +-#if 0 +- for (class = 0; +- class < alternate_instance->classes; +- class++) { +- struct usb_class_descriptor *class_descriptor; +- /*dbg_ep0(3, "[%d:%d:%d] classes: %d", bNumInterface, bAlternateSetting, */ +- /* class, alternate_instance->classes); */ +- if (!(class_descriptor = usbd_device_class_descriptor_index (device, port, index, bNumInterface, bAlternateSetting, class))) { +- dbg_ep0 (3, "[%d] class NULL", +- class); +- return -1; +- } +- /* copy descriptor for this class */ +- copy_config (urb, class_descriptor, +- sizeof (struct usb_class_descriptor), +- max); +- } +-#endif +- +- /* iterate across endpoints for this alternate interface */ +- interface_descriptor = alternate_instance->interface_descriptor; +- for (bNumEndpoint = 0; +- bNumEndpoint < alternate_instance->endpoints; +- bNumEndpoint++) { +- struct usb_endpoint_descriptor *endpoint_descriptor; +- dbg_ep0 (3, "[%d:%d:%d] endpoint: %d", +- bNumInterface, +- bAlternateSetting, +- bNumEndpoint, +- interface_descriptor-> +- bNumEndpoints); +- if (!(endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, index, bNumInterface, bAlternateSetting, bNumEndpoint))) { +- dbg_ep0 (3, "[%d] endpoint NULL", +- bNumEndpoint); +- return -1; +- } +- /* copy descriptor for this endpoint */ +- copy_config (urb, endpoint_descriptor, +- sizeof (struct usb_endpoint_descriptor), +- max); +- } +- } +- } +- dbg_ep0 (3, "lengths: %d %d", +- le16_to_cpu (configuration_descriptor->wTotalLength), +- urb->actual_length); + } + break; + +@@ -363,6 +263,7 @@ + struct usb_string_descriptor *string_descriptor; + + if (!(string_descriptor = usbd_get_string (index))) { ++ dbg_ep0(0, "Invalid string index %u\n", index); + return -1; + } + /*dbg_ep0(3, "string_descriptor: %p", string_descriptor); */ +@@ -495,6 +396,8 @@ + + /* handle USB Standard Request (c.f. USB Spec table 9-2) */ + if ((request->bmRequestType & USB_REQ_TYPE_MASK) != 0) { ++ if (device->device_state <= STATE_CONFIGURED) ++ return device->cdc_recv_setup(request, urb); + dbg_ep0 (1, "non standard request: %x", + request->bmRequestType & USB_REQ_TYPE_MASK); + return -1; /* Stall here */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch b/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch new file mode 100644 index 0000000000..680b301620 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch @@ -0,0 +1,88 @@ +board/neo1973/gta01/gta01.c: added logic to detect pending PMU interrupts +board/neo1973/gta01/gta01.c (neo1973_new_second, neo1973_on_key_pressed): only + poll PMU if there is a pending interrupt +board/neo1973/gta01/pcf50606.c (pcf50606_initial_regs): cleared (unmasked) + SECONDM in INT1M + +- Werner Almesberger + +Index: u-boot/board/neo1973/gta01/gta01.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/gta01.c ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -375,19 +375,60 @@ + #endif + } + ++static int pwr_int_pending(void) ++{ ++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ ++#if defined(CONFIG_ARCH_GTA01B_v4) ++ return !(gpio->GPGDAT & (1 << 1)); /* EINT9/GPG1 */ ++#else ++ return !(gpio->GPGDAT & (1 << 8)); /* EINT16/GPG8 */ ++#endif /* !CONFIG_ARCH_GTA01B_v4 */ ++} ++ ++static int have_int1(uint8_t mask) ++{ ++ static uint8_t pending = 0; ++ ++ if (pwr_int_pending()) { ++ /* ++ * We retrieve all interupts, so that we clear any stray ones ++ * in INT2 and INT3. ++ */ ++ uint8_t int1,int2,int3; ++ ++ int1 = pcf50606_reg_read(PCF50606_REG_INT1); ++ int2 = pcf50606_reg_read(PCF50606_REG_INT2); ++ int3 = pcf50606_reg_read(PCF50606_REG_INT3); ++ pending |= int1; ++ } ++ if (!(pending & mask)) ++ return 0; ++ pending &= ~mask; ++ return 1; ++} ++ + int neo1973_new_second(void) + { +- return pcf50606_reg_read(PCF50606_REG_INT1) & PCF50606_INT1_SECOND; ++ return have_int1(PCF50606_INT1_SECOND); + } + + int neo1973_on_key_pressed(void) + { +- return !(pcf50606_reg_read(PCF50606_REG_OOCS) & PFC50606_OOCS_ONKEY); ++ static int pressed = -1; ++ ++ if (pressed == -1 || ++ have_int1(PCF50606_INT1_ONKEYF | PCF50606_INT1_ONKEYR)) { ++ pressed = !(pcf50606_reg_read(PCF50606_REG_OOCS) & ++ PFC50606_OOCS_ONKEY); ++} ++ return pressed; + } + + int neo1973_aux_key_pressed(void) + { + S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); ++ + if (gpio->GPFDAT & (1 << 6)) + return 0; + return 1; +Index: u-boot/board/neo1973/gta01/pcf50606.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/pcf50606.c ++++ u-boot/board/neo1973/gta01/pcf50606.c +@@ -6,7 +6,7 @@ + const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = { + [PCF50606_REG_OOCS] = 0x00, + /* gap */ +- [PCF50606_REG_INT1M] = PCF50606_INT1_SECOND, ++ [PCF50606_REG_INT1M] = 0x00, + [PCF50606_REG_INT2M] = 0x00, + [PCF50606_REG_INT3M] = PCF50606_INT3_TSCPRES, + [PCF50606_REG_OOCC1] = PCF50606_OOCC1_RTCWAK | diff --git a/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch b/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch new file mode 100644 index 0000000000..339289699a --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch @@ -0,0 +1,63 @@ +This patch fixes bugs in usbdcore*.c related to the use of devices +with multiple configurations. + +The original code made mistakes about the meaning of configuration value and +configuration index, and the resulting off-by-one errors resulted in: + +* SET_CONFIGURATION always selected the first configuration, no matter what + wValue is being passed. +* GET_DESCRIPTOR/CONFIGURATION always returned the descriptor for the first + configuration (index 0). + +Signed-off-by: Harald Welte + +Index: u-boot/drivers/usbdcore_ep0.c +=================================================================== +--- u-boot.orig/drivers/usbdcore_ep0.c 2007-03-14 20:29:05.000000000 +0100 ++++ u-boot/drivers/usbdcore_ep0.c 2007-03-14 20:29:06.000000000 +0100 +@@ -233,8 +233,8 @@ + return -1; + } + /*dbg_ep0(2, "%d %d", index, device_descriptor->bNumConfigurations); */ +- if (index > device_descriptor->bNumConfigurations) { +- dbg_ep0 (0, "index too large: %d > %d", index, ++ if (index >= device_descriptor->bNumConfigurations) { ++ dbg_ep0 (0, "index too large: %d >= %d", index, + device_descriptor-> + bNumConfigurations); + return -1; +@@ -593,13 +593,8 @@ + + case USB_REQ_SET_CONFIGURATION: + /* c.f. 9.4.7 - the top half of wValue is reserved */ +- /* */ +- if ((device->configuration = +- le16_to_cpu (request->wValue) & 0x7f) != 0) { +- /* c.f. 9.4.7 - zero is the default or addressed state, in our case this */ +- /* is the same is configuration zero */ +- device->configuration = 0; /* TBR - ?????? */ +- } ++ device->configuration = le16_to_cpu(request->wValue) & 0xff; ++ + /* reset interface and alternate settings */ + device->interface = device->alternate = 0; + +Index: u-boot/drivers/usbdcore.c +=================================================================== +--- u-boot.orig/drivers/usbdcore.c 2007-03-14 20:29:05.000000000 +0100 ++++ u-boot/drivers/usbdcore.c 2007-03-14 20:37:37.000000000 +0100 +@@ -147,12 +147,9 @@ + static struct usb_configuration_instance *usbd_device_configuration_instance (struct usb_device_instance *device, + unsigned int port, unsigned int configuration) + { +- /* XXX */ +- configuration = configuration ? configuration - 1 : 0; +- +- if (configuration >= device->configurations) { ++ if (configuration >= device->configurations) + return NULL; +- } ++ + return device->configuration_instance_array + configuration; + } + diff --git a/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch b/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch new file mode 100644 index 0000000000..132a9f8da5 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch @@ -0,0 +1,68 @@ +This patch should get rid of spurious poweroff after booting from RAM. +Experimental. + +cpu/arm920t/start.S: record in global variable "booted_from_nand" whether we + booted from NAND or not +board/neo1973/neo1973.c (board_late_init): if booted from RAM, assume that + wakeup cause was "reset", and skip poweroff check + +- Werner Almesberger + +Index: u-boot/board/neo1973/gta01/gta01.c +=================================================================== +--- u-boot.orig/board/neo1973/gta01/gta01.c ++++ u-boot/board/neo1973/gta01/gta01.c +@@ -226,12 +226,16 @@ + + int board_late_init(void) + { ++ extern unsigned char booted_from_nand; + unsigned char tmp; + char buf[32]; + + /* Initialize the Power Management Unit with a safe register set */ + pcf50606_init(); + ++ if (!booted_from_nand) ++ goto woken_by_reset; ++ + /* obtain wake-up reason, save INT1 in environment */ + tmp = pcf50606_reg_read(PCF50606_REG_INT1); + sprintf(buf, "0x%02x", tmp); +@@ -274,6 +278,7 @@ + neo1973_poweroff(); + } + ++woken_by_reset: + /* if there's no other reason, must be regular reset */ + neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; + +Index: u-boot/cpu/arm920t/start.S +=================================================================== +--- u-boot.orig/cpu/arm920t/start.S ++++ u-boot/cpu/arm920t/start.S +@@ -77,6 +77,14 @@ + ************************************************************************* + */ + ++#ifdef CONFIG_S3C2410_NAND_BOOT ++.globl booted_from_nand ++booted_from_nand: ++ .word 0 ++_booted_from_nand: ++ .word booted_from_nand ++#endif /* CONFIG_S3C2410_NAND_BOOT */ ++ + _TEXT_BASE: + .word TEXT_BASE + +@@ -281,6 +289,9 @@ + #endif + 1: b 1b + done_nand_read: ++ ldr r0, _booted_from_nand ++ mov r1, #1 ++ strb r1, [r0] + #endif /* CONFIG_S3C2410_NAND_BOOT */ + done_relocate: + #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ diff --git a/packages/uboot/u-boot-mkimage-gta01-native_oe.bb b/packages/uboot/u-boot-mkimage-gta01-native_oe.bb new file mode 100644 index 0000000000..2eafac668f --- /dev/null +++ b/packages/uboot/u-boot-mkimage-gta01-native_oe.bb @@ -0,0 +1,83 @@ +require uboot-gta01_svn.bb + +PV = "1.2.0+git9912121f7ed804ea58fd62f3f230b5dcfc357d88svn2238" + +SRC_URI = "git://www.denx.de/git/u-boot.git/;protocol=git;tag=9912121f7ed804ea58fd62f3f230b5dcfc357d88 \ +file://uboot-machtypes.patch;patch=1 \ +file://ext2load_hex.patch;patch=1 \ +file://uboot-mokoversion.patch;patch=1 \ +file://uboot-s3c2410-warnings-fix.patch;patch=1 \ +file://uboot-strtoul.patch;patch=1 \ +file://uboot-cramfs_but_no_jffs2.patch;patch=1 \ +file://nand-read_write_oob.patch;patch=1 \ +file://uboot-arm920t-gd_in_irq.patch;patch=1 \ +file://uboot-arm920_s3c2410_irq_demux.patch;patch=1 \ +file://uboot-s3c2410-nand.patch;patch=1 \ +file://uboot-cmd_s3c2410.patch;patch=1 \ +file://uboot-s3c2410-mmc.patch;patch=1 \ +file://env_nand_oob.patch;patch=1 \ +file://dynenv-harden.patch;patch=1 \ +file://uboot-s3c2410_fb.patch;patch=1 \ +file://uboot-20061030-qt2410.patch;patch=1 \ +file://uboot-20061030-neo1973.patch;patch=1 \ +file://uboot-s3c2410-misccr-definitions.patch;patch=1 \ +file://boot-from-ram-reloc.patch;patch=1 \ +file://boot-from-ram-and-nand.patch;patch=1 \ +file://wakeup-reason-nand-only.patch;patch=1 \ +file://uboot-neo1973-resume.patch;patch=1 \ +file://nand-dynamic_partitions.patch;patch=1 \ +file://uboot-s3c2410-norelocate_irqvec_cpy.patch;patch=1 \ +file://uboot-usbtty-acm.patch;patch=1 \ +file://uboot-s3c2410_udc.patch;patch=1 \ +file://bbt-create-optional.patch;patch=1 \ +file://nand-createbbt.patch;patch=1 \ +file://dontask.patch;patch=1 \ +file://nand-badisbad.patch;patch=1 \ +file://uboot-bbt-quiet.patch;patch=1 \ +file://raise-limits.patch;patch=1 \ +file://splashimage-command.patch;patch=1 \ +file://cmd-unzip.patch;patch=1 \ +file://enable-splash-bmp.patch;patch=1 \ +file://preboot-override.patch;patch=1 \ +file://lowlevel_foo.patch;patch=1 \ +file://default-env.patch;patch=1 \ +file://console-ansi.patch;patch=1 \ +file://boot-menu.patch;patch=1 \ +file://uboot-dfu.patch;patch=1 \ +file://uboot-neo1973-defaultenv.patch;patch=1 \ +file://uboot-nand-markbad-reallybad.patch;patch=1 \ +file://usbdcore-multiple_configs.patch;patch=1 \ +file://neo1973-chargefast.patch;patch=1 \ +file://uboot-s3c2440.patch;patch=1 \ +file://uboot-smdk2440.patch;patch=1 \ +file://uboot-hxd8.patch;patch=1 \ +file://uboot-license.patch;patch=1 \ +file://uboot-gta02.patch;patch=1 \ +file://uboot-s3c2443.patch;patch=1 \ +file://uboot-smdk2443.patch;patch=1 \ +file://unbusy-i2c.patch;patch=1 \ +" + +PROVIDES = "" +TARGET_LDFLAGS = "" + +do_quilt() { +: +} + +do_compile () { + chmod +x board/neo1973/gta01/split_by_variant.sh + oe_runmake gta01bv3_config + oe_runmake clean + oe_runmake tools +} + +do_deploy () { + install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage + ln -sf ${STAGING_BINDIR_NATIVE}/uboot-mkimage ${STAGING_BINDIR_NATIVE}/mkimage +} + +do_deploy[dirs] = "${S}" +addtask deploy before do_package after do_install + + diff --git a/packages/uboot/u-boot_1.1.4.bb b/packages/uboot/u-boot_1.1.4.bb index 5c158f2401..45d24df455 100644 --- a/packages/uboot/u-boot_1.1.4.bb +++ b/packages/uboot/u-boot_1.1.4.bb @@ -25,11 +25,15 @@ SRC_URI_append_amsdelta = "\ SRC_URI_append_dht-walnut= "\ file://u-boot-dht-walnut-df2.patch;patch=1" +SRC_URI_append_avr32= "\ + http://avr32linux.org/twiki/pub/Main/UbootPatches/u-boot-1.1.4-avr1.patch.bz2;patch=1" + EXTRA_OEMAKE_gumstix = "CROSS_COMPILE=${TARGET_PREFIX} GUMSTIX_400MHZ=${GUMSTIX_400MHZ}" TARGET_LDFLAGS = "" UBOOT_MACHINE_dht-walnut = "walnut_config" +UBOOT_MACHINE_atngw100 = "atngw_config" def gumstix_mhz(d): import bb -- cgit v1.2.3 From 005b94b2d0208080b63ccd708fd354cf5717b84c Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 22 Jun 2007 07:11:50 +0000 Subject: linux-ezx: remove old kernel, update 2.6.21 and add script to generate SRC_URI from the quilt series in svn --- packages/asterisk/asterisk14-1.4.5/.mtn2git_empty | 0 packages/asterisk/asterisk14-1.4.5/Makefile.patch | 20 + .../asterisk/asterisk14-1.4.5/sounds.xml.patch | 18 + packages/asterisk/asterisk14_1.4.5.bb | 121 + packages/asterisk/files/.mtn2git_empty | 0 packages/asterisk/files/init | 77 + packages/linux/ezx-kernels_2.6.bb | 3 - packages/linux/linux-ezx-2.6.20.7/.mtn2git_empty | 0 packages/linux/linux-ezx-2.6.20.7/defconfig-a780 | 1249 - packages/linux/linux-ezx-2.6.20.7/ezx-core.patch | 1120 - packages/linux/linux-ezx-2.6.20.7/ezx-emu.patch | 332 - .../ezx-fix-usb_pxa27x_udc-r3.patch | 16 - packages/linux/linux-ezx-2.6.20.7/ezx-mci.patch | 177 - .../linux/linux-ezx-2.6.20.7/ezx-mtd-map.patch | 274 - packages/linux/linux-ezx-2.6.20.7/ezx-pcap.patch | 1197 - .../ezx-serial-bug-workaround.patch | 45 - .../mux-fix-init-errorpath.patch | 20 - .../linux-ezx-2.6.20.7/mux-fix-makefile.patch | 14 - .../linux-ezx-2.6.20.7/mux-fix-tty-driver.patch | 125 - packages/linux/linux-ezx-2.6.20.7/mux-fix.patch | 164 - .../mux-ifdef-ezx-features.patch | 85 - .../mux-linux-2.6.20.7-fix.patch | 96 - .../mux-remove-flipbuffers.patch | 269 - .../mux-remove-get_halted_bit.patch | 22 - .../mux-remove-usbh_finished_resume.patch | 22 - packages/linux/linux-ezx-2.6.20.7/mux_cli.patch | 5395 - packages/linux/linux-ezx-2.6.20.7/mux_debug.patch | 551 - .../linux-ezx-2.6.20.7/usb_add_epalloc-r3.patch | 282 - .../linux-ezx-2.6.20.7/usb_pxa27x_udc-r3.patch | 2868 - packages/linux/linux-ezx-2.6.21/a780-flip.patch | 43 - packages/linux/linux-ezx-2.6.21/a780-kbd.patch | 90 - packages/linux/linux-ezx-2.6.21/a780-leds.patch | 181 - packages/linux/linux-ezx-2.6.21/a780-mci.patch | 123 - .../linux/linux-ezx-2.6.21/a780-vibrator.patch | 151 - packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch | 755 - packages/linux/linux-ezx-2.6.21/defconfig-a780 | 1243 - packages/linux/linux-ezx-2.6.21/defconfig-e680 | 1240 - packages/linux/linux-ezx-2.6.21/e680-kbd.patch | 93 - packages/linux/linux-ezx-2.6.21/e680-leds.patch | 368 - packages/linux/linux-ezx-2.6.21/e680-locksw.patch | 42 - packages/linux/linux-ezx-2.6.21/e680-mci.patch | 127 - .../linux/linux-ezx-2.6.21/ezx-backlight.patch | 203 - packages/linux/linux-ezx-2.6.21/ezx-bp.patch | 327 - packages/linux/linux-ezx-2.6.21/ezx-core.patch | 1012 - packages/linux/linux-ezx-2.6.21/ezx-emu.patch | 313 - packages/linux/linux-ezx-2.6.21/ezx-kbd.patch | 139 - packages/linux/linux-ezx-2.6.21/ezx-mci.patch | 177 - packages/linux/linux-ezx-2.6.21/ezx-mtd-map.patch | 274 - packages/linux/linux-ezx-2.6.21/ezx-pcap.patch | 1192 - packages/linux/linux-ezx-2.6.21/ezx-pm.patch | 140 - .../ezx-serial-bug-workaround.patch | 45 - packages/linux/linux-ezx-2.6.21/ezx-ts.patch | 399 - .../linux-ezx-2.6.21/mux-fix-init-errorpath.patch | 20 - .../linux/linux-ezx-2.6.21/mux-fix-makefile.patch | 14 - .../linux-ezx-2.6.21/mux-fix-tty-driver.patch | 125 - packages/linux/linux-ezx-2.6.21/mux-fix.patch | 164 - .../linux-ezx-2.6.21/mux-ifdef-ezx-features.patch | 86 - .../linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch | 224 - .../linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch | 297 - .../linux-ezx-2.6.21/mux-remove-flipbuffers.patch | 269 - .../mux-remove-get_halted_bit.patch | 22 - .../mux-remove-usbh_finished_resume.patch | 22 - packages/linux/linux-ezx-2.6.21/mux_cli.patch | 5396 - packages/linux/linux-ezx-2.6.21/mux_debug.patch | 551 - .../linux/linux-ezx-2.6.21/patches/.mtn2git_empty | 0 .../linux-ezx-2.6.21/patches/Makefile.OpenEZX | 51 + .../linux/linux-ezx-2.6.21/patches/a1200-mci.patch | 135 + .../linux/linux-ezx-2.6.21/patches/a1200-ts.patch | 40 + .../linux/linux-ezx-2.6.21/patches/a780-flip.patch | 44 + .../linux/linux-ezx-2.6.21/patches/a780-kbd.patch | 90 + .../linux/linux-ezx-2.6.21/patches/a780-leds.patch | 182 + .../linux/linux-ezx-2.6.21/patches/a780-mci.patch | 135 + .../linux/linux-ezx-2.6.21/patches/a780-ts.patch | 40 + .../linux-ezx-2.6.21/patches/a780-vibrator.patch | 151 + .../linux-ezx-2.6.21/patches/asoc-pxa-ssp.patch | 755 + .../linux/linux-ezx-2.6.21/patches/defconfig-a1200 | 1103 + .../linux/linux-ezx-2.6.21/patches/defconfig-a780 | 1224 + .../linux/linux-ezx-2.6.21/patches/defconfig-e2 | 1092 + .../linux/linux-ezx-2.6.21/patches/defconfig-e6 | 1102 + .../linux/linux-ezx-2.6.21/patches/defconfig-e680 | 1224 + .../linux/linux-ezx-2.6.21/patches/dmesg-a780.log | 299 + .../linux/linux-ezx-2.6.21/patches/e680-kbd.patch | 93 + .../linux/linux-ezx-2.6.21/patches/e680-leds.patch | 369 + .../linux-ezx-2.6.21/patches/e680-locksw.patch | 43 + .../linux/linux-ezx-2.6.21/patches/e680-mci.patch | 139 + .../linux/linux-ezx-2.6.21/patches/e680-ts.patch | 40 + .../linux-ezx-2.6.21/patches/ezx-backlight.patch | 203 + .../linux/linux-ezx-2.6.21/patches/ezx-bp.patch | 326 + .../linux/linux-ezx-2.6.21/patches/ezx-core.patch | 1178 + .../linux/linux-ezx-2.6.21/patches/ezx-emu.patch | 313 + .../patches/ezx-enable-stuart.patch | 99 + .../linux-ezx-2.6.21/patches/ezx-mtd-map.patch | 274 + .../linux/linux-ezx-2.6.21/patches/ezx-pcap.patch | 1242 + .../linux/linux-ezx-2.6.21/patches/ezx-pm.patch | 140 + .../patches/ezx-serial-bug-workaround.patch | 45 + .../patches/mux-fix-init-errorpath.patch | 20 + .../patches/mux-fix-makefile.patch | 14 + .../patches/mux-fix-tty-driver.patch | 125 + .../linux/linux-ezx-2.6.21/patches/mux-fix.patch | 164 + .../patches/mux-ifdef-ezx-features.patch | 86 + .../patches/mux-linux-2.6.21-fix.patch | 297 + .../patches/mux-remove-flipbuffers.patch | 269 + .../patches/mux-remove-get_halted_bit.patch | 22 + .../patches/mux-remove-usbh_finished_resume.patch | 22 + .../linux/linux-ezx-2.6.21/patches/mux_cli.patch | 5396 + .../linux/linux-ezx-2.6.21/patches/mux_debug.patch | 551 + .../linux/linux-ezx-2.6.21/patches/patch-2.6.21.4 | 2816 + .../linux/linux-ezx-2.6.21/patches/pcap-ts.patch | 404 + .../linux/linux-ezx-2.6.21/patches/pxa-kbd.patch | 534 + .../patches/pxa27x-udc-support.2.patch | 3037 + packages/linux/linux-ezx-2.6.21/patches/series | 93 + packages/linux/linux-ezx-2.6.21/pcap-ts.patch | 448 - packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch | 237 - packages/linux/linux-ezx-2.6.21/pxa-kbd.patch | 516 - .../linux-ezx-2.6.21/pxa27x-udc-support.2.patch | 3037 - .../linux-ezx-2.6.21/touchscreen-fix-r0.patch | 21 - packages/linux/linux-ezx-2.6.21/update_patches.sh | 16 + packages/linux/linux-ezx-2.6.21/wyrm-ts.diff | 124 - packages/linux/linux-ezx/.mtn2git_empty | 0 packages/linux/linux-ezx/defconfig-a780 | 1317 - packages/linux/linux-ezx/defconfig-a780-laforge | 1298 - packages/linux/linux-ezx/defconfig-e680 | 1314 - packages/linux/linux-ezx/defconfig-rokr-e2 | 904 - packages/linux/linux-ezx/logo_linux_clut224.ppm | 226084 ------------------ packages/linux/linux-ezx/pxa-serial-gcc4.diff | 11 - packages/linux/linux-ezx/sa1100-rtc-gcc4.diff | 11 - packages/linux/linux-ezx/wyrm-ts.diff | 119 - packages/linux/linux-ezx_2.6.16.13.bb | 110 - packages/linux/linux-ezx_2.6.19+2.6.20-rc2.bb | 125 - packages/linux/linux-ezx_2.6.20.7.bb | 125 - packages/linux/linux-ezx_2.6.21.bb | 110 +- 131 files changed, 26336 insertions(+), 266041 deletions(-) create mode 100644 packages/asterisk/asterisk14-1.4.5/.mtn2git_empty create mode 100644 packages/asterisk/asterisk14-1.4.5/Makefile.patch create mode 100644 packages/asterisk/asterisk14-1.4.5/sounds.xml.patch create mode 100644 packages/asterisk/asterisk14_1.4.5.bb create mode 100644 packages/asterisk/files/.mtn2git_empty create mode 100644 packages/asterisk/files/init delete mode 100644 packages/linux/ezx-kernels_2.6.bb delete mode 100644 packages/linux/linux-ezx-2.6.20.7/.mtn2git_empty delete mode 100644 packages/linux/linux-ezx-2.6.20.7/defconfig-a780 delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-core.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-emu.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-fix-usb_pxa27x_udc-r3.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-mci.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-mtd-map.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-pcap.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/ezx-serial-bug-workaround.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-fix-init-errorpath.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-fix-makefile.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-fix-tty-driver.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-fix.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-ifdef-ezx-features.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-linux-2.6.20.7-fix.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-remove-flipbuffers.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-remove-get_halted_bit.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux-remove-usbh_finished_resume.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux_cli.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/mux_debug.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/usb_add_epalloc-r3.patch delete mode 100644 packages/linux/linux-ezx-2.6.20.7/usb_pxa27x_udc-r3.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/a780-flip.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/a780-kbd.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/a780-leds.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/a780-mci.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/a780-vibrator.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/defconfig-a780 delete mode 100644 packages/linux/linux-ezx-2.6.21/defconfig-e680 delete mode 100644 packages/linux/linux-ezx-2.6.21/e680-kbd.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/e680-leds.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/e680-locksw.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/e680-mci.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-backlight.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-bp.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-core.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-emu.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-kbd.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-mci.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-mtd-map.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-pcap.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-pm.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-serial-bug-workaround.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/ezx-ts.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-fix-init-errorpath.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-fix-makefile.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-fix-tty-driver.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-fix.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-ifdef-ezx-features.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-remove-flipbuffers.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-remove-get_halted_bit.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux-remove-usbh_finished_resume.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux_cli.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/mux_debug.patch create mode 100644 packages/linux/linux-ezx-2.6.21/patches/.mtn2git_empty create mode 100755 packages/linux/linux-ezx-2.6.21/patches/Makefile.OpenEZX create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a1200-mci.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a1200-ts.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-flip.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-kbd.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-leds.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-mci.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-ts.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/a780-vibrator.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/asoc-pxa-ssp.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/defconfig-a1200 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/defconfig-a780 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/defconfig-e2 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/defconfig-e6 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/defconfig-e680 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/dmesg-a780.log create mode 100755 packages/linux/linux-ezx-2.6.21/patches/e680-kbd.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/e680-leds.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/e680-locksw.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/e680-mci.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/e680-ts.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-backlight.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-bp.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-core.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-emu.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-enable-stuart.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-mtd-map.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-pcap.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/ezx-serial-bug-workaround.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-fix-init-errorpath.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-fix-makefile.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-fix-tty-driver.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-fix.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-ifdef-ezx-features.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-linux-2.6.21-fix.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-remove-flipbuffers.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-remove-get_halted_bit.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux-remove-usbh_finished_resume.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux_cli.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/mux_debug.patch create mode 100644 packages/linux/linux-ezx-2.6.21/patches/patch-2.6.21.4 create mode 100755 packages/linux/linux-ezx-2.6.21/patches/pcap-ts.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/pxa-kbd.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/pxa27x-udc-support.2.patch create mode 100755 packages/linux/linux-ezx-2.6.21/patches/series delete mode 100644 packages/linux/linux-ezx-2.6.21/pcap-ts.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/pxa-kbd.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/pxa27x-udc-support.2.patch delete mode 100644 packages/linux/linux-ezx-2.6.21/touchscreen-fix-r0.patch create mode 100644 packages/linux/linux-ezx-2.6.21/update_patches.sh delete mode 100644 packages/linux/linux-ezx-2.6.21/wyrm-ts.diff delete mode 100644 packages/linux/linux-ezx/.mtn2git_empty delete mode 100644 packages/linux/linux-ezx/defconfig-a780 delete mode 100644 packages/linux/linux-ezx/defconfig-a780-laforge delete mode 100644 packages/linux/linux-ezx/defconfig-e680 delete mode 100644 packages/linux/linux-ezx/defconfig-rokr-e2 delete mode 100644 packages/linux/linux-ezx/logo_linux_clut224.ppm delete mode 100644 packages/linux/linux-ezx/pxa-serial-gcc4.diff delete mode 100644 packages/linux/linux-ezx/sa1100-rtc-gcc4.diff delete mode 100644 packages/linux/linux-ezx/wyrm-ts.diff delete mode 100644 packages/linux/linux-ezx_2.6.16.13.bb delete mode 100644 packages/linux/linux-ezx_2.6.19+2.6.20-rc2.bb delete mode 100644 packages/linux/linux-ezx_2.6.20.7.bb (limited to 'packages') diff --git a/packages/asterisk/asterisk14-1.4.5/.mtn2git_empty b/packages/asterisk/asterisk14-1.4.5/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/asterisk/asterisk14-1.4.5/Makefile.patch b/packages/asterisk/asterisk14-1.4.5/Makefile.patch new file mode 100644 index 0000000000..a6d630949e --- /dev/null +++ b/packages/asterisk/asterisk14-1.4.5/Makefile.patch @@ -0,0 +1,20 @@ +--- asterisk-1.4.5/Makefile 2007-05-24 15:05:08.000000000 -0400 ++++ asterisk-1.4.5/Makefile.new 2007-06-17 05:36:44.000000000 -0400 +@@ -115,7 +115,7 @@ else + ASTSBINDIR=$(sbindir) + ASTSPOOLDIR=$(localstatedir)/spool/asterisk + ASTLOGDIR=$(localstatedir)/log/asterisk +- ASTVARRUNDIR=$(localstatedir)/run ++ ASTVARRUNDIR=$(localstatedir)/run/asterisk + ASTMANDIR=$(mandir) + ifeq ($(OSARCH),FreeBSD) + ASTVARLIBDIR=$(prefix)/share/asterisk +@@ -468,7 +468,7 @@ oldmodcheck: + echo " WARNING WARNING WARNING" ;\ + fi + +-install: datafiles bininstall $(SUBDIRS_INSTALL) ++install: datafiles bininstall $(SUBDIRS_INSTALL) samples + @if [ -x /usr/sbin/asterisk-post-install ]; then \ + /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ + fi diff --git a/packages/asterisk/asterisk14-1.4.5/sounds.xml.patch b/packages/asterisk/asterisk14-1.4.5/sounds.xml.patch new file mode 100644 index 0000000000..b549fea132 --- /dev/null +++ b/packages/asterisk/asterisk14-1.4.5/sounds.xml.patch @@ -0,0 +1,18 @@ +--- asterisk-1.4.4/sounds/sounds.xml 2007-05-24 17:00:45.000000000 -0400 ++++ asterisk-1.4.4/sounds/sounds.xml.new 2007-05-25 13:23:41.000000000 -0400 +@@ -6,7 +6,6 @@ + + + +- yes + + + +@@ -39,7 +38,6 @@ + + + +- yes + + + diff --git a/packages/asterisk/asterisk14_1.4.5.bb b/packages/asterisk/asterisk14_1.4.5.bb new file mode 100644 index 0000000000..72659cbac6 --- /dev/null +++ b/packages/asterisk/asterisk14_1.4.5.bb @@ -0,0 +1,121 @@ +DESCRIPTION = "The Asterisk open source software PBX" +HOMEPAGE = "http://www.asterisk.org" +SECTION = "voip" +LICENSE = "GPLv2" +PRIORITY = "optional" +DEPENDS = "sqlite libogg ncurses readline zlib openssl curl" +PR = "r0" + +SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz\ + file://sounds.xml.patch;patch=1\ + file://Makefile.patch;patch=1\ + file://init" + +S = "${WORKDIR}/asterisk-${PV}" + +INITSCRIPT_NAME = "asterisk14" +INITSCRIPT_PARAMS = "defaults 60" + +inherit autotools update-rc.d + +EXTRA_OECONF = "--with-ssl=${STAGING_DIR}/${HOST_SYS} \ + --with-z=${STAGING_DIR}/${HOST_SYS} \ + --with-curl=${STAGING_DIR}/${HOST_SYS} \ + --with-termcap=${STAGING_DIR}/${HOST_SYS} \ + --with-ogg \ + --with-sqlite \ + --without-popt \ + --without-pwlib \ + --without-tds \ + --without-postgres \ + " + +#export NOISY_BUILD=yes + +export ASTCFLAGS = "-fsigned-char -I${STAGING_INCDIR} -DPATH_MAX=4096" +export ASTLDFLAGS="${LDFLAGS}" + +do_configure () { + # Looks like rebuilding configure doesn't work, so we are skipping + # that and are just using the shipped one + gnu-configize + libtoolize --force + oe_runconf +} + +FILES_${PN} += "${libdir}/asterisk/modules/*" + +do_install_append() { + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/asterisk14 +} + +pkg_postinst_prepend() { + grep -q asterisk ${sysconfdir}/group || addgroup --system asterisk + grep -q asterisk ${sysconfdir}/passwd || adduser --system --home ${localstatedir}/run/asterisk --no-create-home --disabled-password --ingroup asterisk -s ${base_bindir}/false asterisk + chown -R asterisk:asterisk ${libdir}/asterisk ${localstatedir}/lib/asterisk ${localstatedir}/spool/asterisk ${localstatedir}/log/asterisk ${localstatedir}/run/asterisk ${sysconfdir}/asterisk +} + + +CONFFILES_${PN} += "${sysconfdir}/asterisk/adsi.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/adtranvofr.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/agents.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/alarmreceiver.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/alsa.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/amd.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/asterisk.adsi" +CONFFILES_${PN} += "${sysconfdir}/asterisk/asterisk.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr_custom.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr_manager.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr_odbc.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr_pgsql.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/cdr_tds.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/codecs.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/dnsmgr.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/dundi.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/enum.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/extconfig.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/extensions.ael" +CONFFILES_${PN} += "${sysconfdir}/asterisk/extensions.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/features.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/festival.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/followme.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/func_odbc.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/gtalk.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/h323.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/http.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/iax.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/iaxprov.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/indications.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/jabber.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/logger.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/manager.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/meetme.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/mgcp.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/misdn.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/modem.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/modules.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/musiconhold.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/muted.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/osp.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/oss.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/phone.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/privacy.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/queues.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/res_odbc.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/res_snmp.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/rpt.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/rtp.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/say.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/sip.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/sip_notify.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/skinny.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/sla.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/smdi.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/telcordia-1.adsi" +CONFFILES_${PN} += "${sysconfdir}/asterisk/udptl.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/users.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/voicemail.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/vpb.conf" +CONFFILES_${PN} += "${sysconfdir}/asterisk/zapata.conf" + diff --git a/packages/asterisk/files/.mtn2git_empty b/packages/asterisk/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/asterisk/files/init b/packages/asterisk/files/init new file mode 100644 index 0000000000..1ece638c22 --- /dev/null +++ b/packages/asterisk/files/init @@ -0,0 +1,77 @@ +#! /bin/sh +# +# This is an init script for openembedded +# Copy it to /etc/init.d/openpbx and type +# > update-rc.d asterisk14 defaults 60 +# +asterisk=/usr/sbin/asterisk +pidfile=/var/run/asterisk/asterisk.pid +asterisk_args="-npqT -U asterisk -G asterisk" + +test -x "$asterisk" || exit 0 + +case "$1" in + start) + echo -n "Starting Asterisk" + start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args + echo "." + ;; + stop) + echo -n "Stopping Asterisk" + $asterisk -rx "stop gracefully" + sleep 4 + if [ -f $pidfile ]; then + start-stop-daemon --stop --quiet --pidfile $pidfile + fi + echo "." + ;; + force-stop) + echo -n "Stopping Asterisk" + $asterisk -rx "stop now" + sleep 2 + if [ -f $pidfile ]; then + start-stop-daemon --stop --quiet --pidfile $pidfile + fi + echo "." + ;; + restart) + echo -n "Restarting Asterisk" + if [ -f $pidfile ]; then + $asterisk -rx "restart gracefully" + sleep 2 + else + start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args + fi + echo "." + ;; + force-restart) + echo -n "Forcibly Restarting Asterisk" + if [ -f $pidfile ]; then + $asterisk -rx "restart now" + sleep 2 + else + start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args + fi + echo "." + ;; + reload) + echo -n "Reloading Asterisk Configuration" + if [ -f $pidfile ]; then + $asterisk -rx "reload" + else + start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args + fi + echo "." + ;; + logger-reload) + if [ -f $pidfile ]; then + $asterisk -rx "logger reload" + fi + ;; + *) + echo "Usage: /etc/init.d/asterisk {start|stop|force-stop|restart|force-restart|reload|logger-reload}" + exit 1 +esac + +exit 0 + diff --git a/packages/linux/ezx-kernels_2.6.bb b/packages/linux/ezx-kernels_2.6.bb deleted file mode 100644 index 77b75d60b0..0000000000 --- a/packages/linux/ezx-kernels_2.6.bb +++ /dev/null @@ -1,3 +0,0 @@ -COMPATIBLE_MACHINE = "a780" -PROVIDES = "virtual/kernel" -DEPENDS = "a780-kernel-2.6 e680-kernel-2.6" diff --git a/packages/linux/linux-ezx-2.6.20.7/.mtn2git_empty b/packages/linux/linux-ezx-2.6.20.7/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/linux/linux-ezx-2.6.20.7/defconfig-a780 b/packages/linux/linux-ezx-2.6.20.7/defconfig-a780 deleted file mode 100644 index a9300a61f5..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/defconfig-a780 +++ /dev/null @@ -1,1249 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.20.7 -# Sun Apr 22 15:03:36 2007 -# -CONFIG_ARM=y -# CONFIG_GENERIC_TIME is not set -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-ezxdev" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=m -CONFIG_IOSCHED_CFQ=m -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set -CONFIG_ARCH_PXA=y -# 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 - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_MACH_TRIZEPS4 is not set -CONFIG_PXA_EZX=y -# CONFIG_PXA_EZX_E680 is not set -CONFIG_PXA_EZX_A780=y -# CONFIG_PXA_EZX_E2 is not set -CONFIG_PXA27x=y -CONFIG_PXA_SSP=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_DCACHE_DISABLE is not set -CONFIG_IWMMXT=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=100 -CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Power management options -# -# CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -# CONFIG_BT_HCIUART_BCSP is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC 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=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -CONFIG_MTD_MAP_BANK_WIDTH_2=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# 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 is not set -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP 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_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_SHARP_SL is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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 - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_NETLINK is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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 -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_TSDEV=y -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_UCB1400 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=8 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_PXA=y -# CONFIG_I2C_PXA_SLAVE is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_BITBANG is not set -CONFIG_SPI_PXA2XX=y - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# -# CONFIG_TIFM_CORE is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -# CONFIG_FB_MBX is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# -# CONFIG_SND_PXA2XX_AC97 is not set - -# -# USB devices -# -# CONFIG_SND_USB_AUDIO is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# HID Devices -# -CONFIG_HID=y - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET_MII is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_USB_DUMMY_HCD=y -CONFIG_USB_GADGET_DUALSPEED=y -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y -# CONFIG_MMC_TIFM_SD is not set - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_SA1100=y -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -# CONFIG_FUSE_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=m -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_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# 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_JFFS2_FS 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_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -# CONFIG_ROOT_NFS is not set -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT 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 -# CONFIG_9P_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=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_PI_LIST=y -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_RWSEMS=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_LL is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_PLIST=y -CONFIG_IOMAP_COPY=y diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-core.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-core.patch deleted file mode 100644 index 3b9877ce83..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-core.patch +++ /dev/null @@ -1,1120 +0,0 @@ -Index: linux-2.6.20.7/arch/arm/boot/compressed/head-xscale.S -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/boot/compressed/head-xscale.S 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/boot/compressed/head-xscale.S 2007-04-21 22:32:53.000000000 -0300 -@@ -53,3 +53,6 @@ - str r1, [r0, #0x18] - #endif - -+#ifdef CONFIG_ARCH_EZX -+ mov r7, #MACH_TYPE_EZX -+#endif -Index: linux-2.6.20.7/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Kconfig 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Kconfig 2007-04-22 01:33:15.000000000 -0300 -@@ -37,6 +37,10 @@ - bool "Keith und Koep Trizeps4 DIMM-Module" - select PXA27x - -+config PXA_EZX -+ bool "Motorola EZX Platform" -+ select PXA_SSP -+ - endchoice - - if PXA_SHARPSL -@@ -71,6 +75,27 @@ - - endif - -+if PXA_EZX -+ -+choice -+ prompt "Select target EZX device" -+ -+config PXA_EZX_E680 -+ bool "Motorola E680 GSM Phone" -+ select PXA27x -+ -+config PXA_EZX_A780 -+ bool "Motorola A780 GSM Phone" -+ select PXA27x -+ -+config PXA_EZX_E2 -+ bool "Motorola E2 GSM Phone" -+ select PXA27x -+ -+endchoice -+ -+endif -+ - endmenu - - config MACH_POODLE -@@ -144,4 +169,5 @@ - tristate - help - Enable support for PXA2xx SSP ports -+ - endif -Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-22 01:33:17.000000000 -0300 -@@ -18,6 +18,7 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o - - # Support for blinky lights - led-y := leds.o -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.c 2007-04-22 01:33:17.000000000 -0300 -@@ -0,0 +1,379 @@ -+/* -+ * linux/arch/arm/mach-ezx/a780.c -+ * -+ * Support for the Motorola Ezx A780 Development Platform. -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "ezx.h" -+#include "generic.h" -+#include -+#include -+ -+ -+extern void usb_send_readurb(void); -+extern int ezx_ssp_set_machinfo(struct ezxssp_machinfo *); -+//FIXME extern void pm_do_poweroff(void); -+ -+/* BP Handshake */ -+#define FIRST_STEP 2 -+#define LAST_STEP 3 -+#define BP_RDY_TIMEOUT 0x000c0000 -+ -+/* check power down condition */ -+inline void check_power_off(void) -+{ -+ if (!(GPIO_is_high(GPIO_BB_WDI2))) { -+#ifdef CONFIG_PM -+//FIXME pm_do_poweroff(); -+#endif -+ } -+} -+ -+/* SSP */ -+struct platform_device ezxssp_device = { -+ .name = "ezx-ssp", -+ .id = -1, -+}; -+ -+struct ezxssp_machinfo ezx_ssp_machinfo = { -+ .port = 1, -+ .cs_pcap = GPIO_SPI_CE, -+ .clk_pcap = 1, -+}; -+ -+ -+/* OHCI Controller */ -+ -+static int ezx_ohci_init(struct device *dev) -+{ -+ /* for A780 support (connected with Neptune) */ -+ pxa_gpio_mode(GPIO30_USB_P3_2); /* GPIO30 - USB_P3_2/ICL_TXENB */ -+ pxa_gpio_mode(GPIO31_USB_P3_6); /* GPIO31 - USB_P3_6/ICL_VPOUT */ -+ pxa_gpio_mode(GPIO90_USB_P3_5); /* GPIO90 - USB_P3_5/ICL_VPIN */ -+ pxa_gpio_mode(GPIO91_USB_P3_1); /* GPIO91 - USB_P3_1/ICL_XRXD */ -+ pxa_gpio_mode(GPIO56_USB_P3_4); /* GPIO56 - USB_P3_4/ICL_VMOUT */ -+ pxa_gpio_mode(GPIO113_USB_P3_3);/* GPIO113 - USB_P3_3/ICL_VMIN */ -+ UP3OCR = 0x00000002; -+ -+ UHCHR = UHCHR & ~(UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); -+ -+ return 0; -+} -+ -+static struct pxaohci_platform_data ezx_ohci_platform_data = { -+ .port_mode = PMM_NPS_MODE, -+ .init = ezx_ohci_init, -+}; -+ -+static int step = FIRST_STEP; -+void handshake(void) -+{ -+ /* step 1: check MCU_INT_SW or BP_RDY is low (now it is checked in apboot) */ -+ if (step == 1) { -+ int timeout = BP_RDY_TIMEOUT; -+ -+ /* config MCU_INT_SW, BP_RDY as input */ -+ GPDR(GPIO_MCU_INT_SW) &= ~GPIO_bit(GPIO_MCU_INT_SW); -+ GPDR(GPIO_BP_RDY) &= ~GPIO_bit(GPIO_BP_RDY); -+ -+ while ( timeout -- ) { -+ if ( (!(GPIO_is_high(GPIO_MCU_INT_SW))) -+ || (!(GPIO_is_high(GPIO_BP_RDY))) ) { -+ step ++; -+ break; -+ } -+ -+ check_power_off(); -+ } -+ } -+ -+ /* step 2: wait BP_RDY is low */ -+ if (step == 2) { -+ if (!(GPIO_is_high(GPIO_BP_RDY))) { -+ -+ /* config MCU_INT_SW as output */ -+ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_OUT); -+ clr_GPIO(GPIO_MCU_INT_SW); -+ -+ step ++; -+ } -+ } -+ -+ /* step 3: wait BP_RDY is high */ -+ if (step == 3) { -+ if (GPIO_is_high(GPIO_BP_RDY)) { -+ step ++; -+ //FIXME delay_bklight(); -+ set_GPIO(GPIO_MCU_INT_SW); -+ } -+ } -+} -+ -+#ifdef CONFIG_APM -+static unsigned long idle_limit = 0; -+int pm_handle_irq(int irq) -+{ -+ -+ //FIXME: extern unsigned long idle_limit; -+ //FIXME: extern int can_idle, can_sleep; -+ static unsigned long tmp_jiffy; /* for temporary store of jiffies */ -+ -+ /* -+ * if idle_limit is zero, never enter idle. -+ * if not OS timer, reset idle timer count -+ */ -+ if (idle_limit == 0) { -+ tmp_jiffy = jiffies; -+ return irq; -+ } -+#if 0 -+ if (irq != IRQ_OST0) { -+ tmp_jiffy = jiffies; -+ can_idle = 0; -+ can_sleep = 0; -+ } else if (jiffies > tmp_jiffy + idle_limit) { -+ -+ /* -+ * I think this is enough to prevent from reentering here -+ * due to jiffies will be stoped -+ */ -+ tmp_jiffy = jiffies; -+ -+ /* if pm idle timer expired, queue event */ -+ apm_queue_event(KRNL_PROC_INACT); -+ can_idle = 1; -+ } -+#endif -+ -+ return irq; -+} -+ -+irqreturn_t bp_wdi_intr(int irq, void *dev_id) -+{ -+//FIXME apm_queue_event(KRNL_BP_WDI); -+ return IRQ_HANDLED; -+} -+ -+static struct irqaction bp_wdi_irq = { -+ .name = "BP wdi", -+ .handler = &bp_wdi_intr, -+}; -+#endif -+ -+int handshake_pass(void) -+{ -+ return (step > LAST_STEP); -+} -+ -+static irqreturn_t bp_rdy_intr(int irq, void *dev_id) -+{ -+ static int usbipc_ready = 0; -+ -+ if (!usbipc_ready) { -+ handshake(); -+ if (handshake_pass()) { -+ disable_irq(IRQ_GPIO(GPIO_BB_WDI2)); -+ -+ /* set bp_rdy handle for usb ipc */ -+ set_irq_type(GPIO_BP_RDY, IRQT_FALLING); -+ usbipc_ready = 1; -+ } -+ } else -+ // FIXME usb_send_readurb(); -+ {} -+ -+ return IRQ_HANDLED; -+} -+ -+static struct irqaction bp_rdy_irq = { -+ .name = "BP rdy", -+ .handler = bp_rdy_intr, -+}; -+ -+static irqreturn_t bp_wdi2_intr(int irq, void *dev_id) -+{ -+#ifdef CONFIG_PM -+//FIXME pm_do_poweroff(); -+#endif -+ return IRQ_HANDLED; -+} -+ -+static struct irqaction bp_wdi2_irq = { -+ .name = "BP wdi2", -+ .handler = bp_wdi2_intr, -+}; -+ -+ -+static struct resource ezx_bp_resources[] = { -+ [0] = { -+ .start = GPIO_BP_RDY, -+ .end = GPIO_BP_RDY, -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = GPIO_BB_WDI2, -+ .end = GPIO_BB_WDI2, -+ .flags = IORESOURCE_IRQ, -+ }, -+#ifdef CONFIG_APM -+ [2] = { -+ .start = GPIO_BB_WDI, -+ .end = GPIO_BB_WDI, -+ .flags = IORESOURCE_IRQ, -+ }, -+#endif -+}; -+ -+static struct platform_device ezx_bp_device = { -+ .name = "ezx-bp", -+ .dev = { -+ //.parent = -+ //.platform_data = -+ }, -+ .id = -1, -+ .num_resources = ARRAY_SIZE(ezx_bp_resources), -+ .resource = ezx_bp_resources, -+}; -+ -+static void __init ezx_init_gpio_irq(void) -+{ -+#ifdef CONFIG_APM -+ set_irq_type(GPIO_BB_WDI, IRQT_FALLING); -+ setup_irq(IRQ_GPIO(GPIO_BB_WDI), &bp_wdi_irq); -+#endif -+ set_irq_type(GPIO_BP_RDY, IRQT_BOTHEDGE); -+ setup_irq(IRQ_GPIO(GPIO_BP_RDY), &bp_rdy_irq); -+ -+ set_irq_type(GPIO_BB_WDI2, IRQT_FALLING); -+ setup_irq(IRQ_GPIO(GPIO_BB_WDI2), &bp_wdi2_irq); -+} -+ -+static void __init a780_init_irq(void) -+{ -+ pxa_init_irq(); -+ -+ /* init ezx specfic gpio irq */ -+ ezx_init_gpio_irq(); -+ -+ check_power_off(); -+ handshake(); -+ if (handshake_pass()) { -+ disable_irq(IRQ_GPIO(GPIO_BP_RDY)); -+ disable_irq(IRQ_GPIO(GPIO_BB_WDI2)); -+ } -+} -+ -+static struct platform_device *devices[] __initdata = { -+ &ezxssp_device, -+ &ezx_bp_device, -+}; -+ -+static void __init a780_init(void) -+{ -+//FIXME CKEN = CKEN9_OSTIMER | CKEN22_MEMC | CKEN5_STUART; -+ -+ ezx_ssp_set_machinfo(&ezx_ssp_machinfo); -+ -+ /* set BB_RESET PIN out put high */ -+ pxa_gpio_mode(GPIO_BB_RESET|GPIO_OUT); -+ set_GPIO(GPIO_BB_RESET); -+ -+ pxa_gpio_mode(GPIO_ICL_FFRXD_MD); -+ pxa_gpio_mode(GPIO_ICL_FFTXD_MD); -+ pxa_gpio_mode(GPIO_ICL_FFCTS_MD); -+ pxa_gpio_mode(GPIO_ICL_FFRTS_MD); -+ -+ pxa_gpio_mode(GPIO42_BTRXD_MD); -+ pxa_gpio_mode(GPIO43_BTTXD_MD); -+ pxa_gpio_mode(GPIO44_BTCTS_MD); -+ pxa_gpio_mode(GPIO45_BTRTS_MD); -+ -+ /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ -+ pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); -+ clr_GPIO(GPIO_EMU_MUX1); -+ pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT); -+ clr_GPIO(GPIO_EMU_MUX2); -+ -+#if defined(CONFIG_PXA_EZX_E680) -+ pxa_gpio_mode(GPIO46_STRXD_MD); -+ pxa_gpio_mode(GPIO47_STTXD_MD); -+ -+ /* setup sleep mode values */ -+ PWER = 0xc000f803; // disable usb 0xdc00f803; -+ PFER = 0x0000f803; -+ PRER = 0x00001802; -+ // keypad wakeup (PKWR,PGSR3) should be in keypad.c -+ PGSR0 = 0x00000010; -+ PGSR1 = 0x02800000; -+ PGSR2 = 0x00040000; -+ PGSR3 = 0x00000000; -+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; -+ PSLR = 0x05800f00; -+ -+#elif defined(CONFIG_PXA_EZX_A780) -+ -+ /* Standard UART */ -+ pxa_gpio_mode(GPIO46_STRXD_MD); -+ pxa_gpio_mode(GPIO47_STTXD_MD); -+ -+ /* setup sleep mode values */ -+ PWER = 0xc0007803; // disable usb, GPIO15 NC -+ PFER = 0x00007803; -+ PRER = 0x00001802; -+ // keypad wakeup (PKWR,PGSR3) should be in keypad.c -+ PGSR0 = 0x00000010; -+ PGSR1 = 0x02800000; -+ PGSR2 = 0x00040000; -+ PGSR3 = 0x00000008; -+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; -+ PSLR = 0x05800f00; -+ -+#endif -+ pxa_set_ohci_info(&ezx_ohci_platform_data); -+ -+ platform_add_devices(devices, ARRAY_SIZE(devices)); -+ -+} -+ -+MACHINE_START(EZX, "Motorola Ezx Platform") -+ /* Maintainer: Harald Welte */ -+ .phys_io = 0x40000000, -+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, -+ .boot_params = 0xa0000100, -+ .map_io = pxa_map_io, -+ .init_irq = a780_init_irq, -+ .timer = &pxa_timer, -+ .init_machine = a780_init, -+MACHINE_END -Index: linux-2.6.20.7/include/asm-arm/arch-pxa/ezx.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/include/asm-arm/arch-pxa/ezx.h 2007-04-21 22:32:53.000000000 -0300 -@@ -0,0 +1,225 @@ -+/* -+ * linux/include/asm-arm/arch-pxa/ezx.h -+ * -+ * Specific macro defines for Motorola Ezx Development Platform -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+/* support E680 p3 and ealier PCB */ -+//#define E680_P3_AND_EARLY -+ -+#define GPIO_is_high(x) (GPLR(x) & GPIO_bit(x)) -+#define set_GPIO(x) (GPSR(x) = GPIO_bit(x)) -+#define clr_GPIO(x) (GPCR(x) = GPIO_bit(x)) -+ -+/* -+ * Flags in memory for sleep use -+ */ -+#define FLAG_ADDR PHYS_OFFSET -+#define RESUME_ADDR (PHYS_OFFSET + 4) -+#define BPSIG_ADDR (PHYS_OFFSET + 8) -+ -+#define USER_OFF_FLAG 0x5a5a5a5a -+#define SLEEP_FLAG 0x6b6b6b6b -+#define OFF_FLAG 0x7c7c7c7c -+#define REFLASH_FLAG 0x0C1D2E3F -+#define PASS_THRU_FLAG 0x12345678 -+ -+#define WDI_FLAG 0xbb00dead -+#define NO_FLAG 0xaa00dead -+ -+/* -+ * GPIO control pin, have to change when hardware lock down -+ */ -+ -+#ifdef E680_P3_AND_EARLY -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 57 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 115 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 23 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ -+#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#elif defined(A780_P1_AND_EARLY) -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 82 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ -+#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#else -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 82 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 99 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+//#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 28 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* AP wake up bluetooth module */ -+#define GPIO_BT_RESET 48 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#endif -+/* -+ * ezx platform, wake up source edge detect bit -+ */ -+#define PEDR_INT_SEC 1 -+ -+#define GPIO_FLIP_PIN 12 -+/*E680 screen lock button*/ -+ -+#define GPIO_LOCK_SCREEN_PIN GPIO_FLIP_PIN -+ -+/* MMC interface */ -+#define GPIO_MMC_DETECT 11 -+#define GPIO_MMC_CLK 32 -+#define GPIO_MMC_DATA0 92 -+#define GPIO_MMC_WP 107 -+#define GPIO_MMC_DATA1 109 -+#define GPIO_MMC_DATA2 110 -+#define GPIO_MMC_DATA3 111 -+#define GPIO_MMC_CMD 112 -+ -+/* interface function */ -+#define GPIO_MMC_CLK_MD (GPIO_MMC_CLK | GPIO_ALT_FN_2_OUT) -+#define GPIO_MMC_DATA0_MD (GPIO_MMC_DATA0 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA1_MD (GPIO_MMC_DATA1 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA2_MD (GPIO_MMC_DATA2 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA3_MD (GPIO_MMC_DATA3 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+ -+#define GPIO_MMC_CMD_MD (GPIO_MMC_CMD | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+ -+/* EMU GPIO 119 ---MUX2 120 --- MUX1 */ -+#define GPIO_EMU_MUX1 120 -+#define GPIO_EMU_MUX2 119 -+#define GPIO_SNP_INT_CTL 86 -+#define GPIO_SNP_INT_IN 87 -+ -+ -+/* audio related pins */ -+#define AP_13MHZ_OUTPUT_PIN 9 -+ -+#ifdef CONFIG_ARCH_EZX_E680 -+#define GPIO_VA_SEL_BUL 79 -+#define GPIO_FLT_SEL_BUL 80 /* out filter select pin */ -+#define GPIO_MIDI_RESET 78 /* GPIO used by MIDI chipset */ -+#define GPIO_MIDI_CS 33 -+#define GPIO_MIDI_IRQ 15 -+#define GPIO_MIDI_NPWE 49 -+#define GPIO_MIDI_RDY 18 -+#endif -+ -+#ifdef CONFIG_ARCH_EZX_A780 -+#define GPIO_HW_ATTENUATE_A780 96 /* hw noise attenuation be used or bypassed, for receiver or louderspeaker mode */ -+#endif -+ -+ -+/* bp status pin */ -+#define GPIO_BP_STATE 41 -+ -+/* define usb related pin */ -+#define GPIO34_TXENB 34 -+#define GPIO35_XRXD 35 -+#define GPIO36_VMOUT 36 -+#define GPIO39_VPOUT 39 -+#define GPIO40_VPIN 40 -+#define GPIO53_VMIN 53 -+ -+/* USB client 6 pin defination */ -+#define GPIO34_TXENB_MD (GPIO34_TXENB | GPIO_ALT_FN_1_OUT) -+#define GPIO35_XRXD_MD (GPIO35_XRXD | GPIO_ALT_FN_2_IN ) -+#define GPIO36_VMOUT_MD (GPIO36_VMOUT | GPIO_ALT_FN_1_OUT) -+#define GPIO39_VPOUT_MD (GPIO39_VPOUT | GPIO_ALT_FN_1_OUT) -+#define GPIO40_VPIN_MD (GPIO40_VPIN | GPIO_ALT_FN_3_IN ) -+#define GPIO53_VMIN_MD (GPIO53_VMIN | GPIO_ALT_FN_2_IN ) -+ -+#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+ -Index: linux-2.6.20.7/include/asm-arm/arch-pxa/pxa-regs.h -=================================================================== ---- linux-2.6.20.7.orig/include/asm/arch/pxa-regs.h 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/include/asm-arm/arch-pxa/pxa-regs.h 2007-04-21 22:32:53.000000000 -0300 -@@ -854,6 +854,8 @@ - #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ - #define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ - -+#define UP3OCR __REG(0x40600024) /* USB Port 3 Output Control register */ -+ - #define UDCCSN(x) __REG2(0x40600100, (x) << 2) - #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ - #define UDCCSR0_SA (1 << 7) /* Setup Active */ -@@ -1257,6 +1259,7 @@ - #define GPIO33_nCS_5 33 /* chip select 5 */ - #define GPIO34_FFRXD 34 /* FFUART receive */ - #define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */ -+#define GPIO34_USB_P2_2 34 /* USB Port2 Pin 2 */ - #define GPIO35_FFCTS 35 /* FFUART Clear to send */ - #define GPIO36_FFDCD 36 /* FFUART Data carrier detect */ - #define GPIO37_FFDSR 37 /* FFUART data set ready */ -@@ -1370,6 +1373,7 @@ - #define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN) - #define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN) - #define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN) -+#define GPIO22_SCLK2_MD (22 | GPIO_ALT_FN_3_IN) - #define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT) - #define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT) - #define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT) -@@ -1380,23 +1384,33 @@ - #define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT) - #define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN) - #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN) -+#define GPIO29_SCLK_MD (29 | GPIO_ALT_FN_3_IN) - #define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT) - #define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT) -+#define GPIO30_USB_P3_2 (30 | GPIO_ALT_FN_3_OUT) - #define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT) - #define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT) -+#define GPIO31_USB_P3_6 (31 | GPIO_ALT_FN_3_OUT) - #define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN) - #define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT) - #define GPIO32_MMCCLK_MD ( 32 | GPIO_ALT_FN_2_OUT) - #define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT) - #define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) - #define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT) -+#define GPIO34_USB_P2_2_MD (34 | GPIO_ALT_FN_1_OUT) - #define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO35_USB_P2_1_MD (35 | GPIO_ALT_FN_2_IN) - #define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN) -+#define GPIO36_USB_P2_4_MD (36 | GPIO_ALT_FN_1_OUT) - #define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN) -+#define GPIO37_SFRM2_MD (37 | GPIO_ALT_FN_2_IN) - #define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN) -+#define GPIO38_STXD2_MD (38 | GPIO_ALT_FN_2_OUT) - #define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT) - #define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO39_USB_P2_6_MD (39 | GPIO_ALT_FN_1_OUT) - #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) -+#define GPIO40_USB_P2_5_MD (40 | GPIO_ALT_FN_3_IN) - #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) - #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) - #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) -@@ -1421,13 +1435,17 @@ - #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) - #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) - #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) -+#define GPIO52_SCLK3_MD (52 | GPIO_ALT_FN_2_OUT) - #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) - #define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT) -+#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO53_USB_P2_3_MD (53 | GPIO_ALT_FN_2_IN) - #define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT) - #define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT) - #define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT) - #define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT) - #define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN) -+#define GPIO56_USB_P3_4 (56 | GPIO_ALT_FN_1_OUT) - #define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN) - #define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT) - #define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT) -@@ -1463,13 +1481,19 @@ - #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT) - #define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT) - #define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN) -+#define GPIO81_STXD3_MD (81 | GPIO_ALT_FN_1_OUT) - #define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT) - #define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN) - #define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT) - #define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN) -+#define GPIO83_SFRM3_MD (83 | GPIO_ALT_FN_1_IN) - #define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT) - #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) - #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) -+#define GPIO88_SRXD2_MD (88 | GPIO_ALT_FN_2_IN) -+#define GPIO89_SRXD3_MD (89 | GPIO_ALT_FN_1_IN) -+#define GPIO90_USB_P3_5 (90 | GPIO_ALT_FN_2_IN) -+#define GPIO91_USB_P3_1 (91 | GPIO_ALT_FN_2_IN) - #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) - #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) - #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) -@@ -1481,6 +1505,7 @@ - #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) - #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) - #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) -+#define GPIO113_USB_P3_3 (113 | GPIO_ALT_FN_3_IN) - #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT) - #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) - -@@ -1496,6 +1521,7 @@ - #define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */ - #define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */ - #define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */ -+#define PGSR(x) (__REG(0x40F00020 + ((unsigned long)(x)/32*4))) - #define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */ - #define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */ - #define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */ -Index: linux-2.6.20.7/arch/arm/boot/compressed/head.S -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/boot/compressed/head.S 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/boot/compressed/head.S 2007-04-21 22:32:53.000000000 -0300 -@@ -117,6 +117,9 @@ - mov r0, r0 - .endr - -+ mov r1, #0x300 @ mach_id 0x363 is official EZX -+ orr r1, r1, #0x63 @ bootloader JUMP doesn't set r1 -+ - b 1f - .word 0x016f2818 @ Magic numbers to help the loader - .word start @ absolute load/run zImage address -Index: linux-2.6.20.7/include/asm-arm/arch-pxa/uncompress.h -=================================================================== ---- linux-2.6.20.7.orig/include/asm-arm/arch-pxa/uncompress.h 2007-04-21 22:31:54.000000000 -0300 -+++ linux-2.6.20.7/include/asm-arm/arch-pxa/uncompress.h 2007-04-21 22:32:53.000000000 -0300 -@@ -14,14 +14,14 @@ - #define STUART ((volatile unsigned long *)0x40700000) - #define HWUART ((volatile unsigned long *)0x41600000) - --#define UART FFUART -+#define UART STUART - - - static inline void putc(char c) - { -- while (!(UART[5] & 0x20)) -+/* while (!(UART[5] & 0x40)) - barrier(); -- UART[0] = c; -+ UART[0] = c;*/ - } - - /* -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx_ssp.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx_ssp.c 2007-04-22 01:36:48.000000000 -0300 -@@ -0,0 +1,130 @@ -+/* -+ * SSP control code for Motorola EZX phones -+ * -+ * Copyright (c) 2007 Daniel Ribeiro -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "ezx.h" -+ -+static DEFINE_SPINLOCK(ezx_ssp_lock); -+static struct ssp_dev ezx_ssp_dev; -+static struct ssp_state ezx_ssp_state; -+static struct ezxssp_machinfo *ssp_machinfo; -+ -+/* PCAP */ -+unsigned long ezx_ssp_pcap_putget(ulong data) -+{ -+ unsigned long flag; -+ u32 ret = 0; -+ -+ spin_lock_irqsave(&ezx_ssp_lock, flag); -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPCR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ -+ ssp_write_word(&ezx_ssp_dev,data); -+ ssp_read_word(&ezx_ssp_dev, &ret); -+ -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ spin_unlock_irqrestore(&ezx_ssp_lock, flag); -+ -+ return ret; -+} -+EXPORT_SYMBOL(ezx_ssp_pcap_putget); -+ -+/* ASSP */ -+ -+/* NSSP */ -+ -+void __init ezx_ssp_set_machinfo(struct ezxssp_machinfo *machinfo) -+{ -+ ssp_machinfo = machinfo; -+} -+ -+static int __init ezx_ssp_probe(struct platform_device *dev) -+{ -+ int ret; -+ /* PCAP init */ -+ pxa_gpio_mode(29|GPIO_ALT_FN_3_OUT); -+ pxa_gpio_mode(GPIO24_SFRM_MD); -+ pxa_gpio_mode(GPIO25_STXD_MD); -+ pxa_gpio_mode(GPIO26_SRXD_MD); -+ -+ /* Chip Select - Disable All */ -+ if (ssp_machinfo->cs_pcap >= 0) -+ pxa_gpio_mode(ssp_machinfo->cs_pcap | GPIO_OUT | GPIO_DFLT_HIGH); -+ -+ ret = ssp_init(&ezx_ssp_dev, ssp_machinfo->port, 0); -+ -+ if (ret) -+ printk(KERN_ERR "Unable to register SSP handler!\n"); -+ else { -+ ssp_disable(&ezx_ssp_dev); -+ ssp_config(&ezx_ssp_dev, -+ (SSCR0_Motorola | SSCR0_DataSize(16) | SSCR0_EDSS), -+ (SSCR1_TxTresh(1) | SSCR1_RxTresh(1)), -+ 0, SSCR0_SerClkDiv(ssp_machinfo->clk_pcap)); -+ ssp_enable(&ezx_ssp_dev); -+ } -+ -+ return ret; -+} -+ -+static int ezx_ssp_remove(struct platform_device *dev) -+{ -+ ssp_exit(&ezx_ssp_dev); -+ return 0; -+} -+ -+static int ezx_ssp_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ ssp_flush(&ezx_ssp_dev); -+ ssp_save_state(&ezx_ssp_dev,&ezx_ssp_state); -+ -+ return 0; -+} -+ -+static int ezx_ssp_resume(struct platform_device *dev) -+{ -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ ssp_restore_state(&ezx_ssp_dev,&ezx_ssp_state); -+ ssp_enable(&ezx_ssp_dev); -+ -+ return 0; -+} -+ -+static struct platform_driver ezxssp_driver = { -+ .probe = ezx_ssp_probe, -+ .remove = ezx_ssp_remove, -+ .suspend = ezx_ssp_suspend, -+ .resume = ezx_ssp_resume, -+ .driver = { -+ .name = "ezx-ssp", -+ }, -+}; -+ -+int __init ezx_ssp_init(void) -+{ -+ return platform_driver_register(&ezxssp_driver); -+} -+ -+arch_initcall(ezx_ssp_init); -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.h 2007-04-22 01:38:55.000000000 -0300 -@@ -0,0 +1,9 @@ -+#include -+ -+/* SSP */ -+struct ezxssp_machinfo { -+ int port; -+ int cs_pcap; -+ int clk_pcap; -+}; -+ -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx_lcd.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx_lcd.c 2007-04-21 22:32:53.000000000 -0300 -@@ -0,0 +1,112 @@ -+/* -+ * linux/arch/arm/mach-ezx/a780.c -+ * -+ * Support for the Motorola Ezx A780 Development Platform. -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+/* -+ * EZX PXA Framebuffer -+ */ -+ -+static void pxafb_lcd_power(int on, struct fb_var_screeninfo *var) -+{ -+ if (on) { -+// mdelay(1); -+ GPSR3 = 0x00100000; -+ mdelay(10); -+ GPCR3 = 0x00100000; -+ GPDR3 |= 0x00100000; -+ } else { -+ GPSR3 = 0x00100000; -+ PGSR3 |= 0x00100000; -+ mdelay(41); -+ LCCR0 &= ~LCCR0_LDM; /* disable lcd disable done interrupt */ -+ LCCR0 |= LCCR0_DIS; /* normal disable lcd */ -+ mdelay(18); -+ } -+} -+ -+#ifdef CONFIG_PXA_E2 -+static void sumatra_backlight_power(int on) -+{ -+ if (on) { -+ pxa_gpio_mode(GPIO16_PWM0_MD); -+ pxa_set_cken(CKEN0_PWM0, 1); -+ PWM_CTRL0 = 0; -+ PWM_PWDUTY0 = 0x3ff; -+ PWM_PERVAL0 = 0x3ff; -+ } else { -+ PWM_CTRL0 = 0; -+ PWM_PWDUTY0 = 0x0; -+ PWM_PERVAL0 = 0x3FF; -+ pxa_set_cken(CKEN0_PWM0, 0); -+ } -+} -+ -+static struct pxafb_mode_info mode_ezx = { -+ .pixclock = 192308, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 8, -+ .hsync_len = 10, -+ .left_margin = 20, -+ .right_margin = 10, -+ .vsync_len = 2, -+ .upper_margin = 3, -+ .lower_margin = 2, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info ezx_fb_info __initdata = { -+ .modes = &mode_ezx, -+ .num_modes = 1, -+ .lccr0 = 0x022008B8, -+ .lccr3 = 0xC130FF13, -+ .pxafb_backlight_power = sumatra_backlight_power, -+ .pxafb_lcd_power = &pxafb_lcd_power, -+}; -+ -+#else -+static struct pxafb_mode_info mode_ezx = { -+ .pixclock = 150000, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 16, -+ .hsync_len = 10, -+ .left_margin = 20, -+ .right_margin = 10, -+ .vsync_len = 2, -+ .upper_margin = 3, -+ .lower_margin = 2, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info ezx_fb_info __initdata = { -+ .modes = &mode_ezx, -+ .num_modes = 1, -+ .lccr0 = 0x002008F8, -+ .lccr3 = 0x0430FF09, -+ .pxafb_lcd_power= &pxafb_lcd_power, -+}; -+#endif -+ -+int __init __ezx_lcd_init (void) -+{ -+ set_pxa_fb_info(&ezx_fb_info); -+ return 0; -+} -+ -+arch_initcall(__ezx_lcd_init); -Index: linux-2.6.20.7/arch/arm/mm/init.c -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mm/init.c 2007-04-21 22:32:57.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mm/init.c 2007-04-21 22:44:03.000000000 -0300 -@@ -241,6 +241,10 @@ - */ - reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, - boot_pages << PAGE_SHIFT); -+#ifdef CONFIG_ARCH_EZX -+ /* reserve the first page memory for exiting sleep and user off */ -+ reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE); -+#endif - - #ifdef CONFIG_BLK_DEV_INITRD - /* diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-emu.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-emu.patch deleted file mode 100644 index de9de60461..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-emu.patch +++ /dev/null @@ -1,332 +0,0 @@ -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-emu.c 2007-04-21 12:33:22.000000000 -0300 -@@ -0,0 +1,215 @@ -+/* -+ * EMU Driver for Motorola EZX phones -+ * -+ * Copyright (c) 2007 Daniel Ribeiro -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static struct pxa2xx_udc_mach_info ezx_udc_info; -+extern int ezx_pcap_bit_set(u_int32_t, u_int8_t); -+extern int ezx_pcap_read_bit(u_int32_t); -+ -+void emu_switch_to_usb(void) -+{ -+ pxa_gpio_mode(GPIO34_USB_P2_2_MD); -+ pxa_gpio_mode(GPIO35_USB_P2_1_MD); -+ pxa_gpio_mode(GPIO36_USB_P2_4_MD); -+ pxa_gpio_mode(GPIO39_USB_P2_6_MD); -+ pxa_gpio_mode(GPIO40_USB_P2_5_MD); -+ pxa_gpio_mode(GPIO53_USB_P2_3_MD); -+ UP2OCR = 0x02000000; -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 1); -+ clr_GPIO(GPIO_EMU_MUX1); -+ clr_GPIO(GPIO_EMU_MUX2); -+} -+EXPORT_SYMBOL(emu_switch_to_usb); -+ -+void emu_switch_to_uart(void) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN,0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR, 1); -+ set_GPIO(GPIO39_FFTXD); -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO39_FFTXD_MD); -+ pxa_gpio_mode(GPIO53_FFRXD_MD); -+ CKEN |= CKEN6_FFUART; -+ clr_GPIO(GPIO_EMU_MUX1); -+ clr_GPIO(GPIO_EMU_MUX2); -+ -+} -+EXPORT_SYMBOL(emu_switch_to_uart); -+ -+void emu_switch_to_audio(int stereo) -+{ -+ clr_GPIO(GPIO39_VPOUT); -+ if (stereo) { -+ pxa_gpio_mode(GPIO34_USB_P2_2 | GPIO_IN); -+ clr_GPIO(GPIO39_VPOUT); -+ } else { -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ } -+ -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); -+ set_GPIO(GPIO_EMU_MUX1); -+ if (stereo) -+ set_GPIO(GPIO_EMU_MUX2); -+ else -+ clr_GPIO(GPIO_EMU_MUX2); -+} -+ -+void emu_switch_to_nothing(void) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); -+} -+ -+ -+static irqreturn_t emu_irq(int irq, void *data) -+{ -+ printk("emu_irq(%u) entered: ", irq); -+ -+ switch (irq) { -+ case EZX_IRQ_USB4V: -+ printk("usb 4v\n"); -+ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V)) -+#if defined CONFIG_PXA_EZX_EMU_USB -+ emu_switch_to_usb(); -+#elif defined CONFIG_PXA_EZX_EMU_UART -+ emu_switch_to_uart(); -+#else -+ emu_switch_to_nothing(); -+#endif -+ else -+ emu_switch_to_nothing(); -+ break; -+ case EZX_IRQ_USB1V: -+ printk("usb 1v\n"); -+ break; -+ default: -+ printk("unknown\n"); -+ break; -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+static int __init ezx_emu_probe(struct platform_device *dev) -+{ -+ printk("ezx_emu_probe entered!\n"); -+ pxa_gpio_mode(GPIO_SNP_INT_IN | GPIO_IN); -+ pxa_gpio_mode(GPIO_EMU_MUX1 | GPIO_OUT); -+ pxa_gpio_mode(GPIO_EMU_MUX2 | GPIO_OUT); -+ -+ request_irq(EZX_IRQ_USB4V, &emu_irq, SA_INTERRUPT, "usb 4v", NULL); -+ request_irq(EZX_IRQ_USB1V, &emu_irq, SA_INTERRUPT, "usb 1v", NULL); -+ -+ pxa_set_udc_info(&ezx_udc_info); -+ -+#if defined CONFIG_PXA_EZX_EMU_USB -+ emu_switch_to_usb(); -+#elif defined CONFIG_PXA_EZX_EMU_UART -+ emu_switch_to_uart(); -+#else -+ emu_switch_to_nothing(); -+#endif -+ -+ return 0; -+} -+ -+static int ezx_emu_remove(struct platform_device *dev) -+{ -+ free_irq(EZX_IRQ_USB4V, NULL); -+ free_irq(EZX_IRQ_USB1V, NULL); -+ -+ return 0; -+} -+ -+/* USB Device Controller */ -+static int udc_connected_status; -+static void ezx_udc_command(int cmd) -+{ -+ switch (cmd) { -+ case PXA2XX_UDC_CMD_DISCONNECT: -+ printk(KERN_NOTICE "USB cmd disconnect\n"); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,0); -+ udc_connected_status = 0; -+ break; -+ case PXA2XX_UDC_CMD_CONNECT: -+ printk(KERN_NOTICE "USB cmd connect\n"); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,1); -+ udc_connected_status = 1; -+ break; -+ } -+} -+ -+static int ezx_udc_is_connected(void) -+{ -+ return udc_connected_status; -+} -+ -+static struct pxa2xx_udc_mach_info ezx_udc_info __initdata = { -+ .udc_is_connected = ezx_udc_is_connected, -+ .udc_command = ezx_udc_command, -+}; -+ -+static struct platform_driver ezxemu_driver = { -+ .probe = ezx_emu_probe, -+ .remove = ezx_emu_remove, -+ //.suspend = ezx_emu_suspend, -+ //.resume = ezx_emu_resume, -+ .driver = { -+ .name = "ezx-emu", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+int __init ezx_emu_init(void) -+{ -+ return platform_driver_register(&ezxemu_driver); -+} -+ -+void ezx_emu_fini(void) -+{ -+ return platform_driver_unregister(&ezxemu_driver); -+} -+ -+module_init(ezx_emu_init); -+module_exit(ezx_emu_fini); -+ -+MODULE_DESCRIPTION("Motorola Enchanced Mini Usb driver"); -+MODULE_AUTHOR("Daniel Ribeiro "); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.20.7/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Kconfig 2007-04-21 12:32:50.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Kconfig 2007-04-21 12:32:54.000000000 -0300 -@@ -94,6 +94,27 @@ - - endchoice - -+config PXA_EZX_EMU -+ bool "Motorola Enchanced Mini Usb" -+ -+if PXA_EZX_EMU -+ -+choice -+ prompt "Select default EMU mode" -+ -+config PXA_EZX_EMU_USB -+ bool "USB" -+ -+config PXA_EZX_EMU_UART -+ bool "UART" -+ -+config PXA_EZX_EMU_NOTHING -+ bool "nothing" -+ -+endchoice -+ -+endif -+ - endif - - endmenu -Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 12:32:50.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-21 12:32:54.000000000 -0300 -@@ -19,6 +19,7 @@ - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o - obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o -+obj-$(CONFIG_PXA_EZX_EMU) += ezx-emu.o - - # Support for blinky lights - led-y := leds.o -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/ezx.c 2007-04-21 12:32:50.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.c 2007-04-21 12:32:54.000000000 -0300 -@@ -36,6 +36,7 @@ - #include - #include - -+ - #include "ezx.h" - #include "generic.h" - #include -@@ -92,6 +93,30 @@ - .resource = ezxpcap_resources, - }; - -+/* EMU */ -+static struct resource ezxemu_resources[] = { -+ [0] = { -+ .start = EZX_IRQ_USB4V, -+ .end = EZX_IRQ_USB4V, -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = EZX_IRQ_USB1V, -+ .end = EZX_IRQ_USB1V, -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+struct platform_device ezxemu_device = { -+ .name = "ezx-emu", -+ .id = -1, -+// .dev = { -+// .parent = &ezxpcap_device.dev, -+// }, -+ .num_resources = ARRAY_SIZE(ezxemu_resources), -+ .resource = ezxemu_resources, -+}; -+ - /* OHCI Controller */ - - static int ezx_ohci_init(struct device *dev) -@@ -317,6 +342,7 @@ - &ezxssp_device, - &ezxpcap_device, - &ezxbp_device, -+ &ezxemu_device, - }; - - static void __init a780_init(void) -@@ -383,7 +409,15 @@ - pxa_set_ohci_info(&ezx_ohci_platform_data); - - platform_add_devices(devices, ARRAY_SIZE(devices)); -- -+/* -+#if defined CONFIG_PXA_EZX_EMU_USB -+ emu_switch_to_usb(); -+#elif defined CONFIG_PXA_EZX_EMU_UART -+ emu_switch_to_uart(); -+#else -+ emu_switch_to_nothing(); -+#endif -+*/ - } - - MACHINE_START(EZX, "Motorola Ezx Platform") diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-fix-usb_pxa27x_udc-r3.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-fix-usb_pxa27x_udc-r3.patch deleted file mode 100644 index c3cbf25a09..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-fix-usb_pxa27x_udc-r3.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/pxa27x_udc.c 2007-04-21 12:30:51.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.c 2007-04-21 12:32:21.000000000 -0300 -@@ -1615,8 +1615,9 @@ - - DMSG("Connecting\n"); - /* RPFIXME */ -- UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; -- //dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); -+ //UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; -+ UP2OCR = 0x02000000; // temporary solution for ezx. -+ dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); - } - - diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-mci.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-mci.patch deleted file mode 100644 index d16693e3e4..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-mci.patch +++ /dev/null @@ -1,177 +0,0 @@ -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-mci.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-mci.c 2007-04-20 01:10:13.000000000 -0300 -@@ -0,0 +1,159 @@ -+/* -+ * linux/arch/arm/mach-ezx/a780.c -+ * -+ * Support for the Motorola Ezx A780 Development Platform. -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+extern int ezx_pcap_mmcsd_power(int); -+extern void ezx_pcap_mmcsd_voltage(u_int32_t); -+ -+static struct pxamci_platform_data ezx_mci_platform_data; -+ -+static int ezx_mci_init(struct device *dev, -+ irqreturn_t (*ezx_detect_int)(int, void *), -+ void *data) -+{ -+ int err; -+ printk("%s entered\n", __FUNCTION__); -+ -+ /* Setup GPIO for PXA27x MMC/SD controller */ -+ pxa_gpio_mode(GPIO32_MMCCLK_MD); -+ pxa_gpio_mode(GPIO112_MMCCMD_MD); -+ pxa_gpio_mode(GPIO92_MMCDAT0_MD); -+ pxa_gpio_mode(GPIO109_MMCDAT1_MD); -+ pxa_gpio_mode(GPIO110_MMCDAT2_MD); -+ pxa_gpio_mode(GPIO111_MMCDAT3_MD); -+ -+ ezx_pcap_mmcsd_power(1); -+ -+ ezx_mci_platform_data.detect_delay = msecs_to_jiffies(250); -+ -+ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, -+ "MMC card detect", data); -+ if (err) { -+ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " -+ "MMC card detect IRQ\n"); -+ return -1; -+ } -+ -+ set_irq_type(0x0b, IRQT_BOTHEDGE); -+ -+ return 0; -+} -+ -+static int ezx_mci_get_ro(struct device *dev) -+{ -+ printk("%s entered\n", __FUNCTION__); -+#if defined(CONFIG_PXA_EZX_E680) -+ /* this is only e680, i guess */ -+ // return GPIO_is_high(96+4); -+ return (GPLR3 & 0x800); -+#else -+ return 0; -+#endif -+} -+ -+#if defined(CONFIG_PXA_EZX_A780) -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 5, -+ [MMC_VDD_170] = 5, -+ [MMC_VDD_180] = 6, -+ [MMC_VDD_190] = 6, -+ [MMC_VDD_200] = 7, -+ [MMC_VDD_210] = 7, -+ [MMC_VDD_220] = 8, -+ [MMC_VDD_230] = 8, -+ [MMC_VDD_240] = 9, -+ [MMC_VDD_250] = 9, -+ [MMC_VDD_260] = 10, -+ [MMC_VDD_270] = 10, -+ [MMC_VDD_280] = 11, -+ [MMC_VDD_290] = 11, -+ [MMC_VDD_300] = 12, -+ [MMC_VDD_310] = 12, -+ [MMC_VDD_320] = 13, -+ [MMC_VDD_330] = 13, -+ [MMC_VDD_340] = 14, -+ [MMC_VDD_350] = 14, -+ [MMC_VDD_360] = 15, -+}; -+#elif defined(CONFIG_PXA_EZX_E680) -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 3, -+ [MMC_VDD_170] = 3, -+ [MMC_VDD_180] = 3, -+ [MMC_VDD_190] = 3, -+ [MMC_VDD_200] = 3, -+ [MMC_VDD_210] = 3, -+ [MMC_VDD_220] = 3, -+ [MMC_VDD_230] = 3, -+ [MMC_VDD_240] = 3, -+ [MMC_VDD_250] = 3, -+ [MMC_VDD_260] = 3, -+ [MMC_VDD_270] = 3, -+ [MMC_VDD_280] = 3, -+ [MMC_VDD_290] = 3, -+ [MMC_VDD_300] = 3, -+ [MMC_VDD_310] = 3, -+ [MMC_VDD_320] = 3, -+ [MMC_VDD_330] = 3, -+ [MMC_VDD_340] = 3, -+ [MMC_VDD_350] = 3, -+ [MMC_VDD_360] = 3, -+}; -+#endif -+ -+static void ezx_mci_setpower(struct device *dev, unsigned int vdd) -+{ -+ printk("%s(vdd=%u) entered\n", __FUNCTION__, vdd); -+ if (vdd <= MMC_VDD_360) -+ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); -+ -+ ezx_pcap_mmcsd_power(1); -+} -+ -+static void ezx_mci_exit(struct device *dev, void *data) -+{ -+ printk("%s entered\n", __FUNCTION__); -+ ezx_pcap_mmcsd_power(0); -+ free_irq(0x49, data); -+} -+ -+static struct pxamci_platform_data ezx_mci_platform_data = { -+#if defined(CONFIG_PXA_EZX_E680) -+ .ocr_mask = MMC_VDD_27_28, -+#elif defined(CONFIG_PXA_EZX_A780) -+ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 -+ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 -+ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 -+ |MMC_VDD_34_35|MMC_VDD_35_36, -+#endif -+ .init = ezx_mci_init, -+ .get_ro = ezx_mci_get_ro, -+ .setpower = ezx_mci_setpower, -+ .exit = ezx_mci_exit, -+}; -+ -+int __init __ezx_mci_init (void) -+{ -+ pxa_set_mci_info(&ezx_mci_platform_data); -+ return 0; -+} -+ -+arch_initcall(__ezx_mci_init); -Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 02:56:16.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-21 03:00:03.000000000 -0300 -@@ -18,7 +18,7 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o --obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o - - # Support for blinky lights - led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-mtd-map.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-mtd-map.patch deleted file mode 100644 index f59e31d9a2..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-mtd-map.patch +++ /dev/null @@ -1,274 +0,0 @@ -Index: linux-2.6.20.7/drivers/mtd/maps/Kconfig -=================================================================== ---- linux-2.6.20.7.orig/drivers/mtd/maps/Kconfig 2007-04-21 12:47:04.000000000 -0300 -+++ linux-2.6.20.7/drivers/mtd/maps/Kconfig 2007-04-21 13:01:08.000000000 -0300 -@@ -595,6 +595,28 @@ - help - This enables access to the flash chip on the Sharp SL Series of PDAs. - -+config MTD_EZX -+ bool "Map driver for Motorola EZX Platform" -+ depends on MTD && PXA_EZX -+ -+if MTD_EZX -+ -+choice -+ prompt "Select partition mapping for EZX platform" -+ -+config MTD_EZX_A780 -+ bool "A780/E680 Original Mapping" -+ -+config MTD_EZX_A780_ALTERNATE -+ bool "A780/E680 Alternate Mapping for BLOB2" -+ -+config MTD_EZX_E2 -+ bool "E2 Original Mapping" -+ -+endchoice -+ -+endif -+ - config MTD_PLATRAM - tristate "Map driver for platform device RAM (mtd-ram)" - depends on MTD -Index: linux-2.6.20.7/drivers/mtd/maps/Makefile -=================================================================== ---- linux-2.6.20.7.orig/drivers/mtd/maps/Makefile 2007-04-21 12:55:09.000000000 -0300 -+++ linux-2.6.20.7/drivers/mtd/maps/Makefile 2007-04-21 12:55:45.000000000 -0300 -@@ -72,3 +72,4 @@ - obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o - obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o - obj-$(CONFIG_MTD_TQM834x) += tqm834x.o -+obj-$(CONFIG_MTD_EZX) += ezx-flash.o -Index: linux-2.6.20.7/drivers/mtd/maps/ezx-flash.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/mtd/maps/ezx-flash.c 2007-04-21 13:07:14.000000000 -0300 -@@ -0,0 +1,227 @@ -+/* -+ * $Id: $ -+ * -+ * Map driver for the PXA27x -+ * -+ * Author: Harald Welte -+ * Copyright: (C) 2001 MontaVista Software Inc. -+ * -+ * 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. -+ * -+ * Mar 3, 2007 - (Daniel Ribeiro) Alternate partition table -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#define WINDOW_ADDR 0x0 -+#define WINDOW_SIZE (32*1024*1024) -+#define WINDOW_CACHE_ADDR 0x0 -+#define WINDOW_CACHE_SIZE 0x1a00000 -+ -+static void pxa27x_map_inval_cache(struct map_info *map, unsigned long from, -+ ssize_t len) -+{ -+#if 0 -+ unsigned long endaddress, i, j; -+ endaddress = from + len -1; -+ from &= ~(32-1); -+ endaddress &= ~(32-1); -+ for (i = from; i <= endaddress; i += 32) -+ asm("mcr p15, 0, %0, c7, c6, 1"::"r"(i)); -+ -+ asm( "mrc p15, 0, %0, c2, c0, 0\n" -+ "mov %0, %0\n" -+ "sub pc, pc #4" -+ :"=r"(j)); -+#else -+ consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); -+#endif -+} -+ -+ -+struct map_info pxa27x_map = { -+ .name = "PXA27x flash", -+ .size = WINDOW_SIZE, -+ .phys = WINDOW_ADDR, -+ .inval_cache = &pxa27x_map_inval_cache, -+}; -+ -+#if defined CONFIG_MTD_EZX_A780_ALTERNATE -+static struct mtd_partition pxa27x_partitions[] = { -+ { -+ .name = "Bootloader (RO)", -+ .size = 0x00020000, -+ .offset = 0, -+ .mask_flags = MTD_WRITEABLE, -+ }, { -+ .name = "Bootloader 2", -+ .size = 0x00020000, -+ .offset = 0x00020000, -+ } , { -+ .name = "Kernel 1", -+ .size = 0x000e0000, // 896KB -+ .offset = 0x00040000, -+ } , { -+ .name = "rootfs", -+ .size = 0x01760000, -+ .offset = 0x00120000, -+ } , { -+ .name = "Kernel 2", -+ .size = 0x00180000, // 1.5MB -+ .offset = 0x01880000, -+ } , { -+ .name = "VFM_Filesystem", -+ .size = 0x005a0000, -+ .offset = 0x01a00000, -+ } , { -+ .name = "setup", -+ .size = 0x00020000, -+ .offset = 0x01fa0000, -+ } , { -+ .name = "Logo", -+ .size = 0x00020000, -+ .offset = 0x01fc0000, -+ }, -+}; -+#elif defined CONFIG_MTD_EZX_A780 -+static struct mtd_partition pxa27x_partitions[] = { -+ { -+ .name = "Bootloader", -+ .size = 0x00020000, -+ .offset = 0, -+ .mask_flags = MTD_WRITEABLE, -+ }, { -+ .name = "Kernel", -+ .size = 0x000e0000, -+ .offset = 0x00020000, -+ } , { -+ .name = "rootfs", -+ .size = 0x018e0000, -+ .offset = 0x00120000, -+ } , { -+ .name = "VFM_Filesystem", -+ .size = 0x00580000, -+ .offset = 0x01a00000, -+ } , { -+ .name = "setup", -+ .size = 0x00020000, -+ .offset = 0x01fa0000, -+ } , { -+ .name = "Logo", -+ .size = 0x00020000, -+ .offset = 0x01fc0000, -+ }, -+}; -+#else -+#error "please define partition for this PXA27x implementation" -+#endif -+ -+ -+static struct mtd_info *mymtd; -+static struct mtd_partition *parsed_parts; -+ -+static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; -+ -+static int __init init_pxa27x(void) -+{ -+ struct mtd_partition *parts; -+ int nb_parts = 0; -+ int parsed_nr_parts = 0; -+ char *part_type = "static"; -+ -+ pxa27x_map.bankwidth = (BOOT_DEF & 1) ? 2 : 4; -+ -+ printk("Probing PXA27x flash at physical address 0x%08x (%d-bit bankwidth)\n", -+ WINDOW_ADDR, pxa27x_map.bankwidth * 8); -+ pxa27x_map.virt = ioremap(pxa27x_map.phys, pxa27x_map.size); -+ -+ if (!pxa27x_map.virt) { -+ printk("Failed to ioremap\n"); -+ return -EIO; -+ } -+ -+ mymtd = do_map_probe("cfi_probe", &pxa27x_map); -+ if (!mymtd) { -+ iounmap((void *)pxa27x_map.virt); -+ return -ENXIO; -+ } -+ mymtd->owner = THIS_MODULE; -+ -+#if 0 -+ /* ioremap the first flash chip as cacheable */ -+ pxa27x_map.cached = ioremap_cached(pxa27x_map.phys, pxa27x_map.size); -+ if (!pxa27x_map.cached) { -+ printk("Failed to do cacheable-ioremap\n"); -+ iounmap((void *)pxa27x_map.virt); -+ return -EIO; -+ } -+#endif -+ simple_map_init(&pxa27x_map); -+ -+ if (parsed_nr_parts == 0) { -+ int ret = parse_mtd_partitions(mymtd, probes, &parsed_parts, 0); -+ -+ if (ret > 0) { -+ part_type = "RedBoot"; -+ parsed_nr_parts = ret; -+ } -+ } -+ -+ if (parsed_nr_parts > 0) { -+ parts = parsed_parts; -+ nb_parts = parsed_nr_parts; -+ } else { -+ parts = pxa27x_partitions; -+ nb_parts = ARRAY_SIZE(pxa27x_partitions); -+ } -+ -+ if (nb_parts) { -+ printk(KERN_NOTICE "Using %s partition definition\n", part_type); -+ add_mtd_partitions(mymtd, parts, nb_parts); -+ } else { -+ add_mtd_device(mymtd); -+ } -+#if 0 -+ if (ret = ezx_partition_init()) -+#endif -+ return 0; -+} -+ -+static void __exit cleanup_pxa27x(void) -+{ -+ if (mymtd) { -+ del_mtd_partitions(mymtd); -+ map_destroy(mymtd); -+ if (parsed_parts) -+ kfree(parsed_parts); -+ } -+ if (pxa27x_map.virt) -+ iounmap((void *)pxa27x_map.virt); -+ if (pxa27x_map.cached) -+ iounmap((void *)pxa27x_map.cached); -+ return; -+} -+ -+module_init(init_pxa27x); -+module_exit(cleanup_pxa27x); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_DESCRIPTION("MTD map driver for Motorola EZX platform"); diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-pcap.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-pcap.patch deleted file mode 100644 index 22c5d44f36..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-pcap.patch +++ /dev/null @@ -1,1197 +0,0 @@ -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-pcap.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-pcap.c 2007-04-21 08:26:37.000000000 -0300 -@@ -0,0 +1,411 @@ -+/* Driver for Motorola PCAP2 as present in EZX phones -+ * -+ * This is both a SPI device driver for PCAP itself, as well as -+ * an IRQ demultiplexer for handling PCAP generated events such as -+ * headphone jack sense by downstream drivers. -+ * -+ * (C) 2006 by Harald Welte -+ * -+ * 2007, April - Daniel Ribeiro -+ * Altered to work with corgi's SSP code. -+ * Fixed irq handling routine. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "ezx.h" -+ -+#if 0 -+#define DEBUGP(x, args...) printk(x, ## args) -+#else -+#define DEBUGP(x, args...) -+#endif -+ -+extern unsigned long ezx_ssp_pcap_putget(ulong); -+ -+int ezx_pcap_write(u_int8_t reg_num, u_int32_t value) -+{ -+ value &= SSP_PCAP_REGISTER_VALUE_MASK; -+ value |= SSP_PCAP_REGISTER_WRITE_OP_BIT -+ | (reg_num<> SSP_PCAP_REGISTER_ADDRESS_SHIFT; -+ -+ ret = ezx_pcap_read(reg_num, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ if (to == 0) -+ tmp &= ~bit; -+ else -+ tmp |= bit; -+ -+ return ezx_pcap_write(reg_num, tmp); -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_bit_set); -+ -+int ezx_pcap_read_bit(u_int32_t bit) -+{ -+ int ret; -+ u_int32_t tmp; -+ u_int8_t reg_num = (bit & SSP_PCAP_REGISTER_ADDRESS_MASK) -+ >> SSP_PCAP_REGISTER_ADDRESS_SHIFT; -+ -+ ret = ezx_pcap_read(reg_num, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ return tmp & (bit & SSP_PCAP_REGISTER_VALUE_MASK); -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_read_bit); -+ -+ -+static int ezx_pcap_vibrator_level(u_int32_t bit) -+{ -+ /* FIXME */ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_vibrator_level); -+ -+ -+static int pcap_init(void) -+{ -+ /* initialize registers */ -+ /* FIXME: this should be board-level, not chip-level */ -+ /* implement a per board pcap init reg array? */ -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ISR_USB4VI, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_USB4VM, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ISR_USB1VI, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_USB1VM, 0); -+ // disable all interrupts -+ //ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, 0x03ffffff); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL, 1); -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); -+ -+ /* set SW1 sleep to keep SW1 1.3v in sync mode */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11, 0); -+ /* SW1 active in sync mode */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01, 0); -+ /* at SW1 -core voltage to 1.30V */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS, 0); -+ -+ /* when STANDY2 PIN ACTIVE (high) set V3-- sram V8 -- pll off */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR, 0); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR, 0); -+ -+ /* when STANDY2 PIN ACTIVE (high) set V4-- lcd only for e680 V6 --- -+ * camera for e680 */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR, 1); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR, 0); -+ -+ /* set Vc to low power mode when AP sleep */ -+ //SSP_PCAP_bit_set( SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY); -+ -+ /* set VAUX2 to voltage 2.775V and low power mode when AP sleep */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 1); -+ -+ PGSR(GPIO34_TXENB) |= GPIO_bit(GPIO34_TXENB); -+ -+ return 0; -+} -+/* MMC/SD specific functions */ -+ -+void ezx_pcap_mmcsd_voltage(u_int32_t bits) -+{ -+ unsigned int tmp; -+ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp); -+#if defined(CONFIG_PXA_EZX_E680) -+ tmp &= 0xffffff9f; /* zero all vaux2 bits */ -+ tmp |= (bits & 0x3) << 5; -+#elif defined(CONFIG_PXA_EZX_A780) -+ tmp &= 0xfffff0ff; /* zero all vaux3 bits */ -+ tmp |= (bits & 0xf) << 8; -+#endif -+ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp); -+} -+EXPORT_SYMBOL(ezx_pcap_mmcsd_voltage); -+ -+int ezx_pcap_mmcsd_power(int on) -+{ -+ if (on) { -+#if defined(CONFIG_PXA_EZX_E680) -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 1); -+#else -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN, 1); -+#endif -+ } else { -+#if defined(CONFIG_PXA_EZX_E680) -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 0); -+#else -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN, 0); -+#endif -+ } -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_mmcsd_power); -+ -+/* IRQ Handling */ -+ -+/* Array indexed by BIT POSITION of PCAP register, returns IRQ number */ -+static unsigned int pcap2irq[] = { -+ [0] = EZX_IRQ_ADCDONE, -+ [1] = EZX_IRQ_TS, -+ [2] = 0, /* 1HZ */ -+ [3] = 0, /* WI */ -+ [4] = 0, /* WI */ -+ [5] = 0, /* TODA */ -+ [6] = EZX_IRQ_USB4V, -+ [7] = 0, /* ONOFF */ -+ [8] = 0, /* ONOFF2 */ -+ [9] = EZX_IRQ_USB1V, -+ [10] = 0, /* MOBPORT */ -+ [11] = EZX_IRQ_MIC, -+ [12] = EZX_IRQ_HEADJACK, -+ [13] = 0, /* ST */ -+ [14] = 0, /* PC */ -+ [15] = 0, /* WARM */ -+ [16] = 0, /* EOL */ -+ [17] = 0, /* CLK */ -+ [18] = 0, /* SYS_RST */ -+ [19] = 0, -+ [20] = EZX_IRQ_ADCDONE2, -+ [21] = 0, /* SOFT_RESET */ -+ [22] = 0, /* MNEXB */ -+}; -+ -+/* Array indexed by IRQ NUMBER, returns PCAP absolute value */ -+static unsigned int irq2pcap[] = { -+ [EZX_IRQ_ADCDONE] = SSP_PCAP_ADJ_BIT_ISR_ADCDONEI, -+ [EZX_IRQ_TS] = SSP_PCAP_ADJ_BIT_ISR_TSI, -+ [EZX_IRQ_USB4V] = SSP_PCAP_ADJ_BIT_ISR_USB4VI, -+ [EZX_IRQ_USB1V] = SSP_PCAP_ADJ_BIT_ISR_USB1VI, -+ [EZX_IRQ_HEADJACK] = SSP_PCAP_ADJ_BIT_ISR_A1I, -+ [EZX_IRQ_MIC] = SSP_PCAP_ADJ_BIT_ISR_MB2I, -+ [EZX_IRQ_ADCDONE2] = SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, -+}; -+ -+static void pcap_ack_irq(unsigned int irq) -+{ -+ DEBUGP("pcap_ack_irq: %u\n", irq); -+ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, irq2pcap[irq]); -+} -+ -+static void pcap_mask_irq(unsigned int irq) -+{ -+ u_int32_t reg; -+ -+ DEBUGP("pcap_mask_irq: %u\n", irq); -+ -+ /* this needs to be atomic... but we're not on SMP so it is */ -+ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, ®); -+ reg |= irq2pcap[irq]; -+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, reg); -+} -+ -+static void pcap_unmask_irq(unsigned int irq) -+{ -+ u_int32_t tmp; -+ DEBUGP("pcap_unmask_irq: %u\n", irq); -+ -+ /* this needs to be atomic... but we're not on SMP so it is */ -+ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, &tmp); -+ tmp &= ~irq2pcap[irq]; -+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, tmp); -+} -+ -+static struct irq_chip pcap_chip = { -+ .ack = pcap_ack_irq, -+ .mask = pcap_mask_irq, -+ .unmask = pcap_unmask_irq, -+}; -+ -+/* handler for interrupt received from PCAP via GPIO */ -+static void pcap_irq_demux_handler(unsigned int irq, struct irq_desc *desc) -+{ -+ int i; -+ const unsigned int cpu = smp_processor_id(); -+ u_int32_t reg; -+ -+ DEBUGP("pcap_irq_demux_handler(%u,,) entered\n", irq); -+ -+ spin_lock(&desc->lock); -+ -+ desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); -+ -+ if (unlikely(desc->status & IRQ_INPROGRESS)) { -+ DEBUGP("irq busy, masking it off\n"); -+ desc->status |= (IRQ_PENDING | IRQ_MASKED); -+ desc->chip->mask(irq); -+ desc->chip->ack(irq); -+ goto out_unlock; -+ } -+ -+ kstat_cpu(cpu).irqs[irq]++; -+ desc->status |= IRQ_INPROGRESS; -+ -+ do { -+ if (unlikely((desc->status & -+ (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == -+ (IRQ_PENDING | IRQ_MASKED))) { -+ DEBUGP("dealing with pending IRQ, unmasking\n"); -+ desc->chip->unmask(irq); -+ desc->status &= ~IRQ_MASKED; -+ } -+ -+ desc->status &= ~IRQ_PENDING; -+ spin_unlock(&desc->lock); -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_ISR_REGISTER, ®); -+ DEBUGP("pcap_irq_demux_handler: ISR=0x%08x\n", reg); -+ -+ for (i = ARRAY_SIZE(pcap2irq)-1; i >= 0; i--) { -+ unsigned int pirq = pcap2irq[i]; -+ if (pirq == 0) -+ continue; -+ -+ if (reg & (1 << i)) { -+ struct irq_desc *subdesc; -+ DEBUGP("found irq %u\n", pirq); -+ subdesc = irq_desc + pirq; -+ -+ // acknowledge pcap irq -+ // do just one pcap irq each time -+ subdesc->chip->ack(pirq); -+ i = 0; -+ -+ handle_IRQ_event(pirq, subdesc->action); -+ } -+ } -+ spin_lock(&desc->lock); -+ -+ } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); -+ -+ desc->status &= ~IRQ_INPROGRESS; -+ -+out_unlock: -+ spin_unlock(&desc->lock); -+} -+ -+static int ezx_pcap_remove(struct platform_device *pdev) -+{ -+ int irq; -+ DEBUGP("exz_pcap_remove entered\n"); -+ -+ set_irq_chained_handler(IRQ_GPIO1, NULL); -+ -+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { -+ set_irq_chip(irq, NULL); -+ set_irq_handler(irq, NULL); -+ set_irq_flags(irq, 0); -+ } -+ -+ return 0; -+} -+ -+static int __init ezx_pcap_probe(struct platform_device *pdev) -+{ -+ unsigned int irq; -+ DEBUGP("ezx_pcap_probe entered\n"); -+ -+ pcap_init(); -+ -+ set_irq_type(IRQ_GPIO1, IRQT_RISING); -+ /* set up interrupt demultiplexing code for PCAP2 irqs */ -+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { -+ set_irq_chip(irq, &pcap_chip); -+ set_irq_handler(irq, handle_edge_irq); -+ set_irq_flags(irq, IRQF_VALID); -+ } -+ set_irq_chained_handler(IRQ_GPIO1, pcap_irq_demux_handler); -+ -+ printk("PCAP2 SSP driver registered.\n"); -+ -+ return 0; -+} -+ -+static struct platform_driver ezxpcap_driver = { -+ .probe = ezx_pcap_probe, -+ .remove = ezx_pcap_remove, -+ .driver = { -+ .name = "ezx-pcap", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init ezx_pcap_init(void) -+{ -+ DEBUGP("ezx_pcap_init entered\n"); -+ return platform_driver_register(&ezxpcap_driver); -+} -+ -+static void __exit ezx_pcap_exit(void) -+{ -+ return platform_driver_unregister(&ezxpcap_driver); -+} -+ -+module_init(ezx_pcap_init); -+module_exit(ezx_pcap_exit); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte"); -+MODULE_DESCRIPTION("SPI Driver for Motorola PCAP2"); -+ -Index: linux-2.6.20.7/include/asm-arm/arch-pxa/ezx-pcap.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/include/asm-arm/arch-pxa/ezx-pcap.h 2007-04-21 08:26:37.000000000 -0300 -@@ -0,0 +1,665 @@ -+/* (c) Copyright Motorola Beijing 2002 all rights reserved. -+ -+ Project Name : EZX -+ Project No. : -+ Title : -+ File Name : -+ Description : -+ -+ ************** REVISION HISTORY ********************************************** -+ Date Author Reference -+ ======== ========== ========================== -+ 2002-07-01 weiqiang lin create -+*/ -+#ifndef SSP_PCAP_H -+#define SSP_PCAP_H -+ -+#define SSP_vibrate_start_command() SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ -+ SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) -+ -+#define SSP_vibrate_stop_command() SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ -+ SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) -+ -+#define SSP_PCAP_REGISTER_VALUE_LENGTH 16 -+ -+#define SSP_PCAP_REGISTER_WRITE_OP_BIT 0x80000000 -+#define SSP_PCAP_REGISTER_READ_OP_BIT 0x00000000 -+ -+#define SSP_PCAP_REGISTER_VALUE_UP_WORD_MASK 0xffff0000 -+#define SSP_PCAP_REGISTER_VALUE_DOWN_WORD_MASK 0x0000ffff -+ -+#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff -+#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff -+#define SSP_PCAP_REGISTER_ADDRESS_MASK 0x7c000000 -+#define SSP_PCAP_REGISTER_ADDRESS_SHIFT 26 -+#define SSP_PCAP_REGISTER_NUMBER 32 -+ -+#define SSP_PCAP_ADC_START_VALUE_SET_MASK 0xfffffc00 -+#define SSP_PCAP_ADC_START_VALUE 0x000001dd -+ -+ -+#define SSP_PCAP_PHONE_CDC_CLOCK_MASK 0x000001c0 -+#define SSP_PCAP_STEREO_SAMPLE_RATE_MASK 0x00000f00 -+#define SSP_PCAP_STEREO_BCLK_TIME_SLOT_MASK 0x00018000 -+#define SSP_PCAP_STEREO_CLOCK_MASK 0x0000001c -+#define SSP_PCAP_DIGITAL_AUDIO_MODE_MASK 0x00006000 -+#define SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK 0x000e0000 -+#define SSP_PCAP_MONO_PGA_MASK 0x00180000 -+ -+#define SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK 0x00300000 -+ -+#define SSP_PCAP_AUDIO_IN_GAIN_MASK 0x0000001f -+#define SSP_PCAP_AUDIO_IN_GAIN_SHIFT 0 -+#define SSP_PCAP_AUDIO_OUT_GAIN_MASK 0x0001e000 -+#define SSP_PCAP_AUDIO_OUT_GAIN_SHIFT 13 -+ -+ -+#define SSP_PCAP_ADD1_VALUE_MASK 0x000003ff -+#define SSP_PCAP_ADD1_VALUE_SHIFT 0 -+#define SSP_PCAP_ADD2_VALUE_MASK 0x000ffc00 -+#define SSP_PCAP_ADD2_VALUE_SHIFT 10 -+ -+ -+#define PCAP_AUDIO_IN_GAIN_MAX_VALUE 31 -+#define PCAP_AUDIO_OUT_GAIN_MAX_VALUE 15 -+ -+#define PCAP_CLEAR_INTERRUPT_REGISTER 0x00141fdf -+#define PCAP_MASK_ALL_INTERRUPT 0x0013ffff -+ -+#define SSP_PCAP_TS_KEEPER_TIMER 100 /* 1 second */ -+#define START_ADC_DELAY_TIMER 1991 /* 540 us */ -+ -+#define SSP_SEND_PM_ALART_INTERVAL 1000 *HZ/1000 /* 1 second */ -+#define SSP_SEND_MSG_USB_ACCESSORY_INFO_DEBOUNCE 200 *HZ/1000 /* 200ms */ -+ -+struct ssp_interrupt_info -+{ -+ u32 type; -+ u32 status; -+ void* privdata; -+}; -+ -+#ifndef U8 -+#define U8 unsigned char -+#endif -+ -+#ifndef U32 -+#define U32 unsigned long -+#endif -+ -+#ifndef U16 -+#define U16 unsigned short -+#endif -+ -+#ifndef P_U16 -+#define P_U16 U16* -+#endif -+ -+#ifndef P_U32 -+#define P_U32 U32* -+#endif -+ -+#define SSP_SELECT_BUFFER (volatile unsigned long *)(0xf4000000) -+ -+#define SSP_SR_RNE 0x00000008 -+#define SSP_PCAP_BASE 0x00001000 -+/************************ STRUCTURES, ENUMS, AND TYPEDEFS **************************/ -+typedef enum accessoryStatus -+{ -+ ACCESSORY_DEVICE_STATUS_DETACHED = 0, -+ ACCESSORY_DEVICE_STATUS_ATTACHED , -+ ACCESSORY_DEVICE_STATUS_UNKNOW =0x000000ff -+}ACCESSORY_DEVICE_STATUS; -+ -+typedef enum accessoryType -+{ -+ ACCESSORY_DEVICE_NONE = 0, -+ ACCESSORY_DEVICE_SERIAL_PORT , -+ ACCESSORY_DEVICE_USB_PORT , -+ ACCESSORY_DEVICE_UNKNOW =0x000000ff -+}ACCESSORY_TYPE; -+ -+typedef enum pcapReturnStatus -+{ -+ SSP_PCAP_SUCCESS = 0, -+ SSP_PCAP_ERROR_REGISTER = SSP_PCAP_BASE+1, -+ SSP_PCAP_ERROR_VALUE = SSP_PCAP_BASE+2, -+ -+ SSP_PCAP_NOT_RUN = SSP_PCAP_BASE+0xff -+}SSP_PCAP_STATUS; -+ -+typedef enum pcapPortType -+{ -+ SSP_PCAP_SERIAL_PORT = 0x00000000, -+ SSP_PCAP_LOW_USB_PORT = 0x00000001, -+ SSP_PCAP_HIGH_USB_PORT = 0x00000002, -+ SSP_PCAP_UNKNOW_PORT = 0x000000ff -+}SSP_PCAP_PORT_TYPE; -+ -+typedef enum pcapInitDriverType -+{ -+ SSP_PCAP_TS_OPEN = 0x00000000, -+ SSP_PCAP_AUDIO_OPEN = 0x00000001, -+ SSP_PCAP_UNKNOW_DRIVER_OPEN = 0x000000ff -+}SSP_PCAP_INIT_DRIVER_TYPE; -+ -+ -+typedef enum pcapReturnBitStatus -+{ -+ SSP_PCAP_BIT_ZERO = 0x00000000, -+ SSP_PCAP_BIT_ONE = 0x00000001, -+ SSP_PCAP_BIT_ERROR = 0xff000000 -+}SSP_PCAP_BIT_STATUS; -+ -+typedef enum pcapCDCClkType -+{ -+ PCAP_CDC_CLK_IN_13M0 = 0x00000000, -+ PCAP_CDC_CLK_IN_15M36 = 0x00000040, -+ PCAP_CDC_CLK_IN_16M8 = 0x00000080, -+ PCAP_CDC_CLK_IN_19M44 = 0x000000c0, -+ PCAP_CDC_CLK_IN_26M0 = 0x00000100 -+}PHONE_CDC_CLOCK_TYPE; -+ -+typedef enum pcapST_SR -+{ -+ PCAP_ST_SAMPLE_RATE_8K = 0x00000000, -+ PCAP_ST_SAMPLE_RATE_11K = 0x00000100, -+ PCAP_ST_SAMPLE_RATE_12K = 0x00000200, -+ PCAP_ST_SAMPLE_RATE_16K = 0x00000300, -+ PCAP_ST_SAMPLE_RATE_22K = 0x00000400, -+ PCAP_ST_SAMPLE_RATE_24K = 0x00000500, -+ PCAP_ST_SAMPLE_RATE_32K = 0x00000600, -+ PCAP_ST_SAMPLE_RATE_44K = 0x00000700, -+ PCAP_ST_SAMPLE_RATE_48K = 0x00000800 -+}ST_SAMPLE_RATE_TYPE; -+ -+typedef enum pcapST_BCLK -+{ -+ PCAP_ST_BCLK_SLOT_16 = 0x00000000, -+ PCAP_ST_BCLK_SLOT_8 = 0x00008000, -+ PCAP_ST_BCLK_SLOT_4 = 0x00010000, -+ PCAP_ST_BCLK_SLOT_2 = 0x00018000, -+}ST_BCLK_TIME_SLOT_TYPE; -+ -+typedef enum pcapST_CLK -+{ -+ PCAP_ST_CLK_PLL_CLK_IN_13M0 = 0x00000000, -+ PCAP_ST_CLK_PLL_CLK_IN_15M36 = 0x00000004, -+ PCAP_ST_CLK_PLL_CLK_IN_16M8 = 0x00000008, -+ PCAP_ST_CLK_PLL_CLK_IN_19M44 = 0x0000000c, -+ PCAP_ST_CLK_PLL_CLK_IN_26M0 = 0x00000010, -+ PCAP_ST_CLK_PLL_CLK_IN_EXT_MCLK = 0x00000014, -+ PCAP_ST_CLK_PLL_CLK_IN_FSYNC = 0x00000018, -+ PCAP_ST_CLK_PLL_CLK_IN_BITCLK = 0x0000001c -+}ST_CLK_TYPE; -+ -+typedef enum pcapDigitalAudioInterfaceMode -+{ -+ PCAP_DIGITAL_AUDIO_INTERFACE_NORMAL = 0x00000000, -+ PCAP_DIGITAL_AUDIO_INTERFACE_NETWORK = 0x00002000, -+ PCAP_DIGITAL_AUDIO_INTERFACE_I2S = 0x00004000 -+}DIG_AUD_MODE_TYPE; -+ -+typedef enum pcapMono -+{ -+ PCAP_MONO_PGA_R_L_STEREO = 0x00000000, -+ PCAP_MONO_PGA_RL = 0x00080000, -+ PCAP_MONO_PGA_RL_3DB = 0x00100000, -+ PCAP_MONO_PGA_RL_6DB = 0x00180000 -+}MONO_TYPE; -+ -+typedef enum pcapVibratorVoltageLevel -+{ -+ PCAP_VIBRATOR_VOLTAGE_LEVEL0 = 0x00000000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL1 = 0x00100000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL2 = 0x00200000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL3 = 0x00300000 -+}VibratorVoltageLevel_TYPE; -+ -+typedef enum pcapTouchScreenMode -+{ -+ PCAP_TS_POSITION_X_MEASUREMENT = 0x00000000, -+ PCAP_TS_POSITION_XY_MEASUREMENT = 0x00020000, -+ PCAP_TS_PRESSURE_MEASUREMENT = 0x00040000, -+ PCAP_TS_PLATE_X_MEASUREMENT = 0x00060000, -+ PCAP_TS_PLATE_Y_MEASUREMENT = 0x00080000, -+ PCAP_TS_STANDBY_MODE = 0x000a0000, -+ PCAP_TS_NONTS_MODE = 0x000c0000 -+}TOUCH_SCREEN_DETECT_TYPE; -+ -+typedef enum pcapADJRegister -+{ -+ SSP_PCAP_ADJ_ISR_REGISTER = 0x00, -+ SSP_PCAP_ADJ_MSR_REGISTER = 0x01, -+ SSP_PCAP_ADJ_PSTAT_REGISTER = 0x02, -+ SSP_PCAP_ADJ_VREG2_REGISTER = 0x06, -+ SSP_PCAP_ADJ_AUX_VREG_REGISTER = 0x07, -+ SSP_PCAP_ADJ_BATT_DAC_REGISTER = 0x08, -+ SSP_PCAP_ADJ_ADC1_REGISTER = 0x09, -+ SSP_PCAP_ADJ_ADC2_REGISTER = 0x0a, -+ SSP_PCAP_ADJ_AUD_CODEC_REGISTER = 0x0b, -+ SSP_PCAP_ADJ_AUD_RX_AMPS_REGISTER = 0x0c, -+ SSP_PCAP_ADJ_ST_DAC_REGISTER = 0x0d, -+ SSP_PCAP_ADJ_BUSCTRL_REGISTER = 0x14, -+ SSP_PCAP_ADJ_PERIPH_REGISTER = 0x15, -+ SSP_PCAP_ADJ_LOWPWR_CTRL_REGISTER = 0x18, -+ SSP_PCAP_ADJ_TX_AUD_AMPS_REGISTER = 0x1a, -+ SSP_PCAP_ADJ_GP_REG_REGISTER = 0x1b -+}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER; -+ -+typedef enum pcapADJBit_SetType -+{ -+ SSP_PCAP_ADJ_BIT_ISR_ADCDONEI = 0x00000001, -+ SSP_PCAP_ADJ_BIT_ISR_TSI = 0x00000002, -+ SSP_PCAP_ADJ_BIT_ISR_1HZI = 0x00000004, -+ SSP_PCAP_ADJ_BIT_ISR_WHI = 0x00000008, -+ SSP_PCAP_ADJ_BIT_ISR_WLI = 0x00000010, -+ SSP_PCAP_ADJ_BIT_ISR_TODAI = 0x00000020, -+ SSP_PCAP_ADJ_BIT_ISR_USB4VI = 0x00000040, -+ SSP_PCAP_ADJ_BIT_ISR_ONOFFI = 0x00000080, -+ SSP_PCAP_ADJ_BIT_ISR_ONOFF2I = 0x00000100, -+ SSP_PCAP_ADJ_BIT_ISR_USB1VI = 0x00000200, -+ SSP_PCAP_ADJ_BIT_ISR_MOBPORTI = 0x00000400, -+ SSP_PCAP_ADJ_BIT_ISR_MB2I = 0x00000800, -+ SSP_PCAP_ADJ_BIT_ISR_A1I = 0x00001000, -+ SSP_PCAP_ADJ_BIT_ISR_STI = 0x00002000, -+ SSP_PCAP_ADJ_BIT_ISR_PCI = 0x00004000, -+ SSP_PCAP_ADJ_BIT_ISR_WARMI = 0x00008000, -+ SSP_PCAP_ADJ_BIT_ISR_EOLI = 0x00010000, -+ SSP_PCAP_ADJ_BIT_ISR_CLKI = 0x00020000, -+ SSP_PCAP_ADJ_BIT_ISR_SYS_RSTI = 0x00040000, -+ SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I = 0x00100000, -+ SSP_PCAP_ADJ_BIT_ISR_SOFT_RESETI = 0x00200000, -+ SSP_PCAP_ADJ_BIT_ISR_MNEXBI = 0x00400000, -+ -+ SSP_PCAP_ADJ_BIT_MSR_ADCDONEM = 0x04000001, -+ SSP_PCAP_ADJ_BIT_MSR_TSM = 0x04000002, -+ SSP_PCAP_ADJ_BIT_MSR_1HZM = 0x04000004, -+ SSP_PCAP_ADJ_BIT_MSR_WHM = 0x04000008, -+ SSP_PCAP_ADJ_BIT_MSR_WLM = 0x04000010, -+ SSP_PCAP_ADJ_BIT_MSR_TODAM = 0x04000020, -+ SSP_PCAP_ADJ_BIT_MSR_USB4VM = 0x04000040, -+ SSP_PCAP_ADJ_BIT_MSR_ONOFFM = 0x04000080, -+ SSP_PCAP_ADJ_BIT_MSR_ONOFF2M = 0x04000100, -+ SSP_PCAP_ADJ_BIT_MSR_USB1VM = 0x04000200, -+ SSP_PCAP_ADJ_BIT_MSR_MOBPORTM = 0x04000400, -+ SSP_PCAP_ADJ_BIT_MSR_MB2M = 0x04000800, -+ SSP_PCAP_ADJ_BIT_MSR_A1M = 0x04001000, -+ SSP_PCAP_ADJ_BIT_MSR_STM = 0x04002000, -+ SSP_PCAP_ADJ_BIT_MSR_PCM = 0x04004000, -+ SSP_PCAP_ADJ_BIT_MSR_WARMM = 0x04008000, -+ SSP_PCAP_ADJ_BIT_MSR_EOLM = 0x04010000, -+ SSP_PCAP_ADJ_BIT_MSR_CLKM = 0x04020000, -+ SSP_PCAP_ADJ_BIT_MSR_SYS_RSTM = 0x04040000, -+ SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M = 0x04100000, -+ SSP_PCAP_ADJ_BIT_MSR_SOFT_RESETM = 0x04200000, -+ SSP_PCAP_ADJ_BIT_MSR_MNEXBM = 0x04400000, -+ -+ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V = 0x08000040, -+ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS = 0x08000080, -+ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS2 = 0x08000100, -+ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_1V = 0x08000200, -+ SSP_PCAP_ADJ_BIT_PSTAT_MOBSENSB = 0x08000400, -+ SSP_PCAP_ADJ_BIT_PSTAT_MB2SNS = 0x08000800, -+ SSP_PCAP_ADJ_BIT_PSTAT_A1SNS = 0x08001000, -+ SSP_PCAP_ADJ_BIT_PSTAT_MSTB = 0x08002000, -+ SSP_PCAP_ADJ_BIT_PSTAT_EOL_STAT = 0x08010000, -+ SSP_PCAP_ADJ_BIT_PSTAT_CLK_STAT = 0x08020000, -+ SSP_PCAP_ADJ_BIT_PSTAT_SYS_RST = 0x08040000, -+ SSP_PCAP_ADJ_BIT_PSTAT_BATTFBSNS = 0x08080000, -+ SSP_PCAP_ADJ_BIT_PSTAT_BATT_DET_IN_SNS = 0x08200000, -+ SSP_PCAP_ADJ_BIT_PSTAT_MNEXBSNS = 0x08400000, -+ SSP_PCAP_ADJ_BIT_PSTAT_WARM_SYS_RST = 0x08800000, -+ -+ SSP_PCAP_ADJ_BIT_VREG2_V1_STBY = 0x18000001, -+ SSP_PCAP_ADJ_BIT_VREG2_V2_STBY = 0x18000002, -+ SSP_PCAP_ADJ_BIT_VREG2_V3_STBY = 0x18000004, -+ SSP_PCAP_ADJ_BIT_VREG2_V4_STBY = 0x18000008, -+ SSP_PCAP_ADJ_BIT_VREG2_V5_STBY = 0x18000010, -+ SSP_PCAP_ADJ_BIT_VREG2_V6_STBY = 0x18000020, -+ SSP_PCAP_ADJ_BIT_VREG2_V7_STBY = 0x18000040, -+ SSP_PCAP_ADJ_BIT_VREG2_V8_STBY = 0x18000080, -+ SSP_PCAP_ADJ_BIT_VREG2_V9_STBY = 0x18000100, -+ SSP_PCAP_ADJ_BIT_VREG2_V10_STBY = 0x18000200, -+ SSP_PCAP_ADJ_BIT_VREG2_V1_LOWPWR = 0x18000400, -+ SSP_PCAP_ADJ_BIT_VREG2_V2_LOWPWR = 0x18000800, -+ SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR = 0x18001000, -+ SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR = 0x18002000, -+ SSP_PCAP_ADJ_BIT_VREG2_V5_LOWPWR = 0x18004000, -+ SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR = 0x18008000, -+ SSP_PCAP_ADJ_BIT_VREG2_V7_LOWPWR = 0x18010000, -+ SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR = 0x18020000, -+ SSP_PCAP_ADJ_BIT_VREG2_V9_LOWPWR = 0x18040000, -+ SSP_PCAP_ADJ_BIT_VREG2_V10_LOWPWR = 0x18080000, -+ -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_EN = 0x1c000002, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_0 = 0x1c000004, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_1 = 0x1c000008, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN = 0x1c000010, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0 = 0x1c000020, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1 = 0x1c000040, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN = 0x1c000080, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_0 = 0x1c000100, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_1 = 0x1c000200, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_2 = 0x1c000400, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_3 = 0x1c000800, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_EN = 0x1c001000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_0 = 0x1c002000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_1 = 0x1c004000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM2_EN = 0x1c010000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_EN = 0x1c020000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_0 = 0x1c040000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN = 0x1c080000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_0 = 0x1c100000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_1 = 0x1c200000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_STBY = 0x1c400000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_LOWPWR = 0x1c800000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_SW3_STBY = 0x1d000000, -+ -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC0 = 0x20000001, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC1 = 0x20000002, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC2 = 0x20000004, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC3 = 0x20000008, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC4 = 0x20000010, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC5 = 0x20000020, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC6 = 0x20000040, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC7 = 0x20000080, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_B_FDBK = 0x20000100, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EXT_ISENSE = 0x20000200, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN0 = 0x20000400, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN1 = 0x20000800, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN2 = 0x20001000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN3 = 0x20002000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_I_COIN = 0x20004000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_COIN_CH_EN = 0x20008000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL0 = 0x20020000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL1 = 0x20040000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL2 = 0x20080000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_CMP_EN = 0x20100000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_BATT_DET_EN = 0x20200000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_THERMBIAS_CTRL = 0x20400000, -+ -+ SSP_PCAP_ADJ_BIT_ADC1_ADEN = 0x24000001, -+ SSP_PCAP_ADJ_BIT_ADC1_RAND = 0x24000002, -+ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL1 = 0x24000004, -+ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL2 = 0x24000008, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA10 = 0x24000010, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA11 = 0x24000020, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA12 = 0x24000040, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA20 = 0x24000080, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA21 = 0x24000100, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA22 = 0x24000200, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO0 = 0x24000400, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO1 = 0x24000800, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO2 = 0x24001000, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO3 = 0x24002000, -+ SSP_PCAP_ADJ_BIT_ADC1_ATOX = 0x24004000, -+ SSP_PCAP_ADJ_BIT_ADC1_MTR1 = 0x24008000, -+ SSP_PCAP_ADJ_BIT_ADC1_MTR2 = 0x24010000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M0 = 0x24020000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M1 = 0x24040000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M2 = 0x24080000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR = 0x24100000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB = 0x24200000, -+ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_POLARITY = 0x24400000, -+ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_ADC = 0x24800000, -+ -+ SSP_PCAP_ADJ_BIT_ADC2_ADD10 = 0x28000001, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD11 = 0x28000002, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD12 = 0x28000004, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD13 = 0x28000008, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD14 = 0x28000010, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD15 = 0x28000020, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD16 = 0x28000040, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD17 = 0x28000080, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD18 = 0x28000100, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD19 = 0x28000200, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD20 = 0x28000400, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD21 = 0x28000800, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD22 = 0x28001000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD23 = 0x28002000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD24 = 0x28004000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD25 = 0x28008000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD26 = 0x28010000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD27 = 0x28020000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD28 = 0x28040000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD29 = 0x28080000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADINC1 = 0x28100000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADINC2 = 0x28200000, -+ SSP_PCAP_ADJ_BIT_ADC2_ASC = 0x28400000, -+ -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDIHPF = 0x2c000001, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_SMB = 0x2c000002, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDOHPF = 0x2c000004, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CD_TS = 0x2c000008, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DLM = 0x2c000010, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_ADITH = 0x2c000020, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK0 = 0x2c000040, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK1 = 0x2c000080, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK2 = 0x2c000100, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_INV = 0x2c000200, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_INV = 0x2c000400, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DF_RESET = 0x2c000800, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_EN = 0x2c001000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK_EN = 0x2c002000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_8K_16K = 0x2c004000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DIG_AUD_IN = 0x2c008000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_IN_SEL = 0x2c010000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2_MUX = 0x2c020000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG0 = 0x2c040000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG1 = 0x2c080000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG2 = 0x2c100000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG3 = 0x2c200000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG4 = 0x2c400000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG_PRI_ADJ = 0x2c800000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_PRI_ADJ = 0x2c200000, -+ -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1_EN = 0x30000001, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A2_EN = 0x30000002, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A4_EN = 0x30000010, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ARIGHT_EN = 0x30000020, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ALEFT_EN = 0x30000040, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CD_BYP = 0x30000080, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CDC_SW = 0x30000100, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ST_DAC_SW = 0x30000200, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_IN_SW = 0x30000400, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_R_EN = 0x30000800, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_L_EN = 0x30001000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG0 = 0x30002000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG1 = 0x30004000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG2 = 0x30008000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG3 = 0x30010000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL = 0x30020000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO0 = 0x30080000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO1 = 0x30100000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG_PRI_ADJ = 0x30200000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO_PRI_ADJ = 0x30400000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ0 = 0x30800000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ1 = 0x31000000, -+ -+ SSP_PCAP_ADJ_BIT_ST_DAC_SMB_ST_DAC = 0x34000001, -+ SSP_PCAP_ADJ_BIT_ST_DAC_STDET_EN = 0x34000002, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK0 = 0x34000004, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK1 = 0x34000008, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK2 = 0x34000010, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_EN = 0x34000020, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DF_RESET_ST_DAC = 0x34000040, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_EN = 0x34000080, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR0 = 0x34000100, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR1 = 0x34000200, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR2 = 0x34000400, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR3 = 0x34000800, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_IN_ST_DAC = 0x34001000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS0 = 0x34002000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS1 = 0x34004000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK0 = 0x34008000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK1 = 0x34010000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_INV = 0x34020000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_FS_INV = 0x34040000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_CLK_IN_SEL = 0x34080000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_PRI_ADJ = 0x35000000, -+ -+ SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB = 0x50000001, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_SUSPEND = 0x50000002, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU = 0x50000004, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PD = 0x50000008, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN = 0x50000010, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PS = 0x50000020, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_MSTR_EN = 0x50000040, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VBUS_PD_ENB = 0x50000080, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_CURRLIM = 0x50000100, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB = 0x50000200, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR = 0x50000400, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_SE0_CONN = 0x50000800, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PDM = 0x50001000, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_BUS_PRI_ADJ = 0x51000000, -+ -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0 = 0x54000001, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1 = 0x54000002, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2 = 0x54000004, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3 = 0x54000008, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4 = 0x54000010, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_EN = 0x54000020, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_EN = 0x54000040, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL0 = 0x54000080, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL1 = 0x54000100, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL2 = 0x54000200, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL3 = 0x54000400, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL0 = 0x54000800, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL1 = 0x54001000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL2 = 0x54002000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL3 = 0x54004000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I0 = 0x54008000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I1 = 0x54010000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I0 = 0x54020000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I1 = 0x54040000, -+ SSP_PCAP_ADJ_BIT_PERIPH_SKIP = 0x54080000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0 = 0x54100000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1 = 0x54200000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2 = 0x54400000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3 = 0x54800000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4 = 0x55000000, -+ -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY = 0x60000001, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR = 0x60000002, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_STBY = 0x60000004, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_LOWPWR = 0x60000008, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_STBY = 0x60000010, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_LOWPWR = 0x60000020, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM_LOWPWR = 0x60000040, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM2_LOWPWR = 0x60000080, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00 = 0x60000100, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01 = 0x60000200, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10 = 0x60000400, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11 = 0x60000800, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS = 0x60001000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS = 0x60002000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS = 0x60004000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS = 0x60008000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE00 = 0x60010000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE01 = 0x60020000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE10 = 0x60040000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE11 = 0x60080000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW20_DVS = 0x60100000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW21_DVS = 0x60200000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW22_DVS = 0x60400000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW23_DVS = 0x60800000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY = 0x61000000, -+ -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG0 = 0x68000001, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG1 = 0x68000002, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG2 = 0x68000004, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG3 = 0x68000008, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG4 = 0x68000010, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_EN = 0x68000020, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_MUX = 0x68000040, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_EN = 0x68000080, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_MUX = 0x68000100, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_EXT_MIC_MUX = 0x68000200, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON2 = 0x68000400, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON1 = 0x68000800, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1ID_TX = 0x68001000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1_CONFIG = 0x68002000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AHS_CONFIG = 0x68004000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A2_CONFIG = 0x68008000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_LOWPWR = 0x68080000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_STBY = 0x68100000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_V2_EN_2 = 0x68200000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG_PRI_ADJ = 0x68400000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ0 = 0x68800000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ1 = 0x69000000, -+ -+ SSP_PCAP_ADJ_BIT_SYS_RST_CLR = 0x6c000001, -+ SSP_PCAP_ADJ_BIT_SYS_RST_MODE0 = 0x6c000002, -+ SSP_PCAP_ADJ_BIT_SYS_RST_MODE1 = 0x6c000004, -+ SSP_PCAP_ADJ_BIT_SYS_VFLASH_0 = 0x6c000008, -+ SSP_PCAP_ADJ_BIT_SYS_VFLASH_1 = 0x6c000010, -+ SSP_PCAP_ADJ_BIT_SYS_MID_SELECT = 0x6c000020, -+ SSP_PCAP_ADJ_BIT_SYS_MID_FET = 0x6c000040, -+ SSP_PCAP_ADJ_BIT_SYS_MAIN_LOW = 0x6c000080, -+ SSP_PCAP_ADJ_BIT_SYS_BATTFB_DIS = 0x6c000100, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG9 = 0x6c000200, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG10 = 0x6c000400, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG11 = 0x6c000800, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG12 = 0x6c001000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG13 = 0x6c002000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG14 = 0x6c004000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG15 = 0x6c008000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG16 = 0x6c010000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG17 = 0x6c020000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG18 = 0x6c040000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG19 = 0x6c080000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG20 = 0x6c100000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG21 = 0x6c200000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG22 = 0x6c400000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG23 = 0x6c800000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG24 = 0x6d000000 -+ -+}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE; -+ -+/************************ FUNCTION PROTOTYPES **************************************/ -+extern void ssp_pcap_init(void); -+extern void ssp_pcap_release(void); -+ -+extern void ssp_pcap_open(SSP_PCAP_INIT_DRIVER_TYPE portType); -+extern void ssp_pcap_close(void); -+ -+extern void ssp_pcap_intoSleep_callBack(void); -+extern void ssp_pcap_wakeUp_callBack(void); -+ -+ -+extern SSP_PCAP_STATUS SSP_PCAP_write_data_to_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,U32 ssp_pcap_register_value); -+extern SSP_PCAP_STATUS SSP_PCAP_read_data_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,P_U32 p_ssp_pcap_register_value); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_bit_set(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_STATUS SSP_PCAP_bit_clean(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern U32 SSP_PCAP_get_register_value_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register ) ; -+ -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_mode_set(TOUCH_SCREEN_DETECT_TYPE mode_Type ); -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_start_XY_read(void); -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_get_XY_value(P_U16 p_x,P_U16 p_y); -+extern SSP_PCAP_STATUS SSP_PCAP_CDC_CLK_set(PHONE_CDC_CLOCK_TYPE clkType); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_CDC_SR_set(ST_SAMPLE_RATE_TYPE srType); -+extern SSP_PCAP_STATUS SSP_PCAP_BCLK_set(ST_BCLK_TIME_SLOT_TYPE bclkType); -+extern SSP_PCAP_STATUS SSP_PCAP_STCLK_set(ST_CLK_TYPE stClkType); -+extern SSP_PCAP_STATUS SSP_PCAP_DIG_AUD_FS_set(DIG_AUD_MODE_TYPE fsType); -+extern SSP_PCAP_STATUS SSP_PCAP_AUDIG_set(U32 audioInGain); -+extern SSP_PCAP_STATUS SSP_PCAP_MONO_set(MONO_TYPE monoType); -+extern SSP_PCAP_STATUS SSP_PCAP_AUDOG_set(U32 audioOutGain); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_V_VIB_level_set(VibratorVoltageLevel_TYPE VIBLevelType); -+extern SSP_PCAP_STATUS SSP_PCAP_configure_USB_UART_transeiver(SSP_PCAP_PORT_TYPE portType); -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_audio_in_status(void); -+ -+/* for log */ -+extern void pcap_log_add_pure_data(u8* pData,u32 len); -+extern void pcap_log_add_data(u8* pData,u32 len); -+ -+/* screen lock on/off handler */ -+extern void ssp_pcap_screenlock_lock(u32 data); -+extern void ssp_pcap_screenlock_unlock(u32 data); -+ -+#endif -Index: linux-2.6.20.7/include/asm-arm/arch-pxa/irqs.h -=================================================================== ---- linux-2.6.20.7.orig/include/asm-arm/arch-pxa/irqs.h 2007-04-21 08:26:32.000000000 -0300 -+++ linux-2.6.20.7/include/asm-arm/arch-pxa/irqs.h 2007-04-21 08:26:37.000000000 -0300 -@@ -176,7 +176,8 @@ - #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) - #elif defined(CONFIG_ARCH_LUBBOCK) || \ - defined(CONFIG_MACH_LOGICPD_PXA270) || \ -- defined(CONFIG_MACH_MAINSTONE) -+ defined(CONFIG_MACH_MAINSTONE) || \ -+ defined(CONFIG_PXA_EZX) - #define NR_IRQS (IRQ_BOARD_END) - #else - #define NR_IRQS (IRQ_BOARD_START) -@@ -222,3 +223,16 @@ - #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) - #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2) - #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3) -+ -+/* EZX Interrupts (CONFIG_EZX) */ -+#define EZX_IRQ(x) (IRQ_BOARD_START + (x)) -+#define EZX_IRQ_ADCDONE EZX_IRQ(0) /* PCAP */ -+#define EZX_IRQ_TS EZX_IRQ(1) /* PCAP */ -+#define EZX_IRQ_USB4V EZX_IRQ(2) /* PCAP */ -+#define EZX_IRQ_USB1V EZX_IRQ(3) /* PCAP */ -+#define EZX_IRQ_HEADJACK EZX_IRQ(4) /* PCAP */ -+#define EZX_IRQ_MIC EZX_IRQ(5) /* PCAP */ -+#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* PCAP */ -+#define EZX_IRQ_ONOFF EZX_IRQ(7) -+#define EZX_IRQ_ONOFF2 EZX_IRQ(8) -+ -Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 08:26:37.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-21 08:45:09.000000000 -0300 -@@ -18,7 +18,7 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o --obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o - - # Support for blinky lights - led-y := leds.o -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/ezx.c 2007-04-21 08:26:37.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx.c 2007-04-21 08:51:15.000000000 -0300 -@@ -73,6 +73,24 @@ - .clk_pcap = 1, - }; - -+/* PCAP */ -+static struct resource ezxpcap_resources[] = { -+ [0] = { -+ .start = IRQ_GPIO1, -+ .end = IRQ_GPIO1, -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+struct platform_device ezxpcap_device = { -+ .name = "ezx-pcap", -+ .id = -1, -+ .dev = { -+ .parent = &ezxssp_device.dev, -+ }, -+ .num_resources = ARRAY_SIZE(ezxpcap_resources), -+ .resource = ezxpcap_resources, -+}; - - /* OHCI Controller */ - -@@ -236,7 +254,7 @@ - }; - - --static struct resource ezx_bp_resources[] = { -+static struct resource ezxbp_resources[] = { - [0] = { - .start = GPIO_BP_RDY, - .end = GPIO_BP_RDY, -@@ -256,15 +274,15 @@ - #endif - }; - --static struct platform_device ezx_bp_device = { -+static struct platform_device ezxbp_device = { - .name = "ezx-bp", - .dev = { - //.parent = - //.platform_data = - }, - .id = -1, -- .num_resources = ARRAY_SIZE(ezx_bp_resources), -- .resource = ezx_bp_resources, -+ .num_resources = ARRAY_SIZE(ezxbp_resources), -+ .resource = ezxbp_resources, - }; - - static void __init ezx_init_gpio_irq(void) -@@ -297,7 +315,8 @@ - - static struct platform_device *devices[] __initdata = { - &ezxssp_device, -- &ezx_bp_device, -+ &ezxpcap_device, -+ &ezxbp_device, - }; - - static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.20.7/ezx-serial-bug-workaround.patch b/packages/linux/linux-ezx-2.6.20.7/ezx-serial-bug-workaround.patch deleted file mode 100644 index 9f30cc35fe..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/ezx-serial-bug-workaround.patch +++ /dev/null @@ -1,45 +0,0 @@ -Work around some errata in the pxa serial code (copied from motorolas 2.4.x tree) - -Index: linux-2.6.20.7/drivers/serial/pxa.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/serial/pxa.c 2007-04-21 13:57:46.000000000 -0300 -+++ linux-2.6.20.7/drivers/serial/pxa.c 2007-04-21 14:05:03.000000000 -0300 -@@ -29,6 +29,10 @@ - #define SUPPORT_SYSRQ - #endif - -+#define pxa_buggy_port(x) ({ \ -+ int cpu_ver; asm("mrc%? p15, 0, %0, c0, c0" : "=r" (cpu_ver)); \ -+ ((x) == PORT_PXA && (cpu_ver & ~1) == 0x69052100); }) -+ - #include - #include - #include -@@ -195,7 +199,7 @@ - if (uart_circ_empty(xmit)) - serial_pxa_stop_tx(&up->port); - } -- -+static inline irqreturn_t serial_pxa_irq(int, void *); - static void serial_pxa_start_tx(struct uart_port *port) - { - struct uart_pxa_port *up = (struct uart_pxa_port *)port; -@@ -203,6 +207,8 @@ - if (!(up->ier & UART_IER_THRI)) { - up->ier |= UART_IER_THRI; - serial_out(up, UART_IER, up->ier); -+ if (pxa_buggy_port(up->port.type)) -+ serial_pxa_irq(up->port.irq, NULL); - } - } - -@@ -298,6 +304,9 @@ - - mcr |= up->mcr; - -+ if (pxa_buggy_port(up->port.type) && up->port.irq != 0) -+ mcr ^= UART_MCR_OUT2; -+ - serial_out(up, UART_MCR, mcr); - } - diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-fix-init-errorpath.patch b/packages/linux/linux-ezx-2.6.20.7/mux-fix-init-errorpath.patch deleted file mode 100644 index 716ef86fd1..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-fix-init-errorpath.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:10:32.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:42:23.000000000 +0100 -@@ -811,7 +811,6 @@ - /*init the related mux interface*/ - if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { - err("usb_ipc_init: Out of memory."); -- usb_deregister(&usb_ipc_driver); - return -ENOMEM; - } - bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); -@@ -819,7 +818,6 @@ - if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { - err("usb_ipc_init: Not enough memory for the input buffer."); - kfree(bvd_ipc); -- usb_deregister(&usb_ipc_driver); - return -ENOMEM; - } - bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-fix-makefile.patch b/packages/linux/linux-ezx-2.6.20.7/mux-fix-makefile.patch deleted file mode 100644 index f7884ca524..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-fix-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/Makefile -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/Makefile 2007-04-22 10:51:23.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/Makefile 2007-04-22 10:52:48.000000000 +0200 -@@ -101,7 +101,8 @@ - obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o - obj-$(CONFIG_TCG_TPM) += tpm/ - --obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o -+obj-$(CONFIG_TS0710_MUX_USB) += ts0710_mux_usb.o -+obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o - - - # Files generated that shall be removed upon make clean diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-fix-tty-driver.patch b/packages/linux/linux-ezx-2.6.20.7/mux-fix-tty-driver.patch deleted file mode 100644 index 2e1aabd952..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-fix-tty-driver.patch +++ /dev/null @@ -1,125 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 10:51:31.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 10:53:05.000000000 +0200 -@@ -241,7 +241,8 @@ - static volatile __u8 mux_recv_info_flags[NR_MUXS]; - static mux_recv_struct *mux_recv_queue = NULL; - --static struct tty_driver mux_driver; -+// Local for 2.6? -+static struct tty_driver *mux_driver; - - #ifdef USB_FOR_MUX - #define COMM_FOR_MUX_DRIVER usb_for_mux_driver -@@ -3007,6 +3008,7 @@ - #else - mux_tty[line]++; - dlci = tty2dlci[line]; -+ mux_table[line] = tty; - - /* if( dlci == 1 ) { */ - /* Open server channel 0 first */ -@@ -3087,6 +3089,7 @@ - } - } - -+ - retval = 0; - #endif - out: -@@ -3894,43 +3897,50 @@ - INIT_WORK(&receive_tqueue, receive_worker, NULL); - INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); - -- memset(&mux_driver, 0, sizeof(struct tty_driver)); -- memset(&mux_tty, 0, sizeof(mux_tty)); -- mux_driver.magic = TTY_DRIVER_MAGIC; -- mux_driver.driver_name = "ts0710mux"; -- mux_driver.name = "ts0710mux"; -- mux_driver.major = TS0710MUX_MAJOR; -- mux_driver.minor_start = TS0710MUX_MINOR_START; -- mux_driver.num = NR_MUXS; -- mux_driver.type = TTY_DRIVER_TYPE_SERIAL; -- mux_driver.subtype = SERIAL_TYPE_NORMAL; -- mux_driver.init_termios = tty_std_termios; -- mux_driver.init_termios.c_iflag = 0; -- mux_driver.init_termios.c_oflag = 0; -- mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; -- mux_driver.init_termios.c_lflag = 0; -- mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -- -- mux_driver.ttys = mux_table; -- mux_driver.termios = mux_termios; -- mux_driver.termios_locked = mux_termios_locked; -+ mux_driver = alloc_tty_driver(NR_MUXS); -+ if (!mux_driver) -+ return -ENOMEM; -+ -+ mux_driver->owner = THIS_MODULE; -+ mux_driver->driver_name = "ts0710mux"; -+ mux_driver->name = "mux"; -+ mux_driver->devfs_name = "mux"; -+ mux_driver->major = TS0710MUX_MAJOR; -+ mux_driver->minor_start = TS0710MUX_MINOR_START; -+ mux_driver->type = TTY_DRIVER_TYPE_SERIAL; -+ mux_driver->subtype = SERIAL_TYPE_NORMAL; -+ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ -+ mux_driver->init_termios = tty_std_termios; -+ mux_driver->init_termios.c_iflag = 0; -+ mux_driver->init_termios.c_oflag = 0; -+ mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; -+ mux_driver->init_termios.c_lflag = 0; -+ -+// mux_driver.ttys = mux_table; -+ mux_driver->termios = mux_termios; -+ mux_driver->termios_locked = mux_termios_locked; - // mux_driver.driver_state = mux_state; -- mux_driver.other = NULL; -+ mux_driver->other = NULL; - -- mux_driver.open = mux_open; -- mux_driver.close = mux_close; -- mux_driver.write = mux_write; -- mux_driver.write_room = mux_write_room; -- mux_driver.flush_buffer = mux_flush_buffer; -- mux_driver.chars_in_buffer = mux_chars_in_buffer; -- mux_driver.throttle = mux_throttle; -- mux_driver.unthrottle = mux_unthrottle; -- mux_driver.ioctl = mux_ioctl; -- mux_driver.owner = THIS_MODULE; -+ mux_driver->open = mux_open; -+ mux_driver->close = mux_close; -+ mux_driver->write = mux_write; -+ mux_driver->write_room = mux_write_room; -+ mux_driver->flush_buffer = mux_flush_buffer; -+ mux_driver->chars_in_buffer = mux_chars_in_buffer; -+ mux_driver->throttle = mux_throttle; -+ mux_driver->unthrottle = mux_unthrottle; -+ mux_driver->ioctl = mux_ioctl; - -- if (tty_register_driver(&mux_driver)) -+ // FIXME: No panic() here -+ if (tty_register_driver(mux_driver)) - panic("Couldn't register mux driver"); - -+ for (j=0; jcur_altsetting->desc; -- endpoint = &intf->cur_altsetting->endpoint[0].desc; - /* Start checking for two bulk endpoints or ... FIXME: This is a future - * enhancement...*/ - bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", -@@ -638,30 +637,26 @@ - - ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; - -- bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", -- (&endpoint[0])->bEndpointAddress); -- bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", -- (&endpoint[1])->bEndpointAddress); -- - while (ep_cnt < interface->bNumEndpoints) { -- -- if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { -- bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", -- (&endpoint[ep_cnt])->bEndpointAddress); -- have_bulk_in_mux = -- (&endpoint[ep_cnt])->bEndpointAddress; -- readsize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ endpoint = &intf->cur_altsetting->endpoint[ep_cnt].desc; -+ bvd_dbg("usb_ipc_probe: endpoint[%i] is: %x", ep_cnt, -+ endpoint->bEndpointAddress); -+ -+ if (!have_bulk_in_mux && IS_EP_BULK_IN(*endpoint)) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is: %x ", -+ endpoint->bEndpointAddress); -+ have_bulk_in_mux = endpoint->bEndpointAddress; -+ readsize = endpoint->wMaxPacketSize; - bvd_dbg("usb_ipc_probe: readsize=%d", readsize); - ep_cnt++; - continue; - } - -- if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { -- bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", -- (&endpoint[ep_cnt])->bEndpointAddress); -- have_bulk_out_mux = -- (&endpoint[ep_cnt])->bEndpointAddress; -- writesize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ if (!have_bulk_out_mux && IS_EP_BULK_OUT(*endpoint)) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is: %x ", -+ endpoint->bEndpointAddress); -+ have_bulk_out_mux = endpoint->bEndpointAddress; -+ writesize = endpoint->wMaxPacketSize; - bvd_dbg("usb_ipc_probe: writesize=%d", writesize); - ep_cnt++; - continue; -@@ -718,21 +713,27 @@ - bvd_ipc->bh_bp.func = usbipc_bh_bp_func; - bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; - -+ bvd_dbg("after assignements"); - /*Build a write urb*/ -+ usb_init_urb(&bvd_ipc->writeurb_mux); - usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, - usb_sndbulkpipe(bvd_ipc->ipc_dev, - bvd_ipc->bulk_out_ep_mux), - bvd_ipc->obuf, writesize, usb_ipc_write_bulk, - bvd_ipc); - //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ bvd_dbg("after write urb"); - - /*Build a read urb and send a IN token first time*/ -+ usb_init_urb(&bvd_ipc->readurb_mux); - usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, - usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), - bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); - //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ bvd_dbg("after read urb"); - -- usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ //usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ bvd_dbg("after claim interface"); - //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); - - // a2590c: dsplog is not supported by this driver -@@ -740,6 +741,8 @@ - // &ipccfg->interface[2], bvd_ipc); - /*send a IN token first time*/ - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ bvd_dbg("after assignement"); -+ - if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) - printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); - -@@ -750,7 +753,7 @@ - tasklet_schedule(&bvd_ipc->bh); - } - -- printk("usb_ipc_probe: completed probe!"); -+ printk("usb_ipc_probe: completed probe!\n"); - usb_set_intfdata(intf, &bvd_ipc); - return 0; - } -@@ -760,21 +763,23 @@ - //struct usb_device *usbdev = interface_to_usbdev(intf); - struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); - -- printk("usb_ipc_disconnect:*** \n"); - -+ printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); -+ -+ //FIXME: Memory leak? - if ((UHCRHPS3 & 0x4) == 0) -- usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); -+ // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); - -- usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); -+ //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); - - bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; - kfree(bvd_ipc_disconnect->ibuf); - kfree(bvd_ipc_disconnect->obuf); - -- usb_driver_release_interface(&usb_ipc_driver, -- bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -- usb_driver_release_interface(&usb_ipc_driver, -- bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); -+ //usb_driver_release_interface(&usb_ipc_driver, -+ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -+ //usb_driver_release_interface(&usb_ipc_driver, -+ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); - - //a2590c: dsplog interface is not supported by this driver - //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); -@@ -803,13 +808,6 @@ - int result; - - bvd_dbg("init usb_ipc"); -- /* register driver at the USB subsystem */ -- result = usb_register(&usb_ipc_driver); -- if (result < 0) { -- err ("usb ipc driver could not be registered"); -- return result; -- } -- - /*init the related mux interface*/ - if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { - err("usb_ipc_init: Out of memory."); -@@ -836,6 +834,14 @@ - usb_for_mux_driver = &ipcusb_tty_driver; - usb_for_mux_tty = &ipcusb_tty; - -+ /* register driver at the USB subsystem */ -+ // this was called before bvd_ipc was allocated -+ result = usb_register(&usb_ipc_driver); -+ if (result < 0) { -+ err ("usb ipc driver could not be registered"); -+ return result; -+ } -+ - /* init timers for ipcusb read process and usb suspend */ - init_timer(&ipcusb_timer); - ipcusb_timer.function = ipcusb_timeout; diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-ifdef-ezx-features.patch b/packages/linux/linux-ezx-2.6.20.7/mux-ifdef-ezx-features.patch deleted file mode 100644 index f9ad633c76..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-ifdef-ezx-features.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -pruN linux-2.6.20.7/drivers/char/ts0710_mux_usb.c linux-2.6.20.7_x386/drivers/char/ts0710_mux_usb.c ---- linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-22 10:51:38.000000000 +0200 -+++ linux-2.6.20.7_x386/drivers/char/ts0710_mux_usb.c 2007-04-22 11:44:54.000000000 +0200 -@@ -35,10 +35,14 @@ - #include - #include - #include -+ -+#ifdef CONFIG_PXA_EZX - #include - #include - #include - #include -+#endif -+ - #include - #include - #include -@@ -341,8 +345,10 @@ static void usb_ipc_write_bulk(struct ur - - static void wakeup_timeout(unsigned long data) - { -+#ifdef CONFIG_PXA_EZX - GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); - bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); -+#endif - } - - static void suspend_timeout(unsigned long data) -@@ -353,10 +359,12 @@ static void suspend_timeout(unsigned lon - bvd_dbg("suspend_timeout: add the suspend timer again"); - } else { - unlink_urbs(&bvd_ipc->readurb_mux); -+#ifdef CONFIG_PXA_EZX - UHCRHPS3 = 0x4; - mdelay(40); - bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", - UHCRHPS3); -+#endif - } - } - -@@ -404,6 +412,7 @@ static void ipcusb_xmit_data(void) - bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; - bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); - -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0x4) { - static int ret; - int time = 0; -@@ -442,6 +451,7 @@ static void ipcusb_xmit_data(void) - "failed! status=%d\n", ret); - bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); - } -+#endif - - sumbit_times++; - bvd_ipc->write_finished_flag = 0; -@@ -464,12 +474,16 @@ static void usbipc_bh_func(unsigned long - - static void usbipc_bh_bp_func(unsigned long param) - { -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0x4) { - UHCRHPS3 = 0x8; -+#endif - mdelay(40); -+#ifdef CONFIG_PXA_EZX - bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " - "UHCRHPS3=0x%x", UHCRHPS3); - } -+#endif - if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { - //get_halted_bit(); - -@@ -734,7 +748,9 @@ static void usb_ipc_disconnect(struct us - printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); - - //FIXME: Memory leak? -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0) -+#endif - // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); - - //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-linux-2.6.20.7-fix.patch b/packages/linux/linux-ezx-2.6.20.7/mux-linux-2.6.20.7-fix.patch deleted file mode 100644 index bc6e3972b6..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-linux-2.6.20.7-fix.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -pruN linux-2.6.20.7/drivers/char/ts0710.h linux-2.6.20.7_x386/drivers/char/ts0710.h ---- linux-2.6.20.7/drivers/char/ts0710.h 2007-04-22 10:51:23.000000000 +0200 -+++ linux-2.6.20.7_x386/drivers/char/ts0710.h 2007-04-22 11:16:37.000000000 +0200 -@@ -45,7 +45,7 @@ - * 11/18/2002 Modified - */ - --#include -+//#include - #include - - #include -@@ -58,7 +58,7 @@ - #include - #include - #include --#include -+//#include - - #include - #include -diff -pruN linux-2.6.20.7/drivers/char/ts0710_mux.c linux-2.6.20.7_x386/drivers/char/ts0710_mux.c ---- linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 10:53:05.000000000 +0200 -+++ linux-2.6.20.7_x386/drivers/char/ts0710_mux.c 2007-04-22 11:20:07.000000000 +0200 -@@ -46,7 +46,7 @@ - * 11/18/2002 Second version - * 04/21/2004 Add GPRS PROC - */ --#include -+//#include - #include - #include - -@@ -70,7 +70,7 @@ - #include - #include - #include --#include -+//#include - //#include - - #include -@@ -1894,11 +1894,14 @@ int ts0710_recv_data(ts0710_con * ts0710 - if (test_bit(TTY_THROTTLED, &tty->flags)) { - queue_data = 1; - } else { -+ /* - if (test_bit - (TTY_DONT_FLIP, &tty->flags)) { - queue_data = 1; - post_recv = 1; -- } else if (recv_info->total) { -+ } else -+ */ -+ if (recv_info->total) { - queue_data = 1; - post_recv = 1; - } else if (recv_room < uih_len) { -@@ -3499,11 +3502,14 @@ static void post_recv_worker(void *priva - if (test_bit(TTY_THROTTLED, &tty->flags)) { - add_post_recv_queue(&post_recv_q, recv_info); - continue; -- } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { -+ } -+ /* -+ else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { - post_recv = 1; - add_post_recv_queue(&post_recv_q, recv_info); - continue; - } -+ */ - - flow_control = 0; - recv_packet2 = recv_info->mux_packet; -@@ -3893,9 +3899,9 @@ static int __init mux_init(void) - } - post_recv_count_flag = 0; - -- INIT_WORK(&send_tqueue, send_worker, NULL); -- INIT_WORK(&receive_tqueue, receive_worker, NULL); -- INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); -+ INIT_WORK(&send_tqueue, send_worker); -+ INIT_WORK(&receive_tqueue, receive_worker); -+ INIT_WORK(&post_recv_tqueue, post_recv_worker); - - mux_driver = alloc_tty_driver(NR_MUXS); - if (!mux_driver) -@@ -3904,7 +3910,7 @@ static int __init mux_init(void) - mux_driver->owner = THIS_MODULE; - mux_driver->driver_name = "ts0710mux"; - mux_driver->name = "mux"; -- mux_driver->devfs_name = "mux"; -+ //mux_driver->devfs_name = "mux"; - mux_driver->major = TS0710MUX_MAJOR; - mux_driver->minor_start = TS0710MUX_MINOR_START; - mux_driver->type = TTY_DRIVER_TYPE_SERIAL; diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-remove-flipbuffers.patch b/packages/linux/linux-ezx-2.6.20.7/mux-remove-flipbuffers.patch deleted file mode 100644 index d4781f9fc7..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-remove-flipbuffers.patch +++ /dev/null @@ -1,269 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:25.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:26.000000000 +0100 -@@ -133,6 +133,7 @@ - - struct circ_buf xmit; /* write cric bufffer */ - struct list_head in_buf_list; -+ spinlock_t in_buf_lock; - char bulk_in_ep_mux, - bulk_out_ep_mux, - bulk_in_ep_dsplog; -@@ -204,9 +205,39 @@ - return; - } - memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); -+ spin_lock(&bvd_ipc->in_buf_lock); - list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); -+ spin_unlock(&bvd_ipc->in_buf_lock); - } - -+int get_from_inbuf_list(const unsigned char *buf, int dst_count) -+{ -+ int ret = 0; -+ spin_lock(&bvd_ipc->in_buf_lock); -+ if (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int src_count; -+ buf_list_t *inbuf; -+ struct list_head *ptr; -+ -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry(ptr, buf_list_t, list); -+ src_count = inbuf->size; -+ if (dst_count >= src_count) { -+ memcpy(buf, inbuf->body, src_count); -+ ret = src_count; -+ list_del(ptr); -+ kfree(inbuf->body); -+ kfree(inbuf); -+ } else { -+ bvd_dbg("get_from_inbuf_list: not enough space in destination buffer"); -+ } -+ } -+ spin_unlock(&bvd_ipc->in_buf_lock); -+ -+ return ret; -+} -+EXPORT_SYMBOL(get_from_inbuf_list); -+ - static void ipcusb_timeout(unsigned long data) - { - struct tty_struct *tty = &ipcusb_tty; -@@ -214,13 +245,14 @@ - - bvd_dbg("ipcusb_timeout***"); - -+ spin_lock(&bvd_ipc->in_buf_lock); - while (!(list_empty(&bvd_ipc->in_buf_list))) { - int count; - buf_list_t *inbuf; - struct list_head *ptr = NULL; - - ptr = bvd_ipc->in_buf_list.next; -- inbuf = list_entry (ptr, buf_list_t, list); -+ inbuf = list_entry(ptr, buf_list_t, list); - count = inbuf->size; - if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { - list_del(ptr); -@@ -232,10 +264,12 @@ - break; - } - } -+ spin_unlock(&bvd_ipc->in_buf_lock); - - if (usb_mux_dispatcher) - usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ - -+ spin_lock(&bvd_ipc->in_buf_lock); - if (list_empty(&bvd_ipc->in_buf_list)) { - urb->actual_length = 0; - urb->dev = bvd_ipc->ipc_dev; -@@ -246,6 +280,7 @@ - ipcusb_timer.data = (unsigned long)urb; - mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); - } -+ spin_unlock(&bvd_ipc->in_buf_lock); - } - - static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -@@ -266,69 +301,11 @@ - if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) - (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); - -- if (!(list_empty(&bvd_ipc->in_buf_list))) { -- int need_mux = 0; -- -- bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); -- if (count > 0) { -- bvd_ipc->suspend_flag = 1; -- append_to_inbuf_list(urb); /* append the current received urb */ --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif -- } -- -- while (!(list_empty(&bvd_ipc->in_buf_list))) { -- struct list_head* ptr = NULL; -- ptr = bvd_ipc->in_buf_list.next; -- inbuf = list_entry(ptr, buf_list_t, list); -- count = inbuf->size; -- need_mux = 1; -- -- tty_insert_flip_string(tty, inbuf->body, count); -- -- list_del(ptr); -- kfree(inbuf->body); -- inbuf->body = NULL; -- kfree(inbuf); -- } -- -- if (usb_mux_dispatcher && need_mux) -- usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -- -- if (list_empty(&bvd_ipc->in_buf_list)) { -- urb->actual_length = 0; -- urb->dev = bvd_ipc->ipc_dev; -- if (usb_submit_urb(urb, GFP_ATOMIC)) -- bvd_dbg("usb_ipc_read_bulk: " -- "failed resubmitting read urb"); -- bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -- } else { -- ipcusb_timer.data = (unsigned long)urb; -- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -- } -- } else if (count > 0) { -- bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); -+ if (count > 0) { -+ bvd_dbg("usb_ipc_read_bulk: inserting buffer into in_buf_list"); - bvd_ipc->suspend_flag = 1; - -- if (tty_insert_flip_string(tty, urb->transfer_buffer, -- count) < count) { -- bvd_ipc->suspend_flag = 1; -- append_to_inbuf_list(urb); -- ipcusb_timer.data = (unsigned long)urb; -- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif -- } -+ append_to_inbuf_list(urb); - - if (usb_mux_dispatcher) - usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -@@ -337,13 +314,6 @@ - urb->dev = bvd_ipc->ipc_dev; - if (usb_submit_urb(urb, GFP_ATOMIC)) - bvd_dbg("failed resubmitting read urb"); --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif - bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); - } - -@@ -705,7 +675,8 @@ - bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; - bvd_ipc->ipc_dev = usbdev; - bvd_ipc->writesize = writesize; -- INIT_LIST_HEAD (&bvd_ipc->in_buf_list); -+ INIT_LIST_HEAD(&bvd_ipc->in_buf_list); -+ bvd_ipc->in_buf_lock = SPIN_LOCK_UNLOCKED; - - bvd_ipc->bh.func = usbipc_bh_func; - bvd_ipc->bh.data = (unsigned long) bvd_ipc; -Index: linux-2.6.16/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux.c 2007-01-17 00:52:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux.c 2007-01-17 00:52:26.000000000 +0100 -@@ -3149,7 +3149,7 @@ - static void receive_worker(void *private_) - { - struct tty_struct *tty = COMM_FOR_MUX_TTY; -- int i, count; -+ int i, count, tbuf_free, tbuf_read; - static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; - static unsigned char *tbuf_ptr = &tbuf[0]; - static unsigned char *start_flag = 0; -@@ -3167,29 +3167,39 @@ - - UNUSED_PARAM(private_); - -- if (!tty) -- return; -+ if (!tty) -+ return; -+ -+ while (1) { -+ tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); -+ TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); -+ tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); -+ if (tbuf_read == 0) { -+ break; -+ } else { -+ TS0710_PRINTK("Read %i bytes.\n", tbuf_read); -+ }; -+ tbuf_ptr += tbuf_read; -+ }; -+ -+ count = (tbuf_ptr - tbuf); -+ -+ // Should be impossible? -+ //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -+ // TS0710_PRINTK -+ // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -+ // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -+ //} - - #ifdef USB_FOR_MUX -- TS0710_DEBUG("Receive following bytes from IPC-USB"); -+ TS0710_DEBUG("Received following bytes from IPC-USB"); - #else -- TS0710_DEBUG("Receive following bytes from UART"); -+ TS0710_DEBUG("Received following bytes from UART"); - #endif -- -- TS0710_DEBUGHEX(cp, count); -- -- if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -- TS0710_PRINTK -- ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -- count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -- } -- -- count = tty_buffer_request_room(tty, count); -- -- for (i = 0; i < count; i++) -- tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); -- -- tbuf_ptr += count; -+ TS0710_DEBUGHEX(tbuf, count); -+ -+ //gets updated above -+ //tbuf_ptr += count; - search = &tbuf[0]; - - if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.h -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:26.000000000 +0100 -@@ -27,3 +27,6 @@ - extern struct tty_struct *usb_for_mux_tty; - extern void (*usb_mux_dispatcher)(struct tty_struct *tty); - extern void (*usb_mux_sender)(void); -+ -+extern int get_from_inbuf_list(const unsigned char *buf, int dst_count); -+ diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-remove-get_halted_bit.patch b/packages/linux/linux-ezx-2.6.20.7/mux-remove-get_halted_bit.patch deleted file mode 100644 index 0ebe27d03b..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-remove-get_halted_bit.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:21.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:31.000000000 +0100 -@@ -461,7 +461,7 @@ - ipcusb_xmit_data(); - } - --extern void get_halted_bit(void); -+//extern void get_halted_bit(void); - - static void usbipc_bh_bp_func(unsigned long param) - { -@@ -472,7 +472,7 @@ - "UHCRHPS3=0x%x", UHCRHPS3); - } - if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { -- get_halted_bit(); -+ //get_halted_bit(); - - /*send a IN token*/ - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; diff --git a/packages/linux/linux-ezx-2.6.20.7/mux-remove-usbh_finished_resume.patch b/packages/linux/linux-ezx-2.6.20.7/mux-remove-usbh_finished_resume.patch deleted file mode 100644 index c415ded428..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux-remove-usbh_finished_resume.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:37.000000000 +0100 -@@ -97,7 +97,6 @@ - static int sumbit_times = 0; - static int callback_times = 0; - //static unsigned long last_jiff = 0; --extern int usbh_finished_resume; - /*end global values defined*/ - - MODULE_AUTHOR(DRIVER_AUTHOR); -@@ -546,9 +545,6 @@ - void usb_send_readurb(void) - { - //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); -- -- if (usbh_finished_resume == 0) -- return; - - tasklet_schedule(&bvd_ipc->bh_bp); - } diff --git a/packages/linux/linux-ezx-2.6.20.7/mux_cli.patch b/packages/linux/linux-ezx-2.6.20.7/mux_cli.patch deleted file mode 100644 index c86e3b40e4..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux_cli.patch +++ /dev/null @@ -1,5395 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/Kconfig -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/Kconfig 2007-04-13 22:48:14.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/Kconfig 2007-04-21 18:04:56.000000000 +0200 -@@ -1030,5 +1030,17 @@ - sysfs directory, /sys/devices/platform/telco_clock, with a number of - files for controlling the behavior of this hardware. - -+config TS0710_MUX -+ tristate "GSM TS 07.10 Multiplex driver" -+ help -+ This implements the GSM 07.10 multiplex. -+ -+config TS0710_MUX_USB -+ tristate "Motorola USB support for TS 07.10 Multiplex driver" -+ depends on TS0710_MUX -+ help -+ This ads support for TS 07.10 over USB, as found in motorola -+ Smartphones. -+ - endmenu - -Index: linux-2.6.20.7/drivers/char/Makefile -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/Makefile 2007-04-13 22:48:14.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/Makefile 2007-04-21 18:06:42.000000000 +0200 -@@ -101,6 +101,9 @@ - obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o - obj-$(CONFIG_TCG_TPM) += tpm/ - -+obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o -+ -+ - # Files generated that shall be removed upon make clean - clean-files := consolemap_deftbl.c defkeymap.c - -Index: linux-2.6.20.7/drivers/char/ts0710.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/char/ts0710.h 2007-04-21 18:04:56.000000000 +0200 -@@ -0,0 +1,368 @@ -+/* -+ * File: ts0710.h -+ * -+ * Portions derived from rfcomm.c, original header as follows: -+ * -+ * Copyright (C) 2000, 2001 Axis Communications AB -+ * -+ * Author: Mats Friden -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * Exceptionally, Axis Communications AB grants discretionary and -+ * conditional permissions for additional use of the text contained -+ * in the company's release of the AXIS OpenBT Stack under the -+ * provisions set forth hereunder. -+ * -+ * Provided that, if you use the AXIS OpenBT Stack with other files, -+ * that do not implement functionality as specified in the Bluetooth -+ * System specification, to produce an executable, this does not by -+ * itself cause the resulting executable to be covered by the GNU -+ * General Public License. Your use of that executable is in no way -+ * restricted on account of using the AXIS OpenBT Stack code with it. -+ * -+ * This exception does not however invalidate any other reasons why -+ * the executable file might be covered by the provisions of the GNU -+ * General Public License. -+ * -+ */ -+/* -+ * Copyright (C) 2002 Motorola -+ * -+ * 07/28/2002 Initial version based on rfcomm.c -+ * 11/18/2002 Modified -+ */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#define TS0710_MAX_CHN 14 -+ -+#define SET_PF(ctr) ((ctr) | (1 << 4)) -+#define CLR_PF(ctr) ((ctr) & 0xef) -+#define GET_PF(ctr) (((ctr) >> 4) & 0x1) -+ -+#define GET_PN_MSG_FRAME_SIZE(pn) ( ((pn)->frame_sizeh << 8) | ((pn)->frame_sizel)) -+#define SET_PN_MSG_FRAME_SIZE(pn, size) ({ (pn)->frame_sizel = (size) & 0xff; \ -+ (pn)->frame_sizeh = (size) >> 8; }) -+ -+#define GET_LONG_LENGTH(a) ( ((a).h_len << 7) | ((a).l_len) ) -+#define SET_LONG_LENGTH(a, length) ({ (a).ea = 0; \ -+ (a).l_len = length & 0x7F; \ -+ (a).h_len = (length >> 7) & 0xFF; }) -+ -+#define SHORT_CRC_CHECK 3 -+#define LONG_CRC_CHECK 4 -+ -+/* FIXME: Should thsi one be define here? */ -+#define SHORT_PAYLOAD_SIZE 127 -+ -+#define EA 1 -+#define FCS_SIZE 1 -+#define FLAG_SIZE 2 -+ -+#define TS0710_MAX_HDR_SIZE 5 -+#define DEF_TS0710_MTU 256 -+ -+#define TS0710_BASIC_FLAG 0xF9 -+/* the control field */ -+#define SABM 0x2f -+#define SABM_SIZE 4 -+#define UA 0x63 -+#define UA_SIZE 4 -+#define DM 0x0f -+#define DISC 0x43 -+#define UIH 0xef -+ -+/* the type field in a multiplexer command packet */ -+#define TEST 0x8 -+#define FCON 0x28 -+#define FCOFF 0x18 -+#define MSC 0x38 -+#define RPN 0x24 -+#define RLS 0x14 -+#define PN 0x20 -+#define NSC 0x4 -+ -+/* V.24 modem control signals */ -+#define FC 0x2 -+#define RTC 0x4 -+#define RTR 0x8 -+#define IC 0x40 -+#define DV 0x80 -+ -+#define CTRL_CHAN 0 /* The control channel is defined as DLCI 0 */ -+#define MCC_CMD 1 /* Multiplexer command cr */ -+#define MCC_RSP 0 /* Multiplexer response cr */ -+ -+#ifdef __LITTLE_ENDIAN_BITFIELD -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 cr:1; -+ __u8 d:1; -+ __u8 server_chn:5; -+} __attribute__ ((packed)) address_field; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 len:7; -+} __attribute__ ((packed)) short_length; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 l_len:7; -+ __u8 h_len; -+} __attribute__ ((packed)) long_length; -+ -+typedef struct { -+ address_field addr; -+ __u8 control; -+ short_length length; -+} __attribute__ ((packed)) short_frame_head; -+ -+typedef struct { -+ short_frame_head h; -+ __u8 data[0]; -+} __attribute__ ((packed)) short_frame; -+ -+typedef struct { -+ address_field addr; -+ __u8 control; -+ long_length length; -+ __u8 data[0]; -+} __attribute__ ((packed)) long_frame_head; -+ -+typedef struct { -+ long_frame_head h; -+ __u8 data[0]; -+} __attribute__ ((packed)) long_frame; -+ -+/* Typedefinitions for structures used for the multiplexer commands */ -+typedef struct { -+ __u8 ea:1; -+ __u8 cr:1; -+ __u8 type:6; -+} __attribute__ ((packed)) mcc_type; -+ -+typedef struct { -+ mcc_type type; -+ short_length length; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_short_frame_head; -+ -+typedef struct { -+ mcc_short_frame_head h; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_short_frame; -+ -+typedef struct { -+ mcc_type type; -+ long_length length; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_long_frame_head; -+ -+typedef struct { -+ mcc_long_frame_head h; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_long_frame; -+ -+/* MSC-command */ -+typedef struct { -+ __u8 ea:1; -+ __u8 fc:1; -+ __u8 rtc:1; -+ __u8 rtr:1; -+ __u8 reserved:2; -+ __u8 ic:1; -+ __u8 dv:1; -+} __attribute__ ((packed)) v24_sigs; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 b1:1; -+ __u8 b2:1; -+ __u8 b3:1; -+ __u8 len:4; -+} __attribute__ ((packed)) brk_sigs; -+ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ __u8 v24_sigs; -+ //brk_sigs break_signals; -+ __u8 fcs; -+} __attribute__ ((packed)) msc_msg; -+ -+#if 0 -+/* conflict with termios.h */ -+/* RPN command */ -+#define B2400 0 -+#define B4800 1 -+#define B7200 2 -+#define B9600 3 -+#define B19200 4 -+#define B38400 5 -+#define B57600 6 -+#define B115200 7 -+#define D230400 8 -+#endif -+ -+/* -+typedef struct{ -+ __u8 bit_rate:1; -+ __u8 data_bits:1; -+ __u8 stop_bit:1; -+ __u8 parity:1; -+ __u8 parity_type:1; -+ __u8 xon_u8:1; -+ __u8 xoff_u8:1; -+ __u8 res1:1; -+ __u8 xon_input:1; -+ __u8 xon_output:1; -+ __u8 rtr_input:1; -+ __u8 rtr_output:1; -+ __u8 rtc_input:1; -+ __u8 rtc_output:1; -+ __u8 res2:2; -+} __attribute__((packed)) parameter_mask; -+ -+typedef struct{ -+ __u8 bit_rate; -+ __u8 data_bits:2; -+ __u8 stop_bit:1; -+ __u8 parity:1; -+ __u8 parity_type:2; -+ __u8 res1:2; -+ __u8 xon_input:1; -+ __u8 xon_output:1; -+ __u8 rtr_input:1; -+ __u8 rtr_output:1; -+ __u8 rtc_input:1; -+ __u8 rtc_output:1; -+ __u8 res2:2; -+ __u8 xon_u8; -+ __u8 xoff_u8; -+ parameter_mask pm; -+} __attribute__((packed)) rpn_values; -+ -+typedef struct{ -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ rpn_values rpn_val; -+ __u8 fcs; -+} __attribute__((packed)) rpn_msg; -+*/ -+ -+/* RLS-command */ -+/* -+typedef struct{ -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ __u8 error:4; -+ __u8 res:4; -+ __u8 fcs; -+} __attribute__((packed)) rls_msg; -+*/ -+ -+/* PN-command */ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ __u8 dlci:6; -+ __u8 res1:2; -+ __u8 frame_type:4; -+ __u8 credit_flow:4; -+ __u8 prior:6; -+ __u8 res2:2; -+ __u8 ack_timer; -+ __u8 frame_sizel; -+ __u8 frame_sizeh; -+ __u8 max_nbrof_retrans; -+ __u8 credits; -+ __u8 fcs; -+} __attribute__ ((packed)) pn_msg; -+ -+/* NSC-command */ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ mcc_type command_type; -+ __u8 fcs; -+} __attribute__ ((packed)) nsc_msg; -+ -+#else -+#error Only littel-endianess supported now! -+#endif -+ -+enum { -+ REJECTED = 0, -+ DISCONNECTED, -+ CONNECTING, -+ NEGOTIATING, -+ CONNECTED, -+ DISCONNECTING, -+ FLOW_STOPPED -+}; -+ -+enum ts0710_events { -+ CONNECT_IND, -+ CONNECT_CFM, -+ DISCONN_CFM -+}; -+ -+typedef struct { -+ volatile __u8 state; -+ volatile __u8 flow_control; -+ volatile __u8 initiated; -+ volatile __u8 initiator; -+ volatile __u16 mtu; -+ wait_queue_head_t open_wait; -+ wait_queue_head_t close_wait; -+} dlci_struct; -+ -+/* user space interfaces */ -+typedef struct { -+ volatile __u8 initiator; -+ volatile __u8 c_dlci; -+ volatile __u16 mtu; -+ volatile __u8 be_testing; -+ volatile __u32 test_errs; -+ wait_queue_head_t test_wait; -+ -+ dlci_struct dlci[TS0710_MAX_CHN]; -+} ts0710_con; -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-21 18:08:02.000000000 +0200 -@@ -0,0 +1,3966 @@ -+/* -+ * File: mux_driver.c -+ * -+ * Portions derived from rfcomm.c, original header as follows: -+ * -+ * Copyright (C) 2000, 2001 Axis Communications AB -+ * -+ * Author: Mats Friden -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * Exceptionally, Axis Communications AB grants discretionary and -+ * conditional permissions for additional use of the text contained -+ * in the company's release of the AXIS OpenBT Stack under the -+ * provisions set forth hereunder. -+ * -+ * Provided that, if you use the AXIS OpenBT Stack with other files, -+ * that do not implement functionality as specified in the Bluetooth -+ * System specification, to produce an executable, this does not by -+ * itself cause the resulting executable to be covered by the GNU -+ * General Public License. Your use of that executable is in no way -+ * restricted on account of using the AXIS OpenBT Stack code with it. -+ * -+ * This exception does not however invalidate any other reasons why -+ * the executable file might be covered by the provisions of the GNU -+ * General Public License. -+ * -+ */ -+/* -+ * Copyright (C) 2002-2004 Motorola -+ * Copyright (C) 2006 Harald Welte -+ * -+ * 07/28/2002 Initial version -+ * 11/18/2002 Second version -+ * 04/21/2004 Add GPRS PROC -+ */ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#define USB_FOR_MUX -+ -+#ifndef USB_FOR_MUX -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+//#include -+ -+#include -+#include -+#include -+ -+#ifdef USB_FOR_MUX -+//#include -+#include "ts0710_mux_usb.h" -+#endif -+ -+#include "ts0710.h" -+#include "ts0710_mux.h" -+ -+#define TS0710MUX_GPRS_SESSION_MAX 2 -+#define TS0710MUX_MAJOR 250 -+#define TS0710MUX_MINOR_START 0 -+#define NR_MUXS 16 -+ -+ /*#define TS0710MUX_TIME_OUT 30 *//* 300ms */ -+#define TS0710MUX_TIME_OUT 250 /* 2500ms, for BP UART hardware flow control AP UART */ -+ -+#define TS0710MUX_IO_DLCI_FC_ON 0x54F2 -+#define TS0710MUX_IO_DLCI_FC_OFF 0x54F3 -+#define TS0710MUX_IO_FC_ON 0x54F4 -+#define TS0710MUX_IO_FC_OFF 0x54F5 -+ -+#define TS0710MUX_MAX_BUF_SIZE 2048 -+ -+#define TS0710MUX_SEND_BUF_OFFSET 10 -+#define TS0710MUX_SEND_BUF_SIZE (DEF_TS0710_MTU + TS0710MUX_SEND_BUF_OFFSET + 34) -+#define TS0710MUX_RECV_BUF_SIZE TS0710MUX_SEND_BUF_SIZE -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+#define ACK_SPACE 66 /* 6 * 11(ACK frame size) */ -+#else -+#define ACK_SPACE 42 /* 6 * 7(ACK frame size) */ -+#endif -+/*For BP UART problem End*/ -+ -+ /*#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE)*//* For BP UART problem */ -+#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + ACK_SPACE) /* For BP UART problem: ACK_SPACE */ -+ -+#define TS0710MUX_MAX_TOTAL_FRAME_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + FLAG_SIZE) -+#define TS0710MUX_MAX_CHARS_IN_BUF 65535 -+#define TS0710MUX_THROTTLE_THRESHOLD DEF_TS0710_MTU -+ -+#define TEST_PATTERN_SIZE 250 -+ -+#define CMDTAG 0x55 -+#define DATATAG 0xAA -+ -+#define ACK 0x4F /*For BP UART problem */ -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+#define FIRST_BP_SEQ_OFFSET 1 /*offset from start flag */ -+#define SECOND_BP_SEQ_OFFSET 2 /*offset from start flag */ -+#define FIRST_AP_SEQ_OFFSET 3 /*offset from start flag */ -+#define SECOND_AP_SEQ_OFFSET 4 /*offset from start flag */ -+#define SLIDE_BP_SEQ_OFFSET 5 /*offset from start flag */ -+#define SEQ_FIELD_SIZE 5 -+#else -+#define SLIDE_BP_SEQ_OFFSET 1 /*offset from start flag */ -+#define SEQ_FIELD_SIZE 1 -+#endif -+ -+#define ADDRESS_FIELD_OFFSET (1 + SEQ_FIELD_SIZE) /*offset from start flag */ -+/*For BP UART problem End*/ -+ -+#ifndef UNUSED_PARAM -+#define UNUSED_PARAM(v) (void)(v) -+#endif -+ -+#define TS0710MUX_GPRS1_DLCI 7 -+#define TS0710MUX_GPRS2_DLCI 8 -+ -+#define TS0710MUX_GPRS1_RECV_COUNT_IDX 0 -+#define TS0710MUX_GPRS1_SEND_COUNT_IDX 1 -+#define TS0710MUX_GPRS2_RECV_COUNT_IDX 2 -+#define TS0710MUX_GPRS2_SEND_COUNT_IDX 3 -+#define TS0710MUX_COUNT_MAX_IDX 3 -+#define TS0710MUX_COUNT_IDX_NUM (TS0710MUX_COUNT_MAX_IDX + 1) -+ -+static volatile int mux_data_count[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; -+static volatile int mux_data_count2[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; -+static struct semaphore mux_data_count_mutex[TS0710MUX_COUNT_IDX_NUM]; -+static volatile __u8 post_recv_count_flag = 0; -+ -+/*PROC file*/ -+struct proc_dir_entry *gprs_proc_file = NULL; -+ssize_t file_proc_read(struct file *file, char *buf, size_t size, -+ loff_t * ppos); -+ssize_t file_proc_write(struct file *file, const char *buf, size_t count, -+ loff_t * ppos); -+struct file_operations file_proc_operations = { -+ read:file_proc_read, -+ write:file_proc_write, -+}; -+typedef struct { -+ int recvBytes; -+ int sentBytes; -+} gprs_bytes; -+ -+static __u8 tty2dlci[NR_MUXS] = -+ { 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, 13 }; -+static __u8 iscmdtty[NR_MUXS] = -+ { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; -+typedef struct { -+ __u8 cmdtty; -+ __u8 datatty; -+} dlci_tty; -+static dlci_tty dlci2tty[] = { {0, 0}, /* DLCI 0 */ -+{0, 0}, /* DLCI 1 */ -+{1, 1}, /* DLCI 2 */ -+{2, 2}, /* DLCI 3 */ -+{3, 3}, /* DLCI 4 */ -+{4, 4}, /* DLCI 5 */ -+{5, 8}, /* DLCI 6 */ -+{6, 9}, /* DLCI 7 */ -+{7, 10}, /* DLCI 8 */ -+{11, 11}, /* DLCI 9 */ -+{12, 12}, /* DLCI 10 */ -+{13, 13}, /* DLCI 11 */ -+{14, 14}, /* DLCI 12 */ -+{15, 15} -+}; /* DLCI 13 */ -+ -+typedef struct { -+ volatile __u8 buf[TS0710MUX_SEND_BUF_SIZE]; -+ volatile __u8 *frame; -+ unsigned long flags; -+ volatile __u16 length; -+ volatile __u8 filled; -+ volatile __u8 dummy; /* Allignment to 4*n bytes */ -+} mux_send_struct; -+ -+/* Bit number in flags of mux_send_struct */ -+#define BUF_BUSY 0 -+ -+struct mux_recv_packet_tag { -+ __u8 *data; -+ __u32 length; -+ struct mux_recv_packet_tag *next; -+}; -+typedef struct mux_recv_packet_tag mux_recv_packet; -+ -+struct mux_recv_struct_tag { -+ __u8 data[TS0710MUX_RECV_BUF_SIZE]; -+ __u32 length; -+ __u32 total; -+ mux_recv_packet *mux_packet; -+ struct mux_recv_struct_tag *next; -+ int no_tty; -+ volatile __u8 post_unthrottle; -+}; -+typedef struct mux_recv_struct_tag mux_recv_struct; -+ -+#define RECV_RUNNING 0 -+static unsigned long mux_recv_flags = 0; -+ -+static mux_send_struct *mux_send_info[NR_MUXS]; -+static volatile __u8 mux_send_info_flags[NR_MUXS]; -+static volatile __u8 mux_send_info_idx = NR_MUXS; -+ -+static mux_recv_struct *mux_recv_info[NR_MUXS]; -+static volatile __u8 mux_recv_info_flags[NR_MUXS]; -+static mux_recv_struct *mux_recv_queue = NULL; -+ -+static struct tty_driver mux_driver; -+ -+#ifdef USB_FOR_MUX -+#define COMM_FOR_MUX_DRIVER usb_for_mux_driver -+#define COMM_FOR_MUX_TTY usb_for_mux_tty -+#define COMM_MUX_DISPATCHER usb_mux_dispatcher -+#define COMM_MUX_SENDER usb_mux_sender -+#else -+#define COMM_FOR_MUX_DRIVER serial_for_mux_driver -+#define COMM_FOR_MUX_TTY serial_for_mux_tty -+#define COMM_MUX_DISPATCHER serial_mux_dispatcher -+#define COMM_MUX_SENDER serial_mux_sender -+ -+extern struct list_head *tq_serial_for_mux; -+#endif -+ -+extern struct tty_driver *COMM_FOR_MUX_DRIVER; -+extern struct tty_struct *COMM_FOR_MUX_TTY; -+extern void (*COMM_MUX_DISPATCHER) (struct tty_struct * tty); -+extern void (*COMM_MUX_SENDER) (void); -+ -+static struct work_struct send_tqueue; -+static struct work_struct receive_tqueue; -+static struct work_struct post_recv_tqueue; -+ -+static struct tty_struct *mux_table[NR_MUXS]; -+static struct termios *mux_termios[NR_MUXS]; -+static struct termios *mux_termios_locked[NR_MUXS]; -+static volatile short int mux_tty[NR_MUXS]; -+ -+#ifdef min -+#undef min -+#define min(a,b) ( (a)<(b) ? (a):(b) ) -+#endif -+ -+static int get_count(__u8 idx); -+static int set_count(__u8 idx, int count); -+static int add_count(__u8 idx, int count); -+ -+static int send_ua(ts0710_con * ts0710, __u8 dlci); -+static int send_dm(ts0710_con * ts0710, __u8 dlci); -+static int send_sabm(ts0710_con * ts0710, __u8 dlci); -+static int send_disc(ts0710_con * ts0710, __u8 dlci); -+static void queue_uih(mux_send_struct * send_info, __u16 len, -+ ts0710_con * ts0710, __u8 dlci); -+static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, -+ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr); -+static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr); -+static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr); -+ -+static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum); -+static __u8 crc_calc(__u8 * data, __u32 length); -+static void create_crctable(__u8 table[]); -+ -+static void mux_sched_send(void); -+ -+static __u8 crctable[256]; -+ -+static ts0710_con ts0710_connection; -+/* -+static rpn_values rpn_val; -+*/ -+ -+static int valid_dlci(__u8 dlci) -+{ -+ if ((dlci < TS0710_MAX_CHN) && (dlci > 0)) -+ return 1; -+ else -+ return 0; -+} -+ -+#ifdef TS0710DEBUG -+ -+#ifdef PRINT_OUTPUT_PRINTK -+#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) -+#else -+#include "ezxlog.h" -+static __u8 strDebug[256]; -+#define TS0710_DEBUG(fmt, arg...) ({ snprintf(strDebug, sizeof(strDebug), "MUX " __FUNCTION__ ": " fmt "\n" , ## arg); \ -+ /*printk("%s", strDebug)*/ezxlogk("MX", strDebug, strlen(strDebug)); }) -+#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ -+ -+#else -+#define TS0710_DEBUG(fmt...) -+#endif /* End #ifdef TS0710DEBUG */ -+ -+#ifdef TS0710LOG -+static unsigned char g_tbuf[TS0710MUX_MAX_BUF_SIZE]; -+#ifdef PRINT_OUTPUT_PRINTK -+#define TS0710_LOG(fmt, arg...) printk(fmt, ## arg) -+#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) -+#else -+#include "ezxlog.h" -+static __u8 strLog[256]; -+#define TS0710_LOG(fmt, arg...) ({ snprintf(strLog, sizeof(strLog), fmt, ## arg); \ -+ /*printk("%s", strLog)*/ezxlogk("MX", strLog, strlen(strLog)); }) -+#define TS0710_PRINTK(fmt, arg...) ({ printk(fmt, ## arg); \ -+ TS0710_LOG(fmt, ## arg); }) -+#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ -+ -+#else -+#define TS0710_LOG(fmt...) -+#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) -+#endif /* End #ifdef TS0710LOG */ -+ -+#ifdef TS0710DEBUG -+static void TS0710_DEBUGHEX(__u8 * buf, int len) -+{ -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ -+ int i; -+ int c; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ c = 0; -+ for (i = 0; (i < len) && (c < (TS0710MUX_MAX_BUF_SIZE - 3)); i++) { -+ sprintf(&tbuf[c], "%02x ", buf[i]); -+ c += 3; -+ } -+ tbuf[c] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ TS0710_DEBUG("%s", tbuf); -+#else -+ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, c); -+#endif -+} -+static void TS0710_DEBUGSTR(__u8 * buf, int len) -+{ -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ if (len > (TS0710MUX_MAX_BUF_SIZE - 1)) { -+ len = (TS0710MUX_MAX_BUF_SIZE - 1); -+ } -+ -+ memcpy(tbuf, buf, len); -+ tbuf[len] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ /* 0x00 byte in the string pointed by tbuf may truncate the print result */ -+ TS0710_DEBUG("%s", tbuf); -+#else -+ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, len); -+#endif -+} -+#else -+#define TS0710_DEBUGHEX(buf, len) -+#define TS0710_DEBUGSTR(buf, len) -+#endif /* End #ifdef TS0710DEBUG */ -+ -+#ifdef TS0710LOG -+static void TS0710_LOGSTR_FRAME(__u8 send, __u8 * data, int len) -+{ -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ __u8 dlci; -+ int pos; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ pos = 0; -+ if (send) { -+ pos += sprintf(&g_tbuf[pos], "<"); -+ short_pkt = (short_frame *) (data + 1); /*For BP UART problem */ -+ } else { -+ /*For BP UART problem */ -+ /*pos += sprintf(&g_tbuf[pos], ">"); */ -+ pos += sprintf(&g_tbuf[pos], ">%d ", *(data + SLIDE_BP_SEQ_OFFSET)); /*For BP UART problem */ -+ -+#ifdef TS0710SEQ2 -+ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", *(data + FIRST_BP_SEQ_OFFSET), *(data + SECOND_BP_SEQ_OFFSET), *(data + FIRST_AP_SEQ_OFFSET), *(data + SECOND_AP_SEQ_OFFSET)); /*For BP UART problem */ -+#endif -+ -+ short_pkt = (short_frame *) (data + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ } -+ -+ /*For BP UART problem */ -+ /*short_pkt = (short_frame *)(data + 1); */ -+ -+ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; -+ switch (CLR_PF(short_pkt->h.control)) { -+ case SABM: -+ pos += sprintf(&g_tbuf[pos], "C SABM %d ::", dlci); -+ break; -+ case UA: -+ pos += sprintf(&g_tbuf[pos], "C UA %d ::", dlci); -+ break; -+ case DM: -+ pos += sprintf(&g_tbuf[pos], "C DM %d ::", dlci); -+ break; -+ case DISC: -+ pos += sprintf(&g_tbuf[pos], "C DISC %d ::", dlci); -+ break; -+ -+ /*For BP UART problem Begin */ -+ case ACK: -+ pos += sprintf(&g_tbuf[pos], "C ACK %d ", short_pkt->data[0]); -+ -+#ifdef TS0710SEQ2 -+ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", short_pkt->data[1], short_pkt->data[2], short_pkt->data[3], short_pkt->data[4]); /*For BP UART problem */ -+#endif -+ -+ pos += sprintf(&g_tbuf[pos], "::"); -+ break; -+ /*For BP UART problem End */ -+ -+ case UIH: -+ if (!dlci) { -+ pos += sprintf(&g_tbuf[pos], "C MCC %d ::", dlci); -+ } else { -+ -+ if ((short_pkt->h.length.ea) == 0) { -+ long_pkt = (long_frame *) short_pkt; -+ uih_len = GET_LONG_LENGTH(long_pkt->h.length); -+ uih_data_start = long_pkt->h.data; -+ } else { -+ uih_len = short_pkt->h.length.len; -+ uih_data_start = short_pkt->data; -+ } -+ switch (*uih_data_start) { -+ case CMDTAG: -+ pos += -+ sprintf(&g_tbuf[pos], "I %d A %d ::", dlci, -+ uih_len); -+ break; -+ case DATATAG: -+ default: -+ pos += -+ sprintf(&g_tbuf[pos], "I %d D %d ::", dlci, -+ uih_len); -+ break; -+ } -+ -+ } -+ break; -+ default: -+ pos += sprintf(&g_tbuf[pos], "N!!! %d ::", dlci); -+ break; -+ } -+ -+ if (len > (sizeof(g_tbuf) - pos - 1)) { -+ len = (sizeof(g_tbuf) - pos - 1); -+ } -+ -+ memcpy(&g_tbuf[pos], data, len); -+ pos += len; -+ g_tbuf[pos] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ /* 0x00 byte in the string pointed by g_tbuf may truncate the print result */ -+ TS0710_LOG("%s\n", g_tbuf); -+#else -+ /*printk("%s\n", g_tbuf) */ ezxlogk("MX", g_tbuf, pos); -+#endif -+} -+#else -+#define TS0710_LOGSTR_FRAME(send, data, len) -+#endif -+ -+#ifdef TS0710SIG -+#define my_for_each_task(p) \ -+ for ((p) = current; ((p) = (p)->next_task) != current; ) -+ -+static void TS0710_SIG2APLOGD(void) -+{ -+ struct task_struct *p; -+ static __u8 sig = 0; -+ -+ if (sig) { -+ return; -+ } -+ -+ read_lock(&tasklist_lock); -+ my_for_each_task(p) { -+ if (strncmp(p->comm, "aplogd", 6) == 0) { -+ sig = 1; -+ if (send_sig(SIGUSR2, p, 1) == 0) { -+ TS0710_PRINTK -+ ("MUX: success to send SIGUSR2 to aplogd!\n"); -+ } else { -+ TS0710_PRINTK -+ ("MUX: failure to send SIGUSR2 to aplogd!\n"); -+ } -+ break; -+ } -+ } -+ read_unlock(&tasklist_lock); -+ -+ if (!sig) { -+ TS0710_PRINTK("MUX: not found aplogd!\n"); -+ } -+} -+#else -+#define TS0710_SIG2APLOGD() -+#endif -+ -+static int basic_write(ts0710_con * ts0710, __u8 * buf, int len) -+{ -+ int res; -+ -+ UNUSED_PARAM(ts0710); -+ -+ buf[0] = TS0710_BASIC_FLAG; -+ buf[len + 1] = TS0710_BASIC_FLAG; -+ -+ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -+ TS0710_PRINTK -+ ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK -+ ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return -1; -+ } -+ -+ TS0710_LOGSTR_FRAME(1, buf, len + 2); -+ TS0710_DEBUGHEX(buf, len + 2); -+ -+ res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); -+ -+ if (res != len + 2) { -+ TS0710_PRINTK("MUX basic_write: Write Error!\n"); -+ return -1; -+ } -+ -+ return len + 2; -+} -+ -+/* Functions for the crc-check and calculation */ -+ -+#define CRC_VALID 0xcf -+ -+static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum) -+{ -+ __u8 fcs = 0xff; -+ -+ while (length--) { -+ fcs = crctable[fcs ^ *data++]; -+ } -+ fcs = crctable[fcs ^ check_sum]; -+ TS0710_DEBUG("fcs : %d\n", fcs); -+ if (fcs == (uint) 0xcf) { /*CRC_VALID) */ -+ TS0710_DEBUG("crc_check: CRC check OK\n"); -+ return 0; -+ } else { -+ TS0710_PRINTK("MUX crc_check: CRC check failed\n"); -+ return 1; -+ } -+} -+ -+/* Calculates the checksum according to the ts0710 specification */ -+ -+static __u8 crc_calc(__u8 * data, __u32 length) -+{ -+ __u8 fcs = 0xff; -+ -+ while (length--) { -+ fcs = crctable[fcs ^ *data++]; -+ } -+ -+ return 0xff - fcs; -+} -+ -+/* Calulates a reversed CRC table for the FCS check */ -+ -+static void create_crctable(__u8 table[]) -+{ -+ int i, j; -+ -+ __u8 data; -+ __u8 code_word = (__u8) 0xe0; -+ __u8 sr = (__u8) 0; -+ -+ for (j = 0; j < 256; j++) { -+ data = (__u8) j; -+ -+ for (i = 0; i < 8; i++) { -+ if ((data & 0x1) ^ (sr & 0x1)) { -+ sr >>= 1; -+ sr ^= code_word; -+ } else { -+ sr >>= 1; -+ } -+ -+ data >>= 1; -+ sr &= 0xff; -+ } -+ -+ table[j] = sr; -+ sr = 0; -+ } -+} -+ -+static void ts0710_reset_dlci(__u8 j) -+{ -+ if (j >= TS0710_MAX_CHN) -+ return; -+ -+ ts0710_connection.dlci[j].state = DISCONNECTED; -+ ts0710_connection.dlci[j].flow_control = 0; -+ ts0710_connection.dlci[j].mtu = DEF_TS0710_MTU; -+ ts0710_connection.dlci[j].initiated = 0; -+ ts0710_connection.dlci[j].initiator = 0; -+ init_waitqueue_head(&ts0710_connection.dlci[j].open_wait); -+ init_waitqueue_head(&ts0710_connection.dlci[j].close_wait); -+} -+ -+static void ts0710_reset_con(void) -+{ -+ __u8 j; -+ -+ ts0710_connection.initiator = 0; -+ ts0710_connection.mtu = DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE; -+ ts0710_connection.be_testing = 0; -+ ts0710_connection.test_errs = 0; -+ init_waitqueue_head(&ts0710_connection.test_wait); -+ -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710_reset_dlci(j); -+ } -+} -+ -+static void ts0710_init(void) -+{ -+ create_crctable(crctable); -+ -+ ts0710_reset_con(); -+ -+ /* Set the values in the rpn octets */ -+/* -+ rpn_val.bit_rate = 7; -+ rpn_val.data_bits = 3; -+ rpn_val.stop_bit = 0; -+ rpn_val.parity = 0; -+ rpn_val.parity_type = 0; -+ rpn_val.res1 = 0; -+ rpn_val.xon_input = 0; -+ rpn_val.xon_output = 0; -+ rpn_val.rtr_input = 0; -+ rpn_val.rtr_output = 0; -+ rpn_val.rtc_input = 0; -+ rpn_val.rtc_output = 0; -+ rpn_val.res2 = 0; -+ rpn_val.xon_u8 = 0x11; -+ rpn_val.xoff_u8 = 0x13; -+ memset(&rpn_val.pm, 0 , 2); *//* Set the mask to zero */ -+} -+ -+static void ts0710_upon_disconnect(void) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 j; -+ -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710->dlci[j].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[j].open_wait); -+ wake_up_interruptible(&ts0710->dlci[j].close_wait); -+ } -+ ts0710->be_testing = 0; -+ wake_up_interruptible(&ts0710->test_wait); -+ ts0710_reset_con(); -+} -+ -+/* Sending packet functions */ -+ -+/* Creates a UA packet and puts it at the beginning of the pkt pointer */ -+ -+static int send_ua(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *ua; -+ -+ TS0710_DEBUG("send_ua: Creating UA packet to DLCI %d\n", dlci); -+ -+ ua = (short_frame *) (buf + 1); -+ ua->h.addr.ea = 1; -+ ua->h.addr.cr = ((~(ts0710->initiator)) & 0x1); -+ ua->h.addr.d = (dlci) & 0x1; -+ ua->h.addr.server_chn = (dlci) >> 0x1; -+ ua->h.control = SET_PF(UA); -+ ua->h.length.ea = 1; -+ ua->h.length.len = 0; -+ ua->data[0] = crc_calc((__u8 *) ua, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+/* Creates a DM packet and puts it at the beginning of the pkt pointer */ -+ -+static int send_dm(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *dm; -+ -+ TS0710_DEBUG("send_dm: Creating DM packet to DLCI %d\n", dlci); -+ -+ dm = (short_frame *) (buf + 1); -+ dm->h.addr.ea = 1; -+ dm->h.addr.cr = ((~(ts0710->initiator)) & 0x1); -+ dm->h.addr.d = dlci & 0x1; -+ dm->h.addr.server_chn = dlci >> 0x1; -+ dm->h.control = SET_PF(DM); -+ dm->h.length.ea = 1; -+ dm->h.length.len = 0; -+ dm->data[0] = crc_calc((__u8 *) dm, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static int send_sabm(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *sabm; -+ -+ TS0710_DEBUG("send_sabm: Creating SABM packet to DLCI %d\n", dlci); -+ -+ sabm = (short_frame *) (buf + 1); -+ sabm->h.addr.ea = 1; -+ sabm->h.addr.cr = ((ts0710->initiator) & 0x1); -+ sabm->h.addr.d = dlci & 0x1; -+ sabm->h.addr.server_chn = dlci >> 0x1; -+ sabm->h.control = SET_PF(SABM); -+ sabm->h.length.ea = 1; -+ sabm->h.length.len = 0; -+ sabm->data[0] = crc_calc((__u8 *) sabm, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static int send_disc(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *disc; -+ -+ TS0710_DEBUG("send_disc: Creating DISC packet to DLCI %d\n", dlci); -+ -+ disc = (short_frame *) (buf + 1); -+ disc->h.addr.ea = 1; -+ disc->h.addr.cr = ((ts0710->initiator) & 0x1); -+ disc->h.addr.d = dlci & 0x1; -+ disc->h.addr.server_chn = dlci >> 0x1; -+ disc->h.control = SET_PF(DISC); -+ disc->h.length.ea = 1; -+ disc->h.length.len = 0; -+ disc->data[0] = crc_calc((__u8 *) disc, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static void queue_uih(mux_send_struct * send_info, __u16 len, -+ ts0710_con * ts0710, __u8 dlci) -+{ -+ __u32 size; -+ -+ TS0710_DEBUG -+ ("queue_uih: Creating UIH packet with %d bytes data to DLCI %d\n", -+ len, dlci); -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ long_frame *l_pkt; -+ -+ size = sizeof(long_frame) + len + FCS_SIZE; -+ l_pkt = (long_frame *) (send_info->frame - sizeof(long_frame)); -+ set_uih_hdr((void *)l_pkt, dlci, len, ts0710->initiator); -+ l_pkt->data[len] = crc_calc((__u8 *) l_pkt, LONG_CRC_CHECK); -+ send_info->frame = ((__u8 *) l_pkt) - 1; -+ } else { -+ short_frame *s_pkt; -+ -+ size = sizeof(short_frame) + len + FCS_SIZE; -+ s_pkt = -+ (short_frame *) (send_info->frame - sizeof(short_frame)); -+ set_uih_hdr((void *)s_pkt, dlci, len, ts0710->initiator); -+ s_pkt->data[len] = crc_calc((__u8 *) s_pkt, SHORT_CRC_CHECK); -+ send_info->frame = ((__u8 *) s_pkt) - 1; -+ } -+ send_info->length = size; -+} -+ -+/* Multiplexer command packets functions */ -+ -+/* Turns on the ts0710 flow control */ -+ -+static int ts0710_fcon_msg(ts0710_con * ts0710, __u8 cr) -+{ -+ __u8 buf[30]; -+ mcc_short_frame *mcc_pkt; -+ short_frame *uih_pkt; -+ __u32 size; -+ -+ size = sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE; -+ uih_pkt = (short_frame *) (buf + 1); -+ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), -+ ts0710->initiator); -+ uih_pkt->data[sizeof(mcc_short_frame)] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = FCON; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* Turns off the ts0710 flow control */ -+ -+static int ts0710_fcoff_msg(ts0710_con * ts0710, __u8 cr) -+{ -+ __u8 buf[30]; -+ mcc_short_frame *mcc_pkt; -+ short_frame *uih_pkt; -+ __u32 size; -+ -+ size = (sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE); -+ uih_pkt = (short_frame *) (buf + 1); -+ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), -+ ts0710->initiator); -+ uih_pkt->data[sizeof(mcc_short_frame)] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); -+ -+ mcc_pkt->h.type.ea = 1; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = FCOFF; -+ mcc_pkt->h.length.ea = 1; -+ mcc_pkt->h.length.len = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* -+static int ts0710_rpn_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 req) -+{ -+ char buf[100]; -+ rpn_msg* rpn_pkt; -+ __u32 fsize; -+ __u32 psize; -+ -+ fsize = sizeof(rpn_msg); -+ -+ if (req) { -+ fsize -= sizeof(rpn_values); -+ } -+ -+ psize = (fsize - sizeof(short_frame) - FCS_SIZE); -+ -+ rpn_pkt = (rpn_msg *) buf; -+ -+ set_uih_hdr((short_frame *) rpn_pkt, CTRL_CHAN, psize, ts0710->initiator); -+ -+ rpn_pkt->fcs = crc_calc((__u8*) rpn_pkt, SHORT_CRC_CHECK); -+ -+ rpn_pkt->mcc_s_head.type.ea = EA; -+ rpn_pkt->mcc_s_head.type.cr = cr; -+ rpn_pkt->mcc_s_head.type.type = RPN; -+ rpn_pkt->mcc_s_head.length.ea = EA; -+ -+ rpn_pkt->dlci.ea = EA; -+ rpn_pkt->dlci.cr = 1; -+ rpn_pkt->dlci.d = dlci & 1; -+ rpn_pkt->dlci.server_chn = (dlci >> 1); -+ -+ if (req) { -+ rpn_pkt->mcc_s_head.length.len = 1; -+ rpn_pkt->rpn_val.bit_rate = rpn_pkt->fcs; -+ } else { -+ rpn_pkt->mcc_s_head.length.len = 8; -+ memcpy(&(rpn_pkt->rpn_val), &rpn_val, sizeof(rpn_values)); -+ } -+ return basic_write(ts0710, buf, fsize); -+} -+*/ -+/* -+static int ts0710_rls_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 err_code) -+{ -+ char buf[100]; -+ rls_msg *rls_pkt; -+ __u32 fsize; -+ __u32 psize; -+ -+ fsize = sizeof(rls_msg); -+ psize = fsize - sizeof(short_frame) - FCS_SIZE; -+ rls_pkt = (rls_msg *) buf; -+ -+ set_uih_hdr((short_frame *) rls_pkt, CTRL_CHAN, psize, ts0710->initiator); -+ rls_pkt->fcs = crc_calc((__u8*) rls_pkt, SHORT_CRC_CHECK); -+ -+ rls_pkt->mcc_s_head.type.ea = EA; -+ rls_pkt->mcc_s_head.type.cr = cr; -+ rls_pkt->mcc_s_head.type.type = RLS; -+ rls_pkt->mcc_s_head.length.ea = EA; -+ rls_pkt->mcc_s_head.length.len = 2; -+ -+ rls_pkt->dlci.ea = EA; -+ rls_pkt->dlci.cr = 1; -+ rls_pkt->dlci.d = dlci & 1; -+ rls_pkt->dlci.server_chn = dlci >> 1; -+ rls_pkt->error = err_code; -+ rls_pkt->res = 0; -+ -+ return basic_write(ts0710, buf, fsize); -+} -+*/ -+ -+/* Sends an PN-messages and sets the not negotiable parameters to their -+ default values in ts0710 */ -+ -+static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, -+ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr) -+{ -+ __u8 buf[30]; -+ pn_msg *pn_pkt; -+ __u32 size; -+ TS0710_DEBUG -+ ("send_pn_msg: DLCI 0x%02x, prior:0x%02x, frame_size:%d, credit_flow:%x, credits:%d, cr:%x\n", -+ dlci, prior, frame_size, credit_flow, credits, cr); -+ -+ size = sizeof(pn_msg); -+ pn_pkt = (pn_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)pn_pkt, CTRL_CHAN, -+ size - (sizeof(short_frame) + FCS_SIZE), ts0710->initiator); -+ pn_pkt->fcs = crc_calc((__u8 *) pn_pkt, SHORT_CRC_CHECK); -+ -+ pn_pkt->mcc_s_head.type.ea = 1; -+ pn_pkt->mcc_s_head.type.cr = cr; -+ pn_pkt->mcc_s_head.type.type = PN; -+ pn_pkt->mcc_s_head.length.ea = 1; -+ pn_pkt->mcc_s_head.length.len = 8; -+ -+ pn_pkt->res1 = 0; -+ pn_pkt->res2 = 0; -+ pn_pkt->dlci = dlci; -+ pn_pkt->frame_type = 0; -+ pn_pkt->credit_flow = credit_flow; -+ pn_pkt->prior = prior; -+ pn_pkt->ack_timer = 0; -+ SET_PN_MSG_FRAME_SIZE(pn_pkt, frame_size); -+ pn_pkt->credits = credits; -+ pn_pkt->max_nbrof_retrans = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* Send a Not supported command - command, which needs 3 bytes */ -+ -+static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr) -+{ -+ __u8 buf[30]; -+ nsc_msg *nsc_pkt; -+ __u32 size; -+ -+ size = sizeof(nsc_msg); -+ nsc_pkt = (nsc_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)nsc_pkt, CTRL_CHAN, -+ sizeof(nsc_msg) - sizeof(short_frame) - FCS_SIZE, -+ ts0710->initiator); -+ -+ nsc_pkt->fcs = crc_calc((__u8 *) nsc_pkt, SHORT_CRC_CHECK); -+ -+ nsc_pkt->mcc_s_head.type.ea = 1; -+ nsc_pkt->mcc_s_head.type.cr = cr; -+ nsc_pkt->mcc_s_head.type.type = NSC; -+ nsc_pkt->mcc_s_head.length.ea = 1; -+ nsc_pkt->mcc_s_head.length.len = 1; -+ -+ nsc_pkt->command_type.ea = 1; -+ nsc_pkt->command_type.cr = cmd.cr; -+ nsc_pkt->command_type.type = cmd.type; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+static int ts0710_msc_msg(ts0710_con * ts0710, __u8 value, __u8 cr, __u8 dlci) -+{ -+ __u8 buf[30]; -+ msc_msg *msc_pkt; -+ __u32 size; -+ -+ size = sizeof(msc_msg); -+ msc_pkt = (msc_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)msc_pkt, CTRL_CHAN, -+ sizeof(msc_msg) - sizeof(short_frame) - FCS_SIZE, -+ ts0710->initiator); -+ -+ msc_pkt->fcs = crc_calc((__u8 *) msc_pkt, SHORT_CRC_CHECK); -+ -+ msc_pkt->mcc_s_head.type.ea = 1; -+ msc_pkt->mcc_s_head.type.cr = cr; -+ msc_pkt->mcc_s_head.type.type = MSC; -+ msc_pkt->mcc_s_head.length.ea = 1; -+ msc_pkt->mcc_s_head.length.len = 2; -+ -+ msc_pkt->dlci.ea = 1; -+ msc_pkt->dlci.cr = 1; -+ msc_pkt->dlci.d = dlci & 1; -+ msc_pkt->dlci.server_chn = (dlci >> 1) & 0x1f; -+ -+ msc_pkt->v24_sigs = value; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+static int ts0710_test_msg(ts0710_con * ts0710, __u8 * test_pattern, __u32 len, -+ __u8 cr, __u8 * f_buf /*Frame buf */ ) -+{ -+ __u32 size; -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ long_frame *uih_pkt; -+ mcc_long_frame *mcc_pkt; -+ -+ size = -+ (sizeof(long_frame) + sizeof(mcc_long_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (long_frame *) (f_buf + 1); -+ -+ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, len + -+ sizeof(mcc_long_frame), ts0710->initiator); -+ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = -+ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); -+ mcc_pkt = (mcc_long_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ /* cr tells whether it is a commmand (1) or a response (0) */ -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ SET_LONG_LENGTH(mcc_pkt->h.length, len); -+ memcpy(mcc_pkt->value, test_pattern, len); -+ } else if (len > (SHORT_PAYLOAD_SIZE - sizeof(mcc_short_frame))) { -+ long_frame *uih_pkt; -+ mcc_short_frame *mcc_pkt; -+ -+ /* Create long uih packet and short mcc packet */ -+ size = -+ (sizeof(long_frame) + sizeof(mcc_short_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (long_frame *) (f_buf + 1); -+ -+ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, -+ len + sizeof(mcc_short_frame), ts0710->initiator); -+ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = -+ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = len; -+ memcpy(mcc_pkt->value, test_pattern, len); -+ } else { -+ short_frame *uih_pkt; -+ mcc_short_frame *mcc_pkt; -+ -+ size = -+ (sizeof(short_frame) + sizeof(mcc_short_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (short_frame *) (f_buf + 1); -+ -+ set_uih_hdr((void *)uih_pkt, CTRL_CHAN, len -+ + sizeof(mcc_short_frame), ts0710->initiator); -+ uih_pkt->data[uih_pkt->h.length.len] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = len; -+ memcpy(mcc_pkt->value, test_pattern, len); -+ -+ } -+ return basic_write(ts0710, f_buf, size); -+} -+ -+static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr) -+{ -+ uih_pkt->h.addr.ea = 1; -+ uih_pkt->h.addr.cr = cr; -+ uih_pkt->h.addr.d = dlci & 0x1; -+ uih_pkt->h.addr.server_chn = dlci >> 1; -+ uih_pkt->h.control = CLR_PF(UIH); -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ SET_LONG_LENGTH(((long_frame *) uih_pkt)->h.length, len); -+ } else { -+ uih_pkt->h.length.ea = 1; -+ uih_pkt->h.length.len = len; -+ } -+} -+ -+/* Parses a multiplexer control channel packet */ -+ -+void process_mcc(__u8 * data, __u32 len, ts0710_con * ts0710, int longpkt) -+{ -+ __u8 *tbuf = NULL; -+ mcc_short_frame *mcc_short_pkt; -+ int j; -+ -+ if (longpkt) { -+ mcc_short_pkt = -+ (mcc_short_frame *) (((long_frame *) data)->data); -+ } else { -+ mcc_short_pkt = -+ (mcc_short_frame *) (((short_frame *) data)->data); -+ } -+ -+ switch (mcc_short_pkt->h.type.type) { -+ case TEST: -+ if (mcc_short_pkt->h.type.cr == MCC_RSP) { -+ TS0710_DEBUG("Received test command response\n"); -+ -+ if (ts0710->be_testing) { -+ if ((mcc_short_pkt->h.length.ea) == 0) { -+ mcc_long_frame *mcc_long_pkt; -+ mcc_long_pkt = -+ (mcc_long_frame *) mcc_short_pkt; -+ if (GET_LONG_LENGTH -+ (mcc_long_pkt->h.length) != -+ TEST_PATTERN_SIZE) { -+ ts0710->test_errs = -+ TEST_PATTERN_SIZE; -+ TS0710_DEBUG -+ ("Err: received test pattern is %d bytes long, not expected %d\n", -+ GET_LONG_LENGTH -+ (mcc_long_pkt->h.length), -+ TEST_PATTERN_SIZE); -+ } else { -+ ts0710->test_errs = 0; -+ for (j = 0; -+ j < TEST_PATTERN_SIZE; -+ j++) { -+ if (mcc_long_pkt-> -+ value[j] != -+ (j & 0xFF)) { -+ (ts0710-> -+ test_errs)++; -+ } -+ } -+ } -+ -+ } else { -+ -+#if TEST_PATTERN_SIZE < 128 -+ if (mcc_short_pkt->h.length.len != -+ TEST_PATTERN_SIZE) { -+#endif -+ -+ ts0710->test_errs = -+ TEST_PATTERN_SIZE; -+ TS0710_DEBUG -+ ("Err: received test pattern is %d bytes long, not expected %d\n", -+ mcc_short_pkt->h.length. -+ len, TEST_PATTERN_SIZE); -+ -+#if TEST_PATTERN_SIZE < 128 -+ } else { -+ ts0710->test_errs = 0; -+ for (j = 0; -+ j < TEST_PATTERN_SIZE; -+ j++) { -+ if (mcc_short_pkt-> -+ value[j] != -+ (j & 0xFF)) { -+ (ts0710-> -+ test_errs)++; -+ } -+ } -+ } -+#endif -+ -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ wake_up_interruptible(&ts0710->test_wait); -+ } else { -+ TS0710_DEBUG -+ ("Err: shouldn't or late to get test cmd response\n"); -+ } -+ } else { -+ tbuf = (__u8 *) kmalloc(len + 32, GFP_ATOMIC); -+ if (!tbuf) { -+ break; -+ } -+ -+ if ((mcc_short_pkt->h.length.ea) == 0) { -+ mcc_long_frame *mcc_long_pkt; -+ mcc_long_pkt = (mcc_long_frame *) mcc_short_pkt; -+ ts0710_test_msg(ts0710, mcc_long_pkt->value, -+ GET_LONG_LENGTH(mcc_long_pkt->h. -+ length), -+ MCC_RSP, tbuf); -+ } else { -+ ts0710_test_msg(ts0710, mcc_short_pkt->value, -+ mcc_short_pkt->h.length.len, -+ MCC_RSP, tbuf); -+ } -+ -+ kfree(tbuf); -+ } -+ break; -+ -+ case FCON: /*Flow control on command */ -+ TS0710_PRINTK -+ ("MUX Received Flow control(all channels) on command\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ ts0710->dlci[0].state = CONNECTED; -+ ts0710_fcon_msg(ts0710, MCC_RSP); -+ mux_sched_send(); -+ } -+ break; -+ -+ case FCOFF: /*Flow control off command */ -+ TS0710_PRINTK -+ ("MUX Received Flow control(all channels) off command\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710->dlci[j].state = FLOW_STOPPED; -+ } -+ ts0710_fcoff_msg(ts0710, MCC_RSP); -+ } -+ break; -+ -+ case MSC: /*Modem status command */ -+ { -+ __u8 dlci; -+ __u8 v24_sigs; -+ -+ dlci = (mcc_short_pkt->value[0]) >> 2; -+ v24_sigs = mcc_short_pkt->value[1]; -+ -+ if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ send_dm(ts0710, dlci); -+ break; -+ } -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ TS0710_DEBUG("Received Modem status command\n"); -+ if (v24_sigs & 2) { -+ if (ts0710->dlci[dlci].state == -+ CONNECTED) { -+ TS0710_LOG -+ ("MUX Received Flow off on dlci %d\n", -+ dlci); -+ ts0710->dlci[dlci].state = -+ FLOW_STOPPED; -+ } -+ } else { -+ if (ts0710->dlci[dlci].state == -+ FLOW_STOPPED) { -+ ts0710->dlci[dlci].state = -+ CONNECTED; -+ TS0710_LOG -+ ("MUX Received Flow on on dlci %d\n", -+ dlci); -+ mux_sched_send(); -+ } -+ } -+ -+ ts0710_msc_msg(ts0710, v24_sigs, MCC_RSP, dlci); -+/* -+ if (!(ts0710->dlci[dlci].initiated) && !(ts0710->dlci[dlci].initiator)) { -+ ts0710_msc_msg(ts0710, EA | RTR | RTC | DV, MCC_CMD, dlci); -+ ts0710->dlci[dlci].initiated = 1; -+ } -+*/ -+ } else { -+ TS0710_DEBUG -+ ("Received Modem status response\n"); -+ -+ if (v24_sigs & 2) { -+ TS0710_DEBUG("Flow stop accepted\n"); -+ } -+ } -+ break; -+ } -+ -+ /* case RPN: *//*Remote port negotiation command */ -+ -+/* { -+ __u8 dlci; -+ -+ dlci = (mcc_short_pkt->value[0]) >> 2; -+ -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ if (mcc_short_pkt->h.length.len == 1) { -+ TS0710_DEBUG("Received Remote port negotiation command\n"); -+ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); -+ } else { -+*/ -+ /* Accept the other sides settings (accept all for now) */ -+/* TS0710_DEBUG("Received Remote port negotiation respons\n"); -+ memcpy(&rpn_val, &mcc_short_pkt->value[1], 8); -+ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); -+*/ -+ /* Zero the parametermask after response */ -+/* memset(&rpn_val.pm, 0, 2); -+ } -+ } -+ break; -+ } -+*/ -+/* -+ case RLS: *//*Remote line status */ -+/* { -+ __u8 dlci; -+ __u8 err_code; -+ -+ TS0710_DEBUG("Received Remote line status\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ dlci = mcc_short_pkt->value[0] >> 2; -+ err_code = mcc_short_pkt->value[1]; -+ -+ ts0710_rls_msg(ts0710, MCC_RSP, dlci, err_code); -+ } -+ break; -+ } -+*/ -+ case PN: /*DLC parameter negotiation */ -+ { -+ __u8 dlci; -+ __u16 frame_size; -+ pn_msg *pn_pkt; -+ -+ pn_pkt = (pn_msg *) data; -+ dlci = pn_pkt->dlci; -+ frame_size = GET_PN_MSG_FRAME_SIZE(pn_pkt); -+ TS0710_DEBUG -+ ("Received DLC parameter negotiation, PN\n"); -+ if (pn_pkt->mcc_s_head.type.cr == MCC_CMD) { -+ TS0710_DEBUG("received PN command with:\n"); -+ TS0710_DEBUG("Frame size:%d\n", frame_size); -+ -+ frame_size = -+ min(frame_size, ts0710->dlci[dlci].mtu); -+ send_pn_msg(ts0710, pn_pkt->prior, frame_size, -+ 0, 0, dlci, MCC_RSP); -+ ts0710->dlci[dlci].mtu = frame_size; -+ TS0710_DEBUG("process_mcc : mtu set to %d\n", -+ ts0710->dlci[dlci].mtu); -+ } else { -+ TS0710_DEBUG("received PN response with:\n"); -+ TS0710_DEBUG("Frame size:%d\n", frame_size); -+ -+ frame_size = -+ min(frame_size, ts0710->dlci[dlci].mtu); -+ ts0710->dlci[dlci].mtu = frame_size; -+ -+ TS0710_DEBUG -+ ("process_mcc : mtu set on dlci:%d to %d\n", -+ dlci, ts0710->dlci[dlci].mtu); -+ -+ if (ts0710->dlci[dlci].state == NEGOTIATING) { -+ ts0710->dlci[dlci].state = CONNECTING; -+ wake_up_interruptible(&ts0710-> -+ dlci[dlci]. -+ open_wait); -+ } -+ } -+ break; -+ } -+ -+ case NSC: /*Non supported command resonse */ -+ TS0710_LOG("MUX Received Non supported command response\n"); -+ break; -+ -+ default: /*Non supported command received */ -+ TS0710_LOG("MUX Received a non supported command\n"); -+ send_nsc_msg(ts0710, mcc_short_pkt->h.type, MCC_RSP); -+ break; -+ } -+} -+ -+static mux_recv_packet *get_mux_recv_packet(__u32 size) -+{ -+ mux_recv_packet *recv_packet; -+ -+ TS0710_DEBUG("Enter into get_mux_recv_packet"); -+ -+ recv_packet = -+ (mux_recv_packet *) kmalloc(sizeof(mux_recv_packet), GFP_ATOMIC); -+ if (!recv_packet) { -+ return 0; -+ } -+ -+ recv_packet->data = (__u8 *) kmalloc(size, GFP_ATOMIC); -+ if (!(recv_packet->data)) { -+ kfree(recv_packet); -+ return 0; -+ } -+ recv_packet->length = 0; -+ recv_packet->next = 0; -+ return recv_packet; -+} -+ -+static void free_mux_recv_packet(mux_recv_packet * recv_packet) -+{ -+ TS0710_DEBUG("Enter into free_mux_recv_packet"); -+ -+ if (!recv_packet) { -+ return; -+ } -+ -+ if (recv_packet->data) { -+ kfree(recv_packet->data); -+ } -+ kfree(recv_packet); -+} -+ -+static void free_mux_recv_struct(mux_recv_struct * recv_info) -+{ -+ mux_recv_packet *recv_packet1, *recv_packet2; -+ -+ if (!recv_info) { -+ return; -+ } -+ -+ recv_packet1 = recv_info->mux_packet; -+ while (recv_packet1) { -+ recv_packet2 = recv_packet1->next; -+ free_mux_recv_packet(recv_packet1); -+ recv_packet1 = recv_packet2; -+ } -+ -+ kfree(recv_info); -+} -+ -+static inline void add_post_recv_queue(mux_recv_struct ** head, -+ mux_recv_struct * new_item) -+{ -+ new_item->next = *head; -+ *head = new_item; -+} -+ -+static void ts0710_flow_on(__u8 dlci, ts0710_con * ts0710) -+{ -+ int i; -+ __u8 cmdtty; -+ __u8 datatty; -+ struct tty_struct *tty; -+ mux_recv_struct *recv_info; -+ -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (!(ts0710->dlci[dlci].flow_control)) { -+ return; -+ } -+ -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ -+ if (cmdtty != datatty) { -+ /* Check AT cmd tty */ -+ tty = mux_table[cmdtty]; -+ if (mux_tty[cmdtty] && tty) { -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ } -+ recv_info = mux_recv_info[cmdtty]; -+ if (mux_recv_info_flags[cmdtty] && recv_info) { -+ if (recv_info->total) { -+ return; -+ } -+ } -+ -+ /* Check data tty */ -+ tty = mux_table[datatty]; -+ if (mux_tty[datatty] && tty) { -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ } -+ recv_info = mux_recv_info[datatty]; -+ if (mux_recv_info_flags[datatty] && recv_info) { -+ if (recv_info->total) { -+ return; -+ } -+ } -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, dlci) < -+ 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX send Flow on on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 0; -+ break; -+ } -+ } -+} -+ -+static void ts0710_flow_off(struct tty_struct *tty, __u8 dlci, -+ ts0710_con * ts0710) -+{ -+ int i; -+ -+ if (test_and_set_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (ts0710->dlci[dlci].flow_control) { -+ return; -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg -+ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX send Flow off on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 1; -+ break; -+ } -+ } -+} -+ -+int ts0710_recv_data(ts0710_con * ts0710, char *data, int len) -+{ -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ __u8 dlci; -+ __u8 be_connecting; -+#ifdef TS0710DEBUG -+ unsigned long t; -+#endif -+ -+ short_pkt = (short_frame *) data; -+ -+ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; -+ switch (CLR_PF(short_pkt->h.control)) { -+ case SABM: -+ TS0710_DEBUG("SABM-packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ ts0710->dlci[0].state = CONNECTED; -+ -+ TS0710_DEBUG("sending back UA - control channel\n"); -+ send_ua(ts0710, dlci); -+ wake_up_interruptible(&ts0710->dlci[0].open_wait); -+ -+ } else if (valid_dlci(dlci)) { -+ -+ TS0710_DEBUG("Incomming connect on channel %d\n", dlci); -+ -+ TS0710_DEBUG("sending UA, dlci %d\n", dlci); -+ send_ua(ts0710, dlci); -+ -+ ts0710->dlci[dlci].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ -+ } else { -+ TS0710_DEBUG("invalid dlci %d, sending DM\n", dlci); -+ send_dm(ts0710, dlci); -+ } -+ -+ break; -+ -+ case UA: -+ TS0710_DEBUG("UA packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[0]. -+ open_wait); -+ } else if (ts0710->dlci[0].state == DISCONNECTING) { -+ ts0710_upon_disconnect(); -+ } else { -+ TS0710_DEBUG -+ (" Something wrong receiving UA packet\n"); -+ } -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming UA on channel %d\n", dlci); -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ ts0710->dlci[dlci].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ open_wait); -+ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG -+ (" Something wrong receiving UA packet\n"); -+ } -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case DM: -+ TS0710_DEBUG("DM packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ be_connecting = 1; -+ } else { -+ be_connecting = 0; -+ } -+ ts0710_upon_disconnect(); -+ if (be_connecting) { -+ ts0710->dlci[0].state = REJECTED; -+ } -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming DM on channel %d\n", dlci); -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ ts0710->dlci[dlci].state = REJECTED; -+ } else { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case DISC: -+ TS0710_DEBUG("DISC packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ send_ua(ts0710, dlci); -+ TS0710_DEBUG("DISC, sending back UA\n"); -+ -+ ts0710_upon_disconnect(); -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming DISC on channel %d\n", dlci); -+ -+ send_ua(ts0710, dlci); -+ TS0710_DEBUG("DISC, sending back UA\n"); -+ -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case UIH: -+ TS0710_DEBUG("UIH packet received\n"); -+ -+ if ((dlci >= TS0710_MAX_CHN)) { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ send_dm(ts0710, dlci); -+ break; -+ } -+ -+ if (GET_PF(short_pkt->h.control)) { -+ TS0710_LOG -+ ("MUX Error %s: UIH packet with P/F set, discard it!\n", -+ __FUNCTION__); -+ break; -+ } -+ -+ if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ TS0710_LOG -+ ("MUX Error %s: DLCI %d not connected, discard it!\n", -+ __FUNCTION__, dlci); -+ send_dm(ts0710, dlci); -+ break; -+ } -+ -+ if ((short_pkt->h.length.ea) == 0) { -+ TS0710_DEBUG("Long UIH packet received\n"); -+ long_pkt = (long_frame *) data; -+ uih_len = GET_LONG_LENGTH(long_pkt->h.length); -+ uih_data_start = long_pkt->h.data; -+ TS0710_DEBUG("long packet length %d\n", uih_len); -+ -+/*For BP UART problem -+ if (crc_check(data, LONG_CRC_CHECK, *(uih_data_start + uih_len))) -+ break; -+*/ -+ } else { -+ TS0710_DEBUG("Short UIH pkt received\n"); -+ uih_len = short_pkt->h.length.len; -+ uih_data_start = short_pkt->data; -+ -+/*For BP UART problem -+ if (crc_check(data, SHORT_CRC_CHECK, *(uih_data_start + uih_len))) -+ break; -+*/ -+ } -+ -+ if (dlci == 0) { -+ TS0710_DEBUG("UIH on serv_channel 0\n"); -+ process_mcc(data, len, ts0710, -+ !(short_pkt->h.length.ea)); -+ } else if (valid_dlci(dlci)) { -+ /* do tty dispatch */ -+ __u8 tag; -+ __u8 tty_idx; -+ struct tty_struct *tty; -+ __u8 queue_data; -+ __u8 post_recv; -+ __u8 flow_control; -+ mux_recv_struct *recv_info; -+ int recv_room; -+ mux_recv_packet *recv_packet, *recv_packet2; -+ -+ TS0710_DEBUG("UIH on channel %d\n", dlci); -+ -+ if (uih_len > ts0710->dlci[dlci].mtu) { -+ TS0710_PRINTK -+ ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", -+ dlci, uih_len, ts0710->dlci[dlci].mtu); -+ break; -+ } -+ -+ tag = *uih_data_start; -+ uih_data_start++; -+ uih_len--; -+ -+ if (!uih_len) { -+ break; -+ } -+ -+ switch (tag) { -+ case CMDTAG: -+ tty_idx = dlci2tty[dlci].cmdtty; -+ TS0710_DEBUG("CMDTAG on DLCI:%d, /dev/mux%d\n", -+ dlci, tty_idx); -+ TS0710_DEBUGSTR(uih_data_start, uih_len); -+ if (!(iscmdtty[tty_idx])) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", -+ __FUNCTION__, dlci, tty_idx); -+ } -+ break; -+ case DATATAG: -+ default: -+ tty_idx = dlci2tty[dlci].datatty; -+ TS0710_DEBUG -+ ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", -+ dlci, tty_idx); -+ if (iscmdtty[tty_idx]) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", -+ __FUNCTION__, dlci, tty_idx); -+ } -+ break; -+ } -+ tty = mux_table[tty_idx]; -+ if ((!mux_tty[tty_idx]) || (!tty)) { -+ TS0710_PRINTK -+ ("MUX: No application waiting for, discard it! /dev/mux%d\n", -+ tty_idx); -+ } else { /* Begin processing received data */ -+ if ((!mux_recv_info_flags[tty_idx]) -+ || (!mux_recv_info[tty_idx])) { -+ TS0710_PRINTK -+ ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", -+ tty_idx); -+ break; -+ } -+ -+ recv_info = mux_recv_info[tty_idx]; -+ if (recv_info->total > 8192) { -+ TS0710_PRINTK -+ ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", -+ tty_idx); -+ break; -+ } -+ -+ queue_data = 0; -+ post_recv = 0; -+ flow_control = 0; -+ recv_room = 65535; -+ if (tty->receive_room) -+ recv_room = tty->receive_room; -+ -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ queue_data = 1; -+ } else { -+ if (test_bit -+ (TTY_DONT_FLIP, &tty->flags)) { -+ queue_data = 1; -+ post_recv = 1; -+ } else if (recv_info->total) { -+ queue_data = 1; -+ post_recv = 1; -+ } else if (recv_room < uih_len) { -+ queue_data = 1; -+ flow_control = 1; -+ } -+ -+ if ((recv_room - -+ (uih_len + recv_info->total)) < -+ ts0710->dlci[dlci].mtu) { -+ flow_control = 1; -+ } -+ } -+ -+ if (!queue_data) { -+ /* Put received data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put received data into read buffer of /dev/mux%d", -+ tty_idx); -+ -+#ifdef TS0710DEBUG -+ t = jiffies; -+#endif -+ -+ (tty->ldisc.receive_buf) (tty, -+ uih_data_start, -+ NULL, -+ uih_len); -+ -+#ifdef TS0710DEBUG -+ TS0710_DEBUG -+ ("tty->ldisc.receive_buf take ticks: %lu", -+ (jiffies - t)); -+#endif -+ -+ } else { /* Queue data */ -+ -+ TS0710_DEBUG -+ ("Put received data into recv queue of /dev/mux%d", -+ tty_idx); -+ if (recv_info->total) { -+ /* recv_info is already linked into mux_recv_queue */ -+ -+ recv_packet = -+ get_mux_recv_packet -+ (uih_len); -+ if (!recv_packet) { -+ TS0710_PRINTK -+ ("MUX %s: no memory\n", -+ __FUNCTION__); -+ break; -+ } -+ -+ memcpy(recv_packet->data, -+ uih_data_start, uih_len); -+ recv_packet->length = uih_len; -+ recv_info->total += uih_len; -+ recv_packet->next = NULL; -+ -+ if (!(recv_info->mux_packet)) { -+ recv_info->mux_packet = -+ recv_packet; -+ } else { -+ recv_packet2 = -+ recv_info-> -+ mux_packet; -+ while (recv_packet2-> -+ next) { -+ recv_packet2 = -+ recv_packet2-> -+ next; -+ } -+ recv_packet2->next = -+ recv_packet; -+ } /* End if( !(recv_info->mux_packet) ) */ -+ } else { /* recv_info->total == 0 */ -+ if (uih_len > -+ TS0710MUX_RECV_BUF_SIZE) { -+ TS0710_PRINTK -+ ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", -+ tty_idx, uih_len); -+ uih_len = -+ TS0710MUX_RECV_BUF_SIZE; -+ } -+ memcpy(recv_info->data, -+ uih_data_start, uih_len); -+ recv_info->length = uih_len; -+ recv_info->total = uih_len; -+ -+ add_post_recv_queue -+ (&mux_recv_queue, -+ recv_info); -+ } /* End recv_info->total == 0 */ -+ } /* End Queue data */ -+ -+ if (flow_control) { -+ /* Do something for flow control */ -+ ts0710_flow_off(tty, dlci, ts0710); -+ } -+ -+ if (tty_idx == -+ dlci2tty[TS0710MUX_GPRS1_DLCI].datatty) { -+ if (add_count -+ (TS0710MUX_GPRS1_RECV_COUNT_IDX, -+ uih_len) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2 -+ [TS0710MUX_GPRS1_RECV_COUNT_IDX] -+ += uih_len; -+ } -+ } else if (tty_idx == -+ dlci2tty[TS0710MUX_GPRS2_DLCI]. -+ datatty) { -+ if (add_count -+ (TS0710MUX_GPRS2_RECV_COUNT_IDX, -+ uih_len) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2 -+ [TS0710MUX_GPRS2_RECV_COUNT_IDX] -+ += uih_len; -+ } -+ } -+ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ } /* End processing received data */ -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ default: -+ TS0710_DEBUG("illegal packet\n"); -+ break; -+ } -+ return 0; -+} -+ -+/* -+int ts0710_send_data(ts0710_con *ts0710, __u8 dlci, __u8 *data, __u32 count) -+{ -+ __u32 c, total = 0; -+ __u8 tag, first; -+ -+ if( ts0710->dlci[0].state == FLOW_STOPPED ){ -+ TS0710_DEBUG("Flow stopped on all channels, returning zero\n"); -+*/ -+/* -+ return -EFLOWSTOPPED; -+ } else if( ts0710->dlci[dlci].state == FLOW_STOPPED ){ -+ TS0710_DEBUG("Flow stopped, returning zero\n"); -+*/ -+/* -+ return -EFLOWSTOPPED; -+ } else if( ts0710->dlci[dlci].state == CONNECTED ){ -+ -+ TS0710_DEBUG("trying to send %d bytes\n", count); -+ tag = *data; -+ first = 1; -+*/ -+ /* The first byte is always a Cmd/Data tag */ -+/* -+ while( count > 1 ){ -+ -+ c = min(count, ts0710->dlci[dlci].mtu); -+ if( queue_uih(data, c, ts0710, dlci) <= 0 ) { -+ break; -+ } -+ -+ total += (c - 1); -+ data += (c - 1); -+ *data = tag; -+ count -= (c - 1); -+ -+ if( first ) { -+ first = 0; -+ total++; -+ } -+ } -+ TS0710_DEBUG("sent %d bytes\n", total); -+ return total; -+ } else { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ return -EDISCONNECTED; -+ } -+} -+*/ -+ -+/* Close ts0710 channel */ -+static void ts0710_close_channel(__u8 dlci) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int try; -+ unsigned long t; -+ -+ TS0710_DEBUG("ts0710_disc_command on channel %d\n", dlci); -+ -+ if ((ts0710->dlci[dlci].state == DISCONNECTED) -+ || (ts0710->dlci[dlci].state == REJECTED)) { -+ return; -+ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { -+ /* Reentry */ -+ return; -+ } else { -+ ts0710->dlci[dlci].state = DISCONNECTING; -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_disc(ts0710, dlci); -+ interruptible_sleep_on_timeout(&ts0710->dlci[dlci]. -+ close_wait, -+ TS0710MUX_TIME_OUT); -+ if (ts0710->dlci[dlci].state == DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI %d Send DISC got signal!\n", -+ dlci); -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI %d Send DISC timeout!\n", dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[dlci].state != DISCONNECTED) { -+ if (dlci == 0) { /* Control Channel */ -+ ts0710_upon_disconnect(); -+ } else { /* Other Channel */ -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ close_wait); -+ ts0710_reset_dlci(dlci); -+ } -+ } -+ } -+} -+ -+int ts0710_open_channel(__u8 dlci) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int try; -+ int retval; -+ unsigned long t; -+ -+ retval = -ENODEV; -+ if (dlci == 0) { // control channel -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == FLOW_STOPPED)) { -+ return 0; -+ } else if (ts0710->dlci[0].state == CONNECTING) { -+ /* Reentry */ -+ TS0710_PRINTK -+ ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", -+ current->pid, current->comm); -+ try = 11; -+ while (try--) { -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710->dlci[0]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[0].state == REJECTED) { -+ retval = -EREJECTED; -+ break; -+ } else if (ts0710->dlci[0].state == -+ DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting timeout!\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[0].state == CONNECTING) { -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = DISCONNECTED; -+ } -+ } else if ((ts0710->dlci[0].state != DISCONNECTED) -+ && (ts0710->dlci[0].state != REJECTED)) { -+ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ return retval; -+ } else { -+ ts0710->initiator = 1; -+ ts0710->dlci[0].state = CONNECTING; -+ ts0710->dlci[0].initiator = 1; -+ try = 10; -+ while (try--) { -+ t = jiffies; -+ send_sabm(ts0710, 0); -+ interruptible_sleep_on_timeout(&ts0710->dlci[0]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[0].state == REJECTED) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got rejected!\n", -+ dlci); -+ retval = -EREJECTED; -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[0].open_wait); -+ } -+ } else { // other channel -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return retval; -+ } else if ((ts0710->dlci[dlci].state == CONNECTED) -+ || (ts0710->dlci[dlci].state == FLOW_STOPPED)) { -+ return 0; -+ } else if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ /* Reentry */ -+ try = 8; -+ while (try--) { -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci[dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[dlci].state == CONNECTED) -+ || (ts0710->dlci[dlci].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[dlci].state == REJECTED) { -+ retval = -EREJECTED; -+ break; -+ } else if (ts0710->dlci[dlci].state == -+ DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting timeout!\n", -+ dlci); -+ continue; -+ } else -+ if ((ts0710->dlci[dlci].state == -+ NEGOTIATING) -+ || (ts0710->dlci[dlci].state == -+ CONNECTING)) { -+ continue; -+ } -+ } -+ -+ if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ } else if ((ts0710->dlci[dlci].state != DISCONNECTED) -+ && (ts0710->dlci[dlci].state != REJECTED)) { -+ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ return retval; -+ } else { -+ ts0710->dlci[dlci].state = NEGOTIATING; -+ ts0710->dlci[dlci].initiator = 1; -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_pn_msg(ts0710, 7, ts0710->dlci[dlci].mtu, -+ 0, 0, dlci, 1); -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci[dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send pn_msg got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send pn_msg timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_sabm(ts0710, dlci); -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci -+ [dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[dlci].state == -+ CONNECTED) -+ || (ts0710->dlci[dlci].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[dlci].state == -+ REJECTED) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got rejected!\n", -+ dlci); -+ retval = -EREJECTED; -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= -+ TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ } -+ -+ if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ } -+ } -+ return retval; -+} -+ -+static int ts0710_exec_test_cmd(void) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 *f_buf; /* Frame buffer */ -+ __u8 *d_buf; /* Data buffer */ -+ int retval = -EFAULT; -+ int j; -+ unsigned long t; -+ -+ if (ts0710->be_testing) { -+ /* Reentry */ -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710->test_wait, -+ 3 * TS0710MUX_TIME_OUT); -+ if (ts0710->be_testing == 0) { -+ if (ts0710->test_errs == 0) { -+ retval = 0; -+ } else { -+ retval = -EFAULT; -+ } -+ } else if (signal_pending(current)) { -+ TS0710_DEBUG -+ ("Wait for Test_cmd response got signal!\n"); -+ retval = -EAGAIN; -+ } else if ((jiffies - t) >= 3 * TS0710MUX_TIME_OUT) { -+ TS0710_DEBUG("Wait for Test_cmd response timeout!\n"); -+ retval = -EFAULT; -+ } -+ } else { -+ ts0710->be_testing = 1; /* Set the flag */ -+ -+ f_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); -+ d_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); -+ if ((!f_buf) || (!d_buf)) { -+ if (f_buf) { -+ kfree(f_buf); -+ } -+ if (d_buf) { -+ kfree(d_buf); -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ ts0710->test_errs = TEST_PATTERN_SIZE; -+ wake_up_interruptible(&ts0710->test_wait); -+ return -ENOMEM; -+ } -+ -+ for (j = 0; j < TEST_PATTERN_SIZE; j++) { -+ d_buf[j] = j & 0xFF; -+ } -+ -+ t = jiffies; -+ ts0710_test_msg(ts0710, d_buf, TEST_PATTERN_SIZE, MCC_CMD, -+ f_buf); -+ interruptible_sleep_on_timeout(&ts0710->test_wait, -+ 2 * TS0710MUX_TIME_OUT); -+ if (ts0710->be_testing == 0) { -+ if (ts0710->test_errs == 0) { -+ retval = 0; -+ } else { -+ retval = -EFAULT; -+ } -+ } else if (signal_pending(current)) { -+ TS0710_DEBUG("Send Test_cmd got signal!\n"); -+ retval = -EAGAIN; -+ } else if ((jiffies - t) >= 2 * TS0710MUX_TIME_OUT) { -+ TS0710_DEBUG("Send Test_cmd timeout!\n"); -+ ts0710->test_errs = TEST_PATTERN_SIZE; -+ retval = -EFAULT; -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ wake_up_interruptible(&ts0710->test_wait); -+ -+ /* Release buffer */ -+ if (f_buf) { -+ kfree(f_buf); -+ } -+ if (d_buf) { -+ kfree(d_buf); -+ } -+ } -+ -+ return retval; -+} -+ -+static void mux_sched_send(void) -+{ -+ -+#ifdef USB_FOR_MUX -+ schedule_work(&send_tqueue); -+#else -+ if (!tq_serial_for_mux) { -+ TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", -+ __FUNCTION__); -+ return; -+ } -+ schedule_work(&send_tqueue); -+ mark_bh(SERIAL_BH); -+#endif -+ -+} -+ -+/**************************** -+ * TTY driver routines -+*****************************/ -+ -+static void mux_close(struct tty_struct *tty, struct file *filp) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ __u8 cmdtty; -+ __u8 datatty; -+ -+ UNUSED_PARAM(filp); -+ -+ if (!tty) { -+ return; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ if (mux_tty[line] > 0) -+ mux_tty[line]--; -+ -+ dlci = tty2dlci[line]; -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { -+ if (dlci == 1) { -+ ts0710_close_channel(0); -+ TS0710_PRINTK -+ ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); -+ TS0710_SIG2APLOGD(); -+ } -+ ts0710_close_channel(dlci); -+ } -+ -+ if (mux_tty[line] == 0) { -+ if ((mux_send_info_flags[line]) -+ && (mux_send_info[line]) -+ /*&& (mux_send_info[line]->filled == 0) */ -+ ) { -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ } -+ -+ if ((mux_recv_info_flags[line]) -+ && (mux_recv_info[line]) -+ && (mux_recv_info[line]->total == 0)) { -+ mux_recv_info_flags[line] = 0; -+ free_mux_recv_struct(mux_recv_info[line]); -+ mux_recv_info[line] = 0; -+ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); -+ } -+ -+ ts0710_flow_on(dlci, ts0710); -+ schedule_work(&post_recv_tqueue); -+ -+ wake_up_interruptible(&tty->read_wait); -+ wake_up_interruptible(&tty->write_wait); -+ tty->packet = 0; -+ } -+} -+ -+static void mux_throttle(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ int i; -+ __u8 dlci; -+ -+ if (!tty) { -+ return; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, -+ line); -+ -+ dlci = tty2dlci[line]; -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (ts0710->dlci[dlci].flow_control) { -+ return; -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg -+ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX Send Flow off on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 1; -+ break; -+ } -+ } -+} -+ -+static void mux_unthrottle(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ mux_recv_struct *recv_info; -+ -+ if (!tty) { -+ return; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ if ((!mux_recv_info_flags[line]) || (!mux_recv_info[line])) { -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, -+ line); -+ -+ recv_info = mux_recv_info[line]; -+ dlci = tty2dlci[line]; -+ -+ if (recv_info->total) { -+ recv_info->post_unthrottle = 1; -+ schedule_work(&post_recv_tqueue); -+ } else { -+ ts0710_flow_on(dlci, ts0710); -+ } -+} -+ -+static int mux_chars_in_buffer(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int retval; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ -+ retval = TS0710MUX_MAX_CHARS_IN_BUF; -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG -+ ("Flow stopped on all channels, returning MAX chars in buffer\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning MAX chars in buffer\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ goto out; -+ } -+ -+ if (!(mux_send_info_flags[line])) { -+ goto out; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ goto out; -+ } -+ if (send_info->filled) { -+ goto out; -+ } -+ -+ retval = 0; -+ -+ out: -+ return retval; -+} -+ -+static int mux_chars_in_serial_buffer(struct tty_struct *tty) -+{ -+ UNUSED_PARAM(tty); -+ -+ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -+ TS0710_PRINTK -+ ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", -+ __FUNCTION__); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK -+ ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", -+ __FUNCTION__); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return 0; -+ } -+ return COMM_FOR_MUX_DRIVER->chars_in_buffer(COMM_FOR_MUX_TTY); -+} -+ -+static int mux_write(struct tty_struct *tty, -+ const unsigned char *buf, int count) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ __u8 *d_buf; -+ __u16 c; -+ __u8 post_recv; -+ -+ if (count <= 0) { -+ return 0; -+ } -+ -+ if (!tty) { -+ return 0; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) -+ return -ENODEV; -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG -+ ("Flow stopped on all channels, returning zero /dev/mux%d\n", -+ line); -+ return 0; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning zero /dev/mux%d\n", line); -+ return 0; -+ } else if (ts0710->dlci[dlci].state == CONNECTED) { -+ -+ if (!(mux_send_info_flags[line])) { -+ TS0710_PRINTK -+ ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", -+ line); -+ return -ENODEV; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ TS0710_PRINTK -+ ("MUX Error: mux_write: mux_send_info[%d] == 0\n", -+ line); -+ return -ENODEV; -+ } -+ -+ c = min(count, (ts0710->dlci[dlci].mtu - 1)); -+ if (c <= 0) { -+ return 0; -+ } -+ -+ if (test_and_set_bit(BUF_BUSY, &send_info->flags)) -+ return 0; -+ -+ if (send_info->filled) { -+ clear_bit(BUF_BUSY, &send_info->flags); -+ return 0; -+ } -+ -+ d_buf = ((__u8 *) send_info->buf) + TS0710MUX_SEND_BUF_OFFSET; -+ memcpy(&d_buf[1], buf, c); -+ -+ TS0710_DEBUG("Prepare to send %d bytes from /dev/mux%d", c, -+ line); -+ if (iscmdtty[line]) { -+ TS0710_DEBUGSTR(&d_buf[1], c); -+ TS0710_DEBUG("CMDTAG"); -+ d_buf[0] = CMDTAG; -+ } else { -+ TS0710_DEBUG("DATATAG"); -+ d_buf[0] = DATATAG; -+ } -+ -+ TS0710_DEBUGHEX(d_buf, c + 1); -+ -+ send_info->frame = d_buf; -+ queue_uih(send_info, c + 1, ts0710, dlci); -+ send_info->filled = 1; -+ clear_bit(BUF_BUSY, &send_info->flags); -+ -+ post_recv = 0; -+ if (dlci == TS0710MUX_GPRS1_DLCI) { -+ if (add_count -+ (TS0710MUX_GPRS1_SEND_COUNT_IDX, c) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2[TS0710MUX_GPRS1_SEND_COUNT_IDX] -+ += c; -+ } -+ } else if (dlci == TS0710MUX_GPRS2_DLCI) { -+ if (add_count -+ (TS0710MUX_GPRS2_SEND_COUNT_IDX, c) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2[TS0710MUX_GPRS2_SEND_COUNT_IDX] -+ += c; -+ } -+ } -+ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ -+ if (mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY) == 0) { -+ /* Sending bottom half should be -+ run after return from this function */ -+ mux_sched_send(); -+ } -+ return c; -+ } else { -+ TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); -+ return -EDISCONNECTED; -+ } -+} -+ -+static int mux_write_room(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int retval; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ -+ retval = 0; -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on all channels, returning ZERO\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning ZERO\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ goto out; -+ } -+ -+ if (!(mux_send_info_flags[line])) { -+ goto out; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ goto out; -+ } -+ if (send_info->filled) { -+ goto out; -+ } -+ -+ retval = ts0710->dlci[dlci].mtu - 1; -+ -+ out: -+ return retval; -+} -+ -+static int mux_ioctl(struct tty_struct *tty, struct file *file, -+ unsigned int cmd, unsigned long arg) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(arg); -+ -+ if (!tty) { -+ return -EIO; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return -ENODEV; -+ } -+ -+ dlci = tty2dlci[line]; -+ switch (cmd) { -+ case TS0710MUX_IO_MSC_HANGUP: -+ if (ts0710_msc_msg(ts0710, EA | RTR | DV, MCC_CMD, dlci) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_TEST_CMD: -+ return ts0710_exec_test_cmd(); -+/* -+ case TS0710MUX_IO_DLCI_FC_ON: -+ if( line == 0 ) { -+ break; -+ } -+ if( ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_DLCI_FC_OFF: -+ if( line == 0 ) { -+ break; -+ } -+ if( ts0710_msc_msg(ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_FC_ON: -+ if( line != 0 ) { -+ break; -+ } -+ if( ts0710_fcon_msg(ts0710, MCC_CMD) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_FC_OFF: -+ if( line != 0 ) { -+ break; -+ } -+ if( ts0710_fcoff_msg(ts0710, MCC_CMD) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+*/ -+ default: -+ break; -+ } -+ return -ENOIOCTLCMD; -+} -+ -+static void mux_flush_buffer(struct tty_struct *tty) -+{ -+ int line; -+ -+ if (!tty) { -+ return; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); -+ -+ if ((mux_send_info_flags[line]) -+ && (mux_send_info[line]) -+ && (mux_send_info[line]->filled)) { -+ -+ mux_send_info[line]->filled = 0; -+ } -+ -+ wake_up_interruptible(&tty->write_wait); -+#ifdef SERIAL_HAVE_POLL_WAIT -+ wake_up_interruptible(&tty->poll_wait); -+#endif -+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && -+ tty->ldisc.write_wakeup) { -+ (tty->ldisc.write_wakeup) (tty); -+ } -+ -+/* -+ if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { -+ TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return; -+ } -+ return COMM_FOR_MUX_DRIVER->flush_buffer(COMM_FOR_MUX_TTY); -+*/ -+} -+ -+static int mux_open(struct tty_struct *tty, struct file *filp) -+{ -+ int retval; -+ int line; -+ __u8 dlci; -+ __u8 cmdtty; -+ __u8 datatty; -+ mux_send_struct *send_info; -+ mux_recv_struct *recv_info; -+ -+ UNUSED_PARAM(filp); -+ -+ retval = -ENODEV; -+ if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { -+ -+#ifdef USB_FOR_MUX -+ TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); -+#else -+ TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); -+#endif -+ -+ goto out; -+ } -+ -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+#ifdef TS0710SERVER -+ /* do nothing as a server */ -+ mux_tty[line]++; -+ retval = 0; -+#else -+ mux_tty[line]++; -+ dlci = tty2dlci[line]; -+ -+/* if( dlci == 1 ) { */ -+ /* Open server channel 0 first */ -+ if ((retval = ts0710_open_channel(0)) != 0) { -+ TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); -+ ts0710_init(); -+ -+ mux_tty[line]--; -+ goto out; -+ } -+/* } */ -+ -+ /* Allocate memory first. As soon as connection has been established, MUX may receive */ -+ if (mux_send_info_flags[line] == 0) { -+ send_info = -+ (mux_send_struct *) kmalloc(sizeof(mux_send_struct), -+ GFP_KERNEL); -+ if (!send_info) { -+ retval = -ENOMEM; -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ send_info->length = 0; -+ send_info->flags = 0; -+ send_info->filled = 0; -+ mux_send_info[line] = send_info; -+ mux_send_info_flags[line] = 1; -+ TS0710_DEBUG("Allocate mux_send_info for /dev/mux%d", line); -+ } -+ -+ if (mux_recv_info_flags[line] == 0) { -+ recv_info = -+ (mux_recv_struct *) kmalloc(sizeof(mux_recv_struct), -+ GFP_KERNEL); -+ if (!recv_info) { -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ retval = -ENOMEM; -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ recv_info->length = 0; -+ recv_info->total = 0; -+ recv_info->mux_packet = 0; -+ recv_info->next = 0; -+ recv_info->no_tty = line; -+ recv_info->post_unthrottle = 0; -+ mux_recv_info[line] = recv_info; -+ mux_recv_info_flags[line] = 1; -+ TS0710_DEBUG("Allocate mux_recv_info for /dev/mux%d", line); -+ } -+ -+ /* Now establish DLCI connection */ -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { -+ if ((retval = ts0710_open_channel(dlci)) != 0) { -+ TS0710_PRINTK("MUX: Can't connected channel %d!\n", -+ dlci); -+ ts0710_reset_dlci(dlci); -+ -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ -+ mux_recv_info_flags[line] = 0; -+ free_mux_recv_struct(mux_recv_info[line]); -+ mux_recv_info[line] = 0; -+ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ } -+ -+ retval = 0; -+#endif -+ out: -+ return retval; -+} -+ -+/* mux dispatcher, call from serial.c receiver_chars() */ -+void mux_dispatcher(struct tty_struct *tty) -+{ -+ UNUSED_PARAM(tty); -+ -+ schedule_work(&receive_tqueue); -+} -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+static int send_ack(ts0710_con * ts0710, __u8 seq_num, __u8 bp_seq1, -+ __u8 bp_seq2) -+#else -+static int send_ack(ts0710_con * ts0710, __u8 seq_num) -+#endif -+{ -+ __u8 buf[20]; -+ short_frame *ack; -+ -+#ifdef TS0710SEQ2 -+ static __u16 ack_seq = 0; -+#endif -+ -+ ack = (short_frame *) (buf + 1); -+ ack->h.addr.ea = 1; -+ ack->h.addr.cr = ((ts0710->initiator) & 0x1); -+ ack->h.addr.d = 0; -+ ack->h.addr.server_chn = 0; -+ ack->h.control = ACK; -+ ack->h.length.ea = 1; -+ -+#ifdef TS0710SEQ2 -+ ack->h.length.len = 5; -+ ack->data[0] = seq_num; -+ ack->data[1] = bp_seq1; -+ ack->data[2] = bp_seq2; -+ ack->data[3] = (ack_seq & 0xFF); -+ ack->data[4] = (ack_seq >> 8) & 0xFF; -+ ack_seq++; -+ ack->data[5] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); -+#else -+ ack->h.length.len = 1; -+ ack->data[0] = seq_num; -+ ack->data[1] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); -+#endif -+ -+ return basic_write(ts0710, buf, -+ (sizeof(short_frame) + FCS_SIZE + -+ ack->h.length.len)); -+} -+ -+/*For BP UART problem End*/ -+ -+static void receive_worker(void *private_) -+{ -+ struct tty_struct *tty = COMM_FOR_MUX_TTY; -+ int i, count; -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ static unsigned char *tbuf_ptr = &tbuf[0]; -+ static unsigned char *start_flag = 0; -+ unsigned char *search, *to, *from; -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ static int framelen = -1; -+ -+ /*For BP UART problem Begin */ -+ static __u8 expect_seq = 0; -+ __u32 crc_error; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ /*For BP UART problem End */ -+ -+ UNUSED_PARAM(private_); -+ -+ if (!tty) -+ return; -+ -+#ifdef USB_FOR_MUX -+ TS0710_DEBUG("Receive following bytes from IPC-USB"); -+#else -+ TS0710_DEBUG("Receive following bytes from UART"); -+#endif -+ -+ TS0710_DEBUGHEX(cp, count); -+ -+ if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -+ TS0710_PRINTK -+ ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -+ count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -+ } -+ -+ count = tty_buffer_request_room(tty, count); -+ -+ for (i = 0; i < count; i++) -+ tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); -+ -+ tbuf_ptr += count; -+ search = &tbuf[0]; -+ -+ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -+ schedule_work(&receive_tqueue); -+ return; -+ } -+ -+ if ((start_flag != 0) && (framelen != -1)) { -+ if ((tbuf_ptr - start_flag) < framelen) { -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+ return; -+ } -+ } -+ -+ while (1) { -+ if (start_flag == 0) { /* Frame Start Flag not found */ -+ framelen = -1; -+ while (search < tbuf_ptr) { -+ if (*search == TS0710_BASIC_FLAG) { -+ start_flag = search; -+ break; -+ } -+#ifdef TS0710LOG -+ else { -+ TS0710_LOG(">S %02x %c\n", *search, -+ *search); -+ } -+#endif -+ -+ search++; -+ } -+ -+ if (start_flag == 0) { -+ tbuf_ptr = &tbuf[0]; -+ break; -+ } -+ } else { /* Frame Start Flag found */ -+ /* 1 start flag + 1 address + 1 control + 1 or 2 length + lengths data + 1 FCS + 1 end flag */ -+ /* For BP UART problem 1 start flag + 1 seq_num + 1 address + ...... */ -+ /*if( (framelen == -1) && ((tbuf_ptr - start_flag) > TS0710_MAX_HDR_SIZE) ) */ -+ if ((framelen == -1) && ((tbuf_ptr - start_flag) > (TS0710_MAX_HDR_SIZE + SEQ_FIELD_SIZE))) { /*For BP UART problem */ -+ /*short_pkt = (short_frame *) (start_flag + 1); */ -+ short_pkt = (short_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ if (short_pkt->h.length.ea == 1) { /* short frame */ -+ /*framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1; */ -+ framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1 + SEQ_FIELD_SIZE; /*For BP UART problem */ -+ } else { /* long frame */ -+ /*long_pkt = (long_frame *) (start_flag + 1); */ -+ long_pkt = (long_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ /*framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH( long_pkt->h.length ) + 2; */ -+ framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH(long_pkt->h.length) + 2 + SEQ_FIELD_SIZE; /*For BP UART problem */ -+ } -+ -+ /*if( framelen > TS0710MUX_MAX_TOTAL_FRAME_SIZE ) { */ -+ if (framelen > (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)) { /*For BP UART problem */ -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ (tbuf_ptr - -+ start_flag)); -+ TS0710_PRINTK -+ ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", -+ /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ -+ __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ -+ search = start_flag + 1; -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } -+ } -+ -+ if ((framelen != -1) -+ && ((tbuf_ptr - start_flag) >= framelen)) { -+ if (*(start_flag + framelen - 1) == TS0710_BASIC_FLAG) { /* OK, We got one frame */ -+ -+ /*For BP UART problem Begin */ -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ -+ short_pkt = -+ (short_frame *) (start_flag + -+ ADDRESS_FIELD_OFFSET); -+ if ((short_pkt->h.length.ea) == 0) { -+ long_pkt = -+ (long_frame *) (start_flag + -+ ADDRESS_FIELD_OFFSET); -+ uih_len = -+ GET_LONG_LENGTH(long_pkt->h. -+ length); -+ uih_data_start = -+ long_pkt->h.data; -+ -+ crc_error = -+ crc_check((__u8 -+ *) (start_flag + -+ SLIDE_BP_SEQ_OFFSET), -+ LONG_CRC_CHECK + -+ 1, -+ *(uih_data_start + -+ uih_len)); -+ } else { -+ uih_len = -+ short_pkt->h.length.len; -+ uih_data_start = -+ short_pkt->data; -+ -+ crc_error = -+ crc_check((__u8 -+ *) (start_flag + -+ SLIDE_BP_SEQ_OFFSET), -+ SHORT_CRC_CHECK + -+ 1, -+ *(uih_data_start + -+ uih_len)); -+ } -+ -+ if (!crc_error) { -+ if (expect_seq == -+ *(start_flag + -+ SLIDE_BP_SEQ_OFFSET)) { -+ expect_seq++; -+ if (expect_seq >= 4) { -+ expect_seq = 0; -+ } -+#ifdef TS0710SEQ2 -+ send_ack -+ (&ts0710_connection, -+ expect_seq, -+ *(start_flag + -+ FIRST_BP_SEQ_OFFSET), -+ *(start_flag + -+ SECOND_BP_SEQ_OFFSET)); -+#else -+ send_ack -+ (&ts0710_connection, -+ expect_seq); -+#endif -+ -+ ts0710_recv_data -+ (&ts0710_connection, -+ start_flag + -+ ADDRESS_FIELD_OFFSET, -+ framelen - 2 - -+ SEQ_FIELD_SIZE); -+ } else { -+ -+#ifdef TS0710DEBUG -+ if (* -+ (start_flag + -+ SLIDE_BP_SEQ_OFFSET) -+ != 0x9F) { -+#endif -+ -+ TS0710_LOG -+ ("MUX sequence number %d is not expected %d, discard data!\n", -+ * -+ (start_flag -+ + -+ SLIDE_BP_SEQ_OFFSET), -+ expect_seq); -+ -+#ifdef TS0710SEQ2 -+ send_ack -+ (&ts0710_connection, -+ expect_seq, -+ * -+ (start_flag -+ + -+ FIRST_BP_SEQ_OFFSET), -+ * -+ (start_flag -+ + -+ SECOND_BP_SEQ_OFFSET)); -+#else -+ send_ack -+ (&ts0710_connection, -+ expect_seq); -+#endif -+ -+#ifdef TS0710DEBUG -+ } else { -+ *(uih_data_start -+ + uih_len) = -+ 0; -+ TS0710_PRINTK -+ ("MUX bp log: %s\n", -+ uih_data_start); -+ } -+#endif -+ -+ } -+ } else { /* crc_error */ -+ search = start_flag + 1; -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } /*End if(!crc_error) */ -+ -+ /*For BP UART problem End */ -+ -+/*For BP UART problem -+ TS0710_LOGSTR_FRAME(0, start_flag, framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ ts0710_recv_data(&ts0710_connection, start_flag + 1, framelen - 2); -+*/ -+ search = start_flag + framelen; -+ } else { -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ TS0710_PRINTK -+ ("MUX: Lost synchronization!\n"); -+ search = start_flag + 1; -+ } -+ -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } -+ -+ if (start_flag != &tbuf[0]) { -+ to = tbuf; -+ from = start_flag; -+ count = tbuf_ptr - start_flag; -+ while (count--) { -+ *to++ = *from++; -+ } -+ -+ tbuf_ptr -= (start_flag - tbuf); -+ start_flag = tbuf; -+ } -+ break; -+ } /* End Frame Start Flag found */ -+ } /* End while(1) */ -+ -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+} -+ -+static void post_recv_worker(void *private_) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int tty_idx; -+ struct tty_struct *tty; -+ __u8 post_recv; -+ __u8 flow_control; -+ __u8 dlci; -+ mux_recv_struct *recv_info, *recv_info2, *post_recv_q; -+ int recv_room; -+ mux_recv_packet *recv_packet, *recv_packet2; -+ __u8 j; -+ -+ UNUSED_PARAM(private_); -+ -+ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -+ schedule_work(&post_recv_tqueue); -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into post_recv_worker"); -+ -+ post_recv = 0; -+ if (!mux_recv_queue) { -+ goto out; -+ } -+ -+ post_recv_q = NULL; -+ recv_info2 = mux_recv_queue; -+ while ((recv_info = recv_info2)) { -+ recv_info2 = recv_info->next; -+ -+ if (!(recv_info->total)) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", -+ __FUNCTION__); -+ continue; -+ } -+ -+ tty_idx = recv_info->no_tty; -+ dlci = tty2dlci[tty_idx]; -+ tty = mux_table[tty_idx]; -+ if ((!mux_tty[tty_idx]) || (!tty)) { -+ TS0710_PRINTK -+ ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", -+ tty_idx); -+ mux_recv_info_flags[tty_idx] = 0; -+ free_mux_recv_struct(mux_recv_info[tty_idx]); -+ mux_recv_info[tty_idx] = 0; -+ ts0710_flow_on(dlci, ts0710); -+ continue; -+ } -+ -+ TS0710_DEBUG("/dev/mux%d recv_info->total is: %d", tty_idx, -+ recv_info->total); -+ -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ add_post_recv_queue(&post_recv_q, recv_info); -+ continue; -+ } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { -+ post_recv = 1; -+ add_post_recv_queue(&post_recv_q, recv_info); -+ continue; -+ } -+ -+ flow_control = 0; -+ recv_packet2 = recv_info->mux_packet; -+ while (recv_info->total) { -+ recv_room = 65535; -+ if (tty->receive_room) -+ recv_room = tty->receive_room; -+ -+ if (recv_info->length) { -+ if (recv_room < recv_info->length) { -+ flow_control = 1; -+ break; -+ } -+ -+ /* Put queued data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put queued recv data into read buffer of /dev/mux%d", -+ tty_idx); -+ TS0710_DEBUGHEX(recv_info->data, -+ recv_info->length); -+ (tty->ldisc.receive_buf) (tty, recv_info->data, -+ NULL, -+ recv_info->length); -+ recv_info->total -= recv_info->length; -+ recv_info->length = 0; -+ } else { /* recv_info->length == 0 */ -+ if ((recv_packet = recv_packet2)) { -+ recv_packet2 = recv_packet->next; -+ -+ if (recv_room < recv_packet->length) { -+ flow_control = 1; -+ recv_info->mux_packet = -+ recv_packet; -+ break; -+ } -+ -+ /* Put queued data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put queued recv data into read buffer of /dev/mux%d", -+ tty_idx); -+ TS0710_DEBUGHEX(recv_packet->data, -+ recv_packet->length); -+ (tty->ldisc.receive_buf) (tty, -+ recv_packet-> -+ data, NULL, -+ recv_packet-> -+ length); -+ recv_info->total -= recv_packet->length; -+ free_mux_recv_packet(recv_packet); -+ } else { -+ TS0710_PRINTK -+ ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", -+ __FUNCTION__, recv_info->total); -+ } -+ } /* End recv_info->length == 0 */ -+ } /* End while( recv_info->total ) */ -+ -+ if (!(recv_info->total)) { -+ /* Important clear */ -+ recv_info->mux_packet = 0; -+ -+ if (recv_info->post_unthrottle) { -+ /* Do something for post_unthrottle */ -+ ts0710_flow_on(dlci, ts0710); -+ recv_info->post_unthrottle = 0; -+ } -+ } else { -+ add_post_recv_queue(&post_recv_q, recv_info); -+ -+ if (flow_control) { -+ /* Do something for flow control */ -+ if (recv_info->post_unthrottle) { -+ set_bit(TTY_THROTTLED, &tty->flags); -+ recv_info->post_unthrottle = 0; -+ } else { -+ ts0710_flow_off(tty, dlci, ts0710); -+ } -+ } /* End if( flow_control ) */ -+ } -+ } /* End while( (recv_info = recv_info2) ) */ -+ -+ mux_recv_queue = post_recv_q; -+ -+ out: -+ if (post_recv_count_flag) { -+ post_recv_count_flag = 0; -+ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { -+ if (mux_data_count2[j] > 0) { -+ if (add_count(j, mux_data_count2[j]) == 0) { -+ mux_data_count2[j] = 0; -+ } else { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ } -+ } -+ } /* End for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) */ -+ } -+ /* End if( post_recv_count_flag ) */ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+} -+ -+/* mux sender, call from serial.c transmit_chars() */ -+void mux_sender(void) -+{ -+ mux_send_struct *send_info; -+ int chars; -+ __u8 idx; -+ -+ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); -+ if (!chars) { -+ /* chars == 0 */ -+ TS0710_LOG("<[]\n"); -+ mux_sched_send(); -+ return; -+ } -+ -+ idx = mux_send_info_idx; -+ if ((idx < NR_MUXS) && (mux_send_info_flags[idx])) { -+ send_info = mux_send_info[idx]; -+ if ((send_info) -+ && (send_info->filled) -+ && (send_info->length <= -+ (TS0710MUX_SERIAL_BUF_SIZE - chars))) { -+ -+ mux_sched_send(); -+ } -+ } -+} -+ -+static void send_worker(void *private_) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 j; -+ mux_send_struct *send_info; -+ int chars; -+ struct tty_struct *tty; -+ __u8 dlci; -+ -+ UNUSED_PARAM(private_); -+ -+ TS0710_DEBUG("Enter into send_worker"); -+ -+ mux_send_info_idx = NR_MUXS; -+ -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on all channels\n"); -+ return; -+ } -+ -+ for (j = 0; j < NR_MUXS; j++) { -+ -+ if (!(mux_send_info_flags[j])) { -+ continue; -+ } -+ -+ send_info = mux_send_info[j]; -+ if (!send_info) { -+ continue; -+ } -+ -+ if (!(send_info->filled)) { -+ continue; -+ } -+ -+ dlci = tty2dlci[j]; -+ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ send_info->filled = 0; -+ continue; -+ } -+ -+ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); -+ if (send_info->length <= (TS0710MUX_SERIAL_BUF_SIZE - chars)) { -+ TS0710_DEBUG("Send queued UIH for /dev/mux%d", j); -+ basic_write(ts0710, (__u8 *) send_info->frame, -+ send_info->length); -+ send_info->length = 0; -+ send_info->filled = 0; -+ } else { -+ mux_send_info_idx = j; -+ break; -+ } -+ } /* End for() loop */ -+ -+ /* Queue UIH data to be transmitted */ -+ for (j = 0; j < NR_MUXS; j++) { -+ -+ if (!(mux_send_info_flags[j])) { -+ continue; -+ } -+ -+ send_info = mux_send_info[j]; -+ if (!send_info) { -+ continue; -+ } -+ -+ if (send_info->filled) { -+ continue; -+ } -+ -+ /* Now queue UIH data to send_info->buf */ -+ -+ if (!mux_tty[j]) { -+ continue; -+ } -+ -+ tty = mux_table[j]; -+ if (!tty) { -+ continue; -+ } -+ -+ dlci = tty2dlci[j]; -+ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ continue; -+ } -+ -+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) -+ && tty->ldisc.write_wakeup) { -+ (tty->ldisc.write_wakeup) (tty); -+ } -+ wake_up_interruptible(&tty->write_wait); -+ -+#ifdef SERIAL_HAVE_POLL_WAIT -+ wake_up_interruptible(&tty->poll_wait); -+#endif -+ -+ if (send_info->filled) { -+ if (j < mux_send_info_idx) { -+ mux_send_info_idx = j; -+ } -+ } -+ } /* End for() loop */ -+} -+ -+static int get_count(__u8 idx) -+{ -+ int ret; -+ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ -+ down(&mux_data_count_mutex[idx]); -+ ret = mux_data_count[idx]; -+ up(&mux_data_count_mutex[idx]); -+ -+ return ret; -+} -+ -+static int set_count(__u8 idx, int count) -+{ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ if (count < 0) { -+ TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); -+ return -1; -+ } -+ -+ down(&mux_data_count_mutex[idx]); -+ mux_data_count[idx] = count; -+ up(&mux_data_count_mutex[idx]); -+ -+ return 0; -+} -+ -+static int add_count(__u8 idx, int count) -+{ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ if (count <= 0) { -+ TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); -+ return -1; -+ } -+ -+ if (down_trylock(&mux_data_count_mutex[idx])) -+ return -1; -+ mux_data_count[idx] += count; -+ up(&mux_data_count_mutex[idx]); -+ -+ return 0; -+} -+ -+ssize_t file_proc_read(struct file * file, char *buf, size_t size, -+ loff_t * ppos) -+{ -+ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; -+ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(size); -+ UNUSED_PARAM(ppos); -+ -+ gprsData[0].recvBytes = get_count(TS0710MUX_GPRS1_RECV_COUNT_IDX); -+ gprsData[0].sentBytes = get_count(TS0710MUX_GPRS1_SEND_COUNT_IDX); -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes = -+ get_count(TS0710MUX_GPRS2_RECV_COUNT_IDX); -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes = -+ get_count(TS0710MUX_GPRS2_SEND_COUNT_IDX); -+ -+ copy_to_user(buf, gprsData, bufLen); -+ -+ return bufLen; -+} -+ -+ssize_t file_proc_write(struct file * file, const char *buf, size_t count, -+ loff_t * ppos) -+{ -+ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; -+ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(count); -+ UNUSED_PARAM(ppos); -+ -+ memset(gprsData, 0, bufLen); -+ -+ copy_from_user(gprsData, buf, bufLen); -+ -+ set_count(TS0710MUX_GPRS1_RECV_COUNT_IDX, gprsData[0].recvBytes); -+ set_count(TS0710MUX_GPRS1_SEND_COUNT_IDX, gprsData[0].sentBytes); -+ set_count(TS0710MUX_GPRS2_RECV_COUNT_IDX, -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes); -+ set_count(TS0710MUX_GPRS2_SEND_COUNT_IDX, -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes); -+ -+ return bufLen; -+} -+ -+static void gprs_proc_init(void) -+{ -+ gprs_proc_file = -+ create_proc_entry("gprsbytes", S_IRUSR | S_IWUSR, NULL); -+ gprs_proc_file->proc_fops = &file_proc_operations; -+} -+ -+static void gprs_proc_exit(void) -+{ -+ remove_proc_entry("gprsbytes", gprs_proc_file); -+} -+ -+static int __init mux_init(void) -+{ -+ __u8 j; -+ -+ if (COMM_FOR_MUX_DRIVER == NULL) { -+ -+#ifdef USB_FOR_MUX -+ panic("please install IPC-USB first\n"); -+#else -+ panic("please install ttyS0 first\n"); -+#endif -+ -+ } -+ -+ ts0710_init(); -+ -+ for (j = 0; j < NR_MUXS; j++) { -+ mux_send_info_flags[j] = 0; -+ mux_send_info[j] = 0; -+ mux_recv_info_flags[j] = 0; -+ mux_recv_info[j] = 0; -+ } -+ mux_send_info_idx = NR_MUXS; -+ mux_recv_queue = NULL; -+ mux_recv_flags = 0; -+ -+ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { -+ mux_data_count[j] = 0; -+ mux_data_count2[j] = 0; -+ init_MUTEX(&mux_data_count_mutex[j]); -+ } -+ post_recv_count_flag = 0; -+ -+ INIT_WORK(&send_tqueue, send_worker, NULL); -+ INIT_WORK(&receive_tqueue, receive_worker, NULL); -+ INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); -+ -+ memset(&mux_driver, 0, sizeof(struct tty_driver)); -+ memset(&mux_tty, 0, sizeof(mux_tty)); -+ mux_driver.magic = TTY_DRIVER_MAGIC; -+ mux_driver.driver_name = "ts0710mux"; -+ mux_driver.name = "ts0710mux"; -+ mux_driver.major = TS0710MUX_MAJOR; -+ mux_driver.minor_start = TS0710MUX_MINOR_START; -+ mux_driver.num = NR_MUXS; -+ mux_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ mux_driver.subtype = SERIAL_TYPE_NORMAL; -+ mux_driver.init_termios = tty_std_termios; -+ mux_driver.init_termios.c_iflag = 0; -+ mux_driver.init_termios.c_oflag = 0; -+ mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; -+ mux_driver.init_termios.c_lflag = 0; -+ mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ -+ mux_driver.ttys = mux_table; -+ mux_driver.termios = mux_termios; -+ mux_driver.termios_locked = mux_termios_locked; -+// mux_driver.driver_state = mux_state; -+ mux_driver.other = NULL; -+ -+ mux_driver.open = mux_open; -+ mux_driver.close = mux_close; -+ mux_driver.write = mux_write; -+ mux_driver.write_room = mux_write_room; -+ mux_driver.flush_buffer = mux_flush_buffer; -+ mux_driver.chars_in_buffer = mux_chars_in_buffer; -+ mux_driver.throttle = mux_throttle; -+ mux_driver.unthrottle = mux_unthrottle; -+ mux_driver.ioctl = mux_ioctl; -+ mux_driver.owner = THIS_MODULE; -+ -+ if (tty_register_driver(&mux_driver)) -+ panic("Couldn't register mux driver"); -+ -+ COMM_MUX_DISPATCHER = mux_dispatcher; -+ COMM_MUX_SENDER = mux_sender; -+ -+ gprs_proc_init(); -+ -+ return 0; -+} -+ -+static void __exit mux_exit(void) -+{ -+ __u8 j; -+ -+ COMM_MUX_DISPATCHER = NULL; -+ COMM_MUX_SENDER = NULL; -+ -+ gprs_proc_exit(); -+ -+ mux_send_info_idx = NR_MUXS; -+ mux_recv_queue = NULL; -+ for (j = 0; j < NR_MUXS; j++) { -+ if ((mux_send_info_flags[j]) && (mux_send_info[j])) { -+ kfree(mux_send_info[j]); -+ } -+ mux_send_info_flags[j] = 0; -+ mux_send_info[j] = 0; -+ -+ if ((mux_recv_info_flags[j]) && (mux_recv_info[j])) { -+ free_mux_recv_struct(mux_recv_info[j]); -+ } -+ mux_recv_info_flags[j] = 0; -+ mux_recv_info[j] = 0; -+ } -+ -+ if (tty_unregister_driver(&mux_driver)) -+ panic("Couldn't unregister mux driver"); -+} -+ -+module_init(mux_init); -+module_exit(mux_exit); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_DESCRIPTION("TS 07.10 Multiplexer"); -Index: linux-2.6.20.7/drivers/char/ts0710_mux.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.h 2007-04-21 18:04:56.000000000 +0200 -@@ -0,0 +1,103 @@ -+/* -+ * mux_macro.h -+ * -+ * Copyright (C) 2002 2005 Motorola -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ * -+ * 11/18/2002 (Motorola) - Initial version -+ * -+ */ -+ -+/* -+* This header file should be included by both MUX and other applications -+* which access MUX device files. It gives the additional macro definitions -+* shared between MUX and applications. -+*/ -+ -+/* MUX DLCI(Data Link Connection Identifier) Configuration */ -+/* -+* DLCI Service -+* 0 Control Channel -+* 1 Voice Call & Network-related -+* 2 SMS MO -+* 3 SMS MT -+* 4 Phonebook & related -+* 5 MISC -+* 6 CSD/FAX -+* 7 GPRS1 -+* 8 GPRS2 -+* 9 Logger CMD -+* 10 Logger Data -+* 11 Test CMD -+* 12 AGPS -+* 13 Net Monitor -+*/ -+ -+/* Mapping between DLCI and MUX device files */ -+/* -+* File Name Minor DLCI AT Command/Data -+* /dev/mux0 0 1 AT Command -+* /dev/mux1 1 2 AT Command -+* /dev/mux2 2 3 AT Command -+* /dev/mux3 3 4 AT Command -+* /dev/mux4 4 5 AT Command -+* /dev/mux5 5 6 AT Command -+* /dev/mux6 6 7 AT Command -+* /dev/mux7 7 8 AT Command -+* /dev/mux8 8 6 Data -+* /dev/mux9 9 7 Data -+* /dev/mux10 10 8 Data -+* /dev/mux11 11 9 Data -+* /dev/mux12 12 10 Data -+* /dev/mux13 13 11 Data -+* /dev/mux14 14 12 Data -+* /dev/mux15 15 13 Data -+*/ -+ -+#define MUX_CMD_FILE_VOICE_CALL "/dev/mux0" -+#define MUX_CMD_FILE_SMS_MO "/dev/mux1" -+#define MUX_CMD_FILE_SMS_MT "/dev/mux2" -+#define MUX_CMD_FILE_PHONEBOOK "/dev/mux3" -+#define MUX_CMD_FILE_MISC "/dev/mux4" -+#define MUX_CMD_FILE_CSD "/dev/mux5" -+#define MUX_CMD_FILE_GPRS1 "/dev/mux6" -+#define MUX_CMD_FILE_GPRS2 "/dev/mux7" -+ -+#define MUX_DATA_FILE_CSD "/dev/mux8" -+#define MUX_DATA_FILE_GPRS1 "/dev/mux9" -+#define MUX_DATA_FILE_GPRS2 "/dev/mux10" -+#define MUX_DATA_FILE_LOGGER_CMD "/dev/mux11" -+#define MUX_DATA_FILE_LOGGER_DATA "/dev/mux12" -+#define MUX_DATA_FILE_TEST_CMD "/dev/mux13" -+#define MUX_DATA_FILE_AGPS "/dev/mux14" -+#define MUX_DATA_FILE_NET_MONITOR "/dev/mux15" -+ -+#define NUM_MUX_CMD_FILES 8 -+#define NUM_MUX_DATA_FILES 8 -+#define NUM_MUX_FILES ( NUM_MUX_CMD_FILES + NUM_MUX_DATA_FILES ) -+ -+/* Special ioctl() upon a MUX device file for hanging up a call */ -+#define TS0710MUX_IO_MSC_HANGUP 0x54F0 -+ -+/* Special ioctl() upon a MUX device file for MUX loopback test */ -+#define TS0710MUX_IO_TEST_CMD 0x54F1 -+ -+/* Special Error code might be return from write() to a MUX device file */ -+#define EDISCONNECTED 900 /* Logical data link is disconnected */ -+ -+/* Special Error code might be return from open() to a MUX device file */ -+#define EREJECTED 901 /* Logical data link connection request is rejected */ -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-21 18:07:45.000000000 +0200 -@@ -0,0 +1,868 @@ -+/* -+ * linux/drivers/usb/ipcusb.c -+ * -+ * Implementation of a ipc driver based Intel's Bulverde USB Host -+ * Controller. -+ * -+ * Copyright (C) 2003-2005 Motorola -+ * Copyright (C) 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * 2003-Nov-03 - (Motorola) created -+ * 2004-Feb-20 - (Motorola) Add Power Manager codes -+ * 2004-Apr-14 - (Motorola) Update Suspend/Resume codes -+ * 2004-May-10 - (Motorola) Add unlink_urbs codes and do some updates of send -+ * out urb sequence -+ * 2006-Jun-22 - (Harald Welte) port to Linux 2.6.x -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "ts0710_mux_usb.h" -+ -+/*Macro defined for this driver*/ -+#define DRIVER_VERSION "1.0alpha1" -+#define DRIVER_AUTHOR "Motorola / Harald Welte " -+#define DRIVER_DESC "USB IPC Driver (TS07.10 lowlevel)" -+#define MOTO_IPC_VID 0x22b8 -+#define MOTO_IPC_PID 0x3006 -+#define IBUF_SIZE 32 /*urb size*/ -+#define IPC_USB_XMIT_SIZE 1024 -+#define IPC_URB_SIZE 32 -+#define IPC_USB_WRITE_INIT 0 -+#define IPC_USB_WRITE_XMIT 1 -+#define IPC_USB_PROBE_READY 3 -+#define IPC_USB_PROBE_NOT_READY 4 -+#define DBG_MAX_BUF_SIZE 1024 -+#define ICL_EVENT_INTERVAL (HZ) -+#undef BVD_DEBUG -+ -+#define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) -+#define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) -+#define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) -+/*End defined macro*/ -+ -+/*global values defined*/ -+static struct usb_driver usb_ipc_driver; -+static struct timer_list ipcusb_timer; -+static struct timer_list suspend_timer; -+static struct timer_list wakeup_timer; -+static struct tty_struct ipcusb_tty; /* the coresponding tty struct, we just use flip buffer here. */ -+static struct tty_driver ipcusb_tty_driver; /* the coresponding tty driver, we just use write and chars in buff here*/ -+struct tty_driver *usb_for_mux_driver = NULL; -+struct tty_struct *usb_for_mux_tty = NULL; -+void (*usb_mux_dispatcher)(struct tty_struct *tty) = NULL; -+void (*usb_mux_sender)(void) = NULL; -+void (*ipcusb_ap_to_bp)(unsigned char*, int) = NULL; -+void (*ipcusb_bp_to_ap)(unsigned char*, int) = NULL; -+EXPORT_SYMBOL(usb_for_mux_driver); -+EXPORT_SYMBOL(usb_for_mux_tty); -+EXPORT_SYMBOL(usb_mux_dispatcher); -+EXPORT_SYMBOL(usb_mux_sender); -+EXPORT_SYMBOL(ipcusb_ap_to_bp); -+EXPORT_SYMBOL(ipcusb_bp_to_ap); -+static int sumbit_times = 0; -+static int callback_times = 0; -+//static unsigned long last_jiff = 0; -+extern int usbh_finished_resume; -+/*end global values defined*/ -+ -+MODULE_AUTHOR(DRIVER_AUTHOR); -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_LICENSE("GPL"); -+ -+#ifdef BVD_DEBUG -+#define bvd_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg) -+#else -+#define bvd_dbg(format, arg...) do {} while (0) -+#endif -+ -+/* USB device context */ -+typedef struct { -+ struct list_head list; -+ int size; -+ char *body; -+} buf_list_t; -+ -+struct ipc_usb_data { -+ u_int8_t write_finished_flag; -+ u_int8_t write_flag, -+ ipc_flag, -+ suspend_flag; -+ struct usb_device *ipc_dev; -+ struct urb readurb_mux, -+ writeurb_mux, -+ writeurb_dsplog; -+ char *obuf, *ibuf; -+ int writesize; /* max packet size for the -+ output bulk endpoint * -+ transfer buffers */ -+ -+ struct circ_buf xmit; /* write cric bufffer */ -+ struct list_head in_buf_list; -+ char bulk_in_ep_mux, -+ bulk_out_ep_mux, -+ bulk_in_ep_dsplog; -+ unsigned int ifnum; -+ -+ struct tasklet_struct bh, -+ bh_bp; -+ -+ spinlock_t lock; -+}; -+ -+struct ipc_usb_data *bvd_ipc; -+ -+#ifdef BVD_DEBUG -+static void bvd_dbg_hex(__u8 *buf, int len) -+{ -+ static unsigned char tbuf[DBG_MAX_BUF_SIZE]; -+ int i, c; -+ -+ if (len <= 0) -+ return; -+ -+ c = 0; -+ for (i=0; (i < len) && (c < (DBG_MAX_BUF_SIZE - 3)); i++) { -+ sprintf(&tbuf[c], "%02x ",buf[i]); -+ c += 3; -+ } -+ tbuf[c] = 0; -+ -+ printk("%s: %s\n", __FUNCTION__, tbuf); -+} -+#else -+#define bvd_dbg_hex(buf, len) -+#endif -+ -+static int unlink_urbs(struct urb *urb) -+{ -+ unsigned long flags; -+ int retval; -+ -+ spin_lock_irqsave(&bvd_ipc->lock, flags); -+ -+ retval = usb_unlink_urb(urb); -+ if (retval != -EINPROGRESS && retval != 0) -+ printk("unlink urb err, %d", retval); -+ -+ spin_unlock_irqrestore(&bvd_ipc->lock, flags); -+ return retval; -+} -+ -+static void append_to_inbuf_list(struct urb *urb) -+{ -+ buf_list_t *inbuf; -+ int count = urb->actual_length; -+ -+ inbuf = kmalloc(sizeof(buf_list_t), GFP_KERNEL); -+ if (!inbuf) { -+ printk("append_to_inbuf_list: (%d) out of memory!\n", -+ sizeof(buf_list_t)); -+ return; -+ } -+ -+ inbuf->size = count; -+ inbuf->body = kmalloc(sizeof(char)*count, GFP_KERNEL); -+ if (!inbuf->body) { -+ kfree(inbuf); -+ printk("append_to_inbuf_list: (%d) out of memory!\n", -+ sizeof(char)*count); -+ return; -+ } -+ memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); -+ list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); -+} -+ -+static void ipcusb_timeout(unsigned long data) -+{ -+ struct tty_struct *tty = &ipcusb_tty; -+ struct urb *urb = (struct urb *)data; -+ -+ bvd_dbg("ipcusb_timeout***"); -+ -+ while (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int count; -+ buf_list_t *inbuf; -+ struct list_head *ptr = NULL; -+ -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry (ptr, buf_list_t, list); -+ count = inbuf->size; -+ if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { -+ list_del(ptr); -+ kfree(inbuf->body); -+ inbuf->body = NULL; -+ kfree(inbuf); -+ } else { -+ bvd_dbg("ipcusb_timeout: bvd_ipc->in_buf_list empty!"); -+ break; -+ } -+ } -+ -+ if (usb_mux_dispatcher) -+ usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ -+ -+ if (list_empty(&bvd_ipc->in_buf_list)) { -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("ipcusb_timeout: failed resubmitting read urb"); -+ bvd_dbg("ipcusb_timeout: resubmited read urb"); -+ } else { -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+ } -+} -+ -+static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -+{ -+ buf_list_t *inbuf; -+ int count = urb->actual_length; -+ struct tty_struct *tty = &ipcusb_tty; -+ -+ bvd_dbg("usb_ipc_read_bulk: begining!"); -+ if (urb->status) -+ printk("nonzero read bulk status received: %d\n", urb->status); -+ -+ bvd_dbg("usb_ipc_read_bulk: urb->actual_length=%d", urb->actual_length); -+ bvd_dbg("usb_ipc_read_bulk: urb->transfer_buffer:"); -+ -+ bvd_dbg_hex((unsigned char*)urb->transfer_buffer, urb->actual_length); -+ -+ if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) -+ (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); -+ -+ if (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int need_mux = 0; -+ -+ bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); -+ if (count > 0) { -+ bvd_ipc->suspend_flag = 1; -+ append_to_inbuf_list(urb); /* append the current received urb */ -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ } -+ -+ while (!(list_empty(&bvd_ipc->in_buf_list))) { -+ struct list_head* ptr = NULL; -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry(ptr, buf_list_t, list); -+ count = inbuf->size; -+ need_mux = 1; -+ -+ tty_insert_flip_string(tty, inbuf->body, count); -+ -+ list_del(ptr); -+ kfree(inbuf->body); -+ inbuf->body = NULL; -+ kfree(inbuf); -+ } -+ -+ if (usb_mux_dispatcher && need_mux) -+ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -+ -+ if (list_empty(&bvd_ipc->in_buf_list)) { -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("usb_ipc_read_bulk: " -+ "failed resubmitting read urb"); -+ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -+ } else { -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+ } -+ } else if (count > 0) { -+ bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); -+ bvd_ipc->suspend_flag = 1; -+ -+ if (tty_insert_flip_string(tty, urb->transfer_buffer, -+ count) < count) { -+ bvd_ipc->suspend_flag = 1; -+ append_to_inbuf_list(urb); -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ } -+ -+ if (usb_mux_dispatcher) -+ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -+ -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("failed resubmitting read urb"); -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -+ } -+ -+ bvd_dbg("usb_ipc_read_bulk: completed!!!"); -+} -+ -+static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) -+{ -+ callback_times++; -+ bvd_ipc->write_finished_flag = 1; -+ -+ bvd_dbg("usb_ipc_write_bulk: begining!"); -+ //printk("%s: write_finished_flag=%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); -+ -+ if (urb->status) -+ printk("nonzero write bulk status received: %d\n", urb->status); -+ -+ if (usb_mux_sender) -+ usb_mux_sender(); /**call Liu changhui's func**/ -+ -+ //printk("usb_ipc_write_bulk: mark ipcusb_softint!\n"); -+ tasklet_schedule(&bvd_ipc->bh); -+ -+ bvd_dbg("usb_ipc_write_bulk: finished!"); -+} -+ -+static void wakeup_timeout(unsigned long data) -+{ -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); -+} -+ -+static void suspend_timeout(unsigned long data) -+{ -+ if (bvd_ipc->suspend_flag == 1) { -+ bvd_ipc->suspend_flag = 0; -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ bvd_dbg("suspend_timeout: add the suspend timer again"); -+ } else { -+ unlink_urbs(&bvd_ipc->readurb_mux); -+ UHCRHPS3 = 0x4; -+ mdelay(40); -+ bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", -+ UHCRHPS3); -+ } -+} -+ -+static void ipcusb_xmit_data(void) -+{ -+ int c, count = IPC_URB_SIZE; -+ int result = 0; -+ int buf_flag = 0; -+ int buf_num = 0; -+ -+ //printk("%s: sumbit_times=%d, callback_times=%d\n", __FUNCTION__, sumbit_times, callback_times); -+ if (bvd_ipc->write_finished_flag == 0) -+ return; -+ -+ while (1) { -+ c = CIRC_CNT_TO_END(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, -+ IPC_USB_XMIT_SIZE); -+ if (count < c) -+ c = count; -+ if (c <= 0) -+ break; -+ -+ memcpy(bvd_ipc->obuf+buf_num, -+ bvd_ipc->xmit.buf + bvd_ipc->xmit.tail, c); -+ buf_flag = 1; -+ bvd_ipc->xmit.tail = ((bvd_ipc->xmit.tail + c) -+ & (IPC_USB_XMIT_SIZE-1)); -+ count -= c; -+ buf_num += c; -+ } -+ -+ if (buf_num == 0) { -+ bvd_dbg("ipcusb_xmit_data: buf_num=%d, add suspend_timer", -+ buf_num); -+ bvd_ipc->suspend_flag = 0; -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ } -+ -+ bvd_dbg("ipcusb_xmit_data: buf_num=%d", buf_num); -+ bvd_dbg("ipcusb_xmit_data: bvd_ipc->obuf: "); -+ -+ bvd_dbg_hex((bvd_ipc->obuf)-buf_num, buf_num); -+ -+ if (buf_flag) { -+ bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; -+ bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); -+ -+ if ((UHCRHPS3 & 0x4) == 0x4) { -+ static int ret; -+ int time = 0; -+ -+ /* if BP sleep, wake up BP first */ -+ pxa_gpio_mode(GPIO_IN | 41); -+ if (GPIO_is_high(41)) { -+ if (GPIO_is_high(GPIO_MCU_INT_SW)) -+ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ else -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ -+ time = jiffies; -+ while (GPIO_is_high(41) && (jiffies < (time+HZ))); -+ -+ if (GPIO_is_high(41)) { -+ printk("%s: Wakeup BP timeout! BP state is %d\n", -+ __FUNCTION__, GPIO_is_high(41)); -+ } -+ if (GPIO_is_high(GPIO_MCU_INT_SW)) -+ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ else -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ } -+ -+ /* Resume BP */ -+ UHCRHPS3 = 0x8; -+ mdelay(40); -+ bvd_dbg("ipcusb_xmit_data: Send RESUME signal! UHCRHPS3=0x%x", -+ UHCRHPS3); -+ /*send IN token*/ -+ bvd_ipc->readurb_mux.actual_length = 0; -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" -+ "failed! status=%d\n", ret); -+ bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); -+ } -+ -+ sumbit_times++; -+ bvd_ipc->write_finished_flag = 0; -+ //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); -+ bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; -+ if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) -+ warn("ipcusb_xmit_data: funky result! result=%d\n", result); -+ -+ bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); -+ -+ } -+} -+ -+static void usbipc_bh_func(unsigned long param) -+{ -+ ipcusb_xmit_data(); -+} -+ -+extern void get_halted_bit(void); -+ -+static void usbipc_bh_bp_func(unsigned long param) -+{ -+ if ((UHCRHPS3 & 0x4) == 0x4) { -+ UHCRHPS3 = 0x8; -+ mdelay(40); -+ bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " -+ "UHCRHPS3=0x%x", UHCRHPS3); -+ } -+ if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { -+ get_halted_bit(); -+ -+ /*send a IN token*/ -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) { -+ bvd_dbg("ipcusb_softint_send_readurb: " -+ "usb_submit_urb(read mux bulk) failed!"); -+ } -+ bvd_dbg("ipcusb_softint_send_readurb: Send a IN token successfully!"); -+ bvd_ipc->suspend_flag = 0; -+ bvd_dbg("ipcusb_softint_send_readurb: add suspend_timer"); -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ } -+} -+ -+static int usb_ipc_write(struct tty_struct *tty, -+ const unsigned char *buf, int count) -+{ -+ int c, ret = 0; -+ -+ bvd_dbg("usb_ipc_write: count=%d, buf: ", count); -+ bvd_dbg_hex(buf, count); -+ -+ if (count <= 0) -+ return 0; -+ -+ if (*ipcusb_ap_to_bp != NULL) -+ (*ipcusb_ap_to_bp)(buf, count); -+ -+ bvd_ipc->suspend_flag = 1; -+ -+ if ((bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) && -+ (bvd_ipc->xmit.head == bvd_ipc->xmit.tail)) { -+ bvd_dbg("usb_ipc_write: set write_flag"); -+ bvd_ipc->write_flag = IPC_USB_WRITE_XMIT; -+ } -+ -+ while (1) { -+ c = CIRC_SPACE_TO_END(bvd_ipc->xmit.head, -+ bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); -+ if (count < c) -+ c = count; -+ if (c <= 0) -+ break; -+ -+ memcpy(bvd_ipc->xmit.buf + bvd_ipc->xmit.head, buf, c); -+ bvd_ipc->xmit.head = ((bvd_ipc->xmit.head + c) -+ & (IPC_USB_XMIT_SIZE-1)); -+ buf += c; -+ count -= c; -+ ret += c; -+ } -+ bvd_dbg("usb_ipc_write: ret=%d, bvd_ipc->xmit.buf: ", ret); -+ -+ bvd_dbg_hex(bvd_ipc->xmit.buf, ret); -+ -+ if (bvd_ipc->write_flag == IPC_USB_WRITE_XMIT) { -+ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; -+ bvd_dbg("usb_ipc_write: mark ipcusb_softint"); -+ tasklet_schedule(&bvd_ipc->bh); -+ } -+ -+ bvd_dbg("usb_ipc_write: ret=%d\n", ret); -+ return ret; -+} -+ -+static int usb_ipc_chars_in_buffer(struct tty_struct *tty) -+{ -+ return CIRC_CNT(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); -+} -+ -+void usb_send_readurb(void) -+{ -+ //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); -+ -+ if (usbh_finished_resume == 0) -+ return; -+ -+ tasklet_schedule(&bvd_ipc->bh_bp); -+} -+ -+static int usb_ipc_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *usbdev = interface_to_usbdev(intf); -+ struct usb_config_descriptor *ipccfg; -+ struct usb_interface_descriptor *interface; -+ struct usb_endpoint_descriptor *endpoint; -+ int ep_cnt, readsize, writesize; -+ char have_bulk_in_mux, have_bulk_out_mux; -+ -+ bvd_dbg("usb_ipc_probe: vendor id 0x%x, device id 0x%x", -+ usbdev->descriptor.idVendor, usbdev->descriptor.idProduct); -+ -+ if ((usbdev->descriptor.idVendor != MOTO_IPC_VID) || -+ (usbdev->descriptor.idProduct != MOTO_IPC_PID)) -+ return -ENODEV; -+ -+ /* a2590c : dsplog interface is not supported by this driver */ -+ if (intf->minor == 2) /* dsplog interface number is 2 */ -+ return -1; -+ -+ bvd_dbg("usb_ipc_probe: USB dev address:%p", usbdev); -+ bvd_dbg("usb_ipc_probe: ifnum:%u", intf->minor); -+ -+ ipccfg = &usbdev->actconfig->desc; -+ bvd_dbg("usb_ipc_prob: config%d", ipccfg->bConfigurationValue); -+ bvd_dbg("usb_ipc_prob: bNumInterfaces = %d", ipccfg->bNumInterfaces); -+ -+ /* After this point we can be a little noisy about what we are trying -+ * to configure, hehe. */ -+ if (usbdev->descriptor.bNumConfigurations != 1) { -+ info("usb_ipc_probe: Only one device configuration " -+ "is supported."); -+ return -1; -+ } -+ -+ if (usbdev->config[0].desc.bNumInterfaces != 3) { -+ info("usb_ipc_probe: Only three device interfaces are " -+ "supported."); -+ return -1; -+ } -+ -+ interface = &intf->cur_altsetting->desc; -+ endpoint = &intf->cur_altsetting->endpoint[0].desc; -+ /* Start checking for two bulk endpoints or ... FIXME: This is a future -+ * enhancement...*/ -+ bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", -+ (int) interface->bNumEndpoints); -+ if (interface->bNumEndpoints != 2) { -+ info("usb_ipc_probe: Only two endpoints supported."); -+ return -1; -+ } -+ -+ ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; -+ -+ bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", -+ (&endpoint[0])->bEndpointAddress); -+ bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", -+ (&endpoint[1])->bEndpointAddress); -+ -+ while (ep_cnt < interface->bNumEndpoints) { -+ -+ if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", -+ (&endpoint[ep_cnt])->bEndpointAddress); -+ have_bulk_in_mux = -+ (&endpoint[ep_cnt])->bEndpointAddress; -+ readsize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ bvd_dbg("usb_ipc_probe: readsize=%d", readsize); -+ ep_cnt++; -+ continue; -+ } -+ -+ if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", -+ (&endpoint[ep_cnt])->bEndpointAddress); -+ have_bulk_out_mux = -+ (&endpoint[ep_cnt])->bEndpointAddress; -+ writesize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ bvd_dbg("usb_ipc_probe: writesize=%d", writesize); -+ ep_cnt++; -+ continue; -+ } -+ -+ info("usb_ipc_probe: Undetected endpoint ^_^ "); -+ /* Shouldn't ever get here unless we have something weird */ -+ return -1; -+ } -+ -+ /* Perform a quick check to make sure that everything worked as it -+ * should have. */ -+ -+ switch (interface->bNumEndpoints) { -+ case 2: -+ if (!have_bulk_in_mux || !have_bulk_out_mux) { -+ info("usb_ipc_probe: Two bulk endpoints required."); -+ return -1; -+ } -+ break; -+ default: -+ info("usb_ipc_probe: Endpoint determination failed ^_^ "); -+ return -1; -+ } -+ -+ /* Ok, now initialize all the relevant values */ -+ if (!(bvd_ipc->obuf = (char *)kmalloc(writesize, GFP_KERNEL))) { -+ err("usb_ipc_probe: Not enough memory for the output buffer."); -+ kfree(bvd_ipc); -+ return -1; -+ } -+ bvd_dbg("usb_ipc_probe: obuf address:%p", bvd_ipc->obuf); -+ -+ if (!(bvd_ipc->ibuf = (char *)kmalloc(readsize, GFP_KERNEL))) { -+ err("usb_ipc_probe: Not enough memory for the input buffer."); -+ kfree(bvd_ipc->obuf); -+ kfree(bvd_ipc); -+ return -1; -+ } -+ bvd_dbg("usb_ipc_probe: ibuf address:%p", bvd_ipc->ibuf); -+ -+ bvd_ipc->ipc_flag = IPC_USB_PROBE_READY; -+ bvd_ipc->write_finished_flag = 1; -+ bvd_ipc->suspend_flag = 1; -+ bvd_ipc->bulk_in_ep_mux= have_bulk_in_mux; -+ bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; -+ bvd_ipc->ipc_dev = usbdev; -+ bvd_ipc->writesize = writesize; -+ INIT_LIST_HEAD (&bvd_ipc->in_buf_list); -+ -+ bvd_ipc->bh.func = usbipc_bh_func; -+ bvd_ipc->bh.data = (unsigned long) bvd_ipc; -+ -+ bvd_ipc->bh_bp.func = usbipc_bh_bp_func; -+ bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; -+ -+ /*Build a write urb*/ -+ usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, -+ usb_sndbulkpipe(bvd_ipc->ipc_dev, -+ bvd_ipc->bulk_out_ep_mux), -+ bvd_ipc->obuf, writesize, usb_ipc_write_bulk, -+ bvd_ipc); -+ //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ -+ /*Build a read urb and send a IN token first time*/ -+ usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, -+ usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), -+ bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); -+ //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ -+ usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); -+ -+ // a2590c: dsplog is not supported by this driver -+ // usb_driver_claim_interface(&usb_ipc_driver, -+ // &ipccfg->interface[2], bvd_ipc); -+ /*send a IN token first time*/ -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); -+ -+ bvd_dbg("usb_ipc_prob: Send a IN token successfully!"); -+ -+ if (bvd_ipc->xmit.head != bvd_ipc->xmit.tail) { -+ printk("usb_ipc_probe: mark ipcusb_softint!\n"); -+ tasklet_schedule(&bvd_ipc->bh); -+ } -+ -+ printk("usb_ipc_probe: completed probe!"); -+ usb_set_intfdata(intf, &bvd_ipc); -+ return 0; -+} -+ -+static void usb_ipc_disconnect(struct usb_interface *intf) -+{ -+ //struct usb_device *usbdev = interface_to_usbdev(intf); -+ struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); -+ -+ printk("usb_ipc_disconnect:*** \n"); -+ -+ if ((UHCRHPS3 & 0x4) == 0) -+ usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); -+ -+ usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); -+ -+ bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; -+ kfree(bvd_ipc_disconnect->ibuf); -+ kfree(bvd_ipc_disconnect->obuf); -+ -+ usb_driver_release_interface(&usb_ipc_driver, -+ bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -+ usb_driver_release_interface(&usb_ipc_driver, -+ bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); -+ -+ //a2590c: dsplog interface is not supported by this driver -+ //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); -+ -+ bvd_ipc_disconnect->ipc_dev = NULL; -+ -+ usb_set_intfdata(intf, NULL); -+ -+ printk("usb_ipc_disconnect completed!\n"); -+} -+ -+static struct usb_device_id usb_ipc_id_table[] = { -+ { USB_DEVICE(MOTO_IPC_VID, MOTO_IPC_PID) }, -+ { } /* Terminating entry */ -+}; -+ -+static struct usb_driver usb_ipc_driver = { -+ .name = "usb ipc", -+ .probe = usb_ipc_probe, -+ .disconnect = usb_ipc_disconnect, -+ .id_table = usb_ipc_id_table, -+}; -+ -+static int __init usb_ipc_init(void) -+{ -+ int result; -+ -+ bvd_dbg("init usb_ipc"); -+ /* register driver at the USB subsystem */ -+ result = usb_register(&usb_ipc_driver); -+ if (result < 0) { -+ err ("usb ipc driver could not be registered"); -+ return result; -+ } -+ -+ /*init the related mux interface*/ -+ if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { -+ err("usb_ipc_init: Out of memory."); -+ usb_deregister(&usb_ipc_driver); -+ return -ENOMEM; -+ } -+ bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); -+ -+ if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { -+ err("usb_ipc_init: Not enough memory for the input buffer."); -+ kfree(bvd_ipc); -+ usb_deregister(&usb_ipc_driver); -+ return -ENOMEM; -+ } -+ bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", -+ bvd_ipc->xmit.buf); -+ bvd_ipc->ipc_dev = NULL; -+ bvd_ipc->xmit.head = bvd_ipc->xmit.tail = 0; -+ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; -+ -+ ipcusb_tty_driver.write = usb_ipc_write; -+ ipcusb_tty_driver.chars_in_buffer = usb_ipc_chars_in_buffer; -+ -+ usb_for_mux_driver = &ipcusb_tty_driver; -+ usb_for_mux_tty = &ipcusb_tty; -+ -+ /* init timers for ipcusb read process and usb suspend */ -+ init_timer(&ipcusb_timer); -+ ipcusb_timer.function = ipcusb_timeout; -+ -+ init_timer(&suspend_timer); -+ suspend_timer.function = suspend_timeout; -+ -+ init_timer(&wakeup_timer); -+ wakeup_timer.function = wakeup_timeout; -+ -+ info("USB Host(Bulverde) IPC driver registered."); -+ info(DRIVER_VERSION ":" DRIVER_DESC); -+ -+ return 0; -+} -+ -+static void __exit usb_ipc_exit(void) -+{ -+ bvd_dbg("cleanup bvd_ipc"); -+ -+ kfree(bvd_ipc->xmit.buf); -+ kfree(bvd_ipc); -+ usb_deregister(&usb_ipc_driver); -+ -+ info("USB Host(Bulverde) IPC driver deregistered."); -+} -+ -+module_init(usb_ipc_init); -+module_exit(usb_ipc_exit); -+EXPORT_SYMBOL(usb_send_readurb); -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.h 2007-04-21 18:07:21.000000000 +0200 -@@ -0,0 +1,29 @@ -+/* -+ * linux/drivers/usb/ipcusb.h -+ * -+ * Implementation of a ipc driver based Intel's Bulverde USB Host -+ * Controller. -+ * -+ * Copyright (C) 2003-2005 Motorola -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * 2003-Nov-18 - (Motorola) created -+ * -+ */ -+extern struct tty_driver *usb_for_mux_driver; -+extern struct tty_struct *usb_for_mux_tty; -+extern void (*usb_mux_dispatcher)(struct tty_struct *tty); -+extern void (*usb_mux_sender)(void); diff --git a/packages/linux/linux-ezx-2.6.20.7/mux_debug.patch b/packages/linux/linux-ezx-2.6.20.7/mux_debug.patch deleted file mode 100644 index 58cb25a0b6..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/mux_debug.patch +++ /dev/null @@ -1,551 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 12:24:18.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 12:26:47.000000000 +0200 -@@ -85,6 +85,9 @@ - #include "ts0710.h" - #include "ts0710_mux.h" - -+#define TS0710DEBUG -+#define PRINT_OUTPUT_PRINTK -+ - #define TS0710MUX_GPRS_SESSION_MAX 2 - #define TS0710MUX_MAJOR 250 - #define TS0710MUX_MINOR_START 0 -@@ -316,7 +319,7 @@ - #ifdef TS0710DEBUG - - #ifdef PRINT_OUTPUT_PRINTK --#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) -+#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX %s: " fmt "\n" , __func__, ## arg) - #else - #include "ezxlog.h" - static __u8 strDebug[256]; -@@ -530,10 +533,10 @@ - if (strncmp(p->comm, "aplogd", 6) == 0) { - sig = 1; - if (send_sig(SIGUSR2, p, 1) == 0) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: success to send SIGUSR2 to aplogd!\n"); - } else { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: failure to send SIGUSR2 to aplogd!\n"); - } - break; -@@ -542,7 +545,7 @@ - read_unlock(&tasklist_lock); - - if (!sig) { -- TS0710_PRINTK("MUX: not found aplogd!\n"); -+ TS0710_DEBUG("MUX: not found aplogd!\n"); - } - } - #else -@@ -559,11 +562,11 @@ - buf[len + 1] = TS0710_BASIC_FLAG; - - if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); - TS0710_SIG2APLOGD(); - #endif -@@ -577,7 +580,7 @@ - res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); - - if (res != len + 2) { -- TS0710_PRINTK("MUX basic_write: Write Error!\n"); -+ TS0710_DEBUG("MUX basic_write: Write Error!\n"); - return -1; - } - -@@ -601,7 +604,7 @@ - TS0710_DEBUG("crc_check: CRC check OK\n"); - return 0; - } else { -- TS0710_PRINTK("MUX crc_check: CRC check failed\n"); -+ TS0710_DEBUG("MUX crc_check: CRC check failed\n"); - return 1; - } - } -@@ -1266,7 +1269,7 @@ - break; - - case FCON: /*Flow control on command */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Received Flow control(all channels) on command\n"); - if (mcc_short_pkt->h.type.cr == MCC_CMD) { - ts0710->dlci[0].state = CONNECTED; -@@ -1276,7 +1279,7 @@ - break; - - case FCOFF: /*Flow control off command */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Received Flow control(all channels) off command\n"); - if (mcc_short_pkt->h.type.cr == MCC_CMD) { - for (j = 0; j < TS0710_MAX_CHN; j++) { -@@ -1823,7 +1826,7 @@ - TS0710_DEBUG("UIH on channel %d\n", dlci); - - if (uih_len > ts0710->dlci[dlci].mtu) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", - dlci, uih_len, ts0710->dlci[dlci].mtu); - break; -@@ -1844,7 +1847,7 @@ - dlci, tty_idx); - TS0710_DEBUGSTR(uih_data_start, uih_len); - if (!(iscmdtty[tty_idx])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", - __FUNCTION__, dlci, tty_idx); - } -@@ -1856,7 +1859,7 @@ - ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", - dlci, tty_idx); - if (iscmdtty[tty_idx]) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", - __FUNCTION__, dlci, tty_idx); - } -@@ -1864,13 +1867,14 @@ - } - tty = mux_table[tty_idx]; - if ((!mux_tty[tty_idx]) || (!tty)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: No application waiting for, discard it! /dev/mux%d\n", - tty_idx); -+ TS0710_DEBUG("MUX: mux_tty[%d] = %d, tty is at %i", tty_idx, mux_tty[tty_idx], tty); - } else { /* Begin processing received data */ - if ((!mux_recv_info_flags[tty_idx]) - || (!mux_recv_info[tty_idx])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", - tty_idx); - break; -@@ -1878,7 +1882,7 @@ - - recv_info = mux_recv_info[tty_idx]; - if (recv_info->total > 8192) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", - tty_idx); - break; -@@ -1949,7 +1953,7 @@ - get_mux_recv_packet - (uih_len); - if (!recv_packet) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: no memory\n", - __FUNCTION__); - break; -@@ -1980,7 +1984,7 @@ - } else { /* recv_info->total == 0 */ - if (uih_len > - TS0710MUX_RECV_BUF_SIZE) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", - tty_idx, uih_len); - uih_len = -@@ -2120,12 +2124,12 @@ - if (ts0710->dlci[dlci].state == DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI %d Send DISC got signal!\n", - dlci); - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI %d Send DISC timeout!\n", dlci); - continue; - } -@@ -2158,7 +2162,7 @@ - return 0; - } else if (ts0710->dlci[0].state == CONNECTING) { - /* Reentry */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", - current->pid, current->comm); - try = 11; -@@ -2179,13 +2183,13 @@ - DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting timeout!\n", - dlci); - continue; -@@ -2199,7 +2203,7 @@ - } - } else if ((ts0710->dlci[0].state != DISCONNECTED) - && (ts0710->dlci[0].state != REJECTED)) { -- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); - return retval; - } else { - ts0710->initiator = 1; -@@ -2218,19 +2222,19 @@ - retval = 0; - break; - } else if (ts0710->dlci[0].state == REJECTED) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got rejected!\n", - dlci); - retval = -EREJECTED; - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM timeout!\n", - dlci); - continue; -@@ -2271,13 +2275,13 @@ - DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting timeout!\n", - dlci); - continue; -@@ -2296,7 +2300,7 @@ - } - } else if ((ts0710->dlci[dlci].state != DISCONNECTED) - && (ts0710->dlci[dlci].state != REJECTED)) { -- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); - return retval; - } else { - ts0710->dlci[dlci].state = NEGOTIATING; -@@ -2313,13 +2317,13 @@ - if (ts0710->dlci[dlci].state == CONNECTING) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send pn_msg got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send pn_msg timeout!\n", - dlci); - continue; -@@ -2344,20 +2348,20 @@ - break; - } else if (ts0710->dlci[dlci].state == - REJECTED) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got rejected!\n", - dlci); - retval = -EREJECTED; - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= - TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM timeout!\n", - dlci); - continue; -@@ -2468,7 +2472,7 @@ - schedule_work(&send_tqueue); - #else - if (!tq_serial_for_mux) { -- TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", -+ TS0710_DEBUG("MUX Error: %s: tq_serial_for_mux == 0\n", - __FUNCTION__); - return; - } -@@ -2508,7 +2512,7 @@ - if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { - if (dlci == 1) { - ts0710_close_channel(0); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); - TS0710_SIG2APLOGD(); - } -@@ -2673,12 +2677,12 @@ - UNUSED_PARAM(tty); - - if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", - __FUNCTION__); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", - __FUNCTION__); - TS0710_SIG2APLOGD(); -@@ -2724,14 +2728,14 @@ - } else if (ts0710->dlci[dlci].state == CONNECTED) { - - if (!(mux_send_info_flags[line])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", - line); - return -ENODEV; - } - send_info = mux_send_info[line]; - if (!send_info) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: mux_write: mux_send_info[%d] == 0\n", - line); - return -ENODEV; -@@ -2800,7 +2804,7 @@ - } - return c; - } else { -- TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); -+ TS0710_DEBUG("MUX mux_write: DLCI %d not connected\n", dlci); - return -EDISCONNECTED; - } - } -@@ -2940,7 +2944,7 @@ - return; - } - -- TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); -+ TS0710_DEBUG("MUX %s: line is:%d\n", __FUNCTION__, line); - - if ((mux_send_info_flags[line]) - && (mux_send_info[line]) -@@ -2960,10 +2964,10 @@ - - /* - if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { -- TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); -+ TS0710_DEBUG("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); -+ TS0710_DEBUG("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); - TS0710_SIG2APLOGD(); - #endif - -@@ -2989,9 +2993,9 @@ - if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { - - #ifdef USB_FOR_MUX -- TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); -+ TS0710_DEBUG("MUX: please install and open IPC-USB first\n"); - #else -- TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); -+ TS0710_DEBUG("MUX: please install and open ttyS0 first\n"); - #endif - - goto out; -@@ -3016,7 +3020,7 @@ - /* if( dlci == 1 ) { */ - /* Open server channel 0 first */ - if ((retval = ts0710_open_channel(0)) != 0) { -- TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); -+ TS0710_DEBUG("MUX: Can't connect server channel 0!\n"); - ts0710_init(); - - mux_tty[line]--; -@@ -3073,7 +3077,7 @@ - datatty = dlci2tty[dlci].datatty; - if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { - if ((retval = ts0710_open_channel(dlci)) != 0) { -- TS0710_PRINTK("MUX: Can't connected channel %d!\n", -+ TS0710_DEBUG("MUX: Can't connected channel %d!\n", - dlci); - ts0710_reset_dlci(dlci); - -@@ -3096,6 +3100,7 @@ - retval = 0; - #endif - out: -+ TS0710_DEBUG("returning %d for open of /dev/mux%d (mux_tty[%d] = %d", retval, line, line, mux_tty[line]); - return retval; - } - -@@ -3178,12 +3183,12 @@ - - while (1) { - tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); -- TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); -+ TS0710_DEBUG("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); - tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); - if (tbuf_read == 0) { - break; - } else { -- TS0710_PRINTK("Read %i bytes.\n", tbuf_read); -+ TS0710_DEBUG("Read %i bytes.\n", tbuf_read); - }; - tbuf_ptr += tbuf_read; - }; -@@ -3192,7 +3197,7 @@ - - // Should be impossible? - //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -- // TS0710_PRINTK -+ // TS0710_DEBUG - // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); - // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); - //} -@@ -3264,7 +3269,7 @@ - TS0710_LOGSTR_FRAME(0, start_flag, - (tbuf_ptr - - start_flag)); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", - /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ - __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ -@@ -3389,7 +3394,7 @@ - *(uih_data_start - + uih_len) = - 0; -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX bp log: %s\n", - uih_data_start); - } -@@ -3415,7 +3420,7 @@ - TS0710_LOGSTR_FRAME(0, start_flag, - framelen); - TS0710_DEBUGHEX(start_flag, framelen); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: Lost synchronization!\n"); - search = start_flag + 1; - } -@@ -3476,7 +3481,7 @@ - recv_info2 = recv_info->next; - - if (!(recv_info->total)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", - __FUNCTION__); - continue; -@@ -3486,7 +3491,7 @@ - dlci = tty2dlci[tty_idx]; - tty = mux_table[tty_idx]; - if ((!mux_tty[tty_idx]) || (!tty)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", - tty_idx); - mux_recv_info_flags[tty_idx] = 0; -@@ -3560,7 +3565,7 @@ - recv_info->total -= recv_packet->length; - free_mux_recv_packet(recv_packet); - } else { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", - __FUNCTION__, recv_info->total); - } -@@ -3760,7 +3765,7 @@ - int ret; - - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX get_count: invalid idx: %d!\n", idx); - return -1; - } - -@@ -3774,11 +3779,11 @@ - static int set_count(__u8 idx, int count) - { - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX set_count: invalid idx: %d!\n", idx); - return -1; - } - if (count < 0) { -- TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); -+ TS0710_DEBUG("MUX set_count: invalid count: %d!\n", count); - return -1; - } - -@@ -3792,11 +3797,11 @@ - static int add_count(__u8 idx, int count) - { - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX add_count: invalid idx: %d!\n", idx); - return -1; - } - if (count <= 0) { -- TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); -+ TS0710_DEBUG("MUX add_count: invalid count: %d!\n", count); - return -1; - } - -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 -@@ -72,7 +72,8 @@ - #define IPC_USB_PROBE_NOT_READY 4 - #define DBG_MAX_BUF_SIZE 1024 - #define ICL_EVENT_INTERVAL (HZ) --#undef BVD_DEBUG -+ -+#define BVD_DEBUG - - #define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) - #define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) diff --git a/packages/linux/linux-ezx-2.6.20.7/usb_add_epalloc-r3.patch b/packages/linux/linux-ezx-2.6.20.7/usb_add_epalloc-r3.patch deleted file mode 100644 index fc9daf5297..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/usb_add_epalloc-r3.patch +++ /dev/null @@ -1,282 +0,0 @@ -Index: linux-2.6.20.7/drivers/usb/gadget/epautoconf.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/epautoconf.c 2007-04-21 11:24:21.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/epautoconf.c 2007-04-21 11:27:53.000000000 -0300 -@@ -228,14 +228,19 @@ - * - * On failure, this returns a null endpoint descriptor. - */ --struct usb_ep * __devinit usb_ep_autoconfig ( -+struct usb_ep * usb_ep_autoconfig ( - struct usb_gadget *gadget, -- struct usb_endpoint_descriptor *desc -+ struct usb_endpoint_descriptor *desc, -+ struct usb_endpoint_config *epconfig, int numconfigs - ) - { - struct usb_ep *ep; - u8 type; - -+ /* Use device specific ep allocation code if provided */ -+ if (gadget->ops->ep_alloc) -+ return gadget->ops->ep_alloc(gadget, desc, epconfig, numconfigs); -+ - type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; - - /* First, apply chip-specific "best usage" knowledge. -Index: linux-2.6.20.7/drivers/usb/gadget/ether.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/ether.c 2007-04-21 11:27:52.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/ether.c 2007-04-21 11:27:53.000000000 -0300 -@@ -2219,7 +2219,8 @@ - struct eth_dev *dev; - struct net_device *net; - u8 cdc = 1, zlp = 1, rndis = 1; -- struct usb_ep *in_ep, *out_ep, *status_ep = NULL; -+ struct usb_ep *in_ep = NULL , *out_ep = NULL, *status_ep = NULL; -+ struct usb_endpoint_config ep_config[2]; - int status = -ENOMEM; - int gcnum; - -@@ -2318,7 +2319,26 @@ - - /* all we really need is bulk IN/OUT */ - usb_ep_autoconfig_reset (gadget); -- in_ep = usb_ep_autoconfig (gadget, &fs_source_desc); -+ -+ ep_config[0].config = DEV_CONFIG_VALUE; -+#if defined(DEV_CONFIG_CDC) -+ ep_config[0].interface = data_intf.bInterfaceNumber; -+ ep_config[0].altinterface = data_intf.bAlternateSetting; -+#else /* DEV_CONFIG_SUBSET */ -+ ep_config[0].interface = subset_data_intf.bInterfaceNumber; -+ ep_config[0].altinterface = subset_data_intf.bAlternateSetting; -+#endif -+ -+#ifdef CONFIG_USB_ETH_RNDIS -+ ep_config[1].config = DEV_RNDIS_CONFIG_VALUE; -+ ep_config[1].interface = rndis_data_intf.bInterfaceNumber; -+ ep_config[1].altinterface = rndis_data_intf.bAlternateSetting; -+ -+ in_ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 2); -+#else -+ in_ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 1); -+#endif -+ - if (!in_ep) { - autoconf_fail: - dev_err (&gadget->dev, -@@ -2328,7 +2348,12 @@ - } - in_ep->driver_data = in_ep; /* claim */ - -- out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc); -+#ifdef CONFIG_USB_ETH_RNDIS -+ out_ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 2); -+#else -+ out_ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 1); -+#endif -+ - if (!out_ep) - goto autoconf_fail; - out_ep->driver_data = out_ep; /* claim */ -@@ -2338,7 +2363,25 @@ - * Since some hosts expect one, try to allocate one anyway. - */ - if (cdc || rndis) { -- status_ep = usb_ep_autoconfig (gadget, &fs_status_desc); -+#ifdef DEV_CONFIG_CDC -+ ep_config[0].config = DEV_CONFIG_VALUE; -+ ep_config[0].interface = control_intf.bInterfaceNumber; -+ ep_config[0].altinterface = control_intf.bAlternateSetting; -+#endif -+#ifdef CONFIG_USB_ETH_RNDIS -+ ep_config[1].config = DEV_RNDIS_CONFIG_VALUE; -+ ep_config[1].interface = rndis_control_intf.bInterfaceNumber; -+ ep_config[1].altinterface = rndis_control_intf.bAlternateSetting; -+#endif -+ -+#if defined(DEV_CONFIG_CDC) && defined(CONFIG_USB_ETH_RNDIS) -+ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[0], 2); -+#elif defined(CONFIG_USB_ETH_RNDIS) -+ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[1], 1); -+#else -+ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[0], 1); -+#endif -+ - if (status_ep) { - status_ep->driver_data = status_ep; /* claim */ - } else if (rndis) { -Index: linux-2.6.20.7/drivers/usb/gadget/file_storage.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/file_storage.c 2007-04-21 11:24:21.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/file_storage.c 2007-04-21 11:27:53.000000000 -0300 -@@ -3850,6 +3850,7 @@ - struct usb_ep *ep; - struct usb_request *req; - char *pathbuf, *p; -+ struct usb_endpoint_config ep_config; - - fsg->gadget = gadget; - set_gadget_data(gadget, fsg); -@@ -3920,21 +3921,25 @@ - } - - /* Find all the endpoints we will use */ -+ ep_config.config = CONFIG_VALUE; -+ ep_config.interface = intf_desc.bInterfaceNumber; -+ ep_config.altinterface = intf_desc.bAlternateSetting; -+ - usb_ep_autoconfig_reset(gadget); -- ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, &ep_config, 1); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint - fsg->bulk_in = ep; - -- ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, &ep_config, 1); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint - fsg->bulk_out = ep; - - if (transport_is_cbi()) { -- ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, &ep_config, 1); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint -Index: linux-2.6.20.7/drivers/usb/gadget/serial.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/serial.c 2007-04-21 11:24:21.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/serial.c 2007-04-21 11:27:53.000000000 -0300 -@@ -1357,6 +1357,7 @@ - struct usb_ep *ep; - struct gs_dev *dev; - int gcnum; -+ struct usb_endpoint_config ep_config[2]; - - /* Some controllers can't support CDC ACM: - * - sh doesn't support multiple interfaces or configs; -@@ -1377,22 +1378,33 @@ - __constant_cpu_to_le16(GS_VERSION_NUM|0x0099); - } - -+ ep_config[0].config = GS_BULK_CONFIG_ID; -+ ep_config[0].interface = gs_bulk_interface_desc.bInterfaceNumber; -+ ep_config[0].altinterface = gs_bulk_interface_desc.bAlternateSetting; -+ ep_config[1].config = GS_ACM_CONFIG_ID; -+ ep_config[1].interface = gs_data_interface_desc.bInterfaceNumber; -+ ep_config[1].altinterface = gs_data_interface_desc.bAlternateSetting; -+ - usb_ep_autoconfig_reset(gadget); - -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc); -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc, &ep_config[0], 2); - if (!ep) - goto autoconf_fail; - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc); -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc, &ep_config[0], 2); - if (!ep) - goto autoconf_fail; - EP_OUT_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - - if (use_acm) { -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc); -+ ep_config[0].config = GS_ACM_CONFIG_ID; -+ ep_config[0].interface = gs_control_interface_desc.bInterfaceNumber; -+ ep_config[0].altinterface = gs_control_interface_desc.bAlternateSetting; -+ -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc, &ep_config[0], 1); - if (!ep) { - printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name); - goto autoconf_fail; -Index: linux-2.6.20.7/drivers/usb/gadget/zero.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/zero.c 2007-04-21 11:24:21.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/zero.c 2007-04-21 11:27:53.000000000 -0300 -@@ -1144,6 +1144,7 @@ - struct zero_dev *dev; - struct usb_ep *ep; - int gcnum; -+ struct usb_endpoint_config ep_config[2]; - - /* FIXME this can't yet work right with SH ... it has only - * one configuration, numbered one. -@@ -1156,7 +1157,15 @@ - * but there may also be important quirks to address. - */ - usb_ep_autoconfig_reset (gadget); -- ep = usb_ep_autoconfig (gadget, &fs_source_desc); -+ -+ ep_config[0].config = CONFIG_SOURCE_SINK; -+ ep_config[0].interface = source_sink_intf.bInterfaceNumber; -+ ep_config[0].altinterface = source_sink_intf.bAlternateSetting; -+ ep_config[1].config = CONFIG_LOOPBACK; -+ ep_config[1].interface = loopback_intf.bInterfaceNumber; -+ ep_config[1].altinterface = loopback_intf.bAlternateSetting; -+ -+ ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 2); - if (!ep) { - autoconf_fail: - printk (KERN_ERR "%s: can't autoconfigure on %s\n", -@@ -1166,7 +1175,7 @@ - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim */ - -- ep = usb_ep_autoconfig (gadget, &fs_sink_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 2); - if (!ep) - goto autoconf_fail; - EP_OUT_NAME = ep->name; -Index: linux-2.6.20.7/include/linux/usb_gadget.h -=================================================================== ---- linux-2.6.20.7.orig/include/linux/usb_gadget.h 2007-04-21 11:24:21.000000000 -0300 -+++ linux-2.6.20.7/include/linux/usb_gadget.h 2007-04-21 11:27:53.000000000 -0300 -@@ -445,10 +445,28 @@ - - struct usb_gadget; - -+/** -+ * struct usb_endpoint_config - possible configurations of a given endpoint -+ * @config: the configuration number -+ * @interface: the interface number -+ * @altinterface: the altinterface number -+ * -+ * Used as an array to pass information about the possible configurations -+ * of a given endpoint to the bus controller. -+ */ -+struct usb_endpoint_config { -+ u8 config; -+ u8 interface; -+ u8 altinterface; -+}; -+ - /* the rest of the api to the controller hardware: device operations, - * which don't involve endpoints (or i/o). - */ - struct usb_gadget_ops { -+ struct usb_ep* (*ep_alloc)(struct usb_gadget *, -+ struct usb_endpoint_descriptor *, -+ struct usb_endpoint_config *, int); - int (*get_frame)(struct usb_gadget *); - int (*wakeup)(struct usb_gadget *); - int (*set_selfpowered) (struct usb_gadget *, int is_selfpowered); -@@ -872,7 +890,10 @@ - /* utility wrapping a simple endpoint selection policy */ - - extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, -- struct usb_endpoint_descriptor *) __devinit; -+ struct usb_endpoint_descriptor *, -+ struct usb_endpoint_config *, -+ int numconfigs -+); - - extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit; - diff --git a/packages/linux/linux-ezx-2.6.20.7/usb_pxa27x_udc-r3.patch b/packages/linux/linux-ezx-2.6.20.7/usb_pxa27x_udc-r3.patch deleted file mode 100644 index 2e60d5b9ce..0000000000 --- a/packages/linux/linux-ezx-2.6.20.7/usb_pxa27x_udc-r3.patch +++ /dev/null @@ -1,2868 +0,0 @@ - arch/arm/mach-pxa/spitz.c | 27 - drivers/usb/gadget/Kconfig | 20 - drivers/usb/gadget/Makefile | 1 - drivers/usb/gadget/ether.c | 12 - drivers/usb/gadget/pxa27x_udc.c | 2412 ++++++++++++++++++++++++++++++++++++++++ - drivers/usb/gadget/pxa27x_udc.h | 298 ++++ - drivers/usb/gadget/pxa2xx_udc.h | 7 - 7 files changed, 2774 insertions(+), 3 deletions(-) - -Index: linux-2.6.20.7/arch/arm/mach-pxa/spitz.c -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/spitz.c 2007-04-21 12:21:53.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/spitz.c 2007-04-21 12:22:00.000000000 -0300 -@@ -348,6 +348,32 @@ - - - /* -+ * USB Client (Gadget/UDC) -+ */ -+static void spitz_udc_command(int cmd) -+{ -+ switch(cmd) { -+ case PXA2XX_UDC_CMD_CONNECT: -+ UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE; -+ break; -+ case PXA2XX_UDC_CMD_DISCONNECT: -+ //UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE; -+ break; -+ } -+} -+ -+static int spitz_udc_detect(void) -+{ -+ return 1; -+} -+ -+static struct pxa2xx_udc_mach_info spitz_udc_info __initdata = { -+ .udc_is_connected = spitz_udc_detect, -+ .udc_command = spitz_udc_command, -+}; -+ -+ -+/* - * USB Host (OHCI) - */ - static int spitz_ohci_init(struct device *dev) -@@ -498,6 +524,7 @@ - pxa_gpio_mode(SPITZ_GPIO_HSYNC | GPIO_IN); - - platform_add_devices(devices, ARRAY_SIZE(devices)); -+ pxa_set_udc_info(&spitz_udc_info); - pxa_set_mci_info(&spitz_mci_platform_data); - pxa_set_ohci_info(&spitz_ohci_platform_data); - pxa_set_ficp_info(&spitz_ficp_platform_data); -Index: linux-2.6.20.7/drivers/usb/gadget/Kconfig -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/Kconfig 2007-04-21 12:21:53.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/Kconfig 2007-04-21 12:22:00.000000000 -0300 -@@ -121,6 +121,26 @@ - default y if USB_ETH - default y if USB_G_SERIAL - -+config USB_GADGET_PXA27X -+ boolean "PXA 27x" -+ depends on ARCH_PXA && PXA27x -+ help -+ Intel's PXA 27x series XScale ARM-5TE processors include -+ an integrated full speed USB 1.1 device controller. -+ -+ It has 23 endpoints, as well as endpoint zero (for control -+ transfers). -+ -+ Say "y" to link the driver statically, or "m" to build a -+ dynamically linked module called "pxa27x_udc" and force all -+ gadget drivers to also be dynamically linked. -+ -+config USB_PXA27X -+ tristate -+ depends on USB_GADGET_PXA27X -+ default USB_GADGET -+ select USB_GADGET_SELECTED -+ - config USB_GADGET_GOKU - boolean "Toshiba TC86C001 'Goku-S'" - depends on PCI -Index: linux-2.6.20.7/drivers/usb/gadget/Makefile -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/Makefile 2007-04-21 12:21:53.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/Makefile 2007-04-21 12:22:00.000000000 -0300 -@@ -4,6 +4,7 @@ - obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o - obj-$(CONFIG_USB_NET2280) += net2280.o - obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o -+obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o - obj-$(CONFIG_USB_GOKU) += goku_udc.o - obj-$(CONFIG_USB_OMAP) += omap_udc.o - obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o -Index: linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.c 2007-04-21 12:29:05.000000000 -0300 -@@ -0,0 +1,2412 @@ -+/* -+ * Handles the Intel 27x USB Device Controller (UDC) -+ * -+ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker) -+ * Copyright (C) 2003 Robert Schwebel, Pengutronix -+ * Copyright (C) 2003 Benedikt Spranger, Pengutronix -+ * Copyright (C) 2003 David Brownell -+ * Copyright (C) 2003 Joshua Wise -+ * Copyright (C) 2004 Intel Corporation -+ * Copyright (C) 2005 SDG Systems, LLC (Aric Blumer) -+ * Copyright (C) 2005-2006 Openedhand Ltd. (Richard Purdie) -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#undef DEBUG -+//#define DEBUG 1 -+//#define VERBOSE DBG_VERBOSE -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+/* -+ * This driver handles the USB Device Controller (UDC) in Intel's PXA 27x -+ * series processors. -+ * -+ * Such controller drivers work with a gadget driver. The gadget driver -+ * returns descriptors, implements configuration and data protocols used -+ * by the host to interact with this device, and allocates endpoints to -+ * the different protocol interfaces. The controller driver virtualizes -+ * usb hardware so that the gadget drivers will be more portable. -+ * -+ * This UDC hardware wants to implement a bit too much USB protocol. The -+ * biggest issue is that the endpoints have to be setup before the controller -+ * can be enabled and each endpoint can only have one configuration, interface -+ * and alternative interface number. Once enabled, these cannot be changed -+ * without a controller reset. -+ * -+ * Intel Errata #22 mentions issues when changing alternate interface. -+ * The exact meaning of this remains uncertain as gadget drivers using alternate -+ * interfaces such as CDC-Ethernet appear to work... -+ */ -+ -+#define DRIVER_VERSION "01-01-2006" -+#define DRIVER_DESC "PXA 27x USB Device Controller driver" -+ -+static const char driver_name [] = "pxa27x_udc"; -+ -+static const char ep0name [] = "ep0"; -+ -+ -+#define USE_DMA -+//#undef USE_DMA -+ -+#ifdef CONFIG_PROC_FS -+#define UDC_PROC_FILE -+#endif -+ -+#include "pxa27x_udc.h" -+ -+#ifdef USE_DMA -+static int use_dma = 1; -+module_param(use_dma, bool, 0); -+MODULE_PARM_DESC(use_dma, "true to use dma"); -+ -+static void dma_nodesc_handler(int dmach, void *_ep); -+static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req); -+ -+#define DMASTR " (dma support)" -+ -+#else /* !USE_DMA */ -+#define DMASTR " (pio only)" -+#endif -+ -+#define UDCISR0_IR0 0x3 -+#define UDCISR_INT_MASK (UDC_INT_FIFOERROR | UDC_INT_PACKETCMP) -+#define UDCICR_INT_MASK UDCISR_INT_MASK -+ -+#define UDCCSR_MASK (UDCCSR_FST | UDCCSR_DME) -+ -+static void pxa27x_ep_fifo_flush(struct usb_ep *ep); -+static void nuke(struct pxa27x_ep *, int status); -+static void udc_init_ep(struct pxa27x_udc *dev); -+ -+ -+/* -+ * Endpoint Functions -+ */ -+static void pio_irq_enable(int ep_num) -+{ -+ if (ep_num < 16) -+ UDCICR0 |= 3 << (ep_num * 2); -+ else { -+ ep_num -= 16; -+ UDCICR1 |= 3 << (ep_num * 2); -+ } -+} -+ -+static void pio_irq_disable(int ep_num) -+{ -+ ep_num &= 0xf; -+ if (ep_num < 16) -+ UDCICR0 &= ~(3 << (ep_num * 2)); -+ else { -+ ep_num -= 16; -+ UDCICR1 &= ~(3 << (ep_num * 2)); -+ } -+} -+ -+/* The UDCCR reg contains mask and interrupt status bits, -+ * so using '|=' isn't safe as it may ack an interrupt. -+ */ -+#define UDCCR_MASK_BITS (UDCCR_OEN | UDCCR_UDE) -+ -+static inline void udc_set_mask_UDCCR(int mask) -+{ -+ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS); -+} -+ -+static inline void udc_clear_mask_UDCCR(int mask) -+{ -+ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS); -+} -+ -+static inline void udc_ack_int_UDCCR(int mask) -+{ -+ /* udccr contains the bits we dont want to change */ -+ __u32 udccr = UDCCR & UDCCR_MASK_BITS; -+ -+ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS); -+} -+ -+/* -+ * Endpoint enable/disable -+ * -+ * Not much to do here as the ep_alloc function sets up most things. Once -+ * enabled, not much of the pxa27x configuration can be changed. -+ * -+ */ -+static int pxa27x_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ struct pxa27x_udc *dev; -+ -+ if (!_ep || !desc || _ep->name == ep0name -+ || desc->bDescriptorType != USB_DT_ENDPOINT -+ || ep->fifo_size < le16_to_cpu(desc->wMaxPacketSize)) { -+ dev_err(ep->dev->dev, "%s, bad ep or descriptor\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ /* xfer types must match, except that interrupt ~= bulk */ -+ if( ep->ep_type != USB_ENDPOINT_XFER_BULK -+ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { -+ dev_err(ep->dev->dev, "%s, %s type mismatch\n", __FUNCTION__, _ep->name); -+ return -EINVAL; -+ } -+ -+ /* hardware _could_ do smaller, but driver doesn't */ -+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK -+ && le16_to_cpu (desc->wMaxPacketSize) -+ != BULK_FIFO_SIZE) -+ || !desc->wMaxPacketSize) { -+ dev_err(ep->dev->dev, "%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); -+ return -ERANGE; -+ } -+ -+ dev = ep->dev; -+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { -+ dev_err(ep->dev->dev, "%s, bogus device state\n", __FUNCTION__); -+ return -ESHUTDOWN; -+ } -+ -+ ep->desc = desc; -+ ep->dma = -1; -+ ep->stopped = 0; -+ ep->pio_irqs = ep->dma_irqs = 0; -+ ep->usb_ep->maxpacket = le16_to_cpu(desc->wMaxPacketSize); -+ -+ /* flush fifo (mostly for OUT buffers) */ -+ pxa27x_ep_fifo_flush(_ep); -+ -+ /* ... reset halt state too, if we could ... */ -+ -+#ifdef USE_DMA -+ /* for (some) bulk and ISO endpoints, try to get a DMA channel and -+ * bind it to the endpoint. otherwise use PIO. -+ */ -+ dev_dbg(ep->dev->dev, "%s: called attributes=%d\n", __FUNCTION__, ep->ep_type); -+ switch (ep->ep_type) { -+ case USB_ENDPOINT_XFER_ISOC: -+ if (le16_to_cpu(desc->wMaxPacketSize) % 32) -+ break; -+ // fall through -+ case USB_ENDPOINT_XFER_BULK: -+ if (!use_dma || !ep->reg_drcmr) -+ break; -+ ep->dma = pxa_request_dma((char *)_ep->name, (le16_to_cpu(desc->wMaxPacketSize) > 64) -+ ? DMA_PRIO_MEDIUM : DMA_PRIO_LOW, dma_nodesc_handler, ep); -+ if (ep->dma >= 0) { -+ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma; -+ dev_dbg(ep->dev->dev, "%s using dma%d\n", _ep->name, ep->dma); -+ } -+ default: -+ break; -+ } -+#endif -+ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name); -+ return 0; -+} -+ -+static int pxa27x_ep_disable(struct usb_ep *_ep) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ unsigned long flags; -+ -+ if (!_ep || !ep->desc) { -+ dev_err(ep->dev->dev, "%s, %s not enabled\n", __FUNCTION__, -+ _ep ? _ep->name : NULL); -+ return -EINVAL; -+ } -+ local_irq_save(flags); -+ nuke(ep, -ESHUTDOWN); -+ -+#ifdef USE_DMA -+ if (ep->dma >= 0) { -+ *ep->reg_drcmr = 0; -+ pxa_free_dma(ep->dma); -+ ep->dma = -1; -+ } -+#endif -+ -+ /* flush fifo (mostly for IN buffers) */ -+ pxa27x_ep_fifo_flush(_ep); -+ -+ ep->desc = 0; -+ ep->stopped = 1; -+ -+ local_irq_restore(flags); -+ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name); -+ return 0; -+} -+ -+ -+ -+/* for the pxa27x, these can just wrap kmalloc/kfree. gadget drivers -+ * must still pass correctly initialized endpoints, since other controller -+ * drivers may care about how it's currently set up (dma issues etc). -+ */ -+ -+/* -+ * pxa27x_ep_alloc_request - allocate a request data structure -+ */ -+static struct usb_request * -+pxa27x_ep_alloc_request(struct usb_ep *_ep, unsigned gfp_flags) -+{ -+ struct pxa27x_request *req; -+ -+ req = kzalloc(sizeof *req, gfp_flags); -+ if (!req) -+ return 0; -+ -+ INIT_LIST_HEAD(&req->queue); -+ return &req->req; -+} -+ -+ -+/* -+ * pxa27x_ep_free_request - deallocate a request data structure -+ */ -+static void -+pxa27x_ep_free_request(struct usb_ep *_ep, struct usb_request *_req) -+{ -+ struct pxa27x_request *req; -+ -+ req = container_of(_req, struct pxa27x_request, req); -+ WARN_ON(!list_empty(&req->queue)); -+ kfree(req); -+} -+ -+ -+/* PXA cache needs flushing with DMA I/O (it's dma-incoherent), but there's -+ * no device-affinity and the heap works perfectly well for i/o buffers. -+ * It wastes much less memory than dma_alloc_coherent() would, and even -+ * prevents cacheline (32 bytes wide) sharing problems. -+ */ -+static void * -+pxa27x_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, dma_addr_t *dma, unsigned gfp_flags) -+{ -+ char *retval; -+ -+ retval = kmalloc(bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM)); -+ if (retval) -+ *dma = virt_to_bus(retval); -+ return retval; -+} -+ -+static void -+pxa27x_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, unsigned bytes) -+{ -+ kfree(buf); -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * done - retire a request; caller blocked irqs -+ */ -+static void done(struct pxa27x_ep *ep, struct pxa27x_request *req, int status) -+{ -+ list_del_init(&req->queue); -+ if (likely (req->req.status == -EINPROGRESS)) -+ req->req.status = status; -+ else -+ status = req->req.status; -+ -+ if (status && status != -ESHUTDOWN) -+ DBG(DBG_VERBOSE, "complete %s req %p stat %d len %u/%u\n", -+ ep->usb_ep->name, &req->req, status, -+ req->req.actual, req->req.length); -+ -+ /* don't modify queue heads during completion callback */ -+ req->req.complete(ep->usb_ep, &req->req); -+} -+ -+ -+static inline void ep0_idle(struct pxa27x_udc *dev) -+{ -+ dev->ep0state = EP0_IDLE; -+} -+ -+static int write_packet(volatile u32 *uddr, struct pxa27x_request *req, unsigned max) -+{ -+ u32 *buf; -+ int length, count, remain; -+ -+ buf = (u32*)(req->req.buf + req->req.actual); -+ prefetch(buf); -+ -+ /* how big will this packet be? */ -+ length = min(req->req.length - req->req.actual, max); -+ req->req.actual += length; -+ -+ remain = length & 0x3; -+ count = length & ~(0x3); -+ -+ //dev_dbg(ep->dev->dev, "Length %d, Remain %d, Count %d\n",length, remain, count); -+ -+ while (likely(count)) { -+ //dev_dbg(ep->dev->dev, "Sending:0x%x\n", *buf); -+ *uddr = *buf++; -+ count -= 4; -+ } -+ -+ if (remain) { -+ volatile u8* reg=(u8*)uddr; -+ char *rd =(u8*)buf; -+ -+ while (remain--) { -+ *reg=*rd++; -+ } -+ } -+ -+ return length; -+} -+ -+/* -+ * write to an IN endpoint fifo, as many packets as possible. -+ * irqs will use this to write the rest later. -+ * caller guarantees at least one packet buffer is ready (or a zlp). -+ */ -+static int -+write_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ unsigned max; -+ -+ max = le16_to_cpu(ep->desc->wMaxPacketSize); -+ do { -+ int count, is_last, is_short; -+ -+ //dev_dbg(ep->dev->dev, "write_fifo7 %x\n", *ep->reg_udccsr); -+ -+ if (*ep->reg_udccsr & UDCCSR_PC) { -+ //dev_dbg(ep->dev->dev, "Transmit Complete\n"); -+ *ep->reg_udccsr = UDCCSR_PC | (*ep->reg_udccsr & UDCCSR_MASK); -+ } -+ -+ if (*ep->reg_udccsr & UDCCSR_TRN) { -+ //dev_dbg(ep->dev->dev, "Clearing Underrun\n"); -+ *ep->reg_udccsr = UDCCSR_TRN | (*ep->reg_udccsr & UDCCSR_MASK); -+ } -+ //dev_dbg(ep->dev->dev, "write_fifo8 %x\n", *ep->reg_udccsr); -+ -+ count = write_packet(ep->reg_udcdr, req, max); -+ -+ /* last packet is usually short (or a zlp) */ -+ if (unlikely (count != max)) -+ is_last = is_short = 1; -+ else { -+ if (likely(req->req.length != req->req.actual) -+ || req->req.zero) -+ is_last = 0; -+ else -+ is_last = 1; -+ /* interrupt/iso maxpacket may not fill the fifo */ -+ is_short = unlikely (max < ep->fifo_size); -+ } -+ -+ //dev_dbg(ep->dev->dev, "write_fifo0 %x\n", *ep->reg_udccsr); -+ -+ dev_dbg(ep->dev->dev, "wrote %s count:%d bytes%s%s %d left %p\n", -+ ep->usb_ep->name, count, -+ is_last ? "/L" : "", is_short ? "/S" : "", -+ req->req.length - req->req.actual, &req->req); -+ -+ /* let loose that packet. maybe try writing another one, -+ * double buffering might work. -+ */ -+ -+ if (is_short) -+ *ep->reg_udccsr = UDCCSR_SP | (*ep->reg_udccsr & UDCCSR_MASK); -+ -+ dev_dbg(ep->dev->dev, "write_fifo0.5 %x\n", *ep->reg_udccsr); -+ -+ /* requests complete when all IN data is in the FIFO */ -+ if (is_last) { -+ done(ep, req, 0); -+ if (list_empty(&ep->queue) || unlikely(ep->dma >= 0)) { -+ pio_irq_disable(ep->pxa_ep_num); -+ //dev_dbg(ep->dev->dev, "write_fifo1 %x\n", *ep->reg_udccsr); -+#ifdef USE_DMA -+ /* unaligned data and zlps couldn't use dma */ -+ if (unlikely(!list_empty(&ep->queue))) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep,req); -+ return 0; -+ } -+#endif -+ } -+ //dev_dbg(ep->dev->dev, "write_fifo2 %x\n", *ep->reg_udccsr); -+ return 1; -+ } -+ -+ // TODO experiment: how robust can fifo mode tweaking be? -+ // double buffering is off in the default fifo mode, which -+ // prevents TFS from being set here. -+ -+ } while (*ep->reg_udccsr & UDCCSR_FS); -+ //dev_dbg(ep->dev->dev, "write_fifo2 %x\n", *ep->reg_udccsr); -+ return 0; -+} -+ -+/* caller asserts req->pending (ep0 irq status nyet cleared); starts -+ * ep0 data stage. these chips want very simple state transitions. -+ */ -+static inline -+void ep0start(struct pxa27x_udc *dev, u32 flags, const char *tag) -+{ -+ UDCCSR0 = flags|UDCCSR0_SA|UDCCSR0_OPC; -+ UDCISR0 = UDCICR_INT(0, UDC_INT_FIFOERROR | UDC_INT_PACKETCMP); -+ dev->req_pending = 0; -+ DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", -+ __FUNCTION__, tag, UDCCSR0, flags); -+} -+ -+static int -+write_ep0_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ unsigned count; -+ int is_short; -+ -+ count = write_packet(&UDCDR0, req, EP0_FIFO_SIZE); -+ ep->dev->stats.write.bytes += count; -+ -+ /* last packet "must be" short (or a zlp) */ -+ is_short = (count != EP0_FIFO_SIZE); -+ -+ DBG(DBG_VERY_NOISY, "ep0in %d bytes %d left %p\n", count, -+ req->req.length - req->req.actual, &req->req); -+ -+ if (unlikely (is_short)) { -+ if (ep->dev->req_pending) -+ ep0start(ep->dev, UDCCSR0_IPR, "short IN"); -+ else -+ UDCCSR0 = UDCCSR0_IPR; -+ -+ count = req->req.length; -+ done(ep, req, 0); -+ ep0_idle(ep->dev); -+#if 0 -+ /* This seems to get rid of lost status irqs in some cases: -+ * host responds quickly, or next request involves config -+ * change automagic, or should have been hidden, or ... -+ * -+ * FIXME get rid of all udelays possible... -+ */ -+ if (count >= EP0_FIFO_SIZE) { -+ count = 100; -+ do { -+ if ((UDCCSR0 & UDCCSR0_OPC) != 0) { -+ /* clear OPC, generate ack */ -+ UDCCSR0 = UDCCSR0_OPC; -+ break; -+ } -+ count--; -+ udelay(1); -+ } while (count); -+ } -+#endif -+ } else if (ep->dev->req_pending) -+ ep0start(ep->dev, 0, "IN"); -+ return is_short; -+} -+ -+ -+/* -+ * read_fifo - unload packet(s) from the fifo we use for usb OUT -+ * transfers and put them into the request. caller should have made -+ * sure there's at least one packet ready. -+ * -+ * returns true if the request completed because of short packet or the -+ * request buffer having filled (and maybe overran till end-of-packet). -+ */ -+static int read_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ for (;;) { -+ u32 *buf; -+ int bufferspace, count, is_short; -+ -+ /* make sure there's a packet in the FIFO.*/ -+ if (unlikely ((*ep->reg_udccsr & UDCCSR_PC) == 0)) -+ break; -+ buf =(u32*) (req->req.buf + req->req.actual); -+ prefetchw(buf); -+ bufferspace = req->req.length - req->req.actual; -+ -+ /* read all bytes from this packet */ -+ if (likely (*ep->reg_udccsr & UDCCSR_BNE)) { -+ count = 0x3ff & *ep->reg_udcbcr; -+ req->req.actual += min(count, bufferspace); -+ } else /* zlp */ -+ count = 0; -+ -+ is_short = (count < ep->usb_ep->maxpacket); -+ dev_dbg(ep->dev->dev, "read %s udccsr:%02x, count:%d bytes%s req %p %d/%d\n", -+ ep->usb_ep->name, *ep->reg_udccsr, count, -+ is_short ? "/S" : "", -+ &req->req, req->req.actual, req->req.length); -+ -+ count = min(count, bufferspace); -+ while (likely (count > 0)) { -+ *buf++ = *ep->reg_udcdr; -+ count -= 4; -+ } -+ dev_dbg(ep->dev->dev, "Buf:0x%p\n", req->req.buf); -+ -+ *ep->reg_udccsr = UDCCSR_PC; -+ /* RPC/RSP/RNE could now reflect the other packet buffer */ -+ -+ /* completion */ -+ if (is_short || req->req.actual == req->req.length) { -+ done(ep, req, 0); -+ if (list_empty(&ep->queue)) -+ pio_irq_disable(ep->pxa_ep_num); -+ return 1; -+ } -+ -+ /* finished that packet. the next one may be waiting... */ -+ } -+ return 0; -+} -+ -+/* -+ * special ep0 version of the above. no UBCR0 or double buffering; status -+ * handshaking is magic. most device protocols don't need control-OUT. -+ * CDC vendor commands (and RNDIS), mass storage CB/CBI, and some other -+ * protocols do use them. -+ */ -+static int read_ep0_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ u32 *buf, word; -+ unsigned bufferspace; -+ -+ buf = (u32*) (req->req.buf + req->req.actual); -+ bufferspace = req->req.length - req->req.actual; -+ -+ while (UDCCSR0 & UDCCSR0_RNE) { -+ word = UDCDR0; -+ -+ if (unlikely (bufferspace == 0)) { -+ /* this happens when the driver's buffer -+ * is smaller than what the host sent. -+ * discard the extra data. -+ */ -+ if (req->req.status != -EOVERFLOW) -+ dev_info(ep->dev->dev, "%s overflow\n", ep->usb_ep->name); -+ req->req.status = -EOVERFLOW; -+ } else { -+ *buf++ = word; -+ req->req.actual += 4; -+ bufferspace -= 4; -+ } -+ } -+ -+ UDCCSR0 = UDCCSR0_OPC ; -+ -+ /* completion */ -+ if (req->req.actual >= req->req.length) -+ return 1; -+ -+ /* finished that packet. the next one may be waiting... */ -+ return 0; -+} -+ -+#ifdef USE_DMA -+ -+#define MAX_IN_DMA ((DCMD_LENGTH + 1) - BULK_FIFO_SIZE) -+static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ u32 dcmd = 0; -+ u32 len = req->req.length; -+ u32 buf = req->req.dma; -+ u32 fifo = io_v2p((u32)ep->reg_udcdr); -+ -+ buf += req->req.actual; -+ len -= req->req.actual; -+ ep->dma_con = 0; -+ -+ DMSG("%s: req:0x%p length:%d, actual:%d dma:%d\n", -+ __FUNCTION__, &req->req, req->req.length, -+ req->req.actual,ep->dma); -+ -+ /* no-descriptor mode can be simple for bulk-in, iso-in, iso-out */ -+ DCSR(ep->dma) = DCSR_NODESC; -+ if (buf & 0x3) -+ DALGN |= 1 << ep->dma; -+ else -+ DALGN &= ~(1 << ep->dma); -+ -+ if (ep->dir_in) { -+ DSADR(ep->dma) = buf; -+ DTADR(ep->dma) = fifo; -+ if (len > MAX_IN_DMA) { -+ len= MAX_IN_DMA; -+ ep->dma_con =1 ; -+ } else if (len >= ep->usb_ep->maxpacket) { -+ if ((ep->dma_con = (len % ep->usb_ep->maxpacket) != 0)) -+ len = ep->usb_ep->maxpacket; -+ } -+ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN -+ | DCMD_FLOWTRG | DCMD_INCSRCADDR; -+ } else { -+ DSADR(ep->dma) = fifo; -+ DTADR(ep->dma) = buf; -+ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN -+ | DCMD_FLOWSRC | DCMD_INCTRGADDR; -+ } -+ *ep->reg_udccsr = UDCCSR_DME; -+ DCMD(ep->dma) = dcmd; -+ DCSR(ep->dma) = DCSR_NODESC | DCSR_EORIRQEN \ -+ | ((ep->dir_in) ? DCSR_STOPIRQEN : 0); -+ *ep->reg_drcmr = ep->dma | DRCMR_MAPVLD; -+ DCSR(ep->dma) |= DCSR_RUN; -+} -+ -+static void cancel_dma(struct pxa27x_ep *ep) -+{ -+ struct pxa27x_request *req; -+ u32 tmp; -+ -+ if (DCSR(ep->dma) == 0 || list_empty(&ep->queue)) -+ return; -+ -+ DMSG("hehe dma:%d,dcsr:0x%x\n", ep->dma, DCSR(ep->dma)); -+ DCSR(ep->dma) = 0; -+ while ((DCSR(ep->dma) & DCSR_STOPSTATE) == 0) -+ cpu_relax(); -+ -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ tmp = DCMD(ep->dma) & DCMD_LENGTH; -+ req->req.actual = req->req.length - tmp; -+ -+ /* the last tx packet may be incomplete, so flush the fifo. -+ * FIXME correct req.actual if we can -+ */ -+ *ep->reg_udccsr = UDCCSR_FEF; -+} -+ -+static void dma_nodesc_handler(int dmach, void *_ep) -+{ -+ struct pxa27x_ep *ep = _ep; -+ struct pxa27x_request *req, *req_next; -+ u32 dcsr, tmp, completed; -+ -+ local_irq_disable(); -+ -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ -+ DMSG("%s, buf:0x%p\n",__FUNCTION__, req->req.buf); -+ -+ ep->dma_irqs++; -+ ep->dev->stats.irqs++; -+ -+ completed = 0; -+ -+ dcsr = DCSR(dmach); -+ DCSR(ep->dma) &= ~DCSR_RUN; -+ -+ if (dcsr & DCSR_BUSERR) { -+ DCSR(dmach) = DCSR_BUSERR; -+ dev_err(ep->dev->dev, "DMA Bus Error\n"); -+ req->req.status = -EIO; -+ completed = 1; -+ } else if (dcsr & DCSR_ENDINTR) { -+ DCSR(dmach) = DCSR_ENDINTR; -+ if (ep->dir_in) { -+ tmp = req->req.length - req->req.actual; -+ /* Last packet is a short one*/ -+ if (tmp < ep->usb_ep->maxpacket) { -+ int count = 0; -+ -+ *ep->reg_udccsr = UDCCSR_SP | \ -+ (*ep->reg_udccsr & UDCCSR_MASK); -+ /*Wait for packet out */ -+ while( (count++ < 10000) && \ -+ !(*ep->reg_udccsr & UDCCSR_FS)); -+ if (count >= 10000) -+ DMSG("Failed to send packet\n"); -+ else -+ DMSG("%s: short packet sent len:%d," -+ "length:%d,actual:%d\n", __FUNCTION__, -+ tmp, req->req.length, req->req.actual); -+ req->req.actual = req->req.length; -+ completed = 1; -+ /* There are still packets to transfer */ -+ } else if ( ep->dma_con) { -+ DMSG("%s: more packets,length:%d,actual:%d\n", -+ __FUNCTION__,req->req.length, -+ req->req.actual); -+ req->req.actual += ep->usb_ep->maxpacket; -+ completed = 0; -+ } else { -+ DMSG("%s: no more packets,length:%d," -+ "actual:%d\n", __FUNCTION__, -+ req->req.length, req->req.actual); -+ req->req.actual = req->req.length; -+ completed = 1; -+ } -+ } else { -+ req->req.actual = req->req.length; -+ completed = 1; -+ } -+ } else if (dcsr & DCSR_EORINTR) { //Only happened in OUT DMA -+ int remain,udccsr ; -+ -+ DCSR(dmach) = DCSR_EORINTR; -+ remain = DCMD(dmach) & DCMD_LENGTH; -+ req->req.actual = req->req.length - remain; -+ -+ udccsr = *ep->reg_udccsr; -+ if (udccsr & UDCCSR_SP) { -+ *ep->reg_udccsr = UDCCSR_PC | (udccsr & UDCCSR_MASK); -+ completed = 1; -+ } -+ DMSG("%s: length:%d actual:%d\n", -+ __FUNCTION__, req->req.length, req->req.actual); -+ } else -+ DMSG("%s: Others dma:%d DCSR:0x%x DCMD:0x%x\n", -+ __FUNCTION__, dmach, DCSR(dmach), DCMD(dmach)); -+ -+ if (likely(completed)) { -+ if (req->queue.next != &ep->queue) { -+ req_next = list_entry(req->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep, req_next); -+ } -+ done(ep, req, 0); -+ } else { -+ kick_dma(ep, req); -+ } -+ -+ local_irq_enable(); -+} -+ -+#endif -+/*-------------------------------------------------------------------------*/ -+ -+static int -+pxa27x_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) -+{ -+ struct pxa27x_virt_ep *virt_ep; -+ struct pxa27x_ep *ep; -+ struct pxa27x_request *req; -+ struct pxa27x_udc *dev; -+ unsigned long flags; -+ -+ virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ ep = virt_ep->pxa_ep; -+ -+ req = container_of(_req, struct pxa27x_request, req); -+ if (unlikely (!_req || !_req->complete || !_req->buf|| -+ !list_empty(&req->queue))) { -+ DMSG("%s, bad params\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ if (unlikely (!_ep || (!ep->desc && _ep->name != ep0name))) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ DMSG("%s, ep point %d is queue\n", __FUNCTION__, ep->ep_num); -+ -+ dev = ep->dev; -+ if (unlikely (!dev->driver -+ || dev->gadget.speed == USB_SPEED_UNKNOWN)) { -+ DMSG("%s, bogus device state\n", __FUNCTION__); -+ return -ESHUTDOWN; -+ } -+ -+ /* iso is always one packet per request, that's the only way -+ * we can report per-packet status. that also helps with dma. -+ */ -+ if (unlikely (ep->ep_type == USB_ENDPOINT_XFER_ISOC -+ && req->req.length > le16_to_cpu -+ (ep->desc->wMaxPacketSize))) -+ return -EMSGSIZE; -+ -+#ifdef USE_DMA -+ // FIXME caller may already have done the dma mapping -+ if (ep->dma >= 0) { -+ _req->dma = dma_map_single(dev->dev, _req->buf, _req->length, -+ (ep->dir_in) ? DMA_TO_DEVICE : DMA_FROM_DEVICE); -+ } -+#endif -+ -+ DBG(DBG_NOISY, "%s queue req %p, len %d buf %p\n", -+ _ep->name, _req, _req->length, _req->buf); -+ -+ local_irq_save(flags); -+ -+ _req->status = -EINPROGRESS; -+ _req->actual = 0; -+ -+ /* kickstart this i/o queue? */ -+ if (list_empty(&ep->queue) && !ep->stopped) { -+ if (ep->desc == 0 /* ep0 */) { -+ unsigned length = _req->length; -+ -+ switch (dev->ep0state) { -+ case EP0_IN_DATA_PHASE: -+ dev->stats.write.ops++; -+ if (write_ep0_fifo(ep, req)) -+ req = 0; -+ break; -+ -+ case EP0_OUT_DATA_PHASE: -+ dev->stats.read.ops++; -+ if (dev->req_pending) -+ ep0start(dev, UDCCSR0_IPR, "OUT"); -+ if (length == 0 || ((UDCCSR0 & UDCCSR0_RNE) != 0 -+ && read_ep0_fifo(ep, req))) { -+ ep0_idle(dev); -+ done(ep, req, 0); -+ req = 0; -+ } -+ break; -+ case EP0_NO_ACTION: -+ ep0_idle(dev); -+ req=0; -+ break; -+ default: -+ DMSG("ep0 i/o, odd state %d\n", dev->ep0state); -+ local_irq_restore (flags); -+ return -EL2HLT; -+ } -+#ifdef USE_DMA -+ /* either start dma or prime pio pump */ -+ } else if (ep->dma >= 0) { -+ kick_dma(ep, req); -+#endif -+ /* can the FIFO can satisfy the request immediately? */ -+ } else if (ep->dir_in && (*ep->reg_udccsr & UDCCSR_FS) != 0 -+ && write_fifo(ep, req)) { -+ req = 0; -+ } else if ((*ep->reg_udccsr & UDCCSR_FS) != 0 -+ && read_fifo(ep, req)) { -+ req = 0; -+ } -+ DMSG("req:%p,ep->desc:%p,ep->dma:%d\n", req, ep->desc, ep->dma); -+ if (likely (req && ep->desc) && ep->dma < 0) -+ pio_irq_enable(ep->pxa_ep_num); -+ } -+ -+ /* pio or dma irq handler advances the queue. */ -+ if (likely (req != 0)) -+ list_add_tail(&req->queue, &ep->queue); -+ local_irq_restore(flags); -+ -+ return 0; -+} -+ -+ -+/* -+ * nuke - dequeue ALL requests -+ */ -+static void nuke(struct pxa27x_ep *ep, int status) -+{ -+ struct pxa27x_request *req; -+ -+ /* called with irqs blocked */ -+#ifdef USE_DMA -+ if (ep->dma >= 0 && !ep->stopped) -+ cancel_dma(ep); -+#endif -+ while (!list_empty(&ep->queue)) { -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ done(ep, req, status); -+ } -+ if (ep->desc) -+ pio_irq_disable(ep->pxa_ep_num); -+} -+ -+ -+/* dequeue JUST ONE request */ -+static int pxa27x_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ struct pxa27x_request *req; -+ unsigned long flags; -+ -+ if (!_ep || _ep->name == ep0name) -+ return -EINVAL; -+ -+ local_irq_save(flags); -+ -+ /* make sure it's actually queued on this endpoint */ -+ list_for_each_entry(req, &ep->queue, queue) { -+ if (&req->req == _req) -+ break; -+ } -+ if (&req->req != _req) { -+ local_irq_restore(flags); -+ return -EINVAL; -+ } -+ -+#ifdef USE_DMA -+ if (ep->dma >= 0 && ep->queue.next == &req->queue && !ep->stopped) { -+ cancel_dma(ep); -+ done(ep, req, -ECONNRESET); -+ /* restart i/o */ -+ if (!list_empty(&ep->queue)) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep, req); -+ } -+ } else -+#endif -+ done(ep, req, -ECONNRESET); -+ -+ local_irq_restore(flags); -+ return 0; -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+static int pxa27x_ep_set_halt(struct usb_ep *_ep, int value) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ unsigned long flags; -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ if (unlikely (!_ep || (!ep->desc && _ep->name != ep0name)) -+ || ep->ep_type == USB_ENDPOINT_XFER_ISOC) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ if (value == 0) { -+ /* this path (reset toggle+halt) is needed to implement -+ * SET_INTERFACE on normal hardware. but it can't be -+ * done from software on the PXA UDC, and the hardware -+ * forgets to do it as part of SET_INTERFACE automagic. -+ */ -+ DMSG("only host can clear %s halt\n", _ep->name); -+ return -EROFS; -+ } -+ -+ local_irq_save(flags); -+ -+ if (ep->dir_in && ((*ep->reg_udccsr & UDCCSR_FS) == 0 -+ || !list_empty(&ep->queue))) { -+ local_irq_restore(flags); -+ return -EAGAIN; -+ } -+ -+ /* FST bit is the same for control, bulk in, bulk out, interrupt in */ -+ *ep->reg_udccsr = UDCCSR_FST|UDCCSR_FEF; -+ -+ /* ep0 needs special care */ -+ if (!ep->desc) { -+ start_watchdog(ep->dev); -+ ep->dev->req_pending = 0; -+ ep->dev->ep0state = EP0_STALL; -+ -+ /* and bulk/intr endpoints like dropping stalls too */ -+ } else { -+ unsigned i; -+ for (i = 0; i < 1000; i += 20) { -+ if (*ep->reg_udccsr & UDCCSR_SST) -+ break; -+ udelay(20); -+ } -+ } -+ local_irq_restore(flags); -+ -+ DBG(DBG_VERBOSE, "%s halt\n", _ep->name); -+ return 0; -+} -+ -+static int pxa27x_ep_fifo_status(struct usb_ep *_ep) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ -+ if (!_ep) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -ENODEV; -+ } -+ /* pxa can't report unclaimed bytes from IN fifos */ -+ if (ep->dir_in) -+ return -EOPNOTSUPP; -+ if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN -+ || (*ep->reg_udccsr & UDCCSR_FS) == 0) -+ return 0; -+ else -+ return (*ep->reg_udcbcr & 0xfff) + 1; -+} -+ -+static void pxa27x_ep_fifo_flush(struct usb_ep *_ep) -+{ -+ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ struct pxa27x_ep *ep = virt_ep->pxa_ep; -+ -+ DMSG("pxa27x_ep_fifo_flush\n"); -+ -+ if (!_ep || _ep->name == ep0name || !list_empty(&ep->queue)) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return; -+ } -+ -+ /* toggle and halt bits stay unchanged */ -+ -+ /* for OUT, just read and discard the FIFO contents. */ -+ if (!ep->dir_in) { -+ while (((*ep->reg_udccsr) & UDCCSR_BNE) != 0) -+ (void) *ep->reg_udcdr; -+ return; -+ } -+ -+ /* most IN status is the same, but ISO can't stall */ -+ *ep->reg_udccsr = UDCCSR_PC|UDCCSR_FST|UDCCSR_TRN -+ | (ep->ep_type == USB_ENDPOINT_XFER_ISOC) -+ ? 0 : UDCCSR_SST; -+} -+ -+ -+static struct usb_ep_ops pxa27x_ep_ops = { -+ .enable = pxa27x_ep_enable, -+ .disable = pxa27x_ep_disable, -+ -+ .alloc_request = pxa27x_ep_alloc_request, -+ .free_request = pxa27x_ep_free_request, -+ -+ .alloc_buffer = pxa27x_ep_alloc_buffer, -+ .free_buffer = pxa27x_ep_free_buffer, -+ -+ .queue = pxa27x_ep_queue, -+ .dequeue = pxa27x_ep_dequeue, -+ -+ .set_halt = pxa27x_ep_set_halt, -+ .fifo_status = pxa27x_ep_fifo_status, -+ .fifo_flush = pxa27x_ep_fifo_flush, -+}; -+ -+ -+/* --------------------------------------------------------------------------- -+ * device-scoped parts of the api to the usb controller hardware -+ * --------------------------------------------------------------------------- -+ */ -+ -+static inline unsigned int validate_fifo_size(u8 bmAttributes) -+{ -+ switch (bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { -+ case USB_ENDPOINT_XFER_CONTROL: -+ return EP0_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_ISOC: -+ return ISO_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_BULK: -+ return BULK_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_INT: -+ return INT_FIFO_SIZE; -+ break; -+ default: -+ break; -+ } -+} -+ -+static void pxa27x_ep_free(struct usb_gadget *gadget, struct usb_ep *_ep) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ struct pxa27x_virt_ep *virt_ep; -+ int i; -+ -+ virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep); -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if (dev->ep[i].usb_ep == &virt_ep->usb_ep) { -+ if (dev->ep[i].desc) { -+ virt_ep->pxa_ep = &dev->ep[i]; -+ pxa27x_ep_disable(&virt_ep->usb_ep); -+ } -+ dev->ep[i].usb_ep = NULL; -+ } -+ } -+ -+ if (!list_empty(&virt_ep->usb_ep.ep_list)) -+ list_del_init(&virt_ep->usb_ep.ep_list); -+ -+ kfree(virt_ep->usb_ep.name); -+ kfree(virt_ep); -+} -+ -+static void pxa27x_ep_freeall(struct usb_gadget *gadget) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ int i; -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if(dev->ep[i].usb_ep) -+ pxa27x_ep_free(gadget, dev->ep[i].usb_ep); -+ } -+} -+ -+#define NAME_SIZE 18 -+ -+static int pxa27x_find_free_ep(struct pxa27x_udc *dev) -+{ -+ int i; -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if(!dev->ep[i].assigned) -+ return i; -+ } -+ return -1; -+} -+ -+/* -+ * Endpoint Allocation/Configuration -+ * -+ * pxa27x endpoint configuration is fixed when the device is enabled. Any pxa -+ * endpoint is only active in one configuration, interface and alternate -+ * interface combination so to support gadget drivers, we map one usb_ep to -+ * one of several pxa ep's. One pxa endpoint is assigned per configuration -+ * combination. -+ */ -+static struct usb_ep* pxa27x_ep_alloc(struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc, -+ struct usb_endpoint_config *epconfig, int configs) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ struct pxa27x_virt_ep *virt_ep; -+ unsigned int i, fifo_size; -+ char *name; -+ -+ if (unlikely(configs < 1)) { -+ dev_err(dev->dev, "%s: Error in config data\n", __FUNCTION__); -+ return NULL; -+ } -+ -+ virt_ep = kmalloc(sizeof(struct pxa27x_virt_ep), GFP_KERNEL); -+ name = kmalloc(NAME_SIZE, GFP_KERNEL); -+ if (!virt_ep || !name) { -+ dev_err(dev->dev, "%s: -ENOMEM\n", __FUNCTION__); -+ kfree(name); -+ kfree(virt_ep); -+ return NULL; -+ } -+ -+ if (!(desc->wMaxPacketSize)) { -+ fifo_size = validate_fifo_size(desc->bmAttributes); -+ desc->wMaxPacketSize = fifo_size; -+ } else { -+ fifo_size = desc->wMaxPacketSize; -+ } -+ -+ DMSG("pxa27x_ep_alloc: bLength: %d, bDescriptorType: %x, bEndpointAddress: %x,\n" -+ " bmAttributes: %x, wMaxPacketSize: %d\n", desc->bLength, -+ desc->bDescriptorType, desc->bEndpointAddress, desc->bmAttributes, -+ desc->wMaxPacketSize); -+ -+ if (!(desc->bEndpointAddress & 0xF)) -+ desc->bEndpointAddress |= dev->ep_num; -+ -+ for (i = 0; i < configs; i++) -+ { -+ struct pxa27x_ep *pxa_ep; -+ int j; -+ -+ DMSG("pxa27x_ep_alloc: config: %d, interface: %d, altinterface: %x,\n", -+ epconfig->config, epconfig->interface, epconfig->altinterface); -+ -+ j = pxa27x_find_free_ep(dev); -+ -+ if (unlikely(j < 0)) { -+ dev_err(dev->dev, "pxa27x_ep_alloc: Failed to find a spare endpoint\n"); -+ pxa27x_ep_free(gadget, &virt_ep->usb_ep); -+ return NULL; -+ } -+ -+ pxa_ep = &dev->ep[j]; -+ -+ if (i == 0) -+ virt_ep->pxa_ep = pxa_ep; -+ -+ pxa_ep->assigned = 1; -+ pxa_ep->ep_num = dev->ep_num; -+ pxa_ep->pxa_ep_num = j; -+ pxa_ep->usb_ep = &virt_ep->usb_ep; -+ pxa_ep->dev = dev; -+ pxa_ep->desc = desc; -+ pxa_ep->pio_irqs = pxa_ep->dma_irqs = 0; -+ pxa_ep->dma = -1; -+ -+ pxa_ep->fifo_size = fifo_size; -+ pxa_ep->dir_in = (desc->bEndpointAddress & USB_DIR_IN) ? 1 : 0; -+ pxa_ep->ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; -+ pxa_ep->stopped = 1; -+ pxa_ep->dma_con = 0; -+ pxa_ep->config = epconfig->config; -+ pxa_ep->interface = epconfig->interface; -+ pxa_ep->aisn = epconfig->altinterface; -+ -+ pxa_ep->reg_udccsr = &UDCCSR0 + j; -+ pxa_ep->reg_udcbcr = &UDCBCR0 + j; -+ pxa_ep->reg_udcdr = &UDCDR0 + j ; -+ pxa_ep->reg_udccr = &UDCCRA - 1 + j; -+#ifdef USE_DMA -+ pxa_ep->reg_drcmr = &DRCMR24 + j; -+#endif -+ -+ /* Configure UDCCR */ -+ *pxa_ep->reg_udccr = ((pxa_ep->config << UDCCONR_CN_S) & UDCCONR_CN) -+ | ((pxa_ep->interface << UDCCONR_IN_S) & UDCCONR_IN) -+ | ((pxa_ep->aisn << UDCCONR_AISN_S) & UDCCONR_AISN) -+ | ((dev->ep_num << UDCCONR_EN_S) & UDCCONR_EN) -+ | ((pxa_ep->ep_type << UDCCONR_ET_S) & UDCCONR_ET) -+ | ((pxa_ep->dir_in) ? UDCCONR_ED : 0) -+ | ((min(pxa_ep->fifo_size, (unsigned)desc->wMaxPacketSize) << UDCCONR_MPS_S ) & UDCCONR_MPS) -+ | UDCCONR_EE; -+// | UDCCONR_DE | UDCCONR_EE; -+ -+ -+ -+#ifdef USE_DMA -+ /* Only BULK use DMA */ -+ if ((pxa_ep->ep_type & USB_ENDPOINT_XFERTYPE_MASK)\ -+ == USB_ENDPOINT_XFER_BULK) -+ *pxa_ep->reg_udccsr = UDCCSR_DME; -+#endif -+ -+ DMSG("UDCCR: 0x%p is 0x%x\n", pxa_ep->reg_udccr,*pxa_ep->reg_udccr); -+ -+ epconfig++; -+ } -+ -+ /* Fill ep name*/ -+ switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { -+ case USB_ENDPOINT_XFER_BULK: -+ sprintf(name, "ep%d%s-bulk", dev->ep_num, -+ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out")); -+ break; -+ case USB_ENDPOINT_XFER_INT: -+ sprintf(name, "ep%d%s-intr", dev->ep_num, -+ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out")); -+ break; -+ default: -+ sprintf(name, "ep%d%s", dev->ep_num, -+ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out")); -+ break; -+ } -+ -+ virt_ep->desc = desc; -+ virt_ep->usb_ep.name = name; -+ virt_ep->usb_ep.ops = &pxa27x_ep_ops; -+ virt_ep->usb_ep.maxpacket = min((ushort)fifo_size, desc->wMaxPacketSize); -+ -+ list_add_tail(&virt_ep->usb_ep.ep_list, &gadget->ep_list); -+ -+ dev->ep_num++; -+ return &virt_ep->usb_ep; -+} -+ -+static int pxa27x_udc_get_frame(struct usb_gadget *_gadget) -+{ -+ return (UDCFNR & 0x7FF); -+} -+ -+static int pxa27x_udc_wakeup(struct usb_gadget *_gadget) -+{ -+ /* host may not have enabled remote wakeup */ -+ if ((UDCCR & UDCCR_DWRE) == 0) -+ return -EHOSTUNREACH; -+ udc_set_mask_UDCCR(UDCCR_UDR); -+ return 0; -+} -+ -+static const struct usb_gadget_ops pxa27x_udc_ops = { -+ .ep_alloc = pxa27x_ep_alloc, -+ .get_frame = pxa27x_udc_get_frame, -+ .wakeup = pxa27x_udc_wakeup, -+ // current versions must always be self-powered -+}; -+ -+ -+/*-------------------------------------------------------------------------*/ -+ -+#ifdef UDC_PROC_FILE -+ -+static const char proc_node_name [] = "driver/udc"; -+ -+static int -+udc_proc_read(char *page, char **start, off_t off, int count, -+ int *eof, void *_dev) -+{ -+ char *buf = page; -+ struct pxa27x_udc *dev = _dev; -+ char *next = buf; -+ unsigned size = count; -+ unsigned long flags; -+ int i, t; -+ u32 tmp; -+ -+ if (off != 0) -+ return 0; -+ -+ local_irq_save(flags); -+ -+ /* basic device status */ -+ t = scnprintf(next, size, DRIVER_DESC "\n" -+ "%s version: %s\nGadget driver: %s\n", -+ driver_name, DRIVER_VERSION DMASTR, -+ dev->driver ? dev->driver->driver.name : "(none)"); -+ size -= t; -+ next += t; -+ -+ /* registers for device and ep0 */ -+ t = scnprintf(next, size, -+ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X\n", -+ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); -+ size -= t; -+ next += t; -+ -+ tmp = UDCCR; -+ t = scnprintf(next, size,"udccr %02X =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", tmp, -+ (tmp & UDCCR_OEN) ? " oen":"", -+ (tmp & UDCCR_AALTHNP) ? " aalthnp":"", -+ (tmp & UDCCR_AHNP) ? " rem" : "", -+ (tmp & UDCCR_BHNP) ? " rstir" : "", -+ (tmp & UDCCR_DWRE) ? " dwre" : "", -+ (tmp & UDCCR_SMAC) ? " smac" : "", -+ (tmp & UDCCR_EMCE) ? " emce" : "", -+ (tmp & UDCCR_UDR) ? " udr" : "", -+ (tmp & UDCCR_UDA) ? " uda" : "", -+ (tmp & UDCCR_UDE) ? " ude" : "", -+ (tmp & UDCCR_ACN) >> UDCCR_ACN_S, -+ (tmp & UDCCR_AIN) >> UDCCR_AIN_S, -+ (tmp & UDCCR_AAISN)>> UDCCR_AAISN_S ); -+ -+ size -= t; -+ next += t; -+ -+ tmp = UDCCSR0; -+ t = scnprintf(next, size, -+ "udccsr0 %02X =%s%s%s%s%s%s%s\n", tmp, -+ (tmp & UDCCSR0_SA) ? " sa" : "", -+ (tmp & UDCCSR0_RNE) ? " rne" : "", -+ (tmp & UDCCSR0_FST) ? " fst" : "", -+ (tmp & UDCCSR0_SST) ? " sst" : "", -+ (tmp & UDCCSR0_DME) ? " dme" : "", -+ (tmp & UDCCSR0_IPR) ? " ipr" : "", -+ (tmp & UDCCSR0_OPC) ? " opc" : ""); -+ size -= t; -+ next += t; -+ -+ if (!dev->driver) -+ goto done; -+ -+ t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", -+ dev->stats.write.bytes, dev->stats.write.ops, -+ dev->stats.read.bytes, dev->stats.read.ops, -+ dev->stats.irqs); -+ size -= t; -+ next += t; -+ -+ /* dump endpoint queues */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep [i]; -+ struct pxa27x_request *req; -+ int t; -+ -+ if (i != 0) { -+ const struct usb_endpoint_descriptor *d; -+ -+ d = ep->desc; -+ if (!d) -+ continue; -+ tmp = *dev->ep [i].reg_udccsr; -+ t = scnprintf(next, size, -+ "%d max %d %s udccs %02x udccr:0x%x\n", -+ i, le16_to_cpu (d->wMaxPacketSize), -+ (ep->dma >= 0) ? "dma" : "pio", tmp, -+ *dev->ep[i].reg_udccr); -+ /* TODO translate all five groups of udccs bits! */ -+ -+ } else /* ep0 should only have one transfer queued */ -+ t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n", -+ ep->pio_irqs); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ -+ if (list_empty(&ep->queue)) { -+ t = scnprintf(next, size, "\t(nothing queued)\n"); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ continue; -+ } -+ list_for_each_entry(req, &ep->queue, queue) { -+#ifdef USE_DMA -+ if (ep->dma >= 0 && req->queue.prev == &ep->queue) -+ t = scnprintf(next, size, "\treq %p len %d/%d " -+ "buf %p (dma%d dcmd %08x)\n", -+ &req->req, req->req.actual, -+ req->req.length, req->req.buf, -+ ep->dma, DCMD(ep->dma) -+ /* low 13 bits == bytes-to-go */); -+ else -+#endif -+ t = scnprintf(next, size, -+ "\treq %p len %d/%d buf %p\n", -+ &req->req, req->req.actual, -+ req->req.length, req->req.buf); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ } -+ } -+ -+done: -+ local_irq_restore(flags); -+ *eof = 1; -+ return count - size; -+} -+ -+#define create_proc_files() \ -+ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev) -+#define remove_proc_files() \ -+ remove_proc_entry(proc_node_name, NULL) -+ -+#else /* !UDC_PROC_FILE */ -+#define create_proc_files() do {} while (0) -+#define remove_proc_files() do {} while (0) -+ -+#endif /* UDC_PROC_FILE */ -+ -+/* "function" sysfs attribute */ -+static ssize_t show_function(struct device *_dev, struct device_attribute *attr, char *buf) -+{ -+ struct pxa27x_udc *dev = dev_get_drvdata(_dev); -+ -+ if (!dev->driver || !dev->driver->function -+ || strlen(dev->driver->function) > PAGE_SIZE) -+ return 0; -+ return scnprintf(buf, PAGE_SIZE, "%s\n", dev->driver->function); -+} -+static DEVICE_ATTR(function, S_IRUGO, show_function, NULL); -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * udc_disable - disable USB device controller -+ */ -+static void udc_disable(struct pxa27x_udc *dev) -+{ -+ UDCICR0 = UDCICR1 = 0x00000000; -+ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ -+ /* Disable clock for USB device */ -+ pxa_set_cken(CKEN11_USB, 0); -+ -+ ep0_idle(dev); -+ dev->gadget.speed = USB_SPEED_UNKNOWN; -+ dev->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); -+} -+ -+ -+/* -+ * udc_reinit - initialize software state -+ */ -+static void udc_reinit(struct pxa27x_udc *dev) -+{ -+ u32 i; -+ -+ dev->ep0state = EP0_IDLE; -+ -+ /* basic endpoint records init */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->stopped = 0; -+ ep->pio_irqs = ep->dma_irqs = 0; -+ } -+ dev->configuration = 0; -+ dev->interface = 0; -+ dev->alternate = 0; -+ /* the rest was statically initialized, and is read-only */ -+} -+ -+/* until it's enabled, this UDC should be completely invisible -+ * to any USB host. -+ */ -+static void udc_enable(struct pxa27x_udc *dev) -+{ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ -+ /* Enable clock for USB device */ -+ pxa_set_cken(CKEN11_USB, 1); -+ -+ UDCICR0 = UDCICR1 = 0; -+ -+ ep0_idle(dev); -+ dev->gadget.speed = USB_SPEED_FULL; -+ dev->stats.irqs = 0; -+ -+ udc_set_mask_UDCCR(UDCCR_UDE); -+ udelay(2); -+ if (UDCCR & UDCCR_EMCE) -+ dev_err(dev->dev, "There are error in configuration, udc disabled\n"); -+ -+ /* caller must be able to sleep in order to cope -+ * with startup transients. -+ */ -+ msleep(100); -+ -+ /* enable suspend/resume and reset irqs */ -+ UDCICR1 = UDCICR1_IECC | UDCICR1_IERU | UDCICR1_IESU | UDCICR1_IERS; -+ -+ /* enable ep0 irqs */ -+ UDCICR0 = UDCICR_INT(0,UDCICR_INT_MASK); -+ -+ DMSG("Connecting\n"); -+ /* RPFIXME */ -+ UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; -+ //dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); -+} -+ -+ -+/* when a driver is successfully registered, it will receive -+ * control requests including set_configuration(), which enables -+ * non-control requests. then usb traffic follows until a -+ * disconnect is reported. then a host may connect again, or -+ * the driver might get unbound. -+ */ -+int usb_gadget_register_driver(struct usb_gadget_driver *driver) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ int retval; -+ -+ if (!driver || driver->speed != USB_SPEED_FULL || !driver->bind -+ || !driver->unbind || !driver->disconnect || !driver->setup) -+ return -EINVAL; -+ if (!dev) -+ return -ENODEV; -+ if (dev->driver) -+ return -EBUSY; -+ -+ udc_disable(dev); -+ udc_init_ep(dev); -+ udc_reinit(dev); -+ -+ /* first hook up the driver ... */ -+ dev->driver = driver; -+ dev->gadget.dev.driver = &driver->driver; -+ dev->ep_num = 1; -+ -+ retval = device_add(&dev->gadget.dev); -+ if (retval) { -+ DMSG("device_add error %d\n", retval); -+ goto add_fail; -+ } -+ retval = driver->bind(&dev->gadget); -+ if (retval) { -+ DMSG("bind to driver %s --> error %d\n", -+ driver->driver.name, retval); -+ goto bind_fail; -+ } -+ retval = device_create_file(dev->dev, &dev_attr_function); -+ if (retval) { -+ DMSG("device_create_file failed: %d\n", retval); -+ goto create_file_fail; -+ } -+ -+ /* ... then enable host detection and ep0; and we're ready -+ * for set_configuration as well as eventual disconnect. -+ * NOTE: this shouldn't power up until later. -+ */ -+ DMSG("registered gadget driver '%s'\n", driver->driver.name); -+ udc_enable(dev); -+ dump_state(dev); -+ return 0; -+ -+create_file_fail: -+ driver->unbind(&dev->gadget); -+bind_fail: -+ device_del(&dev->gadget.dev); -+add_fail: -+ dev->driver = 0; -+ dev->gadget.dev.driver = 0; -+ return retval; -+} -+EXPORT_SYMBOL(usb_gadget_register_driver); -+ -+static void -+stop_activity(struct pxa27x_udc *dev, struct usb_gadget_driver *driver) -+{ -+ int i; -+ -+ DMSG("Trace path 1\n"); -+ /* don't disconnect drivers more than once */ -+ if (dev->gadget.speed == USB_SPEED_UNKNOWN) -+ driver = 0; -+ dev->gadget.speed = USB_SPEED_UNKNOWN; -+ -+ /* prevent new request submissions, kill any outstanding requests */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->stopped = 1; -+ nuke(ep, -ESHUTDOWN); -+ } -+ del_timer_sync(&dev->timer); -+ -+ /* report disconnect; the driver is already quiesced */ -+ if (driver) -+ driver->disconnect(&dev->gadget); -+ -+ /* re-init driver-visible data structures */ -+ udc_reinit(dev); -+} -+ -+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ -+ if (!dev) -+ return -ENODEV; -+ if (!driver || driver != dev->driver) -+ return -EINVAL; -+ -+ local_irq_disable(); -+ udc_disable(dev); -+ stop_activity(dev, driver); -+ local_irq_enable(); -+ -+ driver->unbind(&dev->gadget); -+ pxa27x_ep_freeall(&dev->gadget); -+ dev->driver = 0; -+ -+ device_del(&dev->gadget.dev); -+ device_remove_file(dev->dev, &dev_attr_function); -+ -+ DMSG("unregistered gadget driver '%s'\n", driver->driver.name); -+ dump_state(dev); -+ return 0; -+} -+EXPORT_SYMBOL(usb_gadget_unregister_driver); -+ -+ -+/*-------------------------------------------------------------------------*/ -+ -+static inline void clear_ep_state(struct pxa27x_udc *dev) -+{ -+ unsigned i; -+ -+ /* hardware SET_{CONFIGURATION,INTERFACE} automagic resets endpoint -+ * fifos, and pending transactions mustn't be continued in any case. -+ */ -+ for (i = 1; i < UDC_EP_NUM; i++) -+ nuke(&dev->ep[i], -ECONNABORTED); -+} -+ -+static void udc_watchdog(unsigned long _dev) -+{ -+ struct pxa27x_udc *dev = (void *)_dev; -+ -+ local_irq_disable(); -+ if (dev->ep0state == EP0_STALL -+ && (UDCCSR0 & UDCCSR0_FST) == 0 -+ && (UDCCSR0 & UDCCSR0_SST) == 0) { -+ UDCCSR0 = UDCCSR0_FST|UDCCSR0_FTF; -+ DBG(DBG_VERBOSE, "ep0 re-stall\n"); -+ start_watchdog(dev); -+ } -+ local_irq_enable(); -+} -+ -+static void handle_ep0(struct pxa27x_udc *dev) -+{ -+ u32 udccsr0 = UDCCSR0; -+ struct pxa27x_ep *ep = &dev->ep[0]; -+ struct pxa27x_request *req; -+ union { -+ struct usb_ctrlrequest r; -+ u8 raw[8]; -+ u32 word[2]; -+ } u; -+ -+ if (list_empty(&ep->queue)) -+ req = 0; -+ else -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ -+ /* clear stall status */ -+ if (udccsr0 & UDCCSR0_SST) { -+ nuke(ep, -EPIPE); -+ UDCCSR0 = UDCCSR0_SST; -+ del_timer(&dev->timer); -+ ep0_idle(dev); -+ } -+ -+ /* previous request unfinished? non-error iff back-to-back ... */ -+ if ((udccsr0 & UDCCSR0_SA) != 0 && dev->ep0state != EP0_IDLE) { -+ nuke(ep, 0); -+ del_timer(&dev->timer); -+ ep0_idle(dev); -+ } -+ -+ switch (dev->ep0state) { -+ case EP0_NO_ACTION: -+ dev_info(dev->dev, "%s: Busy\n", __FUNCTION__); -+ /*Fall through */ -+ case EP0_IDLE: -+ /* late-breaking status? */ -+ udccsr0 = UDCCSR0; -+ -+ /* start control request? */ -+ if (likely((udccsr0 & (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE)) -+ == (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE))) { -+ int i; -+ -+ nuke(ep, -EPROTO); -+ /* read SETUP packet */ -+ for (i = 0; i < 2; i++) { -+ if (unlikely(!(UDCCSR0 & UDCCSR0_RNE))) { -+bad_setup: -+ DMSG("SETUP %d!\n", i); -+ goto stall; -+ } -+ u.word [i] = UDCDR0; -+ } -+ if (unlikely((UDCCSR0 & UDCCSR0_RNE) != 0)) -+ goto bad_setup; -+ -+ le16_to_cpus(&u.r.wValue); -+ le16_to_cpus(&u.r.wIndex); -+ le16_to_cpus(&u.r.wLength); -+ -+ DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n", -+ u.r.bRequestType, u.r.bRequest, -+ u.r.wValue, u.r.wIndex, u.r.wLength); -+ /* cope with automagic for some standard requests. */ -+ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK) -+ == USB_TYPE_STANDARD; -+ dev->req_config = 0; -+ dev->req_pending = 1; -+#if 0 -+ switch (u.r.bRequest) { -+ /* hardware was supposed to hide this */ -+ case USB_REQ_SET_CONFIGURATION: -+ case USB_REQ_SET_INTERFACE: -+ case USB_REQ_SET_ADDRESS: -+ dev_err(dev->dev, "Should not come here\n"); -+ break; -+ } -+ -+#endif -+ if (u.r.bRequestType & USB_DIR_IN) -+ dev->ep0state = EP0_IN_DATA_PHASE; -+ else -+ dev->ep0state = EP0_OUT_DATA_PHASE; -+ i = dev->driver->setup(&dev->gadget, &u.r); -+ -+ if (i < 0) { -+ /* hardware automagic preventing STALL... */ -+ if (dev->req_config) { -+ /* hardware sometimes neglects to tell -+ * tell us about config change events, -+ * so later ones may fail... -+ */ -+ WARN("config change %02x fail %d?\n", -+ u.r.bRequest, i); -+ return; -+ /* TODO experiment: if has_cfr, -+ * hardware didn't ACK; maybe we -+ * could actually STALL! -+ */ -+ } -+ DBG(DBG_VERBOSE, "protocol STALL, " -+ "%02x err %d\n", UDCCSR0, i); -+stall: -+ /* the watchdog timer helps deal with cases -+ * where udc seems to clear FST wrongly, and -+ * then NAKs instead of STALLing. -+ */ -+ ep0start(dev, UDCCSR0_FST|UDCCSR0_FTF, "stall"); -+ start_watchdog(dev); -+ dev->ep0state = EP0_STALL; -+ -+ /* deferred i/o == no response yet */ -+ } else if (dev->req_pending) { -+ if (likely(dev->ep0state == EP0_IN_DATA_PHASE -+ || dev->req_std || u.r.wLength)) -+ ep0start(dev, 0, "defer"); -+ else -+ ep0start(dev, UDCCSR0_IPR, "defer/IPR"); -+ } -+ -+ /* expect at least one data or status stage irq */ -+ return; -+ -+ } else { -+ /* some random early IRQ: -+ * - we acked FST -+ * - IPR cleared -+ * - OPC got set, without SA (likely status stage) -+ */ -+ UDCCSR0 = udccsr0 & (UDCCSR0_SA|UDCCSR0_OPC); -+ } -+ break; -+ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR etc */ -+ if (udccsr0 & UDCCSR0_OPC) { -+ UDCCSR0 = UDCCSR0_OPC|UDCCSR0_FTF; -+ DBG(DBG_VERBOSE, "ep0in premature status\n"); -+ if (req) -+ done(ep, req, 0); -+ ep0_idle(dev); -+ } else /* irq was IPR clearing */ { -+ if (req) { -+ /* this IN packet might finish the request */ -+ (void) write_ep0_fifo(ep, req); -+ } /* else IN token before response was written */ -+ } -+ break; -+ case EP0_OUT_DATA_PHASE: /* SET_DESCRIPTOR etc */ -+ if (udccsr0 & UDCCSR0_OPC) { -+ if (req) { -+ /* this OUT packet might finish the request */ -+ if (read_ep0_fifo(ep, req)) -+ done(ep, req, 0); -+ /* else more OUT packets expected */ -+ } /* else OUT token before read was issued */ -+ } else /* irq was IPR clearing */ { -+ DBG(DBG_VERBOSE, "ep0out premature status\n"); -+ if (req) -+ done(ep, req, 0); -+ ep0_idle(dev); -+ } -+ break; -+ case EP0_STALL: -+ UDCCSR0 = UDCCSR0_FST; -+ break; -+ } -+ UDCISR0 = UDCISR_INT(0, UDCISR_INT_MASK); -+} -+ -+ -+static void handle_ep(struct pxa27x_ep *ep) -+{ -+ struct pxa27x_request *req; -+ int completed; -+ u32 udccsr=0; -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ do { -+ completed = 0; -+ if (likely (!list_empty(&ep->queue))) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ } else -+ req = 0; -+ -+// udccsr = *ep->reg_udccsr; -+ DMSG("%s: req:%p, udcisr0:0x%x udccsr %p:0x%x\n", __FUNCTION__, -+ req, UDCISR0, ep->reg_udccsr, *ep->reg_udccsr); -+ if (unlikely(ep->dir_in)) { -+ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; -+ if (unlikely (udccsr)) -+ *ep->reg_udccsr = udccsr; -+ -+ if (req && likely ((*ep->reg_udccsr & UDCCSR_FS) != 0)) -+ completed = write_fifo(ep, req); -+ -+ } else { -+ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; -+ if (unlikely(udccsr)) -+ *ep->reg_udccsr = udccsr; -+ -+ /* fifos can hold packets, ready for reading... */ -+ if (likely(req)) { -+ completed = read_fifo(ep, req); -+ } else { -+ pio_irq_disable (ep->pxa_ep_num); -+ //*ep->reg_udccsr = UDCCSR_FEF; -+ DMSG("%s: no req for out data\n", -+ __FUNCTION__); -+ } -+ } -+ ep->pio_irqs++; -+ } while (completed); -+} -+ -+static void pxa27x_update_eps(struct pxa27x_udc *dev) -+{ -+ struct pxa27x_virt_ep *virt_ep; -+ int i; -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if(!dev->ep[i].assigned || !dev->ep[i].usb_ep) -+ continue; -+ virt_ep = container_of(dev->ep[i].usb_ep, struct pxa27x_virt_ep, usb_ep); -+ -+ DMSG("%s, Updating eps %d:%d, %d:%d, %d:%d, %p,%p\n", __FUNCTION__, dev->ep[i].config, dev->configuration -+ ,dev->ep[i].interface, dev->interface, dev->ep[i].aisn, dev->alternate, virt_ep->pxa_ep, &dev->ep[i]); -+ -+ if(dev->ep[i].config == dev->configuration && virt_ep->pxa_ep != &dev->ep[i]) { -+ if ((dev->ep[i].interface == dev->interface && -+ dev->ep[i].aisn == dev->alternate) || virt_ep->pxa_ep->config != dev->configuration) { -+ -+ if (virt_ep->pxa_ep->desc) { -+ DMSG("%s, Changing end point to %d (en/dis)\n", __FUNCTION__, i); -+ pxa27x_ep_disable(&virt_ep->usb_ep); -+ virt_ep->pxa_ep = &dev->ep[i]; -+ pxa27x_ep_enable(&virt_ep->usb_ep, virt_ep->desc); -+ } else { -+ DMSG("%s, Changing end point to %d (no en/dis)\n", __FUNCTION__, i); -+ virt_ep->pxa_ep = &dev->ep[i]; -+ } -+ } -+ } -+ } -+} -+ -+static void pxa27x_change_configuration(struct pxa27x_udc *dev) -+{ -+ struct usb_ctrlrequest req ; -+ -+ pxa27x_update_eps(dev); -+ -+ req.bRequestType = 0; -+ req.bRequest = USB_REQ_SET_CONFIGURATION; -+ req.wValue = dev->configuration; -+ req.wIndex = 0; -+ req.wLength = 0; -+ -+ dev->ep0state = EP0_NO_ACTION; -+ dev->driver->setup(&dev->gadget, &req); -+} -+ -+static void pxa27x_change_interface(struct pxa27x_udc *dev) -+{ -+ struct usb_ctrlrequest req; -+ -+ pxa27x_update_eps(dev); -+ -+ req.bRequestType = USB_RECIP_INTERFACE; -+ req.bRequest = USB_REQ_SET_INTERFACE; -+ req.wValue = dev->alternate; -+ req.wIndex = dev->interface; -+ req.wLength = 0; -+ -+ dev->ep0state = EP0_NO_ACTION; -+ dev->driver->setup(&dev->gadget, &req); -+} -+ -+/* -+ * pxa27x_udc_irq - interrupt handler -+ * -+ * avoid delays in ep0 processing. the control handshaking isn't always -+ * under software control (pxa250c0 and the pxa255 are better), and delays -+ * could cause usb protocol errors. -+ */ -+static irqreturn_t pxa27x_udc_irq(int irq, void *_dev) -+{ -+ struct pxa27x_udc *dev = _dev; -+ int handled; -+ -+ dev->stats.irqs++; -+ -+ DBG(DBG_VERBOSE, "Interrupt, UDCISR0:0x%08x, UDCISR1:0x%08x, " -+ "UDCCR:0x%08x\n", UDCISR0, UDCISR1, UDCCR); -+ do { -+ u32 udcir = UDCISR1 & 0xF8000000; -+ -+ handled = 0; -+ -+ /* SUSpend Interrupt Request */ -+ if (unlikely(udcir & UDCISR1_IRSU)) { -+ UDCISR1 = UDCISR1_IRSU; -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB suspend\n"); -+ if (dev->gadget.speed != USB_SPEED_UNKNOWN -+ && dev->driver -+ && dev->driver->suspend) -+ dev->driver->suspend(&dev->gadget); -+ ep0_idle(dev); -+ } -+ -+ /* RESume Interrupt Request */ -+ if (unlikely(udcir & UDCISR1_IRRU)) { -+ UDCISR1 = UDCISR1_IRRU; -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB resume\n"); -+ -+ if (dev->gadget.speed != USB_SPEED_UNKNOWN -+ && dev->driver -+ && dev->driver->resume) -+ dev->driver->resume(&dev->gadget); -+ } -+ -+ if (unlikely(udcir & UDCISR1_IRCC)) { -+ unsigned config, interface, alternate; -+ -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB SET_CONFIGURATION or " -+ "SET_INTERFACE command received\n"); -+ -+ config = (UDCCR & UDCCR_ACN) >> UDCCR_ACN_S; -+ -+ if (dev->configuration != config) { -+ dev->configuration = config; -+ pxa27x_change_configuration(dev) ; -+ } -+ -+ interface = (UDCCR & UDCCR_AIN) >> UDCCR_AIN_S; -+ alternate = (UDCCR & UDCCR_AAISN) >> UDCCR_AAISN_S; -+ -+ if ((dev->interface != interface) || (dev->alternate != alternate)) { -+ dev->interface = interface; -+ dev->alternate = alternate; -+ pxa27x_change_interface(dev); -+ } -+ -+ UDCCR |= UDCCR_SMAC; -+ -+ UDCISR1 = UDCISR1_IRCC; -+ DMSG("%s: con:%d,inter:%d,alt:%d\n", -+ __FUNCTION__, config,interface, alternate); -+ } -+ -+ /* ReSeT Interrupt Request - USB reset */ -+ if (unlikely(udcir & UDCISR1_IRRS)) { -+ UDCISR1 = UDCISR1_IRRS; -+ handled = 1; -+ -+ if ((UDCCR & UDCCR_UDA) == 0) { -+ DBG(DBG_VERBOSE, "USB reset start\n"); -+ -+ /* reset driver and endpoints, -+ * in case that's not yet done -+ */ -+ stop_activity(dev, dev->driver); -+ } -+ INFO("USB reset\n"); -+ dev->gadget.speed = USB_SPEED_FULL; -+ memset(&dev->stats, 0, sizeof dev->stats); -+ -+ } else { -+ u32 udcisr0 = UDCISR0 ; -+ u32 udcisr1 = UDCISR1 & 0xFFFF; -+ int i; -+ -+ if (unlikely (!udcisr0 && !udcisr1)) -+ continue; -+ -+ DBG(DBG_VERY_NOISY, "irq %02x.%02x\n", udcisr1,udcisr0); -+ -+ /* control traffic */ -+ if (udcisr0 & UDCISR0_IR0) { -+ dev->ep[0].pio_irqs++; -+ handle_ep0(dev); -+ handled = 1; -+ } -+ -+ udcisr0 >>= 2; -+ /* endpoint data transfers */ -+ for (i = 1; udcisr0!=0 && i < 16; udcisr0>>=2,i++) { -+ UDCISR0 = UDCISR_INT(i, UDCISR_INT_MASK); -+ -+ if (udcisr0 & UDC_INT_FIFOERROR) -+ dev_err(dev->dev, " Endpoint %d Fifo error\n", i); -+ if (udcisr0 & UDC_INT_PACKETCMP) { -+ handle_ep(&dev->ep[i]); -+ handled = 1; -+ } -+ -+ } -+ -+ for (i = 0; udcisr1!=0 && i < 8; udcisr1 >>= 2, i++) { -+ UDCISR1 = UDCISR_INT(i, UDCISR_INT_MASK); -+ -+ if (udcisr1 & UDC_INT_FIFOERROR) { -+ dev_err(dev->dev, "Endpoint %d fifo error\n", (i+16)); -+ } -+ -+ if (udcisr1 & UDC_INT_PACKETCMP) { -+ handle_ep(&dev->ep[i+16]); -+ handled = 1; -+ } -+ } -+ } -+ -+ /* we could also ask for 1 msec SOF (SIR) interrupts */ -+ -+ } while (handled); -+ return IRQ_HANDLED; -+} -+ -+int write_ep0_zlp(void) -+{ -+ UDCCSR0 = UDCCSR0_IPR; -+ return 0; -+} -+EXPORT_SYMBOL(write_ep0_zlp); -+ -+static void udc_init_ep(struct pxa27x_udc *dev) -+{ -+ int i; -+ -+ INIT_LIST_HEAD(&dev->gadget.ep_list); -+ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); -+ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->dma = -1; -+ if (i != 0) { -+ memset(ep, 0, sizeof(*ep)); -+ } -+ INIT_LIST_HEAD(&ep->queue); -+ } -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+static void nop_release(struct device *dev) -+{ -+ DMSG("%s %s\n", __FUNCTION__, dev->bus_id); -+} -+ -+/* this uses load-time allocation and initialization (instead of -+ * doing it at run-time) to save code, eliminate fault paths, and -+ * be more obviously correct. -+ */ -+ -+static struct pxa27x_udc memory = { -+ .gadget = { -+ .ops = &pxa27x_udc_ops, -+ .ep0 = &memory.virt_ep0.usb_ep, -+ .name = driver_name, -+ .dev = { -+ .bus_id = "gadget", -+ .release = nop_release, -+ }, -+ }, -+ -+ /* control endpoint */ -+ .virt_ep0 = { -+ .pxa_ep = &memory.ep[0], -+ .usb_ep = { -+ .name = ep0name, -+ .ops = &pxa27x_ep_ops, -+ .maxpacket = EP0_FIFO_SIZE, -+ }, -+ }, -+ -+ .ep[0] = { -+ .usb_ep = &memory.virt_ep0.usb_ep, -+ .dev = &memory, -+ .reg_udccsr = &UDCCSR0, -+ .reg_udcdr = &UDCDR0, -+ }, -+}; -+ -+static int __init pxa27x_udc_probe(struct platform_device *_dev) -+{ -+ struct pxa27x_udc *dev = &memory; -+ int retval; -+ -+ /* other non-static parts of init */ -+ dev->dev = &_dev->dev; -+ dev->mach = _dev->dev.platform_data; -+ -+ /* RPFIXME */ -+ UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; -+ -+ init_timer(&dev->timer); -+ dev->timer.function = udc_watchdog; -+ dev->timer.data = (unsigned long) dev; -+ -+ device_initialize(&dev->gadget.dev); -+ dev->gadget.dev.parent = &_dev->dev; -+ dev->gadget.dev.dma_mask = _dev->dev.dma_mask; -+ -+ the_controller = dev; -+ platform_set_drvdata(_dev, dev); -+ -+ udc_disable(dev); -+ udc_init_ep(dev); -+ udc_reinit(dev); -+ -+ /* irq setup after old hardware state is cleaned up */ -+ retval = request_irq(IRQ_USB, pxa27x_udc_irq, -+ SA_INTERRUPT, driver_name, dev); -+ if (retval != 0) { -+ dev_err(dev->dev, "%s: can't get irq %i, err %d\n", -+ driver_name, IRQ_USB, retval); -+ return -EBUSY; -+ } -+ dev->got_irq = 1; -+ -+ create_proc_files(); -+ -+ return 0; -+} -+ -+static int pxa27x_udc_remove(struct platform_device *_dev) -+{ -+ struct pxa27x_udc *dev = platform_get_drvdata(_dev); -+ -+ udc_disable(dev); -+ remove_proc_files(); -+ usb_gadget_unregister_driver(dev->driver); -+ -+ pxa27x_ep_freeall(&dev->gadget); -+ -+ if (dev->got_irq) { -+ free_irq(IRQ_USB, dev); -+ dev->got_irq = 0; -+ } -+ platform_set_drvdata(_dev, 0); -+ the_controller = 0; -+ return 0; -+} -+ -+#ifdef CONFIG_PM -+static void pxa27x_udc_shutdown(struct platform_device *_dev) -+{ -+ struct pxa27x_udc *dev = platform_get_drvdata(_dev); -+ -+ udc_disable(dev); -+} -+ -+static int pxa27x_udc_suspend(struct platform_device *_dev, pm_message_t state) -+{ -+ int i; -+ struct pxa27x_udc *dev = platform_get_drvdata(_dev); -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ -+ dev->udccsr0 = UDCCSR0; -+ for(i=1; (iep[i].assigned) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ ep->udccsr_value = *ep->reg_udccsr; -+ ep->udccr_value = *ep->reg_udccr; -+ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", -+ i, *ep->reg_udccsr, *ep->reg_udccr); -+ } -+ } -+ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ pxa_set_cken(CKEN11_USB, 0); -+ -+ return 0; -+} -+ -+static int pxa27x_udc_resume(struct platform_device *_dev) -+{ -+ int i; -+ struct pxa27x_udc *dev = platform_get_drvdata(_dev); -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ UDCCSR0 = dev->udccsr0 & (UDCCSR0_FST | UDCCSR0_DME); -+ for (i=1; i < UDC_EP_NUM; i++) { -+ if (dev->ep[i].assigned) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ *ep->reg_udccsr = ep->udccsr_value; -+ *ep->reg_udccr = ep->udccr_value; -+ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", -+ i, *ep->reg_udccsr, *ep->reg_udccr); -+ } -+ } -+ -+ udc_enable(dev); -+ -+ /* OTGPH bit is set when sleep mode is entered. -+ * it indicates that OTG pad is retaining its state. -+ * Upon exit from sleep mode and before clearing OTGPH, -+ * Software must configure the USB OTG pad, UDC, and UHC -+ * to the state they were in before entering sleep mode.*/ -+ PSSR |= PSSR_OTGPH; -+ -+ return 0; -+} -+#endif -+ -+/*-------------------------------------------------------------------------*/ -+ -+static struct platform_driver udc_driver = { -+ .driver = { -+ .name = "pxa2xx-udc", -+ }, -+ .probe = pxa27x_udc_probe, -+ .remove = pxa27x_udc_remove, -+#ifdef CONFIG_PM -+ .shutdown = pxa27x_udc_shutdown, -+ .suspend = pxa27x_udc_suspend, -+ .resume = pxa27x_udc_resume -+#endif -+}; -+ -+static int __init udc_init(void) -+{ -+ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); -+ return platform_driver_register(&udc_driver); -+} -+module_init(udc_init); -+ -+static void __exit udc_exit(void) -+{ -+ platform_driver_unregister(&udc_driver); -+} -+module_exit(udc_exit); -+ -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/drivers/usb/gadget/pxa27x_udc.h 2007-04-21 12:22:00.000000000 -0300 -@@ -0,0 +1,298 @@ -+/* -+ * linux/drivers/usb/gadget/pxa27x_udc.h -+ * Intel PXA27x on-chip full speed USB device controller -+ * -+ * Copyright (C) 2003 Robert Schwebel , Pengutronix -+ * Copyright (C) 2003 David Brownell -+ * Copyright (C) 2004 Intel Corporation -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#ifndef __LINUX_USB_GADGET_PXA27X_H -+#define __LINUX_USB_GADGET_PXA27X_H -+ -+#include -+ -+struct pxa27x_udc; -+ -+struct pxa27x_ep { -+ struct pxa27x_udc *dev; -+ struct usb_ep *usb_ep; -+ const struct usb_endpoint_descriptor *desc; -+ -+ struct list_head queue; -+ unsigned long pio_irqs; -+ unsigned long dma_irqs; -+ -+ unsigned pxa_ep_num; -+ int dma; -+ unsigned fifo_size; -+ unsigned ep_type; -+ -+ unsigned stopped : 1; -+ unsigned dma_con : 1; -+ unsigned dir_in : 1; -+ unsigned assigned : 1; -+ -+ unsigned ep_num; -+ unsigned config; -+ unsigned interface; -+ unsigned aisn; -+ /* UDCCSR = UDC Control/Status Register for this EP -+ * UBCR = UDC Byte Count Remaining (contents of OUT fifo) -+ * UDCDR = UDC Endpoint Data Register (the fifo) -+ * UDCCR = UDC Endpoint Configuration Registers -+ * DRCM = DMA Request Channel Map -+ */ -+ volatile u32 *reg_udccsr; -+ volatile u32 *reg_udcbcr; -+ volatile u32 *reg_udcdr; -+ volatile u32 *reg_udccr; -+#ifdef USE_DMA -+ volatile u32 *reg_drcmr; -+#define drcmr(n) .reg_drcmr = & DRCMR ## n , -+#else -+#define drcmr(n) -+#endif -+ -+#ifdef CONFIG_PM -+ unsigned udccsr_value; -+ unsigned udccr_value; -+#endif -+}; -+ -+struct pxa27x_virt_ep { -+ struct usb_ep usb_ep; -+ const struct usb_endpoint_descriptor *desc; -+ struct pxa27x_ep *pxa_ep; -+}; -+ -+struct pxa27x_request { -+ struct usb_request req; -+ struct list_head queue; -+}; -+ -+enum ep0_state { -+ EP0_IDLE, -+ EP0_IN_DATA_PHASE, -+ EP0_OUT_DATA_PHASE, -+// EP0_END_XFER, -+ EP0_STALL, -+ EP0_NO_ACTION -+}; -+ -+#define EP0_FIFO_SIZE ((unsigned)16) -+#define BULK_FIFO_SIZE ((unsigned)64) -+#define ISO_FIFO_SIZE ((unsigned)256) -+#define INT_FIFO_SIZE ((unsigned)8) -+ -+struct udc_stats { -+ struct ep0stats { -+ unsigned long ops; -+ unsigned long bytes; -+ } read, write; -+ unsigned long irqs; -+}; -+ -+#define UDC_EP_NUM 24 -+ -+ -+struct pxa27x_udc { -+ struct usb_gadget gadget; -+ struct usb_gadget_driver *driver; -+ -+ enum ep0_state ep0state; -+ struct udc_stats stats; -+ unsigned got_irq : 1, -+ has_cfr : 1, -+ req_pending : 1, -+ req_std : 1, -+ req_config : 1; -+ -+#define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200)) -+ struct timer_list timer; -+ -+ struct device *dev; -+ struct pxa2xx_udc_mach_info *mach; -+ u64 dma_mask; -+ struct pxa27x_virt_ep virt_ep0; -+ struct pxa27x_ep ep[UDC_EP_NUM]; -+ unsigned int ep_num; -+ -+ unsigned configuration, -+ interface, -+ alternate; -+#ifdef CONFIG_PM -+ unsigned udccsr0; -+#endif -+}; -+ -+static struct pxa27x_udc *the_controller; -+ -+#if 0 -+/*-------------------------------------------------------------------------*/ -+ -+ -+/* one GPIO should be used to detect host disconnect */ -+static inline int is_usb_connected(void) -+{ -+ if (!the_controller->mach->udc_is_connected) -+ return 1; -+ return the_controller->mach->udc_is_connected(); -+} -+ -+/* one GPIO should force the host to see this device (or not) */ -+static inline void make_usb_disappear(void) -+{ -+ if (!the_controller->mach->udc_command) -+ return; -+ the_controller->mach->udc_command(PXA27X_UDC_CMD_DISCONNECT); -+} -+ -+static inline void let_usb_appear(void) -+{ -+ if (!the_controller->mach->udc_command) -+ return; -+ the_controller->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); -+} -+#endif -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * Debugging support vanishes in non-debug builds. DBG_NORMAL should be -+ * mostly silent during normal use/testing, with no timing side-effects. -+ */ -+#define DBG_NORMAL 1 /* error paths, device state transitions */ -+#define DBG_VERBOSE 2 /* add some success path trace info */ -+#define DBG_NOISY 3 /* ... even more: request level */ -+#define DBG_VERY_NOISY 4 /* ... even more: packet level */ -+ -+#ifdef DEBUG -+static const char *state_name[] = { -+ "EP0_IDLE", -+ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", -+ "EP0_END_XFER", "EP0_STALL" -+}; -+ -+#define DMSG(stuff...) printk(KERN_ERR "udc: " stuff) -+ -+#ifdef VERBOSE -+# define UDC_DEBUG DBG_VERBOSE -+#else -+# define UDC_DEBUG DBG_NORMAL -+#endif -+ -+static void __attribute__ ((__unused__)) -+dump_udccr(const char *label) -+{ -+ u32 udccr = UDCCR; -+ DMSG("%s 0x%08x =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", -+ label, udccr, -+ (udccr & UDCCR_OEN) ? " oen":"", -+ (udccr & UDCCR_AALTHNP) ? " aalthnp":"", -+ (udccr & UDCCR_AHNP) ? " rem" : "", -+ (udccr & UDCCR_BHNP) ? " rstir" : "", -+ (udccr & UDCCR_DWRE) ? " dwre" : "", -+ (udccr & UDCCR_SMAC) ? " smac" : "", -+ (udccr & UDCCR_EMCE) ? " emce" : "", -+ (udccr & UDCCR_UDR) ? " udr" : "", -+ (udccr & UDCCR_UDA) ? " uda" : "", -+ (udccr & UDCCR_UDE) ? " ude" : "", -+ (udccr & UDCCR_ACN) >> UDCCR_ACN_S, -+ (udccr & UDCCR_AIN) >> UDCCR_AIN_S, -+ (udccr & UDCCR_AAISN)>> UDCCR_AAISN_S ); -+} -+ -+static void __attribute__ ((__unused__)) -+dump_udccsr0(const char *label) -+{ -+ u32 udccsr0 = UDCCSR0; -+ -+ DMSG("%s %s 0x%08x =%s%s%s%s%s%s%s\n", -+ label, state_name[the_controller->ep0state], udccsr0, -+ (udccsr0 & UDCCSR0_SA) ? " sa" : "", -+ (udccsr0 & UDCCSR0_RNE) ? " rne" : "", -+ (udccsr0 & UDCCSR0_FST) ? " fst" : "", -+ (udccsr0 & UDCCSR0_SST) ? " sst" : "", -+ (udccsr0 & UDCCSR0_DME) ? " dme" : "", -+ (udccsr0 & UDCCSR0_IPR) ? " ipr" : "", -+ (udccsr0 & UDCCSR0_OPC) ? " opr" : ""); -+} -+ -+static void __attribute__ ((__unused__)) -+dump_state(struct pxa27x_udc *dev) -+{ -+ unsigned i; -+ -+ DMSG("%s, udcicr %02X.%02X, udcsir %02X.%02x, udcfnr %02X\n", -+ state_name[dev->ep0state], -+ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); -+ dump_udccr("udccr"); -+ -+ if (!dev->driver) { -+ DMSG("no gadget driver bound\n"); -+ return; -+ } else -+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name); -+ -+ -+ dump_udccsr0 ("udccsr0"); -+ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n", -+ dev->stats.write.bytes, dev->stats.write.ops, -+ dev->stats.read.bytes, dev->stats.read.ops); -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if (dev->ep[i].assigned) -+ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccsr); -+ } -+} -+ -+#if 0 -+static void dump_regs(u8 ep) -+{ -+ DMSG("EP:%d UDCCSR:0x%08x UDCBCR:0x%08x\n UDCCR:0x%08x\n", -+ ep,UDCCSN(ep), UDCBCN(ep), UDCCN(ep)); -+} -+static void dump_req (struct pxa27x_request *req) -+{ -+ struct usb_request *r = &req->req; -+ -+ DMSG("%s: buf:0x%08x length:%d dma:0x%08x actual:%d\n", -+ __FUNCTION__, (unsigned)r->buf, r->length, -+ r->dma, r->actual); -+} -+#endif -+ -+#else -+ -+#define DMSG(stuff...) do{}while(0) -+ -+#define dump_udccr(x) do{}while(0) -+#define dump_udccsr0(x) do{}while(0) -+#define dump_state(x) do{}while(0) -+ -+#define UDC_DEBUG ((unsigned)4) -+ -+#endif -+ -+#define DBG(lvl, stuff...) do{if ((lvl) <= UDC_DEBUG) DMSG(stuff);}while(0) -+ -+#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff) -+#define INFO(stuff...) printk(KERN_INFO "udc: " stuff) -+ -+ -+#endif /* __LINUX_USB_GADGET_PXA27X_H */ -Index: linux-2.6.20.7/drivers/usb/gadget/pxa2xx_udc.h -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/pxa2xx_udc.h 2007-04-21 12:21:53.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/pxa2xx_udc.h 2007-04-21 12:22:00.000000000 -0300 -@@ -259,7 +259,8 @@ - unsigned i; - - DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n", -- is_usb_connected() ? "host " : "disconnected", -+ //is_usb_connected() ? "host " : "disconnected", -+ "host ", - state_name[dev->ep0state], - UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL); - dump_udccr("udccr"); -@@ -276,8 +277,8 @@ - } else - DMSG("ep0 driver '%s'\n", dev->driver->driver.name); - -- if (!is_usb_connected()) -- return; -+ //if (!is_usb_connected()) -+ // return; - - dump_udccs0 ("udccs0"); - DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n", -Index: linux-2.6.20.7/drivers/usb/gadget/ether.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/usb/gadget/ether.c 2007-04-21 12:21:53.000000000 -0300 -+++ linux-2.6.20.7/drivers/usb/gadget/ether.c 2007-04-21 12:29:18.000000000 -0300 -@@ -1275,6 +1275,10 @@ - /* done sending after USB_CDC_GET_ENCAPSULATED_RESPONSE */ - } - -+#ifdef CONFIG_USB_GADGET_PXA27X -+int write_ep0_zlp(void); -+#endif -+ - static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req) - { - struct eth_dev *dev = ep->driver_data; -@@ -1285,6 +1289,10 @@ - status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf); - if (status < 0) - ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status); -+ -+#ifdef CONFIG_USB_GADGET_PXA27X -+ write_ep0_zlp(); -+#endif - spin_unlock(&dev->lock); - } - diff --git a/packages/linux/linux-ezx-2.6.21/a780-flip.patch b/packages/linux/linux-ezx-2.6.21/a780-flip.patch deleted file mode 100644 index 56f1e4336d..0000000000 --- a/packages/linux/linux-ezx-2.6.21/a780-flip.patch +++ /dev/null @@ -1,43 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 13:23:57.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 13:26:53.000000000 -0300 -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -193,7 +194,30 @@ - }, - }; - -+static struct gpio_keys_button a780flip_buttons[] = { -+ [0] = { -+ .keycode = KEY_SLEEP, -+ .gpio = GPIO_FLIP_PIN, -+ .desc = "A780 flip", -+ }, -+}; -+ -+static struct gpio_keys_platform_data a780flip_platform_data = { -+ .buttons = a780flip_buttons, -+ .nbuttons = 1, -+}; -+ -+static struct platform_device a780flip_device = { -+ .name = "gpio-keys", -+ .id = -1, -+ .dev = { -+ .platform_data = &a780flip_platform_data, -+ }, -+}; -+ -+ - static struct platform_device *devices[] __initdata = { -+ &a780flip_device, - }; - - static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/a780-kbd.patch b/packages/linux/linux-ezx-2.6.21/a780-kbd.patch deleted file mode 100644 index 383839d639..0000000000 --- a/packages/linux/linux-ezx-2.6.21/a780-kbd.patch +++ /dev/null @@ -1,90 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:04:57.000000000 +0200 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:05:05.000000000 +0200 -@@ -16,18 +16,21 @@ - #include - #include - #include -+#include - - #include - #include - #include - #include - #include -+#include - - #include "generic.h" - #include "ezx.h" - - extern void ezx_lcd_power(int, struct fb_var_screeninfo *); - extern void ezx_backlight_power(int); -+extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *); - - #ifdef CONFIG_EZX_PCAP - extern int ezx_pcap_mmcsd_power(int); -@@ -141,6 +144,55 @@ - .pxafb_lcd_power = &ezx_lcd_power, - }; - -+static unsigned char a780_keycode[] = { -+ /* row 0 */ -+ KEY_PHONE, KEY_MENU, KEY_CANCEL, KEY_PAGEUP, KEY_UP, -+ /* row 1 */ -+ KEY_KP1, KEY_KP2, KEY_KP3, KEY_ENTER, KEY_KPENTER, /*center joypad */ -+ /* row 2 */ -+ KEY_KP4, KEY_KP5, KEY_KP6, KEY_RECORD, KEY_LEFT, -+ /* row 3 */ -+ KEY_KP7, KEY_KP8, KEY_KP9, KEY_HOME, KEY_RIGHT, -+ /* row 4 */ -+ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN, -+}; -+ -+static unsigned char a780_direct_keycode[] = { -+ KEY_CAMERA, -+}; -+ -+static int a780_kbd_init(void) -+{ -+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, voice_rec */ -+ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */ -+ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */ -+ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ -+ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ -+ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ -+ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ -+ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ -+ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ -+ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ -+ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */ -+ PKWR = 0xec400; -+ PGSR3 |= 0xf80; -+ return 0; -+} -+ -+static struct pxakbd_platform_data a780_kbd_platform_data = { -+ .init = &a780_kbd_init, -+ .scan_interval = HZ/40, -+ .matrix = { -+ .keycode = a780_keycode, -+ .cols = 5, -+ .rows = 5, -+ }, -+ .direct = { -+ .keycode = a780_direct_keycode, -+ .num = 1, -+ }, -+}; -+ - static struct platform_device *devices[] __initdata = { - }; - -@@ -159,6 +211,7 @@ - - set_pxa_fb_info(&a780_fb_info); - pxa_set_mci_info(&a780_mci_platform_data); -+ pxa_set_kbd_info(&a780_kbd_platform_data); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - } diff --git a/packages/linux/linux-ezx-2.6.21/a780-leds.patch b/packages/linux/linux-ezx-2.6.21/a780-leds.patch deleted file mode 100644 index 09913df2ca..0000000000 --- a/packages/linux/linux-ezx-2.6.21/a780-leds.patch +++ /dev/null @@ -1,181 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: linux-2.6.21/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 04:09:08.000000000 -0300 -+++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 14:09:03.000000000 -0300 -@@ -104,6 +104,13 @@ - These triggers allow kernel events to drive the LEDs and can - be configured via sysfs. If unsure, say Y. - -+config LEDS_A780 -+ tristate "LED Support for the Motorola A780 GSM Phone" -+ depends LEDS_CLASS && PXA_EZX_A780 -+ help -+ This option enables support for the LEDs on the -+ Motorola A780 GSM Phone. -+ - config LEDS_TRIGGER_TIMER - tristate "LED Timer Trigger" - depends on LEDS_TRIGGERS -Index: linux-2.6.21/drivers/leds/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/leds/Makefile 2007-05-08 04:09:08.000000000 -0300 -+++ linux-2.6.21/drivers/leds/Makefile 2007-05-08 14:09:03.000000000 -0300 -@@ -16,6 +16,7 @@ - obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o - obj-$(CONFIG_LEDS_H1940) += leds-h1940.o - obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o -+obj-$(CONFIG_LEDS_A780) += leds-a780.o - - # LED Triggers - obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o -Index: linux-2.6.21/drivers/leds/leds-a780.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/leds/leds-a780.c 2007-05-08 14:09:03.000000000 -0300 -@@ -0,0 +1,122 @@ -+/* -+ * EZX Platform LED Driver for the Motorola A780 GSM Phone -+ * -+ * Copyright 2006 Vanille-Media -+ * -+ * Author: Michael Lauer -+ * -+ * Based on keylight.c by Motorola and leds-corgi.c by Richard Purdie -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if ( value > 31 ) value = 31; -+ printk( KERN_DEBUG "a780led_main_set: %d\n", value ); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3, value & 0x08); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4, value & 0x10); -+} -+ -+static void a780led_aux_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if ( value > 31 ) value = 31; -+ printk( KERN_DEBUG "a780led_aux_set: %d\n", value ); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3, value & 0x08); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10); -+} -+ -+static struct led_classdev a780_main_led = { -+ .name = "a780:main", -+ .default_trigger = "none", -+ .brightness_set = a780led_main_set, -+}; -+ -+static struct led_classdev a780_aux_led = { -+ .name = "a780:aux", -+ .default_trigger = "none", -+ .brightness_set = a780led_aux_set, -+}; -+ -+#ifdef CONFIG_PM -+static int a780led_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ led_classdev_suspend(&a780_main_led); -+ led_classdev_suspend(&a780_aux_led); -+ return 0; -+} -+ -+static int a780led_resume(struct platform_device *dev) -+{ -+ led_classdev_resume(&a780_main_led); -+ led_classdev_resume(&a780_aux_led); -+ return 0; -+} -+#endif -+ -+static int a780led_probe(struct platform_device *pdev) -+{ -+ int ret; -+ -+ ret = led_classdev_register(&pdev->dev, &a780_main_led); -+ if (ret < 0) -+ return ret; -+ -+ ret = led_classdev_register(&pdev->dev, &a780_aux_led); -+ if (ret < 0) -+ led_classdev_unregister(&a780_main_led); -+ -+ return ret; -+} -+ -+static int a780led_remove(struct platform_device *pdev) -+{ -+ led_classdev_unregister(&a780_main_led); -+ led_classdev_unregister(&a780_aux_led); -+ return 0; -+} -+ -+static struct platform_driver a780led_driver = { -+ .probe = a780led_probe, -+ .remove = a780led_remove, -+#ifdef CONFIG_PM -+ .suspend = a780led_suspend, -+ .resume = a780led_resume, -+#endif -+ .driver = { -+ .name = "a780-led", -+ }, -+}; -+ -+static int __init a780led_init(void) -+{ -+ return platform_driver_register(&a780led_driver); -+} -+ -+static void __exit a780led_exit(void) -+{ -+ a780led_main_set( &a780_main_led, 0 ); -+ a780led_aux_set( &a780_aux_led, 0 ); -+ platform_driver_unregister(&a780led_driver); -+} -+ -+module_init(a780led_init); -+module_exit(a780led_exit); -+ -+MODULE_AUTHOR("Michael Lauer "); -+MODULE_DESCRIPTION("Motorola A780 LED driver"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 14:09:13.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 14:11:37.000000000 -0300 -@@ -215,9 +215,14 @@ - }, - }; - -+static struct platform_device a780led_device = { -+ .name = "a780-led", -+ .id = -1, -+}; - - static struct platform_device *devices[] __initdata = { - &a780flip_device, -+ &a780led_device, - }; - - static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/a780-mci.patch b/packages/linux/linux-ezx-2.6.21/a780-mci.patch deleted file mode 100644 index b9d601856a..0000000000 --- a/packages/linux/linux-ezx-2.6.21/a780-mci.patch +++ /dev/null @@ -1,123 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 03:46:17.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 04:05:48.000000000 -0300 -@@ -14,11 +14,14 @@ - #include - #include - #include -+#include -+#include - - #include - #include - #include - #include -+#include - - #include "generic.h" - #include "ezx.h" -@@ -26,6 +29,95 @@ - extern void ezx_lcd_power(int, struct fb_var_screeninfo *); - extern void ezx_backlight_power(int); - -+#ifdef CONFIG_EZX_PCAP -+extern int ezx_pcap_mmcsd_power(int); -+extern void ezx_pcap_mmcsd_voltage(u_int32_t); -+#else -+#define ezx_pcap_mmcsd_voltage(x) {} -+#define ezx_pcap_mmcsd_power(x) {} -+#endif -+ -+static struct pxamci_platform_data a780_mci_platform_data; -+ -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 5, -+ [MMC_VDD_170] = 5, -+ [MMC_VDD_180] = 6, -+ [MMC_VDD_190] = 6, -+ [MMC_VDD_200] = 7, -+ [MMC_VDD_210] = 7, -+ [MMC_VDD_220] = 8, -+ [MMC_VDD_230] = 8, -+ [MMC_VDD_240] = 9, -+ [MMC_VDD_250] = 9, -+ [MMC_VDD_260] = 10, -+ [MMC_VDD_270] = 10, -+ [MMC_VDD_280] = 11, -+ [MMC_VDD_290] = 11, -+ [MMC_VDD_300] = 12, -+ [MMC_VDD_310] = 12, -+ [MMC_VDD_320] = 13, -+ [MMC_VDD_330] = 13, -+ [MMC_VDD_340] = 14, -+ [MMC_VDD_350] = 14, -+ [MMC_VDD_360] = 15, -+}; -+ -+static int a780_mci_init(struct device *dev, -+ irqreturn_t (*ezx_detect_int)(int, void *), -+ void *data) -+{ -+ int err; -+ -+ /* Setup GPIO for PXA27x MMC/SD controller */ -+ pxa_gpio_mode(GPIO32_MMCCLK_MD); -+ pxa_gpio_mode(GPIO112_MMCCMD_MD); -+ pxa_gpio_mode(GPIO92_MMCDAT0_MD); -+ pxa_gpio_mode(GPIO109_MMCDAT1_MD); -+ pxa_gpio_mode(GPIO110_MMCDAT2_MD); -+ pxa_gpio_mode(GPIO111_MMCDAT3_MD); -+ -+ ezx_pcap_mmcsd_power(1); -+ -+ a780_mci_platform_data.detect_delay = msecs_to_jiffies(250); -+ -+ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, -+ "MMC card detect", data); -+ if (err) { -+ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " -+ "MMC card detect IRQ\n"); -+ return -1; -+ } -+ -+ set_irq_type(0x0b, IRQT_BOTHEDGE); -+ -+ return 0; -+} -+ -+static void a780_mci_setpower(struct device *dev, unsigned int vdd) -+{ -+ if (vdd <= MMC_VDD_360) -+ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); -+ -+ ezx_pcap_mmcsd_power(1); -+} -+ -+static void a780_mci_exit(struct device *dev, void *data) -+{ -+ ezx_pcap_mmcsd_power(0); -+ free_irq(0x49, data); -+} -+ -+static struct pxamci_platform_data a780_mci_platform_data = { -+ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 -+ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 -+ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 -+ |MMC_VDD_34_35|MMC_VDD_35_36, -+ .init = a780_mci_init, -+ .setpower = a780_mci_setpower, -+ .exit = a780_mci_exit, -+}; -+ - static struct pxafb_mode_info mode_a780 = { - .pixclock = 150000, - .xres = 240, -@@ -66,6 +158,7 @@ - PSLR = 0x05800f00; - - set_pxa_fb_info(&a780_fb_info); -+ pxa_set_mci_info(&a780_mci_platform_data); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - } diff --git a/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch b/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch deleted file mode 100644 index 7436c40f5f..0000000000 --- a/packages/linux/linux-ezx-2.6.21/a780-vibrator.patch +++ /dev/null @@ -1,151 +0,0 @@ -Index: linux-2.6.21/drivers/leds/leds-a780.c -=================================================================== ---- linux-2.6.21.orig/drivers/leds/leds-a780.c 2007-05-08 15:09:26.000000000 -0300 -+++ linux-2.6.21/drivers/leds/leds-a780.c 2007-05-08 15:19:26.000000000 -0300 -@@ -18,10 +18,13 @@ - #include - #include - -+extern void ezx_pcap_vibrator_level(u_int32_t); -+ - static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value) - { - if ( value > 31 ) value = 31; - printk( KERN_DEBUG "a780led_main_set: %d\n", value ); -+#warning FIXME: use read/write operations - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04); -@@ -33,6 +36,7 @@ - { - if ( value > 31 ) value = 31; - printk( KERN_DEBUG "a780led_aux_set: %d\n", value ); -+#warning FIXME: use read/write operations - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04); -@@ -40,6 +44,43 @@ - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10); - } - -+static void a780vibrator_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if ( value > 4 ) value = 4; -+ printk( KERN_DEBUG "a780vibrator_set: %d\n", value ); -+ -+ switch(value) -+ { -+ case 0: -+ /* turn off vibrator */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 0); -+ break; -+ -+ case 1: -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); -+ break; -+ -+ case 2: -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); -+ break; -+ -+ case 3: -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL2); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); -+ break; -+ -+ case 4: -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); -+ break; -+ -+ default: -+ break; -+ } -+} -+ - static struct led_classdev a780_main_led = { - .name = "a780:main", - .default_trigger = "none", -@@ -52,11 +93,18 @@ - .brightness_set = a780led_aux_set, - }; - -+static struct led_classdev a780_vibrator = { -+ .name = "a780:vibrator", -+ .default_trigger = "none", -+ .brightness_set = a780vibrator_set, -+}; -+ - #ifdef CONFIG_PM - static int a780led_suspend(struct platform_device *dev, pm_message_t state) - { - led_classdev_suspend(&a780_main_led); - led_classdev_suspend(&a780_aux_led); -+ led_classdev_suspend(&a780_vibrator); - return 0; - } - -@@ -64,6 +112,7 @@ - { - led_classdev_resume(&a780_main_led); - led_classdev_resume(&a780_aux_led); -+ led_classdev_resume(&a780_vibrator); - return 0; - } - #endif -@@ -77,8 +126,16 @@ - return ret; - - ret = led_classdev_register(&pdev->dev, &a780_aux_led); -- if (ret < 0) -+ if (ret < 0) { -+ led_classdev_unregister(&a780_main_led); -+ return ret; -+ } -+ -+ ret = led_classdev_register(&pdev->dev, &a780_vibrator); -+ if (ret < 0) { - led_classdev_unregister(&a780_main_led); -+ led_classdev_unregister(&a780_aux_led); -+ } - - return ret; - } -@@ -87,6 +144,7 @@ - { - led_classdev_unregister(&a780_main_led); - led_classdev_unregister(&a780_aux_led); -+ led_classdev_unregister(&a780_vibrator); - return 0; - } - -@@ -111,6 +169,8 @@ - { - a780led_main_set( &a780_main_led, 0 ); - a780led_aux_set( &a780_aux_led, 0 ); -+ a780vibrator_set( &a780_vibrator, 0 ); -+ - platform_driver_unregister(&a780led_driver); - } - -Index: linux-2.6.21/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300 -+++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300 -@@ -105,11 +105,11 @@ - be configured via sysfs. If unsure, say Y. - - config LEDS_A780 -- tristate "LED Support for the Motorola A780 GSM Phone" -+ tristate "LED/Vibrator Support for the Motorola A780 GSM Phone" - depends LEDS_CLASS && PXA_EZX_A780 - help -- This option enables support for the LEDs on the -- Motorola A780 GSM Phone. -+ This option enables support for the LEDs and the -+ vibrator on the Motorola A780 GSM Phone. - - config LEDS_E680 - tristate "LED Support for the Motorola E680(i) GSM Phone" diff --git a/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch b/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch deleted file mode 100644 index 1fc8283ca2..0000000000 --- a/packages/linux/linux-ezx-2.6.21/asoc-pxa-ssp.patch +++ /dev/null @@ -1,755 +0,0 @@ -Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c 2007-05-14 21:14:38.000000000 -0300 -@@ -0,0 +1,671 @@ -+/* -+ * pxa2xx-ssp.c -- ALSA Soc Audio Layer -+ * -+ * Copyright 2005 Wolfson Microelectronics PLC. -+ * Author: Liam Girdwood -+ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com -+ * -+ * 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. -+ * -+ * Revision history -+ * 12th Aug 2005 Initial version. -+ * -+ * TODO: -+ * o The SSP driver _mostly_ works, however is in need of testing and -+ * someone with time to complete it. -+ * o Test network mode for > 16bit sample size -+ */ -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "pxa2xx-pcm.h" -+#include "pxa2xx-ssp.h" -+ -+#define PXA_SSP_DEBUG 1 -+ -+/* -+ * The following should be defined in pxa-regs.h -+ */ -+#define SSCR0_ACS (1 << 30) /* Audio Clock Select */ -+#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass (SSCR0[ACS] must be set) */ -+#define SSACD_ACPS(x) (x << 4) /* Audio clock PLL select */ -+#define SSACD_ACDS(x) (x << 0) /* Audio clock divider select */ -+ -+/* -+ * SSP audio private data -+ */ -+struct ssp_priv { -+ unsigned int sysclk; -+}; -+ -+static struct ssp_priv ssp_clk[3]; -+static struct ssp_dev ssp[3]; -+#ifdef CONFIG_PM -+static struct ssp_state ssp_state[3]; -+#endif -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_out = { -+ .name = "SSP1 PCM Mono out", -+ .dev_addr = __PREG(SSDR_P1), -+ .drcmr = &DRCMRTXSSDR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_in = { -+ .name = "SSP1 PCM Mono in", -+ .dev_addr = __PREG(SSDR_P1), -+ .drcmr = &DRCMRRXSSDR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_out = { -+ .name = "SSP1 PCM Stereo out", -+ .dev_addr = __PREG(SSDR_P1), -+ .drcmr = &DRCMRTXSSDR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_in = { -+ .name = "SSP1 PCM Stereo in", -+ .dev_addr = __PREG(SSDR_P1), -+ .drcmr = &DRCMRRXSSDR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_out = { -+ .name = "SSP2 PCM Mono out", -+ .dev_addr = __PREG(SSDR_P2), -+ .drcmr = &DRCMRTXSS2DR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_in = { -+ .name = "SSP2 PCM Mono in", -+ .dev_addr = __PREG(SSDR_P2), -+ .drcmr = &DRCMRRXSS2DR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_out = { -+ .name = "SSP2 PCM Stereo out", -+ .dev_addr = __PREG(SSDR_P2), -+ .drcmr = &DRCMRTXSS2DR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_in = { -+ .name = "SSP2 PCM Stereo in", -+ .dev_addr = __PREG(SSDR_P2), -+ .drcmr = &DRCMRRXSS2DR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_out = { -+ .name = "SSP3 PCM Mono out", -+ .dev_addr = __PREG(SSDR_P3), -+ .drcmr = &DRCMRTXSS3DR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_in = { -+ .name = "SSP3 PCM Mono in", -+ .dev_addr = __PREG(SSDR_P3), -+ .drcmr = &DRCMRRXSS3DR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH2, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_out = { -+ .name = "SSP3 PCM Stereo out", -+ .dev_addr = __PREG(SSDR_P3), -+ .drcmr = &DRCMRTXSS3DR, -+ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_in = { -+ .name = "SSP3 PCM Stereo in", -+ .dev_addr = __PREG(SSDR_P3), -+ .drcmr = &DRCMRRXSS3DR, -+ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | -+ DCMD_BURST16 | DCMD_WIDTH4, -+}; -+ -+static struct pxa2xx_pcm_dma_params *ssp_dma_params[3][4] = { -+ {&pxa2xx_ssp1_pcm_mono_out, &pxa2xx_ssp1_pcm_mono_in, -+ &pxa2xx_ssp1_pcm_stereo_out,&pxa2xx_ssp1_pcm_stereo_in,}, -+ {&pxa2xx_ssp2_pcm_mono_out, &pxa2xx_ssp2_pcm_mono_in, -+ &pxa2xx_ssp2_pcm_stereo_out, &pxa2xx_ssp2_pcm_stereo_in,}, -+ {&pxa2xx_ssp3_pcm_mono_out, &pxa2xx_ssp3_pcm_mono_in, -+ &pxa2xx_ssp3_pcm_stereo_out,&pxa2xx_ssp3_pcm_stereo_in,}, -+}; -+ -+static int pxa2xx_ssp_startup(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; -+ int ret = 0; -+ -+ if (!rtd->dai->cpu_dai->active) { -+ ret = ssp_init (&ssp[cpu_dai->id], cpu_dai->id + 1, -+ SSP_NO_IRQ); -+ if (ret < 0) -+ return ret; -+ ssp_disable(&ssp[cpu_dai->id]); -+ } -+ return ret; -+} -+ -+static void pxa2xx_ssp_shutdown(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; -+ -+ if (!cpu_dai->active) { -+ ssp_disable(&ssp[cpu_dai->id]); -+ ssp_exit(&ssp[cpu_dai->id]); -+ } -+} -+ -+#if defined (CONFIG_PXA27x) -+static int cken[3] = {CKEN23_SSP1, CKEN3_SSP2, CKEN4_SSP3}; -+#else -+static int cken[3] = {CKEN3_SSP, CKEN9_NSSP, CKEN10_ASSP}; -+#endif -+ -+#ifdef CONFIG_PM -+ -+static int pxa2xx_ssp_suspend(struct platform_device *pdev, -+ struct snd_soc_cpu_dai *dai) -+{ -+ if (!dai->active) -+ return 0; -+ -+ ssp_save_state(&ssp[dai->id], &ssp_state[dai->id]); -+ pxa_set_cken(cken[dai->id], 0); -+ return 0; -+} -+ -+static int pxa2xx_ssp_resume(struct platform_device *pdev, -+ struct snd_soc_cpu_dai *dai) -+{ -+ if (!dai->active) -+ return 0; -+ -+ pxa_set_cken(cken[dai->id], 1); -+ ssp_restore_state(&ssp[dai->id], &ssp_state[dai->id]); -+ ssp_enable(&ssp[dai->id]); -+ -+ return 0; -+} -+ -+#else -+#define pxa2xx_ssp_suspend NULL -+#define pxa2xx_ssp_resume NULL -+#endif -+ -+/* -+ * Set the SSP ports SYSCLK. -+ */ -+static int pxa2xx_ssp_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai, -+ int clk_id, unsigned int freq, int dir) -+{ -+ int port = cpu_dai->id + 1; -+ u32 sscr0 = SSCR0_P(port) & -+ ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); -+ -+ switch (clk_id) { -+ case PXA2XX_SSP_CLK_PLL: -+ /* Internal PLL is fixed on pxa25x and pxa27x */ -+#ifdef CONFIG_PXA27x -+ ssp_clk[cpu_dai->id].sysclk = 13000000; -+#else -+ ssp_clk[cpu_dai->id].sysclk = 1843200; -+#endif -+ break; -+ case PXA2XX_SSP_CLK_EXT: -+ ssp_clk[cpu_dai->id].sysclk = freq; -+ sscr0 |= SSCR0_ECS; -+ break; -+ case PXA2XX_SSP_CLK_NET: -+ ssp_clk[cpu_dai->id].sysclk = freq; -+ sscr0 |= SSCR0_NCS | SSCR0_MOD; -+ break; -+ case PXA2XX_SSP_CLK_AUDIO: -+ ssp_clk[cpu_dai->id].sysclk = 0; -+ SSCR0_P(port) |= SSCR0_SerClkDiv(1); -+ sscr0 |= SSCR0_ACS; -+ break; -+ default: -+ return -ENODEV; -+ } -+ -+ /* the SSP CKEN clock must be disabled when changing SSP clock mode */ -+ pxa_set_cken(cken[cpu_dai->id], 0); -+ SSCR0_P(port) |= sscr0; -+ pxa_set_cken(cken[cpu_dai->id], 1); -+ return 0; -+} -+ -+/* -+ * Set the SSP clock dividers. -+ */ -+static int pxa2xx_ssp_set_dai_clkdiv(struct snd_soc_cpu_dai *cpu_dai, -+ int div_id, int div) -+{ -+ int port = cpu_dai->id + 1; -+ -+ switch (div_id) { -+ case PXA2XX_SSP_AUDIO_DIV_ACDS: -+ SSACD_P(port) &= ~ 0x7; -+ SSACD_P(port) |= SSACD_ACDS(div); -+ break; -+ case PXA2XX_SSP_AUDIO_DIV_SCDB: -+ SSACD_P(port) &= ~0x8; -+ if (div == PXA2XX_SSP_CLK_SCDB_1) -+ SSACD_P(port) |= SSACD_SCDB; -+ break; -+ case PXA2XX_SSP_DIV_SCR: -+ SSCR0_P(port) &= ~SSCR0_SCR; -+ SSCR0_P(port) |= SSCR0_SerClkDiv(div); -+ break; -+ default: -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+/* -+ * Configure the PLL frequency pxa27x and (afaik - pxa320 only) -+ */ -+static int pxa2xx_ssp_set_dai_pll(struct snd_soc_cpu_dai *cpu_dai, -+ int pll_id, unsigned int freq_in, unsigned int freq_out) -+{ -+ int port = cpu_dai->id + 1; -+ -+ SSACD_P(port) &= ~0x70; -+ switch (freq_out) { -+ case 5622000: -+ break; -+ case 11345000: -+ SSACD_P(port) |= (0x1 << 4); -+ break; -+ case 12235000: -+ SSACD_P(port) |= (0x2 << 4); -+ break; -+ case 14857000: -+ SSACD_P(port) |= (0x3 << 4); -+ break; -+ case 32842000: -+ SSACD_P(port) |= (0x4 << 4); -+ break; -+ case 48000000: -+ SSACD_P(port) |= (0x5 << 4); -+ break; -+ } -+ return 0; -+} -+ -+/* -+ * Set the active slots in TDM/Network mode -+ */ -+static int pxa2xx_ssp_set_dai_tdm_slot(struct snd_soc_cpu_dai *cpu_dai, -+ unsigned int mask, int slots) -+{ -+ int port = cpu_dai->id + 1; -+ -+ SSCR0_P(port) &= ~SSCR0_SlotsPerFrm(7); -+ -+ /* set number of active slots */ -+ SSCR0_P(port) |= SSCR0_SlotsPerFrm(slots); -+ -+ /* set active slot mask */ -+ SSTSA_P(port) = mask; -+ SSRSA_P(port) = mask; -+ return 0; -+} -+ -+/* -+ * Tristate the SSP DAI lines -+ */ -+static int pxa2xx_ssp_set_dai_tristate(struct snd_soc_cpu_dai *cpu_dai, -+ int tristate) -+{ -+ int port = cpu_dai->id + 1; -+ -+ if (tristate) -+ SSCR1_P(port) &= ~SSCR1_TTE; -+ else -+ SSCR1_P(port) |= SSCR1_TTE; -+ -+ return 0; -+} -+ -+/* -+ * Set up the SSP DAI format. -+ * The SSP Port must be inactive before calling this function as the -+ * physical interface format is changed. -+ */ -+static int pxa2xx_ssp_set_dai_fmt(struct snd_soc_cpu_dai *cpu_dai, -+ unsigned int fmt) -+{ -+ int port = cpu_dai->id + 1; -+ -+ /* reset port settings */ -+ SSCR0_P(port) = 0; -+ SSCR1_P(port) = 0; -+ SSPSP_P(port) = 0; -+ -+ /* NOTE: I2S emulation is still very much work in progress here */ -+ -+ /* FIXME: this is what wince uses for msb */ -+ if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB) { -+ SSCR0_P(port) = SSCR0_EDSS | SSCR0_TISSP | SSCR0_DataSize(16); -+ -+// SSCR1_P(port) = SSCR1_RxTresh(8) | SSCR1_TxTresh(8); /* doesn't seem to be needed */ -+ return 0; -+ } -+ -+ /* check for I2S emulation mode - handle it separately */ -+ if (((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) || -+ ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB)) { -+ /* 8.4.11 */ -+ -+ /* Only SSCR0[NCS] or SSCR0[ECS] bit fields settings are optional */ -+ SSCR0_P(port) = SSCR0_EDSS | SSCR0_PSP | SSCR0_DataSize(16); -+ -+ /* SSCR1 = 0x203C3C03 */ -+ /* SSCR1[SCLKDIR] and SSCR1[SFRMDIR] must be cleared (master only ???), -+ * all other bit fields settings are optional. */ -+ //SSCR1_P(port) &= ~(SSCR1_SCLKDIR | SSCR1_SFRMDIR); -+ -+ /* set FIFO thresholds */ -+ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1); -+ -+ /* normal: */ -+ /* all bit fields must be cleared except: FSRT = 1 and -+ * SFRMWDTH = 16, DMYSTART=0,1) */ -+ SSPSP_P(port) = SSPSP_FSRT | SSPSP_SFRMWDTH(16) | SSPSP_DMYSTRT(0); -+ return 0; -+ } -+ -+ SSCR0_P(port) |= SSCR0_PSP; -+ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1) | -+ SSCR1_TRAIL | SSCR1_RWOT; -+ -+ switch(fmt & SND_SOC_DAIFMT_MASTER_MASK) { -+ case SND_SOC_DAIFMT_CBM_CFM: -+ SSCR1_P(port) |= (SSCR1_SCLKDIR | SSCR1_SFRMDIR); -+ break; -+ case SND_SOC_DAIFMT_CBM_CFS: -+ SSCR1_P(port) |= SSCR1_SCLKDIR; -+ break; -+ case SND_SOC_DAIFMT_CBS_CFM: -+ SSCR1_P(port) |= SSCR1_SFRMDIR; -+ break; -+ case SND_SOC_DAIFMT_CBS_CFS: -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { -+ case SND_SOC_DAIFMT_NB_NF: -+ SSPSP_P(port) |= SSPSP_SFRMP | SSPSP_FSRT; -+ break; -+ case SND_SOC_DAIFMT_IB_IF: -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { -+ case SND_SOC_DAIFMT_DSP_A: -+ SSPSP_P(port) |= SSPSP_DMYSTRT(1); -+ case SND_SOC_DAIFMT_DSP_B: -+ SSPSP_P(port) |= SSPSP_SCMODE(2); -+ break; -+ case SND_SOC_DAIFMT_I2S: -+ case SND_SOC_DAIFMT_MSB: -+ /* handled above */ -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ return 0; -+} -+ -+/* -+ * Set the SSP audio DMA parameters and sample size. -+ * Can be called multiple times by oss emulation. -+ */ -+static int pxa2xx_ssp_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; -+ int dma = 0, chn = params_channels(params); -+ int port = cpu_dai->id + 1; -+ -+ /* select correct DMA params */ -+ if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) -+ dma = 1; /* capture DMA offset is 1,3 */ -+ if (chn == 2) -+ dma += 2; /* stereo DMA offset is 2, mono is 0 */ -+ cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma]; -+ -+ /* we can only change the settings if the port is not in use */ -+ if (SSCR0_P(port) & SSCR0_SSE) -+ return 0; -+ -+ /* clear selected SSP bits */ -+ SSCR0_P(port) &= ~(SSCR0_DSS | SSCR0_EDSS); -+ -+ /* bit size */ -+ switch(params_format(params)) { -+ case SNDRV_PCM_FORMAT_S16_LE: -+ SSCR0_P(port) |= SSCR0_DataSize(16); -+ break; -+ case SNDRV_PCM_FORMAT_S24_LE: -+ SSCR0_P(port) |=(SSCR0_EDSS | SSCR0_DataSize(8)); -+ /* we must be in network mode (2 slots) for 24 bit stereo */ -+ break; -+ case SNDRV_PCM_FORMAT_S32_LE: -+ SSCR0_P(port) |= (SSCR0_EDSS | SSCR0_DataSize(16)); -+ /* we must be in network mode (2 slots) for 32 bit stereo */ -+ break; -+ } -+ -+#if PXA_SSP_DEBUG -+ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x SSACD %x\n", -+ SSCR0_P(port), SSCR1_P(port), -+ SSTO_P(port), SSPSP_P(port), -+ SSSR_P(port), SSACD_P(port)); -+#endif -+ return 0; -+} -+ -+static int pxa2xx_ssp_trigger(struct snd_pcm_substream *substream, int cmd) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; -+ int ret = 0; -+ int port = cpu_dai->id + 1; -+ -+ switch (cmd) { -+ case SNDRV_PCM_TRIGGER_RESUME: -+ ssp_enable(&ssp[cpu_dai->id]); -+ break; -+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ SSCR1_P(port) |= SSCR1_TSRE; -+ else -+ SSCR1_P(port) |= SSCR1_RSRE; -+ SSSR_P(port) |= SSSR_P(port); -+ break; -+ case SNDRV_PCM_TRIGGER_START: -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ SSCR1_P(port) |= SSCR1_TSRE; -+ else -+ SSCR1_P(port) |= SSCR1_RSRE; -+ ssp_enable(&ssp[cpu_dai->id]); -+ break; -+ case SNDRV_PCM_TRIGGER_STOP: -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ SSCR1_P(port) &= ~SSCR1_TSRE; -+ else -+ SSCR1_P(port) &= ~SSCR1_RSRE; -+ break; -+ case SNDRV_PCM_TRIGGER_SUSPEND: -+ ssp_disable(&ssp[cpu_dai->id]); -+ break; -+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ SSCR1_P(port) &= ~SSCR1_TSRE; -+ else -+ SSCR1_P(port) &= ~SSCR1_RSRE; -+ break; -+ -+ default: -+ ret = -EINVAL; -+ } -+#if PXA_SSP_DEBUG -+ printk("trig cmd %d\n", cmd); -+ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x\n", -+ SSCR0_P(port), SSCR1_P(port), -+ SSTO_P(port), SSPSP_P(port), -+ SSSR_P(port)); -+#endif -+ return ret; -+} -+ -+#define PXA2XX_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ -+ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ -+ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) -+ -+#define PXA2XX_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ -+ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -+ -+struct snd_soc_cpu_dai pxa_ssp_dai[] = { -+ { .name = "pxa2xx-ssp1", -+ .id = 0, -+ .type = SND_SOC_DAI_PCM, -+ .suspend = pxa2xx_ssp_suspend, -+ .resume = pxa2xx_ssp_resume, -+ .playback = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .capture = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .ops = { -+ .startup = pxa2xx_ssp_startup, -+ .shutdown = pxa2xx_ssp_shutdown, -+ .trigger = pxa2xx_ssp_trigger, -+ .hw_params = pxa2xx_ssp_hw_params,}, -+ .dai_ops = { -+ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, -+ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, -+ .set_pll = pxa2xx_ssp_set_dai_pll, -+ .set_fmt = pxa2xx_ssp_set_dai_fmt, -+ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, -+ .set_tristate = pxa2xx_ssp_set_dai_tristate, -+ }, -+ }, -+ { .name = "pxa2xx-ssp2", -+ .id = 1, -+ .type = SND_SOC_DAI_PCM, -+ .suspend = pxa2xx_ssp_suspend, -+ .resume = pxa2xx_ssp_resume, -+ .playback = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .capture = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .ops = { -+ .startup = pxa2xx_ssp_startup, -+ .shutdown = pxa2xx_ssp_shutdown, -+ .trigger = pxa2xx_ssp_trigger, -+ .hw_params = pxa2xx_ssp_hw_params,}, -+ .dai_ops = { -+ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, -+ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, -+ .set_pll = pxa2xx_ssp_set_dai_pll, -+ .set_fmt = pxa2xx_ssp_set_dai_fmt, -+ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, -+ .set_tristate = pxa2xx_ssp_set_dai_tristate, -+ }, -+ }, -+ { .name = "pxa2xx-ssp3", -+ .id = 2, -+ .type = SND_SOC_DAI_PCM, -+ .suspend = pxa2xx_ssp_suspend, -+ .resume = pxa2xx_ssp_resume, -+ .playback = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .capture = { -+ .channels_min = 1, -+ .channels_max = 2, -+ .rates = PXA2XX_SSP_RATES, -+ .formats = PXA2XX_SSP_FORMATS,}, -+ .ops = { -+ .startup = pxa2xx_ssp_startup, -+ .shutdown = pxa2xx_ssp_shutdown, -+ .trigger = pxa2xx_ssp_trigger, -+ .hw_params = pxa2xx_ssp_hw_params,}, -+ .dai_ops = { -+ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, -+ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, -+ .set_pll = pxa2xx_ssp_set_dai_pll, -+ .set_fmt = pxa2xx_ssp_set_dai_fmt, -+ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, -+ .set_tristate = pxa2xx_ssp_set_dai_tristate, -+ }, -+ }, -+}; -+EXPORT_SYMBOL_GPL(pxa_ssp_dai); -+ -+/* Module information */ -+MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com"); -+MODULE_DESCRIPTION("pxa2xx SSP/PCM SoC Interface"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h 2007-05-14 21:14:38.000000000 -0300 -@@ -0,0 +1,42 @@ -+/* -+ * linux/sound/arm/pxa2xx-ssp.h -+ * -+ * 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. -+ */ -+ -+#ifndef _PXA2XX_SSP_H -+#define _PXA2XX_SSP_H -+ -+/* pxa2xx DAI SSP ID's */ -+#define PXA2XX_DAI_SSP1 0 -+#define PXA2XX_DAI_SSP2 1 -+#define PXA2XX_DAI_SSP3 2 -+ -+/* SSP clock sources */ -+#define PXA2XX_SSP_CLK_PLL 0 -+#define PXA2XX_SSP_CLK_EXT 1 -+#define PXA2XX_SSP_CLK_NET 2 -+#define PXA2XX_SSP_CLK_AUDIO 3 -+ -+/* SSP audio dividers */ -+#define PXA2XX_SSP_AUDIO_DIV_ACDS 0 -+#define PXA2XX_SSP_AUDIO_DIV_SCDB 1 -+#define PXA2XX_SSP_DIV_SCR 2 -+ -+/* SSP ACDS audio dividers values */ -+#define PXA2XX_SSP_CLK_AUDIO_DIV_1 0 -+#define PXA2XX_SSP_CLK_AUDIO_DIV_2 1 -+#define PXA2XX_SSP_CLK_AUDIO_DIV_4 2 -+#define PXA2XX_SSP_CLK_AUDIO_DIV_8 3 -+#define PXA2XX_SSP_CLK_AUDIO_DIV_16 4 -+#define PXA2XX_SSP_CLK_AUDIO_DIV_32 5 -+ -+/* SSP divider bypass */ -+#define PXA2XX_SSP_CLK_SCDB_4 0 -+#define PXA2XX_SSP_CLK_SCDB_1 1 -+ -+extern struct snd_soc_cpu_dai pxa_ssp_dai[3]; -+ -+#endif -Index: linux-2.6.21/sound/soc/pxa/Kconfig -=================================================================== ---- linux-2.6.21.orig/sound/soc/pxa/Kconfig 2007-05-14 21:16:22.000000000 -0300 -+++ linux-2.6.21/sound/soc/pxa/Kconfig 2007-05-14 21:17:01.000000000 -0300 -@@ -20,6 +20,10 @@ - config SND_PXA2XX_SOC_I2S - tristate - -+config SND_PXA2XX_SOC_SSP -+ tristate -+ select PXA_SSP -+ - config SND_PXA2XX_SOC_CORGI - tristate "SoC Audio support for Sharp Zaurus SL-C7x0" - depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx -Index: linux-2.6.21/sound/soc/pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/sound/soc/pxa/Makefile 2007-05-14 21:14:52.000000000 -0300 -+++ linux-2.6.21/sound/soc/pxa/Makefile 2007-05-14 21:16:10.000000000 -0300 -@@ -2,10 +2,12 @@ - snd-soc-pxa2xx-objs := pxa2xx-pcm.o - snd-soc-pxa2xx-ac97-objs := pxa2xx-ac97.o - snd-soc-pxa2xx-i2s-objs := pxa2xx-i2s.o -+snd-soc-pxa2xx-ssp-objs := pxa2xx-ssp.o - - obj-$(CONFIG_SND_PXA2XX_SOC) += snd-soc-pxa2xx.o - obj-$(CONFIG_SND_PXA2XX_SOC_AC97) += snd-soc-pxa2xx-ac97.o - obj-$(CONFIG_SND_PXA2XX_SOC_I2S) += snd-soc-pxa2xx-i2s.o -+obj-$(CONFIG_SND_PXA2XX_SOC_SSP) += snd-soc-pxa2xx-ssp.o - - # PXA Machine Support - snd-soc-corgi-objs := corgi.o diff --git a/packages/linux/linux-ezx-2.6.21/defconfig-a780 b/packages/linux/linux-ezx-2.6.21/defconfig-a780 deleted file mode 100644 index 85701ae3d1..0000000000 --- a/packages/linux/linux-ezx-2.6.21/defconfig-a780 +++ /dev/null @@ -1,1243 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.21 -# Tue May 8 15:14:00 2007 -# -CONFIG_ARM=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_GENERIC_GPIO=y -CONFIG_GENERIC_TIME=y -CONFIG_MMU=y -# CONFIG_NO_IOPORT is not set -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-ezxdev" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -CONFIG_EMBEDDED=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_SHMEM is not set -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_NS9XXX is not set -# CONFIG_ARCH_PNX4008 is not set -CONFIG_ARCH_PXA=y -# 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 - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_MACH_TRIZEPS4 is not set -CONFIG_PXA_EZX=y -# CONFIG_PXA_EZX_E680 is not set -CONFIG_PXA_EZX_A780=y -# CONFIG_PXA_EZX_E2 is not set -CONFIG_EZX_BP=y -CONFIG_EZX_PCAP=y -CONFIG_EZX_EMU=y -CONFIG_EZX_EMU_USB=y -# CONFIG_EZX_EMU_UART is not set -# CONFIG_EZX_EMU_NOTHING is not set -CONFIG_PXA27x=y -CONFIG_PXA_SSP=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_OUTER_CACHE is not set -CONFIG_IWMMXT=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=100 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_LEGACY is not set -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM_EMULATION=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP 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_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -# CONFIG_BT_HCIUART_BCSP is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -# CONFIG_MTD_BLKDEVS is not set -# CONFIG_MTD_BLOCK is not set -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=m -# 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=m -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# 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_SHARP_SL is not set -CONFIG_MTD_EZX=m -# CONFIG_MTD_EZX_A780 is not set -CONFIG_MTD_EZX_A780_ALTERNATE=y -# CONFIG_MTD_EZX_E2 is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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 - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNPACPI is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_NETLINK is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_TSDEV=y -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_UCB1400 is not set -CONFIG_TOUCHSCREEN_PCAP=y -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=8 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -CONFIG_HW_RANDOM=y -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -CONFIG_TS0710_MUX=y -CONFIG_TS0710_MUX_USB=y - -# -# 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_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_BITBANG is not set -CONFIG_SPI_PXA2XX=m - -# -# SPI Protocol Masters -# -# CONFIG_SPI_AT25 is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multifunction device drivers -# -# CONFIG_MFD_SM501 is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_A780=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_EZX=y -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -# CONFIG_FB_MBX is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# HID Devices -# -CONFIG_HID=m -# CONFIG_HID_DEBUG is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set -# CONFIG_USB_GTCO is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET_MII is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_MON is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_BERRY_CHARGE is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y -# CONFIG_USB_PXA2XX_SMALL is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -# CONFIG_RTC_INTF_SYSFS is not set -# CONFIG_RTC_INTF_PROC is not set -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_SA1100=y -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -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_PROC_SYSCTL=y -CONFIG_SYSFS=y -# CONFIG_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# 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_JFFS2_FS 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_V3_ACL=y -# CONFIG_NFS_V4 is not set -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -# CONFIG_CIFS_STATS2 is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_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=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE 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 is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/defconfig-e680 b/packages/linux/linux-ezx-2.6.21/defconfig-e680 deleted file mode 100644 index 59b639f910..0000000000 --- a/packages/linux/linux-ezx-2.6.21/defconfig-e680 +++ /dev/null @@ -1,1240 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.21 -# Tue May 8 14:31:50 2007 -# -CONFIG_ARM=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_GENERIC_GPIO=y -CONFIG_GENERIC_TIME=y -CONFIG_MMU=y -# CONFIG_NO_IOPORT is not set -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-ezxdev" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -CONFIG_EMBEDDED=y -CONFIG_UID16=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_SHMEM is not set -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_NS9XXX is not set -# CONFIG_ARCH_PNX4008 is not set -CONFIG_ARCH_PXA=y -# 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 - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_MACH_TRIZEPS4 is not set -CONFIG_PXA_EZX=y -CONFIG_PXA_EZX_E680=y -# CONFIG_PXA_EZX_A780 is not set -# CONFIG_PXA_EZX_E2 is not set -CONFIG_EZX_BP=y -CONFIG_EZX_PCAP=y -CONFIG_EZX_EMU=y -CONFIG_EZX_EMU_USB=y -# CONFIG_EZX_EMU_UART is not set -# CONFIG_EZX_EMU_NOTHING is not set -CONFIG_PXA27x=y -CONFIG_PXA_SSP=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_OUTER_CACHE is not set -CONFIG_IWMMXT=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=100 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_LEGACY is not set -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM_EMULATION=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP 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_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -# CONFIG_BT_HCIUART_BCSP is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -# CONFIG_MTD_BLKDEVS is not set -# CONFIG_MTD_BLOCK is not set -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=m -# 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=m -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# 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_SHARP_SL is not set -CONFIG_MTD_EZX=m -# CONFIG_MTD_EZX_A780 is not set -CONFIG_MTD_EZX_A780_ALTERNATE=y -# CONFIG_MTD_EZX_E2 is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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 - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNPACPI is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_NETLINK is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_TSDEV=y -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_PXA=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_UCB1400 is not set -CONFIG_TOUCHSCREEN_PCAP=y -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=8 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -CONFIG_HW_RANDOM=y -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TS0710_MUX 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_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_BITBANG is not set -CONFIG_SPI_PXA2XX=m - -# -# SPI Protocol Masters -# -# CONFIG_SPI_AT25 is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multifunction device drivers -# -# CONFIG_MFD_SM501 is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -# CONFIG_LEDS_TRIGGERS is not set -CONFIG_LEDS_E680=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_EZX=y -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -# CONFIG_FB_MBX is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# HID Devices -# -CONFIG_HID=m -# CONFIG_HID_DEBUG is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set -# CONFIG_USB_GTCO is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET_MII is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_MON is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_BERRY_CHARGE is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y -# CONFIG_USB_PXA2XX_SMALL is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -# CONFIG_RTC_INTF_SYSFS is not set -# CONFIG_RTC_INTF_PROC is not set -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_SA1100=y -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -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_PROC_SYSCTL=y -CONFIG_SYSFS=y -# CONFIG_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# 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_JFFS2_FS 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_V3_ACL=y -# CONFIG_NFS_V4 is not set -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -# CONFIG_CIFS_STATS2 is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_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=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE 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 is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/e680-kbd.patch b/packages/linux/linux-ezx-2.6.21/e680-kbd.patch deleted file mode 100644 index 054c567d6b..0000000000 --- a/packages/linux/linux-ezx-2.6.21/e680-kbd.patch +++ /dev/null @@ -1,93 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 13:03:53.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:21:56.000000000 -0300 -@@ -15,18 +15,21 @@ - #include - #include - #include -+#include - - #include - #include - #include - #include - #include -+#include - - #include "generic.h" - #include "ezx.h" - - extern void ezx_lcd_power(int, struct fb_var_screeninfo *); - extern void ezx_backlight_power(int); -+extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *); - - #ifdef CONFIG_EZX_PCAP - extern int ezx_pcap_mmcsd_power(int); -@@ -144,6 +147,58 @@ - .pxafb_lcd_power = &ezx_lcd_power, - }; - -+static unsigned char e680_keycode[] = { -+ /* row 0 */ -+ KEY_UP, KEY_RIGHT, KEY_RESERVED, KEY_PHONE, -+ /* row 1 */ -+ KEY_DOWN, KEY_LEFT, KEY_VOLUMEUP, KEY_VOLUMEDOWN, -+ /* row 2 */ -+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_KPENTER, -+}; -+ -+static unsigned char e680_direct_keycode[] = { -+ KEY_CAMERA, -+ KEY_RESERVED, -+ KEY_RESERVED, -+ KEY_HOME, -+ KEY_POWER, -+ KEY_MENU, -+}; -+ -+static int e680_kbd_init(void) -+{ -+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, VR Key */ -+ pxa_gpio_mode(96 | GPIO_ALT_FN_1_IN); /* KP_DKIN<3>, GAME_A */ -+ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_DKIN<4>, power key */ -+ pxa_gpio_mode(98 | GPIO_ALT_FN_1_IN); /* KP_DKIN<5>, GAME_B */ -+ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ -+ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ -+ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ -+ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ -+ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ -+ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ -+ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ -+ pxa_gpio_mode(GPIO_TC_MM_EN); -+ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN); -+ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN); -+ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN); -+ return 0; -+} -+ -+static struct pxakbd_platform_data e680_kbd_platform_data = { -+ .init = &e680_kbd_init, -+ .scan_interval = HZ/40, -+ .matrix = { -+ .keycode = e680_keycode, -+ .cols = 4, -+ .rows = 3, -+ }, -+ .direct = { -+ .keycode = e680_direct_keycode, -+ .num = 6, -+ }, -+}; -+ - static struct platform_device *devices[] __initdata = { - }; - -@@ -162,6 +217,7 @@ - - set_pxa_fb_info(&e680_fb_info); - pxa_set_mci_info(&e680_mci_platform_data); -+ pxa_set_kbd_info(&e680_kbd_platform_data); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - } diff --git a/packages/linux/linux-ezx-2.6.21/e680-leds.patch b/packages/linux/linux-ezx-2.6.21/e680-leds.patch deleted file mode 100644 index 37d47f89dc..0000000000 --- a/packages/linux/linux-ezx-2.6.21/e680-leds.patch +++ /dev/null @@ -1,368 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: linux-2.6.21/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 14:31:16.000000000 -0300 -+++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 14:31:17.000000000 -0300 -@@ -111,6 +111,13 @@ - This option enables support for the LEDs on the - Motorola A780 GSM Phone. - -+config LEDS_E680 -+ tristate "LED Support for the Motorola E680(i) GSM Phone" -+ depends LEDS_CLASS && PXA_EZX_E680 -+ help -+ This options enables support for the LEDs on the -+ Motorola E680(i) GSM Phone. -+ - config LEDS_TRIGGER_TIMER - tristate "LED Timer Trigger" - depends on LEDS_TRIGGERS -Index: linux-2.6.21/drivers/leds/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/leds/Makefile 2007-05-08 14:31:16.000000000 -0300 -+++ linux-2.6.21/drivers/leds/Makefile 2007-05-08 14:31:17.000000000 -0300 -@@ -17,6 +17,7 @@ - obj-$(CONFIG_LEDS_H1940) += leds-h1940.o - obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o - obj-$(CONFIG_LEDS_A780) += leds-a780.o -+obj-$(CONFIG_LEDS_E680) += leds-e680.o - - # LED Triggers - obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o -Index: linux-2.6.21/drivers/leds/leds-e680.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/leds/leds-e680.c 2007-05-08 14:44:39.000000000 -0300 -@@ -0,0 +1,309 @@ -+/* -+ * EZX Platform LED Driver for the Motorola E680(i) GSM Phone -+ * -+ * Copyright 2006 Vanille-Media -+ * -+ * Author: Michael Lauer -+ * -+ * Based on the Motorola 2.4 leds-e680.c and leds-corgi.c by Richard Purdie -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+//FIXME move defines to a common header file -+#define IND_CNTL_R_BUL 46 -+#define IND_CNTL_G_BUL 47 -+#define SSP_PCAP_LED_MASK 0x000fffe0 -+#define SSP_PCAP_LED_SHIFT 5 -+#define GPIO_TC_MM_EN 99 -+ -+extern int ezx_pcap_read(u_int8_t, u_int32_t *); -+extern int ezx_pcap_write(u_int8_t, u_int32_t); -+ -+static enum led_brightness old_red; -+static enum led_brightness old_green; -+static enum led_brightness old_blue; -+ -+typedef struct { -+ unsigned char ind_GPIO_red; /*Indicator Red control GPIO 46: 0 active, 1 disactive*/ -+ unsigned char ind_GPIO_green; /*Indicator Green control GPIO 47: 0 active, 1 disactive*/ -+ unsigned char pcap_LEDR_en; /*pcap LEDR_EN bit value: 1 =Red LED(&Green) sink circuit enabled*/ -+ unsigned char pcap_LEDG_en; /*pcap LEDG_EN bit value:1 =Green(->Blue)LED sink circuit enabled*/ -+ unsigned char pcap_LEDR_CTRL; /* 4bits Sets the timing for the red(&Green) LED sink circuit*/ -+ unsigned char pcap_LEDG_CTRL; /* 4bits Sets the timing for the GREEN (->Blue) LED sink circuit*/ -+ unsigned char pcap_LEDR_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDR*/ -+ unsigned char pcap_LEDG_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDG*/ -+ unsigned char pcap_SKIP_on; /*1=The ON timing sequence defined by LEDx_CTRL is executed on every other cycle*/ -+} PCAP2_LED_REGISTER_VALUE; -+ -+const PCAP2_LED_REGISTER_VALUE led_register_value[]= -+{ -+ /* on/off pulsepower timing intensity */ -+ {0x1,0x1, 0x0,0x0, 0x0,0x0, 0x0,0x0,0x0}, /* OFF */ -+ {0x0,0x1, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* RED */ -+ {0x1,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* GREEN */ -+ {0x0,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* ORANGE = RED + GREEN */ -+ {0x1,0x1, 0x0,0x1, 0x0,0xc, 0x0,0x0,0x0}, /* BLUE */ -+ {0x0,0x1, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_RED = RED + BLUE */ -+ {0x1,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_GREEN = GREEN + BLUE */ -+ {0x0,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* WHITE = RED + GREEN + BLUE */ -+}; -+ -+static void e680led_led_set( enum led_brightness red, enum led_brightness green, enum led_brightness blue ) -+{ -+ unsigned int tempValue = 0; -+ unsigned int value = 0; -+ unsigned int stateIndex = 0; -+ unsigned char gpio_red, gpio_green, ledr_en, ledg_en, ledr_ctrl, ledg_ctrl, ledr_i, ledg_i,skip; -+ -+ printk( KERN_DEBUG "e680led_led_set: red=%d, green=%d, blue=%d", red, green, blue ); -+ stateIndex = ( ( blue << 2 ) | ( green << 1 ) | ( red ) ) & 0x7; -+ printk( KERN_DEBUG "LED stateIndex is %d", stateIndex ); -+ gpio_red = led_register_value[stateIndex].ind_GPIO_red & 0x1; -+ gpio_green = led_register_value[stateIndex].ind_GPIO_green & 0x1; -+ ledr_en = led_register_value[stateIndex].pcap_LEDR_en & 0x1; -+ ledg_en = led_register_value[stateIndex].pcap_LEDG_en & 0x1; -+ ledr_ctrl = led_register_value[stateIndex].pcap_LEDR_CTRL & 0xf; -+ ledg_ctrl = led_register_value[stateIndex].pcap_LEDG_CTRL & 0xf; -+ ledr_i = led_register_value[stateIndex].pcap_LEDR_I & 0x3; -+ ledg_i = led_register_value[stateIndex].pcap_LEDG_I & 0x3; -+ skip = led_register_value[stateIndex].pcap_SKIP_on & 0x1; -+ -+ /* disable LEDs */ -+ if( ezx_pcap_read(SSP_PCAP_ADJ_PERIPH_REGISTER,&tempValue) != SSP_PCAP_SUCCESS ) -+ { -+ printk( KERN_WARNING "LED PCAP Read Failed\n" ); -+ return; -+ } -+ tempValue &= (~SSP_PCAP_LED_MASK); -+ if( ezx_pcap_write(SSP_PCAP_ADJ_PERIPH_REGISTER,tempValue) != SSP_PCAP_SUCCESS ) -+ { -+ printk( KERN_WARNING "LED PCAP Write Failed (Clear Data)\n" ); -+ return; -+ } -+ -+ /* configure GPIOs as output */ -+ pxa_gpio_mode(IND_CNTL_R_BUL | GPIO_OUT); -+ pxa_gpio_mode(IND_CNTL_G_BUL | GPIO_OUT); -+ -+ //FIXME: Simplify this logic -+ if ( (gpio_green && gpio_red) ) -+ { -+ /*Disable Red & Green signal*/ -+ pxa_gpio_set_value(IND_CNTL_R_BUL, 1); /*IND_CNTL_R_BUL Low active*/ -+ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL); -+ -+ pxa_gpio_set_value(IND_CNTL_G_BUL, 0); /*IND_CNTL_G_BUL High active*/ -+ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL)); -+ -+ printk( KERN_DEBUG "LED GPIO Green & Red Disable\n"); -+ } else if ( gpio_green && !gpio_red ) -+ { -+ /*Green Disable, Red Enable*/ -+ pxa_gpio_set_value(IND_CNTL_R_BUL, 0); -+ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL)); -+ -+ pxa_gpio_set_value(IND_CNTL_G_BUL, 0); -+ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL)); -+ -+ printk( KERN_DEBUG "LED GPIO Green Disable, Red Enable\n"); -+ } else if (gpio_red && !gpio_green ) -+ { -+ /*Red Disable, Green Enable*/ -+ pxa_gpio_set_value(IND_CNTL_R_BUL, 1); -+ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL); -+ -+ pxa_gpio_set_value(IND_CNTL_G_BUL, 1); -+ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL); -+ printk( KERN_DEBUG "LED GPIO Red Disable, Green Enable"); -+ }else -+ { -+ /*Red & Green enable*/ -+ pxa_gpio_set_value(IND_CNTL_R_BUL, 0); -+ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL)); -+ -+ pxa_gpio_set_value(IND_CNTL_G_BUL, 1); -+ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL); -+ printk( KERN_DEBUG "LED GPIO Red & Green Enable\n"); -+ } -+ -+ /* Write PCAP LED Peripheral Control Register*/ -+ value = ( ledr_en | (ledg_en <<1) | (ledr_ctrl <<2) | (ledg_ctrl <<6) | -+ (ledr_i << 10) | (ledg_i <<12) | (skip <<14) ) & 0x7fff; -+ tempValue |= (value <dev, &e680_red_led); -+ if (ret < 0) -+ return ret; -+ -+ ret = led_classdev_register(&pdev->dev, &e680_green_led); -+ if (ret < 0) -+ led_classdev_unregister(&e680_red_led); -+ -+ ret = led_classdev_register(&pdev->dev, &e680_blue_led); -+ if (ret < 0) { -+ led_classdev_unregister(&e680_red_led); -+ led_classdev_unregister(&e680_green_led); -+ } -+ -+ ret = led_classdev_register(&pdev->dev, &e680_keypad_led); -+ if (ret < 0) { -+ led_classdev_unregister(&e680_red_led); -+ led_classdev_unregister(&e680_green_led); -+ led_classdev_unregister(&e680_blue_led); -+ } -+ return ret; -+} -+ -+static int e680led_remove(struct platform_device *pdev) -+{ -+ led_classdev_unregister(&e680_red_led); -+ led_classdev_unregister(&e680_green_led); -+ led_classdev_unregister(&e680_blue_led); -+ led_classdev_unregister(&e680_keypad_led); -+ return 0; -+} -+ -+static struct platform_driver e680led_driver = { -+ .probe = e680led_probe, -+ .remove = e680led_remove, -+#ifdef CONFIG_PM -+ .suspend = e680led_suspend, -+ .resume = e680led_resume, -+#endif -+ .driver = { -+ .name = "e680-led", -+ }, -+}; -+ -+static int __init e680led_init(void) -+{ -+ return platform_driver_register(&e680led_driver); -+} -+ -+static void __exit e680led_exit(void) -+{ -+ e680led_led_set( 0, 0, 0 ); -+ platform_driver_unregister(&e680led_driver); -+} -+ -+module_init(e680led_init); -+module_exit(e680led_exit); -+ -+MODULE_AUTHOR("Michael Lauer "); -+MODULE_DESCRIPTION("Motorola E680 LED driver"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:29.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:31:17.000000000 -0300 -@@ -221,8 +221,14 @@ - }, - }; - -+static struct platform_device e680led_device = { -+ .name = "e680-led", -+ .id = -1, -+}; -+ - static struct platform_device *devices[] __initdata = { - &e680locksw_device, -+ &e680led_device, - }; - - static void __init e680_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/e680-locksw.patch b/packages/linux/linux-ezx-2.6.21/e680-locksw.patch deleted file mode 100644 index 91fab24d44..0000000000 --- a/packages/linux/linux-ezx-2.6.21/e680-locksw.patch +++ /dev/null @@ -1,42 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:12.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 14:23:29.000000000 -0300 -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -199,7 +200,29 @@ - }, - }; - -+static struct gpio_keys_button e680locksw_buttons[] = { -+ [0] = { -+ .keycode = KEY_SLEEP, -+ .gpio = GPIO_LOCK_SCREEN_PIN, -+ .desc = "E680 lockscreen sw", -+ }, -+}; -+ -+static struct gpio_keys_platform_data e680locksw_platform_data = { -+ .buttons = e680locksw_buttons, -+ .nbuttons = 1, -+}; -+ -+static struct platform_device e680locksw_device = { -+ .name = "gpio-keys", -+ .id = -1, -+ .dev = { -+ .platform_data = &e680locksw_platform_data, -+ }, -+}; -+ - static struct platform_device *devices[] __initdata = { -+ &e680locksw_device, - }; - - static void __init e680_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/e680-mci.patch b/packages/linux/linux-ezx-2.6.21/e680-mci.patch deleted file mode 100644 index 1bf69176ef..0000000000 --- a/packages/linux/linux-ezx-2.6.21/e680-mci.patch +++ /dev/null @@ -1,127 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 03:47:41.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 13:03:53.000000000 -0300 -@@ -13,11 +13,14 @@ - #include - #include - #include -+#include -+#include - - #include - #include - #include - #include -+#include - - #include "generic.h" - #include "ezx.h" -@@ -25,6 +28,99 @@ - extern void ezx_lcd_power(int, struct fb_var_screeninfo *); - extern void ezx_backlight_power(int); - -+#ifdef CONFIG_EZX_PCAP -+extern int ezx_pcap_mmcsd_power(int); -+extern void ezx_pcap_mmcsd_voltage(u_int32_t); -+#else -+#define ezx_pcap_mmcsd_voltage(x) {} -+#define ezx_pcap_mmcsd_power(x) {} -+#endif -+ -+static struct pxamci_platform_data e680_mci_platform_data; -+ -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 3, -+ [MMC_VDD_170] = 3, -+ [MMC_VDD_180] = 3, -+ [MMC_VDD_190] = 3, -+ [MMC_VDD_200] = 3, -+ [MMC_VDD_210] = 3, -+ [MMC_VDD_220] = 3, -+ [MMC_VDD_230] = 3, -+ [MMC_VDD_240] = 3, -+ [MMC_VDD_250] = 3, -+ [MMC_VDD_260] = 3, -+ [MMC_VDD_270] = 3, -+ [MMC_VDD_280] = 3, -+ [MMC_VDD_290] = 3, -+ [MMC_VDD_300] = 3, -+ [MMC_VDD_310] = 3, -+ [MMC_VDD_320] = 3, -+ [MMC_VDD_330] = 3, -+ [MMC_VDD_340] = 3, -+ [MMC_VDD_350] = 3, -+ [MMC_VDD_360] = 3, -+}; -+ -+static int e680_mci_init(struct device *dev, -+ irqreturn_t (*ezx_detect_int)(int, void *), -+ void *data) -+{ -+ int err; -+ -+ /* Setup GPIO for PXA27x MMC/SD controller */ -+ pxa_gpio_mode(GPIO32_MMCCLK_MD); -+ pxa_gpio_mode(GPIO112_MMCCMD_MD); -+ pxa_gpio_mode(GPIO92_MMCDAT0_MD); -+ pxa_gpio_mode(GPIO109_MMCDAT1_MD); -+ pxa_gpio_mode(GPIO110_MMCDAT2_MD); -+ pxa_gpio_mode(GPIO111_MMCDAT3_MD); -+ -+ ezx_pcap_mmcsd_power(1); -+ -+ e680_mci_platform_data.detect_delay = msecs_to_jiffies(250); -+ -+ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, -+ "MMC card detect", data); -+ if (err) { -+ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " -+ "MMC card detect IRQ\n"); -+ return -1; -+ } -+ -+ set_irq_type(0x0b, IRQT_BOTHEDGE); -+ -+ return 0; -+} -+ -+ -+static inline int e680_mci_get_ro(struct device *dev) -+{ -+ return (GPLR3 & 0x800); -+} -+ -+static void e680_mci_setpower(struct device *dev, unsigned int vdd) -+{ -+ if (vdd <= MMC_VDD_360) -+ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); -+ -+ ezx_pcap_mmcsd_power(1); -+} -+ -+static void e680_mci_exit(struct device *dev, void *data) -+{ -+ ezx_pcap_mmcsd_power(0); -+ free_irq(0x49, data); -+} -+ -+static struct pxamci_platform_data e680_mci_platform_data = { -+ .ocr_mask = MMC_VDD_27_28, -+ .init = e680_mci_init, -+ .get_ro = e680_mci_get_ro, -+ .setpower = e680_mci_setpower, -+ .exit = e680_mci_exit, -+}; -+ - static struct pxafb_mode_info mode_e680 = { - .pixclock = 150000, - .xres = 240, -@@ -65,6 +161,7 @@ - PSLR = 0x05800f00; - - set_pxa_fb_info(&e680_fb_info); -+ pxa_set_mci_info(&e680_mci_platform_data); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - } diff --git a/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch b/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch deleted file mode 100644 index ec48d46746..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-backlight.patch +++ /dev/null @@ -1,203 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: linux-2.6.21/drivers/video/backlight/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/video/backlight/Kconfig 2007-05-08 14:19:18.000000000 -0300 -+++ linux-2.6.21/drivers/video/backlight/Kconfig 2007-05-08 14:22:22.000000000 -0300 -@@ -63,3 +63,12 @@ - help - If you have a Frontpath ProGear say Y to enable the - backlight driver. -+ -+config BACKLIGHT_EZX -+ tristate "Motorola EXZ Backlight Driver (A780/E680/E680i)" -+ depends on BACKLIGHT_CLASS_DEVICE && PXA_EZX -+ default y -+ help -+ If you have a Motorola A780 or E680(i), say y to enable the -+ backlight driver. -+ -Index: linux-2.6.21/drivers/video/backlight/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/video/backlight/Makefile 2007-05-08 14:19:18.000000000 -0300 -+++ linux-2.6.21/drivers/video/backlight/Makefile 2007-05-08 14:22:22.000000000 -0300 -@@ -6,3 +6,4 @@ - obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o - obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o - obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o -+obj-$(CONFIG_BACKLIGHT_EZX) += ezx_bl.o -Index: linux-2.6.21/drivers/video/backlight/ezx_bl.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/video/backlight/ezx_bl.c 2007-05-08 14:24:16.000000000 -0300 -@@ -0,0 +1,142 @@ -+/* -+ * Backlight Driver for Motorola A780 and E680(i) GSM Phones. -+ * -+ * Copyright 2006 Vanille Media -+ * -+ * Author: Michael Lauer -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#define EZX_MIN_INTENSITY 0 -+#define EZX_MAX_INTENSITY 50 -+#define EZX_DEFAULT_INTENSITY 30 -+ -+static struct backlight_device *ezx_backlight_device; -+static int last_intensity; -+static int suspended; -+ -+static int ezxbl_send_intensity(struct backlight_device *bd) -+{ -+ int intensity = bd->props.brightness; -+ -+ if (suspended || bd->props.power != FB_BLANK_UNBLANK || -+ bd->props.fb_blank != FB_BLANK_UNBLANK) -+ intensity = 0; -+ -+ if ( !last_intensity && intensity ) { -+ PWM_CTRL0 = 2; /* pre-scaler */ -+ PWM_PWDUTY0 = intensity; /* duty cycle */ -+ PWM_PERVAL0 = 49; /* period */ -+ pxa_gpio_mode(GPIO16_PWM0_MD); /* set GPIO16 as alternate function + output */ -+ pxa_set_cken(CKEN0_PWM0, 1); /* clock enable */ -+ } -+ else if ( last_intensity && !intensity ) { -+ PWM_PWDUTY0 = 0; -+ GAFR0_U &= 0xFFFFFFFC; /* ??? */ -+ pxa_set_cken(CKEN0_PWM0, 0); /* clock disable */ -+ pxa_gpio_mode(GPIO16_PWM0); /* set GPIO16 as input */ -+ } else if ( last_intensity && intensity ) { -+ PWM_PWDUTY0 = intensity; /* duty cycle */ -+ } -+ last_intensity = intensity; -+ return 0; -+} -+ -+static int ezxbl_get_intensity(struct backlight_device *bd) -+{ -+ return last_intensity; -+} -+ -+static int ezxbl_set_intensity(struct backlight_device *bd) -+{ -+ return ezxbl_send_intensity(ezx_backlight_device); -+} -+ -+#ifdef CONFIG_PM -+static int ezxbl_suspend(struct platform_device *pdev, pm_message_t state) -+{ -+ suspended = 1; -+ ezxbl_set_intensity(ezx_backlight_device); -+ return 0; -+} -+ -+static int ezxbl_resume(struct platform_device *pdev) -+{ -+ suspended = 0; -+ ezxbl_set_intensity(ezx_backlight_device); -+ return 0; -+} -+#else -+#define ezxbl_suspend NULL -+#define ezxbl_resume NULL -+#endif -+ -+static struct backlight_ops ezxbl_ops = { -+ .get_brightness = ezxbl_get_intensity, -+ .update_status = ezxbl_set_intensity, -+}; -+ -+static int __init ezxbl_probe(struct platform_device *pdev) -+{ -+ ezx_backlight_device = backlight_device_register ("ezx-bl", -+ &pdev->dev, NULL, &ezxbl_ops); -+ if (IS_ERR (ezx_backlight_device)) -+ return PTR_ERR (ezx_backlight_device); -+ -+ platform_set_drvdata(pdev, ezx_backlight_device); -+ -+ ezx_backlight_device->props.power = FB_BLANK_UNBLANK; -+ ezx_backlight_device->props.max_brightness = EZX_MAX_INTENSITY; -+ ezx_backlight_device->props.brightness = EZX_DEFAULT_INTENSITY; -+ ezxbl_set_intensity(ezx_backlight_device); -+ backlight_update_status(ezx_backlight_device); -+ -+ return 0; -+} -+ -+static int ezxbl_remove(struct platform_device *pdev) -+{ -+ backlight_device_unregister(ezx_backlight_device); -+ return 0; -+} -+ -+static struct platform_driver ezxbl_driver = { -+ .probe = ezxbl_probe, -+ .remove = ezxbl_remove, -+ .suspend = ezxbl_suspend, -+ .resume = ezxbl_resume, -+ .driver = { -+ .name = "ezx-bl", -+ }, -+}; -+ -+static int __init ezxbl_init(void) -+{ -+ return platform_driver_register(&ezxbl_driver); -+} -+ -+static void __exit ezxbl_exit(void) -+{ -+ platform_driver_unregister(&ezxbl_driver); -+} -+ -+module_init(ezxbl_init); -+module_exit(ezxbl_exit); -+ -+MODULE_AUTHOR("Michael Lauer "); -+MODULE_DESCRIPTION("Backlight Driver for Motorola A780|E680(i)"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 14:22:21.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 14:22:22.000000000 -0300 -@@ -67,6 +67,12 @@ - #endif - EXPORT_SYMBOL(ezx_backlight_power); - -+/* EZX LCD Backlight */ -+static struct platform_device ezxbacklight_device = { -+ .name = "ezx-bl", -+ .id = -1, -+}; -+ - /* SSP */ - struct platform_device ezxssp_device = { - .name = "ezx-ssp", -@@ -204,6 +210,7 @@ - &ezxpcap_device, - &ezxemu_device, - &pcap_ts_device, -+ &ezxbacklight_device, - }; - - /* PM */ diff --git a/packages/linux/linux-ezx-2.6.21/ezx-bp.patch b/packages/linux/linux-ezx-2.6.21/ezx-bp.patch deleted file mode 100644 index a8a7e08086..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-bp.patch +++ /dev/null @@ -1,327 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-12 20:40:44.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-14 21:12:37.000000000 -0300 -@@ -100,9 +100,41 @@ - .init = ezx_ohci_init, - }; - -+/* BP */ -+static struct resource ezxbp_resources[] = { -+ [0] = { -+ .start = IRQ_GPIO(GPIO_BP_RDY), -+ .end = IRQ_GPIO(GPIO_BP_RDY), -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = IRQ_GPIO(GPIO_BB_WDI2), -+ .end = IRQ_GPIO(GPIO_BB_WDI2), -+ .flags = IORESOURCE_IRQ, -+ }, -+ [2] = { -+ .start = IRQ_GPIO(GPIO_BB_WDI), -+ .end = IRQ_GPIO(GPIO_BB_WDI), -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+static struct platform_device ezxbp_device = { -+ .name = "ezx-bp", -+ .dev = { -+ //.parent = -+ //.platform_data = -+ }, -+ .id = -1, -+ .num_resources = ARRAY_SIZE(ezxbp_resources), -+ .resource = ezxbp_resources, -+}; -+ -+ - - static struct platform_device *devices[] __initdata = { - &ezxssp_device, -+ &ezxbp_device, - }; - - static int __init ezx_init(void) -Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-12 20:40:44.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-14 21:12:37.000000000 -0300 -@@ -94,6 +94,9 @@ - - endchoice - -+config EZX_BP -+ bool "BP Control code for EZX Platform" -+ - endif - - endmenu -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c 2007-05-12 21:28:07.000000000 -0300 -@@ -0,0 +1,250 @@ -+/* -+ * BP handshake code for Motorola EZX phones -+ * -+ * Copyright (c) 2007 Daniel Ribeiro -+ * -+ * Based on Motorola's a780.c Copyright (c) 2003-2005 Motorola -+ * -+ * 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. -+ * -+ */ -+ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+/* BP Handshake */ -+#define FIRST_STEP 2 -+#define LAST_STEP 3 -+#define BP_RDY_TIMEOUT 0x000c0000 -+ -+#if 1 -+#define DEBUGP(x, args ...) printk(x, ##args) -+#else -+#define DEBUGP(x, args ...) -+#endif -+ -+struct bp { -+ int irq_wdi; -+ int irq_wdi2; -+ int irq_rdy; -+}; -+ -+/* check power down condition */ -+static inline void check_power_off(void) -+{ -+ if (pxa_gpio_get_value(GPIO_BB_WDI2) == 0) { -+ DEBUGP("BP request poweroff!\n"); -+ pm_power_off(); -+ } -+} -+ -+static int step = FIRST_STEP; -+ -+inline int bp_handshake_passed(void) -+{ -+ return (step > LAST_STEP); -+} -+EXPORT_SYMBOL(bp_handshake_passed); -+ -+void handshake(void) -+{ -+ /* step 1: check MCU_INT_SW or BP_RDY is low (now it is checked in apboot) */ -+ DEBUGP("bp handshake entered!\n"); -+ if (step == 1) { -+ int timeout = BP_RDY_TIMEOUT; -+ -+ /* config MCU_INT_SW, BP_RDY as input */ -+ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_IN); -+ pxa_gpio_mode(GPIO_BP_RDY | GPIO_IN); -+ -+ while ( timeout -- ) { -+ if (pxa_gpio_get_value(GPIO_MCU_INT_SW) == 0 -+ || pxa_gpio_get_value(GPIO_BP_RDY) == 0) { -+ step ++; -+ break; -+ } -+ -+ check_power_off(); -+ } -+ DEBUGP("ezx-bp: handshake step 1\n"); -+ } -+ -+ /* step 2: wait BP_RDY is low */ -+ if (step == 2) { -+ if (pxa_gpio_get_value(GPIO_BP_RDY) == 0) { -+ /* config MCU_INT_SW as output */ -+ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_OUT); -+ pxa_gpio_set_value(GPIO_MCU_INT_SW, 0); -+ -+ step ++; -+ DEBUGP("ezx-bp: handshake step 2\n"); -+ } -+ } -+ -+ /* step 3: wait BP_RDY is high */ -+ else if (step == 3) { -+ if (pxa_gpio_get_value(GPIO_BP_RDY)) { -+ step ++; -+ //FIXME delay_bklight(); -+ pxa_gpio_set_value(GPIO_MCU_INT_SW, 1); -+ printk(KERN_NOTICE "ezx-bp: handshake passed\n"); -+ } -+ } -+} -+ -+irqreturn_t bp_wdi_handler(int irq, void *dev_id) -+{ -+ DEBUGP("BP Lowered WDI line. This is not good :(\n"); -+ /* -+ * this means that BP is not responsive. -+ * we could try to reset BP and then handshake again -+ * but i doubt its possible to bring it up again. -+ */ -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t bp_rdy_handler(int irq, void *dev_id) -+{ -+ struct bp *bp = dev_id; -+ DEBUGP("BP rdy irq\n"); -+ if (!bp_handshake_passed()) { -+ handshake(); -+ if (bp_handshake_passed()) { -+ disable_irq(bp->irq_wdi2); -+ -+ /* set bp_rdy handle for usb ipc */ -+ set_irq_type(bp->irq_rdy, IRQT_FALLING); -+ } -+ } -+#ifdef CONFIG_TS0710_MUX_USB -+ else usb_send_readurb(); -+#endif -+ return IRQ_HANDLED; -+} -+ -+/* BP request for poweroff */ -+static irqreturn_t bp_wdi2_handler(int irq, void *dev_id) -+{ -+ DEBUGP("BP request poweroff!\n"); -+ pm_power_off(); -+ return IRQ_HANDLED; -+} -+ -+static int __init ezxbp_probe(struct platform_device *dev) -+{ -+ int ret; -+ struct bp *bp; -+ -+ bp = kzalloc(sizeof(*bp), GFP_KERNEL); -+ if (!bp) -+ return -ENOMEM; -+ -+ bp->irq_rdy = platform_get_irq(dev, 0); -+ if(bp->irq_rdy < 0) { -+ ret = bp->irq_rdy; -+ goto fail; -+ } -+ -+ bp->irq_wdi2 = platform_get_irq(dev, 1); -+ if(bp->irq_wdi2 < 0) { -+ ret = bp->irq_wdi2; -+ goto fail; -+ } -+ -+ bp->irq_wdi = platform_get_irq(dev, 2); -+ if(bp->irq_wdi < 0) { -+ ret = bp->irq_wdi; -+ goto fail; -+ } -+ -+ set_irq_type(bp->irq_wdi, IRQT_FALLING); -+ request_irq(bp->irq_wdi, bp_wdi_handler, SA_INTERRUPT, -+ "bp wdi", bp); -+ -+ set_irq_type(bp->irq_rdy, IRQT_BOTHEDGE); -+ request_irq(bp->irq_rdy, bp_rdy_handler, SA_INTERRUPT, -+ "bp rdy", bp); -+ -+ set_irq_type(bp->irq_wdi2, IRQT_FALLING); -+ request_irq(bp->irq_wdi2, bp_wdi2_handler, SA_INTERRUPT, -+ "bp wdi2", bp); -+ -+ /* turn on BP */ -+ pxa_gpio_mode(GPIO_BB_RESET|GPIO_OUT); -+ pxa_gpio_set_value(GPIO_BB_RESET, 1); -+ -+ check_power_off(); -+ -+ handshake(); -+ -+ return 0; -+fail: -+ kfree(bp); -+ return ret; -+} -+ -+static int ezxbp_remove(struct platform_device *dev) -+{ -+ struct bp *bp = platform_get_drvdata(dev); -+ -+ free_irq(bp->irq_wdi, bp); -+ free_irq(bp->irq_wdi2, bp); -+ free_irq(bp->irq_rdy, bp); -+ kfree(bp); -+ -+ return 0; -+} -+ -+static int ezxbp_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ DEBUGP("bp suspend!\n"); -+// pxa_gpio_set_value(GPIO_MCU_INT_SW, 0); -+ return 0; -+} -+ -+static int ezxbp_resume(struct platform_device *dev) -+{ -+ DEBUGP("bp resume!\n"); -+// pxa_gpio_set_value(GPIO_MCU_INT_SW, 1); -+ return 0; -+} -+static struct platform_driver ezxbp_driver = { -+ .probe = ezxbp_probe, -+ .remove = ezxbp_remove, -+#warning FIXME: missing suspend/resume support -+ .suspend = ezxbp_suspend, -+ .resume = ezxbp_resume, -+ .driver = { -+ .name = "ezx-bp", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+int __init ezxbp_init(void) -+{ -+ return platform_driver_register(&ezxbp_driver); -+} -+ -+void ezxbp_fini(void) -+{ -+ return platform_driver_unregister(&ezxbp_driver); -+} -+ -+module_init(ezxbp_init); -+module_exit(ezxbp_fini); -+ -+MODULE_DESCRIPTION("Motorola BP Control driver"); -+MODULE_AUTHOR("Daniel Ribeiro "); -+MODULE_LICENSE("GPL"); -+ -Index: linux-2.6.21/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-12 20:40:44.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-14 21:12:37.000000000 -0300 -@@ -22,6 +22,7 @@ - obj-$(CONFIG_PXA_EZX_A780) += ezx-a780.o - obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o - obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o -+obj-$(CONFIG_EZX_BP) += ezx-bp.o - - # Support for blinky lights - led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/ezx-core.patch b/packages/linux/linux-ezx-2.6.21/ezx-core.patch deleted file mode 100644 index d70b685a0f..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-core.patch +++ /dev/null @@ -1,1012 +0,0 @@ -Index: linux-2.6.21/arch/arm/boot/compressed/head-xscale.S -=================================================================== ---- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-05-08 03:43:23.000000000 -0300 -@@ -53,3 +53,6 @@ - str r1, [r0, #0x18] - #endif - -+#ifdef CONFIG_ARCH_EZX -+ mov r7, #MACH_TYPE_EZX -+#endif -Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 03:43:23.000000000 -0300 -@@ -37,6 +37,10 @@ - bool "Keith und Koep Trizeps4 DIMM-Module" - select PXA27x - -+config PXA_EZX -+ bool "Motorola EZX Platform" -+ select PXA_SSP -+ - endchoice - - if PXA_SHARPSL -@@ -71,6 +75,27 @@ - - endif - -+if PXA_EZX -+ -+choice -+ prompt "Select target EZX device" -+ -+config PXA_EZX_E680 -+ bool "Motorola E680 GSM Phone" -+ select PXA27x -+ -+config PXA_EZX_A780 -+ bool "Motorola A780 GSM Phone" -+ select PXA27x -+ -+config PXA_EZX_E2 -+ bool "Motorola E2 GSM Phone" -+ select PXA27x -+ -+endchoice -+ -+endif -+ - endmenu - - config MACH_POODLE -@@ -144,4 +169,5 @@ - tristate - help - Enable support for PXA2xx SSP ports -+ - endif -Index: linux-2.6.21/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 03:43:23.000000000 -0300 -@@ -18,6 +18,10 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_ssp.o -+obj-$(CONFIG_PXA_EZX_A780) += ezx-a780.o -+obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o -+obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o - - # Support for blinky lights - led-y := leds.o -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 03:43:23.000000000 -0300 -@@ -0,0 +1,141 @@ -+/* -+ * ezx.c - Common code for EZX platform. -+ * -+ * Copyright (c) 2005-2007 OpenEZX Team (www.openezx.org) -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include "generic.h" -+#include "ezx.h" -+ -+extern int ezx_ssp_set_machinfo(struct ezxssp_machinfo *); -+ -+/* EZX PXA Framebuffer */ -+void ezx_lcd_power(int on, struct fb_var_screeninfo *var) -+{ -+ if (on) { -+ mdelay(1); -+ GPSR3 = 0x00100000; -+ mdelay(10); -+ GPCR3 = 0x00100000; -+ GPDR3 |= 0x00100000; -+ } else { -+ GPSR3 = 0x00100000; -+ PGSR3 |= 0x00100000; -+ mdelay(41); -+ LCCR0 &= ~LCCR0_LDM; /* disable lcd disable done interrupt */ -+ LCCR0 |= LCCR0_DIS; /* normal disable lcd */ -+ mdelay(18); -+ } -+} -+EXPORT_SYMBOL(ezx_lcd_power); -+ -+/* failsafe if we are not using the backlight platform driver */ -+#ifndef CONFIG_BACKLIGHT_EZX -+void ezx_backlight_power(int on) -+{ -+ if (on) { -+ pxa_gpio_mode(GPIO16_PWM0_MD); -+ pxa_set_cken(CKEN0_PWM0, 1); -+ PWM_CTRL0 = 0; -+ PWM_PWDUTY0 = 0x3ff; -+ PWM_PERVAL0 = 0x3ff; -+ } else { -+ PWM_CTRL0 = 0; -+ PWM_PWDUTY0 = 0x0; -+ PWM_PERVAL0 = 0x3FF; -+ pxa_set_cken(CKEN0_PWM0, 0); -+ } -+} -+#else -+void ezx_backlight_power(int on){} -+#endif -+EXPORT_SYMBOL(ezx_backlight_power); -+ -+/* SSP */ -+struct platform_device ezxssp_device = { -+ .name = "ezx-ssp", -+ .id = -1, -+}; -+ -+struct ezxssp_machinfo ezx_ssp_machinfo = { -+ .port = 1, -+ .cs_pcap = GPIO_SPI_CE, -+ .clk_pcap = 1, -+}; -+ -+/* OHCI Controller */ -+static int ezx_ohci_init(struct device *dev) -+{ -+ /* for A780 support (connected with Neptune) */ -+ pxa_gpio_mode(GPIO30_USB_P3_2); /* GPIO30 - USB_P3_2/ICL_TXENB */ -+ pxa_gpio_mode(GPIO31_USB_P3_6); /* GPIO31 - USB_P3_6/ICL_VPOUT */ -+ pxa_gpio_mode(GPIO90_USB_P3_5); /* GPIO90 - USB_P3_5/ICL_VPIN */ -+ pxa_gpio_mode(GPIO91_USB_P3_1); /* GPIO91 - USB_P3_1/ICL_XRXD */ -+ pxa_gpio_mode(GPIO56_USB_P3_4); /* GPIO56 - USB_P3_4/ICL_VMOUT */ -+ pxa_gpio_mode(GPIO113_USB_P3_3);/* GPIO113 - USB_P3_3/ICL_VMIN */ -+ UP3OCR = 0x00000002; -+ -+ UHCHR = UHCHR & ~(UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); -+ -+ return 0; -+} -+ -+static struct pxaohci_platform_data ezx_ohci_platform_data = { -+ .port_mode = PMM_NPS_MODE, -+ .init = ezx_ohci_init, -+}; -+ -+ -+static struct platform_device *devices[] __initdata = { -+ &ezxssp_device, -+}; -+ -+static int __init ezx_init(void) -+{ -+ CKEN = CKEN9_OSTIMER | CKEN22_MEMC; -+ -+ ezx_ssp_set_machinfo(&ezx_ssp_machinfo); -+ -+ pxa_gpio_mode(GPIO_ICL_FFRXD_MD); -+ pxa_gpio_mode(GPIO_ICL_FFTXD_MD); -+ pxa_gpio_mode(GPIO_ICL_FFCTS_MD); -+ pxa_gpio_mode(GPIO_ICL_FFRTS_MD); -+ -+ pxa_gpio_mode(GPIO42_BTRXD_MD); -+ pxa_gpio_mode(GPIO43_BTTXD_MD); -+ pxa_gpio_mode(GPIO44_BTCTS_MD); -+ pxa_gpio_mode(GPIO45_BTRTS_MD); -+ -+ /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ -+ pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); -+ clr_GPIO(GPIO_EMU_MUX1); -+ pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT); -+ clr_GPIO(GPIO_EMU_MUX2); -+ -+ /* Standard UART */ -+ pxa_gpio_mode(GPIO46_STRXD_MD); -+ pxa_gpio_mode(GPIO47_STTXD_MD); -+ -+ pxa_set_ohci_info(&ezx_ohci_platform_data); -+ -+ platform_add_devices(devices, ARRAY_SIZE(devices)); -+ -+ return 0; -+} -+ -+subsys_initcall(ezx_init); -Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h 2007-05-08 03:43:23.000000000 -0300 -@@ -0,0 +1,225 @@ -+/* -+ * linux/include/asm-arm/arch-pxa/ezx.h -+ * -+ * Specific macro defines for Motorola Ezx Development Platform -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+/* support E680 p3 and ealier PCB */ -+//#define E680_P3_AND_EARLY -+ -+#define GPIO_is_high(x) (GPLR(x) & GPIO_bit(x)) -+#define set_GPIO(x) (GPSR(x) = GPIO_bit(x)) -+#define clr_GPIO(x) (GPCR(x) = GPIO_bit(x)) -+ -+/* -+ * Flags in memory for sleep use -+ */ -+#define FLAG_ADDR PHYS_OFFSET -+#define RESUME_ADDR (PHYS_OFFSET + 4) -+#define BPSIG_ADDR (PHYS_OFFSET + 8) -+ -+#define USER_OFF_FLAG 0x5a5a5a5a -+#define SLEEP_FLAG 0x6b6b6b6b -+#define OFF_FLAG 0x7c7c7c7c -+#define REFLASH_FLAG 0x0C1D2E3F -+#define PASS_THRU_FLAG 0x12345678 -+ -+#define WDI_FLAG 0xbb00dead -+#define NO_FLAG 0xaa00dead -+ -+/* -+ * GPIO control pin, have to change when hardware lock down -+ */ -+ -+#ifdef E680_P3_AND_EARLY -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 57 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 115 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 23 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ -+#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#elif defined(A780_P1_AND_EARLY) -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 82 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ -+#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#else -+ -+/* shakehand with BP's PIN */ -+#define GPIO_BP_RDY 0 /* BP_RDY */ -+#define GPIO_BB_WDI 13 /* BB_WDI */ -+#define GPIO_BB_WDI2 3 /* BB_WDI2 */ -+#define GPIO_BB_RESET 82 /* BB_RESET */ -+#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ -+#define GPIO_TC_MM_EN 99 /* TC_MM_EN */ -+ -+/* control PCAP direct PIN */ -+#define GPIO_WDI_AP 4 /* WDI_AP */ -+#define GPIO_SYS_RESTART 55 /* restart PCAP power */ -+//#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ -+ -+/* communicate with PCAP's PIN */ -+#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ -+#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ -+#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ -+#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ -+#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ -+ -+/* blue tooth control PIN */ -+#define GPIO_BT_WAKEUP 28 /* AP wake up bluetooth module */ -+#define GPIO_BT_HOSTWAKE 14 /* AP wake up bluetooth module */ -+#define GPIO_BT_RESET 48 /* AP reset bluetooth module */ -+ -+/* control LCD high - OFF low -- ON */ -+#define GPIO_LCD_OFF 116 /* control LCD */ -+ -+/* FFUART PIN */ -+#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) -+ -+#endif -+/* -+ * ezx platform, wake up source edge detect bit -+ */ -+#define PEDR_INT_SEC 1 -+ -+#define GPIO_FLIP_PIN 12 -+/*E680 screen lock button*/ -+ -+#define GPIO_LOCK_SCREEN_PIN GPIO_FLIP_PIN -+ -+/* MMC interface */ -+#define GPIO_MMC_DETECT 11 -+#define GPIO_MMC_CLK 32 -+#define GPIO_MMC_DATA0 92 -+#define GPIO_MMC_WP 107 -+#define GPIO_MMC_DATA1 109 -+#define GPIO_MMC_DATA2 110 -+#define GPIO_MMC_DATA3 111 -+#define GPIO_MMC_CMD 112 -+ -+/* interface function */ -+#define GPIO_MMC_CLK_MD (GPIO_MMC_CLK | GPIO_ALT_FN_2_OUT) -+#define GPIO_MMC_DATA0_MD (GPIO_MMC_DATA0 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA1_MD (GPIO_MMC_DATA1 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA2_MD (GPIO_MMC_DATA2 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+#define GPIO_MMC_DATA3_MD (GPIO_MMC_DATA3 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+ -+#define GPIO_MMC_CMD_MD (GPIO_MMC_CMD | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) -+ -+/* EMU GPIO 119 ---MUX2 120 --- MUX1 */ -+#define GPIO_EMU_MUX1 120 -+#define GPIO_EMU_MUX2 119 -+#define GPIO_SNP_INT_CTL 86 -+#define GPIO_SNP_INT_IN 87 -+ -+ -+/* audio related pins */ -+#define AP_13MHZ_OUTPUT_PIN 9 -+ -+#ifdef CONFIG_ARCH_EZX_E680 -+#define GPIO_VA_SEL_BUL 79 -+#define GPIO_FLT_SEL_BUL 80 /* out filter select pin */ -+#define GPIO_MIDI_RESET 78 /* GPIO used by MIDI chipset */ -+#define GPIO_MIDI_CS 33 -+#define GPIO_MIDI_IRQ 15 -+#define GPIO_MIDI_NPWE 49 -+#define GPIO_MIDI_RDY 18 -+#endif -+ -+#ifdef CONFIG_ARCH_EZX_A780 -+#define GPIO_HW_ATTENUATE_A780 96 /* hw noise attenuation be used or bypassed, for receiver or louderspeaker mode */ -+#endif -+ -+ -+/* bp status pin */ -+#define GPIO_BP_STATE 41 -+ -+/* define usb related pin */ -+#define GPIO34_TXENB 34 -+#define GPIO35_XRXD 35 -+#define GPIO36_VMOUT 36 -+#define GPIO39_VPOUT 39 -+#define GPIO40_VPIN 40 -+#define GPIO53_VMIN 53 -+ -+/* USB client 6 pin defination */ -+#define GPIO34_TXENB_MD (GPIO34_TXENB | GPIO_ALT_FN_1_OUT) -+#define GPIO35_XRXD_MD (GPIO35_XRXD | GPIO_ALT_FN_2_IN ) -+#define GPIO36_VMOUT_MD (GPIO36_VMOUT | GPIO_ALT_FN_1_OUT) -+#define GPIO39_VPOUT_MD (GPIO39_VPOUT | GPIO_ALT_FN_1_OUT) -+#define GPIO40_VPIN_MD (GPIO40_VPIN | GPIO_ALT_FN_3_IN ) -+#define GPIO53_VMIN_MD (GPIO53_VMIN | GPIO_ALT_FN_2_IN ) -+ -+#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+ -Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h -=================================================================== ---- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-08 03:43:23.000000000 -0300 -@@ -849,6 +849,8 @@ - #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ - #define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ - -+#define UP3OCR __REG(0x40600024) /* USB Port 3 Output Control register */ -+ - #define UDCCSN(x) __REG2(0x40600100, (x) << 2) - #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ - #define UDCCSR0_SA (1 << 7) /* Setup Active */ -@@ -1252,6 +1254,7 @@ - #define GPIO33_nCS_5 33 /* chip select 5 */ - #define GPIO34_FFRXD 34 /* FFUART receive */ - #define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */ -+#define GPIO34_USB_P2_2 34 /* USB Port2 Pin 2 */ - #define GPIO35_FFCTS 35 /* FFUART Clear to send */ - #define GPIO36_FFDCD 36 /* FFUART Data carrier detect */ - #define GPIO37_FFDSR 37 /* FFUART data set ready */ -@@ -1365,6 +1368,7 @@ - #define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN) - #define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN) - #define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN) -+#define GPIO22_SCLK2_MD (22 | GPIO_ALT_FN_3_IN) - #define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT) - #define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT) - #define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT) -@@ -1375,23 +1379,33 @@ - #define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT) - #define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN) - #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN) -+#define GPIO29_SCLK_MD (29 | GPIO_ALT_FN_3_IN) - #define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT) - #define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT) -+#define GPIO30_USB_P3_2 (30 | GPIO_ALT_FN_3_OUT) - #define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT) - #define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT) -+#define GPIO31_USB_P3_6 (31 | GPIO_ALT_FN_3_OUT) - #define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN) - #define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT) - #define GPIO32_MMCCLK_MD ( 32 | GPIO_ALT_FN_2_OUT) - #define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT) - #define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) - #define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT) -+#define GPIO34_USB_P2_2_MD (34 | GPIO_ALT_FN_1_OUT) - #define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) -+#define GPIO35_USB_P2_1_MD (35 | GPIO_ALT_FN_2_IN) - #define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN) -+#define GPIO36_USB_P2_4_MD (36 | GPIO_ALT_FN_1_OUT) - #define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN) -+#define GPIO37_SFRM2_MD (37 | GPIO_ALT_FN_2_IN) - #define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN) -+#define GPIO38_STXD2_MD (38 | GPIO_ALT_FN_2_OUT) - #define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT) - #define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) -+#define GPIO39_USB_P2_6_MD (39 | GPIO_ALT_FN_1_OUT) - #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) -+#define GPIO40_USB_P2_5_MD (40 | GPIO_ALT_FN_3_IN) - #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) - #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) - #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) -@@ -1416,13 +1430,17 @@ - #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) - #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) - #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) -+#define GPIO52_SCLK3_MD (52 | GPIO_ALT_FN_2_OUT) - #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) - #define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT) -+#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) -+#define GPIO53_USB_P2_3_MD (53 | GPIO_ALT_FN_2_IN) - #define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT) - #define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT) - #define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT) - #define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT) - #define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN) -+#define GPIO56_USB_P3_4 (56 | GPIO_ALT_FN_1_OUT) - #define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN) - #define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT) - #define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT) -@@ -1458,13 +1476,19 @@ - #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT) - #define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT) - #define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN) -+#define GPIO81_STXD3_MD (81 | GPIO_ALT_FN_1_OUT) - #define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT) - #define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN) - #define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT) - #define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN) -+#define GPIO83_SFRM3_MD (83 | GPIO_ALT_FN_1_IN) - #define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT) - #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) - #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) -+#define GPIO88_SRXD2_MD (88 | GPIO_ALT_FN_2_IN) -+#define GPIO89_SRXD3_MD (89 | GPIO_ALT_FN_1_IN) -+#define GPIO90_USB_P3_5 (90 | GPIO_ALT_FN_2_IN) -+#define GPIO91_USB_P3_1 (91 | GPIO_ALT_FN_2_IN) - #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) - #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) - #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) -@@ -1476,6 +1500,7 @@ - #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) - #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) - #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) -+#define GPIO113_USB_P3_3 (113 | GPIO_ALT_FN_3_IN) - #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) - #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) - -@@ -1491,6 +1516,7 @@ - #define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */ - #define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */ - #define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */ -+#define PGSR(x) (__REG(0x40F00020 + ((unsigned long)(x)/32*4))) - #define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */ - #define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */ - #define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */ -Index: linux-2.6.21/arch/arm/boot/compressed/head.S -=================================================================== ---- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-05-08 03:43:23.000000000 -0300 -@@ -117,6 +117,9 @@ - mov r0, r0 - .endr - -+ mov r1, #0x300 @ mach_id 0x363 is official EZX -+ orr r1, r1, #0x63 @ bootloader JUMP doesn't set r1 -+ - b 1f - .word 0x016f2818 @ Magic numbers to help the loader - .word start @ absolute load/run zImage address -Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h -=================================================================== ---- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-05-08 03:43:23.000000000 -0300 -@@ -14,14 +14,14 @@ - #define STUART ((volatile unsigned long *)0x40700000) - #define HWUART ((volatile unsigned long *)0x41600000) - --#define UART FFUART -+#define UART STUART - - - static inline void putc(char c) - { -- while (!(UART[5] & 0x20)) -+/* while (!(UART[5] & 0x40)) - barrier(); -- UART[0] = c; -+ UART[0] = c;*/ - } - - /* -Index: linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c 2007-05-08 03:43:23.000000000 -0300 -@@ -0,0 +1,126 @@ -+/* -+ * SSP control code for Motorola EZX phones -+ * -+ * Copyright (c) 2007 Daniel Ribeiro -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "ezx.h" -+ -+static DEFINE_SPINLOCK(ezx_ssp_lock); -+static struct ssp_dev ezx_ssp_dev; -+static struct ssp_state ezx_ssp_state; -+static struct ezxssp_machinfo *ssp_machinfo; -+ -+/* PCAP */ -+unsigned long ezx_ssp_pcap_putget(ulong data) -+{ -+ unsigned long flag; -+ u32 ret = 0; -+ -+ spin_lock_irqsave(&ezx_ssp_lock, flag); -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPCR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ -+ ssp_write_word(&ezx_ssp_dev,data); -+ ssp_read_word(&ezx_ssp_dev, &ret); -+ -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ spin_unlock_irqrestore(&ezx_ssp_lock, flag); -+ -+ return ret; -+} -+EXPORT_SYMBOL(ezx_ssp_pcap_putget); -+ -+void __init ezx_ssp_set_machinfo(struct ezxssp_machinfo *machinfo) -+{ -+ ssp_machinfo = machinfo; -+} -+ -+static int __init ezx_ssp_probe(struct platform_device *dev) -+{ -+ int ret; -+ /* PCAP init */ -+ pxa_gpio_mode(29|GPIO_ALT_FN_3_OUT); -+ pxa_gpio_mode(GPIO24_SFRM_MD); -+ pxa_gpio_mode(GPIO25_STXD_MD); -+ pxa_gpio_mode(GPIO26_SRXD_MD); -+ -+ /* Chip Select - Disable All */ -+ if (ssp_machinfo->cs_pcap >= 0) -+ pxa_gpio_mode(ssp_machinfo->cs_pcap | GPIO_OUT | GPIO_DFLT_HIGH); -+ -+ ret = ssp_init(&ezx_ssp_dev, ssp_machinfo->port, 0); -+ -+ if (ret) -+ printk(KERN_ERR "Unable to register SSP handler!\n"); -+ else { -+ ssp_disable(&ezx_ssp_dev); -+ ssp_config(&ezx_ssp_dev, -+ (SSCR0_Motorola | SSCR0_DataSize(16) | SSCR0_EDSS), -+ (SSCR1_TxTresh(1) | SSCR1_RxTresh(1)), -+ 0, SSCR0_SerClkDiv(ssp_machinfo->clk_pcap)); -+ ssp_enable(&ezx_ssp_dev); -+ } -+ -+ return ret; -+} -+ -+static int ezx_ssp_remove(struct platform_device *dev) -+{ -+ ssp_exit(&ezx_ssp_dev); -+ return 0; -+} -+ -+static int ezx_ssp_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ ssp_flush(&ezx_ssp_dev); -+ ssp_save_state(&ezx_ssp_dev,&ezx_ssp_state); -+ -+ return 0; -+} -+ -+static int ezx_ssp_resume(struct platform_device *dev) -+{ -+ if (ssp_machinfo->cs_pcap >= 0) -+ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); -+ ssp_restore_state(&ezx_ssp_dev,&ezx_ssp_state); -+ ssp_enable(&ezx_ssp_dev); -+ -+ return 0; -+} -+ -+static struct platform_driver ezxssp_driver = { -+ .probe = ezx_ssp_probe, -+ .remove = ezx_ssp_remove, -+ .suspend = ezx_ssp_suspend, -+ .resume = ezx_ssp_resume, -+ .driver = { -+ .name = "ezx-ssp", -+ }, -+}; -+ -+int __init ezx_ssp_init(void) -+{ -+ return platform_driver_register(&ezxssp_driver); -+} -+ -+arch_initcall(ezx_ssp_init); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.h 2007-05-08 03:43:23.000000000 -0300 -@@ -0,0 +1,9 @@ -+#include -+ -+/* SSP */ -+struct ezxssp_machinfo { -+ int port; -+ int cs_pcap; -+ int clk_pcap; -+}; -+ -Index: linux-2.6.21/arch/arm/mm/init.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mm/init.c 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/arch/arm/mm/init.c 2007-05-08 03:43:23.000000000 -0300 -@@ -241,6 +241,10 @@ - */ - reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, - boot_pages << PAGE_SHIFT); -+#ifdef CONFIG_PXA_EZX -+ /* reserve the first page memory for exiting sleep and user off */ -+ reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE); -+#endif - - #ifdef CONFIG_BLK_DEV_INITRD - /* -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-08 03:46:17.000000000 -0300 -@@ -0,0 +1,82 @@ -+/* -+ * ezx-a780.c - Code specific to A780 GSM Phone. -+ * -+ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) -+ * -+ * 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. -+ * -+ */ -+ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "generic.h" -+#include "ezx.h" -+ -+extern void ezx_lcd_power(int, struct fb_var_screeninfo *); -+extern void ezx_backlight_power(int); -+ -+static struct pxafb_mode_info mode_a780 = { -+ .pixclock = 150000, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 16, -+ .hsync_len = 10, -+ .left_margin = 20, -+ .right_margin = 10, -+ .vsync_len = 2, -+ .upper_margin = 3, -+ .lower_margin = 2, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info a780_fb_info = { -+ .modes = &mode_a780, -+ .num_modes = 1, -+ .lccr0 = 0x002008F8, -+ .lccr3 = 0x0430FF09, -+ .pxafb_backlight_power = &ezx_backlight_power, -+ .pxafb_lcd_power = &ezx_lcd_power, -+}; -+ -+static struct platform_device *devices[] __initdata = { -+}; -+ -+static void __init a780_init(void) -+{ -+ /* setup sleep mode values */ -+ PWER = 0xc0007803; // disable usb, GPIO15 NC -+ PFER = 0x00007803; -+ PRER = 0x00001802; -+ PGSR0 = 0x00000010; -+ PGSR1 = 0x02800000; -+ PGSR2 = 0x00040000; -+ PGSR3 = 0x00000008; -+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; -+ PSLR = 0x05800f00; -+ -+ set_pxa_fb_info(&a780_fb_info); -+ -+ platform_add_devices(devices, ARRAY_SIZE(devices)); -+} -+ -+MACHINE_START(EZX, "Motorola Ezx Platform") -+ /* Maintainer: OpenEZX Team (www.openezx.org) */ -+ .phys_io = 0x40000000, -+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, -+ .boot_params = 0xa0000100, -+ .map_io = pxa_map_io, -+ .init_irq = pxa_init_irq, -+ .timer = &pxa_timer, -+ .init_machine = a780_init, -+MACHINE_END -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c 2007-05-08 03:47:56.000000000 -0300 -@@ -0,0 +1,70 @@ -+/* -+ * ezx-e2.c - Code specific to E2 GSM Phone. -+ * -+ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "generic.h" -+#include "ezx.h" -+ -+extern void ezx_lcd_power(int, struct fb_var_screeninfo *); -+extern void ezx_backlight_power(int); -+ -+static struct pxafb_mode_info mode_e2 = { -+ .pixclock = 192308, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 8, -+ .hsync_len = 10, -+ .left_margin = 20, -+ .right_margin = 10, -+ .vsync_len = 2, -+ .upper_margin = 3, -+ .lower_margin = 2, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info e2_fb_info = { -+ .modes = &mode_e2, -+ .num_modes = 1, -+ .lccr0 = 0x022008B8, -+ .lccr3 = 0xC130FF13, -+ .pxafb_backlight_power = ezx_backlight_power, -+ .pxafb_lcd_power = &pxafb_lcd_power, -+}; -+ -+static struct platform_device *devices[] __initdata = { -+}; -+ -+static void __init e2_init(void) -+{ -+ set_pxa_fb_info(&e2_fb_info); -+ -+ platform_add_devices(devices, ARRAY_SIZE(devices)); -+} -+ -+MACHINE_START(EZX, "Motorola Ezx Platform") -+ /* Maintainer: OpenEZX Team (www.openezx.org) */ -+ .phys_io = 0x40000000, -+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, -+ .boot_params = 0xa0000100, -+ .map_io = pxa_map_io, -+ .init_irq = pxa_init_irq, -+ .timer = &pxa_timer, -+ .init_machine = e2_init, -+MACHINE_END -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-08 03:47:41.000000000 -0300 -@@ -0,0 +1,81 @@ -+/* -+ * ezx-e680.c - Code specific to E680 GSM Phone. -+ * -+ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) -+ * -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "generic.h" -+#include "ezx.h" -+ -+extern void ezx_lcd_power(int, struct fb_var_screeninfo *); -+extern void ezx_backlight_power(int); -+ -+static struct pxafb_mode_info mode_e680 = { -+ .pixclock = 150000, -+ .xres = 240, -+ .yres = 320, -+ .bpp = 16, -+ .hsync_len = 10, -+ .left_margin = 20, -+ .right_margin = 10, -+ .vsync_len = 2, -+ .upper_margin = 3, -+ .lower_margin = 2, -+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, -+}; -+ -+static struct pxafb_mach_info e680_fb_info = { -+ .modes = &mode_e680, -+ .num_modes = 1, -+ .lccr0 = 0x002008F8, -+ .lccr3 = 0x0430FF09, -+ .pxafb_backlight_power = &ezx_backlight_power, -+ .pxafb_lcd_power = &ezx_lcd_power, -+}; -+ -+static struct platform_device *devices[] __initdata = { -+}; -+ -+static void __init e680_init(void) -+{ -+ /* setup sleep mode values */ -+ PWER = 0xc000f803; // disable usb 0xdc00f803; -+ PFER = 0x0000f803; -+ PRER = 0x00001802; -+ PGSR0 = 0x00000010; -+ PGSR1 = 0x02800000; -+ PGSR2 = 0x00040000; -+ PGSR3 = 0x00000000; -+ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; -+ PSLR = 0x05800f00; -+ -+ set_pxa_fb_info(&e680_fb_info); -+ -+ platform_add_devices(devices, ARRAY_SIZE(devices)); -+} -+ -+MACHINE_START(EZX, "Motorola Ezx Platform") -+ /* Maintainer: OpenEZX Team (www.openezx.org) */ -+ .phys_io = 0x40000000, -+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, -+ .boot_params = 0xa0000100, -+ .map_io = pxa_map_io, -+ .init_irq = pxa_init_irq, -+ .timer = &pxa_timer, -+ .init_machine = e680_init, -+MACHINE_END diff --git a/packages/linux/linux-ezx-2.6.21/ezx-emu.patch b/packages/linux/linux-ezx-2.6.21/ezx-emu.patch deleted file mode 100644 index 7f089315a5..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-emu.patch +++ /dev/null @@ -1,313 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c 2007-05-08 02:31:16.000000000 -0300 -@@ -0,0 +1,215 @@ -+/* -+ * EMU Driver for Motorola EZX phones -+ * -+ * Copyright (c) 2007 Daniel Ribeiro -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static struct pxa2xx_udc_mach_info ezx_udc_info; -+extern int ezx_pcap_bit_set(u_int32_t, u_int8_t); -+extern int ezx_pcap_read_bit(u_int32_t); -+ -+#if defined CONFIG_EZX_EMU_USB -+#define emu_switch_to_default() emu_switch_to_usb() -+#elif defined CONFIG_EZX_EMU_UART -+#define emu_switch_to_default() emu_switch_to_uart() -+#else -+#define emu_switch_to_default() emu_switch_to_nothing() -+#endif -+ -+void emu_switch_to_usb(void) -+{ -+ pxa_gpio_mode(GPIO34_USB_P2_2_MD); -+ pxa_gpio_mode(GPIO35_USB_P2_1_MD); -+ pxa_gpio_mode(GPIO36_USB_P2_4_MD); -+ pxa_gpio_mode(GPIO39_USB_P2_6_MD); -+ pxa_gpio_mode(GPIO40_USB_P2_5_MD); -+ pxa_gpio_mode(GPIO53_USB_P2_3_MD); -+ UP2OCR = 0x02000000; -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 1); -+ clr_GPIO(GPIO_EMU_MUX1); -+ clr_GPIO(GPIO_EMU_MUX2); -+} -+ -+void emu_switch_to_uart(void) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN,0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR, 1); -+ set_GPIO(GPIO39_FFTXD); -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO39_FFTXD_MD); -+ pxa_gpio_mode(GPIO53_FFRXD_MD); -+ CKEN |= CKEN6_FFUART; -+ clr_GPIO(GPIO_EMU_MUX1); -+ clr_GPIO(GPIO_EMU_MUX2); -+ -+} -+ -+void emu_switch_to_audio(int stereo) -+{ -+ clr_GPIO(GPIO39_VPOUT); -+ if (stereo) { -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_IN); -+ clr_GPIO(GPIO39_VPOUT); -+ } else { -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ } -+ -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); -+ set_GPIO(GPIO_EMU_MUX1); -+ if (stereo) -+ set_GPIO(GPIO_EMU_MUX2); -+ else -+ clr_GPIO(GPIO_EMU_MUX2); -+} -+ -+void emu_switch_to_nothing(void) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); -+ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); -+ set_GPIO(GPIO34_TXENB); -+ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); -+ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); -+ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); -+ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); -+} -+ -+ -+static irqreturn_t emu_irq(int irq, void *data) -+{ -+ switch (irq) { -+ case EZX_IRQ_USB4V: -+ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V)) -+ emu_switch_to_default(); -+ break; -+ case EZX_IRQ_USB1V: -+ if(!ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_1V)) -+ emu_switch_to_nothing(); -+ break; -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+static int __init ezx_emu_probe(struct platform_device *dev) -+{ -+ pxa_gpio_mode(GPIO_SNP_INT_IN | GPIO_IN); -+ pxa_gpio_mode(GPIO_EMU_MUX1 | GPIO_OUT); -+ pxa_gpio_mode(GPIO_EMU_MUX2 | GPIO_OUT); -+ -+ request_irq(EZX_IRQ_USB4V, &emu_irq, SA_INTERRUPT, "usb 4v", NULL); -+ request_irq(EZX_IRQ_USB1V, &emu_irq, SA_INTERRUPT, "usb 1v", NULL); -+ -+ pxa_set_udc_info(&ezx_udc_info); -+ -+ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V)) -+ emu_switch_to_default(); -+ else -+ emu_switch_to_nothing(); -+ -+ return 0; -+} -+ -+static int ezx_emu_remove(struct platform_device *dev) -+{ -+ free_irq(EZX_IRQ_USB4V, NULL); -+ free_irq(EZX_IRQ_USB1V, NULL); -+ -+ return 0; -+} -+ -+static int ezx_emu_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ emu_switch_to_nothing(); -+ return 0; -+} -+ -+static int ezx_emu_resume(struct platform_device *dev) -+{ -+ emu_switch_to_default(); -+ return 0; -+} -+ -+/* USB Device Controller */ -+static int udc_connected_status; -+static void ezx_udc_command(int cmd) -+{ -+ switch (cmd) { -+ case PXA2XX_UDC_CMD_DISCONNECT: -+ printk(KERN_NOTICE "USB cmd disconnect\n"); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,0); -+ udc_connected_status = 0; -+ break; -+ case PXA2XX_UDC_CMD_CONNECT: -+ printk(KERN_NOTICE "USB cmd connect\n"); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,1); -+ udc_connected_status = 1; -+ break; -+ } -+} -+ -+static int ezx_udc_is_connected(void) -+{ -+ return udc_connected_status; -+} -+ -+static struct pxa2xx_udc_mach_info ezx_udc_info __initdata = { -+ .udc_is_connected = ezx_udc_is_connected, -+ .udc_command = ezx_udc_command, -+}; -+ -+static struct platform_driver ezxemu_driver = { -+ .probe = ezx_emu_probe, -+ .remove = ezx_emu_remove, -+ .suspend = ezx_emu_suspend, -+ .resume = ezx_emu_resume, -+ .driver = { -+ .name = "ezx-emu", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+int __init ezx_emu_init(void) -+{ -+ return platform_driver_register(&ezxemu_driver); -+} -+ -+void ezx_emu_fini(void) -+{ -+ return platform_driver_unregister(&ezxemu_driver); -+} -+ -+module_init(ezx_emu_init); -+module_exit(ezx_emu_fini); -+ -+MODULE_DESCRIPTION("Motorola Enchanced Mini Usb driver"); -+MODULE_AUTHOR("Daniel Ribeiro "); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 02:28:47.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 02:31:16.000000000 -0300 -@@ -73,6 +73,7 @@ - - endchoice - -+ - endif - - if PXA_EZX -@@ -100,6 +101,28 @@ - config EZX_PCAP - bool "PCAP Support" - -+config EZX_EMU -+ bool "Motorola Enchanced Mini Usb" -+ depends on EZX_PCAP -+ -+if EZX_EMU -+ -+choice -+ prompt "Select default EMU mode" -+ -+config EZX_EMU_USB -+ bool "USB" -+ -+config EZX_EMU_UART -+ bool "UART" -+ -+config EZX_EMU_NOTHING -+ bool "nothing" -+ -+endchoice -+ -+endif -+ - endif - - endmenu -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 02:28:47.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 02:31:16.000000000 -0300 -@@ -150,11 +150,35 @@ - .resource = ezxpcap_resources, - }; - -+/* EMU */ -+static struct resource ezxemu_resources[] = { -+ [0] = { -+ .start = EZX_IRQ_USB4V, -+ .end = EZX_IRQ_USB4V, -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = EZX_IRQ_USB1V, -+ .end = EZX_IRQ_USB1V, -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+struct platform_device ezxemu_device = { -+ .name = "ezx-emu", -+ .id = -1, -+ .dev = { -+ .parent = &ezxpcap_device.dev, -+ }, -+ .num_resources = ARRAY_SIZE(ezxemu_resources), -+ .resource = ezxemu_resources, -+}; - - static struct platform_device *devices[] __initdata = { - &ezxssp_device, - &ezxbp_device, - &ezxpcap_device, -+ &ezxemu_device, - }; - - /* PM */ -Index: linux-2.6.21/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 02:28:47.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 02:31:16.000000000 -0300 -@@ -24,6 +24,7 @@ - obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o - obj-$(CONFIG_EZX_BP) += ezx-bp.o - obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o -+obj-$(CONFIG_EZX_EMU) += ezx-emu.o - - # Support for blinky lights - led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch b/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch deleted file mode 100644 index 7c020a2d96..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-kbd.patch +++ /dev/null @@ -1,139 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-kbd.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-kbd.c 2007-04-30 20:33:19.000000000 -0300 -@@ -0,0 +1,109 @@ -+#include -+#include -+#include -+ -+extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *); -+ -+#if defined(CONFIG_PXA_EZX_E680) -+static unsigned char ezx_keycode[] = { -+ /* row 0 */ -+ KEY_UP, KEY_RIGHT, KEY_RESERVED, KEY_PHONE, -+ /* row 1 */ -+ KEY_DOWN, KEY_LEFT, KEY_VOLUMEUP, KEY_VOLUMEDOWN, -+ /* row 2 */ -+ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_KPENTER, -+}; -+ -+static unsigned char ezx_direct_keycode[] = { -+ KEY_CAMERA, -+ KEYPAD_RESERVED, -+ KEYPAD_RESERVED, -+ KEYPAD_HOME, -+ KEY_POWER, -+ KEYPAD_MENU, -+}; -+#elif defined(CONFIG_PXA_EZX_A780) -+static unsigned char ezx_keycode[] = { -+ /* row 0 */ -+ KEY_KPENTER, KEY_MENU, KEY_CANCEL, KEY_PAGEUP, KEY_UP, -+ /* row 1 */ -+ KEY_KP1, KEY_KP2, KEY_KP3, KEY_ENTER, KEY_KPENTER, /*center joypad */ -+ /* row 2 */ -+ KEY_KP4, KEY_KP5, KEY_KP6, KEY_PAGEDOWN, KEY_PHONE, -+ /* row 3 */ -+ KEY_KP7, KEY_KP8, KEY_KP9, KEY_PHONE, KEY_LEFT, -+ /* row 4 */ -+ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN, -+}; -+static unsigned char ezx_direct_keycode[] = { -+ KEY_CAMERA, -+}; -+#else -+#error "no EZX subarchitecture defined" -+#endif -+ -+static int ezx_kbd_init(void) -+{ -+#if defined(CONFIG_PXA_EZX_E680) -+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, VR Key */ -+ pxa_gpio_mode(96 | GPIO_ALT_FN_1_IN); /* KP_DKIN<3>, GAME_A */ -+ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_DKIN<4>, power key */ -+ pxa_gpio_mode(98 | GPIO_ALT_FN_1_IN); /* KP_DKIN<5>, GAME_B */ -+ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ -+ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ -+ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ -+ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ -+ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ -+ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ -+ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ -+ pxa_gpio_mode(GPIO_TC_MM_EN); -+ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN); -+ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN); -+ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN); -+#elif defined(CONFIG_PXA_EZX_A780) -+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, voice_rec */ -+ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */ -+ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */ -+ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ -+ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ -+ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ -+ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ -+ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ -+ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ -+ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ -+ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */ -+#endif -+ return 0; -+} -+ -+static struct pxakbd_platform_data ezx_kbd_platform_data = { -+ .init = &ezx_kbd_init, -+ .scan_interval = HZ/40, -+ .matrix = { -+ .keycode = ezx_keycode, -+#if defined(CONFIG_PXA_EZX_E680) -+ .cols = 4, -+ .rows = 3, -+#elif defined(CONFIG_PXA_EZX_A780) -+ .cols = 5, -+ .rows = 5, -+#endif -+ }, -+ .direct = { -+ .keycode = ezx_direct_keycode, -+#if defined(CONFIG_PXA_EZX_E680) -+ .num = 6, -+#elif defined(CONFIG_PXA_EZX_A780) -+ .num = 1, -+#endif -+ }, -+}; -+ -+ -+int __init __ezx_kbd_init (void) -+{ -+ pxa_set_kbd_info(&ezx_kbd_platform_data); -+ return 0; -+} -+ -+arch_initcall(__ezx_kbd_init); -Index: linux-2.6.21/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-04-30 20:09:21.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-04-30 20:09:34.000000000 -0300 -@@ -18,7 +18,7 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o --obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o ezx-kbd.o - obj-$(CONFIG_PXA_EZX_EMU) += ezx-emu.o - - # Support for blinky lights -Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c -=================================================================== ---- linux-2.6.21.orig/drivers/input/keyboard/pxakbd.c 2007-04-30 20:47:29.000000000 -0300 -+++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-04-30 20:49:32.000000000 -0300 -@@ -213,6 +213,7 @@ - if (!input_dev) - goto out_pxa; - -+ spin_lock_init(&pxakbd->lock); - pxakbd->irq = platform_get_irq(pdev, 0); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r || pxakbd->irq == NO_IRQ) { diff --git a/packages/linux/linux-ezx-2.6.21/ezx-mci.patch b/packages/linux/linux-ezx-2.6.21/ezx-mci.patch deleted file mode 100644 index d16693e3e4..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-mci.patch +++ /dev/null @@ -1,177 +0,0 @@ -Index: linux-2.6.20.7/arch/arm/mach-pxa/ezx-mci.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.20.7/arch/arm/mach-pxa/ezx-mci.c 2007-04-20 01:10:13.000000000 -0300 -@@ -0,0 +1,159 @@ -+/* -+ * linux/arch/arm/mach-ezx/a780.c -+ * -+ * Support for the Motorola Ezx A780 Development Platform. -+ * -+ * Author: Zhuang Xiaofan -+ * Created: Nov 25, 2003 -+ * Copyright: Motorola Inc. -+ * -+ * 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. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+extern int ezx_pcap_mmcsd_power(int); -+extern void ezx_pcap_mmcsd_voltage(u_int32_t); -+ -+static struct pxamci_platform_data ezx_mci_platform_data; -+ -+static int ezx_mci_init(struct device *dev, -+ irqreturn_t (*ezx_detect_int)(int, void *), -+ void *data) -+{ -+ int err; -+ printk("%s entered\n", __FUNCTION__); -+ -+ /* Setup GPIO for PXA27x MMC/SD controller */ -+ pxa_gpio_mode(GPIO32_MMCCLK_MD); -+ pxa_gpio_mode(GPIO112_MMCCMD_MD); -+ pxa_gpio_mode(GPIO92_MMCDAT0_MD); -+ pxa_gpio_mode(GPIO109_MMCDAT1_MD); -+ pxa_gpio_mode(GPIO110_MMCDAT2_MD); -+ pxa_gpio_mode(GPIO111_MMCDAT3_MD); -+ -+ ezx_pcap_mmcsd_power(1); -+ -+ ezx_mci_platform_data.detect_delay = msecs_to_jiffies(250); -+ -+ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, -+ "MMC card detect", data); -+ if (err) { -+ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " -+ "MMC card detect IRQ\n"); -+ return -1; -+ } -+ -+ set_irq_type(0x0b, IRQT_BOTHEDGE); -+ -+ return 0; -+} -+ -+static int ezx_mci_get_ro(struct device *dev) -+{ -+ printk("%s entered\n", __FUNCTION__); -+#if defined(CONFIG_PXA_EZX_E680) -+ /* this is only e680, i guess */ -+ // return GPIO_is_high(96+4); -+ return (GPLR3 & 0x800); -+#else -+ return 0; -+#endif -+} -+ -+#if defined(CONFIG_PXA_EZX_A780) -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 5, -+ [MMC_VDD_170] = 5, -+ [MMC_VDD_180] = 6, -+ [MMC_VDD_190] = 6, -+ [MMC_VDD_200] = 7, -+ [MMC_VDD_210] = 7, -+ [MMC_VDD_220] = 8, -+ [MMC_VDD_230] = 8, -+ [MMC_VDD_240] = 9, -+ [MMC_VDD_250] = 9, -+ [MMC_VDD_260] = 10, -+ [MMC_VDD_270] = 10, -+ [MMC_VDD_280] = 11, -+ [MMC_VDD_290] = 11, -+ [MMC_VDD_300] = 12, -+ [MMC_VDD_310] = 12, -+ [MMC_VDD_320] = 13, -+ [MMC_VDD_330] = 13, -+ [MMC_VDD_340] = 14, -+ [MMC_VDD_350] = 14, -+ [MMC_VDD_360] = 15, -+}; -+#elif defined(CONFIG_PXA_EZX_E680) -+static u_int8_t mmc_voltage[] = { -+ [MMC_VDD_160] = 3, -+ [MMC_VDD_170] = 3, -+ [MMC_VDD_180] = 3, -+ [MMC_VDD_190] = 3, -+ [MMC_VDD_200] = 3, -+ [MMC_VDD_210] = 3, -+ [MMC_VDD_220] = 3, -+ [MMC_VDD_230] = 3, -+ [MMC_VDD_240] = 3, -+ [MMC_VDD_250] = 3, -+ [MMC_VDD_260] = 3, -+ [MMC_VDD_270] = 3, -+ [MMC_VDD_280] = 3, -+ [MMC_VDD_290] = 3, -+ [MMC_VDD_300] = 3, -+ [MMC_VDD_310] = 3, -+ [MMC_VDD_320] = 3, -+ [MMC_VDD_330] = 3, -+ [MMC_VDD_340] = 3, -+ [MMC_VDD_350] = 3, -+ [MMC_VDD_360] = 3, -+}; -+#endif -+ -+static void ezx_mci_setpower(struct device *dev, unsigned int vdd) -+{ -+ printk("%s(vdd=%u) entered\n", __FUNCTION__, vdd); -+ if (vdd <= MMC_VDD_360) -+ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); -+ -+ ezx_pcap_mmcsd_power(1); -+} -+ -+static void ezx_mci_exit(struct device *dev, void *data) -+{ -+ printk("%s entered\n", __FUNCTION__); -+ ezx_pcap_mmcsd_power(0); -+ free_irq(0x49, data); -+} -+ -+static struct pxamci_platform_data ezx_mci_platform_data = { -+#if defined(CONFIG_PXA_EZX_E680) -+ .ocr_mask = MMC_VDD_27_28, -+#elif defined(CONFIG_PXA_EZX_A780) -+ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 -+ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 -+ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 -+ |MMC_VDD_34_35|MMC_VDD_35_36, -+#endif -+ .init = ezx_mci_init, -+ .get_ro = ezx_mci_get_ro, -+ .setpower = ezx_mci_setpower, -+ .exit = ezx_mci_exit, -+}; -+ -+int __init __ezx_mci_init (void) -+{ -+ pxa_set_mci_info(&ezx_mci_platform_data); -+ return 0; -+} -+ -+arch_initcall(__ezx_mci_init); -Index: linux-2.6.20.7/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.20.7.orig/arch/arm/mach-pxa/Makefile 2007-04-21 02:56:16.000000000 -0300 -+++ linux-2.6.20.7/arch/arm/mach-pxa/Makefile 2007-04-21 03:00:03.000000000 -0300 -@@ -18,7 +18,7 @@ - obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o - obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o - obj-$(CONFIG_MACH_TOSA) += tosa.o --obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o -+obj-$(CONFIG_PXA_EZX) += ezx.o ezx_lcd.o ezx_ssp.o ezx-pcap.o ezx-mci.o - - # Support for blinky lights - led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/ezx-mtd-map.patch b/packages/linux/linux-ezx-2.6.21/ezx-mtd-map.patch deleted file mode 100644 index 7ef42f0ffc..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-mtd-map.patch +++ /dev/null @@ -1,274 +0,0 @@ -Index: linux-2.6.21/drivers/mtd/maps/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/mtd/maps/Kconfig 2007-04-26 00:08:32.000000000 -0300 -+++ linux-2.6.21/drivers/mtd/maps/Kconfig 2007-04-26 20:49:33.000000000 -0300 -@@ -595,6 +595,28 @@ - help - This enables access to the flash chip on the Sharp SL Series of PDAs. - -+config MTD_EZX -+ tristate "Map driver for Motorola EZX Platform" -+ depends on MTD && PXA_EZX -+ -+if MTD_EZX -+ -+choice -+ prompt "Select partition mapping for EZX platform" -+ -+config MTD_EZX_A780 -+ bool "A780/E680 Original Mapping" -+ -+config MTD_EZX_A780_ALTERNATE -+ bool "A780/E680 Alternate Mapping for BLOB2" -+ -+config MTD_EZX_E2 -+ bool "E2 Original Mapping" -+ -+endchoice -+ -+endif -+ - config MTD_PLATRAM - tristate "Map driver for platform device RAM (mtd-ram)" - depends on MTD -Index: linux-2.6.21/drivers/mtd/maps/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/mtd/maps/Makefile 2007-04-26 00:08:32.000000000 -0300 -+++ linux-2.6.21/drivers/mtd/maps/Makefile 2007-04-26 20:30:30.000000000 -0300 -@@ -72,3 +72,4 @@ - obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o - obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o - obj-$(CONFIG_MTD_TQM834x) += tqm834x.o -+obj-$(CONFIG_MTD_EZX) += ezx-flash.o -Index: linux-2.6.21/drivers/mtd/maps/ezx-flash.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/mtd/maps/ezx-flash.c 2007-04-26 20:30:30.000000000 -0300 -@@ -0,0 +1,227 @@ -+/* -+ * $Id: $ -+ * -+ * Map driver for the PXA27x -+ * -+ * Author: Harald Welte -+ * Copyright: (C) 2001 MontaVista Software Inc. -+ * -+ * 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. -+ * -+ * Mar 3, 2007 - (Daniel Ribeiro) Alternate partition table -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#define WINDOW_ADDR 0x0 -+#define WINDOW_SIZE (32*1024*1024) -+#define WINDOW_CACHE_ADDR 0x0 -+#define WINDOW_CACHE_SIZE 0x1a00000 -+ -+static void pxa27x_map_inval_cache(struct map_info *map, unsigned long from, -+ ssize_t len) -+{ -+#if 0 -+ unsigned long endaddress, i, j; -+ endaddress = from + len -1; -+ from &= ~(32-1); -+ endaddress &= ~(32-1); -+ for (i = from; i <= endaddress; i += 32) -+ asm("mcr p15, 0, %0, c7, c6, 1"::"r"(i)); -+ -+ asm( "mrc p15, 0, %0, c2, c0, 0\n" -+ "mov %0, %0\n" -+ "sub pc, pc #4" -+ :"=r"(j)); -+#else -+ consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); -+#endif -+} -+ -+ -+struct map_info pxa27x_map = { -+ .name = "PXA27x flash", -+ .size = WINDOW_SIZE, -+ .phys = WINDOW_ADDR, -+ .inval_cache = &pxa27x_map_inval_cache, -+}; -+ -+#if defined CONFIG_MTD_EZX_A780_ALTERNATE -+static struct mtd_partition pxa27x_partitions[] = { -+ { -+ .name = "Bootloader (RO)", -+ .size = 0x00020000, -+ .offset = 0, -+ .mask_flags = MTD_WRITEABLE, -+ }, { -+ .name = "Bootloader 2", -+ .size = 0x00020000, -+ .offset = 0x00020000, -+ } , { -+ .name = "Kernel 1", -+ .size = 0x000e0000, // 896KB -+ .offset = 0x00040000, -+ } , { -+ .name = "rootfs", -+ .size = 0x01760000, -+ .offset = 0x00120000, -+ } , { -+ .name = "Kernel 2", -+ .size = 0x00180000, // 1.5MB -+ .offset = 0x01880000, -+ } , { -+ .name = "VFM_Filesystem", -+ .size = 0x005a0000, -+ .offset = 0x01a00000, -+ } , { -+ .name = "setup", -+ .size = 0x00020000, -+ .offset = 0x01fa0000, -+ } , { -+ .name = "Logo", -+ .size = 0x00020000, -+ .offset = 0x01fc0000, -+ }, -+}; -+#elif defined CONFIG_MTD_EZX_A780 -+static struct mtd_partition pxa27x_partitions[] = { -+ { -+ .name = "Bootloader", -+ .size = 0x00020000, -+ .offset = 0, -+ .mask_flags = MTD_WRITEABLE, -+ }, { -+ .name = "Kernel", -+ .size = 0x000e0000, -+ .offset = 0x00020000, -+ } , { -+ .name = "rootfs", -+ .size = 0x018e0000, -+ .offset = 0x00120000, -+ } , { -+ .name = "VFM_Filesystem", -+ .size = 0x00580000, -+ .offset = 0x01a00000, -+ } , { -+ .name = "setup", -+ .size = 0x00020000, -+ .offset = 0x01fa0000, -+ } , { -+ .name = "Logo", -+ .size = 0x00020000, -+ .offset = 0x01fc0000, -+ }, -+}; -+#else -+#error "please define partition for this PXA27x implementation" -+#endif -+ -+ -+static struct mtd_info *mymtd; -+static struct mtd_partition *parsed_parts; -+ -+static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; -+ -+static int __init init_pxa27x(void) -+{ -+ struct mtd_partition *parts; -+ int nb_parts = 0; -+ int parsed_nr_parts = 0; -+ char *part_type = "static"; -+ -+ pxa27x_map.bankwidth = (BOOT_DEF & 1) ? 2 : 4; -+ -+ printk("Probing PXA27x flash at physical address 0x%08x (%d-bit bankwidth)\n", -+ WINDOW_ADDR, pxa27x_map.bankwidth * 8); -+ pxa27x_map.virt = ioremap(pxa27x_map.phys, pxa27x_map.size); -+ -+ if (!pxa27x_map.virt) { -+ printk("Failed to ioremap\n"); -+ return -EIO; -+ } -+ -+ mymtd = do_map_probe("cfi_probe", &pxa27x_map); -+ if (!mymtd) { -+ iounmap((void *)pxa27x_map.virt); -+ return -ENXIO; -+ } -+ mymtd->owner = THIS_MODULE; -+ -+#if 0 -+ /* ioremap the first flash chip as cacheable */ -+ pxa27x_map.cached = ioremap_cached(pxa27x_map.phys, pxa27x_map.size); -+ if (!pxa27x_map.cached) { -+ printk("Failed to do cacheable-ioremap\n"); -+ iounmap((void *)pxa27x_map.virt); -+ return -EIO; -+ } -+#endif -+ simple_map_init(&pxa27x_map); -+ -+ if (parsed_nr_parts == 0) { -+ int ret = parse_mtd_partitions(mymtd, probes, &parsed_parts, 0); -+ -+ if (ret > 0) { -+ part_type = "RedBoot"; -+ parsed_nr_parts = ret; -+ } -+ } -+ -+ if (parsed_nr_parts > 0) { -+ parts = parsed_parts; -+ nb_parts = parsed_nr_parts; -+ } else { -+ parts = pxa27x_partitions; -+ nb_parts = ARRAY_SIZE(pxa27x_partitions); -+ } -+ -+ if (nb_parts) { -+ printk(KERN_NOTICE "Using %s partition definition\n", part_type); -+ add_mtd_partitions(mymtd, parts, nb_parts); -+ } else { -+ add_mtd_device(mymtd); -+ } -+#if 0 -+ if (ret = ezx_partition_init()) -+#endif -+ return 0; -+} -+ -+static void __exit cleanup_pxa27x(void) -+{ -+ if (mymtd) { -+ del_mtd_partitions(mymtd); -+ map_destroy(mymtd); -+ if (parsed_parts) -+ kfree(parsed_parts); -+ } -+ if (pxa27x_map.virt) -+ iounmap((void *)pxa27x_map.virt); -+ if (pxa27x_map.cached) -+ iounmap((void *)pxa27x_map.cached); -+ return; -+} -+ -+module_init(init_pxa27x); -+module_exit(cleanup_pxa27x); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_DESCRIPTION("MTD map driver for Motorola EZX platform"); diff --git a/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch b/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch deleted file mode 100644 index 41903260e6..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-pcap.patch +++ /dev/null @@ -1,1192 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c 2007-05-08 16:13:29.000000000 -0300 -@@ -0,0 +1,428 @@ -+/* Driver for Motorola PCAP2 as present in EZX phones -+ * -+ * This is both a SPI device driver for PCAP itself, as well as -+ * an IRQ demultiplexer for handling PCAP generated events such as -+ * headphone jack sense by downstream drivers. -+ * -+ * (C) 2006 by Harald Welte -+ * -+ * 2007, April - Daniel Ribeiro -+ * Altered to work with corgi's SSP code. -+ * Fixed irq handling routine. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "ezx.h" -+ -+#if 0 -+#define DEBUGP(x, args...) printk(x, ## args) -+#else -+#define DEBUGP(x, args...) -+#endif -+ -+extern unsigned long ezx_ssp_pcap_putget(ulong); -+ -+ -+int ezx_pcap_write(u_int8_t reg_num, u_int32_t value) -+{ -+ value &= SSP_PCAP_REGISTER_VALUE_MASK; -+ value |= SSP_PCAP_REGISTER_WRITE_OP_BIT -+ | (reg_num<> SSP_PCAP_REGISTER_ADDRESS_SHIFT; -+ -+ ret = ezx_pcap_read(reg_num, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ if (to == 0) -+ tmp &= ~bit; -+ else -+ tmp |= bit; -+ -+ return ezx_pcap_write(reg_num, tmp); -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_bit_set); -+ -+int ezx_pcap_read_bit(u_int32_t bit) -+{ -+ int ret; -+ u_int32_t tmp; -+ u_int8_t reg_num = (bit & SSP_PCAP_REGISTER_ADDRESS_MASK) -+ >> SSP_PCAP_REGISTER_ADDRESS_SHIFT; -+ -+ ret = ezx_pcap_read(reg_num, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ return tmp & (bit & SSP_PCAP_REGISTER_VALUE_MASK); -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_read_bit); -+ -+ -+void ezx_pcap_vibrator_level(u_int32_t value) -+{ -+ u_int32_t tmp; -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp); -+ -+ tmp &= (~SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK); -+ tmp |= value; -+ -+ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp); -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_vibrator_level); -+ -+static int __init pcap_init(void) -+{ -+ /* initialize registers */ -+#warning FIXME: pcap_init still chip level -+ /* implement a per board pcap init reg array? */ -+ -+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, PCAP_MASK_ALL_INTERRUPT); -+ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL, 1); -+ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); -+ -+ /* set SW1 sleep to keep SW1 1.3v in sync mode */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11, 0); -+ /* SW1 active in sync mode */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01, 0); -+ /* at SW1 -core voltage to 1.30V */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS, 0); -+ -+ /* when STANDY2 PIN ACTIVE (high) set V3-- sram V8 -- pll off */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR, 0); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR, 0); -+ -+ /* when STANDY2 PIN ACTIVE (high) set V4-- lcd only for e680 V6 --- -+ * camera for e680 */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR, 1); -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR, 0); -+ -+ /* set Vc to low power mode when AP sleep */ -+ //SSP_PCAP_bit_set( SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY); -+ -+ /* set VAUX2 to voltage 2.775V and low power mode when AP sleep */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0, 0); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR, 1); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 1); -+ -+ PGSR(GPIO34_TXENB) |= GPIO_bit(GPIO34_TXENB); -+ -+ return 0; -+} -+/* MMC/SD specific functions */ -+ -+void ezx_pcap_mmcsd_voltage(u_int32_t bits) -+{ -+ unsigned int tmp; -+ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp); -+#if defined(CONFIG_PXA_EZX_E680) -+ tmp &= 0xffffff9f; /* zero all vaux2 bits */ -+ tmp |= (bits & 0x3) << 5; -+#elif defined(CONFIG_PXA_EZX_A780) -+ tmp &= 0xfffff0ff; /* zero all vaux3 bits */ -+ tmp |= (bits & 0xf) << 8; -+#endif -+ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp); -+} -+EXPORT_SYMBOL(ezx_pcap_mmcsd_voltage); -+ -+int ezx_pcap_mmcsd_power(int on) -+{ -+ if (on) { -+#if defined(CONFIG_PXA_EZX_E680) -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 1); -+#else -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN, 1); -+#endif -+ } else { -+#if defined(CONFIG_PXA_EZX_E680) -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 0); -+#else -+ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN, 0); -+#endif -+ } -+} -+EXPORT_SYMBOL_GPL(ezx_pcap_mmcsd_power); -+ -+/* IRQ Handling */ -+ -+/* Array indexed by BIT POSITION of PCAP register, returns IRQ number */ -+static unsigned int pcap2irq[] = { -+ [0] = EZX_IRQ_ADCDONE, -+ [1] = EZX_IRQ_TS, -+ [2] = 0, /* 1HZ */ -+ [3] = 0, /* WH */ -+ [4] = 0, /* WL */ -+ [5] = 0, /* TODA */ -+ [6] = EZX_IRQ_USB4V, -+ [7] = 0, /* ONOFF */ -+ [8] = 0, /* ONOFF2 */ -+ [9] = EZX_IRQ_USB1V, -+ [10] = 0, /* MOBPORT */ -+ [11] = EZX_IRQ_MIC, -+ [12] = EZX_IRQ_HEADJACK, -+ [13] = 0, /* ST */ -+ [14] = 0, /* PC */ -+ [15] = 0, /* WARM */ -+ [16] = 0, /* EOL */ -+ [17] = 0, /* CLK */ -+ [18] = 0, /* SYSRST */ -+ [19] = 0, -+ [20] = EZX_IRQ_ADCDONE2, -+ [21] = 0, /* SOFTRESET */ -+ [22] = 0, /* MNEXB */ -+}; -+ -+/* Array indexed by IRQ NUMBER, returns PCAP absolute value */ -+static unsigned int irq2pcap[] = { -+ [EZX_IRQ_USB4V] = SSP_PCAP_ADJ_BIT_ISR_USB4VI, -+ [EZX_IRQ_USB1V] = SSP_PCAP_ADJ_BIT_ISR_USB1VI, -+ [EZX_IRQ_HEADJACK] = SSP_PCAP_ADJ_BIT_ISR_A1I, -+ [EZX_IRQ_MIC] = SSP_PCAP_ADJ_BIT_ISR_MB2I, -+ [EZX_IRQ_ADCDONE] = SSP_PCAP_ADJ_BIT_ISR_ADCDONEI, -+ [EZX_IRQ_TS] = SSP_PCAP_ADJ_BIT_ISR_TSI, -+ [EZX_IRQ_ADCDONE2] = SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, -+}; -+ -+static void pcap_ack_irq(unsigned int irq) -+{ -+ DEBUGP("pcap_ack_irq: %u\n", irq); -+ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, irq2pcap[irq]); -+} -+ -+static void pcap_mask_irq(unsigned int irq) -+{ -+ u_int32_t reg; -+ -+ DEBUGP("pcap_mask_irq: %u\n", irq); -+ -+ /* this needs to be atomic... but we're not on SMP so it is */ -+ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, ®); -+ reg |= irq2pcap[irq]; -+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, reg); -+} -+ -+static void pcap_unmask_irq(unsigned int irq) -+{ -+ u_int32_t tmp; -+ DEBUGP("pcap_unmask_irq: %u\n", irq); -+ -+ /* this needs to be atomic... but we're not on SMP so it is */ -+ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, &tmp); -+ tmp &= ~irq2pcap[irq]; -+ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, tmp); -+} -+ -+static struct irq_chip pcap_chip = { -+ .ack = pcap_ack_irq, -+ .mask = pcap_mask_irq, -+ .unmask = pcap_unmask_irq, -+}; -+ -+/* handler for interrupt received from PCAP via GPIO */ -+static void pcap_irq_demux_handler(unsigned int irq, struct irq_desc *desc) -+{ -+ int i; -+ const unsigned int cpu = smp_processor_id(); -+ u_int32_t reg, mask; -+ -+ spin_lock(&desc->lock); -+ -+ DEBUGP("pcap_irq_demux_handler(%u,,) entered\n", irq); -+ -+ desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); -+ -+ if (unlikely(desc->status & IRQ_INPROGRESS)) { -+ DEBUGP("irq busy, masking it off\n"); -+ desc->status |= (IRQ_PENDING | IRQ_MASKED); -+ desc->chip->mask(irq); -+ desc->chip->ack(irq); -+ goto out_unlock; -+ } -+ -+ kstat_cpu(cpu).irqs[irq]++; -+ desc->chip->ack(irq); -+ desc->status |= IRQ_INPROGRESS; -+ -+ do { -+ if (unlikely((desc->status & -+ (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == -+ (IRQ_PENDING | IRQ_MASKED))) { -+ DEBUGP("dealing with pending IRQ, unmasking\n"); -+ desc->chip->unmask(irq); -+ desc->status &= ~IRQ_MASKED; -+ } -+ -+ desc->status &= ~IRQ_PENDING; -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_ISR_REGISTER, ®); -+ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, &mask); -+ DEBUGP("pcap_irq_demux_handler: ISR=0x%08x MSR=0x%08x\n", reg, mask); -+ -+ for (i = ARRAY_SIZE(pcap2irq)-1; i >= 0; i--) { -+ unsigned int pirq = pcap2irq[i]; -+ if (pirq == 0) -+ continue; -+ -+ if ((reg & (1 << i)) && !(mask & (1 << i))) { -+ struct irq_desc *subdesc; -+ DEBUGP("found irq %u\n", pirq); -+ subdesc = irq_desc + pirq; -+ -+ kstat_cpu(cpu).irqs[pirq]++; -+ subdesc->chip->ack(pirq); -+ -+ spin_unlock(&desc->lock); -+ handle_IRQ_event(pirq, subdesc->action); -+ spin_lock(&desc->lock); -+ } -+ } -+ -+ } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); -+ -+ desc->status &= ~IRQ_INPROGRESS; -+ -+out_unlock: -+ spin_unlock(&desc->lock); -+} -+ -+static int ezx_pcap_remove(struct platform_device *pdev) -+{ -+ int irq; -+ DEBUGP("exz_pcap_remove entered\n"); -+ -+ set_irq_chained_handler(IRQ_GPIO1, NULL); -+ -+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { -+ set_irq_chip(irq, NULL); -+ set_irq_handler(irq, NULL); -+ set_irq_flags(irq, 0); -+ } -+ -+ return 0; -+} -+ -+static int __init ezx_pcap_probe(struct platform_device *pdev) -+{ -+ unsigned int irq; -+ DEBUGP("ezx_pcap_probe entered\n"); -+ -+ pcap_init(); -+ -+ set_irq_type(IRQ_GPIO1, IRQT_RISING); -+ /* set up interrupt demultiplexing code for PCAP2 irqs */ -+ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { -+ set_irq_chip(irq, &pcap_chip); -+ set_irq_handler(irq, handle_edge_irq); -+ set_irq_flags(irq, IRQF_VALID); -+ } -+ set_irq_chained_handler(IRQ_GPIO1, pcap_irq_demux_handler); -+ -+ printk("ezx-pcap: ssp driver registered\n"); -+ -+ return 0; -+} -+ -+static int ezx_pcap_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ DEBUGP("pcap suspend!\n"); -+ return 0; -+} -+ -+static int ezx_pcap_resume(struct platform_device *dev) -+{ -+ DEBUGP("pcap resume!\n"); -+ /* ack all irqs */ -+ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER); -+ return 0; -+} -+ -+static struct platform_driver ezxpcap_driver = { -+ .probe = ezx_pcap_probe, -+ .remove = ezx_pcap_remove, -+ .suspend = ezx_pcap_suspend, -+ .resume = ezx_pcap_resume, -+ .driver = { -+ .name = "ezx-pcap", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init ezx_pcap_init(void) -+{ -+ DEBUGP("ezx_pcap_init entered\n"); -+ return platform_driver_register(&ezxpcap_driver); -+} -+ -+static void __exit ezx_pcap_exit(void) -+{ -+ return platform_driver_unregister(&ezxpcap_driver); -+} -+ -+module_init(ezx_pcap_init); -+module_exit(ezx_pcap_exit); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte"); -+MODULE_DESCRIPTION("SPI Driver for Motorola PCAP2"); -+ -Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h 2007-05-08 04:03:42.000000000 -0300 -@@ -0,0 +1,665 @@ -+/* (c) Copyright Motorola Beijing 2002 all rights reserved. -+ -+ Project Name : EZX -+ Project No. : -+ Title : -+ File Name : -+ Description : -+ -+ ************** REVISION HISTORY ********************************************** -+ Date Author Reference -+ ======== ========== ========================== -+ 2002-07-01 weiqiang lin create -+*/ -+#ifndef SSP_PCAP_H -+#define SSP_PCAP_H -+ -+#define SSP_vibrate_start_command() SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ -+ SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) -+ -+#define SSP_vibrate_stop_command() SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ -+ SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) -+ -+#define SSP_PCAP_REGISTER_VALUE_LENGTH 16 -+ -+#define SSP_PCAP_REGISTER_WRITE_OP_BIT 0x80000000 -+#define SSP_PCAP_REGISTER_READ_OP_BIT 0x00000000 -+ -+#define SSP_PCAP_REGISTER_VALUE_UP_WORD_MASK 0xffff0000 -+#define SSP_PCAP_REGISTER_VALUE_DOWN_WORD_MASK 0x0000ffff -+ -+#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff -+#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff -+#define SSP_PCAP_REGISTER_ADDRESS_MASK 0x7c000000 -+#define SSP_PCAP_REGISTER_ADDRESS_SHIFT 26 -+#define SSP_PCAP_REGISTER_NUMBER 32 -+ -+#define SSP_PCAP_ADC_START_VALUE_SET_MASK 0xfffffc00 -+#define SSP_PCAP_ADC_START_VALUE 0x000001dd -+ -+ -+#define SSP_PCAP_PHONE_CDC_CLOCK_MASK 0x000001c0 -+#define SSP_PCAP_STEREO_SAMPLE_RATE_MASK 0x00000f00 -+#define SSP_PCAP_STEREO_BCLK_TIME_SLOT_MASK 0x00018000 -+#define SSP_PCAP_STEREO_CLOCK_MASK 0x0000001c -+#define SSP_PCAP_DIGITAL_AUDIO_MODE_MASK 0x00006000 -+#define SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK 0x000e0000 -+#define SSP_PCAP_MONO_PGA_MASK 0x00180000 -+ -+#define SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK 0x00300000 -+ -+#define SSP_PCAP_AUDIO_IN_GAIN_MASK 0x0000001f -+#define SSP_PCAP_AUDIO_IN_GAIN_SHIFT 0 -+#define SSP_PCAP_AUDIO_OUT_GAIN_MASK 0x0001e000 -+#define SSP_PCAP_AUDIO_OUT_GAIN_SHIFT 13 -+ -+ -+#define SSP_PCAP_ADD1_VALUE_MASK 0x000003ff -+#define SSP_PCAP_ADD1_VALUE_SHIFT 0 -+#define SSP_PCAP_ADD2_VALUE_MASK 0x000ffc00 -+#define SSP_PCAP_ADD2_VALUE_SHIFT 10 -+ -+ -+#define PCAP_AUDIO_IN_GAIN_MAX_VALUE 31 -+#define PCAP_AUDIO_OUT_GAIN_MAX_VALUE 15 -+ -+#define PCAP_CLEAR_INTERRUPT_REGISTER 0x00141fdf -+#define PCAP_MASK_ALL_INTERRUPT 0x0013ffff -+ -+#define SSP_PCAP_TS_KEEPER_TIMER 100 /* 1 second */ -+#define START_ADC_DELAY_TIMER 1991 /* 540 us */ -+ -+#define SSP_SEND_PM_ALART_INTERVAL 1000 *HZ/1000 /* 1 second */ -+#define SSP_SEND_MSG_USB_ACCESSORY_INFO_DEBOUNCE 200 *HZ/1000 /* 200ms */ -+ -+struct ssp_interrupt_info -+{ -+ u32 type; -+ u32 status; -+ void* privdata; -+}; -+ -+#ifndef U8 -+#define U8 unsigned char -+#endif -+ -+#ifndef U32 -+#define U32 unsigned long -+#endif -+ -+#ifndef U16 -+#define U16 unsigned short -+#endif -+ -+#ifndef P_U16 -+#define P_U16 U16* -+#endif -+ -+#ifndef P_U32 -+#define P_U32 U32* -+#endif -+ -+#define SSP_SELECT_BUFFER (volatile unsigned long *)(0xf4000000) -+ -+#define SSP_SR_RNE 0x00000008 -+#define SSP_PCAP_BASE 0x00001000 -+/************************ STRUCTURES, ENUMS, AND TYPEDEFS **************************/ -+typedef enum accessoryStatus -+{ -+ ACCESSORY_DEVICE_STATUS_DETACHED = 0, -+ ACCESSORY_DEVICE_STATUS_ATTACHED , -+ ACCESSORY_DEVICE_STATUS_UNKNOW =0x000000ff -+}ACCESSORY_DEVICE_STATUS; -+ -+typedef enum accessoryType -+{ -+ ACCESSORY_DEVICE_NONE = 0, -+ ACCESSORY_DEVICE_SERIAL_PORT , -+ ACCESSORY_DEVICE_USB_PORT , -+ ACCESSORY_DEVICE_UNKNOW =0x000000ff -+}ACCESSORY_TYPE; -+ -+typedef enum pcapReturnStatus -+{ -+ SSP_PCAP_SUCCESS = 0, -+ SSP_PCAP_ERROR_REGISTER = SSP_PCAP_BASE+1, -+ SSP_PCAP_ERROR_VALUE = SSP_PCAP_BASE+2, -+ -+ SSP_PCAP_NOT_RUN = SSP_PCAP_BASE+0xff -+}SSP_PCAP_STATUS; -+ -+typedef enum pcapPortType -+{ -+ SSP_PCAP_SERIAL_PORT = 0x00000000, -+ SSP_PCAP_LOW_USB_PORT = 0x00000001, -+ SSP_PCAP_HIGH_USB_PORT = 0x00000002, -+ SSP_PCAP_UNKNOW_PORT = 0x000000ff -+}SSP_PCAP_PORT_TYPE; -+ -+typedef enum pcapInitDriverType -+{ -+ SSP_PCAP_TS_OPEN = 0x00000000, -+ SSP_PCAP_AUDIO_OPEN = 0x00000001, -+ SSP_PCAP_UNKNOW_DRIVER_OPEN = 0x000000ff -+}SSP_PCAP_INIT_DRIVER_TYPE; -+ -+ -+typedef enum pcapReturnBitStatus -+{ -+ SSP_PCAP_BIT_ZERO = 0x00000000, -+ SSP_PCAP_BIT_ONE = 0x00000001, -+ SSP_PCAP_BIT_ERROR = 0xff000000 -+}SSP_PCAP_BIT_STATUS; -+ -+typedef enum pcapCDCClkType -+{ -+ PCAP_CDC_CLK_IN_13M0 = 0x00000000, -+ PCAP_CDC_CLK_IN_15M36 = 0x00000040, -+ PCAP_CDC_CLK_IN_16M8 = 0x00000080, -+ PCAP_CDC_CLK_IN_19M44 = 0x000000c0, -+ PCAP_CDC_CLK_IN_26M0 = 0x00000100 -+}PHONE_CDC_CLOCK_TYPE; -+ -+typedef enum pcapST_SR -+{ -+ PCAP_ST_SAMPLE_RATE_8K = 0x00000000, -+ PCAP_ST_SAMPLE_RATE_11K = 0x00000100, -+ PCAP_ST_SAMPLE_RATE_12K = 0x00000200, -+ PCAP_ST_SAMPLE_RATE_16K = 0x00000300, -+ PCAP_ST_SAMPLE_RATE_22K = 0x00000400, -+ PCAP_ST_SAMPLE_RATE_24K = 0x00000500, -+ PCAP_ST_SAMPLE_RATE_32K = 0x00000600, -+ PCAP_ST_SAMPLE_RATE_44K = 0x00000700, -+ PCAP_ST_SAMPLE_RATE_48K = 0x00000800 -+}ST_SAMPLE_RATE_TYPE; -+ -+typedef enum pcapST_BCLK -+{ -+ PCAP_ST_BCLK_SLOT_16 = 0x00000000, -+ PCAP_ST_BCLK_SLOT_8 = 0x00008000, -+ PCAP_ST_BCLK_SLOT_4 = 0x00010000, -+ PCAP_ST_BCLK_SLOT_2 = 0x00018000, -+}ST_BCLK_TIME_SLOT_TYPE; -+ -+typedef enum pcapST_CLK -+{ -+ PCAP_ST_CLK_PLL_CLK_IN_13M0 = 0x00000000, -+ PCAP_ST_CLK_PLL_CLK_IN_15M36 = 0x00000004, -+ PCAP_ST_CLK_PLL_CLK_IN_16M8 = 0x00000008, -+ PCAP_ST_CLK_PLL_CLK_IN_19M44 = 0x0000000c, -+ PCAP_ST_CLK_PLL_CLK_IN_26M0 = 0x00000010, -+ PCAP_ST_CLK_PLL_CLK_IN_EXT_MCLK = 0x00000014, -+ PCAP_ST_CLK_PLL_CLK_IN_FSYNC = 0x00000018, -+ PCAP_ST_CLK_PLL_CLK_IN_BITCLK = 0x0000001c -+}ST_CLK_TYPE; -+ -+typedef enum pcapDigitalAudioInterfaceMode -+{ -+ PCAP_DIGITAL_AUDIO_INTERFACE_NORMAL = 0x00000000, -+ PCAP_DIGITAL_AUDIO_INTERFACE_NETWORK = 0x00002000, -+ PCAP_DIGITAL_AUDIO_INTERFACE_I2S = 0x00004000 -+}DIG_AUD_MODE_TYPE; -+ -+typedef enum pcapMono -+{ -+ PCAP_MONO_PGA_R_L_STEREO = 0x00000000, -+ PCAP_MONO_PGA_RL = 0x00080000, -+ PCAP_MONO_PGA_RL_3DB = 0x00100000, -+ PCAP_MONO_PGA_RL_6DB = 0x00180000 -+}MONO_TYPE; -+ -+typedef enum pcapVibratorVoltageLevel -+{ -+ PCAP_VIBRATOR_VOLTAGE_LEVEL0 = 0x00000000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL1 = 0x00100000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL2 = 0x00200000, -+ PCAP_VIBRATOR_VOLTAGE_LEVEL3 = 0x00300000 -+}VibratorVoltageLevel_TYPE; -+ -+typedef enum pcapTouchScreenMode -+{ -+ PCAP_TS_POSITION_X_MEASUREMENT = 0x00000000, -+ PCAP_TS_POSITION_XY_MEASUREMENT = 0x00020000, -+ PCAP_TS_PRESSURE_MEASUREMENT = 0x00040000, -+ PCAP_TS_PLATE_X_MEASUREMENT = 0x00060000, -+ PCAP_TS_PLATE_Y_MEASUREMENT = 0x00080000, -+ PCAP_TS_STANDBY_MODE = 0x000a0000, -+ PCAP_TS_NONTS_MODE = 0x000c0000 -+}TOUCH_SCREEN_DETECT_TYPE; -+ -+typedef enum pcapADJRegister -+{ -+ SSP_PCAP_ADJ_ISR_REGISTER = 0x00, -+ SSP_PCAP_ADJ_MSR_REGISTER = 0x01, -+ SSP_PCAP_ADJ_PSTAT_REGISTER = 0x02, -+ SSP_PCAP_ADJ_VREG2_REGISTER = 0x06, -+ SSP_PCAP_ADJ_AUX_VREG_REGISTER = 0x07, -+ SSP_PCAP_ADJ_BATT_DAC_REGISTER = 0x08, -+ SSP_PCAP_ADJ_ADC1_REGISTER = 0x09, -+ SSP_PCAP_ADJ_ADC2_REGISTER = 0x0a, -+ SSP_PCAP_ADJ_AUD_CODEC_REGISTER = 0x0b, -+ SSP_PCAP_ADJ_AUD_RX_AMPS_REGISTER = 0x0c, -+ SSP_PCAP_ADJ_ST_DAC_REGISTER = 0x0d, -+ SSP_PCAP_ADJ_BUSCTRL_REGISTER = 0x14, -+ SSP_PCAP_ADJ_PERIPH_REGISTER = 0x15, -+ SSP_PCAP_ADJ_LOWPWR_CTRL_REGISTER = 0x18, -+ SSP_PCAP_ADJ_TX_AUD_AMPS_REGISTER = 0x1a, -+ SSP_PCAP_ADJ_GP_REG_REGISTER = 0x1b -+}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER; -+ -+typedef enum pcapADJBit_SetType -+{ -+ SSP_PCAP_ADJ_BIT_ISR_ADCDONEI = 0x00000001, -+ SSP_PCAP_ADJ_BIT_ISR_TSI = 0x00000002, -+ SSP_PCAP_ADJ_BIT_ISR_1HZI = 0x00000004, -+ SSP_PCAP_ADJ_BIT_ISR_WHI = 0x00000008, -+ SSP_PCAP_ADJ_BIT_ISR_WLI = 0x00000010, -+ SSP_PCAP_ADJ_BIT_ISR_TODAI = 0x00000020, -+ SSP_PCAP_ADJ_BIT_ISR_USB4VI = 0x00000040, -+ SSP_PCAP_ADJ_BIT_ISR_ONOFFI = 0x00000080, -+ SSP_PCAP_ADJ_BIT_ISR_ONOFF2I = 0x00000100, -+ SSP_PCAP_ADJ_BIT_ISR_USB1VI = 0x00000200, -+ SSP_PCAP_ADJ_BIT_ISR_MOBPORTI = 0x00000400, -+ SSP_PCAP_ADJ_BIT_ISR_MB2I = 0x00000800, -+ SSP_PCAP_ADJ_BIT_ISR_A1I = 0x00001000, -+ SSP_PCAP_ADJ_BIT_ISR_STI = 0x00002000, -+ SSP_PCAP_ADJ_BIT_ISR_PCI = 0x00004000, -+ SSP_PCAP_ADJ_BIT_ISR_WARMI = 0x00008000, -+ SSP_PCAP_ADJ_BIT_ISR_EOLI = 0x00010000, -+ SSP_PCAP_ADJ_BIT_ISR_CLKI = 0x00020000, -+ SSP_PCAP_ADJ_BIT_ISR_SYS_RSTI = 0x00040000, -+ SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I = 0x00100000, -+ SSP_PCAP_ADJ_BIT_ISR_SOFT_RESETI = 0x00200000, -+ SSP_PCAP_ADJ_BIT_ISR_MNEXBI = 0x00400000, -+ -+ SSP_PCAP_ADJ_BIT_MSR_ADCDONEM = 0x04000001, -+ SSP_PCAP_ADJ_BIT_MSR_TSM = 0x04000002, -+ SSP_PCAP_ADJ_BIT_MSR_1HZM = 0x04000004, -+ SSP_PCAP_ADJ_BIT_MSR_WHM = 0x04000008, -+ SSP_PCAP_ADJ_BIT_MSR_WLM = 0x04000010, -+ SSP_PCAP_ADJ_BIT_MSR_TODAM = 0x04000020, -+ SSP_PCAP_ADJ_BIT_MSR_USB4VM = 0x04000040, -+ SSP_PCAP_ADJ_BIT_MSR_ONOFFM = 0x04000080, -+ SSP_PCAP_ADJ_BIT_MSR_ONOFF2M = 0x04000100, -+ SSP_PCAP_ADJ_BIT_MSR_USB1VM = 0x04000200, -+ SSP_PCAP_ADJ_BIT_MSR_MOBPORTM = 0x04000400, -+ SSP_PCAP_ADJ_BIT_MSR_MB2M = 0x04000800, -+ SSP_PCAP_ADJ_BIT_MSR_A1M = 0x04001000, -+ SSP_PCAP_ADJ_BIT_MSR_STM = 0x04002000, -+ SSP_PCAP_ADJ_BIT_MSR_PCM = 0x04004000, -+ SSP_PCAP_ADJ_BIT_MSR_WARMM = 0x04008000, -+ SSP_PCAP_ADJ_BIT_MSR_EOLM = 0x04010000, -+ SSP_PCAP_ADJ_BIT_MSR_CLKM = 0x04020000, -+ SSP_PCAP_ADJ_BIT_MSR_SYS_RSTM = 0x04040000, -+ SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M = 0x04100000, -+ SSP_PCAP_ADJ_BIT_MSR_SOFT_RESETM = 0x04200000, -+ SSP_PCAP_ADJ_BIT_MSR_MNEXBM = 0x04400000, -+ -+ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V = 0x08000040, -+ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS = 0x08000080, -+ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS2 = 0x08000100, -+ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_1V = 0x08000200, -+ SSP_PCAP_ADJ_BIT_PSTAT_MOBSENSB = 0x08000400, -+ SSP_PCAP_ADJ_BIT_PSTAT_MB2SNS = 0x08000800, -+ SSP_PCAP_ADJ_BIT_PSTAT_A1SNS = 0x08001000, -+ SSP_PCAP_ADJ_BIT_PSTAT_MSTB = 0x08002000, -+ SSP_PCAP_ADJ_BIT_PSTAT_EOL_STAT = 0x08010000, -+ SSP_PCAP_ADJ_BIT_PSTAT_CLK_STAT = 0x08020000, -+ SSP_PCAP_ADJ_BIT_PSTAT_SYS_RST = 0x08040000, -+ SSP_PCAP_ADJ_BIT_PSTAT_BATTFBSNS = 0x08080000, -+ SSP_PCAP_ADJ_BIT_PSTAT_BATT_DET_IN_SNS = 0x08200000, -+ SSP_PCAP_ADJ_BIT_PSTAT_MNEXBSNS = 0x08400000, -+ SSP_PCAP_ADJ_BIT_PSTAT_WARM_SYS_RST = 0x08800000, -+ -+ SSP_PCAP_ADJ_BIT_VREG2_V1_STBY = 0x18000001, -+ SSP_PCAP_ADJ_BIT_VREG2_V2_STBY = 0x18000002, -+ SSP_PCAP_ADJ_BIT_VREG2_V3_STBY = 0x18000004, -+ SSP_PCAP_ADJ_BIT_VREG2_V4_STBY = 0x18000008, -+ SSP_PCAP_ADJ_BIT_VREG2_V5_STBY = 0x18000010, -+ SSP_PCAP_ADJ_BIT_VREG2_V6_STBY = 0x18000020, -+ SSP_PCAP_ADJ_BIT_VREG2_V7_STBY = 0x18000040, -+ SSP_PCAP_ADJ_BIT_VREG2_V8_STBY = 0x18000080, -+ SSP_PCAP_ADJ_BIT_VREG2_V9_STBY = 0x18000100, -+ SSP_PCAP_ADJ_BIT_VREG2_V10_STBY = 0x18000200, -+ SSP_PCAP_ADJ_BIT_VREG2_V1_LOWPWR = 0x18000400, -+ SSP_PCAP_ADJ_BIT_VREG2_V2_LOWPWR = 0x18000800, -+ SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR = 0x18001000, -+ SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR = 0x18002000, -+ SSP_PCAP_ADJ_BIT_VREG2_V5_LOWPWR = 0x18004000, -+ SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR = 0x18008000, -+ SSP_PCAP_ADJ_BIT_VREG2_V7_LOWPWR = 0x18010000, -+ SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR = 0x18020000, -+ SSP_PCAP_ADJ_BIT_VREG2_V9_LOWPWR = 0x18040000, -+ SSP_PCAP_ADJ_BIT_VREG2_V10_LOWPWR = 0x18080000, -+ -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_EN = 0x1c000002, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_0 = 0x1c000004, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_1 = 0x1c000008, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN = 0x1c000010, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0 = 0x1c000020, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1 = 0x1c000040, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN = 0x1c000080, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_0 = 0x1c000100, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_1 = 0x1c000200, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_2 = 0x1c000400, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_3 = 0x1c000800, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_EN = 0x1c001000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_0 = 0x1c002000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_1 = 0x1c004000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM2_EN = 0x1c010000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_EN = 0x1c020000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_0 = 0x1c040000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN = 0x1c080000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_0 = 0x1c100000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_1 = 0x1c200000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_STBY = 0x1c400000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_LOWPWR = 0x1c800000, -+ SSP_PCAP_ADJ_BIT_AUX_VREG_SW3_STBY = 0x1d000000, -+ -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC0 = 0x20000001, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC1 = 0x20000002, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC2 = 0x20000004, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC3 = 0x20000008, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC4 = 0x20000010, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC5 = 0x20000020, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC6 = 0x20000040, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC7 = 0x20000080, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_B_FDBK = 0x20000100, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EXT_ISENSE = 0x20000200, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN0 = 0x20000400, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN1 = 0x20000800, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN2 = 0x20001000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN3 = 0x20002000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_I_COIN = 0x20004000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_COIN_CH_EN = 0x20008000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL0 = 0x20020000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL1 = 0x20040000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL2 = 0x20080000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_CMP_EN = 0x20100000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_BATT_DET_EN = 0x20200000, -+ SSP_PCAP_ADJ_BIT_BATT_DAC_THERMBIAS_CTRL = 0x20400000, -+ -+ SSP_PCAP_ADJ_BIT_ADC1_ADEN = 0x24000001, -+ SSP_PCAP_ADJ_BIT_ADC1_RAND = 0x24000002, -+ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL1 = 0x24000004, -+ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL2 = 0x24000008, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA10 = 0x24000010, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA11 = 0x24000020, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA12 = 0x24000040, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA20 = 0x24000080, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA21 = 0x24000100, -+ SSP_PCAP_ADJ_BIT_ADC1_ADA22 = 0x24000200, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO0 = 0x24000400, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO1 = 0x24000800, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO2 = 0x24001000, -+ SSP_PCAP_ADJ_BIT_ADC1_ATO3 = 0x24002000, -+ SSP_PCAP_ADJ_BIT_ADC1_ATOX = 0x24004000, -+ SSP_PCAP_ADJ_BIT_ADC1_MTR1 = 0x24008000, -+ SSP_PCAP_ADJ_BIT_ADC1_MTR2 = 0x24010000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M0 = 0x24020000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M1 = 0x24040000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_M2 = 0x24080000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR = 0x24100000, -+ SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB = 0x24200000, -+ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_POLARITY = 0x24400000, -+ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_ADC = 0x24800000, -+ -+ SSP_PCAP_ADJ_BIT_ADC2_ADD10 = 0x28000001, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD11 = 0x28000002, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD12 = 0x28000004, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD13 = 0x28000008, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD14 = 0x28000010, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD15 = 0x28000020, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD16 = 0x28000040, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD17 = 0x28000080, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD18 = 0x28000100, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD19 = 0x28000200, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD20 = 0x28000400, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD21 = 0x28000800, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD22 = 0x28001000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD23 = 0x28002000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD24 = 0x28004000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD25 = 0x28008000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD26 = 0x28010000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD27 = 0x28020000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD28 = 0x28040000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADD29 = 0x28080000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADINC1 = 0x28100000, -+ SSP_PCAP_ADJ_BIT_ADC2_ADINC2 = 0x28200000, -+ SSP_PCAP_ADJ_BIT_ADC2_ASC = 0x28400000, -+ -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDIHPF = 0x2c000001, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_SMB = 0x2c000002, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDOHPF = 0x2c000004, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CD_TS = 0x2c000008, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DLM = 0x2c000010, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_ADITH = 0x2c000020, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK0 = 0x2c000040, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK1 = 0x2c000080, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK2 = 0x2c000100, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_INV = 0x2c000200, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_INV = 0x2c000400, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DF_RESET = 0x2c000800, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_EN = 0x2c001000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK_EN = 0x2c002000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_8K_16K = 0x2c004000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_DIG_AUD_IN = 0x2c008000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_IN_SEL = 0x2c010000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2_MUX = 0x2c020000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG0 = 0x2c040000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG1 = 0x2c080000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG2 = 0x2c100000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG3 = 0x2c200000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG4 = 0x2c400000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG_PRI_ADJ = 0x2c800000, -+ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_PRI_ADJ = 0x2c200000, -+ -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1_EN = 0x30000001, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A2_EN = 0x30000002, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A4_EN = 0x30000010, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ARIGHT_EN = 0x30000020, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ALEFT_EN = 0x30000040, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CD_BYP = 0x30000080, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CDC_SW = 0x30000100, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ST_DAC_SW = 0x30000200, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_IN_SW = 0x30000400, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_R_EN = 0x30000800, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_L_EN = 0x30001000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG0 = 0x30002000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG1 = 0x30004000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG2 = 0x30008000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG3 = 0x30010000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL = 0x30020000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO0 = 0x30080000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO1 = 0x30100000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG_PRI_ADJ = 0x30200000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO_PRI_ADJ = 0x30400000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ0 = 0x30800000, -+ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ1 = 0x31000000, -+ -+ SSP_PCAP_ADJ_BIT_ST_DAC_SMB_ST_DAC = 0x34000001, -+ SSP_PCAP_ADJ_BIT_ST_DAC_STDET_EN = 0x34000002, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK0 = 0x34000004, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK1 = 0x34000008, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK2 = 0x34000010, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_EN = 0x34000020, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DF_RESET_ST_DAC = 0x34000040, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_EN = 0x34000080, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR0 = 0x34000100, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR1 = 0x34000200, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR2 = 0x34000400, -+ SSP_PCAP_ADJ_BIT_ST_DAC_SR3 = 0x34000800, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_IN_ST_DAC = 0x34001000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS0 = 0x34002000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS1 = 0x34004000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK0 = 0x34008000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK1 = 0x34010000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_INV = 0x34020000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_FS_INV = 0x34040000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_CLK_IN_SEL = 0x34080000, -+ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_PRI_ADJ = 0x35000000, -+ -+ SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB = 0x50000001, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_SUSPEND = 0x50000002, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU = 0x50000004, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PD = 0x50000008, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN = 0x50000010, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PS = 0x50000020, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_MSTR_EN = 0x50000040, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_VBUS_PD_ENB = 0x50000080, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_CURRLIM = 0x50000100, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB = 0x50000200, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR = 0x50000400, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_SE0_CONN = 0x50000800, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PDM = 0x50001000, -+ SSP_PCAP_ADJ_BIT_BUSCTRL_BUS_PRI_ADJ = 0x51000000, -+ -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0 = 0x54000001, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1 = 0x54000002, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2 = 0x54000004, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3 = 0x54000008, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4 = 0x54000010, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_EN = 0x54000020, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_EN = 0x54000040, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL0 = 0x54000080, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL1 = 0x54000100, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL2 = 0x54000200, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL3 = 0x54000400, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL0 = 0x54000800, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL1 = 0x54001000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL2 = 0x54002000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL3 = 0x54004000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I0 = 0x54008000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I1 = 0x54010000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I0 = 0x54020000, -+ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I1 = 0x54040000, -+ SSP_PCAP_ADJ_BIT_PERIPH_SKIP = 0x54080000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0 = 0x54100000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1 = 0x54200000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2 = 0x54400000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3 = 0x54800000, -+ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4 = 0x55000000, -+ -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY = 0x60000001, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR = 0x60000002, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_STBY = 0x60000004, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_LOWPWR = 0x60000008, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_STBY = 0x60000010, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_LOWPWR = 0x60000020, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM_LOWPWR = 0x60000040, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM2_LOWPWR = 0x60000080, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00 = 0x60000100, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01 = 0x60000200, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10 = 0x60000400, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11 = 0x60000800, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS = 0x60001000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS = 0x60002000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS = 0x60004000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS = 0x60008000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE00 = 0x60010000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE01 = 0x60020000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE10 = 0x60040000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE11 = 0x60080000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW20_DVS = 0x60100000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW21_DVS = 0x60200000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW22_DVS = 0x60400000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW23_DVS = 0x60800000, -+ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY = 0x61000000, -+ -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG0 = 0x68000001, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG1 = 0x68000002, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG2 = 0x68000004, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG3 = 0x68000008, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG4 = 0x68000010, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_EN = 0x68000020, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_MUX = 0x68000040, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_EN = 0x68000080, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_MUX = 0x68000100, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_EXT_MIC_MUX = 0x68000200, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON2 = 0x68000400, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON1 = 0x68000800, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1ID_TX = 0x68001000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1_CONFIG = 0x68002000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AHS_CONFIG = 0x68004000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A2_CONFIG = 0x68008000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_LOWPWR = 0x68080000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_STBY = 0x68100000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_V2_EN_2 = 0x68200000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG_PRI_ADJ = 0x68400000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ0 = 0x68800000, -+ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ1 = 0x69000000, -+ -+ SSP_PCAP_ADJ_BIT_SYS_RST_CLR = 0x6c000001, -+ SSP_PCAP_ADJ_BIT_SYS_RST_MODE0 = 0x6c000002, -+ SSP_PCAP_ADJ_BIT_SYS_RST_MODE1 = 0x6c000004, -+ SSP_PCAP_ADJ_BIT_SYS_VFLASH_0 = 0x6c000008, -+ SSP_PCAP_ADJ_BIT_SYS_VFLASH_1 = 0x6c000010, -+ SSP_PCAP_ADJ_BIT_SYS_MID_SELECT = 0x6c000020, -+ SSP_PCAP_ADJ_BIT_SYS_MID_FET = 0x6c000040, -+ SSP_PCAP_ADJ_BIT_SYS_MAIN_LOW = 0x6c000080, -+ SSP_PCAP_ADJ_BIT_SYS_BATTFB_DIS = 0x6c000100, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG9 = 0x6c000200, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG10 = 0x6c000400, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG11 = 0x6c000800, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG12 = 0x6c001000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG13 = 0x6c002000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG14 = 0x6c004000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG15 = 0x6c008000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG16 = 0x6c010000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG17 = 0x6c020000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG18 = 0x6c040000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG19 = 0x6c080000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG20 = 0x6c100000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG21 = 0x6c200000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG22 = 0x6c400000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG23 = 0x6c800000, -+ SSP_PCAP_ADJ_BIT_SYS_GP_REG24 = 0x6d000000 -+ -+}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE; -+ -+/************************ FUNCTION PROTOTYPES **************************************/ -+extern void ssp_pcap_init(void); -+extern void ssp_pcap_release(void); -+ -+extern void ssp_pcap_open(SSP_PCAP_INIT_DRIVER_TYPE portType); -+extern void ssp_pcap_close(void); -+ -+extern void ssp_pcap_intoSleep_callBack(void); -+extern void ssp_pcap_wakeUp_callBack(void); -+ -+ -+extern SSP_PCAP_STATUS SSP_PCAP_write_data_to_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,U32 ssp_pcap_register_value); -+extern SSP_PCAP_STATUS SSP_PCAP_read_data_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,P_U32 p_ssp_pcap_register_value); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_bit_set(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_STATUS SSP_PCAP_bit_clean(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; -+extern U32 SSP_PCAP_get_register_value_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register ) ; -+ -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_mode_set(TOUCH_SCREEN_DETECT_TYPE mode_Type ); -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_start_XY_read(void); -+extern SSP_PCAP_STATUS SSP_PCAP_TSI_get_XY_value(P_U16 p_x,P_U16 p_y); -+extern SSP_PCAP_STATUS SSP_PCAP_CDC_CLK_set(PHONE_CDC_CLOCK_TYPE clkType); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_CDC_SR_set(ST_SAMPLE_RATE_TYPE srType); -+extern SSP_PCAP_STATUS SSP_PCAP_BCLK_set(ST_BCLK_TIME_SLOT_TYPE bclkType); -+extern SSP_PCAP_STATUS SSP_PCAP_STCLK_set(ST_CLK_TYPE stClkType); -+extern SSP_PCAP_STATUS SSP_PCAP_DIG_AUD_FS_set(DIG_AUD_MODE_TYPE fsType); -+extern SSP_PCAP_STATUS SSP_PCAP_AUDIG_set(U32 audioInGain); -+extern SSP_PCAP_STATUS SSP_PCAP_MONO_set(MONO_TYPE monoType); -+extern SSP_PCAP_STATUS SSP_PCAP_AUDOG_set(U32 audioOutGain); -+ -+extern SSP_PCAP_STATUS SSP_PCAP_V_VIB_level_set(VibratorVoltageLevel_TYPE VIBLevelType); -+extern SSP_PCAP_STATUS SSP_PCAP_configure_USB_UART_transeiver(SSP_PCAP_PORT_TYPE portType); -+extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_audio_in_status(void); -+ -+/* for log */ -+extern void pcap_log_add_pure_data(u8* pData,u32 len); -+extern void pcap_log_add_data(u8* pData,u32 len); -+ -+/* screen lock on/off handler */ -+extern void ssp_pcap_screenlock_lock(u32 data); -+extern void ssp_pcap_screenlock_unlock(u32 data); -+ -+#endif -Index: linux-2.6.21/include/asm-arm/arch-pxa/irqs.h -=================================================================== ---- linux-2.6.21.orig/include/asm-arm/arch-pxa/irqs.h 2007-05-08 03:43:19.000000000 -0300 -+++ linux-2.6.21/include/asm-arm/arch-pxa/irqs.h 2007-05-08 04:03:42.000000000 -0300 -@@ -176,7 +176,8 @@ - #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) - #elif defined(CONFIG_ARCH_LUBBOCK) || \ - defined(CONFIG_MACH_LOGICPD_PXA270) || \ -- defined(CONFIG_MACH_MAINSTONE) -+ defined(CONFIG_MACH_MAINSTONE) || \ -+ defined(CONFIG_PXA_EZX) - #define NR_IRQS (IRQ_BOARD_END) - #else - #define NR_IRQS (IRQ_BOARD_START) -@@ -222,3 +223,13 @@ - #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) - #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2) - #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3) -+ -+/* EZX Interrupts (CONFIG_EZX) */ -+#define EZX_IRQ(x) (IRQ_BOARD_START + (x)) -+#define EZX_IRQ_USB4V EZX_IRQ(0) /* EMU */ -+#define EZX_IRQ_USB1V EZX_IRQ(1) /* EMU */ -+#define EZX_IRQ_HEADJACK EZX_IRQ(2) /* Audio connector */ -+#define EZX_IRQ_MIC EZX_IRQ(3) /* Audio connector */ -+#define EZX_IRQ_ADCDONE EZX_IRQ(4) -+#define EZX_IRQ_TS EZX_IRQ(5) /* TS touch */ -+#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* TS x/y ADC ready */ -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 04:03:40.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 16:29:06.000000000 -0300 -@@ -131,11 +131,30 @@ - .resource = ezxbp_resources, - }; - -+/* PCAP */ -+static struct resource ezxpcap_resources[] = { -+ [0] = { -+ .start = IRQ_GPIO1, -+ .end = IRQ_GPIO1, -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+struct platform_device ezxpcap_device = { -+ .name = "ezx-pcap", -+ .id = -1, -+ .dev = { -+ .parent = &ezxssp_device.dev, -+ }, -+ .num_resources = ARRAY_SIZE(ezxpcap_resources), -+ .resource = ezxpcap_resources, -+}; - - - static struct platform_device *devices[] __initdata = { - &ezxssp_device, - &ezxbp_device, -+ &ezxpcap_device, - }; - - /* PM */ -Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-08 04:03:37.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-08 16:29:06.000000000 -0300 -@@ -97,6 +97,9 @@ - config EZX_BP - bool "BP Control code for EZX Platform" - -+config EZX_PCAP -+ bool "PCAP Support" -+ - endif - - endmenu -Index: linux-2.6.21/arch/arm/mach-pxa/Makefile -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-05-08 04:03:37.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-05-08 16:29:06.000000000 -0300 -@@ -23,6 +23,7 @@ - obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o - obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o - obj-$(CONFIG_EZX_BP) += ezx-bp.o -+obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o - - # Support for blinky lights - led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/ezx-pm.patch b/packages/linux/linux-ezx-2.6.21/ezx-pm.patch deleted file mode 100644 index 85b6f5c15d..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-pm.patch +++ /dev/null @@ -1,140 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:23.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:36.000000000 -0300 -@@ -22,6 +22,10 @@ - #include - #include - -+#ifdef CONFIG_PXA_EZX -+#include -+#endif -+ - #include "generic.h" - - /* Crystal clock: 13MHz */ -@@ -156,7 +160,13 @@ - break; - case PM_SUSPEND_MEM: - /* set resume return address */ -+#ifdef CONFIG_PXA_EZX -+ /* set EZX flags for blob - WM */ -+ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = virt_to_phys(pxa_cpu_resume); -+ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = SLEEP_FLAG; -+#else - PSPR = virt_to_phys(pxa_cpu_resume); -+#endif - pxa_cpu_suspend(PWRMODE_SLEEP); - break; - } -Index: linux-2.6.21/arch/arm/mach-pxa/pm.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:23.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:36.000000000 -0300 -@@ -24,6 +24,10 @@ - #include - #include - -+#ifdef CONFIG_PXA_EZX -+#include -+#endif -+ - - /* - * Debug macros -@@ -152,8 +156,12 @@ - } - - /* ensure not to come back here if it wasn't intended */ -+#ifdef CONFIG_PXA_EZX -+ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = 0; -+ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = OFF_FLAG; -+#else - PSPR = 0; -- -+#endif - /* restore registers */ - RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); - RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 16:29:36.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 16:32:56.000000000 -0300 -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - - #include "generic.h" - #include "ezx.h" -@@ -137,8 +138,69 @@ - &ezxbp_device, - }; - -+/* PM */ -+extern int bp_handshake_passed(void); -+ -+#define POWER_OFF_TIMEOUT (2*60*HZ) -+ -+static void ezx_reboot_poweroff(char mode) -+{ -+#ifdef CONFIG_EZX_BP -+ unsigned long start = jiffies; -+ -+ printk("Waiting for BP to turn off. This can take some time...\n"); -+ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = NO_FLAG; -+ cpu_proc_fin(); -+ -+ do { -+ /* -+ * Turn off gracefully. Wait BP turn off first, and then -+ * properly turn off. -+ */ -+ if (pxa_gpio_get_value(GPIO_BB_WDI) == 0) { -+ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = WDI_FLAG; -+ -+ /* reset BP */ -+ pxa_gpio_set_value(GPIO_BB_RESET, 0); -+ mdelay(1); -+ pxa_gpio_set_value(GPIO_BB_RESET, 1); -+ -+ if (mode == 'z') -+ arch_reset('h'); -+ break; -+ } -+ /* Just turn it off! */ -+ if (!bp_handshake_passed() || !pxa_gpio_get_value(GPIO_BB_WDI2) -+ || (jiffies - start) >= POWER_OFF_TIMEOUT) { -+ break; -+ } -+ } while(1); -+#endif -+ -+ if (mode == 'z') -+ /* Panic! Ask PCAP to turn both processors off */ -+ pxa_gpio_set_value(GPIO_WDI_AP, 0); -+ else -+ arm_machine_restart(mode); -+ -+ while(1); -+} -+ -+static inline void ezx_poweroff(void) -+{ -+ ezx_reboot_poweroff('z'); -+} -+ -+static inline void ezx_restart(char mode) -+{ -+ ezx_reboot_poweroff(mode); -+} -+ - static int __init ezx_init(void) - { -+ pm_power_off = ezx_poweroff; -+ arm_pm_restart = ezx_restart; -+ - CKEN = CKEN9_OSTIMER | CKEN22_MEMC; - - ezx_ssp_set_machinfo(&ezx_ssp_machinfo); diff --git a/packages/linux/linux-ezx-2.6.21/ezx-serial-bug-workaround.patch b/packages/linux/linux-ezx-2.6.21/ezx-serial-bug-workaround.patch deleted file mode 100644 index 9f30cc35fe..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-serial-bug-workaround.patch +++ /dev/null @@ -1,45 +0,0 @@ -Work around some errata in the pxa serial code (copied from motorolas 2.4.x tree) - -Index: linux-2.6.20.7/drivers/serial/pxa.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/serial/pxa.c 2007-04-21 13:57:46.000000000 -0300 -+++ linux-2.6.20.7/drivers/serial/pxa.c 2007-04-21 14:05:03.000000000 -0300 -@@ -29,6 +29,10 @@ - #define SUPPORT_SYSRQ - #endif - -+#define pxa_buggy_port(x) ({ \ -+ int cpu_ver; asm("mrc%? p15, 0, %0, c0, c0" : "=r" (cpu_ver)); \ -+ ((x) == PORT_PXA && (cpu_ver & ~1) == 0x69052100); }) -+ - #include - #include - #include -@@ -195,7 +199,7 @@ - if (uart_circ_empty(xmit)) - serial_pxa_stop_tx(&up->port); - } -- -+static inline irqreturn_t serial_pxa_irq(int, void *); - static void serial_pxa_start_tx(struct uart_port *port) - { - struct uart_pxa_port *up = (struct uart_pxa_port *)port; -@@ -203,6 +207,8 @@ - if (!(up->ier & UART_IER_THRI)) { - up->ier |= UART_IER_THRI; - serial_out(up, UART_IER, up->ier); -+ if (pxa_buggy_port(up->port.type)) -+ serial_pxa_irq(up->port.irq, NULL); - } - } - -@@ -298,6 +304,9 @@ - - mcr |= up->mcr; - -+ if (pxa_buggy_port(up->port.type) && up->port.irq != 0) -+ mcr ^= UART_MCR_OUT2; -+ - serial_out(up, UART_MCR, mcr); - } - diff --git a/packages/linux/linux-ezx-2.6.21/ezx-ts.patch b/packages/linux/linux-ezx-2.6.21/ezx-ts.patch deleted file mode 100644 index 1dd88efd6e..0000000000 --- a/packages/linux/linux-ezx-2.6.21/ezx-ts.patch +++ /dev/null @@ -1,399 +0,0 @@ -Index: linux-2.6.21/drivers/input/touchscreen/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-04-26 05:08:32.000000000 +0200 -+++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-04-26 23:27:05.000000000 +0200 -@@ -164,4 +164,16 @@ - To compile this driver as a module, choose M here: the - module will be called ucb1400_ts. - -+config TOUCHSCREEN_PCAP -+ tristate "Motorola PCAP touchscreen" -+ depends on PXA_EZX_PCAP -+ help -+ Say Y here if you have a Motorola EZX (E680, A780) telephone -+ and want to support the built-in touchscreen. -+ -+ If unsure, say N. -+ -+ To compile this driver as a module, choose M here: the -+ module will be called hp680_ts_input. -+ - endif -Index: linux-2.6.21/drivers/input/touchscreen/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-04-26 05:08:32.000000000 +0200 -+++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-04-26 23:27:52.000000000 +0200 -@@ -16,3 +16,4 @@ - obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o - obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o - obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o -+obj-$(CONFIG_TOUCHSCREEN_PCAP) += pcap_ts.o -Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-04-26 23:27:05.000000000 +0200 -@@ -0,0 +1,364 @@ -+/* -+ * pcap_ts.c - Touchscreen driver for Motorola PCAP2 based touchscreen as found -+ * in the EZX phone platform. -+ * -+ * Copyright (C) 2006 Harald Welte -+ * -+ * Based on information found in the original Motorola 2.4.x ezx-ts.c driver. -+ * -+ * 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. -+ * -+ * TODO: -+ * split this in a hardirq handler and a tasklet/bh -+ * suspend/resume support -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "../../misc/ezx/ssp_pcap.h" -+ -+#if 1 -+#define DEBUGP(x, args ...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ## args) -+#else -+#define DEBUGP(x, args ...) -+#endif -+ -+#define PRESSURE 1 -+#define COORDINATE 2 -+ -+struct pcap_ts { -+ int irq_xy; -+ int irq_touch; -+ struct input_dev *input; -+ struct timer_list timer; -+ -+ u_int16_t x, y; -+ u_int16_t pressure, pressure_last; -+ -+ u_int8_t read_state; -+}; -+ -+#define X_AXIS_MIN 0 -+#define X_AXIS_MAX 1023 -+ -+#define Y_AXIS_MAX X_AXIS_MAX -+#define Y_AXIS_MIN X_AXIS_MIN -+ -+#define PRESSURE_MAX X_AXIS_MAX -+#define PRESSURE_MIN X_AXIS_MIN -+ -+static int pcap_ts_mode(u_int32_t mode) -+{ -+ int ret; -+ -+ u_int32_t tmp; -+ -+ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ tmp &= ~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK; -+ tmp |= mode; -+ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+ -+ DEBUGP("set ts mode "); -+ if (mode == PCAP_TS_POSITION_XY_MEASUREMENT) -+ DEBUGP("COORD\n"); -+ else if (mode == PCAP_TS_PRESSURE_MEASUREMENT) -+ DEBUGP("PRESS\n"); -+ else if (mode == PCAP_TS_STANDBY_MODE) -+ DEBUGP("STANDBY\n"); -+ else -+ printk("UNKNOWN\n"); -+ -+ return ret; -+} -+ -+/* issue a XY read command to the ADC of PCAP2. Well get an ADCDONE2 interrupt -+ * once the result of the conversion is available */ -+static int pcap_ts_start_xy_read(struct pcap_ts *pcap_ts) -+{ -+ int ret; -+ u_int32_t tmp; -+ DEBUGP("start xy read in mode %s\n", -+ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ -+ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ tmp &= SSP_PCAP_ADC_START_VALUE_SET_MASK; -+ tmp |= SSP_PCAP_ADC_START_VALUE; -+ -+ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+ if (ret < 0) -+ return ret; -+ -+ ret = ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC2_ASC, 1); -+ -+ return ret; -+} -+ -+/* read the XY result from the ADC of PCAP2 */ -+static int pcap_ts_get_xy_value(struct pcap_ts *pcap_ts) -+{ -+ int ret; -+ u_int32_t tmp; -+ -+ DEBUGP("get xy value in mode %s\n", -+ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ -+ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ if (tmp & 0x00400000) -+ return -EIO; -+ -+ if (pcap_ts->read_state == COORDINATE) { -+ pcap_ts->x = (tmp & SSP_PCAP_ADD1_VALUE_MASK); -+ pcap_ts->y = (tmp & SSP_PCAP_ADD2_VALUE_MASK) -+ >>SSP_PCAP_ADD2_VALUE_SHIFT; -+ } else { -+ pcap_ts->pressure_last = pcap_ts->pressure; -+ pcap_ts->pressure = (tmp & SSP_PCAP_ADD2_VALUE_MASK) -+ >>SSP_PCAP_ADD2_VALUE_SHIFT; -+ } -+ -+ return 0; -+} -+ -+/* PCAP2 interrupts us when ADC conversion result is available */ -+static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ struct pcap_ts *pcap_ts = dev_id; -+ -+ if (pcap_ts_get_xy_value(pcap_ts) < 0) { -+ printk("pcap_ts: error reading XY value\n"); -+ return IRQ_HANDLED; -+ } -+ -+ DEBUGP("%s X=%4d, Y=%4d Z=%4d\n", -+ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS", -+ pcap_ts->x, pcap_ts->y, pcap_ts->pressure); -+ -+ if (pcap_ts->read_state == PRESSURE) { -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, -+ pcap_ts->pressure); -+ if ((pcap_ts->pressure >= PRESSURE_MAX || -+ pcap_ts->pressure <= PRESSURE_MIN ) && -+ pcap_ts->pressure == pcap_ts->pressure_last) { -+ /* pen has been released */ -+ input_report_key(pcap_ts->input, BTN_TOUCH, 0); -+ input_sync(pcap_ts->input); -+ -+ pcap_ts->x = pcap_ts->y = 0; -+ -+ /* ask PCAP2 to interrupt us if touch event happens -+ * again */ -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_mode(PCAP_TS_STANDBY_MODE); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ -+ /* no need for timer, we'll get interrupted with -+ * next touch down event */ -+ del_timer(&pcap_ts->timer); -+ } else { -+ /* pen has been touched down */ -+ input_report_key(pcap_ts->input, BTN_TOUCH, 1); -+ /* don't input_sync(), we don't know position yet */ -+ -+ /* switch state machine into coordinate read mode */ -+ pcap_ts->read_state = COORDINATE; -+ pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); -+ pcap_ts_start_xy_read(pcap_ts); -+ -+ mod_timer(&pcap_ts->timer, jiffies + HZ/20); -+ } -+ } else { -+ /* we are in coordinate mode */ -+ if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || -+ pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { -+ DEBUGP("invalid x/y coordinate position: PEN_UP?\n"); -+#if 0 -+ input_report_key(pcap_ts->input, BTN_TOUCH, 0); -+ pcap_ts->x = pcap_ts->y = 0; -+#endif -+ } else { -+ input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x); -+ input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y); -+ } -+ input_sync(pcap_ts->input); -+ -+ /* switch back to pressure read mode */ -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_mode(PCAP_TS_STANDBY_MODE); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+/* PCAP2 interrupts us if the pen touches down */ -+static irqreturn_t pcap_ts_irq_touch(int irq, void *dev_id, struct pt_regs *regs) -+{ -+ struct pcap_ts *pcap_ts = dev_id; -+ DEBUGP("entered\n"); -+ -+ /* mask Touchscreen interrupt bit, prevents further touch events -+ * from being reported to us until we're finished with reading -+ * both pressure and x/y from ADC */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 1); -+ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_start_xy_read(pcap_ts); -+ -+ return IRQ_HANDLED; -+} -+ -+static void pcap_ts_timer_fn(unsigned long data) -+{ -+ struct pcap_ts *pcap_ts = (struct pcap_ts *) data; -+ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 1); -+ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_start_xy_read(pcap_ts); -+} -+ -+static int __init ezxts_probe(struct platform_device *pdev) -+{ -+ struct pcap_ts *pcap_ts; -+ struct input_dev *input_dev; -+ int err = -ENOMEM; -+ -+ pcap_ts = kzalloc(sizeof(*pcap_ts), GFP_KERNEL); -+ input_dev = input_allocate_device(); -+ if (!pcap_ts || !input_dev) -+ goto fail; -+ -+ pcap_ts->irq_xy = platform_get_irq(pdev, 0); -+ if (pcap_ts->irq_xy < 0) { -+ err = pcap_ts->irq_xy; -+ goto fail; -+ } -+ -+ pcap_ts->irq_touch = platform_get_irq(pdev, 1); -+ if (pcap_ts->irq_touch < 0) { -+ err = pcap_ts->irq_touch; -+ goto fail; -+ } -+ -+ ssp_pcap_open(SSP_PCAP_TS_OPEN); -+ -+ err = request_irq(pcap_ts->irq_xy, pcap_ts_irq_xy, SA_INTERRUPT, -+ "PCAP Touchscreen XY", pcap_ts); -+ if (err < 0) { -+ printk(KERN_ERR "pcap_ts: can't grab xy irq %d: %d\n", -+ pcap_ts->irq_xy, err); -+ goto fail; -+ } -+ -+ err = request_irq(pcap_ts->irq_touch, pcap_ts_irq_touch, SA_INTERRUPT, -+ "PCAP Touchscreen Touch", pcap_ts); -+ if (err < 0) { -+ printk(KERN_ERR "pcap_ts: can't grab touch irq %d: %d\n", -+ pcap_ts->irq_touch, err); -+ goto fail_xy; -+ } -+ -+ pcap_ts->input = input_dev; -+ pcap_ts->read_state = PRESSURE; -+ init_timer(&pcap_ts->timer); -+ pcap_ts->timer.data = (unsigned long) pcap_ts; -+ pcap_ts->timer.function = &pcap_ts_timer_fn; -+ -+ platform_set_drvdata(pdev, pcap_ts); -+ -+ /* enable pressure interrupt */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ -+ input_dev->name = "EZX PCAP2 Touchscreen"; -+ input_dev->phys = "ezxts/input0"; -+ input_dev->id.bustype = BUS_HOST; -+ input_dev->id.vendor = 0x0001; -+ input_dev->id.product = 0x0002; -+ input_dev->id.version = 0x0100; -+ input_dev->cdev.dev = &pdev->dev; -+ input_dev->private = pcap_ts; -+ -+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); -+ input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); -+ input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0); -+ input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0); -+ input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, -+ PRESSURE_MAX, 0, 0); -+ -+ input_register_device(pcap_ts->input); -+ -+ return 0; -+ -+fail_xy: -+ free_irq(pcap_ts->irq_xy, pcap_ts); -+fail: -+ input_free_device(input_dev); -+ kfree(pcap_ts); -+ -+ return err; -+} -+ -+static int ezxts_remove(struct platform_device *pdev) -+{ -+ struct pcap_ts *pcap_ts = platform_get_drvdata(pdev); -+ -+ del_timer_sync(&pcap_ts->timer); -+ -+ free_irq(pcap_ts->irq_touch, pcap_ts); -+ free_irq(pcap_ts->irq_xy, pcap_ts); -+ -+ input_unregister_device(pcap_ts->input); -+ kfree(pcap_ts); -+ -+ return 0; -+} -+ -+static struct platform_driver ezxts_driver = { -+ .probe = ezxts_probe, -+ .remove = ezxts_remove, -+ //.suspend = ezxts_suspend, -+ //.resume = ezxts_resume, -+ .driver = { -+ .name = "pcap-ts", -+ }, -+}; -+ -+static int __devinit ezxts_init(void) -+{ -+ return platform_driver_register(&ezxts_driver); -+} -+ -+static void __exit ezxts_exit(void) -+{ -+ platform_driver_unregister(&ezxts_driver); -+} -+ -+module_init(ezxts_init); -+module_exit(ezxts_exit); -+ -+MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_LICENSE("GPL"); diff --git a/packages/linux/linux-ezx-2.6.21/mux-fix-init-errorpath.patch b/packages/linux/linux-ezx-2.6.21/mux-fix-init-errorpath.patch deleted file mode 100644 index 716ef86fd1..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-fix-init-errorpath.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:10:32.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:42:23.000000000 +0100 -@@ -811,7 +811,6 @@ - /*init the related mux interface*/ - if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { - err("usb_ipc_init: Out of memory."); -- usb_deregister(&usb_ipc_driver); - return -ENOMEM; - } - bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); -@@ -819,7 +818,6 @@ - if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { - err("usb_ipc_init: Not enough memory for the input buffer."); - kfree(bvd_ipc); -- usb_deregister(&usb_ipc_driver); - return -ENOMEM; - } - bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", diff --git a/packages/linux/linux-ezx-2.6.21/mux-fix-makefile.patch b/packages/linux/linux-ezx-2.6.21/mux-fix-makefile.patch deleted file mode 100644 index 31452da847..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-fix-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: linux-2.6.21/drivers/char/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/char/Makefile 2007-04-26 20:09:29.000000000 +0200 -+++ linux-2.6.21/drivers/char/Makefile 2007-04-26 20:09:46.000000000 +0200 -@@ -104,7 +104,8 @@ - obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o - obj-$(CONFIG_TCG_TPM) += tpm/ - --obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o -+obj-$(CONFIG_TS0710_MUX_USB) += ts0710_mux_usb.o -+obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o - - - # Files generated that shall be removed upon make clean diff --git a/packages/linux/linux-ezx-2.6.21/mux-fix-tty-driver.patch b/packages/linux/linux-ezx-2.6.21/mux-fix-tty-driver.patch deleted file mode 100644 index 2e1aabd952..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-fix-tty-driver.patch +++ /dev/null @@ -1,125 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 10:51:31.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 10:53:05.000000000 +0200 -@@ -241,7 +241,8 @@ - static volatile __u8 mux_recv_info_flags[NR_MUXS]; - static mux_recv_struct *mux_recv_queue = NULL; - --static struct tty_driver mux_driver; -+// Local for 2.6? -+static struct tty_driver *mux_driver; - - #ifdef USB_FOR_MUX - #define COMM_FOR_MUX_DRIVER usb_for_mux_driver -@@ -3007,6 +3008,7 @@ - #else - mux_tty[line]++; - dlci = tty2dlci[line]; -+ mux_table[line] = tty; - - /* if( dlci == 1 ) { */ - /* Open server channel 0 first */ -@@ -3087,6 +3089,7 @@ - } - } - -+ - retval = 0; - #endif - out: -@@ -3894,43 +3897,50 @@ - INIT_WORK(&receive_tqueue, receive_worker, NULL); - INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); - -- memset(&mux_driver, 0, sizeof(struct tty_driver)); -- memset(&mux_tty, 0, sizeof(mux_tty)); -- mux_driver.magic = TTY_DRIVER_MAGIC; -- mux_driver.driver_name = "ts0710mux"; -- mux_driver.name = "ts0710mux"; -- mux_driver.major = TS0710MUX_MAJOR; -- mux_driver.minor_start = TS0710MUX_MINOR_START; -- mux_driver.num = NR_MUXS; -- mux_driver.type = TTY_DRIVER_TYPE_SERIAL; -- mux_driver.subtype = SERIAL_TYPE_NORMAL; -- mux_driver.init_termios = tty_std_termios; -- mux_driver.init_termios.c_iflag = 0; -- mux_driver.init_termios.c_oflag = 0; -- mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; -- mux_driver.init_termios.c_lflag = 0; -- mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -- -- mux_driver.ttys = mux_table; -- mux_driver.termios = mux_termios; -- mux_driver.termios_locked = mux_termios_locked; -+ mux_driver = alloc_tty_driver(NR_MUXS); -+ if (!mux_driver) -+ return -ENOMEM; -+ -+ mux_driver->owner = THIS_MODULE; -+ mux_driver->driver_name = "ts0710mux"; -+ mux_driver->name = "mux"; -+ mux_driver->devfs_name = "mux"; -+ mux_driver->major = TS0710MUX_MAJOR; -+ mux_driver->minor_start = TS0710MUX_MINOR_START; -+ mux_driver->type = TTY_DRIVER_TYPE_SERIAL; -+ mux_driver->subtype = SERIAL_TYPE_NORMAL; -+ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ -+ mux_driver->init_termios = tty_std_termios; -+ mux_driver->init_termios.c_iflag = 0; -+ mux_driver->init_termios.c_oflag = 0; -+ mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; -+ mux_driver->init_termios.c_lflag = 0; -+ -+// mux_driver.ttys = mux_table; -+ mux_driver->termios = mux_termios; -+ mux_driver->termios_locked = mux_termios_locked; - // mux_driver.driver_state = mux_state; -- mux_driver.other = NULL; -+ mux_driver->other = NULL; - -- mux_driver.open = mux_open; -- mux_driver.close = mux_close; -- mux_driver.write = mux_write; -- mux_driver.write_room = mux_write_room; -- mux_driver.flush_buffer = mux_flush_buffer; -- mux_driver.chars_in_buffer = mux_chars_in_buffer; -- mux_driver.throttle = mux_throttle; -- mux_driver.unthrottle = mux_unthrottle; -- mux_driver.ioctl = mux_ioctl; -- mux_driver.owner = THIS_MODULE; -+ mux_driver->open = mux_open; -+ mux_driver->close = mux_close; -+ mux_driver->write = mux_write; -+ mux_driver->write_room = mux_write_room; -+ mux_driver->flush_buffer = mux_flush_buffer; -+ mux_driver->chars_in_buffer = mux_chars_in_buffer; -+ mux_driver->throttle = mux_throttle; -+ mux_driver->unthrottle = mux_unthrottle; -+ mux_driver->ioctl = mux_ioctl; - -- if (tty_register_driver(&mux_driver)) -+ // FIXME: No panic() here -+ if (tty_register_driver(mux_driver)) - panic("Couldn't register mux driver"); - -+ for (j=0; jcur_altsetting->desc; -- endpoint = &intf->cur_altsetting->endpoint[0].desc; - /* Start checking for two bulk endpoints or ... FIXME: This is a future - * enhancement...*/ - bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", -@@ -638,30 +637,26 @@ - - ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; - -- bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", -- (&endpoint[0])->bEndpointAddress); -- bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", -- (&endpoint[1])->bEndpointAddress); -- - while (ep_cnt < interface->bNumEndpoints) { -- -- if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { -- bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", -- (&endpoint[ep_cnt])->bEndpointAddress); -- have_bulk_in_mux = -- (&endpoint[ep_cnt])->bEndpointAddress; -- readsize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ endpoint = &intf->cur_altsetting->endpoint[ep_cnt].desc; -+ bvd_dbg("usb_ipc_probe: endpoint[%i] is: %x", ep_cnt, -+ endpoint->bEndpointAddress); -+ -+ if (!have_bulk_in_mux && IS_EP_BULK_IN(*endpoint)) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is: %x ", -+ endpoint->bEndpointAddress); -+ have_bulk_in_mux = endpoint->bEndpointAddress; -+ readsize = endpoint->wMaxPacketSize; - bvd_dbg("usb_ipc_probe: readsize=%d", readsize); - ep_cnt++; - continue; - } - -- if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { -- bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", -- (&endpoint[ep_cnt])->bEndpointAddress); -- have_bulk_out_mux = -- (&endpoint[ep_cnt])->bEndpointAddress; -- writesize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ if (!have_bulk_out_mux && IS_EP_BULK_OUT(*endpoint)) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is: %x ", -+ endpoint->bEndpointAddress); -+ have_bulk_out_mux = endpoint->bEndpointAddress; -+ writesize = endpoint->wMaxPacketSize; - bvd_dbg("usb_ipc_probe: writesize=%d", writesize); - ep_cnt++; - continue; -@@ -718,21 +713,27 @@ - bvd_ipc->bh_bp.func = usbipc_bh_bp_func; - bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; - -+ bvd_dbg("after assignements"); - /*Build a write urb*/ -+ usb_init_urb(&bvd_ipc->writeurb_mux); - usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, - usb_sndbulkpipe(bvd_ipc->ipc_dev, - bvd_ipc->bulk_out_ep_mux), - bvd_ipc->obuf, writesize, usb_ipc_write_bulk, - bvd_ipc); - //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ bvd_dbg("after write urb"); - - /*Build a read urb and send a IN token first time*/ -+ usb_init_urb(&bvd_ipc->readurb_mux); - usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, - usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), - bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); - //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ bvd_dbg("after read urb"); - -- usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ //usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ bvd_dbg("after claim interface"); - //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); - - // a2590c: dsplog is not supported by this driver -@@ -740,6 +741,8 @@ - // &ipccfg->interface[2], bvd_ipc); - /*send a IN token first time*/ - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ bvd_dbg("after assignement"); -+ - if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) - printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); - -@@ -750,7 +753,7 @@ - tasklet_schedule(&bvd_ipc->bh); - } - -- printk("usb_ipc_probe: completed probe!"); -+ printk("usb_ipc_probe: completed probe!\n"); - usb_set_intfdata(intf, &bvd_ipc); - return 0; - } -@@ -760,21 +763,23 @@ - //struct usb_device *usbdev = interface_to_usbdev(intf); - struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); - -- printk("usb_ipc_disconnect:*** \n"); - -+ printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); -+ -+ //FIXME: Memory leak? - if ((UHCRHPS3 & 0x4) == 0) -- usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); -+ // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); - -- usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); -+ //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); - - bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; - kfree(bvd_ipc_disconnect->ibuf); - kfree(bvd_ipc_disconnect->obuf); - -- usb_driver_release_interface(&usb_ipc_driver, -- bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -- usb_driver_release_interface(&usb_ipc_driver, -- bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); -+ //usb_driver_release_interface(&usb_ipc_driver, -+ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -+ //usb_driver_release_interface(&usb_ipc_driver, -+ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); - - //a2590c: dsplog interface is not supported by this driver - //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); -@@ -803,13 +808,6 @@ - int result; - - bvd_dbg("init usb_ipc"); -- /* register driver at the USB subsystem */ -- result = usb_register(&usb_ipc_driver); -- if (result < 0) { -- err ("usb ipc driver could not be registered"); -- return result; -- } -- - /*init the related mux interface*/ - if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { - err("usb_ipc_init: Out of memory."); -@@ -836,6 +834,14 @@ - usb_for_mux_driver = &ipcusb_tty_driver; - usb_for_mux_tty = &ipcusb_tty; - -+ /* register driver at the USB subsystem */ -+ // this was called before bvd_ipc was allocated -+ result = usb_register(&usb_ipc_driver); -+ if (result < 0) { -+ err ("usb ipc driver could not be registered"); -+ return result; -+ } -+ - /* init timers for ipcusb read process and usb suspend */ - init_timer(&ipcusb_timer); - ipcusb_timer.function = ipcusb_timeout; diff --git a/packages/linux/linux-ezx-2.6.21/mux-ifdef-ezx-features.patch b/packages/linux/linux-ezx-2.6.21/mux-ifdef-ezx-features.patch deleted file mode 100644 index e7935a2598..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-ifdef-ezx-features.patch +++ /dev/null @@ -1,86 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-24 16:31:51.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-24 16:34:57.000000000 +0200 -@@ -35,10 +35,14 @@ - #include - #include - #include -+ -+#ifdef CONFIG_PXA_EZX - #include - #include - #include - #include -+#endif -+ - #include - #include - #include -@@ -341,8 +345,10 @@ - - static void wakeup_timeout(unsigned long data) - { -+#ifdef CONFIG_PXA_EZX - GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); - bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); -+#endif - } - - static void suspend_timeout(unsigned long data) -@@ -353,10 +359,12 @@ - bvd_dbg("suspend_timeout: add the suspend timer again"); - } else { - unlink_urbs(&bvd_ipc->readurb_mux); -+#ifdef CONFIG_PXA_EZX - UHCRHPS3 = 0x4; - mdelay(40); - bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", - UHCRHPS3); -+#endif - } - } - -@@ -404,6 +412,7 @@ - bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; - bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); - -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0x4) { - static int ret; - int time = 0; -@@ -442,6 +451,7 @@ - "failed! status=%d\n", ret); - bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); - } -+#endif - - sumbit_times++; - bvd_ipc->write_finished_flag = 0; -@@ -464,12 +474,16 @@ - - static void usbipc_bh_bp_func(unsigned long param) - { -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0x4) { - UHCRHPS3 = 0x8; -+#endif - mdelay(40); -+#ifdef CONFIG_PXA_EZX - bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " - "UHCRHPS3=0x%x", UHCRHPS3); - } -+#endif - if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { - //get_halted_bit(); - -@@ -734,7 +748,9 @@ - printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); - - //FIXME: Memory leak? -+#ifdef CONFIG_PXA_EZX - if ((UHCRHPS3 & 0x4) == 0) -+#endif - // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); - - //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); diff --git a/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch b/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch deleted file mode 100644 index cab7490118..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.20.7-fix.patch +++ /dev/null @@ -1,224 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710.h -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710.h 2007-04-24 16:04:23.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710.h 2007-04-24 16:04:23.000000000 +0200 -@@ -45,7 +45,7 @@ - * 11/18/2002 Modified - */ - --#include -+//#include - #include - - #include -@@ -58,7 +58,7 @@ - #include - #include - #include --#include -+//#include - - #include - #include -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-24 16:04:23.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-24 16:26:58.000000000 +0200 -@@ -46,7 +46,7 @@ - * 11/18/2002 Second version - * 04/21/2004 Add GPRS PROC - */ --#include -+//#include - #include - #include - -@@ -70,7 +70,7 @@ - #include - #include - #include --#include -+//#include - //#include - - #include -@@ -268,8 +268,8 @@ - static struct work_struct post_recv_tqueue; - - static struct tty_struct *mux_table[NR_MUXS]; --static struct termios *mux_termios[NR_MUXS]; --static struct termios *mux_termios_locked[NR_MUXS]; -+static struct ktermios *mux_termios[NR_MUXS]; -+static struct ktermios *mux_termios_locked[NR_MUXS]; - static volatile short int mux_tty[NR_MUXS]; - - #ifdef min -@@ -1894,11 +1894,14 @@ - if (test_bit(TTY_THROTTLED, &tty->flags)) { - queue_data = 1; - } else { -+ /* - if (test_bit - (TTY_DONT_FLIP, &tty->flags)) { - queue_data = 1; - post_recv = 1; -- } else if (recv_info->total) { -+ } else -+ */ -+ if (recv_info->total) { - queue_data = 1; - post_recv = 1; - } else if (recv_room < uih_len) { -@@ -3149,7 +3152,7 @@ - - /*For BP UART problem End*/ - --static void receive_worker(void *private_) -+static void receive_worker(struct work_struct *private_) - { - struct tty_struct *tty = COMM_FOR_MUX_TTY; - int i, count, tbuf_free, tbuf_read; -@@ -3440,7 +3443,7 @@ - clear_bit(RECV_RUNNING, &mux_recv_flags); - } - --static void post_recv_worker(void *private_) -+static void post_recv_worker(struct work_struct *private_) - { - ts0710_con *ts0710 = &ts0710_connection; - int tty_idx; -@@ -3499,11 +3502,14 @@ - if (test_bit(TTY_THROTTLED, &tty->flags)) { - add_post_recv_queue(&post_recv_q, recv_info); - continue; -- } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { -+ } -+ /* -+ else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { - post_recv = 1; - add_post_recv_queue(&post_recv_q, recv_info); - continue; - } -+ */ - - flow_control = 0; - recv_packet2 = recv_info->mux_packet; -@@ -3635,7 +3641,7 @@ - } - } - --static void send_worker(void *private_) -+static void send_worker(struct work_struct *private_) - { - ts0710_con *ts0710 = &ts0710_connection; - __u8 j; -@@ -3893,9 +3899,9 @@ - } - post_recv_count_flag = 0; - -- INIT_WORK(&send_tqueue, send_worker, NULL); -- INIT_WORK(&receive_tqueue, receive_worker, NULL); -- INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); -+ INIT_WORK(&send_tqueue, send_worker); -+ INIT_WORK(&receive_tqueue, receive_worker); -+ INIT_WORK(&post_recv_tqueue, post_recv_worker); - - mux_driver = alloc_tty_driver(NR_MUXS); - if (!mux_driver) -@@ -3904,12 +3910,12 @@ - mux_driver->owner = THIS_MODULE; - mux_driver->driver_name = "ts0710mux"; - mux_driver->name = "mux"; -- mux_driver->devfs_name = "mux"; -+ //mux_driver->devfs_name = "mux"; - mux_driver->major = TS0710MUX_MAJOR; - mux_driver->minor_start = TS0710MUX_MINOR_START; - mux_driver->type = TTY_DRIVER_TYPE_SERIAL; - mux_driver->subtype = SERIAL_TYPE_NORMAL; -- mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; - - mux_driver->init_termios = tty_std_termios; - mux_driver->init_termios.c_iflag = 0; -@@ -3917,10 +3923,10 @@ - mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; - mux_driver->init_termios.c_lflag = 0; - --// mux_driver.ttys = mux_table; -+ //mux_driver.ttys = mux_table; - mux_driver->termios = mux_termios; - mux_driver->termios_locked = mux_termios_locked; --// mux_driver.driver_state = mux_state; -+ //mux_driver.driver_state = mux_state; - mux_driver->other = NULL; - - mux_driver->open = mux_open; -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-24 16:27:30.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-24 16:31:51.000000000 +0200 -@@ -86,8 +86,8 @@ - struct tty_struct *usb_for_mux_tty = NULL; - void (*usb_mux_dispatcher)(struct tty_struct *tty) = NULL; - void (*usb_mux_sender)(void) = NULL; --void (*ipcusb_ap_to_bp)(unsigned char*, int) = NULL; --void (*ipcusb_bp_to_ap)(unsigned char*, int) = NULL; -+void (*ipcusb_ap_to_bp)(const unsigned char*, int) = NULL; -+void (*ipcusb_bp_to_ap)(const unsigned char*, int) = NULL; - EXPORT_SYMBOL(usb_for_mux_driver); - EXPORT_SYMBOL(usb_for_mux_tty); - EXPORT_SYMBOL(usb_mux_dispatcher); -@@ -222,7 +222,7 @@ - inbuf = list_entry(ptr, buf_list_t, list); - src_count = inbuf->size; - if (dst_count >= src_count) { -- memcpy(buf, inbuf->body, src_count); -+ memcpy((char *)buf, inbuf->body, src_count); - ret = src_count; - list_del(ptr); - kfree(inbuf->body); -@@ -282,7 +282,7 @@ - spin_unlock(&bvd_ipc->in_buf_lock); - } - --static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -+static void usb_ipc_read_bulk(struct urb *urb) - { - buf_list_t *inbuf; - int count = urb->actual_length; -@@ -319,7 +319,7 @@ - bvd_dbg("usb_ipc_read_bulk: completed!!!"); - } - --static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) -+static void usb_ipc_write_bulk(struct urb *urb) - { - callback_times++; - bvd_ipc->write_finished_flag = 1; -@@ -437,7 +437,7 @@ - /*send IN token*/ - bvd_ipc->readurb_mux.actual_length = 0; - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -- if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ if ( (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) ) - printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" - "failed! status=%d\n", ret); - bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); -@@ -447,7 +447,7 @@ - bvd_ipc->write_finished_flag = 0; - //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); - bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; -- if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) -+ if ( (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) ) - warn("ipcusb_xmit_data: funky result! result=%d\n", result); - - bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); -@@ -556,7 +556,7 @@ - struct usb_config_descriptor *ipccfg; - struct usb_interface_descriptor *interface; - struct usb_endpoint_descriptor *endpoint; -- int ep_cnt, readsize, writesize; -+ int ep_cnt, readsize=0, writesize=0; - char have_bulk_in_mux, have_bulk_out_mux; - - bvd_dbg("usb_ipc_probe: vendor id 0x%x, device id 0x%x", diff --git a/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch b/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch deleted file mode 100644 index 8d5299e3bd..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-linux-2.6.21-fix.patch +++ /dev/null @@ -1,297 +0,0 @@ -Index: linux-2.6.21/drivers/char/ts0710.h -=================================================================== ---- linux-2.6.21.orig/drivers/char/ts0710.h 2007-04-27 20:35:44.000000000 -0300 -+++ linux-2.6.21/drivers/char/ts0710.h 2007-04-27 20:36:03.000000000 -0300 -@@ -45,7 +45,6 @@ - * 11/18/2002 Modified - */ - --#include - #include - - #include -@@ -58,7 +57,6 @@ - #include - #include - #include --#include - - #include - #include -Index: linux-2.6.21/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.21.orig/drivers/char/ts0710_mux.c 2007-04-27 20:35:44.000000000 -0300 -+++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-04-27 20:36:03.000000000 -0300 -@@ -46,7 +46,6 @@ - * 11/18/2002 Second version - * 04/21/2004 Add GPRS PROC - */ --#include - #include - #include - -@@ -70,15 +69,12 @@ - #include - #include - #include --#include --//#include - - #include - #include - #include - - #ifdef USB_FOR_MUX --//#include - #include "ts0710_mux_usb.h" - #endif - -@@ -268,8 +264,8 @@ - static struct work_struct post_recv_tqueue; - - static struct tty_struct *mux_table[NR_MUXS]; --static struct termios *mux_termios[NR_MUXS]; --static struct termios *mux_termios_locked[NR_MUXS]; -+static struct ktermios *mux_termios[NR_MUXS]; -+static struct ktermios *mux_termios_locked[NR_MUXS]; - static volatile short int mux_tty[NR_MUXS]; - - #ifdef min -@@ -1894,11 +1890,7 @@ - if (test_bit(TTY_THROTTLED, &tty->flags)) { - queue_data = 1; - } else { -- if (test_bit -- (TTY_DONT_FLIP, &tty->flags)) { -- queue_data = 1; -- post_recv = 1; -- } else if (recv_info->total) { -+ if (recv_info->total) { - queue_data = 1; - post_recv = 1; - } else if (recv_room < uih_len) { -@@ -3149,10 +3141,10 @@ - - /*For BP UART problem End*/ - --static void receive_worker(void *private_) -+static void receive_worker(struct work_struct *work) - { - struct tty_struct *tty = COMM_FOR_MUX_TTY; -- int i, count, tbuf_free, tbuf_read; -+ int count, tbuf_free, tbuf_read; - static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; - static unsigned char *tbuf_ptr = &tbuf[0]; - static unsigned char *start_flag = 0; -@@ -3168,7 +3160,7 @@ - __u32 uih_len; - /*For BP UART problem End */ - -- UNUSED_PARAM(private_); -+ UNUSED_PARAM(work); - - if (!tty) - return; -@@ -3440,7 +3432,7 @@ - clear_bit(RECV_RUNNING, &mux_recv_flags); - } - --static void post_recv_worker(void *private_) -+static void post_recv_worker(struct work_struct *work) - { - ts0710_con *ts0710 = &ts0710_connection; - int tty_idx; -@@ -3453,7 +3445,7 @@ - mux_recv_packet *recv_packet, *recv_packet2; - __u8 j; - -- UNUSED_PARAM(private_); -+ UNUSED_PARAM(work); - - if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { - schedule_work(&post_recv_tqueue); -@@ -3499,10 +3491,6 @@ - if (test_bit(TTY_THROTTLED, &tty->flags)) { - add_post_recv_queue(&post_recv_q, recv_info); - continue; -- } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { -- post_recv = 1; -- add_post_recv_queue(&post_recv_q, recv_info); -- continue; - } - - flow_control = 0; -@@ -3635,7 +3623,7 @@ - } - } - --static void send_worker(void *private_) -+static void send_worker(struct work_struct *work) - { - ts0710_con *ts0710 = &ts0710_connection; - __u8 j; -@@ -3644,7 +3632,7 @@ - struct tty_struct *tty; - __u8 dlci; - -- UNUSED_PARAM(private_); -+ UNUSED_PARAM(work); - - TS0710_DEBUG("Enter into send_worker"); - -@@ -3819,7 +3807,8 @@ - gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes = - get_count(TS0710MUX_GPRS2_SEND_COUNT_IDX); - -- copy_to_user(buf, gprsData, bufLen); -+ if(copy_to_user(buf, gprsData, bufLen)) -+ return -EFAULT; - - return bufLen; - } -@@ -3836,7 +3825,8 @@ - - memset(gprsData, 0, bufLen); - -- copy_from_user(gprsData, buf, bufLen); -+ if(copy_from_user(gprsData, buf, bufLen)) -+ return -EFAULT; - - set_count(TS0710MUX_GPRS1_RECV_COUNT_IDX, gprsData[0].recvBytes); - set_count(TS0710MUX_GPRS1_SEND_COUNT_IDX, gprsData[0].sentBytes); -@@ -3893,9 +3883,9 @@ - } - post_recv_count_flag = 0; - -- INIT_WORK(&send_tqueue, send_worker, NULL); -- INIT_WORK(&receive_tqueue, receive_worker, NULL); -- INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); -+ INIT_WORK(&send_tqueue, send_worker); -+ INIT_WORK(&receive_tqueue, receive_worker); -+ INIT_WORK(&post_recv_tqueue, post_recv_worker); - - mux_driver = alloc_tty_driver(NR_MUXS); - if (!mux_driver) -@@ -3904,12 +3894,11 @@ - mux_driver->owner = THIS_MODULE; - mux_driver->driver_name = "ts0710mux"; - mux_driver->name = "mux"; -- mux_driver->devfs_name = "mux"; - mux_driver->major = TS0710MUX_MAJOR; - mux_driver->minor_start = TS0710MUX_MINOR_START; - mux_driver->type = TTY_DRIVER_TYPE_SERIAL; - mux_driver->subtype = SERIAL_TYPE_NORMAL; -- mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; - - mux_driver->init_termios = tty_std_termios; - mux_driver->init_termios.c_iflag = 0; -@@ -3917,10 +3906,10 @@ - mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; - mux_driver->init_termios.c_lflag = 0; - --// mux_driver.ttys = mux_table; -+ //mux_driver.ttys = mux_table; - mux_driver->termios = mux_termios; - mux_driver->termios_locked = mux_termios_locked; --// mux_driver.driver_state = mux_state; -+ //mux_driver.driver_state = mux_state; - mux_driver->other = NULL; - - mux_driver->open = mux_open; -Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.21.orig/drivers/char/ts0710_mux_usb.c 2007-04-27 20:35:44.000000000 -0300 -+++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-04-27 22:34:31.000000000 -0300 -@@ -188,7 +188,8 @@ - buf_list_t *inbuf; - int count = urb->actual_length; - -- inbuf = kmalloc(sizeof(buf_list_t), GFP_KERNEL); -+ // we are called from interrupt context. -+ inbuf = kmalloc(sizeof(buf_list_t), GFP_ATOMIC); - if (!inbuf) { - printk("append_to_inbuf_list: (%d) out of memory!\n", - sizeof(buf_list_t)); -@@ -196,7 +197,7 @@ - } - - inbuf->size = count; -- inbuf->body = kmalloc(sizeof(char)*count, GFP_KERNEL); -+ inbuf->body = kmalloc(sizeof(char)*count, GFP_ATOMIC); - if (!inbuf->body) { - kfree(inbuf); - printk("append_to_inbuf_list: (%d) out of memory!\n", -@@ -222,7 +223,7 @@ - inbuf = list_entry(ptr, buf_list_t, list); - src_count = inbuf->size; - if (dst_count >= src_count) { -- memcpy(buf, inbuf->body, src_count); -+ memcpy((unsigned char *)buf, inbuf->body, src_count); - ret = src_count; - list_del(ptr); - kfree(inbuf->body); -@@ -282,9 +283,8 @@ - spin_unlock(&bvd_ipc->in_buf_lock); - } - --static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -+static void usb_ipc_read_bulk(struct urb *urb) - { -- buf_list_t *inbuf; - int count = urb->actual_length; - struct tty_struct *tty = &ipcusb_tty; - -@@ -319,7 +319,7 @@ - bvd_dbg("usb_ipc_read_bulk: completed!!!"); - } - --static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) -+static void usb_ipc_write_bulk(struct urb *urb) - { - callback_times++; - bvd_ipc->write_finished_flag = 1; -@@ -437,7 +437,7 @@ - /*send IN token*/ - bvd_ipc->readurb_mux.actual_length = 0; - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -- if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ if ((ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC))) - printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" - "failed! status=%d\n", ret); - bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); -@@ -447,7 +447,7 @@ - bvd_ipc->write_finished_flag = 0; - //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); - bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; -- if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) -+ if ((result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC))) - warn("ipcusb_xmit_data: funky result! result=%d\n", result); - - bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); -@@ -498,7 +498,7 @@ - return 0; - - if (*ipcusb_ap_to_bp != NULL) -- (*ipcusb_ap_to_bp)(buf, count); -+ (*ipcusb_ap_to_bp)((unsigned char *)buf, count); - - bvd_ipc->suspend_flag = 1; - -@@ -602,6 +602,7 @@ - } - - ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; -+ readsize = writesize = 0; - - while (ep_cnt < interface->bNumEndpoints) { - endpoint = &intf->cur_altsetting->endpoint[ep_cnt].desc; -@@ -792,6 +793,8 @@ - bvd_ipc->ipc_dev = NULL; - bvd_ipc->xmit.head = bvd_ipc->xmit.tail = 0; - bvd_ipc->write_flag = IPC_USB_WRITE_INIT; -+ spin_lock_init(&bvd_ipc->lock); -+ spin_lock_init(&bvd_ipc->in_buf_lock); - - ipcusb_tty_driver.write = usb_ipc_write; - ipcusb_tty_driver.chars_in_buffer = usb_ipc_chars_in_buffer; diff --git a/packages/linux/linux-ezx-2.6.21/mux-remove-flipbuffers.patch b/packages/linux/linux-ezx-2.6.21/mux-remove-flipbuffers.patch deleted file mode 100644 index d4781f9fc7..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-remove-flipbuffers.patch +++ /dev/null @@ -1,269 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:25.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:26.000000000 +0100 -@@ -133,6 +133,7 @@ - - struct circ_buf xmit; /* write cric bufffer */ - struct list_head in_buf_list; -+ spinlock_t in_buf_lock; - char bulk_in_ep_mux, - bulk_out_ep_mux, - bulk_in_ep_dsplog; -@@ -204,9 +205,39 @@ - return; - } - memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); -+ spin_lock(&bvd_ipc->in_buf_lock); - list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); -+ spin_unlock(&bvd_ipc->in_buf_lock); - } - -+int get_from_inbuf_list(const unsigned char *buf, int dst_count) -+{ -+ int ret = 0; -+ spin_lock(&bvd_ipc->in_buf_lock); -+ if (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int src_count; -+ buf_list_t *inbuf; -+ struct list_head *ptr; -+ -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry(ptr, buf_list_t, list); -+ src_count = inbuf->size; -+ if (dst_count >= src_count) { -+ memcpy(buf, inbuf->body, src_count); -+ ret = src_count; -+ list_del(ptr); -+ kfree(inbuf->body); -+ kfree(inbuf); -+ } else { -+ bvd_dbg("get_from_inbuf_list: not enough space in destination buffer"); -+ } -+ } -+ spin_unlock(&bvd_ipc->in_buf_lock); -+ -+ return ret; -+} -+EXPORT_SYMBOL(get_from_inbuf_list); -+ - static void ipcusb_timeout(unsigned long data) - { - struct tty_struct *tty = &ipcusb_tty; -@@ -214,13 +245,14 @@ - - bvd_dbg("ipcusb_timeout***"); - -+ spin_lock(&bvd_ipc->in_buf_lock); - while (!(list_empty(&bvd_ipc->in_buf_list))) { - int count; - buf_list_t *inbuf; - struct list_head *ptr = NULL; - - ptr = bvd_ipc->in_buf_list.next; -- inbuf = list_entry (ptr, buf_list_t, list); -+ inbuf = list_entry(ptr, buf_list_t, list); - count = inbuf->size; - if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { - list_del(ptr); -@@ -232,10 +264,12 @@ - break; - } - } -+ spin_unlock(&bvd_ipc->in_buf_lock); - - if (usb_mux_dispatcher) - usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ - -+ spin_lock(&bvd_ipc->in_buf_lock); - if (list_empty(&bvd_ipc->in_buf_list)) { - urb->actual_length = 0; - urb->dev = bvd_ipc->ipc_dev; -@@ -246,6 +280,7 @@ - ipcusb_timer.data = (unsigned long)urb; - mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); - } -+ spin_unlock(&bvd_ipc->in_buf_lock); - } - - static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -@@ -266,69 +301,11 @@ - if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) - (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); - -- if (!(list_empty(&bvd_ipc->in_buf_list))) { -- int need_mux = 0; -- -- bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); -- if (count > 0) { -- bvd_ipc->suspend_flag = 1; -- append_to_inbuf_list(urb); /* append the current received urb */ --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif -- } -- -- while (!(list_empty(&bvd_ipc->in_buf_list))) { -- struct list_head* ptr = NULL; -- ptr = bvd_ipc->in_buf_list.next; -- inbuf = list_entry(ptr, buf_list_t, list); -- count = inbuf->size; -- need_mux = 1; -- -- tty_insert_flip_string(tty, inbuf->body, count); -- -- list_del(ptr); -- kfree(inbuf->body); -- inbuf->body = NULL; -- kfree(inbuf); -- } -- -- if (usb_mux_dispatcher && need_mux) -- usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -- -- if (list_empty(&bvd_ipc->in_buf_list)) { -- urb->actual_length = 0; -- urb->dev = bvd_ipc->ipc_dev; -- if (usb_submit_urb(urb, GFP_ATOMIC)) -- bvd_dbg("usb_ipc_read_bulk: " -- "failed resubmitting read urb"); -- bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -- } else { -- ipcusb_timer.data = (unsigned long)urb; -- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -- } -- } else if (count > 0) { -- bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); -+ if (count > 0) { -+ bvd_dbg("usb_ipc_read_bulk: inserting buffer into in_buf_list"); - bvd_ipc->suspend_flag = 1; - -- if (tty_insert_flip_string(tty, urb->transfer_buffer, -- count) < count) { -- bvd_ipc->suspend_flag = 1; -- append_to_inbuf_list(urb); -- ipcusb_timer.data = (unsigned long)urb; -- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif -- } -+ append_to_inbuf_list(urb); - - if (usb_mux_dispatcher) - usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -@@ -337,13 +314,6 @@ - urb->dev = bvd_ipc->ipc_dev; - if (usb_submit_urb(urb, GFP_ATOMIC)) - bvd_dbg("failed resubmitting read urb"); --#if 0 -- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -- { -- last_jiff = jiffies; -- queue_apm_event(KRNL_ICL, NULL); -- } --#endif - bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); - } - -@@ -705,7 +675,8 @@ - bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; - bvd_ipc->ipc_dev = usbdev; - bvd_ipc->writesize = writesize; -- INIT_LIST_HEAD (&bvd_ipc->in_buf_list); -+ INIT_LIST_HEAD(&bvd_ipc->in_buf_list); -+ bvd_ipc->in_buf_lock = SPIN_LOCK_UNLOCKED; - - bvd_ipc->bh.func = usbipc_bh_func; - bvd_ipc->bh.data = (unsigned long) bvd_ipc; -Index: linux-2.6.16/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux.c 2007-01-17 00:52:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux.c 2007-01-17 00:52:26.000000000 +0100 -@@ -3149,7 +3149,7 @@ - static void receive_worker(void *private_) - { - struct tty_struct *tty = COMM_FOR_MUX_TTY; -- int i, count; -+ int i, count, tbuf_free, tbuf_read; - static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; - static unsigned char *tbuf_ptr = &tbuf[0]; - static unsigned char *start_flag = 0; -@@ -3167,29 +3167,39 @@ - - UNUSED_PARAM(private_); - -- if (!tty) -- return; -+ if (!tty) -+ return; -+ -+ while (1) { -+ tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); -+ TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); -+ tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); -+ if (tbuf_read == 0) { -+ break; -+ } else { -+ TS0710_PRINTK("Read %i bytes.\n", tbuf_read); -+ }; -+ tbuf_ptr += tbuf_read; -+ }; -+ -+ count = (tbuf_ptr - tbuf); -+ -+ // Should be impossible? -+ //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -+ // TS0710_PRINTK -+ // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -+ // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -+ //} - - #ifdef USB_FOR_MUX -- TS0710_DEBUG("Receive following bytes from IPC-USB"); -+ TS0710_DEBUG("Received following bytes from IPC-USB"); - #else -- TS0710_DEBUG("Receive following bytes from UART"); -+ TS0710_DEBUG("Received following bytes from UART"); - #endif -- -- TS0710_DEBUGHEX(cp, count); -- -- if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -- TS0710_PRINTK -- ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -- count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -- } -- -- count = tty_buffer_request_room(tty, count); -- -- for (i = 0; i < count; i++) -- tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); -- -- tbuf_ptr += count; -+ TS0710_DEBUGHEX(tbuf, count); -+ -+ //gets updated above -+ //tbuf_ptr += count; - search = &tbuf[0]; - - if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.h -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:26.000000000 +0100 -@@ -27,3 +27,6 @@ - extern struct tty_struct *usb_for_mux_tty; - extern void (*usb_mux_dispatcher)(struct tty_struct *tty); - extern void (*usb_mux_sender)(void); -+ -+extern int get_from_inbuf_list(const unsigned char *buf, int dst_count); -+ diff --git a/packages/linux/linux-ezx-2.6.21/mux-remove-get_halted_bit.patch b/packages/linux/linux-ezx-2.6.21/mux-remove-get_halted_bit.patch deleted file mode 100644 index 0ebe27d03b..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-remove-get_halted_bit.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:21.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:31.000000000 +0100 -@@ -461,7 +461,7 @@ - ipcusb_xmit_data(); - } - --extern void get_halted_bit(void); -+//extern void get_halted_bit(void); - - static void usbipc_bh_bp_func(unsigned long param) - { -@@ -472,7 +472,7 @@ - "UHCRHPS3=0x%x", UHCRHPS3); - } - if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { -- get_halted_bit(); -+ //get_halted_bit(); - - /*send a IN token*/ - bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; diff --git a/packages/linux/linux-ezx-2.6.21/mux-remove-usbh_finished_resume.patch b/packages/linux/linux-ezx-2.6.21/mux-remove-usbh_finished_resume.patch deleted file mode 100644 index c415ded428..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux-remove-usbh_finished_resume.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:23.000000000 +0100 -+++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:37.000000000 +0100 -@@ -97,7 +97,6 @@ - static int sumbit_times = 0; - static int callback_times = 0; - //static unsigned long last_jiff = 0; --extern int usbh_finished_resume; - /*end global values defined*/ - - MODULE_AUTHOR(DRIVER_AUTHOR); -@@ -546,9 +545,6 @@ - void usb_send_readurb(void) - { - //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); -- -- if (usbh_finished_resume == 0) -- return; - - tasklet_schedule(&bvd_ipc->bh_bp); - } diff --git a/packages/linux/linux-ezx-2.6.21/mux_cli.patch b/packages/linux/linux-ezx-2.6.21/mux_cli.patch deleted file mode 100644 index b3974a5996..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux_cli.patch +++ /dev/null @@ -1,5396 +0,0 @@ -Index: linux-2.6.21/drivers/char/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/char/Kconfig 2007-05-06 17:07:33.000000000 -0300 -+++ linux-2.6.21/drivers/char/Kconfig 2007-05-06 17:10:53.000000000 -0300 -@@ -1071,5 +1071,18 @@ - /sys/devices/platform/telco_clock, with a number of files for - controlling the behavior of this hardware. - -+config TS0710_MUX -+ tristate "GSM TS 07.10 Multiplex driver" -+ depends on EZX_BP -+ help -+ This implements the GSM 07.10 multiplex. -+ -+config TS0710_MUX_USB -+ tristate "Motorola USB support for TS 07.10 Multiplex driver" -+ depends on TS0710_MUX -+ help -+ This ads support for TS 07.10 over USB, as found in motorola -+ Smartphones. -+ - endmenu - -Index: linux-2.6.21/drivers/char/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/char/Makefile 2007-05-06 17:07:33.000000000 -0300 -+++ linux-2.6.21/drivers/char/Makefile 2007-05-06 17:10:21.000000000 -0300 -@@ -104,6 +104,9 @@ - obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o - obj-$(CONFIG_TCG_TPM) += tpm/ - -+obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o -+ -+ - # Files generated that shall be removed upon make clean - clean-files := consolemap_deftbl.c defkeymap.c - -Index: linux-2.6.21/drivers/char/ts0710.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/char/ts0710.h 2007-05-06 17:10:21.000000000 -0300 -@@ -0,0 +1,368 @@ -+/* -+ * File: ts0710.h -+ * -+ * Portions derived from rfcomm.c, original header as follows: -+ * -+ * Copyright (C) 2000, 2001 Axis Communications AB -+ * -+ * Author: Mats Friden -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * Exceptionally, Axis Communications AB grants discretionary and -+ * conditional permissions for additional use of the text contained -+ * in the company's release of the AXIS OpenBT Stack under the -+ * provisions set forth hereunder. -+ * -+ * Provided that, if you use the AXIS OpenBT Stack with other files, -+ * that do not implement functionality as specified in the Bluetooth -+ * System specification, to produce an executable, this does not by -+ * itself cause the resulting executable to be covered by the GNU -+ * General Public License. Your use of that executable is in no way -+ * restricted on account of using the AXIS OpenBT Stack code with it. -+ * -+ * This exception does not however invalidate any other reasons why -+ * the executable file might be covered by the provisions of the GNU -+ * General Public License. -+ * -+ */ -+/* -+ * Copyright (C) 2002 Motorola -+ * -+ * 07/28/2002 Initial version based on rfcomm.c -+ * 11/18/2002 Modified -+ */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#define TS0710_MAX_CHN 14 -+ -+#define SET_PF(ctr) ((ctr) | (1 << 4)) -+#define CLR_PF(ctr) ((ctr) & 0xef) -+#define GET_PF(ctr) (((ctr) >> 4) & 0x1) -+ -+#define GET_PN_MSG_FRAME_SIZE(pn) ( ((pn)->frame_sizeh << 8) | ((pn)->frame_sizel)) -+#define SET_PN_MSG_FRAME_SIZE(pn, size) ({ (pn)->frame_sizel = (size) & 0xff; \ -+ (pn)->frame_sizeh = (size) >> 8; }) -+ -+#define GET_LONG_LENGTH(a) ( ((a).h_len << 7) | ((a).l_len) ) -+#define SET_LONG_LENGTH(a, length) ({ (a).ea = 0; \ -+ (a).l_len = length & 0x7F; \ -+ (a).h_len = (length >> 7) & 0xFF; }) -+ -+#define SHORT_CRC_CHECK 3 -+#define LONG_CRC_CHECK 4 -+ -+/* FIXME: Should thsi one be define here? */ -+#define SHORT_PAYLOAD_SIZE 127 -+ -+#define EA 1 -+#define FCS_SIZE 1 -+#define FLAG_SIZE 2 -+ -+#define TS0710_MAX_HDR_SIZE 5 -+#define DEF_TS0710_MTU 256 -+ -+#define TS0710_BASIC_FLAG 0xF9 -+/* the control field */ -+#define SABM 0x2f -+#define SABM_SIZE 4 -+#define UA 0x63 -+#define UA_SIZE 4 -+#define DM 0x0f -+#define DISC 0x43 -+#define UIH 0xef -+ -+/* the type field in a multiplexer command packet */ -+#define TEST 0x8 -+#define FCON 0x28 -+#define FCOFF 0x18 -+#define MSC 0x38 -+#define RPN 0x24 -+#define RLS 0x14 -+#define PN 0x20 -+#define NSC 0x4 -+ -+/* V.24 modem control signals */ -+#define FC 0x2 -+#define RTC 0x4 -+#define RTR 0x8 -+#define IC 0x40 -+#define DV 0x80 -+ -+#define CTRL_CHAN 0 /* The control channel is defined as DLCI 0 */ -+#define MCC_CMD 1 /* Multiplexer command cr */ -+#define MCC_RSP 0 /* Multiplexer response cr */ -+ -+#ifdef __LITTLE_ENDIAN_BITFIELD -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 cr:1; -+ __u8 d:1; -+ __u8 server_chn:5; -+} __attribute__ ((packed)) address_field; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 len:7; -+} __attribute__ ((packed)) short_length; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 l_len:7; -+ __u8 h_len; -+} __attribute__ ((packed)) long_length; -+ -+typedef struct { -+ address_field addr; -+ __u8 control; -+ short_length length; -+} __attribute__ ((packed)) short_frame_head; -+ -+typedef struct { -+ short_frame_head h; -+ __u8 data[0]; -+} __attribute__ ((packed)) short_frame; -+ -+typedef struct { -+ address_field addr; -+ __u8 control; -+ long_length length; -+ __u8 data[0]; -+} __attribute__ ((packed)) long_frame_head; -+ -+typedef struct { -+ long_frame_head h; -+ __u8 data[0]; -+} __attribute__ ((packed)) long_frame; -+ -+/* Typedefinitions for structures used for the multiplexer commands */ -+typedef struct { -+ __u8 ea:1; -+ __u8 cr:1; -+ __u8 type:6; -+} __attribute__ ((packed)) mcc_type; -+ -+typedef struct { -+ mcc_type type; -+ short_length length; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_short_frame_head; -+ -+typedef struct { -+ mcc_short_frame_head h; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_short_frame; -+ -+typedef struct { -+ mcc_type type; -+ long_length length; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_long_frame_head; -+ -+typedef struct { -+ mcc_long_frame_head h; -+ __u8 value[0]; -+} __attribute__ ((packed)) mcc_long_frame; -+ -+/* MSC-command */ -+typedef struct { -+ __u8 ea:1; -+ __u8 fc:1; -+ __u8 rtc:1; -+ __u8 rtr:1; -+ __u8 reserved:2; -+ __u8 ic:1; -+ __u8 dv:1; -+} __attribute__ ((packed)) v24_sigs; -+ -+typedef struct { -+ __u8 ea:1; -+ __u8 b1:1; -+ __u8 b2:1; -+ __u8 b3:1; -+ __u8 len:4; -+} __attribute__ ((packed)) brk_sigs; -+ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ __u8 v24_sigs; -+ //brk_sigs break_signals; -+ __u8 fcs; -+} __attribute__ ((packed)) msc_msg; -+ -+#if 0 -+/* conflict with termios.h */ -+/* RPN command */ -+#define B2400 0 -+#define B4800 1 -+#define B7200 2 -+#define B9600 3 -+#define B19200 4 -+#define B38400 5 -+#define B57600 6 -+#define B115200 7 -+#define D230400 8 -+#endif -+ -+/* -+typedef struct{ -+ __u8 bit_rate:1; -+ __u8 data_bits:1; -+ __u8 stop_bit:1; -+ __u8 parity:1; -+ __u8 parity_type:1; -+ __u8 xon_u8:1; -+ __u8 xoff_u8:1; -+ __u8 res1:1; -+ __u8 xon_input:1; -+ __u8 xon_output:1; -+ __u8 rtr_input:1; -+ __u8 rtr_output:1; -+ __u8 rtc_input:1; -+ __u8 rtc_output:1; -+ __u8 res2:2; -+} __attribute__((packed)) parameter_mask; -+ -+typedef struct{ -+ __u8 bit_rate; -+ __u8 data_bits:2; -+ __u8 stop_bit:1; -+ __u8 parity:1; -+ __u8 parity_type:2; -+ __u8 res1:2; -+ __u8 xon_input:1; -+ __u8 xon_output:1; -+ __u8 rtr_input:1; -+ __u8 rtr_output:1; -+ __u8 rtc_input:1; -+ __u8 rtc_output:1; -+ __u8 res2:2; -+ __u8 xon_u8; -+ __u8 xoff_u8; -+ parameter_mask pm; -+} __attribute__((packed)) rpn_values; -+ -+typedef struct{ -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ rpn_values rpn_val; -+ __u8 fcs; -+} __attribute__((packed)) rpn_msg; -+*/ -+ -+/* RLS-command */ -+/* -+typedef struct{ -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ address_field dlci; -+ __u8 error:4; -+ __u8 res:4; -+ __u8 fcs; -+} __attribute__((packed)) rls_msg; -+*/ -+ -+/* PN-command */ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ __u8 dlci:6; -+ __u8 res1:2; -+ __u8 frame_type:4; -+ __u8 credit_flow:4; -+ __u8 prior:6; -+ __u8 res2:2; -+ __u8 ack_timer; -+ __u8 frame_sizel; -+ __u8 frame_sizeh; -+ __u8 max_nbrof_retrans; -+ __u8 credits; -+ __u8 fcs; -+} __attribute__ ((packed)) pn_msg; -+ -+/* NSC-command */ -+typedef struct { -+ short_frame_head s_head; -+ mcc_short_frame_head mcc_s_head; -+ mcc_type command_type; -+ __u8 fcs; -+} __attribute__ ((packed)) nsc_msg; -+ -+#else -+#error Only littel-endianess supported now! -+#endif -+ -+enum { -+ REJECTED = 0, -+ DISCONNECTED, -+ CONNECTING, -+ NEGOTIATING, -+ CONNECTED, -+ DISCONNECTING, -+ FLOW_STOPPED -+}; -+ -+enum ts0710_events { -+ CONNECT_IND, -+ CONNECT_CFM, -+ DISCONN_CFM -+}; -+ -+typedef struct { -+ volatile __u8 state; -+ volatile __u8 flow_control; -+ volatile __u8 initiated; -+ volatile __u8 initiator; -+ volatile __u16 mtu; -+ wait_queue_head_t open_wait; -+ wait_queue_head_t close_wait; -+} dlci_struct; -+ -+/* user space interfaces */ -+typedef struct { -+ volatile __u8 initiator; -+ volatile __u8 c_dlci; -+ volatile __u16 mtu; -+ volatile __u8 be_testing; -+ volatile __u32 test_errs; -+ wait_queue_head_t test_wait; -+ -+ dlci_struct dlci[TS0710_MAX_CHN]; -+} ts0710_con; -Index: linux-2.6.21/drivers/char/ts0710_mux.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-05-06 17:10:21.000000000 -0300 -@@ -0,0 +1,3966 @@ -+/* -+ * File: mux_driver.c -+ * -+ * Portions derived from rfcomm.c, original header as follows: -+ * -+ * Copyright (C) 2000, 2001 Axis Communications AB -+ * -+ * Author: Mats Friden -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * Exceptionally, Axis Communications AB grants discretionary and -+ * conditional permissions for additional use of the text contained -+ * in the company's release of the AXIS OpenBT Stack under the -+ * provisions set forth hereunder. -+ * -+ * Provided that, if you use the AXIS OpenBT Stack with other files, -+ * that do not implement functionality as specified in the Bluetooth -+ * System specification, to produce an executable, this does not by -+ * itself cause the resulting executable to be covered by the GNU -+ * General Public License. Your use of that executable is in no way -+ * restricted on account of using the AXIS OpenBT Stack code with it. -+ * -+ * This exception does not however invalidate any other reasons why -+ * the executable file might be covered by the provisions of the GNU -+ * General Public License. -+ * -+ */ -+/* -+ * Copyright (C) 2002-2004 Motorola -+ * Copyright (C) 2006 Harald Welte -+ * -+ * 07/28/2002 Initial version -+ * 11/18/2002 Second version -+ * 04/21/2004 Add GPRS PROC -+ */ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#define USB_FOR_MUX -+ -+#ifndef USB_FOR_MUX -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+//#include -+ -+#include -+#include -+#include -+ -+#ifdef USB_FOR_MUX -+//#include -+#include "ts0710_mux_usb.h" -+#endif -+ -+#include "ts0710.h" -+#include "ts0710_mux.h" -+ -+#define TS0710MUX_GPRS_SESSION_MAX 2 -+#define TS0710MUX_MAJOR 250 -+#define TS0710MUX_MINOR_START 0 -+#define NR_MUXS 16 -+ -+ /*#define TS0710MUX_TIME_OUT 30 *//* 300ms */ -+#define TS0710MUX_TIME_OUT 250 /* 2500ms, for BP UART hardware flow control AP UART */ -+ -+#define TS0710MUX_IO_DLCI_FC_ON 0x54F2 -+#define TS0710MUX_IO_DLCI_FC_OFF 0x54F3 -+#define TS0710MUX_IO_FC_ON 0x54F4 -+#define TS0710MUX_IO_FC_OFF 0x54F5 -+ -+#define TS0710MUX_MAX_BUF_SIZE 2048 -+ -+#define TS0710MUX_SEND_BUF_OFFSET 10 -+#define TS0710MUX_SEND_BUF_SIZE (DEF_TS0710_MTU + TS0710MUX_SEND_BUF_OFFSET + 34) -+#define TS0710MUX_RECV_BUF_SIZE TS0710MUX_SEND_BUF_SIZE -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+#define ACK_SPACE 66 /* 6 * 11(ACK frame size) */ -+#else -+#define ACK_SPACE 42 /* 6 * 7(ACK frame size) */ -+#endif -+/*For BP UART problem End*/ -+ -+ /*#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE)*//* For BP UART problem */ -+#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + ACK_SPACE) /* For BP UART problem: ACK_SPACE */ -+ -+#define TS0710MUX_MAX_TOTAL_FRAME_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + FLAG_SIZE) -+#define TS0710MUX_MAX_CHARS_IN_BUF 65535 -+#define TS0710MUX_THROTTLE_THRESHOLD DEF_TS0710_MTU -+ -+#define TEST_PATTERN_SIZE 250 -+ -+#define CMDTAG 0x55 -+#define DATATAG 0xAA -+ -+#define ACK 0x4F /*For BP UART problem */ -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+#define FIRST_BP_SEQ_OFFSET 1 /*offset from start flag */ -+#define SECOND_BP_SEQ_OFFSET 2 /*offset from start flag */ -+#define FIRST_AP_SEQ_OFFSET 3 /*offset from start flag */ -+#define SECOND_AP_SEQ_OFFSET 4 /*offset from start flag */ -+#define SLIDE_BP_SEQ_OFFSET 5 /*offset from start flag */ -+#define SEQ_FIELD_SIZE 5 -+#else -+#define SLIDE_BP_SEQ_OFFSET 1 /*offset from start flag */ -+#define SEQ_FIELD_SIZE 1 -+#endif -+ -+#define ADDRESS_FIELD_OFFSET (1 + SEQ_FIELD_SIZE) /*offset from start flag */ -+/*For BP UART problem End*/ -+ -+#ifndef UNUSED_PARAM -+#define UNUSED_PARAM(v) (void)(v) -+#endif -+ -+#define TS0710MUX_GPRS1_DLCI 7 -+#define TS0710MUX_GPRS2_DLCI 8 -+ -+#define TS0710MUX_GPRS1_RECV_COUNT_IDX 0 -+#define TS0710MUX_GPRS1_SEND_COUNT_IDX 1 -+#define TS0710MUX_GPRS2_RECV_COUNT_IDX 2 -+#define TS0710MUX_GPRS2_SEND_COUNT_IDX 3 -+#define TS0710MUX_COUNT_MAX_IDX 3 -+#define TS0710MUX_COUNT_IDX_NUM (TS0710MUX_COUNT_MAX_IDX + 1) -+ -+static volatile int mux_data_count[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; -+static volatile int mux_data_count2[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; -+static struct semaphore mux_data_count_mutex[TS0710MUX_COUNT_IDX_NUM]; -+static volatile __u8 post_recv_count_flag = 0; -+ -+/*PROC file*/ -+struct proc_dir_entry *gprs_proc_file = NULL; -+ssize_t file_proc_read(struct file *file, char *buf, size_t size, -+ loff_t * ppos); -+ssize_t file_proc_write(struct file *file, const char *buf, size_t count, -+ loff_t * ppos); -+struct file_operations file_proc_operations = { -+ read:file_proc_read, -+ write:file_proc_write, -+}; -+typedef struct { -+ int recvBytes; -+ int sentBytes; -+} gprs_bytes; -+ -+static __u8 tty2dlci[NR_MUXS] = -+ { 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, 13 }; -+static __u8 iscmdtty[NR_MUXS] = -+ { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; -+typedef struct { -+ __u8 cmdtty; -+ __u8 datatty; -+} dlci_tty; -+static dlci_tty dlci2tty[] = { {0, 0}, /* DLCI 0 */ -+{0, 0}, /* DLCI 1 */ -+{1, 1}, /* DLCI 2 */ -+{2, 2}, /* DLCI 3 */ -+{3, 3}, /* DLCI 4 */ -+{4, 4}, /* DLCI 5 */ -+{5, 8}, /* DLCI 6 */ -+{6, 9}, /* DLCI 7 */ -+{7, 10}, /* DLCI 8 */ -+{11, 11}, /* DLCI 9 */ -+{12, 12}, /* DLCI 10 */ -+{13, 13}, /* DLCI 11 */ -+{14, 14}, /* DLCI 12 */ -+{15, 15} -+}; /* DLCI 13 */ -+ -+typedef struct { -+ volatile __u8 buf[TS0710MUX_SEND_BUF_SIZE]; -+ volatile __u8 *frame; -+ unsigned long flags; -+ volatile __u16 length; -+ volatile __u8 filled; -+ volatile __u8 dummy; /* Allignment to 4*n bytes */ -+} mux_send_struct; -+ -+/* Bit number in flags of mux_send_struct */ -+#define BUF_BUSY 0 -+ -+struct mux_recv_packet_tag { -+ __u8 *data; -+ __u32 length; -+ struct mux_recv_packet_tag *next; -+}; -+typedef struct mux_recv_packet_tag mux_recv_packet; -+ -+struct mux_recv_struct_tag { -+ __u8 data[TS0710MUX_RECV_BUF_SIZE]; -+ __u32 length; -+ __u32 total; -+ mux_recv_packet *mux_packet; -+ struct mux_recv_struct_tag *next; -+ int no_tty; -+ volatile __u8 post_unthrottle; -+}; -+typedef struct mux_recv_struct_tag mux_recv_struct; -+ -+#define RECV_RUNNING 0 -+static unsigned long mux_recv_flags = 0; -+ -+static mux_send_struct *mux_send_info[NR_MUXS]; -+static volatile __u8 mux_send_info_flags[NR_MUXS]; -+static volatile __u8 mux_send_info_idx = NR_MUXS; -+ -+static mux_recv_struct *mux_recv_info[NR_MUXS]; -+static volatile __u8 mux_recv_info_flags[NR_MUXS]; -+static mux_recv_struct *mux_recv_queue = NULL; -+ -+static struct tty_driver mux_driver; -+ -+#ifdef USB_FOR_MUX -+#define COMM_FOR_MUX_DRIVER usb_for_mux_driver -+#define COMM_FOR_MUX_TTY usb_for_mux_tty -+#define COMM_MUX_DISPATCHER usb_mux_dispatcher -+#define COMM_MUX_SENDER usb_mux_sender -+#else -+#define COMM_FOR_MUX_DRIVER serial_for_mux_driver -+#define COMM_FOR_MUX_TTY serial_for_mux_tty -+#define COMM_MUX_DISPATCHER serial_mux_dispatcher -+#define COMM_MUX_SENDER serial_mux_sender -+ -+extern struct list_head *tq_serial_for_mux; -+#endif -+ -+extern struct tty_driver *COMM_FOR_MUX_DRIVER; -+extern struct tty_struct *COMM_FOR_MUX_TTY; -+extern void (*COMM_MUX_DISPATCHER) (struct tty_struct * tty); -+extern void (*COMM_MUX_SENDER) (void); -+ -+static struct work_struct send_tqueue; -+static struct work_struct receive_tqueue; -+static struct work_struct post_recv_tqueue; -+ -+static struct tty_struct *mux_table[NR_MUXS]; -+static struct termios *mux_termios[NR_MUXS]; -+static struct termios *mux_termios_locked[NR_MUXS]; -+static volatile short int mux_tty[NR_MUXS]; -+ -+#ifdef min -+#undef min -+#define min(a,b) ( (a)<(b) ? (a):(b) ) -+#endif -+ -+static int get_count(__u8 idx); -+static int set_count(__u8 idx, int count); -+static int add_count(__u8 idx, int count); -+ -+static int send_ua(ts0710_con * ts0710, __u8 dlci); -+static int send_dm(ts0710_con * ts0710, __u8 dlci); -+static int send_sabm(ts0710_con * ts0710, __u8 dlci); -+static int send_disc(ts0710_con * ts0710, __u8 dlci); -+static void queue_uih(mux_send_struct * send_info, __u16 len, -+ ts0710_con * ts0710, __u8 dlci); -+static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, -+ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr); -+static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr); -+static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr); -+ -+static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum); -+static __u8 crc_calc(__u8 * data, __u32 length); -+static void create_crctable(__u8 table[]); -+ -+static void mux_sched_send(void); -+ -+static __u8 crctable[256]; -+ -+static ts0710_con ts0710_connection; -+/* -+static rpn_values rpn_val; -+*/ -+ -+static int valid_dlci(__u8 dlci) -+{ -+ if ((dlci < TS0710_MAX_CHN) && (dlci > 0)) -+ return 1; -+ else -+ return 0; -+} -+ -+#ifdef TS0710DEBUG -+ -+#ifdef PRINT_OUTPUT_PRINTK -+#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) -+#else -+#include "ezxlog.h" -+static __u8 strDebug[256]; -+#define TS0710_DEBUG(fmt, arg...) ({ snprintf(strDebug, sizeof(strDebug), "MUX " __FUNCTION__ ": " fmt "\n" , ## arg); \ -+ /*printk("%s", strDebug)*/ezxlogk("MX", strDebug, strlen(strDebug)); }) -+#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ -+ -+#else -+#define TS0710_DEBUG(fmt...) -+#endif /* End #ifdef TS0710DEBUG */ -+ -+#ifdef TS0710LOG -+static unsigned char g_tbuf[TS0710MUX_MAX_BUF_SIZE]; -+#ifdef PRINT_OUTPUT_PRINTK -+#define TS0710_LOG(fmt, arg...) printk(fmt, ## arg) -+#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) -+#else -+#include "ezxlog.h" -+static __u8 strLog[256]; -+#define TS0710_LOG(fmt, arg...) ({ snprintf(strLog, sizeof(strLog), fmt, ## arg); \ -+ /*printk("%s", strLog)*/ezxlogk("MX", strLog, strlen(strLog)); }) -+#define TS0710_PRINTK(fmt, arg...) ({ printk(fmt, ## arg); \ -+ TS0710_LOG(fmt, ## arg); }) -+#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ -+ -+#else -+#define TS0710_LOG(fmt...) -+#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) -+#endif /* End #ifdef TS0710LOG */ -+ -+#ifdef TS0710DEBUG -+static void TS0710_DEBUGHEX(__u8 * buf, int len) -+{ -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ -+ int i; -+ int c; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ c = 0; -+ for (i = 0; (i < len) && (c < (TS0710MUX_MAX_BUF_SIZE - 3)); i++) { -+ sprintf(&tbuf[c], "%02x ", buf[i]); -+ c += 3; -+ } -+ tbuf[c] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ TS0710_DEBUG("%s", tbuf); -+#else -+ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, c); -+#endif -+} -+static void TS0710_DEBUGSTR(__u8 * buf, int len) -+{ -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ if (len > (TS0710MUX_MAX_BUF_SIZE - 1)) { -+ len = (TS0710MUX_MAX_BUF_SIZE - 1); -+ } -+ -+ memcpy(tbuf, buf, len); -+ tbuf[len] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ /* 0x00 byte in the string pointed by tbuf may truncate the print result */ -+ TS0710_DEBUG("%s", tbuf); -+#else -+ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, len); -+#endif -+} -+#else -+#define TS0710_DEBUGHEX(buf, len) -+#define TS0710_DEBUGSTR(buf, len) -+#endif /* End #ifdef TS0710DEBUG */ -+ -+#ifdef TS0710LOG -+static void TS0710_LOGSTR_FRAME(__u8 send, __u8 * data, int len) -+{ -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ __u8 dlci; -+ int pos; -+ -+ if (len <= 0) { -+ return; -+ } -+ -+ pos = 0; -+ if (send) { -+ pos += sprintf(&g_tbuf[pos], "<"); -+ short_pkt = (short_frame *) (data + 1); /*For BP UART problem */ -+ } else { -+ /*For BP UART problem */ -+ /*pos += sprintf(&g_tbuf[pos], ">"); */ -+ pos += sprintf(&g_tbuf[pos], ">%d ", *(data + SLIDE_BP_SEQ_OFFSET)); /*For BP UART problem */ -+ -+#ifdef TS0710SEQ2 -+ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", *(data + FIRST_BP_SEQ_OFFSET), *(data + SECOND_BP_SEQ_OFFSET), *(data + FIRST_AP_SEQ_OFFSET), *(data + SECOND_AP_SEQ_OFFSET)); /*For BP UART problem */ -+#endif -+ -+ short_pkt = (short_frame *) (data + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ } -+ -+ /*For BP UART problem */ -+ /*short_pkt = (short_frame *)(data + 1); */ -+ -+ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; -+ switch (CLR_PF(short_pkt->h.control)) { -+ case SABM: -+ pos += sprintf(&g_tbuf[pos], "C SABM %d ::", dlci); -+ break; -+ case UA: -+ pos += sprintf(&g_tbuf[pos], "C UA %d ::", dlci); -+ break; -+ case DM: -+ pos += sprintf(&g_tbuf[pos], "C DM %d ::", dlci); -+ break; -+ case DISC: -+ pos += sprintf(&g_tbuf[pos], "C DISC %d ::", dlci); -+ break; -+ -+ /*For BP UART problem Begin */ -+ case ACK: -+ pos += sprintf(&g_tbuf[pos], "C ACK %d ", short_pkt->data[0]); -+ -+#ifdef TS0710SEQ2 -+ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", short_pkt->data[1], short_pkt->data[2], short_pkt->data[3], short_pkt->data[4]); /*For BP UART problem */ -+#endif -+ -+ pos += sprintf(&g_tbuf[pos], "::"); -+ break; -+ /*For BP UART problem End */ -+ -+ case UIH: -+ if (!dlci) { -+ pos += sprintf(&g_tbuf[pos], "C MCC %d ::", dlci); -+ } else { -+ -+ if ((short_pkt->h.length.ea) == 0) { -+ long_pkt = (long_frame *) short_pkt; -+ uih_len = GET_LONG_LENGTH(long_pkt->h.length); -+ uih_data_start = long_pkt->h.data; -+ } else { -+ uih_len = short_pkt->h.length.len; -+ uih_data_start = short_pkt->data; -+ } -+ switch (*uih_data_start) { -+ case CMDTAG: -+ pos += -+ sprintf(&g_tbuf[pos], "I %d A %d ::", dlci, -+ uih_len); -+ break; -+ case DATATAG: -+ default: -+ pos += -+ sprintf(&g_tbuf[pos], "I %d D %d ::", dlci, -+ uih_len); -+ break; -+ } -+ -+ } -+ break; -+ default: -+ pos += sprintf(&g_tbuf[pos], "N!!! %d ::", dlci); -+ break; -+ } -+ -+ if (len > (sizeof(g_tbuf) - pos - 1)) { -+ len = (sizeof(g_tbuf) - pos - 1); -+ } -+ -+ memcpy(&g_tbuf[pos], data, len); -+ pos += len; -+ g_tbuf[pos] = 0; -+ -+#ifdef PRINT_OUTPUT_PRINTK -+ /* 0x00 byte in the string pointed by g_tbuf may truncate the print result */ -+ TS0710_LOG("%s\n", g_tbuf); -+#else -+ /*printk("%s\n", g_tbuf) */ ezxlogk("MX", g_tbuf, pos); -+#endif -+} -+#else -+#define TS0710_LOGSTR_FRAME(send, data, len) -+#endif -+ -+#ifdef TS0710SIG -+#define my_for_each_task(p) \ -+ for ((p) = current; ((p) = (p)->next_task) != current; ) -+ -+static void TS0710_SIG2APLOGD(void) -+{ -+ struct task_struct *p; -+ static __u8 sig = 0; -+ -+ if (sig) { -+ return; -+ } -+ -+ read_lock(&tasklist_lock); -+ my_for_each_task(p) { -+ if (strncmp(p->comm, "aplogd", 6) == 0) { -+ sig = 1; -+ if (send_sig(SIGUSR2, p, 1) == 0) { -+ TS0710_PRINTK -+ ("MUX: success to send SIGUSR2 to aplogd!\n"); -+ } else { -+ TS0710_PRINTK -+ ("MUX: failure to send SIGUSR2 to aplogd!\n"); -+ } -+ break; -+ } -+ } -+ read_unlock(&tasklist_lock); -+ -+ if (!sig) { -+ TS0710_PRINTK("MUX: not found aplogd!\n"); -+ } -+} -+#else -+#define TS0710_SIG2APLOGD() -+#endif -+ -+static int basic_write(ts0710_con * ts0710, __u8 * buf, int len) -+{ -+ int res; -+ -+ UNUSED_PARAM(ts0710); -+ -+ buf[0] = TS0710_BASIC_FLAG; -+ buf[len + 1] = TS0710_BASIC_FLAG; -+ -+ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -+ TS0710_PRINTK -+ ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK -+ ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return -1; -+ } -+ -+ TS0710_LOGSTR_FRAME(1, buf, len + 2); -+ TS0710_DEBUGHEX(buf, len + 2); -+ -+ res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); -+ -+ if (res != len + 2) { -+ TS0710_PRINTK("MUX basic_write: Write Error!\n"); -+ return -1; -+ } -+ -+ return len + 2; -+} -+ -+/* Functions for the crc-check and calculation */ -+ -+#define CRC_VALID 0xcf -+ -+static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum) -+{ -+ __u8 fcs = 0xff; -+ -+ while (length--) { -+ fcs = crctable[fcs ^ *data++]; -+ } -+ fcs = crctable[fcs ^ check_sum]; -+ TS0710_DEBUG("fcs : %d\n", fcs); -+ if (fcs == (uint) 0xcf) { /*CRC_VALID) */ -+ TS0710_DEBUG("crc_check: CRC check OK\n"); -+ return 0; -+ } else { -+ TS0710_PRINTK("MUX crc_check: CRC check failed\n"); -+ return 1; -+ } -+} -+ -+/* Calculates the checksum according to the ts0710 specification */ -+ -+static __u8 crc_calc(__u8 * data, __u32 length) -+{ -+ __u8 fcs = 0xff; -+ -+ while (length--) { -+ fcs = crctable[fcs ^ *data++]; -+ } -+ -+ return 0xff - fcs; -+} -+ -+/* Calulates a reversed CRC table for the FCS check */ -+ -+static void create_crctable(__u8 table[]) -+{ -+ int i, j; -+ -+ __u8 data; -+ __u8 code_word = (__u8) 0xe0; -+ __u8 sr = (__u8) 0; -+ -+ for (j = 0; j < 256; j++) { -+ data = (__u8) j; -+ -+ for (i = 0; i < 8; i++) { -+ if ((data & 0x1) ^ (sr & 0x1)) { -+ sr >>= 1; -+ sr ^= code_word; -+ } else { -+ sr >>= 1; -+ } -+ -+ data >>= 1; -+ sr &= 0xff; -+ } -+ -+ table[j] = sr; -+ sr = 0; -+ } -+} -+ -+static void ts0710_reset_dlci(__u8 j) -+{ -+ if (j >= TS0710_MAX_CHN) -+ return; -+ -+ ts0710_connection.dlci[j].state = DISCONNECTED; -+ ts0710_connection.dlci[j].flow_control = 0; -+ ts0710_connection.dlci[j].mtu = DEF_TS0710_MTU; -+ ts0710_connection.dlci[j].initiated = 0; -+ ts0710_connection.dlci[j].initiator = 0; -+ init_waitqueue_head(&ts0710_connection.dlci[j].open_wait); -+ init_waitqueue_head(&ts0710_connection.dlci[j].close_wait); -+} -+ -+static void ts0710_reset_con(void) -+{ -+ __u8 j; -+ -+ ts0710_connection.initiator = 0; -+ ts0710_connection.mtu = DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE; -+ ts0710_connection.be_testing = 0; -+ ts0710_connection.test_errs = 0; -+ init_waitqueue_head(&ts0710_connection.test_wait); -+ -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710_reset_dlci(j); -+ } -+} -+ -+static void ts0710_init(void) -+{ -+ create_crctable(crctable); -+ -+ ts0710_reset_con(); -+ -+ /* Set the values in the rpn octets */ -+/* -+ rpn_val.bit_rate = 7; -+ rpn_val.data_bits = 3; -+ rpn_val.stop_bit = 0; -+ rpn_val.parity = 0; -+ rpn_val.parity_type = 0; -+ rpn_val.res1 = 0; -+ rpn_val.xon_input = 0; -+ rpn_val.xon_output = 0; -+ rpn_val.rtr_input = 0; -+ rpn_val.rtr_output = 0; -+ rpn_val.rtc_input = 0; -+ rpn_val.rtc_output = 0; -+ rpn_val.res2 = 0; -+ rpn_val.xon_u8 = 0x11; -+ rpn_val.xoff_u8 = 0x13; -+ memset(&rpn_val.pm, 0 , 2); *//* Set the mask to zero */ -+} -+ -+static void ts0710_upon_disconnect(void) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 j; -+ -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710->dlci[j].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[j].open_wait); -+ wake_up_interruptible(&ts0710->dlci[j].close_wait); -+ } -+ ts0710->be_testing = 0; -+ wake_up_interruptible(&ts0710->test_wait); -+ ts0710_reset_con(); -+} -+ -+/* Sending packet functions */ -+ -+/* Creates a UA packet and puts it at the beginning of the pkt pointer */ -+ -+static int send_ua(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *ua; -+ -+ TS0710_DEBUG("send_ua: Creating UA packet to DLCI %d\n", dlci); -+ -+ ua = (short_frame *) (buf + 1); -+ ua->h.addr.ea = 1; -+ ua->h.addr.cr = ((~(ts0710->initiator)) & 0x1); -+ ua->h.addr.d = (dlci) & 0x1; -+ ua->h.addr.server_chn = (dlci) >> 0x1; -+ ua->h.control = SET_PF(UA); -+ ua->h.length.ea = 1; -+ ua->h.length.len = 0; -+ ua->data[0] = crc_calc((__u8 *) ua, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+/* Creates a DM packet and puts it at the beginning of the pkt pointer */ -+ -+static int send_dm(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *dm; -+ -+ TS0710_DEBUG("send_dm: Creating DM packet to DLCI %d\n", dlci); -+ -+ dm = (short_frame *) (buf + 1); -+ dm->h.addr.ea = 1; -+ dm->h.addr.cr = ((~(ts0710->initiator)) & 0x1); -+ dm->h.addr.d = dlci & 0x1; -+ dm->h.addr.server_chn = dlci >> 0x1; -+ dm->h.control = SET_PF(DM); -+ dm->h.length.ea = 1; -+ dm->h.length.len = 0; -+ dm->data[0] = crc_calc((__u8 *) dm, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static int send_sabm(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *sabm; -+ -+ TS0710_DEBUG("send_sabm: Creating SABM packet to DLCI %d\n", dlci); -+ -+ sabm = (short_frame *) (buf + 1); -+ sabm->h.addr.ea = 1; -+ sabm->h.addr.cr = ((ts0710->initiator) & 0x1); -+ sabm->h.addr.d = dlci & 0x1; -+ sabm->h.addr.server_chn = dlci >> 0x1; -+ sabm->h.control = SET_PF(SABM); -+ sabm->h.length.ea = 1; -+ sabm->h.length.len = 0; -+ sabm->data[0] = crc_calc((__u8 *) sabm, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static int send_disc(ts0710_con * ts0710, __u8 dlci) -+{ -+ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; -+ short_frame *disc; -+ -+ TS0710_DEBUG("send_disc: Creating DISC packet to DLCI %d\n", dlci); -+ -+ disc = (short_frame *) (buf + 1); -+ disc->h.addr.ea = 1; -+ disc->h.addr.cr = ((ts0710->initiator) & 0x1); -+ disc->h.addr.d = dlci & 0x1; -+ disc->h.addr.server_chn = dlci >> 0x1; -+ disc->h.control = SET_PF(DISC); -+ disc->h.length.ea = 1; -+ disc->h.length.len = 0; -+ disc->data[0] = crc_calc((__u8 *) disc, SHORT_CRC_CHECK); -+ -+ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); -+} -+ -+static void queue_uih(mux_send_struct * send_info, __u16 len, -+ ts0710_con * ts0710, __u8 dlci) -+{ -+ __u32 size; -+ -+ TS0710_DEBUG -+ ("queue_uih: Creating UIH packet with %d bytes data to DLCI %d\n", -+ len, dlci); -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ long_frame *l_pkt; -+ -+ size = sizeof(long_frame) + len + FCS_SIZE; -+ l_pkt = (long_frame *) (send_info->frame - sizeof(long_frame)); -+ set_uih_hdr((void *)l_pkt, dlci, len, ts0710->initiator); -+ l_pkt->data[len] = crc_calc((__u8 *) l_pkt, LONG_CRC_CHECK); -+ send_info->frame = ((__u8 *) l_pkt) - 1; -+ } else { -+ short_frame *s_pkt; -+ -+ size = sizeof(short_frame) + len + FCS_SIZE; -+ s_pkt = -+ (short_frame *) (send_info->frame - sizeof(short_frame)); -+ set_uih_hdr((void *)s_pkt, dlci, len, ts0710->initiator); -+ s_pkt->data[len] = crc_calc((__u8 *) s_pkt, SHORT_CRC_CHECK); -+ send_info->frame = ((__u8 *) s_pkt) - 1; -+ } -+ send_info->length = size; -+} -+ -+/* Multiplexer command packets functions */ -+ -+/* Turns on the ts0710 flow control */ -+ -+static int ts0710_fcon_msg(ts0710_con * ts0710, __u8 cr) -+{ -+ __u8 buf[30]; -+ mcc_short_frame *mcc_pkt; -+ short_frame *uih_pkt; -+ __u32 size; -+ -+ size = sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE; -+ uih_pkt = (short_frame *) (buf + 1); -+ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), -+ ts0710->initiator); -+ uih_pkt->data[sizeof(mcc_short_frame)] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = FCON; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* Turns off the ts0710 flow control */ -+ -+static int ts0710_fcoff_msg(ts0710_con * ts0710, __u8 cr) -+{ -+ __u8 buf[30]; -+ mcc_short_frame *mcc_pkt; -+ short_frame *uih_pkt; -+ __u32 size; -+ -+ size = (sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE); -+ uih_pkt = (short_frame *) (buf + 1); -+ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), -+ ts0710->initiator); -+ uih_pkt->data[sizeof(mcc_short_frame)] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); -+ -+ mcc_pkt->h.type.ea = 1; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = FCOFF; -+ mcc_pkt->h.length.ea = 1; -+ mcc_pkt->h.length.len = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* -+static int ts0710_rpn_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 req) -+{ -+ char buf[100]; -+ rpn_msg* rpn_pkt; -+ __u32 fsize; -+ __u32 psize; -+ -+ fsize = sizeof(rpn_msg); -+ -+ if (req) { -+ fsize -= sizeof(rpn_values); -+ } -+ -+ psize = (fsize - sizeof(short_frame) - FCS_SIZE); -+ -+ rpn_pkt = (rpn_msg *) buf; -+ -+ set_uih_hdr((short_frame *) rpn_pkt, CTRL_CHAN, psize, ts0710->initiator); -+ -+ rpn_pkt->fcs = crc_calc((__u8*) rpn_pkt, SHORT_CRC_CHECK); -+ -+ rpn_pkt->mcc_s_head.type.ea = EA; -+ rpn_pkt->mcc_s_head.type.cr = cr; -+ rpn_pkt->mcc_s_head.type.type = RPN; -+ rpn_pkt->mcc_s_head.length.ea = EA; -+ -+ rpn_pkt->dlci.ea = EA; -+ rpn_pkt->dlci.cr = 1; -+ rpn_pkt->dlci.d = dlci & 1; -+ rpn_pkt->dlci.server_chn = (dlci >> 1); -+ -+ if (req) { -+ rpn_pkt->mcc_s_head.length.len = 1; -+ rpn_pkt->rpn_val.bit_rate = rpn_pkt->fcs; -+ } else { -+ rpn_pkt->mcc_s_head.length.len = 8; -+ memcpy(&(rpn_pkt->rpn_val), &rpn_val, sizeof(rpn_values)); -+ } -+ return basic_write(ts0710, buf, fsize); -+} -+*/ -+/* -+static int ts0710_rls_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 err_code) -+{ -+ char buf[100]; -+ rls_msg *rls_pkt; -+ __u32 fsize; -+ __u32 psize; -+ -+ fsize = sizeof(rls_msg); -+ psize = fsize - sizeof(short_frame) - FCS_SIZE; -+ rls_pkt = (rls_msg *) buf; -+ -+ set_uih_hdr((short_frame *) rls_pkt, CTRL_CHAN, psize, ts0710->initiator); -+ rls_pkt->fcs = crc_calc((__u8*) rls_pkt, SHORT_CRC_CHECK); -+ -+ rls_pkt->mcc_s_head.type.ea = EA; -+ rls_pkt->mcc_s_head.type.cr = cr; -+ rls_pkt->mcc_s_head.type.type = RLS; -+ rls_pkt->mcc_s_head.length.ea = EA; -+ rls_pkt->mcc_s_head.length.len = 2; -+ -+ rls_pkt->dlci.ea = EA; -+ rls_pkt->dlci.cr = 1; -+ rls_pkt->dlci.d = dlci & 1; -+ rls_pkt->dlci.server_chn = dlci >> 1; -+ rls_pkt->error = err_code; -+ rls_pkt->res = 0; -+ -+ return basic_write(ts0710, buf, fsize); -+} -+*/ -+ -+/* Sends an PN-messages and sets the not negotiable parameters to their -+ default values in ts0710 */ -+ -+static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, -+ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr) -+{ -+ __u8 buf[30]; -+ pn_msg *pn_pkt; -+ __u32 size; -+ TS0710_DEBUG -+ ("send_pn_msg: DLCI 0x%02x, prior:0x%02x, frame_size:%d, credit_flow:%x, credits:%d, cr:%x\n", -+ dlci, prior, frame_size, credit_flow, credits, cr); -+ -+ size = sizeof(pn_msg); -+ pn_pkt = (pn_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)pn_pkt, CTRL_CHAN, -+ size - (sizeof(short_frame) + FCS_SIZE), ts0710->initiator); -+ pn_pkt->fcs = crc_calc((__u8 *) pn_pkt, SHORT_CRC_CHECK); -+ -+ pn_pkt->mcc_s_head.type.ea = 1; -+ pn_pkt->mcc_s_head.type.cr = cr; -+ pn_pkt->mcc_s_head.type.type = PN; -+ pn_pkt->mcc_s_head.length.ea = 1; -+ pn_pkt->mcc_s_head.length.len = 8; -+ -+ pn_pkt->res1 = 0; -+ pn_pkt->res2 = 0; -+ pn_pkt->dlci = dlci; -+ pn_pkt->frame_type = 0; -+ pn_pkt->credit_flow = credit_flow; -+ pn_pkt->prior = prior; -+ pn_pkt->ack_timer = 0; -+ SET_PN_MSG_FRAME_SIZE(pn_pkt, frame_size); -+ pn_pkt->credits = credits; -+ pn_pkt->max_nbrof_retrans = 0; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+/* Send a Not supported command - command, which needs 3 bytes */ -+ -+static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr) -+{ -+ __u8 buf[30]; -+ nsc_msg *nsc_pkt; -+ __u32 size; -+ -+ size = sizeof(nsc_msg); -+ nsc_pkt = (nsc_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)nsc_pkt, CTRL_CHAN, -+ sizeof(nsc_msg) - sizeof(short_frame) - FCS_SIZE, -+ ts0710->initiator); -+ -+ nsc_pkt->fcs = crc_calc((__u8 *) nsc_pkt, SHORT_CRC_CHECK); -+ -+ nsc_pkt->mcc_s_head.type.ea = 1; -+ nsc_pkt->mcc_s_head.type.cr = cr; -+ nsc_pkt->mcc_s_head.type.type = NSC; -+ nsc_pkt->mcc_s_head.length.ea = 1; -+ nsc_pkt->mcc_s_head.length.len = 1; -+ -+ nsc_pkt->command_type.ea = 1; -+ nsc_pkt->command_type.cr = cmd.cr; -+ nsc_pkt->command_type.type = cmd.type; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+static int ts0710_msc_msg(ts0710_con * ts0710, __u8 value, __u8 cr, __u8 dlci) -+{ -+ __u8 buf[30]; -+ msc_msg *msc_pkt; -+ __u32 size; -+ -+ size = sizeof(msc_msg); -+ msc_pkt = (msc_msg *) (buf + 1); -+ -+ set_uih_hdr((void *)msc_pkt, CTRL_CHAN, -+ sizeof(msc_msg) - sizeof(short_frame) - FCS_SIZE, -+ ts0710->initiator); -+ -+ msc_pkt->fcs = crc_calc((__u8 *) msc_pkt, SHORT_CRC_CHECK); -+ -+ msc_pkt->mcc_s_head.type.ea = 1; -+ msc_pkt->mcc_s_head.type.cr = cr; -+ msc_pkt->mcc_s_head.type.type = MSC; -+ msc_pkt->mcc_s_head.length.ea = 1; -+ msc_pkt->mcc_s_head.length.len = 2; -+ -+ msc_pkt->dlci.ea = 1; -+ msc_pkt->dlci.cr = 1; -+ msc_pkt->dlci.d = dlci & 1; -+ msc_pkt->dlci.server_chn = (dlci >> 1) & 0x1f; -+ -+ msc_pkt->v24_sigs = value; -+ -+ return basic_write(ts0710, buf, size); -+} -+ -+static int ts0710_test_msg(ts0710_con * ts0710, __u8 * test_pattern, __u32 len, -+ __u8 cr, __u8 * f_buf /*Frame buf */ ) -+{ -+ __u32 size; -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ long_frame *uih_pkt; -+ mcc_long_frame *mcc_pkt; -+ -+ size = -+ (sizeof(long_frame) + sizeof(mcc_long_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (long_frame *) (f_buf + 1); -+ -+ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, len + -+ sizeof(mcc_long_frame), ts0710->initiator); -+ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = -+ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); -+ mcc_pkt = (mcc_long_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ /* cr tells whether it is a commmand (1) or a response (0) */ -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ SET_LONG_LENGTH(mcc_pkt->h.length, len); -+ memcpy(mcc_pkt->value, test_pattern, len); -+ } else if (len > (SHORT_PAYLOAD_SIZE - sizeof(mcc_short_frame))) { -+ long_frame *uih_pkt; -+ mcc_short_frame *mcc_pkt; -+ -+ /* Create long uih packet and short mcc packet */ -+ size = -+ (sizeof(long_frame) + sizeof(mcc_short_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (long_frame *) (f_buf + 1); -+ -+ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, -+ len + sizeof(mcc_short_frame), ts0710->initiator); -+ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = -+ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = len; -+ memcpy(mcc_pkt->value, test_pattern, len); -+ } else { -+ short_frame *uih_pkt; -+ mcc_short_frame *mcc_pkt; -+ -+ size = -+ (sizeof(short_frame) + sizeof(mcc_short_frame) + len + -+ FCS_SIZE); -+ uih_pkt = (short_frame *) (f_buf + 1); -+ -+ set_uih_hdr((void *)uih_pkt, CTRL_CHAN, len -+ + sizeof(mcc_short_frame), ts0710->initiator); -+ uih_pkt->data[uih_pkt->h.length.len] = -+ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); -+ mcc_pkt = (mcc_short_frame *) uih_pkt->data; -+ -+ mcc_pkt->h.type.ea = EA; -+ mcc_pkt->h.type.cr = cr; -+ mcc_pkt->h.type.type = TEST; -+ mcc_pkt->h.length.ea = EA; -+ mcc_pkt->h.length.len = len; -+ memcpy(mcc_pkt->value, test_pattern, len); -+ -+ } -+ return basic_write(ts0710, f_buf, size); -+} -+ -+static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr) -+{ -+ uih_pkt->h.addr.ea = 1; -+ uih_pkt->h.addr.cr = cr; -+ uih_pkt->h.addr.d = dlci & 0x1; -+ uih_pkt->h.addr.server_chn = dlci >> 1; -+ uih_pkt->h.control = CLR_PF(UIH); -+ -+ if (len > SHORT_PAYLOAD_SIZE) { -+ SET_LONG_LENGTH(((long_frame *) uih_pkt)->h.length, len); -+ } else { -+ uih_pkt->h.length.ea = 1; -+ uih_pkt->h.length.len = len; -+ } -+} -+ -+/* Parses a multiplexer control channel packet */ -+ -+void process_mcc(__u8 * data, __u32 len, ts0710_con * ts0710, int longpkt) -+{ -+ __u8 *tbuf = NULL; -+ mcc_short_frame *mcc_short_pkt; -+ int j; -+ -+ if (longpkt) { -+ mcc_short_pkt = -+ (mcc_short_frame *) (((long_frame *) data)->data); -+ } else { -+ mcc_short_pkt = -+ (mcc_short_frame *) (((short_frame *) data)->data); -+ } -+ -+ switch (mcc_short_pkt->h.type.type) { -+ case TEST: -+ if (mcc_short_pkt->h.type.cr == MCC_RSP) { -+ TS0710_DEBUG("Received test command response\n"); -+ -+ if (ts0710->be_testing) { -+ if ((mcc_short_pkt->h.length.ea) == 0) { -+ mcc_long_frame *mcc_long_pkt; -+ mcc_long_pkt = -+ (mcc_long_frame *) mcc_short_pkt; -+ if (GET_LONG_LENGTH -+ (mcc_long_pkt->h.length) != -+ TEST_PATTERN_SIZE) { -+ ts0710->test_errs = -+ TEST_PATTERN_SIZE; -+ TS0710_DEBUG -+ ("Err: received test pattern is %d bytes long, not expected %d\n", -+ GET_LONG_LENGTH -+ (mcc_long_pkt->h.length), -+ TEST_PATTERN_SIZE); -+ } else { -+ ts0710->test_errs = 0; -+ for (j = 0; -+ j < TEST_PATTERN_SIZE; -+ j++) { -+ if (mcc_long_pkt-> -+ value[j] != -+ (j & 0xFF)) { -+ (ts0710-> -+ test_errs)++; -+ } -+ } -+ } -+ -+ } else { -+ -+#if TEST_PATTERN_SIZE < 128 -+ if (mcc_short_pkt->h.length.len != -+ TEST_PATTERN_SIZE) { -+#endif -+ -+ ts0710->test_errs = -+ TEST_PATTERN_SIZE; -+ TS0710_DEBUG -+ ("Err: received test pattern is %d bytes long, not expected %d\n", -+ mcc_short_pkt->h.length. -+ len, TEST_PATTERN_SIZE); -+ -+#if TEST_PATTERN_SIZE < 128 -+ } else { -+ ts0710->test_errs = 0; -+ for (j = 0; -+ j < TEST_PATTERN_SIZE; -+ j++) { -+ if (mcc_short_pkt-> -+ value[j] != -+ (j & 0xFF)) { -+ (ts0710-> -+ test_errs)++; -+ } -+ } -+ } -+#endif -+ -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ wake_up_interruptible(&ts0710->test_wait); -+ } else { -+ TS0710_DEBUG -+ ("Err: shouldn't or late to get test cmd response\n"); -+ } -+ } else { -+ tbuf = (__u8 *) kmalloc(len + 32, GFP_ATOMIC); -+ if (!tbuf) { -+ break; -+ } -+ -+ if ((mcc_short_pkt->h.length.ea) == 0) { -+ mcc_long_frame *mcc_long_pkt; -+ mcc_long_pkt = (mcc_long_frame *) mcc_short_pkt; -+ ts0710_test_msg(ts0710, mcc_long_pkt->value, -+ GET_LONG_LENGTH(mcc_long_pkt->h. -+ length), -+ MCC_RSP, tbuf); -+ } else { -+ ts0710_test_msg(ts0710, mcc_short_pkt->value, -+ mcc_short_pkt->h.length.len, -+ MCC_RSP, tbuf); -+ } -+ -+ kfree(tbuf); -+ } -+ break; -+ -+ case FCON: /*Flow control on command */ -+ TS0710_PRINTK -+ ("MUX Received Flow control(all channels) on command\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ ts0710->dlci[0].state = CONNECTED; -+ ts0710_fcon_msg(ts0710, MCC_RSP); -+ mux_sched_send(); -+ } -+ break; -+ -+ case FCOFF: /*Flow control off command */ -+ TS0710_PRINTK -+ ("MUX Received Flow control(all channels) off command\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ for (j = 0; j < TS0710_MAX_CHN; j++) { -+ ts0710->dlci[j].state = FLOW_STOPPED; -+ } -+ ts0710_fcoff_msg(ts0710, MCC_RSP); -+ } -+ break; -+ -+ case MSC: /*Modem status command */ -+ { -+ __u8 dlci; -+ __u8 v24_sigs; -+ -+ dlci = (mcc_short_pkt->value[0]) >> 2; -+ v24_sigs = mcc_short_pkt->value[1]; -+ -+ if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ send_dm(ts0710, dlci); -+ break; -+ } -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ TS0710_DEBUG("Received Modem status command\n"); -+ if (v24_sigs & 2) { -+ if (ts0710->dlci[dlci].state == -+ CONNECTED) { -+ TS0710_LOG -+ ("MUX Received Flow off on dlci %d\n", -+ dlci); -+ ts0710->dlci[dlci].state = -+ FLOW_STOPPED; -+ } -+ } else { -+ if (ts0710->dlci[dlci].state == -+ FLOW_STOPPED) { -+ ts0710->dlci[dlci].state = -+ CONNECTED; -+ TS0710_LOG -+ ("MUX Received Flow on on dlci %d\n", -+ dlci); -+ mux_sched_send(); -+ } -+ } -+ -+ ts0710_msc_msg(ts0710, v24_sigs, MCC_RSP, dlci); -+/* -+ if (!(ts0710->dlci[dlci].initiated) && !(ts0710->dlci[dlci].initiator)) { -+ ts0710_msc_msg(ts0710, EA | RTR | RTC | DV, MCC_CMD, dlci); -+ ts0710->dlci[dlci].initiated = 1; -+ } -+*/ -+ } else { -+ TS0710_DEBUG -+ ("Received Modem status response\n"); -+ -+ if (v24_sigs & 2) { -+ TS0710_DEBUG("Flow stop accepted\n"); -+ } -+ } -+ break; -+ } -+ -+ /* case RPN: *//*Remote port negotiation command */ -+ -+/* { -+ __u8 dlci; -+ -+ dlci = (mcc_short_pkt->value[0]) >> 2; -+ -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ if (mcc_short_pkt->h.length.len == 1) { -+ TS0710_DEBUG("Received Remote port negotiation command\n"); -+ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); -+ } else { -+*/ -+ /* Accept the other sides settings (accept all for now) */ -+/* TS0710_DEBUG("Received Remote port negotiation respons\n"); -+ memcpy(&rpn_val, &mcc_short_pkt->value[1], 8); -+ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); -+*/ -+ /* Zero the parametermask after response */ -+/* memset(&rpn_val.pm, 0, 2); -+ } -+ } -+ break; -+ } -+*/ -+/* -+ case RLS: *//*Remote line status */ -+/* { -+ __u8 dlci; -+ __u8 err_code; -+ -+ TS0710_DEBUG("Received Remote line status\n"); -+ if (mcc_short_pkt->h.type.cr == MCC_CMD) { -+ dlci = mcc_short_pkt->value[0] >> 2; -+ err_code = mcc_short_pkt->value[1]; -+ -+ ts0710_rls_msg(ts0710, MCC_RSP, dlci, err_code); -+ } -+ break; -+ } -+*/ -+ case PN: /*DLC parameter negotiation */ -+ { -+ __u8 dlci; -+ __u16 frame_size; -+ pn_msg *pn_pkt; -+ -+ pn_pkt = (pn_msg *) data; -+ dlci = pn_pkt->dlci; -+ frame_size = GET_PN_MSG_FRAME_SIZE(pn_pkt); -+ TS0710_DEBUG -+ ("Received DLC parameter negotiation, PN\n"); -+ if (pn_pkt->mcc_s_head.type.cr == MCC_CMD) { -+ TS0710_DEBUG("received PN command with:\n"); -+ TS0710_DEBUG("Frame size:%d\n", frame_size); -+ -+ frame_size = -+ min(frame_size, ts0710->dlci[dlci].mtu); -+ send_pn_msg(ts0710, pn_pkt->prior, frame_size, -+ 0, 0, dlci, MCC_RSP); -+ ts0710->dlci[dlci].mtu = frame_size; -+ TS0710_DEBUG("process_mcc : mtu set to %d\n", -+ ts0710->dlci[dlci].mtu); -+ } else { -+ TS0710_DEBUG("received PN response with:\n"); -+ TS0710_DEBUG("Frame size:%d\n", frame_size); -+ -+ frame_size = -+ min(frame_size, ts0710->dlci[dlci].mtu); -+ ts0710->dlci[dlci].mtu = frame_size; -+ -+ TS0710_DEBUG -+ ("process_mcc : mtu set on dlci:%d to %d\n", -+ dlci, ts0710->dlci[dlci].mtu); -+ -+ if (ts0710->dlci[dlci].state == NEGOTIATING) { -+ ts0710->dlci[dlci].state = CONNECTING; -+ wake_up_interruptible(&ts0710-> -+ dlci[dlci]. -+ open_wait); -+ } -+ } -+ break; -+ } -+ -+ case NSC: /*Non supported command resonse */ -+ TS0710_LOG("MUX Received Non supported command response\n"); -+ break; -+ -+ default: /*Non supported command received */ -+ TS0710_LOG("MUX Received a non supported command\n"); -+ send_nsc_msg(ts0710, mcc_short_pkt->h.type, MCC_RSP); -+ break; -+ } -+} -+ -+static mux_recv_packet *get_mux_recv_packet(__u32 size) -+{ -+ mux_recv_packet *recv_packet; -+ -+ TS0710_DEBUG("Enter into get_mux_recv_packet"); -+ -+ recv_packet = -+ (mux_recv_packet *) kmalloc(sizeof(mux_recv_packet), GFP_ATOMIC); -+ if (!recv_packet) { -+ return 0; -+ } -+ -+ recv_packet->data = (__u8 *) kmalloc(size, GFP_ATOMIC); -+ if (!(recv_packet->data)) { -+ kfree(recv_packet); -+ return 0; -+ } -+ recv_packet->length = 0; -+ recv_packet->next = 0; -+ return recv_packet; -+} -+ -+static void free_mux_recv_packet(mux_recv_packet * recv_packet) -+{ -+ TS0710_DEBUG("Enter into free_mux_recv_packet"); -+ -+ if (!recv_packet) { -+ return; -+ } -+ -+ if (recv_packet->data) { -+ kfree(recv_packet->data); -+ } -+ kfree(recv_packet); -+} -+ -+static void free_mux_recv_struct(mux_recv_struct * recv_info) -+{ -+ mux_recv_packet *recv_packet1, *recv_packet2; -+ -+ if (!recv_info) { -+ return; -+ } -+ -+ recv_packet1 = recv_info->mux_packet; -+ while (recv_packet1) { -+ recv_packet2 = recv_packet1->next; -+ free_mux_recv_packet(recv_packet1); -+ recv_packet1 = recv_packet2; -+ } -+ -+ kfree(recv_info); -+} -+ -+static inline void add_post_recv_queue(mux_recv_struct ** head, -+ mux_recv_struct * new_item) -+{ -+ new_item->next = *head; -+ *head = new_item; -+} -+ -+static void ts0710_flow_on(__u8 dlci, ts0710_con * ts0710) -+{ -+ int i; -+ __u8 cmdtty; -+ __u8 datatty; -+ struct tty_struct *tty; -+ mux_recv_struct *recv_info; -+ -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (!(ts0710->dlci[dlci].flow_control)) { -+ return; -+ } -+ -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ -+ if (cmdtty != datatty) { -+ /* Check AT cmd tty */ -+ tty = mux_table[cmdtty]; -+ if (mux_tty[cmdtty] && tty) { -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ } -+ recv_info = mux_recv_info[cmdtty]; -+ if (mux_recv_info_flags[cmdtty] && recv_info) { -+ if (recv_info->total) { -+ return; -+ } -+ } -+ -+ /* Check data tty */ -+ tty = mux_table[datatty]; -+ if (mux_tty[datatty] && tty) { -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ } -+ recv_info = mux_recv_info[datatty]; -+ if (mux_recv_info_flags[datatty] && recv_info) { -+ if (recv_info->total) { -+ return; -+ } -+ } -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, dlci) < -+ 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX send Flow on on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 0; -+ break; -+ } -+ } -+} -+ -+static void ts0710_flow_off(struct tty_struct *tty, __u8 dlci, -+ ts0710_con * ts0710) -+{ -+ int i; -+ -+ if (test_and_set_bit(TTY_THROTTLED, &tty->flags)) { -+ return; -+ } -+ -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (ts0710->dlci[dlci].flow_control) { -+ return; -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg -+ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX send Flow off on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 1; -+ break; -+ } -+ } -+} -+ -+int ts0710_recv_data(ts0710_con * ts0710, char *data, int len) -+{ -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ __u8 dlci; -+ __u8 be_connecting; -+#ifdef TS0710DEBUG -+ unsigned long t; -+#endif -+ -+ short_pkt = (short_frame *) data; -+ -+ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; -+ switch (CLR_PF(short_pkt->h.control)) { -+ case SABM: -+ TS0710_DEBUG("SABM-packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ ts0710->dlci[0].state = CONNECTED; -+ -+ TS0710_DEBUG("sending back UA - control channel\n"); -+ send_ua(ts0710, dlci); -+ wake_up_interruptible(&ts0710->dlci[0].open_wait); -+ -+ } else if (valid_dlci(dlci)) { -+ -+ TS0710_DEBUG("Incomming connect on channel %d\n", dlci); -+ -+ TS0710_DEBUG("sending UA, dlci %d\n", dlci); -+ send_ua(ts0710, dlci); -+ -+ ts0710->dlci[dlci].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ -+ } else { -+ TS0710_DEBUG("invalid dlci %d, sending DM\n", dlci); -+ send_dm(ts0710, dlci); -+ } -+ -+ break; -+ -+ case UA: -+ TS0710_DEBUG("UA packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[0]. -+ open_wait); -+ } else if (ts0710->dlci[0].state == DISCONNECTING) { -+ ts0710_upon_disconnect(); -+ } else { -+ TS0710_DEBUG -+ (" Something wrong receiving UA packet\n"); -+ } -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming UA on channel %d\n", dlci); -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ ts0710->dlci[dlci].state = CONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ open_wait); -+ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG -+ (" Something wrong receiving UA packet\n"); -+ } -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case DM: -+ TS0710_DEBUG("DM packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ be_connecting = 1; -+ } else { -+ be_connecting = 0; -+ } -+ ts0710_upon_disconnect(); -+ if (be_connecting) { -+ ts0710->dlci[0].state = REJECTED; -+ } -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming DM on channel %d\n", dlci); -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ ts0710->dlci[dlci].state = REJECTED; -+ } else { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case DISC: -+ TS0710_DEBUG("DISC packet received\n"); -+ -+/*For BP UART problem -+ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) -+ break; -+*/ -+ -+ if (!dlci) { -+ TS0710_DEBUG("server channel == 0\n"); -+ -+ send_ua(ts0710, dlci); -+ TS0710_DEBUG("DISC, sending back UA\n"); -+ -+ ts0710_upon_disconnect(); -+ } else if (valid_dlci(dlci)) { -+ TS0710_DEBUG("Incomming DISC on channel %d\n", dlci); -+ -+ send_ua(ts0710, dlci); -+ TS0710_DEBUG("DISC, sending back UA\n"); -+ -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); -+ ts0710_reset_dlci(dlci); -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ case UIH: -+ TS0710_DEBUG("UIH packet received\n"); -+ -+ if ((dlci >= TS0710_MAX_CHN)) { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ send_dm(ts0710, dlci); -+ break; -+ } -+ -+ if (GET_PF(short_pkt->h.control)) { -+ TS0710_LOG -+ ("MUX Error %s: UIH packet with P/F set, discard it!\n", -+ __FUNCTION__); -+ break; -+ } -+ -+ if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ TS0710_LOG -+ ("MUX Error %s: DLCI %d not connected, discard it!\n", -+ __FUNCTION__, dlci); -+ send_dm(ts0710, dlci); -+ break; -+ } -+ -+ if ((short_pkt->h.length.ea) == 0) { -+ TS0710_DEBUG("Long UIH packet received\n"); -+ long_pkt = (long_frame *) data; -+ uih_len = GET_LONG_LENGTH(long_pkt->h.length); -+ uih_data_start = long_pkt->h.data; -+ TS0710_DEBUG("long packet length %d\n", uih_len); -+ -+/*For BP UART problem -+ if (crc_check(data, LONG_CRC_CHECK, *(uih_data_start + uih_len))) -+ break; -+*/ -+ } else { -+ TS0710_DEBUG("Short UIH pkt received\n"); -+ uih_len = short_pkt->h.length.len; -+ uih_data_start = short_pkt->data; -+ -+/*For BP UART problem -+ if (crc_check(data, SHORT_CRC_CHECK, *(uih_data_start + uih_len))) -+ break; -+*/ -+ } -+ -+ if (dlci == 0) { -+ TS0710_DEBUG("UIH on serv_channel 0\n"); -+ process_mcc(data, len, ts0710, -+ !(short_pkt->h.length.ea)); -+ } else if (valid_dlci(dlci)) { -+ /* do tty dispatch */ -+ __u8 tag; -+ __u8 tty_idx; -+ struct tty_struct *tty; -+ __u8 queue_data; -+ __u8 post_recv; -+ __u8 flow_control; -+ mux_recv_struct *recv_info; -+ int recv_room; -+ mux_recv_packet *recv_packet, *recv_packet2; -+ -+ TS0710_DEBUG("UIH on channel %d\n", dlci); -+ -+ if (uih_len > ts0710->dlci[dlci].mtu) { -+ TS0710_PRINTK -+ ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", -+ dlci, uih_len, ts0710->dlci[dlci].mtu); -+ break; -+ } -+ -+ tag = *uih_data_start; -+ uih_data_start++; -+ uih_len--; -+ -+ if (!uih_len) { -+ break; -+ } -+ -+ switch (tag) { -+ case CMDTAG: -+ tty_idx = dlci2tty[dlci].cmdtty; -+ TS0710_DEBUG("CMDTAG on DLCI:%d, /dev/mux%d\n", -+ dlci, tty_idx); -+ TS0710_DEBUGSTR(uih_data_start, uih_len); -+ if (!(iscmdtty[tty_idx])) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", -+ __FUNCTION__, dlci, tty_idx); -+ } -+ break; -+ case DATATAG: -+ default: -+ tty_idx = dlci2tty[dlci].datatty; -+ TS0710_DEBUG -+ ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", -+ dlci, tty_idx); -+ if (iscmdtty[tty_idx]) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", -+ __FUNCTION__, dlci, tty_idx); -+ } -+ break; -+ } -+ tty = mux_table[tty_idx]; -+ if ((!mux_tty[tty_idx]) || (!tty)) { -+ TS0710_PRINTK -+ ("MUX: No application waiting for, discard it! /dev/mux%d\n", -+ tty_idx); -+ } else { /* Begin processing received data */ -+ if ((!mux_recv_info_flags[tty_idx]) -+ || (!mux_recv_info[tty_idx])) { -+ TS0710_PRINTK -+ ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", -+ tty_idx); -+ break; -+ } -+ -+ recv_info = mux_recv_info[tty_idx]; -+ if (recv_info->total > 8192) { -+ TS0710_PRINTK -+ ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", -+ tty_idx); -+ break; -+ } -+ -+ queue_data = 0; -+ post_recv = 0; -+ flow_control = 0; -+ recv_room = 65535; -+ if (tty->receive_room) -+ recv_room = tty->receive_room; -+ -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ queue_data = 1; -+ } else { -+ if (test_bit -+ (TTY_DONT_FLIP, &tty->flags)) { -+ queue_data = 1; -+ post_recv = 1; -+ } else if (recv_info->total) { -+ queue_data = 1; -+ post_recv = 1; -+ } else if (recv_room < uih_len) { -+ queue_data = 1; -+ flow_control = 1; -+ } -+ -+ if ((recv_room - -+ (uih_len + recv_info->total)) < -+ ts0710->dlci[dlci].mtu) { -+ flow_control = 1; -+ } -+ } -+ -+ if (!queue_data) { -+ /* Put received data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put received data into read buffer of /dev/mux%d", -+ tty_idx); -+ -+#ifdef TS0710DEBUG -+ t = jiffies; -+#endif -+ -+ (tty->ldisc.receive_buf) (tty, -+ uih_data_start, -+ NULL, -+ uih_len); -+ -+#ifdef TS0710DEBUG -+ TS0710_DEBUG -+ ("tty->ldisc.receive_buf take ticks: %lu", -+ (jiffies - t)); -+#endif -+ -+ } else { /* Queue data */ -+ -+ TS0710_DEBUG -+ ("Put received data into recv queue of /dev/mux%d", -+ tty_idx); -+ if (recv_info->total) { -+ /* recv_info is already linked into mux_recv_queue */ -+ -+ recv_packet = -+ get_mux_recv_packet -+ (uih_len); -+ if (!recv_packet) { -+ TS0710_PRINTK -+ ("MUX %s: no memory\n", -+ __FUNCTION__); -+ break; -+ } -+ -+ memcpy(recv_packet->data, -+ uih_data_start, uih_len); -+ recv_packet->length = uih_len; -+ recv_info->total += uih_len; -+ recv_packet->next = NULL; -+ -+ if (!(recv_info->mux_packet)) { -+ recv_info->mux_packet = -+ recv_packet; -+ } else { -+ recv_packet2 = -+ recv_info-> -+ mux_packet; -+ while (recv_packet2-> -+ next) { -+ recv_packet2 = -+ recv_packet2-> -+ next; -+ } -+ recv_packet2->next = -+ recv_packet; -+ } /* End if( !(recv_info->mux_packet) ) */ -+ } else { /* recv_info->total == 0 */ -+ if (uih_len > -+ TS0710MUX_RECV_BUF_SIZE) { -+ TS0710_PRINTK -+ ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", -+ tty_idx, uih_len); -+ uih_len = -+ TS0710MUX_RECV_BUF_SIZE; -+ } -+ memcpy(recv_info->data, -+ uih_data_start, uih_len); -+ recv_info->length = uih_len; -+ recv_info->total = uih_len; -+ -+ add_post_recv_queue -+ (&mux_recv_queue, -+ recv_info); -+ } /* End recv_info->total == 0 */ -+ } /* End Queue data */ -+ -+ if (flow_control) { -+ /* Do something for flow control */ -+ ts0710_flow_off(tty, dlci, ts0710); -+ } -+ -+ if (tty_idx == -+ dlci2tty[TS0710MUX_GPRS1_DLCI].datatty) { -+ if (add_count -+ (TS0710MUX_GPRS1_RECV_COUNT_IDX, -+ uih_len) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2 -+ [TS0710MUX_GPRS1_RECV_COUNT_IDX] -+ += uih_len; -+ } -+ } else if (tty_idx == -+ dlci2tty[TS0710MUX_GPRS2_DLCI]. -+ datatty) { -+ if (add_count -+ (TS0710MUX_GPRS2_RECV_COUNT_IDX, -+ uih_len) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2 -+ [TS0710MUX_GPRS2_RECV_COUNT_IDX] -+ += uih_len; -+ } -+ } -+ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ } /* End processing received data */ -+ } else { -+ TS0710_DEBUG("invalid dlci %d\n", dlci); -+ } -+ -+ break; -+ -+ default: -+ TS0710_DEBUG("illegal packet\n"); -+ break; -+ } -+ return 0; -+} -+ -+/* -+int ts0710_send_data(ts0710_con *ts0710, __u8 dlci, __u8 *data, __u32 count) -+{ -+ __u32 c, total = 0; -+ __u8 tag, first; -+ -+ if( ts0710->dlci[0].state == FLOW_STOPPED ){ -+ TS0710_DEBUG("Flow stopped on all channels, returning zero\n"); -+*/ -+/* -+ return -EFLOWSTOPPED; -+ } else if( ts0710->dlci[dlci].state == FLOW_STOPPED ){ -+ TS0710_DEBUG("Flow stopped, returning zero\n"); -+*/ -+/* -+ return -EFLOWSTOPPED; -+ } else if( ts0710->dlci[dlci].state == CONNECTED ){ -+ -+ TS0710_DEBUG("trying to send %d bytes\n", count); -+ tag = *data; -+ first = 1; -+*/ -+ /* The first byte is always a Cmd/Data tag */ -+/* -+ while( count > 1 ){ -+ -+ c = min(count, ts0710->dlci[dlci].mtu); -+ if( queue_uih(data, c, ts0710, dlci) <= 0 ) { -+ break; -+ } -+ -+ total += (c - 1); -+ data += (c - 1); -+ *data = tag; -+ count -= (c - 1); -+ -+ if( first ) { -+ first = 0; -+ total++; -+ } -+ } -+ TS0710_DEBUG("sent %d bytes\n", total); -+ return total; -+ } else { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ return -EDISCONNECTED; -+ } -+} -+*/ -+ -+/* Close ts0710 channel */ -+static void ts0710_close_channel(__u8 dlci) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int try; -+ unsigned long t; -+ -+ TS0710_DEBUG("ts0710_disc_command on channel %d\n", dlci); -+ -+ if ((ts0710->dlci[dlci].state == DISCONNECTED) -+ || (ts0710->dlci[dlci].state == REJECTED)) { -+ return; -+ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { -+ /* Reentry */ -+ return; -+ } else { -+ ts0710->dlci[dlci].state = DISCONNECTING; -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_disc(ts0710, dlci); -+ interruptible_sleep_on_timeout(&ts0710->dlci[dlci]. -+ close_wait, -+ TS0710MUX_TIME_OUT); -+ if (ts0710->dlci[dlci].state == DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI %d Send DISC got signal!\n", -+ dlci); -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI %d Send DISC timeout!\n", dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[dlci].state != DISCONNECTED) { -+ if (dlci == 0) { /* Control Channel */ -+ ts0710_upon_disconnect(); -+ } else { /* Other Channel */ -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ wake_up_interruptible(&ts0710->dlci[dlci]. -+ close_wait); -+ ts0710_reset_dlci(dlci); -+ } -+ } -+ } -+} -+ -+int ts0710_open_channel(__u8 dlci) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int try; -+ int retval; -+ unsigned long t; -+ -+ retval = -ENODEV; -+ if (dlci == 0) { // control channel -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == FLOW_STOPPED)) { -+ return 0; -+ } else if (ts0710->dlci[0].state == CONNECTING) { -+ /* Reentry */ -+ TS0710_PRINTK -+ ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", -+ current->pid, current->comm); -+ try = 11; -+ while (try--) { -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710->dlci[0]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[0].state == REJECTED) { -+ retval = -EREJECTED; -+ break; -+ } else if (ts0710->dlci[0].state == -+ DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting timeout!\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[0].state == CONNECTING) { -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = DISCONNECTED; -+ } -+ } else if ((ts0710->dlci[0].state != DISCONNECTED) -+ && (ts0710->dlci[0].state != REJECTED)) { -+ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ return retval; -+ } else { -+ ts0710->initiator = 1; -+ ts0710->dlci[0].state = CONNECTING; -+ ts0710->dlci[0].initiator = 1; -+ try = 10; -+ while (try--) { -+ t = jiffies; -+ send_sabm(ts0710, 0); -+ interruptible_sleep_on_timeout(&ts0710->dlci[0]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[0].state == CONNECTED) -+ || (ts0710->dlci[0].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[0].state == REJECTED) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got rejected!\n", -+ dlci); -+ retval = -EREJECTED; -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[0].state == CONNECTING) { -+ ts0710->dlci[0].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[0].open_wait); -+ } -+ } else { // other channel -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return retval; -+ } else if ((ts0710->dlci[dlci].state == CONNECTED) -+ || (ts0710->dlci[dlci].state == FLOW_STOPPED)) { -+ return 0; -+ } else if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ /* Reentry */ -+ try = 8; -+ while (try--) { -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci[dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[dlci].state == CONNECTED) -+ || (ts0710->dlci[dlci].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[dlci].state == REJECTED) { -+ retval = -EREJECTED; -+ break; -+ } else if (ts0710->dlci[dlci].state == -+ DISCONNECTED) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Wait for connecting timeout!\n", -+ dlci); -+ continue; -+ } else -+ if ((ts0710->dlci[dlci].state == -+ NEGOTIATING) -+ || (ts0710->dlci[dlci].state == -+ CONNECTING)) { -+ continue; -+ } -+ } -+ -+ if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ } else if ((ts0710->dlci[dlci].state != DISCONNECTED) -+ && (ts0710->dlci[dlci].state != REJECTED)) { -+ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ return retval; -+ } else { -+ ts0710->dlci[dlci].state = NEGOTIATING; -+ ts0710->dlci[dlci].initiator = 1; -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_pn_msg(ts0710, 7, ts0710->dlci[dlci].mtu, -+ 0, 0, dlci, 1); -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci[dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send pn_msg got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send pn_msg timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ -+ if (ts0710->dlci[dlci].state == CONNECTING) { -+ try = 3; -+ while (try--) { -+ t = jiffies; -+ send_sabm(ts0710, dlci); -+ interruptible_sleep_on_timeout(&ts0710-> -+ dlci -+ [dlci]. -+ open_wait, -+ TS0710MUX_TIME_OUT); -+ if ((ts0710->dlci[dlci].state == -+ CONNECTED) -+ || (ts0710->dlci[dlci].state == -+ FLOW_STOPPED)) { -+ retval = 0; -+ break; -+ } else if (ts0710->dlci[dlci].state == -+ REJECTED) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got rejected!\n", -+ dlci); -+ retval = -EREJECTED; -+ break; -+ } else if (signal_pending(current)) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM got signal!\n", -+ dlci); -+ retval = -EAGAIN; -+ break; -+ } else if ((jiffies - t) >= -+ TS0710MUX_TIME_OUT) { -+ TS0710_PRINTK -+ ("MUX DLCI:%d Send SABM timeout!\n", -+ dlci); -+ continue; -+ } -+ } -+ } -+ -+ if ((ts0710->dlci[dlci].state == NEGOTIATING) -+ || (ts0710->dlci[dlci].state == CONNECTING)) { -+ ts0710->dlci[dlci].state = DISCONNECTED; -+ } -+ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); -+ } -+ } -+ return retval; -+} -+ -+static int ts0710_exec_test_cmd(void) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 *f_buf; /* Frame buffer */ -+ __u8 *d_buf; /* Data buffer */ -+ int retval = -EFAULT; -+ int j; -+ unsigned long t; -+ -+ if (ts0710->be_testing) { -+ /* Reentry */ -+ t = jiffies; -+ interruptible_sleep_on_timeout(&ts0710->test_wait, -+ 3 * TS0710MUX_TIME_OUT); -+ if (ts0710->be_testing == 0) { -+ if (ts0710->test_errs == 0) { -+ retval = 0; -+ } else { -+ retval = -EFAULT; -+ } -+ } else if (signal_pending(current)) { -+ TS0710_DEBUG -+ ("Wait for Test_cmd response got signal!\n"); -+ retval = -EAGAIN; -+ } else if ((jiffies - t) >= 3 * TS0710MUX_TIME_OUT) { -+ TS0710_DEBUG("Wait for Test_cmd response timeout!\n"); -+ retval = -EFAULT; -+ } -+ } else { -+ ts0710->be_testing = 1; /* Set the flag */ -+ -+ f_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); -+ d_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); -+ if ((!f_buf) || (!d_buf)) { -+ if (f_buf) { -+ kfree(f_buf); -+ } -+ if (d_buf) { -+ kfree(d_buf); -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ ts0710->test_errs = TEST_PATTERN_SIZE; -+ wake_up_interruptible(&ts0710->test_wait); -+ return -ENOMEM; -+ } -+ -+ for (j = 0; j < TEST_PATTERN_SIZE; j++) { -+ d_buf[j] = j & 0xFF; -+ } -+ -+ t = jiffies; -+ ts0710_test_msg(ts0710, d_buf, TEST_PATTERN_SIZE, MCC_CMD, -+ f_buf); -+ interruptible_sleep_on_timeout(&ts0710->test_wait, -+ 2 * TS0710MUX_TIME_OUT); -+ if (ts0710->be_testing == 0) { -+ if (ts0710->test_errs == 0) { -+ retval = 0; -+ } else { -+ retval = -EFAULT; -+ } -+ } else if (signal_pending(current)) { -+ TS0710_DEBUG("Send Test_cmd got signal!\n"); -+ retval = -EAGAIN; -+ } else if ((jiffies - t) >= 2 * TS0710MUX_TIME_OUT) { -+ TS0710_DEBUG("Send Test_cmd timeout!\n"); -+ ts0710->test_errs = TEST_PATTERN_SIZE; -+ retval = -EFAULT; -+ } -+ -+ ts0710->be_testing = 0; /* Clear the flag */ -+ wake_up_interruptible(&ts0710->test_wait); -+ -+ /* Release buffer */ -+ if (f_buf) { -+ kfree(f_buf); -+ } -+ if (d_buf) { -+ kfree(d_buf); -+ } -+ } -+ -+ return retval; -+} -+ -+static void mux_sched_send(void) -+{ -+ -+#ifdef USB_FOR_MUX -+ schedule_work(&send_tqueue); -+#else -+ if (!tq_serial_for_mux) { -+ TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", -+ __FUNCTION__); -+ return; -+ } -+ schedule_work(&send_tqueue); -+ mark_bh(SERIAL_BH); -+#endif -+ -+} -+ -+/**************************** -+ * TTY driver routines -+*****************************/ -+ -+static void mux_close(struct tty_struct *tty, struct file *filp) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ __u8 cmdtty; -+ __u8 datatty; -+ -+ UNUSED_PARAM(filp); -+ -+ if (!tty) { -+ return; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ if (mux_tty[line] > 0) -+ mux_tty[line]--; -+ -+ dlci = tty2dlci[line]; -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { -+ if (dlci == 1) { -+ ts0710_close_channel(0); -+ TS0710_PRINTK -+ ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); -+ TS0710_SIG2APLOGD(); -+ } -+ ts0710_close_channel(dlci); -+ } -+ -+ if (mux_tty[line] == 0) { -+ if ((mux_send_info_flags[line]) -+ && (mux_send_info[line]) -+ /*&& (mux_send_info[line]->filled == 0) */ -+ ) { -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ } -+ -+ if ((mux_recv_info_flags[line]) -+ && (mux_recv_info[line]) -+ && (mux_recv_info[line]->total == 0)) { -+ mux_recv_info_flags[line] = 0; -+ free_mux_recv_struct(mux_recv_info[line]); -+ mux_recv_info[line] = 0; -+ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); -+ } -+ -+ ts0710_flow_on(dlci, ts0710); -+ schedule_work(&post_recv_tqueue); -+ -+ wake_up_interruptible(&tty->read_wait); -+ wake_up_interruptible(&tty->write_wait); -+ tty->packet = 0; -+ } -+} -+ -+static void mux_throttle(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ int i; -+ __u8 dlci; -+ -+ if (!tty) { -+ return; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, -+ line); -+ -+ dlci = tty2dlci[line]; -+ if ((ts0710->dlci[0].state != CONNECTED) -+ && (ts0710->dlci[0].state != FLOW_STOPPED)) { -+ return; -+ } else if ((ts0710->dlci[dlci].state != CONNECTED) -+ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { -+ return; -+ } -+ -+ if (ts0710->dlci[dlci].flow_control) { -+ return; -+ } -+ -+ for (i = 0; i < 3; i++) { -+ if (ts0710_msc_msg -+ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { -+ continue; -+ } else { -+ TS0710_LOG("MUX Send Flow off on dlci %d\n", dlci); -+ ts0710->dlci[dlci].flow_control = 1; -+ break; -+ } -+ } -+} -+ -+static void mux_unthrottle(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ mux_recv_struct *recv_info; -+ -+ if (!tty) { -+ return; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ if ((!mux_recv_info_flags[line]) || (!mux_recv_info[line])) { -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, -+ line); -+ -+ recv_info = mux_recv_info[line]; -+ dlci = tty2dlci[line]; -+ -+ if (recv_info->total) { -+ recv_info->post_unthrottle = 1; -+ schedule_work(&post_recv_tqueue); -+ } else { -+ ts0710_flow_on(dlci, ts0710); -+ } -+} -+ -+static int mux_chars_in_buffer(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int retval; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ -+ retval = TS0710MUX_MAX_CHARS_IN_BUF; -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG -+ ("Flow stopped on all channels, returning MAX chars in buffer\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning MAX chars in buffer\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ goto out; -+ } -+ -+ if (!(mux_send_info_flags[line])) { -+ goto out; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ goto out; -+ } -+ if (send_info->filled) { -+ goto out; -+ } -+ -+ retval = 0; -+ -+ out: -+ return retval; -+} -+ -+static int mux_chars_in_serial_buffer(struct tty_struct *tty) -+{ -+ UNUSED_PARAM(tty); -+ -+ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -+ TS0710_PRINTK -+ ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", -+ __FUNCTION__); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK -+ ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", -+ __FUNCTION__); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return 0; -+ } -+ return COMM_FOR_MUX_DRIVER->chars_in_buffer(COMM_FOR_MUX_TTY); -+} -+ -+static int mux_write(struct tty_struct *tty, -+ const unsigned char *buf, int count) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ __u8 *d_buf; -+ __u16 c; -+ __u8 post_recv; -+ -+ if (count <= 0) { -+ return 0; -+ } -+ -+ if (!tty) { -+ return 0; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) -+ return -ENODEV; -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG -+ ("Flow stopped on all channels, returning zero /dev/mux%d\n", -+ line); -+ return 0; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning zero /dev/mux%d\n", line); -+ return 0; -+ } else if (ts0710->dlci[dlci].state == CONNECTED) { -+ -+ if (!(mux_send_info_flags[line])) { -+ TS0710_PRINTK -+ ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", -+ line); -+ return -ENODEV; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ TS0710_PRINTK -+ ("MUX Error: mux_write: mux_send_info[%d] == 0\n", -+ line); -+ return -ENODEV; -+ } -+ -+ c = min(count, (ts0710->dlci[dlci].mtu - 1)); -+ if (c <= 0) { -+ return 0; -+ } -+ -+ if (test_and_set_bit(BUF_BUSY, &send_info->flags)) -+ return 0; -+ -+ if (send_info->filled) { -+ clear_bit(BUF_BUSY, &send_info->flags); -+ return 0; -+ } -+ -+ d_buf = ((__u8 *) send_info->buf) + TS0710MUX_SEND_BUF_OFFSET; -+ memcpy(&d_buf[1], buf, c); -+ -+ TS0710_DEBUG("Prepare to send %d bytes from /dev/mux%d", c, -+ line); -+ if (iscmdtty[line]) { -+ TS0710_DEBUGSTR(&d_buf[1], c); -+ TS0710_DEBUG("CMDTAG"); -+ d_buf[0] = CMDTAG; -+ } else { -+ TS0710_DEBUG("DATATAG"); -+ d_buf[0] = DATATAG; -+ } -+ -+ TS0710_DEBUGHEX(d_buf, c + 1); -+ -+ send_info->frame = d_buf; -+ queue_uih(send_info, c + 1, ts0710, dlci); -+ send_info->filled = 1; -+ clear_bit(BUF_BUSY, &send_info->flags); -+ -+ post_recv = 0; -+ if (dlci == TS0710MUX_GPRS1_DLCI) { -+ if (add_count -+ (TS0710MUX_GPRS1_SEND_COUNT_IDX, c) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2[TS0710MUX_GPRS1_SEND_COUNT_IDX] -+ += c; -+ } -+ } else if (dlci == TS0710MUX_GPRS2_DLCI) { -+ if (add_count -+ (TS0710MUX_GPRS2_SEND_COUNT_IDX, c) < 0) { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ mux_data_count2[TS0710MUX_GPRS2_SEND_COUNT_IDX] -+ += c; -+ } -+ } -+ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ -+ if (mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY) == 0) { -+ /* Sending bottom half should be -+ run after return from this function */ -+ mux_sched_send(); -+ } -+ return c; -+ } else { -+ TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); -+ return -EDISCONNECTED; -+ } -+} -+ -+static int mux_write_room(struct tty_struct *tty) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int retval; -+ int line; -+ __u8 dlci; -+ mux_send_struct *send_info; -+ -+ retval = 0; -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+ -+ dlci = tty2dlci[line]; -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on all channels, returning ZERO\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped, returning ZERO\n"); -+ goto out; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ goto out; -+ } -+ -+ if (!(mux_send_info_flags[line])) { -+ goto out; -+ } -+ send_info = mux_send_info[line]; -+ if (!send_info) { -+ goto out; -+ } -+ if (send_info->filled) { -+ goto out; -+ } -+ -+ retval = ts0710->dlci[dlci].mtu - 1; -+ -+ out: -+ return retval; -+} -+ -+static int mux_ioctl(struct tty_struct *tty, struct file *file, -+ unsigned int cmd, unsigned long arg) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int line; -+ __u8 dlci; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(arg); -+ -+ if (!tty) { -+ return -EIO; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return -ENODEV; -+ } -+ -+ dlci = tty2dlci[line]; -+ switch (cmd) { -+ case TS0710MUX_IO_MSC_HANGUP: -+ if (ts0710_msc_msg(ts0710, EA | RTR | DV, MCC_CMD, dlci) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_TEST_CMD: -+ return ts0710_exec_test_cmd(); -+/* -+ case TS0710MUX_IO_DLCI_FC_ON: -+ if( line == 0 ) { -+ break; -+ } -+ if( ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_DLCI_FC_OFF: -+ if( line == 0 ) { -+ break; -+ } -+ if( ts0710_msc_msg(ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_FC_ON: -+ if( line != 0 ) { -+ break; -+ } -+ if( ts0710_fcon_msg(ts0710, MCC_CMD) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+ -+ case TS0710MUX_IO_FC_OFF: -+ if( line != 0 ) { -+ break; -+ } -+ if( ts0710_fcoff_msg(ts0710, MCC_CMD) < 0) { -+ return -EAGAIN; -+ } else { -+ return 0; -+ } -+*/ -+ default: -+ break; -+ } -+ return -ENOIOCTLCMD; -+} -+ -+static void mux_flush_buffer(struct tty_struct *tty) -+{ -+ int line; -+ -+ if (!tty) { -+ return; -+ } -+ -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ return; -+ } -+ -+ TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); -+ -+ if ((mux_send_info_flags[line]) -+ && (mux_send_info[line]) -+ && (mux_send_info[line]->filled)) { -+ -+ mux_send_info[line]->filled = 0; -+ } -+ -+ wake_up_interruptible(&tty->write_wait); -+#ifdef SERIAL_HAVE_POLL_WAIT -+ wake_up_interruptible(&tty->poll_wait); -+#endif -+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && -+ tty->ldisc.write_wakeup) { -+ (tty->ldisc.write_wakeup) (tty); -+ } -+ -+/* -+ if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { -+ TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); -+ -+#ifndef USB_FOR_MUX -+ TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); -+ TS0710_SIG2APLOGD(); -+#endif -+ -+ return; -+ } -+ return COMM_FOR_MUX_DRIVER->flush_buffer(COMM_FOR_MUX_TTY); -+*/ -+} -+ -+static int mux_open(struct tty_struct *tty, struct file *filp) -+{ -+ int retval; -+ int line; -+ __u8 dlci; -+ __u8 cmdtty; -+ __u8 datatty; -+ mux_send_struct *send_info; -+ mux_recv_struct *recv_info; -+ -+ UNUSED_PARAM(filp); -+ -+ retval = -ENODEV; -+ if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { -+ -+#ifdef USB_FOR_MUX -+ TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); -+#else -+ TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); -+#endif -+ -+ goto out; -+ } -+ -+ if (!tty) { -+ goto out; -+ } -+ line = tty->index; -+ if ((line < 0) || (line >= NR_MUXS)) { -+ goto out; -+ } -+#ifdef TS0710SERVER -+ /* do nothing as a server */ -+ mux_tty[line]++; -+ retval = 0; -+#else -+ mux_tty[line]++; -+ dlci = tty2dlci[line]; -+ -+/* if( dlci == 1 ) { */ -+ /* Open server channel 0 first */ -+ if ((retval = ts0710_open_channel(0)) != 0) { -+ TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); -+ ts0710_init(); -+ -+ mux_tty[line]--; -+ goto out; -+ } -+/* } */ -+ -+ /* Allocate memory first. As soon as connection has been established, MUX may receive */ -+ if (mux_send_info_flags[line] == 0) { -+ send_info = -+ (mux_send_struct *) kmalloc(sizeof(mux_send_struct), -+ GFP_KERNEL); -+ if (!send_info) { -+ retval = -ENOMEM; -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ send_info->length = 0; -+ send_info->flags = 0; -+ send_info->filled = 0; -+ mux_send_info[line] = send_info; -+ mux_send_info_flags[line] = 1; -+ TS0710_DEBUG("Allocate mux_send_info for /dev/mux%d", line); -+ } -+ -+ if (mux_recv_info_flags[line] == 0) { -+ recv_info = -+ (mux_recv_struct *) kmalloc(sizeof(mux_recv_struct), -+ GFP_KERNEL); -+ if (!recv_info) { -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ retval = -ENOMEM; -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ recv_info->length = 0; -+ recv_info->total = 0; -+ recv_info->mux_packet = 0; -+ recv_info->next = 0; -+ recv_info->no_tty = line; -+ recv_info->post_unthrottle = 0; -+ mux_recv_info[line] = recv_info; -+ mux_recv_info_flags[line] = 1; -+ TS0710_DEBUG("Allocate mux_recv_info for /dev/mux%d", line); -+ } -+ -+ /* Now establish DLCI connection */ -+ cmdtty = dlci2tty[dlci].cmdtty; -+ datatty = dlci2tty[dlci].datatty; -+ if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { -+ if ((retval = ts0710_open_channel(dlci)) != 0) { -+ TS0710_PRINTK("MUX: Can't connected channel %d!\n", -+ dlci); -+ ts0710_reset_dlci(dlci); -+ -+ mux_send_info_flags[line] = 0; -+ kfree(mux_send_info[line]); -+ mux_send_info[line] = 0; -+ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); -+ -+ mux_recv_info_flags[line] = 0; -+ free_mux_recv_struct(mux_recv_info[line]); -+ mux_recv_info[line] = 0; -+ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); -+ -+ mux_tty[line]--; -+ goto out; -+ } -+ } -+ -+ retval = 0; -+#endif -+ out: -+ return retval; -+} -+ -+/* mux dispatcher, call from serial.c receiver_chars() */ -+void mux_dispatcher(struct tty_struct *tty) -+{ -+ UNUSED_PARAM(tty); -+ -+ schedule_work(&receive_tqueue); -+} -+ -+/*For BP UART problem Begin*/ -+#ifdef TS0710SEQ2 -+static int send_ack(ts0710_con * ts0710, __u8 seq_num, __u8 bp_seq1, -+ __u8 bp_seq2) -+#else -+static int send_ack(ts0710_con * ts0710, __u8 seq_num) -+#endif -+{ -+ __u8 buf[20]; -+ short_frame *ack; -+ -+#ifdef TS0710SEQ2 -+ static __u16 ack_seq = 0; -+#endif -+ -+ ack = (short_frame *) (buf + 1); -+ ack->h.addr.ea = 1; -+ ack->h.addr.cr = ((ts0710->initiator) & 0x1); -+ ack->h.addr.d = 0; -+ ack->h.addr.server_chn = 0; -+ ack->h.control = ACK; -+ ack->h.length.ea = 1; -+ -+#ifdef TS0710SEQ2 -+ ack->h.length.len = 5; -+ ack->data[0] = seq_num; -+ ack->data[1] = bp_seq1; -+ ack->data[2] = bp_seq2; -+ ack->data[3] = (ack_seq & 0xFF); -+ ack->data[4] = (ack_seq >> 8) & 0xFF; -+ ack_seq++; -+ ack->data[5] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); -+#else -+ ack->h.length.len = 1; -+ ack->data[0] = seq_num; -+ ack->data[1] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); -+#endif -+ -+ return basic_write(ts0710, buf, -+ (sizeof(short_frame) + FCS_SIZE + -+ ack->h.length.len)); -+} -+ -+/*For BP UART problem End*/ -+ -+static void receive_worker(void *private_) -+{ -+ struct tty_struct *tty = COMM_FOR_MUX_TTY; -+ int i, count; -+ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; -+ static unsigned char *tbuf_ptr = &tbuf[0]; -+ static unsigned char *start_flag = 0; -+ unsigned char *search, *to, *from; -+ short_frame *short_pkt; -+ long_frame *long_pkt; -+ static int framelen = -1; -+ -+ /*For BP UART problem Begin */ -+ static __u8 expect_seq = 0; -+ __u32 crc_error; -+ __u8 *uih_data_start; -+ __u32 uih_len; -+ /*For BP UART problem End */ -+ -+ UNUSED_PARAM(private_); -+ -+ if (!tty) -+ return; -+ -+#ifdef USB_FOR_MUX -+ TS0710_DEBUG("Receive following bytes from IPC-USB"); -+#else -+ TS0710_DEBUG("Receive following bytes from UART"); -+#endif -+ -+ TS0710_DEBUGHEX(cp, count); -+ -+ if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -+ TS0710_PRINTK -+ ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); -+ count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); -+ } -+ -+ count = tty_buffer_request_room(tty, count); -+ -+ for (i = 0; i < count; i++) -+ tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); -+ -+ tbuf_ptr += count; -+ search = &tbuf[0]; -+ -+ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -+ schedule_work(&receive_tqueue); -+ return; -+ } -+ -+ if ((start_flag != 0) && (framelen != -1)) { -+ if ((tbuf_ptr - start_flag) < framelen) { -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+ return; -+ } -+ } -+ -+ while (1) { -+ if (start_flag == 0) { /* Frame Start Flag not found */ -+ framelen = -1; -+ while (search < tbuf_ptr) { -+ if (*search == TS0710_BASIC_FLAG) { -+ start_flag = search; -+ break; -+ } -+#ifdef TS0710LOG -+ else { -+ TS0710_LOG(">S %02x %c\n", *search, -+ *search); -+ } -+#endif -+ -+ search++; -+ } -+ -+ if (start_flag == 0) { -+ tbuf_ptr = &tbuf[0]; -+ break; -+ } -+ } else { /* Frame Start Flag found */ -+ /* 1 start flag + 1 address + 1 control + 1 or 2 length + lengths data + 1 FCS + 1 end flag */ -+ /* For BP UART problem 1 start flag + 1 seq_num + 1 address + ...... */ -+ /*if( (framelen == -1) && ((tbuf_ptr - start_flag) > TS0710_MAX_HDR_SIZE) ) */ -+ if ((framelen == -1) && ((tbuf_ptr - start_flag) > (TS0710_MAX_HDR_SIZE + SEQ_FIELD_SIZE))) { /*For BP UART problem */ -+ /*short_pkt = (short_frame *) (start_flag + 1); */ -+ short_pkt = (short_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ if (short_pkt->h.length.ea == 1) { /* short frame */ -+ /*framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1; */ -+ framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1 + SEQ_FIELD_SIZE; /*For BP UART problem */ -+ } else { /* long frame */ -+ /*long_pkt = (long_frame *) (start_flag + 1); */ -+ long_pkt = (long_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ -+ /*framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH( long_pkt->h.length ) + 2; */ -+ framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH(long_pkt->h.length) + 2 + SEQ_FIELD_SIZE; /*For BP UART problem */ -+ } -+ -+ /*if( framelen > TS0710MUX_MAX_TOTAL_FRAME_SIZE ) { */ -+ if (framelen > (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)) { /*For BP UART problem */ -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ (tbuf_ptr - -+ start_flag)); -+ TS0710_PRINTK -+ ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", -+ /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ -+ __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ -+ search = start_flag + 1; -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } -+ } -+ -+ if ((framelen != -1) -+ && ((tbuf_ptr - start_flag) >= framelen)) { -+ if (*(start_flag + framelen - 1) == TS0710_BASIC_FLAG) { /* OK, We got one frame */ -+ -+ /*For BP UART problem Begin */ -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ -+ short_pkt = -+ (short_frame *) (start_flag + -+ ADDRESS_FIELD_OFFSET); -+ if ((short_pkt->h.length.ea) == 0) { -+ long_pkt = -+ (long_frame *) (start_flag + -+ ADDRESS_FIELD_OFFSET); -+ uih_len = -+ GET_LONG_LENGTH(long_pkt->h. -+ length); -+ uih_data_start = -+ long_pkt->h.data; -+ -+ crc_error = -+ crc_check((__u8 -+ *) (start_flag + -+ SLIDE_BP_SEQ_OFFSET), -+ LONG_CRC_CHECK + -+ 1, -+ *(uih_data_start + -+ uih_len)); -+ } else { -+ uih_len = -+ short_pkt->h.length.len; -+ uih_data_start = -+ short_pkt->data; -+ -+ crc_error = -+ crc_check((__u8 -+ *) (start_flag + -+ SLIDE_BP_SEQ_OFFSET), -+ SHORT_CRC_CHECK + -+ 1, -+ *(uih_data_start + -+ uih_len)); -+ } -+ -+ if (!crc_error) { -+ if (expect_seq == -+ *(start_flag + -+ SLIDE_BP_SEQ_OFFSET)) { -+ expect_seq++; -+ if (expect_seq >= 4) { -+ expect_seq = 0; -+ } -+#ifdef TS0710SEQ2 -+ send_ack -+ (&ts0710_connection, -+ expect_seq, -+ *(start_flag + -+ FIRST_BP_SEQ_OFFSET), -+ *(start_flag + -+ SECOND_BP_SEQ_OFFSET)); -+#else -+ send_ack -+ (&ts0710_connection, -+ expect_seq); -+#endif -+ -+ ts0710_recv_data -+ (&ts0710_connection, -+ start_flag + -+ ADDRESS_FIELD_OFFSET, -+ framelen - 2 - -+ SEQ_FIELD_SIZE); -+ } else { -+ -+#ifdef TS0710DEBUG -+ if (* -+ (start_flag + -+ SLIDE_BP_SEQ_OFFSET) -+ != 0x9F) { -+#endif -+ -+ TS0710_LOG -+ ("MUX sequence number %d is not expected %d, discard data!\n", -+ * -+ (start_flag -+ + -+ SLIDE_BP_SEQ_OFFSET), -+ expect_seq); -+ -+#ifdef TS0710SEQ2 -+ send_ack -+ (&ts0710_connection, -+ expect_seq, -+ * -+ (start_flag -+ + -+ FIRST_BP_SEQ_OFFSET), -+ * -+ (start_flag -+ + -+ SECOND_BP_SEQ_OFFSET)); -+#else -+ send_ack -+ (&ts0710_connection, -+ expect_seq); -+#endif -+ -+#ifdef TS0710DEBUG -+ } else { -+ *(uih_data_start -+ + uih_len) = -+ 0; -+ TS0710_PRINTK -+ ("MUX bp log: %s\n", -+ uih_data_start); -+ } -+#endif -+ -+ } -+ } else { /* crc_error */ -+ search = start_flag + 1; -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } /*End if(!crc_error) */ -+ -+ /*For BP UART problem End */ -+ -+/*For BP UART problem -+ TS0710_LOGSTR_FRAME(0, start_flag, framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ ts0710_recv_data(&ts0710_connection, start_flag + 1, framelen - 2); -+*/ -+ search = start_flag + framelen; -+ } else { -+ TS0710_LOGSTR_FRAME(0, start_flag, -+ framelen); -+ TS0710_DEBUGHEX(start_flag, framelen); -+ TS0710_PRINTK -+ ("MUX: Lost synchronization!\n"); -+ search = start_flag + 1; -+ } -+ -+ start_flag = 0; -+ framelen = -1; -+ continue; -+ } -+ -+ if (start_flag != &tbuf[0]) { -+ to = tbuf; -+ from = start_flag; -+ count = tbuf_ptr - start_flag; -+ while (count--) { -+ *to++ = *from++; -+ } -+ -+ tbuf_ptr -= (start_flag - tbuf); -+ start_flag = tbuf; -+ } -+ break; -+ } /* End Frame Start Flag found */ -+ } /* End while(1) */ -+ -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+} -+ -+static void post_recv_worker(void *private_) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ int tty_idx; -+ struct tty_struct *tty; -+ __u8 post_recv; -+ __u8 flow_control; -+ __u8 dlci; -+ mux_recv_struct *recv_info, *recv_info2, *post_recv_q; -+ int recv_room; -+ mux_recv_packet *recv_packet, *recv_packet2; -+ __u8 j; -+ -+ UNUSED_PARAM(private_); -+ -+ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { -+ schedule_work(&post_recv_tqueue); -+ return; -+ } -+ -+ TS0710_DEBUG("Enter into post_recv_worker"); -+ -+ post_recv = 0; -+ if (!mux_recv_queue) { -+ goto out; -+ } -+ -+ post_recv_q = NULL; -+ recv_info2 = mux_recv_queue; -+ while ((recv_info = recv_info2)) { -+ recv_info2 = recv_info->next; -+ -+ if (!(recv_info->total)) { -+ TS0710_PRINTK -+ ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", -+ __FUNCTION__); -+ continue; -+ } -+ -+ tty_idx = recv_info->no_tty; -+ dlci = tty2dlci[tty_idx]; -+ tty = mux_table[tty_idx]; -+ if ((!mux_tty[tty_idx]) || (!tty)) { -+ TS0710_PRINTK -+ ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", -+ tty_idx); -+ mux_recv_info_flags[tty_idx] = 0; -+ free_mux_recv_struct(mux_recv_info[tty_idx]); -+ mux_recv_info[tty_idx] = 0; -+ ts0710_flow_on(dlci, ts0710); -+ continue; -+ } -+ -+ TS0710_DEBUG("/dev/mux%d recv_info->total is: %d", tty_idx, -+ recv_info->total); -+ -+ if (test_bit(TTY_THROTTLED, &tty->flags)) { -+ add_post_recv_queue(&post_recv_q, recv_info); -+ continue; -+ } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { -+ post_recv = 1; -+ add_post_recv_queue(&post_recv_q, recv_info); -+ continue; -+ } -+ -+ flow_control = 0; -+ recv_packet2 = recv_info->mux_packet; -+ while (recv_info->total) { -+ recv_room = 65535; -+ if (tty->receive_room) -+ recv_room = tty->receive_room; -+ -+ if (recv_info->length) { -+ if (recv_room < recv_info->length) { -+ flow_control = 1; -+ break; -+ } -+ -+ /* Put queued data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put queued recv data into read buffer of /dev/mux%d", -+ tty_idx); -+ TS0710_DEBUGHEX(recv_info->data, -+ recv_info->length); -+ (tty->ldisc.receive_buf) (tty, recv_info->data, -+ NULL, -+ recv_info->length); -+ recv_info->total -= recv_info->length; -+ recv_info->length = 0; -+ } else { /* recv_info->length == 0 */ -+ if ((recv_packet = recv_packet2)) { -+ recv_packet2 = recv_packet->next; -+ -+ if (recv_room < recv_packet->length) { -+ flow_control = 1; -+ recv_info->mux_packet = -+ recv_packet; -+ break; -+ } -+ -+ /* Put queued data into read buffer of tty */ -+ TS0710_DEBUG -+ ("Put queued recv data into read buffer of /dev/mux%d", -+ tty_idx); -+ TS0710_DEBUGHEX(recv_packet->data, -+ recv_packet->length); -+ (tty->ldisc.receive_buf) (tty, -+ recv_packet-> -+ data, NULL, -+ recv_packet-> -+ length); -+ recv_info->total -= recv_packet->length; -+ free_mux_recv_packet(recv_packet); -+ } else { -+ TS0710_PRINTK -+ ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", -+ __FUNCTION__, recv_info->total); -+ } -+ } /* End recv_info->length == 0 */ -+ } /* End while( recv_info->total ) */ -+ -+ if (!(recv_info->total)) { -+ /* Important clear */ -+ recv_info->mux_packet = 0; -+ -+ if (recv_info->post_unthrottle) { -+ /* Do something for post_unthrottle */ -+ ts0710_flow_on(dlci, ts0710); -+ recv_info->post_unthrottle = 0; -+ } -+ } else { -+ add_post_recv_queue(&post_recv_q, recv_info); -+ -+ if (flow_control) { -+ /* Do something for flow control */ -+ if (recv_info->post_unthrottle) { -+ set_bit(TTY_THROTTLED, &tty->flags); -+ recv_info->post_unthrottle = 0; -+ } else { -+ ts0710_flow_off(tty, dlci, ts0710); -+ } -+ } /* End if( flow_control ) */ -+ } -+ } /* End while( (recv_info = recv_info2) ) */ -+ -+ mux_recv_queue = post_recv_q; -+ -+ out: -+ if (post_recv_count_flag) { -+ post_recv_count_flag = 0; -+ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { -+ if (mux_data_count2[j] > 0) { -+ if (add_count(j, mux_data_count2[j]) == 0) { -+ mux_data_count2[j] = 0; -+ } else { -+ post_recv_count_flag = 1; -+ post_recv = 1; -+ } -+ } -+ } /* End for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) */ -+ } -+ /* End if( post_recv_count_flag ) */ -+ if (post_recv) -+ schedule_work(&post_recv_tqueue); -+ clear_bit(RECV_RUNNING, &mux_recv_flags); -+} -+ -+/* mux sender, call from serial.c transmit_chars() */ -+void mux_sender(void) -+{ -+ mux_send_struct *send_info; -+ int chars; -+ __u8 idx; -+ -+ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); -+ if (!chars) { -+ /* chars == 0 */ -+ TS0710_LOG("<[]\n"); -+ mux_sched_send(); -+ return; -+ } -+ -+ idx = mux_send_info_idx; -+ if ((idx < NR_MUXS) && (mux_send_info_flags[idx])) { -+ send_info = mux_send_info[idx]; -+ if ((send_info) -+ && (send_info->filled) -+ && (send_info->length <= -+ (TS0710MUX_SERIAL_BUF_SIZE - chars))) { -+ -+ mux_sched_send(); -+ } -+ } -+} -+ -+static void send_worker(void *private_) -+{ -+ ts0710_con *ts0710 = &ts0710_connection; -+ __u8 j; -+ mux_send_struct *send_info; -+ int chars; -+ struct tty_struct *tty; -+ __u8 dlci; -+ -+ UNUSED_PARAM(private_); -+ -+ TS0710_DEBUG("Enter into send_worker"); -+ -+ mux_send_info_idx = NR_MUXS; -+ -+ if (ts0710->dlci[0].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on all channels\n"); -+ return; -+ } -+ -+ for (j = 0; j < NR_MUXS; j++) { -+ -+ if (!(mux_send_info_flags[j])) { -+ continue; -+ } -+ -+ send_info = mux_send_info[j]; -+ if (!send_info) { -+ continue; -+ } -+ -+ if (!(send_info->filled)) { -+ continue; -+ } -+ -+ dlci = tty2dlci[j]; -+ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ send_info->filled = 0; -+ continue; -+ } -+ -+ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); -+ if (send_info->length <= (TS0710MUX_SERIAL_BUF_SIZE - chars)) { -+ TS0710_DEBUG("Send queued UIH for /dev/mux%d", j); -+ basic_write(ts0710, (__u8 *) send_info->frame, -+ send_info->length); -+ send_info->length = 0; -+ send_info->filled = 0; -+ } else { -+ mux_send_info_idx = j; -+ break; -+ } -+ } /* End for() loop */ -+ -+ /* Queue UIH data to be transmitted */ -+ for (j = 0; j < NR_MUXS; j++) { -+ -+ if (!(mux_send_info_flags[j])) { -+ continue; -+ } -+ -+ send_info = mux_send_info[j]; -+ if (!send_info) { -+ continue; -+ } -+ -+ if (send_info->filled) { -+ continue; -+ } -+ -+ /* Now queue UIH data to send_info->buf */ -+ -+ if (!mux_tty[j]) { -+ continue; -+ } -+ -+ tty = mux_table[j]; -+ if (!tty) { -+ continue; -+ } -+ -+ dlci = tty2dlci[j]; -+ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { -+ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", -+ dlci); -+ continue; -+ } else if (ts0710->dlci[dlci].state != CONNECTED) { -+ TS0710_DEBUG("DLCI %d not connected\n", dlci); -+ continue; -+ } -+ -+ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) -+ && tty->ldisc.write_wakeup) { -+ (tty->ldisc.write_wakeup) (tty); -+ } -+ wake_up_interruptible(&tty->write_wait); -+ -+#ifdef SERIAL_HAVE_POLL_WAIT -+ wake_up_interruptible(&tty->poll_wait); -+#endif -+ -+ if (send_info->filled) { -+ if (j < mux_send_info_idx) { -+ mux_send_info_idx = j; -+ } -+ } -+ } /* End for() loop */ -+} -+ -+static int get_count(__u8 idx) -+{ -+ int ret; -+ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ -+ down(&mux_data_count_mutex[idx]); -+ ret = mux_data_count[idx]; -+ up(&mux_data_count_mutex[idx]); -+ -+ return ret; -+} -+ -+static int set_count(__u8 idx, int count) -+{ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ if (count < 0) { -+ TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); -+ return -1; -+ } -+ -+ down(&mux_data_count_mutex[idx]); -+ mux_data_count[idx] = count; -+ up(&mux_data_count_mutex[idx]); -+ -+ return 0; -+} -+ -+static int add_count(__u8 idx, int count) -+{ -+ if (idx > TS0710MUX_COUNT_MAX_IDX) { -+ TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); -+ return -1; -+ } -+ if (count <= 0) { -+ TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); -+ return -1; -+ } -+ -+ if (down_trylock(&mux_data_count_mutex[idx])) -+ return -1; -+ mux_data_count[idx] += count; -+ up(&mux_data_count_mutex[idx]); -+ -+ return 0; -+} -+ -+ssize_t file_proc_read(struct file * file, char *buf, size_t size, -+ loff_t * ppos) -+{ -+ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; -+ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(size); -+ UNUSED_PARAM(ppos); -+ -+ gprsData[0].recvBytes = get_count(TS0710MUX_GPRS1_RECV_COUNT_IDX); -+ gprsData[0].sentBytes = get_count(TS0710MUX_GPRS1_SEND_COUNT_IDX); -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes = -+ get_count(TS0710MUX_GPRS2_RECV_COUNT_IDX); -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes = -+ get_count(TS0710MUX_GPRS2_SEND_COUNT_IDX); -+ -+ copy_to_user(buf, gprsData, bufLen); -+ -+ return bufLen; -+} -+ -+ssize_t file_proc_write(struct file * file, const char *buf, size_t count, -+ loff_t * ppos) -+{ -+ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; -+ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; -+ -+ UNUSED_PARAM(file); -+ UNUSED_PARAM(count); -+ UNUSED_PARAM(ppos); -+ -+ memset(gprsData, 0, bufLen); -+ -+ copy_from_user(gprsData, buf, bufLen); -+ -+ set_count(TS0710MUX_GPRS1_RECV_COUNT_IDX, gprsData[0].recvBytes); -+ set_count(TS0710MUX_GPRS1_SEND_COUNT_IDX, gprsData[0].sentBytes); -+ set_count(TS0710MUX_GPRS2_RECV_COUNT_IDX, -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes); -+ set_count(TS0710MUX_GPRS2_SEND_COUNT_IDX, -+ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes); -+ -+ return bufLen; -+} -+ -+static void gprs_proc_init(void) -+{ -+ gprs_proc_file = -+ create_proc_entry("gprsbytes", S_IRUSR | S_IWUSR, NULL); -+ gprs_proc_file->proc_fops = &file_proc_operations; -+} -+ -+static void gprs_proc_exit(void) -+{ -+ remove_proc_entry("gprsbytes", gprs_proc_file); -+} -+ -+static int __init mux_init(void) -+{ -+ __u8 j; -+ -+ if (COMM_FOR_MUX_DRIVER == NULL) { -+ -+#ifdef USB_FOR_MUX -+ panic("please install IPC-USB first\n"); -+#else -+ panic("please install ttyS0 first\n"); -+#endif -+ -+ } -+ -+ ts0710_init(); -+ -+ for (j = 0; j < NR_MUXS; j++) { -+ mux_send_info_flags[j] = 0; -+ mux_send_info[j] = 0; -+ mux_recv_info_flags[j] = 0; -+ mux_recv_info[j] = 0; -+ } -+ mux_send_info_idx = NR_MUXS; -+ mux_recv_queue = NULL; -+ mux_recv_flags = 0; -+ -+ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { -+ mux_data_count[j] = 0; -+ mux_data_count2[j] = 0; -+ init_MUTEX(&mux_data_count_mutex[j]); -+ } -+ post_recv_count_flag = 0; -+ -+ INIT_WORK(&send_tqueue, send_worker, NULL); -+ INIT_WORK(&receive_tqueue, receive_worker, NULL); -+ INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); -+ -+ memset(&mux_driver, 0, sizeof(struct tty_driver)); -+ memset(&mux_tty, 0, sizeof(mux_tty)); -+ mux_driver.magic = TTY_DRIVER_MAGIC; -+ mux_driver.driver_name = "ts0710mux"; -+ mux_driver.name = "ts0710mux"; -+ mux_driver.major = TS0710MUX_MAJOR; -+ mux_driver.minor_start = TS0710MUX_MINOR_START; -+ mux_driver.num = NR_MUXS; -+ mux_driver.type = TTY_DRIVER_TYPE_SERIAL; -+ mux_driver.subtype = SERIAL_TYPE_NORMAL; -+ mux_driver.init_termios = tty_std_termios; -+ mux_driver.init_termios.c_iflag = 0; -+ mux_driver.init_termios.c_oflag = 0; -+ mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; -+ mux_driver.init_termios.c_lflag = 0; -+ mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; -+ -+ mux_driver.ttys = mux_table; -+ mux_driver.termios = mux_termios; -+ mux_driver.termios_locked = mux_termios_locked; -+// mux_driver.driver_state = mux_state; -+ mux_driver.other = NULL; -+ -+ mux_driver.open = mux_open; -+ mux_driver.close = mux_close; -+ mux_driver.write = mux_write; -+ mux_driver.write_room = mux_write_room; -+ mux_driver.flush_buffer = mux_flush_buffer; -+ mux_driver.chars_in_buffer = mux_chars_in_buffer; -+ mux_driver.throttle = mux_throttle; -+ mux_driver.unthrottle = mux_unthrottle; -+ mux_driver.ioctl = mux_ioctl; -+ mux_driver.owner = THIS_MODULE; -+ -+ if (tty_register_driver(&mux_driver)) -+ panic("Couldn't register mux driver"); -+ -+ COMM_MUX_DISPATCHER = mux_dispatcher; -+ COMM_MUX_SENDER = mux_sender; -+ -+ gprs_proc_init(); -+ -+ return 0; -+} -+ -+static void __exit mux_exit(void) -+{ -+ __u8 j; -+ -+ COMM_MUX_DISPATCHER = NULL; -+ COMM_MUX_SENDER = NULL; -+ -+ gprs_proc_exit(); -+ -+ mux_send_info_idx = NR_MUXS; -+ mux_recv_queue = NULL; -+ for (j = 0; j < NR_MUXS; j++) { -+ if ((mux_send_info_flags[j]) && (mux_send_info[j])) { -+ kfree(mux_send_info[j]); -+ } -+ mux_send_info_flags[j] = 0; -+ mux_send_info[j] = 0; -+ -+ if ((mux_recv_info_flags[j]) && (mux_recv_info[j])) { -+ free_mux_recv_struct(mux_recv_info[j]); -+ } -+ mux_recv_info_flags[j] = 0; -+ mux_recv_info[j] = 0; -+ } -+ -+ if (tty_unregister_driver(&mux_driver)) -+ panic("Couldn't unregister mux driver"); -+} -+ -+module_init(mux_init); -+module_exit(mux_exit); -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_DESCRIPTION("TS 07.10 Multiplexer"); -Index: linux-2.6.21/drivers/char/ts0710_mux.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/char/ts0710_mux.h 2007-05-06 17:10:21.000000000 -0300 -@@ -0,0 +1,103 @@ -+/* -+ * mux_macro.h -+ * -+ * Copyright (C) 2002 2005 Motorola -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ * -+ * 11/18/2002 (Motorola) - Initial version -+ * -+ */ -+ -+/* -+* This header file should be included by both MUX and other applications -+* which access MUX device files. It gives the additional macro definitions -+* shared between MUX and applications. -+*/ -+ -+/* MUX DLCI(Data Link Connection Identifier) Configuration */ -+/* -+* DLCI Service -+* 0 Control Channel -+* 1 Voice Call & Network-related -+* 2 SMS MO -+* 3 SMS MT -+* 4 Phonebook & related -+* 5 MISC -+* 6 CSD/FAX -+* 7 GPRS1 -+* 8 GPRS2 -+* 9 Logger CMD -+* 10 Logger Data -+* 11 Test CMD -+* 12 AGPS -+* 13 Net Monitor -+*/ -+ -+/* Mapping between DLCI and MUX device files */ -+/* -+* File Name Minor DLCI AT Command/Data -+* /dev/mux0 0 1 AT Command -+* /dev/mux1 1 2 AT Command -+* /dev/mux2 2 3 AT Command -+* /dev/mux3 3 4 AT Command -+* /dev/mux4 4 5 AT Command -+* /dev/mux5 5 6 AT Command -+* /dev/mux6 6 7 AT Command -+* /dev/mux7 7 8 AT Command -+* /dev/mux8 8 6 Data -+* /dev/mux9 9 7 Data -+* /dev/mux10 10 8 Data -+* /dev/mux11 11 9 Data -+* /dev/mux12 12 10 Data -+* /dev/mux13 13 11 Data -+* /dev/mux14 14 12 Data -+* /dev/mux15 15 13 Data -+*/ -+ -+#define MUX_CMD_FILE_VOICE_CALL "/dev/mux0" -+#define MUX_CMD_FILE_SMS_MO "/dev/mux1" -+#define MUX_CMD_FILE_SMS_MT "/dev/mux2" -+#define MUX_CMD_FILE_PHONEBOOK "/dev/mux3" -+#define MUX_CMD_FILE_MISC "/dev/mux4" -+#define MUX_CMD_FILE_CSD "/dev/mux5" -+#define MUX_CMD_FILE_GPRS1 "/dev/mux6" -+#define MUX_CMD_FILE_GPRS2 "/dev/mux7" -+ -+#define MUX_DATA_FILE_CSD "/dev/mux8" -+#define MUX_DATA_FILE_GPRS1 "/dev/mux9" -+#define MUX_DATA_FILE_GPRS2 "/dev/mux10" -+#define MUX_DATA_FILE_LOGGER_CMD "/dev/mux11" -+#define MUX_DATA_FILE_LOGGER_DATA "/dev/mux12" -+#define MUX_DATA_FILE_TEST_CMD "/dev/mux13" -+#define MUX_DATA_FILE_AGPS "/dev/mux14" -+#define MUX_DATA_FILE_NET_MONITOR "/dev/mux15" -+ -+#define NUM_MUX_CMD_FILES 8 -+#define NUM_MUX_DATA_FILES 8 -+#define NUM_MUX_FILES ( NUM_MUX_CMD_FILES + NUM_MUX_DATA_FILES ) -+ -+/* Special ioctl() upon a MUX device file for hanging up a call */ -+#define TS0710MUX_IO_MSC_HANGUP 0x54F0 -+ -+/* Special ioctl() upon a MUX device file for MUX loopback test */ -+#define TS0710MUX_IO_TEST_CMD 0x54F1 -+ -+/* Special Error code might be return from write() to a MUX device file */ -+#define EDISCONNECTED 900 /* Logical data link is disconnected */ -+ -+/* Special Error code might be return from open() to a MUX device file */ -+#define EREJECTED 901 /* Logical data link connection request is rejected */ -Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-05-06 17:10:21.000000000 -0300 -@@ -0,0 +1,868 @@ -+/* -+ * linux/drivers/usb/ipcusb.c -+ * -+ * Implementation of a ipc driver based Intel's Bulverde USB Host -+ * Controller. -+ * -+ * Copyright (C) 2003-2005 Motorola -+ * Copyright (C) 2006 Harald Welte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * 2003-Nov-03 - (Motorola) created -+ * 2004-Feb-20 - (Motorola) Add Power Manager codes -+ * 2004-Apr-14 - (Motorola) Update Suspend/Resume codes -+ * 2004-May-10 - (Motorola) Add unlink_urbs codes and do some updates of send -+ * out urb sequence -+ * 2006-Jun-22 - (Harald Welte) port to Linux 2.6.x -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "ts0710_mux_usb.h" -+ -+/*Macro defined for this driver*/ -+#define DRIVER_VERSION "1.0alpha1" -+#define DRIVER_AUTHOR "Motorola / Harald Welte " -+#define DRIVER_DESC "USB IPC Driver (TS07.10 lowlevel)" -+#define MOTO_IPC_VID 0x22b8 -+#define MOTO_IPC_PID 0x3006 -+#define IBUF_SIZE 32 /*urb size*/ -+#define IPC_USB_XMIT_SIZE 1024 -+#define IPC_URB_SIZE 32 -+#define IPC_USB_WRITE_INIT 0 -+#define IPC_USB_WRITE_XMIT 1 -+#define IPC_USB_PROBE_READY 3 -+#define IPC_USB_PROBE_NOT_READY 4 -+#define DBG_MAX_BUF_SIZE 1024 -+#define ICL_EVENT_INTERVAL (HZ) -+#undef BVD_DEBUG -+ -+#define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) -+#define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) -+#define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) -+/*End defined macro*/ -+ -+/*global values defined*/ -+static struct usb_driver usb_ipc_driver; -+static struct timer_list ipcusb_timer; -+static struct timer_list suspend_timer; -+static struct timer_list wakeup_timer; -+static struct tty_struct ipcusb_tty; /* the coresponding tty struct, we just use flip buffer here. */ -+static struct tty_driver ipcusb_tty_driver; /* the coresponding tty driver, we just use write and chars in buff here*/ -+struct tty_driver *usb_for_mux_driver = NULL; -+struct tty_struct *usb_for_mux_tty = NULL; -+void (*usb_mux_dispatcher)(struct tty_struct *tty) = NULL; -+void (*usb_mux_sender)(void) = NULL; -+void (*ipcusb_ap_to_bp)(unsigned char*, int) = NULL; -+void (*ipcusb_bp_to_ap)(unsigned char*, int) = NULL; -+EXPORT_SYMBOL(usb_for_mux_driver); -+EXPORT_SYMBOL(usb_for_mux_tty); -+EXPORT_SYMBOL(usb_mux_dispatcher); -+EXPORT_SYMBOL(usb_mux_sender); -+EXPORT_SYMBOL(ipcusb_ap_to_bp); -+EXPORT_SYMBOL(ipcusb_bp_to_ap); -+static int sumbit_times = 0; -+static int callback_times = 0; -+//static unsigned long last_jiff = 0; -+extern int usbh_finished_resume; -+/*end global values defined*/ -+ -+MODULE_AUTHOR(DRIVER_AUTHOR); -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_LICENSE("GPL"); -+ -+#ifdef BVD_DEBUG -+#define bvd_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg) -+#else -+#define bvd_dbg(format, arg...) do {} while (0) -+#endif -+ -+/* USB device context */ -+typedef struct { -+ struct list_head list; -+ int size; -+ char *body; -+} buf_list_t; -+ -+struct ipc_usb_data { -+ u_int8_t write_finished_flag; -+ u_int8_t write_flag, -+ ipc_flag, -+ suspend_flag; -+ struct usb_device *ipc_dev; -+ struct urb readurb_mux, -+ writeurb_mux, -+ writeurb_dsplog; -+ char *obuf, *ibuf; -+ int writesize; /* max packet size for the -+ output bulk endpoint * -+ transfer buffers */ -+ -+ struct circ_buf xmit; /* write cric bufffer */ -+ struct list_head in_buf_list; -+ char bulk_in_ep_mux, -+ bulk_out_ep_mux, -+ bulk_in_ep_dsplog; -+ unsigned int ifnum; -+ -+ struct tasklet_struct bh, -+ bh_bp; -+ -+ spinlock_t lock; -+}; -+ -+struct ipc_usb_data *bvd_ipc; -+ -+#ifdef BVD_DEBUG -+static void bvd_dbg_hex(__u8 *buf, int len) -+{ -+ static unsigned char tbuf[DBG_MAX_BUF_SIZE]; -+ int i, c; -+ -+ if (len <= 0) -+ return; -+ -+ c = 0; -+ for (i=0; (i < len) && (c < (DBG_MAX_BUF_SIZE - 3)); i++) { -+ sprintf(&tbuf[c], "%02x ",buf[i]); -+ c += 3; -+ } -+ tbuf[c] = 0; -+ -+ printk("%s: %s\n", __FUNCTION__, tbuf); -+} -+#else -+#define bvd_dbg_hex(buf, len) -+#endif -+ -+static int unlink_urbs(struct urb *urb) -+{ -+ unsigned long flags; -+ int retval; -+ -+ spin_lock_irqsave(&bvd_ipc->lock, flags); -+ -+ retval = usb_unlink_urb(urb); -+ if (retval != -EINPROGRESS && retval != 0) -+ printk("unlink urb err, %d", retval); -+ -+ spin_unlock_irqrestore(&bvd_ipc->lock, flags); -+ return retval; -+} -+ -+static void append_to_inbuf_list(struct urb *urb) -+{ -+ buf_list_t *inbuf; -+ int count = urb->actual_length; -+ -+ inbuf = kmalloc(sizeof(buf_list_t), GFP_KERNEL); -+ if (!inbuf) { -+ printk("append_to_inbuf_list: (%d) out of memory!\n", -+ sizeof(buf_list_t)); -+ return; -+ } -+ -+ inbuf->size = count; -+ inbuf->body = kmalloc(sizeof(char)*count, GFP_KERNEL); -+ if (!inbuf->body) { -+ kfree(inbuf); -+ printk("append_to_inbuf_list: (%d) out of memory!\n", -+ sizeof(char)*count); -+ return; -+ } -+ memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); -+ list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); -+} -+ -+static void ipcusb_timeout(unsigned long data) -+{ -+ struct tty_struct *tty = &ipcusb_tty; -+ struct urb *urb = (struct urb *)data; -+ -+ bvd_dbg("ipcusb_timeout***"); -+ -+ while (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int count; -+ buf_list_t *inbuf; -+ struct list_head *ptr = NULL; -+ -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry (ptr, buf_list_t, list); -+ count = inbuf->size; -+ if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { -+ list_del(ptr); -+ kfree(inbuf->body); -+ inbuf->body = NULL; -+ kfree(inbuf); -+ } else { -+ bvd_dbg("ipcusb_timeout: bvd_ipc->in_buf_list empty!"); -+ break; -+ } -+ } -+ -+ if (usb_mux_dispatcher) -+ usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ -+ -+ if (list_empty(&bvd_ipc->in_buf_list)) { -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("ipcusb_timeout: failed resubmitting read urb"); -+ bvd_dbg("ipcusb_timeout: resubmited read urb"); -+ } else { -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+ } -+} -+ -+static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) -+{ -+ buf_list_t *inbuf; -+ int count = urb->actual_length; -+ struct tty_struct *tty = &ipcusb_tty; -+ -+ bvd_dbg("usb_ipc_read_bulk: begining!"); -+ if (urb->status) -+ printk("nonzero read bulk status received: %d\n", urb->status); -+ -+ bvd_dbg("usb_ipc_read_bulk: urb->actual_length=%d", urb->actual_length); -+ bvd_dbg("usb_ipc_read_bulk: urb->transfer_buffer:"); -+ -+ bvd_dbg_hex((unsigned char*)urb->transfer_buffer, urb->actual_length); -+ -+ if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) -+ (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); -+ -+ if (!(list_empty(&bvd_ipc->in_buf_list))) { -+ int need_mux = 0; -+ -+ bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); -+ if (count > 0) { -+ bvd_ipc->suspend_flag = 1; -+ append_to_inbuf_list(urb); /* append the current received urb */ -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ } -+ -+ while (!(list_empty(&bvd_ipc->in_buf_list))) { -+ struct list_head* ptr = NULL; -+ ptr = bvd_ipc->in_buf_list.next; -+ inbuf = list_entry(ptr, buf_list_t, list); -+ count = inbuf->size; -+ need_mux = 1; -+ -+ tty_insert_flip_string(tty, inbuf->body, count); -+ -+ list_del(ptr); -+ kfree(inbuf->body); -+ inbuf->body = NULL; -+ kfree(inbuf); -+ } -+ -+ if (usb_mux_dispatcher && need_mux) -+ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -+ -+ if (list_empty(&bvd_ipc->in_buf_list)) { -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("usb_ipc_read_bulk: " -+ "failed resubmitting read urb"); -+ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -+ } else { -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+ } -+ } else if (count > 0) { -+ bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); -+ bvd_ipc->suspend_flag = 1; -+ -+ if (tty_insert_flip_string(tty, urb->transfer_buffer, -+ count) < count) { -+ bvd_ipc->suspend_flag = 1; -+ append_to_inbuf_list(urb); -+ ipcusb_timer.data = (unsigned long)urb; -+ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ } -+ -+ if (usb_mux_dispatcher) -+ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ -+ -+ urb->actual_length = 0; -+ urb->dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(urb, GFP_ATOMIC)) -+ bvd_dbg("failed resubmitting read urb"); -+#if 0 -+ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) -+ { -+ last_jiff = jiffies; -+ queue_apm_event(KRNL_ICL, NULL); -+ } -+#endif -+ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); -+ } -+ -+ bvd_dbg("usb_ipc_read_bulk: completed!!!"); -+} -+ -+static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) -+{ -+ callback_times++; -+ bvd_ipc->write_finished_flag = 1; -+ -+ bvd_dbg("usb_ipc_write_bulk: begining!"); -+ //printk("%s: write_finished_flag=%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); -+ -+ if (urb->status) -+ printk("nonzero write bulk status received: %d\n", urb->status); -+ -+ if (usb_mux_sender) -+ usb_mux_sender(); /**call Liu changhui's func**/ -+ -+ //printk("usb_ipc_write_bulk: mark ipcusb_softint!\n"); -+ tasklet_schedule(&bvd_ipc->bh); -+ -+ bvd_dbg("usb_ipc_write_bulk: finished!"); -+} -+ -+static void wakeup_timeout(unsigned long data) -+{ -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); -+} -+ -+static void suspend_timeout(unsigned long data) -+{ -+ if (bvd_ipc->suspend_flag == 1) { -+ bvd_ipc->suspend_flag = 0; -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ bvd_dbg("suspend_timeout: add the suspend timer again"); -+ } else { -+ unlink_urbs(&bvd_ipc->readurb_mux); -+ UHCRHPS3 = 0x4; -+ mdelay(40); -+ bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", -+ UHCRHPS3); -+ } -+} -+ -+static void ipcusb_xmit_data(void) -+{ -+ int c, count = IPC_URB_SIZE; -+ int result = 0; -+ int buf_flag = 0; -+ int buf_num = 0; -+ -+ //printk("%s: sumbit_times=%d, callback_times=%d\n", __FUNCTION__, sumbit_times, callback_times); -+ if (bvd_ipc->write_finished_flag == 0) -+ return; -+ -+ while (1) { -+ c = CIRC_CNT_TO_END(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, -+ IPC_USB_XMIT_SIZE); -+ if (count < c) -+ c = count; -+ if (c <= 0) -+ break; -+ -+ memcpy(bvd_ipc->obuf+buf_num, -+ bvd_ipc->xmit.buf + bvd_ipc->xmit.tail, c); -+ buf_flag = 1; -+ bvd_ipc->xmit.tail = ((bvd_ipc->xmit.tail + c) -+ & (IPC_USB_XMIT_SIZE-1)); -+ count -= c; -+ buf_num += c; -+ } -+ -+ if (buf_num == 0) { -+ bvd_dbg("ipcusb_xmit_data: buf_num=%d, add suspend_timer", -+ buf_num); -+ bvd_ipc->suspend_flag = 0; -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ } -+ -+ bvd_dbg("ipcusb_xmit_data: buf_num=%d", buf_num); -+ bvd_dbg("ipcusb_xmit_data: bvd_ipc->obuf: "); -+ -+ bvd_dbg_hex((bvd_ipc->obuf)-buf_num, buf_num); -+ -+ if (buf_flag) { -+ bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; -+ bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); -+ -+ if ((UHCRHPS3 & 0x4) == 0x4) { -+ static int ret; -+ int time = 0; -+ -+ /* if BP sleep, wake up BP first */ -+ pxa_gpio_mode(GPIO_IN | 41); -+ if (GPIO_is_high(41)) { -+ if (GPIO_is_high(GPIO_MCU_INT_SW)) -+ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ else -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ -+ time = jiffies; -+ while (GPIO_is_high(41) && (jiffies < (time+HZ))); -+ -+ if (GPIO_is_high(41)) { -+ printk("%s: Wakeup BP timeout! BP state is %d\n", -+ __FUNCTION__, GPIO_is_high(41)); -+ } -+ if (GPIO_is_high(GPIO_MCU_INT_SW)) -+ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ else -+ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); -+ } -+ -+ /* Resume BP */ -+ UHCRHPS3 = 0x8; -+ mdelay(40); -+ bvd_dbg("ipcusb_xmit_data: Send RESUME signal! UHCRHPS3=0x%x", -+ UHCRHPS3); -+ /*send IN token*/ -+ bvd_ipc->readurb_mux.actual_length = 0; -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" -+ "failed! status=%d\n", ret); -+ bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); -+ } -+ -+ sumbit_times++; -+ bvd_ipc->write_finished_flag = 0; -+ //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); -+ bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; -+ if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) -+ warn("ipcusb_xmit_data: funky result! result=%d\n", result); -+ -+ bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); -+ -+ } -+} -+ -+static void usbipc_bh_func(unsigned long param) -+{ -+ ipcusb_xmit_data(); -+} -+ -+extern void get_halted_bit(void); -+ -+static void usbipc_bh_bp_func(unsigned long param) -+{ -+ if ((UHCRHPS3 & 0x4) == 0x4) { -+ UHCRHPS3 = 0x8; -+ mdelay(40); -+ bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " -+ "UHCRHPS3=0x%x", UHCRHPS3); -+ } -+ if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { -+ get_halted_bit(); -+ -+ /*send a IN token*/ -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) { -+ bvd_dbg("ipcusb_softint_send_readurb: " -+ "usb_submit_urb(read mux bulk) failed!"); -+ } -+ bvd_dbg("ipcusb_softint_send_readurb: Send a IN token successfully!"); -+ bvd_ipc->suspend_flag = 0; -+ bvd_dbg("ipcusb_softint_send_readurb: add suspend_timer"); -+ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); -+ } -+} -+ -+static int usb_ipc_write(struct tty_struct *tty, -+ const unsigned char *buf, int count) -+{ -+ int c, ret = 0; -+ -+ bvd_dbg("usb_ipc_write: count=%d, buf: ", count); -+ bvd_dbg_hex(buf, count); -+ -+ if (count <= 0) -+ return 0; -+ -+ if (*ipcusb_ap_to_bp != NULL) -+ (*ipcusb_ap_to_bp)(buf, count); -+ -+ bvd_ipc->suspend_flag = 1; -+ -+ if ((bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) && -+ (bvd_ipc->xmit.head == bvd_ipc->xmit.tail)) { -+ bvd_dbg("usb_ipc_write: set write_flag"); -+ bvd_ipc->write_flag = IPC_USB_WRITE_XMIT; -+ } -+ -+ while (1) { -+ c = CIRC_SPACE_TO_END(bvd_ipc->xmit.head, -+ bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); -+ if (count < c) -+ c = count; -+ if (c <= 0) -+ break; -+ -+ memcpy(bvd_ipc->xmit.buf + bvd_ipc->xmit.head, buf, c); -+ bvd_ipc->xmit.head = ((bvd_ipc->xmit.head + c) -+ & (IPC_USB_XMIT_SIZE-1)); -+ buf += c; -+ count -= c; -+ ret += c; -+ } -+ bvd_dbg("usb_ipc_write: ret=%d, bvd_ipc->xmit.buf: ", ret); -+ -+ bvd_dbg_hex(bvd_ipc->xmit.buf, ret); -+ -+ if (bvd_ipc->write_flag == IPC_USB_WRITE_XMIT) { -+ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; -+ bvd_dbg("usb_ipc_write: mark ipcusb_softint"); -+ tasklet_schedule(&bvd_ipc->bh); -+ } -+ -+ bvd_dbg("usb_ipc_write: ret=%d\n", ret); -+ return ret; -+} -+ -+static int usb_ipc_chars_in_buffer(struct tty_struct *tty) -+{ -+ return CIRC_CNT(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); -+} -+ -+void usb_send_readurb(void) -+{ -+ //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); -+ -+ if (usbh_finished_resume == 0) -+ return; -+ -+ tasklet_schedule(&bvd_ipc->bh_bp); -+} -+ -+static int usb_ipc_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *usbdev = interface_to_usbdev(intf); -+ struct usb_config_descriptor *ipccfg; -+ struct usb_interface_descriptor *interface; -+ struct usb_endpoint_descriptor *endpoint; -+ int ep_cnt, readsize, writesize; -+ char have_bulk_in_mux, have_bulk_out_mux; -+ -+ bvd_dbg("usb_ipc_probe: vendor id 0x%x, device id 0x%x", -+ usbdev->descriptor.idVendor, usbdev->descriptor.idProduct); -+ -+ if ((usbdev->descriptor.idVendor != MOTO_IPC_VID) || -+ (usbdev->descriptor.idProduct != MOTO_IPC_PID)) -+ return -ENODEV; -+ -+ /* a2590c : dsplog interface is not supported by this driver */ -+ if (intf->minor == 2) /* dsplog interface number is 2 */ -+ return -1; -+ -+ bvd_dbg("usb_ipc_probe: USB dev address:%p", usbdev); -+ bvd_dbg("usb_ipc_probe: ifnum:%u", intf->minor); -+ -+ ipccfg = &usbdev->actconfig->desc; -+ bvd_dbg("usb_ipc_prob: config%d", ipccfg->bConfigurationValue); -+ bvd_dbg("usb_ipc_prob: bNumInterfaces = %d", ipccfg->bNumInterfaces); -+ -+ /* After this point we can be a little noisy about what we are trying -+ * to configure, hehe. */ -+ if (usbdev->descriptor.bNumConfigurations != 1) { -+ info("usb_ipc_probe: Only one device configuration " -+ "is supported."); -+ return -1; -+ } -+ -+ if (usbdev->config[0].desc.bNumInterfaces != 3) { -+ info("usb_ipc_probe: Only three device interfaces are " -+ "supported."); -+ return -1; -+ } -+ -+ interface = &intf->cur_altsetting->desc; -+ endpoint = &intf->cur_altsetting->endpoint[0].desc; -+ /* Start checking for two bulk endpoints or ... FIXME: This is a future -+ * enhancement...*/ -+ bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", -+ (int) interface->bNumEndpoints); -+ if (interface->bNumEndpoints != 2) { -+ info("usb_ipc_probe: Only two endpoints supported."); -+ return -1; -+ } -+ -+ ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; -+ -+ bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", -+ (&endpoint[0])->bEndpointAddress); -+ bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", -+ (&endpoint[1])->bEndpointAddress); -+ -+ while (ep_cnt < interface->bNumEndpoints) { -+ -+ if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", -+ (&endpoint[ep_cnt])->bEndpointAddress); -+ have_bulk_in_mux = -+ (&endpoint[ep_cnt])->bEndpointAddress; -+ readsize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ bvd_dbg("usb_ipc_probe: readsize=%d", readsize); -+ ep_cnt++; -+ continue; -+ } -+ -+ if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { -+ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", -+ (&endpoint[ep_cnt])->bEndpointAddress); -+ have_bulk_out_mux = -+ (&endpoint[ep_cnt])->bEndpointAddress; -+ writesize = (&endpoint[ep_cnt])->wMaxPacketSize; -+ bvd_dbg("usb_ipc_probe: writesize=%d", writesize); -+ ep_cnt++; -+ continue; -+ } -+ -+ info("usb_ipc_probe: Undetected endpoint ^_^ "); -+ /* Shouldn't ever get here unless we have something weird */ -+ return -1; -+ } -+ -+ /* Perform a quick check to make sure that everything worked as it -+ * should have. */ -+ -+ switch (interface->bNumEndpoints) { -+ case 2: -+ if (!have_bulk_in_mux || !have_bulk_out_mux) { -+ info("usb_ipc_probe: Two bulk endpoints required."); -+ return -1; -+ } -+ break; -+ default: -+ info("usb_ipc_probe: Endpoint determination failed ^_^ "); -+ return -1; -+ } -+ -+ /* Ok, now initialize all the relevant values */ -+ if (!(bvd_ipc->obuf = (char *)kmalloc(writesize, GFP_KERNEL))) { -+ err("usb_ipc_probe: Not enough memory for the output buffer."); -+ kfree(bvd_ipc); -+ return -1; -+ } -+ bvd_dbg("usb_ipc_probe: obuf address:%p", bvd_ipc->obuf); -+ -+ if (!(bvd_ipc->ibuf = (char *)kmalloc(readsize, GFP_KERNEL))) { -+ err("usb_ipc_probe: Not enough memory for the input buffer."); -+ kfree(bvd_ipc->obuf); -+ kfree(bvd_ipc); -+ return -1; -+ } -+ bvd_dbg("usb_ipc_probe: ibuf address:%p", bvd_ipc->ibuf); -+ -+ bvd_ipc->ipc_flag = IPC_USB_PROBE_READY; -+ bvd_ipc->write_finished_flag = 1; -+ bvd_ipc->suspend_flag = 1; -+ bvd_ipc->bulk_in_ep_mux= have_bulk_in_mux; -+ bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; -+ bvd_ipc->ipc_dev = usbdev; -+ bvd_ipc->writesize = writesize; -+ INIT_LIST_HEAD (&bvd_ipc->in_buf_list); -+ -+ bvd_ipc->bh.func = usbipc_bh_func; -+ bvd_ipc->bh.data = (unsigned long) bvd_ipc; -+ -+ bvd_ipc->bh_bp.func = usbipc_bh_bp_func; -+ bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; -+ -+ /*Build a write urb*/ -+ usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, -+ usb_sndbulkpipe(bvd_ipc->ipc_dev, -+ bvd_ipc->bulk_out_ep_mux), -+ bvd_ipc->obuf, writesize, usb_ipc_write_bulk, -+ bvd_ipc); -+ //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ -+ /*Build a read urb and send a IN token first time*/ -+ usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, -+ usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), -+ bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); -+ //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; -+ -+ usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); -+ //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); -+ -+ // a2590c: dsplog is not supported by this driver -+ // usb_driver_claim_interface(&usb_ipc_driver, -+ // &ipccfg->interface[2], bvd_ipc); -+ /*send a IN token first time*/ -+ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; -+ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) -+ printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); -+ -+ bvd_dbg("usb_ipc_prob: Send a IN token successfully!"); -+ -+ if (bvd_ipc->xmit.head != bvd_ipc->xmit.tail) { -+ printk("usb_ipc_probe: mark ipcusb_softint!\n"); -+ tasklet_schedule(&bvd_ipc->bh); -+ } -+ -+ printk("usb_ipc_probe: completed probe!"); -+ usb_set_intfdata(intf, &bvd_ipc); -+ return 0; -+} -+ -+static void usb_ipc_disconnect(struct usb_interface *intf) -+{ -+ //struct usb_device *usbdev = interface_to_usbdev(intf); -+ struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); -+ -+ printk("usb_ipc_disconnect:*** \n"); -+ -+ if ((UHCRHPS3 & 0x4) == 0) -+ usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); -+ -+ usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); -+ -+ bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; -+ kfree(bvd_ipc_disconnect->ibuf); -+ kfree(bvd_ipc_disconnect->obuf); -+ -+ usb_driver_release_interface(&usb_ipc_driver, -+ bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); -+ usb_driver_release_interface(&usb_ipc_driver, -+ bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); -+ -+ //a2590c: dsplog interface is not supported by this driver -+ //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); -+ -+ bvd_ipc_disconnect->ipc_dev = NULL; -+ -+ usb_set_intfdata(intf, NULL); -+ -+ printk("usb_ipc_disconnect completed!\n"); -+} -+ -+static struct usb_device_id usb_ipc_id_table[] = { -+ { USB_DEVICE(MOTO_IPC_VID, MOTO_IPC_PID) }, -+ { } /* Terminating entry */ -+}; -+ -+static struct usb_driver usb_ipc_driver = { -+ .name = "usb ipc", -+ .probe = usb_ipc_probe, -+ .disconnect = usb_ipc_disconnect, -+ .id_table = usb_ipc_id_table, -+}; -+ -+static int __init usb_ipc_init(void) -+{ -+ int result; -+ -+ bvd_dbg("init usb_ipc"); -+ /* register driver at the USB subsystem */ -+ result = usb_register(&usb_ipc_driver); -+ if (result < 0) { -+ err ("usb ipc driver could not be registered"); -+ return result; -+ } -+ -+ /*init the related mux interface*/ -+ if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { -+ err("usb_ipc_init: Out of memory."); -+ usb_deregister(&usb_ipc_driver); -+ return -ENOMEM; -+ } -+ bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); -+ -+ if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { -+ err("usb_ipc_init: Not enough memory for the input buffer."); -+ kfree(bvd_ipc); -+ usb_deregister(&usb_ipc_driver); -+ return -ENOMEM; -+ } -+ bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", -+ bvd_ipc->xmit.buf); -+ bvd_ipc->ipc_dev = NULL; -+ bvd_ipc->xmit.head = bvd_ipc->xmit.tail = 0; -+ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; -+ -+ ipcusb_tty_driver.write = usb_ipc_write; -+ ipcusb_tty_driver.chars_in_buffer = usb_ipc_chars_in_buffer; -+ -+ usb_for_mux_driver = &ipcusb_tty_driver; -+ usb_for_mux_tty = &ipcusb_tty; -+ -+ /* init timers for ipcusb read process and usb suspend */ -+ init_timer(&ipcusb_timer); -+ ipcusb_timer.function = ipcusb_timeout; -+ -+ init_timer(&suspend_timer); -+ suspend_timer.function = suspend_timeout; -+ -+ init_timer(&wakeup_timer); -+ wakeup_timer.function = wakeup_timeout; -+ -+ info("USB Host(Bulverde) IPC driver registered."); -+ info(DRIVER_VERSION ":" DRIVER_DESC); -+ -+ return 0; -+} -+ -+static void __exit usb_ipc_exit(void) -+{ -+ bvd_dbg("cleanup bvd_ipc"); -+ -+ kfree(bvd_ipc->xmit.buf); -+ kfree(bvd_ipc); -+ usb_deregister(&usb_ipc_driver); -+ -+ info("USB Host(Bulverde) IPC driver deregistered."); -+} -+ -+module_init(usb_ipc_init); -+module_exit(usb_ipc_exit); -+EXPORT_SYMBOL(usb_send_readurb); -Index: linux-2.6.21/drivers/char/ts0710_mux_usb.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/char/ts0710_mux_usb.h 2007-05-06 17:10:21.000000000 -0300 -@@ -0,0 +1,29 @@ -+/* -+ * linux/drivers/usb/ipcusb.h -+ * -+ * Implementation of a ipc driver based Intel's Bulverde USB Host -+ * Controller. -+ * -+ * Copyright (C) 2003-2005 Motorola -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * 2003-Nov-18 - (Motorola) created -+ * -+ */ -+extern struct tty_driver *usb_for_mux_driver; -+extern struct tty_struct *usb_for_mux_tty; -+extern void (*usb_mux_dispatcher)(struct tty_struct *tty); -+extern void (*usb_mux_sender)(void); diff --git a/packages/linux/linux-ezx-2.6.21/mux_debug.patch b/packages/linux/linux-ezx-2.6.21/mux_debug.patch deleted file mode 100644 index 58cb25a0b6..0000000000 --- a/packages/linux/linux-ezx-2.6.21/mux_debug.patch +++ /dev/null @@ -1,551 +0,0 @@ -Index: linux-2.6.20.7/drivers/char/ts0710_mux.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 12:24:18.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 12:26:47.000000000 +0200 -@@ -85,6 +85,9 @@ - #include "ts0710.h" - #include "ts0710_mux.h" - -+#define TS0710DEBUG -+#define PRINT_OUTPUT_PRINTK -+ - #define TS0710MUX_GPRS_SESSION_MAX 2 - #define TS0710MUX_MAJOR 250 - #define TS0710MUX_MINOR_START 0 -@@ -316,7 +319,7 @@ - #ifdef TS0710DEBUG - - #ifdef PRINT_OUTPUT_PRINTK --#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) -+#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX %s: " fmt "\n" , __func__, ## arg) - #else - #include "ezxlog.h" - static __u8 strDebug[256]; -@@ -530,10 +533,10 @@ - if (strncmp(p->comm, "aplogd", 6) == 0) { - sig = 1; - if (send_sig(SIGUSR2, p, 1) == 0) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: success to send SIGUSR2 to aplogd!\n"); - } else { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: failure to send SIGUSR2 to aplogd!\n"); - } - break; -@@ -542,7 +545,7 @@ - read_unlock(&tasklist_lock); - - if (!sig) { -- TS0710_PRINTK("MUX: not found aplogd!\n"); -+ TS0710_DEBUG("MUX: not found aplogd!\n"); - } - } - #else -@@ -559,11 +562,11 @@ - buf[len + 1] = TS0710_BASIC_FLAG; - - if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); - TS0710_SIG2APLOGD(); - #endif -@@ -577,7 +580,7 @@ - res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); - - if (res != len + 2) { -- TS0710_PRINTK("MUX basic_write: Write Error!\n"); -+ TS0710_DEBUG("MUX basic_write: Write Error!\n"); - return -1; - } - -@@ -601,7 +604,7 @@ - TS0710_DEBUG("crc_check: CRC check OK\n"); - return 0; - } else { -- TS0710_PRINTK("MUX crc_check: CRC check failed\n"); -+ TS0710_DEBUG("MUX crc_check: CRC check failed\n"); - return 1; - } - } -@@ -1266,7 +1269,7 @@ - break; - - case FCON: /*Flow control on command */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Received Flow control(all channels) on command\n"); - if (mcc_short_pkt->h.type.cr == MCC_CMD) { - ts0710->dlci[0].state = CONNECTED; -@@ -1276,7 +1279,7 @@ - break; - - case FCOFF: /*Flow control off command */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Received Flow control(all channels) off command\n"); - if (mcc_short_pkt->h.type.cr == MCC_CMD) { - for (j = 0; j < TS0710_MAX_CHN; j++) { -@@ -1823,7 +1826,7 @@ - TS0710_DEBUG("UIH on channel %d\n", dlci); - - if (uih_len > ts0710->dlci[dlci].mtu) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", - dlci, uih_len, ts0710->dlci[dlci].mtu); - break; -@@ -1844,7 +1847,7 @@ - dlci, tty_idx); - TS0710_DEBUGSTR(uih_data_start, uih_len); - if (!(iscmdtty[tty_idx])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", - __FUNCTION__, dlci, tty_idx); - } -@@ -1856,7 +1859,7 @@ - ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", - dlci, tty_idx); - if (iscmdtty[tty_idx]) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", - __FUNCTION__, dlci, tty_idx); - } -@@ -1864,13 +1867,14 @@ - } - tty = mux_table[tty_idx]; - if ((!mux_tty[tty_idx]) || (!tty)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: No application waiting for, discard it! /dev/mux%d\n", - tty_idx); -+ TS0710_DEBUG("MUX: mux_tty[%d] = %d, tty is at %i", tty_idx, mux_tty[tty_idx], tty); - } else { /* Begin processing received data */ - if ((!mux_recv_info_flags[tty_idx]) - || (!mux_recv_info[tty_idx])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", - tty_idx); - break; -@@ -1878,7 +1882,7 @@ - - recv_info = mux_recv_info[tty_idx]; - if (recv_info->total > 8192) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", - tty_idx); - break; -@@ -1949,7 +1953,7 @@ - get_mux_recv_packet - (uih_len); - if (!recv_packet) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: no memory\n", - __FUNCTION__); - break; -@@ -1980,7 +1984,7 @@ - } else { /* recv_info->total == 0 */ - if (uih_len > - TS0710MUX_RECV_BUF_SIZE) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", - tty_idx, uih_len); - uih_len = -@@ -2120,12 +2124,12 @@ - if (ts0710->dlci[dlci].state == DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI %d Send DISC got signal!\n", - dlci); - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI %d Send DISC timeout!\n", dlci); - continue; - } -@@ -2158,7 +2162,7 @@ - return 0; - } else if (ts0710->dlci[0].state == CONNECTING) { - /* Reentry */ -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", - current->pid, current->comm); - try = 11; -@@ -2179,13 +2183,13 @@ - DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting timeout!\n", - dlci); - continue; -@@ -2199,7 +2203,7 @@ - } - } else if ((ts0710->dlci[0].state != DISCONNECTED) - && (ts0710->dlci[0].state != REJECTED)) { -- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); - return retval; - } else { - ts0710->initiator = 1; -@@ -2218,19 +2222,19 @@ - retval = 0; - break; - } else if (ts0710->dlci[0].state == REJECTED) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got rejected!\n", - dlci); - retval = -EREJECTED; - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM timeout!\n", - dlci); - continue; -@@ -2271,13 +2275,13 @@ - DISCONNECTED) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Wait for connecting timeout!\n", - dlci); - continue; -@@ -2296,7 +2300,7 @@ - } - } else if ((ts0710->dlci[dlci].state != DISCONNECTED) - && (ts0710->dlci[dlci].state != REJECTED)) { -- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); -+ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); - return retval; - } else { - ts0710->dlci[dlci].state = NEGOTIATING; -@@ -2313,13 +2317,13 @@ - if (ts0710->dlci[dlci].state == CONNECTING) { - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send pn_msg got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send pn_msg timeout!\n", - dlci); - continue; -@@ -2344,20 +2348,20 @@ - break; - } else if (ts0710->dlci[dlci].state == - REJECTED) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got rejected!\n", - dlci); - retval = -EREJECTED; - break; - } else if (signal_pending(current)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM got signal!\n", - dlci); - retval = -EAGAIN; - break; - } else if ((jiffies - t) >= - TS0710MUX_TIME_OUT) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX DLCI:%d Send SABM timeout!\n", - dlci); - continue; -@@ -2468,7 +2472,7 @@ - schedule_work(&send_tqueue); - #else - if (!tq_serial_for_mux) { -- TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", -+ TS0710_DEBUG("MUX Error: %s: tq_serial_for_mux == 0\n", - __FUNCTION__); - return; - } -@@ -2508,7 +2512,7 @@ - if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { - if (dlci == 1) { - ts0710_close_channel(0); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); - TS0710_SIG2APLOGD(); - } -@@ -2673,12 +2677,12 @@ - UNUSED_PARAM(tty); - - if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", - __FUNCTION__); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", - __FUNCTION__); - TS0710_SIG2APLOGD(); -@@ -2724,14 +2728,14 @@ - } else if (ts0710->dlci[dlci].state == CONNECTED) { - - if (!(mux_send_info_flags[line])) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", - line); - return -ENODEV; - } - send_info = mux_send_info[line]; - if (!send_info) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: mux_write: mux_send_info[%d] == 0\n", - line); - return -ENODEV; -@@ -2800,7 +2804,7 @@ - } - return c; - } else { -- TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); -+ TS0710_DEBUG("MUX mux_write: DLCI %d not connected\n", dlci); - return -EDISCONNECTED; - } - } -@@ -2940,7 +2944,7 @@ - return; - } - -- TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); -+ TS0710_DEBUG("MUX %s: line is:%d\n", __FUNCTION__, line); - - if ((mux_send_info_flags[line]) - && (mux_send_info[line]) -@@ -2960,10 +2964,10 @@ - - /* - if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { -- TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); -+ TS0710_DEBUG("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); - - #ifndef USB_FOR_MUX -- TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); -+ TS0710_DEBUG("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); - TS0710_SIG2APLOGD(); - #endif - -@@ -2989,9 +2993,9 @@ - if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { - - #ifdef USB_FOR_MUX -- TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); -+ TS0710_DEBUG("MUX: please install and open IPC-USB first\n"); - #else -- TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); -+ TS0710_DEBUG("MUX: please install and open ttyS0 first\n"); - #endif - - goto out; -@@ -3016,7 +3020,7 @@ - /* if( dlci == 1 ) { */ - /* Open server channel 0 first */ - if ((retval = ts0710_open_channel(0)) != 0) { -- TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); -+ TS0710_DEBUG("MUX: Can't connect server channel 0!\n"); - ts0710_init(); - - mux_tty[line]--; -@@ -3073,7 +3077,7 @@ - datatty = dlci2tty[dlci].datatty; - if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { - if ((retval = ts0710_open_channel(dlci)) != 0) { -- TS0710_PRINTK("MUX: Can't connected channel %d!\n", -+ TS0710_DEBUG("MUX: Can't connected channel %d!\n", - dlci); - ts0710_reset_dlci(dlci); - -@@ -3096,6 +3100,7 @@ - retval = 0; - #endif - out: -+ TS0710_DEBUG("returning %d for open of /dev/mux%d (mux_tty[%d] = %d", retval, line, line, mux_tty[line]); - return retval; - } - -@@ -3178,12 +3183,12 @@ - - while (1) { - tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); -- TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); -+ TS0710_DEBUG("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); - tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); - if (tbuf_read == 0) { - break; - } else { -- TS0710_PRINTK("Read %i bytes.\n", tbuf_read); -+ TS0710_DEBUG("Read %i bytes.\n", tbuf_read); - }; - tbuf_ptr += tbuf_read; - }; -@@ -3192,7 +3197,7 @@ - - // Should be impossible? - //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { -- // TS0710_PRINTK -+ // TS0710_DEBUG - // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); - // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); - //} -@@ -3264,7 +3269,7 @@ - TS0710_LOGSTR_FRAME(0, start_flag, - (tbuf_ptr - - start_flag)); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", - /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ - __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ -@@ -3389,7 +3394,7 @@ - *(uih_data_start - + uih_len) = - 0; -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX bp log: %s\n", - uih_data_start); - } -@@ -3415,7 +3420,7 @@ - TS0710_LOGSTR_FRAME(0, start_flag, - framelen); - TS0710_DEBUGHEX(start_flag, framelen); -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: Lost synchronization!\n"); - search = start_flag + 1; - } -@@ -3476,7 +3481,7 @@ - recv_info2 = recv_info->next; - - if (!(recv_info->total)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", - __FUNCTION__); - continue; -@@ -3486,7 +3491,7 @@ - dlci = tty2dlci[tty_idx]; - tty = mux_table[tty_idx]; - if ((!mux_tty[tty_idx]) || (!tty)) { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", - tty_idx); - mux_recv_info_flags[tty_idx] = 0; -@@ -3560,7 +3565,7 @@ - recv_info->total -= recv_packet->length; - free_mux_recv_packet(recv_packet); - } else { -- TS0710_PRINTK -+ TS0710_DEBUG - ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", - __FUNCTION__, recv_info->total); - } -@@ -3760,7 +3765,7 @@ - int ret; - - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX get_count: invalid idx: %d!\n", idx); - return -1; - } - -@@ -3774,11 +3779,11 @@ - static int set_count(__u8 idx, int count) - { - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX set_count: invalid idx: %d!\n", idx); - return -1; - } - if (count < 0) { -- TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); -+ TS0710_DEBUG("MUX set_count: invalid count: %d!\n", count); - return -1; - } - -@@ -3792,11 +3797,11 @@ - static int add_count(__u8 idx, int count) - { - if (idx > TS0710MUX_COUNT_MAX_IDX) { -- TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); -+ TS0710_DEBUG("MUX add_count: invalid idx: %d!\n", idx); - return -1; - } - if (count <= 0) { -- TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); -+ TS0710_DEBUG("MUX add_count: invalid count: %d!\n", count); - return -1; - } - -Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c -=================================================================== ---- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 -+++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 -@@ -72,7 +72,8 @@ - #define IPC_USB_PROBE_NOT_READY 4 - #define DBG_MAX_BUF_SIZE 1024 - #define ICL_EVENT_INTERVAL (HZ) --#undef BVD_DEBUG -+ -+#define BVD_DEBUG - - #define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) - #define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) diff --git a/packages/linux/linux-ezx-2.6.21/patches/.mtn2git_empty b/packages/linux/linux-ezx-2.6.21/patches/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/linux-ezx-2.6.21/patches/Makefile.OpenEZX b/packages/linux/linux-ezx-2.6.21/patches/Makefile.OpenEZX new file mode 100755 index 0000000000..7e7e0f2898 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/Makefile.OpenEZX @@ -0,0 +1,51 @@ +# Makefile used to build binary images of OpenEZX kernels +# +# If you are currently in the linux kernel toplevel dir, +# you can call this Makefile with: +# $ make -f path_to/Makefile.OpenEZX +# +# Note that you can set the CROSS_COMPILE and QUILT_PATCHES variable +# in your environment. +# + +PHONES = a780 e680 a1200 e2 e6 + +CROSS_COMPILE ?= /home/wyrm/ezx/dev/cross/bin/arm-angstrom-linux-gnueabi- +QUILT_PATCHES ?= patches + +DATE = $(shell date +%Y%m%d) + +all: $(foreach p, $(PHONES), zImage-$(p) modules-$(p).tar.gz) + +zImages: $(foreach p, $(PHONES), zImage-$(p)) + +modules: $(foreach p, $(PHONES), modules-$(p).tar.gz) + +release: $(foreach p, $(PHONES), tag-$(p)) + cat md5sums.tmp | gpg --clearsign > md5sums + tar -rf ezxrelease.tar md5sums + rm -f md5sums.tmp md5sums + mv ezxrelease.tar ezxrelease-$(DATE).tar + +tag-%: zImage-% modules-%.tar.gz + p=$(patsubst tag-%,%,$@) && \ + tag=$(shell cat include/config/kernel.release)-$(DATE) && \ + cp zImage-$$p zImage-$$tag-$$p && \ + cp modules-$$p.tar.gz modules-$$tag-$$p.tar.gz && \ + tar -rf ezxrelease.tar zImage-$$tag-$$p modules-$$tag-$$p.tar.gz && \ + md5sum zImage-$$tag-$$p modules-$$tag-$$p.tar.gz >> md5sums.tmp && \ + rm -f zImage-$$tag-$$p modules-$$tag-$$p.tar.gz + +zImage-%: $(QUILT_PATCHES)/defconfig-% + cp $< ./.config + make ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) zImage + mv arch/arm/boot/zImage $@ + +modules-%.tar.gz: $(QUILT_PATCHES)/defconfig-% + cp $< ./.config + -find . -name "*.ko" -print0 | xargs -r0 rm + mkdir /tmp/$@ + make ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) \ + INSTALL_MOD_PATH=/tmp/$@ modules modules_install + tar -C /tmp/$@ -czf $@ . + rm -rf /tmp/$@ diff --git a/packages/linux/linux-ezx-2.6.21/patches/a1200-mci.patch b/packages/linux/linux-ezx-2.6.21/patches/a1200-mci.patch new file mode 100755 index 0000000000..0d2640a2e7 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a1200-mci.patch @@ -0,0 +1,135 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-06-02 20:32:31.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-06-02 20:44:29.000000000 -0300 +@@ -97,6 +97,7 @@ + config PXA_EZX_A1200 + bool "Motorola A1200 GSM Phone" + select PXA27x ++ select EZX_MCI_TF + + config PXA_EZX_E6 + bool "Motorola E6 GSM Phone" +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a1200.c 2007-06-02 20:32:26.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-06-02 20:44:56.000000000 -0300 +@@ -13,11 +13,14 @@ + #include + #include + #include ++#include ++#include + + #include + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" +@@ -25,6 +28,95 @@ + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); + ++#ifdef CONFIG_EZX_PCAP ++extern int ezx_pcap_mmcsd_power(int); ++extern void ezx_pcap_mmcsd_voltage(u_int32_t); ++#else ++#define ezx_pcap_mmcsd_voltage(x) {} ++#define ezx_pcap_mmcsd_power(x) {} ++#endif ++ ++static struct pxamci_platform_data a1200_mci_platform_data; ++ ++static u_int8_t mmc_voltage[] = { ++ [MMC_VDD_160] = 5, ++ [MMC_VDD_170] = 5, ++ [MMC_VDD_180] = 6, ++ [MMC_VDD_190] = 6, ++ [MMC_VDD_200] = 7, ++ [MMC_VDD_210] = 7, ++ [MMC_VDD_220] = 8, ++ [MMC_VDD_230] = 8, ++ [MMC_VDD_240] = 9, ++ [MMC_VDD_250] = 9, ++ [MMC_VDD_260] = 10, ++ [MMC_VDD_270] = 10, ++ [MMC_VDD_280] = 11, ++ [MMC_VDD_290] = 11, ++ [MMC_VDD_300] = 12, ++ [MMC_VDD_310] = 12, ++ [MMC_VDD_320] = 13, ++ [MMC_VDD_330] = 13, ++ [MMC_VDD_340] = 14, ++ [MMC_VDD_350] = 14, ++ [MMC_VDD_360] = 15, ++}; ++ ++static int a1200_mci_init(struct device *dev, ++ irqreturn_t (*ezx_detect_int)(int, void *), ++ void *data) ++{ ++ int err; ++ ++ /* Setup GPIO for PXA27x MMC/SD controller */ ++ pxa_gpio_mode(GPIO32_MMCCLK_MD); ++ pxa_gpio_mode(GPIO112_MMCCMD_MD); ++ pxa_gpio_mode(GPIO92_MMCDAT0_MD); ++ pxa_gpio_mode(GPIO109_MMCDAT1_MD); ++ pxa_gpio_mode(GPIO110_MMCDAT2_MD); ++ pxa_gpio_mode(GPIO111_MMCDAT3_MD); ++ ++ ezx_pcap_mmcsd_power(1); ++ ++ a1200_mci_platform_data.detect_delay = msecs_to_jiffies(250); ++ ++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, ++ "MMC card detect", data); ++ if (err) { ++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " ++ "MMC card detect IRQ\n"); ++ return -1; ++ } ++ ++ set_irq_type(0x0b, IRQT_BOTHEDGE); ++ ++ return 0; ++} ++ ++static void a1200_mci_setpower(struct device *dev, unsigned int vdd) ++{ ++ if (vdd <= MMC_VDD_360) ++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); ++ ++ ezx_pcap_mmcsd_power(1); ++} ++ ++static void a1200_mci_exit(struct device *dev, void *data) ++{ ++ ezx_pcap_mmcsd_power(0); ++ free_irq(0x49, data); ++} ++ ++static struct pxamci_platform_data a1200_mci_platform_data = { ++ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 ++ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 ++ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 ++ |MMC_VDD_34_35|MMC_VDD_35_36, ++ .init = a1200_mci_init, ++ .setpower = a1200_mci_setpower, ++ .exit = a1200_mci_exit, ++}; ++ + static struct pxafb_mode_info mode_a1200 = { + .pixclock = 192308, + .xres = 240, +@@ -54,6 +146,7 @@ + static void __init a1200_init(void) + { + set_pxa_fb_info(&a1200_fb_info); ++ pxa_set_mci_info(&a1200_mci_platform_data); + + platform_add_devices(devices, ARRAY_SIZE(devices)); + } diff --git a/packages/linux/linux-ezx-2.6.21/patches/a1200-ts.patch b/packages/linux/linux-ezx-2.6.21/patches/a1200-ts.patch new file mode 100755 index 0000000000..a7ca6362b0 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a1200-ts.patch @@ -0,0 +1,40 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a1200.c 2007-06-02 20:32:32.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-06-02 20:33:41.000000000 -0300 +@@ -117,6 +117,27 @@ + .exit = a1200_mci_exit, + }; + ++/* PCAP_TS */ ++struct resource pcap_ts_resources[] = { ++ [0] = { ++ .start = EZX_IRQ_ADCDONE2, ++ .end = EZX_IRQ_ADCDONE2, ++ .flags = IORESOURCE_IRQ, ++ }, ++ [1] = { ++ .start = EZX_IRQ_TS, ++ .end = EZX_IRQ_TS, ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++struct platform_device pcap_ts_device = { ++ .name = "pcap-ts", ++ .id = -1, ++ .num_resources = ARRAY_SIZE(pcap_ts_resources), ++ .resource = pcap_ts_resources, ++}; ++ + static struct pxafb_mode_info mode_a1200 = { + .pixclock = 192308, + .xres = 240, +@@ -141,6 +162,7 @@ + }; + + static struct platform_device *devices[] __initdata = { ++ &pcap_ts_device, + }; + + static void __init a1200_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-flip.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-flip.patch new file mode 100755 index 0000000000..b93b1b14e4 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-flip.patch @@ -0,0 +1,44 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-06-08 18:38:47.000000000 +0200 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-06-08 18:38:50.000000000 +0200 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -214,8 +215,31 @@ + }, + }; + ++static struct gpio_keys_button a780flip_buttons[] = { ++ [0] = { ++ .keycode = KEY_SLEEP, ++ .gpio = GPIO_FLIP_PIN, ++ .desc = "A780 flip", ++ }, ++}; ++ ++static struct gpio_keys_platform_data a780flip_platform_data = { ++ .buttons = a780flip_buttons, ++ .nbuttons = 1, ++}; ++ ++static struct platform_device a780flip_device = { ++ .name = "gpio-keys", ++ .id = -1, ++ .dev = { ++ .platform_data = &a780flip_platform_data, ++ }, ++}; ++ ++ + static struct platform_device *devices[] __initdata = { + &pcap_ts_device, ++ &a780flip_device, + }; + + static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-kbd.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-kbd.patch new file mode 100755 index 0000000000..902889abe6 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-kbd.patch @@ -0,0 +1,90 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-24 00:54:38.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-24 00:56:22.000000000 -0300 +@@ -16,18 +16,21 @@ + #include + #include + #include ++#include + + #include + #include + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" + + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); ++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *); + + #ifdef CONFIG_EZX_PCAP + extern int ezx_pcap_mmcsd_power(int); +@@ -141,6 +144,55 @@ + .pxafb_lcd_power = &ezx_lcd_power, + }; + ++static unsigned char a780_keycode[] = { ++ /* row 0 */ ++ KEY_PHONE, KEY_MENU, KEY_CANCEL, KEY_PAGEUP, KEY_UP, ++ /* row 1 */ ++ KEY_KP1, KEY_KP2, KEY_KP3, KEY_ENTER, KEY_KPENTER, /*center joypad */ ++ /* row 2 */ ++ KEY_KP4, KEY_KP5, KEY_KP6, KEY_RECORD, KEY_LEFT, ++ /* row 3 */ ++ KEY_KP7, KEY_KP8, KEY_KP9, KEY_HOME, KEY_RIGHT, ++ /* row 4 */ ++ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN, ++}; ++ ++static unsigned char a780_direct_keycode[] = { ++ KEY_CAMERA, ++}; ++ ++static int a780_kbd_init(void) ++{ ++ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, voice_rec */ ++ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */ ++ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */ ++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ ++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ ++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ ++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ ++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ ++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ ++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ ++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */ ++ PKWR = 0xec400; ++ PGSR3 |= 0xf80; ++ return 0; ++} ++ ++static struct pxakbd_platform_data a780_kbd_platform_data = { ++ .init = &a780_kbd_init, ++ .scan_interval = HZ/40, ++ .matrix = { ++ .keycode = a780_keycode, ++ .cols = 5, ++ .rows = 5, ++ }, ++ .direct = { ++ .keycode = a780_direct_keycode, ++ .num = 1, ++ }, ++}; ++ + static struct platform_device *devices[] __initdata = { + }; + +@@ -159,6 +211,7 @@ + + set_pxa_fb_info(&a780_fb_info); + pxa_set_mci_info(&a780_mci_platform_data); ++ pxa_set_kbd_info(&a780_kbd_platform_data); + + /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ + pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-leds.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-leds.patch new file mode 100755 index 0000000000..5a9a9383f7 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-leds.patch @@ -0,0 +1,182 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +Index: linux-2.6.21/drivers/leds/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-06-08 18:33:45.000000000 +0200 ++++ linux-2.6.21/drivers/leds/Kconfig 2007-06-08 18:39:04.000000000 +0200 +@@ -104,6 +104,13 @@ + These triggers allow kernel events to drive the LEDs and can + be configured via sysfs. If unsure, say Y. + ++config LEDS_A780 ++ tristate "LED Support for the Motorola A780 GSM Phone" ++ depends LEDS_CLASS && PXA_EZX_A780 ++ help ++ This option enables support for the LEDs on the ++ Motorola A780 GSM Phone. ++ + config LEDS_TRIGGER_TIMER + tristate "LED Timer Trigger" + depends on LEDS_TRIGGERS +Index: linux-2.6.21/drivers/leds/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/leds/Makefile 2007-06-08 18:33:45.000000000 +0200 ++++ linux-2.6.21/drivers/leds/Makefile 2007-06-08 18:39:04.000000000 +0200 +@@ -16,6 +16,7 @@ + obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o + obj-$(CONFIG_LEDS_H1940) += leds-h1940.o + obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o ++obj-$(CONFIG_LEDS_A780) += leds-a780.o + + # LED Triggers + obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o +Index: linux-2.6.21/drivers/leds/leds-a780.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/leds/leds-a780.c 2007-06-08 18:39:04.000000000 +0200 +@@ -0,0 +1,122 @@ ++/* ++ * EZX Platform LED Driver for the Motorola A780 GSM Phone ++ * ++ * Copyright 2006 Vanille-Media ++ * ++ * Author: Michael Lauer ++ * ++ * Based on keylight.c by Motorola and leds-corgi.c by Richard Purdie ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value) ++{ ++ if ( value > 31 ) value = 31; ++ printk( KERN_DEBUG "a780led_main_set: %d\n", value ); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3, value & 0x08); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4, value & 0x10); ++} ++ ++static void a780led_aux_set(struct led_classdev *led_cdev, enum led_brightness value) ++{ ++ if ( value > 31 ) value = 31; ++ printk( KERN_DEBUG "a780led_aux_set: %d\n", value ); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3, value & 0x08); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10); ++} ++ ++static struct led_classdev a780_main_led = { ++ .name = "a780:main", ++ .default_trigger = "none", ++ .brightness_set = a780led_main_set, ++}; ++ ++static struct led_classdev a780_aux_led = { ++ .name = "a780:aux", ++ .default_trigger = "none", ++ .brightness_set = a780led_aux_set, ++}; ++ ++#ifdef CONFIG_PM ++static int a780led_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ led_classdev_suspend(&a780_main_led); ++ led_classdev_suspend(&a780_aux_led); ++ return 0; ++} ++ ++static int a780led_resume(struct platform_device *dev) ++{ ++ led_classdev_resume(&a780_main_led); ++ led_classdev_resume(&a780_aux_led); ++ return 0; ++} ++#endif ++ ++static int a780led_probe(struct platform_device *pdev) ++{ ++ int ret; ++ ++ ret = led_classdev_register(&pdev->dev, &a780_main_led); ++ if (ret < 0) ++ return ret; ++ ++ ret = led_classdev_register(&pdev->dev, &a780_aux_led); ++ if (ret < 0) ++ led_classdev_unregister(&a780_main_led); ++ ++ return ret; ++} ++ ++static int a780led_remove(struct platform_device *pdev) ++{ ++ led_classdev_unregister(&a780_main_led); ++ led_classdev_unregister(&a780_aux_led); ++ return 0; ++} ++ ++static struct platform_driver a780led_driver = { ++ .probe = a780led_probe, ++ .remove = a780led_remove, ++#ifdef CONFIG_PM ++ .suspend = a780led_suspend, ++ .resume = a780led_resume, ++#endif ++ .driver = { ++ .name = "a780-led", ++ }, ++}; ++ ++static int __init a780led_init(void) ++{ ++ return platform_driver_register(&a780led_driver); ++} ++ ++static void __exit a780led_exit(void) ++{ ++ a780led_main_set( &a780_main_led, 0 ); ++ a780led_aux_set( &a780_aux_led, 0 ); ++ platform_driver_unregister(&a780led_driver); ++} ++ ++module_init(a780led_init); ++module_exit(a780led_exit); ++ ++MODULE_AUTHOR("Michael Lauer "); ++MODULE_DESCRIPTION("Motorola A780 LED driver"); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-06-08 18:38:50.000000000 +0200 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-06-08 18:39:04.000000000 +0200 +@@ -236,10 +236,15 @@ + }, + }; + ++static struct platform_device a780led_device = { ++ .name = "a780-led", ++ .id = -1, ++}; + + static struct platform_device *devices[] __initdata = { + &pcap_ts_device, + &a780flip_device, ++ &a780led_device, + }; + + static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-mci.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-mci.patch new file mode 100755 index 0000000000..4877bfffa5 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-mci.patch @@ -0,0 +1,135 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-24 00:44:14.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-24 00:47:01.000000000 -0300 +@@ -14,11 +14,14 @@ + #include + #include + #include ++#include ++#include + + #include + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" +@@ -26,6 +29,95 @@ + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); + ++#ifdef CONFIG_EZX_PCAP ++extern int ezx_pcap_mmcsd_power(int); ++extern void ezx_pcap_mmcsd_voltage(u_int32_t); ++#else ++#define ezx_pcap_mmcsd_voltage(x) {} ++#define ezx_pcap_mmcsd_power(x) {} ++#endif ++ ++static struct pxamci_platform_data a780_mci_platform_data; ++ ++static u_int8_t mmc_voltage[] = { ++ [MMC_VDD_160] = 5, ++ [MMC_VDD_170] = 5, ++ [MMC_VDD_180] = 6, ++ [MMC_VDD_190] = 6, ++ [MMC_VDD_200] = 7, ++ [MMC_VDD_210] = 7, ++ [MMC_VDD_220] = 8, ++ [MMC_VDD_230] = 8, ++ [MMC_VDD_240] = 9, ++ [MMC_VDD_250] = 9, ++ [MMC_VDD_260] = 10, ++ [MMC_VDD_270] = 10, ++ [MMC_VDD_280] = 11, ++ [MMC_VDD_290] = 11, ++ [MMC_VDD_300] = 12, ++ [MMC_VDD_310] = 12, ++ [MMC_VDD_320] = 13, ++ [MMC_VDD_330] = 13, ++ [MMC_VDD_340] = 14, ++ [MMC_VDD_350] = 14, ++ [MMC_VDD_360] = 15, ++}; ++ ++static int a780_mci_init(struct device *dev, ++ irqreturn_t (*ezx_detect_int)(int, void *), ++ void *data) ++{ ++ int err; ++ ++ /* Setup GPIO for PXA27x MMC/SD controller */ ++ pxa_gpio_mode(GPIO32_MMCCLK_MD); ++ pxa_gpio_mode(GPIO112_MMCCMD_MD); ++ pxa_gpio_mode(GPIO92_MMCDAT0_MD); ++ pxa_gpio_mode(GPIO109_MMCDAT1_MD); ++ pxa_gpio_mode(GPIO110_MMCDAT2_MD); ++ pxa_gpio_mode(GPIO111_MMCDAT3_MD); ++ ++ ezx_pcap_mmcsd_power(1); ++ ++ a780_mci_platform_data.detect_delay = msecs_to_jiffies(250); ++ ++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, ++ "MMC card detect", data); ++ if (err) { ++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " ++ "MMC card detect IRQ\n"); ++ return -1; ++ } ++ ++ set_irq_type(0x0b, IRQT_BOTHEDGE); ++ ++ return 0; ++} ++ ++static void a780_mci_setpower(struct device *dev, unsigned int vdd) ++{ ++ if (vdd <= MMC_VDD_360) ++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); ++ ++ ezx_pcap_mmcsd_power(1); ++} ++ ++static void a780_mci_exit(struct device *dev, void *data) ++{ ++ ezx_pcap_mmcsd_power(0); ++ free_irq(0x49, data); ++} ++ ++static struct pxamci_platform_data a780_mci_platform_data = { ++ .ocr_mask = MMC_VDD_160_165|MMC_VDD_18_19|MMC_VDD_20_21 ++ |MMC_VDD_22_23|MMC_VDD_24_25|MMC_VDD_26_27 ++ |MMC_VDD_28_29|MMC_VDD_30_31|MMC_VDD_32_33 ++ |MMC_VDD_34_35|MMC_VDD_35_36, ++ .init = a780_mci_init, ++ .setpower = a780_mci_setpower, ++ .exit = a780_mci_exit, ++}; ++ + static struct pxafb_mode_info mode_a780 = { + .pixclock = 150000, + .xres = 240, +@@ -66,6 +158,7 @@ + PSLR = 0x05800f00; + + set_pxa_fb_info(&a780_fb_info); ++ pxa_set_mci_info(&a780_mci_platform_data); + + /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ + pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-24 00:47:13.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-24 00:48:11.000000000 -0300 +@@ -87,6 +87,7 @@ + config PXA_EZX_A780 + bool "Motorola A780 GSM Phone" + select PXA27x ++ select EZX_MCI_TF + + config PXA_EZX_E2 + bool "Motorola E2 GSM Phone" diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-ts.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-ts.patch new file mode 100755 index 0000000000..a4a476ac59 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-ts.patch @@ -0,0 +1,40 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-06-02 20:32:48.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-06-02 20:33:10.000000000 -0300 +@@ -121,6 +121,27 @@ + .exit = a780_mci_exit, + }; + ++/* PCAP_TS */ ++struct resource pcap_ts_resources[] = { ++ [0] = { ++ .start = EZX_IRQ_ADCDONE2, ++ .end = EZX_IRQ_ADCDONE2, ++ .flags = IORESOURCE_IRQ, ++ }, ++ [1] = { ++ .start = EZX_IRQ_TS, ++ .end = EZX_IRQ_TS, ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++struct platform_device pcap_ts_device = { ++ .name = "pcap-ts", ++ .id = -1, ++ .num_resources = ARRAY_SIZE(pcap_ts_resources), ++ .resource = pcap_ts_resources, ++}; ++ + static struct pxafb_mode_info mode_a780 = { + .pixclock = 150000, + .xres = 240, +@@ -194,6 +215,7 @@ + }; + + static struct platform_device *devices[] __initdata = { ++ &pcap_ts_device, + }; + + static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/a780-vibrator.patch b/packages/linux/linux-ezx-2.6.21/patches/a780-vibrator.patch new file mode 100755 index 0000000000..7436c40f5f --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/a780-vibrator.patch @@ -0,0 +1,151 @@ +Index: linux-2.6.21/drivers/leds/leds-a780.c +=================================================================== +--- linux-2.6.21.orig/drivers/leds/leds-a780.c 2007-05-08 15:09:26.000000000 -0300 ++++ linux-2.6.21/drivers/leds/leds-a780.c 2007-05-08 15:19:26.000000000 -0300 +@@ -18,10 +18,13 @@ + #include + #include + ++extern void ezx_pcap_vibrator_level(u_int32_t); ++ + static void a780led_main_set(struct led_classdev *led_cdev, enum led_brightness value) + { + if ( value > 31 ) value = 31; + printk( KERN_DEBUG "a780led_main_set: %d\n", value ); ++#warning FIXME: use read/write operations + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0, value & 0x01); + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1, value & 0x02); + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2, value & 0x04); +@@ -33,6 +36,7 @@ + { + if ( value > 31 ) value = 31; + printk( KERN_DEBUG "a780led_aux_set: %d\n", value ); ++#warning FIXME: use read/write operations + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0, value & 0x01); + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1, value & 0x02); + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2, value & 0x04); +@@ -40,6 +44,43 @@ + ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4, value & 0x10); + } + ++static void a780vibrator_set(struct led_classdev *led_cdev, enum led_brightness value) ++{ ++ if ( value > 4 ) value = 4; ++ printk( KERN_DEBUG "a780vibrator_set: %d\n", value ); ++ ++ switch(value) ++ { ++ case 0: ++ /* turn off vibrator */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 0); ++ break; ++ ++ case 1: ++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); ++ break; ++ ++ case 2: ++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); ++ break; ++ ++ case 3: ++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL2); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); ++ break; ++ ++ case 4: ++ ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN, 1); ++ break; ++ ++ default: ++ break; ++ } ++} ++ + static struct led_classdev a780_main_led = { + .name = "a780:main", + .default_trigger = "none", +@@ -52,11 +93,18 @@ + .brightness_set = a780led_aux_set, + }; + ++static struct led_classdev a780_vibrator = { ++ .name = "a780:vibrator", ++ .default_trigger = "none", ++ .brightness_set = a780vibrator_set, ++}; ++ + #ifdef CONFIG_PM + static int a780led_suspend(struct platform_device *dev, pm_message_t state) + { + led_classdev_suspend(&a780_main_led); + led_classdev_suspend(&a780_aux_led); ++ led_classdev_suspend(&a780_vibrator); + return 0; + } + +@@ -64,6 +112,7 @@ + { + led_classdev_resume(&a780_main_led); + led_classdev_resume(&a780_aux_led); ++ led_classdev_resume(&a780_vibrator); + return 0; + } + #endif +@@ -77,8 +126,16 @@ + return ret; + + ret = led_classdev_register(&pdev->dev, &a780_aux_led); +- if (ret < 0) ++ if (ret < 0) { ++ led_classdev_unregister(&a780_main_led); ++ return ret; ++ } ++ ++ ret = led_classdev_register(&pdev->dev, &a780_vibrator); ++ if (ret < 0) { + led_classdev_unregister(&a780_main_led); ++ led_classdev_unregister(&a780_aux_led); ++ } + + return ret; + } +@@ -87,6 +144,7 @@ + { + led_classdev_unregister(&a780_main_led); + led_classdev_unregister(&a780_aux_led); ++ led_classdev_unregister(&a780_vibrator); + return 0; + } + +@@ -111,6 +169,8 @@ + { + a780led_main_set( &a780_main_led, 0 ); + a780led_aux_set( &a780_aux_led, 0 ); ++ a780vibrator_set( &a780_vibrator, 0 ); ++ + platform_driver_unregister(&a780led_driver); + } + +Index: linux-2.6.21/drivers/leds/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300 ++++ linux-2.6.21/drivers/leds/Kconfig 2007-05-08 15:09:26.000000000 -0300 +@@ -105,11 +105,11 @@ + be configured via sysfs. If unsure, say Y. + + config LEDS_A780 +- tristate "LED Support for the Motorola A780 GSM Phone" ++ tristate "LED/Vibrator Support for the Motorola A780 GSM Phone" + depends LEDS_CLASS && PXA_EZX_A780 + help +- This option enables support for the LEDs on the +- Motorola A780 GSM Phone. ++ This option enables support for the LEDs and the ++ vibrator on the Motorola A780 GSM Phone. + + config LEDS_E680 + tristate "LED Support for the Motorola E680(i) GSM Phone" diff --git a/packages/linux/linux-ezx-2.6.21/patches/asoc-pxa-ssp.patch b/packages/linux/linux-ezx-2.6.21/patches/asoc-pxa-ssp.patch new file mode 100755 index 0000000000..1fc8283ca2 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/asoc-pxa-ssp.patch @@ -0,0 +1,755 @@ +Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.c 2007-05-14 21:14:38.000000000 -0300 +@@ -0,0 +1,671 @@ ++/* ++ * pxa2xx-ssp.c -- ALSA Soc Audio Layer ++ * ++ * Copyright 2005 Wolfson Microelectronics PLC. ++ * Author: Liam Girdwood ++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com ++ * ++ * 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. ++ * ++ * Revision history ++ * 12th Aug 2005 Initial version. ++ * ++ * TODO: ++ * o The SSP driver _mostly_ works, however is in need of testing and ++ * someone with time to complete it. ++ * o Test network mode for > 16bit sample size ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "pxa2xx-pcm.h" ++#include "pxa2xx-ssp.h" ++ ++#define PXA_SSP_DEBUG 1 ++ ++/* ++ * The following should be defined in pxa-regs.h ++ */ ++#define SSCR0_ACS (1 << 30) /* Audio Clock Select */ ++#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass (SSCR0[ACS] must be set) */ ++#define SSACD_ACPS(x) (x << 4) /* Audio clock PLL select */ ++#define SSACD_ACDS(x) (x << 0) /* Audio clock divider select */ ++ ++/* ++ * SSP audio private data ++ */ ++struct ssp_priv { ++ unsigned int sysclk; ++}; ++ ++static struct ssp_priv ssp_clk[3]; ++static struct ssp_dev ssp[3]; ++#ifdef CONFIG_PM ++static struct ssp_state ssp_state[3]; ++#endif ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_out = { ++ .name = "SSP1 PCM Mono out", ++ .dev_addr = __PREG(SSDR_P1), ++ .drcmr = &DRCMRTXSSDR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_mono_in = { ++ .name = "SSP1 PCM Mono in", ++ .dev_addr = __PREG(SSDR_P1), ++ .drcmr = &DRCMRRXSSDR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_out = { ++ .name = "SSP1 PCM Stereo out", ++ .dev_addr = __PREG(SSDR_P1), ++ .drcmr = &DRCMRTXSSDR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp1_pcm_stereo_in = { ++ .name = "SSP1 PCM Stereo in", ++ .dev_addr = __PREG(SSDR_P1), ++ .drcmr = &DRCMRRXSSDR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_out = { ++ .name = "SSP2 PCM Mono out", ++ .dev_addr = __PREG(SSDR_P2), ++ .drcmr = &DRCMRTXSS2DR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_mono_in = { ++ .name = "SSP2 PCM Mono in", ++ .dev_addr = __PREG(SSDR_P2), ++ .drcmr = &DRCMRRXSS2DR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_out = { ++ .name = "SSP2 PCM Stereo out", ++ .dev_addr = __PREG(SSDR_P2), ++ .drcmr = &DRCMRTXSS2DR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp2_pcm_stereo_in = { ++ .name = "SSP2 PCM Stereo in", ++ .dev_addr = __PREG(SSDR_P2), ++ .drcmr = &DRCMRRXSS2DR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_out = { ++ .name = "SSP3 PCM Mono out", ++ .dev_addr = __PREG(SSDR_P3), ++ .drcmr = &DRCMRTXSS3DR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_mono_in = { ++ .name = "SSP3 PCM Mono in", ++ .dev_addr = __PREG(SSDR_P3), ++ .drcmr = &DRCMRRXSS3DR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH2, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_out = { ++ .name = "SSP3 PCM Stereo out", ++ .dev_addr = __PREG(SSDR_P3), ++ .drcmr = &DRCMRTXSS3DR, ++ .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params pxa2xx_ssp3_pcm_stereo_in = { ++ .name = "SSP3 PCM Stereo in", ++ .dev_addr = __PREG(SSDR_P3), ++ .drcmr = &DRCMRRXSS3DR, ++ .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | ++ DCMD_BURST16 | DCMD_WIDTH4, ++}; ++ ++static struct pxa2xx_pcm_dma_params *ssp_dma_params[3][4] = { ++ {&pxa2xx_ssp1_pcm_mono_out, &pxa2xx_ssp1_pcm_mono_in, ++ &pxa2xx_ssp1_pcm_stereo_out,&pxa2xx_ssp1_pcm_stereo_in,}, ++ {&pxa2xx_ssp2_pcm_mono_out, &pxa2xx_ssp2_pcm_mono_in, ++ &pxa2xx_ssp2_pcm_stereo_out, &pxa2xx_ssp2_pcm_stereo_in,}, ++ {&pxa2xx_ssp3_pcm_mono_out, &pxa2xx_ssp3_pcm_mono_in, ++ &pxa2xx_ssp3_pcm_stereo_out,&pxa2xx_ssp3_pcm_stereo_in,}, ++}; ++ ++static int pxa2xx_ssp_startup(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; ++ int ret = 0; ++ ++ if (!rtd->dai->cpu_dai->active) { ++ ret = ssp_init (&ssp[cpu_dai->id], cpu_dai->id + 1, ++ SSP_NO_IRQ); ++ if (ret < 0) ++ return ret; ++ ssp_disable(&ssp[cpu_dai->id]); ++ } ++ return ret; ++} ++ ++static void pxa2xx_ssp_shutdown(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; ++ ++ if (!cpu_dai->active) { ++ ssp_disable(&ssp[cpu_dai->id]); ++ ssp_exit(&ssp[cpu_dai->id]); ++ } ++} ++ ++#if defined (CONFIG_PXA27x) ++static int cken[3] = {CKEN23_SSP1, CKEN3_SSP2, CKEN4_SSP3}; ++#else ++static int cken[3] = {CKEN3_SSP, CKEN9_NSSP, CKEN10_ASSP}; ++#endif ++ ++#ifdef CONFIG_PM ++ ++static int pxa2xx_ssp_suspend(struct platform_device *pdev, ++ struct snd_soc_cpu_dai *dai) ++{ ++ if (!dai->active) ++ return 0; ++ ++ ssp_save_state(&ssp[dai->id], &ssp_state[dai->id]); ++ pxa_set_cken(cken[dai->id], 0); ++ return 0; ++} ++ ++static int pxa2xx_ssp_resume(struct platform_device *pdev, ++ struct snd_soc_cpu_dai *dai) ++{ ++ if (!dai->active) ++ return 0; ++ ++ pxa_set_cken(cken[dai->id], 1); ++ ssp_restore_state(&ssp[dai->id], &ssp_state[dai->id]); ++ ssp_enable(&ssp[dai->id]); ++ ++ return 0; ++} ++ ++#else ++#define pxa2xx_ssp_suspend NULL ++#define pxa2xx_ssp_resume NULL ++#endif ++ ++/* ++ * Set the SSP ports SYSCLK. ++ */ ++static int pxa2xx_ssp_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai, ++ int clk_id, unsigned int freq, int dir) ++{ ++ int port = cpu_dai->id + 1; ++ u32 sscr0 = SSCR0_P(port) & ++ ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); ++ ++ switch (clk_id) { ++ case PXA2XX_SSP_CLK_PLL: ++ /* Internal PLL is fixed on pxa25x and pxa27x */ ++#ifdef CONFIG_PXA27x ++ ssp_clk[cpu_dai->id].sysclk = 13000000; ++#else ++ ssp_clk[cpu_dai->id].sysclk = 1843200; ++#endif ++ break; ++ case PXA2XX_SSP_CLK_EXT: ++ ssp_clk[cpu_dai->id].sysclk = freq; ++ sscr0 |= SSCR0_ECS; ++ break; ++ case PXA2XX_SSP_CLK_NET: ++ ssp_clk[cpu_dai->id].sysclk = freq; ++ sscr0 |= SSCR0_NCS | SSCR0_MOD; ++ break; ++ case PXA2XX_SSP_CLK_AUDIO: ++ ssp_clk[cpu_dai->id].sysclk = 0; ++ SSCR0_P(port) |= SSCR0_SerClkDiv(1); ++ sscr0 |= SSCR0_ACS; ++ break; ++ default: ++ return -ENODEV; ++ } ++ ++ /* the SSP CKEN clock must be disabled when changing SSP clock mode */ ++ pxa_set_cken(cken[cpu_dai->id], 0); ++ SSCR0_P(port) |= sscr0; ++ pxa_set_cken(cken[cpu_dai->id], 1); ++ return 0; ++} ++ ++/* ++ * Set the SSP clock dividers. ++ */ ++static int pxa2xx_ssp_set_dai_clkdiv(struct snd_soc_cpu_dai *cpu_dai, ++ int div_id, int div) ++{ ++ int port = cpu_dai->id + 1; ++ ++ switch (div_id) { ++ case PXA2XX_SSP_AUDIO_DIV_ACDS: ++ SSACD_P(port) &= ~ 0x7; ++ SSACD_P(port) |= SSACD_ACDS(div); ++ break; ++ case PXA2XX_SSP_AUDIO_DIV_SCDB: ++ SSACD_P(port) &= ~0x8; ++ if (div == PXA2XX_SSP_CLK_SCDB_1) ++ SSACD_P(port) |= SSACD_SCDB; ++ break; ++ case PXA2XX_SSP_DIV_SCR: ++ SSCR0_P(port) &= ~SSCR0_SCR; ++ SSCR0_P(port) |= SSCR0_SerClkDiv(div); ++ break; ++ default: ++ return -ENODEV; ++ } ++ ++ return 0; ++} ++ ++/* ++ * Configure the PLL frequency pxa27x and (afaik - pxa320 only) ++ */ ++static int pxa2xx_ssp_set_dai_pll(struct snd_soc_cpu_dai *cpu_dai, ++ int pll_id, unsigned int freq_in, unsigned int freq_out) ++{ ++ int port = cpu_dai->id + 1; ++ ++ SSACD_P(port) &= ~0x70; ++ switch (freq_out) { ++ case 5622000: ++ break; ++ case 11345000: ++ SSACD_P(port) |= (0x1 << 4); ++ break; ++ case 12235000: ++ SSACD_P(port) |= (0x2 << 4); ++ break; ++ case 14857000: ++ SSACD_P(port) |= (0x3 << 4); ++ break; ++ case 32842000: ++ SSACD_P(port) |= (0x4 << 4); ++ break; ++ case 48000000: ++ SSACD_P(port) |= (0x5 << 4); ++ break; ++ } ++ return 0; ++} ++ ++/* ++ * Set the active slots in TDM/Network mode ++ */ ++static int pxa2xx_ssp_set_dai_tdm_slot(struct snd_soc_cpu_dai *cpu_dai, ++ unsigned int mask, int slots) ++{ ++ int port = cpu_dai->id + 1; ++ ++ SSCR0_P(port) &= ~SSCR0_SlotsPerFrm(7); ++ ++ /* set number of active slots */ ++ SSCR0_P(port) |= SSCR0_SlotsPerFrm(slots); ++ ++ /* set active slot mask */ ++ SSTSA_P(port) = mask; ++ SSRSA_P(port) = mask; ++ return 0; ++} ++ ++/* ++ * Tristate the SSP DAI lines ++ */ ++static int pxa2xx_ssp_set_dai_tristate(struct snd_soc_cpu_dai *cpu_dai, ++ int tristate) ++{ ++ int port = cpu_dai->id + 1; ++ ++ if (tristate) ++ SSCR1_P(port) &= ~SSCR1_TTE; ++ else ++ SSCR1_P(port) |= SSCR1_TTE; ++ ++ return 0; ++} ++ ++/* ++ * Set up the SSP DAI format. ++ * The SSP Port must be inactive before calling this function as the ++ * physical interface format is changed. ++ */ ++static int pxa2xx_ssp_set_dai_fmt(struct snd_soc_cpu_dai *cpu_dai, ++ unsigned int fmt) ++{ ++ int port = cpu_dai->id + 1; ++ ++ /* reset port settings */ ++ SSCR0_P(port) = 0; ++ SSCR1_P(port) = 0; ++ SSPSP_P(port) = 0; ++ ++ /* NOTE: I2S emulation is still very much work in progress here */ ++ ++ /* FIXME: this is what wince uses for msb */ ++ if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB) { ++ SSCR0_P(port) = SSCR0_EDSS | SSCR0_TISSP | SSCR0_DataSize(16); ++ ++// SSCR1_P(port) = SSCR1_RxTresh(8) | SSCR1_TxTresh(8); /* doesn't seem to be needed */ ++ return 0; ++ } ++ ++ /* check for I2S emulation mode - handle it separately */ ++ if (((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) || ++ ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB)) { ++ /* 8.4.11 */ ++ ++ /* Only SSCR0[NCS] or SSCR0[ECS] bit fields settings are optional */ ++ SSCR0_P(port) = SSCR0_EDSS | SSCR0_PSP | SSCR0_DataSize(16); ++ ++ /* SSCR1 = 0x203C3C03 */ ++ /* SSCR1[SCLKDIR] and SSCR1[SFRMDIR] must be cleared (master only ???), ++ * all other bit fields settings are optional. */ ++ //SSCR1_P(port) &= ~(SSCR1_SCLKDIR | SSCR1_SFRMDIR); ++ ++ /* set FIFO thresholds */ ++ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1); ++ ++ /* normal: */ ++ /* all bit fields must be cleared except: FSRT = 1 and ++ * SFRMWDTH = 16, DMYSTART=0,1) */ ++ SSPSP_P(port) = SSPSP_FSRT | SSPSP_SFRMWDTH(16) | SSPSP_DMYSTRT(0); ++ return 0; ++ } ++ ++ SSCR0_P(port) |= SSCR0_PSP; ++ SSCR1_P(port) = SSCR1_RxTresh(14) | SSCR1_TxTresh(1) | ++ SSCR1_TRAIL | SSCR1_RWOT; ++ ++ switch(fmt & SND_SOC_DAIFMT_MASTER_MASK) { ++ case SND_SOC_DAIFMT_CBM_CFM: ++ SSCR1_P(port) |= (SSCR1_SCLKDIR | SSCR1_SFRMDIR); ++ break; ++ case SND_SOC_DAIFMT_CBM_CFS: ++ SSCR1_P(port) |= SSCR1_SCLKDIR; ++ break; ++ case SND_SOC_DAIFMT_CBS_CFM: ++ SSCR1_P(port) |= SSCR1_SFRMDIR; ++ break; ++ case SND_SOC_DAIFMT_CBS_CFS: ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { ++ case SND_SOC_DAIFMT_NB_NF: ++ SSPSP_P(port) |= SSPSP_SFRMP | SSPSP_FSRT; ++ break; ++ case SND_SOC_DAIFMT_IB_IF: ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { ++ case SND_SOC_DAIFMT_DSP_A: ++ SSPSP_P(port) |= SSPSP_DMYSTRT(1); ++ case SND_SOC_DAIFMT_DSP_B: ++ SSPSP_P(port) |= SSPSP_SCMODE(2); ++ break; ++ case SND_SOC_DAIFMT_I2S: ++ case SND_SOC_DAIFMT_MSB: ++ /* handled above */ ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++/* ++ * Set the SSP audio DMA parameters and sample size. ++ * Can be called multiple times by oss emulation. ++ */ ++static int pxa2xx_ssp_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; ++ int dma = 0, chn = params_channels(params); ++ int port = cpu_dai->id + 1; ++ ++ /* select correct DMA params */ ++ if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) ++ dma = 1; /* capture DMA offset is 1,3 */ ++ if (chn == 2) ++ dma += 2; /* stereo DMA offset is 2, mono is 0 */ ++ cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma]; ++ ++ /* we can only change the settings if the port is not in use */ ++ if (SSCR0_P(port) & SSCR0_SSE) ++ return 0; ++ ++ /* clear selected SSP bits */ ++ SSCR0_P(port) &= ~(SSCR0_DSS | SSCR0_EDSS); ++ ++ /* bit size */ ++ switch(params_format(params)) { ++ case SNDRV_PCM_FORMAT_S16_LE: ++ SSCR0_P(port) |= SSCR0_DataSize(16); ++ break; ++ case SNDRV_PCM_FORMAT_S24_LE: ++ SSCR0_P(port) |=(SSCR0_EDSS | SSCR0_DataSize(8)); ++ /* we must be in network mode (2 slots) for 24 bit stereo */ ++ break; ++ case SNDRV_PCM_FORMAT_S32_LE: ++ SSCR0_P(port) |= (SSCR0_EDSS | SSCR0_DataSize(16)); ++ /* we must be in network mode (2 slots) for 32 bit stereo */ ++ break; ++ } ++ ++#if PXA_SSP_DEBUG ++ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x SSACD %x\n", ++ SSCR0_P(port), SSCR1_P(port), ++ SSTO_P(port), SSPSP_P(port), ++ SSSR_P(port), SSACD_P(port)); ++#endif ++ return 0; ++} ++ ++static int pxa2xx_ssp_trigger(struct snd_pcm_substream *substream, int cmd) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai; ++ int ret = 0; ++ int port = cpu_dai->id + 1; ++ ++ switch (cmd) { ++ case SNDRV_PCM_TRIGGER_RESUME: ++ ssp_enable(&ssp[cpu_dai->id]); ++ break; ++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ SSCR1_P(port) |= SSCR1_TSRE; ++ else ++ SSCR1_P(port) |= SSCR1_RSRE; ++ SSSR_P(port) |= SSSR_P(port); ++ break; ++ case SNDRV_PCM_TRIGGER_START: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ SSCR1_P(port) |= SSCR1_TSRE; ++ else ++ SSCR1_P(port) |= SSCR1_RSRE; ++ ssp_enable(&ssp[cpu_dai->id]); ++ break; ++ case SNDRV_PCM_TRIGGER_STOP: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ SSCR1_P(port) &= ~SSCR1_TSRE; ++ else ++ SSCR1_P(port) &= ~SSCR1_RSRE; ++ break; ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ ssp_disable(&ssp[cpu_dai->id]); ++ break; ++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ SSCR1_P(port) &= ~SSCR1_TSRE; ++ else ++ SSCR1_P(port) &= ~SSCR1_RSRE; ++ break; ++ ++ default: ++ ret = -EINVAL; ++ } ++#if PXA_SSP_DEBUG ++ printk("trig cmd %d\n", cmd); ++ printk("SSCR0 %x SSCR1 %x SSTO %x SSPSP %x SSSR %x\n", ++ SSCR0_P(port), SSCR1_P(port), ++ SSTO_P(port), SSPSP_P(port), ++ SSSR_P(port)); ++#endif ++ return ret; ++} ++ ++#define PXA2XX_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ ++ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ ++ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) ++ ++#define PXA2XX_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ ++ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) ++ ++struct snd_soc_cpu_dai pxa_ssp_dai[] = { ++ { .name = "pxa2xx-ssp1", ++ .id = 0, ++ .type = SND_SOC_DAI_PCM, ++ .suspend = pxa2xx_ssp_suspend, ++ .resume = pxa2xx_ssp_resume, ++ .playback = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .capture = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .ops = { ++ .startup = pxa2xx_ssp_startup, ++ .shutdown = pxa2xx_ssp_shutdown, ++ .trigger = pxa2xx_ssp_trigger, ++ .hw_params = pxa2xx_ssp_hw_params,}, ++ .dai_ops = { ++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, ++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, ++ .set_pll = pxa2xx_ssp_set_dai_pll, ++ .set_fmt = pxa2xx_ssp_set_dai_fmt, ++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, ++ .set_tristate = pxa2xx_ssp_set_dai_tristate, ++ }, ++ }, ++ { .name = "pxa2xx-ssp2", ++ .id = 1, ++ .type = SND_SOC_DAI_PCM, ++ .suspend = pxa2xx_ssp_suspend, ++ .resume = pxa2xx_ssp_resume, ++ .playback = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .capture = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .ops = { ++ .startup = pxa2xx_ssp_startup, ++ .shutdown = pxa2xx_ssp_shutdown, ++ .trigger = pxa2xx_ssp_trigger, ++ .hw_params = pxa2xx_ssp_hw_params,}, ++ .dai_ops = { ++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, ++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, ++ .set_pll = pxa2xx_ssp_set_dai_pll, ++ .set_fmt = pxa2xx_ssp_set_dai_fmt, ++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, ++ .set_tristate = pxa2xx_ssp_set_dai_tristate, ++ }, ++ }, ++ { .name = "pxa2xx-ssp3", ++ .id = 2, ++ .type = SND_SOC_DAI_PCM, ++ .suspend = pxa2xx_ssp_suspend, ++ .resume = pxa2xx_ssp_resume, ++ .playback = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .capture = { ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = PXA2XX_SSP_RATES, ++ .formats = PXA2XX_SSP_FORMATS,}, ++ .ops = { ++ .startup = pxa2xx_ssp_startup, ++ .shutdown = pxa2xx_ssp_shutdown, ++ .trigger = pxa2xx_ssp_trigger, ++ .hw_params = pxa2xx_ssp_hw_params,}, ++ .dai_ops = { ++ .set_sysclk = pxa2xx_ssp_set_dai_sysclk, ++ .set_clkdiv = pxa2xx_ssp_set_dai_clkdiv, ++ .set_pll = pxa2xx_ssp_set_dai_pll, ++ .set_fmt = pxa2xx_ssp_set_dai_fmt, ++ .set_tdm_slot = pxa2xx_ssp_set_dai_tdm_slot, ++ .set_tristate = pxa2xx_ssp_set_dai_tristate, ++ }, ++ }, ++}; ++EXPORT_SYMBOL_GPL(pxa_ssp_dai); ++ ++/* Module information */ ++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com"); ++MODULE_DESCRIPTION("pxa2xx SSP/PCM SoC Interface"); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/sound/soc/pxa/pxa2xx-ssp.h 2007-05-14 21:14:38.000000000 -0300 +@@ -0,0 +1,42 @@ ++/* ++ * linux/sound/arm/pxa2xx-ssp.h ++ * ++ * 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. ++ */ ++ ++#ifndef _PXA2XX_SSP_H ++#define _PXA2XX_SSP_H ++ ++/* pxa2xx DAI SSP ID's */ ++#define PXA2XX_DAI_SSP1 0 ++#define PXA2XX_DAI_SSP2 1 ++#define PXA2XX_DAI_SSP3 2 ++ ++/* SSP clock sources */ ++#define PXA2XX_SSP_CLK_PLL 0 ++#define PXA2XX_SSP_CLK_EXT 1 ++#define PXA2XX_SSP_CLK_NET 2 ++#define PXA2XX_SSP_CLK_AUDIO 3 ++ ++/* SSP audio dividers */ ++#define PXA2XX_SSP_AUDIO_DIV_ACDS 0 ++#define PXA2XX_SSP_AUDIO_DIV_SCDB 1 ++#define PXA2XX_SSP_DIV_SCR 2 ++ ++/* SSP ACDS audio dividers values */ ++#define PXA2XX_SSP_CLK_AUDIO_DIV_1 0 ++#define PXA2XX_SSP_CLK_AUDIO_DIV_2 1 ++#define PXA2XX_SSP_CLK_AUDIO_DIV_4 2 ++#define PXA2XX_SSP_CLK_AUDIO_DIV_8 3 ++#define PXA2XX_SSP_CLK_AUDIO_DIV_16 4 ++#define PXA2XX_SSP_CLK_AUDIO_DIV_32 5 ++ ++/* SSP divider bypass */ ++#define PXA2XX_SSP_CLK_SCDB_4 0 ++#define PXA2XX_SSP_CLK_SCDB_1 1 ++ ++extern struct snd_soc_cpu_dai pxa_ssp_dai[3]; ++ ++#endif +Index: linux-2.6.21/sound/soc/pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/sound/soc/pxa/Kconfig 2007-05-14 21:16:22.000000000 -0300 ++++ linux-2.6.21/sound/soc/pxa/Kconfig 2007-05-14 21:17:01.000000000 -0300 +@@ -20,6 +20,10 @@ + config SND_PXA2XX_SOC_I2S + tristate + ++config SND_PXA2XX_SOC_SSP ++ tristate ++ select PXA_SSP ++ + config SND_PXA2XX_SOC_CORGI + tristate "SoC Audio support for Sharp Zaurus SL-C7x0" + depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx +Index: linux-2.6.21/sound/soc/pxa/Makefile +=================================================================== +--- linux-2.6.21.orig/sound/soc/pxa/Makefile 2007-05-14 21:14:52.000000000 -0300 ++++ linux-2.6.21/sound/soc/pxa/Makefile 2007-05-14 21:16:10.000000000 -0300 +@@ -2,10 +2,12 @@ + snd-soc-pxa2xx-objs := pxa2xx-pcm.o + snd-soc-pxa2xx-ac97-objs := pxa2xx-ac97.o + snd-soc-pxa2xx-i2s-objs := pxa2xx-i2s.o ++snd-soc-pxa2xx-ssp-objs := pxa2xx-ssp.o + + obj-$(CONFIG_SND_PXA2XX_SOC) += snd-soc-pxa2xx.o + obj-$(CONFIG_SND_PXA2XX_SOC_AC97) += snd-soc-pxa2xx-ac97.o + obj-$(CONFIG_SND_PXA2XX_SOC_I2S) += snd-soc-pxa2xx-i2s.o ++obj-$(CONFIG_SND_PXA2XX_SOC_SSP) += snd-soc-pxa2xx-ssp.o + + # PXA Machine Support + snd-soc-corgi-objs := corgi.o diff --git a/packages/linux/linux-ezx-2.6.21/patches/defconfig-a1200 b/packages/linux/linux-ezx-2.6.21/patches/defconfig-a1200 new file mode 100755 index 0000000000..36021906b7 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/defconfig-a1200 @@ -0,0 +1,1103 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21.4 +# Wed Jun 13 17:26:12 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-ezxdev" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# 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 + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA_EZX=y +# CONFIG_PXA_EZX_E680 is not set +# CONFIG_PXA_EZX_A780 is not set +# CONFIG_PXA_EZX_E2 is not set +CONFIG_PXA_EZX_A1200=y +# CONFIG_PXA_EZX_E6 is not set +# CONFIG_EZX_BP is not set +CONFIG_EZX_PCAP=y +CONFIG_EZX_MCI_TF=y +# CONFIG_EZX_EMU is not set +CONFIG_PXA27x=y +CONFIG_PXA_SSP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set +CONFIG_IWMMXT=y +CONFIG_XSCALE_PMU=y + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP 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_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_PXA=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_TOUCHSCREEN_PCAP=y +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=8 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM 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_PXA=m +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_PXA2XX=m + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_EZX is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +# CONFIG_USB_GTCO is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET_MII is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_PXA=y + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# 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_CRAMFS=m +# 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_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=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE 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 is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/patches/defconfig-a780 b/packages/linux/linux-ezx-2.6.21/patches/defconfig-a780 new file mode 100755 index 0000000000..bd794af856 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/defconfig-a780 @@ -0,0 +1,1224 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21 +# Sat Jun 2 19:52:36 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-ezxdev" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# 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 + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA_EZX=y +# CONFIG_PXA_EZX_E680 is not set +CONFIG_PXA_EZX_A780=y +# CONFIG_PXA_EZX_E2 is not set +# CONFIG_PXA_EZX_A1200 is not set +# CONFIG_PXA_EZX_E6 is not set +CONFIG_EZX_BP=y +CONFIG_EZX_PCAP=y +CONFIG_EZX_MCI_TF=y +CONFIG_EZX_EMU=y +CONFIG_EZX_EMU_USB=y +# CONFIG_EZX_EMU_UART is not set +# CONFIG_EZX_EMU_NOTHING is not set +CONFIG_PXA27x=y +CONFIG_PXA_SSP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set +CONFIG_IWMMXT=y +CONFIG_XSCALE_PMU=y + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP 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_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIUSB is not set +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_BCSP is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_BLKDEVS is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC 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=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +CONFIG_MTD_MAP_BANK_WIDTH_2=y +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +# 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 is not set +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_OTP 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_OBSOLETE_CHIPS is not set +CONFIG_MTD_XIP=y + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x0 +CONFIG_MTD_PHYSMAP_LEN=0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=2 +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_SHARP_SL is not set +CONFIG_MTD_EZX=y +CONFIG_MTD_EZX_A780=y +# CONFIG_MTD_EZX_A780_ALTERNATE is not set +# CONFIG_MTD_EZX_E2 is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM 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 + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_PXA=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_TOUCHSCREEN_PCAP=y +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=8 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +CONFIG_TS0710_MUX=y +CONFIG_TS0710_MUX_USB=y + +# +# 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_PXA=m +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_PXA2XX=m + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_A780=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_EZX=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +# CONFIG_USB_GTCO is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET_MII is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_PXA=y + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# 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_JFFS2_FS is not set +CONFIG_CRAMFS=m +# 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_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=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE 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 is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/patches/defconfig-e2 b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e2 new file mode 100755 index 0000000000..be512457d9 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e2 @@ -0,0 +1,1092 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21.4 +# Wed Jun 13 17:29:50 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-ezxdev" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# 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 + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA_EZX=y +# CONFIG_PXA_EZX_E680 is not set +# CONFIG_PXA_EZX_A780 is not set +CONFIG_PXA_EZX_E2=y +# CONFIG_PXA_EZX_A1200 is not set +# CONFIG_PXA_EZX_E6 is not set +# CONFIG_EZX_BP is not set +CONFIG_EZX_PCAP=y +# CONFIG_EZX_EMU is not set +CONFIG_PXA27x=y +CONFIG_PXA_SSP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set +CONFIG_IWMMXT=y +CONFIG_XSCALE_PMU=y + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP 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_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_PXA=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=8 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM 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_PXA=m +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_PXA2XX=m + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_EZX is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +# CONFIG_USB_GTCO is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET_MII is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_PXA=y + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# 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_CRAMFS=m +# 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_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=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE 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 is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/patches/defconfig-e6 b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e6 new file mode 100755 index 0000000000..75ee2803d9 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e6 @@ -0,0 +1,1102 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21.4 +# Wed Jun 13 17:29:19 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-ezxdev" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# 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 + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA_EZX=y +# CONFIG_PXA_EZX_E680 is not set +# CONFIG_PXA_EZX_A780 is not set +# CONFIG_PXA_EZX_E2 is not set +# CONFIG_PXA_EZX_A1200 is not set +CONFIG_PXA_EZX_E6=y +# CONFIG_EZX_BP is not set +CONFIG_EZX_PCAP=y +# CONFIG_EZX_EMU is not set +CONFIG_PXA27x=y +CONFIG_PXA_SSP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set +CONFIG_IWMMXT=y +CONFIG_XSCALE_PMU=y + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP 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_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_PXA=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_TOUCHSCREEN_PCAP=y +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=8 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM 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_PXA=m +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_PXA2XX=m + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_EZX is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +# CONFIG_USB_GTCO is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET_MII is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_PXA=y + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# 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_CRAMFS=m +# 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_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=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE 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 is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/patches/defconfig-e680 b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e680 new file mode 100755 index 0000000000..d180351886 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/defconfig-e680 @@ -0,0 +1,1224 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.21 +# Sat Jun 2 18:29:02 2007 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="-ezxdev" +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# 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_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# 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 + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA_EZX=y +CONFIG_PXA_EZX_E680=y +# CONFIG_PXA_EZX_A780 is not set +# CONFIG_PXA_EZX_E2 is not set +# CONFIG_PXA_EZX_A1200 is not set +# CONFIG_PXA_EZX_E6 is not set +CONFIG_EZX_BP=y +CONFIG_EZX_PCAP=y +CONFIG_EZX_MCI_SD=y +CONFIG_EZX_EMU=y +CONFIG_EZX_EMU_USB=y +# CONFIG_EZX_EMU_UART is not set +# CONFIG_EZX_EMU_NOTHING is not set +CONFIG_PXA27x=y +CONFIG_PXA_SSP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set +CONFIG_IWMMXT=y +CONFIG_XSCALE_PMU=y + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_LEGACY is not set +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM_EMULATION=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP 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_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC 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_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIUSB is not set +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_BCSP is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_BLKDEVS is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC 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=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +CONFIG_MTD_MAP_BANK_WIDTH_2=y +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +# 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 is not set +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_OTP 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_OBSOLETE_CHIPS is not set +CONFIG_MTD_XIP=y + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x0 +CONFIG_MTD_PHYSMAP_LEN=0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=2 +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_SHARP_SL is not set +CONFIG_MTD_EZX=y +CONFIG_MTD_EZX_A780=y +# CONFIG_MTD_EZX_A780_ALTERNATE is not set +# CONFIG_MTD_EZX_E2 is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM 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 + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# 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=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=240 +CONFIG_INPUT_TSDEV_SCREEN_Y=320 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_PXA=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_TOUCHSCREEN_PCAP=y +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=8 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +CONFIG_TS0710_MUX=y +CONFIG_TS0710_MUX_USB=y + +# +# 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_PXA=m +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_PXA2XX=m + +# +# SPI Protocol Masters +# +# CONFIG_SPI_AT25 is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# LED devices +# +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_E680=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_EZX=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# HID Devices +# +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set +# CONFIG_USB_GTCO is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET_MII is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +CONFIG_USB_GADGET_PXA27X=y +CONFIG_USB_PXA27X=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +# CONFIG_USB_ETH_RNDIS is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +CONFIG_MMC_PXA=y + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +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_PROC_SYSCTL=y +CONFIG_SYSFS=y +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# 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_JFFS2_FS is not set +CONFIG_CRAMFS=m +# 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +# CONFIG_NFS_V4 is not set +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_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=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE 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 is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y diff --git a/packages/linux/linux-ezx-2.6.21/patches/dmesg-a780.log b/packages/linux/linux-ezx-2.6.21/patches/dmesg-a780.log new file mode 100755 index 0000000000..6b15077676 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/dmesg-a780.log @@ -0,0 +1,299 @@ +<5>Linux version 2.6.21-ezxdev (wyrm@vault) (gcc version 4.1.1) #222 PREEMPT Tue May 8 15:19:34 BRT 2007 +<4>CPU: XScale-PXA270 [69054117] revision 7 (ARMv5TE), cr=0000397f +<4>Machine: Motorola Ezx Platform +<4>Memory policy: ECC disabled, Data cache writeback +<7>On node 0 totalpages: 12288 +<7> DMA zone: 416 pages used for memmap +<7> DMA zone: 0 pages reserved +<7> DMA zone: 11872 pages, LIFO batch:1 +<7> Normal zone: 0 pages used for memmap +<6>Run Mode clock: 195.00MHz (*15) +<6>Turbo Mode clock: 292.50MHz (*1.5, active) +<6>Memory clock: 195.00MHz (/2) +<6>System bus clock: 195.00MHz +<4>CPU0: D VIVT undefined 5 cache +<4>CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets +<4>CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets +<4>Built 1 zonelists. Total pages: 11872 +<5>Kernel command line: console=tty1 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 ip=169.254.1.11:169.254.1.10:169.254.1.10:255.255.255.254:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000 +<4>PID hash table entries: 256 (order: 8, 1024 bytes) +<4>Console: colour dummy device 80x30 +<4>Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) +<4>Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) +<6>Memory: 32MB 16MB = 48MB total +<5>Memory: 46084KB available (2264K code, 217K data, 84K init) +<7>Calibrating delay loop... 291.63 BogoMIPS (lpj=1458176) +<4>Mount-cache hash table entries: 512 +<6>CPU: Testing write buffer coherency: ok +<6>NET: Registered protocol family 16 +<6>usbcore: registered new interface driver usbfs +<6>usbcore: registered new interface driver hub +<6>usbcore: registered new device driver usb +<6>Time: pxa_timer clocksource has been installed. +<6>NET: Registered protocol family 2 +<4>IP route cache hash table entries: 1024 (order: 0, 4096 bytes) +<4>TCP established hash table entries: 2048 (order: 2, 16384 bytes) +<4>TCP bind hash table entries: 2048 (order: 1, 8192 bytes) +<6>TCP: Hash tables configured (established 2048 bind 2048) +<6>TCP reno registered +<4>bp handshake entered! +<4>ezx-bp: handshake step 2 +<4>BP rdy irq +<4>bp handshake entered! +<5>ezx-bp: handshake passed +<4>ezx-pcap: ssp driver registered +<6>io scheduler noop registered +<6>io scheduler deadline registered (default) +<4>pxa2xx-fb pxa2xx-fb: machine LCCR0 setting contains illegal bits: 00200878 +<4>pxa2xx-fb pxa2xx-fb: machine LCCR3 setting contains illegal bits: 00300008 +<4>Console: switching to colour frame buffer device 60x53 +<6>usbcore: registered new interface driver usb ipc +<6>drivers/char/ts0710_mux_usb.c: USB Host(Bulverde) IPC driver registered. +<6>drivers/char/ts0710_mux_usb.c: 1.0alpha1:USB IPC Driver (TS07.10 lowlevel) +<6>pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART +<6>pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART +<6>pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART +<7>ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver +<6>pxa27x-ohci pxa27x-ohci: PXA27x OHCI +<6>pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1 +<6>pxa27x-ohci pxa27x-ohci: irq 3, io mem 0x4c000000 +<6>usb usb1: configuration #1 chosen from 1 choice +<6>hub 1-0:1.0: USB hub found +<6>hub 1-0:1.0: 3 ports detected +<6>pxa27x_udc: version 08-Feb-2007 +<5>USB cmd disconnect +<5>USB cmd disconnect +<4>ether gadget: using random self ethernet address +<4>ether gadget: using random host ethernet address +<6>usb0: Ethernet Gadget, version: May Day 2005 +<6>usb0: using pxa27x_udc, OUT Bulk-out-2 IN Bulk-in-1 +<6>usb0: MAC 46:86:e0:79:e7:fb +<5>USB cmd connect +<5>USB cmd connect +<6>input: gpio-keys as /class/input/input0 +<6>input: pxa-keyboard as /class/input/input1 +<6>input: pcap-touchscreen as /class/input/input2 +<6>sa1100-rtc sa1100-rtc: rtc core: registered sa1100-rtc as rtc0 +<6>Registered led device: a780:main +<6>Registered led device: a780:aux +<6>Registered led device: a780:vibrator +<6>TCP cubic registered +<6>NET: Registered protocol family 1 +<6>NET: Registered protocol family 17 +<6>XScale iWMMXt coprocessor detected. +<6>sa1100-rtc sa1100-rtc: setting the system clock to 1970-01-01 00:00:16 (16) +<6>mmcblk0: mmc0:bffc SU02G 1985024KiB +<6>udc: USB reset +<6> mmcblk0:<6>usb 1-3: new full speed USB device using pxa27x-ohci and address 2 +<4> p1 p2 p3 < p5 p6 p7 > +<6>udc: USB reset +<3>usb 1-3: device descriptor read/64, error -62 +<6>usb0: full speed config #1: 100 mA, Ethernet Gadget, using CDC Ethernet Subset +<3>usb 1-3: device descriptor read/64, error -62 +<6>usb 1-3: new full speed USB device using pxa27x-ohci and address 3 +<3>usb 1-3: device descriptor read/64, error -62 +<4>IP-Config: Complete: +<4> device=usb0, addr=169.254.1.11, mask=255.255.255.254, gw=169.254.1.10, +<4> host=ezx, domain=, nis-domain=(none), +<4> bootserver=169.254.1.10, rootserver=169.254.1.10, rootpath= +<6>kjournald starting. Commit interval 5 seconds +<4>EXT3-fs warning: maximal mount count reached, running e2fsck is recommended +<6>EXT3 FS on mmcblk0p2, internal journal +<6>EXT3-fs: recovery complete. +<6>EXT3-fs: mounted filesystem with ordered data mode. +<4>VFS: Mounted root (ext3 filesystem). +<6>Freeing init memory: 84K +<3>usb 1-3: device descriptor read/64, error -110 +<6>usb 1-3: new full speed USB device using pxa27x-ohci and address 4 +<3>usb 1-3: device descriptor read/8, error -62 +<4>usb 1-3: config 1 has an invalid interface number: 13 but max is 2 +<4>usb 1-3: config 1 has an invalid interface number: 6 but max is 2 +<4>usb 1-3: config 1 has an invalid interface number: 7 but max is 2 +<4>usb 1-3: config 1 has no interface number 0 +<4>usb 1-3: config 1 has no interface number 1 +<4>usb 1-3: config 1 has no interface number 2 +<6>usb 1-3: configuration #1 chosen from 1 choice +<4>usb_ipc_probe: completed probe! +<6>drivers/char/ts0710_mux_usb.c: usb_ipc_probe: Only two endpoints supported. +<4>usb ipc: probe of 1-3:1.6 failed with error -1 +<6>drivers/char/ts0710_mux_usb.c: usb_ipc_probe: Only two endpoints supported. +<4>usb ipc: probe of 1-3:1.7 failed with error -1 +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2009 bytes from ts0710_mux_usb inbuf. +<4>Read 21 bytes. +<4>Reading max 1988 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2009 bytes from ts0710_mux_usb inbuf. +<4>Read 21 bytes. +<4>Reading max 1988 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2009 bytes from ts0710_mux_usb inbuf. +<4>Read 21 bytes. +<4>Reading max 1988 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2009 bytes from ts0710_mux_usb inbuf. +<4>Read 21 bytes. +<4>Reading max 1988 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2009 bytes from ts0710_mux_usb inbuf. +<4>Read 21 bytes. +<4>Reading max 1988 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 11 bytes. +<4>Reading max 2037 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 17 bytes. +<4>Reading max 2031 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 11 bytes. +<4>Reading max 2037 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 7 bytes. +<4>Reading max 2041 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 11 bytes. +<4>Reading max 2037 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2016 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1984 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1952 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1920 bytes from ts0710_mux_usb inbuf. +<4>Read 6 bytes. +<4>Reading max 1914 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1882 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1850 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1818 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1786 bytes from ts0710_mux_usb inbuf. +<4>Read 6 bytes. +<4>Reading max 1780 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1748 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1716 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1684 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1652 bytes from ts0710_mux_usb inbuf. +<4>Read 6 bytes. +<4>Reading max 1646 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2016 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1984 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1952 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1920 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1888 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1856 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1824 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1792 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1760 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1728 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1696 bytes from ts0710_mux_usb inbuf. +<4>Read 16 bytes. +<4>Reading max 1680 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2016 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1984 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1952 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1920 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1888 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1856 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1824 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1792 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1760 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1728 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 1696 bytes from ts0710_mux_usb inbuf. +<4>Read 13 bytes. +<4>Reading max 1683 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 14 bytes. +<4>Reading max 2034 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>Read 32 bytes. +<4>Reading max 2016 bytes from ts0710_mux_usb inbuf. +<4>Read 2 bytes. +<4>Reading max 2014 bytes from ts0710_mux_usb inbuf. +<4>Reading max 2048 bytes from ts0710_mux_usb inbuf. +<4>nonzero read bulk status received: -104 diff --git a/packages/linux/linux-ezx-2.6.21/patches/e680-kbd.patch b/packages/linux/linux-ezx-2.6.21/patches/e680-kbd.patch new file mode 100755 index 0000000000..2a2d9c7a72 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/e680-kbd.patch @@ -0,0 +1,93 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-24 00:54:39.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-24 00:56:30.000000000 -0300 +@@ -15,18 +15,21 @@ + #include + #include + #include ++#include + + #include + #include + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" + + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); ++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *); + + #ifdef CONFIG_EZX_PCAP + extern int ezx_pcap_mmcsd_power(int); +@@ -144,6 +147,58 @@ + .pxafb_lcd_power = &ezx_lcd_power, + }; + ++static unsigned char e680_keycode[] = { ++ /* row 0 */ ++ KEY_UP, KEY_RIGHT, KEY_RESERVED, KEY_PHONE, ++ /* row 1 */ ++ KEY_DOWN, KEY_LEFT, KEY_VOLUMEUP, KEY_VOLUMEDOWN, ++ /* row 2 */ ++ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_KPENTER, ++}; ++ ++static unsigned char e680_direct_keycode[] = { ++ KEY_CAMERA, ++ KEY_RESERVED, ++ KEY_RESERVED, ++ KEY_HOME, ++ KEY_POWER, ++ KEY_MENU, ++}; ++ ++static int e680_kbd_init(void) ++{ ++ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, VR Key */ ++ pxa_gpio_mode(96 | GPIO_ALT_FN_1_IN); /* KP_DKIN<3>, GAME_A */ ++ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_DKIN<4>, power key */ ++ pxa_gpio_mode(98 | GPIO_ALT_FN_1_IN); /* KP_DKIN<5>, GAME_B */ ++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */ ++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */ ++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */ ++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */ ++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */ ++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */ ++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */ ++ pxa_gpio_mode(GPIO_TC_MM_EN); ++ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN); ++ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN); ++ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN); ++ return 0; ++} ++ ++static struct pxakbd_platform_data e680_kbd_platform_data = { ++ .init = &e680_kbd_init, ++ .scan_interval = HZ/40, ++ .matrix = { ++ .keycode = e680_keycode, ++ .cols = 4, ++ .rows = 3, ++ }, ++ .direct = { ++ .keycode = e680_direct_keycode, ++ .num = 6, ++ }, ++}; ++ + static struct platform_device *devices[] __initdata = { + }; + +@@ -162,6 +217,7 @@ + + set_pxa_fb_info(&e680_fb_info); + pxa_set_mci_info(&e680_mci_platform_data); ++ pxa_set_kbd_info(&e680_kbd_platform_data); + + /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ + pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); diff --git a/packages/linux/linux-ezx-2.6.21/patches/e680-leds.patch b/packages/linux/linux-ezx-2.6.21/patches/e680-leds.patch new file mode 100755 index 0000000000..82dc93b611 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/e680-leds.patch @@ -0,0 +1,369 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +Index: linux-2.6.21/drivers/leds/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/leds/Kconfig 2007-06-08 18:39:04.000000000 +0200 ++++ linux-2.6.21/drivers/leds/Kconfig 2007-06-08 18:39:12.000000000 +0200 +@@ -111,6 +111,13 @@ + This option enables support for the LEDs on the + Motorola A780 GSM Phone. + ++config LEDS_E680 ++ tristate "LED Support for the Motorola E680(i) GSM Phone" ++ depends LEDS_CLASS && PXA_EZX_E680 ++ help ++ This options enables support for the LEDs on the ++ Motorola E680(i) GSM Phone. ++ + config LEDS_TRIGGER_TIMER + tristate "LED Timer Trigger" + depends on LEDS_TRIGGERS +Index: linux-2.6.21/drivers/leds/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/leds/Makefile 2007-06-08 18:39:04.000000000 +0200 ++++ linux-2.6.21/drivers/leds/Makefile 2007-06-08 18:39:12.000000000 +0200 +@@ -17,6 +17,7 @@ + obj-$(CONFIG_LEDS_H1940) += leds-h1940.o + obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o + obj-$(CONFIG_LEDS_A780) += leds-a780.o ++obj-$(CONFIG_LEDS_E680) += leds-e680.o + + # LED Triggers + obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o +Index: linux-2.6.21/drivers/leds/leds-e680.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/leds/leds-e680.c 2007-06-08 18:39:12.000000000 +0200 +@@ -0,0 +1,309 @@ ++/* ++ * EZX Platform LED Driver for the Motorola E680(i) GSM Phone ++ * ++ * Copyright 2006 Vanille-Media ++ * ++ * Author: Michael Lauer ++ * ++ * Based on the Motorola 2.4 leds-e680.c and leds-corgi.c by Richard Purdie ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++//FIXME move defines to a common header file ++#define IND_CNTL_R_BUL 46 ++#define IND_CNTL_G_BUL 47 ++#define SSP_PCAP_LED_MASK 0x000fffe0 ++#define SSP_PCAP_LED_SHIFT 5 ++#define GPIO_TC_MM_EN 99 ++ ++extern int ezx_pcap_read(u_int8_t, u_int32_t *); ++extern int ezx_pcap_write(u_int8_t, u_int32_t); ++ ++static enum led_brightness old_red; ++static enum led_brightness old_green; ++static enum led_brightness old_blue; ++ ++typedef struct { ++ unsigned char ind_GPIO_red; /*Indicator Red control GPIO 46: 0 active, 1 disactive*/ ++ unsigned char ind_GPIO_green; /*Indicator Green control GPIO 47: 0 active, 1 disactive*/ ++ unsigned char pcap_LEDR_en; /*pcap LEDR_EN bit value: 1 =Red LED(&Green) sink circuit enabled*/ ++ unsigned char pcap_LEDG_en; /*pcap LEDG_EN bit value:1 =Green(->Blue)LED sink circuit enabled*/ ++ unsigned char pcap_LEDR_CTRL; /* 4bits Sets the timing for the red(&Green) LED sink circuit*/ ++ unsigned char pcap_LEDG_CTRL; /* 4bits Sets the timing for the GREEN (->Blue) LED sink circuit*/ ++ unsigned char pcap_LEDR_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDR*/ ++ unsigned char pcap_LEDG_I; /* 2 bits 00 3mA,01 4mA, 10 5mA, 11 9mA, sets the pulsed current level for LEDG*/ ++ unsigned char pcap_SKIP_on; /*1=The ON timing sequence defined by LEDx_CTRL is executed on every other cycle*/ ++} PCAP2_LED_REGISTER_VALUE; ++ ++const PCAP2_LED_REGISTER_VALUE led_register_value[]= ++{ ++ /* on/off pulsepower timing intensity */ ++ {0x1,0x1, 0x0,0x0, 0x0,0x0, 0x0,0x0,0x0}, /* OFF */ ++ {0x0,0x1, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* RED */ ++ {0x1,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* GREEN */ ++ {0x0,0x0, 0x1,0x0, 0xc,0x0, 0x1,0x0,0x0}, /* ORANGE = RED + GREEN */ ++ {0x1,0x1, 0x0,0x1, 0x0,0xc, 0x0,0x0,0x0}, /* BLUE */ ++ {0x0,0x1, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_RED = RED + BLUE */ ++ {0x1,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* LIGHT_GREEN = GREEN + BLUE */ ++ {0x0,0x0, 0x1,0x1, 0xc,0xc, 0x1,0x0,0x0}, /* WHITE = RED + GREEN + BLUE */ ++}; ++ ++static void e680led_led_set( enum led_brightness red, enum led_brightness green, enum led_brightness blue ) ++{ ++ unsigned int tempValue = 0; ++ unsigned int value = 0; ++ unsigned int stateIndex = 0; ++ unsigned char gpio_red, gpio_green, ledr_en, ledg_en, ledr_ctrl, ledg_ctrl, ledr_i, ledg_i,skip; ++ ++ printk( KERN_DEBUG "e680led_led_set: red=%d, green=%d, blue=%d", red, green, blue ); ++ stateIndex = ( ( blue << 2 ) | ( green << 1 ) | ( red ) ) & 0x7; ++ printk( KERN_DEBUG "LED stateIndex is %d", stateIndex ); ++ gpio_red = led_register_value[stateIndex].ind_GPIO_red & 0x1; ++ gpio_green = led_register_value[stateIndex].ind_GPIO_green & 0x1; ++ ledr_en = led_register_value[stateIndex].pcap_LEDR_en & 0x1; ++ ledg_en = led_register_value[stateIndex].pcap_LEDG_en & 0x1; ++ ledr_ctrl = led_register_value[stateIndex].pcap_LEDR_CTRL & 0xf; ++ ledg_ctrl = led_register_value[stateIndex].pcap_LEDG_CTRL & 0xf; ++ ledr_i = led_register_value[stateIndex].pcap_LEDR_I & 0x3; ++ ledg_i = led_register_value[stateIndex].pcap_LEDG_I & 0x3; ++ skip = led_register_value[stateIndex].pcap_SKIP_on & 0x1; ++ ++ /* disable LEDs */ ++ if( ezx_pcap_read(SSP_PCAP_ADJ_PERIPH_REGISTER,&tempValue) != SSP_PCAP_SUCCESS ) ++ { ++ printk( KERN_WARNING "LED PCAP Read Failed\n" ); ++ return; ++ } ++ tempValue &= (~SSP_PCAP_LED_MASK); ++ if( ezx_pcap_write(SSP_PCAP_ADJ_PERIPH_REGISTER,tempValue) != SSP_PCAP_SUCCESS ) ++ { ++ printk( KERN_WARNING "LED PCAP Write Failed (Clear Data)\n" ); ++ return; ++ } ++ ++ /* configure GPIOs as output */ ++ pxa_gpio_mode(IND_CNTL_R_BUL | GPIO_OUT); ++ pxa_gpio_mode(IND_CNTL_G_BUL | GPIO_OUT); ++ ++ //FIXME: Simplify this logic ++ if ( (gpio_green && gpio_red) ) ++ { ++ /*Disable Red & Green signal*/ ++ pxa_gpio_set_value(IND_CNTL_R_BUL, 1); /*IND_CNTL_R_BUL Low active*/ ++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL); ++ ++ pxa_gpio_set_value(IND_CNTL_G_BUL, 0); /*IND_CNTL_G_BUL High active*/ ++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL)); ++ ++ printk( KERN_DEBUG "LED GPIO Green & Red Disable\n"); ++ } else if ( gpio_green && !gpio_red ) ++ { ++ /*Green Disable, Red Enable*/ ++ pxa_gpio_set_value(IND_CNTL_R_BUL, 0); ++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL)); ++ ++ pxa_gpio_set_value(IND_CNTL_G_BUL, 0); ++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) & (~GPIO_bit(IND_CNTL_G_BUL)); ++ ++ printk( KERN_DEBUG "LED GPIO Green Disable, Red Enable\n"); ++ } else if (gpio_red && !gpio_green ) ++ { ++ /*Red Disable, Green Enable*/ ++ pxa_gpio_set_value(IND_CNTL_R_BUL, 1); ++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) | GPIO_bit(IND_CNTL_R_BUL); ++ ++ pxa_gpio_set_value(IND_CNTL_G_BUL, 1); ++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL); ++ printk( KERN_DEBUG "LED GPIO Red Disable, Green Enable"); ++ }else ++ { ++ /*Red & Green enable*/ ++ pxa_gpio_set_value(IND_CNTL_R_BUL, 0); ++ PGSR(IND_CNTL_R_BUL) = PGSR(IND_CNTL_R_BUL) & (~GPIO_bit(IND_CNTL_R_BUL)); ++ ++ pxa_gpio_set_value(IND_CNTL_G_BUL, 1); ++ PGSR(IND_CNTL_G_BUL) = PGSR(IND_CNTL_G_BUL) | GPIO_bit(IND_CNTL_G_BUL); ++ printk( KERN_DEBUG "LED GPIO Red & Green Enable\n"); ++ } ++ ++ /* Write PCAP LED Peripheral Control Register*/ ++ value = ( ledr_en | (ledg_en <<1) | (ledr_ctrl <<2) | (ledg_ctrl <<6) | ++ (ledr_i << 10) | (ledg_i <<12) | (skip <<14) ) & 0x7fff; ++ tempValue |= (value <dev, &e680_red_led); ++ if (ret < 0) ++ return ret; ++ ++ ret = led_classdev_register(&pdev->dev, &e680_green_led); ++ if (ret < 0) ++ led_classdev_unregister(&e680_red_led); ++ ++ ret = led_classdev_register(&pdev->dev, &e680_blue_led); ++ if (ret < 0) { ++ led_classdev_unregister(&e680_red_led); ++ led_classdev_unregister(&e680_green_led); ++ } ++ ++ ret = led_classdev_register(&pdev->dev, &e680_keypad_led); ++ if (ret < 0) { ++ led_classdev_unregister(&e680_red_led); ++ led_classdev_unregister(&e680_green_led); ++ led_classdev_unregister(&e680_blue_led); ++ } ++ return ret; ++} ++ ++static int e680led_remove(struct platform_device *pdev) ++{ ++ led_classdev_unregister(&e680_red_led); ++ led_classdev_unregister(&e680_green_led); ++ led_classdev_unregister(&e680_blue_led); ++ led_classdev_unregister(&e680_keypad_led); ++ return 0; ++} ++ ++static struct platform_driver e680led_driver = { ++ .probe = e680led_probe, ++ .remove = e680led_remove, ++#ifdef CONFIG_PM ++ .suspend = e680led_suspend, ++ .resume = e680led_resume, ++#endif ++ .driver = { ++ .name = "e680-led", ++ }, ++}; ++ ++static int __init e680led_init(void) ++{ ++ return platform_driver_register(&e680led_driver); ++} ++ ++static void __exit e680led_exit(void) ++{ ++ e680led_led_set( 0, 0, 0 ); ++ platform_driver_unregister(&e680led_driver); ++} ++ ++module_init(e680led_init); ++module_exit(e680led_exit); ++ ++MODULE_AUTHOR("Michael Lauer "); ++MODULE_DESCRIPTION("Motorola E680 LED driver"); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-06-08 18:38:59.000000000 +0200 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-06-08 18:39:12.000000000 +0200 +@@ -242,9 +242,15 @@ + }, + }; + ++static struct platform_device e680led_device = { ++ .name = "e680-led", ++ .id = -1, ++}; ++ + static struct platform_device *devices[] __initdata = { + &pcap_ts_device, + &e680locksw_device, ++ &e680led_device, + }; + + static void __init e680_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/e680-locksw.patch b/packages/linux/linux-ezx-2.6.21/patches/e680-locksw.patch new file mode 100755 index 0000000000..36b52a916a --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/e680-locksw.patch @@ -0,0 +1,43 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-06-08 18:38:48.000000000 +0200 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-06-08 18:38:59.000000000 +0200 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -220,8 +221,30 @@ + }, + }; + ++static struct gpio_keys_button e680locksw_buttons[] = { ++ [0] = { ++ .keycode = KEY_SLEEP, ++ .gpio = GPIO_LOCK_SCREEN_PIN, ++ .desc = "E680 lockscreen sw", ++ }, ++}; ++ ++static struct gpio_keys_platform_data e680locksw_platform_data = { ++ .buttons = e680locksw_buttons, ++ .nbuttons = 1, ++}; ++ ++static struct platform_device e680locksw_device = { ++ .name = "gpio-keys", ++ .id = -1, ++ .dev = { ++ .platform_data = &e680locksw_platform_data, ++ }, ++}; ++ + static struct platform_device *devices[] __initdata = { + &pcap_ts_device, ++ &e680locksw_device, + }; + + static void __init e680_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/e680-mci.patch b/packages/linux/linux-ezx-2.6.21/patches/e680-mci.patch new file mode 100755 index 0000000000..b5bb2931f1 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/e680-mci.patch @@ -0,0 +1,139 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-05-24 00:43:08.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-05-24 00:48:20.000000000 -0300 +@@ -13,11 +13,14 @@ + #include + #include + #include ++#include ++#include + + #include + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" +@@ -25,6 +28,99 @@ + extern void ezx_lcd_power(int, struct fb_var_screeninfo *); + extern void ezx_backlight_power(int); + ++#ifdef CONFIG_EZX_PCAP ++extern int ezx_pcap_mmcsd_power(int); ++extern void ezx_pcap_mmcsd_voltage(u_int32_t); ++#else ++#define ezx_pcap_mmcsd_voltage(x) {} ++#define ezx_pcap_mmcsd_power(x) {} ++#endif ++ ++static struct pxamci_platform_data e680_mci_platform_data; ++ ++static u_int8_t mmc_voltage[] = { ++ [MMC_VDD_160] = 3, ++ [MMC_VDD_170] = 3, ++ [MMC_VDD_180] = 3, ++ [MMC_VDD_190] = 3, ++ [MMC_VDD_200] = 3, ++ [MMC_VDD_210] = 3, ++ [MMC_VDD_220] = 3, ++ [MMC_VDD_230] = 3, ++ [MMC_VDD_240] = 3, ++ [MMC_VDD_250] = 3, ++ [MMC_VDD_260] = 3, ++ [MMC_VDD_270] = 3, ++ [MMC_VDD_280] = 3, ++ [MMC_VDD_290] = 3, ++ [MMC_VDD_300] = 3, ++ [MMC_VDD_310] = 3, ++ [MMC_VDD_320] = 3, ++ [MMC_VDD_330] = 3, ++ [MMC_VDD_340] = 3, ++ [MMC_VDD_350] = 3, ++ [MMC_VDD_360] = 3, ++}; ++ ++static int e680_mci_init(struct device *dev, ++ irqreturn_t (*ezx_detect_int)(int, void *), ++ void *data) ++{ ++ int err; ++ ++ /* Setup GPIO for PXA27x MMC/SD controller */ ++ pxa_gpio_mode(GPIO32_MMCCLK_MD); ++ pxa_gpio_mode(GPIO112_MMCCMD_MD); ++ pxa_gpio_mode(GPIO92_MMCDAT0_MD); ++ pxa_gpio_mode(GPIO109_MMCDAT1_MD); ++ pxa_gpio_mode(GPIO110_MMCDAT2_MD); ++ pxa_gpio_mode(GPIO111_MMCDAT3_MD); ++ ++ ezx_pcap_mmcsd_power(1); ++ ++ e680_mci_platform_data.detect_delay = msecs_to_jiffies(250); ++ ++ err = request_irq(0x49, ezx_detect_int, SA_INTERRUPT, ++ "MMC card detect", data); ++ if (err) { ++ printk(KERN_ERR "ezx_mci_detect: MMC/SD: can't request " ++ "MMC card detect IRQ\n"); ++ return -1; ++ } ++ ++ set_irq_type(0x0b, IRQT_BOTHEDGE); ++ ++ return 0; ++} ++ ++ ++static inline int e680_mci_get_ro(struct device *dev) ++{ ++ return (GPLR3 & 0x800); ++} ++ ++static void e680_mci_setpower(struct device *dev, unsigned int vdd) ++{ ++ if (vdd <= MMC_VDD_360) ++ ezx_pcap_mmcsd_voltage(mmc_voltage[vdd]); ++ ++ ezx_pcap_mmcsd_power(1); ++} ++ ++static void e680_mci_exit(struct device *dev, void *data) ++{ ++ ezx_pcap_mmcsd_power(0); ++ free_irq(0x49, data); ++} ++ ++static struct pxamci_platform_data e680_mci_platform_data = { ++ .ocr_mask = MMC_VDD_27_28, ++ .init = e680_mci_init, ++ .get_ro = e680_mci_get_ro, ++ .setpower = e680_mci_setpower, ++ .exit = e680_mci_exit, ++}; ++ + static struct pxafb_mode_info mode_e680 = { + .pixclock = 150000, + .xres = 240, +@@ -65,6 +161,7 @@ + PSLR = 0x05800f00; + + set_pxa_fb_info(&e680_fb_info); ++ pxa_set_mci_info(&e680_mci_platform_data); + + /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ + pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-05-24 00:48:28.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-05-24 00:48:55.000000000 -0300 +@@ -83,6 +83,7 @@ + config PXA_EZX_E680 + bool "Motorola E680 GSM Phone" + select PXA27x ++ select EZX_MCI_SD + + config PXA_EZX_A780 + bool "Motorola A780 GSM Phone" diff --git a/packages/linux/linux-ezx-2.6.21/patches/e680-ts.patch b/packages/linux/linux-ezx-2.6.21/patches/e680-ts.patch new file mode 100755 index 0000000000..52f9ce34b5 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/e680-ts.patch @@ -0,0 +1,40 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c 2007-06-02 20:32:49.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-06-02 20:33:26.000000000 -0300 +@@ -124,6 +124,27 @@ + .exit = e680_mci_exit, + }; + ++/* PCAP_TS */ ++struct resource pcap_ts_resources[] = { ++ [0] = { ++ .start = EZX_IRQ_ADCDONE2, ++ .end = EZX_IRQ_ADCDONE2, ++ .flags = IORESOURCE_IRQ, ++ }, ++ [1] = { ++ .start = EZX_IRQ_TS, ++ .end = EZX_IRQ_TS, ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++struct platform_device pcap_ts_device = { ++ .name = "pcap-ts", ++ .id = -1, ++ .num_resources = ARRAY_SIZE(pcap_ts_resources), ++ .resource = pcap_ts_resources, ++}; ++ + static struct pxafb_mode_info mode_e680 = { + .pixclock = 150000, + .xres = 240, +@@ -200,6 +221,7 @@ + }; + + static struct platform_device *devices[] __initdata = { ++ &pcap_ts_device, + }; + + static void __init e680_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-backlight.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-backlight.patch new file mode 100755 index 0000000000..7054ef549b --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-backlight.patch @@ -0,0 +1,203 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +Index: linux-2.6.21/drivers/video/backlight/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/video/backlight/Kconfig 2007-06-02 20:03:06.000000000 -0300 ++++ linux-2.6.21/drivers/video/backlight/Kconfig 2007-06-02 20:26:49.000000000 -0300 +@@ -63,3 +63,12 @@ + help + If you have a Frontpath ProGear say Y to enable the + backlight driver. ++ ++config BACKLIGHT_EZX ++ tristate "Motorola EXZ Backlight Driver (A780/E680/E680i)" ++ depends on BACKLIGHT_CLASS_DEVICE && PXA_EZX ++ default y ++ help ++ If you have a Motorola A780 or E680(i), say y to enable the ++ backlight driver. ++ +Index: linux-2.6.21/drivers/video/backlight/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/video/backlight/Makefile 2007-06-02 20:03:06.000000000 -0300 ++++ linux-2.6.21/drivers/video/backlight/Makefile 2007-06-02 20:26:49.000000000 -0300 +@@ -6,3 +6,4 @@ + obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o + obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o + obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o ++obj-$(CONFIG_BACKLIGHT_EZX) += ezx_bl.o +Index: linux-2.6.21/drivers/video/backlight/ezx_bl.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/video/backlight/ezx_bl.c 2007-06-02 20:26:49.000000000 -0300 +@@ -0,0 +1,142 @@ ++/* ++ * Backlight Driver for Motorola A780 and E680(i) GSM Phones. ++ * ++ * Copyright 2006 Vanille Media ++ * ++ * Author: Michael Lauer ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#define EZX_MIN_INTENSITY 0 ++#define EZX_MAX_INTENSITY 50 ++#define EZX_DEFAULT_INTENSITY 30 ++ ++static struct backlight_device *ezx_backlight_device; ++static int last_intensity; ++static int suspended; ++ ++static int ezxbl_send_intensity(struct backlight_device *bd) ++{ ++ int intensity = bd->props.brightness; ++ ++ if (suspended || bd->props.power != FB_BLANK_UNBLANK || ++ bd->props.fb_blank != FB_BLANK_UNBLANK) ++ intensity = 0; ++ ++ if ( !last_intensity && intensity ) { ++ PWM_CTRL0 = 2; /* pre-scaler */ ++ PWM_PWDUTY0 = intensity; /* duty cycle */ ++ PWM_PERVAL0 = 49; /* period */ ++ pxa_gpio_mode(GPIO16_PWM0_MD); /* set GPIO16 as alternate function + output */ ++ pxa_set_cken(CKEN0_PWM0, 1); /* clock enable */ ++ } ++ else if ( last_intensity && !intensity ) { ++ PWM_PWDUTY0 = 0; ++ GAFR0_U &= 0xFFFFFFFC; /* ??? */ ++ pxa_set_cken(CKEN0_PWM0, 0); /* clock disable */ ++ pxa_gpio_mode(GPIO16_PWM0); /* set GPIO16 as input */ ++ } else if ( last_intensity && intensity ) { ++ PWM_PWDUTY0 = intensity; /* duty cycle */ ++ } ++ last_intensity = intensity; ++ return 0; ++} ++ ++static int ezxbl_get_intensity(struct backlight_device *bd) ++{ ++ return last_intensity; ++} ++ ++static int ezxbl_set_intensity(struct backlight_device *bd) ++{ ++ return ezxbl_send_intensity(ezx_backlight_device); ++} ++ ++#ifdef CONFIG_PM ++static int ezxbl_suspend(struct platform_device *pdev, pm_message_t state) ++{ ++ suspended = 1; ++ ezxbl_set_intensity(ezx_backlight_device); ++ return 0; ++} ++ ++static int ezxbl_resume(struct platform_device *pdev) ++{ ++ suspended = 0; ++ ezxbl_set_intensity(ezx_backlight_device); ++ return 0; ++} ++#else ++#define ezxbl_suspend NULL ++#define ezxbl_resume NULL ++#endif ++ ++static struct backlight_ops ezxbl_ops = { ++ .get_brightness = ezxbl_get_intensity, ++ .update_status = ezxbl_set_intensity, ++}; ++ ++static int __init ezxbl_probe(struct platform_device *pdev) ++{ ++ ezx_backlight_device = backlight_device_register ("ezx-bl", ++ &pdev->dev, NULL, &ezxbl_ops); ++ if (IS_ERR (ezx_backlight_device)) ++ return PTR_ERR (ezx_backlight_device); ++ ++ platform_set_drvdata(pdev, ezx_backlight_device); ++ ++ ezx_backlight_device->props.power = FB_BLANK_UNBLANK; ++ ezx_backlight_device->props.max_brightness = EZX_MAX_INTENSITY; ++ ezx_backlight_device->props.brightness = EZX_DEFAULT_INTENSITY; ++ ezxbl_set_intensity(ezx_backlight_device); ++ backlight_update_status(ezx_backlight_device); ++ ++ return 0; ++} ++ ++static int ezxbl_remove(struct platform_device *pdev) ++{ ++ backlight_device_unregister(ezx_backlight_device); ++ return 0; ++} ++ ++static struct platform_driver ezxbl_driver = { ++ .probe = ezxbl_probe, ++ .remove = ezxbl_remove, ++ .suspend = ezxbl_suspend, ++ .resume = ezxbl_resume, ++ .driver = { ++ .name = "ezx-bl", ++ }, ++}; ++ ++static int __init ezxbl_init(void) ++{ ++ return platform_driver_register(&ezxbl_driver); ++} ++ ++static void __exit ezxbl_exit(void) ++{ ++ platform_driver_unregister(&ezxbl_driver); ++} ++ ++module_init(ezxbl_init); ++module_exit(ezxbl_exit); ++ ++MODULE_AUTHOR("Michael Lauer "); ++MODULE_DESCRIPTION("Backlight Driver for Motorola A780|E680(i)"); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-06-02 20:19:44.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-02 20:26:49.000000000 -0300 +@@ -67,6 +67,12 @@ + #endif + EXPORT_SYMBOL(ezx_backlight_power); + ++/* EZX LCD Backlight */ ++static struct platform_device ezxbacklight_device = { ++ .name = "ezx-bl", ++ .id = -1, ++}; ++ + /* SSP */ + struct platform_device ezxssp_device = { + .name = "ezx-ssp", +@@ -179,6 +185,7 @@ + &ezxbp_device, + &ezxpcap_device, + &ezxemu_device, ++ &ezxbacklight_device, + }; + + /* PM */ diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-bp.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-bp.patch new file mode 100755 index 0000000000..a0b3b61b12 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-bp.patch @@ -0,0 +1,326 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-06-02 14:46:25.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-02 20:03:12.000000000 -0300 +@@ -100,9 +100,41 @@ + .init = ezx_ohci_init, + }; + ++/* BP */ ++static struct resource ezxbp_resources[] = { ++ [0] = { ++ .start = IRQ_GPIO(GPIO_BP_RDY), ++ .end = IRQ_GPIO(GPIO_BP_RDY), ++ .flags = IORESOURCE_IRQ, ++ }, ++ [1] = { ++ .start = IRQ_GPIO(GPIO_BB_WDI2), ++ .end = IRQ_GPIO(GPIO_BB_WDI2), ++ .flags = IORESOURCE_IRQ, ++ }, ++ [2] = { ++ .start = IRQ_GPIO(GPIO_BB_WDI), ++ .end = IRQ_GPIO(GPIO_BB_WDI), ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct platform_device ezxbp_device = { ++ .name = "ezx-bp", ++ .dev = { ++ //.parent = ++ //.platform_data = ++ }, ++ .id = -1, ++ .num_resources = ARRAY_SIZE(ezxbp_resources), ++ .resource = ezxbp_resources, ++}; ++ ++ + + static struct platform_device *devices[] __initdata = { + &ezxssp_device, ++ &ezxbp_device, + }; + + static int __init ezx_init(void) +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-06-02 14:48:52.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-06-02 20:03:11.000000000 -0300 +@@ -102,6 +102,9 @@ + + endchoice + ++config EZX_BP ++ bool "BP Control code for EZX Platform" ++ + endif + + endmenu +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-bp.c 2007-06-02 18:26:22.000000000 -0300 +@@ -0,0 +1,249 @@ ++/* ++ * BP handshake code for Motorola EZX phones ++ * ++ * Copyright (c) 2007 Daniel Ribeiro ++ * ++ * Based on Motorola's a780.c Copyright (c) 2003-2005 Motorola ++ * ++ * 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. ++ * ++ */ ++ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++/* BP Handshake */ ++#define FIRST_STEP 2 ++#define LAST_STEP 3 ++#define BP_RDY_TIMEOUT 0x000c0000 ++ ++#if 1 ++#define DEBUGP(x, args ...) printk(x, ##args) ++#else ++#define DEBUGP(x, args ...) ++#endif ++ ++struct bp { ++ int irq_wdi; ++ int irq_wdi2; ++ int irq_rdy; ++}; ++ ++/* check power down condition */ ++static inline void check_power_off(void) ++{ ++ if (pxa_gpio_get_value(GPIO_BB_WDI2) == 0) { ++ DEBUGP("BP request poweroff!\n"); ++// pm_power_off(); ++ } ++} ++ ++static int step = FIRST_STEP; ++ ++inline int bp_handshake_passed(void) ++{ ++ return (step > LAST_STEP); ++} ++EXPORT_SYMBOL(bp_handshake_passed); ++ ++void handshake(void) ++{ ++ /* step 1: check MCU_INT_SW or BP_RDY is low (now it is checked in apboot) */ ++ DEBUGP("bp handshake entered!\n"); ++ if (step == 1) { ++ int timeout = BP_RDY_TIMEOUT; ++ ++ /* config MCU_INT_SW, BP_RDY as input */ ++ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_IN); ++ pxa_gpio_mode(GPIO_BP_RDY | GPIO_IN); ++ ++ while (timeout--) { ++ if (pxa_gpio_get_value(GPIO_MCU_INT_SW) == 0 ++ || pxa_gpio_get_value(GPIO_BP_RDY) == 0) { ++ step ++; ++ break; ++ } ++ ++ check_power_off(); ++ } ++ DEBUGP("ezx-bp: handshake step 1\n"); ++ } ++ ++ /* step 2: wait BP_RDY is low */ ++ if (step == 2) { ++ if (pxa_gpio_get_value(GPIO_BP_RDY) == 0) { ++ /* config MCU_INT_SW as output */ ++ pxa_gpio_mode(GPIO_MCU_INT_SW | GPIO_OUT); ++ pxa_gpio_set_value(GPIO_MCU_INT_SW, 0); ++ ++ step ++; ++ DEBUGP("ezx-bp: handshake step 2\n"); ++ } ++ } ++ ++ /* step 3: wait BP_RDY is high */ ++ else if (step == 3) { ++ if (pxa_gpio_get_value(GPIO_BP_RDY)) { ++ step ++; ++ //FIXME delay_bklight(); ++ pxa_gpio_set_value(GPIO_MCU_INT_SW, 1); ++ printk(KERN_NOTICE "ezx-bp: handshake passed\n"); ++ } ++ } ++} ++ ++irqreturn_t bp_wdi_handler(int irq, void *dev_id) ++{ ++ DEBUGP("BP Lowered WDI line. This is not good :(\n"); ++ /* ++ * this means that BP is not responsive. ++ * we could try to reset BP and then handshake again ++ * but i doubt its possible to bring it up again. ++ */ ++ return IRQ_HANDLED; ++} ++ ++static irqreturn_t bp_rdy_handler(int irq, void *dev_id) ++{ ++ struct bp *bp = dev_id; ++ DEBUGP("BP rdy irq\n"); ++ if (!bp_handshake_passed()) { ++ handshake(); ++ if (bp_handshake_passed()) { ++ disable_irq(bp->irq_wdi2); ++ ++ /* set bp_rdy handle for usb ipc */ ++ set_irq_type(bp->irq_rdy, IRQT_FALLING); ++ } ++ } ++#ifdef CONFIG_TS0710_MUX_USB ++ else usb_send_readurb(); ++#endif ++ return IRQ_HANDLED; ++} ++ ++/* BP request for poweroff */ ++static irqreturn_t bp_wdi2_handler(int irq, void *dev_id) ++{ ++ DEBUGP("BP request poweroff!\n"); ++// pm_power_off(); ++ return IRQ_HANDLED; ++} ++ ++static int __init ezxbp_probe(struct platform_device *dev) ++{ ++ int ret; ++ struct bp *bp; ++ ++ bp = kzalloc(sizeof(*bp), GFP_KERNEL); ++ if (!bp) ++ return -ENOMEM; ++ ++ bp->irq_rdy = platform_get_irq(dev, 0); ++ if(bp->irq_rdy < 0) { ++ ret = bp->irq_rdy; ++ goto fail; ++ } ++ ++ bp->irq_wdi2 = platform_get_irq(dev, 1); ++ if(bp->irq_wdi2 < 0) { ++ ret = bp->irq_wdi2; ++ goto fail; ++ } ++ ++ bp->irq_wdi = platform_get_irq(dev, 2); ++ if(bp->irq_wdi < 0) { ++ ret = bp->irq_wdi; ++ goto fail; ++ } ++ ++ set_irq_type(bp->irq_wdi, IRQT_FALLING); ++ request_irq(bp->irq_wdi, bp_wdi_handler, SA_INTERRUPT, ++ "bp wdi", bp); ++ ++ set_irq_type(bp->irq_rdy, IRQT_BOTHEDGE); ++ request_irq(bp->irq_rdy, bp_rdy_handler, SA_INTERRUPT, ++ "bp rdy", bp); ++ ++ set_irq_type(bp->irq_wdi2, IRQT_FALLING); ++ request_irq(bp->irq_wdi2, bp_wdi2_handler, SA_INTERRUPT, ++ "bp wdi2", bp); ++ ++ /* turn on BP */ ++ pxa_gpio_mode(GPIO_BB_RESET|GPIO_OUT); ++ pxa_gpio_set_value(GPIO_BB_RESET, 1); ++ ++ check_power_off(); ++ handshake(); ++ ++ return 0; ++fail: ++ kfree(bp); ++ return ret; ++} ++ ++static int ezxbp_remove(struct platform_device *dev) ++{ ++ struct bp *bp = platform_get_drvdata(dev); ++ ++ free_irq(bp->irq_wdi, bp); ++ free_irq(bp->irq_wdi2, bp); ++ free_irq(bp->irq_rdy, bp); ++ kfree(bp); ++ ++ return 0; ++} ++ ++static int ezxbp_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ DEBUGP("bp suspend!\n"); ++// pxa_gpio_set_value(GPIO_MCU_INT_SW, 0); ++ return 0; ++} ++ ++static int ezxbp_resume(struct platform_device *dev) ++{ ++ DEBUGP("bp resume!\n"); ++// pxa_gpio_set_value(GPIO_MCU_INT_SW, 1); ++ return 0; ++} ++static struct platform_driver ezxbp_driver = { ++ .probe = ezxbp_probe, ++ .remove = ezxbp_remove, ++#warning FIXME: missing suspend/resume support ++ .suspend = ezxbp_suspend, ++ .resume = ezxbp_resume, ++ .driver = { ++ .name = "ezx-bp", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++int __init ezxbp_init(void) ++{ ++ return platform_driver_register(&ezxbp_driver); ++} ++ ++void ezxbp_fini(void) ++{ ++ return platform_driver_unregister(&ezxbp_driver); ++} ++ ++module_init(ezxbp_init); ++module_exit(ezxbp_fini); ++ ++MODULE_DESCRIPTION("Motorola BP Control driver"); ++MODULE_AUTHOR("Daniel Ribeiro "); ++MODULE_LICENSE("GPL"); ++ +Index: linux-2.6.21/arch/arm/mach-pxa/Makefile +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-06-02 14:49:50.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-06-02 20:03:11.000000000 -0300 +@@ -24,6 +24,7 @@ + obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o + obj-$(CONFIG_PXA_EZX_A1200) += ezx-a1200.o + obj-$(CONFIG_PXA_EZX_E6) += ezx-e6.o ++obj-$(CONFIG_EZX_BP) += ezx-bp.o + + # Support for blinky lights + led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-core.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-core.patch new file mode 100755 index 0000000000..c0e9435723 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-core.patch @@ -0,0 +1,1178 @@ +Index: linux-2.6.21/arch/arm/boot/compressed/head-xscale.S +=================================================================== +--- linux-2.6.21.orig/arch/arm/boot/compressed/head-xscale.S 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/arch/arm/boot/compressed/head-xscale.S 2007-06-02 14:46:25.000000000 -0300 +@@ -53,3 +53,6 @@ + str r1, [r0, #0x18] + #endif + ++#ifdef CONFIG_ARCH_EZX ++ mov r7, #MACH_TYPE_EZX ++#endif +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-06-02 14:48:52.000000000 -0300 +@@ -37,6 +37,10 @@ + bool "Keith und Koep Trizeps4 DIMM-Module" + select PXA27x + ++config PXA_EZX ++ bool "Motorola EZX Platform" ++ select PXA_SSP ++ + endchoice + + if PXA_SHARPSL +@@ -71,6 +75,35 @@ + + endif + ++if PXA_EZX ++ ++choice ++ prompt "Select target EZX device" ++ ++config PXA_EZX_E680 ++ bool "Motorola E680 GSM Phone" ++ select PXA27x ++ ++config PXA_EZX_A780 ++ bool "Motorola A780 GSM Phone" ++ select PXA27x ++ ++config PXA_EZX_E2 ++ bool "Motorola E2 GSM Phone" ++ select PXA27x ++ ++config PXA_EZX_A1200 ++ bool "Motorola A1200 GSM Phone" ++ select PXA27x ++ ++config PXA_EZX_E6 ++ bool "Motorola E6 GSM Phone" ++ select PXA27x ++ ++endchoice ++ ++endif ++ + endmenu + + config MACH_POODLE +@@ -144,4 +177,5 @@ + tristate + help + Enable support for PXA2xx SSP ports ++ + endif +Index: linux-2.6.21/arch/arm/mach-pxa/Makefile +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-06-02 14:49:50.000000000 -0300 +@@ -18,6 +18,12 @@ + obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o + obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o + obj-$(CONFIG_MACH_TOSA) += tosa.o ++obj-$(CONFIG_PXA_EZX) += ezx.o ezx_ssp.o ++obj-$(CONFIG_PXA_EZX_A780) += ezx-a780.o ++obj-$(CONFIG_PXA_EZX_E680) += ezx-e680.o ++obj-$(CONFIG_PXA_EZX_E2) += ezx-e2.o ++obj-$(CONFIG_PXA_EZX_A1200) += ezx-a1200.o ++obj-$(CONFIG_PXA_EZX_E6) += ezx-e6.o + + # Support for blinky lights + led-y := leds.o +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,135 @@ ++/* ++ * ezx.c - Common code for EZX platform. ++ * ++ * Copyright (c) 2005-2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern int ezx_ssp_set_machinfo(struct ezxssp_machinfo *); ++ ++/* EZX PXA Framebuffer */ ++void ezx_lcd_power(int on, struct fb_var_screeninfo *var) ++{ ++ if (on) { ++ mdelay(1); ++ GPSR3 = 0x00100000; ++ mdelay(10); ++ GPCR3 = 0x00100000; ++ GPDR3 |= 0x00100000; ++ } else { ++ GPSR3 = 0x00100000; ++ PGSR3 |= 0x00100000; ++ mdelay(41); ++ LCCR0 &= ~LCCR0_LDM; /* disable lcd disable done interrupt */ ++ LCCR0 |= LCCR0_DIS; /* normal disable lcd */ ++ mdelay(18); ++ } ++} ++EXPORT_SYMBOL(ezx_lcd_power); ++ ++/* failsafe if we are not using the backlight platform driver */ ++#ifndef CONFIG_BACKLIGHT_EZX ++void ezx_backlight_power(int on) ++{ ++ if (on) { ++ pxa_gpio_mode(GPIO16_PWM0_MD); ++ pxa_set_cken(CKEN0_PWM0, 1); ++ PWM_CTRL0 = 0; ++ PWM_PWDUTY0 = 0x3ff; ++ PWM_PERVAL0 = 0x3ff; ++ } else { ++ PWM_CTRL0 = 0; ++ PWM_PWDUTY0 = 0x0; ++ PWM_PERVAL0 = 0x3FF; ++ pxa_set_cken(CKEN0_PWM0, 0); ++ } ++} ++#else ++void ezx_backlight_power(int on){} ++#endif ++EXPORT_SYMBOL(ezx_backlight_power); ++ ++/* SSP */ ++struct platform_device ezxssp_device = { ++ .name = "ezx-ssp", ++ .id = -1, ++}; ++ ++struct ezxssp_machinfo ezx_ssp_machinfo = { ++ .port = 1, ++ .cs_pcap = GPIO_SPI_CE, ++ .clk_pcap = 1, ++}; ++ ++/* OHCI Controller */ ++static int ezx_ohci_init(struct device *dev) ++{ ++ /* for A780 support (connected with Neptune) */ ++ pxa_gpio_mode(GPIO30_USB_P3_2); /* GPIO30 - USB_P3_2/ICL_TXENB */ ++ pxa_gpio_mode(GPIO31_USB_P3_6); /* GPIO31 - USB_P3_6/ICL_VPOUT */ ++ pxa_gpio_mode(GPIO90_USB_P3_5); /* GPIO90 - USB_P3_5/ICL_VPIN */ ++ pxa_gpio_mode(GPIO91_USB_P3_1); /* GPIO91 - USB_P3_1/ICL_XRXD */ ++ pxa_gpio_mode(GPIO56_USB_P3_4); /* GPIO56 - USB_P3_4/ICL_VMOUT */ ++ pxa_gpio_mode(GPIO113_USB_P3_3);/* GPIO113 - USB_P3_3/ICL_VMIN */ ++ UP3OCR = 0x00000002; ++ ++ UHCHR = UHCHR & ~(UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); ++ ++ return 0; ++} ++ ++static struct pxaohci_platform_data ezx_ohci_platform_data = { ++ .port_mode = PMM_NPS_MODE, ++ .init = ezx_ohci_init, ++}; ++ ++ ++static struct platform_device *devices[] __initdata = { ++ &ezxssp_device, ++}; ++ ++static int __init ezx_init(void) ++{ ++ CKEN = CKEN9_OSTIMER | CKEN22_MEMC; ++ ++ ezx_ssp_set_machinfo(&ezx_ssp_machinfo); ++ ++ pxa_gpio_mode(GPIO_ICL_FFRXD_MD); ++ pxa_gpio_mode(GPIO_ICL_FFTXD_MD); ++ pxa_gpio_mode(GPIO_ICL_FFCTS_MD); ++ pxa_gpio_mode(GPIO_ICL_FFRTS_MD); ++ ++ pxa_gpio_mode(GPIO42_BTRXD_MD); ++ pxa_gpio_mode(GPIO43_BTTXD_MD); ++ pxa_gpio_mode(GPIO44_BTCTS_MD); ++ pxa_gpio_mode(GPIO45_BTRTS_MD); ++ ++ /* Standard UART */ ++ pxa_gpio_mode(GPIO46_STRXD_MD); ++ pxa_gpio_mode(GPIO47_STTXD_MD); ++ ++ pxa_set_ohci_info(&ezx_ohci_platform_data); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++ ++ return 0; ++} ++ ++subsys_initcall(ezx_init); +Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx.h 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,225 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/ezx.h ++ * ++ * Specific macro defines for Motorola Ezx Development Platform ++ * ++ * Author: Zhuang Xiaofan ++ * Created: Nov 25, 2003 ++ * Copyright: Motorola Inc. ++ * ++ * 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. ++ */ ++ ++/* support E680 p3 and ealier PCB */ ++//#define E680_P3_AND_EARLY ++ ++#define GPIO_is_high(x) (GPLR(x) & GPIO_bit(x)) ++#define set_GPIO(x) (GPSR(x) = GPIO_bit(x)) ++#define clr_GPIO(x) (GPCR(x) = GPIO_bit(x)) ++ ++/* ++ * Flags in memory for sleep use ++ */ ++#define FLAG_ADDR PHYS_OFFSET ++#define RESUME_ADDR (PHYS_OFFSET + 4) ++#define BPSIG_ADDR (PHYS_OFFSET + 8) ++ ++#define USER_OFF_FLAG 0x5a5a5a5a ++#define SLEEP_FLAG 0x6b6b6b6b ++#define OFF_FLAG 0x7c7c7c7c ++#define REFLASH_FLAG 0x0C1D2E3F ++#define PASS_THRU_FLAG 0x12345678 ++ ++#define WDI_FLAG 0xbb00dead ++#define NO_FLAG 0xaa00dead ++ ++/* ++ * GPIO control pin, have to change when hardware lock down ++ */ ++ ++#ifdef E680_P3_AND_EARLY ++ ++/* shakehand with BP's PIN */ ++#define GPIO_BP_RDY 0 /* BP_RDY */ ++#define GPIO_BB_WDI 13 /* BB_WDI */ ++#define GPIO_BB_WDI2 3 /* BB_WDI2 */ ++#define GPIO_BB_RESET 57 /* BB_RESET */ ++#define GPIO_MCU_INT_SW 115 /* MCU_INT_SW */ ++#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ ++ ++/* control PCAP direct PIN */ ++#define GPIO_WDI_AP 4 /* WDI_AP */ ++#define GPIO_SYS_RESTART 55 /* restart PCAP power */ ++#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ ++ ++/* communicate with PCAP's PIN */ ++#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ ++#define GPIO_SPI_CLK 23 /* PCAP SPI port clock */ ++#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ ++#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ ++#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ ++ ++/* blue tooth control PIN */ ++#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ ++#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ ++#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ ++ ++/* control LCD high - OFF low -- ON */ ++#define GPIO_LCD_OFF 116 /* control LCD */ ++ ++/* FFUART PIN */ ++#define GPIO_ICL_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) ++#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) ++ ++#elif defined(A780_P1_AND_EARLY) ++ ++/* shakehand with BP's PIN */ ++#define GPIO_BP_RDY 0 /* BP_RDY */ ++#define GPIO_BB_WDI 13 /* BB_WDI */ ++#define GPIO_BB_WDI2 3 /* BB_WDI2 */ ++#define GPIO_BB_RESET 82 /* BB_RESET */ ++#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ ++#define GPIO_TC_MM_EN 89 /* TC_MM_EN */ ++ ++/* control PCAP direct PIN */ ++#define GPIO_WDI_AP 4 /* WDI_AP */ ++#define GPIO_SYS_RESTART 55 /* restart PCAP power */ ++#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ ++ ++/* communicate with PCAP's PIN */ ++#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ ++#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ ++#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ ++#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ ++#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ ++ ++/* blue tooth control PIN */ ++#define GPIO_BT_WAKEUP 2 /* AP wake up bluetooth module */ ++#define GPIO_BT_HOSTWAKE 14 /* bluetooth module wake up Ap module */ ++#define GPIO_BT_RESET 56 /* AP reset bluetooth module */ ++ ++/* control LCD high - OFF low -- ON */ ++#define GPIO_LCD_OFF 116 /* control LCD */ ++ ++/* FFUART PIN */ ++#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) ++#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) ++ ++#else ++ ++/* shakehand with BP's PIN */ ++#define GPIO_BP_RDY 0 /* BP_RDY */ ++#define GPIO_BB_WDI 13 /* BB_WDI */ ++#define GPIO_BB_WDI2 3 /* BB_WDI2 */ ++#define GPIO_BB_RESET 82 /* BB_RESET */ ++#define GPIO_MCU_INT_SW 57 /* MCU_INT_SW */ ++#define GPIO_TC_MM_EN 99 /* TC_MM_EN */ ++ ++/* control PCAP direct PIN */ ++#define GPIO_WDI_AP 4 /* WDI_AP */ ++#define GPIO_SYS_RESTART 55 /* restart PCAP power */ ++//#define GPIO_AP_STANDBY 28 /* make pcap enter standby mode */ ++ ++/* communicate with PCAP's PIN */ ++#define GPIO_PCAP_SEC_INT 1 /* PCAP interrupt PIN to AP */ ++#define GPIO_SPI_CLK 29 /* PCAP SPI port clock */ ++#define GPIO_SPI_CE 24 /* PCAP SPI port SSPFRM */ ++#define GPIO_SPI_MOSI 25 /* PCAP SPI port SSPTXD */ ++#define GPIO_SPI_MISO 26 /* PCAP SPI port SSPRXD */ ++ ++/* blue tooth control PIN */ ++#define GPIO_BT_WAKEUP 28 /* AP wake up bluetooth module */ ++#define GPIO_BT_HOSTWAKE 14 /* AP wake up bluetooth module */ ++#define GPIO_BT_RESET 48 /* AP reset bluetooth module */ ++ ++/* control LCD high - OFF low -- ON */ ++#define GPIO_LCD_OFF 116 /* control LCD */ ++ ++/* FFUART PIN */ ++#define GPIO_ICL_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) ++#define GPIO_ICL_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) ++#define GPIO_ICL_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) ++ ++#endif ++/* ++ * ezx platform, wake up source edge detect bit ++ */ ++#define PEDR_INT_SEC 1 ++ ++#define GPIO_FLIP_PIN 12 ++/*E680 screen lock button*/ ++ ++#define GPIO_LOCK_SCREEN_PIN GPIO_FLIP_PIN ++ ++/* MMC interface */ ++#define GPIO_MMC_DETECT 11 ++#define GPIO_MMC_CLK 32 ++#define GPIO_MMC_DATA0 92 ++#define GPIO_MMC_WP 107 ++#define GPIO_MMC_DATA1 109 ++#define GPIO_MMC_DATA2 110 ++#define GPIO_MMC_DATA3 111 ++#define GPIO_MMC_CMD 112 ++ ++/* interface function */ ++#define GPIO_MMC_CLK_MD (GPIO_MMC_CLK | GPIO_ALT_FN_2_OUT) ++#define GPIO_MMC_DATA0_MD (GPIO_MMC_DATA0 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) ++#define GPIO_MMC_DATA1_MD (GPIO_MMC_DATA1 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) ++#define GPIO_MMC_DATA2_MD (GPIO_MMC_DATA2 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) ++#define GPIO_MMC_DATA3_MD (GPIO_MMC_DATA3 | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) ++ ++#define GPIO_MMC_CMD_MD (GPIO_MMC_CMD | GPIO_ALT_FN_1_IN | GPIO_ALT_FN_1_OUT) ++ ++/* EMU GPIO 119 ---MUX2 120 --- MUX1 */ ++#define GPIO_EMU_MUX1 120 ++#define GPIO_EMU_MUX2 119 ++#define GPIO_SNP_INT_CTL 86 ++#define GPIO_SNP_INT_IN 87 ++ ++ ++/* audio related pins */ ++#define AP_13MHZ_OUTPUT_PIN 9 ++ ++#ifdef CONFIG_ARCH_EZX_E680 ++#define GPIO_VA_SEL_BUL 79 ++#define GPIO_FLT_SEL_BUL 80 /* out filter select pin */ ++#define GPIO_MIDI_RESET 78 /* GPIO used by MIDI chipset */ ++#define GPIO_MIDI_CS 33 ++#define GPIO_MIDI_IRQ 15 ++#define GPIO_MIDI_NPWE 49 ++#define GPIO_MIDI_RDY 18 ++#endif ++ ++#ifdef CONFIG_ARCH_EZX_A780 ++#define GPIO_HW_ATTENUATE_A780 96 /* hw noise attenuation be used or bypassed, for receiver or louderspeaker mode */ ++#endif ++ ++ ++/* bp status pin */ ++#define GPIO_BP_STATE 41 ++ ++/* define usb related pin */ ++#define GPIO34_TXENB 34 ++#define GPIO35_XRXD 35 ++#define GPIO36_VMOUT 36 ++#define GPIO39_VPOUT 39 ++#define GPIO40_VPIN 40 ++#define GPIO53_VMIN 53 ++ ++/* USB client 6 pin defination */ ++#define GPIO34_TXENB_MD (GPIO34_TXENB | GPIO_ALT_FN_1_OUT) ++#define GPIO35_XRXD_MD (GPIO35_XRXD | GPIO_ALT_FN_2_IN ) ++#define GPIO36_VMOUT_MD (GPIO36_VMOUT | GPIO_ALT_FN_1_OUT) ++#define GPIO39_VPOUT_MD (GPIO39_VPOUT | GPIO_ALT_FN_1_OUT) ++#define GPIO40_VPIN_MD (GPIO40_VPIN | GPIO_ALT_FN_3_IN ) ++#define GPIO53_VMIN_MD (GPIO53_VMIN | GPIO_ALT_FN_2_IN ) ++ ++#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) ++ +Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-06-02 14:46:25.000000000 -0300 +@@ -849,6 +849,8 @@ + #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ + #define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ + ++#define UP3OCR __REG(0x40600024) /* USB Port 3 Output Control register */ ++ + #define UDCCSN(x) __REG2(0x40600100, (x) << 2) + #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ + #define UDCCSR0_SA (1 << 7) /* Setup Active */ +@@ -1252,6 +1254,7 @@ + #define GPIO33_nCS_5 33 /* chip select 5 */ + #define GPIO34_FFRXD 34 /* FFUART receive */ + #define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */ ++#define GPIO34_USB_P2_2 34 /* USB Port2 Pin 2 */ + #define GPIO35_FFCTS 35 /* FFUART Clear to send */ + #define GPIO36_FFDCD 36 /* FFUART Data carrier detect */ + #define GPIO37_FFDSR 37 /* FFUART data set ready */ +@@ -1365,6 +1368,7 @@ + #define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN) + #define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN) + #define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN) ++#define GPIO22_SCLK2_MD (22 | GPIO_ALT_FN_3_IN) + #define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT) + #define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT) + #define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT) +@@ -1375,23 +1379,33 @@ + #define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT) + #define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN) + #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN) ++#define GPIO29_SCLK_MD (29 | GPIO_ALT_FN_3_IN) + #define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT) + #define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT) ++#define GPIO30_USB_P3_2 (30 | GPIO_ALT_FN_3_OUT) + #define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT) + #define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT) ++#define GPIO31_USB_P3_6 (31 | GPIO_ALT_FN_3_OUT) + #define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN) + #define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT) + #define GPIO32_MMCCLK_MD ( 32 | GPIO_ALT_FN_2_OUT) + #define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT) + #define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) + #define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT) ++#define GPIO34_USB_P2_2_MD (34 | GPIO_ALT_FN_1_OUT) + #define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) ++#define GPIO35_USB_P2_1_MD (35 | GPIO_ALT_FN_2_IN) + #define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN) ++#define GPIO36_USB_P2_4_MD (36 | GPIO_ALT_FN_1_OUT) + #define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN) ++#define GPIO37_SFRM2_MD (37 | GPIO_ALT_FN_2_IN) + #define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN) ++#define GPIO38_STXD2_MD (38 | GPIO_ALT_FN_2_OUT) + #define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT) + #define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) ++#define GPIO39_USB_P2_6_MD (39 | GPIO_ALT_FN_1_OUT) + #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) ++#define GPIO40_USB_P2_5_MD (40 | GPIO_ALT_FN_3_IN) + #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) + #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) + #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) +@@ -1416,13 +1430,17 @@ + #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) + #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) + #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) ++#define GPIO52_SCLK3_MD (52 | GPIO_ALT_FN_2_OUT) + #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) + #define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT) ++#define GPIO53_FFRXD_MD (53 | GPIO_ALT_FN_1_IN) ++#define GPIO53_USB_P2_3_MD (53 | GPIO_ALT_FN_2_IN) + #define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT) + #define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT) + #define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT) + #define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT) + #define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN) ++#define GPIO56_USB_P3_4 (56 | GPIO_ALT_FN_1_OUT) + #define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN) + #define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT) + #define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT) +@@ -1458,13 +1476,19 @@ + #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT) + #define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT) + #define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN) ++#define GPIO81_STXD3_MD (81 | GPIO_ALT_FN_1_OUT) + #define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT) + #define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN) + #define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT) + #define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN) ++#define GPIO83_SFRM3_MD (83 | GPIO_ALT_FN_1_IN) + #define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT) + #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) + #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) ++#define GPIO88_SRXD2_MD (88 | GPIO_ALT_FN_2_IN) ++#define GPIO89_SRXD3_MD (89 | GPIO_ALT_FN_1_IN) ++#define GPIO90_USB_P3_5 (90 | GPIO_ALT_FN_2_IN) ++#define GPIO91_USB_P3_1 (91 | GPIO_ALT_FN_2_IN) + #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) + #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) + #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) +@@ -1476,6 +1500,7 @@ + #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) + #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) + #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) ++#define GPIO113_USB_P3_3 (113 | GPIO_ALT_FN_3_IN) + #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) + #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) + +@@ -1491,6 +1516,7 @@ + #define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */ + #define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */ + #define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */ ++#define PGSR(x) (__REG(0x40F00020 + ((unsigned long)(x)/32*4))) + #define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */ + #define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */ + #define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */ +Index: linux-2.6.21/arch/arm/boot/compressed/head.S +=================================================================== +--- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-06-02 14:46:25.000000000 -0300 +@@ -117,6 +117,9 @@ + mov r0, r0 + .endr + ++ mov r1, #0x300 @ mach_id 0x363 is official EZX ++ orr r1, r1, #0x63 @ bootloader JUMP doesn't set r1 ++ + b 1f + .word 0x016f2818 @ Magic numbers to help the loader + .word start @ absolute load/run zImage address +Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-06-02 14:46:25.000000000 -0300 +@@ -14,14 +14,14 @@ + #define STUART ((volatile unsigned long *)0x40700000) + #define HWUART ((volatile unsigned long *)0x41600000) + +-#define UART FFUART ++#define UART STUART + + + static inline void putc(char c) + { +- while (!(UART[5] & 0x20)) ++/* while (!(UART[5] & 0x40)) + barrier(); +- UART[0] = c; ++ UART[0] = c;*/ + } + + /* +Index: linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx_ssp.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,126 @@ ++/* ++ * SSP control code for Motorola EZX phones ++ * ++ * Copyright (c) 2007 Daniel Ribeiro ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "ezx.h" ++ ++static DEFINE_SPINLOCK(ezx_ssp_lock); ++static struct ssp_dev ezx_ssp_dev; ++static struct ssp_state ezx_ssp_state; ++static struct ezxssp_machinfo *ssp_machinfo; ++ ++/* PCAP */ ++unsigned long ezx_ssp_pcap_putget(ulong data) ++{ ++ unsigned long flag; ++ u32 ret = 0; ++ ++ spin_lock_irqsave(&ezx_ssp_lock, flag); ++ if (ssp_machinfo->cs_pcap >= 0) ++ GPCR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); ++ ++ ssp_write_word(&ezx_ssp_dev,data); ++ ssp_read_word(&ezx_ssp_dev, &ret); ++ ++ if (ssp_machinfo->cs_pcap >= 0) ++ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); ++ spin_unlock_irqrestore(&ezx_ssp_lock, flag); ++ ++ return ret; ++} ++EXPORT_SYMBOL(ezx_ssp_pcap_putget); ++ ++void __init ezx_ssp_set_machinfo(struct ezxssp_machinfo *machinfo) ++{ ++ ssp_machinfo = machinfo; ++} ++ ++static int __init ezx_ssp_probe(struct platform_device *dev) ++{ ++ int ret; ++ /* PCAP init */ ++ pxa_gpio_mode(29|GPIO_ALT_FN_3_OUT); ++ pxa_gpio_mode(GPIO24_SFRM_MD); ++ pxa_gpio_mode(GPIO25_STXD_MD); ++ pxa_gpio_mode(GPIO26_SRXD_MD); ++ ++ /* Chip Select - Disable All */ ++ if (ssp_machinfo->cs_pcap >= 0) ++ pxa_gpio_mode(ssp_machinfo->cs_pcap | GPIO_OUT | GPIO_DFLT_HIGH); ++ ++ ret = ssp_init(&ezx_ssp_dev, ssp_machinfo->port, 0); ++ ++ if (ret) ++ printk(KERN_ERR "Unable to register SSP handler!\n"); ++ else { ++ ssp_disable(&ezx_ssp_dev); ++ ssp_config(&ezx_ssp_dev, ++ (SSCR0_Motorola | SSCR0_DataSize(16) | SSCR0_EDSS), ++ (SSCR1_TxTresh(1) | SSCR1_RxTresh(1)), ++ 0, SSCR0_SerClkDiv(ssp_machinfo->clk_pcap)); ++ ssp_enable(&ezx_ssp_dev); ++ } ++ ++ return ret; ++} ++ ++static int ezx_ssp_remove(struct platform_device *dev) ++{ ++ ssp_exit(&ezx_ssp_dev); ++ return 0; ++} ++ ++static int ezx_ssp_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ ssp_flush(&ezx_ssp_dev); ++ ssp_save_state(&ezx_ssp_dev,&ezx_ssp_state); ++ ++ return 0; ++} ++ ++static int ezx_ssp_resume(struct platform_device *dev) ++{ ++ if (ssp_machinfo->cs_pcap >= 0) ++ GPSR(ssp_machinfo->cs_pcap) = GPIO_bit(ssp_machinfo->cs_pcap); ++ ssp_restore_state(&ezx_ssp_dev,&ezx_ssp_state); ++ ssp_enable(&ezx_ssp_dev); ++ ++ return 0; ++} ++ ++static struct platform_driver ezxssp_driver = { ++ .probe = ezx_ssp_probe, ++ .remove = ezx_ssp_remove, ++ .suspend = ezx_ssp_suspend, ++ .resume = ezx_ssp_resume, ++ .driver = { ++ .name = "ezx-ssp", ++ }, ++}; ++ ++int __init ezx_ssp_init(void) ++{ ++ return platform_driver_register(&ezxssp_driver); ++} ++ ++arch_initcall(ezx_ssp_init); +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.h 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,9 @@ ++#include ++ ++/* SSP */ ++struct ezxssp_machinfo { ++ int port; ++ int cs_pcap; ++ int clk_pcap; ++}; ++ +Index: linux-2.6.21/arch/arm/mm/init.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mm/init.c 2007-06-02 14:46:22.000000000 -0300 ++++ linux-2.6.21/arch/arm/mm/init.c 2007-06-02 14:46:25.000000000 -0300 +@@ -241,6 +241,10 @@ + */ + reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, + boot_pages << PAGE_SHIFT); ++#ifdef CONFIG_PXA_EZX ++ /* reserve the first page memory for exiting sleep and user off */ ++ reserve_bootmem_node(pgdat, PHYS_OFFSET, PAGE_SIZE); ++#endif + + #ifdef CONFIG_BLK_DEV_INITRD + /* +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,88 @@ ++/* ++ * ezx-a780.c - Code specific to A780 GSM Phone. ++ * ++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern void ezx_lcd_power(int, struct fb_var_screeninfo *); ++extern void ezx_backlight_power(int); ++ ++static struct pxafb_mode_info mode_a780 = { ++ .pixclock = 150000, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 16, ++ .hsync_len = 10, ++ .left_margin = 20, ++ .right_margin = 10, ++ .vsync_len = 2, ++ .upper_margin = 3, ++ .lower_margin = 2, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info a780_fb_info = { ++ .modes = &mode_a780, ++ .num_modes = 1, ++ .lccr0 = 0x002008F8, ++ .lccr3 = 0x0430FF09, ++ .pxafb_backlight_power = &ezx_backlight_power, ++ .pxafb_lcd_power = &ezx_lcd_power, ++}; ++ ++static struct platform_device *devices[] __initdata = { ++}; ++ ++static void __init a780_init(void) ++{ ++ /* setup sleep mode values */ ++ PWER = 0xc0007803; // disable usb, GPIO15 NC ++ PFER = 0x00007803; ++ PRER = 0x00001802; ++ PGSR0 = 0x00000010; ++ PGSR1 = 0x02800000; ++ PGSR2 = 0x00040000; ++ PGSR3 = 0x00000008; ++ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; ++ PSLR = 0x05800f00; ++ ++ set_pxa_fb_info(&a780_fb_info); ++ ++ /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ ++ pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); ++ clr_GPIO(GPIO_EMU_MUX1); ++ pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT); ++ clr_GPIO(GPIO_EMU_MUX2); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++} ++ ++MACHINE_START(EZX, "Motorola Ezx Platform") ++ /* Maintainer: OpenEZX Team (www.openezx.org) */ ++ .phys_io = 0x40000000, ++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, ++ .boot_params = 0xa0000100, ++ .map_io = pxa_map_io, ++ .init_irq = pxa_init_irq, ++ .timer = &pxa_timer, ++ .init_machine = a780_init, ++MACHINE_END +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e2.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,70 @@ ++/* ++ * ezx-e2.c - Code specific to E2 GSM Phone. ++ * ++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern void ezx_lcd_power(int, struct fb_var_screeninfo *); ++extern void ezx_backlight_power(int); ++ ++static struct pxafb_mode_info mode_e2 = { ++ .pixclock = 192308, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 8, ++ .hsync_len = 10, ++ .left_margin = 20, ++ .right_margin = 10, ++ .vsync_len = 2, ++ .upper_margin = 3, ++ .lower_margin = 2, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info e2_fb_info = { ++ .modes = &mode_e2, ++ .num_modes = 1, ++ .lccr0 = 0x022008B8, ++ .lccr3 = 0xC130FF13, ++ .pxafb_backlight_power = ezx_backlight_power, ++ .pxafb_lcd_power = &ezx_lcd_power, ++}; ++ ++static struct platform_device *devices[] __initdata = { ++}; ++ ++static void __init e2_init(void) ++{ ++ set_pxa_fb_info(&e2_fb_info); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++} ++ ++MACHINE_START(EZX, "Motorola Ezx Platform") ++ /* Maintainer: OpenEZX Team (www.openezx.org) */ ++ .phys_io = 0x40000000, ++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, ++ .boot_params = 0xa0000100, ++ .map_io = pxa_map_io, ++ .init_irq = pxa_init_irq, ++ .timer = &pxa_timer, ++ .init_machine = e2_init, ++MACHINE_END +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,87 @@ ++/* ++ * ezx-e680.c - Code specific to E680 GSM Phone. ++ * ++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern void ezx_lcd_power(int, struct fb_var_screeninfo *); ++extern void ezx_backlight_power(int); ++ ++static struct pxafb_mode_info mode_e680 = { ++ .pixclock = 150000, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 16, ++ .hsync_len = 10, ++ .left_margin = 20, ++ .right_margin = 10, ++ .vsync_len = 2, ++ .upper_margin = 3, ++ .lower_margin = 2, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info e680_fb_info = { ++ .modes = &mode_e680, ++ .num_modes = 1, ++ .lccr0 = 0x002008F8, ++ .lccr3 = 0x0430FF09, ++ .pxafb_backlight_power = &ezx_backlight_power, ++ .pxafb_lcd_power = &ezx_lcd_power, ++}; ++ ++static struct platform_device *devices[] __initdata = { ++}; ++ ++static void __init e680_init(void) ++{ ++ /* setup sleep mode values */ ++ PWER = 0xc000f803; // disable usb 0xdc00f803; ++ PFER = 0x0000f803; ++ PRER = 0x00001802; ++ PGSR0 = 0x00000010; ++ PGSR1 = 0x02800000; ++ PGSR2 = 0x00040000; ++ PGSR3 = 0x00000000; ++ PCFR = PCFR_DC_EN | PCFR_FS | PCFR_FP | PCFR_OPDE; ++ PSLR = 0x05800f00; ++ ++ set_pxa_fb_info(&e680_fb_info); ++ ++ /* clear EMU MUX1/MUX2 (low) to close the audio path to EMU */ ++ pxa_gpio_mode(GPIO_EMU_MUX1|GPIO_OUT); ++ clr_GPIO(GPIO_EMU_MUX1); ++ pxa_gpio_mode(GPIO_EMU_MUX2|GPIO_OUT); ++ clr_GPIO(GPIO_EMU_MUX2); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++} ++ ++MACHINE_START(EZX, "Motorola Ezx Platform") ++ /* Maintainer: OpenEZX Team (www.openezx.org) */ ++ .phys_io = 0x40000000, ++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, ++ .boot_params = 0xa0000100, ++ .map_io = pxa_map_io, ++ .init_irq = pxa_init_irq, ++ .timer = &pxa_timer, ++ .init_machine = e680_init, ++MACHINE_END +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-06-02 14:46:25.000000000 -0300 +@@ -0,0 +1,70 @@ ++/* ++ * ezx-a1200.c - Code specific to A1200 GSM Phone. ++ * ++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern void ezx_lcd_power(int, struct fb_var_screeninfo *); ++extern void ezx_backlight_power(int); ++ ++static struct pxafb_mode_info mode_a1200 = { ++ .pixclock = 192308, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 8, ++ .hsync_len = 10, ++ .left_margin = 20, ++ .right_margin = 10, ++ .vsync_len = 2, ++ .upper_margin = 3, ++ .lower_margin = 2, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info a1200_fb_info = { ++ .modes = &mode_a1200, ++ .num_modes = 1, ++ .lccr0 = 0x022008B8, ++ .lccr3 = 0xC130FF13, ++ .pxafb_backlight_power = ezx_backlight_power, ++ .pxafb_lcd_power = &ezx_lcd_power, ++}; ++ ++static struct platform_device *devices[] __initdata = { ++}; ++ ++static void __init a1200_init(void) ++{ ++ set_pxa_fb_info(&a1200_fb_info); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++} ++ ++MACHINE_START(EZX, "Motorola Ezx Platform") ++ /* Maintainer: OpenEZX Team (www.openezx.org) */ ++ .phys_io = 0x40000000, ++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, ++ .boot_params = 0xa0000100, ++ .map_io = pxa_map_io, ++ .init_irq = pxa_init_irq, ++ .timer = &pxa_timer, ++ .init_machine = a1200_init, ++MACHINE_END +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e6.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-e6.c 2007-06-02 14:48:08.000000000 -0300 +@@ -0,0 +1,70 @@ ++/* ++ * ezx-e6.c - Code specific to E6 GSM Phone. ++ * ++ * Copyright (c) 2007 OpenEZX Team (www.openezx.org) ++ * ++ * 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. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "generic.h" ++#include "ezx.h" ++ ++extern void ezx_lcd_power(int, struct fb_var_screeninfo *); ++extern void ezx_backlight_power(int); ++ ++static struct pxafb_mode_info mode_e6 = { ++ .pixclock = 192308, ++ .xres = 240, ++ .yres = 320, ++ .bpp = 8, ++ .hsync_len = 10, ++ .left_margin = 20, ++ .right_margin = 10, ++ .vsync_len = 2, ++ .upper_margin = 3, ++ .lower_margin = 2, ++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++}; ++ ++static struct pxafb_mach_info e6_fb_info = { ++ .modes = &mode_e6, ++ .num_modes = 1, ++ .lccr0 = 0x022008B8, ++ .lccr3 = 0xC130FF13, ++ .pxafb_backlight_power = ezx_backlight_power, ++ .pxafb_lcd_power = &ezx_lcd_power, ++}; ++ ++static struct platform_device *devices[] __initdata = { ++}; ++ ++static void __init e6_init(void) ++{ ++ set_pxa_fb_info(&e6_fb_info); ++ ++ platform_add_devices(devices, ARRAY_SIZE(devices)); ++} ++ ++MACHINE_START(EZX, "Motorola Ezx Platform") ++ /* Maintainer: OpenEZX Team (www.openezx.org) */ ++ .phys_io = 0x40000000, ++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, ++ .boot_params = 0xa0000100, ++ .map_io = pxa_map_io, ++ .init_irq = pxa_init_irq, ++ .timer = &pxa_timer, ++ .init_machine = e6_init, ++MACHINE_END diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-emu.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-emu.patch new file mode 100755 index 0000000000..94581d4531 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-emu.patch @@ -0,0 +1,313 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-emu.c 2007-06-02 20:32:34.000000000 -0300 +@@ -0,0 +1,215 @@ ++/* ++ * EMU Driver for Motorola EZX phones ++ * ++ * Copyright (c) 2007 Daniel Ribeiro ++ * ++ * 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. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++static struct pxa2xx_udc_mach_info ezx_udc_info; ++extern int ezx_pcap_bit_set(u_int32_t, u_int8_t); ++extern int ezx_pcap_read_bit(u_int32_t); ++ ++#if defined CONFIG_EZX_EMU_USB ++#define emu_switch_to_default() emu_switch_to_usb() ++#elif defined CONFIG_EZX_EMU_UART ++#define emu_switch_to_default() emu_switch_to_uart() ++#else ++#define emu_switch_to_default() emu_switch_to_nothing() ++#endif ++ ++void emu_switch_to_usb(void) ++{ ++ pxa_gpio_mode(GPIO34_USB_P2_2_MD); ++ pxa_gpio_mode(GPIO35_USB_P2_1_MD); ++ pxa_gpio_mode(GPIO36_USB_P2_4_MD); ++ pxa_gpio_mode(GPIO39_USB_P2_6_MD); ++ pxa_gpio_mode(GPIO40_USB_P2_5_MD); ++ pxa_gpio_mode(GPIO53_USB_P2_3_MD); ++ UP2OCR = 0x02000000; ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB, 0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 1); ++ clr_GPIO(GPIO_EMU_MUX1); ++ clr_GPIO(GPIO_EMU_MUX2); ++} ++ ++void emu_switch_to_uart(void) ++{ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN,0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR, 1); ++ set_GPIO(GPIO39_FFTXD); ++ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); ++ set_GPIO(GPIO34_TXENB); ++ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); ++ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); ++ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); ++ pxa_gpio_mode(GPIO39_FFTXD_MD); ++ pxa_gpio_mode(GPIO53_FFRXD_MD); ++ CKEN |= CKEN6_FFUART; ++ clr_GPIO(GPIO_EMU_MUX1); ++ clr_GPIO(GPIO_EMU_MUX2); ++ ++} ++ ++void emu_switch_to_audio(int stereo) ++{ ++ clr_GPIO(GPIO39_VPOUT); ++ if (stereo) { ++ pxa_gpio_mode(GPIO34_TXENB | GPIO_IN); ++ clr_GPIO(GPIO39_VPOUT); ++ } else { ++ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); ++ set_GPIO(GPIO34_TXENB); ++ } ++ ++ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); ++ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); ++ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); ++ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); ++ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); ++ set_GPIO(GPIO_EMU_MUX1); ++ if (stereo) ++ set_GPIO(GPIO_EMU_MUX2); ++ else ++ clr_GPIO(GPIO_EMU_MUX2); ++} ++ ++void emu_switch_to_nothing(void) ++{ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN, 0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB, 1); ++ pxa_gpio_mode(GPIO34_TXENB | GPIO_OUT); ++ set_GPIO(GPIO34_TXENB); ++ pxa_gpio_mode(GPIO35_XRXD | GPIO_IN); ++ pxa_gpio_mode(GPIO36_VMOUT | GPIO_IN); ++ pxa_gpio_mode(GPIO39_VPOUT | GPIO_IN); ++ pxa_gpio_mode(GPIO40_VPIN | GPIO_IN); ++ pxa_gpio_mode(GPIO53_VMIN | GPIO_IN); ++} ++ ++ ++static irqreturn_t emu_irq(int irq, void *data) ++{ ++ switch (irq) { ++ case EZX_IRQ_USB4V: ++ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V)) ++ emu_switch_to_default(); ++ break; ++ case EZX_IRQ_USB1V: ++ if(!ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_1V)) ++ emu_switch_to_nothing(); ++ break; ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++static int __init ezx_emu_probe(struct platform_device *dev) ++{ ++ pxa_gpio_mode(GPIO_SNP_INT_IN | GPIO_IN); ++ pxa_gpio_mode(GPIO_EMU_MUX1 | GPIO_OUT); ++ pxa_gpio_mode(GPIO_EMU_MUX2 | GPIO_OUT); ++ ++ request_irq(EZX_IRQ_USB4V, &emu_irq, SA_INTERRUPT, "usb 4v", NULL); ++ request_irq(EZX_IRQ_USB1V, &emu_irq, SA_INTERRUPT, "usb 1v", NULL); ++ ++ pxa_set_udc_info(&ezx_udc_info); ++ ++ if(ezx_pcap_read_bit(SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V)) ++ emu_switch_to_default(); ++ else ++ emu_switch_to_nothing(); ++ ++ return 0; ++} ++ ++static int ezx_emu_remove(struct platform_device *dev) ++{ ++ free_irq(EZX_IRQ_USB4V, NULL); ++ free_irq(EZX_IRQ_USB1V, NULL); ++ ++ return 0; ++} ++ ++static int ezx_emu_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ emu_switch_to_nothing(); ++ return 0; ++} ++ ++static int ezx_emu_resume(struct platform_device *dev) ++{ ++ emu_switch_to_default(); ++ return 0; ++} ++ ++/* USB Device Controller */ ++static int udc_connected_status; ++static void ezx_udc_command(int cmd) ++{ ++ switch (cmd) { ++ case PXA2XX_UDC_CMD_DISCONNECT: ++ printk(KERN_NOTICE "USB cmd disconnect\n"); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,0); ++ udc_connected_status = 0; ++ break; ++ case PXA2XX_UDC_CMD_CONNECT: ++ printk(KERN_NOTICE "USB cmd connect\n"); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU,1); ++ udc_connected_status = 1; ++ break; ++ } ++} ++ ++static int ezx_udc_is_connected(void) ++{ ++ return udc_connected_status; ++} ++ ++static struct pxa2xx_udc_mach_info ezx_udc_info __initdata = { ++ .udc_is_connected = ezx_udc_is_connected, ++ .udc_command = ezx_udc_command, ++}; ++ ++static struct platform_driver ezxemu_driver = { ++ .probe = ezx_emu_probe, ++ .remove = ezx_emu_remove, ++ .suspend = ezx_emu_suspend, ++ .resume = ezx_emu_resume, ++ .driver = { ++ .name = "ezx-emu", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++int __init ezx_emu_init(void) ++{ ++ return platform_driver_register(&ezxemu_driver); ++} ++ ++void ezx_emu_fini(void) ++{ ++ return platform_driver_unregister(&ezxemu_driver); ++} ++ ++module_init(ezx_emu_init); ++module_exit(ezx_emu_fini); ++ ++MODULE_DESCRIPTION("Motorola Enchanced Mini Usb driver"); ++MODULE_AUTHOR("Daniel Ribeiro "); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-06-02 20:32:32.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-06-02 20:32:34.000000000 -0300 +@@ -73,6 +73,7 @@ + + endchoice + ++ + endif + + if PXA_EZX +@@ -117,6 +118,28 @@ + config EZX_MCI_TF + bool + ++config EZX_EMU ++ bool "Motorola Enchanced Mini Usb" ++ depends on EZX_PCAP ++ ++if EZX_EMU ++ ++choice ++ prompt "Select default EMU mode" ++ ++config EZX_EMU_USB ++ bool "USB" ++ ++config EZX_EMU_UART ++ bool "UART" ++ ++config EZX_EMU_NOTHING ++ bool "nothing" ++ ++endchoice ++ ++endif ++ + endif + + endmenu +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-06-02 20:32:28.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-02 20:32:34.000000000 -0300 +@@ -150,11 +150,35 @@ + .resource = ezxpcap_resources, + }; + ++/* EMU */ ++static struct resource ezxemu_resources[] = { ++ [0] = { ++ .start = EZX_IRQ_USB4V, ++ .end = EZX_IRQ_USB4V, ++ .flags = IORESOURCE_IRQ, ++ }, ++ [1] = { ++ .start = EZX_IRQ_USB1V, ++ .end = EZX_IRQ_USB1V, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device ezxemu_device = { ++ .name = "ezx-emu", ++ .id = -1, ++ .dev = { ++ .parent = &ezxpcap_device.dev, ++ }, ++ .num_resources = ARRAY_SIZE(ezxemu_resources), ++ .resource = ezxemu_resources, ++}; + + static struct platform_device *devices[] __initdata = { + &ezxssp_device, + &ezxbp_device, + &ezxpcap_device, ++ &ezxemu_device, + }; + + /* PM */ +Index: linux-2.6.21/arch/arm/mach-pxa/Makefile +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-06-02 20:32:28.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-06-02 20:32:34.000000000 -0300 +@@ -26,6 +26,7 @@ + obj-$(CONFIG_PXA_EZX_E6) += ezx-e6.o + obj-$(CONFIG_EZX_BP) += ezx-bp.o + obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o ++obj-$(CONFIG_EZX_EMU) += ezx-emu.o + + # Support for blinky lights + led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-enable-stuart.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-enable-stuart.patch new file mode 100755 index 0000000000..6f1a2c1ba4 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-enable-stuart.patch @@ -0,0 +1,99 @@ +Index: linux-2.6.21/arch/arm/boot/compressed/head.S +=================================================================== +--- linux-2.6.21.orig/arch/arm/boot/compressed/head.S 2007-05-19 11:22:56.000000000 -0300 ++++ linux-2.6.21/arch/arm/boot/compressed/head.S 2007-05-19 11:50:29.000000000 -0300 +@@ -10,6 +10,7 @@ + */ + #include + ++#define DEBUG + /* + * Debugging stuff + * +@@ -117,6 +118,8 @@ + mov r0, r0 + .endr + ++ inituart r10, r11 ++ + mov r1, #0x300 @ mach_id 0x363 is official EZX + orr r1, r1, #0x63 @ bootloader JUMP doesn't set r1 + +Index: linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/uncompress.h 2007-05-19 11:22:56.000000000 -0300 ++++ linux-2.6.21/include/asm-arm/arch-pxa/uncompress.h 2007-05-19 11:30:38.000000000 -0300 +@@ -19,9 +19,9 @@ + + static inline void putc(char c) + { +-/* while (!(UART[5] & 0x40)) ++ while (!(UART[5] & 0x40)) + barrier(); +- UART[0] = c;*/ ++ UART[0] = c; + } + + /* +Index: linux-2.6.21/include/asm-arm/arch-pxa/debug-macro.S +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/debug-macro.S 2007-05-19 11:30:54.000000000 -0300 ++++ linux-2.6.21/include/asm-arm/arch-pxa/debug-macro.S 2007-05-19 11:49:35.000000000 -0300 +@@ -14,11 +14,52 @@ + #include "hardware.h" + + .macro addruart,rx +- mrc p15, 0, \rx, c1, c0 +- tst \rx, #1 @ MMU enabled? +- moveq \rx, #0x40000000 @ physical +- movne \rx, #io_p2v(0x40000000) @ virtual +- orr \rx, \rx, #0x00100000 ++@ mrc p15, 0, \rx, c1, c0 ++@ tst \rx, #1 @ MMU enabled? ++ mov \rx, #0x40000000 ++@ moveq \rx, #0x40000000 @ physical ++@ movne \rx, #io_p2v(0x40000000) @ virtual ++ orr \rx, \rx, #0x00700000 ++ .endm ++ ++ .macro inituart,rd,rx ++ ldr \rd, =0x41300004 @ CKEN ++ ldr \rx, [\rd] ++ orr \rx, \rx, #0x20 ++ str \rx, [\rd] ++ ++ ldr \rd, =0x40E0005C ++ ldr \rx, [\rd] ++ bic \rx, \rx, #0xF0000000 @ clear GPIO46/47 config ++ orr \rx, \rx, #0x60000000 @ set GPIO46: AF2, GPIO47: AF1 ++ str \rx, [\rd] ++ ldr \rd, =0x40E00010 ++ ldr \rx, [\rd] ++ bic \rx, \rx, #0x0000c000 @ clear GPIO46/47 direction ++ orr \rx, \rx, #0x00008000 @ set GPIO 47 out, 46 in ++ str \rx, [\rd] ++ ++ addruart \rd ++ mov \rx, #0x83 @ DLAB = 1 ++ strb \rx, [\rd, #0x0c] ++ ++ mov \rx, #0x08 @ Divisor 8 => 115200 bps ++ strb \rx, [\rd, #0x00] ++ ++ mov \rx, #0x00 ++ strb \rx, [\rd, #0x04] @ Divisor high = 0 ++ ++ mov \rx, #0x03 ++ strb \rx, [\rd, #0x0c] @ DLAB = 0, n81 ++ ++ mov \rx, #0x00 ++ strb \rx, [\rd, #0x10] @ MCR = 0 ++ ++ mov \rx, #0x00 ++ strb \rx, [\rd, #0x28] @ disable autobaud ++ ++ mov \rx, #0x40 ++ strb \rx, [\rd, #0x04] @ IER UUE (UART Enable) + .endm + + #define UART_SHIFT 2 diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-mtd-map.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-mtd-map.patch new file mode 100755 index 0000000000..7ef42f0ffc --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-mtd-map.patch @@ -0,0 +1,274 @@ +Index: linux-2.6.21/drivers/mtd/maps/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/mtd/maps/Kconfig 2007-04-26 00:08:32.000000000 -0300 ++++ linux-2.6.21/drivers/mtd/maps/Kconfig 2007-04-26 20:49:33.000000000 -0300 +@@ -595,6 +595,28 @@ + help + This enables access to the flash chip on the Sharp SL Series of PDAs. + ++config MTD_EZX ++ tristate "Map driver for Motorola EZX Platform" ++ depends on MTD && PXA_EZX ++ ++if MTD_EZX ++ ++choice ++ prompt "Select partition mapping for EZX platform" ++ ++config MTD_EZX_A780 ++ bool "A780/E680 Original Mapping" ++ ++config MTD_EZX_A780_ALTERNATE ++ bool "A780/E680 Alternate Mapping for BLOB2" ++ ++config MTD_EZX_E2 ++ bool "E2 Original Mapping" ++ ++endchoice ++ ++endif ++ + config MTD_PLATRAM + tristate "Map driver for platform device RAM (mtd-ram)" + depends on MTD +Index: linux-2.6.21/drivers/mtd/maps/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/mtd/maps/Makefile 2007-04-26 00:08:32.000000000 -0300 ++++ linux-2.6.21/drivers/mtd/maps/Makefile 2007-04-26 20:30:30.000000000 -0300 +@@ -72,3 +72,4 @@ + obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o + obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o + obj-$(CONFIG_MTD_TQM834x) += tqm834x.o ++obj-$(CONFIG_MTD_EZX) += ezx-flash.o +Index: linux-2.6.21/drivers/mtd/maps/ezx-flash.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/mtd/maps/ezx-flash.c 2007-04-26 20:30:30.000000000 -0300 +@@ -0,0 +1,227 @@ ++/* ++ * $Id: $ ++ * ++ * Map driver for the PXA27x ++ * ++ * Author: Harald Welte ++ * Copyright: (C) 2001 MontaVista Software Inc. ++ * ++ * 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. ++ * ++ * Mar 3, 2007 - (Daniel Ribeiro) Alternate partition table ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#define WINDOW_ADDR 0x0 ++#define WINDOW_SIZE (32*1024*1024) ++#define WINDOW_CACHE_ADDR 0x0 ++#define WINDOW_CACHE_SIZE 0x1a00000 ++ ++static void pxa27x_map_inval_cache(struct map_info *map, unsigned long from, ++ ssize_t len) ++{ ++#if 0 ++ unsigned long endaddress, i, j; ++ endaddress = from + len -1; ++ from &= ~(32-1); ++ endaddress &= ~(32-1); ++ for (i = from; i <= endaddress; i += 32) ++ asm("mcr p15, 0, %0, c7, c6, 1"::"r"(i)); ++ ++ asm( "mrc p15, 0, %0, c2, c0, 0\n" ++ "mov %0, %0\n" ++ "sub pc, pc #4" ++ :"=r"(j)); ++#else ++ consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); ++#endif ++} ++ ++ ++struct map_info pxa27x_map = { ++ .name = "PXA27x flash", ++ .size = WINDOW_SIZE, ++ .phys = WINDOW_ADDR, ++ .inval_cache = &pxa27x_map_inval_cache, ++}; ++ ++#if defined CONFIG_MTD_EZX_A780_ALTERNATE ++static struct mtd_partition pxa27x_partitions[] = { ++ { ++ .name = "Bootloader (RO)", ++ .size = 0x00020000, ++ .offset = 0, ++ .mask_flags = MTD_WRITEABLE, ++ }, { ++ .name = "Bootloader 2", ++ .size = 0x00020000, ++ .offset = 0x00020000, ++ } , { ++ .name = "Kernel 1", ++ .size = 0x000e0000, // 896KB ++ .offset = 0x00040000, ++ } , { ++ .name = "rootfs", ++ .size = 0x01760000, ++ .offset = 0x00120000, ++ } , { ++ .name = "Kernel 2", ++ .size = 0x00180000, // 1.5MB ++ .offset = 0x01880000, ++ } , { ++ .name = "VFM_Filesystem", ++ .size = 0x005a0000, ++ .offset = 0x01a00000, ++ } , { ++ .name = "setup", ++ .size = 0x00020000, ++ .offset = 0x01fa0000, ++ } , { ++ .name = "Logo", ++ .size = 0x00020000, ++ .offset = 0x01fc0000, ++ }, ++}; ++#elif defined CONFIG_MTD_EZX_A780 ++static struct mtd_partition pxa27x_partitions[] = { ++ { ++ .name = "Bootloader", ++ .size = 0x00020000, ++ .offset = 0, ++ .mask_flags = MTD_WRITEABLE, ++ }, { ++ .name = "Kernel", ++ .size = 0x000e0000, ++ .offset = 0x00020000, ++ } , { ++ .name = "rootfs", ++ .size = 0x018e0000, ++ .offset = 0x00120000, ++ } , { ++ .name = "VFM_Filesystem", ++ .size = 0x00580000, ++ .offset = 0x01a00000, ++ } , { ++ .name = "setup", ++ .size = 0x00020000, ++ .offset = 0x01fa0000, ++ } , { ++ .name = "Logo", ++ .size = 0x00020000, ++ .offset = 0x01fc0000, ++ }, ++}; ++#else ++#error "please define partition for this PXA27x implementation" ++#endif ++ ++ ++static struct mtd_info *mymtd; ++static struct mtd_partition *parsed_parts; ++ ++static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; ++ ++static int __init init_pxa27x(void) ++{ ++ struct mtd_partition *parts; ++ int nb_parts = 0; ++ int parsed_nr_parts = 0; ++ char *part_type = "static"; ++ ++ pxa27x_map.bankwidth = (BOOT_DEF & 1) ? 2 : 4; ++ ++ printk("Probing PXA27x flash at physical address 0x%08x (%d-bit bankwidth)\n", ++ WINDOW_ADDR, pxa27x_map.bankwidth * 8); ++ pxa27x_map.virt = ioremap(pxa27x_map.phys, pxa27x_map.size); ++ ++ if (!pxa27x_map.virt) { ++ printk("Failed to ioremap\n"); ++ return -EIO; ++ } ++ ++ mymtd = do_map_probe("cfi_probe", &pxa27x_map); ++ if (!mymtd) { ++ iounmap((void *)pxa27x_map.virt); ++ return -ENXIO; ++ } ++ mymtd->owner = THIS_MODULE; ++ ++#if 0 ++ /* ioremap the first flash chip as cacheable */ ++ pxa27x_map.cached = ioremap_cached(pxa27x_map.phys, pxa27x_map.size); ++ if (!pxa27x_map.cached) { ++ printk("Failed to do cacheable-ioremap\n"); ++ iounmap((void *)pxa27x_map.virt); ++ return -EIO; ++ } ++#endif ++ simple_map_init(&pxa27x_map); ++ ++ if (parsed_nr_parts == 0) { ++ int ret = parse_mtd_partitions(mymtd, probes, &parsed_parts, 0); ++ ++ if (ret > 0) { ++ part_type = "RedBoot"; ++ parsed_nr_parts = ret; ++ } ++ } ++ ++ if (parsed_nr_parts > 0) { ++ parts = parsed_parts; ++ nb_parts = parsed_nr_parts; ++ } else { ++ parts = pxa27x_partitions; ++ nb_parts = ARRAY_SIZE(pxa27x_partitions); ++ } ++ ++ if (nb_parts) { ++ printk(KERN_NOTICE "Using %s partition definition\n", part_type); ++ add_mtd_partitions(mymtd, parts, nb_parts); ++ } else { ++ add_mtd_device(mymtd); ++ } ++#if 0 ++ if (ret = ezx_partition_init()) ++#endif ++ return 0; ++} ++ ++static void __exit cleanup_pxa27x(void) ++{ ++ if (mymtd) { ++ del_mtd_partitions(mymtd); ++ map_destroy(mymtd); ++ if (parsed_parts) ++ kfree(parsed_parts); ++ } ++ if (pxa27x_map.virt) ++ iounmap((void *)pxa27x_map.virt); ++ if (pxa27x_map.cached) ++ iounmap((void *)pxa27x_map.cached); ++ return; ++} ++ ++module_init(init_pxa27x); ++module_exit(cleanup_pxa27x); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Harald Welte "); ++MODULE_DESCRIPTION("MTD map driver for Motorola EZX platform"); diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-pcap.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-pcap.patch new file mode 100755 index 0000000000..6af6317a6e --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-pcap.patch @@ -0,0 +1,1242 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx-pcap.c 2007-06-07 21:39:37.000000000 -0300 +@@ -0,0 +1,472 @@ ++/* Driver for Motorola PCAP2 as present in EZX phones ++ * ++ * This is both a SPI device driver for PCAP itself, as well as ++ * an IRQ demultiplexer for handling PCAP generated events such as ++ * headphone jack sense by downstream drivers. ++ * ++ * Copyright (C) 2006 Harald Welte ++ * Copyright (C) 2007 Daniel Ribeiro ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "ezx.h" ++ ++#if 0 ++#define DEBUGP(x, args...) printk(x, ## args) ++#else ++#define DEBUGP(x, args...) ++#endif ++ ++extern unsigned long ezx_ssp_pcap_putget(ulong); ++ ++int ezx_pcap_write(u_int8_t reg_num, u_int32_t value) ++{ ++ value &= SSP_PCAP_REGISTER_VALUE_MASK; ++ value |= SSP_PCAP_REGISTER_WRITE_OP_BIT ++ | (reg_num<> SSP_PCAP_REGISTER_ADDRESS_SHIFT; ++ ++ ret = ezx_pcap_read(reg_num, &tmp); ++ if (ret < 0) ++ return ret; ++ ++ if (to == 0) ++ tmp &= ~bit; ++ else ++ tmp |= bit; ++ ++ return ezx_pcap_write(reg_num, tmp); ++} ++EXPORT_SYMBOL_GPL(ezx_pcap_bit_set); ++ ++int ezx_pcap_read_bit(u_int32_t bit) ++{ ++ int ret; ++ u_int32_t tmp; ++ u_int8_t reg_num = (bit & SSP_PCAP_REGISTER_ADDRESS_MASK) ++ >> SSP_PCAP_REGISTER_ADDRESS_SHIFT; ++ ++ ret = ezx_pcap_read(reg_num, &tmp); ++ if (ret < 0) ++ return ret; ++ ++ return tmp & (bit & SSP_PCAP_REGISTER_VALUE_MASK); ++} ++EXPORT_SYMBOL_GPL(ezx_pcap_read_bit); ++ ++/* /proc/pcap support */ ++#ifdef CONFIG_PROC_FS ++ ++static struct proc_dir_entry *proc_pcap; ++ ++char *pcap_registers[] = { ++ "ISR\t", "MSR\t", "PSTAT\t", NULL, NULL, NULL, "VREG2\t", "VREG\t", ++ "BATT_DAC", "ADC1\t", "ADC2\t", "AUD_CODEC", "AUD_RX_AMPS", ++ "AUD_ST_DAC", NULL, NULL, NULL, NULL, NULL, NULL, "BUSCTRL\t", ++ "PERIPH\t", NULL, NULL, "LOWPWR\t", NULL, "AUD_TX_AMPS", "GP\t", ++ NULL, NULL, NULL, NULL, NULL ++}; ++ ++static int pcap_read_proc(char *page, char **start, off_t off, int count, ++ int *eof, void *data_unused) ++{ ++ int len = 0; ++ u_int8_t r; ++ u_int32_t v; ++ off_t begin = 0; ++ ++ for(r=0;r<32;r++) { ++ if (pcap_registers[r] == NULL) ++ continue; ++ ezx_pcap_read(r, &v); ++ len += sprintf(page+len, "%s\t%08X\n", pcap_registers[r], v); ++ if(len + begin > off + count) ++ goto done; ++ if(len + begin < off) { ++ begin += len; ++ len = 0; ++ } ++ } ++ *eof = 1; ++done: ++ if (off >= len+begin) ++ return 0; ++ *start = page + (off-begin); ++ return ((count < begin+len-off) ? count : begin+len-off); ++} ++#endif ++ ++void ezx_pcap_vibrator_level(u_int32_t value) ++{ ++ u_int32_t tmp; ++ ++ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp); ++ ++ tmp &= (~SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK); ++ tmp |= value; ++ ++ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp); ++} ++EXPORT_SYMBOL_GPL(ezx_pcap_vibrator_level); ++ ++static int __init pcap_init(void) ++{ ++ /* initialize registers */ ++#warning FIXME: pcap_init still chip level ++ /* implement a per board pcap init reg array? */ ++ ++ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, PCAP_MASK_ALL_INTERRUPT); ++ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER); ++ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL, 1); ++// ezx_pcap_vibrator_level(PCAP_VIBRATOR_VOLTAGE_LEVEL3); ++ ++ /* set SW1 sleep to keep SW1 1.3v in sync mode */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10, 0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11, 0); ++ /* SW1 active in sync mode */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01, 0); ++ /* at SW1 -core voltage to 1.30V */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS, 0); ++ ++ /* when STANDY2 PIN ACTIVE (high) set V3-- sram V8 -- pll off */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_STBY, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR, 0); ++ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_STBY, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR, 0); ++ ++ /* when STANDY2 PIN ACTIVE (high) set V4-- lcd only for e680 V6 --- ++ * camera for e680 */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_STBY, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR, 1); ++ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_STBY, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR, 0); ++ ++ /* set Vc to low power mode when AP sleep */ ++ //SSP_PCAP_bit_set( SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY); ++ ++ /* set VAUX2 to voltage 2.775V and low power mode when AP sleep */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0, 0); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR, 1); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, 1); ++ ++// PGSR(GPIO34_TXENB) |= GPIO_bit(GPIO34_TXENB); ++ ++ return 0; ++} ++/* MMC/SD specific functions */ ++ ++void ezx_pcap_mmcsd_voltage(u_int32_t bits) ++{ ++ unsigned int tmp; ++ ezx_pcap_read(SSP_PCAP_ADJ_AUX_VREG_REGISTER, &tmp); ++#if defined(CONFIG_EZX_MCI_SD) ++ tmp &= 0xffffff9f; /* zero all vaux2 bits */ ++ tmp |= (bits & 0x3) << 5; ++#elif defined(CONFIG_EZX_MCI_TF) ++ tmp &= 0xfffff0ff; /* zero all vaux3 bits */ ++ tmp |= (bits & 0xf) << 8; ++#endif ++ ezx_pcap_write(SSP_PCAP_ADJ_AUX_VREG_REGISTER, tmp); ++} ++EXPORT_SYMBOL(ezx_pcap_mmcsd_voltage); ++ ++int ezx_pcap_mmcsd_power(int on) ++{ ++ if (on > 0) on = 1; ++ else on = 0; ++#if defined(CONFIG_EZX_MCI_SD) ++ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN, on); ++#elif defined(CONFIG_EZX_MCI_TF) ++ return ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN, on); ++#endif ++} ++EXPORT_SYMBOL_GPL(ezx_pcap_mmcsd_power); ++ ++/* IRQ Handling */ ++ ++/* Array indexed by BIT POSITION of PCAP register, returns IRQ number */ ++static unsigned int pcap2irq[] = { ++ [0] = EZX_IRQ_ADCDONE, ++ [1] = EZX_IRQ_TS, ++ [2] = 0, /* 1HZ */ ++ [3] = 0, /* WH */ ++ [4] = 0, /* WL */ ++ [5] = 0, /* TODA */ ++ [6] = EZX_IRQ_USB4V, ++ [7] = 0, /* ONOFF */ ++ [8] = 0, /* ONOFF2 */ ++ [9] = EZX_IRQ_USB1V, ++ [10] = 0, /* MOBPORT */ ++ [11] = EZX_IRQ_MIC, ++ [12] = EZX_IRQ_HEADJACK, ++ [13] = 0, /* ST */ ++ [14] = 0, /* PC */ ++ [15] = 0, /* WARM */ ++ [16] = 0, /* EOL */ ++ [17] = 0, /* CLK */ ++ [18] = 0, /* SYSRST */ ++ [19] = 0, ++ [20] = EZX_IRQ_ADCDONE2, ++ [21] = 0, /* SOFTRESET */ ++ [22] = 0, /* MNEXB */ ++}; ++ ++/* Array indexed by IRQ NUMBER, returns PCAP absolute value */ ++static unsigned int irq2pcap[] = { ++ [EZX_IRQ_USB4V] = SSP_PCAP_ADJ_BIT_ISR_USB4VI, ++ [EZX_IRQ_USB1V] = SSP_PCAP_ADJ_BIT_ISR_USB1VI, ++ [EZX_IRQ_HEADJACK] = SSP_PCAP_ADJ_BIT_ISR_A1I, ++ [EZX_IRQ_MIC] = SSP_PCAP_ADJ_BIT_ISR_MB2I, ++ [EZX_IRQ_ADCDONE] = SSP_PCAP_ADJ_BIT_ISR_ADCDONEI, ++ [EZX_IRQ_TS] = SSP_PCAP_ADJ_BIT_ISR_TSI, ++ [EZX_IRQ_ADCDONE2] = SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, ++}; ++ ++static void pcap_ack_irq(unsigned int irq) ++{ ++ DEBUGP("pcap_ack_irq: %u\n", irq); ++ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, irq2pcap[irq]); ++} ++ ++static void pcap_mask_irq(unsigned int irq) ++{ ++ u_int32_t reg; ++ ++ DEBUGP("pcap_mask_irq: %u\n", irq); ++ ++ /* this needs to be atomic... but we're not on SMP so it is */ ++ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, ®); ++ reg |= irq2pcap[irq]; ++ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, reg); ++} ++ ++static void pcap_unmask_irq(unsigned int irq) ++{ ++ u_int32_t tmp; ++ DEBUGP("pcap_unmask_irq: %u\n", irq); ++ ++ /* this needs to be atomic... but we're not on SMP so it is */ ++ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, &tmp); ++ tmp &= ~irq2pcap[irq]; ++ ezx_pcap_write(SSP_PCAP_ADJ_MSR_REGISTER, tmp); ++} ++ ++static struct irq_chip pcap_chip = { ++ .ack = pcap_ack_irq, ++ .mask = pcap_mask_irq, ++ .unmask = pcap_unmask_irq, ++}; ++ ++/* handler for interrupt received from PCAP via GPIO */ ++static void pcap_irq_demux_handler(unsigned int irq, struct irq_desc *desc) ++{ ++ int i; ++ const unsigned int cpu = smp_processor_id(); ++ u_int32_t reg, mask; ++ ++ spin_lock(&desc->lock); ++ ++ DEBUGP("pcap_irq_demux_handler(%u,,) entered\n", irq); ++ ++ desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); ++ ++ if (unlikely(desc->status & IRQ_INPROGRESS)) { ++ DEBUGP("irq busy, masking it off\n"); ++ desc->status |= (IRQ_PENDING | IRQ_MASKED); ++ desc->chip->mask(irq); ++ desc->chip->ack(irq); ++ goto out_unlock; ++ } ++ ++ kstat_cpu(cpu).irqs[irq]++; ++ desc->chip->ack(irq); ++ desc->status |= IRQ_INPROGRESS; ++ ++ do { ++ if (unlikely((desc->status & ++ (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == ++ (IRQ_PENDING | IRQ_MASKED))) { ++ DEBUGP("dealing with pending IRQ, unmasking\n"); ++ desc->chip->unmask(irq); ++ desc->status &= ~IRQ_MASKED; ++ } ++ ++ desc->status &= ~IRQ_PENDING; ++ ++ ezx_pcap_read(SSP_PCAP_ADJ_ISR_REGISTER, ®); ++ ezx_pcap_read(SSP_PCAP_ADJ_MSR_REGISTER, &mask); ++ DEBUGP("pcap_irq_demux_handler: ISR=0x%08x MSR=0x%08x\n", reg, mask); ++ ++ for (i = ARRAY_SIZE(pcap2irq)-1; i >= 0; i--) { ++ unsigned int pirq = pcap2irq[i]; ++ if (pirq == 0) ++ continue; ++ ++ if ((reg & (1 << i)) && !(mask & (1 << i))) { ++ struct irq_desc *subdesc; ++ DEBUGP("found irq %u\n", pirq); ++ subdesc = irq_desc + pirq; ++ ++ kstat_cpu(cpu).irqs[pirq]++; ++ subdesc->chip->ack(pirq); ++ ++ spin_unlock(&desc->lock); ++ handle_IRQ_event(pirq, subdesc->action); ++ spin_lock(&desc->lock); ++ } ++ } ++ ++ } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); ++ ++ desc->status &= ~IRQ_INPROGRESS; ++ ++out_unlock: ++ spin_unlock(&desc->lock); ++} ++ ++static int ezx_pcap_remove(struct platform_device *pdev) ++{ ++ int irq; ++ DEBUGP("exz_pcap_remove entered\n"); ++ ++ set_irq_chained_handler(IRQ_GPIO1, NULL); ++ ++ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { ++ set_irq_chip(irq, NULL); ++ set_irq_handler(irq, NULL); ++ set_irq_flags(irq, 0); ++ } ++ ++ return 0; ++} ++ ++static int __init ezx_pcap_probe(struct platform_device *pdev) ++{ ++ unsigned int irq; ++ DEBUGP("ezx_pcap_probe entered\n"); ++ ++ pcap_init(); ++ ++ set_irq_type(IRQ_GPIO1, IRQT_RISING); ++ /* set up interrupt demultiplexing code for PCAP2 irqs */ ++ for (irq = EZX_IRQ(0); irq <= EZX_IRQ(6); irq++) { ++ set_irq_chip(irq, &pcap_chip); ++ set_irq_handler(irq, handle_edge_irq); ++ set_irq_flags(irq, IRQF_VALID); ++ } ++ set_irq_chained_handler(IRQ_GPIO1, pcap_irq_demux_handler); ++ ++ printk("ezx-pcap: ssp driver registered\n"); ++ ++ return 0; ++} ++ ++static int ezx_pcap_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ DEBUGP("pcap suspend!\n"); ++ return 0; ++} ++ ++static int ezx_pcap_resume(struct platform_device *dev) ++{ ++ DEBUGP("pcap resume!\n"); ++ /* ack all irqs */ ++ ezx_pcap_write(SSP_PCAP_ADJ_ISR_REGISTER, PCAP_CLEAR_INTERRUPT_REGISTER); ++ return 0; ++} ++ ++static struct platform_driver ezxpcap_driver = { ++ .probe = ezx_pcap_probe, ++ .remove = ezx_pcap_remove, ++ .suspend = ezx_pcap_suspend, ++ .resume = ezx_pcap_resume, ++ .driver = { ++ .name = "ezx-pcap", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init ezx_pcap_init(void) ++{ ++ DEBUGP("ezx_pcap_init entered\n"); ++ ++#ifdef CONFIG_PROC_FS ++ if((proc_pcap = create_proc_entry("pcap", 0, NULL))) ++ proc_pcap->read_proc = pcap_read_proc; ++#endif ++ ++ return platform_driver_register(&ezxpcap_driver); ++} ++ ++static void __exit ezx_pcap_exit(void) ++{ ++#ifdef CONFIG_PROC_FS ++ if (proc_pcap) ++ remove_proc_entry("pcap", NULL); ++#endif ++ ++ return platform_driver_unregister(&ezxpcap_driver); ++} ++ ++module_init(ezx_pcap_init); ++module_exit(ezx_pcap_exit); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Harald Welte"); ++MODULE_DESCRIPTION("SPI Driver for Motorola PCAP2"); ++ +Index: linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/include/asm-arm/arch-pxa/ezx-pcap.h 2007-06-03 11:14:40.000000000 -0300 +@@ -0,0 +1,665 @@ ++/* (c) Copyright Motorola Beijing 2002 all rights reserved. ++ ++ Project Name : EZX ++ Project No. : ++ Title : ++ File Name : ++ Description : ++ ++ ************** REVISION HISTORY ********************************************** ++ Date Author Reference ++ ======== ========== ========================== ++ 2002-07-01 weiqiang lin create ++*/ ++#ifndef SSP_PCAP_H ++#define SSP_PCAP_H ++ ++#define SSP_vibrate_start_command() SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ ++ SSP_PCAP_bit_set(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) ++ ++#define SSP_vibrate_stop_command() SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN); \ ++ SSP_PCAP_bit_clean(SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN) ++ ++#define SSP_PCAP_REGISTER_VALUE_LENGTH 16 ++ ++#define SSP_PCAP_REGISTER_WRITE_OP_BIT 0x80000000 ++#define SSP_PCAP_REGISTER_READ_OP_BIT 0x00000000 ++ ++#define SSP_PCAP_REGISTER_VALUE_UP_WORD_MASK 0xffff0000 ++#define SSP_PCAP_REGISTER_VALUE_DOWN_WORD_MASK 0x0000ffff ++ ++#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff ++#define SSP_PCAP_REGISTER_VALUE_MASK 0x01ffffff ++#define SSP_PCAP_REGISTER_ADDRESS_MASK 0x7c000000 ++#define SSP_PCAP_REGISTER_ADDRESS_SHIFT 26 ++#define SSP_PCAP_REGISTER_NUMBER 32 ++ ++#define SSP_PCAP_ADC_START_VALUE_SET_MASK 0xfffffc00 ++#define SSP_PCAP_ADC_START_VALUE 0x000001dd ++ ++ ++#define SSP_PCAP_PHONE_CDC_CLOCK_MASK 0x000001c0 ++#define SSP_PCAP_STEREO_SAMPLE_RATE_MASK 0x00000f00 ++#define SSP_PCAP_STEREO_BCLK_TIME_SLOT_MASK 0x00018000 ++#define SSP_PCAP_STEREO_CLOCK_MASK 0x0000001c ++#define SSP_PCAP_DIGITAL_AUDIO_MODE_MASK 0x00006000 ++#define SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK 0x000e0000 ++#define SSP_PCAP_MONO_PGA_MASK 0x00180000 ++ ++#define SSP_PCAP_VIBRATOR_VOLTAGE_LEVEL_MASK 0x00300000 ++ ++#define SSP_PCAP_AUDIO_IN_GAIN_MASK 0x0000001f ++#define SSP_PCAP_AUDIO_IN_GAIN_SHIFT 0 ++#define SSP_PCAP_AUDIO_OUT_GAIN_MASK 0x0001e000 ++#define SSP_PCAP_AUDIO_OUT_GAIN_SHIFT 13 ++ ++ ++#define SSP_PCAP_ADD1_VALUE_MASK 0x000003ff ++#define SSP_PCAP_ADD1_VALUE_SHIFT 0 ++#define SSP_PCAP_ADD2_VALUE_MASK 0x000ffc00 ++#define SSP_PCAP_ADD2_VALUE_SHIFT 10 ++ ++ ++#define PCAP_AUDIO_IN_GAIN_MAX_VALUE 31 ++#define PCAP_AUDIO_OUT_GAIN_MAX_VALUE 15 ++ ++#define PCAP_CLEAR_INTERRUPT_REGISTER 0x00141fdf ++#define PCAP_MASK_ALL_INTERRUPT 0x0013ffff ++ ++#define SSP_PCAP_TS_KEEPER_TIMER 100 /* 1 second */ ++#define START_ADC_DELAY_TIMER 1991 /* 540 us */ ++ ++#define SSP_SEND_PM_ALART_INTERVAL 1000 *HZ/1000 /* 1 second */ ++#define SSP_SEND_MSG_USB_ACCESSORY_INFO_DEBOUNCE 200 *HZ/1000 /* 200ms */ ++ ++struct ssp_interrupt_info ++{ ++ u32 type; ++ u32 status; ++ void* privdata; ++}; ++ ++#ifndef U8 ++#define U8 unsigned char ++#endif ++ ++#ifndef U32 ++#define U32 unsigned long ++#endif ++ ++#ifndef U16 ++#define U16 unsigned short ++#endif ++ ++#ifndef P_U16 ++#define P_U16 U16* ++#endif ++ ++#ifndef P_U32 ++#define P_U32 U32* ++#endif ++ ++#define SSP_SELECT_BUFFER (volatile unsigned long *)(0xf4000000) ++ ++#define SSP_SR_RNE 0x00000008 ++#define SSP_PCAP_BASE 0x00001000 ++/************************ STRUCTURES, ENUMS, AND TYPEDEFS **************************/ ++typedef enum accessoryStatus ++{ ++ ACCESSORY_DEVICE_STATUS_DETACHED = 0, ++ ACCESSORY_DEVICE_STATUS_ATTACHED , ++ ACCESSORY_DEVICE_STATUS_UNKNOW =0x000000ff ++}ACCESSORY_DEVICE_STATUS; ++ ++typedef enum accessoryType ++{ ++ ACCESSORY_DEVICE_NONE = 0, ++ ACCESSORY_DEVICE_SERIAL_PORT , ++ ACCESSORY_DEVICE_USB_PORT , ++ ACCESSORY_DEVICE_UNKNOW =0x000000ff ++}ACCESSORY_TYPE; ++ ++typedef enum pcapReturnStatus ++{ ++ SSP_PCAP_SUCCESS = 0, ++ SSP_PCAP_ERROR_REGISTER = SSP_PCAP_BASE+1, ++ SSP_PCAP_ERROR_VALUE = SSP_PCAP_BASE+2, ++ ++ SSP_PCAP_NOT_RUN = SSP_PCAP_BASE+0xff ++}SSP_PCAP_STATUS; ++ ++typedef enum pcapPortType ++{ ++ SSP_PCAP_SERIAL_PORT = 0x00000000, ++ SSP_PCAP_LOW_USB_PORT = 0x00000001, ++ SSP_PCAP_HIGH_USB_PORT = 0x00000002, ++ SSP_PCAP_UNKNOW_PORT = 0x000000ff ++}SSP_PCAP_PORT_TYPE; ++ ++typedef enum pcapInitDriverType ++{ ++ SSP_PCAP_TS_OPEN = 0x00000000, ++ SSP_PCAP_AUDIO_OPEN = 0x00000001, ++ SSP_PCAP_UNKNOW_DRIVER_OPEN = 0x000000ff ++}SSP_PCAP_INIT_DRIVER_TYPE; ++ ++ ++typedef enum pcapReturnBitStatus ++{ ++ SSP_PCAP_BIT_ZERO = 0x00000000, ++ SSP_PCAP_BIT_ONE = 0x00000001, ++ SSP_PCAP_BIT_ERROR = 0xff000000 ++}SSP_PCAP_BIT_STATUS; ++ ++typedef enum pcapCDCClkType ++{ ++ PCAP_CDC_CLK_IN_13M0 = 0x00000000, ++ PCAP_CDC_CLK_IN_15M36 = 0x00000040, ++ PCAP_CDC_CLK_IN_16M8 = 0x00000080, ++ PCAP_CDC_CLK_IN_19M44 = 0x000000c0, ++ PCAP_CDC_CLK_IN_26M0 = 0x00000100 ++}PHONE_CDC_CLOCK_TYPE; ++ ++typedef enum pcapST_SR ++{ ++ PCAP_ST_SAMPLE_RATE_8K = 0x00000000, ++ PCAP_ST_SAMPLE_RATE_11K = 0x00000100, ++ PCAP_ST_SAMPLE_RATE_12K = 0x00000200, ++ PCAP_ST_SAMPLE_RATE_16K = 0x00000300, ++ PCAP_ST_SAMPLE_RATE_22K = 0x00000400, ++ PCAP_ST_SAMPLE_RATE_24K = 0x00000500, ++ PCAP_ST_SAMPLE_RATE_32K = 0x00000600, ++ PCAP_ST_SAMPLE_RATE_44K = 0x00000700, ++ PCAP_ST_SAMPLE_RATE_48K = 0x00000800 ++}ST_SAMPLE_RATE_TYPE; ++ ++typedef enum pcapST_BCLK ++{ ++ PCAP_ST_BCLK_SLOT_16 = 0x00000000, ++ PCAP_ST_BCLK_SLOT_8 = 0x00008000, ++ PCAP_ST_BCLK_SLOT_4 = 0x00010000, ++ PCAP_ST_BCLK_SLOT_2 = 0x00018000, ++}ST_BCLK_TIME_SLOT_TYPE; ++ ++typedef enum pcapST_CLK ++{ ++ PCAP_ST_CLK_PLL_CLK_IN_13M0 = 0x00000000, ++ PCAP_ST_CLK_PLL_CLK_IN_15M36 = 0x00000004, ++ PCAP_ST_CLK_PLL_CLK_IN_16M8 = 0x00000008, ++ PCAP_ST_CLK_PLL_CLK_IN_19M44 = 0x0000000c, ++ PCAP_ST_CLK_PLL_CLK_IN_26M0 = 0x00000010, ++ PCAP_ST_CLK_PLL_CLK_IN_EXT_MCLK = 0x00000014, ++ PCAP_ST_CLK_PLL_CLK_IN_FSYNC = 0x00000018, ++ PCAP_ST_CLK_PLL_CLK_IN_BITCLK = 0x0000001c ++}ST_CLK_TYPE; ++ ++typedef enum pcapDigitalAudioInterfaceMode ++{ ++ PCAP_DIGITAL_AUDIO_INTERFACE_NORMAL = 0x00000000, ++ PCAP_DIGITAL_AUDIO_INTERFACE_NETWORK = 0x00002000, ++ PCAP_DIGITAL_AUDIO_INTERFACE_I2S = 0x00004000 ++}DIG_AUD_MODE_TYPE; ++ ++typedef enum pcapMono ++{ ++ PCAP_MONO_PGA_R_L_STEREO = 0x00000000, ++ PCAP_MONO_PGA_RL = 0x00080000, ++ PCAP_MONO_PGA_RL_3DB = 0x00100000, ++ PCAP_MONO_PGA_RL_6DB = 0x00180000 ++}MONO_TYPE; ++ ++typedef enum pcapVibratorVoltageLevel ++{ ++ PCAP_VIBRATOR_VOLTAGE_LEVEL0 = 0x00000000, ++ PCAP_VIBRATOR_VOLTAGE_LEVEL1 = 0x00100000, ++ PCAP_VIBRATOR_VOLTAGE_LEVEL2 = 0x00200000, ++ PCAP_VIBRATOR_VOLTAGE_LEVEL3 = 0x00300000 ++}VibratorVoltageLevel_TYPE; ++ ++typedef enum pcapTouchScreenMode ++{ ++ PCAP_TS_POSITION_X_MEASUREMENT = 0x00000000, ++ PCAP_TS_POSITION_XY_MEASUREMENT = 0x00020000, ++ PCAP_TS_PRESSURE_MEASUREMENT = 0x00040000, ++ PCAP_TS_PLATE_X_MEASUREMENT = 0x00060000, ++ PCAP_TS_PLATE_Y_MEASUREMENT = 0x00080000, ++ PCAP_TS_STANDBY_MODE = 0x000a0000, ++ PCAP_TS_NONTS_MODE = 0x000c0000 ++}TOUCH_SCREEN_DETECT_TYPE; ++ ++typedef enum pcapADJRegister ++{ ++ SSP_PCAP_ADJ_ISR_REGISTER = 0x00, ++ SSP_PCAP_ADJ_MSR_REGISTER = 0x01, ++ SSP_PCAP_ADJ_PSTAT_REGISTER = 0x02, ++ SSP_PCAP_ADJ_VREG2_REGISTER = 0x06, ++ SSP_PCAP_ADJ_AUX_VREG_REGISTER = 0x07, ++ SSP_PCAP_ADJ_BATT_DAC_REGISTER = 0x08, ++ SSP_PCAP_ADJ_ADC1_REGISTER = 0x09, ++ SSP_PCAP_ADJ_ADC2_REGISTER = 0x0a, ++ SSP_PCAP_ADJ_AUD_CODEC_REGISTER = 0x0b, ++ SSP_PCAP_ADJ_AUD_RX_AMPS_REGISTER = 0x0c, ++ SSP_PCAP_ADJ_ST_DAC_REGISTER = 0x0d, ++ SSP_PCAP_ADJ_BUSCTRL_REGISTER = 0x14, ++ SSP_PCAP_ADJ_PERIPH_REGISTER = 0x15, ++ SSP_PCAP_ADJ_LOWPWR_CTRL_REGISTER = 0x18, ++ SSP_PCAP_ADJ_TX_AUD_AMPS_REGISTER = 0x1a, ++ SSP_PCAP_ADJ_GP_REG_REGISTER = 0x1b ++}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER; ++ ++typedef enum pcapADJBit_SetType ++{ ++ SSP_PCAP_ADJ_BIT_ISR_ADCDONEI = 0x00000001, ++ SSP_PCAP_ADJ_BIT_ISR_TSI = 0x00000002, ++ SSP_PCAP_ADJ_BIT_ISR_1HZI = 0x00000004, ++ SSP_PCAP_ADJ_BIT_ISR_WHI = 0x00000008, ++ SSP_PCAP_ADJ_BIT_ISR_WLI = 0x00000010, ++ SSP_PCAP_ADJ_BIT_ISR_TODAI = 0x00000020, ++ SSP_PCAP_ADJ_BIT_ISR_USB4VI = 0x00000040, ++ SSP_PCAP_ADJ_BIT_ISR_ONOFFI = 0x00000080, ++ SSP_PCAP_ADJ_BIT_ISR_ONOFF2I = 0x00000100, ++ SSP_PCAP_ADJ_BIT_ISR_USB1VI = 0x00000200, ++ SSP_PCAP_ADJ_BIT_ISR_MOBPORTI = 0x00000400, ++ SSP_PCAP_ADJ_BIT_ISR_MB2I = 0x00000800, ++ SSP_PCAP_ADJ_BIT_ISR_A1I = 0x00001000, ++ SSP_PCAP_ADJ_BIT_ISR_STI = 0x00002000, ++ SSP_PCAP_ADJ_BIT_ISR_PCI = 0x00004000, ++ SSP_PCAP_ADJ_BIT_ISR_WARMI = 0x00008000, ++ SSP_PCAP_ADJ_BIT_ISR_EOLI = 0x00010000, ++ SSP_PCAP_ADJ_BIT_ISR_CLKI = 0x00020000, ++ SSP_PCAP_ADJ_BIT_ISR_SYS_RSTI = 0x00040000, ++ SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I = 0x00100000, ++ SSP_PCAP_ADJ_BIT_ISR_SOFT_RESETI = 0x00200000, ++ SSP_PCAP_ADJ_BIT_ISR_MNEXBI = 0x00400000, ++ ++ SSP_PCAP_ADJ_BIT_MSR_ADCDONEM = 0x04000001, ++ SSP_PCAP_ADJ_BIT_MSR_TSM = 0x04000002, ++ SSP_PCAP_ADJ_BIT_MSR_1HZM = 0x04000004, ++ SSP_PCAP_ADJ_BIT_MSR_WHM = 0x04000008, ++ SSP_PCAP_ADJ_BIT_MSR_WLM = 0x04000010, ++ SSP_PCAP_ADJ_BIT_MSR_TODAM = 0x04000020, ++ SSP_PCAP_ADJ_BIT_MSR_USB4VM = 0x04000040, ++ SSP_PCAP_ADJ_BIT_MSR_ONOFFM = 0x04000080, ++ SSP_PCAP_ADJ_BIT_MSR_ONOFF2M = 0x04000100, ++ SSP_PCAP_ADJ_BIT_MSR_USB1VM = 0x04000200, ++ SSP_PCAP_ADJ_BIT_MSR_MOBPORTM = 0x04000400, ++ SSP_PCAP_ADJ_BIT_MSR_MB2M = 0x04000800, ++ SSP_PCAP_ADJ_BIT_MSR_A1M = 0x04001000, ++ SSP_PCAP_ADJ_BIT_MSR_STM = 0x04002000, ++ SSP_PCAP_ADJ_BIT_MSR_PCM = 0x04004000, ++ SSP_PCAP_ADJ_BIT_MSR_WARMM = 0x04008000, ++ SSP_PCAP_ADJ_BIT_MSR_EOLM = 0x04010000, ++ SSP_PCAP_ADJ_BIT_MSR_CLKM = 0x04020000, ++ SSP_PCAP_ADJ_BIT_MSR_SYS_RSTM = 0x04040000, ++ SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M = 0x04100000, ++ SSP_PCAP_ADJ_BIT_MSR_SOFT_RESETM = 0x04200000, ++ SSP_PCAP_ADJ_BIT_MSR_MNEXBM = 0x04400000, ++ ++ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_4V = 0x08000040, ++ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS = 0x08000080, ++ SSP_PCAP_ADJ_BIT_PSTAT_ONOFFSNS2 = 0x08000100, ++ SSP_PCAP_ADJ_BIT_PSTAT_USBDET_1V = 0x08000200, ++ SSP_PCAP_ADJ_BIT_PSTAT_MOBSENSB = 0x08000400, ++ SSP_PCAP_ADJ_BIT_PSTAT_MB2SNS = 0x08000800, ++ SSP_PCAP_ADJ_BIT_PSTAT_A1SNS = 0x08001000, ++ SSP_PCAP_ADJ_BIT_PSTAT_MSTB = 0x08002000, ++ SSP_PCAP_ADJ_BIT_PSTAT_EOL_STAT = 0x08010000, ++ SSP_PCAP_ADJ_BIT_PSTAT_CLK_STAT = 0x08020000, ++ SSP_PCAP_ADJ_BIT_PSTAT_SYS_RST = 0x08040000, ++ SSP_PCAP_ADJ_BIT_PSTAT_BATTFBSNS = 0x08080000, ++ SSP_PCAP_ADJ_BIT_PSTAT_BATT_DET_IN_SNS = 0x08200000, ++ SSP_PCAP_ADJ_BIT_PSTAT_MNEXBSNS = 0x08400000, ++ SSP_PCAP_ADJ_BIT_PSTAT_WARM_SYS_RST = 0x08800000, ++ ++ SSP_PCAP_ADJ_BIT_VREG2_V1_STBY = 0x18000001, ++ SSP_PCAP_ADJ_BIT_VREG2_V2_STBY = 0x18000002, ++ SSP_PCAP_ADJ_BIT_VREG2_V3_STBY = 0x18000004, ++ SSP_PCAP_ADJ_BIT_VREG2_V4_STBY = 0x18000008, ++ SSP_PCAP_ADJ_BIT_VREG2_V5_STBY = 0x18000010, ++ SSP_PCAP_ADJ_BIT_VREG2_V6_STBY = 0x18000020, ++ SSP_PCAP_ADJ_BIT_VREG2_V7_STBY = 0x18000040, ++ SSP_PCAP_ADJ_BIT_VREG2_V8_STBY = 0x18000080, ++ SSP_PCAP_ADJ_BIT_VREG2_V9_STBY = 0x18000100, ++ SSP_PCAP_ADJ_BIT_VREG2_V10_STBY = 0x18000200, ++ SSP_PCAP_ADJ_BIT_VREG2_V1_LOWPWR = 0x18000400, ++ SSP_PCAP_ADJ_BIT_VREG2_V2_LOWPWR = 0x18000800, ++ SSP_PCAP_ADJ_BIT_VREG2_V3_LOWPWR = 0x18001000, ++ SSP_PCAP_ADJ_BIT_VREG2_V4_LOWPWR = 0x18002000, ++ SSP_PCAP_ADJ_BIT_VREG2_V5_LOWPWR = 0x18004000, ++ SSP_PCAP_ADJ_BIT_VREG2_V6_LOWPWR = 0x18008000, ++ SSP_PCAP_ADJ_BIT_VREG2_V7_LOWPWR = 0x18010000, ++ SSP_PCAP_ADJ_BIT_VREG2_V8_LOWPWR = 0x18020000, ++ SSP_PCAP_ADJ_BIT_VREG2_V9_LOWPWR = 0x18040000, ++ SSP_PCAP_ADJ_BIT_VREG2_V10_LOWPWR = 0x18080000, ++ ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_EN = 0x1c000002, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_0 = 0x1c000004, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_1 = 0x1c000008, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_EN = 0x1c000010, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_0 = 0x1c000020, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX2_1 = 0x1c000040, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_EN = 0x1c000080, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_0 = 0x1c000100, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_1 = 0x1c000200, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_2 = 0x1c000400, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX3_3 = 0x1c000800, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_EN = 0x1c001000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_0 = 0x1c002000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX4_1 = 0x1c004000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM2_EN = 0x1c010000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_EN = 0x1c020000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VSIM_0 = 0x1c040000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_EN = 0x1c080000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_0 = 0x1c100000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_V_VIB_1 = 0x1c200000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_STBY = 0x1c400000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_VAUX1_LOWPWR = 0x1c800000, ++ SSP_PCAP_ADJ_BIT_AUX_VREG_SW3_STBY = 0x1d000000, ++ ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC0 = 0x20000001, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC1 = 0x20000002, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC2 = 0x20000004, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC3 = 0x20000008, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC4 = 0x20000010, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC5 = 0x20000020, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC6 = 0x20000040, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_DAC7 = 0x20000080, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_B_FDBK = 0x20000100, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_EXT_ISENSE = 0x20000200, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN0 = 0x20000400, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN1 = 0x20000800, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN2 = 0x20001000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_V_COIN3 = 0x20002000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_I_COIN = 0x20004000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_COIN_CH_EN = 0x20008000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL0 = 0x20020000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL1 = 0x20040000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_SEL2 = 0x20080000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_EOL_CMP_EN = 0x20100000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_BATT_DET_EN = 0x20200000, ++ SSP_PCAP_ADJ_BIT_BATT_DAC_THERMBIAS_CTRL = 0x20400000, ++ ++ SSP_PCAP_ADJ_BIT_ADC1_ADEN = 0x24000001, ++ SSP_PCAP_ADJ_BIT_ADC1_RAND = 0x24000002, ++ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL1 = 0x24000004, ++ SSP_PCAP_ADJ_BIT_ADC1_AD_SEL2 = 0x24000008, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA10 = 0x24000010, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA11 = 0x24000020, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA12 = 0x24000040, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA20 = 0x24000080, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA21 = 0x24000100, ++ SSP_PCAP_ADJ_BIT_ADC1_ADA22 = 0x24000200, ++ SSP_PCAP_ADJ_BIT_ADC1_ATO0 = 0x24000400, ++ SSP_PCAP_ADJ_BIT_ADC1_ATO1 = 0x24000800, ++ SSP_PCAP_ADJ_BIT_ADC1_ATO2 = 0x24001000, ++ SSP_PCAP_ADJ_BIT_ADC1_ATO3 = 0x24002000, ++ SSP_PCAP_ADJ_BIT_ADC1_ATOX = 0x24004000, ++ SSP_PCAP_ADJ_BIT_ADC1_MTR1 = 0x24008000, ++ SSP_PCAP_ADJ_BIT_ADC1_MTR2 = 0x24010000, ++ SSP_PCAP_ADJ_BIT_ADC1_TS_M0 = 0x24020000, ++ SSP_PCAP_ADJ_BIT_ADC1_TS_M1 = 0x24040000, ++ SSP_PCAP_ADJ_BIT_ADC1_TS_M2 = 0x24080000, ++ SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR = 0x24100000, ++ SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB = 0x24200000, ++ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_POLARITY = 0x24400000, ++ SSP_PCAP_ADJ_BIT_ADC1_BATT_I_ADC = 0x24800000, ++ ++ SSP_PCAP_ADJ_BIT_ADC2_ADD10 = 0x28000001, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD11 = 0x28000002, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD12 = 0x28000004, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD13 = 0x28000008, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD14 = 0x28000010, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD15 = 0x28000020, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD16 = 0x28000040, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD17 = 0x28000080, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD18 = 0x28000100, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD19 = 0x28000200, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD20 = 0x28000400, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD21 = 0x28000800, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD22 = 0x28001000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD23 = 0x28002000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD24 = 0x28004000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD25 = 0x28008000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD26 = 0x28010000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD27 = 0x28020000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD28 = 0x28040000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADD29 = 0x28080000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADINC1 = 0x28100000, ++ SSP_PCAP_ADJ_BIT_ADC2_ADINC2 = 0x28200000, ++ SSP_PCAP_ADJ_BIT_ADC2_ASC = 0x28400000, ++ ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDIHPF = 0x2c000001, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_SMB = 0x2c000002, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_AUDOHPF = 0x2c000004, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CD_TS = 0x2c000008, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_DLM = 0x2c000010, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_ADITH = 0x2c000020, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK0 = 0x2c000040, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK1 = 0x2c000080, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK2 = 0x2c000100, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_INV = 0x2c000200, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_INV = 0x2c000400, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_DF_RESET = 0x2c000800, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_EN = 0x2c001000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_CLK_EN = 0x2c002000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_FS_8K_16K = 0x2c004000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_DIG_AUD_IN = 0x2c008000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CLK_IN_SEL = 0x2c010000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2_MUX = 0x2c020000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG0 = 0x2c040000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG1 = 0x2c080000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG2 = 0x2c100000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG3 = 0x2c200000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG4 = 0x2c400000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_MIC2IG_PRI_ADJ = 0x2c800000, ++ SSP_PCAP_ADJ_BIT_AUD_CODEC_CDC_PRI_ADJ = 0x2c200000, ++ ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1_EN = 0x30000001, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A2_EN = 0x30000002, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A4_EN = 0x30000010, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ARIGHT_EN = 0x30000020, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ALEFT_EN = 0x30000040, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CD_BYP = 0x30000080, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_CDC_SW = 0x30000100, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_ST_DAC_SW = 0x30000200, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_IN_SW = 0x30000400, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_R_EN = 0x30000800, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_PGA_L_EN = 0x30001000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG0 = 0x30002000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG1 = 0x30004000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG2 = 0x30008000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG3 = 0x30010000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_A1CTRL = 0x30020000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO0 = 0x30080000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO1 = 0x30100000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_AUDOG_PRI_ADJ = 0x30200000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_MONO_PRI_ADJ = 0x30400000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ0 = 0x30800000, ++ SSP_PCAP_ADJ_BIT_AUD_RX_AMPS_RX_PRI_ADJ1 = 0x31000000, ++ ++ SSP_PCAP_ADJ_BIT_ST_DAC_SMB_ST_DAC = 0x34000001, ++ SSP_PCAP_ADJ_BIT_ST_DAC_STDET_EN = 0x34000002, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK0 = 0x34000004, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK1 = 0x34000008, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK2 = 0x34000010, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_EN = 0x34000020, ++ SSP_PCAP_ADJ_BIT_ST_DAC_DF_RESET_ST_DAC = 0x34000040, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_EN = 0x34000080, ++ SSP_PCAP_ADJ_BIT_ST_DAC_SR0 = 0x34000100, ++ SSP_PCAP_ADJ_BIT_ST_DAC_SR1 = 0x34000200, ++ SSP_PCAP_ADJ_BIT_ST_DAC_SR2 = 0x34000400, ++ SSP_PCAP_ADJ_BIT_ST_DAC_SR3 = 0x34000800, ++ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_IN_ST_DAC = 0x34001000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS0 = 0x34002000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_DIG_AUD_FS1 = 0x34004000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK0 = 0x34008000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_BCLK1 = 0x34010000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_CLK_INV = 0x34020000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_FS_INV = 0x34040000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_CLK_IN_SEL = 0x34080000, ++ SSP_PCAP_ADJ_BIT_ST_DAC_ST_DAC_PRI_ADJ = 0x35000000, ++ ++ SSP_PCAP_ADJ_BIT_BUSCTRL_FSENB = 0x50000001, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_SUSPEND = 0x50000002, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PU = 0x50000004, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PD = 0x50000008, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_EN = 0x50000010, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PS = 0x50000020, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_VUSB_MSTR_EN = 0x50000040, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_VBUS_PD_ENB = 0x50000080, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_CURRLIM = 0x50000100, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232ENB = 0x50000200, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_RS232_DIR = 0x50000400, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_SE0_CONN = 0x50000800, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_USB_PDM = 0x50001000, ++ SSP_PCAP_ADJ_BIT_BUSCTRL_BUS_PRI_ADJ = 0x51000000, ++ ++ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL0 = 0x54000001, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL1 = 0x54000002, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL2 = 0x54000004, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL3 = 0x54000008, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL_CTRL4 = 0x54000010, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_EN = 0x54000020, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_EN = 0x54000040, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL0 = 0x54000080, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL1 = 0x54000100, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL2 = 0x54000200, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_CTRL3 = 0x54000400, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL0 = 0x54000800, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL1 = 0x54001000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL2 = 0x54002000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_CTRL3 = 0x54004000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I0 = 0x54008000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDR_I1 = 0x54010000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I0 = 0x54020000, ++ SSP_PCAP_ADJ_BIT_PERIPH_LEDG_I1 = 0x54040000, ++ SSP_PCAP_ADJ_BIT_PERIPH_SKIP = 0x54080000, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL0 = 0x54100000, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL1 = 0x54200000, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL2 = 0x54400000, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL3 = 0x54800000, ++ SSP_PCAP_ADJ_BIT_PERIPH_BL2_CTRL4 = 0x55000000, ++ ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_STBY = 0x60000001, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX2_LOWPWR = 0x60000002, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_STBY = 0x60000004, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX3_LOWPWR = 0x60000008, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_STBY = 0x60000010, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VAUX4_LOWPWR = 0x60000020, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM_LOWPWR = 0x60000040, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VSIM2_LOWPWR = 0x60000080, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE00 = 0x60000100, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE01 = 0x60000200, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE10 = 0x60000400, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW1_MODE11 = 0x60000800, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW10_DVS = 0x60001000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW11_DVS = 0x60002000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW12_DVS = 0x60004000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW13_DVS = 0x60008000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE00 = 0x60010000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE01 = 0x60020000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE10 = 0x60040000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW2_MODE11 = 0x60080000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW20_DVS = 0x60100000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW21_DVS = 0x60200000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW22_DVS = 0x60400000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_SW23_DVS = 0x60800000, ++ SSP_PCAP_ADJ_BIT_LOWPWR_CTRL_VC_STBY = 0x61000000, ++ ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG0 = 0x68000001, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG1 = 0x68000002, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG2 = 0x68000004, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG3 = 0x68000008, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG4 = 0x68000010, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_EN = 0x68000020, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A3_MUX = 0x68000040, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_EN = 0x68000080, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A5_MUX = 0x68000100, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_EXT_MIC_MUX = 0x68000200, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON2 = 0x68000400, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_MB_ON1 = 0x68000800, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1ID_TX = 0x68001000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A1_CONFIG = 0x68002000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AHS_CONFIG = 0x68004000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_A2_CONFIG = 0x68008000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_LOWPWR = 0x68080000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIO_STBY = 0x68100000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_V2_EN_2 = 0x68200000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_AUDIG_PRI_ADJ = 0x68400000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ0 = 0x68800000, ++ SSP_PCAP_ADJ_BIT_TX_AUD_AMPS_TX_PRI_ADJ1 = 0x69000000, ++ ++ SSP_PCAP_ADJ_BIT_SYS_RST_CLR = 0x6c000001, ++ SSP_PCAP_ADJ_BIT_SYS_RST_MODE0 = 0x6c000002, ++ SSP_PCAP_ADJ_BIT_SYS_RST_MODE1 = 0x6c000004, ++ SSP_PCAP_ADJ_BIT_SYS_VFLASH_0 = 0x6c000008, ++ SSP_PCAP_ADJ_BIT_SYS_VFLASH_1 = 0x6c000010, ++ SSP_PCAP_ADJ_BIT_SYS_MID_SELECT = 0x6c000020, ++ SSP_PCAP_ADJ_BIT_SYS_MID_FET = 0x6c000040, ++ SSP_PCAP_ADJ_BIT_SYS_MAIN_LOW = 0x6c000080, ++ SSP_PCAP_ADJ_BIT_SYS_BATTFB_DIS = 0x6c000100, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG9 = 0x6c000200, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG10 = 0x6c000400, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG11 = 0x6c000800, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG12 = 0x6c001000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG13 = 0x6c002000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG14 = 0x6c004000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG15 = 0x6c008000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG16 = 0x6c010000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG17 = 0x6c020000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG18 = 0x6c040000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG19 = 0x6c080000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG20 = 0x6c100000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG21 = 0x6c200000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG22 = 0x6c400000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG23 = 0x6c800000, ++ SSP_PCAP_ADJ_BIT_SYS_GP_REG24 = 0x6d000000 ++ ++}SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE; ++ ++/************************ FUNCTION PROTOTYPES **************************************/ ++extern void ssp_pcap_init(void); ++extern void ssp_pcap_release(void); ++ ++extern void ssp_pcap_open(SSP_PCAP_INIT_DRIVER_TYPE portType); ++extern void ssp_pcap_close(void); ++ ++extern void ssp_pcap_intoSleep_callBack(void); ++extern void ssp_pcap_wakeUp_callBack(void); ++ ++ ++extern SSP_PCAP_STATUS SSP_PCAP_write_data_to_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,U32 ssp_pcap_register_value); ++extern SSP_PCAP_STATUS SSP_PCAP_read_data_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register,P_U32 p_ssp_pcap_register_value); ++ ++extern SSP_PCAP_STATUS SSP_PCAP_bit_set(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; ++extern SSP_PCAP_STATUS SSP_PCAP_bit_clean(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; ++extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; ++extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_bit_from_PCAP(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER_BIT_TYPE ssp_pcap_bit ) ; ++extern U32 SSP_PCAP_get_register_value_from_buffer(SSP_PCAP_SECONDARY_PROCESSOR_REGISTER ssp_pcap_register ) ; ++ ++extern SSP_PCAP_STATUS SSP_PCAP_TSI_mode_set(TOUCH_SCREEN_DETECT_TYPE mode_Type ); ++extern SSP_PCAP_STATUS SSP_PCAP_TSI_start_XY_read(void); ++extern SSP_PCAP_STATUS SSP_PCAP_TSI_get_XY_value(P_U16 p_x,P_U16 p_y); ++extern SSP_PCAP_STATUS SSP_PCAP_CDC_CLK_set(PHONE_CDC_CLOCK_TYPE clkType); ++ ++extern SSP_PCAP_STATUS SSP_PCAP_CDC_SR_set(ST_SAMPLE_RATE_TYPE srType); ++extern SSP_PCAP_STATUS SSP_PCAP_BCLK_set(ST_BCLK_TIME_SLOT_TYPE bclkType); ++extern SSP_PCAP_STATUS SSP_PCAP_STCLK_set(ST_CLK_TYPE stClkType); ++extern SSP_PCAP_STATUS SSP_PCAP_DIG_AUD_FS_set(DIG_AUD_MODE_TYPE fsType); ++extern SSP_PCAP_STATUS SSP_PCAP_AUDIG_set(U32 audioInGain); ++extern SSP_PCAP_STATUS SSP_PCAP_MONO_set(MONO_TYPE monoType); ++extern SSP_PCAP_STATUS SSP_PCAP_AUDOG_set(U32 audioOutGain); ++ ++extern SSP_PCAP_STATUS SSP_PCAP_V_VIB_level_set(VibratorVoltageLevel_TYPE VIBLevelType); ++extern SSP_PCAP_STATUS SSP_PCAP_configure_USB_UART_transeiver(SSP_PCAP_PORT_TYPE portType); ++extern SSP_PCAP_BIT_STATUS SSP_PCAP_get_audio_in_status(void); ++ ++/* for log */ ++extern void pcap_log_add_pure_data(u8* pData,u32 len); ++extern void pcap_log_add_data(u8* pData,u32 len); ++ ++/* screen lock on/off handler */ ++extern void ssp_pcap_screenlock_lock(u32 data); ++extern void ssp_pcap_screenlock_unlock(u32 data); ++ ++#endif +Index: linux-2.6.21/include/asm-arm/arch-pxa/irqs.h +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/irqs.h 2007-06-03 02:17:12.000000000 -0300 ++++ linux-2.6.21/include/asm-arm/arch-pxa/irqs.h 2007-06-03 11:14:40.000000000 -0300 +@@ -176,7 +176,8 @@ + #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) + #elif defined(CONFIG_ARCH_LUBBOCK) || \ + defined(CONFIG_MACH_LOGICPD_PXA270) || \ +- defined(CONFIG_MACH_MAINSTONE) ++ defined(CONFIG_MACH_MAINSTONE) || \ ++ defined(CONFIG_PXA_EZX) + #define NR_IRQS (IRQ_BOARD_END) + #else + #define NR_IRQS (IRQ_BOARD_START) +@@ -222,3 +223,13 @@ + #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) + #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2) + #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3) ++ ++/* EZX Interrupts (CONFIG_EZX) */ ++#define EZX_IRQ(x) (IRQ_BOARD_START + (x)) ++#define EZX_IRQ_USB4V EZX_IRQ(0) /* EMU */ ++#define EZX_IRQ_USB1V EZX_IRQ(1) /* EMU */ ++#define EZX_IRQ_HEADJACK EZX_IRQ(2) /* Audio connector */ ++#define EZX_IRQ_MIC EZX_IRQ(3) /* Audio connector */ ++#define EZX_IRQ_ADCDONE EZX_IRQ(4) ++#define EZX_IRQ_TS EZX_IRQ(5) /* TS touch */ ++#define EZX_IRQ_ADCDONE2 EZX_IRQ(6) /* TS x/y ADC ready */ +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-06-03 11:14:40.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-09 14:57:44.000000000 -0300 +@@ -131,11 +131,30 @@ + .resource = ezxbp_resources, + }; + ++/* PCAP */ ++static struct resource ezxpcap_resources[] = { ++ [0] = { ++ .start = IRQ_GPIO1, ++ .end = IRQ_GPIO1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device ezxpcap_device = { ++ .name = "ezx-pcap", ++ .id = -1, ++ .dev = { ++ .parent = &ezxssp_device.dev, ++ }, ++ .num_resources = ARRAY_SIZE(ezxpcap_resources), ++ .resource = ezxpcap_resources, ++}; + + + static struct platform_device *devices[] __initdata = { + &ezxssp_device, + &ezxbp_device, ++ &ezxpcap_device, + }; + + /* PM */ +Index: linux-2.6.21/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Kconfig 2007-06-03 11:14:40.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Kconfig 2007-06-09 14:57:46.000000000 -0300 +@@ -105,6 +105,15 @@ + config EZX_BP + bool "BP Control code for EZX Platform" + ++config EZX_PCAP ++ bool "PCAP Support" ++ ++config EZX_MCI_SD ++ bool ++ ++config EZX_MCI_TF ++ bool ++ + endif + + endmenu +Index: linux-2.6.21/arch/arm/mach-pxa/Makefile +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/Makefile 2007-06-03 11:14:40.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/Makefile 2007-06-09 14:57:44.000000000 -0300 +@@ -25,6 +25,7 @@ + obj-$(CONFIG_PXA_EZX_A1200) += ezx-a1200.o + obj-$(CONFIG_PXA_EZX_E6) += ezx-e6.o + obj-$(CONFIG_EZX_BP) += ezx-bp.o ++obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o + + # Support for blinky lights + led-y := leds.o diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch new file mode 100755 index 0000000000..85b6f5c15d --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch @@ -0,0 +1,140 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:23.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-05-08 16:29:36.000000000 -0300 +@@ -22,6 +22,10 @@ + #include + #include + ++#ifdef CONFIG_PXA_EZX ++#include ++#endif ++ + #include "generic.h" + + /* Crystal clock: 13MHz */ +@@ -156,7 +160,13 @@ + break; + case PM_SUSPEND_MEM: + /* set resume return address */ ++#ifdef CONFIG_PXA_EZX ++ /* set EZX flags for blob - WM */ ++ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = virt_to_phys(pxa_cpu_resume); ++ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = SLEEP_FLAG; ++#else + PSPR = virt_to_phys(pxa_cpu_resume); ++#endif + pxa_cpu_suspend(PWRMODE_SLEEP); + break; + } +Index: linux-2.6.21/arch/arm/mach-pxa/pm.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:23.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-05-08 16:29:36.000000000 -0300 +@@ -24,6 +24,10 @@ + #include + #include + ++#ifdef CONFIG_PXA_EZX ++#include ++#endif ++ + + /* + * Debug macros +@@ -152,8 +156,12 @@ + } + + /* ensure not to come back here if it wasn't intended */ ++#ifdef CONFIG_PXA_EZX ++ *(unsigned long *)(phys_to_virt(RESUME_ADDR)) = 0; ++ *(unsigned long *)(phys_to_virt(FLAG_ADDR)) = OFF_FLAG; ++#else + PSPR = 0; +- ++#endif + /* restore registers */ + RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); + RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); +Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 16:29:36.000000000 -0300 ++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 16:32:56.000000000 -0300 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "generic.h" + #include "ezx.h" +@@ -137,8 +138,69 @@ + &ezxbp_device, + }; + ++/* PM */ ++extern int bp_handshake_passed(void); ++ ++#define POWER_OFF_TIMEOUT (2*60*HZ) ++ ++static void ezx_reboot_poweroff(char mode) ++{ ++#ifdef CONFIG_EZX_BP ++ unsigned long start = jiffies; ++ ++ printk("Waiting for BP to turn off. This can take some time...\n"); ++ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = NO_FLAG; ++ cpu_proc_fin(); ++ ++ do { ++ /* ++ * Turn off gracefully. Wait BP turn off first, and then ++ * properly turn off. ++ */ ++ if (pxa_gpio_get_value(GPIO_BB_WDI) == 0) { ++ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = WDI_FLAG; ++ ++ /* reset BP */ ++ pxa_gpio_set_value(GPIO_BB_RESET, 0); ++ mdelay(1); ++ pxa_gpio_set_value(GPIO_BB_RESET, 1); ++ ++ if (mode == 'z') ++ arch_reset('h'); ++ break; ++ } ++ /* Just turn it off! */ ++ if (!bp_handshake_passed() || !pxa_gpio_get_value(GPIO_BB_WDI2) ++ || (jiffies - start) >= POWER_OFF_TIMEOUT) { ++ break; ++ } ++ } while(1); ++#endif ++ ++ if (mode == 'z') ++ /* Panic! Ask PCAP to turn both processors off */ ++ pxa_gpio_set_value(GPIO_WDI_AP, 0); ++ else ++ arm_machine_restart(mode); ++ ++ while(1); ++} ++ ++static inline void ezx_poweroff(void) ++{ ++ ezx_reboot_poweroff('z'); ++} ++ ++static inline void ezx_restart(char mode) ++{ ++ ezx_reboot_poweroff(mode); ++} ++ + static int __init ezx_init(void) + { ++ pm_power_off = ezx_poweroff; ++ arm_pm_restart = ezx_restart; ++ + CKEN = CKEN9_OSTIMER | CKEN22_MEMC; + + ezx_ssp_set_machinfo(&ezx_ssp_machinfo); diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-serial-bug-workaround.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-serial-bug-workaround.patch new file mode 100755 index 0000000000..9f30cc35fe --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-serial-bug-workaround.patch @@ -0,0 +1,45 @@ +Work around some errata in the pxa serial code (copied from motorolas 2.4.x tree) + +Index: linux-2.6.20.7/drivers/serial/pxa.c +=================================================================== +--- linux-2.6.20.7.orig/drivers/serial/pxa.c 2007-04-21 13:57:46.000000000 -0300 ++++ linux-2.6.20.7/drivers/serial/pxa.c 2007-04-21 14:05:03.000000000 -0300 +@@ -29,6 +29,10 @@ + #define SUPPORT_SYSRQ + #endif + ++#define pxa_buggy_port(x) ({ \ ++ int cpu_ver; asm("mrc%? p15, 0, %0, c0, c0" : "=r" (cpu_ver)); \ ++ ((x) == PORT_PXA && (cpu_ver & ~1) == 0x69052100); }) ++ + #include + #include + #include +@@ -195,7 +199,7 @@ + if (uart_circ_empty(xmit)) + serial_pxa_stop_tx(&up->port); + } +- ++static inline irqreturn_t serial_pxa_irq(int, void *); + static void serial_pxa_start_tx(struct uart_port *port) + { + struct uart_pxa_port *up = (struct uart_pxa_port *)port; +@@ -203,6 +207,8 @@ + if (!(up->ier & UART_IER_THRI)) { + up->ier |= UART_IER_THRI; + serial_out(up, UART_IER, up->ier); ++ if (pxa_buggy_port(up->port.type)) ++ serial_pxa_irq(up->port.irq, NULL); + } + } + +@@ -298,6 +304,9 @@ + + mcr |= up->mcr; + ++ if (pxa_buggy_port(up->port.type) && up->port.irq != 0) ++ mcr ^= UART_MCR_OUT2; ++ + serial_out(up, UART_MCR, mcr); + } + diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-fix-init-errorpath.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-init-errorpath.patch new file mode 100755 index 0000000000..716ef86fd1 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-init-errorpath.patch @@ -0,0 +1,20 @@ +Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:10:32.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:42:23.000000000 +0100 +@@ -811,7 +811,6 @@ + /*init the related mux interface*/ + if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { + err("usb_ipc_init: Out of memory."); +- usb_deregister(&usb_ipc_driver); + return -ENOMEM; + } + bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); +@@ -819,7 +818,6 @@ + if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { + err("usb_ipc_init: Not enough memory for the input buffer."); + kfree(bvd_ipc); +- usb_deregister(&usb_ipc_driver); + return -ENOMEM; + } + bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-fix-makefile.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-makefile.patch new file mode 100755 index 0000000000..31452da847 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-makefile.patch @@ -0,0 +1,14 @@ +Index: linux-2.6.21/drivers/char/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/char/Makefile 2007-04-26 20:09:29.000000000 +0200 ++++ linux-2.6.21/drivers/char/Makefile 2007-04-26 20:09:46.000000000 +0200 +@@ -104,7 +104,8 @@ + obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o + obj-$(CONFIG_TCG_TPM) += tpm/ + +-obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o ++obj-$(CONFIG_TS0710_MUX_USB) += ts0710_mux_usb.o ++obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o + + + # Files generated that shall be removed upon make clean diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-fix-tty-driver.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-tty-driver.patch new file mode 100755 index 0000000000..2e1aabd952 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-fix-tty-driver.patch @@ -0,0 +1,125 @@ +Index: linux-2.6.20.7/drivers/char/ts0710_mux.c +=================================================================== +--- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 10:51:31.000000000 +0200 ++++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 10:53:05.000000000 +0200 +@@ -241,7 +241,8 @@ + static volatile __u8 mux_recv_info_flags[NR_MUXS]; + static mux_recv_struct *mux_recv_queue = NULL; + +-static struct tty_driver mux_driver; ++// Local for 2.6? ++static struct tty_driver *mux_driver; + + #ifdef USB_FOR_MUX + #define COMM_FOR_MUX_DRIVER usb_for_mux_driver +@@ -3007,6 +3008,7 @@ + #else + mux_tty[line]++; + dlci = tty2dlci[line]; ++ mux_table[line] = tty; + + /* if( dlci == 1 ) { */ + /* Open server channel 0 first */ +@@ -3087,6 +3089,7 @@ + } + } + ++ + retval = 0; + #endif + out: +@@ -3894,43 +3897,50 @@ + INIT_WORK(&receive_tqueue, receive_worker, NULL); + INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); + +- memset(&mux_driver, 0, sizeof(struct tty_driver)); +- memset(&mux_tty, 0, sizeof(mux_tty)); +- mux_driver.magic = TTY_DRIVER_MAGIC; +- mux_driver.driver_name = "ts0710mux"; +- mux_driver.name = "ts0710mux"; +- mux_driver.major = TS0710MUX_MAJOR; +- mux_driver.minor_start = TS0710MUX_MINOR_START; +- mux_driver.num = NR_MUXS; +- mux_driver.type = TTY_DRIVER_TYPE_SERIAL; +- mux_driver.subtype = SERIAL_TYPE_NORMAL; +- mux_driver.init_termios = tty_std_termios; +- mux_driver.init_termios.c_iflag = 0; +- mux_driver.init_termios.c_oflag = 0; +- mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; +- mux_driver.init_termios.c_lflag = 0; +- mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; +- +- mux_driver.ttys = mux_table; +- mux_driver.termios = mux_termios; +- mux_driver.termios_locked = mux_termios_locked; ++ mux_driver = alloc_tty_driver(NR_MUXS); ++ if (!mux_driver) ++ return -ENOMEM; ++ ++ mux_driver->owner = THIS_MODULE; ++ mux_driver->driver_name = "ts0710mux"; ++ mux_driver->name = "mux"; ++ mux_driver->devfs_name = "mux"; ++ mux_driver->major = TS0710MUX_MAJOR; ++ mux_driver->minor_start = TS0710MUX_MINOR_START; ++ mux_driver->type = TTY_DRIVER_TYPE_SERIAL; ++ mux_driver->subtype = SERIAL_TYPE_NORMAL; ++ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; ++ ++ mux_driver->init_termios = tty_std_termios; ++ mux_driver->init_termios.c_iflag = 0; ++ mux_driver->init_termios.c_oflag = 0; ++ mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; ++ mux_driver->init_termios.c_lflag = 0; ++ ++// mux_driver.ttys = mux_table; ++ mux_driver->termios = mux_termios; ++ mux_driver->termios_locked = mux_termios_locked; + // mux_driver.driver_state = mux_state; +- mux_driver.other = NULL; ++ mux_driver->other = NULL; + +- mux_driver.open = mux_open; +- mux_driver.close = mux_close; +- mux_driver.write = mux_write; +- mux_driver.write_room = mux_write_room; +- mux_driver.flush_buffer = mux_flush_buffer; +- mux_driver.chars_in_buffer = mux_chars_in_buffer; +- mux_driver.throttle = mux_throttle; +- mux_driver.unthrottle = mux_unthrottle; +- mux_driver.ioctl = mux_ioctl; +- mux_driver.owner = THIS_MODULE; ++ mux_driver->open = mux_open; ++ mux_driver->close = mux_close; ++ mux_driver->write = mux_write; ++ mux_driver->write_room = mux_write_room; ++ mux_driver->flush_buffer = mux_flush_buffer; ++ mux_driver->chars_in_buffer = mux_chars_in_buffer; ++ mux_driver->throttle = mux_throttle; ++ mux_driver->unthrottle = mux_unthrottle; ++ mux_driver->ioctl = mux_ioctl; + +- if (tty_register_driver(&mux_driver)) ++ // FIXME: No panic() here ++ if (tty_register_driver(mux_driver)) + panic("Couldn't register mux driver"); + ++ for (j=0; jcur_altsetting->desc; +- endpoint = &intf->cur_altsetting->endpoint[0].desc; + /* Start checking for two bulk endpoints or ... FIXME: This is a future + * enhancement...*/ + bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", +@@ -638,30 +637,26 @@ + + ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; + +- bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", +- (&endpoint[0])->bEndpointAddress); +- bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", +- (&endpoint[1])->bEndpointAddress); +- + while (ep_cnt < interface->bNumEndpoints) { +- +- if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { +- bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", +- (&endpoint[ep_cnt])->bEndpointAddress); +- have_bulk_in_mux = +- (&endpoint[ep_cnt])->bEndpointAddress; +- readsize = (&endpoint[ep_cnt])->wMaxPacketSize; ++ endpoint = &intf->cur_altsetting->endpoint[ep_cnt].desc; ++ bvd_dbg("usb_ipc_probe: endpoint[%i] is: %x", ep_cnt, ++ endpoint->bEndpointAddress); ++ ++ if (!have_bulk_in_mux && IS_EP_BULK_IN(*endpoint)) { ++ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is: %x ", ++ endpoint->bEndpointAddress); ++ have_bulk_in_mux = endpoint->bEndpointAddress; ++ readsize = endpoint->wMaxPacketSize; + bvd_dbg("usb_ipc_probe: readsize=%d", readsize); + ep_cnt++; + continue; + } + +- if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { +- bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", +- (&endpoint[ep_cnt])->bEndpointAddress); +- have_bulk_out_mux = +- (&endpoint[ep_cnt])->bEndpointAddress; +- writesize = (&endpoint[ep_cnt])->wMaxPacketSize; ++ if (!have_bulk_out_mux && IS_EP_BULK_OUT(*endpoint)) { ++ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is: %x ", ++ endpoint->bEndpointAddress); ++ have_bulk_out_mux = endpoint->bEndpointAddress; ++ writesize = endpoint->wMaxPacketSize; + bvd_dbg("usb_ipc_probe: writesize=%d", writesize); + ep_cnt++; + continue; +@@ -718,21 +713,27 @@ + bvd_ipc->bh_bp.func = usbipc_bh_bp_func; + bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; + ++ bvd_dbg("after assignements"); + /*Build a write urb*/ ++ usb_init_urb(&bvd_ipc->writeurb_mux); + usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, + usb_sndbulkpipe(bvd_ipc->ipc_dev, + bvd_ipc->bulk_out_ep_mux), + bvd_ipc->obuf, writesize, usb_ipc_write_bulk, + bvd_ipc); + //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; ++ bvd_dbg("after write urb"); + + /*Build a read urb and send a IN token first time*/ ++ usb_init_urb(&bvd_ipc->readurb_mux); + usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, + usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), + bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); + //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; ++ bvd_dbg("after read urb"); + +- usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); ++ //usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); ++ bvd_dbg("after claim interface"); + //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); + + // a2590c: dsplog is not supported by this driver +@@ -740,6 +741,8 @@ + // &ipccfg->interface[2], bvd_ipc); + /*send a IN token first time*/ + bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; ++ bvd_dbg("after assignement"); ++ + if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) + printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); + +@@ -750,7 +753,7 @@ + tasklet_schedule(&bvd_ipc->bh); + } + +- printk("usb_ipc_probe: completed probe!"); ++ printk("usb_ipc_probe: completed probe!\n"); + usb_set_intfdata(intf, &bvd_ipc); + return 0; + } +@@ -760,21 +763,23 @@ + //struct usb_device *usbdev = interface_to_usbdev(intf); + struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); + +- printk("usb_ipc_disconnect:*** \n"); + ++ printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); ++ ++ //FIXME: Memory leak? + if ((UHCRHPS3 & 0x4) == 0) +- usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); ++ // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); + +- usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); ++ //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); + + bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; + kfree(bvd_ipc_disconnect->ibuf); + kfree(bvd_ipc_disconnect->obuf); + +- usb_driver_release_interface(&usb_ipc_driver, +- bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); +- usb_driver_release_interface(&usb_ipc_driver, +- bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); ++ //usb_driver_release_interface(&usb_ipc_driver, ++ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); ++ //usb_driver_release_interface(&usb_ipc_driver, ++ // bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); + + //a2590c: dsplog interface is not supported by this driver + //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); +@@ -803,13 +808,6 @@ + int result; + + bvd_dbg("init usb_ipc"); +- /* register driver at the USB subsystem */ +- result = usb_register(&usb_ipc_driver); +- if (result < 0) { +- err ("usb ipc driver could not be registered"); +- return result; +- } +- + /*init the related mux interface*/ + if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { + err("usb_ipc_init: Out of memory."); +@@ -836,6 +834,14 @@ + usb_for_mux_driver = &ipcusb_tty_driver; + usb_for_mux_tty = &ipcusb_tty; + ++ /* register driver at the USB subsystem */ ++ // this was called before bvd_ipc was allocated ++ result = usb_register(&usb_ipc_driver); ++ if (result < 0) { ++ err ("usb ipc driver could not be registered"); ++ return result; ++ } ++ + /* init timers for ipcusb read process and usb suspend */ + init_timer(&ipcusb_timer); + ipcusb_timer.function = ipcusb_timeout; diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-ifdef-ezx-features.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-ifdef-ezx-features.patch new file mode 100755 index 0000000000..e7935a2598 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-ifdef-ezx-features.patch @@ -0,0 +1,86 @@ +Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-24 16:31:51.000000000 +0200 ++++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-24 16:34:57.000000000 +0200 +@@ -35,10 +35,14 @@ + #include + #include + #include ++ ++#ifdef CONFIG_PXA_EZX + #include + #include + #include + #include ++#endif ++ + #include + #include + #include +@@ -341,8 +345,10 @@ + + static void wakeup_timeout(unsigned long data) + { ++#ifdef CONFIG_PXA_EZX + GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); + bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); ++#endif + } + + static void suspend_timeout(unsigned long data) +@@ -353,10 +359,12 @@ + bvd_dbg("suspend_timeout: add the suspend timer again"); + } else { + unlink_urbs(&bvd_ipc->readurb_mux); ++#ifdef CONFIG_PXA_EZX + UHCRHPS3 = 0x4; + mdelay(40); + bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", + UHCRHPS3); ++#endif + } + } + +@@ -404,6 +412,7 @@ + bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; + bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); + ++#ifdef CONFIG_PXA_EZX + if ((UHCRHPS3 & 0x4) == 0x4) { + static int ret; + int time = 0; +@@ -442,6 +451,7 @@ + "failed! status=%d\n", ret); + bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); + } ++#endif + + sumbit_times++; + bvd_ipc->write_finished_flag = 0; +@@ -464,12 +474,16 @@ + + static void usbipc_bh_bp_func(unsigned long param) + { ++#ifdef CONFIG_PXA_EZX + if ((UHCRHPS3 & 0x4) == 0x4) { + UHCRHPS3 = 0x8; ++#endif + mdelay(40); ++#ifdef CONFIG_PXA_EZX + bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " + "UHCRHPS3=0x%x", UHCRHPS3); + } ++#endif + if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { + //get_halted_bit(); + +@@ -734,7 +748,9 @@ + printk("usb_ipc_disconnect. bvd_ipc_disconnect address: %p\n", bvd_ipc_disconnect); + + //FIXME: Memory leak? ++#ifdef CONFIG_PXA_EZX + if ((UHCRHPS3 & 0x4) == 0) ++#endif + // usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); + + //usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-linux-2.6.21-fix.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-linux-2.6.21-fix.patch new file mode 100755 index 0000000000..8d5299e3bd --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-linux-2.6.21-fix.patch @@ -0,0 +1,297 @@ +Index: linux-2.6.21/drivers/char/ts0710.h +=================================================================== +--- linux-2.6.21.orig/drivers/char/ts0710.h 2007-04-27 20:35:44.000000000 -0300 ++++ linux-2.6.21/drivers/char/ts0710.h 2007-04-27 20:36:03.000000000 -0300 +@@ -45,7 +45,6 @@ + * 11/18/2002 Modified + */ + +-#include + #include + + #include +@@ -58,7 +57,6 @@ + #include + #include + #include +-#include + + #include + #include +Index: linux-2.6.21/drivers/char/ts0710_mux.c +=================================================================== +--- linux-2.6.21.orig/drivers/char/ts0710_mux.c 2007-04-27 20:35:44.000000000 -0300 ++++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-04-27 20:36:03.000000000 -0300 +@@ -46,7 +46,6 @@ + * 11/18/2002 Second version + * 04/21/2004 Add GPRS PROC + */ +-#include + #include + #include + +@@ -70,15 +69,12 @@ + #include + #include + #include +-#include +-//#include + + #include + #include + #include + + #ifdef USB_FOR_MUX +-//#include + #include "ts0710_mux_usb.h" + #endif + +@@ -268,8 +264,8 @@ + static struct work_struct post_recv_tqueue; + + static struct tty_struct *mux_table[NR_MUXS]; +-static struct termios *mux_termios[NR_MUXS]; +-static struct termios *mux_termios_locked[NR_MUXS]; ++static struct ktermios *mux_termios[NR_MUXS]; ++static struct ktermios *mux_termios_locked[NR_MUXS]; + static volatile short int mux_tty[NR_MUXS]; + + #ifdef min +@@ -1894,11 +1890,7 @@ + if (test_bit(TTY_THROTTLED, &tty->flags)) { + queue_data = 1; + } else { +- if (test_bit +- (TTY_DONT_FLIP, &tty->flags)) { +- queue_data = 1; +- post_recv = 1; +- } else if (recv_info->total) { ++ if (recv_info->total) { + queue_data = 1; + post_recv = 1; + } else if (recv_room < uih_len) { +@@ -3149,10 +3141,10 @@ + + /*For BP UART problem End*/ + +-static void receive_worker(void *private_) ++static void receive_worker(struct work_struct *work) + { + struct tty_struct *tty = COMM_FOR_MUX_TTY; +- int i, count, tbuf_free, tbuf_read; ++ int count, tbuf_free, tbuf_read; + static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; + static unsigned char *tbuf_ptr = &tbuf[0]; + static unsigned char *start_flag = 0; +@@ -3168,7 +3160,7 @@ + __u32 uih_len; + /*For BP UART problem End */ + +- UNUSED_PARAM(private_); ++ UNUSED_PARAM(work); + + if (!tty) + return; +@@ -3440,7 +3432,7 @@ + clear_bit(RECV_RUNNING, &mux_recv_flags); + } + +-static void post_recv_worker(void *private_) ++static void post_recv_worker(struct work_struct *work) + { + ts0710_con *ts0710 = &ts0710_connection; + int tty_idx; +@@ -3453,7 +3445,7 @@ + mux_recv_packet *recv_packet, *recv_packet2; + __u8 j; + +- UNUSED_PARAM(private_); ++ UNUSED_PARAM(work); + + if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { + schedule_work(&post_recv_tqueue); +@@ -3499,10 +3491,6 @@ + if (test_bit(TTY_THROTTLED, &tty->flags)) { + add_post_recv_queue(&post_recv_q, recv_info); + continue; +- } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { +- post_recv = 1; +- add_post_recv_queue(&post_recv_q, recv_info); +- continue; + } + + flow_control = 0; +@@ -3635,7 +3623,7 @@ + } + } + +-static void send_worker(void *private_) ++static void send_worker(struct work_struct *work) + { + ts0710_con *ts0710 = &ts0710_connection; + __u8 j; +@@ -3644,7 +3632,7 @@ + struct tty_struct *tty; + __u8 dlci; + +- UNUSED_PARAM(private_); ++ UNUSED_PARAM(work); + + TS0710_DEBUG("Enter into send_worker"); + +@@ -3819,7 +3807,8 @@ + gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes = + get_count(TS0710MUX_GPRS2_SEND_COUNT_IDX); + +- copy_to_user(buf, gprsData, bufLen); ++ if(copy_to_user(buf, gprsData, bufLen)) ++ return -EFAULT; + + return bufLen; + } +@@ -3836,7 +3825,8 @@ + + memset(gprsData, 0, bufLen); + +- copy_from_user(gprsData, buf, bufLen); ++ if(copy_from_user(gprsData, buf, bufLen)) ++ return -EFAULT; + + set_count(TS0710MUX_GPRS1_RECV_COUNT_IDX, gprsData[0].recvBytes); + set_count(TS0710MUX_GPRS1_SEND_COUNT_IDX, gprsData[0].sentBytes); +@@ -3893,9 +3883,9 @@ + } + post_recv_count_flag = 0; + +- INIT_WORK(&send_tqueue, send_worker, NULL); +- INIT_WORK(&receive_tqueue, receive_worker, NULL); +- INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); ++ INIT_WORK(&send_tqueue, send_worker); ++ INIT_WORK(&receive_tqueue, receive_worker); ++ INIT_WORK(&post_recv_tqueue, post_recv_worker); + + mux_driver = alloc_tty_driver(NR_MUXS); + if (!mux_driver) +@@ -3904,12 +3894,11 @@ + mux_driver->owner = THIS_MODULE; + mux_driver->driver_name = "ts0710mux"; + mux_driver->name = "mux"; +- mux_driver->devfs_name = "mux"; + mux_driver->major = TS0710MUX_MAJOR; + mux_driver->minor_start = TS0710MUX_MINOR_START; + mux_driver->type = TTY_DRIVER_TYPE_SERIAL; + mux_driver->subtype = SERIAL_TYPE_NORMAL; +- mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; ++ mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + + mux_driver->init_termios = tty_std_termios; + mux_driver->init_termios.c_iflag = 0; +@@ -3917,10 +3906,10 @@ + mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; + mux_driver->init_termios.c_lflag = 0; + +-// mux_driver.ttys = mux_table; ++ //mux_driver.ttys = mux_table; + mux_driver->termios = mux_termios; + mux_driver->termios_locked = mux_termios_locked; +-// mux_driver.driver_state = mux_state; ++ //mux_driver.driver_state = mux_state; + mux_driver->other = NULL; + + mux_driver->open = mux_open; +Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.21.orig/drivers/char/ts0710_mux_usb.c 2007-04-27 20:35:44.000000000 -0300 ++++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-04-27 22:34:31.000000000 -0300 +@@ -188,7 +188,8 @@ + buf_list_t *inbuf; + int count = urb->actual_length; + +- inbuf = kmalloc(sizeof(buf_list_t), GFP_KERNEL); ++ // we are called from interrupt context. ++ inbuf = kmalloc(sizeof(buf_list_t), GFP_ATOMIC); + if (!inbuf) { + printk("append_to_inbuf_list: (%d) out of memory!\n", + sizeof(buf_list_t)); +@@ -196,7 +197,7 @@ + } + + inbuf->size = count; +- inbuf->body = kmalloc(sizeof(char)*count, GFP_KERNEL); ++ inbuf->body = kmalloc(sizeof(char)*count, GFP_ATOMIC); + if (!inbuf->body) { + kfree(inbuf); + printk("append_to_inbuf_list: (%d) out of memory!\n", +@@ -222,7 +223,7 @@ + inbuf = list_entry(ptr, buf_list_t, list); + src_count = inbuf->size; + if (dst_count >= src_count) { +- memcpy(buf, inbuf->body, src_count); ++ memcpy((unsigned char *)buf, inbuf->body, src_count); + ret = src_count; + list_del(ptr); + kfree(inbuf->body); +@@ -282,9 +283,8 @@ + spin_unlock(&bvd_ipc->in_buf_lock); + } + +-static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) ++static void usb_ipc_read_bulk(struct urb *urb) + { +- buf_list_t *inbuf; + int count = urb->actual_length; + struct tty_struct *tty = &ipcusb_tty; + +@@ -319,7 +319,7 @@ + bvd_dbg("usb_ipc_read_bulk: completed!!!"); + } + +-static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) ++static void usb_ipc_write_bulk(struct urb *urb) + { + callback_times++; + bvd_ipc->write_finished_flag = 1; +@@ -437,7 +437,7 @@ + /*send IN token*/ + bvd_ipc->readurb_mux.actual_length = 0; + bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; +- if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) ++ if ((ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC))) + printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" + "failed! status=%d\n", ret); + bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); +@@ -447,7 +447,7 @@ + bvd_ipc->write_finished_flag = 0; + //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); + bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; +- if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) ++ if ((result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC))) + warn("ipcusb_xmit_data: funky result! result=%d\n", result); + + bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); +@@ -498,7 +498,7 @@ + return 0; + + if (*ipcusb_ap_to_bp != NULL) +- (*ipcusb_ap_to_bp)(buf, count); ++ (*ipcusb_ap_to_bp)((unsigned char *)buf, count); + + bvd_ipc->suspend_flag = 1; + +@@ -602,6 +602,7 @@ + } + + ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; ++ readsize = writesize = 0; + + while (ep_cnt < interface->bNumEndpoints) { + endpoint = &intf->cur_altsetting->endpoint[ep_cnt].desc; +@@ -792,6 +793,8 @@ + bvd_ipc->ipc_dev = NULL; + bvd_ipc->xmit.head = bvd_ipc->xmit.tail = 0; + bvd_ipc->write_flag = IPC_USB_WRITE_INIT; ++ spin_lock_init(&bvd_ipc->lock); ++ spin_lock_init(&bvd_ipc->in_buf_lock); + + ipcusb_tty_driver.write = usb_ipc_write; + ipcusb_tty_driver.chars_in_buffer = usb_ipc_chars_in_buffer; diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-remove-flipbuffers.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-flipbuffers.patch new file mode 100755 index 0000000000..d4781f9fc7 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-flipbuffers.patch @@ -0,0 +1,269 @@ +Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:25.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 00:52:26.000000000 +0100 +@@ -133,6 +133,7 @@ + + struct circ_buf xmit; /* write cric bufffer */ + struct list_head in_buf_list; ++ spinlock_t in_buf_lock; + char bulk_in_ep_mux, + bulk_out_ep_mux, + bulk_in_ep_dsplog; +@@ -204,9 +205,39 @@ + return; + } + memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); ++ spin_lock(&bvd_ipc->in_buf_lock); + list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); ++ spin_unlock(&bvd_ipc->in_buf_lock); + } + ++int get_from_inbuf_list(const unsigned char *buf, int dst_count) ++{ ++ int ret = 0; ++ spin_lock(&bvd_ipc->in_buf_lock); ++ if (!(list_empty(&bvd_ipc->in_buf_list))) { ++ int src_count; ++ buf_list_t *inbuf; ++ struct list_head *ptr; ++ ++ ptr = bvd_ipc->in_buf_list.next; ++ inbuf = list_entry(ptr, buf_list_t, list); ++ src_count = inbuf->size; ++ if (dst_count >= src_count) { ++ memcpy(buf, inbuf->body, src_count); ++ ret = src_count; ++ list_del(ptr); ++ kfree(inbuf->body); ++ kfree(inbuf); ++ } else { ++ bvd_dbg("get_from_inbuf_list: not enough space in destination buffer"); ++ } ++ } ++ spin_unlock(&bvd_ipc->in_buf_lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL(get_from_inbuf_list); ++ + static void ipcusb_timeout(unsigned long data) + { + struct tty_struct *tty = &ipcusb_tty; +@@ -214,13 +245,14 @@ + + bvd_dbg("ipcusb_timeout***"); + ++ spin_lock(&bvd_ipc->in_buf_lock); + while (!(list_empty(&bvd_ipc->in_buf_list))) { + int count; + buf_list_t *inbuf; + struct list_head *ptr = NULL; + + ptr = bvd_ipc->in_buf_list.next; +- inbuf = list_entry (ptr, buf_list_t, list); ++ inbuf = list_entry(ptr, buf_list_t, list); + count = inbuf->size; + if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { + list_del(ptr); +@@ -232,10 +264,12 @@ + break; + } + } ++ spin_unlock(&bvd_ipc->in_buf_lock); + + if (usb_mux_dispatcher) + usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ + ++ spin_lock(&bvd_ipc->in_buf_lock); + if (list_empty(&bvd_ipc->in_buf_list)) { + urb->actual_length = 0; + urb->dev = bvd_ipc->ipc_dev; +@@ -246,6 +280,7 @@ + ipcusb_timer.data = (unsigned long)urb; + mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); + } ++ spin_unlock(&bvd_ipc->in_buf_lock); + } + + static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) +@@ -266,69 +301,11 @@ + if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) + (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); + +- if (!(list_empty(&bvd_ipc->in_buf_list))) { +- int need_mux = 0; +- +- bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); +- if (count > 0) { +- bvd_ipc->suspend_flag = 1; +- append_to_inbuf_list(urb); /* append the current received urb */ +-#if 0 +- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) +- { +- last_jiff = jiffies; +- queue_apm_event(KRNL_ICL, NULL); +- } +-#endif +- } +- +- while (!(list_empty(&bvd_ipc->in_buf_list))) { +- struct list_head* ptr = NULL; +- ptr = bvd_ipc->in_buf_list.next; +- inbuf = list_entry(ptr, buf_list_t, list); +- count = inbuf->size; +- need_mux = 1; +- +- tty_insert_flip_string(tty, inbuf->body, count); +- +- list_del(ptr); +- kfree(inbuf->body); +- inbuf->body = NULL; +- kfree(inbuf); +- } +- +- if (usb_mux_dispatcher && need_mux) +- usb_mux_dispatcher(tty); /* call Liu changhui's func. */ +- +- if (list_empty(&bvd_ipc->in_buf_list)) { +- urb->actual_length = 0; +- urb->dev = bvd_ipc->ipc_dev; +- if (usb_submit_urb(urb, GFP_ATOMIC)) +- bvd_dbg("usb_ipc_read_bulk: " +- "failed resubmitting read urb"); +- bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); +- } else { +- ipcusb_timer.data = (unsigned long)urb; +- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); +- } +- } else if (count > 0) { +- bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); ++ if (count > 0) { ++ bvd_dbg("usb_ipc_read_bulk: inserting buffer into in_buf_list"); + bvd_ipc->suspend_flag = 1; + +- if (tty_insert_flip_string(tty, urb->transfer_buffer, +- count) < count) { +- bvd_ipc->suspend_flag = 1; +- append_to_inbuf_list(urb); +- ipcusb_timer.data = (unsigned long)urb; +- mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); +-#if 0 +- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) +- { +- last_jiff = jiffies; +- queue_apm_event(KRNL_ICL, NULL); +- } +-#endif +- } ++ append_to_inbuf_list(urb); + + if (usb_mux_dispatcher) + usb_mux_dispatcher(tty); /* call Liu changhui's func. */ +@@ -337,13 +314,6 @@ + urb->dev = bvd_ipc->ipc_dev; + if (usb_submit_urb(urb, GFP_ATOMIC)) + bvd_dbg("failed resubmitting read urb"); +-#if 0 +- if(jiffies - last_jiff > ICL_EVENT_INTERVAL) +- { +- last_jiff = jiffies; +- queue_apm_event(KRNL_ICL, NULL); +- } +-#endif + bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); + } + +@@ -705,7 +675,8 @@ + bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; + bvd_ipc->ipc_dev = usbdev; + bvd_ipc->writesize = writesize; +- INIT_LIST_HEAD (&bvd_ipc->in_buf_list); ++ INIT_LIST_HEAD(&bvd_ipc->in_buf_list); ++ bvd_ipc->in_buf_lock = SPIN_LOCK_UNLOCKED; + + bvd_ipc->bh.func = usbipc_bh_func; + bvd_ipc->bh.data = (unsigned long) bvd_ipc; +Index: linux-2.6.16/drivers/char/ts0710_mux.c +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux.c 2007-01-17 00:52:23.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux.c 2007-01-17 00:52:26.000000000 +0100 +@@ -3149,7 +3149,7 @@ + static void receive_worker(void *private_) + { + struct tty_struct *tty = COMM_FOR_MUX_TTY; +- int i, count; ++ int i, count, tbuf_free, tbuf_read; + static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; + static unsigned char *tbuf_ptr = &tbuf[0]; + static unsigned char *start_flag = 0; +@@ -3167,29 +3167,39 @@ + + UNUSED_PARAM(private_); + +- if (!tty) +- return; ++ if (!tty) ++ return; ++ ++ while (1) { ++ tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); ++ TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); ++ tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); ++ if (tbuf_read == 0) { ++ break; ++ } else { ++ TS0710_PRINTK("Read %i bytes.\n", tbuf_read); ++ }; ++ tbuf_ptr += tbuf_read; ++ }; ++ ++ count = (tbuf_ptr - tbuf); ++ ++ // Should be impossible? ++ //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { ++ // TS0710_PRINTK ++ // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); ++ // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); ++ //} + + #ifdef USB_FOR_MUX +- TS0710_DEBUG("Receive following bytes from IPC-USB"); ++ TS0710_DEBUG("Received following bytes from IPC-USB"); + #else +- TS0710_DEBUG("Receive following bytes from UART"); ++ TS0710_DEBUG("Received following bytes from UART"); + #endif +- +- TS0710_DEBUGHEX(cp, count); +- +- if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { +- TS0710_PRINTK +- ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); +- count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); +- } +- +- count = tty_buffer_request_room(tty, count); +- +- for (i = 0; i < count; i++) +- tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); +- +- tbuf_ptr += count; ++ TS0710_DEBUGHEX(tbuf, count); ++ ++ //gets updated above ++ //tbuf_ptr += count; + search = &tbuf[0]; + + if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { +Index: linux-2.6.16/drivers/char/ts0710_mux_usb.h +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:23.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux_usb.h 2007-01-17 00:52:26.000000000 +0100 +@@ -27,3 +27,6 @@ + extern struct tty_struct *usb_for_mux_tty; + extern void (*usb_mux_dispatcher)(struct tty_struct *tty); + extern void (*usb_mux_sender)(void); ++ ++extern int get_from_inbuf_list(const unsigned char *buf, int dst_count); ++ diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-remove-get_halted_bit.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-get_halted_bit.patch new file mode 100755 index 0000000000..0ebe27d03b --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-get_halted_bit.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:21.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:06:31.000000000 +0100 +@@ -461,7 +461,7 @@ + ipcusb_xmit_data(); + } + +-extern void get_halted_bit(void); ++//extern void get_halted_bit(void); + + static void usbipc_bh_bp_func(unsigned long param) + { +@@ -472,7 +472,7 @@ + "UHCRHPS3=0x%x", UHCRHPS3); + } + if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { +- get_halted_bit(); ++ //get_halted_bit(); + + /*send a IN token*/ + bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux-remove-usbh_finished_resume.patch b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-usbh_finished_resume.patch new file mode 100755 index 0000000000..c415ded428 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux-remove-usbh_finished_resume.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.16/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.16.orig/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:23.000000000 +0100 ++++ linux-2.6.16/drivers/char/ts0710_mux_usb.c 2007-01-17 01:12:37.000000000 +0100 +@@ -97,7 +97,6 @@ + static int sumbit_times = 0; + static int callback_times = 0; + //static unsigned long last_jiff = 0; +-extern int usbh_finished_resume; + /*end global values defined*/ + + MODULE_AUTHOR(DRIVER_AUTHOR); +@@ -546,9 +545,6 @@ + void usb_send_readurb(void) + { + //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); +- +- if (usbh_finished_resume == 0) +- return; + + tasklet_schedule(&bvd_ipc->bh_bp); + } diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux_cli.patch b/packages/linux/linux-ezx-2.6.21/patches/mux_cli.patch new file mode 100755 index 0000000000..b3974a5996 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux_cli.patch @@ -0,0 +1,5396 @@ +Index: linux-2.6.21/drivers/char/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/char/Kconfig 2007-05-06 17:07:33.000000000 -0300 ++++ linux-2.6.21/drivers/char/Kconfig 2007-05-06 17:10:53.000000000 -0300 +@@ -1071,5 +1071,18 @@ + /sys/devices/platform/telco_clock, with a number of files for + controlling the behavior of this hardware. + ++config TS0710_MUX ++ tristate "GSM TS 07.10 Multiplex driver" ++ depends on EZX_BP ++ help ++ This implements the GSM 07.10 multiplex. ++ ++config TS0710_MUX_USB ++ tristate "Motorola USB support for TS 07.10 Multiplex driver" ++ depends on TS0710_MUX ++ help ++ This ads support for TS 07.10 over USB, as found in motorola ++ Smartphones. ++ + endmenu + +Index: linux-2.6.21/drivers/char/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/char/Makefile 2007-05-06 17:07:33.000000000 -0300 ++++ linux-2.6.21/drivers/char/Makefile 2007-05-06 17:10:21.000000000 -0300 +@@ -104,6 +104,9 @@ + obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o + obj-$(CONFIG_TCG_TPM) += tpm/ + ++obj-$(CONFIG_TS0710_MUX) += ts0710_mux.o ts0710_mux_usb.o ++ ++ + # Files generated that shall be removed upon make clean + clean-files := consolemap_deftbl.c defkeymap.c + +Index: linux-2.6.21/drivers/char/ts0710.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/char/ts0710.h 2007-05-06 17:10:21.000000000 -0300 +@@ -0,0 +1,368 @@ ++/* ++ * File: ts0710.h ++ * ++ * Portions derived from rfcomm.c, original header as follows: ++ * ++ * Copyright (C) 2000, 2001 Axis Communications AB ++ * ++ * Author: Mats Friden ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * Exceptionally, Axis Communications AB grants discretionary and ++ * conditional permissions for additional use of the text contained ++ * in the company's release of the AXIS OpenBT Stack under the ++ * provisions set forth hereunder. ++ * ++ * Provided that, if you use the AXIS OpenBT Stack with other files, ++ * that do not implement functionality as specified in the Bluetooth ++ * System specification, to produce an executable, this does not by ++ * itself cause the resulting executable to be covered by the GNU ++ * General Public License. Your use of that executable is in no way ++ * restricted on account of using the AXIS OpenBT Stack code with it. ++ * ++ * This exception does not however invalidate any other reasons why ++ * the executable file might be covered by the provisions of the GNU ++ * General Public License. ++ * ++ */ ++/* ++ * Copyright (C) 2002 Motorola ++ * ++ * 07/28/2002 Initial version based on rfcomm.c ++ * 11/18/2002 Modified ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#define TS0710_MAX_CHN 14 ++ ++#define SET_PF(ctr) ((ctr) | (1 << 4)) ++#define CLR_PF(ctr) ((ctr) & 0xef) ++#define GET_PF(ctr) (((ctr) >> 4) & 0x1) ++ ++#define GET_PN_MSG_FRAME_SIZE(pn) ( ((pn)->frame_sizeh << 8) | ((pn)->frame_sizel)) ++#define SET_PN_MSG_FRAME_SIZE(pn, size) ({ (pn)->frame_sizel = (size) & 0xff; \ ++ (pn)->frame_sizeh = (size) >> 8; }) ++ ++#define GET_LONG_LENGTH(a) ( ((a).h_len << 7) | ((a).l_len) ) ++#define SET_LONG_LENGTH(a, length) ({ (a).ea = 0; \ ++ (a).l_len = length & 0x7F; \ ++ (a).h_len = (length >> 7) & 0xFF; }) ++ ++#define SHORT_CRC_CHECK 3 ++#define LONG_CRC_CHECK 4 ++ ++/* FIXME: Should thsi one be define here? */ ++#define SHORT_PAYLOAD_SIZE 127 ++ ++#define EA 1 ++#define FCS_SIZE 1 ++#define FLAG_SIZE 2 ++ ++#define TS0710_MAX_HDR_SIZE 5 ++#define DEF_TS0710_MTU 256 ++ ++#define TS0710_BASIC_FLAG 0xF9 ++/* the control field */ ++#define SABM 0x2f ++#define SABM_SIZE 4 ++#define UA 0x63 ++#define UA_SIZE 4 ++#define DM 0x0f ++#define DISC 0x43 ++#define UIH 0xef ++ ++/* the type field in a multiplexer command packet */ ++#define TEST 0x8 ++#define FCON 0x28 ++#define FCOFF 0x18 ++#define MSC 0x38 ++#define RPN 0x24 ++#define RLS 0x14 ++#define PN 0x20 ++#define NSC 0x4 ++ ++/* V.24 modem control signals */ ++#define FC 0x2 ++#define RTC 0x4 ++#define RTR 0x8 ++#define IC 0x40 ++#define DV 0x80 ++ ++#define CTRL_CHAN 0 /* The control channel is defined as DLCI 0 */ ++#define MCC_CMD 1 /* Multiplexer command cr */ ++#define MCC_RSP 0 /* Multiplexer response cr */ ++ ++#ifdef __LITTLE_ENDIAN_BITFIELD ++ ++typedef struct { ++ __u8 ea:1; ++ __u8 cr:1; ++ __u8 d:1; ++ __u8 server_chn:5; ++} __attribute__ ((packed)) address_field; ++ ++typedef struct { ++ __u8 ea:1; ++ __u8 len:7; ++} __attribute__ ((packed)) short_length; ++ ++typedef struct { ++ __u8 ea:1; ++ __u8 l_len:7; ++ __u8 h_len; ++} __attribute__ ((packed)) long_length; ++ ++typedef struct { ++ address_field addr; ++ __u8 control; ++ short_length length; ++} __attribute__ ((packed)) short_frame_head; ++ ++typedef struct { ++ short_frame_head h; ++ __u8 data[0]; ++} __attribute__ ((packed)) short_frame; ++ ++typedef struct { ++ address_field addr; ++ __u8 control; ++ long_length length; ++ __u8 data[0]; ++} __attribute__ ((packed)) long_frame_head; ++ ++typedef struct { ++ long_frame_head h; ++ __u8 data[0]; ++} __attribute__ ((packed)) long_frame; ++ ++/* Typedefinitions for structures used for the multiplexer commands */ ++typedef struct { ++ __u8 ea:1; ++ __u8 cr:1; ++ __u8 type:6; ++} __attribute__ ((packed)) mcc_type; ++ ++typedef struct { ++ mcc_type type; ++ short_length length; ++ __u8 value[0]; ++} __attribute__ ((packed)) mcc_short_frame_head; ++ ++typedef struct { ++ mcc_short_frame_head h; ++ __u8 value[0]; ++} __attribute__ ((packed)) mcc_short_frame; ++ ++typedef struct { ++ mcc_type type; ++ long_length length; ++ __u8 value[0]; ++} __attribute__ ((packed)) mcc_long_frame_head; ++ ++typedef struct { ++ mcc_long_frame_head h; ++ __u8 value[0]; ++} __attribute__ ((packed)) mcc_long_frame; ++ ++/* MSC-command */ ++typedef struct { ++ __u8 ea:1; ++ __u8 fc:1; ++ __u8 rtc:1; ++ __u8 rtr:1; ++ __u8 reserved:2; ++ __u8 ic:1; ++ __u8 dv:1; ++} __attribute__ ((packed)) v24_sigs; ++ ++typedef struct { ++ __u8 ea:1; ++ __u8 b1:1; ++ __u8 b2:1; ++ __u8 b3:1; ++ __u8 len:4; ++} __attribute__ ((packed)) brk_sigs; ++ ++typedef struct { ++ short_frame_head s_head; ++ mcc_short_frame_head mcc_s_head; ++ address_field dlci; ++ __u8 v24_sigs; ++ //brk_sigs break_signals; ++ __u8 fcs; ++} __attribute__ ((packed)) msc_msg; ++ ++#if 0 ++/* conflict with termios.h */ ++/* RPN command */ ++#define B2400 0 ++#define B4800 1 ++#define B7200 2 ++#define B9600 3 ++#define B19200 4 ++#define B38400 5 ++#define B57600 6 ++#define B115200 7 ++#define D230400 8 ++#endif ++ ++/* ++typedef struct{ ++ __u8 bit_rate:1; ++ __u8 data_bits:1; ++ __u8 stop_bit:1; ++ __u8 parity:1; ++ __u8 parity_type:1; ++ __u8 xon_u8:1; ++ __u8 xoff_u8:1; ++ __u8 res1:1; ++ __u8 xon_input:1; ++ __u8 xon_output:1; ++ __u8 rtr_input:1; ++ __u8 rtr_output:1; ++ __u8 rtc_input:1; ++ __u8 rtc_output:1; ++ __u8 res2:2; ++} __attribute__((packed)) parameter_mask; ++ ++typedef struct{ ++ __u8 bit_rate; ++ __u8 data_bits:2; ++ __u8 stop_bit:1; ++ __u8 parity:1; ++ __u8 parity_type:2; ++ __u8 res1:2; ++ __u8 xon_input:1; ++ __u8 xon_output:1; ++ __u8 rtr_input:1; ++ __u8 rtr_output:1; ++ __u8 rtc_input:1; ++ __u8 rtc_output:1; ++ __u8 res2:2; ++ __u8 xon_u8; ++ __u8 xoff_u8; ++ parameter_mask pm; ++} __attribute__((packed)) rpn_values; ++ ++typedef struct{ ++ short_frame_head s_head; ++ mcc_short_frame_head mcc_s_head; ++ address_field dlci; ++ rpn_values rpn_val; ++ __u8 fcs; ++} __attribute__((packed)) rpn_msg; ++*/ ++ ++/* RLS-command */ ++/* ++typedef struct{ ++ short_frame_head s_head; ++ mcc_short_frame_head mcc_s_head; ++ address_field dlci; ++ __u8 error:4; ++ __u8 res:4; ++ __u8 fcs; ++} __attribute__((packed)) rls_msg; ++*/ ++ ++/* PN-command */ ++typedef struct { ++ short_frame_head s_head; ++ mcc_short_frame_head mcc_s_head; ++ __u8 dlci:6; ++ __u8 res1:2; ++ __u8 frame_type:4; ++ __u8 credit_flow:4; ++ __u8 prior:6; ++ __u8 res2:2; ++ __u8 ack_timer; ++ __u8 frame_sizel; ++ __u8 frame_sizeh; ++ __u8 max_nbrof_retrans; ++ __u8 credits; ++ __u8 fcs; ++} __attribute__ ((packed)) pn_msg; ++ ++/* NSC-command */ ++typedef struct { ++ short_frame_head s_head; ++ mcc_short_frame_head mcc_s_head; ++ mcc_type command_type; ++ __u8 fcs; ++} __attribute__ ((packed)) nsc_msg; ++ ++#else ++#error Only littel-endianess supported now! ++#endif ++ ++enum { ++ REJECTED = 0, ++ DISCONNECTED, ++ CONNECTING, ++ NEGOTIATING, ++ CONNECTED, ++ DISCONNECTING, ++ FLOW_STOPPED ++}; ++ ++enum ts0710_events { ++ CONNECT_IND, ++ CONNECT_CFM, ++ DISCONN_CFM ++}; ++ ++typedef struct { ++ volatile __u8 state; ++ volatile __u8 flow_control; ++ volatile __u8 initiated; ++ volatile __u8 initiator; ++ volatile __u16 mtu; ++ wait_queue_head_t open_wait; ++ wait_queue_head_t close_wait; ++} dlci_struct; ++ ++/* user space interfaces */ ++typedef struct { ++ volatile __u8 initiator; ++ volatile __u8 c_dlci; ++ volatile __u16 mtu; ++ volatile __u8 be_testing; ++ volatile __u32 test_errs; ++ wait_queue_head_t test_wait; ++ ++ dlci_struct dlci[TS0710_MAX_CHN]; ++} ts0710_con; +Index: linux-2.6.21/drivers/char/ts0710_mux.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/char/ts0710_mux.c 2007-05-06 17:10:21.000000000 -0300 +@@ -0,0 +1,3966 @@ ++/* ++ * File: mux_driver.c ++ * ++ * Portions derived from rfcomm.c, original header as follows: ++ * ++ * Copyright (C) 2000, 2001 Axis Communications AB ++ * ++ * Author: Mats Friden ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * Exceptionally, Axis Communications AB grants discretionary and ++ * conditional permissions for additional use of the text contained ++ * in the company's release of the AXIS OpenBT Stack under the ++ * provisions set forth hereunder. ++ * ++ * Provided that, if you use the AXIS OpenBT Stack with other files, ++ * that do not implement functionality as specified in the Bluetooth ++ * System specification, to produce an executable, this does not by ++ * itself cause the resulting executable to be covered by the GNU ++ * General Public License. Your use of that executable is in no way ++ * restricted on account of using the AXIS OpenBT Stack code with it. ++ * ++ * This exception does not however invalidate any other reasons why ++ * the executable file might be covered by the provisions of the GNU ++ * General Public License. ++ * ++ */ ++/* ++ * Copyright (C) 2002-2004 Motorola ++ * Copyright (C) 2006 Harald Welte ++ * ++ * 07/28/2002 Initial version ++ * 11/18/2002 Second version ++ * 04/21/2004 Add GPRS PROC ++ */ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#define USB_FOR_MUX ++ ++#ifndef USB_FOR_MUX ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++//#include ++ ++#include ++#include ++#include ++ ++#ifdef USB_FOR_MUX ++//#include ++#include "ts0710_mux_usb.h" ++#endif ++ ++#include "ts0710.h" ++#include "ts0710_mux.h" ++ ++#define TS0710MUX_GPRS_SESSION_MAX 2 ++#define TS0710MUX_MAJOR 250 ++#define TS0710MUX_MINOR_START 0 ++#define NR_MUXS 16 ++ ++ /*#define TS0710MUX_TIME_OUT 30 *//* 300ms */ ++#define TS0710MUX_TIME_OUT 250 /* 2500ms, for BP UART hardware flow control AP UART */ ++ ++#define TS0710MUX_IO_DLCI_FC_ON 0x54F2 ++#define TS0710MUX_IO_DLCI_FC_OFF 0x54F3 ++#define TS0710MUX_IO_FC_ON 0x54F4 ++#define TS0710MUX_IO_FC_OFF 0x54F5 ++ ++#define TS0710MUX_MAX_BUF_SIZE 2048 ++ ++#define TS0710MUX_SEND_BUF_OFFSET 10 ++#define TS0710MUX_SEND_BUF_SIZE (DEF_TS0710_MTU + TS0710MUX_SEND_BUF_OFFSET + 34) ++#define TS0710MUX_RECV_BUF_SIZE TS0710MUX_SEND_BUF_SIZE ++ ++/*For BP UART problem Begin*/ ++#ifdef TS0710SEQ2 ++#define ACK_SPACE 66 /* 6 * 11(ACK frame size) */ ++#else ++#define ACK_SPACE 42 /* 6 * 7(ACK frame size) */ ++#endif ++/*For BP UART problem End*/ ++ ++ /*#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE)*//* For BP UART problem */ ++#define TS0710MUX_SERIAL_BUF_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + ACK_SPACE) /* For BP UART problem: ACK_SPACE */ ++ ++#define TS0710MUX_MAX_TOTAL_FRAME_SIZE (DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE + FLAG_SIZE) ++#define TS0710MUX_MAX_CHARS_IN_BUF 65535 ++#define TS0710MUX_THROTTLE_THRESHOLD DEF_TS0710_MTU ++ ++#define TEST_PATTERN_SIZE 250 ++ ++#define CMDTAG 0x55 ++#define DATATAG 0xAA ++ ++#define ACK 0x4F /*For BP UART problem */ ++ ++/*For BP UART problem Begin*/ ++#ifdef TS0710SEQ2 ++#define FIRST_BP_SEQ_OFFSET 1 /*offset from start flag */ ++#define SECOND_BP_SEQ_OFFSET 2 /*offset from start flag */ ++#define FIRST_AP_SEQ_OFFSET 3 /*offset from start flag */ ++#define SECOND_AP_SEQ_OFFSET 4 /*offset from start flag */ ++#define SLIDE_BP_SEQ_OFFSET 5 /*offset from start flag */ ++#define SEQ_FIELD_SIZE 5 ++#else ++#define SLIDE_BP_SEQ_OFFSET 1 /*offset from start flag */ ++#define SEQ_FIELD_SIZE 1 ++#endif ++ ++#define ADDRESS_FIELD_OFFSET (1 + SEQ_FIELD_SIZE) /*offset from start flag */ ++/*For BP UART problem End*/ ++ ++#ifndef UNUSED_PARAM ++#define UNUSED_PARAM(v) (void)(v) ++#endif ++ ++#define TS0710MUX_GPRS1_DLCI 7 ++#define TS0710MUX_GPRS2_DLCI 8 ++ ++#define TS0710MUX_GPRS1_RECV_COUNT_IDX 0 ++#define TS0710MUX_GPRS1_SEND_COUNT_IDX 1 ++#define TS0710MUX_GPRS2_RECV_COUNT_IDX 2 ++#define TS0710MUX_GPRS2_SEND_COUNT_IDX 3 ++#define TS0710MUX_COUNT_MAX_IDX 3 ++#define TS0710MUX_COUNT_IDX_NUM (TS0710MUX_COUNT_MAX_IDX + 1) ++ ++static volatile int mux_data_count[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; ++static volatile int mux_data_count2[TS0710MUX_COUNT_IDX_NUM] = { 0, 0, 0, 0 }; ++static struct semaphore mux_data_count_mutex[TS0710MUX_COUNT_IDX_NUM]; ++static volatile __u8 post_recv_count_flag = 0; ++ ++/*PROC file*/ ++struct proc_dir_entry *gprs_proc_file = NULL; ++ssize_t file_proc_read(struct file *file, char *buf, size_t size, ++ loff_t * ppos); ++ssize_t file_proc_write(struct file *file, const char *buf, size_t count, ++ loff_t * ppos); ++struct file_operations file_proc_operations = { ++ read:file_proc_read, ++ write:file_proc_write, ++}; ++typedef struct { ++ int recvBytes; ++ int sentBytes; ++} gprs_bytes; ++ ++static __u8 tty2dlci[NR_MUXS] = ++ { 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, 13 }; ++static __u8 iscmdtty[NR_MUXS] = ++ { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; ++typedef struct { ++ __u8 cmdtty; ++ __u8 datatty; ++} dlci_tty; ++static dlci_tty dlci2tty[] = { {0, 0}, /* DLCI 0 */ ++{0, 0}, /* DLCI 1 */ ++{1, 1}, /* DLCI 2 */ ++{2, 2}, /* DLCI 3 */ ++{3, 3}, /* DLCI 4 */ ++{4, 4}, /* DLCI 5 */ ++{5, 8}, /* DLCI 6 */ ++{6, 9}, /* DLCI 7 */ ++{7, 10}, /* DLCI 8 */ ++{11, 11}, /* DLCI 9 */ ++{12, 12}, /* DLCI 10 */ ++{13, 13}, /* DLCI 11 */ ++{14, 14}, /* DLCI 12 */ ++{15, 15} ++}; /* DLCI 13 */ ++ ++typedef struct { ++ volatile __u8 buf[TS0710MUX_SEND_BUF_SIZE]; ++ volatile __u8 *frame; ++ unsigned long flags; ++ volatile __u16 length; ++ volatile __u8 filled; ++ volatile __u8 dummy; /* Allignment to 4*n bytes */ ++} mux_send_struct; ++ ++/* Bit number in flags of mux_send_struct */ ++#define BUF_BUSY 0 ++ ++struct mux_recv_packet_tag { ++ __u8 *data; ++ __u32 length; ++ struct mux_recv_packet_tag *next; ++}; ++typedef struct mux_recv_packet_tag mux_recv_packet; ++ ++struct mux_recv_struct_tag { ++ __u8 data[TS0710MUX_RECV_BUF_SIZE]; ++ __u32 length; ++ __u32 total; ++ mux_recv_packet *mux_packet; ++ struct mux_recv_struct_tag *next; ++ int no_tty; ++ volatile __u8 post_unthrottle; ++}; ++typedef struct mux_recv_struct_tag mux_recv_struct; ++ ++#define RECV_RUNNING 0 ++static unsigned long mux_recv_flags = 0; ++ ++static mux_send_struct *mux_send_info[NR_MUXS]; ++static volatile __u8 mux_send_info_flags[NR_MUXS]; ++static volatile __u8 mux_send_info_idx = NR_MUXS; ++ ++static mux_recv_struct *mux_recv_info[NR_MUXS]; ++static volatile __u8 mux_recv_info_flags[NR_MUXS]; ++static mux_recv_struct *mux_recv_queue = NULL; ++ ++static struct tty_driver mux_driver; ++ ++#ifdef USB_FOR_MUX ++#define COMM_FOR_MUX_DRIVER usb_for_mux_driver ++#define COMM_FOR_MUX_TTY usb_for_mux_tty ++#define COMM_MUX_DISPATCHER usb_mux_dispatcher ++#define COMM_MUX_SENDER usb_mux_sender ++#else ++#define COMM_FOR_MUX_DRIVER serial_for_mux_driver ++#define COMM_FOR_MUX_TTY serial_for_mux_tty ++#define COMM_MUX_DISPATCHER serial_mux_dispatcher ++#define COMM_MUX_SENDER serial_mux_sender ++ ++extern struct list_head *tq_serial_for_mux; ++#endif ++ ++extern struct tty_driver *COMM_FOR_MUX_DRIVER; ++extern struct tty_struct *COMM_FOR_MUX_TTY; ++extern void (*COMM_MUX_DISPATCHER) (struct tty_struct * tty); ++extern void (*COMM_MUX_SENDER) (void); ++ ++static struct work_struct send_tqueue; ++static struct work_struct receive_tqueue; ++static struct work_struct post_recv_tqueue; ++ ++static struct tty_struct *mux_table[NR_MUXS]; ++static struct termios *mux_termios[NR_MUXS]; ++static struct termios *mux_termios_locked[NR_MUXS]; ++static volatile short int mux_tty[NR_MUXS]; ++ ++#ifdef min ++#undef min ++#define min(a,b) ( (a)<(b) ? (a):(b) ) ++#endif ++ ++static int get_count(__u8 idx); ++static int set_count(__u8 idx, int count); ++static int add_count(__u8 idx, int count); ++ ++static int send_ua(ts0710_con * ts0710, __u8 dlci); ++static int send_dm(ts0710_con * ts0710, __u8 dlci); ++static int send_sabm(ts0710_con * ts0710, __u8 dlci); ++static int send_disc(ts0710_con * ts0710, __u8 dlci); ++static void queue_uih(mux_send_struct * send_info, __u16 len, ++ ts0710_con * ts0710, __u8 dlci); ++static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, ++ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr); ++static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr); ++static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr); ++ ++static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum); ++static __u8 crc_calc(__u8 * data, __u32 length); ++static void create_crctable(__u8 table[]); ++ ++static void mux_sched_send(void); ++ ++static __u8 crctable[256]; ++ ++static ts0710_con ts0710_connection; ++/* ++static rpn_values rpn_val; ++*/ ++ ++static int valid_dlci(__u8 dlci) ++{ ++ if ((dlci < TS0710_MAX_CHN) && (dlci > 0)) ++ return 1; ++ else ++ return 0; ++} ++ ++#ifdef TS0710DEBUG ++ ++#ifdef PRINT_OUTPUT_PRINTK ++#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) ++#else ++#include "ezxlog.h" ++static __u8 strDebug[256]; ++#define TS0710_DEBUG(fmt, arg...) ({ snprintf(strDebug, sizeof(strDebug), "MUX " __FUNCTION__ ": " fmt "\n" , ## arg); \ ++ /*printk("%s", strDebug)*/ezxlogk("MX", strDebug, strlen(strDebug)); }) ++#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ ++ ++#else ++#define TS0710_DEBUG(fmt...) ++#endif /* End #ifdef TS0710DEBUG */ ++ ++#ifdef TS0710LOG ++static unsigned char g_tbuf[TS0710MUX_MAX_BUF_SIZE]; ++#ifdef PRINT_OUTPUT_PRINTK ++#define TS0710_LOG(fmt, arg...) printk(fmt, ## arg) ++#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) ++#else ++#include "ezxlog.h" ++static __u8 strLog[256]; ++#define TS0710_LOG(fmt, arg...) ({ snprintf(strLog, sizeof(strLog), fmt, ## arg); \ ++ /*printk("%s", strLog)*/ezxlogk("MX", strLog, strlen(strLog)); }) ++#define TS0710_PRINTK(fmt, arg...) ({ printk(fmt, ## arg); \ ++ TS0710_LOG(fmt, ## arg); }) ++#endif /* End #ifdef PRINT_OUTPUT_PRINTK */ ++ ++#else ++#define TS0710_LOG(fmt...) ++#define TS0710_PRINTK(fmt, arg...) printk(fmt, ## arg) ++#endif /* End #ifdef TS0710LOG */ ++ ++#ifdef TS0710DEBUG ++static void TS0710_DEBUGHEX(__u8 * buf, int len) ++{ ++ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; ++ ++ int i; ++ int c; ++ ++ if (len <= 0) { ++ return; ++ } ++ ++ c = 0; ++ for (i = 0; (i < len) && (c < (TS0710MUX_MAX_BUF_SIZE - 3)); i++) { ++ sprintf(&tbuf[c], "%02x ", buf[i]); ++ c += 3; ++ } ++ tbuf[c] = 0; ++ ++#ifdef PRINT_OUTPUT_PRINTK ++ TS0710_DEBUG("%s", tbuf); ++#else ++ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, c); ++#endif ++} ++static void TS0710_DEBUGSTR(__u8 * buf, int len) ++{ ++ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; ++ ++ if (len <= 0) { ++ return; ++ } ++ ++ if (len > (TS0710MUX_MAX_BUF_SIZE - 1)) { ++ len = (TS0710MUX_MAX_BUF_SIZE - 1); ++ } ++ ++ memcpy(tbuf, buf, len); ++ tbuf[len] = 0; ++ ++#ifdef PRINT_OUTPUT_PRINTK ++ /* 0x00 byte in the string pointed by tbuf may truncate the print result */ ++ TS0710_DEBUG("%s", tbuf); ++#else ++ /*printk("%s\n", tbuf) */ ezxlogk("MX", tbuf, len); ++#endif ++} ++#else ++#define TS0710_DEBUGHEX(buf, len) ++#define TS0710_DEBUGSTR(buf, len) ++#endif /* End #ifdef TS0710DEBUG */ ++ ++#ifdef TS0710LOG ++static void TS0710_LOGSTR_FRAME(__u8 send, __u8 * data, int len) ++{ ++ short_frame *short_pkt; ++ long_frame *long_pkt; ++ __u8 *uih_data_start; ++ __u32 uih_len; ++ __u8 dlci; ++ int pos; ++ ++ if (len <= 0) { ++ return; ++ } ++ ++ pos = 0; ++ if (send) { ++ pos += sprintf(&g_tbuf[pos], "<"); ++ short_pkt = (short_frame *) (data + 1); /*For BP UART problem */ ++ } else { ++ /*For BP UART problem */ ++ /*pos += sprintf(&g_tbuf[pos], ">"); */ ++ pos += sprintf(&g_tbuf[pos], ">%d ", *(data + SLIDE_BP_SEQ_OFFSET)); /*For BP UART problem */ ++ ++#ifdef TS0710SEQ2 ++ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", *(data + FIRST_BP_SEQ_OFFSET), *(data + SECOND_BP_SEQ_OFFSET), *(data + FIRST_AP_SEQ_OFFSET), *(data + SECOND_AP_SEQ_OFFSET)); /*For BP UART problem */ ++#endif ++ ++ short_pkt = (short_frame *) (data + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ ++ } ++ ++ /*For BP UART problem */ ++ /*short_pkt = (short_frame *)(data + 1); */ ++ ++ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; ++ switch (CLR_PF(short_pkt->h.control)) { ++ case SABM: ++ pos += sprintf(&g_tbuf[pos], "C SABM %d ::", dlci); ++ break; ++ case UA: ++ pos += sprintf(&g_tbuf[pos], "C UA %d ::", dlci); ++ break; ++ case DM: ++ pos += sprintf(&g_tbuf[pos], "C DM %d ::", dlci); ++ break; ++ case DISC: ++ pos += sprintf(&g_tbuf[pos], "C DISC %d ::", dlci); ++ break; ++ ++ /*For BP UART problem Begin */ ++ case ACK: ++ pos += sprintf(&g_tbuf[pos], "C ACK %d ", short_pkt->data[0]); ++ ++#ifdef TS0710SEQ2 ++ pos += sprintf(&g_tbuf[pos], "%02x %02x %02x %02x ", short_pkt->data[1], short_pkt->data[2], short_pkt->data[3], short_pkt->data[4]); /*For BP UART problem */ ++#endif ++ ++ pos += sprintf(&g_tbuf[pos], "::"); ++ break; ++ /*For BP UART problem End */ ++ ++ case UIH: ++ if (!dlci) { ++ pos += sprintf(&g_tbuf[pos], "C MCC %d ::", dlci); ++ } else { ++ ++ if ((short_pkt->h.length.ea) == 0) { ++ long_pkt = (long_frame *) short_pkt; ++ uih_len = GET_LONG_LENGTH(long_pkt->h.length); ++ uih_data_start = long_pkt->h.data; ++ } else { ++ uih_len = short_pkt->h.length.len; ++ uih_data_start = short_pkt->data; ++ } ++ switch (*uih_data_start) { ++ case CMDTAG: ++ pos += ++ sprintf(&g_tbuf[pos], "I %d A %d ::", dlci, ++ uih_len); ++ break; ++ case DATATAG: ++ default: ++ pos += ++ sprintf(&g_tbuf[pos], "I %d D %d ::", dlci, ++ uih_len); ++ break; ++ } ++ ++ } ++ break; ++ default: ++ pos += sprintf(&g_tbuf[pos], "N!!! %d ::", dlci); ++ break; ++ } ++ ++ if (len > (sizeof(g_tbuf) - pos - 1)) { ++ len = (sizeof(g_tbuf) - pos - 1); ++ } ++ ++ memcpy(&g_tbuf[pos], data, len); ++ pos += len; ++ g_tbuf[pos] = 0; ++ ++#ifdef PRINT_OUTPUT_PRINTK ++ /* 0x00 byte in the string pointed by g_tbuf may truncate the print result */ ++ TS0710_LOG("%s\n", g_tbuf); ++#else ++ /*printk("%s\n", g_tbuf) */ ezxlogk("MX", g_tbuf, pos); ++#endif ++} ++#else ++#define TS0710_LOGSTR_FRAME(send, data, len) ++#endif ++ ++#ifdef TS0710SIG ++#define my_for_each_task(p) \ ++ for ((p) = current; ((p) = (p)->next_task) != current; ) ++ ++static void TS0710_SIG2APLOGD(void) ++{ ++ struct task_struct *p; ++ static __u8 sig = 0; ++ ++ if (sig) { ++ return; ++ } ++ ++ read_lock(&tasklist_lock); ++ my_for_each_task(p) { ++ if (strncmp(p->comm, "aplogd", 6) == 0) { ++ sig = 1; ++ if (send_sig(SIGUSR2, p, 1) == 0) { ++ TS0710_PRINTK ++ ("MUX: success to send SIGUSR2 to aplogd!\n"); ++ } else { ++ TS0710_PRINTK ++ ("MUX: failure to send SIGUSR2 to aplogd!\n"); ++ } ++ break; ++ } ++ } ++ read_unlock(&tasklist_lock); ++ ++ if (!sig) { ++ TS0710_PRINTK("MUX: not found aplogd!\n"); ++ } ++} ++#else ++#define TS0710_SIG2APLOGD() ++#endif ++ ++static int basic_write(ts0710_con * ts0710, __u8 * buf, int len) ++{ ++ int res; ++ ++ UNUSED_PARAM(ts0710); ++ ++ buf[0] = TS0710_BASIC_FLAG; ++ buf[len + 1] = TS0710_BASIC_FLAG; ++ ++ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { ++ TS0710_PRINTK ++ ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); ++ ++#ifndef USB_FOR_MUX ++ TS0710_PRINTK ++ ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); ++ TS0710_SIG2APLOGD(); ++#endif ++ ++ return -1; ++ } ++ ++ TS0710_LOGSTR_FRAME(1, buf, len + 2); ++ TS0710_DEBUGHEX(buf, len + 2); ++ ++ res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); ++ ++ if (res != len + 2) { ++ TS0710_PRINTK("MUX basic_write: Write Error!\n"); ++ return -1; ++ } ++ ++ return len + 2; ++} ++ ++/* Functions for the crc-check and calculation */ ++ ++#define CRC_VALID 0xcf ++ ++static __u32 crc_check(__u8 * data, __u32 length, __u8 check_sum) ++{ ++ __u8 fcs = 0xff; ++ ++ while (length--) { ++ fcs = crctable[fcs ^ *data++]; ++ } ++ fcs = crctable[fcs ^ check_sum]; ++ TS0710_DEBUG("fcs : %d\n", fcs); ++ if (fcs == (uint) 0xcf) { /*CRC_VALID) */ ++ TS0710_DEBUG("crc_check: CRC check OK\n"); ++ return 0; ++ } else { ++ TS0710_PRINTK("MUX crc_check: CRC check failed\n"); ++ return 1; ++ } ++} ++ ++/* Calculates the checksum according to the ts0710 specification */ ++ ++static __u8 crc_calc(__u8 * data, __u32 length) ++{ ++ __u8 fcs = 0xff; ++ ++ while (length--) { ++ fcs = crctable[fcs ^ *data++]; ++ } ++ ++ return 0xff - fcs; ++} ++ ++/* Calulates a reversed CRC table for the FCS check */ ++ ++static void create_crctable(__u8 table[]) ++{ ++ int i, j; ++ ++ __u8 data; ++ __u8 code_word = (__u8) 0xe0; ++ __u8 sr = (__u8) 0; ++ ++ for (j = 0; j < 256; j++) { ++ data = (__u8) j; ++ ++ for (i = 0; i < 8; i++) { ++ if ((data & 0x1) ^ (sr & 0x1)) { ++ sr >>= 1; ++ sr ^= code_word; ++ } else { ++ sr >>= 1; ++ } ++ ++ data >>= 1; ++ sr &= 0xff; ++ } ++ ++ table[j] = sr; ++ sr = 0; ++ } ++} ++ ++static void ts0710_reset_dlci(__u8 j) ++{ ++ if (j >= TS0710_MAX_CHN) ++ return; ++ ++ ts0710_connection.dlci[j].state = DISCONNECTED; ++ ts0710_connection.dlci[j].flow_control = 0; ++ ts0710_connection.dlci[j].mtu = DEF_TS0710_MTU; ++ ts0710_connection.dlci[j].initiated = 0; ++ ts0710_connection.dlci[j].initiator = 0; ++ init_waitqueue_head(&ts0710_connection.dlci[j].open_wait); ++ init_waitqueue_head(&ts0710_connection.dlci[j].close_wait); ++} ++ ++static void ts0710_reset_con(void) ++{ ++ __u8 j; ++ ++ ts0710_connection.initiator = 0; ++ ts0710_connection.mtu = DEF_TS0710_MTU + TS0710_MAX_HDR_SIZE; ++ ts0710_connection.be_testing = 0; ++ ts0710_connection.test_errs = 0; ++ init_waitqueue_head(&ts0710_connection.test_wait); ++ ++ for (j = 0; j < TS0710_MAX_CHN; j++) { ++ ts0710_reset_dlci(j); ++ } ++} ++ ++static void ts0710_init(void) ++{ ++ create_crctable(crctable); ++ ++ ts0710_reset_con(); ++ ++ /* Set the values in the rpn octets */ ++/* ++ rpn_val.bit_rate = 7; ++ rpn_val.data_bits = 3; ++ rpn_val.stop_bit = 0; ++ rpn_val.parity = 0; ++ rpn_val.parity_type = 0; ++ rpn_val.res1 = 0; ++ rpn_val.xon_input = 0; ++ rpn_val.xon_output = 0; ++ rpn_val.rtr_input = 0; ++ rpn_val.rtr_output = 0; ++ rpn_val.rtc_input = 0; ++ rpn_val.rtc_output = 0; ++ rpn_val.res2 = 0; ++ rpn_val.xon_u8 = 0x11; ++ rpn_val.xoff_u8 = 0x13; ++ memset(&rpn_val.pm, 0 , 2); *//* Set the mask to zero */ ++} ++ ++static void ts0710_upon_disconnect(void) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ __u8 j; ++ ++ for (j = 0; j < TS0710_MAX_CHN; j++) { ++ ts0710->dlci[j].state = DISCONNECTED; ++ wake_up_interruptible(&ts0710->dlci[j].open_wait); ++ wake_up_interruptible(&ts0710->dlci[j].close_wait); ++ } ++ ts0710->be_testing = 0; ++ wake_up_interruptible(&ts0710->test_wait); ++ ts0710_reset_con(); ++} ++ ++/* Sending packet functions */ ++ ++/* Creates a UA packet and puts it at the beginning of the pkt pointer */ ++ ++static int send_ua(ts0710_con * ts0710, __u8 dlci) ++{ ++ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; ++ short_frame *ua; ++ ++ TS0710_DEBUG("send_ua: Creating UA packet to DLCI %d\n", dlci); ++ ++ ua = (short_frame *) (buf + 1); ++ ua->h.addr.ea = 1; ++ ua->h.addr.cr = ((~(ts0710->initiator)) & 0x1); ++ ua->h.addr.d = (dlci) & 0x1; ++ ua->h.addr.server_chn = (dlci) >> 0x1; ++ ua->h.control = SET_PF(UA); ++ ua->h.length.ea = 1; ++ ua->h.length.len = 0; ++ ua->data[0] = crc_calc((__u8 *) ua, SHORT_CRC_CHECK); ++ ++ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); ++} ++ ++/* Creates a DM packet and puts it at the beginning of the pkt pointer */ ++ ++static int send_dm(ts0710_con * ts0710, __u8 dlci) ++{ ++ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; ++ short_frame *dm; ++ ++ TS0710_DEBUG("send_dm: Creating DM packet to DLCI %d\n", dlci); ++ ++ dm = (short_frame *) (buf + 1); ++ dm->h.addr.ea = 1; ++ dm->h.addr.cr = ((~(ts0710->initiator)) & 0x1); ++ dm->h.addr.d = dlci & 0x1; ++ dm->h.addr.server_chn = dlci >> 0x1; ++ dm->h.control = SET_PF(DM); ++ dm->h.length.ea = 1; ++ dm->h.length.len = 0; ++ dm->data[0] = crc_calc((__u8 *) dm, SHORT_CRC_CHECK); ++ ++ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); ++} ++ ++static int send_sabm(ts0710_con * ts0710, __u8 dlci) ++{ ++ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; ++ short_frame *sabm; ++ ++ TS0710_DEBUG("send_sabm: Creating SABM packet to DLCI %d\n", dlci); ++ ++ sabm = (short_frame *) (buf + 1); ++ sabm->h.addr.ea = 1; ++ sabm->h.addr.cr = ((ts0710->initiator) & 0x1); ++ sabm->h.addr.d = dlci & 0x1; ++ sabm->h.addr.server_chn = dlci >> 0x1; ++ sabm->h.control = SET_PF(SABM); ++ sabm->h.length.ea = 1; ++ sabm->h.length.len = 0; ++ sabm->data[0] = crc_calc((__u8 *) sabm, SHORT_CRC_CHECK); ++ ++ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); ++} ++ ++static int send_disc(ts0710_con * ts0710, __u8 dlci) ++{ ++ __u8 buf[sizeof(short_frame) + FCS_SIZE + FLAG_SIZE]; ++ short_frame *disc; ++ ++ TS0710_DEBUG("send_disc: Creating DISC packet to DLCI %d\n", dlci); ++ ++ disc = (short_frame *) (buf + 1); ++ disc->h.addr.ea = 1; ++ disc->h.addr.cr = ((ts0710->initiator) & 0x1); ++ disc->h.addr.d = dlci & 0x1; ++ disc->h.addr.server_chn = dlci >> 0x1; ++ disc->h.control = SET_PF(DISC); ++ disc->h.length.ea = 1; ++ disc->h.length.len = 0; ++ disc->data[0] = crc_calc((__u8 *) disc, SHORT_CRC_CHECK); ++ ++ return basic_write(ts0710, buf, sizeof(short_frame) + FCS_SIZE); ++} ++ ++static void queue_uih(mux_send_struct * send_info, __u16 len, ++ ts0710_con * ts0710, __u8 dlci) ++{ ++ __u32 size; ++ ++ TS0710_DEBUG ++ ("queue_uih: Creating UIH packet with %d bytes data to DLCI %d\n", ++ len, dlci); ++ ++ if (len > SHORT_PAYLOAD_SIZE) { ++ long_frame *l_pkt; ++ ++ size = sizeof(long_frame) + len + FCS_SIZE; ++ l_pkt = (long_frame *) (send_info->frame - sizeof(long_frame)); ++ set_uih_hdr((void *)l_pkt, dlci, len, ts0710->initiator); ++ l_pkt->data[len] = crc_calc((__u8 *) l_pkt, LONG_CRC_CHECK); ++ send_info->frame = ((__u8 *) l_pkt) - 1; ++ } else { ++ short_frame *s_pkt; ++ ++ size = sizeof(short_frame) + len + FCS_SIZE; ++ s_pkt = ++ (short_frame *) (send_info->frame - sizeof(short_frame)); ++ set_uih_hdr((void *)s_pkt, dlci, len, ts0710->initiator); ++ s_pkt->data[len] = crc_calc((__u8 *) s_pkt, SHORT_CRC_CHECK); ++ send_info->frame = ((__u8 *) s_pkt) - 1; ++ } ++ send_info->length = size; ++} ++ ++/* Multiplexer command packets functions */ ++ ++/* Turns on the ts0710 flow control */ ++ ++static int ts0710_fcon_msg(ts0710_con * ts0710, __u8 cr) ++{ ++ __u8 buf[30]; ++ mcc_short_frame *mcc_pkt; ++ short_frame *uih_pkt; ++ __u32 size; ++ ++ size = sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE; ++ uih_pkt = (short_frame *) (buf + 1); ++ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), ++ ts0710->initiator); ++ uih_pkt->data[sizeof(mcc_short_frame)] = ++ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); ++ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); ++ ++ mcc_pkt->h.type.ea = EA; ++ mcc_pkt->h.type.cr = cr; ++ mcc_pkt->h.type.type = FCON; ++ mcc_pkt->h.length.ea = EA; ++ mcc_pkt->h.length.len = 0; ++ ++ return basic_write(ts0710, buf, size); ++} ++ ++/* Turns off the ts0710 flow control */ ++ ++static int ts0710_fcoff_msg(ts0710_con * ts0710, __u8 cr) ++{ ++ __u8 buf[30]; ++ mcc_short_frame *mcc_pkt; ++ short_frame *uih_pkt; ++ __u32 size; ++ ++ size = (sizeof(short_frame) + sizeof(mcc_short_frame) + FCS_SIZE); ++ uih_pkt = (short_frame *) (buf + 1); ++ set_uih_hdr(uih_pkt, CTRL_CHAN, sizeof(mcc_short_frame), ++ ts0710->initiator); ++ uih_pkt->data[sizeof(mcc_short_frame)] = ++ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); ++ mcc_pkt = (mcc_short_frame *) (uih_pkt->data); ++ ++ mcc_pkt->h.type.ea = 1; ++ mcc_pkt->h.type.cr = cr; ++ mcc_pkt->h.type.type = FCOFF; ++ mcc_pkt->h.length.ea = 1; ++ mcc_pkt->h.length.len = 0; ++ ++ return basic_write(ts0710, buf, size); ++} ++ ++/* ++static int ts0710_rpn_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 req) ++{ ++ char buf[100]; ++ rpn_msg* rpn_pkt; ++ __u32 fsize; ++ __u32 psize; ++ ++ fsize = sizeof(rpn_msg); ++ ++ if (req) { ++ fsize -= sizeof(rpn_values); ++ } ++ ++ psize = (fsize - sizeof(short_frame) - FCS_SIZE); ++ ++ rpn_pkt = (rpn_msg *) buf; ++ ++ set_uih_hdr((short_frame *) rpn_pkt, CTRL_CHAN, psize, ts0710->initiator); ++ ++ rpn_pkt->fcs = crc_calc((__u8*) rpn_pkt, SHORT_CRC_CHECK); ++ ++ rpn_pkt->mcc_s_head.type.ea = EA; ++ rpn_pkt->mcc_s_head.type.cr = cr; ++ rpn_pkt->mcc_s_head.type.type = RPN; ++ rpn_pkt->mcc_s_head.length.ea = EA; ++ ++ rpn_pkt->dlci.ea = EA; ++ rpn_pkt->dlci.cr = 1; ++ rpn_pkt->dlci.d = dlci & 1; ++ rpn_pkt->dlci.server_chn = (dlci >> 1); ++ ++ if (req) { ++ rpn_pkt->mcc_s_head.length.len = 1; ++ rpn_pkt->rpn_val.bit_rate = rpn_pkt->fcs; ++ } else { ++ rpn_pkt->mcc_s_head.length.len = 8; ++ memcpy(&(rpn_pkt->rpn_val), &rpn_val, sizeof(rpn_values)); ++ } ++ return basic_write(ts0710, buf, fsize); ++} ++*/ ++/* ++static int ts0710_rls_msg(ts0710_con *ts0710, __u8 cr, __u8 dlci, __u8 err_code) ++{ ++ char buf[100]; ++ rls_msg *rls_pkt; ++ __u32 fsize; ++ __u32 psize; ++ ++ fsize = sizeof(rls_msg); ++ psize = fsize - sizeof(short_frame) - FCS_SIZE; ++ rls_pkt = (rls_msg *) buf; ++ ++ set_uih_hdr((short_frame *) rls_pkt, CTRL_CHAN, psize, ts0710->initiator); ++ rls_pkt->fcs = crc_calc((__u8*) rls_pkt, SHORT_CRC_CHECK); ++ ++ rls_pkt->mcc_s_head.type.ea = EA; ++ rls_pkt->mcc_s_head.type.cr = cr; ++ rls_pkt->mcc_s_head.type.type = RLS; ++ rls_pkt->mcc_s_head.length.ea = EA; ++ rls_pkt->mcc_s_head.length.len = 2; ++ ++ rls_pkt->dlci.ea = EA; ++ rls_pkt->dlci.cr = 1; ++ rls_pkt->dlci.d = dlci & 1; ++ rls_pkt->dlci.server_chn = dlci >> 1; ++ rls_pkt->error = err_code; ++ rls_pkt->res = 0; ++ ++ return basic_write(ts0710, buf, fsize); ++} ++*/ ++ ++/* Sends an PN-messages and sets the not negotiable parameters to their ++ default values in ts0710 */ ++ ++static int send_pn_msg(ts0710_con * ts0710, __u8 prior, __u32 frame_size, ++ __u8 credit_flow, __u8 credits, __u8 dlci, __u8 cr) ++{ ++ __u8 buf[30]; ++ pn_msg *pn_pkt; ++ __u32 size; ++ TS0710_DEBUG ++ ("send_pn_msg: DLCI 0x%02x, prior:0x%02x, frame_size:%d, credit_flow:%x, credits:%d, cr:%x\n", ++ dlci, prior, frame_size, credit_flow, credits, cr); ++ ++ size = sizeof(pn_msg); ++ pn_pkt = (pn_msg *) (buf + 1); ++ ++ set_uih_hdr((void *)pn_pkt, CTRL_CHAN, ++ size - (sizeof(short_frame) + FCS_SIZE), ts0710->initiator); ++ pn_pkt->fcs = crc_calc((__u8 *) pn_pkt, SHORT_CRC_CHECK); ++ ++ pn_pkt->mcc_s_head.type.ea = 1; ++ pn_pkt->mcc_s_head.type.cr = cr; ++ pn_pkt->mcc_s_head.type.type = PN; ++ pn_pkt->mcc_s_head.length.ea = 1; ++ pn_pkt->mcc_s_head.length.len = 8; ++ ++ pn_pkt->res1 = 0; ++ pn_pkt->res2 = 0; ++ pn_pkt->dlci = dlci; ++ pn_pkt->frame_type = 0; ++ pn_pkt->credit_flow = credit_flow; ++ pn_pkt->prior = prior; ++ pn_pkt->ack_timer = 0; ++ SET_PN_MSG_FRAME_SIZE(pn_pkt, frame_size); ++ pn_pkt->credits = credits; ++ pn_pkt->max_nbrof_retrans = 0; ++ ++ return basic_write(ts0710, buf, size); ++} ++ ++/* Send a Not supported command - command, which needs 3 bytes */ ++ ++static int send_nsc_msg(ts0710_con * ts0710, mcc_type cmd, __u8 cr) ++{ ++ __u8 buf[30]; ++ nsc_msg *nsc_pkt; ++ __u32 size; ++ ++ size = sizeof(nsc_msg); ++ nsc_pkt = (nsc_msg *) (buf + 1); ++ ++ set_uih_hdr((void *)nsc_pkt, CTRL_CHAN, ++ sizeof(nsc_msg) - sizeof(short_frame) - FCS_SIZE, ++ ts0710->initiator); ++ ++ nsc_pkt->fcs = crc_calc((__u8 *) nsc_pkt, SHORT_CRC_CHECK); ++ ++ nsc_pkt->mcc_s_head.type.ea = 1; ++ nsc_pkt->mcc_s_head.type.cr = cr; ++ nsc_pkt->mcc_s_head.type.type = NSC; ++ nsc_pkt->mcc_s_head.length.ea = 1; ++ nsc_pkt->mcc_s_head.length.len = 1; ++ ++ nsc_pkt->command_type.ea = 1; ++ nsc_pkt->command_type.cr = cmd.cr; ++ nsc_pkt->command_type.type = cmd.type; ++ ++ return basic_write(ts0710, buf, size); ++} ++ ++static int ts0710_msc_msg(ts0710_con * ts0710, __u8 value, __u8 cr, __u8 dlci) ++{ ++ __u8 buf[30]; ++ msc_msg *msc_pkt; ++ __u32 size; ++ ++ size = sizeof(msc_msg); ++ msc_pkt = (msc_msg *) (buf + 1); ++ ++ set_uih_hdr((void *)msc_pkt, CTRL_CHAN, ++ sizeof(msc_msg) - sizeof(short_frame) - FCS_SIZE, ++ ts0710->initiator); ++ ++ msc_pkt->fcs = crc_calc((__u8 *) msc_pkt, SHORT_CRC_CHECK); ++ ++ msc_pkt->mcc_s_head.type.ea = 1; ++ msc_pkt->mcc_s_head.type.cr = cr; ++ msc_pkt->mcc_s_head.type.type = MSC; ++ msc_pkt->mcc_s_head.length.ea = 1; ++ msc_pkt->mcc_s_head.length.len = 2; ++ ++ msc_pkt->dlci.ea = 1; ++ msc_pkt->dlci.cr = 1; ++ msc_pkt->dlci.d = dlci & 1; ++ msc_pkt->dlci.server_chn = (dlci >> 1) & 0x1f; ++ ++ msc_pkt->v24_sigs = value; ++ ++ return basic_write(ts0710, buf, size); ++} ++ ++static int ts0710_test_msg(ts0710_con * ts0710, __u8 * test_pattern, __u32 len, ++ __u8 cr, __u8 * f_buf /*Frame buf */ ) ++{ ++ __u32 size; ++ ++ if (len > SHORT_PAYLOAD_SIZE) { ++ long_frame *uih_pkt; ++ mcc_long_frame *mcc_pkt; ++ ++ size = ++ (sizeof(long_frame) + sizeof(mcc_long_frame) + len + ++ FCS_SIZE); ++ uih_pkt = (long_frame *) (f_buf + 1); ++ ++ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, len + ++ sizeof(mcc_long_frame), ts0710->initiator); ++ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = ++ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); ++ mcc_pkt = (mcc_long_frame *) uih_pkt->data; ++ ++ mcc_pkt->h.type.ea = EA; ++ /* cr tells whether it is a commmand (1) or a response (0) */ ++ mcc_pkt->h.type.cr = cr; ++ mcc_pkt->h.type.type = TEST; ++ SET_LONG_LENGTH(mcc_pkt->h.length, len); ++ memcpy(mcc_pkt->value, test_pattern, len); ++ } else if (len > (SHORT_PAYLOAD_SIZE - sizeof(mcc_short_frame))) { ++ long_frame *uih_pkt; ++ mcc_short_frame *mcc_pkt; ++ ++ /* Create long uih packet and short mcc packet */ ++ size = ++ (sizeof(long_frame) + sizeof(mcc_short_frame) + len + ++ FCS_SIZE); ++ uih_pkt = (long_frame *) (f_buf + 1); ++ ++ set_uih_hdr((short_frame *) uih_pkt, CTRL_CHAN, ++ len + sizeof(mcc_short_frame), ts0710->initiator); ++ uih_pkt->data[GET_LONG_LENGTH(uih_pkt->h.length)] = ++ crc_calc((__u8 *) uih_pkt, LONG_CRC_CHECK); ++ mcc_pkt = (mcc_short_frame *) uih_pkt->data; ++ ++ mcc_pkt->h.type.ea = EA; ++ mcc_pkt->h.type.cr = cr; ++ mcc_pkt->h.type.type = TEST; ++ mcc_pkt->h.length.ea = EA; ++ mcc_pkt->h.length.len = len; ++ memcpy(mcc_pkt->value, test_pattern, len); ++ } else { ++ short_frame *uih_pkt; ++ mcc_short_frame *mcc_pkt; ++ ++ size = ++ (sizeof(short_frame) + sizeof(mcc_short_frame) + len + ++ FCS_SIZE); ++ uih_pkt = (short_frame *) (f_buf + 1); ++ ++ set_uih_hdr((void *)uih_pkt, CTRL_CHAN, len ++ + sizeof(mcc_short_frame), ts0710->initiator); ++ uih_pkt->data[uih_pkt->h.length.len] = ++ crc_calc((__u8 *) uih_pkt, SHORT_CRC_CHECK); ++ mcc_pkt = (mcc_short_frame *) uih_pkt->data; ++ ++ mcc_pkt->h.type.ea = EA; ++ mcc_pkt->h.type.cr = cr; ++ mcc_pkt->h.type.type = TEST; ++ mcc_pkt->h.length.ea = EA; ++ mcc_pkt->h.length.len = len; ++ memcpy(mcc_pkt->value, test_pattern, len); ++ ++ } ++ return basic_write(ts0710, f_buf, size); ++} ++ ++static void set_uih_hdr(short_frame * uih_pkt, __u8 dlci, __u32 len, __u8 cr) ++{ ++ uih_pkt->h.addr.ea = 1; ++ uih_pkt->h.addr.cr = cr; ++ uih_pkt->h.addr.d = dlci & 0x1; ++ uih_pkt->h.addr.server_chn = dlci >> 1; ++ uih_pkt->h.control = CLR_PF(UIH); ++ ++ if (len > SHORT_PAYLOAD_SIZE) { ++ SET_LONG_LENGTH(((long_frame *) uih_pkt)->h.length, len); ++ } else { ++ uih_pkt->h.length.ea = 1; ++ uih_pkt->h.length.len = len; ++ } ++} ++ ++/* Parses a multiplexer control channel packet */ ++ ++void process_mcc(__u8 * data, __u32 len, ts0710_con * ts0710, int longpkt) ++{ ++ __u8 *tbuf = NULL; ++ mcc_short_frame *mcc_short_pkt; ++ int j; ++ ++ if (longpkt) { ++ mcc_short_pkt = ++ (mcc_short_frame *) (((long_frame *) data)->data); ++ } else { ++ mcc_short_pkt = ++ (mcc_short_frame *) (((short_frame *) data)->data); ++ } ++ ++ switch (mcc_short_pkt->h.type.type) { ++ case TEST: ++ if (mcc_short_pkt->h.type.cr == MCC_RSP) { ++ TS0710_DEBUG("Received test command response\n"); ++ ++ if (ts0710->be_testing) { ++ if ((mcc_short_pkt->h.length.ea) == 0) { ++ mcc_long_frame *mcc_long_pkt; ++ mcc_long_pkt = ++ (mcc_long_frame *) mcc_short_pkt; ++ if (GET_LONG_LENGTH ++ (mcc_long_pkt->h.length) != ++ TEST_PATTERN_SIZE) { ++ ts0710->test_errs = ++ TEST_PATTERN_SIZE; ++ TS0710_DEBUG ++ ("Err: received test pattern is %d bytes long, not expected %d\n", ++ GET_LONG_LENGTH ++ (mcc_long_pkt->h.length), ++ TEST_PATTERN_SIZE); ++ } else { ++ ts0710->test_errs = 0; ++ for (j = 0; ++ j < TEST_PATTERN_SIZE; ++ j++) { ++ if (mcc_long_pkt-> ++ value[j] != ++ (j & 0xFF)) { ++ (ts0710-> ++ test_errs)++; ++ } ++ } ++ } ++ ++ } else { ++ ++#if TEST_PATTERN_SIZE < 128 ++ if (mcc_short_pkt->h.length.len != ++ TEST_PATTERN_SIZE) { ++#endif ++ ++ ts0710->test_errs = ++ TEST_PATTERN_SIZE; ++ TS0710_DEBUG ++ ("Err: received test pattern is %d bytes long, not expected %d\n", ++ mcc_short_pkt->h.length. ++ len, TEST_PATTERN_SIZE); ++ ++#if TEST_PATTERN_SIZE < 128 ++ } else { ++ ts0710->test_errs = 0; ++ for (j = 0; ++ j < TEST_PATTERN_SIZE; ++ j++) { ++ if (mcc_short_pkt-> ++ value[j] != ++ (j & 0xFF)) { ++ (ts0710-> ++ test_errs)++; ++ } ++ } ++ } ++#endif ++ ++ } ++ ++ ts0710->be_testing = 0; /* Clear the flag */ ++ wake_up_interruptible(&ts0710->test_wait); ++ } else { ++ TS0710_DEBUG ++ ("Err: shouldn't or late to get test cmd response\n"); ++ } ++ } else { ++ tbuf = (__u8 *) kmalloc(len + 32, GFP_ATOMIC); ++ if (!tbuf) { ++ break; ++ } ++ ++ if ((mcc_short_pkt->h.length.ea) == 0) { ++ mcc_long_frame *mcc_long_pkt; ++ mcc_long_pkt = (mcc_long_frame *) mcc_short_pkt; ++ ts0710_test_msg(ts0710, mcc_long_pkt->value, ++ GET_LONG_LENGTH(mcc_long_pkt->h. ++ length), ++ MCC_RSP, tbuf); ++ } else { ++ ts0710_test_msg(ts0710, mcc_short_pkt->value, ++ mcc_short_pkt->h.length.len, ++ MCC_RSP, tbuf); ++ } ++ ++ kfree(tbuf); ++ } ++ break; ++ ++ case FCON: /*Flow control on command */ ++ TS0710_PRINTK ++ ("MUX Received Flow control(all channels) on command\n"); ++ if (mcc_short_pkt->h.type.cr == MCC_CMD) { ++ ts0710->dlci[0].state = CONNECTED; ++ ts0710_fcon_msg(ts0710, MCC_RSP); ++ mux_sched_send(); ++ } ++ break; ++ ++ case FCOFF: /*Flow control off command */ ++ TS0710_PRINTK ++ ("MUX Received Flow control(all channels) off command\n"); ++ if (mcc_short_pkt->h.type.cr == MCC_CMD) { ++ for (j = 0; j < TS0710_MAX_CHN; j++) { ++ ts0710->dlci[j].state = FLOW_STOPPED; ++ } ++ ts0710_fcoff_msg(ts0710, MCC_RSP); ++ } ++ break; ++ ++ case MSC: /*Modem status command */ ++ { ++ __u8 dlci; ++ __u8 v24_sigs; ++ ++ dlci = (mcc_short_pkt->value[0]) >> 2; ++ v24_sigs = mcc_short_pkt->value[1]; ++ ++ if ((ts0710->dlci[dlci].state != CONNECTED) ++ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { ++ send_dm(ts0710, dlci); ++ break; ++ } ++ if (mcc_short_pkt->h.type.cr == MCC_CMD) { ++ TS0710_DEBUG("Received Modem status command\n"); ++ if (v24_sigs & 2) { ++ if (ts0710->dlci[dlci].state == ++ CONNECTED) { ++ TS0710_LOG ++ ("MUX Received Flow off on dlci %d\n", ++ dlci); ++ ts0710->dlci[dlci].state = ++ FLOW_STOPPED; ++ } ++ } else { ++ if (ts0710->dlci[dlci].state == ++ FLOW_STOPPED) { ++ ts0710->dlci[dlci].state = ++ CONNECTED; ++ TS0710_LOG ++ ("MUX Received Flow on on dlci %d\n", ++ dlci); ++ mux_sched_send(); ++ } ++ } ++ ++ ts0710_msc_msg(ts0710, v24_sigs, MCC_RSP, dlci); ++/* ++ if (!(ts0710->dlci[dlci].initiated) && !(ts0710->dlci[dlci].initiator)) { ++ ts0710_msc_msg(ts0710, EA | RTR | RTC | DV, MCC_CMD, dlci); ++ ts0710->dlci[dlci].initiated = 1; ++ } ++*/ ++ } else { ++ TS0710_DEBUG ++ ("Received Modem status response\n"); ++ ++ if (v24_sigs & 2) { ++ TS0710_DEBUG("Flow stop accepted\n"); ++ } ++ } ++ break; ++ } ++ ++ /* case RPN: *//*Remote port negotiation command */ ++ ++/* { ++ __u8 dlci; ++ ++ dlci = (mcc_short_pkt->value[0]) >> 2; ++ ++ if (mcc_short_pkt->h.type.cr == MCC_CMD) { ++ if (mcc_short_pkt->h.length.len == 1) { ++ TS0710_DEBUG("Received Remote port negotiation command\n"); ++ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); ++ } else { ++*/ ++ /* Accept the other sides settings (accept all for now) */ ++/* TS0710_DEBUG("Received Remote port negotiation respons\n"); ++ memcpy(&rpn_val, &mcc_short_pkt->value[1], 8); ++ ts0710_rpn_msg(ts0710, MCC_RSP, dlci, 0); ++*/ ++ /* Zero the parametermask after response */ ++/* memset(&rpn_val.pm, 0, 2); ++ } ++ } ++ break; ++ } ++*/ ++/* ++ case RLS: *//*Remote line status */ ++/* { ++ __u8 dlci; ++ __u8 err_code; ++ ++ TS0710_DEBUG("Received Remote line status\n"); ++ if (mcc_short_pkt->h.type.cr == MCC_CMD) { ++ dlci = mcc_short_pkt->value[0] >> 2; ++ err_code = mcc_short_pkt->value[1]; ++ ++ ts0710_rls_msg(ts0710, MCC_RSP, dlci, err_code); ++ } ++ break; ++ } ++*/ ++ case PN: /*DLC parameter negotiation */ ++ { ++ __u8 dlci; ++ __u16 frame_size; ++ pn_msg *pn_pkt; ++ ++ pn_pkt = (pn_msg *) data; ++ dlci = pn_pkt->dlci; ++ frame_size = GET_PN_MSG_FRAME_SIZE(pn_pkt); ++ TS0710_DEBUG ++ ("Received DLC parameter negotiation, PN\n"); ++ if (pn_pkt->mcc_s_head.type.cr == MCC_CMD) { ++ TS0710_DEBUG("received PN command with:\n"); ++ TS0710_DEBUG("Frame size:%d\n", frame_size); ++ ++ frame_size = ++ min(frame_size, ts0710->dlci[dlci].mtu); ++ send_pn_msg(ts0710, pn_pkt->prior, frame_size, ++ 0, 0, dlci, MCC_RSP); ++ ts0710->dlci[dlci].mtu = frame_size; ++ TS0710_DEBUG("process_mcc : mtu set to %d\n", ++ ts0710->dlci[dlci].mtu); ++ } else { ++ TS0710_DEBUG("received PN response with:\n"); ++ TS0710_DEBUG("Frame size:%d\n", frame_size); ++ ++ frame_size = ++ min(frame_size, ts0710->dlci[dlci].mtu); ++ ts0710->dlci[dlci].mtu = frame_size; ++ ++ TS0710_DEBUG ++ ("process_mcc : mtu set on dlci:%d to %d\n", ++ dlci, ts0710->dlci[dlci].mtu); ++ ++ if (ts0710->dlci[dlci].state == NEGOTIATING) { ++ ts0710->dlci[dlci].state = CONNECTING; ++ wake_up_interruptible(&ts0710-> ++ dlci[dlci]. ++ open_wait); ++ } ++ } ++ break; ++ } ++ ++ case NSC: /*Non supported command resonse */ ++ TS0710_LOG("MUX Received Non supported command response\n"); ++ break; ++ ++ default: /*Non supported command received */ ++ TS0710_LOG("MUX Received a non supported command\n"); ++ send_nsc_msg(ts0710, mcc_short_pkt->h.type, MCC_RSP); ++ break; ++ } ++} ++ ++static mux_recv_packet *get_mux_recv_packet(__u32 size) ++{ ++ mux_recv_packet *recv_packet; ++ ++ TS0710_DEBUG("Enter into get_mux_recv_packet"); ++ ++ recv_packet = ++ (mux_recv_packet *) kmalloc(sizeof(mux_recv_packet), GFP_ATOMIC); ++ if (!recv_packet) { ++ return 0; ++ } ++ ++ recv_packet->data = (__u8 *) kmalloc(size, GFP_ATOMIC); ++ if (!(recv_packet->data)) { ++ kfree(recv_packet); ++ return 0; ++ } ++ recv_packet->length = 0; ++ recv_packet->next = 0; ++ return recv_packet; ++} ++ ++static void free_mux_recv_packet(mux_recv_packet * recv_packet) ++{ ++ TS0710_DEBUG("Enter into free_mux_recv_packet"); ++ ++ if (!recv_packet) { ++ return; ++ } ++ ++ if (recv_packet->data) { ++ kfree(recv_packet->data); ++ } ++ kfree(recv_packet); ++} ++ ++static void free_mux_recv_struct(mux_recv_struct * recv_info) ++{ ++ mux_recv_packet *recv_packet1, *recv_packet2; ++ ++ if (!recv_info) { ++ return; ++ } ++ ++ recv_packet1 = recv_info->mux_packet; ++ while (recv_packet1) { ++ recv_packet2 = recv_packet1->next; ++ free_mux_recv_packet(recv_packet1); ++ recv_packet1 = recv_packet2; ++ } ++ ++ kfree(recv_info); ++} ++ ++static inline void add_post_recv_queue(mux_recv_struct ** head, ++ mux_recv_struct * new_item) ++{ ++ new_item->next = *head; ++ *head = new_item; ++} ++ ++static void ts0710_flow_on(__u8 dlci, ts0710_con * ts0710) ++{ ++ int i; ++ __u8 cmdtty; ++ __u8 datatty; ++ struct tty_struct *tty; ++ mux_recv_struct *recv_info; ++ ++ if ((ts0710->dlci[0].state != CONNECTED) ++ && (ts0710->dlci[0].state != FLOW_STOPPED)) { ++ return; ++ } else if ((ts0710->dlci[dlci].state != CONNECTED) ++ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { ++ return; ++ } ++ ++ if (!(ts0710->dlci[dlci].flow_control)) { ++ return; ++ } ++ ++ cmdtty = dlci2tty[dlci].cmdtty; ++ datatty = dlci2tty[dlci].datatty; ++ ++ if (cmdtty != datatty) { ++ /* Check AT cmd tty */ ++ tty = mux_table[cmdtty]; ++ if (mux_tty[cmdtty] && tty) { ++ if (test_bit(TTY_THROTTLED, &tty->flags)) { ++ return; ++ } ++ } ++ recv_info = mux_recv_info[cmdtty]; ++ if (mux_recv_info_flags[cmdtty] && recv_info) { ++ if (recv_info->total) { ++ return; ++ } ++ } ++ ++ /* Check data tty */ ++ tty = mux_table[datatty]; ++ if (mux_tty[datatty] && tty) { ++ if (test_bit(TTY_THROTTLED, &tty->flags)) { ++ return; ++ } ++ } ++ recv_info = mux_recv_info[datatty]; ++ if (mux_recv_info_flags[datatty] && recv_info) { ++ if (recv_info->total) { ++ return; ++ } ++ } ++ } ++ ++ for (i = 0; i < 3; i++) { ++ if (ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, dlci) < ++ 0) { ++ continue; ++ } else { ++ TS0710_LOG("MUX send Flow on on dlci %d\n", dlci); ++ ts0710->dlci[dlci].flow_control = 0; ++ break; ++ } ++ } ++} ++ ++static void ts0710_flow_off(struct tty_struct *tty, __u8 dlci, ++ ts0710_con * ts0710) ++{ ++ int i; ++ ++ if (test_and_set_bit(TTY_THROTTLED, &tty->flags)) { ++ return; ++ } ++ ++ if ((ts0710->dlci[0].state != CONNECTED) ++ && (ts0710->dlci[0].state != FLOW_STOPPED)) { ++ return; ++ } else if ((ts0710->dlci[dlci].state != CONNECTED) ++ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { ++ return; ++ } ++ ++ if (ts0710->dlci[dlci].flow_control) { ++ return; ++ } ++ ++ for (i = 0; i < 3; i++) { ++ if (ts0710_msc_msg ++ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { ++ continue; ++ } else { ++ TS0710_LOG("MUX send Flow off on dlci %d\n", dlci); ++ ts0710->dlci[dlci].flow_control = 1; ++ break; ++ } ++ } ++} ++ ++int ts0710_recv_data(ts0710_con * ts0710, char *data, int len) ++{ ++ short_frame *short_pkt; ++ long_frame *long_pkt; ++ __u8 *uih_data_start; ++ __u32 uih_len; ++ __u8 dlci; ++ __u8 be_connecting; ++#ifdef TS0710DEBUG ++ unsigned long t; ++#endif ++ ++ short_pkt = (short_frame *) data; ++ ++ dlci = short_pkt->h.addr.server_chn << 1 | short_pkt->h.addr.d; ++ switch (CLR_PF(short_pkt->h.control)) { ++ case SABM: ++ TS0710_DEBUG("SABM-packet received\n"); ++ ++/*For BP UART problem ++ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) ++ break; ++*/ ++ ++ if (!dlci) { ++ TS0710_DEBUG("server channel == 0\n"); ++ ts0710->dlci[0].state = CONNECTED; ++ ++ TS0710_DEBUG("sending back UA - control channel\n"); ++ send_ua(ts0710, dlci); ++ wake_up_interruptible(&ts0710->dlci[0].open_wait); ++ ++ } else if (valid_dlci(dlci)) { ++ ++ TS0710_DEBUG("Incomming connect on channel %d\n", dlci); ++ ++ TS0710_DEBUG("sending UA, dlci %d\n", dlci); ++ send_ua(ts0710, dlci); ++ ++ ts0710->dlci[dlci].state = CONNECTED; ++ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); ++ ++ } else { ++ TS0710_DEBUG("invalid dlci %d, sending DM\n", dlci); ++ send_dm(ts0710, dlci); ++ } ++ ++ break; ++ ++ case UA: ++ TS0710_DEBUG("UA packet received\n"); ++ ++/*For BP UART problem ++ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) ++ break; ++*/ ++ ++ if (!dlci) { ++ TS0710_DEBUG("server channel == 0\n"); ++ ++ if (ts0710->dlci[0].state == CONNECTING) { ++ ts0710->dlci[0].state = CONNECTED; ++ wake_up_interruptible(&ts0710->dlci[0]. ++ open_wait); ++ } else if (ts0710->dlci[0].state == DISCONNECTING) { ++ ts0710_upon_disconnect(); ++ } else { ++ TS0710_DEBUG ++ (" Something wrong receiving UA packet\n"); ++ } ++ } else if (valid_dlci(dlci)) { ++ TS0710_DEBUG("Incomming UA on channel %d\n", dlci); ++ ++ if (ts0710->dlci[dlci].state == CONNECTING) { ++ ts0710->dlci[dlci].state = CONNECTED; ++ wake_up_interruptible(&ts0710->dlci[dlci]. ++ open_wait); ++ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ wake_up_interruptible(&ts0710->dlci[dlci]. ++ open_wait); ++ wake_up_interruptible(&ts0710->dlci[dlci]. ++ close_wait); ++ ts0710_reset_dlci(dlci); ++ } else { ++ TS0710_DEBUG ++ (" Something wrong receiving UA packet\n"); ++ } ++ } else { ++ TS0710_DEBUG("invalid dlci %d\n", dlci); ++ } ++ ++ break; ++ ++ case DM: ++ TS0710_DEBUG("DM packet received\n"); ++ ++/*For BP UART problem ++ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) ++ break; ++*/ ++ ++ if (!dlci) { ++ TS0710_DEBUG("server channel == 0\n"); ++ ++ if (ts0710->dlci[0].state == CONNECTING) { ++ be_connecting = 1; ++ } else { ++ be_connecting = 0; ++ } ++ ts0710_upon_disconnect(); ++ if (be_connecting) { ++ ts0710->dlci[0].state = REJECTED; ++ } ++ } else if (valid_dlci(dlci)) { ++ TS0710_DEBUG("Incomming DM on channel %d\n", dlci); ++ ++ if (ts0710->dlci[dlci].state == CONNECTING) { ++ ts0710->dlci[dlci].state = REJECTED; ++ } else { ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ } ++ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); ++ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); ++ ts0710_reset_dlci(dlci); ++ } else { ++ TS0710_DEBUG("invalid dlci %d\n", dlci); ++ } ++ ++ break; ++ ++ case DISC: ++ TS0710_DEBUG("DISC packet received\n"); ++ ++/*For BP UART problem ++ if( crc_check((__u8*) short_pkt, SHORT_CRC_CHECK, short_pkt->data[0]) ) ++ break; ++*/ ++ ++ if (!dlci) { ++ TS0710_DEBUG("server channel == 0\n"); ++ ++ send_ua(ts0710, dlci); ++ TS0710_DEBUG("DISC, sending back UA\n"); ++ ++ ts0710_upon_disconnect(); ++ } else if (valid_dlci(dlci)) { ++ TS0710_DEBUG("Incomming DISC on channel %d\n", dlci); ++ ++ send_ua(ts0710, dlci); ++ TS0710_DEBUG("DISC, sending back UA\n"); ++ ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); ++ wake_up_interruptible(&ts0710->dlci[dlci].close_wait); ++ ts0710_reset_dlci(dlci); ++ } else { ++ TS0710_DEBUG("invalid dlci %d\n", dlci); ++ } ++ ++ break; ++ ++ case UIH: ++ TS0710_DEBUG("UIH packet received\n"); ++ ++ if ((dlci >= TS0710_MAX_CHN)) { ++ TS0710_DEBUG("invalid dlci %d\n", dlci); ++ send_dm(ts0710, dlci); ++ break; ++ } ++ ++ if (GET_PF(short_pkt->h.control)) { ++ TS0710_LOG ++ ("MUX Error %s: UIH packet with P/F set, discard it!\n", ++ __FUNCTION__); ++ break; ++ } ++ ++ if ((ts0710->dlci[dlci].state != CONNECTED) ++ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { ++ TS0710_LOG ++ ("MUX Error %s: DLCI %d not connected, discard it!\n", ++ __FUNCTION__, dlci); ++ send_dm(ts0710, dlci); ++ break; ++ } ++ ++ if ((short_pkt->h.length.ea) == 0) { ++ TS0710_DEBUG("Long UIH packet received\n"); ++ long_pkt = (long_frame *) data; ++ uih_len = GET_LONG_LENGTH(long_pkt->h.length); ++ uih_data_start = long_pkt->h.data; ++ TS0710_DEBUG("long packet length %d\n", uih_len); ++ ++/*For BP UART problem ++ if (crc_check(data, LONG_CRC_CHECK, *(uih_data_start + uih_len))) ++ break; ++*/ ++ } else { ++ TS0710_DEBUG("Short UIH pkt received\n"); ++ uih_len = short_pkt->h.length.len; ++ uih_data_start = short_pkt->data; ++ ++/*For BP UART problem ++ if (crc_check(data, SHORT_CRC_CHECK, *(uih_data_start + uih_len))) ++ break; ++*/ ++ } ++ ++ if (dlci == 0) { ++ TS0710_DEBUG("UIH on serv_channel 0\n"); ++ process_mcc(data, len, ts0710, ++ !(short_pkt->h.length.ea)); ++ } else if (valid_dlci(dlci)) { ++ /* do tty dispatch */ ++ __u8 tag; ++ __u8 tty_idx; ++ struct tty_struct *tty; ++ __u8 queue_data; ++ __u8 post_recv; ++ __u8 flow_control; ++ mux_recv_struct *recv_info; ++ int recv_room; ++ mux_recv_packet *recv_packet, *recv_packet2; ++ ++ TS0710_DEBUG("UIH on channel %d\n", dlci); ++ ++ if (uih_len > ts0710->dlci[dlci].mtu) { ++ TS0710_PRINTK ++ ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", ++ dlci, uih_len, ts0710->dlci[dlci].mtu); ++ break; ++ } ++ ++ tag = *uih_data_start; ++ uih_data_start++; ++ uih_len--; ++ ++ if (!uih_len) { ++ break; ++ } ++ ++ switch (tag) { ++ case CMDTAG: ++ tty_idx = dlci2tty[dlci].cmdtty; ++ TS0710_DEBUG("CMDTAG on DLCI:%d, /dev/mux%d\n", ++ dlci, tty_idx); ++ TS0710_DEBUGSTR(uih_data_start, uih_len); ++ if (!(iscmdtty[tty_idx])) { ++ TS0710_PRINTK ++ ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", ++ __FUNCTION__, dlci, tty_idx); ++ } ++ break; ++ case DATATAG: ++ default: ++ tty_idx = dlci2tty[dlci].datatty; ++ TS0710_DEBUG ++ ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", ++ dlci, tty_idx); ++ if (iscmdtty[tty_idx]) { ++ TS0710_PRINTK ++ ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", ++ __FUNCTION__, dlci, tty_idx); ++ } ++ break; ++ } ++ tty = mux_table[tty_idx]; ++ if ((!mux_tty[tty_idx]) || (!tty)) { ++ TS0710_PRINTK ++ ("MUX: No application waiting for, discard it! /dev/mux%d\n", ++ tty_idx); ++ } else { /* Begin processing received data */ ++ if ((!mux_recv_info_flags[tty_idx]) ++ || (!mux_recv_info[tty_idx])) { ++ TS0710_PRINTK ++ ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", ++ tty_idx); ++ break; ++ } ++ ++ recv_info = mux_recv_info[tty_idx]; ++ if (recv_info->total > 8192) { ++ TS0710_PRINTK ++ ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", ++ tty_idx); ++ break; ++ } ++ ++ queue_data = 0; ++ post_recv = 0; ++ flow_control = 0; ++ recv_room = 65535; ++ if (tty->receive_room) ++ recv_room = tty->receive_room; ++ ++ if (test_bit(TTY_THROTTLED, &tty->flags)) { ++ queue_data = 1; ++ } else { ++ if (test_bit ++ (TTY_DONT_FLIP, &tty->flags)) { ++ queue_data = 1; ++ post_recv = 1; ++ } else if (recv_info->total) { ++ queue_data = 1; ++ post_recv = 1; ++ } else if (recv_room < uih_len) { ++ queue_data = 1; ++ flow_control = 1; ++ } ++ ++ if ((recv_room - ++ (uih_len + recv_info->total)) < ++ ts0710->dlci[dlci].mtu) { ++ flow_control = 1; ++ } ++ } ++ ++ if (!queue_data) { ++ /* Put received data into read buffer of tty */ ++ TS0710_DEBUG ++ ("Put received data into read buffer of /dev/mux%d", ++ tty_idx); ++ ++#ifdef TS0710DEBUG ++ t = jiffies; ++#endif ++ ++ (tty->ldisc.receive_buf) (tty, ++ uih_data_start, ++ NULL, ++ uih_len); ++ ++#ifdef TS0710DEBUG ++ TS0710_DEBUG ++ ("tty->ldisc.receive_buf take ticks: %lu", ++ (jiffies - t)); ++#endif ++ ++ } else { /* Queue data */ ++ ++ TS0710_DEBUG ++ ("Put received data into recv queue of /dev/mux%d", ++ tty_idx); ++ if (recv_info->total) { ++ /* recv_info is already linked into mux_recv_queue */ ++ ++ recv_packet = ++ get_mux_recv_packet ++ (uih_len); ++ if (!recv_packet) { ++ TS0710_PRINTK ++ ("MUX %s: no memory\n", ++ __FUNCTION__); ++ break; ++ } ++ ++ memcpy(recv_packet->data, ++ uih_data_start, uih_len); ++ recv_packet->length = uih_len; ++ recv_info->total += uih_len; ++ recv_packet->next = NULL; ++ ++ if (!(recv_info->mux_packet)) { ++ recv_info->mux_packet = ++ recv_packet; ++ } else { ++ recv_packet2 = ++ recv_info-> ++ mux_packet; ++ while (recv_packet2-> ++ next) { ++ recv_packet2 = ++ recv_packet2-> ++ next; ++ } ++ recv_packet2->next = ++ recv_packet; ++ } /* End if( !(recv_info->mux_packet) ) */ ++ } else { /* recv_info->total == 0 */ ++ if (uih_len > ++ TS0710MUX_RECV_BUF_SIZE) { ++ TS0710_PRINTK ++ ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", ++ tty_idx, uih_len); ++ uih_len = ++ TS0710MUX_RECV_BUF_SIZE; ++ } ++ memcpy(recv_info->data, ++ uih_data_start, uih_len); ++ recv_info->length = uih_len; ++ recv_info->total = uih_len; ++ ++ add_post_recv_queue ++ (&mux_recv_queue, ++ recv_info); ++ } /* End recv_info->total == 0 */ ++ } /* End Queue data */ ++ ++ if (flow_control) { ++ /* Do something for flow control */ ++ ts0710_flow_off(tty, dlci, ts0710); ++ } ++ ++ if (tty_idx == ++ dlci2tty[TS0710MUX_GPRS1_DLCI].datatty) { ++ if (add_count ++ (TS0710MUX_GPRS1_RECV_COUNT_IDX, ++ uih_len) < 0) { ++ post_recv_count_flag = 1; ++ post_recv = 1; ++ mux_data_count2 ++ [TS0710MUX_GPRS1_RECV_COUNT_IDX] ++ += uih_len; ++ } ++ } else if (tty_idx == ++ dlci2tty[TS0710MUX_GPRS2_DLCI]. ++ datatty) { ++ if (add_count ++ (TS0710MUX_GPRS2_RECV_COUNT_IDX, ++ uih_len) < 0) { ++ post_recv_count_flag = 1; ++ post_recv = 1; ++ mux_data_count2 ++ [TS0710MUX_GPRS2_RECV_COUNT_IDX] ++ += uih_len; ++ } ++ } ++ ++ if (post_recv) ++ schedule_work(&post_recv_tqueue); ++ } /* End processing received data */ ++ } else { ++ TS0710_DEBUG("invalid dlci %d\n", dlci); ++ } ++ ++ break; ++ ++ default: ++ TS0710_DEBUG("illegal packet\n"); ++ break; ++ } ++ return 0; ++} ++ ++/* ++int ts0710_send_data(ts0710_con *ts0710, __u8 dlci, __u8 *data, __u32 count) ++{ ++ __u32 c, total = 0; ++ __u8 tag, first; ++ ++ if( ts0710->dlci[0].state == FLOW_STOPPED ){ ++ TS0710_DEBUG("Flow stopped on all channels, returning zero\n"); ++*/ ++/* ++ return -EFLOWSTOPPED; ++ } else if( ts0710->dlci[dlci].state == FLOW_STOPPED ){ ++ TS0710_DEBUG("Flow stopped, returning zero\n"); ++*/ ++/* ++ return -EFLOWSTOPPED; ++ } else if( ts0710->dlci[dlci].state == CONNECTED ){ ++ ++ TS0710_DEBUG("trying to send %d bytes\n", count); ++ tag = *data; ++ first = 1; ++*/ ++ /* The first byte is always a Cmd/Data tag */ ++/* ++ while( count > 1 ){ ++ ++ c = min(count, ts0710->dlci[dlci].mtu); ++ if( queue_uih(data, c, ts0710, dlci) <= 0 ) { ++ break; ++ } ++ ++ total += (c - 1); ++ data += (c - 1); ++ *data = tag; ++ count -= (c - 1); ++ ++ if( first ) { ++ first = 0; ++ total++; ++ } ++ } ++ TS0710_DEBUG("sent %d bytes\n", total); ++ return total; ++ } else { ++ TS0710_DEBUG("DLCI %d not connected\n", dlci); ++ return -EDISCONNECTED; ++ } ++} ++*/ ++ ++/* Close ts0710 channel */ ++static void ts0710_close_channel(__u8 dlci) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int try; ++ unsigned long t; ++ ++ TS0710_DEBUG("ts0710_disc_command on channel %d\n", dlci); ++ ++ if ((ts0710->dlci[dlci].state == DISCONNECTED) ++ || (ts0710->dlci[dlci].state == REJECTED)) { ++ return; ++ } else if (ts0710->dlci[dlci].state == DISCONNECTING) { ++ /* Reentry */ ++ return; ++ } else { ++ ts0710->dlci[dlci].state = DISCONNECTING; ++ try = 3; ++ while (try--) { ++ t = jiffies; ++ send_disc(ts0710, dlci); ++ interruptible_sleep_on_timeout(&ts0710->dlci[dlci]. ++ close_wait, ++ TS0710MUX_TIME_OUT); ++ if (ts0710->dlci[dlci].state == DISCONNECTED) { ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI %d Send DISC got signal!\n", ++ dlci); ++ break; ++ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI %d Send DISC timeout!\n", dlci); ++ continue; ++ } ++ } ++ ++ if (ts0710->dlci[dlci].state != DISCONNECTED) { ++ if (dlci == 0) { /* Control Channel */ ++ ts0710_upon_disconnect(); ++ } else { /* Other Channel */ ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ wake_up_interruptible(&ts0710->dlci[dlci]. ++ close_wait); ++ ts0710_reset_dlci(dlci); ++ } ++ } ++ } ++} ++ ++int ts0710_open_channel(__u8 dlci) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int try; ++ int retval; ++ unsigned long t; ++ ++ retval = -ENODEV; ++ if (dlci == 0) { // control channel ++ if ((ts0710->dlci[0].state == CONNECTED) ++ || (ts0710->dlci[0].state == FLOW_STOPPED)) { ++ return 0; ++ } else if (ts0710->dlci[0].state == CONNECTING) { ++ /* Reentry */ ++ TS0710_PRINTK ++ ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", ++ current->pid, current->comm); ++ try = 11; ++ while (try--) { ++ t = jiffies; ++ interruptible_sleep_on_timeout(&ts0710->dlci[0]. ++ open_wait, ++ TS0710MUX_TIME_OUT); ++ if ((ts0710->dlci[0].state == CONNECTED) ++ || (ts0710->dlci[0].state == ++ FLOW_STOPPED)) { ++ retval = 0; ++ break; ++ } else if (ts0710->dlci[0].state == REJECTED) { ++ retval = -EREJECTED; ++ break; ++ } else if (ts0710->dlci[0].state == ++ DISCONNECTED) { ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Wait for connecting got signal!\n", ++ dlci); ++ retval = -EAGAIN; ++ break; ++ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Wait for connecting timeout!\n", ++ dlci); ++ continue; ++ } else if (ts0710->dlci[0].state == CONNECTING) { ++ continue; ++ } ++ } ++ ++ if (ts0710->dlci[0].state == CONNECTING) { ++ ts0710->dlci[0].state = DISCONNECTED; ++ } ++ } else if ((ts0710->dlci[0].state != DISCONNECTED) ++ && (ts0710->dlci[0].state != REJECTED)) { ++ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); ++ return retval; ++ } else { ++ ts0710->initiator = 1; ++ ts0710->dlci[0].state = CONNECTING; ++ ts0710->dlci[0].initiator = 1; ++ try = 10; ++ while (try--) { ++ t = jiffies; ++ send_sabm(ts0710, 0); ++ interruptible_sleep_on_timeout(&ts0710->dlci[0]. ++ open_wait, ++ TS0710MUX_TIME_OUT); ++ if ((ts0710->dlci[0].state == CONNECTED) ++ || (ts0710->dlci[0].state == ++ FLOW_STOPPED)) { ++ retval = 0; ++ break; ++ } else if (ts0710->dlci[0].state == REJECTED) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM got rejected!\n", ++ dlci); ++ retval = -EREJECTED; ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM got signal!\n", ++ dlci); ++ retval = -EAGAIN; ++ break; ++ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM timeout!\n", ++ dlci); ++ continue; ++ } ++ } ++ ++ if (ts0710->dlci[0].state == CONNECTING) { ++ ts0710->dlci[0].state = DISCONNECTED; ++ } ++ wake_up_interruptible(&ts0710->dlci[0].open_wait); ++ } ++ } else { // other channel ++ if ((ts0710->dlci[0].state != CONNECTED) ++ && (ts0710->dlci[0].state != FLOW_STOPPED)) { ++ return retval; ++ } else if ((ts0710->dlci[dlci].state == CONNECTED) ++ || (ts0710->dlci[dlci].state == FLOW_STOPPED)) { ++ return 0; ++ } else if ((ts0710->dlci[dlci].state == NEGOTIATING) ++ || (ts0710->dlci[dlci].state == CONNECTING)) { ++ /* Reentry */ ++ try = 8; ++ while (try--) { ++ t = jiffies; ++ interruptible_sleep_on_timeout(&ts0710-> ++ dlci[dlci]. ++ open_wait, ++ TS0710MUX_TIME_OUT); ++ if ((ts0710->dlci[dlci].state == CONNECTED) ++ || (ts0710->dlci[dlci].state == ++ FLOW_STOPPED)) { ++ retval = 0; ++ break; ++ } else if (ts0710->dlci[dlci].state == REJECTED) { ++ retval = -EREJECTED; ++ break; ++ } else if (ts0710->dlci[dlci].state == ++ DISCONNECTED) { ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Wait for connecting got signal!\n", ++ dlci); ++ retval = -EAGAIN; ++ break; ++ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Wait for connecting timeout!\n", ++ dlci); ++ continue; ++ } else ++ if ((ts0710->dlci[dlci].state == ++ NEGOTIATING) ++ || (ts0710->dlci[dlci].state == ++ CONNECTING)) { ++ continue; ++ } ++ } ++ ++ if ((ts0710->dlci[dlci].state == NEGOTIATING) ++ || (ts0710->dlci[dlci].state == CONNECTING)) { ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ } ++ } else if ((ts0710->dlci[dlci].state != DISCONNECTED) ++ && (ts0710->dlci[dlci].state != REJECTED)) { ++ TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); ++ return retval; ++ } else { ++ ts0710->dlci[dlci].state = NEGOTIATING; ++ ts0710->dlci[dlci].initiator = 1; ++ try = 3; ++ while (try--) { ++ t = jiffies; ++ send_pn_msg(ts0710, 7, ts0710->dlci[dlci].mtu, ++ 0, 0, dlci, 1); ++ interruptible_sleep_on_timeout(&ts0710-> ++ dlci[dlci]. ++ open_wait, ++ TS0710MUX_TIME_OUT); ++ if (ts0710->dlci[dlci].state == CONNECTING) { ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send pn_msg got signal!\n", ++ dlci); ++ retval = -EAGAIN; ++ break; ++ } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send pn_msg timeout!\n", ++ dlci); ++ continue; ++ } ++ } ++ ++ if (ts0710->dlci[dlci].state == CONNECTING) { ++ try = 3; ++ while (try--) { ++ t = jiffies; ++ send_sabm(ts0710, dlci); ++ interruptible_sleep_on_timeout(&ts0710-> ++ dlci ++ [dlci]. ++ open_wait, ++ TS0710MUX_TIME_OUT); ++ if ((ts0710->dlci[dlci].state == ++ CONNECTED) ++ || (ts0710->dlci[dlci].state == ++ FLOW_STOPPED)) { ++ retval = 0; ++ break; ++ } else if (ts0710->dlci[dlci].state == ++ REJECTED) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM got rejected!\n", ++ dlci); ++ retval = -EREJECTED; ++ break; ++ } else if (signal_pending(current)) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM got signal!\n", ++ dlci); ++ retval = -EAGAIN; ++ break; ++ } else if ((jiffies - t) >= ++ TS0710MUX_TIME_OUT) { ++ TS0710_PRINTK ++ ("MUX DLCI:%d Send SABM timeout!\n", ++ dlci); ++ continue; ++ } ++ } ++ } ++ ++ if ((ts0710->dlci[dlci].state == NEGOTIATING) ++ || (ts0710->dlci[dlci].state == CONNECTING)) { ++ ts0710->dlci[dlci].state = DISCONNECTED; ++ } ++ wake_up_interruptible(&ts0710->dlci[dlci].open_wait); ++ } ++ } ++ return retval; ++} ++ ++static int ts0710_exec_test_cmd(void) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ __u8 *f_buf; /* Frame buffer */ ++ __u8 *d_buf; /* Data buffer */ ++ int retval = -EFAULT; ++ int j; ++ unsigned long t; ++ ++ if (ts0710->be_testing) { ++ /* Reentry */ ++ t = jiffies; ++ interruptible_sleep_on_timeout(&ts0710->test_wait, ++ 3 * TS0710MUX_TIME_OUT); ++ if (ts0710->be_testing == 0) { ++ if (ts0710->test_errs == 0) { ++ retval = 0; ++ } else { ++ retval = -EFAULT; ++ } ++ } else if (signal_pending(current)) { ++ TS0710_DEBUG ++ ("Wait for Test_cmd response got signal!\n"); ++ retval = -EAGAIN; ++ } else if ((jiffies - t) >= 3 * TS0710MUX_TIME_OUT) { ++ TS0710_DEBUG("Wait for Test_cmd response timeout!\n"); ++ retval = -EFAULT; ++ } ++ } else { ++ ts0710->be_testing = 1; /* Set the flag */ ++ ++ f_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); ++ d_buf = (__u8 *) kmalloc(TEST_PATTERN_SIZE + 32, GFP_KERNEL); ++ if ((!f_buf) || (!d_buf)) { ++ if (f_buf) { ++ kfree(f_buf); ++ } ++ if (d_buf) { ++ kfree(d_buf); ++ } ++ ++ ts0710->be_testing = 0; /* Clear the flag */ ++ ts0710->test_errs = TEST_PATTERN_SIZE; ++ wake_up_interruptible(&ts0710->test_wait); ++ return -ENOMEM; ++ } ++ ++ for (j = 0; j < TEST_PATTERN_SIZE; j++) { ++ d_buf[j] = j & 0xFF; ++ } ++ ++ t = jiffies; ++ ts0710_test_msg(ts0710, d_buf, TEST_PATTERN_SIZE, MCC_CMD, ++ f_buf); ++ interruptible_sleep_on_timeout(&ts0710->test_wait, ++ 2 * TS0710MUX_TIME_OUT); ++ if (ts0710->be_testing == 0) { ++ if (ts0710->test_errs == 0) { ++ retval = 0; ++ } else { ++ retval = -EFAULT; ++ } ++ } else if (signal_pending(current)) { ++ TS0710_DEBUG("Send Test_cmd got signal!\n"); ++ retval = -EAGAIN; ++ } else if ((jiffies - t) >= 2 * TS0710MUX_TIME_OUT) { ++ TS0710_DEBUG("Send Test_cmd timeout!\n"); ++ ts0710->test_errs = TEST_PATTERN_SIZE; ++ retval = -EFAULT; ++ } ++ ++ ts0710->be_testing = 0; /* Clear the flag */ ++ wake_up_interruptible(&ts0710->test_wait); ++ ++ /* Release buffer */ ++ if (f_buf) { ++ kfree(f_buf); ++ } ++ if (d_buf) { ++ kfree(d_buf); ++ } ++ } ++ ++ return retval; ++} ++ ++static void mux_sched_send(void) ++{ ++ ++#ifdef USB_FOR_MUX ++ schedule_work(&send_tqueue); ++#else ++ if (!tq_serial_for_mux) { ++ TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", ++ __FUNCTION__); ++ return; ++ } ++ schedule_work(&send_tqueue); ++ mark_bh(SERIAL_BH); ++#endif ++ ++} ++ ++/**************************** ++ * TTY driver routines ++*****************************/ ++ ++static void mux_close(struct tty_struct *tty, struct file *filp) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int line; ++ __u8 dlci; ++ __u8 cmdtty; ++ __u8 datatty; ++ ++ UNUSED_PARAM(filp); ++ ++ if (!tty) { ++ return; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ return; ++ } ++ if (mux_tty[line] > 0) ++ mux_tty[line]--; ++ ++ dlci = tty2dlci[line]; ++ cmdtty = dlci2tty[dlci].cmdtty; ++ datatty = dlci2tty[dlci].datatty; ++ if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { ++ if (dlci == 1) { ++ ts0710_close_channel(0); ++ TS0710_PRINTK ++ ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); ++ TS0710_SIG2APLOGD(); ++ } ++ ts0710_close_channel(dlci); ++ } ++ ++ if (mux_tty[line] == 0) { ++ if ((mux_send_info_flags[line]) ++ && (mux_send_info[line]) ++ /*&& (mux_send_info[line]->filled == 0) */ ++ ) { ++ mux_send_info_flags[line] = 0; ++ kfree(mux_send_info[line]); ++ mux_send_info[line] = 0; ++ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); ++ } ++ ++ if ((mux_recv_info_flags[line]) ++ && (mux_recv_info[line]) ++ && (mux_recv_info[line]->total == 0)) { ++ mux_recv_info_flags[line] = 0; ++ free_mux_recv_struct(mux_recv_info[line]); ++ mux_recv_info[line] = 0; ++ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); ++ } ++ ++ ts0710_flow_on(dlci, ts0710); ++ schedule_work(&post_recv_tqueue); ++ ++ wake_up_interruptible(&tty->read_wait); ++ wake_up_interruptible(&tty->write_wait); ++ tty->packet = 0; ++ } ++} ++ ++static void mux_throttle(struct tty_struct *tty) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int line; ++ int i; ++ __u8 dlci; ++ ++ if (!tty) { ++ return; ++ } ++ ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ return; ++ } ++ ++ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, ++ line); ++ ++ dlci = tty2dlci[line]; ++ if ((ts0710->dlci[0].state != CONNECTED) ++ && (ts0710->dlci[0].state != FLOW_STOPPED)) { ++ return; ++ } else if ((ts0710->dlci[dlci].state != CONNECTED) ++ && (ts0710->dlci[dlci].state != FLOW_STOPPED)) { ++ return; ++ } ++ ++ if (ts0710->dlci[dlci].flow_control) { ++ return; ++ } ++ ++ for (i = 0; i < 3; i++) { ++ if (ts0710_msc_msg ++ (ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, dlci) < 0) { ++ continue; ++ } else { ++ TS0710_LOG("MUX Send Flow off on dlci %d\n", dlci); ++ ts0710->dlci[dlci].flow_control = 1; ++ break; ++ } ++ } ++} ++ ++static void mux_unthrottle(struct tty_struct *tty) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int line; ++ __u8 dlci; ++ mux_recv_struct *recv_info; ++ ++ if (!tty) { ++ return; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ return; ++ } ++ ++ if ((!mux_recv_info_flags[line]) || (!mux_recv_info[line])) { ++ return; ++ } ++ ++ TS0710_DEBUG("Enter into %s, minor number is: %d\n", __FUNCTION__, ++ line); ++ ++ recv_info = mux_recv_info[line]; ++ dlci = tty2dlci[line]; ++ ++ if (recv_info->total) { ++ recv_info->post_unthrottle = 1; ++ schedule_work(&post_recv_tqueue); ++ } else { ++ ts0710_flow_on(dlci, ts0710); ++ } ++} ++ ++static int mux_chars_in_buffer(struct tty_struct *tty) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int retval; ++ int line; ++ __u8 dlci; ++ mux_send_struct *send_info; ++ ++ retval = TS0710MUX_MAX_CHARS_IN_BUF; ++ if (!tty) { ++ goto out; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ goto out; ++ } ++ ++ dlci = tty2dlci[line]; ++ if (ts0710->dlci[0].state == FLOW_STOPPED) { ++ TS0710_DEBUG ++ ("Flow stopped on all channels, returning MAX chars in buffer\n"); ++ goto out; ++ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped, returning MAX chars in buffer\n"); ++ goto out; ++ } else if (ts0710->dlci[dlci].state != CONNECTED) { ++ TS0710_DEBUG("DLCI %d not connected\n", dlci); ++ goto out; ++ } ++ ++ if (!(mux_send_info_flags[line])) { ++ goto out; ++ } ++ send_info = mux_send_info[line]; ++ if (!send_info) { ++ goto out; ++ } ++ if (send_info->filled) { ++ goto out; ++ } ++ ++ retval = 0; ++ ++ out: ++ return retval; ++} ++ ++static int mux_chars_in_serial_buffer(struct tty_struct *tty) ++{ ++ UNUSED_PARAM(tty); ++ ++ if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { ++ TS0710_PRINTK ++ ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", ++ __FUNCTION__); ++ ++#ifndef USB_FOR_MUX ++ TS0710_PRINTK ++ ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", ++ __FUNCTION__); ++ TS0710_SIG2APLOGD(); ++#endif ++ ++ return 0; ++ } ++ return COMM_FOR_MUX_DRIVER->chars_in_buffer(COMM_FOR_MUX_TTY); ++} ++ ++static int mux_write(struct tty_struct *tty, ++ const unsigned char *buf, int count) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int line; ++ __u8 dlci; ++ mux_send_struct *send_info; ++ __u8 *d_buf; ++ __u16 c; ++ __u8 post_recv; ++ ++ if (count <= 0) { ++ return 0; ++ } ++ ++ if (!tty) { ++ return 0; ++ } ++ ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) ++ return -ENODEV; ++ ++ dlci = tty2dlci[line]; ++ if (ts0710->dlci[0].state == FLOW_STOPPED) { ++ TS0710_DEBUG ++ ("Flow stopped on all channels, returning zero /dev/mux%d\n", ++ line); ++ return 0; ++ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped, returning zero /dev/mux%d\n", line); ++ return 0; ++ } else if (ts0710->dlci[dlci].state == CONNECTED) { ++ ++ if (!(mux_send_info_flags[line])) { ++ TS0710_PRINTK ++ ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", ++ line); ++ return -ENODEV; ++ } ++ send_info = mux_send_info[line]; ++ if (!send_info) { ++ TS0710_PRINTK ++ ("MUX Error: mux_write: mux_send_info[%d] == 0\n", ++ line); ++ return -ENODEV; ++ } ++ ++ c = min(count, (ts0710->dlci[dlci].mtu - 1)); ++ if (c <= 0) { ++ return 0; ++ } ++ ++ if (test_and_set_bit(BUF_BUSY, &send_info->flags)) ++ return 0; ++ ++ if (send_info->filled) { ++ clear_bit(BUF_BUSY, &send_info->flags); ++ return 0; ++ } ++ ++ d_buf = ((__u8 *) send_info->buf) + TS0710MUX_SEND_BUF_OFFSET; ++ memcpy(&d_buf[1], buf, c); ++ ++ TS0710_DEBUG("Prepare to send %d bytes from /dev/mux%d", c, ++ line); ++ if (iscmdtty[line]) { ++ TS0710_DEBUGSTR(&d_buf[1], c); ++ TS0710_DEBUG("CMDTAG"); ++ d_buf[0] = CMDTAG; ++ } else { ++ TS0710_DEBUG("DATATAG"); ++ d_buf[0] = DATATAG; ++ } ++ ++ TS0710_DEBUGHEX(d_buf, c + 1); ++ ++ send_info->frame = d_buf; ++ queue_uih(send_info, c + 1, ts0710, dlci); ++ send_info->filled = 1; ++ clear_bit(BUF_BUSY, &send_info->flags); ++ ++ post_recv = 0; ++ if (dlci == TS0710MUX_GPRS1_DLCI) { ++ if (add_count ++ (TS0710MUX_GPRS1_SEND_COUNT_IDX, c) < 0) { ++ post_recv_count_flag = 1; ++ post_recv = 1; ++ mux_data_count2[TS0710MUX_GPRS1_SEND_COUNT_IDX] ++ += c; ++ } ++ } else if (dlci == TS0710MUX_GPRS2_DLCI) { ++ if (add_count ++ (TS0710MUX_GPRS2_SEND_COUNT_IDX, c) < 0) { ++ post_recv_count_flag = 1; ++ post_recv = 1; ++ mux_data_count2[TS0710MUX_GPRS2_SEND_COUNT_IDX] ++ += c; ++ } ++ } ++ ++ if (post_recv) ++ schedule_work(&post_recv_tqueue); ++ ++ if (mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY) == 0) { ++ /* Sending bottom half should be ++ run after return from this function */ ++ mux_sched_send(); ++ } ++ return c; ++ } else { ++ TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); ++ return -EDISCONNECTED; ++ } ++} ++ ++static int mux_write_room(struct tty_struct *tty) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int retval; ++ int line; ++ __u8 dlci; ++ mux_send_struct *send_info; ++ ++ retval = 0; ++ if (!tty) { ++ goto out; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ goto out; ++ } ++ ++ dlci = tty2dlci[line]; ++ if (ts0710->dlci[0].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped on all channels, returning ZERO\n"); ++ goto out; ++ } else if (ts0710->dlci[dlci].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped, returning ZERO\n"); ++ goto out; ++ } else if (ts0710->dlci[dlci].state != CONNECTED) { ++ TS0710_DEBUG("DLCI %d not connected\n", dlci); ++ goto out; ++ } ++ ++ if (!(mux_send_info_flags[line])) { ++ goto out; ++ } ++ send_info = mux_send_info[line]; ++ if (!send_info) { ++ goto out; ++ } ++ if (send_info->filled) { ++ goto out; ++ } ++ ++ retval = ts0710->dlci[dlci].mtu - 1; ++ ++ out: ++ return retval; ++} ++ ++static int mux_ioctl(struct tty_struct *tty, struct file *file, ++ unsigned int cmd, unsigned long arg) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int line; ++ __u8 dlci; ++ ++ UNUSED_PARAM(file); ++ UNUSED_PARAM(arg); ++ ++ if (!tty) { ++ return -EIO; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ return -ENODEV; ++ } ++ ++ dlci = tty2dlci[line]; ++ switch (cmd) { ++ case TS0710MUX_IO_MSC_HANGUP: ++ if (ts0710_msc_msg(ts0710, EA | RTR | DV, MCC_CMD, dlci) < 0) { ++ return -EAGAIN; ++ } else { ++ return 0; ++ } ++ ++ case TS0710MUX_IO_TEST_CMD: ++ return ts0710_exec_test_cmd(); ++/* ++ case TS0710MUX_IO_DLCI_FC_ON: ++ if( line == 0 ) { ++ break; ++ } ++ if( ts0710_msc_msg(ts0710, EA | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { ++ return -EAGAIN; ++ } else { ++ return 0; ++ } ++ ++ case TS0710MUX_IO_DLCI_FC_OFF: ++ if( line == 0 ) { ++ break; ++ } ++ if( ts0710_msc_msg(ts0710, EA | FC | RTC | RTR | DV, MCC_CMD, (__u8)line) < 0) { ++ return -EAGAIN; ++ } else { ++ return 0; ++ } ++ ++ case TS0710MUX_IO_FC_ON: ++ if( line != 0 ) { ++ break; ++ } ++ if( ts0710_fcon_msg(ts0710, MCC_CMD) < 0) { ++ return -EAGAIN; ++ } else { ++ return 0; ++ } ++ ++ case TS0710MUX_IO_FC_OFF: ++ if( line != 0 ) { ++ break; ++ } ++ if( ts0710_fcoff_msg(ts0710, MCC_CMD) < 0) { ++ return -EAGAIN; ++ } else { ++ return 0; ++ } ++*/ ++ default: ++ break; ++ } ++ return -ENOIOCTLCMD; ++} ++ ++static void mux_flush_buffer(struct tty_struct *tty) ++{ ++ int line; ++ ++ if (!tty) { ++ return; ++ } ++ ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ return; ++ } ++ ++ TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); ++ ++ if ((mux_send_info_flags[line]) ++ && (mux_send_info[line]) ++ && (mux_send_info[line]->filled)) { ++ ++ mux_send_info[line]->filled = 0; ++ } ++ ++ wake_up_interruptible(&tty->write_wait); ++#ifdef SERIAL_HAVE_POLL_WAIT ++ wake_up_interruptible(&tty->poll_wait); ++#endif ++ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && ++ tty->ldisc.write_wakeup) { ++ (tty->ldisc.write_wakeup) (tty); ++ } ++ ++/* ++ if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { ++ TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); ++ ++#ifndef USB_FOR_MUX ++ TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); ++ TS0710_SIG2APLOGD(); ++#endif ++ ++ return; ++ } ++ return COMM_FOR_MUX_DRIVER->flush_buffer(COMM_FOR_MUX_TTY); ++*/ ++} ++ ++static int mux_open(struct tty_struct *tty, struct file *filp) ++{ ++ int retval; ++ int line; ++ __u8 dlci; ++ __u8 cmdtty; ++ __u8 datatty; ++ mux_send_struct *send_info; ++ mux_recv_struct *recv_info; ++ ++ UNUSED_PARAM(filp); ++ ++ retval = -ENODEV; ++ if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { ++ ++#ifdef USB_FOR_MUX ++ TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); ++#else ++ TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); ++#endif ++ ++ goto out; ++ } ++ ++ if (!tty) { ++ goto out; ++ } ++ line = tty->index; ++ if ((line < 0) || (line >= NR_MUXS)) { ++ goto out; ++ } ++#ifdef TS0710SERVER ++ /* do nothing as a server */ ++ mux_tty[line]++; ++ retval = 0; ++#else ++ mux_tty[line]++; ++ dlci = tty2dlci[line]; ++ ++/* if( dlci == 1 ) { */ ++ /* Open server channel 0 first */ ++ if ((retval = ts0710_open_channel(0)) != 0) { ++ TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); ++ ts0710_init(); ++ ++ mux_tty[line]--; ++ goto out; ++ } ++/* } */ ++ ++ /* Allocate memory first. As soon as connection has been established, MUX may receive */ ++ if (mux_send_info_flags[line] == 0) { ++ send_info = ++ (mux_send_struct *) kmalloc(sizeof(mux_send_struct), ++ GFP_KERNEL); ++ if (!send_info) { ++ retval = -ENOMEM; ++ ++ mux_tty[line]--; ++ goto out; ++ } ++ send_info->length = 0; ++ send_info->flags = 0; ++ send_info->filled = 0; ++ mux_send_info[line] = send_info; ++ mux_send_info_flags[line] = 1; ++ TS0710_DEBUG("Allocate mux_send_info for /dev/mux%d", line); ++ } ++ ++ if (mux_recv_info_flags[line] == 0) { ++ recv_info = ++ (mux_recv_struct *) kmalloc(sizeof(mux_recv_struct), ++ GFP_KERNEL); ++ if (!recv_info) { ++ mux_send_info_flags[line] = 0; ++ kfree(mux_send_info[line]); ++ mux_send_info[line] = 0; ++ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); ++ retval = -ENOMEM; ++ ++ mux_tty[line]--; ++ goto out; ++ } ++ recv_info->length = 0; ++ recv_info->total = 0; ++ recv_info->mux_packet = 0; ++ recv_info->next = 0; ++ recv_info->no_tty = line; ++ recv_info->post_unthrottle = 0; ++ mux_recv_info[line] = recv_info; ++ mux_recv_info_flags[line] = 1; ++ TS0710_DEBUG("Allocate mux_recv_info for /dev/mux%d", line); ++ } ++ ++ /* Now establish DLCI connection */ ++ cmdtty = dlci2tty[dlci].cmdtty; ++ datatty = dlci2tty[dlci].datatty; ++ if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { ++ if ((retval = ts0710_open_channel(dlci)) != 0) { ++ TS0710_PRINTK("MUX: Can't connected channel %d!\n", ++ dlci); ++ ts0710_reset_dlci(dlci); ++ ++ mux_send_info_flags[line] = 0; ++ kfree(mux_send_info[line]); ++ mux_send_info[line] = 0; ++ TS0710_DEBUG("Free mux_send_info for /dev/mux%d", line); ++ ++ mux_recv_info_flags[line] = 0; ++ free_mux_recv_struct(mux_recv_info[line]); ++ mux_recv_info[line] = 0; ++ TS0710_DEBUG("Free mux_recv_info for /dev/mux%d", line); ++ ++ mux_tty[line]--; ++ goto out; ++ } ++ } ++ ++ retval = 0; ++#endif ++ out: ++ return retval; ++} ++ ++/* mux dispatcher, call from serial.c receiver_chars() */ ++void mux_dispatcher(struct tty_struct *tty) ++{ ++ UNUSED_PARAM(tty); ++ ++ schedule_work(&receive_tqueue); ++} ++ ++/*For BP UART problem Begin*/ ++#ifdef TS0710SEQ2 ++static int send_ack(ts0710_con * ts0710, __u8 seq_num, __u8 bp_seq1, ++ __u8 bp_seq2) ++#else ++static int send_ack(ts0710_con * ts0710, __u8 seq_num) ++#endif ++{ ++ __u8 buf[20]; ++ short_frame *ack; ++ ++#ifdef TS0710SEQ2 ++ static __u16 ack_seq = 0; ++#endif ++ ++ ack = (short_frame *) (buf + 1); ++ ack->h.addr.ea = 1; ++ ack->h.addr.cr = ((ts0710->initiator) & 0x1); ++ ack->h.addr.d = 0; ++ ack->h.addr.server_chn = 0; ++ ack->h.control = ACK; ++ ack->h.length.ea = 1; ++ ++#ifdef TS0710SEQ2 ++ ack->h.length.len = 5; ++ ack->data[0] = seq_num; ++ ack->data[1] = bp_seq1; ++ ack->data[2] = bp_seq2; ++ ack->data[3] = (ack_seq & 0xFF); ++ ack->data[4] = (ack_seq >> 8) & 0xFF; ++ ack_seq++; ++ ack->data[5] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); ++#else ++ ack->h.length.len = 1; ++ ack->data[0] = seq_num; ++ ack->data[1] = crc_calc((__u8 *) ack, SHORT_CRC_CHECK); ++#endif ++ ++ return basic_write(ts0710, buf, ++ (sizeof(short_frame) + FCS_SIZE + ++ ack->h.length.len)); ++} ++ ++/*For BP UART problem End*/ ++ ++static void receive_worker(void *private_) ++{ ++ struct tty_struct *tty = COMM_FOR_MUX_TTY; ++ int i, count; ++ static unsigned char tbuf[TS0710MUX_MAX_BUF_SIZE]; ++ static unsigned char *tbuf_ptr = &tbuf[0]; ++ static unsigned char *start_flag = 0; ++ unsigned char *search, *to, *from; ++ short_frame *short_pkt; ++ long_frame *long_pkt; ++ static int framelen = -1; ++ ++ /*For BP UART problem Begin */ ++ static __u8 expect_seq = 0; ++ __u32 crc_error; ++ __u8 *uih_data_start; ++ __u32 uih_len; ++ /*For BP UART problem End */ ++ ++ UNUSED_PARAM(private_); ++ ++ if (!tty) ++ return; ++ ++#ifdef USB_FOR_MUX ++ TS0710_DEBUG("Receive following bytes from IPC-USB"); ++#else ++ TS0710_DEBUG("Receive following bytes from UART"); ++#endif ++ ++ TS0710_DEBUGHEX(cp, count); ++ ++ if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { ++ TS0710_PRINTK ++ ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); ++ count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); ++ } ++ ++ count = tty_buffer_request_room(tty, count); ++ ++ for (i = 0; i < count; i++) ++ tty_insert_flip_char(tty, tbuf_ptr[i], TTY_NORMAL); ++ ++ tbuf_ptr += count; ++ search = &tbuf[0]; ++ ++ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { ++ schedule_work(&receive_tqueue); ++ return; ++ } ++ ++ if ((start_flag != 0) && (framelen != -1)) { ++ if ((tbuf_ptr - start_flag) < framelen) { ++ clear_bit(RECV_RUNNING, &mux_recv_flags); ++ return; ++ } ++ } ++ ++ while (1) { ++ if (start_flag == 0) { /* Frame Start Flag not found */ ++ framelen = -1; ++ while (search < tbuf_ptr) { ++ if (*search == TS0710_BASIC_FLAG) { ++ start_flag = search; ++ break; ++ } ++#ifdef TS0710LOG ++ else { ++ TS0710_LOG(">S %02x %c\n", *search, ++ *search); ++ } ++#endif ++ ++ search++; ++ } ++ ++ if (start_flag == 0) { ++ tbuf_ptr = &tbuf[0]; ++ break; ++ } ++ } else { /* Frame Start Flag found */ ++ /* 1 start flag + 1 address + 1 control + 1 or 2 length + lengths data + 1 FCS + 1 end flag */ ++ /* For BP UART problem 1 start flag + 1 seq_num + 1 address + ...... */ ++ /*if( (framelen == -1) && ((tbuf_ptr - start_flag) > TS0710_MAX_HDR_SIZE) ) */ ++ if ((framelen == -1) && ((tbuf_ptr - start_flag) > (TS0710_MAX_HDR_SIZE + SEQ_FIELD_SIZE))) { /*For BP UART problem */ ++ /*short_pkt = (short_frame *) (start_flag + 1); */ ++ short_pkt = (short_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ ++ if (short_pkt->h.length.ea == 1) { /* short frame */ ++ /*framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1; */ ++ framelen = TS0710_MAX_HDR_SIZE + short_pkt->h.length.len + 1 + SEQ_FIELD_SIZE; /*For BP UART problem */ ++ } else { /* long frame */ ++ /*long_pkt = (long_frame *) (start_flag + 1); */ ++ long_pkt = (long_frame *) (start_flag + ADDRESS_FIELD_OFFSET); /*For BP UART problem */ ++ /*framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH( long_pkt->h.length ) + 2; */ ++ framelen = TS0710_MAX_HDR_SIZE + GET_LONG_LENGTH(long_pkt->h.length) + 2 + SEQ_FIELD_SIZE; /*For BP UART problem */ ++ } ++ ++ /*if( framelen > TS0710MUX_MAX_TOTAL_FRAME_SIZE ) { */ ++ if (framelen > (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)) { /*For BP UART problem */ ++ TS0710_LOGSTR_FRAME(0, start_flag, ++ (tbuf_ptr - ++ start_flag)); ++ TS0710_PRINTK ++ ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", ++ /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ ++ __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ ++ search = start_flag + 1; ++ start_flag = 0; ++ framelen = -1; ++ continue; ++ } ++ } ++ ++ if ((framelen != -1) ++ && ((tbuf_ptr - start_flag) >= framelen)) { ++ if (*(start_flag + framelen - 1) == TS0710_BASIC_FLAG) { /* OK, We got one frame */ ++ ++ /*For BP UART problem Begin */ ++ TS0710_LOGSTR_FRAME(0, start_flag, ++ framelen); ++ TS0710_DEBUGHEX(start_flag, framelen); ++ ++ short_pkt = ++ (short_frame *) (start_flag + ++ ADDRESS_FIELD_OFFSET); ++ if ((short_pkt->h.length.ea) == 0) { ++ long_pkt = ++ (long_frame *) (start_flag + ++ ADDRESS_FIELD_OFFSET); ++ uih_len = ++ GET_LONG_LENGTH(long_pkt->h. ++ length); ++ uih_data_start = ++ long_pkt->h.data; ++ ++ crc_error = ++ crc_check((__u8 ++ *) (start_flag + ++ SLIDE_BP_SEQ_OFFSET), ++ LONG_CRC_CHECK + ++ 1, ++ *(uih_data_start + ++ uih_len)); ++ } else { ++ uih_len = ++ short_pkt->h.length.len; ++ uih_data_start = ++ short_pkt->data; ++ ++ crc_error = ++ crc_check((__u8 ++ *) (start_flag + ++ SLIDE_BP_SEQ_OFFSET), ++ SHORT_CRC_CHECK + ++ 1, ++ *(uih_data_start + ++ uih_len)); ++ } ++ ++ if (!crc_error) { ++ if (expect_seq == ++ *(start_flag + ++ SLIDE_BP_SEQ_OFFSET)) { ++ expect_seq++; ++ if (expect_seq >= 4) { ++ expect_seq = 0; ++ } ++#ifdef TS0710SEQ2 ++ send_ack ++ (&ts0710_connection, ++ expect_seq, ++ *(start_flag + ++ FIRST_BP_SEQ_OFFSET), ++ *(start_flag + ++ SECOND_BP_SEQ_OFFSET)); ++#else ++ send_ack ++ (&ts0710_connection, ++ expect_seq); ++#endif ++ ++ ts0710_recv_data ++ (&ts0710_connection, ++ start_flag + ++ ADDRESS_FIELD_OFFSET, ++ framelen - 2 - ++ SEQ_FIELD_SIZE); ++ } else { ++ ++#ifdef TS0710DEBUG ++ if (* ++ (start_flag + ++ SLIDE_BP_SEQ_OFFSET) ++ != 0x9F) { ++#endif ++ ++ TS0710_LOG ++ ("MUX sequence number %d is not expected %d, discard data!\n", ++ * ++ (start_flag ++ + ++ SLIDE_BP_SEQ_OFFSET), ++ expect_seq); ++ ++#ifdef TS0710SEQ2 ++ send_ack ++ (&ts0710_connection, ++ expect_seq, ++ * ++ (start_flag ++ + ++ FIRST_BP_SEQ_OFFSET), ++ * ++ (start_flag ++ + ++ SECOND_BP_SEQ_OFFSET)); ++#else ++ send_ack ++ (&ts0710_connection, ++ expect_seq); ++#endif ++ ++#ifdef TS0710DEBUG ++ } else { ++ *(uih_data_start ++ + uih_len) = ++ 0; ++ TS0710_PRINTK ++ ("MUX bp log: %s\n", ++ uih_data_start); ++ } ++#endif ++ ++ } ++ } else { /* crc_error */ ++ search = start_flag + 1; ++ start_flag = 0; ++ framelen = -1; ++ continue; ++ } /*End if(!crc_error) */ ++ ++ /*For BP UART problem End */ ++ ++/*For BP UART problem ++ TS0710_LOGSTR_FRAME(0, start_flag, framelen); ++ TS0710_DEBUGHEX(start_flag, framelen); ++ ts0710_recv_data(&ts0710_connection, start_flag + 1, framelen - 2); ++*/ ++ search = start_flag + framelen; ++ } else { ++ TS0710_LOGSTR_FRAME(0, start_flag, ++ framelen); ++ TS0710_DEBUGHEX(start_flag, framelen); ++ TS0710_PRINTK ++ ("MUX: Lost synchronization!\n"); ++ search = start_flag + 1; ++ } ++ ++ start_flag = 0; ++ framelen = -1; ++ continue; ++ } ++ ++ if (start_flag != &tbuf[0]) { ++ to = tbuf; ++ from = start_flag; ++ count = tbuf_ptr - start_flag; ++ while (count--) { ++ *to++ = *from++; ++ } ++ ++ tbuf_ptr -= (start_flag - tbuf); ++ start_flag = tbuf; ++ } ++ break; ++ } /* End Frame Start Flag found */ ++ } /* End while(1) */ ++ ++ clear_bit(RECV_RUNNING, &mux_recv_flags); ++} ++ ++static void post_recv_worker(void *private_) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ int tty_idx; ++ struct tty_struct *tty; ++ __u8 post_recv; ++ __u8 flow_control; ++ __u8 dlci; ++ mux_recv_struct *recv_info, *recv_info2, *post_recv_q; ++ int recv_room; ++ mux_recv_packet *recv_packet, *recv_packet2; ++ __u8 j; ++ ++ UNUSED_PARAM(private_); ++ ++ if (test_and_set_bit(RECV_RUNNING, &mux_recv_flags)) { ++ schedule_work(&post_recv_tqueue); ++ return; ++ } ++ ++ TS0710_DEBUG("Enter into post_recv_worker"); ++ ++ post_recv = 0; ++ if (!mux_recv_queue) { ++ goto out; ++ } ++ ++ post_recv_q = NULL; ++ recv_info2 = mux_recv_queue; ++ while ((recv_info = recv_info2)) { ++ recv_info2 = recv_info->next; ++ ++ if (!(recv_info->total)) { ++ TS0710_PRINTK ++ ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", ++ __FUNCTION__); ++ continue; ++ } ++ ++ tty_idx = recv_info->no_tty; ++ dlci = tty2dlci[tty_idx]; ++ tty = mux_table[tty_idx]; ++ if ((!mux_tty[tty_idx]) || (!tty)) { ++ TS0710_PRINTK ++ ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", ++ tty_idx); ++ mux_recv_info_flags[tty_idx] = 0; ++ free_mux_recv_struct(mux_recv_info[tty_idx]); ++ mux_recv_info[tty_idx] = 0; ++ ts0710_flow_on(dlci, ts0710); ++ continue; ++ } ++ ++ TS0710_DEBUG("/dev/mux%d recv_info->total is: %d", tty_idx, ++ recv_info->total); ++ ++ if (test_bit(TTY_THROTTLED, &tty->flags)) { ++ add_post_recv_queue(&post_recv_q, recv_info); ++ continue; ++ } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { ++ post_recv = 1; ++ add_post_recv_queue(&post_recv_q, recv_info); ++ continue; ++ } ++ ++ flow_control = 0; ++ recv_packet2 = recv_info->mux_packet; ++ while (recv_info->total) { ++ recv_room = 65535; ++ if (tty->receive_room) ++ recv_room = tty->receive_room; ++ ++ if (recv_info->length) { ++ if (recv_room < recv_info->length) { ++ flow_control = 1; ++ break; ++ } ++ ++ /* Put queued data into read buffer of tty */ ++ TS0710_DEBUG ++ ("Put queued recv data into read buffer of /dev/mux%d", ++ tty_idx); ++ TS0710_DEBUGHEX(recv_info->data, ++ recv_info->length); ++ (tty->ldisc.receive_buf) (tty, recv_info->data, ++ NULL, ++ recv_info->length); ++ recv_info->total -= recv_info->length; ++ recv_info->length = 0; ++ } else { /* recv_info->length == 0 */ ++ if ((recv_packet = recv_packet2)) { ++ recv_packet2 = recv_packet->next; ++ ++ if (recv_room < recv_packet->length) { ++ flow_control = 1; ++ recv_info->mux_packet = ++ recv_packet; ++ break; ++ } ++ ++ /* Put queued data into read buffer of tty */ ++ TS0710_DEBUG ++ ("Put queued recv data into read buffer of /dev/mux%d", ++ tty_idx); ++ TS0710_DEBUGHEX(recv_packet->data, ++ recv_packet->length); ++ (tty->ldisc.receive_buf) (tty, ++ recv_packet-> ++ data, NULL, ++ recv_packet-> ++ length); ++ recv_info->total -= recv_packet->length; ++ free_mux_recv_packet(recv_packet); ++ } else { ++ TS0710_PRINTK ++ ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", ++ __FUNCTION__, recv_info->total); ++ } ++ } /* End recv_info->length == 0 */ ++ } /* End while( recv_info->total ) */ ++ ++ if (!(recv_info->total)) { ++ /* Important clear */ ++ recv_info->mux_packet = 0; ++ ++ if (recv_info->post_unthrottle) { ++ /* Do something for post_unthrottle */ ++ ts0710_flow_on(dlci, ts0710); ++ recv_info->post_unthrottle = 0; ++ } ++ } else { ++ add_post_recv_queue(&post_recv_q, recv_info); ++ ++ if (flow_control) { ++ /* Do something for flow control */ ++ if (recv_info->post_unthrottle) { ++ set_bit(TTY_THROTTLED, &tty->flags); ++ recv_info->post_unthrottle = 0; ++ } else { ++ ts0710_flow_off(tty, dlci, ts0710); ++ } ++ } /* End if( flow_control ) */ ++ } ++ } /* End while( (recv_info = recv_info2) ) */ ++ ++ mux_recv_queue = post_recv_q; ++ ++ out: ++ if (post_recv_count_flag) { ++ post_recv_count_flag = 0; ++ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { ++ if (mux_data_count2[j] > 0) { ++ if (add_count(j, mux_data_count2[j]) == 0) { ++ mux_data_count2[j] = 0; ++ } else { ++ post_recv_count_flag = 1; ++ post_recv = 1; ++ } ++ } ++ } /* End for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) */ ++ } ++ /* End if( post_recv_count_flag ) */ ++ if (post_recv) ++ schedule_work(&post_recv_tqueue); ++ clear_bit(RECV_RUNNING, &mux_recv_flags); ++} ++ ++/* mux sender, call from serial.c transmit_chars() */ ++void mux_sender(void) ++{ ++ mux_send_struct *send_info; ++ int chars; ++ __u8 idx; ++ ++ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); ++ if (!chars) { ++ /* chars == 0 */ ++ TS0710_LOG("<[]\n"); ++ mux_sched_send(); ++ return; ++ } ++ ++ idx = mux_send_info_idx; ++ if ((idx < NR_MUXS) && (mux_send_info_flags[idx])) { ++ send_info = mux_send_info[idx]; ++ if ((send_info) ++ && (send_info->filled) ++ && (send_info->length <= ++ (TS0710MUX_SERIAL_BUF_SIZE - chars))) { ++ ++ mux_sched_send(); ++ } ++ } ++} ++ ++static void send_worker(void *private_) ++{ ++ ts0710_con *ts0710 = &ts0710_connection; ++ __u8 j; ++ mux_send_struct *send_info; ++ int chars; ++ struct tty_struct *tty; ++ __u8 dlci; ++ ++ UNUSED_PARAM(private_); ++ ++ TS0710_DEBUG("Enter into send_worker"); ++ ++ mux_send_info_idx = NR_MUXS; ++ ++ if (ts0710->dlci[0].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped on all channels\n"); ++ return; ++ } ++ ++ for (j = 0; j < NR_MUXS; j++) { ++ ++ if (!(mux_send_info_flags[j])) { ++ continue; ++ } ++ ++ send_info = mux_send_info[j]; ++ if (!send_info) { ++ continue; ++ } ++ ++ if (!(send_info->filled)) { ++ continue; ++ } ++ ++ dlci = tty2dlci[j]; ++ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", ++ dlci); ++ continue; ++ } else if (ts0710->dlci[dlci].state != CONNECTED) { ++ TS0710_DEBUG("DLCI %d not connected\n", dlci); ++ send_info->filled = 0; ++ continue; ++ } ++ ++ chars = mux_chars_in_serial_buffer(COMM_FOR_MUX_TTY); ++ if (send_info->length <= (TS0710MUX_SERIAL_BUF_SIZE - chars)) { ++ TS0710_DEBUG("Send queued UIH for /dev/mux%d", j); ++ basic_write(ts0710, (__u8 *) send_info->frame, ++ send_info->length); ++ send_info->length = 0; ++ send_info->filled = 0; ++ } else { ++ mux_send_info_idx = j; ++ break; ++ } ++ } /* End for() loop */ ++ ++ /* Queue UIH data to be transmitted */ ++ for (j = 0; j < NR_MUXS; j++) { ++ ++ if (!(mux_send_info_flags[j])) { ++ continue; ++ } ++ ++ send_info = mux_send_info[j]; ++ if (!send_info) { ++ continue; ++ } ++ ++ if (send_info->filled) { ++ continue; ++ } ++ ++ /* Now queue UIH data to send_info->buf */ ++ ++ if (!mux_tty[j]) { ++ continue; ++ } ++ ++ tty = mux_table[j]; ++ if (!tty) { ++ continue; ++ } ++ ++ dlci = tty2dlci[j]; ++ if (ts0710->dlci[dlci].state == FLOW_STOPPED) { ++ TS0710_DEBUG("Flow stopped on channel DLCI: %d\n", ++ dlci); ++ continue; ++ } else if (ts0710->dlci[dlci].state != CONNECTED) { ++ TS0710_DEBUG("DLCI %d not connected\n", dlci); ++ continue; ++ } ++ ++ if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) ++ && tty->ldisc.write_wakeup) { ++ (tty->ldisc.write_wakeup) (tty); ++ } ++ wake_up_interruptible(&tty->write_wait); ++ ++#ifdef SERIAL_HAVE_POLL_WAIT ++ wake_up_interruptible(&tty->poll_wait); ++#endif ++ ++ if (send_info->filled) { ++ if (j < mux_send_info_idx) { ++ mux_send_info_idx = j; ++ } ++ } ++ } /* End for() loop */ ++} ++ ++static int get_count(__u8 idx) ++{ ++ int ret; ++ ++ if (idx > TS0710MUX_COUNT_MAX_IDX) { ++ TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); ++ return -1; ++ } ++ ++ down(&mux_data_count_mutex[idx]); ++ ret = mux_data_count[idx]; ++ up(&mux_data_count_mutex[idx]); ++ ++ return ret; ++} ++ ++static int set_count(__u8 idx, int count) ++{ ++ if (idx > TS0710MUX_COUNT_MAX_IDX) { ++ TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); ++ return -1; ++ } ++ if (count < 0) { ++ TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); ++ return -1; ++ } ++ ++ down(&mux_data_count_mutex[idx]); ++ mux_data_count[idx] = count; ++ up(&mux_data_count_mutex[idx]); ++ ++ return 0; ++} ++ ++static int add_count(__u8 idx, int count) ++{ ++ if (idx > TS0710MUX_COUNT_MAX_IDX) { ++ TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); ++ return -1; ++ } ++ if (count <= 0) { ++ TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); ++ return -1; ++ } ++ ++ if (down_trylock(&mux_data_count_mutex[idx])) ++ return -1; ++ mux_data_count[idx] += count; ++ up(&mux_data_count_mutex[idx]); ++ ++ return 0; ++} ++ ++ssize_t file_proc_read(struct file * file, char *buf, size_t size, ++ loff_t * ppos) ++{ ++ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; ++ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; ++ ++ UNUSED_PARAM(file); ++ UNUSED_PARAM(size); ++ UNUSED_PARAM(ppos); ++ ++ gprsData[0].recvBytes = get_count(TS0710MUX_GPRS1_RECV_COUNT_IDX); ++ gprsData[0].sentBytes = get_count(TS0710MUX_GPRS1_SEND_COUNT_IDX); ++ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes = ++ get_count(TS0710MUX_GPRS2_RECV_COUNT_IDX); ++ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes = ++ get_count(TS0710MUX_GPRS2_SEND_COUNT_IDX); ++ ++ copy_to_user(buf, gprsData, bufLen); ++ ++ return bufLen; ++} ++ ++ssize_t file_proc_write(struct file * file, const char *buf, size_t count, ++ loff_t * ppos) ++{ ++ gprs_bytes gprsData[TS0710MUX_GPRS_SESSION_MAX]; ++ int bufLen = sizeof(gprs_bytes) * TS0710MUX_GPRS_SESSION_MAX; ++ ++ UNUSED_PARAM(file); ++ UNUSED_PARAM(count); ++ UNUSED_PARAM(ppos); ++ ++ memset(gprsData, 0, bufLen); ++ ++ copy_from_user(gprsData, buf, bufLen); ++ ++ set_count(TS0710MUX_GPRS1_RECV_COUNT_IDX, gprsData[0].recvBytes); ++ set_count(TS0710MUX_GPRS1_SEND_COUNT_IDX, gprsData[0].sentBytes); ++ set_count(TS0710MUX_GPRS2_RECV_COUNT_IDX, ++ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].recvBytes); ++ set_count(TS0710MUX_GPRS2_SEND_COUNT_IDX, ++ gprsData[TS0710MUX_GPRS_SESSION_MAX - 1].sentBytes); ++ ++ return bufLen; ++} ++ ++static void gprs_proc_init(void) ++{ ++ gprs_proc_file = ++ create_proc_entry("gprsbytes", S_IRUSR | S_IWUSR, NULL); ++ gprs_proc_file->proc_fops = &file_proc_operations; ++} ++ ++static void gprs_proc_exit(void) ++{ ++ remove_proc_entry("gprsbytes", gprs_proc_file); ++} ++ ++static int __init mux_init(void) ++{ ++ __u8 j; ++ ++ if (COMM_FOR_MUX_DRIVER == NULL) { ++ ++#ifdef USB_FOR_MUX ++ panic("please install IPC-USB first\n"); ++#else ++ panic("please install ttyS0 first\n"); ++#endif ++ ++ } ++ ++ ts0710_init(); ++ ++ for (j = 0; j < NR_MUXS; j++) { ++ mux_send_info_flags[j] = 0; ++ mux_send_info[j] = 0; ++ mux_recv_info_flags[j] = 0; ++ mux_recv_info[j] = 0; ++ } ++ mux_send_info_idx = NR_MUXS; ++ mux_recv_queue = NULL; ++ mux_recv_flags = 0; ++ ++ for (j = 0; j < TS0710MUX_COUNT_IDX_NUM; j++) { ++ mux_data_count[j] = 0; ++ mux_data_count2[j] = 0; ++ init_MUTEX(&mux_data_count_mutex[j]); ++ } ++ post_recv_count_flag = 0; ++ ++ INIT_WORK(&send_tqueue, send_worker, NULL); ++ INIT_WORK(&receive_tqueue, receive_worker, NULL); ++ INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); ++ ++ memset(&mux_driver, 0, sizeof(struct tty_driver)); ++ memset(&mux_tty, 0, sizeof(mux_tty)); ++ mux_driver.magic = TTY_DRIVER_MAGIC; ++ mux_driver.driver_name = "ts0710mux"; ++ mux_driver.name = "ts0710mux"; ++ mux_driver.major = TS0710MUX_MAJOR; ++ mux_driver.minor_start = TS0710MUX_MINOR_START; ++ mux_driver.num = NR_MUXS; ++ mux_driver.type = TTY_DRIVER_TYPE_SERIAL; ++ mux_driver.subtype = SERIAL_TYPE_NORMAL; ++ mux_driver.init_termios = tty_std_termios; ++ mux_driver.init_termios.c_iflag = 0; ++ mux_driver.init_termios.c_oflag = 0; ++ mux_driver.init_termios.c_cflag = B38400 | CS8 | CREAD; ++ mux_driver.init_termios.c_lflag = 0; ++ mux_driver.flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; ++ ++ mux_driver.ttys = mux_table; ++ mux_driver.termios = mux_termios; ++ mux_driver.termios_locked = mux_termios_locked; ++// mux_driver.driver_state = mux_state; ++ mux_driver.other = NULL; ++ ++ mux_driver.open = mux_open; ++ mux_driver.close = mux_close; ++ mux_driver.write = mux_write; ++ mux_driver.write_room = mux_write_room; ++ mux_driver.flush_buffer = mux_flush_buffer; ++ mux_driver.chars_in_buffer = mux_chars_in_buffer; ++ mux_driver.throttle = mux_throttle; ++ mux_driver.unthrottle = mux_unthrottle; ++ mux_driver.ioctl = mux_ioctl; ++ mux_driver.owner = THIS_MODULE; ++ ++ if (tty_register_driver(&mux_driver)) ++ panic("Couldn't register mux driver"); ++ ++ COMM_MUX_DISPATCHER = mux_dispatcher; ++ COMM_MUX_SENDER = mux_sender; ++ ++ gprs_proc_init(); ++ ++ return 0; ++} ++ ++static void __exit mux_exit(void) ++{ ++ __u8 j; ++ ++ COMM_MUX_DISPATCHER = NULL; ++ COMM_MUX_SENDER = NULL; ++ ++ gprs_proc_exit(); ++ ++ mux_send_info_idx = NR_MUXS; ++ mux_recv_queue = NULL; ++ for (j = 0; j < NR_MUXS; j++) { ++ if ((mux_send_info_flags[j]) && (mux_send_info[j])) { ++ kfree(mux_send_info[j]); ++ } ++ mux_send_info_flags[j] = 0; ++ mux_send_info[j] = 0; ++ ++ if ((mux_recv_info_flags[j]) && (mux_recv_info[j])) { ++ free_mux_recv_struct(mux_recv_info[j]); ++ } ++ mux_recv_info_flags[j] = 0; ++ mux_recv_info[j] = 0; ++ } ++ ++ if (tty_unregister_driver(&mux_driver)) ++ panic("Couldn't unregister mux driver"); ++} ++ ++module_init(mux_init); ++module_exit(mux_exit); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Harald Welte "); ++MODULE_DESCRIPTION("TS 07.10 Multiplexer"); +Index: linux-2.6.21/drivers/char/ts0710_mux.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/char/ts0710_mux.h 2007-05-06 17:10:21.000000000 -0300 +@@ -0,0 +1,103 @@ ++/* ++ * mux_macro.h ++ * ++ * Copyright (C) 2002 2005 Motorola ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ * 11/18/2002 (Motorola) - Initial version ++ * ++ */ ++ ++/* ++* This header file should be included by both MUX and other applications ++* which access MUX device files. It gives the additional macro definitions ++* shared between MUX and applications. ++*/ ++ ++/* MUX DLCI(Data Link Connection Identifier) Configuration */ ++/* ++* DLCI Service ++* 0 Control Channel ++* 1 Voice Call & Network-related ++* 2 SMS MO ++* 3 SMS MT ++* 4 Phonebook & related ++* 5 MISC ++* 6 CSD/FAX ++* 7 GPRS1 ++* 8 GPRS2 ++* 9 Logger CMD ++* 10 Logger Data ++* 11 Test CMD ++* 12 AGPS ++* 13 Net Monitor ++*/ ++ ++/* Mapping between DLCI and MUX device files */ ++/* ++* File Name Minor DLCI AT Command/Data ++* /dev/mux0 0 1 AT Command ++* /dev/mux1 1 2 AT Command ++* /dev/mux2 2 3 AT Command ++* /dev/mux3 3 4 AT Command ++* /dev/mux4 4 5 AT Command ++* /dev/mux5 5 6 AT Command ++* /dev/mux6 6 7 AT Command ++* /dev/mux7 7 8 AT Command ++* /dev/mux8 8 6 Data ++* /dev/mux9 9 7 Data ++* /dev/mux10 10 8 Data ++* /dev/mux11 11 9 Data ++* /dev/mux12 12 10 Data ++* /dev/mux13 13 11 Data ++* /dev/mux14 14 12 Data ++* /dev/mux15 15 13 Data ++*/ ++ ++#define MUX_CMD_FILE_VOICE_CALL "/dev/mux0" ++#define MUX_CMD_FILE_SMS_MO "/dev/mux1" ++#define MUX_CMD_FILE_SMS_MT "/dev/mux2" ++#define MUX_CMD_FILE_PHONEBOOK "/dev/mux3" ++#define MUX_CMD_FILE_MISC "/dev/mux4" ++#define MUX_CMD_FILE_CSD "/dev/mux5" ++#define MUX_CMD_FILE_GPRS1 "/dev/mux6" ++#define MUX_CMD_FILE_GPRS2 "/dev/mux7" ++ ++#define MUX_DATA_FILE_CSD "/dev/mux8" ++#define MUX_DATA_FILE_GPRS1 "/dev/mux9" ++#define MUX_DATA_FILE_GPRS2 "/dev/mux10" ++#define MUX_DATA_FILE_LOGGER_CMD "/dev/mux11" ++#define MUX_DATA_FILE_LOGGER_DATA "/dev/mux12" ++#define MUX_DATA_FILE_TEST_CMD "/dev/mux13" ++#define MUX_DATA_FILE_AGPS "/dev/mux14" ++#define MUX_DATA_FILE_NET_MONITOR "/dev/mux15" ++ ++#define NUM_MUX_CMD_FILES 8 ++#define NUM_MUX_DATA_FILES 8 ++#define NUM_MUX_FILES ( NUM_MUX_CMD_FILES + NUM_MUX_DATA_FILES ) ++ ++/* Special ioctl() upon a MUX device file for hanging up a call */ ++#define TS0710MUX_IO_MSC_HANGUP 0x54F0 ++ ++/* Special ioctl() upon a MUX device file for MUX loopback test */ ++#define TS0710MUX_IO_TEST_CMD 0x54F1 ++ ++/* Special Error code might be return from write() to a MUX device file */ ++#define EDISCONNECTED 900 /* Logical data link is disconnected */ ++ ++/* Special Error code might be return from open() to a MUX device file */ ++#define EREJECTED 901 /* Logical data link connection request is rejected */ +Index: linux-2.6.21/drivers/char/ts0710_mux_usb.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/char/ts0710_mux_usb.c 2007-05-06 17:10:21.000000000 -0300 +@@ -0,0 +1,868 @@ ++/* ++ * linux/drivers/usb/ipcusb.c ++ * ++ * Implementation of a ipc driver based Intel's Bulverde USB Host ++ * Controller. ++ * ++ * Copyright (C) 2003-2005 Motorola ++ * Copyright (C) 2006 Harald Welte ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * 2003-Nov-03 - (Motorola) created ++ * 2004-Feb-20 - (Motorola) Add Power Manager codes ++ * 2004-Apr-14 - (Motorola) Update Suspend/Resume codes ++ * 2004-May-10 - (Motorola) Add unlink_urbs codes and do some updates of send ++ * out urb sequence ++ * 2006-Jun-22 - (Harald Welte) port to Linux 2.6.x ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "ts0710_mux_usb.h" ++ ++/*Macro defined for this driver*/ ++#define DRIVER_VERSION "1.0alpha1" ++#define DRIVER_AUTHOR "Motorola / Harald Welte " ++#define DRIVER_DESC "USB IPC Driver (TS07.10 lowlevel)" ++#define MOTO_IPC_VID 0x22b8 ++#define MOTO_IPC_PID 0x3006 ++#define IBUF_SIZE 32 /*urb size*/ ++#define IPC_USB_XMIT_SIZE 1024 ++#define IPC_URB_SIZE 32 ++#define IPC_USB_WRITE_INIT 0 ++#define IPC_USB_WRITE_XMIT 1 ++#define IPC_USB_PROBE_READY 3 ++#define IPC_USB_PROBE_NOT_READY 4 ++#define DBG_MAX_BUF_SIZE 1024 ++#define ICL_EVENT_INTERVAL (HZ) ++#undef BVD_DEBUG ++ ++#define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) ++#define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) ++#define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) ++/*End defined macro*/ ++ ++/*global values defined*/ ++static struct usb_driver usb_ipc_driver; ++static struct timer_list ipcusb_timer; ++static struct timer_list suspend_timer; ++static struct timer_list wakeup_timer; ++static struct tty_struct ipcusb_tty; /* the coresponding tty struct, we just use flip buffer here. */ ++static struct tty_driver ipcusb_tty_driver; /* the coresponding tty driver, we just use write and chars in buff here*/ ++struct tty_driver *usb_for_mux_driver = NULL; ++struct tty_struct *usb_for_mux_tty = NULL; ++void (*usb_mux_dispatcher)(struct tty_struct *tty) = NULL; ++void (*usb_mux_sender)(void) = NULL; ++void (*ipcusb_ap_to_bp)(unsigned char*, int) = NULL; ++void (*ipcusb_bp_to_ap)(unsigned char*, int) = NULL; ++EXPORT_SYMBOL(usb_for_mux_driver); ++EXPORT_SYMBOL(usb_for_mux_tty); ++EXPORT_SYMBOL(usb_mux_dispatcher); ++EXPORT_SYMBOL(usb_mux_sender); ++EXPORT_SYMBOL(ipcusb_ap_to_bp); ++EXPORT_SYMBOL(ipcusb_bp_to_ap); ++static int sumbit_times = 0; ++static int callback_times = 0; ++//static unsigned long last_jiff = 0; ++extern int usbh_finished_resume; ++/*end global values defined*/ ++ ++MODULE_AUTHOR(DRIVER_AUTHOR); ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_LICENSE("GPL"); ++ ++#ifdef BVD_DEBUG ++#define bvd_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg) ++#else ++#define bvd_dbg(format, arg...) do {} while (0) ++#endif ++ ++/* USB device context */ ++typedef struct { ++ struct list_head list; ++ int size; ++ char *body; ++} buf_list_t; ++ ++struct ipc_usb_data { ++ u_int8_t write_finished_flag; ++ u_int8_t write_flag, ++ ipc_flag, ++ suspend_flag; ++ struct usb_device *ipc_dev; ++ struct urb readurb_mux, ++ writeurb_mux, ++ writeurb_dsplog; ++ char *obuf, *ibuf; ++ int writesize; /* max packet size for the ++ output bulk endpoint * ++ transfer buffers */ ++ ++ struct circ_buf xmit; /* write cric bufffer */ ++ struct list_head in_buf_list; ++ char bulk_in_ep_mux, ++ bulk_out_ep_mux, ++ bulk_in_ep_dsplog; ++ unsigned int ifnum; ++ ++ struct tasklet_struct bh, ++ bh_bp; ++ ++ spinlock_t lock; ++}; ++ ++struct ipc_usb_data *bvd_ipc; ++ ++#ifdef BVD_DEBUG ++static void bvd_dbg_hex(__u8 *buf, int len) ++{ ++ static unsigned char tbuf[DBG_MAX_BUF_SIZE]; ++ int i, c; ++ ++ if (len <= 0) ++ return; ++ ++ c = 0; ++ for (i=0; (i < len) && (c < (DBG_MAX_BUF_SIZE - 3)); i++) { ++ sprintf(&tbuf[c], "%02x ",buf[i]); ++ c += 3; ++ } ++ tbuf[c] = 0; ++ ++ printk("%s: %s\n", __FUNCTION__, tbuf); ++} ++#else ++#define bvd_dbg_hex(buf, len) ++#endif ++ ++static int unlink_urbs(struct urb *urb) ++{ ++ unsigned long flags; ++ int retval; ++ ++ spin_lock_irqsave(&bvd_ipc->lock, flags); ++ ++ retval = usb_unlink_urb(urb); ++ if (retval != -EINPROGRESS && retval != 0) ++ printk("unlink urb err, %d", retval); ++ ++ spin_unlock_irqrestore(&bvd_ipc->lock, flags); ++ return retval; ++} ++ ++static void append_to_inbuf_list(struct urb *urb) ++{ ++ buf_list_t *inbuf; ++ int count = urb->actual_length; ++ ++ inbuf = kmalloc(sizeof(buf_list_t), GFP_KERNEL); ++ if (!inbuf) { ++ printk("append_to_inbuf_list: (%d) out of memory!\n", ++ sizeof(buf_list_t)); ++ return; ++ } ++ ++ inbuf->size = count; ++ inbuf->body = kmalloc(sizeof(char)*count, GFP_KERNEL); ++ if (!inbuf->body) { ++ kfree(inbuf); ++ printk("append_to_inbuf_list: (%d) out of memory!\n", ++ sizeof(char)*count); ++ return; ++ } ++ memcpy(inbuf->body, (unsigned char*)urb->transfer_buffer, count); ++ list_add_tail(&inbuf->list, &bvd_ipc->in_buf_list); ++} ++ ++static void ipcusb_timeout(unsigned long data) ++{ ++ struct tty_struct *tty = &ipcusb_tty; ++ struct urb *urb = (struct urb *)data; ++ ++ bvd_dbg("ipcusb_timeout***"); ++ ++ while (!(list_empty(&bvd_ipc->in_buf_list))) { ++ int count; ++ buf_list_t *inbuf; ++ struct list_head *ptr = NULL; ++ ++ ptr = bvd_ipc->in_buf_list.next; ++ inbuf = list_entry (ptr, buf_list_t, list); ++ count = inbuf->size; ++ if (tty_insert_flip_string(tty, inbuf->body, count) >= count) { ++ list_del(ptr); ++ kfree(inbuf->body); ++ inbuf->body = NULL; ++ kfree(inbuf); ++ } else { ++ bvd_dbg("ipcusb_timeout: bvd_ipc->in_buf_list empty!"); ++ break; ++ } ++ } ++ ++ if (usb_mux_dispatcher) ++ usb_mux_dispatcher(tty); /**call Liu changhui's func.**/ ++ ++ if (list_empty(&bvd_ipc->in_buf_list)) { ++ urb->actual_length = 0; ++ urb->dev = bvd_ipc->ipc_dev; ++ if (usb_submit_urb(urb, GFP_ATOMIC)) ++ bvd_dbg("ipcusb_timeout: failed resubmitting read urb"); ++ bvd_dbg("ipcusb_timeout: resubmited read urb"); ++ } else { ++ ipcusb_timer.data = (unsigned long)urb; ++ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); ++ } ++} ++ ++static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) ++{ ++ buf_list_t *inbuf; ++ int count = urb->actual_length; ++ struct tty_struct *tty = &ipcusb_tty; ++ ++ bvd_dbg("usb_ipc_read_bulk: begining!"); ++ if (urb->status) ++ printk("nonzero read bulk status received: %d\n", urb->status); ++ ++ bvd_dbg("usb_ipc_read_bulk: urb->actual_length=%d", urb->actual_length); ++ bvd_dbg("usb_ipc_read_bulk: urb->transfer_buffer:"); ++ ++ bvd_dbg_hex((unsigned char*)urb->transfer_buffer, urb->actual_length); ++ ++ if (count > 0 && ((*ipcusb_bp_to_ap) != NULL)) ++ (*ipcusb_bp_to_ap)(urb->transfer_buffer, urb->actual_length); ++ ++ if (!(list_empty(&bvd_ipc->in_buf_list))) { ++ int need_mux = 0; ++ ++ bvd_dbg("usb_ipc_read_bulk: some urbs in_buf_list"); ++ if (count > 0) { ++ bvd_ipc->suspend_flag = 1; ++ append_to_inbuf_list(urb); /* append the current received urb */ ++#if 0 ++ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) ++ { ++ last_jiff = jiffies; ++ queue_apm_event(KRNL_ICL, NULL); ++ } ++#endif ++ } ++ ++ while (!(list_empty(&bvd_ipc->in_buf_list))) { ++ struct list_head* ptr = NULL; ++ ptr = bvd_ipc->in_buf_list.next; ++ inbuf = list_entry(ptr, buf_list_t, list); ++ count = inbuf->size; ++ need_mux = 1; ++ ++ tty_insert_flip_string(tty, inbuf->body, count); ++ ++ list_del(ptr); ++ kfree(inbuf->body); ++ inbuf->body = NULL; ++ kfree(inbuf); ++ } ++ ++ if (usb_mux_dispatcher && need_mux) ++ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ ++ ++ if (list_empty(&bvd_ipc->in_buf_list)) { ++ urb->actual_length = 0; ++ urb->dev = bvd_ipc->ipc_dev; ++ if (usb_submit_urb(urb, GFP_ATOMIC)) ++ bvd_dbg("usb_ipc_read_bulk: " ++ "failed resubmitting read urb"); ++ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); ++ } else { ++ ipcusb_timer.data = (unsigned long)urb; ++ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); ++ } ++ } else if (count > 0) { ++ bvd_dbg("usb_ipc_read_bulk: no urbs in_buf_list"); ++ bvd_ipc->suspend_flag = 1; ++ ++ if (tty_insert_flip_string(tty, urb->transfer_buffer, ++ count) < count) { ++ bvd_ipc->suspend_flag = 1; ++ append_to_inbuf_list(urb); ++ ipcusb_timer.data = (unsigned long)urb; ++ mod_timer(&ipcusb_timer, jiffies+(10*HZ/1000)); ++#if 0 ++ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) ++ { ++ last_jiff = jiffies; ++ queue_apm_event(KRNL_ICL, NULL); ++ } ++#endif ++ } ++ ++ if (usb_mux_dispatcher) ++ usb_mux_dispatcher(tty); /* call Liu changhui's func. */ ++ ++ urb->actual_length = 0; ++ urb->dev = bvd_ipc->ipc_dev; ++ if (usb_submit_urb(urb, GFP_ATOMIC)) ++ bvd_dbg("failed resubmitting read urb"); ++#if 0 ++ if(jiffies - last_jiff > ICL_EVENT_INTERVAL) ++ { ++ last_jiff = jiffies; ++ queue_apm_event(KRNL_ICL, NULL); ++ } ++#endif ++ bvd_dbg("usb_ipc_read_bulk: resubmited read urb"); ++ } ++ ++ bvd_dbg("usb_ipc_read_bulk: completed!!!"); ++} ++ ++static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) ++{ ++ callback_times++; ++ bvd_ipc->write_finished_flag = 1; ++ ++ bvd_dbg("usb_ipc_write_bulk: begining!"); ++ //printk("%s: write_finished_flag=%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); ++ ++ if (urb->status) ++ printk("nonzero write bulk status received: %d\n", urb->status); ++ ++ if (usb_mux_sender) ++ usb_mux_sender(); /**call Liu changhui's func**/ ++ ++ //printk("usb_ipc_write_bulk: mark ipcusb_softint!\n"); ++ tasklet_schedule(&bvd_ipc->bh); ++ ++ bvd_dbg("usb_ipc_write_bulk: finished!"); ++} ++ ++static void wakeup_timeout(unsigned long data) ++{ ++ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); ++ bvd_dbg("wakup_timeout: send GPIO_MCU_INT_SW signal!"); ++} ++ ++static void suspend_timeout(unsigned long data) ++{ ++ if (bvd_ipc->suspend_flag == 1) { ++ bvd_ipc->suspend_flag = 0; ++ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); ++ bvd_dbg("suspend_timeout: add the suspend timer again"); ++ } else { ++ unlink_urbs(&bvd_ipc->readurb_mux); ++ UHCRHPS3 = 0x4; ++ mdelay(40); ++ bvd_dbg("suspend_timeout: send SUSPEND signal! UHCRHPS3=0x%x", ++ UHCRHPS3); ++ } ++} ++ ++static void ipcusb_xmit_data(void) ++{ ++ int c, count = IPC_URB_SIZE; ++ int result = 0; ++ int buf_flag = 0; ++ int buf_num = 0; ++ ++ //printk("%s: sumbit_times=%d, callback_times=%d\n", __FUNCTION__, sumbit_times, callback_times); ++ if (bvd_ipc->write_finished_flag == 0) ++ return; ++ ++ while (1) { ++ c = CIRC_CNT_TO_END(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, ++ IPC_USB_XMIT_SIZE); ++ if (count < c) ++ c = count; ++ if (c <= 0) ++ break; ++ ++ memcpy(bvd_ipc->obuf+buf_num, ++ bvd_ipc->xmit.buf + bvd_ipc->xmit.tail, c); ++ buf_flag = 1; ++ bvd_ipc->xmit.tail = ((bvd_ipc->xmit.tail + c) ++ & (IPC_USB_XMIT_SIZE-1)); ++ count -= c; ++ buf_num += c; ++ } ++ ++ if (buf_num == 0) { ++ bvd_dbg("ipcusb_xmit_data: buf_num=%d, add suspend_timer", ++ buf_num); ++ bvd_ipc->suspend_flag = 0; ++ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); ++ } ++ ++ bvd_dbg("ipcusb_xmit_data: buf_num=%d", buf_num); ++ bvd_dbg("ipcusb_xmit_data: bvd_ipc->obuf: "); ++ ++ bvd_dbg_hex((bvd_ipc->obuf)-buf_num, buf_num); ++ ++ if (buf_flag) { ++ bvd_ipc->writeurb_mux.transfer_buffer_length = buf_num; ++ bvd_dbg("ipcusb_xmit_data: copy data to write urb finished! "); ++ ++ if ((UHCRHPS3 & 0x4) == 0x4) { ++ static int ret; ++ int time = 0; ++ ++ /* if BP sleep, wake up BP first */ ++ pxa_gpio_mode(GPIO_IN | 41); ++ if (GPIO_is_high(41)) { ++ if (GPIO_is_high(GPIO_MCU_INT_SW)) ++ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); ++ else ++ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); ++ ++ time = jiffies; ++ while (GPIO_is_high(41) && (jiffies < (time+HZ))); ++ ++ if (GPIO_is_high(41)) { ++ printk("%s: Wakeup BP timeout! BP state is %d\n", ++ __FUNCTION__, GPIO_is_high(41)); ++ } ++ if (GPIO_is_high(GPIO_MCU_INT_SW)) ++ GPCR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); ++ else ++ GPSR(GPIO_MCU_INT_SW) = GPIO_bit(GPIO_MCU_INT_SW); ++ } ++ ++ /* Resume BP */ ++ UHCRHPS3 = 0x8; ++ mdelay(40); ++ bvd_dbg("ipcusb_xmit_data: Send RESUME signal! UHCRHPS3=0x%x", ++ UHCRHPS3); ++ /*send IN token*/ ++ bvd_ipc->readurb_mux.actual_length = 0; ++ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; ++ if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) ++ printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" ++ "failed! status=%d\n", ret); ++ bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); ++ } ++ ++ sumbit_times++; ++ bvd_ipc->write_finished_flag = 0; ++ //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); ++ bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; ++ if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) ++ warn("ipcusb_xmit_data: funky result! result=%d\n", result); ++ ++ bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); ++ ++ } ++} ++ ++static void usbipc_bh_func(unsigned long param) ++{ ++ ipcusb_xmit_data(); ++} ++ ++extern void get_halted_bit(void); ++ ++static void usbipc_bh_bp_func(unsigned long param) ++{ ++ if ((UHCRHPS3 & 0x4) == 0x4) { ++ UHCRHPS3 = 0x8; ++ mdelay(40); ++ bvd_dbg("ipcusb_softint_send_readurb: Send RESUME signal! " ++ "UHCRHPS3=0x%x", UHCRHPS3); ++ } ++ if (bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) { ++ get_halted_bit(); ++ ++ /*send a IN token*/ ++ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; ++ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) { ++ bvd_dbg("ipcusb_softint_send_readurb: " ++ "usb_submit_urb(read mux bulk) failed!"); ++ } ++ bvd_dbg("ipcusb_softint_send_readurb: Send a IN token successfully!"); ++ bvd_ipc->suspend_flag = 0; ++ bvd_dbg("ipcusb_softint_send_readurb: add suspend_timer"); ++ mod_timer(&suspend_timer, jiffies+(5000*HZ/1000)); ++ } ++} ++ ++static int usb_ipc_write(struct tty_struct *tty, ++ const unsigned char *buf, int count) ++{ ++ int c, ret = 0; ++ ++ bvd_dbg("usb_ipc_write: count=%d, buf: ", count); ++ bvd_dbg_hex(buf, count); ++ ++ if (count <= 0) ++ return 0; ++ ++ if (*ipcusb_ap_to_bp != NULL) ++ (*ipcusb_ap_to_bp)(buf, count); ++ ++ bvd_ipc->suspend_flag = 1; ++ ++ if ((bvd_ipc->ipc_flag == IPC_USB_PROBE_READY) && ++ (bvd_ipc->xmit.head == bvd_ipc->xmit.tail)) { ++ bvd_dbg("usb_ipc_write: set write_flag"); ++ bvd_ipc->write_flag = IPC_USB_WRITE_XMIT; ++ } ++ ++ while (1) { ++ c = CIRC_SPACE_TO_END(bvd_ipc->xmit.head, ++ bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); ++ if (count < c) ++ c = count; ++ if (c <= 0) ++ break; ++ ++ memcpy(bvd_ipc->xmit.buf + bvd_ipc->xmit.head, buf, c); ++ bvd_ipc->xmit.head = ((bvd_ipc->xmit.head + c) ++ & (IPC_USB_XMIT_SIZE-1)); ++ buf += c; ++ count -= c; ++ ret += c; ++ } ++ bvd_dbg("usb_ipc_write: ret=%d, bvd_ipc->xmit.buf: ", ret); ++ ++ bvd_dbg_hex(bvd_ipc->xmit.buf, ret); ++ ++ if (bvd_ipc->write_flag == IPC_USB_WRITE_XMIT) { ++ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; ++ bvd_dbg("usb_ipc_write: mark ipcusb_softint"); ++ tasklet_schedule(&bvd_ipc->bh); ++ } ++ ++ bvd_dbg("usb_ipc_write: ret=%d\n", ret); ++ return ret; ++} ++ ++static int usb_ipc_chars_in_buffer(struct tty_struct *tty) ++{ ++ return CIRC_CNT(bvd_ipc->xmit.head, bvd_ipc->xmit.tail, IPC_USB_XMIT_SIZE); ++} ++ ++void usb_send_readurb(void) ++{ ++ //printk("usb_send_readurb: begining!UHCRHPS3=0x%x, usbh_finished_resume=%d\n", UHCRHPS3, usbh_finished_resume); ++ ++ if (usbh_finished_resume == 0) ++ return; ++ ++ tasklet_schedule(&bvd_ipc->bh_bp); ++} ++ ++static int usb_ipc_probe(struct usb_interface *intf, ++ const struct usb_device_id *id) ++{ ++ struct usb_device *usbdev = interface_to_usbdev(intf); ++ struct usb_config_descriptor *ipccfg; ++ struct usb_interface_descriptor *interface; ++ struct usb_endpoint_descriptor *endpoint; ++ int ep_cnt, readsize, writesize; ++ char have_bulk_in_mux, have_bulk_out_mux; ++ ++ bvd_dbg("usb_ipc_probe: vendor id 0x%x, device id 0x%x", ++ usbdev->descriptor.idVendor, usbdev->descriptor.idProduct); ++ ++ if ((usbdev->descriptor.idVendor != MOTO_IPC_VID) || ++ (usbdev->descriptor.idProduct != MOTO_IPC_PID)) ++ return -ENODEV; ++ ++ /* a2590c : dsplog interface is not supported by this driver */ ++ if (intf->minor == 2) /* dsplog interface number is 2 */ ++ return -1; ++ ++ bvd_dbg("usb_ipc_probe: USB dev address:%p", usbdev); ++ bvd_dbg("usb_ipc_probe: ifnum:%u", intf->minor); ++ ++ ipccfg = &usbdev->actconfig->desc; ++ bvd_dbg("usb_ipc_prob: config%d", ipccfg->bConfigurationValue); ++ bvd_dbg("usb_ipc_prob: bNumInterfaces = %d", ipccfg->bNumInterfaces); ++ ++ /* After this point we can be a little noisy about what we are trying ++ * to configure, hehe. */ ++ if (usbdev->descriptor.bNumConfigurations != 1) { ++ info("usb_ipc_probe: Only one device configuration " ++ "is supported."); ++ return -1; ++ } ++ ++ if (usbdev->config[0].desc.bNumInterfaces != 3) { ++ info("usb_ipc_probe: Only three device interfaces are " ++ "supported."); ++ return -1; ++ } ++ ++ interface = &intf->cur_altsetting->desc; ++ endpoint = &intf->cur_altsetting->endpoint[0].desc; ++ /* Start checking for two bulk endpoints or ... FIXME: This is a future ++ * enhancement...*/ ++ bvd_dbg("usb_ipc_probe: Number of Endpoints:%d", ++ (int) interface->bNumEndpoints); ++ if (interface->bNumEndpoints != 2) { ++ info("usb_ipc_probe: Only two endpoints supported."); ++ return -1; ++ } ++ ++ ep_cnt = have_bulk_in_mux = have_bulk_out_mux = 0; ++ ++ bvd_dbg("usb_ipc_probe: endpoint[0] is:%x", ++ (&endpoint[0])->bEndpointAddress); ++ bvd_dbg("usb_ipc_probe: endpoint[1] is:%x ", ++ (&endpoint[1])->bEndpointAddress); ++ ++ while (ep_cnt < interface->bNumEndpoints) { ++ ++ if (!have_bulk_in_mux && IS_EP_BULK_IN(endpoint[ep_cnt])) { ++ bvd_dbg("usb_ipc_probe: bEndpointAddress(IN) is:%x ", ++ (&endpoint[ep_cnt])->bEndpointAddress); ++ have_bulk_in_mux = ++ (&endpoint[ep_cnt])->bEndpointAddress; ++ readsize = (&endpoint[ep_cnt])->wMaxPacketSize; ++ bvd_dbg("usb_ipc_probe: readsize=%d", readsize); ++ ep_cnt++; ++ continue; ++ } ++ ++ if (!have_bulk_out_mux && IS_EP_BULK_OUT(endpoint[ep_cnt])) { ++ bvd_dbg("usb_ipc_probe: bEndpointAddress(OUT) is:%x ", ++ (&endpoint[ep_cnt])->bEndpointAddress); ++ have_bulk_out_mux = ++ (&endpoint[ep_cnt])->bEndpointAddress; ++ writesize = (&endpoint[ep_cnt])->wMaxPacketSize; ++ bvd_dbg("usb_ipc_probe: writesize=%d", writesize); ++ ep_cnt++; ++ continue; ++ } ++ ++ info("usb_ipc_probe: Undetected endpoint ^_^ "); ++ /* Shouldn't ever get here unless we have something weird */ ++ return -1; ++ } ++ ++ /* Perform a quick check to make sure that everything worked as it ++ * should have. */ ++ ++ switch (interface->bNumEndpoints) { ++ case 2: ++ if (!have_bulk_in_mux || !have_bulk_out_mux) { ++ info("usb_ipc_probe: Two bulk endpoints required."); ++ return -1; ++ } ++ break; ++ default: ++ info("usb_ipc_probe: Endpoint determination failed ^_^ "); ++ return -1; ++ } ++ ++ /* Ok, now initialize all the relevant values */ ++ if (!(bvd_ipc->obuf = (char *)kmalloc(writesize, GFP_KERNEL))) { ++ err("usb_ipc_probe: Not enough memory for the output buffer."); ++ kfree(bvd_ipc); ++ return -1; ++ } ++ bvd_dbg("usb_ipc_probe: obuf address:%p", bvd_ipc->obuf); ++ ++ if (!(bvd_ipc->ibuf = (char *)kmalloc(readsize, GFP_KERNEL))) { ++ err("usb_ipc_probe: Not enough memory for the input buffer."); ++ kfree(bvd_ipc->obuf); ++ kfree(bvd_ipc); ++ return -1; ++ } ++ bvd_dbg("usb_ipc_probe: ibuf address:%p", bvd_ipc->ibuf); ++ ++ bvd_ipc->ipc_flag = IPC_USB_PROBE_READY; ++ bvd_ipc->write_finished_flag = 1; ++ bvd_ipc->suspend_flag = 1; ++ bvd_ipc->bulk_in_ep_mux= have_bulk_in_mux; ++ bvd_ipc->bulk_out_ep_mux= have_bulk_out_mux; ++ bvd_ipc->ipc_dev = usbdev; ++ bvd_ipc->writesize = writesize; ++ INIT_LIST_HEAD (&bvd_ipc->in_buf_list); ++ ++ bvd_ipc->bh.func = usbipc_bh_func; ++ bvd_ipc->bh.data = (unsigned long) bvd_ipc; ++ ++ bvd_ipc->bh_bp.func = usbipc_bh_bp_func; ++ bvd_ipc->bh_bp.data = (unsigned long) bvd_ipc; ++ ++ /*Build a write urb*/ ++ usb_fill_bulk_urb(&bvd_ipc->writeurb_mux, usbdev, ++ usb_sndbulkpipe(bvd_ipc->ipc_dev, ++ bvd_ipc->bulk_out_ep_mux), ++ bvd_ipc->obuf, writesize, usb_ipc_write_bulk, ++ bvd_ipc); ++ //bvd_ipc->writeurb_mux.transfer_flags |= USB_ASYNC_UNLINK; ++ ++ /*Build a read urb and send a IN token first time*/ ++ usb_fill_bulk_urb(&bvd_ipc->readurb_mux, usbdev, ++ usb_rcvbulkpipe(usbdev, bvd_ipc->bulk_in_ep_mux), ++ bvd_ipc->ibuf, readsize, usb_ipc_read_bulk, bvd_ipc); ++ //bvd_ipc->readurb_mux.transfer_flags |= USB_ASYNC_UNLINK; ++ ++ usb_driver_claim_interface(&usb_ipc_driver, intf, bvd_ipc); ++ //usb_driver_claim_interface(&usb_ipc_driver, &ipccfg->interface[1], bvd_ipc); ++ ++ // a2590c: dsplog is not supported by this driver ++ // usb_driver_claim_interface(&usb_ipc_driver, ++ // &ipccfg->interface[2], bvd_ipc); ++ /*send a IN token first time*/ ++ bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; ++ if (usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) ++ printk("usb_ipc_prob: usb_submit_urb(read mux bulk) failed!\n"); ++ ++ bvd_dbg("usb_ipc_prob: Send a IN token successfully!"); ++ ++ if (bvd_ipc->xmit.head != bvd_ipc->xmit.tail) { ++ printk("usb_ipc_probe: mark ipcusb_softint!\n"); ++ tasklet_schedule(&bvd_ipc->bh); ++ } ++ ++ printk("usb_ipc_probe: completed probe!"); ++ usb_set_intfdata(intf, &bvd_ipc); ++ return 0; ++} ++ ++static void usb_ipc_disconnect(struct usb_interface *intf) ++{ ++ //struct usb_device *usbdev = interface_to_usbdev(intf); ++ struct ipc_usb_data *bvd_ipc_disconnect = usb_get_intfdata(intf); ++ ++ printk("usb_ipc_disconnect:*** \n"); ++ ++ if ((UHCRHPS3 & 0x4) == 0) ++ usb_unlink_urb(&bvd_ipc_disconnect->readurb_mux); ++ ++ usb_unlink_urb(&bvd_ipc_disconnect->writeurb_mux); ++ ++ bvd_ipc_disconnect->ipc_flag = IPC_USB_PROBE_NOT_READY; ++ kfree(bvd_ipc_disconnect->ibuf); ++ kfree(bvd_ipc_disconnect->obuf); ++ ++ usb_driver_release_interface(&usb_ipc_driver, ++ bvd_ipc_disconnect->ipc_dev->actconfig->interface[0]); ++ usb_driver_release_interface(&usb_ipc_driver, ++ bvd_ipc_disconnect->ipc_dev->actconfig->interface[1]); ++ ++ //a2590c: dsplog interface is not supported by this driver ++ //usb_driver_release_interface(&usb_ipc_driver, &bvd_ipc_disconnect->ipc_dev->actconfig->interface[2]); ++ ++ bvd_ipc_disconnect->ipc_dev = NULL; ++ ++ usb_set_intfdata(intf, NULL); ++ ++ printk("usb_ipc_disconnect completed!\n"); ++} ++ ++static struct usb_device_id usb_ipc_id_table[] = { ++ { USB_DEVICE(MOTO_IPC_VID, MOTO_IPC_PID) }, ++ { } /* Terminating entry */ ++}; ++ ++static struct usb_driver usb_ipc_driver = { ++ .name = "usb ipc", ++ .probe = usb_ipc_probe, ++ .disconnect = usb_ipc_disconnect, ++ .id_table = usb_ipc_id_table, ++}; ++ ++static int __init usb_ipc_init(void) ++{ ++ int result; ++ ++ bvd_dbg("init usb_ipc"); ++ /* register driver at the USB subsystem */ ++ result = usb_register(&usb_ipc_driver); ++ if (result < 0) { ++ err ("usb ipc driver could not be registered"); ++ return result; ++ } ++ ++ /*init the related mux interface*/ ++ if (!(bvd_ipc = kzalloc(sizeof(struct ipc_usb_data), GFP_KERNEL))) { ++ err("usb_ipc_init: Out of memory."); ++ usb_deregister(&usb_ipc_driver); ++ return -ENOMEM; ++ } ++ bvd_dbg("usb_ipc_init: Address of bvd_ipc:%p", bvd_ipc); ++ ++ if (!(bvd_ipc->xmit.buf = kmalloc(IPC_USB_XMIT_SIZE, GFP_KERNEL))) { ++ err("usb_ipc_init: Not enough memory for the input buffer."); ++ kfree(bvd_ipc); ++ usb_deregister(&usb_ipc_driver); ++ return -ENOMEM; ++ } ++ bvd_dbg("usb_ipc_init: bvd_ipc->xmit.buf address:%p", ++ bvd_ipc->xmit.buf); ++ bvd_ipc->ipc_dev = NULL; ++ bvd_ipc->xmit.head = bvd_ipc->xmit.tail = 0; ++ bvd_ipc->write_flag = IPC_USB_WRITE_INIT; ++ ++ ipcusb_tty_driver.write = usb_ipc_write; ++ ipcusb_tty_driver.chars_in_buffer = usb_ipc_chars_in_buffer; ++ ++ usb_for_mux_driver = &ipcusb_tty_driver; ++ usb_for_mux_tty = &ipcusb_tty; ++ ++ /* init timers for ipcusb read process and usb suspend */ ++ init_timer(&ipcusb_timer); ++ ipcusb_timer.function = ipcusb_timeout; ++ ++ init_timer(&suspend_timer); ++ suspend_timer.function = suspend_timeout; ++ ++ init_timer(&wakeup_timer); ++ wakeup_timer.function = wakeup_timeout; ++ ++ info("USB Host(Bulverde) IPC driver registered."); ++ info(DRIVER_VERSION ":" DRIVER_DESC); ++ ++ return 0; ++} ++ ++static void __exit usb_ipc_exit(void) ++{ ++ bvd_dbg("cleanup bvd_ipc"); ++ ++ kfree(bvd_ipc->xmit.buf); ++ kfree(bvd_ipc); ++ usb_deregister(&usb_ipc_driver); ++ ++ info("USB Host(Bulverde) IPC driver deregistered."); ++} ++ ++module_init(usb_ipc_init); ++module_exit(usb_ipc_exit); ++EXPORT_SYMBOL(usb_send_readurb); +Index: linux-2.6.21/drivers/char/ts0710_mux_usb.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/char/ts0710_mux_usb.h 2007-05-06 17:10:21.000000000 -0300 +@@ -0,0 +1,29 @@ ++/* ++ * linux/drivers/usb/ipcusb.h ++ * ++ * Implementation of a ipc driver based Intel's Bulverde USB Host ++ * Controller. ++ * ++ * Copyright (C) 2003-2005 Motorola ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * 2003-Nov-18 - (Motorola) created ++ * ++ */ ++extern struct tty_driver *usb_for_mux_driver; ++extern struct tty_struct *usb_for_mux_tty; ++extern void (*usb_mux_dispatcher)(struct tty_struct *tty); ++extern void (*usb_mux_sender)(void); diff --git a/packages/linux/linux-ezx-2.6.21/patches/mux_debug.patch b/packages/linux/linux-ezx-2.6.21/patches/mux_debug.patch new file mode 100755 index 0000000000..58cb25a0b6 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/mux_debug.patch @@ -0,0 +1,551 @@ +Index: linux-2.6.20.7/drivers/char/ts0710_mux.c +=================================================================== +--- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-22 12:24:18.000000000 +0200 ++++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-22 12:26:47.000000000 +0200 +@@ -85,6 +85,9 @@ + #include "ts0710.h" + #include "ts0710_mux.h" + ++#define TS0710DEBUG ++#define PRINT_OUTPUT_PRINTK ++ + #define TS0710MUX_GPRS_SESSION_MAX 2 + #define TS0710MUX_MAJOR 250 + #define TS0710MUX_MINOR_START 0 +@@ -316,7 +319,7 @@ + #ifdef TS0710DEBUG + + #ifdef PRINT_OUTPUT_PRINTK +-#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX " __FUNCTION__ ": " fmt "\n" , ## arg) ++#define TS0710_DEBUG(fmt, arg...) printk(KERN_INFO "MUX %s: " fmt "\n" , __func__, ## arg) + #else + #include "ezxlog.h" + static __u8 strDebug[256]; +@@ -530,10 +533,10 @@ + if (strncmp(p->comm, "aplogd", 6) == 0) { + sig = 1; + if (send_sig(SIGUSR2, p, 1) == 0) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX: success to send SIGUSR2 to aplogd!\n"); + } else { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX: failure to send SIGUSR2 to aplogd!\n"); + } + break; +@@ -542,7 +545,7 @@ + read_unlock(&tasklist_lock); + + if (!sig) { +- TS0710_PRINTK("MUX: not found aplogd!\n"); ++ TS0710_DEBUG("MUX: not found aplogd!\n"); + } + } + #else +@@ -559,11 +562,11 @@ + buf[len + 1] = TS0710_BASIC_FLAG; + + if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX basic_write: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n"); + + #ifndef USB_FOR_MUX +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX basic_write: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n"); + TS0710_SIG2APLOGD(); + #endif +@@ -577,7 +580,7 @@ + res = COMM_FOR_MUX_DRIVER->write(COMM_FOR_MUX_TTY, buf, len + 2); + + if (res != len + 2) { +- TS0710_PRINTK("MUX basic_write: Write Error!\n"); ++ TS0710_DEBUG("MUX basic_write: Write Error!\n"); + return -1; + } + +@@ -601,7 +604,7 @@ + TS0710_DEBUG("crc_check: CRC check OK\n"); + return 0; + } else { +- TS0710_PRINTK("MUX crc_check: CRC check failed\n"); ++ TS0710_DEBUG("MUX crc_check: CRC check failed\n"); + return 1; + } + } +@@ -1266,7 +1269,7 @@ + break; + + case FCON: /*Flow control on command */ +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Received Flow control(all channels) on command\n"); + if (mcc_short_pkt->h.type.cr == MCC_CMD) { + ts0710->dlci[0].state = CONNECTED; +@@ -1276,7 +1279,7 @@ + break; + + case FCOFF: /*Flow control off command */ +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Received Flow control(all channels) off command\n"); + if (mcc_short_pkt->h.type.cr == MCC_CMD) { + for (j = 0; j < TS0710_MAX_CHN; j++) { +@@ -1823,7 +1826,7 @@ + TS0710_DEBUG("UIH on channel %d\n", dlci); + + if (uih_len > ts0710->dlci[dlci].mtu) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: DLCI:%d, uih_len:%d is bigger than mtu:%d, discard data!\n", + dlci, uih_len, ts0710->dlci[dlci].mtu); + break; +@@ -1844,7 +1847,7 @@ + dlci, tty_idx); + TS0710_DEBUGSTR(uih_data_start, uih_len); + if (!(iscmdtty[tty_idx])) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: %s: Wrong CMDTAG on DLCI:%d, /dev/mux%d\n", + __FUNCTION__, dlci, tty_idx); + } +@@ -1856,7 +1859,7 @@ + ("NON-CMDTAG on DLCI:%d, /dev/mux%d\n", + dlci, tty_idx); + if (iscmdtty[tty_idx]) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: %s: Wrong NON-CMDTAG on DLCI:%d, /dev/mux%d\n", + __FUNCTION__, dlci, tty_idx); + } +@@ -1864,13 +1867,14 @@ + } + tty = mux_table[tty_idx]; + if ((!mux_tty[tty_idx]) || (!tty)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX: No application waiting for, discard it! /dev/mux%d\n", + tty_idx); ++ TS0710_DEBUG("MUX: mux_tty[%d] = %d, tty is at %i", tty_idx, mux_tty[tty_idx], tty); + } else { /* Begin processing received data */ + if ((!mux_recv_info_flags[tty_idx]) + || (!mux_recv_info[tty_idx])) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: No mux_recv_info, discard it! /dev/mux%d\n", + tty_idx); + break; +@@ -1878,7 +1882,7 @@ + + recv_info = mux_recv_info[tty_idx]; + if (recv_info->total > 8192) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX : discard data for tty_idx:%d, recv_info->total > 8192 \n", + tty_idx); + break; +@@ -1949,7 +1953,7 @@ + get_mux_recv_packet + (uih_len); + if (!recv_packet) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX %s: no memory\n", + __FUNCTION__); + break; +@@ -1980,7 +1984,7 @@ + } else { /* recv_info->total == 0 */ + if (uih_len > + TS0710MUX_RECV_BUF_SIZE) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: tty_idx:%d, uih_len == %d is too big\n", + tty_idx, uih_len); + uih_len = +@@ -2120,12 +2124,12 @@ + if (ts0710->dlci[dlci].state == DISCONNECTED) { + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI %d Send DISC got signal!\n", + dlci); + break; + } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI %d Send DISC timeout!\n", dlci); + continue; + } +@@ -2158,7 +2162,7 @@ + return 0; + } else if (ts0710->dlci[0].state == CONNECTING) { + /* Reentry */ +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI: 0, reentry to open DLCI 0, pid: %d, %s !\n", + current->pid, current->comm); + try = 11; +@@ -2179,13 +2183,13 @@ + DISCONNECTED) { + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Wait for connecting got signal!\n", + dlci); + retval = -EAGAIN; + break; + } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Wait for connecting timeout!\n", + dlci); + continue; +@@ -2199,7 +2203,7 @@ + } + } else if ((ts0710->dlci[0].state != DISCONNECTED) + && (ts0710->dlci[0].state != REJECTED)) { +- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); ++ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); + return retval; + } else { + ts0710->initiator = 1; +@@ -2218,19 +2222,19 @@ + retval = 0; + break; + } else if (ts0710->dlci[0].state == REJECTED) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM got rejected!\n", + dlci); + retval = -EREJECTED; + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM got signal!\n", + dlci); + retval = -EAGAIN; + break; + } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM timeout!\n", + dlci); + continue; +@@ -2271,13 +2275,13 @@ + DISCONNECTED) { + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Wait for connecting got signal!\n", + dlci); + retval = -EAGAIN; + break; + } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Wait for connecting timeout!\n", + dlci); + continue; +@@ -2296,7 +2300,7 @@ + } + } else if ((ts0710->dlci[dlci].state != DISCONNECTED) + && (ts0710->dlci[dlci].state != REJECTED)) { +- TS0710_PRINTK("MUX DLCI:%d state is invalid!\n", dlci); ++ TS0710_DEBUG("MUX DLCI:%d state is invalid!\n", dlci); + return retval; + } else { + ts0710->dlci[dlci].state = NEGOTIATING; +@@ -2313,13 +2317,13 @@ + if (ts0710->dlci[dlci].state == CONNECTING) { + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send pn_msg got signal!\n", + dlci); + retval = -EAGAIN; + break; + } else if ((jiffies - t) >= TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send pn_msg timeout!\n", + dlci); + continue; +@@ -2344,20 +2348,20 @@ + break; + } else if (ts0710->dlci[dlci].state == + REJECTED) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM got rejected!\n", + dlci); + retval = -EREJECTED; + break; + } else if (signal_pending(current)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM got signal!\n", + dlci); + retval = -EAGAIN; + break; + } else if ((jiffies - t) >= + TS0710MUX_TIME_OUT) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX DLCI:%d Send SABM timeout!\n", + dlci); + continue; +@@ -2468,7 +2472,7 @@ + schedule_work(&send_tqueue); + #else + if (!tq_serial_for_mux) { +- TS0710_PRINTK("MUX Error: %s: tq_serial_for_mux == 0\n", ++ TS0710_DEBUG("MUX Error: %s: tq_serial_for_mux == 0\n", + __FUNCTION__); + return; + } +@@ -2508,7 +2512,7 @@ + if ((mux_tty[cmdtty] == 0) && (mux_tty[datatty] == 0)) { + if (dlci == 1) { + ts0710_close_channel(0); +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX mux_close: tapisrv might be down!!! Close DLCI 1\n"); + TS0710_SIG2APLOGD(); + } +@@ -2673,12 +2677,12 @@ + UNUSED_PARAM(tty); + + if ((COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", + __FUNCTION__); + + #ifndef USB_FOR_MUX +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", + __FUNCTION__); + TS0710_SIG2APLOGD(); +@@ -2724,14 +2728,14 @@ + } else if (ts0710->dlci[dlci].state == CONNECTED) { + + if (!(mux_send_info_flags[line])) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: mux_write: mux_send_info_flags[%d] == 0\n", + line); + return -ENODEV; + } + send_info = mux_send_info[line]; + if (!send_info) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: mux_write: mux_send_info[%d] == 0\n", + line); + return -ENODEV; +@@ -2800,7 +2804,7 @@ + } + return c; + } else { +- TS0710_PRINTK("MUX mux_write: DLCI %d not connected\n", dlci); ++ TS0710_DEBUG("MUX mux_write: DLCI %d not connected\n", dlci); + return -EDISCONNECTED; + } + } +@@ -2940,7 +2944,7 @@ + return; + } + +- TS0710_PRINTK("MUX %s: line is:%d\n", __FUNCTION__, line); ++ TS0710_DEBUG("MUX %s: line is:%d\n", __FUNCTION__, line); + + if ((mux_send_info_flags[line]) + && (mux_send_info[line]) +@@ -2960,10 +2964,10 @@ + + /* + if( (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0) ) { +- TS0710_PRINTK("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); ++ TS0710_DEBUG("MUX %s: (COMM_FOR_MUX_DRIVER == 0) || (COMM_FOR_MUX_TTY == 0)\n", __FUNCTION__); + + #ifndef USB_FOR_MUX +- TS0710_PRINTK("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); ++ TS0710_DEBUG("MUX %s: tapisrv might be down!!! (serial_for_mux_driver == 0) || (serial_for_mux_tty == 0)\n", __FUNCTION__); + TS0710_SIG2APLOGD(); + #endif + +@@ -2989,9 +2993,9 @@ + if ((COMM_FOR_MUX_DRIVER == NULL) || (COMM_FOR_MUX_TTY == NULL)) { + + #ifdef USB_FOR_MUX +- TS0710_PRINTK("MUX: please install and open IPC-USB first\n"); ++ TS0710_DEBUG("MUX: please install and open IPC-USB first\n"); + #else +- TS0710_PRINTK("MUX: please install and open ttyS0 first\n"); ++ TS0710_DEBUG("MUX: please install and open ttyS0 first\n"); + #endif + + goto out; +@@ -3016,7 +3020,7 @@ + /* if( dlci == 1 ) { */ + /* Open server channel 0 first */ + if ((retval = ts0710_open_channel(0)) != 0) { +- TS0710_PRINTK("MUX: Can't connect server channel 0!\n"); ++ TS0710_DEBUG("MUX: Can't connect server channel 0!\n"); + ts0710_init(); + + mux_tty[line]--; +@@ -3073,7 +3077,7 @@ + datatty = dlci2tty[dlci].datatty; + if ((mux_tty[cmdtty] > 0) || (mux_tty[datatty] > 0)) { + if ((retval = ts0710_open_channel(dlci)) != 0) { +- TS0710_PRINTK("MUX: Can't connected channel %d!\n", ++ TS0710_DEBUG("MUX: Can't connected channel %d!\n", + dlci); + ts0710_reset_dlci(dlci); + +@@ -3096,6 +3100,7 @@ + retval = 0; + #endif + out: ++ TS0710_DEBUG("returning %d for open of /dev/mux%d (mux_tty[%d] = %d", retval, line, line, mux_tty[line]); + return retval; + } + +@@ -3178,12 +3183,12 @@ + + while (1) { + tbuf_free = TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf); +- TS0710_PRINTK("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); ++ TS0710_DEBUG("Reading max %i bytes from ts0710_mux_usb inbuf.\n", tbuf_free); + tbuf_read = get_from_inbuf_list(tbuf_ptr, tbuf_free); + if (tbuf_read == 0) { + break; + } else { +- TS0710_PRINTK("Read %i bytes.\n", tbuf_read); ++ TS0710_DEBUG("Read %i bytes.\n", tbuf_read); + }; + tbuf_ptr += tbuf_read; + }; +@@ -3192,7 +3197,7 @@ + + // Should be impossible? + //if (count > (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf))) { +- // TS0710_PRINTK ++ // TS0710_DEBUG + // ("MUX receive_worker: !!!!! Exceed buffer boundary !!!!!\n"); + // count = (TS0710MUX_MAX_BUF_SIZE - (tbuf_ptr - tbuf)); + //} +@@ -3264,7 +3269,7 @@ + TS0710_LOGSTR_FRAME(0, start_flag, + (tbuf_ptr - + start_flag)); +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: %s: frame length:%d is bigger than Max total frame size:%d\n", + /*__FUNCTION__, framelen, TS0710MUX_MAX_TOTAL_FRAME_SIZE);*/ + __FUNCTION__, framelen, (TS0710MUX_MAX_TOTAL_FRAME_SIZE + SEQ_FIELD_SIZE)); /*For BP UART problem */ +@@ -3389,7 +3394,7 @@ + *(uih_data_start + + uih_len) = + 0; +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX bp log: %s\n", + uih_data_start); + } +@@ -3415,7 +3420,7 @@ + TS0710_LOGSTR_FRAME(0, start_flag, + framelen); + TS0710_DEBUGHEX(start_flag, framelen); +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX: Lost synchronization!\n"); + search = start_flag + 1; + } +@@ -3476,7 +3481,7 @@ + recv_info2 = recv_info->next; + + if (!(recv_info->total)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: %s: Should not get here, recv_info->total == 0 \n", + __FUNCTION__); + continue; +@@ -3486,7 +3491,7 @@ + dlci = tty2dlci[tty_idx]; + tty = mux_table[tty_idx]; + if ((!mux_tty[tty_idx]) || (!tty)) { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX: No application waiting for, free recv_info! tty_idx:%d\n", + tty_idx); + mux_recv_info_flags[tty_idx] = 0; +@@ -3560,7 +3565,7 @@ + recv_info->total -= recv_packet->length; + free_mux_recv_packet(recv_packet); + } else { +- TS0710_PRINTK ++ TS0710_DEBUG + ("MUX Error: %s: Should not get here, recv_info->total is:%u \n", + __FUNCTION__, recv_info->total); + } +@@ -3760,7 +3765,7 @@ + int ret; + + if (idx > TS0710MUX_COUNT_MAX_IDX) { +- TS0710_PRINTK("MUX get_count: invalid idx: %d!\n", idx); ++ TS0710_DEBUG("MUX get_count: invalid idx: %d!\n", idx); + return -1; + } + +@@ -3774,11 +3779,11 @@ + static int set_count(__u8 idx, int count) + { + if (idx > TS0710MUX_COUNT_MAX_IDX) { +- TS0710_PRINTK("MUX set_count: invalid idx: %d!\n", idx); ++ TS0710_DEBUG("MUX set_count: invalid idx: %d!\n", idx); + return -1; + } + if (count < 0) { +- TS0710_PRINTK("MUX set_count: invalid count: %d!\n", count); ++ TS0710_DEBUG("MUX set_count: invalid count: %d!\n", count); + return -1; + } + +@@ -3792,11 +3797,11 @@ + static int add_count(__u8 idx, int count) + { + if (idx > TS0710MUX_COUNT_MAX_IDX) { +- TS0710_PRINTK("MUX add_count: invalid idx: %d!\n", idx); ++ TS0710_DEBUG("MUX add_count: invalid idx: %d!\n", idx); + return -1; + } + if (count <= 0) { +- TS0710_PRINTK("MUX add_count: invalid count: %d!\n", count); ++ TS0710_DEBUG("MUX add_count: invalid count: %d!\n", count); + return -1; + } + +Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c +=================================================================== +--- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 ++++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-22 12:26:47.000000000 +0200 +@@ -72,7 +72,8 @@ + #define IPC_USB_PROBE_NOT_READY 4 + #define DBG_MAX_BUF_SIZE 1024 + #define ICL_EVENT_INTERVAL (HZ) +-#undef BVD_DEBUG ++ ++#define BVD_DEBUG + + #define IS_EP_BULK(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_BULK ? 1 : 0) + #define IS_EP_BULK_IN(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) diff --git a/packages/linux/linux-ezx-2.6.21/patches/patch-2.6.21.4 b/packages/linux/linux-ezx-2.6.21/patches/patch-2.6.21.4 new file mode 100644 index 0000000000..2c2ed60433 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/patch-2.6.21.4 @@ -0,0 +1,2816 @@ +diff --git a/Makefile b/Makefile +index d970cb1..e5c5531 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION = 2 + PATCHLEVEL = 6 + SUBLEVEL = 21 +-EXTRAVERSION = ++EXTRAVERSION = .4 + NAME = Nocturnal Monster Puppy + + # *DOCUMENTATION* +diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c +index 2409560..7ed141f 100644 +--- a/arch/arm/kernel/traps.c ++++ b/arch/arm/kernel/traps.c +@@ -273,6 +273,7 @@ asmlinkage void do_undefinstr(struct pt_regs *regs) + struct undef_hook *hook; + siginfo_t info; + void __user *pc; ++ unsigned long flags; + + /* + * According to the ARM ARM, PC is 2 or 4 bytes ahead, +@@ -291,7 +292,7 @@ asmlinkage void do_undefinstr(struct pt_regs *regs) + get_user(instr, (u32 __user *)pc); + } + +- spin_lock_irq(&undef_lock); ++ spin_lock_irqsave(&undef_lock, flags); + list_for_each_entry(hook, &undef_hook, node) { + if ((instr & hook->instr_mask) == hook->instr_val && + (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) { +@@ -301,7 +302,7 @@ asmlinkage void do_undefinstr(struct pt_regs *regs) + } + } + } +- spin_unlock_irq(&undef_lock); ++ spin_unlock_irqrestore(&undef_lock, flags); + + #ifdef CONFIG_DEBUG_USER + if (user_debug & UDBG_UNDEFINED) { +diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c +index 89ec70e..d907a2a 100644 +--- a/arch/arm/mach-iop13xx/pci.c ++++ b/arch/arm/mach-iop13xx/pci.c +@@ -1023,7 +1023,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) + << IOP13XX_ATUX_PCIXSR_FUNC_NUM; + __raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR); + +- res[0].start = IOP13XX_PCIX_LOWER_IO_PA; ++ res[0].start = IOP13XX_PCIX_LOWER_IO_PA + IOP13XX_PCIX_IO_BUS_OFFSET; + res[0].end = IOP13XX_PCIX_UPPER_IO_PA; + res[0].name = "IQ81340 ATUX PCI I/O Space"; + res[0].flags = IORESOURCE_IO; +@@ -1033,7 +1033,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) + res[1].name = "IQ81340 ATUX PCI Memory Space"; + res[1].flags = IORESOURCE_MEM; + sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET; +- sys->io_offset = IOP13XX_PCIX_IO_OFFSET; ++ sys->io_offset = IOP13XX_PCIX_LOWER_IO_PA; + break; + case IOP13XX_INIT_ATU_ATUE: + /* Note: the function number field in the PCSR is ro */ +@@ -1044,7 +1044,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) + + __raw_writel(pcsr, IOP13XX_ATUE_PCSR); + +- res[0].start = IOP13XX_PCIE_LOWER_IO_PA; ++ res[0].start = IOP13XX_PCIE_LOWER_IO_PA + IOP13XX_PCIE_IO_BUS_OFFSET; + res[0].end = IOP13XX_PCIE_UPPER_IO_PA; + res[0].name = "IQ81340 ATUE PCI I/O Space"; + res[0].flags = IORESOURCE_IO; +@@ -1054,7 +1054,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) + res[1].name = "IQ81340 ATUE PCI Memory Space"; + res[1].flags = IORESOURCE_MEM; + sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET; +- sys->io_offset = IOP13XX_PCIE_IO_OFFSET; ++ sys->io_offset = IOP13XX_PCIE_LOWER_IO_PA; + sys->map_irq = iop13xx_pcie_map_irq; + break; + default: +diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c +index 16300ad..0cc26da 100644 +--- a/arch/arm/plat-iop/time.c ++++ b/arch/arm/plat-iop/time.c +@@ -32,22 +32,22 @@ static unsigned long next_jiffy_time; + + unsigned long iop_gettimeoffset(void) + { +- unsigned long offset, temp1, temp2; ++ unsigned long offset, temp; + + /* enable cp6, if necessary, to avoid taking the overhead of an + * undefined instruction trap + */ + asm volatile ( + "mrc p15, 0, %0, c15, c1, 0\n\t" +- "ands %1, %0, #(1 << 6)\n\t" ++ "tst %0, #(1 << 6)\n\t" + "orreq %0, %0, #(1 << 6)\n\t" + "mcreq p15, 0, %0, c15, c1, 0\n\t" +-#ifdef CONFIG_XSCALE ++#ifdef CONFIG_CPU_XSCALE + "mrceq p15, 0, %0, c15, c1, 0\n\t" + "moveq %0, %0\n\t" + "subeq pc, pc, #4\n\t" + #endif +- : "=r"(temp1), "=r"(temp2) : : "cc"); ++ : "=r"(temp) : : "cc"); + + offset = next_jiffy_time - read_tcr1(); + +diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +index 837b041..ca3e1d3 100644 +--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c ++++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +@@ -341,15 +341,17 @@ static int powernow_acpi_init(void) + pc.val = (unsigned long) acpi_processor_perf->states[0].control; + for (i = 0; i < number_scales; i++) { + u8 fid, vid; +- unsigned int speed; ++ struct acpi_processor_px *state = ++ &acpi_processor_perf->states[i]; ++ unsigned int speed, speed_mhz; + +- pc.val = (unsigned long) acpi_processor_perf->states[i].control; ++ pc.val = (unsigned long) state->control; + dprintk ("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", + i, +- (u32) acpi_processor_perf->states[i].core_frequency, +- (u32) acpi_processor_perf->states[i].power, +- (u32) acpi_processor_perf->states[i].transition_latency, +- (u32) acpi_processor_perf->states[i].control, ++ (u32) state->core_frequency, ++ (u32) state->power, ++ (u32) state->transition_latency, ++ (u32) state->control, + pc.bits.sgtc); + + vid = pc.bits.vid; +@@ -360,6 +362,18 @@ static int powernow_acpi_init(void) + powernow_table[i].index |= (vid << 8); /* upper 8 bits */ + + speed = powernow_table[i].frequency; ++ speed_mhz = speed / 1000; ++ ++ /* processor_perflib will multiply the MHz value by 1000 to ++ * get a KHz value (e.g. 1266000). However, powernow-k7 works ++ * with true KHz values (e.g. 1266768). To ensure that all ++ * powernow frequencies are available, we must ensure that ++ * ACPI doesn't restrict them, so we round up the MHz value ++ * to ensure that perflib's computed KHz value is greater than ++ * or equal to powernow's KHz value. ++ */ ++ if (speed % 1000 > 0) ++ speed_mhz++; + + if ((fid_codes[fid] % 10)==5) { + if (have_a0 == 1) +@@ -368,10 +382,16 @@ static int powernow_acpi_init(void) + + dprintk (" FID: 0x%x (%d.%dx [%dMHz]) " + "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, +- fid_codes[fid] % 10, speed/1000, vid, ++ fid_codes[fid] % 10, speed_mhz, vid, + mobile_vid_table[vid]/1000, + mobile_vid_table[vid]%1000); + ++ if (state->core_frequency != speed_mhz) { ++ state->core_frequency = speed_mhz; ++ dprintk(" Corrected ACPI frequency to %d\n", ++ speed_mhz); ++ } ++ + if (latency < pc.bits.sgtc) + latency = pc.bits.sgtc; + +@@ -602,7 +622,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy) + result = powernow_acpi_init(); + if (result) { + printk (KERN_INFO PFX "ACPI and legacy methods failed\n"); +- printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.shtml\n"); ++ printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.html\n"); + } + } else { + /* SGTC use the bus clock as timer */ +diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +index fe3b670..e295d87 100644 +--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c ++++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +@@ -521,7 +521,7 @@ static int check_supported_cpu(unsigned int cpu) + + if ((eax & CPUID_XFAM) == CPUID_XFAM_K8) { + if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || +- ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { ++ ((eax & CPUID_XMOD) > CPUID_XMOD_REV_MASK)) { + printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); + goto out; + } +diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +index 0fb2a30..575541f 100644 +--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h ++++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +@@ -46,8 +46,8 @@ struct powernow_k8_data { + #define CPUID_XFAM 0x0ff00000 /* extended family */ + #define CPUID_XFAM_K8 0 + #define CPUID_XMOD 0x000f0000 /* extended model */ +-#define CPUID_XMOD_REV_G 0x00060000 +-#define CPUID_XFAM_10H 0x00100000 /* family 0x10 */ ++#define CPUID_XMOD_REV_MASK 0x00080000 ++#define CPUID_XFAM_10H 0x00100000 /* family 0x10 */ + #define CPUID_USE_XFAM_XMOD 0x00000f00 + #define CPUID_GET_MAX_CAPABILITIES 0x80000000 + #define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 +diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c +index fb9bf1e..f56569f 100644 +--- a/arch/sparc64/kernel/of_device.c ++++ b/arch/sparc64/kernel/of_device.c +@@ -508,6 +508,13 @@ static int __init build_one_resource(struct device_node *parent, + return 0; + } + ++ /* When we miss an I/O space match on PCI, just pass it up ++ * to the next PCI bridge and/or controller. ++ */ ++ if (!strcmp(bus->name, "pci") && ++ (addr[0] & 0x03000000) == 0x01000000) ++ return 0; ++ + return 1; + } + +diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c +index 0917c24..3494adf 100644 +--- a/arch/sparc64/kernel/prom.c ++++ b/arch/sparc64/kernel/prom.c +@@ -1555,10 +1555,21 @@ static struct device_node * __init create_node(phandle node, struct device_node + + static struct device_node * __init build_tree(struct device_node *parent, phandle node, struct device_node ***nextp) + { ++ struct device_node *ret = NULL, *prev_sibling = NULL; + struct device_node *dp; + +- dp = create_node(node, parent); +- if (dp) { ++ while (1) { ++ dp = create_node(node, parent); ++ if (!dp) ++ break; ++ ++ if (prev_sibling) ++ prev_sibling->sibling = dp; ++ ++ if (!ret) ++ ret = dp; ++ prev_sibling = dp; ++ + *(*nextp) = dp; + *nextp = &dp->allnext; + +@@ -1567,10 +1578,10 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl + + dp->child = build_tree(dp, prom_getchild(node), nextp); + +- dp->sibling = build_tree(parent, prom_getsibling(node), nextp); ++ node = prom_getsibling(node); + } + +- return dp; ++ return ret; + } + + void __init prom_build_devicetree(void) +diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c +index fc99f7b..8ad7bdb 100644 +--- a/arch/sparc64/kernel/smp.c ++++ b/arch/sparc64/kernel/smp.c +@@ -566,6 +566,9 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t + unsigned long flags, status; + int cnt, retries, this_cpu, prev_sent, i; + ++ if (cpus_empty(mask)) ++ return; ++ + /* We have to do this whole thing with interrupts fully disabled. + * Otherwise if we send an xcall from interrupt context it will + * corrupt both our mondo block and cpu list state. +diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c +index b43c698..fc9f042 100644 +--- a/arch/x86_64/kernel/vsyscall.c ++++ b/arch/x86_64/kernel/vsyscall.c +@@ -132,7 +132,7 @@ static __always_inline void do_vgettimeofday(struct timeval * tv) + + /* convert to usecs and add to timespec: */ + tv->tv_usec += nsec_delta / NSEC_PER_USEC; +- while (tv->tv_usec > USEC_PER_SEC) { ++ while (tv->tv_usec >= USEC_PER_SEC) { + tv->tv_sec += 1; + tv->tv_usec -= USEC_PER_SEC; + } +diff --git a/crypto/api.c b/crypto/api.c +index 55af8bb..33734fd 100644 +--- a/crypto/api.c ++++ b/crypto/api.c +@@ -48,8 +48,10 @@ EXPORT_SYMBOL_GPL(crypto_mod_get); + + void crypto_mod_put(struct crypto_alg *alg) + { ++ struct module *module = alg->cra_module; ++ + crypto_alg_put(alg); +- module_put(alg->cra_module); ++ module_put(module); + } + EXPORT_SYMBOL_GPL(crypto_mod_put); + +diff --git a/drivers/acpi/tables/tbfadt.c b/drivers/acpi/tables/tbfadt.c +index 807c711..d341491 100644 +--- a/drivers/acpi/tables/tbfadt.c ++++ b/drivers/acpi/tables/tbfadt.c +@@ -347,6 +347,20 @@ static void acpi_tb_convert_fadt(void) + acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id; + + } ++ /* ++ * _CST object and C States change notification start with ++ * ACPI 2.0 (FADT r3). Although the field should be Reserved ++ * and 0 before then, some pre-r3 FADT set this field and ++ * it results in SMM-related boot failures. For them, clear it. ++ */ ++ if ((acpi_gbl_FADT.header.revision < 3) && ++ (acpi_gbl_FADT.cst_control != 0)) { ++ ACPI_WARNING((AE_INFO, ++ "Ignoring BIOS FADT r%u C-state control", ++ acpi_gbl_FADT.header.revision)); ++ acpi_gbl_FADT.cst_control = 0; ++ } ++ + } + + /****************************************************************************** +diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c +index 2ffcca0..4d63974 100644 +--- a/drivers/ata/libata-sff.c ++++ b/drivers/ata/libata-sff.c +@@ -557,12 +557,30 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int + int i, p = 0; + void __iomem * const *iomap; + ++ /* Discard disabled ports. Some controllers show their ++ unused channels this way */ ++ if (ata_resources_present(pdev, 0) == 0) ++ ports &= ~ATA_PORT_PRIMARY; ++ if (ata_resources_present(pdev, 1) == 0) ++ ports &= ~ATA_PORT_SECONDARY; ++ + /* iomap BARs */ +- for (i = 0; i < 4; i++) { +- if (pcim_iomap(pdev, i, 0) == NULL) { +- dev_printk(KERN_ERR, &pdev->dev, +- "failed to iomap PCI BAR %d\n", i); +- return NULL; ++ if (ports & ATA_PORT_PRIMARY) { ++ for (i = 0; i <= 1; i++) { ++ if (pcim_iomap(pdev, i, 0) == NULL) { ++ dev_printk(KERN_ERR, &pdev->dev, ++ "failed to iomap PCI BAR %d\n", i); ++ return NULL; ++ } ++ } ++ } ++ if (ports & ATA_PORT_SECONDARY) { ++ for (i = 2; i <= 3; i++) { ++ if (pcim_iomap(pdev, i, 0) == NULL) { ++ dev_printk(KERN_ERR, &pdev->dev, ++ "failed to iomap PCI BAR %d\n", i); ++ return NULL; ++ } + } + } + +@@ -577,13 +595,6 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int + probe_ent->irq = pdev->irq; + probe_ent->irq_flags = IRQF_SHARED; + +- /* Discard disabled ports. Some controllers show their +- unused channels this way */ +- if (ata_resources_present(pdev, 0) == 0) +- ports &= ~ATA_PORT_PRIMARY; +- if (ata_resources_present(pdev, 1) == 0) +- ports &= ~ATA_PORT_SECONDARY; +- + if (ports & ATA_PORT_PRIMARY) { + probe_ent->port[p].cmd_addr = iomap[0]; + probe_ent->port[p].altstatus_addr = +diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c +index 598e6a2..ea6efca 100644 +--- a/drivers/ata/sata_via.c ++++ b/drivers/ata/sata_via.c +@@ -97,6 +97,10 @@ static struct pci_driver svia_pci_driver = { + .name = DRV_NAME, + .id_table = svia_pci_tbl, + .probe = svia_init_one, ++#ifdef CONFIG_PM ++ .suspend = ata_pci_device_suspend, ++ .resume = ata_pci_device_resume, ++#endif + .remove = ata_pci_remove_one, + }; + +@@ -116,6 +120,10 @@ static struct scsi_host_template svia_sht = { + .slave_configure = ata_scsi_slave_config, + .slave_destroy = ata_scsi_slave_destroy, + .bios_param = ata_std_bios_param, ++#ifdef CONFIG_PM ++ .suspend = ata_scsi_device_suspend, ++ .resume = ata_scsi_device_resume, ++#endif + }; + + static const struct ata_port_operations vt6420_sata_ops = { +diff --git a/drivers/base/core.c b/drivers/base/core.c +index d7fcf82..a8dfee2 100644 +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -93,6 +93,9 @@ static void device_release(struct kobject * kobj) + { + struct device * dev = to_dev(kobj); + ++ kfree(dev->devt_attr); ++ dev->devt_attr = NULL; ++ + if (dev->release) + dev->release(dev); + else if (dev->type && dev->type->release) +@@ -765,10 +768,8 @@ void device_del(struct device * dev) + + if (parent) + klist_del(&dev->knode_parent); +- if (dev->devt_attr) { ++ if (dev->devt_attr) + device_remove_file(dev, dev->devt_attr); +- kfree(dev->devt_attr); +- } + if (dev->class) { + sysfs_remove_link(&dev->kobj, "subsystem"); + /* If this is not a "fake" compatible device, remove the +diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c +index e221465..cc13ebc 100644 +--- a/drivers/char/ipmi/ipmi_si_intf.c ++++ b/drivers/char/ipmi/ipmi_si_intf.c +@@ -1859,10 +1859,10 @@ static __devinit int try_init_acpi(struct SPMITable *spmi) + + if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { + info->io_setup = mem_setup; +- info->io.addr_type = IPMI_IO_ADDR_SPACE; ++ info->io.addr_type = IPMI_MEM_ADDR_SPACE; + } else if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_IO) { + info->io_setup = port_setup; +- info->io.addr_type = IPMI_MEM_ADDR_SPACE; ++ info->io.addr_type = IPMI_IO_ADDR_SPACE; + } else { + kfree(info); + printk("ipmi_si: Unknown ACPI I/O Address type\n"); +diff --git a/drivers/char/random.c b/drivers/char/random.c +index b9dc7aa..fa5b95b 100644 +--- a/drivers/char/random.c ++++ b/drivers/char/random.c +@@ -760,7 +760,7 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min, + + static void extract_buf(struct entropy_store *r, __u8 *out) + { +- int i, x; ++ int i; + __u32 data[16], buf[5 + SHA_WORKSPACE_WORDS]; + + sha_init(buf); +@@ -772,9 +772,11 @@ static void extract_buf(struct entropy_store *r, __u8 *out) + * attempts to find previous ouputs), unless the hash + * function can be inverted. + */ +- for (i = 0, x = 0; i < r->poolinfo->poolwords; i += 16, x+=2) { +- sha_transform(buf, (__u8 *)r->pool+i, buf + 5); +- add_entropy_words(r, &buf[x % 5], 1); ++ for (i = 0; i < r->poolinfo->poolwords; i += 16) { ++ /* hash blocks of 16 words = 512 bits */ ++ sha_transform(buf, (__u8 *)(r->pool + i), buf + 5); ++ /* feed back portion of the resulting hash */ ++ add_entropy_words(r, &buf[i % 5], 1); + } + + /* +@@ -782,7 +784,7 @@ static void extract_buf(struct entropy_store *r, __u8 *out) + * portion of the pool while mixing, and hash one + * final time. + */ +- __add_entropy_words(r, &buf[x % 5], 1, data); ++ __add_entropy_words(r, &buf[i % 5], 1, data); + sha_transform(buf, (__u8 *)data, buf + 5); + + /* +@@ -1022,37 +1024,44 @@ random_poll(struct file *file, poll_table * wait) + return mask; + } + +-static ssize_t +-random_write(struct file * file, const char __user * buffer, +- size_t count, loff_t *ppos) ++static int ++write_pool(struct entropy_store *r, const char __user *buffer, size_t count) + { +- int ret = 0; + size_t bytes; + __u32 buf[16]; + const char __user *p = buffer; +- size_t c = count; + +- while (c > 0) { +- bytes = min(c, sizeof(buf)); ++ while (count > 0) { ++ bytes = min(count, sizeof(buf)); ++ if (copy_from_user(&buf, p, bytes)) ++ return -EFAULT; + +- bytes -= copy_from_user(&buf, p, bytes); +- if (!bytes) { +- ret = -EFAULT; +- break; +- } +- c -= bytes; ++ count -= bytes; + p += bytes; + +- add_entropy_words(&input_pool, buf, (bytes + 3) / 4); +- } +- if (p == buffer) { +- return (ssize_t)ret; +- } else { +- struct inode *inode = file->f_path.dentry->d_inode; +- inode->i_mtime = current_fs_time(inode->i_sb); +- mark_inode_dirty(inode); +- return (ssize_t)(p - buffer); ++ add_entropy_words(r, buf, (bytes + 3) / 4); + } ++ ++ return 0; ++} ++ ++static ssize_t ++random_write(struct file * file, const char __user * buffer, ++ size_t count, loff_t *ppos) ++{ ++ size_t ret; ++ struct inode *inode = file->f_path.dentry->d_inode; ++ ++ ret = write_pool(&blocking_pool, buffer, count); ++ if (ret) ++ return ret; ++ ret = write_pool(&nonblocking_pool, buffer, count); ++ if (ret) ++ return ret; ++ ++ inode->i_mtime = current_fs_time(inode->i_sb); ++ mark_inode_dirty(inode); ++ return (ssize_t)count; + } + + static int +@@ -1091,8 +1100,8 @@ random_ioctl(struct inode * inode, struct file * file, + return -EINVAL; + if (get_user(size, p++)) + return -EFAULT; +- retval = random_write(file, (const char __user *) p, +- size, &file->f_pos); ++ retval = write_pool(&input_pool, (const char __user *)p, ++ size); + if (retval < 0) + return retval; + credit_entropy_store(&input_pool, ent_count); +diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c +index 6d3840e..6a86958 100644 +--- a/drivers/crypto/geode-aes.c ++++ b/drivers/crypto/geode-aes.c +@@ -102,10 +102,15 @@ geode_aes_crypt(struct geode_aes_op *op) + u32 flags = 0; + unsigned long iflags; + +- if (op->len == 0 || op->src == op->dst) ++ if (op->len == 0) + return 0; + +- if (op->flags & AES_FLAGS_COHERENT) ++ /* If the source and destination is the same, then ++ * we need to turn on the coherent flags, otherwise ++ * we don't need to worry ++ */ ++ ++ if (op->src == op->dst) + flags |= (AES_CTRL_DCA | AES_CTRL_SCA); + + if (op->dir == AES_DIR_ENCRYPT) +@@ -120,7 +125,7 @@ geode_aes_crypt(struct geode_aes_op *op) + _writefield(AES_WRITEIV0_REG, op->iv); + } + +- if (op->flags & AES_FLAGS_USRKEY) { ++ if (!(op->flags & AES_FLAGS_HIDDENKEY)) { + flags |= AES_CTRL_WRKEY; + _writefield(AES_WRITEKEY0_REG, op->key); + } +@@ -289,6 +294,7 @@ static struct crypto_alg geode_cbc_alg = { + .setkey = geode_setkey, + .encrypt = geode_cbc_encrypt, + .decrypt = geode_cbc_decrypt, ++ .ivsize = AES_IV_LENGTH, + } + } + }; +diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h +index 8003a36..f479686 100644 +--- a/drivers/crypto/geode-aes.h ++++ b/drivers/crypto/geode-aes.h +@@ -20,8 +20,7 @@ + #define AES_DIR_DECRYPT 0 + #define AES_DIR_ENCRYPT 1 + +-#define AES_FLAGS_USRKEY (1 << 0) +-#define AES_FLAGS_COHERENT (1 << 1) ++#define AES_FLAGS_HIDDENKEY (1 << 0) + + struct geode_aes_op { + +diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c +index 97ee870..3a95cc5 100644 +--- a/drivers/md/raid1.c ++++ b/drivers/md/raid1.c +@@ -271,21 +271,25 @@ static int raid1_end_read_request(struct bio *bio, unsigned int bytes_done, int + */ + update_head_pos(mirror, r1_bio); + +- if (uptodate || (conf->raid_disks - conf->mddev->degraded) <= 1) { +- /* +- * Set R1BIO_Uptodate in our master bio, so that +- * we will return a good error code for to the higher +- * levels even if IO on some other mirrored buffer fails. +- * +- * The 'master' represents the composite IO operation to +- * user-side. So if something waits for IO, then it will +- * wait for the 'master' bio. ++ if (uptodate) ++ set_bit(R1BIO_Uptodate, &r1_bio->state); ++ else { ++ /* If all other devices have failed, we want to return ++ * the error upwards rather than fail the last device. ++ * Here we redefine "uptodate" to mean "Don't want to retry" + */ +- if (uptodate) +- set_bit(R1BIO_Uptodate, &r1_bio->state); ++ unsigned long flags; ++ spin_lock_irqsave(&conf->device_lock, flags); ++ if (r1_bio->mddev->degraded == conf->raid_disks || ++ (r1_bio->mddev->degraded == conf->raid_disks-1 && ++ !test_bit(Faulty, &conf->mirrors[mirror].rdev->flags))) ++ uptodate = 1; ++ spin_unlock_irqrestore(&conf->device_lock, flags); ++ } + ++ if (uptodate) + raid_end_bio_io(r1_bio); +- } else { ++ else { + /* + * oops, read error: + */ +@@ -992,13 +996,14 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) + unsigned long flags; + spin_lock_irqsave(&conf->device_lock, flags); + mddev->degraded++; ++ set_bit(Faulty, &rdev->flags); + spin_unlock_irqrestore(&conf->device_lock, flags); + /* + * if recovery is running, make sure it aborts. + */ + set_bit(MD_RECOVERY_ERR, &mddev->recovery); +- } +- set_bit(Faulty, &rdev->flags); ++ } else ++ set_bit(Faulty, &rdev->flags); + set_bit(MD_CHANGE_DEVS, &mddev->flags); + printk(KERN_ALERT "raid1: Disk failure on %s, disabling device. \n" + " Operation continuing on %d devices\n", +diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c +index 85f21b5..2eb5741 100644 +--- a/drivers/message/fusion/mptspi.c ++++ b/drivers/message/fusion/mptspi.c +@@ -726,13 +726,15 @@ static int mptspi_slave_configure(struct scsi_device *sdev) + struct _MPT_SCSI_HOST *hd = + (struct _MPT_SCSI_HOST *)sdev->host->hostdata; + VirtTarget *vtarget = scsi_target(sdev)->hostdata; +- int ret = mptscsih_slave_configure(sdev); ++ int ret; ++ ++ mptspi_initTarget(hd, vtarget, sdev); ++ ++ ret = mptscsih_slave_configure(sdev); + + if (ret) + return ret; + +- mptspi_initTarget(hd, vtarget, sdev); +- + ddvprintk((MYIOC_s_INFO_FMT "id=%d min_period=0x%02x" + " max_offset=0x%02x max_width=%d\n", hd->ioc->name, + sdev->id, spi_min_period(scsi_target(sdev)), +diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig +index a3d46ea..32a3003 100644 +--- a/drivers/net/Kconfig ++++ b/drivers/net/Kconfig +@@ -2929,11 +2929,6 @@ endif #NETDEVICES + config NETPOLL + def_bool NETCONSOLE + +-config NETPOLL_RX +- bool "Netpoll support for trapping incoming packets" +- default n +- depends on NETPOLL +- + config NETPOLL_TRAP + bool "Netpoll traffic trapping" + default n +diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c +index e85f5ec..5006c67 100644 +--- a/drivers/net/bnx2.c ++++ b/drivers/net/bnx2.c +@@ -54,8 +54,8 @@ + + #define DRV_MODULE_NAME "bnx2" + #define PFX DRV_MODULE_NAME ": " +-#define DRV_MODULE_VERSION "1.5.8" +-#define DRV_MODULE_RELDATE "April 24, 2007" ++#define DRV_MODULE_VERSION "1.5.8.1" ++#define DRV_MODULE_RELDATE "May 7, 2007" + + #define RUN_AT(x) (jiffies + (x)) + +@@ -4510,8 +4510,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) + vlan_tag_flags |= + (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); + } +- if ((mss = skb_shinfo(skb)->gso_size) && +- (skb->len > (bp->dev->mtu + ETH_HLEN))) { ++ if ((mss = skb_shinfo(skb)->gso_size)) { + u32 tcp_opt_len, ip_tcp_len; + + if (skb_header_cloned(skb) && +@@ -5565,6 +5564,9 @@ bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) + case SIOCGMIIREG: { + u32 mii_regval; + ++ if (!netif_running(dev)) ++ return -EAGAIN; ++ + spin_lock_bh(&bp->phy_lock); + err = bnx2_read_phy(bp, data->reg_num & 0x1f, &mii_regval); + spin_unlock_bh(&bp->phy_lock); +@@ -5578,6 +5580,9 @@ bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + ++ if (!netif_running(dev)) ++ return -EAGAIN; ++ + spin_lock_bh(&bp->phy_lock); + err = bnx2_write_phy(bp, data->reg_num & 0x1f, data->val_in); + spin_unlock_bh(&bp->phy_lock); +@@ -6143,6 +6148,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) + reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; + bnx2_reset_chip(bp, reset_code); + bnx2_free_skbs(bp); ++ pci_save_state(pdev); + bnx2_set_power_state(bp, pci_choose_state(pdev, state)); + return 0; + } +@@ -6156,6 +6162,7 @@ bnx2_resume(struct pci_dev *pdev) + if (!netif_running(dev)) + return 0; + ++ pci_restore_state(pdev); + bnx2_set_power_state(bp, PCI_D0); + netif_device_attach(dev); + bnx2_init_nic(bp); +diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c +index b2a3b19..ce547af 100644 +--- a/drivers/net/sis900.c ++++ b/drivers/net/sis900.c +@@ -1754,6 +1754,7 @@ static int sis900_rx(struct net_device *net_dev) + sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; + } else { + struct sk_buff * skb; ++ struct sk_buff * rx_skb; + + pci_unmap_single(sis_priv->pci_dev, + sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, +@@ -1787,10 +1788,10 @@ static int sis900_rx(struct net_device *net_dev) + } + + /* give the socket buffer to upper layers */ +- skb = sis_priv->rx_skbuff[entry]; +- skb_put(skb, rx_size); +- skb->protocol = eth_type_trans(skb, net_dev); +- netif_rx(skb); ++ rx_skb = sis_priv->rx_skbuff[entry]; ++ skb_put(rx_skb, rx_size); ++ rx_skb->protocol = eth_type_trans(rx_skb, net_dev); ++ netif_rx(rx_skb); + + /* some network statistics */ + if ((rx_status & BCAST) == MCAST) +diff --git a/drivers/net/skge.c b/drivers/net/skge.c +index d476a3c..5ef9023 100644 +--- a/drivers/net/skge.c ++++ b/drivers/net/skge.c +@@ -135,10 +135,13 @@ static void skge_get_regs(struct net_device *dev, struct ethtool_regs *regs, + /* Wake on Lan only supported on Yukon chips with rev 1 or above */ + static u32 wol_supported(const struct skge_hw *hw) + { +- if (hw->chip_id == CHIP_ID_YUKON && hw->chip_rev != 0) +- return WAKE_MAGIC | WAKE_PHY; +- else ++ if (hw->chip_id == CHIP_ID_GENESIS) ++ return 0; ++ ++ if (hw->chip_id == CHIP_ID_YUKON && hw->chip_rev == 0) + return 0; ++ ++ return WAKE_MAGIC | WAKE_PHY; + } + + static u32 pci_wake_enabled(struct pci_dev *dev) +@@ -3583,7 +3586,9 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, + skge->duplex = -1; + skge->speed = -1; + skge->advertising = skge_supported_modes(hw); +- skge->wol = pci_wake_enabled(hw->pdev) ? wol_supported(hw) : 0; ++ ++ if (pci_wake_enabled(hw->pdev)) ++ skge->wol = wol_supported(hw) & WAKE_MAGIC; + + hw->dev[port] = dev; + +@@ -3789,6 +3794,9 @@ static int skge_suspend(struct pci_dev *pdev, pm_message_t state) + struct skge_hw *hw = pci_get_drvdata(pdev); + int i, err, wol = 0; + ++ if (!hw) ++ return 0; ++ + err = pci_save_state(pdev); + if (err) + return err; +@@ -3817,6 +3825,9 @@ static int skge_resume(struct pci_dev *pdev) + struct skge_hw *hw = pci_get_drvdata(pdev); + int i, err; + ++ if (!hw) ++ return 0; ++ + err = pci_set_power_state(pdev, PCI_D0); + if (err) + goto out; +@@ -3855,6 +3866,9 @@ static void skge_shutdown(struct pci_dev *pdev) + struct skge_hw *hw = pci_get_drvdata(pdev); + int i, wol = 0; + ++ if (!hw) ++ return; ++ + for (i = 0; i < hw->ports; i++) { + struct net_device *dev = hw->dev[i]; + struct skge_port *skge = netdev_priv(dev); +diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c +index ac36152..b6b444b 100644 +--- a/drivers/net/sky2.c ++++ b/drivers/net/sky2.c +@@ -123,16 +123,13 @@ static const struct pci_device_id sky2_id_table[] = { + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, /* 88E8050 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, /* 88E8053 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, /* 88E8055 */ +-#ifdef broken +- /* This device causes data corruption problems that are not resolved */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, /* 88E8056 */ +-#endif + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, /* 88EC036 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, /* 88EC032 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */ +- { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ ++// { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ + { 0 } + }; + +@@ -3722,6 +3719,7 @@ err_out_free_regions: + pci_release_regions(pdev); + pci_disable_device(pdev); + err_out: ++ pci_set_drvdata(pdev, NULL); + return err; + } + +@@ -3774,6 +3772,9 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state) + struct sky2_hw *hw = pci_get_drvdata(pdev); + int i, wol = 0; + ++ if (!hw) ++ return 0; ++ + del_timer_sync(&hw->idle_timer); + netif_poll_disable(hw->dev[0]); + +@@ -3805,6 +3806,9 @@ static int sky2_resume(struct pci_dev *pdev) + struct sky2_hw *hw = pci_get_drvdata(pdev); + int i, err; + ++ if (!hw) ++ return 0; ++ + err = pci_set_power_state(pdev, PCI_D0); + if (err) + goto out; +@@ -3851,6 +3855,9 @@ static void sky2_shutdown(struct pci_dev *pdev) + struct sky2_hw *hw = pci_get_drvdata(pdev); + int i, wol = 0; + ++ if (!hw) ++ return; ++ + del_timer_sync(&hw->idle_timer); + netif_poll_disable(hw->dev[0]); + +diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c +index c956141..0b89812 100644 +--- a/drivers/net/smc911x.c ++++ b/drivers/net/smc911x.c +@@ -499,7 +499,7 @@ static inline void smc911x_rcv(struct net_device *dev) + SMC_SET_RX_CFG(RX_CFG_RX_END_ALGN4_ | ((2<<8) & RX_CFG_RXDOFF_)); + SMC_PULL_DATA(data, pkt_len+2+3); + +- DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name,); ++ DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name); + PRINT_PKT(data, ((pkt_len - 4) <= 64) ? pkt_len - 4 : 64); + dev->last_rx = jiffies; + skb->dev = dev; +diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c +index 256969e..3d20115 100644 +--- a/drivers/net/tg3.c ++++ b/drivers/net/tg3.c +@@ -64,8 +64,8 @@ + + #define DRV_MODULE_NAME "tg3" + #define PFX DRV_MODULE_NAME ": " +-#define DRV_MODULE_VERSION "3.75" +-#define DRV_MODULE_RELDATE "March 23, 2007" ++#define DRV_MODULE_VERSION "3.75.1" ++#define DRV_MODULE_RELDATE "May 7, 2007" + + #define TG3_DEF_MAC_MODE 0 + #define TG3_DEF_RX_MODE 0 +@@ -3895,8 +3895,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) + entry = tp->tx_prod; + base_flags = 0; + mss = 0; +- if (skb->len > (tp->dev->mtu + ETH_HLEN) && +- (mss = skb_shinfo(skb)->gso_size) != 0) { ++ if ((mss = skb_shinfo(skb)->gso_size) != 0) { + int tcp_opt_len, ip_tcp_len; + + if (skb_header_cloned(skb) && +@@ -4053,8 +4052,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) + if (skb->ip_summed == CHECKSUM_PARTIAL) + base_flags |= TXD_FLAG_TCPUDP_CSUM; + mss = 0; +- if (skb->len > (tp->dev->mtu + ETH_HLEN) && +- (mss = skb_shinfo(skb)->gso_size) != 0) { ++ if ((mss = skb_shinfo(skb)->gso_size) != 0) { + int tcp_opt_len, ip_tcp_len, hdr_len; + + if (skb_header_cloned(skb) && +@@ -5936,7 +5934,7 @@ static int tg3_load_tso_firmware(struct tg3 *tp) + + + /* tp->lock is held. */ +-static void __tg3_set_mac_addr(struct tg3 *tp) ++static void __tg3_set_mac_addr(struct tg3 *tp, int skip_mac_1) + { + u32 addr_high, addr_low; + int i; +@@ -5948,6 +5946,8 @@ static void __tg3_set_mac_addr(struct tg3 *tp) + (tp->dev->dev_addr[4] << 8) | + (tp->dev->dev_addr[5] << 0)); + for (i = 0; i < 4; i++) { ++ if (i == 1 && skip_mac_1) ++ continue; + tw32(MAC_ADDR_0_HIGH + (i * 8), addr_high); + tw32(MAC_ADDR_0_LOW + (i * 8), addr_low); + } +@@ -5974,7 +5974,7 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) + { + struct tg3 *tp = netdev_priv(dev); + struct sockaddr *addr = p; +- int err = 0; ++ int err = 0, skip_mac_1 = 0; + + if (!is_valid_ether_addr(addr->sa_data)) + return -EINVAL; +@@ -5985,22 +5985,21 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) + return 0; + + if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { +- /* Reset chip so that ASF can re-init any MAC addresses it +- * needs. +- */ +- tg3_netif_stop(tp); +- tg3_full_lock(tp, 1); ++ u32 addr0_high, addr0_low, addr1_high, addr1_low; + +- tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); +- err = tg3_restart_hw(tp, 0); +- if (!err) +- tg3_netif_start(tp); +- tg3_full_unlock(tp); +- } else { +- spin_lock_bh(&tp->lock); +- __tg3_set_mac_addr(tp); +- spin_unlock_bh(&tp->lock); ++ addr0_high = tr32(MAC_ADDR_0_HIGH); ++ addr0_low = tr32(MAC_ADDR_0_LOW); ++ addr1_high = tr32(MAC_ADDR_1_HIGH); ++ addr1_low = tr32(MAC_ADDR_1_LOW); ++ ++ /* Skip MAC addr 1 if ASF is using it. */ ++ if ((addr0_high != addr1_high || addr0_low != addr1_low) && ++ !(addr1_high == 0 && addr1_low == 0)) ++ skip_mac_1 = 1; + } ++ spin_lock_bh(&tp->lock); ++ __tg3_set_mac_addr(tp, skip_mac_1); ++ spin_unlock_bh(&tp->lock); + + return err; + } +@@ -6317,7 +6316,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) + tp->rx_jumbo_ptr); + + /* Initialize MAC address and backoff seed. */ +- __tg3_set_mac_addr(tp); ++ __tg3_set_mac_addr(tp, 0); + + /* MTU + ethernet header + FCS + optional VLAN tag */ + tw32(MAC_RX_MTU_SIZE, tp->dev->mtu + ETH_HLEN + 8); +@@ -6348,8 +6347,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) + tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)) { + if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE && +- (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 || +- tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) { ++ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { + rdmac_mode |= RDMAC_MODE_FIFO_SIZE_128; + } else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) && + !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 65d6f23..5af9125 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -1737,18 +1737,20 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, + quirk_nvidia_ck804_pcie_aer_ext_cap); + + #ifdef CONFIG_PCI_MSI +-/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely +- * on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually +- * some other busses controlled by the chipset even if Linux is not aware of it. +- * Instead of setting the flag on all busses in the machine, simply disable MSI +- * globally. ++/* Some chipsets do not support MSI. We cannot easily rely on setting ++ * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually ++ * some other busses controlled by the chipset even if Linux is not ++ * aware of it. Instead of setting the flag on all busses in the ++ * machine, simply disable MSI globally. + */ +-static void __init quirk_svw_msi(struct pci_dev *dev) ++static void __init quirk_disable_all_msi(struct pci_dev *dev) + { + pci_no_msi(); + printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n"); + } +-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); + + /* Disable MSI on chipsets that are known to not support it */ + static void __devinit quirk_disable_msi(struct pci_dev *dev) +diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c +index 40d4856..c3a6bd2 100644 +--- a/drivers/serial/sunhv.c ++++ b/drivers/serial/sunhv.c +@@ -493,6 +493,10 @@ static struct of_device_id hv_match[] = { + .name = "console", + .compatible = "qcn", + }, ++ { ++ .name = "console", ++ .compatible = "SUNW,sun4v-console", ++ }, + {}, + }; + MODULE_DEVICE_TABLE(of, hv_match); +diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c +index 3dfa3e4..3257d94 100644 +--- a/drivers/usb/atm/cxacru.c ++++ b/drivers/usb/atm/cxacru.c +@@ -146,6 +146,12 @@ enum cxacru_info_idx { + CXINF_MAX = 0x1c, + }; + ++enum poll_state { ++ CX_INIT, ++ CX_POLLING, ++ CX_ABORT ++}; ++ + struct cxacru_modem_type { + u32 pll_f_clk; + u32 pll_b_clk; +@@ -159,6 +165,8 @@ struct cxacru_data { + + int line_status; + struct delayed_work poll_work; ++ struct mutex poll_state_serialize; ++ enum poll_state poll_state; + + /* contol handles */ + struct mutex cm_serialize; +@@ -356,7 +364,7 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, + /* + struct atm_dev *atm_dev = usbatm_instance->atm_dev; + */ +- int ret; ++ int ret, start_polling = 1; + + dbg("cxacru_atm_start"); + +@@ -376,7 +384,15 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, + } + + /* Start status polling */ +- cxacru_poll_status(&instance->poll_work.work); ++ mutex_lock(&instance->poll_state_serialize); ++ if (instance->poll_state == CX_INIT) ++ instance->poll_state = CX_POLLING; ++ else /* poll_state == CX_ABORT */ ++ start_polling = 0; ++ mutex_unlock(&instance->poll_state_serialize); ++ ++ if (start_polling) ++ cxacru_poll_status(&instance->poll_work.work); + return 0; + } + +@@ -685,6 +701,9 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance, + instance->usbatm = usbatm_instance; + instance->modem_type = (struct cxacru_modem_type *) id->driver_info; + ++ mutex_init(&instance->poll_state_serialize); ++ instance->poll_state = CX_INIT; ++ + instance->rcv_buf = (u8 *) __get_free_page(GFP_KERNEL); + if (!instance->rcv_buf) { + dbg("cxacru_bind: no memory for rcv_buf"); +@@ -744,6 +763,7 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance, + struct usb_interface *intf) + { + struct cxacru_data *instance = usbatm_instance->driver_data; ++ int stop_polling = 1; + + dbg("cxacru_unbind entered"); + +@@ -752,8 +772,20 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance, + return; + } + +- while (!cancel_delayed_work(&instance->poll_work)) +- flush_scheduled_work(); ++ mutex_lock(&instance->poll_state_serialize); ++ if (instance->poll_state != CX_POLLING) { ++ /* Polling hasn't started yet and with ++ * the mutex locked it can be prevented ++ * from starting. ++ */ ++ instance->poll_state = CX_ABORT; ++ stop_polling = 0; ++ } ++ mutex_unlock(&instance->poll_state_serialize); ++ ++ if (stop_polling) ++ while (!cancel_delayed_work(&instance->poll_work)) ++ flush_scheduled_work(); + + usb_kill_urb(instance->snd_urb); + usb_kill_urb(instance->rcv_urb); +diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c +index a8b3d66..488d61b 100644 +--- a/drivers/usb/input/hiddev.c ++++ b/drivers/usb/input/hiddev.c +@@ -51,6 +51,7 @@ struct hiddev { + wait_queue_head_t wait; + struct hid_device *hid; + struct list_head list; ++ spinlock_t list_lock; + }; + + struct hiddev_list { +@@ -161,7 +162,9 @@ static void hiddev_send_event(struct hid_device *hid, + { + struct hiddev *hiddev = hid->hiddev; + struct hiddev_list *list; ++ unsigned long flags; + ++ spin_lock_irqsave(&hiddev->list_lock, flags); + list_for_each_entry(list, &hiddev->list, node) { + if (uref->field_index != HID_FIELD_INDEX_NONE || + (list->flags & HIDDEV_FLAG_REPORT) != 0) { +@@ -171,6 +174,7 @@ static void hiddev_send_event(struct hid_device *hid, + kill_fasync(&list->fasync, SIGIO, POLL_IN); + } + } ++ spin_unlock_irqrestore(&hiddev->list_lock, flags); + + wake_up_interruptible(&hiddev->wait); + } +@@ -235,9 +239,13 @@ static int hiddev_fasync(int fd, struct file *file, int on) + static int hiddev_release(struct inode * inode, struct file * file) + { + struct hiddev_list *list = file->private_data; ++ unsigned long flags; + + hiddev_fasync(-1, file, 0); ++ ++ spin_lock_irqsave(&list->hiddev->list_lock, flags); + list_del(&list->node); ++ spin_unlock_irqrestore(&list->hiddev->list_lock, flags); + + if (!--list->hiddev->open) { + if (list->hiddev->exist) +@@ -257,6 +265,7 @@ static int hiddev_release(struct inode * inode, struct file * file) + static int hiddev_open(struct inode *inode, struct file *file) + { + struct hiddev_list *list; ++ unsigned long flags; + + int i = iminor(inode) - HIDDEV_MINOR_BASE; + +@@ -267,7 +276,11 @@ static int hiddev_open(struct inode *inode, struct file *file) + return -ENOMEM; + + list->hiddev = hiddev_table[i]; ++ ++ spin_lock_irqsave(&list->hiddev->list_lock, flags); + list_add_tail(&list->node, &hiddev_table[i]->list); ++ spin_unlock_irqrestore(&list->hiddev->list_lock, flags); ++ + file->private_data = list; + + if (!list->hiddev->open++) +@@ -773,6 +786,7 @@ int hiddev_connect(struct hid_device *hid) + + init_waitqueue_head(&hiddev->wait); + INIT_LIST_HEAD(&hiddev->list); ++ spin_lock_init(&hiddev->list_lock); + hiddev->hid = hid; + hiddev->exist = 1; + +diff --git a/fs/fat/dir.c b/fs/fat/dir.c +index c16af24..ccf161d 100644 +--- a/fs/fat/dir.c ++++ b/fs/fat/dir.c +@@ -422,7 +422,7 @@ EODir: + EXPORT_SYMBOL_GPL(fat_search_long); + + struct fat_ioctl_filldir_callback { +- struct dirent __user *dirent; ++ void __user *dirent; + int result; + /* for dir ioctl */ + const char *longname; +@@ -647,62 +647,85 @@ static int fat_readdir(struct file *filp, void *dirent, filldir_t filldir) + return __fat_readdir(inode, filp, dirent, filldir, 0, 0); + } + +-static int fat_ioctl_filldir(void *__buf, const char *name, int name_len, +- loff_t offset, u64 ino, unsigned int d_type) ++#define FAT_IOCTL_FILLDIR_FUNC(func, dirent_type) \ ++static int func(void *__buf, const char *name, int name_len, \ ++ loff_t offset, u64 ino, unsigned int d_type) \ ++{ \ ++ struct fat_ioctl_filldir_callback *buf = __buf; \ ++ struct dirent_type __user *d1 = buf->dirent; \ ++ struct dirent_type __user *d2 = d1 + 1; \ ++ \ ++ if (buf->result) \ ++ return -EINVAL; \ ++ buf->result++; \ ++ \ ++ if (name != NULL) { \ ++ /* dirent has only short name */ \ ++ if (name_len >= sizeof(d1->d_name)) \ ++ name_len = sizeof(d1->d_name) - 1; \ ++ \ ++ if (put_user(0, d2->d_name) || \ ++ put_user(0, &d2->d_reclen) || \ ++ copy_to_user(d1->d_name, name, name_len) || \ ++ put_user(0, d1->d_name + name_len) || \ ++ put_user(name_len, &d1->d_reclen)) \ ++ goto efault; \ ++ } else { \ ++ /* dirent has short and long name */ \ ++ const char *longname = buf->longname; \ ++ int long_len = buf->long_len; \ ++ const char *shortname = buf->shortname; \ ++ int short_len = buf->short_len; \ ++ \ ++ if (long_len >= sizeof(d1->d_name)) \ ++ long_len = sizeof(d1->d_name) - 1; \ ++ if (short_len >= sizeof(d1->d_name)) \ ++ short_len = sizeof(d1->d_name) - 1; \ ++ \ ++ if (copy_to_user(d2->d_name, longname, long_len) || \ ++ put_user(0, d2->d_name + long_len) || \ ++ put_user(long_len, &d2->d_reclen) || \ ++ put_user(ino, &d2->d_ino) || \ ++ put_user(offset, &d2->d_off) || \ ++ copy_to_user(d1->d_name, shortname, short_len) || \ ++ put_user(0, d1->d_name + short_len) || \ ++ put_user(short_len, &d1->d_reclen)) \ ++ goto efault; \ ++ } \ ++ return 0; \ ++efault: \ ++ buf->result = -EFAULT; \ ++ return -EFAULT; \ ++} ++ ++FAT_IOCTL_FILLDIR_FUNC(fat_ioctl_filldir, dirent) ++ ++static int fat_ioctl_readdir(struct inode *inode, struct file *filp, ++ void __user *dirent, filldir_t filldir, ++ int short_only, int both) + { +- struct fat_ioctl_filldir_callback *buf = __buf; +- struct dirent __user *d1 = buf->dirent; +- struct dirent __user *d2 = d1 + 1; +- +- if (buf->result) +- return -EINVAL; +- buf->result++; +- +- if (name != NULL) { +- /* dirent has only short name */ +- if (name_len >= sizeof(d1->d_name)) +- name_len = sizeof(d1->d_name) - 1; +- +- if (put_user(0, d2->d_name) || +- put_user(0, &d2->d_reclen) || +- copy_to_user(d1->d_name, name, name_len) || +- put_user(0, d1->d_name + name_len) || +- put_user(name_len, &d1->d_reclen)) +- goto efault; +- } else { +- /* dirent has short and long name */ +- const char *longname = buf->longname; +- int long_len = buf->long_len; +- const char *shortname = buf->shortname; +- int short_len = buf->short_len; +- +- if (long_len >= sizeof(d1->d_name)) +- long_len = sizeof(d1->d_name) - 1; +- if (short_len >= sizeof(d1->d_name)) +- short_len = sizeof(d1->d_name) - 1; +- +- if (copy_to_user(d2->d_name, longname, long_len) || +- put_user(0, d2->d_name + long_len) || +- put_user(long_len, &d2->d_reclen) || +- put_user(ino, &d2->d_ino) || +- put_user(offset, &d2->d_off) || +- copy_to_user(d1->d_name, shortname, short_len) || +- put_user(0, d1->d_name + short_len) || +- put_user(short_len, &d1->d_reclen)) +- goto efault; ++ struct fat_ioctl_filldir_callback buf; ++ int ret; ++ ++ buf.dirent = dirent; ++ buf.result = 0; ++ mutex_lock(&inode->i_mutex); ++ ret = -ENOENT; ++ if (!IS_DEADDIR(inode)) { ++ ret = __fat_readdir(inode, filp, &buf, filldir, ++ short_only, both); + } +- return 0; +-efault: +- buf->result = -EFAULT; +- return -EFAULT; ++ mutex_unlock(&inode->i_mutex); ++ if (ret >= 0) ++ ret = buf.result; ++ return ret; + } + +-static int fat_dir_ioctl(struct inode * inode, struct file * filp, +- unsigned int cmd, unsigned long arg) ++static int fat_dir_ioctl(struct inode *inode, struct file *filp, ++ unsigned int cmd, unsigned long arg) + { +- struct fat_ioctl_filldir_callback buf; +- struct dirent __user *d1; +- int ret, short_only, both; ++ struct dirent __user *d1 = (struct dirent __user *)arg; ++ int short_only, both; + + switch (cmd) { + case VFAT_IOCTL_READDIR_SHORT: +@@ -717,7 +740,6 @@ static int fat_dir_ioctl(struct inode * inode, struct file * filp, + return fat_generic_ioctl(inode, filp, cmd, arg); + } + +- d1 = (struct dirent __user *)arg; + if (!access_ok(VERIFY_WRITE, d1, sizeof(struct dirent[2]))) + return -EFAULT; + /* +@@ -728,69 +750,48 @@ static int fat_dir_ioctl(struct inode * inode, struct file * filp, + if (put_user(0, &d1->d_reclen)) + return -EFAULT; + +- buf.dirent = d1; +- buf.result = 0; +- mutex_lock(&inode->i_mutex); +- ret = -ENOENT; +- if (!IS_DEADDIR(inode)) { +- ret = __fat_readdir(inode, filp, &buf, fat_ioctl_filldir, +- short_only, both); +- } +- mutex_unlock(&inode->i_mutex); +- if (ret >= 0) +- ret = buf.result; +- return ret; ++ return fat_ioctl_readdir(inode, filp, d1, fat_ioctl_filldir, ++ short_only, both); + } + + #ifdef CONFIG_COMPAT + #define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) + #define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) + +-static long fat_compat_put_dirent32(struct dirent *d, +- struct compat_dirent __user *d32) +-{ +- if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent))) +- return -EFAULT; +- +- __put_user(d->d_ino, &d32->d_ino); +- __put_user(d->d_off, &d32->d_off); +- __put_user(d->d_reclen, &d32->d_reclen); +- if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen)) +- return -EFAULT; ++FAT_IOCTL_FILLDIR_FUNC(fat_compat_ioctl_filldir, compat_dirent) + +- return 0; +-} +- +-static long fat_compat_dir_ioctl(struct file *file, unsigned cmd, ++static long fat_compat_dir_ioctl(struct file *filp, unsigned cmd, + unsigned long arg) + { +- struct compat_dirent __user *p = compat_ptr(arg); +- int ret; +- mm_segment_t oldfs = get_fs(); +- struct dirent d[2]; ++ struct inode *inode = filp->f_path.dentry->d_inode; ++ struct compat_dirent __user *d1 = compat_ptr(arg); ++ int short_only, both; + + switch (cmd) { +- case VFAT_IOCTL_READDIR_BOTH32: +- cmd = VFAT_IOCTL_READDIR_BOTH; +- break; + case VFAT_IOCTL_READDIR_SHORT32: +- cmd = VFAT_IOCTL_READDIR_SHORT; ++ short_only = 1; ++ both = 0; ++ break; ++ case VFAT_IOCTL_READDIR_BOTH32: ++ short_only = 0; ++ both = 1; + break; + default: + return -ENOIOCTLCMD; + } + +- set_fs(KERNEL_DS); +- lock_kernel(); +- ret = fat_dir_ioctl(file->f_path.dentry->d_inode, file, +- cmd, (unsigned long) &d); +- unlock_kernel(); +- set_fs(oldfs); +- if (ret >= 0) { +- ret |= fat_compat_put_dirent32(&d[0], p); +- ret |= fat_compat_put_dirent32(&d[1], p + 1); +- } +- return ret; ++ if (!access_ok(VERIFY_WRITE, d1, sizeof(struct compat_dirent[2]))) ++ return -EFAULT; ++ /* ++ * Yes, we don't need this put_user() absolutely. However old ++ * code didn't return the right value. So, app use this value, ++ * in order to check whether it is EOF. ++ */ ++ if (put_user(0, &d1->d_reclen)) ++ return -EFAULT; ++ ++ return fat_ioctl_readdir(inode, filp, d1, fat_compat_ioctl_filldir, ++ short_only, both); + } + #endif /* CONFIG_COMPAT */ + +diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c +index 5065baa..3760d02 100644 +--- a/fs/jfs/jfs_logmgr.c ++++ b/fs/jfs/jfs_logmgr.c +@@ -2354,12 +2354,13 @@ int jfsIOWait(void *arg) + lbmStartIO(bp); + spin_lock_irq(&log_redrive_lock); + } +- spin_unlock_irq(&log_redrive_lock); + + if (freezing(current)) { ++ spin_unlock_irq(&log_redrive_lock); + refrigerator(); + } else { + set_current_state(TASK_INTERRUPTIBLE); ++ spin_unlock_irq(&log_redrive_lock); + schedule(); + current->state = TASK_RUNNING; + } +diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c +index 6f24768..79bd03b 100644 +--- a/fs/nfsd/export.c ++++ b/fs/nfsd/export.c +@@ -469,6 +469,13 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) + nd.dentry = NULL; + exp.ex_path = NULL; + ++ /* fs locations */ ++ exp.ex_fslocs.locations = NULL; ++ exp.ex_fslocs.locations_count = 0; ++ exp.ex_fslocs.migrated = 0; ++ ++ exp.ex_uuid = NULL; ++ + if (mesg[mlen-1] != '\n') + return -EINVAL; + mesg[mlen-1] = 0; +@@ -509,13 +516,6 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) + if (exp.h.expiry_time == 0) + goto out; + +- /* fs locations */ +- exp.ex_fslocs.locations = NULL; +- exp.ex_fslocs.locations_count = 0; +- exp.ex_fslocs.migrated = 0; +- +- exp.ex_uuid = NULL; +- + /* flags */ + err = get_int(&mesg, &an_int); + if (err == -ENOENT) +diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c +index c8178b7..2cac562 100644 +--- a/fs/reiserfs/xattr.c ++++ b/fs/reiserfs/xattr.c +@@ -68,7 +68,7 @@ static struct dentry *get_xa_root(struct super_block *sb, int flags) + if (!privroot) + return ERR_PTR(-ENODATA); + +- mutex_lock(&privroot->d_inode->i_mutex); ++ mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR); + if (REISERFS_SB(sb)->xattr_root) { + xaroot = dget(REISERFS_SB(sb)->xattr_root); + goto out; +diff --git a/fs/udf/namei.c b/fs/udf/namei.c +index fe361cd..b254375 100644 +--- a/fs/udf/namei.c ++++ b/fs/udf/namei.c +@@ -878,7 +878,7 @@ static int udf_rmdir(struct inode * dir, struct dentry * dentry) + inode->i_nlink); + clear_nlink(inode); + inode->i_size = 0; +- inode_dec_link_count(inode); ++ inode_dec_link_count(dir); + inode->i_ctime = dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb); + mark_inode_dirty(dir); + +diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h +index d26b755..74d7498 100644 +--- a/include/asm-arm/arch-iop13xx/iop13xx.h ++++ b/include/asm-arm/arch-iop13xx/iop13xx.h +@@ -27,19 +27,24 @@ static inline int iop13xx_cpu_id(void) + #define IOP13XX_PCI_OFFSET IOP13XX_MAX_RAM_SIZE + + /* PCI MAP +- * 0x0000.0000 - 0x8000.0000 1:1 mapping with Physical RAM +- * 0x8000.0000 - 0x8800.0000 PCIX/PCIE memory window (128MB) +-*/ ++ * bus range cpu phys cpu virt note ++ * 0x0000.0000 + 2GB (n/a) (n/a) inbound, 1:1 mapping with Physical RAM ++ * 0x8000.0000 + 928M 0x1.8000.0000 (ioremap) PCIX outbound memory window ++ * 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window ++ * ++ * IO MAP ++ * 0x1000 + 64K 0x0.fffb.1000 0xfec6.1000 PCIX outbound i/o window ++ * 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window ++ */ + #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL + #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL + #define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL +-#define IOP13XX_PCIX_LOWER_IO_BA 0x0fff0000UL ++#define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */ ++#define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL + #define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\ + IOP13XX_PCIX_IO_WINDOW_SIZE - 1) + #define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\ + IOP13XX_PCIX_IO_WINDOW_SIZE - 1) +-#define IOP13XX_PCIX_IO_OFFSET (IOP13XX_PCIX_LOWER_IO_VA -\ +- IOP13XX_PCIX_LOWER_IO_BA) + #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ + (IOP13XX_PCIX_LOWER_IO_PA\ + - IOP13XX_PCIX_LOWER_IO_VA)) +@@ -65,15 +70,14 @@ static inline int iop13xx_cpu_id(void) + #define IOP13XX_PCIE_IO_WINDOW_SIZE 0x10000UL + #define IOP13XX_PCIE_LOWER_IO_PA 0xfffd0000UL + #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL +-#define IOP13XX_PCIE_LOWER_IO_BA 0x0fff0000UL ++#define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */ ++#define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL + #define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\ + IOP13XX_PCIE_IO_WINDOW_SIZE - 1) + #define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\ + IOP13XX_PCIE_IO_WINDOW_SIZE - 1) + #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ + IOP13XX_PCIE_IO_WINDOW_SIZE - 1) +-#define IOP13XX_PCIE_IO_OFFSET (IOP13XX_PCIE_LOWER_IO_VA -\ +- IOP13XX_PCIE_LOWER_IO_BA) + #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ + (IOP13XX_PCIE_LOWER_IO_PA\ + - IOP13XX_PCIE_LOWER_IO_VA)) +diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h +index e01b805..26ec046 100644 +--- a/include/asm-sparc64/openprom.h ++++ b/include/asm-sparc64/openprom.h +@@ -177,7 +177,7 @@ struct linux_nodeops { + /* More fun PROM structures for device probing. */ + #define PROMREG_MAX 24 + #define PROMVADDR_MAX 16 +-#define PROMINTR_MAX 15 ++#define PROMINTR_MAX 32 + + struct linux_prom_registers { + unsigned which_io; /* hi part of physical address */ +diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h +index daa4940..bf92c26 100644 +--- a/include/linux/clocksource.h ++++ b/include/linux/clocksource.h +@@ -48,6 +48,7 @@ struct clocksource; + * @shift: cycle to nanosecond divisor (power of two) + * @flags: flags describing special properties + * @vread: vsyscall based read ++ * @resume: resume function for the clocksource, if necessary + * @cycle_interval: Used internally by timekeeping core, please ignore. + * @xtime_interval: Used internally by timekeeping core, please ignore. + */ +@@ -61,6 +62,7 @@ struct clocksource { + u32 shift; + unsigned long flags; + cycle_t (*vread)(void); ++ void (*resume)(void); + + /* timekeeping specific data, ignore */ + cycle_t cycle_last, cycle_interval; +@@ -198,6 +200,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c, + extern int clocksource_register(struct clocksource*); + extern struct clocksource* clocksource_get_next(void); + extern void clocksource_change_rating(struct clocksource *cs, int rating); ++extern void clocksource_resume(void); + + #ifdef CONFIG_GENERIC_TIME_VSYSCALL + extern void update_vsyscall(struct timespec *ts, struct clocksource *c); +diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h +index 1a52854..b1b0f68 100644 +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -647,8 +647,10 @@ static inline void netif_start_queue(struct net_device *dev) + static inline void netif_wake_queue(struct net_device *dev) + { + #ifdef CONFIG_NETPOLL_TRAP +- if (netpoll_trap()) ++ if (netpoll_trap()) { ++ clear_bit(__LINK_STATE_XOFF, &dev->state); + return; ++ } + #endif + if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) + __netif_schedule(dev); +@@ -656,10 +658,6 @@ static inline void netif_wake_queue(struct net_device *dev) + + static inline void netif_stop_queue(struct net_device *dev) + { +-#ifdef CONFIG_NETPOLL_TRAP +- if (netpoll_trap()) +- return; +-#endif + set_bit(__LINK_STATE_XOFF, &dev->state); + } + +diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h +index 4e6bbce..535e421 100644 +--- a/include/linux/netfilter/nf_conntrack_proto_gre.h ++++ b/include/linux/netfilter/nf_conntrack_proto_gre.h +@@ -87,24 +87,6 @@ int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, + /* delete keymap entries */ + void nf_ct_gre_keymap_destroy(struct nf_conn *ct); + +-/* get pointer to gre key, if present */ +-static inline __be32 *gre_key(struct gre_hdr *greh) +-{ +- if (!greh->key) +- return NULL; +- if (greh->csum || greh->routing) +- return (__be32 *)(greh+sizeof(*greh)+4); +- return (__be32 *)(greh+sizeof(*greh)); +-} +- +-/* get pointer ot gre csum, if present */ +-static inline __sum16 *gre_csum(struct gre_hdr *greh) +-{ +- if (!greh->csum) +- return NULL; +- return (__sum16 *)(greh+sizeof(*greh)); +-} +- + extern void nf_ct_gre_keymap_flush(void); + extern void nf_nat_need_gre(void); + +diff --git a/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h +index e371e0f..d0f36f5 100644 +--- a/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h ++++ b/include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h +@@ -90,25 +90,6 @@ int ip_ct_gre_keymap_add(struct ip_conntrack *ct, + /* delete keymap entries */ + void ip_ct_gre_keymap_destroy(struct ip_conntrack *ct); + +- +-/* get pointer to gre key, if present */ +-static inline __be32 *gre_key(struct gre_hdr *greh) +-{ +- if (!greh->key) +- return NULL; +- if (greh->csum || greh->routing) +- return (__be32 *) (greh+sizeof(*greh)+4); +- return (__be32 *) (greh+sizeof(*greh)); +-} +- +-/* get pointer ot gre csum, if present */ +-static inline __sum16 *gre_csum(struct gre_hdr *greh) +-{ +- if (!greh->csum) +- return NULL; +- return (__sum16 *) (greh+sizeof(*greh)); +-} +- + #endif /* __KERNEL__ */ + + #endif /* _CONNTRACK_PROTO_GRE_H */ +diff --git a/kernel/cpuset.c b/kernel/cpuset.c +index f382b0f..9e45dd1 100644 +--- a/kernel/cpuset.c ++++ b/kernel/cpuset.c +@@ -1751,12 +1751,7 @@ static ssize_t cpuset_tasks_read(struct file *file, char __user *buf, + { + struct ctr_struct *ctr = file->private_data; + +- if (*ppos + nbytes > ctr->bufsz) +- nbytes = ctr->bufsz - *ppos; +- if (copy_to_user(buf, ctr->buf + *ppos, nbytes)) +- return -EFAULT; +- *ppos += nbytes; +- return nbytes; ++ return simple_read_from_buffer(buf, nbytes, ppos, ctr->buf, ctr->bufsz); + } + + static int cpuset_tasks_release(struct inode *unused_inode, struct file *file) +diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c +index fe5c7db..5baee91 100644 +--- a/kernel/time/clocksource.c ++++ b/kernel/time/clocksource.c +@@ -74,6 +74,8 @@ static struct clocksource *watchdog; + static struct timer_list watchdog_timer; + static DEFINE_SPINLOCK(watchdog_lock); + static cycle_t watchdog_last; ++static int watchdog_resumed; ++ + /* + * Interval: 0.5sec Treshold: 0.0625s + */ +@@ -98,15 +100,26 @@ static void clocksource_watchdog(unsigned long data) + struct clocksource *cs, *tmp; + cycle_t csnow, wdnow; + int64_t wd_nsec, cs_nsec; ++ int resumed; + + spin_lock(&watchdog_lock); + ++ resumed = watchdog_resumed; ++ if (unlikely(resumed)) ++ watchdog_resumed = 0; ++ + wdnow = watchdog->read(); + wd_nsec = cyc2ns(watchdog, (wdnow - watchdog_last) & watchdog->mask); + watchdog_last = wdnow; + + list_for_each_entry_safe(cs, tmp, &watchdog_list, wd_list) { + csnow = cs->read(); ++ ++ if (unlikely(resumed)) { ++ cs->wd_last = csnow; ++ continue; ++ } ++ + /* Initialized ? */ + if (!(cs->flags & CLOCK_SOURCE_WATCHDOG)) { + if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) && +@@ -136,6 +149,13 @@ static void clocksource_watchdog(unsigned long data) + } + spin_unlock(&watchdog_lock); + } ++static void clocksource_resume_watchdog(void) ++{ ++ spin_lock(&watchdog_lock); ++ watchdog_resumed = 1; ++ spin_unlock(&watchdog_lock); ++} ++ + static void clocksource_check_watchdog(struct clocksource *cs) + { + struct clocksource *cse; +@@ -182,9 +202,34 @@ static void clocksource_check_watchdog(struct clocksource *cs) + if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) + cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES; + } ++ ++static inline void clocksource_resume_watchdog(void) { } + #endif + + /** ++ * clocksource_resume - resume the clocksource(s) ++ */ ++void clocksource_resume(void) ++{ ++ struct list_head *tmp; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&clocksource_lock, flags); ++ ++ list_for_each(tmp, &clocksource_list) { ++ struct clocksource *cs; ++ ++ cs = list_entry(tmp, struct clocksource, list); ++ if (cs->resume) ++ cs->resume(); ++ } ++ ++ clocksource_resume_watchdog(); ++ ++ spin_unlock_irqrestore(&clocksource_lock, flags); ++} ++ ++/** + * clocksource_get_next - Returns the selected clocksource + * + */ +diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c +index bfda3f7..a96ec9a 100644 +--- a/kernel/time/tick-common.c ++++ b/kernel/time/tick-common.c +@@ -31,7 +31,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); + */ + ktime_t tick_next_period; + ktime_t tick_period; +-static int tick_do_timer_cpu = -1; ++int tick_do_timer_cpu __read_mostly = -1; + DEFINE_SPINLOCK(tick_device_lock); + + /* +@@ -295,6 +295,12 @@ static void tick_shutdown(unsigned int *cpup) + clockevents_exchange_device(dev, NULL); + td->evtdev = NULL; + } ++ /* Transfer the do_timer job away from this cpu */ ++ if (*cpup == tick_do_timer_cpu) { ++ int cpu = first_cpu(cpu_online_map); ++ ++ tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : -1; ++ } + spin_unlock_irqrestore(&tick_device_lock, flags); + } + +diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h +index c9d203b..bb13f27 100644 +--- a/kernel/time/tick-internal.h ++++ b/kernel/time/tick-internal.h +@@ -5,6 +5,7 @@ DECLARE_PER_CPU(struct tick_device, tick_cpu_device); + extern spinlock_t tick_device_lock; + extern ktime_t tick_next_period; + extern ktime_t tick_period; ++extern int tick_do_timer_cpu __read_mostly; + + extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast); + extern void tick_handle_periodic(struct clock_event_device *dev); +diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c +index 51556b9..f4fc867 100644 +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -221,6 +221,18 @@ void tick_nohz_stop_sched_tick(void) + ts->tick_stopped = 1; + ts->idle_jiffies = last_jiffies; + } ++ ++ /* ++ * If this cpu is the one which updates jiffies, then ++ * give up the assignment and let it be taken by the ++ * cpu which runs the tick timer next, which might be ++ * this cpu as well. If we don't drop this here the ++ * jiffies might be stale and do_timer() never ++ * invoked. ++ */ ++ if (cpu == tick_do_timer_cpu) ++ tick_do_timer_cpu = -1; ++ + /* + * calculate the expiry time for the next timer wheel + * timer +@@ -338,12 +350,24 @@ static void tick_nohz_handler(struct clock_event_device *dev) + { + struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); + struct pt_regs *regs = get_irq_regs(); ++ int cpu = smp_processor_id(); + ktime_t now = ktime_get(); + + dev->next_event.tv64 = KTIME_MAX; + ++ /* ++ * Check if the do_timer duty was dropped. We don't care about ++ * concurrency: This happens only when the cpu in charge went ++ * into a long sleep. If two cpus happen to assign themself to ++ * this duty, then the jiffies update is still serialized by ++ * xtime_lock. ++ */ ++ if (unlikely(tick_do_timer_cpu == -1)) ++ tick_do_timer_cpu = cpu; ++ + /* Check, if the jiffies need an update */ +- tick_do_update_jiffies64(now); ++ if (tick_do_timer_cpu == cpu) ++ tick_do_update_jiffies64(now); + + /* + * When we are idle and the tick is stopped, we have to touch +@@ -431,9 +455,23 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer) + struct hrtimer_cpu_base *base = timer->base->cpu_base; + struct pt_regs *regs = get_irq_regs(); + ktime_t now = ktime_get(); ++ int cpu = smp_processor_id(); ++ ++#ifdef CONFIG_NO_HZ ++ /* ++ * Check if the do_timer duty was dropped. We don't care about ++ * concurrency: This happens only when the cpu in charge went ++ * into a long sleep. If two cpus happen to assign themself to ++ * this duty, then the jiffies update is still serialized by ++ * xtime_lock. ++ */ ++ if (unlikely(tick_do_timer_cpu == -1)) ++ tick_do_timer_cpu = cpu; ++#endif + + /* Check, if the jiffies need an update */ +- tick_do_update_jiffies64(now); ++ if (tick_do_timer_cpu == cpu) ++ tick_do_update_jiffies64(now); + + /* + * Do not call, when we are not in irq context and have +diff --git a/kernel/timer.c b/kernel/timer.c +index dd6c2c1..e045774 100644 +--- a/kernel/timer.c ++++ b/kernel/timer.c +@@ -1903,6 +1903,8 @@ unregister_time_interpolator(struct time_interpolator *ti) + prev = &curr->next; + } + ++ clocksource_resume(); ++ + write_seqlock_irqsave(&xtime_lock, flags); + if (ti == time_interpolator) { + /* we lost the best time-interpolator: */ +diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c +index fceb97c..7e1e311 100644 +--- a/lib/zlib_inflate/inflate.c ++++ b/lib/zlib_inflate/inflate.c +@@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flush) + + strm->data_type = state->bits + (state->last ? 64 : 0) + + (state->mode == TYPE ? 128 : 0); +- if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) +- ret = Z_BUF_ERROR; + + if (flush == Z_PACKET_FLUSH && ret == Z_OK && +- (strm->avail_out != 0 || strm->avail_in == 0)) ++ strm->avail_out != 0 && strm->avail_in == 0) + return zlib_inflateSyncPacket(strm); ++ ++ if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) ++ ret = Z_BUF_ERROR; ++ + return ret; + } + +diff --git a/mm/hugetlb.c b/mm/hugetlb.c +index 36db012..88e708b 100644 +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -140,6 +140,8 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma, + return page; + + fail: ++ if (vma->vm_flags & VM_MAYSHARE) ++ resv_huge_pages++; + spin_unlock(&hugetlb_lock); + return NULL; + } +diff --git a/mm/oom_kill.c b/mm/oom_kill.c +index 3791edf..b3a3dd6 100644 +--- a/mm/oom_kill.c ++++ b/mm/oom_kill.c +@@ -397,6 +397,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) + struct task_struct *p; + unsigned long points = 0; + unsigned long freed = 0; ++ int constraint; + + blocking_notifier_call_chain(&oom_notify_list, 0, &freed); + if (freed > 0) +@@ -411,14 +412,15 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) + show_mem(); + } + +- cpuset_lock(); +- read_lock(&tasklist_lock); +- + /* + * Check if there were limitations on the allocation (only relevant for + * NUMA) that may require different handling. + */ +- switch (constrained_alloc(zonelist, gfp_mask)) { ++ constraint = constrained_alloc(zonelist, gfp_mask); ++ cpuset_lock(); ++ read_lock(&tasklist_lock); ++ ++ switch (constraint) { + case CONSTRAINT_MEMORY_POLICY: + oom_kill_process(current, points, + "No available memory (MPOL_BIND)"); +diff --git a/mm/slob.c b/mm/slob.c +index 5adc29c..c683d35 100644 +--- a/mm/slob.c ++++ b/mm/slob.c +@@ -150,15 +150,6 @@ static void slob_free(void *block, int size) + spin_unlock_irqrestore(&slob_lock, flags); + } + +-static int FASTCALL(find_order(int size)); +-static int fastcall find_order(int size) +-{ +- int order = 0; +- for ( ; size > 4096 ; size >>=1) +- order++; +- return order; +-} +- + void *__kmalloc(size_t size, gfp_t gfp) + { + slob_t *m; +@@ -174,7 +165,7 @@ void *__kmalloc(size_t size, gfp_t gfp) + if (!bb) + return 0; + +- bb->order = find_order(size); ++ bb->order = get_order(size); + bb->pages = (void *)__get_free_pages(gfp, bb->order); + + if (bb->pages) { +@@ -284,7 +275,7 @@ void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags) + if (c->size < PAGE_SIZE) + b = slob_alloc(c->size, flags, c->align); + else +- b = (void *)__get_free_pages(flags, find_order(c->size)); ++ b = (void *)__get_free_pages(flags, get_order(c->size)); + + if (c->ctor) + c->ctor(b, c, SLAB_CTOR_CONSTRUCTOR); +@@ -311,7 +302,7 @@ void kmem_cache_free(struct kmem_cache *c, void *b) + if (c->size < PAGE_SIZE) + slob_free(b, c->size); + else +- free_pages((unsigned long)b, find_order(c->size)); ++ free_pages((unsigned long)b, get_order(c->size)); + } + EXPORT_SYMBOL(kmem_cache_free); + +diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c +index cac06c4..444a56b 100644 +--- a/net/ipv4/fib_frontend.c ++++ b/net/ipv4/fib_frontend.c +@@ -777,6 +777,10 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) + .tos = frn->fl_tos, + .scope = frn->fl_scope } } }; + ++#ifdef CONFIG_IP_MULTIPLE_TABLES ++ res.r = NULL; ++#endif ++ + frn->err = -ENOENT; + if (tb) { + local_bh_disable(); +diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c +index 23b99ae..75bd597 100644 +--- a/net/ipv4/netfilter/ip_conntrack_core.c ++++ b/net/ipv4/netfilter/ip_conntrack_core.c +@@ -302,7 +302,6 @@ destroy_conntrack(struct nf_conntrack *nfct) + { + struct ip_conntrack *ct = (struct ip_conntrack *)nfct; + struct ip_conntrack_protocol *proto; +- struct ip_conntrack_helper *helper; + typeof(ip_conntrack_destroyed) destroyed; + + DEBUGP("destroy_conntrack(%p)\n", ct); +@@ -312,10 +311,6 @@ destroy_conntrack(struct nf_conntrack *nfct) + ip_conntrack_event(IPCT_DESTROY, ct); + set_bit(IPS_DYING_BIT, &ct->status); + +- helper = ct->helper; +- if (helper && helper->destroy) +- helper->destroy(ct); +- + /* To make sure we don't get any weird locking issues here: + * destroy_conntrack() MUST NOT be called with a write lock + * to ip_conntrack_lock!!! -HW */ +@@ -356,6 +351,11 @@ destroy_conntrack(struct nf_conntrack *nfct) + static void death_by_timeout(unsigned long ul_conntrack) + { + struct ip_conntrack *ct = (void *)ul_conntrack; ++ struct ip_conntrack_helper *helper; ++ ++ helper = ct->helper; ++ if (helper && helper->destroy) ++ helper->destroy(ct); + + write_lock_bh(&ip_conntrack_lock); + /* Inside lock so preempt is disabled on module removal path. +diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c +index e694299..b86479a 100644 +--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c ++++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c +@@ -460,7 +460,8 @@ static int sctp_new(struct ip_conntrack *conntrack, + SCTP_CONNTRACK_NONE, sch->type); + + /* Invalid: delete conntrack */ +- if (newconntrack == SCTP_CONNTRACK_MAX) { ++ if (newconntrack == SCTP_CONNTRACK_NONE || ++ newconntrack == SCTP_CONNTRACK_MAX) { + DEBUGP("ip_conntrack_sctp: invalid new deleting.\n"); + return 0; + } +diff --git a/net/ipv4/netfilter/ip_nat_proto_gre.c b/net/ipv4/netfilter/ip_nat_proto_gre.c +index 9581020..e3146a3 100644 +--- a/net/ipv4/netfilter/ip_nat_proto_gre.c ++++ b/net/ipv4/netfilter/ip_nat_proto_gre.c +@@ -70,6 +70,11 @@ gre_unique_tuple(struct ip_conntrack_tuple *tuple, + __be16 *keyptr; + unsigned int min, i, range_size; + ++ /* If there is no master conntrack we are not PPTP, ++ do not change tuples */ ++ if (!conntrack->master) ++ return 0; ++ + if (maniptype == IP_NAT_MANIP_SRC) + keyptr = &tuple->src.u.gre.key; + else +@@ -122,18 +127,9 @@ gre_manip_pkt(struct sk_buff **pskb, + if (maniptype == IP_NAT_MANIP_DST) { + /* key manipulation is always dest */ + switch (greh->version) { +- case 0: +- if (!greh->key) { +- DEBUGP("can't nat GRE w/o key\n"); +- break; +- } +- if (greh->csum) { +- /* FIXME: Never tested this code... */ +- nf_proto_csum_replace4(gre_csum(greh), *pskb, +- *(gre_key(greh)), +- tuple->dst.u.gre.key, 0); +- } +- *(gre_key(greh)) = tuple->dst.u.gre.key; ++ case GRE_VERSION_1701: ++ /* We do not currently NAT any GREv0 packets. ++ * Try to behave like "ip_nat_proto_unknown" */ + break; + case GRE_VERSION_PPTP: + DEBUGP("call_id -> 0x%04x\n", +diff --git a/net/ipv4/netfilter/nf_nat_proto_gre.c b/net/ipv4/netfilter/nf_nat_proto_gre.c +index e5a34c1..ca3ff84 100644 +--- a/net/ipv4/netfilter/nf_nat_proto_gre.c ++++ b/net/ipv4/netfilter/nf_nat_proto_gre.c +@@ -72,6 +72,11 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, + __be16 *keyptr; + unsigned int min, i, range_size; + ++ /* If there is no master conntrack we are not PPTP, ++ do not change tuples */ ++ if (!conntrack->master) ++ return 0; ++ + if (maniptype == IP_NAT_MANIP_SRC) + keyptr = &tuple->src.u.gre.key; + else +@@ -122,18 +127,9 @@ gre_manip_pkt(struct sk_buff **pskb, unsigned int iphdroff, + if (maniptype != IP_NAT_MANIP_DST) + return 1; + switch (greh->version) { +- case 0: +- if (!greh->key) { +- DEBUGP("can't nat GRE w/o key\n"); +- break; +- } +- if (greh->csum) { +- /* FIXME: Never tested this code... */ +- nf_proto_csum_replace4(gre_csum(greh), *pskb, +- *(gre_key(greh)), +- tuple->dst.u.gre.key, 0); +- } +- *(gre_key(greh)) = tuple->dst.u.gre.key; ++ case GRE_VERSION_1701: ++ /* We do not currently NAT any GREv0 packets. ++ * Try to behave like "nf_nat_proto_unknown" */ + break; + case GRE_VERSION_PPTP: + DEBUGP("call_id -> 0x%04x\n", ntohs(tuple->dst.u.gre.key)); +diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c +index 3834b10..824c6b9 100644 +--- a/net/ipv4/tcp.c ++++ b/net/ipv4/tcp.c +@@ -1759,8 +1759,7 @@ int tcp_disconnect(struct sock *sk, int flags) + tcp_clear_retrans(tp); + inet_csk_delack_init(sk); + sk->sk_send_head = NULL; +- tp->rx_opt.saw_tstamp = 0; +- tcp_sack_reset(&tp->rx_opt); ++ memset(&tp->rx_opt, 0, sizeof(tp->rx_opt)); + __sk_dst_reset(sk); + + BUG_TRAP(!inet->num || icsk->icsk_bind_hash); +diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c +index 452a82c..a541137 100644 +--- a/net/ipv6/addrconf.c ++++ b/net/ipv6/addrconf.c +@@ -2281,8 +2281,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, + break; + + case NETDEV_CHANGENAME: +-#ifdef CONFIG_SYSCTL + if (idev) { ++ snmp6_unregister_dev(idev); ++#ifdef CONFIG_SYSCTL + addrconf_sysctl_unregister(&idev->cnf); + neigh_sysctl_unregister(idev->nd_parms); + neigh_sysctl_register(dev, idev->nd_parms, +@@ -2290,8 +2291,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, + &ndisc_ifinfo_sysctl_change, + NULL); + addrconf_sysctl_register(idev, &idev->cnf); +- } + #endif ++ snmp6_register_dev(idev); ++ } + break; + }; + +@@ -4060,6 +4062,10 @@ int __init addrconf_init(void) + return err; + + ip6_null_entry.rt6i_idev = in6_dev_get(&loopback_dev); ++#ifdef CONFIG_IPV6_MULTIPLE_TABLES ++ ip6_prohibit_entry.rt6i_idev = in6_dev_get(&loopback_dev); ++ ip6_blk_hole_entry.rt6i_idev = in6_dev_get(&loopback_dev); ++#endif + + register_netdevice_notifier(&ipv6_dev_notf); + +diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c +index fb39604..794b930 100644 +--- a/net/ipv6/exthdrs.c ++++ b/net/ipv6/exthdrs.c +@@ -396,6 +396,7 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp) + + switch (hdr->type) { + #ifdef CONFIG_IPV6_MIP6 ++ case IPV6_SRCRT_TYPE_2: + break; + #endif + case IPV6_SRCRT_TYPE_0: +@@ -651,6 +652,14 @@ EXPORT_SYMBOL_GPL(ipv6_invert_rthdr); + Hop-by-hop options. + **********************************/ + ++/* ++ * Note: we cannot rely on skb->dst before we assign it in ip6_route_input(). ++ */ ++static inline struct inet6_dev *ipv6_skb_idev(struct sk_buff *skb) ++{ ++ return skb->dst ? ip6_dst_idev(skb->dst) : __in6_dev_get(skb->dev); ++} ++ + /* Router Alert as of RFC 2711 */ + + static int ipv6_hop_ra(struct sk_buff **skbp, int optoff) +@@ -677,25 +686,25 @@ static int ipv6_hop_jumbo(struct sk_buff **skbp, int optoff) + if (skb->nh.raw[optoff+1] != 4 || (optoff&3) != 2) { + LIMIT_NETDEBUG(KERN_DEBUG "ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", + skb->nh.raw[optoff+1]); +- IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), ++ IP6_INC_STATS_BH(ipv6_skb_idev(skb), + IPSTATS_MIB_INHDRERRORS); + goto drop; + } + + pkt_len = ntohl(*(__be32*)(skb->nh.raw+optoff+2)); + if (pkt_len <= IPV6_MAXPLEN) { +- IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); ++ IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INHDRERRORS); + icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff+2); + return 0; + } + if (skb->nh.ipv6h->payload_len) { +- IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); ++ IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INHDRERRORS); + icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff); + return 0; + } + + if (pkt_len > skb->len - sizeof(struct ipv6hdr)) { +- IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INTRUNCATEDPKTS); ++ IP6_INC_STATS_BH(ipv6_skb_idev(skb), IPSTATS_MIB_INTRUNCATEDPKTS); + goto drop; + } + +diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c +index 61e7a6c..1b34ee5 100644 +--- a/net/ipv6/ip6_input.c ++++ b/net/ipv6/ip6_input.c +@@ -235,7 +235,7 @@ int ip6_mc_input(struct sk_buff *skb) + IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); + + hdr = skb->nh.ipv6h; +- deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) || ++ deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) || + ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL); + + /* +diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c +index 3055169..9fa3ffb 100644 +--- a/net/ipv6/ip6_output.c ++++ b/net/ipv6/ip6_output.c +@@ -449,10 +449,17 @@ int ip6_forward(struct sk_buff *skb) + */ + if (xrlim_allow(dst, 1*HZ)) + ndisc_send_redirect(skb, n, target); +- } else if (ipv6_addr_type(&hdr->saddr)&(IPV6_ADDR_MULTICAST|IPV6_ADDR_LOOPBACK +- |IPV6_ADDR_LINKLOCAL)) { ++ } else { ++ int addrtype = ipv6_addr_type(&hdr->saddr); ++ + /* This check is security critical. */ +- goto error; ++ if (addrtype & (IPV6_ADDR_MULTICAST|IPV6_ADDR_LOOPBACK)) ++ goto error; ++ if (addrtype & IPV6_ADDR_LINKLOCAL) { ++ icmpv6_send(skb, ICMPV6_DEST_UNREACH, ++ ICMPV6_NOT_NEIGHBOUR, 0, skb->dev); ++ goto error; ++ } + } + + if (skb->len > dst_mtu(dst)) { +diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c +index fa3fb50..d57853d 100644 +--- a/net/ipv6/proc.c ++++ b/net/ipv6/proc.c +@@ -236,6 +236,7 @@ int snmp6_unregister_dev(struct inet6_dev *idev) + return -EINVAL; + remove_proc_entry(idev->stats.proc_dir_entry->name, + proc_net_devsnmp6); ++ idev->stats.proc_dir_entry = NULL; + return 0; + } + +diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c +index 93c4223..dff33cc 100644 +--- a/net/ipv6/xfrm6_tunnel.c ++++ b/net/ipv6/xfrm6_tunnel.c +@@ -261,7 +261,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb) + __be32 spi; + + spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr); +- return xfrm6_rcv_spi(skb, spi); ++ return xfrm6_rcv_spi(skb, spi) > 0 ? : 0; + } + + static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, +diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c +index b3a70eb..ce28fdd 100644 +--- a/net/netfilter/nf_conntrack_core.c ++++ b/net/netfilter/nf_conntrack_core.c +@@ -315,7 +315,6 @@ static void + destroy_conntrack(struct nf_conntrack *nfct) + { + struct nf_conn *ct = (struct nf_conn *)nfct; +- struct nf_conn_help *help = nfct_help(ct); + struct nf_conntrack_l3proto *l3proto; + struct nf_conntrack_l4proto *l4proto; + typeof(nf_conntrack_destroyed) destroyed; +@@ -327,9 +326,6 @@ destroy_conntrack(struct nf_conntrack *nfct) + nf_conntrack_event(IPCT_DESTROY, ct); + set_bit(IPS_DYING_BIT, &ct->status); + +- if (help && help->helper && help->helper->destroy) +- help->helper->destroy(ct); +- + /* To make sure we don't get any weird locking issues here: + * destroy_conntrack() MUST NOT be called with a write lock + * to nf_conntrack_lock!!! -HW */ +@@ -375,6 +371,10 @@ destroy_conntrack(struct nf_conntrack *nfct) + static void death_by_timeout(unsigned long ul_conntrack) + { + struct nf_conn *ct = (void *)ul_conntrack; ++ struct nf_conn_help *help = nfct_help(ct); ++ ++ if (help && help->helper && help->helper->destroy) ++ help->helper->destroy(ct); + + write_lock_bh(&nf_conntrack_lock); + /* Inside lock so preempt is disabled on module removal path. +diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c +index 3c80558..b53bc64 100644 +--- a/net/netfilter/nf_conntrack_proto_sctp.c ++++ b/net/netfilter/nf_conntrack_proto_sctp.c +@@ -469,7 +469,8 @@ static int sctp_new(struct nf_conn *conntrack, const struct sk_buff *skb, + SCTP_CONNTRACK_NONE, sch->type); + + /* Invalid: delete conntrack */ +- if (newconntrack == SCTP_CONNTRACK_MAX) { ++ if (newconntrack == SCTP_CONNTRACK_NONE || ++ newconntrack == SCTP_CONNTRACK_MAX) { + DEBUGP("nf_conntrack_sctp: invalid new deleting.\n"); + return 0; + } +diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c +index de889f2..a86f36b 100644 +--- a/net/sched/sch_prio.c ++++ b/net/sched/sch_prio.c +@@ -74,7 +74,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) + band = res.classid; + } + band = TC_H_MIN(band) - 1; +- if (band > q->bands) ++ if (band >= q->bands) + return q->queues[q->prio2band[0]]; + + return q->queues[band]; +diff --git a/net/sctp/socket.c b/net/sctp/socket.c +index a1d026f..843c928 100644 +--- a/net/sctp/socket.c ++++ b/net/sctp/socket.c +@@ -3847,7 +3847,7 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, + memcpy(&temp, &from->ipaddr, sizeof(temp)); + sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); + addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; +- if(space_left < addrlen) ++ if (space_left < addrlen) + return -ENOMEM; + if (copy_to_user(to, &temp, addrlen)) + return -EFAULT; +@@ -3936,8 +3936,9 @@ done: + /* Helper function that copies local addresses to user and returns the number + * of addresses copied. + */ +-static int sctp_copy_laddrs_to_user_old(struct sock *sk, __u16 port, int max_addrs, +- void __user *to) ++static int sctp_copy_laddrs_old(struct sock *sk, __u16 port, ++ int max_addrs, void *to, ++ int *bytes_copied) + { + struct list_head *pos, *next; + struct sctp_sockaddr_entry *addr; +@@ -3954,10 +3955,10 @@ static int sctp_copy_laddrs_to_user_old(struct sock *sk, __u16 port, int max_add + sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), + &temp); + addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; +- if (copy_to_user(to, &temp, addrlen)) +- return -EFAULT; ++ memcpy(to, &temp, addrlen); + + to += addrlen; ++ *bytes_copied += addrlen; + cnt ++; + if (cnt >= max_addrs) break; + } +@@ -3965,8 +3966,8 @@ static int sctp_copy_laddrs_to_user_old(struct sock *sk, __u16 port, int max_add + return cnt; + } + +-static int sctp_copy_laddrs_to_user(struct sock *sk, __u16 port, +- void __user **to, size_t space_left) ++static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to, ++ size_t space_left, int *bytes_copied) + { + struct list_head *pos, *next; + struct sctp_sockaddr_entry *addr; +@@ -3983,14 +3984,14 @@ static int sctp_copy_laddrs_to_user(struct sock *sk, __u16 port, + sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), + &temp); + addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; +- if(space_leftaddress_list.next, + struct sctp_sockaddr_entry, list); + if (sctp_is_any(&addr->a)) { +- cnt = sctp_copy_laddrs_to_user_old(sk, bp->port, +- getaddrs.addr_num, +- to); +- if (cnt < 0) { +- err = cnt; +- goto unlock; +- } ++ cnt = sctp_copy_laddrs_old(sk, bp->port, ++ getaddrs.addr_num, ++ addrs, &bytes_copied); + goto copy_getaddrs; + } + } + ++ buf = addrs; + list_for_each(pos, &bp->address_list) { + addr = list_entry(pos, struct sctp_sockaddr_entry, list); + memcpy(&temp, &addr->a, sizeof(temp)); + sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); + addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; +- if (copy_to_user(to, &temp, addrlen)) { +- err = -EFAULT; +- goto unlock; +- } +- to += addrlen; ++ memcpy(buf, &temp, addrlen); ++ buf += addrlen; ++ bytes_copied += addrlen; + cnt ++; + if (cnt >= getaddrs.addr_num) break; + } + + copy_getaddrs: ++ sctp_read_unlock(addr_lock); ++ ++ /* copy the entire address list into the user provided space */ ++ if (copy_to_user(to, addrs, bytes_copied)) { ++ err = -EFAULT; ++ goto error; ++ } ++ ++ /* copy the leading structure back to user */ + getaddrs.addr_num = cnt; + if (copy_to_user(optval, &getaddrs, sizeof(struct sctp_getaddrs_old))) + err = -EFAULT; + +-unlock: +- sctp_read_unlock(addr_lock); ++error: ++ kfree(addrs); + return err; + } + +@@ -4101,7 +4118,9 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len, + rwlock_t *addr_lock; + int err = 0; + size_t space_left; +- int bytes_copied; ++ int bytes_copied = 0; ++ void *addrs; ++ void *buf; + + if (len <= sizeof(struct sctp_getaddrs)) + return -EINVAL; +@@ -4129,6 +4148,9 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len, + to = optval + offsetof(struct sctp_getaddrs,addrs); + space_left = len - sizeof(struct sctp_getaddrs) - + offsetof(struct sctp_getaddrs,addrs); ++ addrs = kmalloc(space_left, GFP_KERNEL); ++ if (!addrs) ++ return -ENOMEM; + + sctp_read_lock(addr_lock); + +@@ -4139,41 +4161,47 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len, + addr = list_entry(bp->address_list.next, + struct sctp_sockaddr_entry, list); + if (sctp_is_any(&addr->a)) { +- cnt = sctp_copy_laddrs_to_user(sk, bp->port, +- &to, space_left); ++ cnt = sctp_copy_laddrs(sk, bp->port, addrs, ++ space_left, &bytes_copied); + if (cnt < 0) { + err = cnt; +- goto unlock; ++ goto error; + } + goto copy_getaddrs; + } + } + ++ buf = addrs; + list_for_each(pos, &bp->address_list) { + addr = list_entry(pos, struct sctp_sockaddr_entry, list); + memcpy(&temp, &addr->a, sizeof(temp)); + sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); + addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; +- if(space_left < addrlen) +- return -ENOMEM; /*fixme: right error?*/ +- if (copy_to_user(to, &temp, addrlen)) { +- err = -EFAULT; +- goto unlock; ++ if (space_left < addrlen) { ++ err = -ENOMEM; /*fixme: right error?*/ ++ goto error; + } +- to += addrlen; ++ memcpy(buf, &temp, addrlen); ++ buf += addrlen; ++ bytes_copied += addrlen; + cnt ++; + space_left -= addrlen; + } + + copy_getaddrs: ++ sctp_read_unlock(addr_lock); ++ ++ if (copy_to_user(to, addrs, bytes_copied)) { ++ err = -EFAULT; ++ goto error; ++ } + if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) + return -EFAULT; +- bytes_copied = ((char __user *)to) - optval; + if (put_user(bytes_copied, optlen)) + return -EFAULT; + +-unlock: +- sctp_read_unlock(addr_lock); ++error: ++ kfree(addrs); + return err; + } + +@@ -4961,7 +4989,12 @@ int sctp_inet_listen(struct socket *sock, int backlog) + /* Allocate HMAC for generating cookie. */ + if (sctp_hmac_alg) { + tfm = crypto_alloc_hash(sctp_hmac_alg, 0, CRYPTO_ALG_ASYNC); +- if (!tfm) { ++ if (IS_ERR(tfm)) { ++ if (net_ratelimit()) { ++ printk(KERN_INFO ++ "SCTP: failed to load transform for %s: %ld\n", ++ sctp_hmac_alg, PTR_ERR(tfm)); ++ } + err = -ENOSYS; + goto out; + } +diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c +index db298b5..c678f5f 100644 +--- a/net/sunrpc/auth_gss/svcauth_gss.c ++++ b/net/sunrpc/auth_gss/svcauth_gss.c +@@ -1196,13 +1196,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) + if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, + integ_len)) + BUG(); +- if (resbuf->page_len == 0 +- && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE +- < PAGE_SIZE) { +- BUG_ON(resbuf->tail[0].iov_len); +- /* Use head for everything */ +- resv = &resbuf->head[0]; +- } else if (resbuf->tail[0].iov_base == NULL) { ++ if (resbuf->tail[0].iov_base == NULL) { + if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) + goto out_err; + resbuf->tail[0].iov_base = resbuf->head[0].iov_base +diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c +index 785c3e3..ba89293 100644 +--- a/net/xfrm/xfrm_policy.c ++++ b/net/xfrm/xfrm_policy.c +@@ -782,6 +782,10 @@ struct xfrm_policy *xfrm_policy_byid(u8 type, int dir, u32 id, int delete, + struct hlist_head *chain; + struct hlist_node *entry; + ++ *err = -ENOENT; ++ if (xfrm_policy_id2dir(id) != dir) ++ return NULL; ++ + *err = 0; + write_lock_bh(&xfrm_policy_lock); + chain = xfrm_policy_byidx + idx_hash(id); +diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c +index 6bc7e7c..8912c0f 100644 +--- a/scripts/basic/fixdep.c ++++ b/scripts/basic/fixdep.c +@@ -249,6 +249,8 @@ void parse_config_file(char *map, size_t len) + found: + if (!memcmp(q - 7, "_MODULE", 7)) + q -= 7; ++ if( (q-p-7) < 0 ) ++ continue; + use_config(p+7, q-p-7); + } + } +diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c +index c94291b..a6f8992 100644 +--- a/sound/pci/hda/patch_sigmatel.c ++++ b/sound/pci/hda/patch_sigmatel.c +@@ -1751,6 +1751,7 @@ static int stac92xx_resume(struct hda_codec *codec) + + stac92xx_init(codec); + stac92xx_set_config_regs(codec); ++ snd_hda_resume_ctls(codec, spec->mixer); + for (i = 0; i < spec->num_mixers; i++) + snd_hda_resume_ctls(codec, spec->mixers[i]); + if (spec->multiout.dig_out_nid) diff --git a/packages/linux/linux-ezx-2.6.21/patches/pcap-ts.patch b/packages/linux/linux-ezx-2.6.21/patches/pcap-ts.patch new file mode 100755 index 0000000000..28b9c557d3 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/pcap-ts.patch @@ -0,0 +1,404 @@ +Index: linux-2.6.21/drivers/input/touchscreen/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-06-02 20:17:58.000000000 -0300 ++++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-06-02 20:18:40.000000000 -0300 +@@ -164,4 +164,13 @@ + To compile this driver as a module, choose M here: the + module will be called ucb1400_ts. + ++config TOUCHSCREEN_PCAP ++ tristate "Motorola PCAP touchscreen" ++ depends on EZX_PCAP ++ help ++ Say Y here if you have a Motorola EZX telephone and ++ want to support the built-in touchscreen. ++ ++ If unsure, say N. ++ + endif +Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-06-02 20:19:39.000000000 -0300 +@@ -0,0 +1,372 @@ ++/* ++ * pcap_ts.c - Touchscreen driver for Motorola PCAP2 based touchscreen as found ++ * in the EZX phone platform. ++ * ++ * Copyright (C) 2006 Harald Welte ++ * Copyright (C) 2007 Daniel Ribeiro ++ * ++ * Based on information found in the original Motorola 2.4.x ezx-ts.c driver. ++ * ++ * 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. ++ * ++ * TODO: ++ * split this in a hardirq handler and a tasklet/bh ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#if 0 ++#define DEBUGP(x, args ...) printk(x, ## args) ++#else ++#define DEBUGP(x, args ...) ++#endif ++ ++#define PRESSURE 1 ++#define COORDINATE 2 ++#define STANDBY 3 ++ ++extern int ezx_pcap_read(u_int8_t, u_int32_t *); ++extern int ezx_pcap_write(u_int8_t, u_int32_t); ++extern int ezx_pcap_bit_set(u_int32_t, u_int8_t); ++ ++struct pcap_ts { ++ int irq_xy; ++ int irq_touch; ++ struct input_dev *input; ++ struct timer_list timer; ++ ++ u_int16_t x, y; ++ u_int16_t pressure; ++ ++ u_int8_t read_state; ++}; ++ ++#define X_AXIS_MIN 0 ++#define X_AXIS_MAX 1023 ++ ++#define Y_AXIS_MAX X_AXIS_MAX ++#define Y_AXIS_MIN X_AXIS_MIN ++ ++#define PRESSURE_MAX X_AXIS_MAX ++#define PRESSURE_MIN X_AXIS_MIN ++ ++/* if we try to read faster, pressure reading becomes unreliable */ ++#define SAMPLE_INTERVAL (HZ/50) ++ ++ ++static void pcap_ts_mode(u_int32_t mode) ++{ ++ u_int32_t tmp; ++ ++ ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); ++ tmp &= ~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK; ++ tmp |= mode; ++ ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); ++} ++ ++/* issue a XY read command to the ADC of PCAP2. Well get an ADCDONE2 interrupt ++ * once the result of the conversion is available */ ++static void pcap_ts_start_xy_read(struct pcap_ts *pcap_ts) ++{ ++ u_int32_t tmp; ++ ++ ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); ++ tmp &= SSP_PCAP_ADC_START_VALUE_SET_MASK; ++ tmp |= SSP_PCAP_ADC_START_VALUE; ++ ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC2_ASC, 1); ++} ++ ++/* read the XY result from the ADC of PCAP2 */ ++static void pcap_ts_get_xy_value(struct pcap_ts *pcap_ts) ++{ ++ u_int32_t tmp; ++ ++ ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp); ++ ++ if (pcap_ts->read_state == COORDINATE && !(tmp & 0x00400000)) { ++ pcap_ts->x = (tmp & SSP_PCAP_ADD1_VALUE_MASK); ++ pcap_ts->y = (tmp & SSP_PCAP_ADD2_VALUE_MASK) ++ >>SSP_PCAP_ADD2_VALUE_SHIFT; ++ } else { ++ pcap_ts->pressure = (tmp & SSP_PCAP_ADD2_VALUE_MASK) ++ >>SSP_PCAP_ADD2_VALUE_SHIFT; ++ } ++ ++} ++ ++/* PCAP2 interrupts us when ADC conversion result is available */ ++static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id) ++{ ++ struct pcap_ts *pcap_ts = dev_id; ++ ++ pcap_ts_get_xy_value(pcap_ts); ++ DEBUGP(KERN_DEBUG "%s X=%4d, Y=%4d Z=%4d ", ++ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS", ++ pcap_ts->x, pcap_ts->y, pcap_ts->pressure); ++ ++ switch (pcap_ts->read_state) { ++ case PRESSURE: ++ if (pcap_ts->pressure >= PRESSURE_MAX || ++ pcap_ts->pressure <= PRESSURE_MIN ) { ++ /* pen has been released (or cant read pressure - WM)*/ ++ DEBUGP("UP\n"); ++ /* do nothing */ ++ } else { ++ /* pen has been touched down */ ++ DEBUGP("DOWN\n"); ++ input_report_key(pcap_ts->input, BTN_TOUCH, 1); ++ input_report_abs(pcap_ts->input, ABS_PRESSURE, pcap_ts->pressure); ++ } ++ /* switch state machine into coordinate read mode */ ++ pcap_ts->read_state = COORDINATE; ++ pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); ++ pcap_ts_start_xy_read(pcap_ts); ++ break; ++ case COORDINATE: ++ if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || ++ pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { ++ /* pen has been released */ ++ DEBUGP("UP END\n"); ++ ++ input_report_key(pcap_ts->input, BTN_TOUCH, 0); ++ input_report_abs(pcap_ts->input, ABS_PRESSURE, 0); ++ ++ /* no need for timer, we'll get interrupted with ++ * next touch down event */ ++ del_timer(&pcap_ts->timer); ++ ++ /* ask PCAP2 to interrupt us if touch event happens ++ * again */ ++ pcap_ts->read_state = STANDBY; ++ pcap_ts_mode(PCAP_TS_STANDBY_MODE); ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); ++ } else { ++ DEBUGP("DOWN\n"); ++ input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x); ++ input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y); ++ ++ /* switch back to pressure read mode */ ++ pcap_ts->read_state = PRESSURE; ++ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); ++ mod_timer(&pcap_ts->timer, jiffies + SAMPLE_INTERVAL); ++ } ++ input_sync(pcap_ts->input); ++ break; ++ default: ++ DEBUGP("ERROR\n"); ++ break; ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++/* PCAP2 interrupts us if the pen touches down (interrupts also on pen up - WM)*/ ++static irqreturn_t pcap_ts_irq_touch(int irq, void *dev_id) ++{ ++ struct pcap_ts *pcap_ts = dev_id; ++ ++ /* mask Touchscreen interrupt bit, prevents further touch events ++ * from being reported to us until we're finished with reading ++ * both pressure and x/y from ADC */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 1); ++ ++ DEBUGP("touched!!\n"); ++ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); ++ pcap_ts->read_state = PRESSURE; ++ pcap_ts_start_xy_read(pcap_ts); ++ ++ return IRQ_HANDLED; ++} ++ ++static void pcap_ts_timer_fn(unsigned long data) ++{ ++ struct pcap_ts *pcap_ts = (struct pcap_ts *) data; ++ ++ pcap_ts_start_xy_read(pcap_ts); ++} ++ ++static int __init ezxts_probe(struct platform_device *pdev) ++{ ++ int ret; ++ u_int32_t tmp; ++ struct pcap_ts *pcap_ts; ++ struct input_dev *input_dev; ++ int err = -ENOMEM; ++ ++ pcap_ts = kzalloc(sizeof(*pcap_ts), GFP_KERNEL); ++ input_dev = input_allocate_device(); ++ if (!pcap_ts || !input_dev) ++ goto fail; ++ ++ pcap_ts->irq_xy = platform_get_irq(pdev, 0); ++ if (pcap_ts->irq_xy < 0) { ++ err = pcap_ts->irq_xy; ++ goto fail; ++ } ++ ++ pcap_ts->irq_touch = platform_get_irq(pdev, 1); ++ if (pcap_ts->irq_touch < 0) { ++ err = pcap_ts->irq_touch; ++ goto fail; ++ } ++ ++ // Some initialization before done in ssp_pcap_open() ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB, 0); ++ // ack interrupts ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, 1); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_TSI, 1); ++ // unmask interrupts ++ // ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_TSM, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M, 0); ++ // set adc bits? FIXME I dont think its necessary - WM ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC1, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC2, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO0, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO1, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO2, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO3, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATOX, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR1, 0); ++ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR2, 0); ++ ++ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); ++ if (ret < 0) ++ return ret; ++ ++ tmp &= (~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK); ++ tmp |= PCAP_TS_STANDBY_MODE; ++ ++ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); ++ if (ret < 0) ++ return ret; ++ ++ err = request_irq(pcap_ts->irq_xy, pcap_ts_irq_xy, SA_INTERRUPT, ++ "pcap-ts X/Y", pcap_ts); ++ if (err < 0) { ++ printk(KERN_ERR "pcap_ts: can't grab xy irq %d: %d\n", ++ pcap_ts->irq_xy, err); ++ goto fail; ++ } ++ ++ err = request_irq(pcap_ts->irq_touch, pcap_ts_irq_touch, SA_INTERRUPT, ++ "pcap-ts touch", pcap_ts); ++ if (err < 0) { ++ printk(KERN_ERR "pcap_ts: can't grab touch irq %d: %d\n", ++ pcap_ts->irq_touch, err); ++ goto fail_xy; ++ } ++ ++ pcap_ts->input = input_dev; ++ init_timer(&pcap_ts->timer); ++ pcap_ts->timer.data = (unsigned long) pcap_ts; ++ pcap_ts->timer.function = &pcap_ts_timer_fn; ++ ++ platform_set_drvdata(pdev, pcap_ts); ++ ++ pcap_ts->read_state = STANDBY; ++ pcap_ts_mode(PCAP_TS_STANDBY_MODE); ++ ++ /* enable pressure interrupt */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); ++ ++ input_dev->name = "pcap-touchscreen"; ++ input_dev->phys = "ezxts/input0"; ++ input_dev->id.bustype = BUS_HOST; ++ input_dev->id.vendor = 0x0001; ++ input_dev->id.product = 0x0002; ++ input_dev->id.version = 0x0100; ++ input_dev->cdev.dev = &pdev->dev; ++ input_dev->private = pcap_ts; ++ ++ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); ++ input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); ++ input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0); ++ input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0); ++ input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, ++ PRESSURE_MAX, 0, 0); ++ ++ input_register_device(pcap_ts->input); ++ ++ return 0; ++ ++fail_xy: ++ free_irq(pcap_ts->irq_xy, pcap_ts); ++fail: ++ input_free_device(input_dev); ++ kfree(pcap_ts); ++ ++ return err; ++} ++ ++static int ezxts_remove(struct platform_device *pdev) ++{ ++ struct pcap_ts *pcap_ts = platform_get_drvdata(pdev); ++ ++ del_timer_sync(&pcap_ts->timer); ++ ++ free_irq(pcap_ts->irq_touch, pcap_ts); ++ free_irq(pcap_ts->irq_xy, pcap_ts); ++ ++ input_unregister_device(pcap_ts->input); ++ kfree(pcap_ts); ++ ++ return 0; ++} ++ ++static int ezxts_suspend(struct platform_device *dev, pm_message_t state) ++{ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR, 1); ++ return 0; ++} ++ ++static int ezxts_resume(struct platform_device *dev) ++{ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR, 0); ++ /* just in case we suspend with TSI masked. */ ++ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); ++ return 0; ++} ++ ++ ++static struct platform_driver ezxts_driver = { ++ .probe = ezxts_probe, ++ .remove = ezxts_remove, ++ .suspend = ezxts_suspend, ++ .resume = ezxts_resume, ++ .driver = { ++ .name = "pcap-ts", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init ezxts_init(void) ++{ ++ return platform_driver_register(&ezxts_driver); ++} ++ ++static void __exit ezxts_exit(void) ++{ ++ platform_driver_unregister(&ezxts_driver); ++} ++ ++module_init(ezxts_init); ++module_exit(ezxts_exit); ++ ++MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver"); ++MODULE_AUTHOR("Harald Welte "); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/drivers/input/touchscreen/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-06-02 20:17:58.000000000 -0300 ++++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-06-02 20:18:40.000000000 -0300 +@@ -16,3 +16,4 @@ + obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o + obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o ++obj-$(CONFIG_TOUCHSCREEN_PCAP) += pcap_ts.o diff --git a/packages/linux/linux-ezx-2.6.21/patches/pxa-kbd.patch b/packages/linux/linux-ezx-2.6.21/patches/pxa-kbd.patch new file mode 100755 index 0000000000..425a5b984c --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/pxa-kbd.patch @@ -0,0 +1,534 @@ +Index: linux-2.6.21/arch/arm/mach-pxa/generic.c +=================================================================== +--- linux-2.6.21.orig/arch/arm/mach-pxa/generic.c 2007-06-01 20:04:10.000000000 +0200 ++++ linux-2.6.21/arch/arm/mach-pxa/generic.c 2007-06-01 20:04:45.000000000 +0200 +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + + #include "generic.h" + +@@ -430,6 +431,30 @@ + .id = -1, + }; + ++static struct resource pxa_kbd_resources[] = { ++ { ++ .start = IRQ_KEYPAD, ++ .end = IRQ_KEYPAD, ++ .flags = IORESOURCE_IRQ, ++ }, { ++ .start = 0x41500000, ++ .end = 0x4150004c, ++ .flags = IORESOURCE_MEM, ++ }, ++}; ++ ++static struct platform_device kbd_device = { ++ .name = "pxa-keyboard", ++ .id = -1, ++ .resource = pxa_kbd_resources, ++ .num_resources = ARRAY_SIZE(pxa_kbd_resources), ++}; ++ ++void __init pxa_set_kbd_info(struct pxakbd_platform_data *info) ++{ ++ kbd_device.dev.platform_data = info; ++} ++ + static struct platform_device *devices[] __initdata = { + &pxamci_device, + &udc_device, +@@ -444,6 +469,7 @@ + #endif + &i2s_device, + &pxartc_device, ++ &kbd_device, + }; + + static int __init pxa_init(void) +Index: linux-2.6.21/drivers/input/keyboard/Kconfig +=================================================================== +--- linux-2.6.21.orig/drivers/input/keyboard/Kconfig 2007-06-01 20:04:10.000000000 +0200 ++++ linux-2.6.21/drivers/input/keyboard/Kconfig 2007-06-01 20:04:45.000000000 +0200 +@@ -229,4 +229,11 @@ + To compile this driver as a module, choose M here: the + module will be called gpio-keys. + ++config KEYBOARD_PXA ++ tristate "Intel PXA keyboard support" ++ depends on ARCH_PXA ++ help ++ This add support for a driver of the Intel PXA2xx keyboard ++ controller. ++ + endif +Index: linux-2.6.21/drivers/input/keyboard/Makefile +=================================================================== +--- linux-2.6.21.orig/drivers/input/keyboard/Makefile 2007-06-01 20:04:10.000000000 +0200 ++++ linux-2.6.21/drivers/input/keyboard/Makefile 2007-06-01 20:04:45.000000000 +0200 +@@ -19,4 +19,4 @@ + obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o + obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o + obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o +- ++obj-$(CONFIG_KEYBOARD_PXA) += pxakbd.o +Index: linux-2.6.21/include/asm-arm/arch-pxa/kbd.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/include/asm-arm/arch-pxa/kbd.h 2007-06-01 20:04:45.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* ++ * kbd_pxa.h ++ * ++ * Copyright (C) 2006 Harald Welte ++ * ++ * 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. ++ * ++ */ ++#ifndef _KBD_PXA_H_ ++#define _KBD_PXA_H_ ++ ++struct pxakbd_platform_data { ++ int (*init)(void); /* init gpio, etc. */ ++ unsigned int scan_interval; ++ struct { ++ unsigned int rows; ++ unsigned int cols; ++ unsigned char *keycode; ++ } matrix; ++ struct { ++ unsigned int num; ++ unsigned char *keycode; ++ } direct; ++}; ++ ++#endif +Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-06-02 10:41:13.000000000 +0200 +@@ -0,0 +1,403 @@ ++/* ++ * Driver for Motorola EZX phone "keyboard" ++ * ++ * (C) 2006 by Harald Welte ++ * ++ * May, 2007 - Daniel Ribeiro ++ * pm callbacks ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#if 0 ++#define DEBUGP(x, args ...) printk(x, ## args) ++#else ++#define DEBUGP(x, args ...) ++#endif ++ ++/* per-keyboard private data structure */ ++struct pxakbd { ++ struct input_dev *input; ++ struct timer_list timer; ++ spinlock_t lock; ++ ++ struct resource *res; ++ unsigned int irq; ++ u_int32_t kpc; ++ u_int32_t kpkdi; ++ ++ struct pxakbd_platform_data *pd; ++}; ++ ++static int pxakbd_scan_direct(struct pxakbd *pxakbd) ++{ ++ u_int32_t kpdk; ++ unsigned int i; ++ int num_pressed = 0; ++ ++ kpdk = KPDK & 0x000000ff; ++ for (i = 0; i < pxakbd->pd->direct.num; i++) { ++ int pressed = 0; ++ ++ if (kpdk & (1 << i)) { ++ pressed = 1; ++ num_pressed++; ++ DEBUGP("pxakbd: pressed: direct %u\n", i); ++ } ++ if (pxakbd->pd->direct.keycode[i] != KEY_RESERVED) { ++ DEBUGP( "pxakbd: sending to input layer: keycode = %d, pressed = %d\n", pxakbd->pd->direct.keycode[i], pressed ); ++ input_report_key(pxakbd->input, pxakbd->pd->direct.keycode[i], ++ pressed); ++ } ++ } ++ return num_pressed; ++} ++ ++/* read the full 8x8 matrix from the PXA27x keypad controller */ ++static inline void __read_matrix(u_int8_t *matrix) ++{ ++ u_int32_t tmp; ++ u_int8_t row; ++ ++ /* Fill the matrix by rows */ ++ ++ tmp = KPASMKP0; ++ for (row=0; row<8; row++) { ++ /* zero the matrix on the first time, then keep ORing */ ++ matrix[row] = ((tmp >> row) & 1); ++ matrix[row] |= ((tmp >> (16 + row)) & 1) << 1; ++ } ++ ++ tmp = KPASMKP1; ++ for (row=0; row<8; row++) { ++ matrix[row] |= ((tmp >> row) & 1) << 2; ++ matrix[row] |= ((tmp >> (16 + row)) & 1) << 3; ++ } ++ ++ tmp = KPASMKP2; ++ for (row=0; row<8; row++) { ++ matrix[row] |= ((tmp >> row) & 1) << 4; ++ matrix[row] |= ((tmp >> (16 + row)) & 1) << 5; ++ } ++ ++ tmp = KPASMKP3; ++ for (row=0; row<8; row++) { ++ matrix[row] |= ((tmp >> row) & 1) << 6; ++ matrix[row] |= ((tmp >> (16 + row)) & 1) << 7; ++ } ++} ++ ++/* compare current matrix with last, generate 'diff' events */ ++static int __cmp_matrix_gen_events(struct pxakbd *pxakbd, u_int8_t *matrix) ++{ ++ unsigned int i; ++ int num_pressed = 0; ++ ++ /* iterate over the matrix */ ++ for (i = 0; i < pxakbd->pd->matrix.rows; i++) { ++ unsigned int j; ++ for (j = 0; j < pxakbd->pd->matrix.cols; j++) { ++ u_int32_t scancode = ++ (i * pxakbd->pd->matrix.cols) + j; ++ int pressed = matrix[i] & (1 << j); ++ ++ if (pressed) { ++ DEBUGP("pxakbd: pressed: %u/%u\n", i, j); ++ num_pressed++; ++ } ++ ++ input_report_key(pxakbd->input, ++ pxakbd->pd->matrix.keycode[scancode], pressed); ++ } ++ } ++ ++ return num_pressed; ++} ++ ++/* scan the matrix keypad */ ++static int pxakbd_scan_matrix(struct pxakbd *pxakbd) ++{ ++ int num_pressed; ++ u_int32_t kpas; ++ u_int8_t matrix[8]; ++ ++ kpas = KPAS; ++ ++ if ((kpas & KPAS_MUKP) == KPAS_MUKP_NONE) { ++ /* no keys pressed */ ++ memset(matrix, 0, sizeof(matrix)); ++ } else if ((kpas & KPAS_MUKP) == KPAS_MUKP_ONE) { ++ /* one key pressed */ ++ u_int8_t row = (kpas & KPAS_RP) >> 4; ++ u_int8_t col = kpas & KPAS_CP; ++ ++ if (row == 0x0f || col == 0x0f) { ++ printk(KERN_WARNING "pxakbd: col or row invalid!\n"); ++ return -1; ++ } ++ ++ /* clear the matrix and set the single pressed key */ ++ memset(matrix, 0, sizeof(matrix)); ++ matrix[row] |= (1 << col); ++ } else { ++ /* multiple keys pressed */ ++ __read_matrix(matrix); ++ } ++ ++ num_pressed = __cmp_matrix_gen_events(pxakbd, matrix); ++ ++ return num_pressed; ++} ++ ++static void pxakbd_timer_callback(unsigned long data) ++{ ++ unsigned long flags; ++ struct pxakbd *pxakbd = (struct pxakbd *) data; ++ unsigned int num_pressed; ++ ++ spin_lock_irqsave(&pxakbd->lock, flags); ++ ++ num_pressed = pxakbd_scan_direct(pxakbd); ++ num_pressed += pxakbd_scan_matrix(pxakbd); ++ ++ spin_unlock_irqrestore(&pxakbd->lock, flags); ++ ++ /* propagate events up the input stack */ ++ input_sync(pxakbd->input); ++} ++ ++static irqreturn_t pxakbd_interrupt(int irq, void *dummy) ++{ ++ struct pxakbd *pxakbd = dummy; ++ u_int32_t kpc; ++ int handled = 0; ++ int num_pressed = 0; ++ ++ /* read and clear interrupt */ ++ kpc = KPC; ++ ++ if (kpc & KPC_DI) { ++ num_pressed += pxakbd_scan_direct(pxakbd); ++ handled = 1; ++ } ++ ++ if (kpc & KPC_MI) { ++ while (KPAS & KPAS_SO) { ++ /* wait for scan to complete beforereading scan regs */ ++ cpu_relax(); ++ } ++ num_pressed += pxakbd_scan_matrix(pxakbd); ++ handled = 1; ++ } ++ ++ /* If any keys are currently pressed, we need to start the timer to detect ++ * key release. */ ++ if (num_pressed) ++ mod_timer(&pxakbd->timer, jiffies + pxakbd->pd->scan_interval); ++ ++ /* propagate events up the input stack */ ++ input_sync(pxakbd->input); ++ ++ return IRQ_RETVAL(handled); ++} ++ ++static int __init pxakbd_probe(struct platform_device *pdev) ++{ ++ struct pxakbd *pxakbd; ++ struct input_dev *input_dev; ++ struct resource *r; ++ int i; ++ int ret = -ENOMEM; ++ ++ int rows, cols, n_direct; ++ ++ if (!pdev->dev.platform_data) { ++ printk(KERN_ERR "pxakbd: platform data not set\n"); ++ ret = -ENODEV; ++ goto out; ++ } ++ ++ pxakbd = kzalloc(sizeof(*pxakbd), GFP_KERNEL); ++ if (!pxakbd) ++ goto out; ++ ++ input_dev = input_allocate_device(); ++ if (!input_dev) ++ goto out_pxa; ++ ++ spin_lock_init(&pxakbd->lock); ++ pxakbd->irq = platform_get_irq(pdev, 0); ++ r = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!r || pxakbd->irq == NO_IRQ) { ++ printk(KERN_ERR "pxakbd: invalid resources\n"); ++ ret = -EBUSY; ++ goto out_idev; ++ } ++ ++ pxakbd->input = input_dev; ++ init_timer(&pxakbd->timer); ++ pxakbd->timer.function = pxakbd_timer_callback; ++ pxakbd->timer.data = (unsigned long) pxakbd; ++ pxakbd->pd = pdev->dev.platform_data; ++ pxakbd->res = r; ++ ++ rows = pxakbd->pd->matrix.rows; ++ cols = pxakbd->pd->matrix.cols; ++ n_direct = pxakbd->pd->direct.num; ++ ++ input_dev->name = "pxa-keyboard"; ++ input_dev->phys = "pxakbd/input0"; ++ input_dev->id.bustype = BUS_HOST; ++ input_dev->id.vendor = 0x0001; ++ input_dev->id.product = 0x0001; ++ input_dev->id.version = 0x0001; ++ input_dev->cdev.dev = &pdev->dev; ++ input_dev->private = pxakbd; ++ ++ input_dev->evbit[0] = BIT(EV_KEY)|BIT(EV_REP); ++ ++ input_dev->keycodesize = sizeof(unsigned char); ++ input_dev->keycodemax = (rows*cols)+n_direct; ++ input_dev->keycode = kmalloc(input_dev->keycodemax*input_dev->keycodesize, ++ GFP_KERNEL); ++ if (!input_dev->keycode){ ++ ret = -ENOMEM; ++ goto out_idev; ++ } ++ ++ memcpy(input_dev->keycode, pxakbd->pd->matrix.keycode, rows*cols); ++ ++ memcpy(input_dev->keycode+(rows*cols), ++ pxakbd->pd->direct.keycode, ++ n_direct); ++ ++ for (i = 0; i < rows*cols; i++) ++ set_bit(pxakbd->pd->matrix.keycode[i], input_dev->keybit); ++ ++ for (i = 0; i < n_direct; i++) ++ set_bit(pxakbd->pd->direct.keycode[i], input_dev->keybit); ++ ++ clear_bit(0, input_dev->keybit); ++ ++ if (request_irq(pxakbd->irq, pxakbd_interrupt, 0, "pxakbd", pxakbd)) { ++ printk(KERN_ERR "pxakbd: can't request irq %d\n", pxakbd->irq); ++ ret = -EBUSY; ++ goto out_idev; ++ } ++ ++ r = request_mem_region(r->start, 0x4c, "pxakbd"); ++ if (!r) { ++ printk(KERN_ERR "pxakbd: can't request memregion\n"); ++ ret = -EBUSY; ++ goto out_irq; ++ } ++ ++ /* set up gpio */ ++ pxakbd->pd->init(); ++ ++ /* set keypad control register */ ++ KPC = (KPC_ASACT | /* automatic scan on activity */ ++ KPC_ME | KPC_DE | /* matrix and direct keypad enabled */ ++ ((pxakbd->pd->matrix.cols-1)<<23) | /* columns */ ++ ((pxakbd->pd->matrix.rows-1)<<26) | /* rows */ ++ ((pxakbd->pd->direct.num-1)<<6) | /* direct keys */ ++ KPC_MS_ALL); /* scan all columns */ ++ ++ pxa_set_cken(CKEN19_KEYPAD, 1); ++ ++ KPC |= (KPC_DIE | KPC_MIE); /* enable matrix and direct keyboard */ ++ ++ KPKDI = 0x40; /* matrix key debounce interval: 0x40 */ ++ ++ platform_set_drvdata(pdev, pxakbd); ++ ++ return input_register_device(pxakbd->input); ++ ++out_drvdata: ++ platform_set_drvdata(pdev, NULL); ++out_mem: ++ release_resource(r); ++out_irq: ++ free_irq(pxakbd->irq, pxakbd); ++out_idev: ++ kfree(input_dev->keycode); ++ input_free_device(input_dev); ++out_pxa: ++ kfree(pxakbd); ++out: ++ return ret; ++} ++ ++static int pxakbd_remove(struct platform_device *pdev) ++{ ++ struct pxakbd *pxakbd = platform_get_drvdata(pdev); ++ ++ kfree(pxakbd->input->keycode); ++ input_unregister_device(pxakbd->input); ++ platform_set_drvdata(pdev, NULL); ++ release_resource(pxakbd->res); ++ free_irq(pxakbd->irq, pxakbd); ++ kfree(pxakbd); ++ ++ return 0; ++} ++ ++static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state) ++{ ++ struct pxakbd *pxakbd = platform_get_drvdata(pdev); ++ ++ pxakbd->kpc = KPC; ++ pxakbd->kpkdi = KPKDI; ++ ++ return 0; ++} ++ ++static int pxakbd_resume(struct platform_device *pdev) ++{ ++ struct pxakbd *pxakbd = platform_get_drvdata(pdev); ++ ++ KPC = pxakbd->kpc; ++ KPKDI = pxakbd->kpkdi; ++ ++ return 0; ++} ++ ++static struct platform_driver pxakbd_driver = { ++ .probe = &pxakbd_probe, ++ .remove = &pxakbd_remove, ++ .suspend = &pxakbd_suspend, ++ .resume = &pxakbd_resume, ++ .driver = { ++ .name = "pxa-keyboard", ++ }, ++}; ++ ++static int __devinit pxakbd_init(void) ++{ ++ return platform_driver_register(&pxakbd_driver); ++} ++ ++static void __exit pxakbd_exit(void) ++{ ++ platform_driver_unregister(&pxakbd_driver); ++} ++ ++module_init(pxakbd_init); ++module_exit(pxakbd_exit); ++ ++MODULE_AUTHOR("Harald Welte "); ++MODULE_DESCRIPTION("Driver for Intel PXA27x keypad controller"); ++MODULE_LICENSE("GPL"); +Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h +=================================================================== +--- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-06-01 20:04:45.000000000 +0200 ++++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-06-01 20:04:45.000000000 +0200 +@@ -2165,6 +2165,11 @@ + #define KPMK_MKP (0x1 << 31) + #define KPAS_SO (0x1 << 31) + #define KPASMKPx_SO (0x1 << 31) ++#define KPAS_RP (0x000000f0) ++#define KPAS_CP (0x0000000f) ++#define KPAS_MUKP (0x7c000000) ++#define KPAS_MUKP_ONE (0x04000000) ++#define KPAS_MUKP_NONE (0x00000000) + + /* + * UHC: USB Host Controller (OHCI-like) register definitions diff --git a/packages/linux/linux-ezx-2.6.21/patches/pxa27x-udc-support.2.patch b/packages/linux/linux-ezx-2.6.21/patches/pxa27x-udc-support.2.patch new file mode 100755 index 0000000000..d35e40f046 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/pxa27x-udc-support.2.patch @@ -0,0 +1,3037 @@ +diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig +index 4097a86..5d3ea6e 100644 +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -111,6 +111,24 @@ config USB_PXA2XX + default USB_GADGET + select USB_GADGET_SELECTED + ++config USB_GADGET_PXA27X ++ boolean "PXA 27x" ++ depends on ARCH_PXA && PXA27x ++ help ++ Intel's PXA 27x series XScale processors include an integrated ++ full speed USB 1.1 device controller. ++ ++ Say "y" to link the driver statically, or "m" to build a ++ dynamically linked module called "pxa2xx_udc" and force all ++ gadget drivers to also be dynamically linked. ++ ++ ++config USB_PXA27X ++ tristate ++ depends on USB_GADGET_PXA27X ++ default USB_GADGET ++ select USB_GADGET_SELECTED ++ + # if there's only one gadget driver, using only two bulk endpoints, + # don't waste memory for the other endpoints + config USB_PXA2XX_SMALL +diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile +index e71e086..7e508a6 100644 +--- a/drivers/usb/gadget/Makefile ++++ b/drivers/usb/gadget/Makefile +@@ -4,6 +4,7 @@ + obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o + obj-$(CONFIG_USB_NET2280) += net2280.o + obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o ++obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o + obj-$(CONFIG_USB_GOKU) += goku_udc.o + obj-$(CONFIG_USB_OMAP) += omap_udc.o + obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o +diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c +index f28af06..e7d72ff 100644 +--- a/drivers/usb/gadget/epautoconf.c ++++ b/drivers/usb/gadget/epautoconf.c +@@ -230,7 +230,8 @@ find_ep (struct usb_gadget *gadget, const char *name) + */ + struct usb_ep * __devinit usb_ep_autoconfig ( + struct usb_gadget *gadget, +- struct usb_endpoint_descriptor *desc ++ struct usb_endpoint_descriptor *desc, ++ int config, int interface, int alt + ) + { + struct usb_ep *ep; +@@ -238,6 +239,11 @@ struct usb_ep * __devinit usb_ep_autoconfig ( + + type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; + ++ /* If have ep_alloc() function use it! */ ++ if (gadget->ops->ep_alloc) ++ return gadget->ops->ep_alloc(gadget, desc, ++ config, interface, alt); ++ + /* First, apply chip-specific "best usage" knowledge. + * This might make a good usb_gadget_ops hook ... + */ +diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c +index 04e6b85..bc6de31 100644 +--- a/drivers/usb/gadget/ether.c ++++ b/drivers/usb/gadget/ether.c +@@ -258,10 +258,6 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); + #define DEV_CONFIG_CDC + #endif + +-#ifdef CONFIG_USB_GADGET_PXA27X +-#define DEV_CONFIG_CDC +-#endif +- + #ifdef CONFIG_USB_GADGET_S3C2410 + #define DEV_CONFIG_CDC + #endif +@@ -294,6 +290,10 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); + #define DEV_CONFIG_SUBSET + #endif + ++#ifdef CONFIG_USB_GADGET_PXA27X ++#define DEV_CONFIG_SUBSET ++#endif ++ + #ifdef CONFIG_USB_GADGET_SA1100 + /* use non-CDC for backwards compatibility */ + #define DEV_CONFIG_SUBSET +@@ -2309,6 +2309,9 @@ eth_bind (struct usb_gadget *gadget) + * non-CDC to be compatible with ARM Linux-2.4 "usb-eth". + */ + cdc = 0; ++ } else if (gadget_is_pxa27x(gadget)) { ++ /* hardware can't write zlps */ ++ zlp = 0; + } + + gcnum = usb_gadget_controller_number (gadget); +@@ -2375,7 +2378,22 @@ eth_bind (struct usb_gadget *gadget) + + /* all we really need is bulk IN/OUT */ + usb_ep_autoconfig_reset (gadget); +- in_ep = usb_ep_autoconfig (gadget, &fs_source_desc); ++#ifdef CONFIG_USB_ETH_RNDIS ++ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, ++ DEV_RNDIS_CONFIG_VALUE, ++ (int)rndis_data_intf.bInterfaceNumber, ++ (int)rndis_data_intf.bAlternateSetting); ++#elif defined(DEV_CONFIG_CDC) ++ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, ++ DEV_CONFIG_VALUE, ++ (int)data_intf.bInterfaceNumber, ++ (int)data_intf.bAlternateSetting); ++#elif defined(DEV_CONFIG_SUBSET) ++ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, ++ DEV_CONFIG_VALUE, ++ (int)subset_data_intf.bInterfaceNumber, ++ (int)subset_data_intf.bAlternateSetting); ++#endif /* CONFIG_USB_ETH_RNDIS */ + if (!in_ep) { + autoconf_fail: + dev_err (&gadget->dev, +@@ -2385,7 +2403,22 @@ autoconf_fail: + } + in_ep->driver_data = in_ep; /* claim */ + +- out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc); ++#ifdef CONFIG_USB_ETH_RNDIS ++ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, ++ DEV_RNDIS_CONFIG_VALUE, ++ (int)rndis_data_intf.bInterfaceNumber, ++ (int)rndis_data_intf.bAlternateSetting); ++#elif defined(DEV_CONFIG_CDC) ++ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, ++ DEV_CONFIG_VALUE, ++ (int)data_intf.bInterfaceNumber, ++ (int)data_intf.bAlternateSetting); ++#elif defined(DEV_CONFIG_SUBSET) ++ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, ++ DEV_CONFIG_VALUE, ++ (int)subset_data_intf.bInterfaceNumber, ++ (int)subset_data_intf.bAlternateSetting); ++#endif /* CONFIG_USB_ETH_RNDIS */ + if (!out_ep) + goto autoconf_fail; + out_ep->driver_data = out_ep; /* claim */ +@@ -2395,7 +2428,17 @@ autoconf_fail: + * Since some hosts expect one, try to allocate one anyway. + */ + if (cdc || rndis) { +- status_ep = usb_ep_autoconfig (gadget, &fs_status_desc); ++#ifdef CONFIG_USB_ETH_RNDIS ++ status_ep = usb_ep_autoconfig (gadget, &fs_status_desc, ++ DEV_RNDIS_CONFIG_VALUE, ++ (int)rndis_control_intf.bInterfaceNumber, ++ (int)rndis_control_intf.bAlternateSetting); ++#elif defined(DEV_CONFIG_CDC) ++ status_ep = usb_ep_autoconfig (gadget, &fs_status_desc, ++ DEV_CONFIG_VALUE, ++ (int)control_intf.bInterfaceNumber, ++ (int)control_intf.bAlternateSetting); ++#endif /* CONFIG_USB_ETH_RNDIS */ + if (status_ep) { + status_ep->driver_data = status_ep; /* claim */ + } else if (rndis) { +@@ -2403,13 +2446,14 @@ autoconf_fail: + "can't run RNDIS on %s\n", + gadget->name); + return -ENODEV; ++ } + #ifdef DEV_CONFIG_CDC + /* pxa25x only does CDC subset; often used with RNDIS */ +- } else if (cdc) { ++ else if (cdc) { + control_intf.bNumEndpoints = 0; + /* FIXME remove endpoint from descriptor list */ +-#endif + } ++#endif + } + #endif + +diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c +index c6b6479..6af5fdd 100644 +--- a/drivers/usb/gadget/file_storage.c ++++ b/drivers/usb/gadget/file_storage.c +@@ -3920,20 +3920,20 @@ static int __init fsg_bind(struct usb_gadget *gadget) + + /* Find all the endpoints we will use */ + usb_ep_autoconfig_reset(gadget); +- ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc); ++ ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + ep->driver_data = fsg; // claim the endpoint + fsg->bulk_in = ep; + +- ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc); ++ ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + ep->driver_data = fsg; // claim the endpoint + fsg->bulk_out = ep; + + if (transport_is_cbi()) { +- ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc); ++ ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + ep->driver_data = fsg; // claim the endpoint +diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h +index 2e3d662..f3b3291 100644 +--- a/drivers/usb/gadget/gadget_chips.h ++++ b/drivers/usb/gadget/gadget_chips.h +@@ -177,5 +177,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) + return 0x17; + else if (gadget_is_husb2dev(gadget)) + return 0x18; ++ else if (gadget_is_pxa27x(gadget)) ++ return 0x19; + return -ENOENT; + } +diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c +index d08a8d0..d51feb2 100644 +--- a/drivers/usb/gadget/gmidi.c ++++ b/drivers/usb/gadget/gmidi.c +@@ -1204,7 +1204,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget) + * but there may also be important quirks to address. + */ + usb_ep_autoconfig_reset(gadget); +- in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc); ++ in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc, 0, 0, 0); + if (!in_ep) { + autoconf_fail: + printk(KERN_ERR "%s: can't autoconfigure on %s\n", +@@ -1214,7 +1214,7 @@ autoconf_fail: + EP_IN_NAME = in_ep->name; + in_ep->driver_data = in_ep; /* claim */ + +- out_ep = usb_ep_autoconfig(gadget, &bulk_out_desc); ++ out_ep = usb_ep_autoconfig(gadget, &bulk_out_desc, 0, 0, 0); + if (!out_ep) { + goto autoconf_fail; + } +diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c +new file mode 100644 +index 0000000..d89ecc5 +--- /dev/null ++++ b/drivers/usb/gadget/pxa27x_udc.c +@@ -0,0 +1,2354 @@ ++/* ++ * linux/drivers/usb/gadget/pxa27x_udc.c ++ * Intel PXA2xx and IXP4xx on-chip full speed USB device controllers ++ * ++ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker) ++ * Copyright (C) 2003 Robert Schwebel, Pengutronix ++ * Copyright (C) 2003 Benedikt Spranger, Pengutronix ++ * Copyright (C) 2003 David Brownell ++ * Copyright (C) 2003 Joshua Wise ++ * Copyright (C) 2004 Intel Corporation ++ * Copyright (C) 2007 Rodolfo Giometti ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#undef DEBUG ++/* #define VERBOSE DBG_VERBOSE */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++ ++/* ++ * This driver handles the USB Device Controller (UDC) in Intel's PXA 27x ++ * series processors. ++ * Such controller drivers work with a gadget driver. The gadget driver ++ * returns descriptors, implements configuration and data protocols used ++ * by the host to interact with this device, and allocates endpoints to ++ * the different protocol interfaces. The controller driver virtualizes ++ * usb hardware so that the gadget drivers will be more portable. ++ * ++ * This UDC hardware wants to implement a bit too much USB protocol, so ++ * it constrains the sorts of USB configuration change events that work. ++ * The errata for these chips are misleading; some "fixed" bugs from ++ * pxa250 a0/a1 b0/b1/b2 sure act like they're still there. ++ */ ++ ++#define DRIVER_VERSION "08-Feb-2007" ++#define DRIVER_DESC "PXA 27x USB Device Controller driver" ++ ++ ++static const char driver_name [] = "pxa27x_udc"; ++ ++static const char ep0name [] = "ep0"; ++ ++ ++#undef USE_DMA ++#undef DISABLE_TEST_MODE ++ ++#ifdef CONFIG_PROC_FS ++#define UDC_PROC_FILE ++#endif ++ ++#include "pxa27x_udc.h" ++ ++#ifdef CONFIG_EMBEDDED ++/* few strings, and little code to use them */ ++#undef DEBUG ++#undef UDC_PROC_FILE ++#endif ++ ++#ifdef USE_DMA ++static int use_dma = 1; ++module_param(use_dma, bool, 0); ++MODULE_PARM_DESC (use_dma, "true to use dma"); ++ ++static void dma_nodesc_handler (int dmach, void *_ep); ++static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req); ++ ++#define DMASTR " (dma support)" ++ ++#else /* !USE_DMA */ ++#define DMASTR " (pio only)" ++#endif ++ ++#ifdef CONFIG_USB_PXA27X_SMALL ++#define SIZE_STR " (small)" ++#else ++#define SIZE_STR "" ++#endif ++ ++#ifdef DISABLE_TEST_MODE ++/* (mode == 0) == no undocumented chip tweaks ++ * (mode & 1) == double buffer bulk IN ++ * (mode & 2) == double buffer bulk OUT ++ * ... so mode = 3 (or 7, 15, etc) does it for both ++ */ ++static ushort fifo_mode = 0; ++module_param(fifo_mode, ushort, 0); ++MODULE_PARM_DESC (fifo_mode, "pxa27x udc fifo mode"); ++#endif ++ ++#define UDCISR0_IR0 0x3 ++#define UDCISR_INT_MASK (UDC_INT_FIFOERROR | UDC_INT_PACKETCMP) ++#define UDCICR_INT_MASK UDCISR_INT_MASK ++ ++#define UDCCSR_MASK (UDCCSR_FST | UDCCSR_DME) ++/* --------------------------------------------------------------------------- ++ * endpoint related parts of the api to the usb controller hardware, ++ * used by gadget driver; and the inner talker-to-hardware core. ++ * --------------------------------------------------------------------------- ++ */ ++ ++static void pxa27x_ep_fifo_flush (struct usb_ep *ep); ++static void nuke (struct pxa27x_ep *, int status); ++ ++static void pio_irq_enable(int ep_num) ++{ ++ if (ep_num < 16) ++ UDCICR0 |= 3 << (ep_num * 2); ++ else { ++ ep_num -= 16; ++ UDCICR1 |= 3 << (ep_num * 2); ++ } ++} ++ ++static void pio_irq_disable(int ep_num) ++{ ++ ep_num &= 0xf; ++ if (ep_num < 16) ++ UDCICR0 &= ~(3 << (ep_num * 2)); ++ else { ++ ep_num -= 16; ++ UDCICR1 &= ~(3 << (ep_num * 2)); ++ } ++} ++ ++/* The UDCCR reg contains mask and interrupt status bits, ++ * so using '|=' isn't safe as it may ack an interrupt. ++ */ ++#define UDCCR_MASK_BITS (UDCCR_OEN | UDCCR_UDE) ++ ++static inline void udc_set_mask_UDCCR(int mask) ++{ ++ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS); ++} ++ ++static inline void udc_clear_mask_UDCCR(int mask) ++{ ++ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS); ++} ++ ++static inline void udc_ack_int_UDCCR(int mask) ++{ ++ /* udccr contains the bits we dont want to change */ ++ __u32 udccr = UDCCR & UDCCR_MASK_BITS; ++ ++ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS); ++} ++ ++/* ++ * endpoint enable/disable ++ * ++ * we need to verify the descriptors used to enable endpoints. since pxa27x ++ * endpoint configurations are fixed, and are pretty much always enabled, ++ * there's not a lot to manage here. ++ * ++ * because pxa27x can't selectively initialize bulk (or interrupt) endpoints, ++ * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except ++ * for a single interface (with only the default altsetting) and for gadget ++ * drivers that don't halt endpoints (not reset by set_interface). that also ++ * means that if you use ISO, you must violate the USB spec rule that all ++ * iso endpoints must be in non-default altsettings. ++ */ ++static int pxa27x_ep_enable (struct usb_ep *_ep, ++ const struct usb_endpoint_descriptor *desc) ++{ ++ struct pxa27x_ep *ep; ++ struct pxa27x_udc *dev; ++ ++ ep = container_of (_ep, struct pxa27x_ep, ep); ++ if (!_ep || !desc || _ep->name == ep0name ++ || desc->bDescriptorType != USB_DT_ENDPOINT ++ || ep->fifo_size < le16_to_cpu(desc->wMaxPacketSize)) { ++ DMSG("%s, bad ep or descriptor\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ /* xfer types must match, except that interrupt ~= bulk */ ++ if( ep->ep_type != USB_ENDPOINT_XFER_BULK ++ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { ++ DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); ++ return -EINVAL; ++ } ++ ++ /* hardware _could_ do smaller, but driver doesn't */ ++ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK ++ && le16_to_cpu (desc->wMaxPacketSize) ++ != BULK_FIFO_SIZE) ++ || !desc->wMaxPacketSize) { ++ DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); ++ return -ERANGE; ++ } ++ ++ dev = ep->dev; ++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { ++ DMSG("%s, bogus device state\n", __FUNCTION__); ++ return -ESHUTDOWN; ++ } ++ ++ ep->desc = desc; ++ ep->dma = -1; ++ ep->stopped = 0; ++ ep->pio_irqs = ep->dma_irqs = 0; ++ ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize); ++ ++ /* flush fifo (mostly for OUT buffers) */ ++ pxa27x_ep_fifo_flush (_ep); ++ ++ /* ... reset halt state too, if we could ... */ ++ ++#ifdef USE_DMA ++ /* for (some) bulk and ISO endpoints, try to get a DMA channel and ++ * bind it to the endpoint. otherwise use PIO. ++ */ ++ DMSG("%s: called attributes=%d\n", __FUNCTION__, ep->ep_type); ++ switch (ep->ep_type) { ++ case USB_ENDPOINT_XFER_ISOC: ++ if (le16_to_cpu(desc->wMaxPacketSize) % 32) ++ break; ++ // fall through ++ case USB_ENDPOINT_XFER_BULK: ++ if (!use_dma || !ep->reg_drcmr) ++ break; ++ ep->dma = pxa_request_dma ((char *)_ep->name, ++ (le16_to_cpu (desc->wMaxPacketSize) > 64) ++ ? DMA_PRIO_MEDIUM /* some iso */ ++ : DMA_PRIO_LOW, ++ dma_nodesc_handler, ep); ++ if (ep->dma >= 0) { ++ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma; ++ DMSG("%s using dma%d\n", _ep->name, ep->dma); ++ } ++ default: ++ break; ++ } ++#endif ++ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name); ++ return 0; ++} ++ ++static int pxa27x_ep_disable (struct usb_ep *_ep) ++{ ++ struct pxa27x_ep *ep; ++ ++ ep = container_of (_ep, struct pxa27x_ep, ep); ++ if (!_ep || !ep->desc) { ++ DMSG("%s, %s not enabled\n", __FUNCTION__, ++ _ep ? ep->ep.name : NULL); ++ return -EINVAL; ++ } ++ nuke (ep, -ESHUTDOWN); ++ ++#ifdef USE_DMA ++ if (ep->dma >= 0) { ++ *ep->reg_drcmr = 0; ++ pxa_free_dma (ep->dma); ++ ep->dma = -1; ++ } ++#endif ++ ++ /* flush fifo (mostly for IN buffers) */ ++ pxa27x_ep_fifo_flush (_ep); ++ ++ ep->desc = 0; ++ ep->stopped = 1; ++ ++ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name); ++ return 0; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* for the pxa27x, these can just wrap kmalloc/kfree. gadget drivers ++ * must still pass correctly initialized endpoints, since other controller ++ * drivers may care about how it's currently set up (dma issues etc). ++ */ ++ ++/* ++ * pxa27x_ep_alloc_request - allocate a request data structure ++ */ ++static struct usb_request * ++pxa27x_ep_alloc_request (struct usb_ep *_ep, unsigned int gfp_flags) ++{ ++ struct pxa27x_request *req; ++ ++ req = kmalloc (sizeof *req, gfp_flags); ++ if (!req) ++ return 0; ++ ++ memset (req, 0, sizeof *req); ++ INIT_LIST_HEAD (&req->queue); ++ return &req->req; ++} ++ ++ ++/* ++ * pxa27x_ep_free_request - deallocate a request data structure ++ */ ++static void ++pxa27x_ep_free_request (struct usb_ep *_ep, struct usb_request *_req) ++{ ++ struct pxa27x_request *req; ++ ++ req = container_of(_req, struct pxa27x_request, req); ++ WARN_ON (!list_empty (&req->queue)); ++ kfree(req); ++} ++ ++ ++/* PXA cache needs flushing with DMA I/O (it's dma-incoherent), but there's ++ * no device-affinity and the heap works perfectly well for i/o buffers. ++ * It wastes much less memory than dma_alloc_coherent() would, and even ++ * prevents cacheline (32 bytes wide) sharing problems. ++ */ ++static void * ++pxa27x_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, ++ dma_addr_t *dma, unsigned int gfp_flags) ++{ ++ char *retval; ++ ++ retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM)); ++ if (retval) ++ *dma = virt_to_bus (retval); ++ return retval; ++} ++ ++static void ++pxa27x_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, ++ unsigned bytes) ++{ ++ kfree (buf); ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* ++ * done - retire a request; caller blocked irqs ++ */ ++static void done(struct pxa27x_ep *ep, struct pxa27x_request *req, int status) ++{ ++ list_del_init(&req->queue); ++ if (likely (req->req.status == -EINPROGRESS)) ++ req->req.status = status; ++ else ++ status = req->req.status; ++ ++ if (status && status != -ESHUTDOWN) ++ DBG(DBG_VERBOSE, "complete %s req %p stat %d len %u/%u\n", ++ ep->ep.name, &req->req, status, ++ req->req.actual, req->req.length); ++ ++ /* don't modify queue heads during completion callback */ ++ req->req.complete(&ep->ep, &req->req); ++} ++ ++ ++static inline void ep0_idle (struct pxa27x_udc *dev) ++{ ++ dev->ep0state = EP0_IDLE; ++ LED_EP0_OFF; ++} ++ ++static int ++write_packet(volatile u32 *uddr, struct pxa27x_request *req, unsigned max) ++{ ++ u32 *buf; ++ int length, count, remain; ++ ++ buf = (u32*)(req->req.buf + req->req.actual); ++ prefetch(buf); ++ ++ /* how big will this packet be? */ ++ length = min(req->req.length - req->req.actual, max); ++ req->req.actual += length; ++ ++ remain = length & 0x3; ++ count = length & ~(0x3); ++ ++ while (likely(count)) { ++ *uddr = *buf++; ++ count -= 4; ++ } ++ ++ if (remain) { ++ volatile u8* reg=(u8*)uddr; ++ char *rd =(u8*)buf; ++ ++ while (remain--) { ++ *reg=*rd++; ++ } ++ } ++ ++ return length; ++} ++ ++/* ++ * write to an IN endpoint fifo, as many packets as possible. ++ * irqs will use this to write the rest later. ++ * caller guarantees at least one packet buffer is ready (or a zlp). ++ */ ++static int ++write_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) ++{ ++ unsigned max; ++ ++ max = le16_to_cpu(ep->desc->wMaxPacketSize); ++ do { ++ int count; ++ int is_last, is_short; ++ ++ count = write_packet(ep->reg_udcdr, req, max); ++ ++ /* last packet is usually short (or a zlp) */ ++ if (unlikely (count != max)) ++ is_last = is_short = 1; ++ else { ++ if (likely(req->req.length != req->req.actual) ++ || req->req.zero) ++ is_last = 0; ++ else ++ is_last = 1; ++ /* interrupt/iso maxpacket may not fill the fifo */ ++ is_short = unlikely (max < ep->fifo_size); ++ } ++ ++ DMSG("wrote %s count:%d bytes%s%s %d left %p\n", ++ ep->ep.name, count, ++ is_last ? "/L" : "", is_short ? "/S" : "", ++ req->req.length - req->req.actual, &req->req); ++ ++ /* let loose that packet. maybe try writing another one, ++ * double buffering might work. TSP, TPC, and TFS ++ * bit values are the same for all normal IN endpoints. ++ */ ++ *ep->reg_udccsr = UDCCSR_PC; ++ if (is_short) ++ *ep->reg_udccsr = UDCCSR_SP; ++ ++ /* requests complete when all IN data is in the FIFO */ ++ if (is_last) { ++ done (ep, req, 0); ++ if (list_empty(&ep->queue) || unlikely(ep->dma >= 0)) { ++ pio_irq_disable (ep->ep_num); ++#ifdef USE_DMA ++ /* unaligned data and zlps couldn't use dma */ ++ if (unlikely(!list_empty(&ep->queue))) { ++ req = list_entry(ep->queue.next, ++ struct pxa27x_request, queue); ++ kick_dma(ep,req); ++ return 0; ++ } ++#endif ++ } ++ return 1; ++ } ++ ++ // TODO experiment: how robust can fifo mode tweaking be? ++ // double buffering is off in the default fifo mode, which ++ // prevents TFS from being set here. ++ ++ } while (*ep->reg_udccsr & UDCCSR_FS); ++ return 0; ++} ++ ++/* caller asserts req->pending (ep0 irq status nyet cleared); starts ++ * ep0 data stage. these chips want very simple state transitions. ++ */ ++static inline ++void ep0start(struct pxa27x_udc *dev, u32 flags, const char *tag) ++{ ++ UDCCSR0 = flags|UDCCSR0_SA|UDCCSR0_OPC; ++ UDCISR0 = UDCICR_INT(0, UDC_INT_FIFOERROR | UDC_INT_PACKETCMP); ++ dev->req_pending = 0; ++ DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", ++ __FUNCTION__, tag, UDCCSR0, flags); ++} ++ ++static int ++write_ep0_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) ++{ ++ unsigned count; ++ int is_short; ++ ++ count = write_packet(&UDCDR0, req, EP0_FIFO_SIZE); ++ ep->dev->stats.write.bytes += count; ++ ++ /* last packet "must be" short (or a zlp) */ ++ is_short = (count != EP0_FIFO_SIZE); ++ ++ DBG(DBG_VERY_NOISY, "ep0in %d bytes %d left %p\n", count, ++ req->req.length - req->req.actual, &req->req); ++ ++ if (unlikely (is_short)) { ++ if (ep->dev->req_pending) ++ ep0start(ep->dev, UDCCSR0_IPR, "short IN"); ++ else ++ UDCCSR0 = UDCCSR0_IPR; ++ ++ count = req->req.length; ++ done (ep, req, 0); ++ ep0_idle(ep->dev); ++#if 0 ++ /* This seems to get rid of lost status irqs in some cases: ++ * host responds quickly, or next request involves config ++ * change automagic, or should have been hidden, or ... ++ * ++ * FIXME get rid of all udelays possible... ++ */ ++ if (count >= EP0_FIFO_SIZE) { ++ count = 100; ++ do { ++ if ((UDCCSR0 & UDCCSR0_OPC) != 0) { ++ /* clear OPC, generate ack */ ++ UDCCSR0 = UDCCSR0_OPC; ++ break; ++ } ++ count--; ++ udelay(1); ++ } while (count); ++ } ++#endif ++ } else if (ep->dev->req_pending) ++ ep0start(ep->dev, 0, "IN"); ++ return is_short; ++} ++ ++ ++/* ++ * read_fifo - unload packet(s) from the fifo we use for usb OUT ++ * transfers and put them into the request. caller should have made ++ * sure there's at least one packet ready. ++ * ++ * returns true if the request completed because of short packet or the ++ * request buffer having filled (and maybe overran till end-of-packet). ++ */ ++static int ++read_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) ++{ ++ for (;;) { ++ u32 *buf; ++ int bufferspace, count, is_short; ++ ++ /* make sure there's a packet in the FIFO.*/ ++ if (unlikely ((*ep->reg_udccsr & UDCCSR_PC) == 0)) ++ break; ++ buf =(u32*) (req->req.buf + req->req.actual); ++ prefetchw(buf); ++ bufferspace = req->req.length - req->req.actual; ++ ++ /* read all bytes from this packet */ ++ if (likely (*ep->reg_udccsr & UDCCSR_BNE)) { ++ count = 0x3ff & *ep->reg_udcbcr; ++ req->req.actual += min (count, bufferspace); ++ } else /* zlp */ ++ count = 0; ++ ++ is_short = (count < ep->ep.maxpacket); ++ DMSG("read %s udccsr:%02x, count:%d bytes%s req %p %d/%d\n", ++ ep->ep.name, *ep->reg_udccsr, count, ++ is_short ? "/S" : "", ++ &req->req, req->req.actual, req->req.length); ++ ++// dump_regs(ep->ep_num ); ++ count = min(count, bufferspace); ++ while (likely (count > 0)) { ++ *buf++ = *ep->reg_udcdr; ++ count -= 4; ++ } ++ DMSG("Buf:0x%p\n", req->req.buf); ++ ++ *ep->reg_udccsr = UDCCSR_PC; ++ /* RPC/RSP/RNE could now reflect the other packet buffer */ ++ ++ /* completion */ ++ if (is_short || req->req.actual == req->req.length) { ++ done (ep, req, 0); ++ if (list_empty(&ep->queue)) ++ pio_irq_disable (ep->ep_num); ++ return 1; ++ } ++ ++ /* finished that packet. the next one may be waiting... */ ++ } ++ return 0; ++} ++ ++/* ++ * special ep0 version of the above. no UBCR0 or double buffering; status ++ * handshaking is magic. most device protocols don't need control-OUT. ++ * CDC vendor commands (and RNDIS), mass storage CB/CBI, and some other ++ * protocols do use them. ++ */ ++static int ++read_ep0_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) ++{ ++ u32 *buf, word; ++ unsigned bufferspace; ++ ++ buf = (u32*) (req->req.buf + req->req.actual); ++ bufferspace = req->req.length - req->req.actual; ++ ++ while (UDCCSR0 & UDCCSR0_RNE) { ++ word = UDCDR0; ++ ++ if (unlikely (bufferspace == 0)) { ++ /* this happens when the driver's buffer ++ * is smaller than what the host sent. ++ * discard the extra data. ++ */ ++ if (req->req.status != -EOVERFLOW) ++ DMSG("%s overflow\n", ep->ep.name); ++ req->req.status = -EOVERFLOW; ++ } else { ++ *buf++ = word; ++ req->req.actual += 4; ++ bufferspace -= 4; ++ } ++ } ++ ++ UDCCSR0 = UDCCSR0_OPC ; ++ ++ /* completion */ ++ if (req->req.actual >= req->req.length) ++ return 1; ++ ++ /* finished that packet. the next one may be waiting... */ ++ return 0; ++} ++ ++#ifdef USE_DMA ++ ++#define MAX_IN_DMA ((DCMD_LENGTH + 1) - BULK_FIFO_SIZE) ++static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req) ++{ ++ u32 dcmd = 0; ++ u32 len = req->req.length; ++ u32 buf = req->req.dma; ++ u32 fifo = io_v2p ((u32)ep->reg_udcdr); ++ ++ buf += req->req.actual; ++ len -= req->req.actual; ++ ep->dma_con = 0; ++ ++ DMSG("%s: req:0x%p length:%d, actual:%d dma:%d\n", ++ __FUNCTION__, &req->req, req->req.length, ++ req->req.actual,ep->dma); ++ ++ /* no-descriptor mode can be simple for bulk-in, iso-in, iso-out */ ++ DCSR(ep->dma) = DCSR_NODESC; ++ if (buf & 0x3) ++ DALGN |= 1 << ep->dma; ++ else ++ DALGN &= ~(1 << ep->dma); ++ ++ if (ep->dir_in) { ++ DSADR(ep->dma) = buf; ++ DTADR(ep->dma) = fifo; ++ if (len > MAX_IN_DMA) { ++ len= MAX_IN_DMA; ++ ep->dma_con =1 ; ++ } else if (len >= ep->ep.maxpacket) { ++ if ((ep->dma_con = (len % ep->ep.maxpacket) != 0)) ++ len = ep->ep.maxpacket; ++ } ++ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN ++ | DCMD_FLOWTRG | DCMD_INCSRCADDR; ++ } else { ++ DSADR(ep->dma) = fifo; ++ DTADR(ep->dma) = buf; ++ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN ++ | DCMD_FLOWSRC | DCMD_INCTRGADDR; ++ } ++ *ep->reg_udccsr = UDCCSR_DME; ++ DCMD(ep->dma) = dcmd; ++ DCSR(ep->dma) = DCSR_NODESC | DCSR_EORIRQEN \ ++ | ((ep->dir_in) ? DCSR_STOPIRQEN : 0); ++ *ep->reg_drcmr = ep->dma | DRCMR_MAPVLD; ++ DCSR(ep->dma) |= DCSR_RUN; ++} ++ ++static void cancel_dma(struct pxa27x_ep *ep) ++{ ++ struct pxa27x_request *req; ++ u32 tmp; ++ ++ if (DCSR(ep->dma) == 0 || list_empty(&ep->queue)) ++ return; ++ ++ DMSG("hehe dma:%d,dcsr:0x%x\n", ep->dma, DCSR(ep->dma)); ++ DCSR(ep->dma) = 0; ++ while ((DCSR(ep->dma) & DCSR_STOPSTATE) == 0) ++ cpu_relax(); ++ ++ req = list_entry(ep->queue.next, struct pxa27x_request, queue); ++ tmp = DCMD(ep->dma) & DCMD_LENGTH; ++ req->req.actual = req->req.length - tmp; ++ ++ /* the last tx packet may be incomplete, so flush the fifo. ++ * FIXME correct req.actual if we can ++ */ ++ *ep->reg_udccsr = UDCCSR_FEF; ++} ++ ++static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r) ++{ ++ struct pxa27x_ep *ep = _ep; ++ struct pxa27x_request *req, *req_next; ++ u32 dcsr, tmp, completed; ++ ++ local_irq_disable(); ++ ++ req = list_entry(ep->queue.next, struct pxa27x_request, queue); ++ ++ DMSG("%s, buf:0x%p\n",__FUNCTION__, req->req.buf); ++ ++ ep->dma_irqs++; ++ ep->dev->stats.irqs++; ++ HEX_DISPLAY(ep->dev->stats.irqs); ++ ++ completed = 0; ++ ++ dcsr = DCSR(dmach); ++ DCSR(ep->dma) &= ~DCSR_RUN; ++ ++ if (dcsr & DCSR_BUSERR) { ++ DCSR(dmach) = DCSR_BUSERR; ++ printk(KERN_ERR " Buss Error\n"); ++ req->req.status = -EIO; ++ completed = 1; ++ } else if (dcsr & DCSR_ENDINTR) { ++ DCSR(dmach) = DCSR_ENDINTR; ++ if (ep->dir_in) { ++ tmp = req->req.length - req->req.actual; ++ /* Last packet is a short one*/ ++ if ( tmp < ep->ep.maxpacket) { ++ int count = 0; ++ ++ *ep->reg_udccsr = UDCCSR_SP | \ ++ (*ep->reg_udccsr & UDCCSR_MASK); ++ /*Wait for packet out */ ++ while( (count++ < 10000) && \ ++ !(*ep->reg_udccsr & UDCCSR_FS)); ++ if (count >= 10000) ++ DMSG("Failed to send packet\n"); ++ else ++ DMSG("%s: short packet sent len:%d," ++ "length:%d,actual:%d\n", __FUNCTION__, ++ tmp, req->req.length, req->req.actual); ++ req->req.actual = req->req.length; ++ completed = 1; ++ /* There are still packets to transfer */ ++ } else if ( ep->dma_con) { ++ DMSG("%s: more packets,length:%d,actual:%d\n", ++ __FUNCTION__,req->req.length, ++ req->req.actual); ++ req->req.actual += ep->ep.maxpacket; ++ completed = 0; ++ } else { ++ DMSG("%s: no more packets,length:%d," ++ "actual:%d\n", __FUNCTION__, ++ req->req.length, req->req.actual); ++ req->req.actual = req->req.length; ++ completed = 1; ++ } ++ } else { ++ req->req.actual = req->req.length; ++ completed = 1; ++ } ++ } else if (dcsr & DCSR_EORINTR) { //Only happened in OUT DMA ++ int remain,udccsr ; ++ ++ DCSR(dmach) = DCSR_EORINTR; ++ remain = DCMD(dmach) & DCMD_LENGTH; ++ req->req.actual = req->req.length - remain; ++ ++ udccsr = *ep->reg_udccsr; ++ if (udccsr & UDCCSR_SP) { ++ *ep->reg_udccsr = UDCCSR_PC | (udccsr & UDCCSR_MASK); ++ completed = 1; ++ } ++ DMSG("%s: length:%d actual:%d\n", ++ __FUNCTION__, req->req.length, req->req.actual); ++ } else ++ DMSG("%s: Others dma:%d DCSR:0x%x DCMD:0x%x\n", ++ __FUNCTION__, dmach, DCSR(dmach), DCMD(dmach)); ++ ++ if (likely(completed)) { ++ if (req->queue.next != &ep->queue) { ++ req_next = list_entry(req->queue.next, ++ struct pxa27x_request, queue); ++ kick_dma(ep, req_next); ++ } ++ done(ep, req, 0); ++ } else { ++ kick_dma(ep, req); ++ } ++ ++ local_irq_enable(); ++} ++ ++#endif ++/*-------------------------------------------------------------------------*/ ++ ++static int ++pxa27x_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned int gfp_flags) ++{ ++ struct pxa27x_ep *ep; ++ struct pxa27x_request *req; ++ struct pxa27x_udc *dev; ++ unsigned long flags; ++ ++ req = container_of(_req, struct pxa27x_request, req); ++ if (unlikely (!_req || !_req->complete || !_req->buf|| ++ !list_empty(&req->queue))) { ++ DMSG("%s, bad params\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ ep = container_of(_ep, struct pxa27x_ep, ep); ++ if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { ++ DMSG("%s, bad ep\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ DMSG("%s, ep point %d is queue\n", __FUNCTION__, ep->ep_num); ++ ++ dev = ep->dev; ++ if (unlikely (!dev->driver ++ || dev->gadget.speed == USB_SPEED_UNKNOWN)) { ++ DMSG("%s, bogus device state\n", __FUNCTION__); ++ return -ESHUTDOWN; ++ } ++ ++ /* iso is always one packet per request, that's the only way ++ * we can report per-packet status. that also helps with dma. ++ */ ++ if (unlikely (ep->ep_type == USB_ENDPOINT_XFER_ISOC ++ && req->req.length > le16_to_cpu ++ (ep->desc->wMaxPacketSize))) ++ return -EMSGSIZE; ++ ++#ifdef USE_DMA ++ /* FIXME: caller may already have done the dma mapping */ ++ if (ep->dma >= 0) { ++ _req->dma = dma_map_single(dev->dev, _req->buf, _req->length, ++ (ep->dir_in) ? DMA_TO_DEVICE : DMA_FROM_DEVICE); ++ } ++#endif ++ ++ DBG(DBG_NOISY, "%s queue req %p, len %d buf %p\n", ++ _ep->name, _req, _req->length, _req->buf); ++ ++ local_irq_save(flags); ++ ++ _req->status = -EINPROGRESS; ++ _req->actual = 0; ++ ++ /* kickstart this i/o queue? */ ++ if (list_empty(&ep->queue) && !ep->stopped) { ++ if (ep->desc == 0 /* ep0 */) { ++ unsigned length = _req->length; ++ ++ switch (dev->ep0state) { ++ case EP0_IN_DATA_PHASE: ++ dev->stats.write.ops++; ++ if (write_ep0_fifo(ep, req)) ++ req = 0; ++ break; ++ ++ case EP0_OUT_DATA_PHASE: ++ dev->stats.read.ops++; ++ if (dev->req_pending) ++ ep0start(dev, UDCCSR0_IPR, "OUT"); ++ if (length == 0 || ((UDCCSR0 & UDCCSR0_RNE) != 0 ++ && read_ep0_fifo(ep, req))) { ++ ep0_idle(dev); ++ done(ep, req, 0); ++ req = 0; ++ } ++ break; ++ case EP0_NO_ACTION: ++ ep0_idle(dev); ++ req=0; ++ break; ++ default: ++ DMSG("ep0 i/o, odd state %d\n", dev->ep0state); ++ local_irq_restore (flags); ++ return -EL2HLT; ++ } ++#ifdef USE_DMA ++ /* either start dma or prime pio pump */ ++ } else if (ep->dma >= 0) { ++ kick_dma(ep, req); ++#endif ++ /* can the FIFO can satisfy the request immediately? */ ++ } else if (ep->dir_in ++ && (*ep->reg_udccsr & UDCCSR_FS) != 0 ++ && write_fifo(ep, req)) { ++ req = 0; ++ } else if ((*ep->reg_udccsr & UDCCSR_FS) != 0 ++ && read_fifo(ep, req)) { ++ req = 0; ++ } ++ DMSG("req:%p,ep->desc:%p,ep->dma:%d\n", req, ep->desc, ep->dma); ++ if (likely (req && ep->desc) && ep->dma < 0) ++ pio_irq_enable(ep->ep_num); ++ } ++ ++ /* pio or dma irq handler advances the queue. */ ++ if (likely (req != 0)) ++ list_add_tail(&req->queue, &ep->queue); ++ local_irq_restore(flags); ++ ++ return 0; ++} ++ ++ ++/* ++ * nuke - dequeue ALL requests ++ */ ++static void nuke(struct pxa27x_ep *ep, int status) ++{ ++ struct pxa27x_request *req; ++ ++ /* called with irqs blocked */ ++#ifdef USE_DMA ++ if (ep->dma >= 0 && !ep->stopped) ++ cancel_dma(ep); ++#endif ++ while (!list_empty(&ep->queue)) { ++ req = list_entry(ep->queue.next, struct pxa27x_request, queue); ++ done(ep, req, status); ++ } ++ if (ep->desc) ++ pio_irq_disable (ep->ep_num); ++} ++ ++ ++/* dequeue JUST ONE request */ ++static int pxa27x_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) ++{ ++ struct pxa27x_ep *ep; ++ struct pxa27x_request *req; ++ unsigned long flags; ++ ++ ep = container_of(_ep, struct pxa27x_ep, ep); ++ if (!_ep || ep->ep.name == ep0name) ++ return -EINVAL; ++ ++ local_irq_save(flags); ++ ++ /* make sure it's actually queued on this endpoint */ ++ list_for_each_entry (req, &ep->queue, queue) { ++ if (&req->req == _req) ++ break; ++ } ++ if (&req->req != _req) { ++ local_irq_restore(flags); ++ return -EINVAL; ++ } ++ ++#ifdef USE_DMA ++ if (ep->dma >= 0 && ep->queue.next == &req->queue && !ep->stopped) { ++ cancel_dma(ep); ++ done(ep, req, -ECONNRESET); ++ /* restart i/o */ ++ if (!list_empty(&ep->queue)) { ++ req = list_entry(ep->queue.next, ++ struct pxa27x_request, queue); ++ kick_dma(ep, req); ++ } ++ } else ++#endif ++ done(ep, req, -ECONNRESET); ++ ++ local_irq_restore(flags); ++ return 0; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static int pxa27x_ep_set_halt(struct usb_ep *_ep, int value) ++{ ++ struct pxa27x_ep *ep; ++ unsigned long flags; ++ ++ DMSG("%s is called\n", __FUNCTION__); ++ ep = container_of(_ep, struct pxa27x_ep, ep); ++ if (unlikely (!_ep ++ || (!ep->desc && ep->ep.name != ep0name)) ++ || ep->ep_type == USB_ENDPOINT_XFER_ISOC) { ++ DMSG("%s, bad ep\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ if (value == 0) { ++ /* this path (reset toggle+halt) is needed to implement ++ * SET_INTERFACE on normal hardware. but it can't be ++ * done from software on the PXA UDC, and the hardware ++ * forgets to do it as part of SET_INTERFACE automagic. ++ */ ++ DMSG("only host can clear %s halt\n", _ep->name); ++ return -EROFS; ++ } ++ ++ local_irq_save(flags); ++ ++ if (ep->dir_in && ((*ep->reg_udccsr & UDCCSR_FS) == 0 ++ || !list_empty(&ep->queue))) { ++ local_irq_restore(flags); ++ return -EAGAIN; ++ } ++ ++ /* FST bit is the same for control, bulk in, bulk out, interrupt in */ ++ *ep->reg_udccsr = UDCCSR_FST|UDCCSR_FEF; ++ ++ /* ep0 needs special care */ ++ if (!ep->desc) { ++ start_watchdog(ep->dev); ++ ep->dev->req_pending = 0; ++ ep->dev->ep0state = EP0_STALL; ++ LED_EP0_OFF; ++ ++ /* and bulk/intr endpoints like dropping stalls too */ ++ } else { ++ unsigned i; ++ for (i = 0; i < 1000; i += 20) { ++ if (*ep->reg_udccsr & UDCCSR_SST) ++ break; ++ udelay(20); ++ } ++ } ++ local_irq_restore(flags); ++ ++ DBG(DBG_VERBOSE, "%s halt\n", _ep->name); ++ return 0; ++} ++ ++static int pxa27x_ep_fifo_status(struct usb_ep *_ep) ++{ ++ struct pxa27x_ep *ep; ++ ++ ep = container_of(_ep, struct pxa27x_ep, ep); ++ if (!_ep) { ++ DMSG("%s, bad ep\n", __FUNCTION__); ++ return -ENODEV; ++ } ++ /* pxa can't report unclaimed bytes from IN fifos */ ++ if (ep->dir_in) ++ return -EOPNOTSUPP; ++ if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN ++ || (*ep->reg_udccsr & UDCCSR_FS) == 0) ++ return 0; ++ else ++ return (*ep->reg_udcbcr & 0xfff) + 1; ++} ++ ++static void pxa27x_ep_fifo_flush(struct usb_ep *_ep) ++{ ++ struct pxa27x_ep *ep; ++ ++ ep = container_of(_ep, struct pxa27x_ep, ep); ++ if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { ++ DMSG("%s, bad ep\n", __FUNCTION__); ++ return; ++ } ++ ++ /* toggle and halt bits stay unchanged */ ++ ++ /* for OUT, just read and discard the FIFO contents. */ ++ if (!ep->dir_in) { ++ while (((*ep->reg_udccsr) & UDCCSR_BNE) != 0) ++ (void) *ep->reg_udcdr; ++ return; ++ } ++ ++ /* most IN status is the same, but ISO can't stall */ ++ *ep->reg_udccsr = UDCCSR_PC|UDCCSR_FST|UDCCSR_TRN ++ | (ep->ep_type == USB_ENDPOINT_XFER_ISOC) ++ ? 0 : UDCCSR_SST; ++} ++ ++ ++static struct usb_ep_ops pxa27x_ep_ops = { ++ .enable = pxa27x_ep_enable, ++ .disable = pxa27x_ep_disable, ++ ++ .alloc_request = pxa27x_ep_alloc_request, ++ .free_request = pxa27x_ep_free_request, ++ ++ .alloc_buffer = pxa27x_ep_alloc_buffer, ++ .free_buffer = pxa27x_ep_free_buffer, ++ ++ .queue = pxa27x_ep_queue, ++ .dequeue = pxa27x_ep_dequeue, ++ ++ .set_halt = pxa27x_ep_set_halt, ++ .fifo_status = pxa27x_ep_fifo_status, ++ .fifo_flush = pxa27x_ep_fifo_flush, ++}; ++ ++ ++/* --------------------------------------------------------------------------- ++ * device-scoped parts of the api to the usb controller hardware ++ * --------------------------------------------------------------------------- ++ */ ++ ++static inline void validate_fifo_size(struct pxa27x_ep *pxa_ep, u8 bmAttributes) ++{ ++ switch (bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { ++ case USB_ENDPOINT_XFER_CONTROL: ++ pxa_ep->fifo_size = EP0_FIFO_SIZE; ++ break; ++ case USB_ENDPOINT_XFER_ISOC: ++ pxa_ep->fifo_size = ISO_FIFO_SIZE; ++ break; ++ case USB_ENDPOINT_XFER_BULK: ++ pxa_ep->fifo_size = BULK_FIFO_SIZE; ++ break; ++ case USB_ENDPOINT_XFER_INT: ++ pxa_ep->fifo_size = INT_FIFO_SIZE; ++ break; ++ default: ++ break; ++ } ++} ++ ++#define NAME_SIZE 18 ++struct usb_ep* pxa27x_ep_alloc(struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc, int config, int interface, int alt) ++{ ++ u32 tmp ; ++ unsigned i; ++ char* name; ++ struct usb_ep * ep = NULL; ++ struct pxa27x_ep *pxa_ep = NULL; ++ struct pxa27x_udc *dev = the_controller; ++ ++ DMSG("pxa27x_config_ep is called\n"); ++ DMSG(" usb endpoint descriptor is:\n" ++ " bLength:%d\n" ++ " bDescriptorType:%x\n" ++ " bEndpointAddress:%x\n" ++ " bmAttributes:%x\n" ++ " wMaxPacketSize:%d\n", ++ desc->bLength, ++ desc->bDescriptorType,desc->bEndpointAddress, ++ desc->bmAttributes,desc->wMaxPacketSize); ++ ++ for (i = 1; i < UDC_EP_NUM; i++) { ++ if(!dev->ep[i].assigned) { ++ pxa_ep = &dev->ep[i]; ++ pxa_ep->assigned = 1; ++ pxa_ep->ep_num = i; ++ break; ++ } ++ } ++ if (unlikely(i == UDC_EP_NUM)) { ++ printk(KERN_ERR __FILE__ ": Failed to find a spare endpoint\n"); ++ return ep; ++ } ++ ++ ++ ep = &pxa_ep->ep; ++ ++ pxa_ep->dev = dev; ++ pxa_ep->desc = desc; ++ pxa_ep->pio_irqs = pxa_ep->dma_irqs = 0; ++ pxa_ep->dma = -1; ++ ++ if (!(desc->bEndpointAddress & 0xF)) ++ desc->bEndpointAddress |= i; ++ ++ if (!(desc->wMaxPacketSize)) { ++ validate_fifo_size(pxa_ep, desc->bmAttributes); ++ desc->wMaxPacketSize = pxa_ep->fifo_size; ++ } else ++ pxa_ep->fifo_size = desc->wMaxPacketSize; ++ ++ pxa_ep->dir_in = (desc->bEndpointAddress & USB_DIR_IN) ? 1 : 0; ++ pxa_ep->ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; ++ pxa_ep->stopped = 1; ++ pxa_ep->dma_con = 0; ++ pxa_ep->config = config; ++ pxa_ep->interface = interface; ++ pxa_ep->aisn = alt; ++ ++ pxa_ep->reg_udccsr = &UDCCSR0 + i; ++ pxa_ep->reg_udcbcr = &UDCBCR0 + i; ++ pxa_ep->reg_udcdr = &UDCDR0 + i ; ++ pxa_ep->reg_udccr = &UDCCRA - 1 + i; ++#ifdef USE_DMA ++ pxa_ep->reg_drcmr = &DRCMR24 + i; ++#endif ++ ++ DMSG("udccsr=0x%8x, udcbcr=0x%8x, udcdr=0x%8x," ++ "udccr0=0x%8x\n", ++ (unsigned)pxa_ep->reg_udccsr, ++ (unsigned)pxa_ep->reg_udcbcr, ++ (unsigned)pxa_ep->reg_udcdr, ++ (unsigned)pxa_ep->reg_udccr); ++ ++ /* Configure UDCCR */ ++ tmp = 0; ++ tmp |= (pxa_ep->config << UDCCONR_CN_S) & UDCCONR_CN; ++#if 0 ++ tmp |= (pxa_ep->interface << UDCCONR_IN_S) & UDCCONR_IN; ++ tmp |= (pxa_ep->aisn << UDCCONR_AISN_S) & UDCCONR_AISN; ++#else ++ tmp |= (0 << UDCCONR_IN_S) & UDCCONR_IN; ++ tmp |= (0 << UDCCONR_AISN_S) & UDCCONR_AISN; ++#endif ++ tmp |= (desc->bEndpointAddress << UDCCONR_EN_S) & UDCCONR_EN; ++ tmp |= (pxa_ep->ep_type << UDCCONR_ET_S) & UDCCONR_ET; ++ tmp |= (pxa_ep->dir_in) ? UDCCONR_ED : 0; ++ tmp |= (min(pxa_ep->fifo_size, (unsigned)desc->wMaxPacketSize) \ ++ << UDCCONR_MPS_S ) & UDCCONR_MPS; ++ tmp |= UDCCONR_DE | UDCCONR_EE; ++// tmp |= UDCCONR_EE; ++ ++ *pxa_ep->reg_udccr = tmp; ++ ++#ifdef USE_DMA ++ /* Only BULK use DMA */ ++ if ((pxa_ep->ep_type & USB_ENDPOINT_XFERTYPE_MASK)\ ++ == USB_ENDPOINT_XFER_BULK) ++ *pxa_ep->reg_udccsr = UDCCSR_DME; ++#endif ++ ++ DMSG("UDCCR: 0x%p is 0x%x\n", pxa_ep->reg_udccr,*pxa_ep->reg_udccr); ++ ++ /* Fill ep name*/ ++ name = kmalloc(NAME_SIZE, GFP_KERNEL); ++ if (!name) { ++ printk(KERN_ERR "%s: Error\n", __FUNCTION__); ++ return NULL; ++ } ++ ++ switch (pxa_ep->ep_type) { ++ case USB_ENDPOINT_XFER_BULK: ++ sprintf(name, "Bulk-%s-%d", (pxa_ep->dir_in ? "in":"out"), i); ++ break; ++ case USB_ENDPOINT_XFER_INT: ++ sprintf(name, "Interrupt-%s-%d", (pxa_ep->dir_in ? \ ++ "in":"out"), i); ++ break; ++ default: ++ sprintf(name, "endpoint-%s-%d", (pxa_ep->dir_in ? \ ++ "in":"out"), i); ++ break; ++ } ++ ep->name = name; ++ ++ ep->ops = &pxa27x_ep_ops; ++ ep->maxpacket = min((ushort)pxa_ep->fifo_size, desc->wMaxPacketSize); ++ ++ list_add_tail (&ep->ep_list, &gadget->ep_list); ++ return ep; ++} ++ ++static int pxa27x_udc_get_frame(struct usb_gadget *_gadget) ++{ ++ return (UDCFNR & 0x3FF); ++} ++ ++static int pxa27x_udc_wakeup(struct usb_gadget *_gadget) ++{ ++ /* host may not have enabled remote wakeup */ ++ if ((UDCCR & UDCCR_DWRE) == 0) ++ return -EHOSTUNREACH; ++ udc_set_mask_UDCCR(UDCCR_UDR); ++ return 0; ++} ++ ++static const struct usb_gadget_ops pxa27x_udc_ops = { ++ .ep_alloc = pxa27x_ep_alloc, ++ .get_frame = pxa27x_udc_get_frame, ++ .wakeup = pxa27x_udc_wakeup, ++ // current versions must always be self-powered ++}; ++ ++ ++/*-------------------------------------------------------------------------*/ ++ ++#ifdef UDC_PROC_FILE ++ ++static const char proc_node_name [] = "driver/udc"; ++ ++static int ++udc_proc_read(char *page, char **start, off_t off, int count, ++ int *eof, void *_dev) ++{ ++ char *buf = page; ++ struct pxa27x_udc *dev = _dev; ++ char *next = buf; ++ unsigned size = count; ++ unsigned long flags; ++ int i, t; ++ u32 tmp; ++ ++ if (off != 0) ++ return 0; ++ ++ local_irq_save(flags); ++ ++ /* basic device status */ ++ t = scnprintf(next, size, DRIVER_DESC "\n" ++ "%s version: %s\nGadget driver: %s\n", ++ driver_name, DRIVER_VERSION SIZE_STR DMASTR, ++ dev->driver ? dev->driver->driver.name : "(none)"); ++ size -= t; ++ next += t; ++ ++ /* registers for device and ep0 */ ++ t = scnprintf(next, size, ++ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X\n", ++ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); ++ size -= t; ++ next += t; ++ ++ tmp = UDCCR; ++ t = scnprintf(next, size,"udccr %02X =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", tmp, ++ (tmp & UDCCR_OEN) ? " oen":"", ++ (tmp & UDCCR_AALTHNP) ? " aalthnp":"", ++ (tmp & UDCCR_AHNP) ? " rem" : "", ++ (tmp & UDCCR_BHNP) ? " rstir" : "", ++ (tmp & UDCCR_DWRE) ? " dwre" : "", ++ (tmp & UDCCR_SMAC) ? " smac" : "", ++ (tmp & UDCCR_EMCE) ? " emce" : "", ++ (tmp & UDCCR_UDR) ? " udr" : "", ++ (tmp & UDCCR_UDA) ? " uda" : "", ++ (tmp & UDCCR_UDE) ? " ude" : "", ++ (tmp & UDCCR_ACN) >> UDCCR_ACN_S, ++ (tmp & UDCCR_AIN) >> UDCCR_AIN_S, ++ (tmp & UDCCR_AAISN)>> UDCCR_AAISN_S ); ++ ++ size -= t; ++ next += t; ++ ++ tmp = UDCCSR0; ++ t = scnprintf(next, size, ++ "udccsr0 %02X =%s%s%s%s%s%s%s\n", tmp, ++ (tmp & UDCCSR0_SA) ? " sa" : "", ++ (tmp & UDCCSR0_RNE) ? " rne" : "", ++ (tmp & UDCCSR0_FST) ? " fst" : "", ++ (tmp & UDCCSR0_SST) ? " sst" : "", ++ (tmp & UDCCSR0_DME) ? " dme" : "", ++ (tmp & UDCCSR0_IPR) ? " ipr" : "", ++ (tmp & UDCCSR0_OPC) ? " opc" : ""); ++ size -= t; ++ next += t; ++ ++ if (!dev->driver) ++ goto done; ++ ++ t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", ++ dev->stats.write.bytes, dev->stats.write.ops, ++ dev->stats.read.bytes, dev->stats.read.ops, ++ dev->stats.irqs); ++ size -= t; ++ next += t; ++ ++ /* dump endpoint queues */ ++ for (i = 0; i < UDC_EP_NUM; i++) { ++ struct pxa27x_ep *ep = &dev->ep [i]; ++ struct pxa27x_request *req; ++ int t; ++ ++ if (i != 0) { ++ const struct usb_endpoint_descriptor *d; ++ ++ d = ep->desc; ++ if (!d) ++ continue; ++ tmp = *dev->ep [i].reg_udccsr; ++ t = scnprintf(next, size, ++ "%s max %d %s udccs %02x udccr:0x%x\n", ++ ep->ep.name, le16_to_cpu (d->wMaxPacketSize), ++ (ep->dma >= 0) ? "dma" : "pio", tmp, ++ *dev->ep[i].reg_udccr); ++ /* TODO translate all five groups of udccs bits! */ ++ ++ } else /* ep0 should only have one transfer queued */ ++ t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n", ++ ep->pio_irqs); ++ if (t <= 0 || t > size) ++ goto done; ++ size -= t; ++ next += t; ++ ++ if (list_empty(&ep->queue)) { ++ t = scnprintf(next, size, "\t(nothing queued)\n"); ++ if (t <= 0 || t > size) ++ goto done; ++ size -= t; ++ next += t; ++ continue; ++ } ++ list_for_each_entry(req, &ep->queue, queue) { ++#ifdef USE_DMA ++ if (ep->dma >= 0 && req->queue.prev == &ep->queue) ++ t = scnprintf(next, size, ++ "\treq %p len %d/%d " ++ "buf %p (dma%d dcmd %08x)\n", ++ &req->req, req->req.actual, ++ req->req.length, req->req.buf, ++ ep->dma, DCMD(ep->dma) ++ // low 13 bits == bytes-to-go ++ ); ++ else ++#endif ++ t = scnprintf(next, size, ++ "\treq %p len %d/%d buf %p\n", ++ &req->req, req->req.actual, ++ req->req.length, req->req.buf); ++ if (t <= 0 || t > size) ++ goto done; ++ size -= t; ++ next += t; ++ } ++ } ++ ++done: ++ local_irq_restore(flags); ++ *eof = 1; ++ return count - size; ++} ++ ++#define create_proc_files() \ ++ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev) ++#define remove_proc_files() \ ++ remove_proc_entry(proc_node_name, NULL) ++ ++#else /* !UDC_PROC_FILE */ ++#define create_proc_files() do {} while (0) ++#define remove_proc_files() do {} while (0) ++ ++#endif /* UDC_PROC_FILE */ ++ ++/* "function" sysfs attribute */ ++static ssize_t ++show_function (struct device *_dev, struct device_attribute *attr, char *buf) ++{ ++ struct pxa27x_udc *dev = dev_get_drvdata (_dev); ++ ++ if (!dev->driver ++ || !dev->driver->function ++ || strlen (dev->driver->function) > PAGE_SIZE) ++ return 0; ++ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function); ++} ++static DEVICE_ATTR (function, S_IRUGO, show_function, NULL); ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* ++ * udc_disable - disable USB device controller ++ */ ++static void udc_disable(struct pxa27x_udc *dev) ++{ ++ UDCICR0 = UDCICR1 = 0x00000000; ++ ++ udc_clear_mask_UDCCR(UDCCR_UDE); ++ ++ /* Disable clock for USB device */ ++ pxa_set_cken(CKEN11_USB, 0); ++ ++ ep0_idle (dev); ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ if (dev->mach->gpio_pullup) ++ GPCR(dev->mach->gpio_pullup) = GPIO_bit(dev->mach->gpio_pullup); ++ if (dev->mach->udc_command) ++ dev->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); ++ ++ make_usb_disappear(); ++} ++ ++ ++/* ++ * udc_reinit - initialize software state ++ */ ++static void udc_reinit(struct pxa27x_udc *dev) ++{ ++ u32 i; ++ ++ dev->ep0state = EP0_IDLE; ++ ++ /* basic endpoint records init */ ++ for (i = 0; i < UDC_EP_NUM; i++) { ++ struct pxa27x_ep *ep = &dev->ep[i]; ++ ++ ep->stopped = 0; ++ ep->pio_irqs = ep->dma_irqs = 0; ++ } ++ dev->configuration = 0; ++ dev->interface = 0; ++ dev->alternate = 0; ++ /* the rest was statically initialized, and is read-only */ ++} ++ ++/* until it's enabled, this UDC should be completely invisible ++ * to any USB host. ++ */ ++static void udc_enable (struct pxa27x_udc *dev) ++{ ++ udc_clear_mask_UDCCR(UDCCR_UDE); ++ ++ /* Enable clock for USB device */ ++ pxa_set_cken(CKEN11_USB, 1); ++ ++ UDCICR0 = UDCICR1 = 0; ++ ++ ep0_idle(dev); ++ dev->gadget.speed = USB_SPEED_FULL; ++ dev->stats.irqs = 0; ++ ++ udc_set_mask_UDCCR(UDCCR_UDE); ++ udelay (2); ++ if (UDCCR & UDCCR_EMCE) ++ { ++ printk(KERN_ERR ": There are error in configuration, udc disabled\n"); ++ } ++ ++ /* caller must be able to sleep in order to cope ++ * with startup transients. ++ */ ++ msleep(100); ++ ++ /* enable suspend/resume and reset irqs */ ++ UDCICR1 = UDCICR1_IECC | UDCICR1_IERU | UDCICR1_IESU | UDCICR1_IERS; ++ ++ /* enable ep0 irqs */ ++ UDCICR0 = UDCICR_INT(0,UDCICR_INT_MASK); ++#if 0 ++ for(i=1; i < UDC_EP_NUM; i++) { ++ if (dev->ep[i].assigned) ++ pio_irq_enable(i); ++ } ++#endif ++ ++ if (dev->mach->gpio_pullup) ++ GPSR(dev->mach->gpio_pullup) = GPIO_bit(dev->mach->gpio_pullup); ++ if (dev->mach->udc_command) ++ dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); ++ ++ /* FIXME */ ++ let_usb_appear(); ++} ++ ++ ++/* when a driver is successfully registered, it will receive ++ * control requests including set_configuration(), which enables ++ * non-control requests. then usb traffic follows until a ++ * disconnect is reported. then a host may connect again, or ++ * the driver might get unbound. ++ */ ++int usb_gadget_register_driver(struct usb_gadget_driver *driver) ++{ ++ struct pxa27x_udc *dev = the_controller; ++ int retval; ++ ++ DMSG("dev=0x%x, driver=0x%x, speed=%d, " ++ "bind=0x%x, unbind=0x%x, disconnect=0x%x, setup=0x%x\n", ++ (unsigned)dev, (unsigned)driver, driver->speed, ++ (unsigned)driver->bind, (unsigned)driver->unbind, ++ (unsigned)driver->disconnect, (unsigned)driver->setup); ++ ++ if (!driver || driver->speed != USB_SPEED_FULL ++ || !driver->bind ++ || !driver->unbind ++ || !driver->disconnect ++ || !driver->setup) ++ return -EINVAL; ++ if (!dev) ++ return -ENODEV; ++ if (dev->driver) ++ return -EBUSY; ++ ++ /* first hook up the driver ... */ ++ dev->driver = driver; ++ dev->gadget.dev.driver = &driver->driver; ++ ++ device_add(&dev->gadget.dev); ++ retval = driver->bind(&dev->gadget); ++ if (retval) { ++ DMSG("bind to driver %s --> error %d\n", ++ driver->driver.name, retval); ++ device_del (&dev->gadget.dev); ++ ++ dev->driver = 0; ++ dev->gadget.dev.driver = 0; ++ return retval; ++ } ++ device_create_file(dev->dev, &dev_attr_function); ++ ++ /* ... then enable host detection and ep0; and we're ready ++ * for set_configuration as well as eventual disconnect. ++ * NOTE: this shouldn't power up until later. ++ */ ++ DMSG("registered gadget driver '%s'\n", driver->driver.name); ++ udc_enable(dev); ++ dump_state(dev); ++ return 0; ++} ++EXPORT_SYMBOL(usb_gadget_register_driver); ++ ++static void ++stop_activity(struct pxa27x_udc *dev, struct usb_gadget_driver *driver) ++{ ++ int i; ++ ++ DMSG("Trace path 1\n"); ++ /* don't disconnect drivers more than once */ ++ if (dev->gadget.speed == USB_SPEED_UNKNOWN) ++ driver = 0; ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ /* prevent new request submissions, kill any outstanding requests */ ++ for (i = 0; i < UDC_EP_NUM; i++) { ++ struct pxa27x_ep *ep = &dev->ep[i]; ++ ++ ep->stopped = 1; ++ nuke(ep, -ESHUTDOWN); ++ } ++ del_timer_sync(&dev->timer); ++ ++ /* report disconnect; the driver is already quiesced */ ++ if (driver) ++ driver->disconnect(&dev->gadget); ++ ++ /* re-init driver-visible data structures */ ++ udc_reinit(dev); ++} ++ ++int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) ++{ ++ struct pxa27x_udc *dev = the_controller; ++ ++ if (!dev) ++ return -ENODEV; ++ if (!driver || driver != dev->driver) ++ return -EINVAL; ++ ++ local_irq_disable(); ++ udc_disable(dev); ++ stop_activity(dev, driver); ++ local_irq_enable(); ++ ++ driver->unbind(&dev->gadget); ++ dev->driver = 0; ++ ++ device_del (&dev->gadget.dev); ++ device_remove_file(dev->dev, &dev_attr_function); ++ ++ DMSG("unregistered gadget driver '%s'\n", driver->driver.name); ++ dump_state(dev); ++ return 0; ++} ++EXPORT_SYMBOL(usb_gadget_unregister_driver); ++ ++#ifndef enable_disconnect_irq ++#define enable_disconnect_irq() do {} while (0) ++#define disable_disconnect_irq() do {} while (0) ++#endif ++ ++ ++/*-------------------------------------------------------------------------*/ ++ ++static inline void clear_ep_state (struct pxa27x_udc *dev) ++{ ++ unsigned i; ++ ++ /* hardware SET_{CONFIGURATION,INTERFACE} automagic resets endpoint ++ * fifos, and pending transactions mustn't be continued in any case. ++ */ ++ for (i = 1; i < UDC_EP_NUM; i++) ++ nuke(&dev->ep[i], -ECONNABORTED); ++} ++ ++static void udc_watchdog(unsigned long _dev) ++{ ++ struct pxa27x_udc *dev = (void *)_dev; ++ ++ local_irq_disable(); ++ if (dev->ep0state == EP0_STALL ++ && (UDCCSR0 & UDCCSR0_FST) == 0 ++ && (UDCCSR0 & UDCCSR0_SST) == 0) { ++ UDCCSR0 = UDCCSR0_FST|UDCCSR0_FTF; ++ DBG(DBG_VERBOSE, "ep0 re-stall\n"); ++ start_watchdog(dev); ++ } ++ local_irq_enable(); ++} ++ ++static void handle_ep0 (struct pxa27x_udc *dev) ++{ ++ u32 udccsr0 = UDCCSR0; ++ struct pxa27x_ep *ep = &dev->ep [0]; ++ struct pxa27x_request *req; ++ union { ++ struct usb_ctrlrequest r; ++ u8 raw [8]; ++ u32 word [2]; ++ } u; ++ ++ if (list_empty(&ep->queue)) ++ req = 0; ++ else ++ req = list_entry(ep->queue.next, struct pxa27x_request, queue); ++ ++ /* clear stall status */ ++ if (udccsr0 & UDCCSR0_SST) { ++ nuke(ep, -EPIPE); ++ UDCCSR0 = UDCCSR0_SST; ++ del_timer(&dev->timer); ++ ep0_idle(dev); ++ } ++ ++ /* previous request unfinished? non-error iff back-to-back ... */ ++ if ((udccsr0 & UDCCSR0_SA) != 0 && dev->ep0state != EP0_IDLE) { ++ nuke(ep, 0); ++ del_timer(&dev->timer); ++ ep0_idle(dev); ++ } ++ ++ switch (dev->ep0state) { ++ case EP0_NO_ACTION: ++ printk(KERN_INFO"%s: Busy\n", __FUNCTION__); ++ /*Fall through */ ++ case EP0_IDLE: ++ /* late-breaking status? */ ++ udccsr0 = UDCCSR0; ++ ++ /* start control request? */ ++ if (likely((udccsr0 & (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE)) ++ == (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE))) { ++ int i; ++ ++ nuke (ep, -EPROTO); ++ /* read SETUP packet */ ++ for (i = 0; i < 2; i++) { ++ if (unlikely(!(UDCCSR0 & UDCCSR0_RNE))) { ++bad_setup: ++ DMSG("SETUP %d!\n", i); ++ goto stall; ++ } ++ u.word [i] = UDCDR0; ++ } ++ if (unlikely((UDCCSR0 & UDCCSR0_RNE) != 0)) ++ goto bad_setup; ++ ++ le16_to_cpus (&u.r.wValue); ++ le16_to_cpus (&u.r.wIndex); ++ le16_to_cpus (&u.r.wLength); ++ ++ LED_EP0_ON; ++ ++ DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n", ++ u.r.bRequestType, u.r.bRequest, ++ u.r.wValue, u.r.wIndex, u.r.wLength); ++ /* cope with automagic for some standard requests. */ ++ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK) ++ == USB_TYPE_STANDARD; ++ dev->req_config = 0; ++ dev->req_pending = 1; ++#if 0 ++ switch (u.r.bRequest) { ++ /* hardware was supposed to hide this */ ++ case USB_REQ_SET_CONFIGURATION: ++ case USB_REQ_SET_INTERFACE: ++ case USB_REQ_SET_ADDRESS: ++ printk(KERN_ERR "Should not come here\n"); ++ break; ++ } ++ ++#endif ++ if (u.r.bRequestType & USB_DIR_IN) ++ dev->ep0state = EP0_IN_DATA_PHASE; ++ else ++ dev->ep0state = EP0_OUT_DATA_PHASE; ++ i = dev->driver->setup(&dev->gadget, &u.r); ++ ++ if (i < 0) { ++ /* hardware automagic preventing STALL... */ ++ if (dev->req_config) { ++ /* hardware sometimes neglects to tell ++ * tell us about config change events, ++ * so later ones may fail... ++ */ ++ WARN("config change %02x fail %d?\n", ++ u.r.bRequest, i); ++ return; ++ /* TODO experiment: if has_cfr, ++ * hardware didn't ACK; maybe we ++ * could actually STALL! ++ */ ++ } ++ DBG(DBG_VERBOSE, "protocol STALL, " ++ "%02x err %d\n", UDCCSR0, i); ++stall: ++ /* the watchdog timer helps deal with cases ++ * where udc seems to clear FST wrongly, and ++ * then NAKs instead of STALLing. ++ */ ++ ep0start(dev, UDCCSR0_FST|UDCCSR0_FTF, "stall"); ++ start_watchdog(dev); ++ dev->ep0state = EP0_STALL; ++ LED_EP0_OFF; ++ ++ /* deferred i/o == no response yet */ ++ } else if (dev->req_pending) { ++ if (likely(dev->ep0state == EP0_IN_DATA_PHASE ++ || dev->req_std || u.r.wLength)) ++ ep0start(dev, 0, "defer"); ++ else ++ ep0start(dev, UDCCSR0_IPR, "defer/IPR"); ++ } ++ ++ /* expect at least one data or status stage irq */ ++ return; ++ ++ } else { ++ /* some random early IRQ: ++ * - we acked FST ++ * - IPR cleared ++ * - OPC got set, without SA (likely status stage) ++ */ ++ UDCCSR0 = udccsr0 & (UDCCSR0_SA|UDCCSR0_OPC); ++ } ++ break; ++ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR etc */ ++ if (udccsr0 & UDCCSR0_OPC) { ++ UDCCSR0 = UDCCSR0_OPC|UDCCSR0_FTF; ++ DBG(DBG_VERBOSE, "ep0in premature status\n"); ++ if (req) ++ done(ep, req, 0); ++ ep0_idle(dev); ++ } else /* irq was IPR clearing */ { ++ if (req) { ++ /* this IN packet might finish the request */ ++ (void) write_ep0_fifo(ep, req); ++ } /* else IN token before response was written */ ++ } ++ break; ++ case EP0_OUT_DATA_PHASE: /* SET_DESCRIPTOR etc */ ++ if (udccsr0 & UDCCSR0_OPC) { ++ if (req) { ++ /* this OUT packet might finish the request */ ++ if (read_ep0_fifo(ep, req)) ++ done(ep, req, 0); ++ /* else more OUT packets expected */ ++ } /* else OUT token before read was issued */ ++ } else /* irq was IPR clearing */ { ++ DBG(DBG_VERBOSE, "ep0out premature status\n"); ++ if (req) ++ done(ep, req, 0); ++ ep0_idle(dev); ++ } ++ break; ++ case EP0_STALL: ++ UDCCSR0 = UDCCSR0_FST; ++ break; ++ } ++ UDCISR0 = UDCISR_INT(0, UDCISR_INT_MASK); ++} ++ ++ ++static void handle_ep(struct pxa27x_ep *ep) ++{ ++ struct pxa27x_request *req; ++ int completed; ++ u32 udccsr=0; ++ ++ DMSG("%s is called\n", __FUNCTION__); ++ do { ++ completed = 0; ++ if (likely (!list_empty(&ep->queue))) { ++ req = list_entry(ep->queue.next, ++ struct pxa27x_request, queue); ++ } else ++ req = 0; ++ ++// udccsr = *ep->reg_udccsr; ++ DMSG("%s: req:%p, udcisr0:0x%x udccsr %p:0x%x\n", __FUNCTION__, ++ req, UDCISR0, ep->reg_udccsr, *ep->reg_udccsr); ++ if (unlikely(ep->dir_in)) { ++ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; ++ if (unlikely (udccsr)) ++ *ep->reg_udccsr = udccsr; ++ ++ if (req && likely ((*ep->reg_udccsr & UDCCSR_FS) != 0)) ++ completed = write_fifo(ep, req); ++ ++ } else { ++ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; ++ if (unlikely(udccsr)) ++ *ep->reg_udccsr = udccsr; ++ ++ /* fifos can hold packets, ready for reading... */ ++ if (likely(req)) { ++ completed = read_fifo(ep, req); ++ } else { ++ pio_irq_disable (ep->ep_num); ++ *ep->reg_udccsr = UDCCSR_FEF; ++ DMSG("%s: no req for out data\n", ++ __FUNCTION__); ++ } ++ } ++ ep->pio_irqs++; ++ } while (completed); ++} ++ ++static void pxa27x_change_configuration (struct pxa27x_udc *dev) ++{ ++ struct usb_ctrlrequest req ; ++ ++ req.bRequestType = 0; ++ req.bRequest = USB_REQ_SET_CONFIGURATION; ++ req.wValue = dev->configuration; ++ req.wIndex = 0; ++ req.wLength = 0; ++ ++ dev->ep0state = EP0_NO_ACTION; ++ dev->driver->setup(&dev->gadget, &req); ++ ++} ++ ++static void pxa27x_change_interface (struct pxa27x_udc *dev) ++{ ++ struct usb_ctrlrequest req; ++ ++ req.bRequestType = USB_RECIP_INTERFACE; ++ req.bRequest = USB_REQ_SET_INTERFACE; ++ req.wValue = dev->alternate; ++ req.wIndex = dev->interface; ++ req.wLength = 0; ++ ++ dev->ep0state = EP0_NO_ACTION; ++ dev->driver->setup(&dev->gadget, &req); ++} ++ ++/* ++ * pxa27x_udc_irq - interrupt handler ++ * ++ * avoid delays in ep0 processing. the control handshaking isn't always ++ * under software control (pxa250c0 and the pxa255 are better), and delays ++ * could cause usb protocol errors. ++ */ ++static irqreturn_t pxa27x_udc_irq(int irq, void *_dev) ++{ ++ struct pxa27x_udc *dev = _dev; ++ int handled; ++ ++ dev->stats.irqs++; ++ HEX_DISPLAY(dev->stats.irqs); ++ ++ DBG(DBG_VERBOSE, "Interrupt, UDCISR0:0x%08x, UDCISR1:0x%08x, " ++ "UDCCR:0x%08x\n", UDCISR0, UDCISR1, UDCCR); ++ ++ do { ++ u32 udcir = UDCISR1 & 0xF8000000; ++ ++ handled = 0; ++ ++ /* SUSpend Interrupt Request */ ++ if (unlikely(udcir & UDCISR1_IRSU)) { ++ UDCISR1 = UDCISR1_IRSU; ++ handled = 1; ++ DBG(DBG_VERBOSE, "USB suspend\n"); ++ if (dev->gadget.speed != USB_SPEED_UNKNOWN ++ && dev->driver ++ && dev->driver->suspend) ++ dev->driver->suspend(&dev->gadget); ++ ep0_idle (dev); ++ } ++ ++ /* RESume Interrupt Request */ ++ if (unlikely(udcir & UDCISR1_IRRU)) { ++ UDCISR1 = UDCISR1_IRRU; ++ handled = 1; ++ DBG(DBG_VERBOSE, "USB resume\n"); ++ ++ if (dev->gadget.speed != USB_SPEED_UNKNOWN ++ && dev->driver ++ && dev->driver->resume) ++ dev->driver->resume(&dev->gadget); ++ } ++ ++ if (unlikely(udcir & UDCISR1_IRCC)) { ++ unsigned config, interface, alternate; ++ ++ handled = 1; ++ DBG(DBG_VERBOSE, "USB SET_CONFIGURATION or " ++ "SET_INTERFACE command received\n"); ++ ++ UDCCR |= UDCCR_SMAC; ++ ++ config = (UDCCR & UDCCR_ACN) >> UDCCR_ACN_S; ++ ++ if (dev->configuration != config) { ++ dev->configuration = config; ++ pxa27x_change_configuration(dev) ; ++ } ++ ++ interface = (UDCCR & UDCCR_AIN) >> UDCCR_AIN_S; ++ alternate = (UDCCR & UDCCR_AAISN) >> UDCCR_AAISN_S; ++ ++ if ( (dev->configuration != interface) || \ ++ (dev->alternate != alternate)){ ++ dev->interface = config; ++ dev->alternate = alternate; ++ pxa27x_change_interface(dev); ++ } ++ ++ UDCISR1 = UDCISR1_IRCC; ++ DMSG("%s: con:%d,inter:%d,alt:%d\n", ++ __FUNCTION__, config,interface, alternate); ++ } ++ ++ /* ReSeT Interrupt Request - USB reset */ ++ if (unlikely(udcir & UDCISR1_IRRS)) { ++ UDCISR1 = UDCISR1_IRRS; ++ handled = 1; ++ ++ if ((UDCCR & UDCCR_UDA) == 0) { ++ DBG(DBG_VERBOSE, "SB reset start\n"); ++ ++ /* reset driver and endpoints, ++ * in case that's not yet done ++ */ ++ stop_activity (dev, dev->driver); ++ ++ } ++ INFO("USB reset\n"); ++ dev->gadget.speed = USB_SPEED_FULL; ++ memset(&dev->stats, 0, sizeof dev->stats); ++ ++ } else { ++ u32 udcisr0 = UDCISR0 ; ++ u32 udcisr1 = UDCISR1 & 0xFFFF; ++ int i; ++ ++ if (unlikely (!udcisr0 && !udcisr1)) ++ continue; ++ ++ DBG(DBG_VERY_NOISY, "irq %02x.%02x\n", udcisr1,udcisr0); ++ ++ /* control traffic */ ++ if (udcisr0 & UDCISR0_IR0) { ++ dev->ep[0].pio_irqs++; ++ handle_ep0(dev); ++ handled = 1; ++ } ++ ++ udcisr0 >>= 2; ++ /* endpoint data transfers */ ++ for (i = 1; udcisr0!=0 && i < 16; udcisr0>>=2,i++) { ++ UDCISR0 = UDCISR_INT(i, UDCISR_INT_MASK); ++ ++ if (udcisr0 & UDC_INT_FIFOERROR) ++ printk(KERN_ERR" Endpoint %d Fifo error\n", i); ++ if (udcisr0 & UDC_INT_PACKETCMP) { ++ handle_ep(&dev->ep[i]); ++ handled = 1; ++ } ++ ++ } ++ ++ for (i = 0; udcisr1!=0 && i < 8; udcisr1 >>= 2, i++) { ++ UDCISR1 = UDCISR_INT(i, UDCISR_INT_MASK); ++ ++ if (udcisr1 & UDC_INT_FIFOERROR) { ++ printk(KERN_ERR" Endpoint %d fifo error\n", (i+16)); ++ } ++ ++ if (udcisr1 & UDC_INT_PACKETCMP) { ++ handle_ep(&dev->ep[i+16]); ++ handled = 1; ++ } ++ } ++ } ++ ++ /* we could also ask for 1 msec SOF (SIR) interrupts */ ++ ++ } while (handled); ++ return IRQ_HANDLED; ++} ++ ++static void udc_init_ep(struct pxa27x_udc *dev) ++{ ++ int i; ++ ++ INIT_LIST_HEAD (&dev->gadget.ep_list); ++ INIT_LIST_HEAD (&dev->gadget.ep0->ep_list); ++ ++ for (i = 0; i < UDC_EP_NUM; i++) { ++ struct pxa27x_ep *ep = &dev->ep[i]; ++ ++ ep->dma = -1; ++ if (i != 0) { ++ memset(ep, 0, sizeof(*ep)); ++ } ++ INIT_LIST_HEAD (&ep->queue); ++ } ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static void nop_release (struct device *dev) ++{ ++ DMSG("%s %s\n", __FUNCTION__, dev->bus_id); ++} ++ ++/* this uses load-time allocation and initialization (instead of ++ * doing it at run-time) to save code, eliminate fault paths, and ++ * be more obviously correct. ++ */ ++static struct pxa27x_udc memory = { ++ .gadget = { ++ .ops = &pxa27x_udc_ops, ++ .ep0 = &memory.ep[0].ep, ++ .name = driver_name, ++ .dev = { ++ .bus_id = "gadget", ++ .release = nop_release, ++ }, ++ }, ++ ++ /* control endpoint */ ++ .ep[0] = { ++ .ep = { ++ .name = ep0name, ++ .ops = &pxa27x_ep_ops, ++ .maxpacket = EP0_FIFO_SIZE, ++ }, ++ .dev = &memory, ++ .reg_udccsr = &UDCCSR0, ++ .reg_udcdr = &UDCDR0, ++ } ++}; ++ ++#define CP15R0_VENDOR_MASK 0xffffe000 ++ ++#define CP15R0_XSCALE_VALUE 0x69054000 /* intel/arm/xscale */ ++ ++/* ++ * probe - binds to the platform device ++ */ ++static int pxa27x_udc_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct pxa27x_udc *udc = &memory; ++ int retval; ++ u32 chiprev; ++ ++ /* insist on Intel/ARM/XScale */ ++ asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev)); ++ if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) { ++ printk(KERN_ERR "%s: not XScale!\n", driver_name); ++ return -ENODEV; ++ } ++ /* other non-static parts of init */ ++ udc->dev = dev; ++ udc->mach = dev->platform_data; ++ ++ /* FIXME */ ++ if (udc->mach->gpio_pullup) ++ pxa_gpio_mode((udc->mach->gpio_pullup & GPIO_MD_MASK_NR) | \ ++ GPIO_OUT | GPIO_DFLT_HIGH); ++ ++ init_timer(&udc->timer); ++ udc->timer.function = udc_watchdog; ++ udc->timer.data = (unsigned long) udc; ++ ++ device_initialize(&udc->gadget.dev); ++ udc->gadget.dev.parent = dev; ++ udc->gadget.dev.dma_mask = dev->dma_mask; ++ ++ the_controller = udc; ++ dev_set_drvdata(dev, udc); ++ ++ udc_disable(udc); ++ udc_init_ep(udc); ++ udc_reinit(udc); ++ ++ /* irq setup after old hardware state is cleaned up */ ++ retval = request_irq(IRQ_USB, pxa27x_udc_irq, ++ SA_INTERRUPT, driver_name, udc); ++ if (retval != 0) { ++ printk(KERN_ERR "%s: can't get irq %i, err %d\n", ++ driver_name, IRQ_USB, retval); ++ return -EBUSY; ++ } ++ udc->got_irq = 1; ++ ++ create_proc_files(); ++ ++ return 0; ++} ++ ++static int pxa27x_udc_remove(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct pxa27x_udc *udc = dev->driver_data; ++ ++ udc_disable(udc); ++ remove_proc_files(); ++ usb_gadget_unregister_driver(udc->driver); ++ ++ if (udc->got_irq) { ++ free_irq(IRQ_USB, udc); ++ udc->got_irq = 0; ++ } ++ if (machine_is_lubbock() && udc->got_disc) { ++ free_irq(LUBBOCK_USB_DISC_IRQ, udc); ++ udc->got_disc = 0; ++ } ++ dev_set_drvdata(dev, 0); ++ the_controller = 0; ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++static int pxa27x_udc_suspend(struct platform_device *pdev, pm_message_t state) ++{ ++ struct device *dev = &pdev->dev; ++ struct pxa27x_udc *udc = dev->driver_data; ++ int i; ++ ++ DMSG("%s will go into SUSPEND_POWER_DOWN\n", __FUNCTION__); ++ udc->udccsr0 = UDCCSR0; ++ for(i=1; (iep[i].assigned) { ++ struct pxa27x_ep *ep = &udc->ep[i]; ++ ++ ep->udccsr_value = *ep->reg_udccsr; ++ ep->udccr_value = *ep->reg_udccr; ++ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", ++ i, *ep->reg_udccsr, *ep->reg_udccr); ++ } ++ } ++ ++ udc_clear_mask_UDCCR(UDCCR_UDE); ++ pxa_set_cken(CKEN11_USB, 0); ++ ++ return 0; ++} ++ ++static int pxa27x_udc_resume(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct pxa27x_udc *udc = dev->driver_data; ++ int i; ++ ++ DMSG("%s: udc resume\n", __FUNCTION__); ++ ++ UDCCSR0 = udc->udccsr0 & (UDCCSR0_FST | UDCCSR0_DME); ++ for (i=1; i < UDC_EP_NUM; i++) { ++ if (udc->ep[i].assigned) { ++ struct pxa27x_ep *ep = &udc->ep[i]; ++ ++ *ep->reg_udccsr = ep->udccsr_value; ++ *ep->reg_udccr = ep->udccr_value; ++ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", ++ i, *ep->reg_udccsr, *ep->reg_udccr); ++ } ++ } ++ udc_enable(udc); ++ /* OTGPH bit is set when sleep mode is entered. ++ * it indicates that OTG pad is retaining its state. ++ * Upon exit from sleep mode and before clearing OTGPH, ++ * Software must configure the USB OTG pad, UDC, and UHC ++ * to the state they were in before entering sleep mode.*/ ++ PSSR |= PSSR_OTGPH; ++ ++ return 0; ++} ++#else ++#define pxa27x_udc_suspend NULL ++#define pxa27x_udc_resume NULL ++#endif ++ ++/*-------------------------------------------------------------------------*/ ++ ++static struct platform_driver pxa27x_udc_driver = { ++ .probe = pxa27x_udc_probe, ++ .remove = pxa27x_udc_remove, ++ .suspend = pxa27x_udc_suspend, ++ .resume = pxa27x_udc_resume, ++ .driver = { ++ .name = "pxa2xx-udc", ++ }, ++}; ++ ++static int __init udc_init(void) ++{ ++ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); ++ return platform_driver_register(&pxa27x_udc_driver); ++} ++module_init(udc_init); ++ ++static void __exit udc_exit(void) ++{ ++ platform_driver_unregister(&pxa27x_udc_driver); ++} ++module_exit(udc_exit); ++ ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/pxa27x_udc.h +new file mode 100644 +index 0000000..c4b72a2 +--- /dev/null ++++ b/drivers/usb/gadget/pxa27x_udc.h +@@ -0,0 +1,329 @@ ++/* ++ * linux/drivers/usb/gadget/pxa27x_udc.h ++ * Intel PXA27x on-chip full speed USB device controller ++ * ++ * Copyright (C) 2003 Robert Schwebel , Pengutronix ++ * Copyright (C) 2003 David Brownell ++ * Copyright (C) 2004 Intel Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef __LINUX_USB_GADGET_PXA27X_H ++#define __LINUX_USB_GADGET_PXA27X_H ++ ++#include ++ ++struct pxa27x_udc; ++ ++struct pxa27x_ep { ++ struct usb_ep ep; ++ struct pxa27x_udc *dev; ++ ++ const struct usb_endpoint_descriptor *desc; ++ struct list_head queue; ++ unsigned long pio_irqs; ++ unsigned long dma_irqs; ++ ++ int dma; ++ unsigned fifo_size; ++ unsigned ep_num; ++ unsigned ep_type; ++ ++ unsigned stopped : 1; ++ unsigned dma_con : 1; ++ unsigned dir_in : 1; ++ unsigned assigned : 1; ++ ++ unsigned config; ++ unsigned interface; ++ unsigned aisn; ++ /* UDCCSR = UDC Control/Status Register for this EP ++ * UBCR = UDC Byte Count Remaining (contents of OUT fifo) ++ * UDCDR = UDC Endpoint Data Register (the fifo) ++ * UDCCR = UDC Endpoint Configuration Registers ++ * DRCM = DMA Request Channel Map ++ */ ++ volatile u32 *reg_udccsr; ++ volatile u32 *reg_udcbcr; ++ volatile u32 *reg_udcdr; ++ volatile u32 *reg_udccr; ++#ifdef USE_DMA ++ volatile u32 *reg_drcmr; ++#define drcmr(n) .reg_drcmr = & DRCMR ## n , ++#else ++#define drcmr(n) ++#endif ++ ++#ifdef CONFIG_PM ++ unsigned udccsr_value; ++ unsigned udccr_value; ++#endif ++}; ++ ++struct pxa27x_request { ++ struct usb_request req; ++ struct list_head queue; ++}; ++ ++enum ep0_state { ++ EP0_IDLE, ++ EP0_IN_DATA_PHASE, ++ EP0_OUT_DATA_PHASE, ++// EP0_END_XFER, ++ EP0_STALL, ++ EP0_NO_ACTION ++}; ++ ++#define EP0_FIFO_SIZE ((unsigned)16) ++#define BULK_FIFO_SIZE ((unsigned)64) ++#define ISO_FIFO_SIZE ((unsigned)256) ++#define INT_FIFO_SIZE ((unsigned)8) ++ ++struct udc_stats { ++ struct ep0stats { ++ unsigned long ops; ++ unsigned long bytes; ++ } read, write; ++ unsigned long irqs; ++}; ++ ++#ifdef CONFIG_USB_PXA27X_SMALL ++/* when memory's tight, SMALL config saves code+data. */ ++//#undef USE_DMA ++//#define UDC_EP_NUM 3 ++#endif ++ ++#ifndef UDC_EP_NUM ++#define UDC_EP_NUM 24 ++#endif ++ ++struct pxa27x_udc { ++ struct usb_gadget gadget; ++ struct usb_gadget_driver *driver; ++ ++ enum ep0_state ep0state; ++ struct udc_stats stats; ++ unsigned got_irq : 1, ++ got_disc : 1, ++ has_cfr : 1, ++ req_pending : 1, ++ req_std : 1, ++ req_config : 1; ++ ++#define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200)) ++ struct timer_list timer; ++ ++ struct device *dev; ++ struct pxa2xx_udc_mach_info *mach; ++ u64 dma_mask; ++ struct pxa27x_ep ep [UDC_EP_NUM]; ++ ++ unsigned configuration, ++ interface, ++ alternate; ++#ifdef CONFIG_PM ++ unsigned udccsr0; ++#endif ++}; ++ ++/*-------------------------------------------------------------------------*/ ++#if 0 ++#ifdef DEBUG ++#define HEX_DISPLAY(n) do { \ ++ if (machine_is_mainstone())\ ++ { MST_LEDDAT1 = (n); } \ ++ } while(0) ++ ++#define HEX_DISPLAY1(n) HEX_DISPLAY(n) ++ ++#define HEX_DISPLAY2(n) do { \ ++ if (machine_is_mainstone()) \ ++ { MST_LEDDAT2 = (n); } \ ++ } while(0) ++ ++#endif /* DEBUG */ ++#endif ++/*-------------------------------------------------------------------------*/ ++ ++/* LEDs are only for debug */ ++#ifndef HEX_DISPLAY ++#define HEX_DISPLAY(n) do {} while(0) ++#endif ++ ++#ifndef LED_CONNECTED_ON ++#define LED_CONNECTED_ON do {} while(0) ++#define LED_CONNECTED_OFF do {} while(0) ++#endif ++#ifndef LED_EP0_ON ++#define LED_EP0_ON do {} while (0) ++#define LED_EP0_OFF do {} while (0) ++#endif ++ ++static struct pxa27x_udc *the_controller; ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* one GPIO should be used to detect host disconnect */ ++static inline int is_usb_connected(void) ++{ ++ if (!the_controller->mach->udc_is_connected) ++ return 1; ++ return the_controller->mach->udc_is_connected(); ++} ++ ++/* one GPIO should force the host to see this device (or not) */ ++static inline void make_usb_disappear(void) ++{ ++ if (!the_controller->mach->udc_command) ++ return; ++ the_controller->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); ++} ++ ++static inline void let_usb_appear(void) ++{ ++ if (!the_controller->mach->udc_command) ++ return; ++ the_controller->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* ++ * Debugging support vanishes in non-debug builds. DBG_NORMAL should be ++ * mostly silent during normal use/testing, with no timing side-effects. ++ */ ++#define DBG_NORMAL 1 /* error paths, device state transitions */ ++#define DBG_VERBOSE 2 /* add some success path trace info */ ++#define DBG_NOISY 3 /* ... even more: request level */ ++#define DBG_VERY_NOISY 4 /* ... even more: packet level */ ++ ++#ifdef DEBUG ++ ++static const char *state_name[] = { ++ "EP0_IDLE", ++ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", ++ "EP0_END_XFER", "EP0_STALL" ++}; ++ ++#define DMSG(stuff...) printk(KERN_ERR "udc: " stuff) ++ ++#ifdef VERBOSE ++# define UDC_DEBUG DBG_VERBOSE ++#else ++# define UDC_DEBUG DBG_NORMAL ++#endif ++ ++static void __attribute__ ((__unused__)) ++dump_udccr(const char *label) ++{ ++ u32 udccr = UDCCR; ++ DMSG("%s 0x%08x =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", ++ label, udccr, ++ (udccr & UDCCR_OEN) ? " oen":"", ++ (udccr & UDCCR_AALTHNP) ? " aalthnp":"", ++ (udccr & UDCCR_AHNP) ? " rem" : "", ++ (udccr & UDCCR_BHNP) ? " rstir" : "", ++ (udccr & UDCCR_DWRE) ? " dwre" : "", ++ (udccr & UDCCR_SMAC) ? " smac" : "", ++ (udccr & UDCCR_EMCE) ? " emce" : "", ++ (udccr & UDCCR_UDR) ? " udr" : "", ++ (udccr & UDCCR_UDA) ? " uda" : "", ++ (udccr & UDCCR_UDE) ? " ude" : "", ++ (udccr & UDCCR_ACN) >> UDCCR_ACN_S, ++ (udccr & UDCCR_AIN) >> UDCCR_AIN_S, ++ (udccr & UDCCR_AAISN)>> UDCCR_AAISN_S ); ++} ++ ++static void __attribute__ ((__unused__)) ++dump_udccsr0(const char *label) ++{ ++ u32 udccsr0 = UDCCSR0; ++ ++ DMSG("%s %s 0x%08x =%s%s%s%s%s%s%s\n", ++ label, state_name[the_controller->ep0state], udccsr0, ++ (udccsr0 & UDCCSR0_SA) ? " sa" : "", ++ (udccsr0 & UDCCSR0_RNE) ? " rne" : "", ++ (udccsr0 & UDCCSR0_FST) ? " fst" : "", ++ (udccsr0 & UDCCSR0_SST) ? " sst" : "", ++ (udccsr0 & UDCCSR0_DME) ? " dme" : "", ++ (udccsr0 & UDCCSR0_IPR) ? " ipr" : "", ++ (udccsr0 & UDCCSR0_OPC) ? " opr" : ""); ++} ++ ++static void __attribute__ ((__unused__)) ++dump_state(struct pxa27x_udc *dev) ++{ ++ unsigned i; ++ ++ DMSG("%s, udcicr %02X.%02X, udcsir %02X.%02x, udcfnr %02X\n", ++ state_name[dev->ep0state], ++ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); ++ dump_udccr("udccr"); ++ ++ if (!dev->driver) { ++ DMSG("no gadget driver bound\n"); ++ return; ++ } else ++ DMSG("ep0 driver '%s'\n", dev->driver->driver.name); ++ ++ ++ dump_udccsr0 ("udccsr0"); ++ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n", ++ dev->stats.write.bytes, dev->stats.write.ops, ++ dev->stats.read.bytes, dev->stats.read.ops); ++ ++ for (i = 1; i < UDC_EP_NUM; i++) { ++ if (dev->ep [i].desc == 0) ++ continue; ++ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccsr); ++ } ++} ++ ++#if 0 ++static void dump_regs(u8 ep) ++{ ++ DMSG("EP:%d UDCCSR:0x%08x UDCBCR:0x%08x\n UDCCR:0x%08x\n", ++ ep,UDCCSN(ep), UDCBCN(ep), UDCCN(ep)); ++} ++static void dump_req (struct pxa27x_request *req) ++{ ++ struct usb_request *r = &req->req; ++ ++ DMSG("%s: buf:0x%08x length:%d dma:0x%08x actual:%d\n", ++ __FUNCTION__, (unsigned)r->buf, r->length, ++ r->dma, r->actual); ++} ++#endif ++ ++#else ++ ++#define DMSG(stuff...) do{}while(0) ++ ++#define dump_udccr(x) do{}while(0) ++#define dump_udccsr0(x) do{}while(0) ++#define dump_state(x) do{}while(0) ++ ++#define UDC_DEBUG ((unsigned)0) ++ ++#endif ++ ++#define DBG(lvl, stuff...) do{if ((lvl) <= UDC_DEBUG) DMSG(stuff);}while(0) ++ ++#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff) ++#define INFO(stuff...) printk(KERN_INFO "udc: " stuff) ++ ++ ++#endif /* __LINUX_USB_GADGET_PXA27X_H */ +diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c +index e552668..971e491 100644 +--- a/drivers/usb/gadget/serial.c ++++ b/drivers/usb/gadget/serial.c +@@ -1378,20 +1378,20 @@ static int __init gs_bind(struct usb_gadget *gadget) + + usb_ep_autoconfig_reset(gadget); + +- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc); ++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + EP_IN_NAME = ep->name; + ep->driver_data = ep; /* claim the endpoint */ + +- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc); ++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + EP_OUT_NAME = ep->name; + ep->driver_data = ep; /* claim the endpoint */ + + if (use_acm) { +- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc); ++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc, 0, 0, 0); + if (!ep) { + printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name); + goto autoconf_fail; +diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c +index 8c85e33..46ffe6c 100644 +--- a/drivers/usb/gadget/zero.c ++++ b/drivers/usb/gadget/zero.c +@@ -1155,7 +1155,7 @@ zero_bind (struct usb_gadget *gadget) + * but there may also be important quirks to address. + */ + usb_ep_autoconfig_reset (gadget); +- ep = usb_ep_autoconfig (gadget, &fs_source_desc); ++ ep = usb_ep_autoconfig (gadget, &fs_source_desc, 0, 0, 0); + if (!ep) { + autoconf_fail: + printk (KERN_ERR "%s: can't autoconfigure on %s\n", +@@ -1165,7 +1165,7 @@ autoconf_fail: + EP_IN_NAME = ep->name; + ep->driver_data = ep; /* claim */ + +- ep = usb_ep_autoconfig (gadget, &fs_sink_desc); ++ ep = usb_ep_autoconfig (gadget, &fs_sink_desc, 0, 0, 0); + if (!ep) + goto autoconf_fail; + EP_OUT_NAME = ep->name; +diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h +index e17186d..64c81fd 100644 +--- a/include/linux/usb_gadget.h ++++ b/include/linux/usb_gadget.h +@@ -445,10 +445,28 @@ usb_ep_fifo_flush (struct usb_ep *ep) + + struct usb_gadget; + ++/** ++ * struct usb_endpoint_config - possible configurations of a given endpoint ++ * @config: the configuration number ++ * @interface: the interface number ++ * @altinterface: the altinterface number ++ * ++ * Used as an array to pass information about the possible configurations ++ * of a given endpoint to the bus controller. ++ */ ++struct usb_endpoint_config { ++ int config; ++ int interface; ++ int altinterface; ++}; ++ + /* the rest of the api to the controller hardware: device operations, + * which don't involve endpoints (or i/o). + */ + struct usb_gadget_ops { ++ struct usb_ep* (*ep_alloc)(struct usb_gadget *gadget, ++ struct usb_endpoint_descriptor *desc, ++ int config, int interface, int alt); + int (*get_frame)(struct usb_gadget *); + int (*wakeup)(struct usb_gadget *); + int (*set_selfpowered) (struct usb_gadget *, int is_selfpowered); +@@ -872,7 +890,8 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config, + /* utility wrapping a simple endpoint selection policy */ + + extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, +- struct usb_endpoint_descriptor *) __devinit; ++ struct usb_endpoint_descriptor *, ++ int, int, int) __devinit; + + extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit; + diff --git a/packages/linux/linux-ezx-2.6.21/patches/series b/packages/linux/linux-ezx-2.6.21/patches/series new file mode 100755 index 0000000000..5580b74bf8 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/patches/series @@ -0,0 +1,93 @@ +patch-2.6.21.4 + +ezx-core.patch +# ezx-core TODO: should be ezx-common +# look at the pxa-regs.h diff and put each definition on the proper patch +# register a machine type for each phone model + +# enable this patch ONLY if you have STUART connected and dont forget +# to change your cmdline if you want console on STUART. +#ezx-enable-stuart.patch + +ezx-bp.patch +# ezx-bp TODO: +# try to run this as a module - this may solve timing issues for opentapi. +# suspend/resume (not sure if it can be handled here) +# implement 2nd gen handshake support +# move platform device to ezx-phone.c + +ezx-pm.patch + +ezx-pcap.patch +# ezx-pcap TODO: +# implement a per board init reg array +# move mmc functions to the ezx-phone.c mmc init +# move vibrator level function to the vibrator driver + + +a780-mci.patch +e680-mci.patch +a1200-mci.patch + +pxa27x-udc-support.2.patch + +ezx-emu.patch +# ezx-emu TODO: +# userspace interface for controling emu +# read adc to find which accessory is plugged + +ezx-mtd-map.patch +# ezx-mtd-map TODO: +# at least the original partition should go on the ezx-phone.c file + +ezx-serial-bug-workaround.patch +# ezx-serial-bug TODO: +# does anyone have a phone with this bug? + +pxa-kbd.patch +# pxa-kbd TODO: +# test multi-key presses +# ask Harald about driver status/sending mainline + +a780-kbd.patch +e680-kbd.patch + +pcap-ts.patch +a780-ts.patch +e680-ts.patch +a1200-ts.patch + +ezx-backlight.patch + +a780-flip.patch +e680-locksw.patch + +a780-leds.patch +e680-leds.patch + +a780-vibrator.patch + +# mux_cli patches +mux_cli.patch +mux-fix.patch +mux-fix-init-errorpath.patch +mux-remove-flipbuffers.patch +mux-remove-get_halted_bit.patch +mux-remove-usbh_finished_resume.patch +mux-fix-makefile.patch +mux-fix-tty-driver.patch +mux-linux-2.6.21-fix.patch +#mux-ifdef-ezx-features.patch +#mux_debug.patch +# mux_cli TODO: +# merge patches +# try to understand the code and cleanup (painful) + +# Global TODO: +# compile everything as module and test for insmod/rmmod +# can NOT run as module (yet) +# pxa-ohci, ts0710_mux, ts0710_mux_usb, ezx-bp + +# incomplete +#asoc-pxa-ssp.patch +#ezx-asoc.patch diff --git a/packages/linux/linux-ezx-2.6.21/pcap-ts.patch b/packages/linux/linux-ezx-2.6.21/pcap-ts.patch deleted file mode 100644 index d2b44b3c9a..0000000000 --- a/packages/linux/linux-ezx-2.6.21/pcap-ts.patch +++ /dev/null @@ -1,448 +0,0 @@ -Index: linux-2.6.21/drivers/input/touchscreen/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-05-08 14:19:21.000000000 -0300 -+++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-05-08 14:22:21.000000000 -0300 -@@ -164,4 +164,13 @@ - To compile this driver as a module, choose M here: the - module will be called ucb1400_ts. - -+config TOUCHSCREEN_PCAP -+ tristate "Motorola PCAP touchscreen" -+ depends on EZX_PCAP -+ help -+ Say Y here if you have a Motorola EZX telephone and -+ want to support the built-in touchscreen. -+ -+ If unsure, say N. -+ - endif -Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-05-08 14:28:43.000000000 -0300 -@@ -0,0 +1,375 @@ -+/* -+ * pcap_ts.c - Touchscreen driver for Motorola PCAP2 based touchscreen as found -+ * in the EZX phone platform. -+ * -+ * Copyright (C) 2006 Harald Welte -+ * -+ * Based on information found in the original Motorola 2.4.x ezx-ts.c driver. -+ * -+ * 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. -+ * -+ * May 3, 2007 - Daniel Ribeiro -+ * Major cleanup -+ * PM Callbacks -+ * -+ * TODO: -+ * split this in a hardirq handler and a tasklet/bh -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#if 0 -+#define DEBUGP(x, args ...) printk(x, ## args) -+#else -+#define DEBUGP(x, args ...) -+#endif -+ -+#define PRESSURE 1 -+#define COORDINATE 2 -+#define STANDBY 3 -+ -+extern int ezx_pcap_read(u_int8_t, u_int32_t *); -+extern int ezx_pcap_write(u_int8_t, u_int32_t); -+extern int ezx_pcap_bit_set(u_int32_t, u_int8_t); -+ -+struct pcap_ts { -+ int irq_xy; -+ int irq_touch; -+ struct input_dev *input; -+ struct timer_list timer; -+ -+ u_int16_t x, y; -+ u_int16_t pressure; -+ -+ u_int8_t read_state; -+}; -+ -+#define X_AXIS_MIN 0 -+#define X_AXIS_MAX 1023 -+ -+#define Y_AXIS_MAX X_AXIS_MAX -+#define Y_AXIS_MIN X_AXIS_MIN -+ -+#define PRESSURE_MAX X_AXIS_MAX -+#define PRESSURE_MIN X_AXIS_MIN -+ -+/* if we try to read faster, pressure reading becomes unreliable */ -+#define SAMPLE_INTERVAL (HZ/50) -+ -+ -+static void pcap_ts_mode(u_int32_t mode) -+{ -+ u_int32_t tmp; -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ tmp &= ~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK; -+ tmp |= mode; -+ ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+} -+ -+/* issue a XY read command to the ADC of PCAP2. Well get an ADCDONE2 interrupt -+ * once the result of the conversion is available */ -+static void pcap_ts_start_xy_read(struct pcap_ts *pcap_ts) -+{ -+ u_int32_t tmp; -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ tmp &= SSP_PCAP_ADC_START_VALUE_SET_MASK; -+ tmp |= SSP_PCAP_ADC_START_VALUE; -+ ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC2_ASC, 1); -+} -+ -+/* read the XY result from the ADC of PCAP2 */ -+static void pcap_ts_get_xy_value(struct pcap_ts *pcap_ts) -+{ -+ u_int32_t tmp; -+ -+ ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp); -+ -+ if (pcap_ts->read_state == COORDINATE && !(tmp & 0x00400000)) { -+ pcap_ts->x = (tmp & SSP_PCAP_ADD1_VALUE_MASK); -+ pcap_ts->y = (tmp & SSP_PCAP_ADD2_VALUE_MASK) -+ >>SSP_PCAP_ADD2_VALUE_SHIFT; -+ } else { -+ pcap_ts->pressure = (tmp & SSP_PCAP_ADD2_VALUE_MASK) -+ >>SSP_PCAP_ADD2_VALUE_SHIFT; -+ } -+ -+} -+ -+/* PCAP2 interrupts us when ADC conversion result is available */ -+static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id) -+{ -+ struct pcap_ts *pcap_ts = dev_id; -+ -+ pcap_ts_get_xy_value(pcap_ts); -+ DEBUGP(KERN_DEBUG "%s X=%4d, Y=%4d Z=%4d ", -+ pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS", -+ pcap_ts->x, pcap_ts->y, pcap_ts->pressure); -+ -+ switch (pcap_ts->read_state) { -+ case PRESSURE: -+ if (pcap_ts->pressure >= PRESSURE_MAX || -+ pcap_ts->pressure <= PRESSURE_MIN ) { -+ /* pen has been released (or cant read pressure - WM)*/ -+ DEBUGP("UP\n"); -+ /* do nothing */ -+ } else { -+ /* pen has been touched down */ -+ DEBUGP("DOWN\n"); -+ input_report_key(pcap_ts->input, BTN_TOUCH, 1); -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, pcap_ts->pressure); -+ } -+ /* switch state machine into coordinate read mode */ -+ pcap_ts->read_state = COORDINATE; -+ pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); -+ pcap_ts_start_xy_read(pcap_ts); -+ break; -+ case COORDINATE: -+ if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || -+ pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { -+ /* pen has been released */ -+ DEBUGP("UP END\n"); -+ -+ input_report_key(pcap_ts->input, BTN_TOUCH, 0); -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, 0); -+ -+ /* no need for timer, we'll get interrupted with -+ * next touch down event */ -+ del_timer(&pcap_ts->timer); -+ -+ /* ask PCAP2 to interrupt us if touch event happens -+ * again */ -+ pcap_ts->read_state = STANDBY; -+ pcap_ts_mode(PCAP_TS_STANDBY_MODE); -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ } else { -+ DEBUGP("DOWN\n"); -+ input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x); -+ input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y); -+ -+ /* switch back to pressure read mode */ -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -+ mod_timer(&pcap_ts->timer, jiffies + SAMPLE_INTERVAL); -+ } -+ input_sync(pcap_ts->input); -+ break; -+ default: -+ DEBUGP("ERROR\n"); -+ break; -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+/* PCAP2 interrupts us if the pen touches down (interrupts also on pen up - WM)*/ -+static irqreturn_t pcap_ts_irq_touch(int irq, void *dev_id) -+{ -+ struct pcap_ts *pcap_ts = dev_id; -+ -+ /* mask Touchscreen interrupt bit, prevents further touch events -+ * from being reported to us until we're finished with reading -+ * both pressure and x/y from ADC */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 1); -+ -+ DEBUGP("touched!!\n"); -+ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -+ pcap_ts->read_state = PRESSURE; -+ pcap_ts_start_xy_read(pcap_ts); -+ -+ return IRQ_HANDLED; -+} -+ -+static void pcap_ts_timer_fn(unsigned long data) -+{ -+ struct pcap_ts *pcap_ts = (struct pcap_ts *) data; -+ -+ pcap_ts_start_xy_read(pcap_ts); -+} -+ -+static int __init ezxts_probe(struct platform_device *pdev) -+{ -+ int ret; -+ u_int32_t tmp; -+ struct pcap_ts *pcap_ts; -+ struct input_dev *input_dev; -+ int err = -ENOMEM; -+ -+ pcap_ts = kzalloc(sizeof(*pcap_ts), GFP_KERNEL); -+ input_dev = input_allocate_device(); -+ if (!pcap_ts || !input_dev) -+ goto fail; -+ -+ pcap_ts->irq_xy = platform_get_irq(pdev, 0); -+ if (pcap_ts->irq_xy < 0) { -+ err = pcap_ts->irq_xy; -+ goto fail; -+ } -+ -+ pcap_ts->irq_touch = platform_get_irq(pdev, 1); -+ if (pcap_ts->irq_touch < 0) { -+ err = pcap_ts->irq_touch; -+ goto fail; -+ } -+ -+ // Some initialization before done in ssp_pcap_open() -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB, 0); -+ // ack interrupts -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, 1); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_TSI, 1); -+ // unmask interrupts -+ // ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M, 0); -+ // set adc bits? FIXME I dont think its necessary - WM -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC2, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO0, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO2, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO3, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATOX, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR2, 0); -+ -+ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ tmp &= (~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK); -+ tmp |= PCAP_TS_STANDBY_MODE; -+ -+ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+ if (ret < 0) -+ return ret; -+ -+ err = request_irq(pcap_ts->irq_xy, pcap_ts_irq_xy, SA_INTERRUPT, -+ "pcap-ts X/Y", pcap_ts); -+ if (err < 0) { -+ printk(KERN_ERR "pcap_ts: can't grab xy irq %d: %d\n", -+ pcap_ts->irq_xy, err); -+ goto fail; -+ } -+ -+ err = request_irq(pcap_ts->irq_touch, pcap_ts_irq_touch, SA_INTERRUPT, -+ "pcap-ts touch", pcap_ts); -+ if (err < 0) { -+ printk(KERN_ERR "pcap_ts: can't grab touch irq %d: %d\n", -+ pcap_ts->irq_touch, err); -+ goto fail_xy; -+ } -+ -+ pcap_ts->input = input_dev; -+ init_timer(&pcap_ts->timer); -+ pcap_ts->timer.data = (unsigned long) pcap_ts; -+ pcap_ts->timer.function = &pcap_ts_timer_fn; -+ -+ platform_set_drvdata(pdev, pcap_ts); -+ -+ pcap_ts->read_state = STANDBY; -+ pcap_ts_mode(PCAP_TS_STANDBY_MODE); -+ -+ /* enable pressure interrupt */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ -+ input_dev->name = "pcap-touchscreen"; -+ input_dev->phys = "ezxts/input0"; -+ input_dev->id.bustype = BUS_HOST; -+ input_dev->id.vendor = 0x0001; -+ input_dev->id.product = 0x0002; -+ input_dev->id.version = 0x0100; -+ input_dev->cdev.dev = &pdev->dev; -+ input_dev->private = pcap_ts; -+ -+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); -+ input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); -+ input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0); -+ input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0); -+ input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN, -+ PRESSURE_MAX, 0, 0); -+ -+ input_register_device(pcap_ts->input); -+ -+ return 0; -+ -+fail_xy: -+ free_irq(pcap_ts->irq_xy, pcap_ts); -+fail: -+ input_free_device(input_dev); -+ kfree(pcap_ts); -+ -+ return err; -+} -+ -+static int ezxts_remove(struct platform_device *pdev) -+{ -+ struct pcap_ts *pcap_ts = platform_get_drvdata(pdev); -+ -+ del_timer_sync(&pcap_ts->timer); -+ -+ free_irq(pcap_ts->irq_touch, pcap_ts); -+ free_irq(pcap_ts->irq_xy, pcap_ts); -+ -+ input_unregister_device(pcap_ts->input); -+ kfree(pcap_ts); -+ -+ return 0; -+} -+ -+static int ezxts_suspend(struct platform_device *dev, pm_message_t state) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR, 1); -+ return 0; -+} -+ -+static int ezxts_resume(struct platform_device *dev) -+{ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_ADC1_TS_REF_LOWPWR, 0); -+ /* just in case we suspend with TSI masked. */ -+ ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ return 0; -+} -+ -+ -+static struct platform_driver ezxts_driver = { -+ .probe = ezxts_probe, -+ .remove = ezxts_remove, -+ .suspend = ezxts_suspend, -+ .resume = ezxts_resume, -+ .driver = { -+ .name = "pcap-ts", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init ezxts_init(void) -+{ -+ return platform_driver_register(&ezxts_driver); -+} -+ -+static void __exit ezxts_exit(void) -+{ -+ platform_driver_unregister(&ezxts_driver); -+} -+ -+module_init(ezxts_init); -+module_exit(ezxts_exit); -+ -+MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver"); -+MODULE_AUTHOR("Harald Welte "); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-08 14:19:21.000000000 -0300 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-08 14:52:47.000000000 -0300 -@@ -174,11 +174,36 @@ - .resource = ezxemu_resources, - }; - -+/* PCAP_TS */ -+struct resource pcap_ts_resources[] = { -+ [0] = { -+ .start = EZX_IRQ_ADCDONE2, -+ .end = EZX_IRQ_ADCDONE2, -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = EZX_IRQ_TS, -+ .end = EZX_IRQ_TS, -+ .flags = IORESOURCE_IRQ, -+ } -+}; -+ -+struct platform_device pcap_ts_device = { -+ .name = "pcap-ts", -+ .id = -1, -+ .dev = { -+ .parent = &ezxpcap_device.dev, -+ }, -+ .num_resources = ARRAY_SIZE(pcap_ts_resources), -+ .resource = pcap_ts_resources, -+}; -+ - static struct platform_device *devices[] __initdata = { - &ezxssp_device, - &ezxbp_device, - &ezxpcap_device, - &ezxemu_device, -+ &pcap_ts_device, - }; - - /* PM */ -Index: linux-2.6.21/drivers/input/touchscreen/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/Makefile 2007-05-08 14:19:21.000000000 -0300 -+++ linux-2.6.21/drivers/input/touchscreen/Makefile 2007-05-08 14:22:21.000000000 -0300 -@@ -16,3 +16,4 @@ - obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o - obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o - obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o -+obj-$(CONFIG_TOUCHSCREEN_PCAP) += pcap_ts.o diff --git a/packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch b/packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch deleted file mode 100644 index d46033bc80..0000000000 --- a/packages/linux/linux-ezx-2.6.21/pcap_ts.c.patch +++ /dev/null @@ -1,237 +0,0 @@ -Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/pcap_ts.c 2007-05-01 16:28:00.000000000 +0200 -+++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-05-01 16:28:03.000000000 +0200 -@@ -21,15 +21,14 @@ - #include - #include - #include --#include -+//#include - #include - #include - #include - - #include - #include -- --#include "../../misc/ezx/ssp_pcap.h" -+#include - - #if 1 - #define DEBUGP(x, args ...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ## args) -@@ -61,6 +60,9 @@ - #define PRESSURE_MAX X_AXIS_MAX - #define PRESSURE_MIN X_AXIS_MIN - -+#define SAMPLE_INTERVAL (HZ/100) -+ -+ - static int pcap_ts_mode(u_int32_t mode) - { - int ret; -@@ -157,8 +159,6 @@ - pcap_ts->x, pcap_ts->y, pcap_ts->pressure); - - if (pcap_ts->read_state == PRESSURE) { -- input_report_abs(pcap_ts->input, ABS_PRESSURE, -- pcap_ts->pressure); - if ((pcap_ts->pressure >= PRESSURE_MAX || - pcap_ts->pressure <= PRESSURE_MIN ) && - pcap_ts->pressure == pcap_ts->pressure_last) { -@@ -166,6 +166,8 @@ - input_report_key(pcap_ts->input, BTN_TOUCH, 0); - input_sync(pcap_ts->input); - -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, 0); -+ - pcap_ts->x = pcap_ts->y = 0; - - /* ask PCAP2 to interrupt us if touch event happens -@@ -182,18 +184,24 @@ - input_report_key(pcap_ts->input, BTN_TOUCH, 1); - /* don't input_sync(), we don't know position yet */ - -+ if (pcap_ts->pressure == 0) -+ pcap_ts->pressure = pcap_ts->pressure_last; -+ -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, -+ pcap_ts->pressure); -+ - /* switch state machine into coordinate read mode */ - pcap_ts->read_state = COORDINATE; - pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); - pcap_ts_start_xy_read(pcap_ts); -- -- mod_timer(&pcap_ts->timer, jiffies + HZ/20); - } - } else { - /* we are in coordinate mode */ - if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || - pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { - DEBUGP("invalid x/y coordinate position: PEN_UP?\n"); -+ -+ pcap_ts->pressure = 0; - #if 0 - input_report_key(pcap_ts->input, BTN_TOUCH, 0); - pcap_ts->x = pcap_ts->y = 0; -@@ -206,8 +214,8 @@ - - /* switch back to pressure read mode */ - pcap_ts->read_state = PRESSURE; -- pcap_ts_mode(PCAP_TS_STANDBY_MODE); -- ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -+ mod_timer(&pcap_ts->timer, jiffies + SAMPLE_INTERVAL); - } - - return IRQ_HANDLED; -@@ -234,18 +242,19 @@ - { - struct pcap_ts *pcap_ts = (struct pcap_ts *) data; - -- ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 1); -- pcap_ts_mode(PCAP_TS_PRESSURE_MEASUREMENT); -- pcap_ts->read_state = PRESSURE; - pcap_ts_start_xy_read(pcap_ts); - } - - static int __init ezxts_probe(struct platform_device *pdev) - { -+ int ret; -+ u_int32_t tmp; - struct pcap_ts *pcap_ts; - struct input_dev *input_dev; - int err = -ENOMEM; - -+ printk(KERN_DEBUG "Start probing TS!\n"); -+ - pcap_ts = kzalloc(sizeof(*pcap_ts), GFP_KERNEL); - input_dev = input_allocate_device(); - if (!pcap_ts || !input_dev) -@@ -263,7 +272,46 @@ - goto fail; - } - -- ssp_pcap_open(SSP_PCAP_TS_OPEN); -+ // Some initialization before done in ssp_pcap_open() -+ //ssp_pcap_open(SSP_PCAP_TS_OPEN); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_TS_REFENB, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_ADCDONE2I, 1); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ISR_TSI, 1); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_MSR_ADCDONE2M, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC2_ADINC2, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO0, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO2, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATO3, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_ATOX, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR1, 0); -+ ezx_pcap_bit_set( SSP_PCAP_ADJ_BIT_ADC1_MTR2, 0); -+ -+ //SSP_PCAP_TSI_mode_set(PCAP_TS_STANDBY_MODE); -+ ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); -+ if (ret < 0) -+ return ret; -+ -+ tmp &= (~SSP_PCAP_TOUCH_PANEL_POSITION_DETECT_MODE_MASK); -+ tmp |= PCAP_TS_STANDBY_MODE; -+ -+ ret = ezx_pcap_write(SSP_PCAP_ADJ_ADC1_REGISTER, tmp); -+ if (ret < 0) -+ return ret; -+ -+ /* send the usb accessory infomation to PM */ -+ /* -+ if((ACCESSORY_TYPE) sspUsbAccessoryInfo.type == ACCESSORY_DEVICE_USB_PORT) -+ { -+ if( (ACCESSORY_DEVICE_STATUS )sspUsbAccessoryInfo.status == ACCESSORY_DEVICE_STATUS_ATTACHED ) -+ apm_queue_event(KRNL_ACCS_ATTACH); -+ else -+ apm_queue_event(KRNL_ACCS_DETACH); -+ } -+ */ -+ - - err = request_irq(pcap_ts->irq_xy, pcap_ts_irq_xy, SA_INTERRUPT, - "PCAP Touchscreen XY", pcap_ts); -@@ -343,10 +391,11 @@ - //.resume = ezxts_resume, - .driver = { - .name = "pcap-ts", -+ .owner = THIS_MODULE, - }, - }; - --static int __devinit ezxts_init(void) -+static int __init ezxts_init(void) - { - return platform_driver_register(&ezxts_driver); - } -Index: linux-2.6.21/drivers/input/touchscreen/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/Kconfig 2007-05-01 16:28:00.000000000 +0200 -+++ linux-2.6.21/drivers/input/touchscreen/Kconfig 2007-05-01 16:28:03.000000000 +0200 -@@ -166,7 +166,7 @@ - - config TOUCHSCREEN_PCAP - tristate "Motorola PCAP touchscreen" -- depends on PXA_EZX_PCAP -+ depends on PXA_EZX - help - Say Y here if you have a Motorola EZX (E680, A780) telephone - and want to support the built-in touchscreen. -@@ -174,6 +174,6 @@ - If unsure, say N. - - To compile this driver as a module, choose M here: the -- module will be called hp680_ts_input. -+ module will be called pcap_ts. - - endif -Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-05-01 16:28:00.000000000 +0200 -+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-05-01 16:28:03.000000000 +0200 -@@ -116,6 +116,31 @@ - .resource = ezxemu_resources, - }; - -+/* PCAP_TS */ -+struct resource pcap_ts_resources[] = { -+ [0] = { -+ .start = EZX_IRQ_ADCDONE2, -+ .end = EZX_IRQ_ADCDONE2, -+ .flags = IORESOURCE_IRQ, -+ }, -+ [1] = { -+ .start = EZX_IRQ_TS, -+ .end = EZX_IRQ_TS, -+ .flags = IORESOURCE_IRQ, -+ } -+}; -+ -+struct platform_device pcap_ts_device = { -+ .name = "pcap-ts", -+ .id = -1, -+ .dev = { -+ .parent = &ezxpcap_device.dev, -+ }, -+ .num_resources = ARRAY_SIZE(pcap_ts_resources), -+ .resource = pcap_ts_resources, -+}; -+ -+ - /* OHCI Controller */ - - static int ezx_ohci_init(struct device *dev) -@@ -342,6 +367,7 @@ - &ezxpcap_device, - &ezxbp_device, - &ezxemu_device, -+ &pcap_ts_device, - }; - - static void __init a780_init(void) diff --git a/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch b/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch deleted file mode 100644 index 83a3585ba2..0000000000 --- a/packages/linux/linux-ezx-2.6.21/pxa-kbd.patch +++ /dev/null @@ -1,516 +0,0 @@ -Index: linux-2.6.21/arch/arm/mach-pxa/generic.c -=================================================================== ---- linux-2.6.21.orig/arch/arm/mach-pxa/generic.c 2007-05-17 20:04:53.000000000 +0200 -+++ linux-2.6.21/arch/arm/mach-pxa/generic.c 2007-05-17 20:06:02.000000000 +0200 -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - - #include "generic.h" - -@@ -430,6 +431,30 @@ - .id = -1, - }; - -+static struct resource pxa_kbd_resources[] = { -+ { -+ .start = IRQ_KEYPAD, -+ .end = IRQ_KEYPAD, -+ .flags = IORESOURCE_IRQ, -+ }, { -+ .start = 0x41500000, -+ .end = 0x4150004c, -+ .flags = IORESOURCE_MEM, -+ }, -+}; -+ -+static struct platform_device kbd_device = { -+ .name = "pxa-keyboard", -+ .id = -1, -+ .resource = pxa_kbd_resources, -+ .num_resources = ARRAY_SIZE(pxa_kbd_resources), -+}; -+ -+void __init pxa_set_kbd_info(struct pxakbd_platform_data *info) -+{ -+ kbd_device.dev.platform_data = info; -+} -+ - static struct platform_device *devices[] __initdata = { - &pxamci_device, - &udc_device, -@@ -444,6 +469,7 @@ - #endif - &i2s_device, - &pxartc_device, -+ &kbd_device, - }; - - static int __init pxa_init(void) -Index: linux-2.6.21/drivers/input/keyboard/Kconfig -=================================================================== ---- linux-2.6.21.orig/drivers/input/keyboard/Kconfig 2007-05-17 20:04:53.000000000 +0200 -+++ linux-2.6.21/drivers/input/keyboard/Kconfig 2007-05-17 20:06:02.000000000 +0200 -@@ -229,4 +229,11 @@ - To compile this driver as a module, choose M here: the - module will be called gpio-keys. - -+config KEYBOARD_PXA -+ tristate "Intel PXA keyboard support" -+ depends on ARCH_PXA -+ help -+ This add support for a driver of the Intel PXA2xx keyboard -+ controller. -+ - endif -Index: linux-2.6.21/drivers/input/keyboard/Makefile -=================================================================== ---- linux-2.6.21.orig/drivers/input/keyboard/Makefile 2007-05-17 20:04:53.000000000 +0200 -+++ linux-2.6.21/drivers/input/keyboard/Makefile 2007-05-17 20:06:02.000000000 +0200 -@@ -19,4 +19,4 @@ - obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o - obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o - obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o -- -+obj-$(CONFIG_KEYBOARD_PXA) += pxakbd.o -Index: linux-2.6.21/include/asm-arm/arch-pxa/kbd.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/include/asm-arm/arch-pxa/kbd.h 2007-05-17 20:06:02.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* -+ * kbd_pxa.h -+ * -+ * Copyright (C) 2006 Harald Welte -+ * -+ * 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. -+ * -+ */ -+#ifndef _KBD_PXA_H_ -+#define _KBD_PXA_H_ -+ -+struct pxakbd_platform_data { -+ int (*init)(void); /* init gpio, etc. */ -+ unsigned int scan_interval; -+ struct { -+ unsigned int rows; -+ unsigned int cols; -+ unsigned char *keycode; -+ } matrix; -+ struct { -+ unsigned int num; -+ unsigned char *keycode; -+ } direct; -+}; -+ -+#endif -Index: linux-2.6.21/drivers/input/keyboard/pxakbd.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.21/drivers/input/keyboard/pxakbd.c 2007-05-18 16:59:36.000000000 +0200 -@@ -0,0 +1,385 @@ -+/* -+ * Driver for Motorola EZX phone "keyboard" -+ * -+ * (C) 2006 by Harald Welte -+ * -+ * May, 2007 - Daniel Ribeiro -+ * pm callbacks -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#if 0 -+#define DEBUGP(x, args ...) printk(x, ## args) -+#else -+#define DEBUGP(x, args ...) -+#endif -+ -+/* per-keyboard private data structure */ -+struct pxakbd { -+ struct input_dev *input; -+ struct timer_list timer; -+ spinlock_t lock; -+ -+ struct resource *res; -+ unsigned int irq; -+ u_int32_t kpc; -+ u_int32_t kpkdi; -+ -+ struct pxakbd_platform_data *pd; -+}; -+ -+static int pxakbd_scan_direct(struct pxakbd *pxakbd) -+{ -+ u_int32_t kpdk; -+ unsigned int i; -+ int num_pressed = 0; -+ -+ kpdk = KPDK & 0x000000ff; -+ for (i = 0; i < pxakbd->pd->direct.num; i++) { -+ int pressed = 0; -+ -+ if (kpdk & (1 << i)) { -+ pressed = 1; -+ num_pressed++; -+ DEBUGP("pxakbd: pressed: direct %u\n", i); -+ } -+ if (pxakbd->pd->direct.keycode[i] != KEY_RESERVED) { -+ DEBUGP( "pxakbd: sending to input layer: keycode = %d, pressed = %d\n", pxakbd->pd->direct.keycode[i], pressed ); -+ input_report_key(pxakbd->input, pxakbd->pd->direct.keycode[i], -+ pressed); -+ } -+ } -+ return num_pressed; -+} -+ -+/* read the full 8x8 matrix from the PXA27x keypad controller */ -+static void __read_matrix(u_int8_t *matrix) -+{ -+ u_int32_t tmp; -+ -+ tmp = KPASMKP0; -+ matrix[0] = tmp & 0x000000ff; -+ matrix[1] = (tmp & 0x00ff0000) >> 16; -+ -+ tmp = KPASMKP1; -+ matrix[2] = tmp & 0x000000ff; -+ matrix[3] = (tmp & 0x00ff0000) >> 16; -+ -+ tmp = KPASMKP2; -+ matrix[4] = tmp & 0x000000ff; -+ matrix[5] = (tmp & 0x00ff0000) >> 16; -+ -+ tmp = KPASMKP3; -+ matrix[6] = tmp & 0x000000ff; -+ matrix[7] = (tmp & 0x00ff0000) >> 16; -+} -+ -+/* compare current matrix with last, generate 'diff' events */ -+static int __cmp_matrix_gen_events(struct pxakbd *pxakbd, u_int8_t *matrix) -+{ -+ unsigned int i; -+ int num_pressed = 0; -+ -+ /* iterate over the matrix */ -+ for (i = 0; i < pxakbd->pd->matrix.rows; i++) { -+ unsigned int j; -+ for (j = 0; j < pxakbd->pd->matrix.cols; j++) { -+ u_int32_t scancode = -+ (i * pxakbd->pd->matrix.cols) + j; -+ int pressed = matrix[i] & (1 << j); -+ -+ if (pressed) { -+ DEBUGP("pxakbd: pressed: %u/%u\n", i, j); -+ num_pressed++; -+ } -+ -+ input_report_key(pxakbd->input, -+ pxakbd->pd->matrix.keycode[scancode], pressed); -+ } -+ } -+ -+ return num_pressed; -+} -+ -+/* scan the matrix keypad */ -+static int pxakbd_scan_matrix(struct pxakbd *pxakbd) -+{ -+ int num_pressed; -+ u_int32_t kpas; -+ u_int8_t matrix[8]; -+ -+ kpas = KPAS; -+ -+ if ((kpas & KPAS_MUKP) == KPAS_MUKP_NONE) { -+ /* no keys pressed */ -+ memset(matrix, 0, sizeof(matrix)); -+ } else if ((kpas & KPAS_MUKP) == KPAS_MUKP_ONE) { -+ /* one key pressed */ -+ u_int8_t row = (kpas & KPAS_RP) >> 4; -+ u_int8_t col = kpas & KPAS_CP; -+ -+ if (row == 0x0f || col == 0x0f) { -+ printk(KERN_WARNING "pxakbd: col or row invalid!\n"); -+ return -1; -+ } -+ -+ /* clear the matrix and set the single pressed key */ -+ memset(matrix, 0, sizeof(matrix)); -+ matrix[row] |= (1 << col); -+ } else { -+ /* multiple keys pressed */ -+ __read_matrix(matrix); -+ } -+ -+ num_pressed = __cmp_matrix_gen_events(pxakbd, matrix); -+ -+ return num_pressed; -+} -+ -+static void pxakbd_timer_callback(unsigned long data) -+{ -+ unsigned long flags; -+ struct pxakbd *pxakbd = (struct pxakbd *) data; -+ unsigned int num_pressed; -+ -+ spin_lock_irqsave(&pxakbd->lock, flags); -+ -+ num_pressed = pxakbd_scan_direct(pxakbd); -+ num_pressed += pxakbd_scan_matrix(pxakbd); -+ -+ spin_unlock_irqrestore(&pxakbd->lock, flags); -+ -+ /* propagate events up the input stack */ -+ input_sync(pxakbd->input); -+} -+ -+static irqreturn_t pxakbd_interrupt(int irq, void *dummy) -+{ -+ struct pxakbd *pxakbd = dummy; -+ u_int32_t kpc; -+ int handled = 0; -+ int num_pressed = 0; -+ -+ /* read and clear interrupt */ -+ kpc = KPC; -+ -+ if (kpc & KPC_DI) { -+ num_pressed += pxakbd_scan_direct(pxakbd); -+ handled = 1; -+ } -+ -+ if (kpc & KPC_MI) { -+ while (KPAS & KPAS_SO) { -+ /* wait for scan to complete beforereading scan regs */ -+ cpu_relax(); -+ } -+ num_pressed += pxakbd_scan_matrix(pxakbd); -+ handled = 1; -+ } -+ -+ /* If any keys are currently pressed, we need to start the timer to detect -+ * key release. */ -+ if (num_pressed) -+ mod_timer(&pxakbd->timer, jiffies + pxakbd->pd->scan_interval); -+ -+ /* propagate events up the input stack */ -+ input_sync(pxakbd->input); -+ -+ return IRQ_RETVAL(handled); -+} -+ -+static int __init pxakbd_probe(struct platform_device *pdev) -+{ -+ struct pxakbd *pxakbd; -+ struct input_dev *input_dev; -+ struct resource *r; -+ int i; -+ int ret = -ENOMEM; -+ -+ int rows, cols, n_direct; -+ -+ pxakbd = kzalloc(sizeof(*pxakbd), GFP_KERNEL); -+ if (!pxakbd) -+ goto out; -+ -+ input_dev = input_allocate_device(); -+ if (!input_dev) -+ goto out_pxa; -+ -+ spin_lock_init(&pxakbd->lock); -+ pxakbd->irq = platform_get_irq(pdev, 0); -+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ if (!r || pxakbd->irq == NO_IRQ) { -+ printk(KERN_ERR "pxakbd: invalid resources\n"); -+ ret = -EBUSY; -+ goto out_idev; -+ } -+ -+ pxakbd->input = input_dev; -+ init_timer(&pxakbd->timer); -+ pxakbd->timer.function = pxakbd_timer_callback; -+ pxakbd->timer.data = (unsigned long) pxakbd; -+ pxakbd->pd = pdev->dev.platform_data; -+ pxakbd->res = r; -+ -+ rows = pxakbd->pd->matrix.rows; -+ cols = pxakbd->pd->matrix.cols; -+ n_direct = pxakbd->pd->direct.num; -+ -+ input_dev->name = "pxa-keyboard"; -+ input_dev->phys = "pxakbd/input0"; -+ input_dev->id.bustype = BUS_HOST; -+ input_dev->id.vendor = 0x0001; -+ input_dev->id.product = 0x0001; -+ input_dev->id.version = 0x0001; -+ input_dev->cdev.dev = &pdev->dev; -+ input_dev->private = pxakbd; -+ -+ input_dev->evbit[0] = BIT(EV_KEY)|BIT(EV_REP); -+ -+ input_dev->keycodesize = sizeof(unsigned char); -+ input_dev->keycodemax = (rows*cols)+n_direct; -+ input_dev->keycode = kmalloc(input_dev->keycodemax*input_dev->keycodesize, -+ GFP_KERNEL); -+ if (!input_dev->keycode){ -+ ret = -ENOMEM; -+ goto out_idev; -+ } -+ -+ memcpy(input_dev->keycode, pxakbd->pd->matrix.keycode, rows*cols); -+ -+ memcpy(input_dev->keycode+(rows*cols), -+ pxakbd->pd->direct.keycode, -+ n_direct); -+ -+ for (i = 0; i < rows*cols; i++) -+ set_bit(pxakbd->pd->matrix.keycode[i], input_dev->keybit); -+ -+ for (i = 0; i < n_direct; i++) -+ set_bit(pxakbd->pd->direct.keycode[i], input_dev->keybit); -+ -+ clear_bit(0, input_dev->keybit); -+ -+ if (request_irq(pxakbd->irq, pxakbd_interrupt, 0, "pxakbd", pxakbd)) { -+ printk(KERN_ERR "pxakbd: can't request irq %d\n", pxakbd->irq); -+ ret = -EBUSY; -+ goto out_idev; -+ } -+ -+ r = request_mem_region(r->start, 0x4c, "pxakbd"); -+ if (!r) { -+ printk(KERN_ERR "pxakbd: can't request memregion\n"); -+ ret = -EBUSY; -+ goto out_irq; -+ } -+ -+ /* set up gpio */ -+ pxakbd->pd->init(); -+ -+ /* set keypad control register */ -+ KPC = (KPC_ASACT | /* automatic scan on activity */ -+ KPC_ME | KPC_DE | /* matrix and direct keypad enabled */ -+ ((pxakbd->pd->matrix.cols-1)<<23) | /* columns */ -+ ((pxakbd->pd->matrix.rows-1)<<26) | /* rows */ -+ ((pxakbd->pd->direct.num-1)<<6) | /* direct keys */ -+ KPC_MS_ALL); /* scan all columns */ -+ -+ pxa_set_cken(CKEN19_KEYPAD, 1); -+ -+ KPC |= (KPC_DIE | KPC_MIE); /* enable matrix and direct keyboard */ -+ -+ KPKDI = 0x40; /* matrix key debounce interval: 0x40 */ -+ -+ platform_set_drvdata(pdev, pxakbd); -+ -+ return input_register_device(pxakbd->input); -+ -+out_drvdata: -+ platform_set_drvdata(pdev, NULL); -+out_mem: -+ release_resource(r); -+out_irq: -+ free_irq(pxakbd->irq, pxakbd); -+out_idev: -+ kfree(input_dev->keycode); -+ input_free_device(input_dev); -+out_pxa: -+ kfree(pxakbd); -+out: -+ return ret; -+} -+ -+static int pxakbd_remove(struct platform_device *pdev) -+{ -+ struct pxakbd *pxakbd = platform_get_drvdata(pdev); -+ -+ kfree(pxakbd->input->keycode); -+ input_unregister_device(pxakbd->input); -+ platform_set_drvdata(pdev, NULL); -+ release_resource(pxakbd->res); -+ free_irq(pxakbd->irq, pxakbd); -+ kfree(pxakbd); -+ -+ return 0; -+} -+ -+static int pxakbd_suspend(struct platform_device *pdev, pm_message_t state) -+{ -+ struct pxakbd *pxakbd = platform_get_drvdata(pdev); -+ -+ pxakbd->kpc = KPC; -+ pxakbd->kpkdi = KPKDI; -+ -+ return 0; -+} -+ -+static int pxakbd_resume(struct platform_device *pdev) -+{ -+ struct pxakbd *pxakbd = platform_get_drvdata(pdev); -+ -+ KPC = pxakbd->kpc; -+ KPKDI = pxakbd->kpkdi; -+ -+ return 0; -+} -+ -+static struct platform_driver pxakbd_driver = { -+ .probe = &pxakbd_probe, -+ .remove = &pxakbd_remove, -+ .suspend = &pxakbd_suspend, -+ .resume = &pxakbd_resume, -+ .driver = { -+ .name = "pxa-keyboard", -+ }, -+}; -+ -+static int __devinit pxakbd_init(void) -+{ -+ return platform_driver_register(&pxakbd_driver); -+} -+ -+static void __exit pxakbd_exit(void) -+{ -+ platform_driver_unregister(&pxakbd_driver); -+} -+ -+module_init(pxakbd_init); -+module_exit(pxakbd_exit); -+ -+MODULE_AUTHOR("Harald Welte "); -+MODULE_DESCRIPTION("Driver for Intel PXA27x keypad controller"); -+MODULE_LICENSE("GPL"); -Index: linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h -=================================================================== ---- linux-2.6.21.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-17 20:06:01.000000000 +0200 -+++ linux-2.6.21/include/asm-arm/arch-pxa/pxa-regs.h 2007-05-17 20:06:02.000000000 +0200 -@@ -2165,6 +2165,11 @@ - #define KPMK_MKP (0x1 << 31) - #define KPAS_SO (0x1 << 31) - #define KPASMKPx_SO (0x1 << 31) -+#define KPAS_RP (0x000000f0) -+#define KPAS_CP (0x0000000f) -+#define KPAS_MUKP (0x7c000000) -+#define KPAS_MUKP_ONE (0x04000000) -+#define KPAS_MUKP_NONE (0x00000000) - - /* - * UHC: USB Host Controller (OHCI-like) register definitions diff --git a/packages/linux/linux-ezx-2.6.21/pxa27x-udc-support.2.patch b/packages/linux/linux-ezx-2.6.21/pxa27x-udc-support.2.patch deleted file mode 100644 index d35e40f046..0000000000 --- a/packages/linux/linux-ezx-2.6.21/pxa27x-udc-support.2.patch +++ /dev/null @@ -1,3037 +0,0 @@ -diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig -index 4097a86..5d3ea6e 100644 ---- a/drivers/usb/gadget/Kconfig -+++ b/drivers/usb/gadget/Kconfig -@@ -111,6 +111,24 @@ config USB_PXA2XX - default USB_GADGET - select USB_GADGET_SELECTED - -+config USB_GADGET_PXA27X -+ boolean "PXA 27x" -+ depends on ARCH_PXA && PXA27x -+ help -+ Intel's PXA 27x series XScale processors include an integrated -+ full speed USB 1.1 device controller. -+ -+ Say "y" to link the driver statically, or "m" to build a -+ dynamically linked module called "pxa2xx_udc" and force all -+ gadget drivers to also be dynamically linked. -+ -+ -+config USB_PXA27X -+ tristate -+ depends on USB_GADGET_PXA27X -+ default USB_GADGET -+ select USB_GADGET_SELECTED -+ - # if there's only one gadget driver, using only two bulk endpoints, - # don't waste memory for the other endpoints - config USB_PXA2XX_SMALL -diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile -index e71e086..7e508a6 100644 ---- a/drivers/usb/gadget/Makefile -+++ b/drivers/usb/gadget/Makefile -@@ -4,6 +4,7 @@ - obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o - obj-$(CONFIG_USB_NET2280) += net2280.o - obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o -+obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o - obj-$(CONFIG_USB_GOKU) += goku_udc.o - obj-$(CONFIG_USB_OMAP) += omap_udc.o - obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o -diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c -index f28af06..e7d72ff 100644 ---- a/drivers/usb/gadget/epautoconf.c -+++ b/drivers/usb/gadget/epautoconf.c -@@ -230,7 +230,8 @@ find_ep (struct usb_gadget *gadget, const char *name) - */ - struct usb_ep * __devinit usb_ep_autoconfig ( - struct usb_gadget *gadget, -- struct usb_endpoint_descriptor *desc -+ struct usb_endpoint_descriptor *desc, -+ int config, int interface, int alt - ) - { - struct usb_ep *ep; -@@ -238,6 +239,11 @@ struct usb_ep * __devinit usb_ep_autoconfig ( - - type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; - -+ /* If have ep_alloc() function use it! */ -+ if (gadget->ops->ep_alloc) -+ return gadget->ops->ep_alloc(gadget, desc, -+ config, interface, alt); -+ - /* First, apply chip-specific "best usage" knowledge. - * This might make a good usb_gadget_ops hook ... - */ -diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c -index 04e6b85..bc6de31 100644 ---- a/drivers/usb/gadget/ether.c -+++ b/drivers/usb/gadget/ether.c -@@ -258,10 +258,6 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); - #define DEV_CONFIG_CDC - #endif - --#ifdef CONFIG_USB_GADGET_PXA27X --#define DEV_CONFIG_CDC --#endif -- - #ifdef CONFIG_USB_GADGET_S3C2410 - #define DEV_CONFIG_CDC - #endif -@@ -294,6 +290,10 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); - #define DEV_CONFIG_SUBSET - #endif - -+#ifdef CONFIG_USB_GADGET_PXA27X -+#define DEV_CONFIG_SUBSET -+#endif -+ - #ifdef CONFIG_USB_GADGET_SA1100 - /* use non-CDC for backwards compatibility */ - #define DEV_CONFIG_SUBSET -@@ -2309,6 +2309,9 @@ eth_bind (struct usb_gadget *gadget) - * non-CDC to be compatible with ARM Linux-2.4 "usb-eth". - */ - cdc = 0; -+ } else if (gadget_is_pxa27x(gadget)) { -+ /* hardware can't write zlps */ -+ zlp = 0; - } - - gcnum = usb_gadget_controller_number (gadget); -@@ -2375,7 +2378,22 @@ eth_bind (struct usb_gadget *gadget) - - /* all we really need is bulk IN/OUT */ - usb_ep_autoconfig_reset (gadget); -- in_ep = usb_ep_autoconfig (gadget, &fs_source_desc); -+#ifdef CONFIG_USB_ETH_RNDIS -+ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, -+ DEV_RNDIS_CONFIG_VALUE, -+ (int)rndis_data_intf.bInterfaceNumber, -+ (int)rndis_data_intf.bAlternateSetting); -+#elif defined(DEV_CONFIG_CDC) -+ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, -+ DEV_CONFIG_VALUE, -+ (int)data_intf.bInterfaceNumber, -+ (int)data_intf.bAlternateSetting); -+#elif defined(DEV_CONFIG_SUBSET) -+ in_ep = usb_ep_autoconfig (gadget, &fs_source_desc, -+ DEV_CONFIG_VALUE, -+ (int)subset_data_intf.bInterfaceNumber, -+ (int)subset_data_intf.bAlternateSetting); -+#endif /* CONFIG_USB_ETH_RNDIS */ - if (!in_ep) { - autoconf_fail: - dev_err (&gadget->dev, -@@ -2385,7 +2403,22 @@ autoconf_fail: - } - in_ep->driver_data = in_ep; /* claim */ - -- out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc); -+#ifdef CONFIG_USB_ETH_RNDIS -+ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, -+ DEV_RNDIS_CONFIG_VALUE, -+ (int)rndis_data_intf.bInterfaceNumber, -+ (int)rndis_data_intf.bAlternateSetting); -+#elif defined(DEV_CONFIG_CDC) -+ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, -+ DEV_CONFIG_VALUE, -+ (int)data_intf.bInterfaceNumber, -+ (int)data_intf.bAlternateSetting); -+#elif defined(DEV_CONFIG_SUBSET) -+ out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc, -+ DEV_CONFIG_VALUE, -+ (int)subset_data_intf.bInterfaceNumber, -+ (int)subset_data_intf.bAlternateSetting); -+#endif /* CONFIG_USB_ETH_RNDIS */ - if (!out_ep) - goto autoconf_fail; - out_ep->driver_data = out_ep; /* claim */ -@@ -2395,7 +2428,17 @@ autoconf_fail: - * Since some hosts expect one, try to allocate one anyway. - */ - if (cdc || rndis) { -- status_ep = usb_ep_autoconfig (gadget, &fs_status_desc); -+#ifdef CONFIG_USB_ETH_RNDIS -+ status_ep = usb_ep_autoconfig (gadget, &fs_status_desc, -+ DEV_RNDIS_CONFIG_VALUE, -+ (int)rndis_control_intf.bInterfaceNumber, -+ (int)rndis_control_intf.bAlternateSetting); -+#elif defined(DEV_CONFIG_CDC) -+ status_ep = usb_ep_autoconfig (gadget, &fs_status_desc, -+ DEV_CONFIG_VALUE, -+ (int)control_intf.bInterfaceNumber, -+ (int)control_intf.bAlternateSetting); -+#endif /* CONFIG_USB_ETH_RNDIS */ - if (status_ep) { - status_ep->driver_data = status_ep; /* claim */ - } else if (rndis) { -@@ -2403,13 +2446,14 @@ autoconf_fail: - "can't run RNDIS on %s\n", - gadget->name); - return -ENODEV; -+ } - #ifdef DEV_CONFIG_CDC - /* pxa25x only does CDC subset; often used with RNDIS */ -- } else if (cdc) { -+ else if (cdc) { - control_intf.bNumEndpoints = 0; - /* FIXME remove endpoint from descriptor list */ --#endif - } -+#endif - } - #endif - -diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c -index c6b6479..6af5fdd 100644 ---- a/drivers/usb/gadget/file_storage.c -+++ b/drivers/usb/gadget/file_storage.c -@@ -3920,20 +3920,20 @@ static int __init fsg_bind(struct usb_gadget *gadget) - - /* Find all the endpoints we will use */ - usb_ep_autoconfig_reset(gadget); -- ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint - fsg->bulk_in = ep; - -- ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint - fsg->bulk_out = ep; - - if (transport_is_cbi()) { -- ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc); -+ ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - ep->driver_data = fsg; // claim the endpoint -diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h -index 2e3d662..f3b3291 100644 ---- a/drivers/usb/gadget/gadget_chips.h -+++ b/drivers/usb/gadget/gadget_chips.h -@@ -177,5 +177,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) - return 0x17; - else if (gadget_is_husb2dev(gadget)) - return 0x18; -+ else if (gadget_is_pxa27x(gadget)) -+ return 0x19; - return -ENOENT; - } -diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c -index d08a8d0..d51feb2 100644 ---- a/drivers/usb/gadget/gmidi.c -+++ b/drivers/usb/gadget/gmidi.c -@@ -1204,7 +1204,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget) - * but there may also be important quirks to address. - */ - usb_ep_autoconfig_reset(gadget); -- in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc); -+ in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc, 0, 0, 0); - if (!in_ep) { - autoconf_fail: - printk(KERN_ERR "%s: can't autoconfigure on %s\n", -@@ -1214,7 +1214,7 @@ autoconf_fail: - EP_IN_NAME = in_ep->name; - in_ep->driver_data = in_ep; /* claim */ - -- out_ep = usb_ep_autoconfig(gadget, &bulk_out_desc); -+ out_ep = usb_ep_autoconfig(gadget, &bulk_out_desc, 0, 0, 0); - if (!out_ep) { - goto autoconf_fail; - } -diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c -new file mode 100644 -index 0000000..d89ecc5 ---- /dev/null -+++ b/drivers/usb/gadget/pxa27x_udc.c -@@ -0,0 +1,2354 @@ -+/* -+ * linux/drivers/usb/gadget/pxa27x_udc.c -+ * Intel PXA2xx and IXP4xx on-chip full speed USB device controllers -+ * -+ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker) -+ * Copyright (C) 2003 Robert Schwebel, Pengutronix -+ * Copyright (C) 2003 Benedikt Spranger, Pengutronix -+ * Copyright (C) 2003 David Brownell -+ * Copyright (C) 2003 Joshua Wise -+ * Copyright (C) 2004 Intel Corporation -+ * Copyright (C) 2007 Rodolfo Giometti -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#undef DEBUG -+/* #define VERBOSE DBG_VERBOSE */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+ -+/* -+ * This driver handles the USB Device Controller (UDC) in Intel's PXA 27x -+ * series processors. -+ * Such controller drivers work with a gadget driver. The gadget driver -+ * returns descriptors, implements configuration and data protocols used -+ * by the host to interact with this device, and allocates endpoints to -+ * the different protocol interfaces. The controller driver virtualizes -+ * usb hardware so that the gadget drivers will be more portable. -+ * -+ * This UDC hardware wants to implement a bit too much USB protocol, so -+ * it constrains the sorts of USB configuration change events that work. -+ * The errata for these chips are misleading; some "fixed" bugs from -+ * pxa250 a0/a1 b0/b1/b2 sure act like they're still there. -+ */ -+ -+#define DRIVER_VERSION "08-Feb-2007" -+#define DRIVER_DESC "PXA 27x USB Device Controller driver" -+ -+ -+static const char driver_name [] = "pxa27x_udc"; -+ -+static const char ep0name [] = "ep0"; -+ -+ -+#undef USE_DMA -+#undef DISABLE_TEST_MODE -+ -+#ifdef CONFIG_PROC_FS -+#define UDC_PROC_FILE -+#endif -+ -+#include "pxa27x_udc.h" -+ -+#ifdef CONFIG_EMBEDDED -+/* few strings, and little code to use them */ -+#undef DEBUG -+#undef UDC_PROC_FILE -+#endif -+ -+#ifdef USE_DMA -+static int use_dma = 1; -+module_param(use_dma, bool, 0); -+MODULE_PARM_DESC (use_dma, "true to use dma"); -+ -+static void dma_nodesc_handler (int dmach, void *_ep); -+static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req); -+ -+#define DMASTR " (dma support)" -+ -+#else /* !USE_DMA */ -+#define DMASTR " (pio only)" -+#endif -+ -+#ifdef CONFIG_USB_PXA27X_SMALL -+#define SIZE_STR " (small)" -+#else -+#define SIZE_STR "" -+#endif -+ -+#ifdef DISABLE_TEST_MODE -+/* (mode == 0) == no undocumented chip tweaks -+ * (mode & 1) == double buffer bulk IN -+ * (mode & 2) == double buffer bulk OUT -+ * ... so mode = 3 (or 7, 15, etc) does it for both -+ */ -+static ushort fifo_mode = 0; -+module_param(fifo_mode, ushort, 0); -+MODULE_PARM_DESC (fifo_mode, "pxa27x udc fifo mode"); -+#endif -+ -+#define UDCISR0_IR0 0x3 -+#define UDCISR_INT_MASK (UDC_INT_FIFOERROR | UDC_INT_PACKETCMP) -+#define UDCICR_INT_MASK UDCISR_INT_MASK -+ -+#define UDCCSR_MASK (UDCCSR_FST | UDCCSR_DME) -+/* --------------------------------------------------------------------------- -+ * endpoint related parts of the api to the usb controller hardware, -+ * used by gadget driver; and the inner talker-to-hardware core. -+ * --------------------------------------------------------------------------- -+ */ -+ -+static void pxa27x_ep_fifo_flush (struct usb_ep *ep); -+static void nuke (struct pxa27x_ep *, int status); -+ -+static void pio_irq_enable(int ep_num) -+{ -+ if (ep_num < 16) -+ UDCICR0 |= 3 << (ep_num * 2); -+ else { -+ ep_num -= 16; -+ UDCICR1 |= 3 << (ep_num * 2); -+ } -+} -+ -+static void pio_irq_disable(int ep_num) -+{ -+ ep_num &= 0xf; -+ if (ep_num < 16) -+ UDCICR0 &= ~(3 << (ep_num * 2)); -+ else { -+ ep_num -= 16; -+ UDCICR1 &= ~(3 << (ep_num * 2)); -+ } -+} -+ -+/* The UDCCR reg contains mask and interrupt status bits, -+ * so using '|=' isn't safe as it may ack an interrupt. -+ */ -+#define UDCCR_MASK_BITS (UDCCR_OEN | UDCCR_UDE) -+ -+static inline void udc_set_mask_UDCCR(int mask) -+{ -+ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS); -+} -+ -+static inline void udc_clear_mask_UDCCR(int mask) -+{ -+ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS); -+} -+ -+static inline void udc_ack_int_UDCCR(int mask) -+{ -+ /* udccr contains the bits we dont want to change */ -+ __u32 udccr = UDCCR & UDCCR_MASK_BITS; -+ -+ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS); -+} -+ -+/* -+ * endpoint enable/disable -+ * -+ * we need to verify the descriptors used to enable endpoints. since pxa27x -+ * endpoint configurations are fixed, and are pretty much always enabled, -+ * there's not a lot to manage here. -+ * -+ * because pxa27x can't selectively initialize bulk (or interrupt) endpoints, -+ * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except -+ * for a single interface (with only the default altsetting) and for gadget -+ * drivers that don't halt endpoints (not reset by set_interface). that also -+ * means that if you use ISO, you must violate the USB spec rule that all -+ * iso endpoints must be in non-default altsettings. -+ */ -+static int pxa27x_ep_enable (struct usb_ep *_ep, -+ const struct usb_endpoint_descriptor *desc) -+{ -+ struct pxa27x_ep *ep; -+ struct pxa27x_udc *dev; -+ -+ ep = container_of (_ep, struct pxa27x_ep, ep); -+ if (!_ep || !desc || _ep->name == ep0name -+ || desc->bDescriptorType != USB_DT_ENDPOINT -+ || ep->fifo_size < le16_to_cpu(desc->wMaxPacketSize)) { -+ DMSG("%s, bad ep or descriptor\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ /* xfer types must match, except that interrupt ~= bulk */ -+ if( ep->ep_type != USB_ENDPOINT_XFER_BULK -+ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { -+ DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); -+ return -EINVAL; -+ } -+ -+ /* hardware _could_ do smaller, but driver doesn't */ -+ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK -+ && le16_to_cpu (desc->wMaxPacketSize) -+ != BULK_FIFO_SIZE) -+ || !desc->wMaxPacketSize) { -+ DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); -+ return -ERANGE; -+ } -+ -+ dev = ep->dev; -+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { -+ DMSG("%s, bogus device state\n", __FUNCTION__); -+ return -ESHUTDOWN; -+ } -+ -+ ep->desc = desc; -+ ep->dma = -1; -+ ep->stopped = 0; -+ ep->pio_irqs = ep->dma_irqs = 0; -+ ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize); -+ -+ /* flush fifo (mostly for OUT buffers) */ -+ pxa27x_ep_fifo_flush (_ep); -+ -+ /* ... reset halt state too, if we could ... */ -+ -+#ifdef USE_DMA -+ /* for (some) bulk and ISO endpoints, try to get a DMA channel and -+ * bind it to the endpoint. otherwise use PIO. -+ */ -+ DMSG("%s: called attributes=%d\n", __FUNCTION__, ep->ep_type); -+ switch (ep->ep_type) { -+ case USB_ENDPOINT_XFER_ISOC: -+ if (le16_to_cpu(desc->wMaxPacketSize) % 32) -+ break; -+ // fall through -+ case USB_ENDPOINT_XFER_BULK: -+ if (!use_dma || !ep->reg_drcmr) -+ break; -+ ep->dma = pxa_request_dma ((char *)_ep->name, -+ (le16_to_cpu (desc->wMaxPacketSize) > 64) -+ ? DMA_PRIO_MEDIUM /* some iso */ -+ : DMA_PRIO_LOW, -+ dma_nodesc_handler, ep); -+ if (ep->dma >= 0) { -+ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma; -+ DMSG("%s using dma%d\n", _ep->name, ep->dma); -+ } -+ default: -+ break; -+ } -+#endif -+ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name); -+ return 0; -+} -+ -+static int pxa27x_ep_disable (struct usb_ep *_ep) -+{ -+ struct pxa27x_ep *ep; -+ -+ ep = container_of (_ep, struct pxa27x_ep, ep); -+ if (!_ep || !ep->desc) { -+ DMSG("%s, %s not enabled\n", __FUNCTION__, -+ _ep ? ep->ep.name : NULL); -+ return -EINVAL; -+ } -+ nuke (ep, -ESHUTDOWN); -+ -+#ifdef USE_DMA -+ if (ep->dma >= 0) { -+ *ep->reg_drcmr = 0; -+ pxa_free_dma (ep->dma); -+ ep->dma = -1; -+ } -+#endif -+ -+ /* flush fifo (mostly for IN buffers) */ -+ pxa27x_ep_fifo_flush (_ep); -+ -+ ep->desc = 0; -+ ep->stopped = 1; -+ -+ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name); -+ return 0; -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* for the pxa27x, these can just wrap kmalloc/kfree. gadget drivers -+ * must still pass correctly initialized endpoints, since other controller -+ * drivers may care about how it's currently set up (dma issues etc). -+ */ -+ -+/* -+ * pxa27x_ep_alloc_request - allocate a request data structure -+ */ -+static struct usb_request * -+pxa27x_ep_alloc_request (struct usb_ep *_ep, unsigned int gfp_flags) -+{ -+ struct pxa27x_request *req; -+ -+ req = kmalloc (sizeof *req, gfp_flags); -+ if (!req) -+ return 0; -+ -+ memset (req, 0, sizeof *req); -+ INIT_LIST_HEAD (&req->queue); -+ return &req->req; -+} -+ -+ -+/* -+ * pxa27x_ep_free_request - deallocate a request data structure -+ */ -+static void -+pxa27x_ep_free_request (struct usb_ep *_ep, struct usb_request *_req) -+{ -+ struct pxa27x_request *req; -+ -+ req = container_of(_req, struct pxa27x_request, req); -+ WARN_ON (!list_empty (&req->queue)); -+ kfree(req); -+} -+ -+ -+/* PXA cache needs flushing with DMA I/O (it's dma-incoherent), but there's -+ * no device-affinity and the heap works perfectly well for i/o buffers. -+ * It wastes much less memory than dma_alloc_coherent() would, and even -+ * prevents cacheline (32 bytes wide) sharing problems. -+ */ -+static void * -+pxa27x_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, -+ dma_addr_t *dma, unsigned int gfp_flags) -+{ -+ char *retval; -+ -+ retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM)); -+ if (retval) -+ *dma = virt_to_bus (retval); -+ return retval; -+} -+ -+static void -+pxa27x_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, -+ unsigned bytes) -+{ -+ kfree (buf); -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * done - retire a request; caller blocked irqs -+ */ -+static void done(struct pxa27x_ep *ep, struct pxa27x_request *req, int status) -+{ -+ list_del_init(&req->queue); -+ if (likely (req->req.status == -EINPROGRESS)) -+ req->req.status = status; -+ else -+ status = req->req.status; -+ -+ if (status && status != -ESHUTDOWN) -+ DBG(DBG_VERBOSE, "complete %s req %p stat %d len %u/%u\n", -+ ep->ep.name, &req->req, status, -+ req->req.actual, req->req.length); -+ -+ /* don't modify queue heads during completion callback */ -+ req->req.complete(&ep->ep, &req->req); -+} -+ -+ -+static inline void ep0_idle (struct pxa27x_udc *dev) -+{ -+ dev->ep0state = EP0_IDLE; -+ LED_EP0_OFF; -+} -+ -+static int -+write_packet(volatile u32 *uddr, struct pxa27x_request *req, unsigned max) -+{ -+ u32 *buf; -+ int length, count, remain; -+ -+ buf = (u32*)(req->req.buf + req->req.actual); -+ prefetch(buf); -+ -+ /* how big will this packet be? */ -+ length = min(req->req.length - req->req.actual, max); -+ req->req.actual += length; -+ -+ remain = length & 0x3; -+ count = length & ~(0x3); -+ -+ while (likely(count)) { -+ *uddr = *buf++; -+ count -= 4; -+ } -+ -+ if (remain) { -+ volatile u8* reg=(u8*)uddr; -+ char *rd =(u8*)buf; -+ -+ while (remain--) { -+ *reg=*rd++; -+ } -+ } -+ -+ return length; -+} -+ -+/* -+ * write to an IN endpoint fifo, as many packets as possible. -+ * irqs will use this to write the rest later. -+ * caller guarantees at least one packet buffer is ready (or a zlp). -+ */ -+static int -+write_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ unsigned max; -+ -+ max = le16_to_cpu(ep->desc->wMaxPacketSize); -+ do { -+ int count; -+ int is_last, is_short; -+ -+ count = write_packet(ep->reg_udcdr, req, max); -+ -+ /* last packet is usually short (or a zlp) */ -+ if (unlikely (count != max)) -+ is_last = is_short = 1; -+ else { -+ if (likely(req->req.length != req->req.actual) -+ || req->req.zero) -+ is_last = 0; -+ else -+ is_last = 1; -+ /* interrupt/iso maxpacket may not fill the fifo */ -+ is_short = unlikely (max < ep->fifo_size); -+ } -+ -+ DMSG("wrote %s count:%d bytes%s%s %d left %p\n", -+ ep->ep.name, count, -+ is_last ? "/L" : "", is_short ? "/S" : "", -+ req->req.length - req->req.actual, &req->req); -+ -+ /* let loose that packet. maybe try writing another one, -+ * double buffering might work. TSP, TPC, and TFS -+ * bit values are the same for all normal IN endpoints. -+ */ -+ *ep->reg_udccsr = UDCCSR_PC; -+ if (is_short) -+ *ep->reg_udccsr = UDCCSR_SP; -+ -+ /* requests complete when all IN data is in the FIFO */ -+ if (is_last) { -+ done (ep, req, 0); -+ if (list_empty(&ep->queue) || unlikely(ep->dma >= 0)) { -+ pio_irq_disable (ep->ep_num); -+#ifdef USE_DMA -+ /* unaligned data and zlps couldn't use dma */ -+ if (unlikely(!list_empty(&ep->queue))) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep,req); -+ return 0; -+ } -+#endif -+ } -+ return 1; -+ } -+ -+ // TODO experiment: how robust can fifo mode tweaking be? -+ // double buffering is off in the default fifo mode, which -+ // prevents TFS from being set here. -+ -+ } while (*ep->reg_udccsr & UDCCSR_FS); -+ return 0; -+} -+ -+/* caller asserts req->pending (ep0 irq status nyet cleared); starts -+ * ep0 data stage. these chips want very simple state transitions. -+ */ -+static inline -+void ep0start(struct pxa27x_udc *dev, u32 flags, const char *tag) -+{ -+ UDCCSR0 = flags|UDCCSR0_SA|UDCCSR0_OPC; -+ UDCISR0 = UDCICR_INT(0, UDC_INT_FIFOERROR | UDC_INT_PACKETCMP); -+ dev->req_pending = 0; -+ DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", -+ __FUNCTION__, tag, UDCCSR0, flags); -+} -+ -+static int -+write_ep0_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ unsigned count; -+ int is_short; -+ -+ count = write_packet(&UDCDR0, req, EP0_FIFO_SIZE); -+ ep->dev->stats.write.bytes += count; -+ -+ /* last packet "must be" short (or a zlp) */ -+ is_short = (count != EP0_FIFO_SIZE); -+ -+ DBG(DBG_VERY_NOISY, "ep0in %d bytes %d left %p\n", count, -+ req->req.length - req->req.actual, &req->req); -+ -+ if (unlikely (is_short)) { -+ if (ep->dev->req_pending) -+ ep0start(ep->dev, UDCCSR0_IPR, "short IN"); -+ else -+ UDCCSR0 = UDCCSR0_IPR; -+ -+ count = req->req.length; -+ done (ep, req, 0); -+ ep0_idle(ep->dev); -+#if 0 -+ /* This seems to get rid of lost status irqs in some cases: -+ * host responds quickly, or next request involves config -+ * change automagic, or should have been hidden, or ... -+ * -+ * FIXME get rid of all udelays possible... -+ */ -+ if (count >= EP0_FIFO_SIZE) { -+ count = 100; -+ do { -+ if ((UDCCSR0 & UDCCSR0_OPC) != 0) { -+ /* clear OPC, generate ack */ -+ UDCCSR0 = UDCCSR0_OPC; -+ break; -+ } -+ count--; -+ udelay(1); -+ } while (count); -+ } -+#endif -+ } else if (ep->dev->req_pending) -+ ep0start(ep->dev, 0, "IN"); -+ return is_short; -+} -+ -+ -+/* -+ * read_fifo - unload packet(s) from the fifo we use for usb OUT -+ * transfers and put them into the request. caller should have made -+ * sure there's at least one packet ready. -+ * -+ * returns true if the request completed because of short packet or the -+ * request buffer having filled (and maybe overran till end-of-packet). -+ */ -+static int -+read_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ for (;;) { -+ u32 *buf; -+ int bufferspace, count, is_short; -+ -+ /* make sure there's a packet in the FIFO.*/ -+ if (unlikely ((*ep->reg_udccsr & UDCCSR_PC) == 0)) -+ break; -+ buf =(u32*) (req->req.buf + req->req.actual); -+ prefetchw(buf); -+ bufferspace = req->req.length - req->req.actual; -+ -+ /* read all bytes from this packet */ -+ if (likely (*ep->reg_udccsr & UDCCSR_BNE)) { -+ count = 0x3ff & *ep->reg_udcbcr; -+ req->req.actual += min (count, bufferspace); -+ } else /* zlp */ -+ count = 0; -+ -+ is_short = (count < ep->ep.maxpacket); -+ DMSG("read %s udccsr:%02x, count:%d bytes%s req %p %d/%d\n", -+ ep->ep.name, *ep->reg_udccsr, count, -+ is_short ? "/S" : "", -+ &req->req, req->req.actual, req->req.length); -+ -+// dump_regs(ep->ep_num ); -+ count = min(count, bufferspace); -+ while (likely (count > 0)) { -+ *buf++ = *ep->reg_udcdr; -+ count -= 4; -+ } -+ DMSG("Buf:0x%p\n", req->req.buf); -+ -+ *ep->reg_udccsr = UDCCSR_PC; -+ /* RPC/RSP/RNE could now reflect the other packet buffer */ -+ -+ /* completion */ -+ if (is_short || req->req.actual == req->req.length) { -+ done (ep, req, 0); -+ if (list_empty(&ep->queue)) -+ pio_irq_disable (ep->ep_num); -+ return 1; -+ } -+ -+ /* finished that packet. the next one may be waiting... */ -+ } -+ return 0; -+} -+ -+/* -+ * special ep0 version of the above. no UBCR0 or double buffering; status -+ * handshaking is magic. most device protocols don't need control-OUT. -+ * CDC vendor commands (and RNDIS), mass storage CB/CBI, and some other -+ * protocols do use them. -+ */ -+static int -+read_ep0_fifo (struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ u32 *buf, word; -+ unsigned bufferspace; -+ -+ buf = (u32*) (req->req.buf + req->req.actual); -+ bufferspace = req->req.length - req->req.actual; -+ -+ while (UDCCSR0 & UDCCSR0_RNE) { -+ word = UDCDR0; -+ -+ if (unlikely (bufferspace == 0)) { -+ /* this happens when the driver's buffer -+ * is smaller than what the host sent. -+ * discard the extra data. -+ */ -+ if (req->req.status != -EOVERFLOW) -+ DMSG("%s overflow\n", ep->ep.name); -+ req->req.status = -EOVERFLOW; -+ } else { -+ *buf++ = word; -+ req->req.actual += 4; -+ bufferspace -= 4; -+ } -+ } -+ -+ UDCCSR0 = UDCCSR0_OPC ; -+ -+ /* completion */ -+ if (req->req.actual >= req->req.length) -+ return 1; -+ -+ /* finished that packet. the next one may be waiting... */ -+ return 0; -+} -+ -+#ifdef USE_DMA -+ -+#define MAX_IN_DMA ((DCMD_LENGTH + 1) - BULK_FIFO_SIZE) -+static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req) -+{ -+ u32 dcmd = 0; -+ u32 len = req->req.length; -+ u32 buf = req->req.dma; -+ u32 fifo = io_v2p ((u32)ep->reg_udcdr); -+ -+ buf += req->req.actual; -+ len -= req->req.actual; -+ ep->dma_con = 0; -+ -+ DMSG("%s: req:0x%p length:%d, actual:%d dma:%d\n", -+ __FUNCTION__, &req->req, req->req.length, -+ req->req.actual,ep->dma); -+ -+ /* no-descriptor mode can be simple for bulk-in, iso-in, iso-out */ -+ DCSR(ep->dma) = DCSR_NODESC; -+ if (buf & 0x3) -+ DALGN |= 1 << ep->dma; -+ else -+ DALGN &= ~(1 << ep->dma); -+ -+ if (ep->dir_in) { -+ DSADR(ep->dma) = buf; -+ DTADR(ep->dma) = fifo; -+ if (len > MAX_IN_DMA) { -+ len= MAX_IN_DMA; -+ ep->dma_con =1 ; -+ } else if (len >= ep->ep.maxpacket) { -+ if ((ep->dma_con = (len % ep->ep.maxpacket) != 0)) -+ len = ep->ep.maxpacket; -+ } -+ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN -+ | DCMD_FLOWTRG | DCMD_INCSRCADDR; -+ } else { -+ DSADR(ep->dma) = fifo; -+ DTADR(ep->dma) = buf; -+ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN -+ | DCMD_FLOWSRC | DCMD_INCTRGADDR; -+ } -+ *ep->reg_udccsr = UDCCSR_DME; -+ DCMD(ep->dma) = dcmd; -+ DCSR(ep->dma) = DCSR_NODESC | DCSR_EORIRQEN \ -+ | ((ep->dir_in) ? DCSR_STOPIRQEN : 0); -+ *ep->reg_drcmr = ep->dma | DRCMR_MAPVLD; -+ DCSR(ep->dma) |= DCSR_RUN; -+} -+ -+static void cancel_dma(struct pxa27x_ep *ep) -+{ -+ struct pxa27x_request *req; -+ u32 tmp; -+ -+ if (DCSR(ep->dma) == 0 || list_empty(&ep->queue)) -+ return; -+ -+ DMSG("hehe dma:%d,dcsr:0x%x\n", ep->dma, DCSR(ep->dma)); -+ DCSR(ep->dma) = 0; -+ while ((DCSR(ep->dma) & DCSR_STOPSTATE) == 0) -+ cpu_relax(); -+ -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ tmp = DCMD(ep->dma) & DCMD_LENGTH; -+ req->req.actual = req->req.length - tmp; -+ -+ /* the last tx packet may be incomplete, so flush the fifo. -+ * FIXME correct req.actual if we can -+ */ -+ *ep->reg_udccsr = UDCCSR_FEF; -+} -+ -+static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r) -+{ -+ struct pxa27x_ep *ep = _ep; -+ struct pxa27x_request *req, *req_next; -+ u32 dcsr, tmp, completed; -+ -+ local_irq_disable(); -+ -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ -+ DMSG("%s, buf:0x%p\n",__FUNCTION__, req->req.buf); -+ -+ ep->dma_irqs++; -+ ep->dev->stats.irqs++; -+ HEX_DISPLAY(ep->dev->stats.irqs); -+ -+ completed = 0; -+ -+ dcsr = DCSR(dmach); -+ DCSR(ep->dma) &= ~DCSR_RUN; -+ -+ if (dcsr & DCSR_BUSERR) { -+ DCSR(dmach) = DCSR_BUSERR; -+ printk(KERN_ERR " Buss Error\n"); -+ req->req.status = -EIO; -+ completed = 1; -+ } else if (dcsr & DCSR_ENDINTR) { -+ DCSR(dmach) = DCSR_ENDINTR; -+ if (ep->dir_in) { -+ tmp = req->req.length - req->req.actual; -+ /* Last packet is a short one*/ -+ if ( tmp < ep->ep.maxpacket) { -+ int count = 0; -+ -+ *ep->reg_udccsr = UDCCSR_SP | \ -+ (*ep->reg_udccsr & UDCCSR_MASK); -+ /*Wait for packet out */ -+ while( (count++ < 10000) && \ -+ !(*ep->reg_udccsr & UDCCSR_FS)); -+ if (count >= 10000) -+ DMSG("Failed to send packet\n"); -+ else -+ DMSG("%s: short packet sent len:%d," -+ "length:%d,actual:%d\n", __FUNCTION__, -+ tmp, req->req.length, req->req.actual); -+ req->req.actual = req->req.length; -+ completed = 1; -+ /* There are still packets to transfer */ -+ } else if ( ep->dma_con) { -+ DMSG("%s: more packets,length:%d,actual:%d\n", -+ __FUNCTION__,req->req.length, -+ req->req.actual); -+ req->req.actual += ep->ep.maxpacket; -+ completed = 0; -+ } else { -+ DMSG("%s: no more packets,length:%d," -+ "actual:%d\n", __FUNCTION__, -+ req->req.length, req->req.actual); -+ req->req.actual = req->req.length; -+ completed = 1; -+ } -+ } else { -+ req->req.actual = req->req.length; -+ completed = 1; -+ } -+ } else if (dcsr & DCSR_EORINTR) { //Only happened in OUT DMA -+ int remain,udccsr ; -+ -+ DCSR(dmach) = DCSR_EORINTR; -+ remain = DCMD(dmach) & DCMD_LENGTH; -+ req->req.actual = req->req.length - remain; -+ -+ udccsr = *ep->reg_udccsr; -+ if (udccsr & UDCCSR_SP) { -+ *ep->reg_udccsr = UDCCSR_PC | (udccsr & UDCCSR_MASK); -+ completed = 1; -+ } -+ DMSG("%s: length:%d actual:%d\n", -+ __FUNCTION__, req->req.length, req->req.actual); -+ } else -+ DMSG("%s: Others dma:%d DCSR:0x%x DCMD:0x%x\n", -+ __FUNCTION__, dmach, DCSR(dmach), DCMD(dmach)); -+ -+ if (likely(completed)) { -+ if (req->queue.next != &ep->queue) { -+ req_next = list_entry(req->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep, req_next); -+ } -+ done(ep, req, 0); -+ } else { -+ kick_dma(ep, req); -+ } -+ -+ local_irq_enable(); -+} -+ -+#endif -+/*-------------------------------------------------------------------------*/ -+ -+static int -+pxa27x_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned int gfp_flags) -+{ -+ struct pxa27x_ep *ep; -+ struct pxa27x_request *req; -+ struct pxa27x_udc *dev; -+ unsigned long flags; -+ -+ req = container_of(_req, struct pxa27x_request, req); -+ if (unlikely (!_req || !_req->complete || !_req->buf|| -+ !list_empty(&req->queue))) { -+ DMSG("%s, bad params\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ ep = container_of(_ep, struct pxa27x_ep, ep); -+ if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ -+ DMSG("%s, ep point %d is queue\n", __FUNCTION__, ep->ep_num); -+ -+ dev = ep->dev; -+ if (unlikely (!dev->driver -+ || dev->gadget.speed == USB_SPEED_UNKNOWN)) { -+ DMSG("%s, bogus device state\n", __FUNCTION__); -+ return -ESHUTDOWN; -+ } -+ -+ /* iso is always one packet per request, that's the only way -+ * we can report per-packet status. that also helps with dma. -+ */ -+ if (unlikely (ep->ep_type == USB_ENDPOINT_XFER_ISOC -+ && req->req.length > le16_to_cpu -+ (ep->desc->wMaxPacketSize))) -+ return -EMSGSIZE; -+ -+#ifdef USE_DMA -+ /* FIXME: caller may already have done the dma mapping */ -+ if (ep->dma >= 0) { -+ _req->dma = dma_map_single(dev->dev, _req->buf, _req->length, -+ (ep->dir_in) ? DMA_TO_DEVICE : DMA_FROM_DEVICE); -+ } -+#endif -+ -+ DBG(DBG_NOISY, "%s queue req %p, len %d buf %p\n", -+ _ep->name, _req, _req->length, _req->buf); -+ -+ local_irq_save(flags); -+ -+ _req->status = -EINPROGRESS; -+ _req->actual = 0; -+ -+ /* kickstart this i/o queue? */ -+ if (list_empty(&ep->queue) && !ep->stopped) { -+ if (ep->desc == 0 /* ep0 */) { -+ unsigned length = _req->length; -+ -+ switch (dev->ep0state) { -+ case EP0_IN_DATA_PHASE: -+ dev->stats.write.ops++; -+ if (write_ep0_fifo(ep, req)) -+ req = 0; -+ break; -+ -+ case EP0_OUT_DATA_PHASE: -+ dev->stats.read.ops++; -+ if (dev->req_pending) -+ ep0start(dev, UDCCSR0_IPR, "OUT"); -+ if (length == 0 || ((UDCCSR0 & UDCCSR0_RNE) != 0 -+ && read_ep0_fifo(ep, req))) { -+ ep0_idle(dev); -+ done(ep, req, 0); -+ req = 0; -+ } -+ break; -+ case EP0_NO_ACTION: -+ ep0_idle(dev); -+ req=0; -+ break; -+ default: -+ DMSG("ep0 i/o, odd state %d\n", dev->ep0state); -+ local_irq_restore (flags); -+ return -EL2HLT; -+ } -+#ifdef USE_DMA -+ /* either start dma or prime pio pump */ -+ } else if (ep->dma >= 0) { -+ kick_dma(ep, req); -+#endif -+ /* can the FIFO can satisfy the request immediately? */ -+ } else if (ep->dir_in -+ && (*ep->reg_udccsr & UDCCSR_FS) != 0 -+ && write_fifo(ep, req)) { -+ req = 0; -+ } else if ((*ep->reg_udccsr & UDCCSR_FS) != 0 -+ && read_fifo(ep, req)) { -+ req = 0; -+ } -+ DMSG("req:%p,ep->desc:%p,ep->dma:%d\n", req, ep->desc, ep->dma); -+ if (likely (req && ep->desc) && ep->dma < 0) -+ pio_irq_enable(ep->ep_num); -+ } -+ -+ /* pio or dma irq handler advances the queue. */ -+ if (likely (req != 0)) -+ list_add_tail(&req->queue, &ep->queue); -+ local_irq_restore(flags); -+ -+ return 0; -+} -+ -+ -+/* -+ * nuke - dequeue ALL requests -+ */ -+static void nuke(struct pxa27x_ep *ep, int status) -+{ -+ struct pxa27x_request *req; -+ -+ /* called with irqs blocked */ -+#ifdef USE_DMA -+ if (ep->dma >= 0 && !ep->stopped) -+ cancel_dma(ep); -+#endif -+ while (!list_empty(&ep->queue)) { -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ done(ep, req, status); -+ } -+ if (ep->desc) -+ pio_irq_disable (ep->ep_num); -+} -+ -+ -+/* dequeue JUST ONE request */ -+static int pxa27x_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) -+{ -+ struct pxa27x_ep *ep; -+ struct pxa27x_request *req; -+ unsigned long flags; -+ -+ ep = container_of(_ep, struct pxa27x_ep, ep); -+ if (!_ep || ep->ep.name == ep0name) -+ return -EINVAL; -+ -+ local_irq_save(flags); -+ -+ /* make sure it's actually queued on this endpoint */ -+ list_for_each_entry (req, &ep->queue, queue) { -+ if (&req->req == _req) -+ break; -+ } -+ if (&req->req != _req) { -+ local_irq_restore(flags); -+ return -EINVAL; -+ } -+ -+#ifdef USE_DMA -+ if (ep->dma >= 0 && ep->queue.next == &req->queue && !ep->stopped) { -+ cancel_dma(ep); -+ done(ep, req, -ECONNRESET); -+ /* restart i/o */ -+ if (!list_empty(&ep->queue)) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ kick_dma(ep, req); -+ } -+ } else -+#endif -+ done(ep, req, -ECONNRESET); -+ -+ local_irq_restore(flags); -+ return 0; -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+static int pxa27x_ep_set_halt(struct usb_ep *_ep, int value) -+{ -+ struct pxa27x_ep *ep; -+ unsigned long flags; -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ ep = container_of(_ep, struct pxa27x_ep, ep); -+ if (unlikely (!_ep -+ || (!ep->desc && ep->ep.name != ep0name)) -+ || ep->ep_type == USB_ENDPOINT_XFER_ISOC) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -EINVAL; -+ } -+ if (value == 0) { -+ /* this path (reset toggle+halt) is needed to implement -+ * SET_INTERFACE on normal hardware. but it can't be -+ * done from software on the PXA UDC, and the hardware -+ * forgets to do it as part of SET_INTERFACE automagic. -+ */ -+ DMSG("only host can clear %s halt\n", _ep->name); -+ return -EROFS; -+ } -+ -+ local_irq_save(flags); -+ -+ if (ep->dir_in && ((*ep->reg_udccsr & UDCCSR_FS) == 0 -+ || !list_empty(&ep->queue))) { -+ local_irq_restore(flags); -+ return -EAGAIN; -+ } -+ -+ /* FST bit is the same for control, bulk in, bulk out, interrupt in */ -+ *ep->reg_udccsr = UDCCSR_FST|UDCCSR_FEF; -+ -+ /* ep0 needs special care */ -+ if (!ep->desc) { -+ start_watchdog(ep->dev); -+ ep->dev->req_pending = 0; -+ ep->dev->ep0state = EP0_STALL; -+ LED_EP0_OFF; -+ -+ /* and bulk/intr endpoints like dropping stalls too */ -+ } else { -+ unsigned i; -+ for (i = 0; i < 1000; i += 20) { -+ if (*ep->reg_udccsr & UDCCSR_SST) -+ break; -+ udelay(20); -+ } -+ } -+ local_irq_restore(flags); -+ -+ DBG(DBG_VERBOSE, "%s halt\n", _ep->name); -+ return 0; -+} -+ -+static int pxa27x_ep_fifo_status(struct usb_ep *_ep) -+{ -+ struct pxa27x_ep *ep; -+ -+ ep = container_of(_ep, struct pxa27x_ep, ep); -+ if (!_ep) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return -ENODEV; -+ } -+ /* pxa can't report unclaimed bytes from IN fifos */ -+ if (ep->dir_in) -+ return -EOPNOTSUPP; -+ if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN -+ || (*ep->reg_udccsr & UDCCSR_FS) == 0) -+ return 0; -+ else -+ return (*ep->reg_udcbcr & 0xfff) + 1; -+} -+ -+static void pxa27x_ep_fifo_flush(struct usb_ep *_ep) -+{ -+ struct pxa27x_ep *ep; -+ -+ ep = container_of(_ep, struct pxa27x_ep, ep); -+ if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { -+ DMSG("%s, bad ep\n", __FUNCTION__); -+ return; -+ } -+ -+ /* toggle and halt bits stay unchanged */ -+ -+ /* for OUT, just read and discard the FIFO contents. */ -+ if (!ep->dir_in) { -+ while (((*ep->reg_udccsr) & UDCCSR_BNE) != 0) -+ (void) *ep->reg_udcdr; -+ return; -+ } -+ -+ /* most IN status is the same, but ISO can't stall */ -+ *ep->reg_udccsr = UDCCSR_PC|UDCCSR_FST|UDCCSR_TRN -+ | (ep->ep_type == USB_ENDPOINT_XFER_ISOC) -+ ? 0 : UDCCSR_SST; -+} -+ -+ -+static struct usb_ep_ops pxa27x_ep_ops = { -+ .enable = pxa27x_ep_enable, -+ .disable = pxa27x_ep_disable, -+ -+ .alloc_request = pxa27x_ep_alloc_request, -+ .free_request = pxa27x_ep_free_request, -+ -+ .alloc_buffer = pxa27x_ep_alloc_buffer, -+ .free_buffer = pxa27x_ep_free_buffer, -+ -+ .queue = pxa27x_ep_queue, -+ .dequeue = pxa27x_ep_dequeue, -+ -+ .set_halt = pxa27x_ep_set_halt, -+ .fifo_status = pxa27x_ep_fifo_status, -+ .fifo_flush = pxa27x_ep_fifo_flush, -+}; -+ -+ -+/* --------------------------------------------------------------------------- -+ * device-scoped parts of the api to the usb controller hardware -+ * --------------------------------------------------------------------------- -+ */ -+ -+static inline void validate_fifo_size(struct pxa27x_ep *pxa_ep, u8 bmAttributes) -+{ -+ switch (bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { -+ case USB_ENDPOINT_XFER_CONTROL: -+ pxa_ep->fifo_size = EP0_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_ISOC: -+ pxa_ep->fifo_size = ISO_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_BULK: -+ pxa_ep->fifo_size = BULK_FIFO_SIZE; -+ break; -+ case USB_ENDPOINT_XFER_INT: -+ pxa_ep->fifo_size = INT_FIFO_SIZE; -+ break; -+ default: -+ break; -+ } -+} -+ -+#define NAME_SIZE 18 -+struct usb_ep* pxa27x_ep_alloc(struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc, int config, int interface, int alt) -+{ -+ u32 tmp ; -+ unsigned i; -+ char* name; -+ struct usb_ep * ep = NULL; -+ struct pxa27x_ep *pxa_ep = NULL; -+ struct pxa27x_udc *dev = the_controller; -+ -+ DMSG("pxa27x_config_ep is called\n"); -+ DMSG(" usb endpoint descriptor is:\n" -+ " bLength:%d\n" -+ " bDescriptorType:%x\n" -+ " bEndpointAddress:%x\n" -+ " bmAttributes:%x\n" -+ " wMaxPacketSize:%d\n", -+ desc->bLength, -+ desc->bDescriptorType,desc->bEndpointAddress, -+ desc->bmAttributes,desc->wMaxPacketSize); -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if(!dev->ep[i].assigned) { -+ pxa_ep = &dev->ep[i]; -+ pxa_ep->assigned = 1; -+ pxa_ep->ep_num = i; -+ break; -+ } -+ } -+ if (unlikely(i == UDC_EP_NUM)) { -+ printk(KERN_ERR __FILE__ ": Failed to find a spare endpoint\n"); -+ return ep; -+ } -+ -+ -+ ep = &pxa_ep->ep; -+ -+ pxa_ep->dev = dev; -+ pxa_ep->desc = desc; -+ pxa_ep->pio_irqs = pxa_ep->dma_irqs = 0; -+ pxa_ep->dma = -1; -+ -+ if (!(desc->bEndpointAddress & 0xF)) -+ desc->bEndpointAddress |= i; -+ -+ if (!(desc->wMaxPacketSize)) { -+ validate_fifo_size(pxa_ep, desc->bmAttributes); -+ desc->wMaxPacketSize = pxa_ep->fifo_size; -+ } else -+ pxa_ep->fifo_size = desc->wMaxPacketSize; -+ -+ pxa_ep->dir_in = (desc->bEndpointAddress & USB_DIR_IN) ? 1 : 0; -+ pxa_ep->ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; -+ pxa_ep->stopped = 1; -+ pxa_ep->dma_con = 0; -+ pxa_ep->config = config; -+ pxa_ep->interface = interface; -+ pxa_ep->aisn = alt; -+ -+ pxa_ep->reg_udccsr = &UDCCSR0 + i; -+ pxa_ep->reg_udcbcr = &UDCBCR0 + i; -+ pxa_ep->reg_udcdr = &UDCDR0 + i ; -+ pxa_ep->reg_udccr = &UDCCRA - 1 + i; -+#ifdef USE_DMA -+ pxa_ep->reg_drcmr = &DRCMR24 + i; -+#endif -+ -+ DMSG("udccsr=0x%8x, udcbcr=0x%8x, udcdr=0x%8x," -+ "udccr0=0x%8x\n", -+ (unsigned)pxa_ep->reg_udccsr, -+ (unsigned)pxa_ep->reg_udcbcr, -+ (unsigned)pxa_ep->reg_udcdr, -+ (unsigned)pxa_ep->reg_udccr); -+ -+ /* Configure UDCCR */ -+ tmp = 0; -+ tmp |= (pxa_ep->config << UDCCONR_CN_S) & UDCCONR_CN; -+#if 0 -+ tmp |= (pxa_ep->interface << UDCCONR_IN_S) & UDCCONR_IN; -+ tmp |= (pxa_ep->aisn << UDCCONR_AISN_S) & UDCCONR_AISN; -+#else -+ tmp |= (0 << UDCCONR_IN_S) & UDCCONR_IN; -+ tmp |= (0 << UDCCONR_AISN_S) & UDCCONR_AISN; -+#endif -+ tmp |= (desc->bEndpointAddress << UDCCONR_EN_S) & UDCCONR_EN; -+ tmp |= (pxa_ep->ep_type << UDCCONR_ET_S) & UDCCONR_ET; -+ tmp |= (pxa_ep->dir_in) ? UDCCONR_ED : 0; -+ tmp |= (min(pxa_ep->fifo_size, (unsigned)desc->wMaxPacketSize) \ -+ << UDCCONR_MPS_S ) & UDCCONR_MPS; -+ tmp |= UDCCONR_DE | UDCCONR_EE; -+// tmp |= UDCCONR_EE; -+ -+ *pxa_ep->reg_udccr = tmp; -+ -+#ifdef USE_DMA -+ /* Only BULK use DMA */ -+ if ((pxa_ep->ep_type & USB_ENDPOINT_XFERTYPE_MASK)\ -+ == USB_ENDPOINT_XFER_BULK) -+ *pxa_ep->reg_udccsr = UDCCSR_DME; -+#endif -+ -+ DMSG("UDCCR: 0x%p is 0x%x\n", pxa_ep->reg_udccr,*pxa_ep->reg_udccr); -+ -+ /* Fill ep name*/ -+ name = kmalloc(NAME_SIZE, GFP_KERNEL); -+ if (!name) { -+ printk(KERN_ERR "%s: Error\n", __FUNCTION__); -+ return NULL; -+ } -+ -+ switch (pxa_ep->ep_type) { -+ case USB_ENDPOINT_XFER_BULK: -+ sprintf(name, "Bulk-%s-%d", (pxa_ep->dir_in ? "in":"out"), i); -+ break; -+ case USB_ENDPOINT_XFER_INT: -+ sprintf(name, "Interrupt-%s-%d", (pxa_ep->dir_in ? \ -+ "in":"out"), i); -+ break; -+ default: -+ sprintf(name, "endpoint-%s-%d", (pxa_ep->dir_in ? \ -+ "in":"out"), i); -+ break; -+ } -+ ep->name = name; -+ -+ ep->ops = &pxa27x_ep_ops; -+ ep->maxpacket = min((ushort)pxa_ep->fifo_size, desc->wMaxPacketSize); -+ -+ list_add_tail (&ep->ep_list, &gadget->ep_list); -+ return ep; -+} -+ -+static int pxa27x_udc_get_frame(struct usb_gadget *_gadget) -+{ -+ return (UDCFNR & 0x3FF); -+} -+ -+static int pxa27x_udc_wakeup(struct usb_gadget *_gadget) -+{ -+ /* host may not have enabled remote wakeup */ -+ if ((UDCCR & UDCCR_DWRE) == 0) -+ return -EHOSTUNREACH; -+ udc_set_mask_UDCCR(UDCCR_UDR); -+ return 0; -+} -+ -+static const struct usb_gadget_ops pxa27x_udc_ops = { -+ .ep_alloc = pxa27x_ep_alloc, -+ .get_frame = pxa27x_udc_get_frame, -+ .wakeup = pxa27x_udc_wakeup, -+ // current versions must always be self-powered -+}; -+ -+ -+/*-------------------------------------------------------------------------*/ -+ -+#ifdef UDC_PROC_FILE -+ -+static const char proc_node_name [] = "driver/udc"; -+ -+static int -+udc_proc_read(char *page, char **start, off_t off, int count, -+ int *eof, void *_dev) -+{ -+ char *buf = page; -+ struct pxa27x_udc *dev = _dev; -+ char *next = buf; -+ unsigned size = count; -+ unsigned long flags; -+ int i, t; -+ u32 tmp; -+ -+ if (off != 0) -+ return 0; -+ -+ local_irq_save(flags); -+ -+ /* basic device status */ -+ t = scnprintf(next, size, DRIVER_DESC "\n" -+ "%s version: %s\nGadget driver: %s\n", -+ driver_name, DRIVER_VERSION SIZE_STR DMASTR, -+ dev->driver ? dev->driver->driver.name : "(none)"); -+ size -= t; -+ next += t; -+ -+ /* registers for device and ep0 */ -+ t = scnprintf(next, size, -+ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X\n", -+ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); -+ size -= t; -+ next += t; -+ -+ tmp = UDCCR; -+ t = scnprintf(next, size,"udccr %02X =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", tmp, -+ (tmp & UDCCR_OEN) ? " oen":"", -+ (tmp & UDCCR_AALTHNP) ? " aalthnp":"", -+ (tmp & UDCCR_AHNP) ? " rem" : "", -+ (tmp & UDCCR_BHNP) ? " rstir" : "", -+ (tmp & UDCCR_DWRE) ? " dwre" : "", -+ (tmp & UDCCR_SMAC) ? " smac" : "", -+ (tmp & UDCCR_EMCE) ? " emce" : "", -+ (tmp & UDCCR_UDR) ? " udr" : "", -+ (tmp & UDCCR_UDA) ? " uda" : "", -+ (tmp & UDCCR_UDE) ? " ude" : "", -+ (tmp & UDCCR_ACN) >> UDCCR_ACN_S, -+ (tmp & UDCCR_AIN) >> UDCCR_AIN_S, -+ (tmp & UDCCR_AAISN)>> UDCCR_AAISN_S ); -+ -+ size -= t; -+ next += t; -+ -+ tmp = UDCCSR0; -+ t = scnprintf(next, size, -+ "udccsr0 %02X =%s%s%s%s%s%s%s\n", tmp, -+ (tmp & UDCCSR0_SA) ? " sa" : "", -+ (tmp & UDCCSR0_RNE) ? " rne" : "", -+ (tmp & UDCCSR0_FST) ? " fst" : "", -+ (tmp & UDCCSR0_SST) ? " sst" : "", -+ (tmp & UDCCSR0_DME) ? " dme" : "", -+ (tmp & UDCCSR0_IPR) ? " ipr" : "", -+ (tmp & UDCCSR0_OPC) ? " opc" : ""); -+ size -= t; -+ next += t; -+ -+ if (!dev->driver) -+ goto done; -+ -+ t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n", -+ dev->stats.write.bytes, dev->stats.write.ops, -+ dev->stats.read.bytes, dev->stats.read.ops, -+ dev->stats.irqs); -+ size -= t; -+ next += t; -+ -+ /* dump endpoint queues */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep [i]; -+ struct pxa27x_request *req; -+ int t; -+ -+ if (i != 0) { -+ const struct usb_endpoint_descriptor *d; -+ -+ d = ep->desc; -+ if (!d) -+ continue; -+ tmp = *dev->ep [i].reg_udccsr; -+ t = scnprintf(next, size, -+ "%s max %d %s udccs %02x udccr:0x%x\n", -+ ep->ep.name, le16_to_cpu (d->wMaxPacketSize), -+ (ep->dma >= 0) ? "dma" : "pio", tmp, -+ *dev->ep[i].reg_udccr); -+ /* TODO translate all five groups of udccs bits! */ -+ -+ } else /* ep0 should only have one transfer queued */ -+ t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n", -+ ep->pio_irqs); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ -+ if (list_empty(&ep->queue)) { -+ t = scnprintf(next, size, "\t(nothing queued)\n"); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ continue; -+ } -+ list_for_each_entry(req, &ep->queue, queue) { -+#ifdef USE_DMA -+ if (ep->dma >= 0 && req->queue.prev == &ep->queue) -+ t = scnprintf(next, size, -+ "\treq %p len %d/%d " -+ "buf %p (dma%d dcmd %08x)\n", -+ &req->req, req->req.actual, -+ req->req.length, req->req.buf, -+ ep->dma, DCMD(ep->dma) -+ // low 13 bits == bytes-to-go -+ ); -+ else -+#endif -+ t = scnprintf(next, size, -+ "\treq %p len %d/%d buf %p\n", -+ &req->req, req->req.actual, -+ req->req.length, req->req.buf); -+ if (t <= 0 || t > size) -+ goto done; -+ size -= t; -+ next += t; -+ } -+ } -+ -+done: -+ local_irq_restore(flags); -+ *eof = 1; -+ return count - size; -+} -+ -+#define create_proc_files() \ -+ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev) -+#define remove_proc_files() \ -+ remove_proc_entry(proc_node_name, NULL) -+ -+#else /* !UDC_PROC_FILE */ -+#define create_proc_files() do {} while (0) -+#define remove_proc_files() do {} while (0) -+ -+#endif /* UDC_PROC_FILE */ -+ -+/* "function" sysfs attribute */ -+static ssize_t -+show_function (struct device *_dev, struct device_attribute *attr, char *buf) -+{ -+ struct pxa27x_udc *dev = dev_get_drvdata (_dev); -+ -+ if (!dev->driver -+ || !dev->driver->function -+ || strlen (dev->driver->function) > PAGE_SIZE) -+ return 0; -+ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function); -+} -+static DEVICE_ATTR (function, S_IRUGO, show_function, NULL); -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * udc_disable - disable USB device controller -+ */ -+static void udc_disable(struct pxa27x_udc *dev) -+{ -+ UDCICR0 = UDCICR1 = 0x00000000; -+ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ -+ /* Disable clock for USB device */ -+ pxa_set_cken(CKEN11_USB, 0); -+ -+ ep0_idle (dev); -+ dev->gadget.speed = USB_SPEED_UNKNOWN; -+ -+ if (dev->mach->gpio_pullup) -+ GPCR(dev->mach->gpio_pullup) = GPIO_bit(dev->mach->gpio_pullup); -+ if (dev->mach->udc_command) -+ dev->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); -+ -+ make_usb_disappear(); -+} -+ -+ -+/* -+ * udc_reinit - initialize software state -+ */ -+static void udc_reinit(struct pxa27x_udc *dev) -+{ -+ u32 i; -+ -+ dev->ep0state = EP0_IDLE; -+ -+ /* basic endpoint records init */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->stopped = 0; -+ ep->pio_irqs = ep->dma_irqs = 0; -+ } -+ dev->configuration = 0; -+ dev->interface = 0; -+ dev->alternate = 0; -+ /* the rest was statically initialized, and is read-only */ -+} -+ -+/* until it's enabled, this UDC should be completely invisible -+ * to any USB host. -+ */ -+static void udc_enable (struct pxa27x_udc *dev) -+{ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ -+ /* Enable clock for USB device */ -+ pxa_set_cken(CKEN11_USB, 1); -+ -+ UDCICR0 = UDCICR1 = 0; -+ -+ ep0_idle(dev); -+ dev->gadget.speed = USB_SPEED_FULL; -+ dev->stats.irqs = 0; -+ -+ udc_set_mask_UDCCR(UDCCR_UDE); -+ udelay (2); -+ if (UDCCR & UDCCR_EMCE) -+ { -+ printk(KERN_ERR ": There are error in configuration, udc disabled\n"); -+ } -+ -+ /* caller must be able to sleep in order to cope -+ * with startup transients. -+ */ -+ msleep(100); -+ -+ /* enable suspend/resume and reset irqs */ -+ UDCICR1 = UDCICR1_IECC | UDCICR1_IERU | UDCICR1_IESU | UDCICR1_IERS; -+ -+ /* enable ep0 irqs */ -+ UDCICR0 = UDCICR_INT(0,UDCICR_INT_MASK); -+#if 0 -+ for(i=1; i < UDC_EP_NUM; i++) { -+ if (dev->ep[i].assigned) -+ pio_irq_enable(i); -+ } -+#endif -+ -+ if (dev->mach->gpio_pullup) -+ GPSR(dev->mach->gpio_pullup) = GPIO_bit(dev->mach->gpio_pullup); -+ if (dev->mach->udc_command) -+ dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); -+ -+ /* FIXME */ -+ let_usb_appear(); -+} -+ -+ -+/* when a driver is successfully registered, it will receive -+ * control requests including set_configuration(), which enables -+ * non-control requests. then usb traffic follows until a -+ * disconnect is reported. then a host may connect again, or -+ * the driver might get unbound. -+ */ -+int usb_gadget_register_driver(struct usb_gadget_driver *driver) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ int retval; -+ -+ DMSG("dev=0x%x, driver=0x%x, speed=%d, " -+ "bind=0x%x, unbind=0x%x, disconnect=0x%x, setup=0x%x\n", -+ (unsigned)dev, (unsigned)driver, driver->speed, -+ (unsigned)driver->bind, (unsigned)driver->unbind, -+ (unsigned)driver->disconnect, (unsigned)driver->setup); -+ -+ if (!driver || driver->speed != USB_SPEED_FULL -+ || !driver->bind -+ || !driver->unbind -+ || !driver->disconnect -+ || !driver->setup) -+ return -EINVAL; -+ if (!dev) -+ return -ENODEV; -+ if (dev->driver) -+ return -EBUSY; -+ -+ /* first hook up the driver ... */ -+ dev->driver = driver; -+ dev->gadget.dev.driver = &driver->driver; -+ -+ device_add(&dev->gadget.dev); -+ retval = driver->bind(&dev->gadget); -+ if (retval) { -+ DMSG("bind to driver %s --> error %d\n", -+ driver->driver.name, retval); -+ device_del (&dev->gadget.dev); -+ -+ dev->driver = 0; -+ dev->gadget.dev.driver = 0; -+ return retval; -+ } -+ device_create_file(dev->dev, &dev_attr_function); -+ -+ /* ... then enable host detection and ep0; and we're ready -+ * for set_configuration as well as eventual disconnect. -+ * NOTE: this shouldn't power up until later. -+ */ -+ DMSG("registered gadget driver '%s'\n", driver->driver.name); -+ udc_enable(dev); -+ dump_state(dev); -+ return 0; -+} -+EXPORT_SYMBOL(usb_gadget_register_driver); -+ -+static void -+stop_activity(struct pxa27x_udc *dev, struct usb_gadget_driver *driver) -+{ -+ int i; -+ -+ DMSG("Trace path 1\n"); -+ /* don't disconnect drivers more than once */ -+ if (dev->gadget.speed == USB_SPEED_UNKNOWN) -+ driver = 0; -+ dev->gadget.speed = USB_SPEED_UNKNOWN; -+ -+ /* prevent new request submissions, kill any outstanding requests */ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->stopped = 1; -+ nuke(ep, -ESHUTDOWN); -+ } -+ del_timer_sync(&dev->timer); -+ -+ /* report disconnect; the driver is already quiesced */ -+ if (driver) -+ driver->disconnect(&dev->gadget); -+ -+ /* re-init driver-visible data structures */ -+ udc_reinit(dev); -+} -+ -+int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) -+{ -+ struct pxa27x_udc *dev = the_controller; -+ -+ if (!dev) -+ return -ENODEV; -+ if (!driver || driver != dev->driver) -+ return -EINVAL; -+ -+ local_irq_disable(); -+ udc_disable(dev); -+ stop_activity(dev, driver); -+ local_irq_enable(); -+ -+ driver->unbind(&dev->gadget); -+ dev->driver = 0; -+ -+ device_del (&dev->gadget.dev); -+ device_remove_file(dev->dev, &dev_attr_function); -+ -+ DMSG("unregistered gadget driver '%s'\n", driver->driver.name); -+ dump_state(dev); -+ return 0; -+} -+EXPORT_SYMBOL(usb_gadget_unregister_driver); -+ -+#ifndef enable_disconnect_irq -+#define enable_disconnect_irq() do {} while (0) -+#define disable_disconnect_irq() do {} while (0) -+#endif -+ -+ -+/*-------------------------------------------------------------------------*/ -+ -+static inline void clear_ep_state (struct pxa27x_udc *dev) -+{ -+ unsigned i; -+ -+ /* hardware SET_{CONFIGURATION,INTERFACE} automagic resets endpoint -+ * fifos, and pending transactions mustn't be continued in any case. -+ */ -+ for (i = 1; i < UDC_EP_NUM; i++) -+ nuke(&dev->ep[i], -ECONNABORTED); -+} -+ -+static void udc_watchdog(unsigned long _dev) -+{ -+ struct pxa27x_udc *dev = (void *)_dev; -+ -+ local_irq_disable(); -+ if (dev->ep0state == EP0_STALL -+ && (UDCCSR0 & UDCCSR0_FST) == 0 -+ && (UDCCSR0 & UDCCSR0_SST) == 0) { -+ UDCCSR0 = UDCCSR0_FST|UDCCSR0_FTF; -+ DBG(DBG_VERBOSE, "ep0 re-stall\n"); -+ start_watchdog(dev); -+ } -+ local_irq_enable(); -+} -+ -+static void handle_ep0 (struct pxa27x_udc *dev) -+{ -+ u32 udccsr0 = UDCCSR0; -+ struct pxa27x_ep *ep = &dev->ep [0]; -+ struct pxa27x_request *req; -+ union { -+ struct usb_ctrlrequest r; -+ u8 raw [8]; -+ u32 word [2]; -+ } u; -+ -+ if (list_empty(&ep->queue)) -+ req = 0; -+ else -+ req = list_entry(ep->queue.next, struct pxa27x_request, queue); -+ -+ /* clear stall status */ -+ if (udccsr0 & UDCCSR0_SST) { -+ nuke(ep, -EPIPE); -+ UDCCSR0 = UDCCSR0_SST; -+ del_timer(&dev->timer); -+ ep0_idle(dev); -+ } -+ -+ /* previous request unfinished? non-error iff back-to-back ... */ -+ if ((udccsr0 & UDCCSR0_SA) != 0 && dev->ep0state != EP0_IDLE) { -+ nuke(ep, 0); -+ del_timer(&dev->timer); -+ ep0_idle(dev); -+ } -+ -+ switch (dev->ep0state) { -+ case EP0_NO_ACTION: -+ printk(KERN_INFO"%s: Busy\n", __FUNCTION__); -+ /*Fall through */ -+ case EP0_IDLE: -+ /* late-breaking status? */ -+ udccsr0 = UDCCSR0; -+ -+ /* start control request? */ -+ if (likely((udccsr0 & (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE)) -+ == (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE))) { -+ int i; -+ -+ nuke (ep, -EPROTO); -+ /* read SETUP packet */ -+ for (i = 0; i < 2; i++) { -+ if (unlikely(!(UDCCSR0 & UDCCSR0_RNE))) { -+bad_setup: -+ DMSG("SETUP %d!\n", i); -+ goto stall; -+ } -+ u.word [i] = UDCDR0; -+ } -+ if (unlikely((UDCCSR0 & UDCCSR0_RNE) != 0)) -+ goto bad_setup; -+ -+ le16_to_cpus (&u.r.wValue); -+ le16_to_cpus (&u.r.wIndex); -+ le16_to_cpus (&u.r.wLength); -+ -+ LED_EP0_ON; -+ -+ DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n", -+ u.r.bRequestType, u.r.bRequest, -+ u.r.wValue, u.r.wIndex, u.r.wLength); -+ /* cope with automagic for some standard requests. */ -+ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK) -+ == USB_TYPE_STANDARD; -+ dev->req_config = 0; -+ dev->req_pending = 1; -+#if 0 -+ switch (u.r.bRequest) { -+ /* hardware was supposed to hide this */ -+ case USB_REQ_SET_CONFIGURATION: -+ case USB_REQ_SET_INTERFACE: -+ case USB_REQ_SET_ADDRESS: -+ printk(KERN_ERR "Should not come here\n"); -+ break; -+ } -+ -+#endif -+ if (u.r.bRequestType & USB_DIR_IN) -+ dev->ep0state = EP0_IN_DATA_PHASE; -+ else -+ dev->ep0state = EP0_OUT_DATA_PHASE; -+ i = dev->driver->setup(&dev->gadget, &u.r); -+ -+ if (i < 0) { -+ /* hardware automagic preventing STALL... */ -+ if (dev->req_config) { -+ /* hardware sometimes neglects to tell -+ * tell us about config change events, -+ * so later ones may fail... -+ */ -+ WARN("config change %02x fail %d?\n", -+ u.r.bRequest, i); -+ return; -+ /* TODO experiment: if has_cfr, -+ * hardware didn't ACK; maybe we -+ * could actually STALL! -+ */ -+ } -+ DBG(DBG_VERBOSE, "protocol STALL, " -+ "%02x err %d\n", UDCCSR0, i); -+stall: -+ /* the watchdog timer helps deal with cases -+ * where udc seems to clear FST wrongly, and -+ * then NAKs instead of STALLing. -+ */ -+ ep0start(dev, UDCCSR0_FST|UDCCSR0_FTF, "stall"); -+ start_watchdog(dev); -+ dev->ep0state = EP0_STALL; -+ LED_EP0_OFF; -+ -+ /* deferred i/o == no response yet */ -+ } else if (dev->req_pending) { -+ if (likely(dev->ep0state == EP0_IN_DATA_PHASE -+ || dev->req_std || u.r.wLength)) -+ ep0start(dev, 0, "defer"); -+ else -+ ep0start(dev, UDCCSR0_IPR, "defer/IPR"); -+ } -+ -+ /* expect at least one data or status stage irq */ -+ return; -+ -+ } else { -+ /* some random early IRQ: -+ * - we acked FST -+ * - IPR cleared -+ * - OPC got set, without SA (likely status stage) -+ */ -+ UDCCSR0 = udccsr0 & (UDCCSR0_SA|UDCCSR0_OPC); -+ } -+ break; -+ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR etc */ -+ if (udccsr0 & UDCCSR0_OPC) { -+ UDCCSR0 = UDCCSR0_OPC|UDCCSR0_FTF; -+ DBG(DBG_VERBOSE, "ep0in premature status\n"); -+ if (req) -+ done(ep, req, 0); -+ ep0_idle(dev); -+ } else /* irq was IPR clearing */ { -+ if (req) { -+ /* this IN packet might finish the request */ -+ (void) write_ep0_fifo(ep, req); -+ } /* else IN token before response was written */ -+ } -+ break; -+ case EP0_OUT_DATA_PHASE: /* SET_DESCRIPTOR etc */ -+ if (udccsr0 & UDCCSR0_OPC) { -+ if (req) { -+ /* this OUT packet might finish the request */ -+ if (read_ep0_fifo(ep, req)) -+ done(ep, req, 0); -+ /* else more OUT packets expected */ -+ } /* else OUT token before read was issued */ -+ } else /* irq was IPR clearing */ { -+ DBG(DBG_VERBOSE, "ep0out premature status\n"); -+ if (req) -+ done(ep, req, 0); -+ ep0_idle(dev); -+ } -+ break; -+ case EP0_STALL: -+ UDCCSR0 = UDCCSR0_FST; -+ break; -+ } -+ UDCISR0 = UDCISR_INT(0, UDCISR_INT_MASK); -+} -+ -+ -+static void handle_ep(struct pxa27x_ep *ep) -+{ -+ struct pxa27x_request *req; -+ int completed; -+ u32 udccsr=0; -+ -+ DMSG("%s is called\n", __FUNCTION__); -+ do { -+ completed = 0; -+ if (likely (!list_empty(&ep->queue))) { -+ req = list_entry(ep->queue.next, -+ struct pxa27x_request, queue); -+ } else -+ req = 0; -+ -+// udccsr = *ep->reg_udccsr; -+ DMSG("%s: req:%p, udcisr0:0x%x udccsr %p:0x%x\n", __FUNCTION__, -+ req, UDCISR0, ep->reg_udccsr, *ep->reg_udccsr); -+ if (unlikely(ep->dir_in)) { -+ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; -+ if (unlikely (udccsr)) -+ *ep->reg_udccsr = udccsr; -+ -+ if (req && likely ((*ep->reg_udccsr & UDCCSR_FS) != 0)) -+ completed = write_fifo(ep, req); -+ -+ } else { -+ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr; -+ if (unlikely(udccsr)) -+ *ep->reg_udccsr = udccsr; -+ -+ /* fifos can hold packets, ready for reading... */ -+ if (likely(req)) { -+ completed = read_fifo(ep, req); -+ } else { -+ pio_irq_disable (ep->ep_num); -+ *ep->reg_udccsr = UDCCSR_FEF; -+ DMSG("%s: no req for out data\n", -+ __FUNCTION__); -+ } -+ } -+ ep->pio_irqs++; -+ } while (completed); -+} -+ -+static void pxa27x_change_configuration (struct pxa27x_udc *dev) -+{ -+ struct usb_ctrlrequest req ; -+ -+ req.bRequestType = 0; -+ req.bRequest = USB_REQ_SET_CONFIGURATION; -+ req.wValue = dev->configuration; -+ req.wIndex = 0; -+ req.wLength = 0; -+ -+ dev->ep0state = EP0_NO_ACTION; -+ dev->driver->setup(&dev->gadget, &req); -+ -+} -+ -+static void pxa27x_change_interface (struct pxa27x_udc *dev) -+{ -+ struct usb_ctrlrequest req; -+ -+ req.bRequestType = USB_RECIP_INTERFACE; -+ req.bRequest = USB_REQ_SET_INTERFACE; -+ req.wValue = dev->alternate; -+ req.wIndex = dev->interface; -+ req.wLength = 0; -+ -+ dev->ep0state = EP0_NO_ACTION; -+ dev->driver->setup(&dev->gadget, &req); -+} -+ -+/* -+ * pxa27x_udc_irq - interrupt handler -+ * -+ * avoid delays in ep0 processing. the control handshaking isn't always -+ * under software control (pxa250c0 and the pxa255 are better), and delays -+ * could cause usb protocol errors. -+ */ -+static irqreturn_t pxa27x_udc_irq(int irq, void *_dev) -+{ -+ struct pxa27x_udc *dev = _dev; -+ int handled; -+ -+ dev->stats.irqs++; -+ HEX_DISPLAY(dev->stats.irqs); -+ -+ DBG(DBG_VERBOSE, "Interrupt, UDCISR0:0x%08x, UDCISR1:0x%08x, " -+ "UDCCR:0x%08x\n", UDCISR0, UDCISR1, UDCCR); -+ -+ do { -+ u32 udcir = UDCISR1 & 0xF8000000; -+ -+ handled = 0; -+ -+ /* SUSpend Interrupt Request */ -+ if (unlikely(udcir & UDCISR1_IRSU)) { -+ UDCISR1 = UDCISR1_IRSU; -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB suspend\n"); -+ if (dev->gadget.speed != USB_SPEED_UNKNOWN -+ && dev->driver -+ && dev->driver->suspend) -+ dev->driver->suspend(&dev->gadget); -+ ep0_idle (dev); -+ } -+ -+ /* RESume Interrupt Request */ -+ if (unlikely(udcir & UDCISR1_IRRU)) { -+ UDCISR1 = UDCISR1_IRRU; -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB resume\n"); -+ -+ if (dev->gadget.speed != USB_SPEED_UNKNOWN -+ && dev->driver -+ && dev->driver->resume) -+ dev->driver->resume(&dev->gadget); -+ } -+ -+ if (unlikely(udcir & UDCISR1_IRCC)) { -+ unsigned config, interface, alternate; -+ -+ handled = 1; -+ DBG(DBG_VERBOSE, "USB SET_CONFIGURATION or " -+ "SET_INTERFACE command received\n"); -+ -+ UDCCR |= UDCCR_SMAC; -+ -+ config = (UDCCR & UDCCR_ACN) >> UDCCR_ACN_S; -+ -+ if (dev->configuration != config) { -+ dev->configuration = config; -+ pxa27x_change_configuration(dev) ; -+ } -+ -+ interface = (UDCCR & UDCCR_AIN) >> UDCCR_AIN_S; -+ alternate = (UDCCR & UDCCR_AAISN) >> UDCCR_AAISN_S; -+ -+ if ( (dev->configuration != interface) || \ -+ (dev->alternate != alternate)){ -+ dev->interface = config; -+ dev->alternate = alternate; -+ pxa27x_change_interface(dev); -+ } -+ -+ UDCISR1 = UDCISR1_IRCC; -+ DMSG("%s: con:%d,inter:%d,alt:%d\n", -+ __FUNCTION__, config,interface, alternate); -+ } -+ -+ /* ReSeT Interrupt Request - USB reset */ -+ if (unlikely(udcir & UDCISR1_IRRS)) { -+ UDCISR1 = UDCISR1_IRRS; -+ handled = 1; -+ -+ if ((UDCCR & UDCCR_UDA) == 0) { -+ DBG(DBG_VERBOSE, "SB reset start\n"); -+ -+ /* reset driver and endpoints, -+ * in case that's not yet done -+ */ -+ stop_activity (dev, dev->driver); -+ -+ } -+ INFO("USB reset\n"); -+ dev->gadget.speed = USB_SPEED_FULL; -+ memset(&dev->stats, 0, sizeof dev->stats); -+ -+ } else { -+ u32 udcisr0 = UDCISR0 ; -+ u32 udcisr1 = UDCISR1 & 0xFFFF; -+ int i; -+ -+ if (unlikely (!udcisr0 && !udcisr1)) -+ continue; -+ -+ DBG(DBG_VERY_NOISY, "irq %02x.%02x\n", udcisr1,udcisr0); -+ -+ /* control traffic */ -+ if (udcisr0 & UDCISR0_IR0) { -+ dev->ep[0].pio_irqs++; -+ handle_ep0(dev); -+ handled = 1; -+ } -+ -+ udcisr0 >>= 2; -+ /* endpoint data transfers */ -+ for (i = 1; udcisr0!=0 && i < 16; udcisr0>>=2,i++) { -+ UDCISR0 = UDCISR_INT(i, UDCISR_INT_MASK); -+ -+ if (udcisr0 & UDC_INT_FIFOERROR) -+ printk(KERN_ERR" Endpoint %d Fifo error\n", i); -+ if (udcisr0 & UDC_INT_PACKETCMP) { -+ handle_ep(&dev->ep[i]); -+ handled = 1; -+ } -+ -+ } -+ -+ for (i = 0; udcisr1!=0 && i < 8; udcisr1 >>= 2, i++) { -+ UDCISR1 = UDCISR_INT(i, UDCISR_INT_MASK); -+ -+ if (udcisr1 & UDC_INT_FIFOERROR) { -+ printk(KERN_ERR" Endpoint %d fifo error\n", (i+16)); -+ } -+ -+ if (udcisr1 & UDC_INT_PACKETCMP) { -+ handle_ep(&dev->ep[i+16]); -+ handled = 1; -+ } -+ } -+ } -+ -+ /* we could also ask for 1 msec SOF (SIR) interrupts */ -+ -+ } while (handled); -+ return IRQ_HANDLED; -+} -+ -+static void udc_init_ep(struct pxa27x_udc *dev) -+{ -+ int i; -+ -+ INIT_LIST_HEAD (&dev->gadget.ep_list); -+ INIT_LIST_HEAD (&dev->gadget.ep0->ep_list); -+ -+ for (i = 0; i < UDC_EP_NUM; i++) { -+ struct pxa27x_ep *ep = &dev->ep[i]; -+ -+ ep->dma = -1; -+ if (i != 0) { -+ memset(ep, 0, sizeof(*ep)); -+ } -+ INIT_LIST_HEAD (&ep->queue); -+ } -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+static void nop_release (struct device *dev) -+{ -+ DMSG("%s %s\n", __FUNCTION__, dev->bus_id); -+} -+ -+/* this uses load-time allocation and initialization (instead of -+ * doing it at run-time) to save code, eliminate fault paths, and -+ * be more obviously correct. -+ */ -+static struct pxa27x_udc memory = { -+ .gadget = { -+ .ops = &pxa27x_udc_ops, -+ .ep0 = &memory.ep[0].ep, -+ .name = driver_name, -+ .dev = { -+ .bus_id = "gadget", -+ .release = nop_release, -+ }, -+ }, -+ -+ /* control endpoint */ -+ .ep[0] = { -+ .ep = { -+ .name = ep0name, -+ .ops = &pxa27x_ep_ops, -+ .maxpacket = EP0_FIFO_SIZE, -+ }, -+ .dev = &memory, -+ .reg_udccsr = &UDCCSR0, -+ .reg_udcdr = &UDCDR0, -+ } -+}; -+ -+#define CP15R0_VENDOR_MASK 0xffffe000 -+ -+#define CP15R0_XSCALE_VALUE 0x69054000 /* intel/arm/xscale */ -+ -+/* -+ * probe - binds to the platform device -+ */ -+static int pxa27x_udc_probe(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ struct pxa27x_udc *udc = &memory; -+ int retval; -+ u32 chiprev; -+ -+ /* insist on Intel/ARM/XScale */ -+ asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev)); -+ if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) { -+ printk(KERN_ERR "%s: not XScale!\n", driver_name); -+ return -ENODEV; -+ } -+ /* other non-static parts of init */ -+ udc->dev = dev; -+ udc->mach = dev->platform_data; -+ -+ /* FIXME */ -+ if (udc->mach->gpio_pullup) -+ pxa_gpio_mode((udc->mach->gpio_pullup & GPIO_MD_MASK_NR) | \ -+ GPIO_OUT | GPIO_DFLT_HIGH); -+ -+ init_timer(&udc->timer); -+ udc->timer.function = udc_watchdog; -+ udc->timer.data = (unsigned long) udc; -+ -+ device_initialize(&udc->gadget.dev); -+ udc->gadget.dev.parent = dev; -+ udc->gadget.dev.dma_mask = dev->dma_mask; -+ -+ the_controller = udc; -+ dev_set_drvdata(dev, udc); -+ -+ udc_disable(udc); -+ udc_init_ep(udc); -+ udc_reinit(udc); -+ -+ /* irq setup after old hardware state is cleaned up */ -+ retval = request_irq(IRQ_USB, pxa27x_udc_irq, -+ SA_INTERRUPT, driver_name, udc); -+ if (retval != 0) { -+ printk(KERN_ERR "%s: can't get irq %i, err %d\n", -+ driver_name, IRQ_USB, retval); -+ return -EBUSY; -+ } -+ udc->got_irq = 1; -+ -+ create_proc_files(); -+ -+ return 0; -+} -+ -+static int pxa27x_udc_remove(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ struct pxa27x_udc *udc = dev->driver_data; -+ -+ udc_disable(udc); -+ remove_proc_files(); -+ usb_gadget_unregister_driver(udc->driver); -+ -+ if (udc->got_irq) { -+ free_irq(IRQ_USB, udc); -+ udc->got_irq = 0; -+ } -+ if (machine_is_lubbock() && udc->got_disc) { -+ free_irq(LUBBOCK_USB_DISC_IRQ, udc); -+ udc->got_disc = 0; -+ } -+ dev_set_drvdata(dev, 0); -+ the_controller = 0; -+ return 0; -+} -+ -+#ifdef CONFIG_PM -+static int pxa27x_udc_suspend(struct platform_device *pdev, pm_message_t state) -+{ -+ struct device *dev = &pdev->dev; -+ struct pxa27x_udc *udc = dev->driver_data; -+ int i; -+ -+ DMSG("%s will go into SUSPEND_POWER_DOWN\n", __FUNCTION__); -+ udc->udccsr0 = UDCCSR0; -+ for(i=1; (iep[i].assigned) { -+ struct pxa27x_ep *ep = &udc->ep[i]; -+ -+ ep->udccsr_value = *ep->reg_udccsr; -+ ep->udccr_value = *ep->reg_udccr; -+ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", -+ i, *ep->reg_udccsr, *ep->reg_udccr); -+ } -+ } -+ -+ udc_clear_mask_UDCCR(UDCCR_UDE); -+ pxa_set_cken(CKEN11_USB, 0); -+ -+ return 0; -+} -+ -+static int pxa27x_udc_resume(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ struct pxa27x_udc *udc = dev->driver_data; -+ int i; -+ -+ DMSG("%s: udc resume\n", __FUNCTION__); -+ -+ UDCCSR0 = udc->udccsr0 & (UDCCSR0_FST | UDCCSR0_DME); -+ for (i=1; i < UDC_EP_NUM; i++) { -+ if (udc->ep[i].assigned) { -+ struct pxa27x_ep *ep = &udc->ep[i]; -+ -+ *ep->reg_udccsr = ep->udccsr_value; -+ *ep->reg_udccr = ep->udccr_value; -+ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n", -+ i, *ep->reg_udccsr, *ep->reg_udccr); -+ } -+ } -+ udc_enable(udc); -+ /* OTGPH bit is set when sleep mode is entered. -+ * it indicates that OTG pad is retaining its state. -+ * Upon exit from sleep mode and before clearing OTGPH, -+ * Software must configure the USB OTG pad, UDC, and UHC -+ * to the state they were in before entering sleep mode.*/ -+ PSSR |= PSSR_OTGPH; -+ -+ return 0; -+} -+#else -+#define pxa27x_udc_suspend NULL -+#define pxa27x_udc_resume NULL -+#endif -+ -+/*-------------------------------------------------------------------------*/ -+ -+static struct platform_driver pxa27x_udc_driver = { -+ .probe = pxa27x_udc_probe, -+ .remove = pxa27x_udc_remove, -+ .suspend = pxa27x_udc_suspend, -+ .resume = pxa27x_udc_resume, -+ .driver = { -+ .name = "pxa2xx-udc", -+ }, -+}; -+ -+static int __init udc_init(void) -+{ -+ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); -+ return platform_driver_register(&pxa27x_udc_driver); -+} -+module_init(udc_init); -+ -+static void __exit udc_exit(void) -+{ -+ platform_driver_unregister(&pxa27x_udc_driver); -+} -+module_exit(udc_exit); -+ -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); -+MODULE_LICENSE("GPL"); -diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/pxa27x_udc.h -new file mode 100644 -index 0000000..c4b72a2 ---- /dev/null -+++ b/drivers/usb/gadget/pxa27x_udc.h -@@ -0,0 +1,329 @@ -+/* -+ * linux/drivers/usb/gadget/pxa27x_udc.h -+ * Intel PXA27x on-chip full speed USB device controller -+ * -+ * Copyright (C) 2003 Robert Schwebel , Pengutronix -+ * Copyright (C) 2003 David Brownell -+ * Copyright (C) 2004 Intel Corporation -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#ifndef __LINUX_USB_GADGET_PXA27X_H -+#define __LINUX_USB_GADGET_PXA27X_H -+ -+#include -+ -+struct pxa27x_udc; -+ -+struct pxa27x_ep { -+ struct usb_ep ep; -+ struct pxa27x_udc *dev; -+ -+ const struct usb_endpoint_descriptor *desc; -+ struct list_head queue; -+ unsigned long pio_irqs; -+ unsigned long dma_irqs; -+ -+ int dma; -+ unsigned fifo_size; -+ unsigned ep_num; -+ unsigned ep_type; -+ -+ unsigned stopped : 1; -+ unsigned dma_con : 1; -+ unsigned dir_in : 1; -+ unsigned assigned : 1; -+ -+ unsigned config; -+ unsigned interface; -+ unsigned aisn; -+ /* UDCCSR = UDC Control/Status Register for this EP -+ * UBCR = UDC Byte Count Remaining (contents of OUT fifo) -+ * UDCDR = UDC Endpoint Data Register (the fifo) -+ * UDCCR = UDC Endpoint Configuration Registers -+ * DRCM = DMA Request Channel Map -+ */ -+ volatile u32 *reg_udccsr; -+ volatile u32 *reg_udcbcr; -+ volatile u32 *reg_udcdr; -+ volatile u32 *reg_udccr; -+#ifdef USE_DMA -+ volatile u32 *reg_drcmr; -+#define drcmr(n) .reg_drcmr = & DRCMR ## n , -+#else -+#define drcmr(n) -+#endif -+ -+#ifdef CONFIG_PM -+ unsigned udccsr_value; -+ unsigned udccr_value; -+#endif -+}; -+ -+struct pxa27x_request { -+ struct usb_request req; -+ struct list_head queue; -+}; -+ -+enum ep0_state { -+ EP0_IDLE, -+ EP0_IN_DATA_PHASE, -+ EP0_OUT_DATA_PHASE, -+// EP0_END_XFER, -+ EP0_STALL, -+ EP0_NO_ACTION -+}; -+ -+#define EP0_FIFO_SIZE ((unsigned)16) -+#define BULK_FIFO_SIZE ((unsigned)64) -+#define ISO_FIFO_SIZE ((unsigned)256) -+#define INT_FIFO_SIZE ((unsigned)8) -+ -+struct udc_stats { -+ struct ep0stats { -+ unsigned long ops; -+ unsigned long bytes; -+ } read, write; -+ unsigned long irqs; -+}; -+ -+#ifdef CONFIG_USB_PXA27X_SMALL -+/* when memory's tight, SMALL config saves code+data. */ -+//#undef USE_DMA -+//#define UDC_EP_NUM 3 -+#endif -+ -+#ifndef UDC_EP_NUM -+#define UDC_EP_NUM 24 -+#endif -+ -+struct pxa27x_udc { -+ struct usb_gadget gadget; -+ struct usb_gadget_driver *driver; -+ -+ enum ep0_state ep0state; -+ struct udc_stats stats; -+ unsigned got_irq : 1, -+ got_disc : 1, -+ has_cfr : 1, -+ req_pending : 1, -+ req_std : 1, -+ req_config : 1; -+ -+#define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200)) -+ struct timer_list timer; -+ -+ struct device *dev; -+ struct pxa2xx_udc_mach_info *mach; -+ u64 dma_mask; -+ struct pxa27x_ep ep [UDC_EP_NUM]; -+ -+ unsigned configuration, -+ interface, -+ alternate; -+#ifdef CONFIG_PM -+ unsigned udccsr0; -+#endif -+}; -+ -+/*-------------------------------------------------------------------------*/ -+#if 0 -+#ifdef DEBUG -+#define HEX_DISPLAY(n) do { \ -+ if (machine_is_mainstone())\ -+ { MST_LEDDAT1 = (n); } \ -+ } while(0) -+ -+#define HEX_DISPLAY1(n) HEX_DISPLAY(n) -+ -+#define HEX_DISPLAY2(n) do { \ -+ if (machine_is_mainstone()) \ -+ { MST_LEDDAT2 = (n); } \ -+ } while(0) -+ -+#endif /* DEBUG */ -+#endif -+/*-------------------------------------------------------------------------*/ -+ -+/* LEDs are only for debug */ -+#ifndef HEX_DISPLAY -+#define HEX_DISPLAY(n) do {} while(0) -+#endif -+ -+#ifndef LED_CONNECTED_ON -+#define LED_CONNECTED_ON do {} while(0) -+#define LED_CONNECTED_OFF do {} while(0) -+#endif -+#ifndef LED_EP0_ON -+#define LED_EP0_ON do {} while (0) -+#define LED_EP0_OFF do {} while (0) -+#endif -+ -+static struct pxa27x_udc *the_controller; -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* one GPIO should be used to detect host disconnect */ -+static inline int is_usb_connected(void) -+{ -+ if (!the_controller->mach->udc_is_connected) -+ return 1; -+ return the_controller->mach->udc_is_connected(); -+} -+ -+/* one GPIO should force the host to see this device (or not) */ -+static inline void make_usb_disappear(void) -+{ -+ if (!the_controller->mach->udc_command) -+ return; -+ the_controller->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); -+} -+ -+static inline void let_usb_appear(void) -+{ -+ if (!the_controller->mach->udc_command) -+ return; -+ the_controller->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); -+} -+ -+/*-------------------------------------------------------------------------*/ -+ -+/* -+ * Debugging support vanishes in non-debug builds. DBG_NORMAL should be -+ * mostly silent during normal use/testing, with no timing side-effects. -+ */ -+#define DBG_NORMAL 1 /* error paths, device state transitions */ -+#define DBG_VERBOSE 2 /* add some success path trace info */ -+#define DBG_NOISY 3 /* ... even more: request level */ -+#define DBG_VERY_NOISY 4 /* ... even more: packet level */ -+ -+#ifdef DEBUG -+ -+static const char *state_name[] = { -+ "EP0_IDLE", -+ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", -+ "EP0_END_XFER", "EP0_STALL" -+}; -+ -+#define DMSG(stuff...) printk(KERN_ERR "udc: " stuff) -+ -+#ifdef VERBOSE -+# define UDC_DEBUG DBG_VERBOSE -+#else -+# define UDC_DEBUG DBG_NORMAL -+#endif -+ -+static void __attribute__ ((__unused__)) -+dump_udccr(const char *label) -+{ -+ u32 udccr = UDCCR; -+ DMSG("%s 0x%08x =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", -+ label, udccr, -+ (udccr & UDCCR_OEN) ? " oen":"", -+ (udccr & UDCCR_AALTHNP) ? " aalthnp":"", -+ (udccr & UDCCR_AHNP) ? " rem" : "", -+ (udccr & UDCCR_BHNP) ? " rstir" : "", -+ (udccr & UDCCR_DWRE) ? " dwre" : "", -+ (udccr & UDCCR_SMAC) ? " smac" : "", -+ (udccr & UDCCR_EMCE) ? " emce" : "", -+ (udccr & UDCCR_UDR) ? " udr" : "", -+ (udccr & UDCCR_UDA) ? " uda" : "", -+ (udccr & UDCCR_UDE) ? " ude" : "", -+ (udccr & UDCCR_ACN) >> UDCCR_ACN_S, -+ (udccr & UDCCR_AIN) >> UDCCR_AIN_S, -+ (udccr & UDCCR_AAISN)>> UDCCR_AAISN_S ); -+} -+ -+static void __attribute__ ((__unused__)) -+dump_udccsr0(const char *label) -+{ -+ u32 udccsr0 = UDCCSR0; -+ -+ DMSG("%s %s 0x%08x =%s%s%s%s%s%s%s\n", -+ label, state_name[the_controller->ep0state], udccsr0, -+ (udccsr0 & UDCCSR0_SA) ? " sa" : "", -+ (udccsr0 & UDCCSR0_RNE) ? " rne" : "", -+ (udccsr0 & UDCCSR0_FST) ? " fst" : "", -+ (udccsr0 & UDCCSR0_SST) ? " sst" : "", -+ (udccsr0 & UDCCSR0_DME) ? " dme" : "", -+ (udccsr0 & UDCCSR0_IPR) ? " ipr" : "", -+ (udccsr0 & UDCCSR0_OPC) ? " opr" : ""); -+} -+ -+static void __attribute__ ((__unused__)) -+dump_state(struct pxa27x_udc *dev) -+{ -+ unsigned i; -+ -+ DMSG("%s, udcicr %02X.%02X, udcsir %02X.%02x, udcfnr %02X\n", -+ state_name[dev->ep0state], -+ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR); -+ dump_udccr("udccr"); -+ -+ if (!dev->driver) { -+ DMSG("no gadget driver bound\n"); -+ return; -+ } else -+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name); -+ -+ -+ dump_udccsr0 ("udccsr0"); -+ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n", -+ dev->stats.write.bytes, dev->stats.write.ops, -+ dev->stats.read.bytes, dev->stats.read.ops); -+ -+ for (i = 1; i < UDC_EP_NUM; i++) { -+ if (dev->ep [i].desc == 0) -+ continue; -+ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccsr); -+ } -+} -+ -+#if 0 -+static void dump_regs(u8 ep) -+{ -+ DMSG("EP:%d UDCCSR:0x%08x UDCBCR:0x%08x\n UDCCR:0x%08x\n", -+ ep,UDCCSN(ep), UDCBCN(ep), UDCCN(ep)); -+} -+static void dump_req (struct pxa27x_request *req) -+{ -+ struct usb_request *r = &req->req; -+ -+ DMSG("%s: buf:0x%08x length:%d dma:0x%08x actual:%d\n", -+ __FUNCTION__, (unsigned)r->buf, r->length, -+ r->dma, r->actual); -+} -+#endif -+ -+#else -+ -+#define DMSG(stuff...) do{}while(0) -+ -+#define dump_udccr(x) do{}while(0) -+#define dump_udccsr0(x) do{}while(0) -+#define dump_state(x) do{}while(0) -+ -+#define UDC_DEBUG ((unsigned)0) -+ -+#endif -+ -+#define DBG(lvl, stuff...) do{if ((lvl) <= UDC_DEBUG) DMSG(stuff);}while(0) -+ -+#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff) -+#define INFO(stuff...) printk(KERN_INFO "udc: " stuff) -+ -+ -+#endif /* __LINUX_USB_GADGET_PXA27X_H */ -diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c -index e552668..971e491 100644 ---- a/drivers/usb/gadget/serial.c -+++ b/drivers/usb/gadget/serial.c -@@ -1378,20 +1378,20 @@ static int __init gs_bind(struct usb_gadget *gadget) - - usb_ep_autoconfig_reset(gadget); - -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc); -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc); -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - EP_OUT_NAME = ep->name; - ep->driver_data = ep; /* claim the endpoint */ - - if (use_acm) { -- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc); -+ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc, 0, 0, 0); - if (!ep) { - printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name); - goto autoconf_fail; -diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c -index 8c85e33..46ffe6c 100644 ---- a/drivers/usb/gadget/zero.c -+++ b/drivers/usb/gadget/zero.c -@@ -1155,7 +1155,7 @@ zero_bind (struct usb_gadget *gadget) - * but there may also be important quirks to address. - */ - usb_ep_autoconfig_reset (gadget); -- ep = usb_ep_autoconfig (gadget, &fs_source_desc); -+ ep = usb_ep_autoconfig (gadget, &fs_source_desc, 0, 0, 0); - if (!ep) { - autoconf_fail: - printk (KERN_ERR "%s: can't autoconfigure on %s\n", -@@ -1165,7 +1165,7 @@ autoconf_fail: - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim */ - -- ep = usb_ep_autoconfig (gadget, &fs_sink_desc); -+ ep = usb_ep_autoconfig (gadget, &fs_sink_desc, 0, 0, 0); - if (!ep) - goto autoconf_fail; - EP_OUT_NAME = ep->name; -diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h -index e17186d..64c81fd 100644 ---- a/include/linux/usb_gadget.h -+++ b/include/linux/usb_gadget.h -@@ -445,10 +445,28 @@ usb_ep_fifo_flush (struct usb_ep *ep) - - struct usb_gadget; - -+/** -+ * struct usb_endpoint_config - possible configurations of a given endpoint -+ * @config: the configuration number -+ * @interface: the interface number -+ * @altinterface: the altinterface number -+ * -+ * Used as an array to pass information about the possible configurations -+ * of a given endpoint to the bus controller. -+ */ -+struct usb_endpoint_config { -+ int config; -+ int interface; -+ int altinterface; -+}; -+ - /* the rest of the api to the controller hardware: device operations, - * which don't involve endpoints (or i/o). - */ - struct usb_gadget_ops { -+ struct usb_ep* (*ep_alloc)(struct usb_gadget *gadget, -+ struct usb_endpoint_descriptor *desc, -+ int config, int interface, int alt); - int (*get_frame)(struct usb_gadget *); - int (*wakeup)(struct usb_gadget *); - int (*set_selfpowered) (struct usb_gadget *, int is_selfpowered); -@@ -872,7 +890,8 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config, - /* utility wrapping a simple endpoint selection policy */ - - extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, -- struct usb_endpoint_descriptor *) __devinit; -+ struct usb_endpoint_descriptor *, -+ int, int, int) __devinit; - - extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit; - diff --git a/packages/linux/linux-ezx-2.6.21/touchscreen-fix-r0.patch b/packages/linux/linux-ezx-2.6.21/touchscreen-fix-r0.patch deleted file mode 100644 index 9f4ce980ad..0000000000 --- a/packages/linux/linux-ezx-2.6.21/touchscreen-fix-r0.patch +++ /dev/null @@ -1,21 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: linux-2.6.21/drivers/input/touchscreen/pcap_ts.c -=================================================================== ---- linux-2.6.21.orig/drivers/input/touchscreen/pcap_ts.c 2007-04-30 21:55:41.000000000 +0200 -+++ linux-2.6.21/drivers/input/touchscreen/pcap_ts.c 2007-04-30 21:55:41.000000000 +0200 -@@ -128,10 +128,7 @@ - if (ret < 0) - return ret; - -- if (tmp & 0x00400000) -- return -EIO; -- -- if (pcap_ts->read_state == COORDINATE) { -+ if (pcap_ts->read_state == COORDINATE && !(tmp & 0x00400000)) { - pcap_ts->x = (tmp & SSP_PCAP_ADD1_VALUE_MASK); - pcap_ts->y = (tmp & SSP_PCAP_ADD2_VALUE_MASK) - >>SSP_PCAP_ADD2_VALUE_SHIFT; diff --git a/packages/linux/linux-ezx-2.6.21/update_patches.sh b/packages/linux/linux-ezx-2.6.21/update_patches.sh new file mode 100644 index 0000000000..d63a1e8e7d --- /dev/null +++ b/packages/linux/linux-ezx-2.6.21/update_patches.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# Helper script to update patches and speedup filling the SRC_URI section of our .bb +# Run it while in packages/linux/linux-ezx-2.6.x/ + +[ -d patches ] && mtn drop -R patches +rm -rf patches + +svn --quiet co http://svn.openezx.org/trunk/src/kernel-2.6/patches/ patches +find patches -type f -print0 +mtn add patches patches/* + +cat patches/series | grep ^[0-9A-Za-z] | sed -e 's/.*/\tfile:\/\/patches\/\0;patch=1 \\/' +ls -1 patches/defconfig-* | sed -e 's/.*/\tfile:\/\/\0 \\/' + diff --git a/packages/linux/linux-ezx-2.6.21/wyrm-ts.diff b/packages/linux/linux-ezx-2.6.21/wyrm-ts.diff deleted file mode 100644 index 6e424c626c..0000000000 --- a/packages/linux/linux-ezx-2.6.21/wyrm-ts.diff +++ /dev/null @@ -1,124 +0,0 @@ -Ignores read interrupts after penUP events until a penDOWN interrupt arrives. -Some other changes i dont remember exactly. :) -Signed-off-by: Daniel Ribeiro -Index: linux-2.6.16/drivers/input/touchscreen/pcap_ts.c -=================================================================== ---- linux-2.6.16.orig/drivers/input/touchscreen/pcap_ts.c 2007-03-09 21:26:25.000000000 -0300 -+++ linux-2.6.16/drivers/input/touchscreen/pcap_ts.c 2007-03-09 21:26:42.000000000 -0300 -@@ -31,7 +31,7 @@ - - #include "../../misc/ezx/ssp_pcap.h" - --#if 1 -+#if 0 - #define DEBUGP(x, args ...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ## args) - #else - #define DEBUGP(x, args ...) -@@ -39,6 +39,7 @@ - - #define PRESSURE 1 - #define COORDINATE 2 -+#define STANDBY 3 - - struct pcap_ts { - int irq_xy; -@@ -97,7 +98,7 @@ - int ret; - u_int32_t tmp; - DEBUGP("start xy read in mode %s\n", -- pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ pcap_ts->read_state == COORDINATE ? "COORD" : (pcap_ts->read_state == PRESSURE ? "PRESS" : "STANDBY")); - - ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); - if (ret < 0) -@@ -122,7 +123,7 @@ - u_int32_t tmp; - - DEBUGP("get xy value in mode %s\n", -- pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ pcap_ts->read_state == COORDINATE ? "COORD" : (pcap_ts->read_state == PRESSURE ? "PRESS" : "STANDBY")); - - ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp); - if (ret < 0) -@@ -145,7 +146,16 @@ - static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id, struct pt_regs *regs) - { - struct pcap_ts *pcap_ts = dev_id; -+// DEBUGP("read_state: %d\n", pcap_ts->read_state); - -+ /* -+ * Ignore further read interrupts after we set STANDBY - WM -+ */ -+ if (pcap_ts->read_state == STANDBY) -+ { -+ DEBUGP("ignored\n"); -+ return IRQ_HANDLED; -+ } - if (pcap_ts_get_xy_value(pcap_ts) < 0) { - printk("pcap_ts: error reading XY value\n"); - return IRQ_HANDLED; -@@ -160,33 +170,32 @@ - pcap_ts->pressure <= PRESSURE_MIN ) && - pcap_ts->pressure == pcap_ts->pressure_last) { - /* pen has been released */ -+ DEBUGP("UP\n"); - input_report_key(pcap_ts->input, BTN_TOUCH, 0); -- input_sync(pcap_ts->input); -- - input_report_abs(pcap_ts->input, ABS_PRESSURE, 0); -+ input_sync(pcap_ts->input); - - pcap_ts->x = pcap_ts->y = 0; - -+ /* no need for timer, we'll get interrupted with -+ * next touch down event */ -+ del_timer(&pcap_ts->timer); -+ - /* ask PCAP2 to interrupt us if touch event happens - * again */ -- pcap_ts->read_state = PRESSURE; -+ pcap_ts->read_state = STANDBY; - pcap_ts_mode(PCAP_TS_STANDBY_MODE); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -- -- /* no need for timer, we'll get interrupted with -- * next touch down event */ -- del_timer(&pcap_ts->timer); - } else { - /* pen has been touched down */ -+ DEBUGP("DOWN\n"); -+ - input_report_key(pcap_ts->input, BTN_TOUCH, 1); - /* don't input_sync(), we don't know position yet */ - - if (pcap_ts->pressure == 0) - pcap_ts->pressure = pcap_ts->pressure_last; - -- input_report_abs(pcap_ts->input, ABS_PRESSURE, -- pcap_ts->pressure); -- - /* switch state machine into coordinate read mode */ - pcap_ts->read_state = COORDINATE; - pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); -@@ -196,18 +205,14 @@ - /* we are in coordinate mode */ - if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || - pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { -- DEBUGP("invalid x/y coordinate position: PEN_UP?\n"); -- -+ DEBUGP("PEN_UP?\n"); - pcap_ts->pressure = 0; --#if 0 -- input_report_key(pcap_ts->input, BTN_TOUCH, 0); -- pcap_ts->x = pcap_ts->y = 0; --#endif - } else { -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, pcap_ts->pressure); - input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x); - input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y); -+ input_sync(pcap_ts->input); - } -- input_sync(pcap_ts->input); - - /* switch back to pressure read mode */ - pcap_ts->read_state = PRESSURE; diff --git a/packages/linux/linux-ezx/.mtn2git_empty b/packages/linux/linux-ezx/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/linux/linux-ezx/defconfig-a780 b/packages/linux/linux-ezx/defconfig-a780 deleted file mode 100644 index 313540dc4c..0000000000 --- a/packages/linux/linux-ezx/defconfig-a780 +++ /dev/null @@ -1,1317 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.13 -# Sun Jan 21 10:52:04 2007 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -# CONFIG_LOCALVERSION is not set -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_SHMEM is not set -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" - -# -# 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_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=y -# 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_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set -CONFIG_PXA_EZX=y - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_PXA_EZX_E680 is not set -CONFIG_PXA_EZX_A780=y -CONFIG_PXA27x=y -CONFIG_IWMMXT=y -CONFIG_PXA_SPI=y -CONFIG_PXA_EZX_PCAP=y -CONFIG_PXA_EZX_PCAP_EMU=m -CONFIG_PXA_EZX_PCAP_EMU_USB=y -# CONFIG_PXA_EZX_PCAP_EMU_UART is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS2,115200n8 console=tty1 noinitrd root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off debug mem=32M@0xA0000000 mem=16M@0xAC000000" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# 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=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -# CONFIG_IP_NF_TARGET_ECN is not set -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=3 -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -CONFIG_MTD_MAP_BANK_WIDTH_2=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# 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 is not set -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_SHARP_SL is not set -CONFIG_MTD_PXA27x=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# 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=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -# CONFIG_MTD_DOCPROBE_ADVANCED is not set -CONFIG_MTD_DOCPROBE_ADDRESS=0 - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_H1900 is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x0 -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH is not set -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -# CONFIG_MTD_NAND_SHARPSL is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_ARCH_EZX_ROFLASH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# 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=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_PXA=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_PCAP=y -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_LIBPS2 is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT 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_PXA=y -CONFIG_SERIAL_PXA_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_SA1100_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_LINUX_LED is not set -# CONFIG_BULVERDE_SRAM_DEV is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_TS0710_MUX=y -CONFIG_TS0710_MUX_USB=y - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_PXA=y -CONFIG_I2C_PXA_SLAVE=y -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_ADCM2700 is not set -# CONFIG_I2C_A780_CAMERA is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Motorola EZX devices -# -CONFIG_KEYPAD_A780=y -# CONFIG_KEYPAD_E680 is not set -CONFIG_KEYLIGHT_A780=y -CONFIG_VIBRATOR_A780=y -# CONFIG_FMRADIO_E680 is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_A780=y -CONFIG_LEDS_TRIGGER_TIMER=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 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=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y -# CONFIG_BACKLIGHT_HP680 is not set -CONFIG_BACKLIGHT_EZX=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y -# CONFIG_USB_PXA27X_DMA is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=m -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_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=m -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_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -CONFIG_CONFIGFS_FS=m - -# -# 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 is not set -CONFIG_CRAMFS=m -# 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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# 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 -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -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 - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m - -# -# Dynamic Power Management -# -# CONFIG_DPM is not set diff --git a/packages/linux/linux-ezx/defconfig-a780-laforge b/packages/linux/linux-ezx/defconfig-a780-laforge deleted file mode 100644 index 560530a1ce..0000000000 --- a/packages/linux/linux-ezx/defconfig-a780-laforge +++ /dev/null @@ -1,1298 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.13 -# Thu May 18 19:40:25 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-ezx6" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_SHMEM is not set -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" - -# -# 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_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=y -# 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_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set -CONFIG_PXA_EZX=y - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_PXA_EZX_E680 is not set -CONFIG_PXA_EZX_A780=y -CONFIG_PXA27x=y -CONFIG_IWMMXT=y -CONFIG_PXA_SPI=y -CONFIG_PXA_EZX_PCAP=y -CONFIG_PXA_EZX_PCAP_EMU=m - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=1 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off console=ttyS2,115200n8 console=tty0" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=m -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# 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=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -# CONFIG_IP_NF_TARGET_ECN is not set -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=3 -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -CONFIG_MTD_MAP_BANK_WIDTH_2=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# 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 is not set -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_SHARP_SL is not set -CONFIG_MTD_PXA27x=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# 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=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -# CONFIG_MTD_DOCPROBE_ADVANCED is not set -CONFIG_MTD_DOCPROBE_ADDRESS=0 - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_H1900 is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x0 -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH is not set -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -# CONFIG_MTD_NAND_SHARPSL is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_ARCH_EZX_ROFLASH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# 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=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_PXA=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_PCAP=m -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_LIBPS2 is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT 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_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -CONFIG_SA1100_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_LINUX_LED is not set -# CONFIG_BULVERDE_SRAM_DEV is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_PXA=y -CONFIG_I2C_PXA_SLAVE=y -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_ADCM2700 is not set -# CONFIG_I2C_A780_CAMERA is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Motorola EZX devices -# -# CONFIG_KEYPAD_A780 is not set -# CONFIG_KEYPAD_E680 is not set -# CONFIG_KEYLIGHT_A780 is not set -# CONFIG_FMRADIO_E680 is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y -# CONFIG_USB_PXA27X_DMA is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=m -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_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=m -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_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -CONFIG_CONFIGFS_FS=m - -# -# 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 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=m -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -# 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 -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -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 - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m - -# -# Dynamic Power Management -# -# CONFIG_DPM is not set diff --git a/packages/linux/linux-ezx/defconfig-e680 b/packages/linux/linux-ezx/defconfig-e680 deleted file mode 100644 index ef5fef395f..0000000000 --- a/packages/linux/linux-ezx/defconfig-e680 +++ /dev/null @@ -1,1314 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16.13 -# Thu May 18 19:40:25 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="-ezx6" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_SHMEM is not set -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" - -# -# 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_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=y -# 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_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set -CONFIG_PXA_EZX=y - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -CONFIG_PXA_EZX_E680=y -# CONFIG_PXA_EZX_A780 is not set -CONFIG_PXA27x=y -CONFIG_IWMMXT=y -CONFIG_PXA_SPI=y -CONFIG_PXA_EZX_PCAP=y -CONFIG_PXA_EZX_PCAP_EMU=m - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=1 ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off console=ttyS2,115200n8 console=tty0" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# 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=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -# CONFIG_IP_NF_TARGET_ECN is not set -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC 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=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=3 -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -CONFIG_MTD_MAP_BANK_WIDTH_2=y -# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set -# 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 is not set -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=m -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=m -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -CONFIG_MTD_XIP=y - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_SHARP_SL is not set -CONFIG_MTD_PXA27x=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# 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=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -# CONFIG_MTD_DOCPROBE_ADVANCED is not set -CONFIG_MTD_DOCPROBE_ADDRESS=0 - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_H1900 is not set -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x0 -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH is not set -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -# CONFIG_MTD_NAND_SHARPSL is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_RAM_COUNT=16 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_ARCH_EZX_ROFLASH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# 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=m -CONFIG_PPP_MULTILINK=y -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# 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=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ATKBD is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_PXA=y -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_PCAP=y -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_LIBPS2 is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT 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_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_LEGACY_PTY_COUNT is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -CONFIG_SA1100_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_LINUX_LED is not set -# CONFIG_BULVERDE_SRAM_DEV is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# 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_PXA=y -CONFIG_I2C_PXA_SLAVE=y -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_ADCM2700 is not set -# CONFIG_I2C_A780_CAMERA is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Motorola EZX devices -# -# CONFIG_KEYPAD_A780 is not set -# CONFIG_KEYPAD_E680 is not set -# CONFIG_KEYLIGHT_A780 is not set -# CONFIG_FMRADIO_E680 is not set - -# -# Multimedia Capabilities Port drivers -# - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_E680=y -# CONFIG_LEDS_A780 is not set -CONFIG_LEDS_TRIGGER_TIMER=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_MINI_4x6=y -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 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=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_BACKLIGHT_EZX=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y -# CONFIG_USB_PXA27X_DMA is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -# CONFIG_USB_ETH_RNDIS is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -CONFIG_ROMFS_FS=m -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_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=m -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_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -CONFIG_CONFIGFS_FS=m - -# -# 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 is not set -CONFIG_CRAMFS=m -# 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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# 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 -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -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 - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m - -# -# Dynamic Power Management -# -# CONFIG_DPM is not set diff --git a/packages/linux/linux-ezx/defconfig-rokr-e2 b/packages/linux/linux-ezx/defconfig-rokr-e2 deleted file mode 100644 index 6345a77a34..0000000000 --- a/packages/linux/linux-ezx/defconfig-rokr-e2 +++ /dev/null @@ -1,904 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.19.1 -# Thu Jan 4 18:45:14 2007 -# -CONFIG_ARM=y -# CONFIG_GENERIC_TIME is not set -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# 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_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set -CONFIG_ARCH_PXA=y -# 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 - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAINSTONE is not set -CONFIG_ARCH_EZX=y -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_MACH_TRIZEPS4 is not set -CONFIG_ARCH_EZX_SUMATRA=y -# CONFIG_ARCH_EZX_A780 is not set -CONFIG_PXA27x=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_DCACHE_DISABLE is not set -CONFIG_IWMMXT=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=tty0 video=pxafb:mode:240x320-8,active root=/dev/mmcblk0p1 rootdelay=1" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -# CONFIG_FPE_NWFPE is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -# CONFIG_PM_LEGACY is not set -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -# CONFIG_PACKET is not set -# CONFIG_UNIX is not set -# CONFIG_NET_KEY is not set -# CONFIG_INET is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER 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_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_PARTITIONS is not set - -# -# User Modules And Translation Layers -# -# CONFIG_MTD_CHAR is not set -# CONFIG_MTD_BLOCK is not set -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC 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_OBSOLETE_CHIPS is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_SHARP_SL is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM 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 - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_NETLINK is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -# CONFIG_NETDEVICES is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# 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 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 - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_PXA is not set -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_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set - -# -# 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_PXA is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_BITBANG is not set -CONFIG_SPI_PXA2XX=y - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# -# CONFIG_TIFM_CORE is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -CONFIG_FB_PXA_PARAMETERS=y -# CONFIG_FB_MBX is not set -# 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_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -CONFIG_FONT_6x11=y -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_DEVICE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# HID Devices -# -# CONFIG_HID is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -CONFIG_USB_GADGET_PXA2XX=y -CONFIG_USB_PXA2XX=y -# CONFIG_USB_PXA2XX_SMALL is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y -# CONFIG_MMC_TIFM_SD is not set - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_SA1100=y -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_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_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# 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_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# 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 -# - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf-8" -CONFIG_NLS_CODEPAGE_437=y -# 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=y - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -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 is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y -CONFIG_IOMAP_COPY=y diff --git a/packages/linux/linux-ezx/logo_linux_clut224.ppm b/packages/linux/linux-ezx/logo_linux_clut224.ppm deleted file mode 100644 index 32fbeb9fc6..0000000000 --- a/packages/linux/linux-ezx/logo_linux_clut224.ppm +++ /dev/null @@ -1,226084 +0,0 @@ -P3 -# CREATOR: The GIMP's PNM Filter Version 1.1 -240 314 -255 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -19 -19 -20 -40 -39 -39 -89 -86 -86 -102 -100 -100 -102 -100 -100 -126 -126 -126 -178 -178 -178 -212 -212 -212 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -205 -205 -205 -169 -169 -169 -157 -157 -157 -106 -104 -104 -70 -69 -69 -59 -59 -59 -33 -32 -32 -19 -19 -20 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -64 -71 -75 -0 -0 -0 -0 -0 -0 -42 -44 -45 -168 -185 -196 -0 -0 -0 -0 -0 -0 -8 -8 -8 -89 -93 -96 -121 -133 -141 -105 -116 -123 -27 -29 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -89 -93 -96 -121 -133 -141 -105 -116 -123 -27 -29 -31 -0 -0 -0 -64 -71 -75 -168 -185 -196 -113 -125 -132 -99 -110 -116 -43 -47 -50 -0 -0 -0 -90 -99 -105 -20 -21 -21 -0 -0 -0 -90 -99 -105 -33 -37 -39 -99 -110 -116 -121 -133 -141 -69 -73 -75 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -14 -99 -110 -116 -121 -133 -141 -76 -85 -89 -56 -59 -62 -56 -59 -62 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -90 -99 -105 -35 -38 -40 -105 -116 -123 -121 -133 -141 -64 -71 -75 -0 -0 -0 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -3 -3 -3 -76 -85 -89 -121 -133 -141 -113 -125 -132 -43 -47 -50 -0 -0 -0 -0 -0 -0 -56 -59 -62 -113 -125 -132 -121 -133 -141 -99 -110 -116 -20 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -54 -57 -113 -125 -132 -121 -133 -141 -105 -116 -123 -23 -25 -27 -0 -0 -0 -3 -3 -3 -76 -85 -89 -121 -133 -141 -113 -125 -132 -43 -47 -50 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -47 -50 -64 -71 -75 -0 -0 -0 -0 -0 -0 -76 -85 -89 -64 -71 -75 -0 -0 -0 -0 -0 -0 -89 -93 -96 -23 -25 -27 -0 -0 -0 -56 -59 -62 -113 -125 -132 -121 -133 -141 -99 -110 -116 -20 -21 -21 -0 -0 -0 -0 -0 -0 -90 -99 -105 -20 -21 -21 -0 -0 -0 -64 -71 -75 -168 -185 -196 -113 -125 -132 -99 -110 -116 -43 -47 -50 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -25 -24 -24 -70 -69 -69 -119 -119 -119 -173 -173 -173 -192 -192 -192 -240 -240 -240 -252 -252 -252 -252 -252 -252 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -222 -222 -222 -212 -212 -212 -186 -186 -186 -171 -171 -171 -148 -148 -148 -102 -100 -100 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -76 -85 -89 -26 -26 -26 -33 -37 -39 -113 -125 -132 -121 -133 -141 -0 -0 -0 -0 -0 -0 -132 -145 -153 -121 -133 -141 -42 -44 -45 -76 -85 -89 -168 -185 -196 -22 -23 -24 -0 -0 -0 -0 -0 -0 -132 -145 -153 -121 -133 -141 -42 -44 -45 -76 -85 -89 -168 -185 -196 -22 -23 -24 -33 -37 -39 -158 -175 -184 -76 -85 -89 -49 -54 -57 -22 -23 -24 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -143 -149 -153 -56 -59 -62 -62 -65 -67 -158 -175 -184 -49 -54 -57 -0 -0 -0 -0 -0 -0 -143 -149 -153 -113 -125 -132 -42 -44 -45 -89 -93 -96 -158 -175 -184 -98 -103 -106 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -146 -161 -170 -56 -59 -62 -49 -54 -57 -153 -169 -179 -64 -71 -75 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -113 -125 -132 -121 -133 -141 -43 -47 -50 -56 -59 -62 -158 -175 -184 -42 -44 -45 -0 -0 -0 -76 -85 -89 -49 -54 -57 -42 -44 -45 -90 -99 -105 -153 -169 -179 -2 -2 -2 -0 -0 -0 -27 -29 -31 -168 -185 -196 -62 -65 -67 -35 -38 -40 -64 -71 -75 -33 -37 -39 -0 -0 -0 -113 -125 -132 -121 -133 -141 -43 -47 -50 -56 -59 -62 -158 -175 -184 -42 -44 -45 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -44 -45 -153 -169 -179 -0 -0 -0 -6 -7 -7 -168 -185 -196 -146 -161 -170 -0 -0 -0 -11 -10 -11 -168 -185 -196 -10 -10 -10 -0 -0 -0 -76 -85 -89 -49 -54 -57 -42 -44 -45 -90 -99 -105 -153 -169 -179 -2 -2 -2 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -33 -37 -39 -158 -175 -184 -76 -85 -89 -49 -54 -57 -22 -23 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -33 -32 -32 -89 -86 -86 -171 -171 -171 -212 -212 -212 -228 -228 -228 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -239 -239 -239 -221 -221 -221 -113 -113 -113 -53 -53 -53 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -158 -175 -184 -146 -161 -170 -146 -161 -170 -158 -175 -184 -49 -54 -57 -0 -0 -0 -33 -37 -39 -168 -185 -196 -8 -8 -8 -0 -0 -0 -0 -0 -0 -121 -133 -141 -90 -99 -105 -0 -0 -0 -33 -37 -39 -168 -185 -196 -8 -8 -8 -0 -0 -0 -0 -0 -0 -121 -133 -141 -90 -99 -105 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -56 -59 -62 -0 -0 -0 -0 -0 -0 -99 -110 -116 -99 -110 -116 -0 -0 -0 -35 -38 -40 -168 -185 -196 -4 -4 -4 -0 -0 -0 -0 -0 -0 -132 -145 -153 -98 -103 -106 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -64 -71 -75 -0 -0 -0 -0 -0 -0 -64 -71 -75 -146 -161 -170 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -27 -29 -31 -168 -185 -196 -7 -8 -8 -0 -0 -0 -0 -0 -0 -76 -85 -89 -113 -125 -132 -0 -0 -0 -0 -0 -0 -6 -6 -6 -23 -25 -27 -26 -26 -26 -153 -169 -179 -33 -37 -39 -0 -0 -0 -43 -47 -50 -153 -169 -179 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -29 -31 -168 -185 -196 -7 -8 -8 -0 -0 -0 -0 -0 -0 -76 -85 -89 -113 -125 -132 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -168 -185 -196 -22 -23 -24 -49 -54 -57 -121 -133 -141 -153 -169 -179 -16 -18 -19 -56 -59 -62 -132 -145 -153 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -23 -25 -27 -26 -26 -26 -153 -169 -179 -33 -37 -39 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -12 -12 -12 -32 -31 -31 -70 -69 -69 -183 -183 -183 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -228 -228 -228 -113 -113 -113 -46 -44 -44 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -64 -71 -75 -0 -0 -0 -0 -0 -0 -33 -37 -39 -168 -185 -196 -26 -26 -26 -62 -65 -67 -146 -161 -170 -0 -0 -0 -0 -0 -0 -0 -0 -0 -89 -93 -96 -121 -133 -141 -0 -0 -0 -62 -65 -67 -146 -161 -170 -0 -0 -0 -0 -0 -0 -0 -0 -0 -89 -93 -96 -121 -133 -141 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -31 -34 -36 -0 -0 -0 -0 -0 -0 -89 -93 -96 -105 -116 -123 -0 -0 -0 -62 -65 -67 -146 -161 -170 -0 -0 -0 -0 -0 -0 -0 -0 -0 -99 -110 -116 -98 -103 -106 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -59 -62 -132 -145 -153 -132 -145 -153 -99 -110 -116 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -33 -37 -39 -0 -0 -0 -0 -0 -0 -31 -34 -36 -168 -185 -196 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -56 -59 -62 -168 -185 -196 -146 -161 -170 -146 -161 -170 -146 -161 -170 -158 -175 -184 -121 -133 -141 -0 -0 -0 -99 -110 -116 -158 -175 -184 -132 -145 -153 -121 -133 -141 -168 -185 -196 -49 -54 -57 -0 -0 -0 -1 -2 -2 -113 -125 -132 -168 -185 -196 -132 -145 -153 -76 -85 -89 -4 -5 -5 -56 -59 -62 -168 -185 -196 -146 -161 -170 -146 -161 -170 -146 -161 -170 -158 -175 -184 -121 -133 -141 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -121 -133 -141 -69 -73 -75 -98 -103 -106 -76 -85 -89 -105 -116 -123 -64 -71 -75 -99 -110 -116 -90 -99 -105 -0 -0 -0 -0 -0 -0 -99 -110 -116 -158 -175 -184 -132 -145 -153 -121 -133 -141 -168 -185 -196 -49 -54 -57 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -53 -53 -53 -128 -128 -128 -194 -194 -194 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -143 -143 -143 -46 -44 -44 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -64 -71 -75 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -64 -71 -75 -49 -54 -57 -153 -169 -179 -0 -0 -0 -0 -0 -0 -0 -0 -0 -98 -103 -106 -105 -116 -123 -0 -0 -0 -49 -54 -57 -153 -169 -179 -0 -0 -0 -0 -0 -0 -0 -0 -0 -98 -103 -106 -105 -116 -123 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -31 -34 -36 -0 -0 -0 -0 -0 -0 -89 -93 -96 -105 -116 -123 -0 -0 -0 -49 -49 -49 -153 -169 -179 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -125 -132 -98 -103 -106 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -14 -33 -37 -39 -33 -37 -39 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -43 -47 -50 -0 -0 -0 -0 -0 -0 -43 -47 -50 -158 -175 -184 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -49 -54 -57 -153 -169 -179 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -37 -39 -158 -175 -184 -6 -7 -7 -0 -0 -0 -0 -0 -0 -153 -169 -179 -49 -54 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -9 -10 -49 -54 -57 -146 -161 -170 -90 -99 -105 -49 -54 -57 -153 -169 -179 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -85 -89 -113 -125 -132 -143 -149 -153 -27 -29 -31 -62 -65 -67 -105 -116 -123 -146 -161 -170 -43 -47 -50 -0 -0 -0 -33 -37 -39 -158 -175 -184 -6 -7 -7 -0 -0 -0 -0 -0 -0 -153 -169 -179 -49 -54 -57 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -0 -0 -0 -158 -175 -184 -35 -38 -40 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -106 -104 -104 -198 -198 -198 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -205 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -198 -198 -198 -122 -119 -119 -65 -65 -65 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -64 -71 -75 -0 -0 -0 -1 -1 -1 -56 -59 -62 -168 -185 -196 -33 -37 -39 -8 -9 -10 -168 -185 -196 -49 -54 -57 -0 -0 -0 -13 -13 -14 -158 -175 -184 -62 -65 -67 -0 -0 -0 -8 -9 -10 -168 -185 -196 -49 -54 -57 -0 -0 -0 -13 -13 -14 -158 -175 -184 -62 -65 -67 -0 -0 -0 -146 -161 -170 -56 -59 -62 -0 -0 -0 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -31 -34 -36 -0 -0 -0 -0 -0 -0 -89 -93 -96 -105 -116 -123 -0 -0 -0 -6 -6 -6 -158 -175 -184 -64 -71 -75 -0 -0 -0 -33 -37 -39 -168 -185 -196 -98 -103 -106 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -113 -125 -132 -0 -0 -0 -0 -0 -0 -113 -125 -132 -105 -116 -123 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -6 -7 -7 -158 -175 -184 -64 -71 -75 -0 -0 -0 -0 -0 -0 -4 -4 -4 -22 -23 -24 -42 -44 -45 -158 -175 -184 -6 -6 -6 -0 -0 -0 -56 -59 -62 -168 -185 -196 -49 -54 -57 -0 -0 -0 -16 -18 -19 -8 -8 -8 -0 -0 -0 -0 -0 -0 -99 -110 -116 -105 -116 -123 -6 -7 -7 -158 -175 -184 -64 -71 -75 -0 -0 -0 -0 -0 -0 -4 -4 -4 -22 -23 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -31 -34 -36 -168 -185 -196 -153 -169 -179 -0 -0 -0 -13 -13 -14 -158 -175 -184 -168 -185 -196 -4 -5 -5 -0 -0 -0 -42 -44 -45 -158 -175 -184 -6 -6 -6 -0 -0 -0 -56 -59 -62 -168 -185 -196 -49 -54 -57 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -0 -0 -0 -146 -161 -170 -56 -59 -62 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -64 -71 -75 -43 -47 -50 -0 -0 -0 -0 -0 -0 -64 -71 -75 -43 -47 -50 -0 -0 -0 -0 -0 -0 -64 -71 -75 -43 -47 -50 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -89 -86 -86 -165 -165 -165 -237 -237 -237 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -165 -165 -165 -143 -143 -143 -138 -134 -134 -76 -76 -76 -63 -63 -63 -53 -53 -53 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -35 -59 -59 -59 -70 -69 -69 -116 -116 -116 -204 -204 -204 -224 -224 -224 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -218 -218 -218 -116 -116 -116 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -146 -161 -170 -168 -185 -196 -168 -185 -196 -168 -185 -196 -153 -169 -179 -69 -73 -75 -0 -0 -0 -0 -0 -0 -56 -59 -62 -158 -175 -184 -143 -149 -153 -158 -175 -184 -99 -110 -116 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -59 -62 -158 -175 -184 -143 -149 -153 -158 -175 -184 -99 -110 -116 -0 -0 -0 -0 -0 -0 -64 -71 -75 -158 -175 -184 -158 -175 -184 -69 -73 -75 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -158 -175 -184 -31 -34 -36 -0 -0 -0 -0 -0 -0 -89 -93 -96 -105 -116 -123 -0 -0 -0 -0 -0 -0 -42 -44 -45 -146 -161 -170 -158 -175 -184 -121 -133 -141 -113 -125 -132 -90 -99 -105 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -175 -184 -105 -116 -123 -146 -161 -170 -146 -161 -170 -146 -161 -170 -16 -18 -19 -0 -0 -0 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -41 -41 -42 -146 -161 -170 -146 -161 -170 -143 -149 -153 -158 -175 -184 -69 -73 -75 -1 -2 -2 -121 -133 -141 -158 -175 -184 -143 -149 -153 -121 -133 -141 -146 -161 -170 -49 -54 -57 -0 -0 -0 -49 -54 -57 -168 -185 -196 -143 -149 -153 -146 -161 -170 -153 -169 -179 -27 -29 -31 -0 -0 -0 -41 -41 -42 -146 -161 -170 -146 -161 -170 -143 -149 -153 -158 -175 -184 -69 -73 -75 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -158 -175 -184 -113 -125 -132 -0 -0 -0 -0 -0 -0 -146 -161 -170 -132 -145 -153 -0 -0 -0 -0 -0 -0 -1 -2 -2 -121 -133 -141 -158 -175 -184 -143 -149 -153 -121 -133 -141 -146 -161 -170 -49 -54 -57 -0 -0 -0 -153 -169 -179 -35 -38 -40 -0 -0 -0 -0 -0 -0 -64 -71 -75 -158 -175 -184 -158 -175 -184 -69 -73 -75 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -132 -145 -153 -90 -99 -105 -0 -0 -0 -0 -0 -0 -132 -145 -153 -90 -99 -105 -0 -0 -0 -0 -0 -0 -132 -145 -153 -90 -99 -105 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -70 -69 -69 -194 -194 -194 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -246 -246 -246 -233 -233 -233 -210 -210 -210 -169 -169 -169 -102 -100 -100 -53 -53 -53 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -25 -24 -24 -49 -49 -49 -53 -53 -53 -143 -143 -143 -209 -209 -209 -237 -237 -237 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -190 -190 -190 -65 -65 -65 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -27 -29 -31 -13 -13 -14 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -27 -29 -31 -13 -13 -14 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -33 -32 -32 -116 -116 -116 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -171 -171 -171 -128 -128 -128 -83 -83 -83 -17 -16 -16 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -102 -100 -100 -157 -157 -157 -204 -204 -204 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -227 -227 -118 -118 -118 -49 -49 -49 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -70 -69 -69 -173 -173 -173 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -209 -209 -209 -169 -169 -169 -90 -90 -90 -22 -21 -21 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -53 -53 -53 -108 -108 -108 -192 -192 -192 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -202 -202 -202 -82 -79 -79 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -98 -96 -96 -221 -221 -221 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -108 -108 -108 -40 -39 -39 -23 -22 -22 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -32 -31 -31 -117 -117 -117 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -16 -18 -19 -82 -79 -79 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -229 -229 -229 -175 -175 -175 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -102 -100 -100 -196 -196 -196 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -116 -116 -116 -22 -21 -21 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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 -1 -5 -5 -5 -19 -19 -20 -38 -38 -38 -42 -42 -42 -82 -79 -79 -165 -165 -165 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -175 -165 -165 -165 -113 -113 -113 -95 -95 -95 -56 -54 -54 -27 -26 -26 -3 -3 -3 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -126 -126 -126 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -224 -224 -224 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -35 -35 -35 -79 -79 -79 -116 -116 -116 -158 -158 -158 -214 -214 -214 -229 -229 -229 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -188 -188 -188 -112 -108 -108 -93 -93 -93 -56 -54 -54 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -98 -96 -96 -217 -217 -217 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -171 -171 -171 -30 -30 -30 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -227 -227 -227 -102 -100 -100 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -47 -47 -47 -102 -100 -100 -151 -151 -151 -188 -188 -188 -231 -231 -231 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -209 -209 -209 -158 -158 -158 -89 -86 -86 -17 -16 -16 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -83 -83 -83 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -165 -165 -165 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -90 -90 -90 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -90 -90 -90 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -119 -119 -119 -207 -207 -207 -237 -237 -237 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -233 -233 -233 -180 -180 -180 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -83 -83 -83 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -38 -38 -38 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -205 -205 -205 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -47 -47 -47 -118 -118 -118 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -128 -128 -128 -58 -57 -57 -17 -16 -16 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -180 -180 -180 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -122 -119 -119 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -59 -59 -59 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -227 -227 -227 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -95 -95 -95 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -242 -242 -242 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -236 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -143 -143 -143 -63 -63 -63 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -183 -183 -183 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -102 -100 -100 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -53 -53 -53 -151 -151 -151 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -235 -235 -235 -200 -200 -200 -194 -194 -194 -148 -148 -148 -102 -100 -100 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -83 -108 -108 -108 -133 -133 -133 -157 -157 -157 -230 -230 -230 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -209 -209 -209 -98 -96 -96 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -128 -128 -128 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -116 -116 -116 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -74 -73 -73 -200 -200 -200 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -226 -226 -226 -178 -178 -178 -95 -95 -95 -46 -44 -44 -33 -32 -32 -30 -30 -30 -17 -16 -16 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -10 -10 -10 -16 -18 -19 -76 -76 -76 -126 -126 -126 -143 -143 -143 -222 -222 -222 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -126 -126 -126 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -246 -246 -246 -214 -214 -214 -126 -126 -126 -70 -69 -69 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -59 -59 -59 -140 -136 -136 -233 -233 -233 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -138 -134 -134 -33 -32 -32 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -106 -104 -104 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -194 -194 -194 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -89 -86 -86 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -205 -205 -205 -133 -133 -133 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -89 -86 -86 -192 -192 -192 -243 -243 -243 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -186 -186 -186 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -151 -151 -151 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -139 -139 -139 -53 -53 -53 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -42 -42 -42 -106 -104 -104 -158 -158 -158 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -169 -169 -169 -46 -44 -44 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -196 -196 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -108 -108 -108 -221 -221 -221 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -196 -196 -196 -102 -100 -100 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -19 -19 -20 -112 -108 -108 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -169 -169 -169 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -116 -116 -116 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -192 -192 -192 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-113 -113 -113 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -165 -165 -165 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -89 -86 -86 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -175 -175 -175 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -102 -100 -100 -230 -230 -230 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -190 -190 -190 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -28 -28 -171 -171 -171 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -143 -143 -143 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -200 -200 -200 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -106 -104 -104 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -56 -54 -54 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -143 -143 -143 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -79 -79 -79 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -171 -171 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -217 -217 -217 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -65 -65 -65 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -126 -126 -126 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -60 -60 -192 -192 -192 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -128 -128 -128 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -49 -49 -49 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -98 -96 -96 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -119 -119 -119 -253 -253 -253 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -200 -200 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -231 -231 -231 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -158 -158 -158 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -150 -150 -150 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -47 -47 -47 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -102 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -98 -96 -96 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -126 -126 -126 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -22 -21 -21 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -26 -23 -22 -22 -6 -6 -6 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -133 -133 -133 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -192 -192 -192 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -171 -171 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -53 -53 -53 -76 -76 -76 -90 -90 -90 -165 -165 -165 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -180 -171 -171 -171 -116 -116 -116 -83 -83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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -148 -148 -148 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -178 -178 -178 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -150 -150 -150 -207 -207 -207 -228 -228 -228 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -231 -231 -231 -202 -202 -202 -128 -128 -128 -35 -35 -35 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -98 -96 -96 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -157 -157 -157 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -207 -207 -207 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -79 -79 -79 -198 -198 -198 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -207 -207 -207 -118 -118 -118 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -178 -178 -178 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -106 -104 -104 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -90 -90 -90 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -122 -119 -119 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -47 -47 -47 -165 -165 -165 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -194 -194 -194 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -207 -207 -207 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -200 -200 -200 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -157 -157 -157 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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255 -249 -249 -249 -157 -157 -157 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -209 -209 -209 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -83 -83 -83 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -83 -83 -83 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -106 -104 -104 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -140 -136 -136 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -89 -86 -86 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -95 -95 -95 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -133 -133 -133 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -28 -28 -140 -136 -136 -227 -227 -227 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -241 -241 -241 -241 -241 -241 -242 -242 -242 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -113 -113 -113 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -198 -198 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -79 -79 -79 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -231 -231 -231 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -158 -158 -158 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -165 -165 -165 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -198 -198 -198 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -113 -113 -113 -241 -241 -241 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -215 -215 -190 -190 -190 -157 -157 -157 -76 -76 -76 -49 -49 -49 -47 -47 -47 -53 -53 -53 -90 -90 -90 -151 -151 -151 -227 -227 -227 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -217 -217 -217 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -28 -28 -214 -214 -214 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -196 -196 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -93 -93 -93 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -133 -133 -133 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -217 -217 -217 -108 -108 -108 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -128 -128 -128 -207 -207 -207 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -70 -69 -69 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -200 -200 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -63 -60 -60 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -128 -128 -128 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -63 -60 -60 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -169 -169 -169 -63 -63 -63 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -35 -35 -35 -158 -158 -158 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -186 -186 -186 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -169 -169 -169 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -113 -113 -113 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -126 -126 -126 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -175 -175 -175 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -102 -100 -100 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -219 -219 -65 -65 -65 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -200 -200 -200 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -108 -108 -108 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -90 -90 -90 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -60 -60 -215 -215 -215 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -102 -100 -100 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -40 -39 -39 -175 -175 -175 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -178 -178 -178 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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171 -171 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -139 -139 -139 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -46 -44 -44 -186 -186 -186 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -102 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -113 -113 -113 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -102 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-214 -214 -214 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -63 -63 -63 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -198 -198 -198 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -82 -79 -79 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -165 -165 -165 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -169 -169 -169 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -158 -158 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -119 -119 -119 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -178 -178 -178 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -157 -157 -157 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -128 -128 -128 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -83 -83 -83 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -150 -150 -150 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -194 -194 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -116 -116 -116 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -143 -143 -143 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -157 -157 -157 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -219 -219 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -102 -100 -100 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -157 -157 -157 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -76 -76 -76 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -108 -108 -108 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -157 -157 -157 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -122 -119 -119 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -255 -255 -255 -255 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -217 -217 -217 -255 -255 -255 -253 -253 -253 -252 -252 -252 -246 -246 -246 -226 -226 -226 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -165 -165 -165 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -122 -119 -119 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -183 -183 -183 -188 -188 -188 -143 -143 -143 -133 -133 -133 -113 -113 -113 -74 -73 -73 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -122 -119 -119 -7 -7 -7 -0 -0 -0 -0 -0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0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -93 -93 -93 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -106 -104 -104 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -60 -60 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -36 -7 -56 -49 -25 -83 -69 -6 -113 -95 -9 -113 -95 -9 -197 -165 -17 -197 -165 -17 -208 -175 -18 -208 -175 -18 -197 -165 -17 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -133 -133 -133 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -219 -219 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -3 -1 -19 -17 -7 -43 -36 -7 -83 -69 -6 -113 -95 -9 -158 -133 -18 -197 -165 -17 -208 -175 -18 -220 -185 -19 -236 -198 -20 -248 -208 -21 -248 -208 -21 -245 -205 -20 -248 -208 -21 -245 -205 -20 -245 -205 -20 -197 -165 -17 -27 -23 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -106 -104 -104 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -133 -133 -133 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -30 -30 -30 -16 -18 -19 -8 -8 -8 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -9 -1 -43 -36 -7 -113 -95 -9 -158 -133 -18 -197 -165 -17 -220 -185 -19 -230 -192 -20 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -197 -165 -17 -27 -23 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -171 -171 -171 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -10 -10 -10 -133 -133 -133 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -5 -4 -2 -19 -17 -7 -43 -36 -7 -83 -69 -6 -158 -133 -18 -197 -165 -17 -230 -192 -20 -248 -208 -21 -245 -205 -20 -245 -205 -20 -245 -205 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -158 -133 -18 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -122 -119 -119 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -198 -198 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -90 -90 -90 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -54 -54 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -128 -128 -128 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -169 -169 -169 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -11 -9 -1 -27 -23 -12 -56 -49 -25 -113 -95 -9 -158 -133 -18 -197 -165 -17 -236 -198 -20 -241 -202 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -236 -198 -20 -83 -69 -6 -4 -3 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -95 -95 -95 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -106 -104 -104 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -76 -76 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -98 -96 -96 -241 -241 -241 -255 -255 -255 -251 -251 -251 -222 -222 -222 -150 -150 -150 -74 -73 -73 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -43 -36 -7 -83 -69 -6 -158 -133 -18 -197 -165 -17 -208 -175 -18 -236 -198 -20 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -197 -165 -17 -43 -36 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -196 -196 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -202 -202 -202 -53 -53 -53 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -128 -128 -128 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -42 -42 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -234 -234 -234 -226 -226 -226 -139 -139 -139 -63 -60 -60 -17 -16 -16 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -19 -17 -7 -83 -69 -6 -158 -133 -18 -208 -175 -18 -230 -192 -20 -236 -198 -20 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -113 -95 -9 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -139 -139 -139 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -157 -157 -157 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -70 -69 -69 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -5 -4 -2 -19 -17 -7 -56 -49 -25 -158 -133 -18 -220 -185 -19 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -197 -165 -17 -19 -17 -7 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -139 -139 -139 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -214 -214 -214 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -108 -108 -108 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -122 -119 -119 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -27 -23 -12 -83 -69 -6 -113 -95 -9 -197 -165 -17 -230 -192 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -83 -69 -6 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -26 -26 -26 -133 -133 -133 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -93 -93 -93 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -83 -83 -83 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -43 -36 -7 -113 -95 -9 -197 -165 -17 -220 -185 -19 -245 -205 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -19 -17 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -40 -39 -39 -150 -150 -150 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -117 -117 -117 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -202 -202 -202 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -3 -1 -27 -23 -12 -158 -133 -18 -208 -175 -18 -230 -192 -20 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -236 -198 -20 -83 -69 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -83 -83 -83 -198 -198 -198 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -108 -108 -108 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -173 -173 -173 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -197 -165 -17 -27 -23 -12 -0 -0 -0 -3 -3 -3 -70 -69 -69 -173 -173 -173 -133 -133 -133 -70 -69 -69 -63 -63 -63 -40 -39 -39 -42 -42 -42 -95 -95 -95 -165 -165 -165 -214 -214 -214 -227 -227 -227 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -122 -119 -119 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -122 -119 -119 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -119 -119 -119 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -165 -165 -165 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-17 -236 -198 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -220 -185 -19 -83 -69 -6 -2 -1 -0 -0 -0 -0 -30 -30 -30 -169 -169 -169 -251 -251 -251 -255 -255 -255 -255 -255 -255 -252 -252 -252 -214 -214 -214 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -224 -224 -224 -138 -134 -134 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -70 -69 -69 -214 -214 -214 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -49 -49 -49 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -98 -96 -96 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -56 -49 -25 -158 -133 -18 -197 -165 -17 -230 -192 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -158 -133 -18 -15 -15 -15 -0 -0 -0 -5 -5 -5 -90 -90 -90 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -83 -83 -83 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -143 -143 -143 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -143 -143 -143 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -63 -63 -63 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -19 -17 -7 -158 -133 -18 -220 -185 -19 -230 -192 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -43 -36 -7 -1 -1 -1 -0 -0 -0 -33 -32 -32 -190 -190 -190 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -231 -231 -231 -116 -116 -116 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -36 -7 -197 -165 -17 -245 -205 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -83 -69 -6 -3 -3 -3 -1 -1 -1 -1 -1 -1 -126 -126 -126 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -215 -215 -215 -119 -119 -119 -35 -35 -35 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -148 -148 -148 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -3 -1 -83 -69 -6 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -113 -95 -9 -1 -1 -1 -0 -0 -0 -0 -0 -0 -5 -5 -5 -143 -143 -143 -215 -215 -215 -241 -241 -241 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -229 -229 -229 -212 -212 -212 -204 -204 -204 -171 -171 -171 -63 -60 -60 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -83 -69 -6 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -158 -133 -18 -19 -17 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -26 -26 -26 -63 -63 -63 -89 -86 -86 -138 -134 -134 -165 -165 -165 -196 -196 -196 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -217 -188 -188 -188 -128 -128 -128 -76 -76 -76 -59 -59 -59 -53 -53 -53 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -113 -113 -113 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -113 -113 -113 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -175 -175 -175 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -36 -7 -197 -165 -17 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -208 -175 -18 -56 -49 -25 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -19 -19 -20 -32 -31 -31 -38 -38 -38 -38 -38 -38 -38 -38 -38 -38 -38 -38 -30 -28 -28 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -65 -65 -65 -212 -212 -212 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -188 -188 -188 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -112 -108 -108 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -6 -6 -6 -5 -5 -5 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -17 -7 -158 -133 -18 -220 -185 -19 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -220 -185 -19 -83 -69 -6 -4 -3 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -89 -86 -86 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -65 -65 -65 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -157 -157 -157 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -27 -26 -26 -76 -76 -76 -116 -116 -116 -113 -113 -113 -90 -90 -90 -53 -53 -53 -12 -12 -12 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -83 -69 -6 -158 -133 -18 -220 -185 -19 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -74 -73 -73 -219 -219 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -113 -113 -113 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -157 -157 -157 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -108 -108 -108 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -197 -165 -17 -19 -17 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -70 -69 -69 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -113 -113 -113 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -93 -93 -93 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -245 -245 -245 -192 -192 -192 -83 -83 -83 -7 -7 -7 -0 -0 -0 -0 -0 -0 -2 -1 -0 -5 -4 -2 -27 -23 -12 -158 -133 -18 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -56 -49 -25 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -93 -93 -93 -214 -214 -214 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -157 -157 -157 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -165 -165 -165 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -116 -116 -116 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -1 -13 -13 -13 -46 -44 -44 -138 -134 -134 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -180 -180 -180 -79 -79 -79 -17 -16 -16 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -56 -49 -25 -158 -133 -18 -230 -192 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -236 -198 -20 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -49 -49 -49 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -157 -157 -157 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -76 -76 -76 -221 -221 -221 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -56 -54 -54 -138 -134 -134 -217 -217 -217 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -235 -235 -235 -143 -143 -143 -42 -42 -42 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -208 -175 -18 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -197 -165 -17 -43 -36 -7 -1 -1 -1 -2 -2 -2 -22 -21 -21 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -38 -38 -38 -108 -108 -108 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -158 -158 -158 -23 -22 -22 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -117 -117 -117 -204 -204 -204 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -188 -188 -188 -98 -96 -96 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -49 -25 -197 -165 -17 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -56 -49 -25 -2 -2 -2 -1 -1 -1 -22 -21 -21 -133 -133 -133 -143 -143 -143 -83 -83 -83 -25 -24 -24 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -17 -16 -16 -108 -108 -108 -190 -190 -190 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -157 -157 -157 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -202 -202 -202 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -74 -73 -73 -183 -183 -183 -241 -241 -241 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -194 -194 -194 -183 -183 -183 -231 -231 -231 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -233 -233 -233 -178 -178 -178 -59 -59 -59 -0 -0 -0 -0 -0 -0 -2 -1 -0 -2 -1 -0 -56 -49 -25 -197 -165 -17 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -83 -69 -6 -4 -4 -4 -1 -1 -1 -0 -0 -0 -79 -79 -79 -234 -234 -234 -247 -247 -247 -231 -231 -231 -202 -202 -202 -108 -108 -108 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -90 -90 -90 -165 -165 -165 -205 -205 -205 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -173 -173 -173 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -150 -150 -150 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -82 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -42 -42 -42 -143 -143 -143 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -217 -217 -217 -157 -157 -157 -59 -59 -59 -3 -3 -3 -2 -2 -2 -27 -26 -26 -126 -126 -126 -214 -214 -214 -244 -244 -244 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -133 -133 -133 -35 -35 -35 -3 -3 -3 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -137 -121 -57 -5 -4 -2 -1 -1 -1 -0 -0 -0 -40 -39 -39 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -194 -194 -194 -106 -104 -104 -79 -79 -79 -59 -59 -59 -32 -31 -31 -22 -21 -21 -15 -15 -15 -2 -2 -2 -10 -10 -10 -16 -18 -19 -16 -18 -19 -16 -18 -19 -19 -19 -20 -35 -35 -35 -38 -38 -38 -53 -53 -53 -95 -95 -95 -148 -148 -148 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -205 -205 -205 -95 -95 -95 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -112 -108 -108 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -140 -136 -136 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -19 -19 -20 -83 -83 -83 -200 -200 -200 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -219 -219 -219 -143 -143 -143 -58 -57 -57 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -49 -49 -49 -128 -128 -128 -198 -198 -198 -245 -245 -245 -255 -255 -255 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -171 -171 -171 -49 -49 -49 -0 -0 -0 -0 -0 -0 -4 -3 -1 -11 -9 -1 -158 -133 -18 -230 -192 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -158 -133 -18 -19 -17 -7 -0 -0 -0 -0 -0 -0 -25 -24 -24 -157 -157 -157 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -237 -237 -237 -196 -196 -196 -165 -165 -165 -148 -148 -148 -106 -104 -104 -128 -128 -128 -157 -157 -157 -157 -157 -157 -157 -157 -157 -158 -158 -158 -205 -205 -205 -217 -217 -217 -230 -230 -230 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -165 -165 -165 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -102 -100 -100 -217 -217 -217 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -188 -188 -188 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -42 -42 -42 -143 -143 -143 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -235 -235 -235 -165 -165 -165 -74 -73 -73 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -49 -49 -49 -128 -128 -128 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -183 -183 -183 -58 -57 -57 -2 -2 -2 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -236 -198 -20 -158 -133 -18 -27 -23 -12 -0 -0 -0 -1 -0 -0 -6 -6 -6 -108 -108 -108 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -252 -252 -252 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -212 -212 -212 -106 -104 -104 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -227 -227 -227 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -190 -190 -190 -59 -59 -59 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -89 -86 -86 -200 -200 -200 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -186 -186 -186 -74 -73 -73 -22 -21 -21 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -79 -79 -79 -212 -212 -212 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -202 -202 -202 -70 -69 -69 -3 -3 -3 -1 -0 -0 -4 -3 -1 -27 -23 -12 -113 -95 -9 -230 -192 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -158 -133 -18 -19 -17 -7 -1 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -47 -47 -47 -190 -190 -190 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -165 -165 -165 -46 -44 -44 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -205 -205 -205 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -40 -39 -39 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -40 -39 -39 -165 -165 -165 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -214 -214 -214 -83 -83 -83 -8 -8 -8 -0 -0 -0 -2 -1 -0 -4 -3 -1 -83 -69 -6 -220 -185 -19 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -197 -165 -17 -5 -4 -2 -4 -3 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -106 -104 -104 -158 -158 -158 -214 -214 -214 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -231 -231 -231 -207 -207 -207 -157 -157 -157 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -95 -95 -95 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -106 -104 -104 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -139 -139 -139 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -210 -210 -210 -83 -83 -83 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -69 -6 -220 -185 -19 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -197 -165 -17 -27 -23 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -46 -44 -44 -143 -143 -143 -217 -217 -217 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -244 -244 -244 -222 -222 -222 -157 -157 -157 -83 -83 -83 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -98 -96 -96 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -143 -143 -143 -22 -21 -21 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -133 -133 -133 -42 -42 -42 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -158 -158 -158 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -217 -217 -217 -90 -90 -90 -6 -6 -6 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -208 -175 -18 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -158 -133 -18 -43 -36 -7 -5 -4 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -65 -65 -65 -119 -119 -119 -143 -143 -143 -148 -148 -148 -214 -214 -214 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -215 -215 -215 -205 -205 -205 -158 -158 -158 -118 -118 -118 -90 -90 -90 -70 -69 -69 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -133 -133 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -165 -165 -165 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -93 -93 -93 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -165 -165 -165 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -219 -219 -219 -89 -86 -86 -4 -4 -4 -0 -0 -0 -0 -0 -0 -5 -4 -2 -83 -69 -6 -197 -165 -17 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -197 -165 -17 -43 -36 -7 -4 -3 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -8 -8 -8 -13 -13 -13 -17 -16 -16 -40 -39 -39 -63 -63 -63 -70 -69 -69 -133 -133 -133 -143 -143 -143 -143 -143 -143 -143 -143 -143 -143 -143 -143 -95 -95 -95 -65 -65 -65 -65 -65 -65 -65 -65 -65 -59 -59 -59 -40 -39 -39 -35 -35 -35 -19 -19 -20 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -53 -53 -53 -188 -188 -188 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -188 -188 -188 -63 -60 -60 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -22 -21 -21 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -2 -2 -2 -1 -1 -1 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -157 -157 -157 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -95 -95 -95 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -17 -7 -208 -175 -18 -241 -202 -20 -248 -208 -21 -248 -208 -21 -246 -207 -21 -241 -202 -20 -208 -175 -18 -137 -121 -57 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -70 -69 -69 -194 -194 -194 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -151 -151 -151 -95 -95 -95 -32 -31 -31 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -171 -171 -171 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -76 -76 -76 -1 -1 -1 -0 -0 -0 -1 -0 -0 -4 -3 -1 -43 -36 -7 -158 -133 -18 -220 -185 -19 -230 -192 -20 -197 -165 -17 -113 -95 -9 -56 -49 -25 -5 -4 -2 -0 -0 -0 -0 -0 -0 -3 -3 -3 -42 -42 -42 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -82 -79 -79 -212 -212 -212 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -200 -200 -200 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -42 -42 -42 -95 -95 -95 -119 -119 -119 -188 -188 -188 -165 -165 -165 -53 -53 -53 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -215 -215 -215 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -210 -210 -210 -63 -60 -60 -1 -1 -1 -0 -0 -0 -0 -0 -0 -4 -3 -1 -19 -17 -7 -56 -49 -25 -85 -78 -62 -43 -36 -7 -17 -16 -16 -3 -3 -3 -0 -0 -0 -0 -0 -0 -17 -16 -16 -93 -93 -93 -188 -188 -188 -158 -158 -158 -98 -96 -96 -35 -35 -35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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -102 -100 -100 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -204 -204 -204 -59 -59 -59 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -79 -79 -79 -204 -204 -204 -128 -128 -128 -53 -53 -53 -171 -171 -171 -180 -180 -180 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -79 -79 -79 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -194 -194 -46 -44 -44 -0 -0 -0 -0 -0 -0 -1 -0 -0 -2 -1 -0 -1 -1 -1 -0 -0 -0 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -165 -165 -165 -229 -229 -229 -253 -253 -253 -252 -252 -252 -236 -236 -236 -196 -196 -196 -65 -65 -65 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -183 -183 -183 -233 -233 -233 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -79 -79 -79 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -113 -113 -113 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -194 -194 -194 -53 -53 -53 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -0 -0 -0 -70 -69 -69 -222 -222 -222 -251 -251 -251 -63 -63 -63 -35 -35 -35 -169 -169 -169 -178 -178 -178 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -157 -157 -157 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -35 -35 -35 -102 -100 -100 -217 -217 -217 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -138 -134 -134 -53 -53 -53 -25 -24 -24 -9 -9 -9 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -26 -26 -26 -46 -44 -44 -119 -119 -119 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -217 -217 -217 -102 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -128 -128 -128 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -255 -255 -255 -204 -204 -204 -76 -76 -76 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -0 -0 -0 -70 -69 -69 -222 -222 -222 -255 -255 -255 -183 -183 -183 -25 -24 -24 -53 -53 -53 -194 -194 -194 -119 -119 -119 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -25 -24 -24 -106 -104 -104 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -27 -26 -26 -119 -119 -119 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -229 -229 -229 -178 -178 -178 -128 -128 -128 -53 -53 -53 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -42 -42 -42 -133 -133 -133 -180 -180 -180 -224 -224 -224 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -165 -165 -165 -65 -65 -65 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -217 -217 -217 -255 -255 -255 -233 -233 -233 -89 -86 -86 -2 -2 -2 -74 -73 -73 -207 -207 -207 -70 -69 -69 -1 -1 -1 -6 -6 -6 -23 -22 -22 -35 -35 -35 -56 -54 -54 -70 -69 -69 -93 -93 -93 -128 -128 -128 -143 -143 -143 -173 -173 -173 -226 -226 -226 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -95 -95 -95 -219 -219 -219 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -139 -139 -139 -59 -59 -59 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -38 -38 -38 -102 -100 -100 -143 -143 -143 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -108 -108 -108 -27 -26 -26 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -212 -212 -212 -255 -255 -255 -250 -250 -250 -143 -143 -143 -3 -3 -3 -8 -8 -8 -188 -188 -188 -198 -198 -198 -151 -151 -151 -169 -169 -169 -204 -204 -204 -214 -214 -214 -221 -221 -221 -226 -226 -226 -235 -235 -235 -246 -246 -246 -252 -252 -252 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -56 -54 -54 -173 -173 -173 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -224 -224 -224 -173 -173 -173 -95 -95 -95 -79 -79 -79 -49 -49 -49 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -82 -79 -79 -128 -128 -128 -180 -180 -180 -217 -217 -217 -237 -237 -237 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -188 -188 -188 -63 -63 -63 -6 -6 -6 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -139 -139 -139 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -76 -76 -76 -223 -223 -223 -255 -255 -255 -255 -255 -255 -236 -236 -236 -190 -190 -190 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -183 -183 -183 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -59 -59 -59 -128 -128 -128 -230 -230 -230 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -157 -157 -157 -106 -104 -104 -95 -95 -95 -42 -42 -42 -42 -42 -42 -46 -44 -44 -83 -83 -83 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -108 -108 -108 -158 -158 -158 -175 -175 -175 -186 -186 -186 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -116 -116 -116 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -198 -198 -198 -49 -49 -49 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -22 -21 -21 -46 -44 -44 -82 -79 -79 -173 -173 -173 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -204 -204 -204 -79 -79 -79 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -82 -79 -79 -180 -180 -180 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -229 -229 -229 -230 -230 -230 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -196 -196 -196 -93 -93 -93 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -102 -100 -100 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -106 -104 -104 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -32 -31 -31 -90 -90 -90 -139 -139 -139 -169 -169 -169 -196 -196 -196 -228 -228 -228 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -247 -247 -247 -231 -231 -231 -196 -196 -196 -183 -183 -183 -151 -151 -151 -126 -126 -126 -59 -59 -59 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -38 -38 -38 -106 -104 -104 -171 -171 -171 -239 -239 -239 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -227 -227 -227 -173 -173 -173 -116 -116 -116 -47 -47 -47 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -79 -79 -79 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -158 -158 -158 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -70 -69 -69 -157 -157 -157 -209 -209 -209 -234 -234 -234 -248 -248 -248 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -196 -196 -196 -169 -169 -169 -158 -158 -158 -128 -128 -128 -74 -73 -73 -49 -49 -49 -32 -31 -31 -27 -26 -26 -17 -16 -16 -7 -7 -7 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -6 -6 -6 -23 -22 -22 -49 -49 -49 -112 -108 -108 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -126 -126 -126 -49 -49 -49 -23 -22 -22 -8 -8 -8 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -70 -69 -69 -207 -207 -207 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -33 -32 -32 -63 -60 -60 -128 -128 -128 -224 -224 -224 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -243 -243 -243 -229 -229 -229 -209 -209 -209 -178 -178 -178 -133 -133 -133 -58 -57 -57 -12 -12 -12 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -12 -12 -12 -79 -79 -79 -190 -190 -190 -228 -228 -228 -245 -245 -245 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -223 -223 -223 -194 -194 -194 -151 -151 -151 -65 -65 -65 -12 -12 -12 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -194 -194 -194 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -157 -157 -157 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -26 -26 -26 -74 -73 -73 -148 -148 -148 -196 -196 -196 -239 -239 -239 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -239 -239 -239 -202 -202 -202 -173 -173 -173 -151 -151 -151 -117 -117 -117 -76 -76 -76 -33 -32 -32 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -70 -69 -69 -126 -126 -126 -157 -157 -157 -165 -165 -165 -186 -186 -186 -202 -202 -202 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -237 -237 -237 -236 -236 -236 -229 -229 -229 -180 -180 -180 -157 -157 -157 -106 -104 -104 -58 -57 -57 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -148 -148 -148 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -74 -73 -73 -133 -133 -133 -175 -175 -175 -226 -226 -226 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -217 -217 -217 -148 -148 -148 -95 -95 -95 -49 -49 -49 -22 -21 -21 -7 -7 -7 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -7 -7 -7 -33 -32 -32 -49 -49 -49 -79 -79 -79 -133 -133 -133 -143 -143 -143 -178 -178 -178 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -194 -175 -175 -175 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -133 -113 -113 -113 -83 -83 -83 -83 -83 -83 -76 -76 -76 -27 -26 -26 -3 -3 -3 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -30 -28 -28 -6 -6 -6 -53 -53 -53 -119 -119 -119 -190 -190 -190 -228 -228 -228 -246 -246 -246 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -183 -183 -183 -214 -214 -214 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -239 -239 -239 -207 -207 -207 -150 -150 -150 -83 -83 -83 -25 -24 -24 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -2 -2 -2 -126 -126 -126 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -217 -217 -217 -165 -165 -165 -126 -126 -126 -90 -90 -90 -53 -53 -53 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -70 -69 -69 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -214 -214 -214 -183 -183 -183 -102 -100 -100 -47 -47 -47 -22 -21 -21 -9 -9 -9 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -241 -241 -241 -226 -226 -226 -194 -194 -194 -128 -128 -128 -47 -47 -47 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -190 -190 -190 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -233 -233 -233 -178 -178 -178 -117 -117 -117 -70 -69 -69 -22 -21 -21 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -102 -100 -100 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -212 -212 -212 -143 -143 -143 -83 -83 -83 -33 -32 -32 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -38 -38 -38 -35 -35 -35 -19 -19 -20 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -32 -31 -31 -49 -49 -49 -70 -69 -69 -128 -128 -128 -171 -171 -171 -215 -215 -215 -227 -227 -227 -229 -229 -229 -230 -230 -230 -230 -230 -230 -230 -230 -230 -230 -230 -230 -233 -233 -233 -239 -239 -239 -245 -245 -245 -246 -246 -246 -246 -246 -246 -247 -247 -247 -245 -245 -245 -239 -239 -239 -228 -228 -228 -214 -214 -214 -175 -175 -175 -83 -83 -83 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -25 -24 -24 -49 -49 -49 -106 -104 -104 -194 -194 -194 -246 -246 -246 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -106 -104 -104 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -56 -54 -54 -112 -108 -108 -173 -173 -173 -222 -222 -222 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -178 -178 -178 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -70 -69 -69 -150 -150 -150 -207 -207 -207 -243 -243 -243 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -70 -69 -69 -169 -169 -169 -224 -224 -224 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -30 -30 -30 -95 -95 -95 -198 -198 -198 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -175 -175 -175 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -35 -35 -35 -143 -143 -143 -192 -192 -192 -178 -178 -178 -113 -113 -113 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -119 -119 -119 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -157 -157 -157 -251 -251 -251 -255 -255 -255 -255 -255 -255 -243 -243 -243 -117 -117 -117 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -207 -207 -207 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -106 -104 -104 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -219 -219 -76 -76 -76 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -126 -126 -126 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -171 -171 -171 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -209 -209 -209 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -207 -207 -207 -58 -57 -57 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -98 -96 -96 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -83 -83 -83 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -79 -79 -79 -196 -196 -196 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -116 -116 -116 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -175 -175 -175 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -169 -169 -169 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -53 -53 -53 -165 -165 -165 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -188 -188 -188 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -74 -73 -73 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -83 -83 -83 -218 -218 -218 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -63 -60 -60 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -89 -86 -86 -209 -209 -209 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -148 -148 -148 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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113 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -133 -133 -133 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -190 -190 -190 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -74 -73 -73 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -175 -175 -175 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -196 -196 -196 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -102 -100 -100 -241 -241 -241 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -175 -175 -175 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -249 -249 -249 -169 -169 -169 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -108 -108 -108 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -150 -150 -150 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -98 -96 -96 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -58 -57 -57 -200 -200 -200 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -113 -113 -113 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -157 -157 -157 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -42 -42 -42 -165 -165 -165 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -194 -194 -194 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -165 -165 -165 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -190 -190 -190 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -63 -63 -63 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -158 -158 -158 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -33 -32 -32 -157 -157 -157 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -98 -96 -96 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -148 -148 -148 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -139 -139 -139 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -148 -148 -148 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -138 -134 -134 -243 -243 -243 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -79 -79 -79 -241 -241 -241 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -200 -200 -200 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -102 -100 -100 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -219 -219 -70 -69 -69 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -196 -196 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -90 -90 -90 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -90 -90 -90 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -205 -205 -205 -106 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -143 -143 -143 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 -234 -234 -106 -104 -104 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -26 -26 -26 -158 -158 -158 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -235 -235 -235 -140 -136 -136 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -89 -86 -86 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -63 -60 -60 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -150 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -139 -139 -139 -25 -24 -24 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -83 -83 -83 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -169 -169 -169 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -128 -128 -128 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -143 -143 -143 -32 -31 -31 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -173 -173 -173 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -82 -79 -79 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -150 -150 -150 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -215 -215 -215 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -133 -133 -133 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -204 -204 -204 -63 -63 -63 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -58 -57 -57 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -143 -143 -143 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -102 -100 -100 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -53 -53 -53 -194 -194 -194 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -126 -126 -126 -19 -19 -20 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -128 -128 -128 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -82 -79 -79 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -227 -227 -83 -83 -83 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -165 -165 -165 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -143 -143 -143 -38 -38 -38 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -165 -165 -165 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -112 -108 -108 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -128 -128 -128 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -165 -165 -165 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -83 -83 -83 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -157 -157 -157 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -82 -79 -79 -236 -236 -236 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -186 -186 -186 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -118 -118 -118 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -183 -183 -183 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -173 -173 -173 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -76 -76 -76 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -178 -178 -178 -33 -32 -32 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -56 -54 -54 -200 -200 -200 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -169 -169 -169 -35 -35 -35 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -117 -117 -117 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -229 -229 -229 -76 -76 -76 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -30 -28 -28 -169 -169 -169 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -150 -150 -150 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -188 -188 -188 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -133 -133 -133 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -148 -148 -148 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -126 -126 -126 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -83 -83 -83 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -175 -175 -175 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-214 -214 -214 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -113 -113 -113 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -82 -79 -79 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -169 -169 -169 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -76 -76 -76 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -165 -165 -165 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -102 -100 -100 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -79 -79 -79 -222 -222 -222 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -215 -215 -70 -69 -69 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -54 -54 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -116 -116 -116 -8 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -83 -83 -83 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -128 -128 -128 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -49 -49 -49 -188 -188 -188 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -183 -183 -183 -47 -47 -47 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -165 -165 -165 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -175 -175 -175 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -150 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -74 -73 -73 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -30 -30 -30 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -143 -143 -143 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -133 -133 -133 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -79 -79 -79 -227 -227 -227 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -139 -139 -139 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -169 -169 -169 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -113 -113 -113 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -106 -104 -104 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -95 -95 -95 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -26 -26 -26 -169 -169 -169 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -171 -171 -171 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -93 -93 -93 -224 -224 -224 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -95 -95 -95 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -138 -134 -134 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -198 -198 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -200 -200 -200 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -83 -83 -83 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -90 -90 -90 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -171 -171 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -165 -165 -165 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -178 -178 -178 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -138 -134 -134 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -90 -90 -90 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -128 -128 -128 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -126 -126 -126 -254 -254 -254 -255 -255 -255 -255 -255 -255 -231 -231 -231 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -119 -119 -119 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -207 -207 -207 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -82 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -42 -42 -42 -183 -183 -183 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -165 -165 -165 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -140 -136 -136 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 -234 -234 -106 -104 -104 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -113 -113 -113 -242 -242 -242 -255 -255 -255 -255 -255 -255 -192 -192 -192 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -219 -219 -74 -73 -73 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -65 -65 -65 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -200 -200 -200 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -59 -59 -59 -212 -212 -212 -255 -255 -255 -255 -255 -255 -223 -223 -223 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -150 -150 -150 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -186 -186 -186 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -139 -139 -139 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -180 -180 -180 -255 -255 -255 -255 -255 -255 -249 -249 -249 -108 -108 -108 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -116 -116 -116 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -202 -202 -202 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -158 -158 -158 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -224 -224 -224 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -138 -134 -134 -248 -248 -248 -255 -255 -255 -255 -255 -255 -128 -128 -128 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -76 -76 -228 -228 -228 -255 -255 -255 -255 -255 -255 -128 -128 -128 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -192 -192 -192 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -108 -108 -108 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -186 -186 -186 -255 -255 -255 -255 -255 -255 -122 -119 -119 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -128 -128 -128 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -98 -96 -96 -254 -254 -254 -255 -255 -255 -116 -116 -116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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -108 -108 -108 -240 -240 -240 -255 -255 -255 -253 -253 -253 -183 -183 -183 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -108 -108 -108 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -158 -158 -158 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -148 -148 -148 -250 -250 -250 -255 -255 -255 -230 -230 -230 -90 -90 -90 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -178 -178 -178 -254 -254 -254 -251 -251 -251 -169 -169 -169 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -139 -139 -139 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -49 -49 -49 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -202 -202 -202 -255 -255 -255 -227 -227 -227 -79 -79 -79 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -89 -86 -86 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -133 -133 -133 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -212 -212 -212 -255 -255 -255 -126 -126 -126 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -58 -57 -57 -196 -196 -196 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -59 -59 -59 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -180 -180 -180 -217 -217 -217 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -158 -158 -158 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -30 -30 -30 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -116 -116 -116 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-6 -6 -212 -212 -212 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -192 -192 -192 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -133 -133 -133 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -128 -128 -128 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -70 -69 -69 -224 -224 -224 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -219 -219 -219 -53 -53 -53 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -150 -150 -150 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -95 -95 -95 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -212 -212 -212 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -175 -175 -175 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -126 -126 -126 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -89 -86 -86 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -214 -214 -214 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -165 -165 -165 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -102 -100 -100 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -76 -76 -76 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -165 -165 -165 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -106 -104 -104 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -28 -28 -178 -178 -178 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -83 -83 -83 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -175 -175 -175 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -76 -76 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -173 -173 -173 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -106 -104 -104 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -158 -158 -158 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -165 -165 -165 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -113 -113 -113 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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143 -143 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -169 -169 -169 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -207 -207 -207 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -138 -134 -134 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -102 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -83 -83 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -151 -151 -151 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -148 -148 -148 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -217 -217 -217 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -224 -224 -224 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -128 -128 -128 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -26 -26 -26 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -118 -118 -118 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -116 -116 -116 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -198 -198 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -98 -96 -96 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -112 -108 -108 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -108 -108 -108 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -128 -128 -128 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -65 -65 -65 -215 -215 -215 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -143 -143 -143 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -126 -126 -126 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -33 -32 -32 -178 -178 -178 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -65 -65 -65 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -139 -139 -139 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -58 -57 -57 -190 -190 -190 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -157 -157 -157 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -47 -47 -47 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -178 -178 -178 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -112 -108 -108 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -139 -139 -139 -226 -226 -226 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -150 -150 -150 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -19 -19 -20 -90 -90 -90 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -188 -188 -188 -49 -49 -49 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -46 -44 -44 -188 -188 -188 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -202 -202 -202 -65 -65 -65 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -106 -104 -104 -196 -196 -196 -235 -235 -235 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -204 -204 -204 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -196 -196 -196 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -33 -32 -32 -95 -95 -95 -169 -169 -169 -234 -234 -234 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -158 -158 -158 -53 -53 -53 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -23 -22 -22 -74 -73 -73 -180 -180 -180 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -148 -148 -148 -30 -30 -30 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -53 -53 -53 -157 -157 -157 -226 -226 -226 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -217 -217 -217 -93 -93 -93 -1 -1 -1 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -76 -76 -76 -169 -169 -169 -224 -224 -224 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -76 -76 -76 -143 -143 -143 -210 -210 -210 -249 -249 -249 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -217 -217 -217 -106 -104 -104 -23 -22 -22 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -15 -15 -15 -38 -38 -38 -95 -95 -95 -188 -188 -188 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -229 -229 -229 -143 -143 -143 -49 -49 -49 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -59 -59 -59 -128 -128 -128 -194 -194 -194 -223 -223 -223 -242 -242 -242 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -243 -243 -243 -218 -218 -218 -180 -180 -180 -112 -108 -108 -27 -26 -26 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -207 -207 -235 -235 -235 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -235 -235 -235 -209 -209 -209 -169 -169 -169 -118 -118 -118 -58 -57 -57 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -17 -16 -16 -56 -54 -54 -93 -93 -93 -139 -139 -139 -180 -180 -180 -217 -217 -217 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -198 -198 -198 -143 -143 -143 -90 -90 -90 -58 -57 -57 -17 -16 -16 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -5 -4 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -13 -13 -13 -26 -26 -26 -40 -39 -39 -83 -83 -83 -157 -157 -157 -204 -204 -204 -231 -231 -231 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -217 -217 -217 -165 -165 -165 -95 -95 -95 -33 -32 -32 -13 -13 -13 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -17 -7 -113 -95 -9 -208 -175 -18 -208 -175 -18 -113 -95 -9 -83 -69 -6 -43 -36 -7 -5 -4 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -17 -16 -16 -38 -38 -38 -83 -83 -83 -139 -139 -139 -190 -190 -190 -192 -192 -192 -202 -202 -202 -217 -217 -217 -224 -224 -224 -228 -228 -228 -229 -229 -229 -236 -236 -236 -239 -239 -239 -239 -239 -239 -240 -240 -240 -245 -245 -245 -249 -249 -249 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -247 -247 -247 -243 -243 -243 -234 -234 -234 -224 -224 -224 -204 -204 -204 -169 -169 -169 -148 -148 -148 -113 -113 -113 -42 -42 -42 -12 -12 -12 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -3 -1 -19 -17 -7 -27 -23 -12 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -69 -6 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -236 -198 -20 -197 -165 -17 -113 -95 -9 -56 -49 -25 -19 -17 -7 -5 -4 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -2 -2 -2 -17 -16 -16 -46 -44 -44 -63 -60 -60 -74 -73 -73 -76 -76 -76 -95 -95 -95 -106 -104 -104 -106 -104 -104 -112 -108 -108 -128 -128 -128 -143 -143 -143 -158 -158 -158 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -165 -148 -148 -148 -133 -133 -133 -122 -119 -119 -90 -90 -90 -59 -59 -59 -27 -26 -26 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -19 -17 -7 -83 -69 -6 -158 -133 -18 -197 -165 -17 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-248 -208 -21 -245 -205 -20 -236 -198 -20 -197 -165 -17 -158 -133 -18 -113 -95 -9 -43 -36 -7 -19 -17 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -5 -4 -2 -19 -17 -7 -43 -36 -7 -83 -69 -6 -113 -95 -9 -158 -133 -18 -158 -133 -18 -197 -165 -17 -197 -165 -17 -230 -192 -20 -236 -198 -20 -245 -205 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -83 -69 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -19 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -230 -192 -20 -220 -185 -19 -197 -165 -17 -158 -133 -18 -113 -95 -9 -113 -95 -9 -83 -69 -6 -56 -49 -25 -43 -36 -7 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -27 -23 -12 -43 -36 -7 -56 -49 -25 -83 -69 -6 -83 -69 -6 -83 -69 -6 -113 -95 -9 -158 -133 -18 -197 -165 -17 -220 -185 -19 -230 -192 -20 -241 -202 -20 -245 -205 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -220 -185 -19 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -5 -4 -2 -56 -49 -25 -197 -165 -17 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -248 -208 -21 -208 -175 -18 -158 -133 -18 -43 -36 -7 -5 -4 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -220 -185 -19 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -197 -165 -17 -56 -49 -25 -4 -3 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -3 -1 -83 -69 -6 -197 -165 -17 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -245 -205 -20 -197 -165 -17 -19 -17 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -36 -7 -208 -175 -18 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -158 -133 -18 -43 -36 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -43 -36 -7 -197 -165 -17 -241 -202 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -43 -36 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -56 -49 -25 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -158 -133 -18 -27 -23 -12 -4 -3 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -36 -7 -158 -133 -18 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -208 -175 -18 -43 -36 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -36 -7 -197 -165 -17 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -113 -95 -9 -11 -9 -1 -1 -1 -1 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -83 -69 -6 -197 -165 -17 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -158 -133 -18 -19 -17 -7 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -113 -95 -9 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -17 -7 -158 -133 -18 -208 -175 -18 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -241 -202 -20 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -43 -36 -7 -197 -165 -17 -246 -207 -21 -248 -208 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 -207 -21 -197 -165 -17 -43 -36 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -9 -1 -113 -95 -9 -236 -198 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -230 -192 -20 -158 -133 -18 -56 -49 -25 -19 -17 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -245 -205 -20 -113 -95 -9 -11 -9 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -19 -17 -7 -158 -133 -18 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -230 -192 -20 -158 -133 -18 -83 -69 -6 -19 -17 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -9 -1 -83 -69 -6 -158 -133 -18 -208 -175 -18 -230 -192 -20 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -197 -165 -17 -43 -36 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -1 -0 -11 -9 -1 -197 -165 -17 -245 -205 -20 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -236 -198 -20 -208 -175 -18 -113 -95 -9 -43 -36 -7 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -4 -2 -43 -36 -7 -83 -69 -6 -158 -133 -18 -197 -165 -17 -230 -192 -20 -246 -207 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -83 -69 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -83 -69 -6 -220 -185 -19 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -248 -208 -21 -246 -207 -21 -230 -192 -20 -197 -165 -17 -113 -95 -9 -43 -36 -7 -5 -4 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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 -0 -4 -4 -4 -9 -9 -9 -10 -10 -10 -10 -10 -10 -10 -10 -10 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -17 -16 -16 -33 -32 -32 -42 -42 -42 -49 -49 -49 -49 -49 -49 -46 -44 -44 -35 -35 -35 -19 -19 -20 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -23 -22 -22 -49 -49 -49 -83 -83 -83 -117 -112 -112 -145 -140 -140 -158 -151 -151 -163 -154 -154 -158 -151 -151 -140 -136 -136 -117 -112 -112 -81 -76 -76 -40 -39 -39 -12 -12 -12 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -38 -38 -38 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -47 -47 -47 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -40 -39 -39 -60 -56 -56 -60 -56 -56 -60 -56 -56 -60 -56 -56 -49 -49 -49 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -46 -44 -44 -106 -104 -104 -157 -157 -157 -196 -196 -196 -224 -224 -224 -243 -243 -243 -247 -247 -247 -243 -243 -243 -228 -228 -228 -198 -198 -198 -157 -157 -157 -108 -108 -108 -56 -54 -54 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -113 -113 -113 -133 -133 -133 -133 -133 -133 -133 -133 -133 -128 -128 -128 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -76 -76 -76 -138 -134 -134 -186 -186 -186 -221 -221 -221 -241 -241 -241 -246 -246 -246 -239 -239 -239 -217 -217 -217 -171 -171 -171 -113 -113 -113 -53 -53 -53 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -30 -28 -28 -89 -86 -86 -138 -134 -134 -180 -180 -180 -212 -212 -212 -236 -236 -236 -246 -246 -246 -246 -246 -246 -237 -237 -237 -214 -214 -214 -178 -178 -178 -133 -133 -133 -79 -79 -79 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -60 -60 -126 -126 -126 -133 -133 -133 -133 -133 -133 -133 -133 -133 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -90 -90 -90 -150 -150 -150 -198 -198 -198 -229 -229 -229 -247 -247 -247 -247 -247 -247 -234 -234 -234 -209 -209 -209 -158 -158 -158 -102 -100 -100 -38 -38 -38 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -25 -24 -24 -70 -69 -69 -133 -129 -129 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -158 -151 -151 -105 -100 -100 -47 -47 -47 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -74 -70 -70 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -70 -66 -66 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -53 -53 -53 -145 -140 -140 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -95 -95 -95 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -33 -32 -32 -122 -119 -119 -198 -198 -198 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -243 -243 -243 -207 -207 -207 -126 -126 -126 -35 -35 -35 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -254 -254 -254 -254 -254 -254 -252 -252 -252 -0 -0 -0 -1 -1 -1 -42 -42 -42 -143 -143 -143 -226 -226 -226 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -204 -204 -204 -122 -119 -119 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -98 -96 -96 -178 -178 -178 -234 -234 -234 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -227 -227 -227 -158 -158 -158 -65 -65 -65 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -254 -254 -254 -254 -254 -254 -150 -150 -150 -0 -0 -0 -4 -4 -4 -63 -63 -63 -165 -165 -165 -235 -235 -235 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -239 -239 -239 -186 -186 -186 -82 -79 -79 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -49 -49 -49 -122 -119 -119 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -145 -140 -140 -82 -79 -79 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -15 -15 -98 -96 -96 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -143 -143 -143 -35 -33 -33 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -127 -120 -120 -170 -161 -161 -171 -162 -162 -171 -162 -162 -170 -161 -161 -117 -112 -112 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -46 -44 -44 -178 -178 -178 -242 -242 -242 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -180 -180 -180 -56 -54 -54 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -1 -1 -1 -49 -49 -49 -180 -180 -180 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -148 -148 -148 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -157 -157 -157 -233 -233 -233 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -215 -215 -215 -98 -96 -96 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -4 -4 -4 -76 -76 -76 -205 -205 -205 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -226 -226 -226 -74 -73 -73 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -66 -62 -62 -145 -140 -140 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -98 -96 -96 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -167 -158 -158 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -27 -26 -26 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -117 -117 -117 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -105 -100 -100 -168 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -140 -136 -136 -47 -47 -47 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -49 -49 -49 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -244 -244 -244 -227 -227 -227 -214 -214 -214 -212 -212 -212 -214 -214 -214 -224 -224 -224 -243 -243 -243 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -74 -73 -73 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -42 -42 -42 -192 -192 -192 -255 -255 -255 -255 -255 -255 -253 -253 -253 -240 -240 -240 -223 -223 -223 -214 -214 -214 -212 -212 -212 -217 -217 -217 -229 -229 -229 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -165 -165 -165 -30 -28 -28 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -42 -42 -42 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -243 -243 -243 -228 -228 -228 -217 -217 -217 -212 -212 -212 -212 -212 -212 -217 -217 -217 -233 -233 -233 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -126 -126 -126 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -151 -151 -151 -79 -79 -79 -229 -229 -229 -255 -255 -255 -255 -255 -255 -254 -254 -254 -247 -247 -247 -237 -237 -237 -231 -231 -231 -233 -233 -233 -241 -241 -241 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -63 -60 -60 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -60 -56 -56 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -154 -146 -146 -122 -119 -119 -81 -76 -76 -40 -39 -39 -23 -22 -22 -16 -18 -19 -27 -26 -26 -56 -54 -54 -105 -100 -100 -145 -140 -140 -168 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -83 -83 -83 -7 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -70 -66 -66 -82 -79 -79 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -33 -33 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -95 -95 -95 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -74 -70 -70 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -66 -62 -62 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -194 -194 -194 -126 -126 -126 -70 -69 -69 -32 -31 -31 -22 -21 -21 -30 -30 -30 -59 -59 -59 -122 -119 -119 -192 -192 -192 -244 -244 -244 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -212 -212 -212 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -157 -157 -157 -252 -252 -252 -255 -255 -255 -248 -248 -248 -180 -180 -180 -112 -108 -108 -58 -57 -57 -27 -26 -26 -23 -22 -22 -38 -38 -38 -76 -76 -76 -139 -139 -139 -218 -218 -218 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -128 -128 -128 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -183 -183 -183 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -183 -183 -183 -122 -119 -119 -74 -73 -73 -35 -35 -35 -22 -21 -21 -23 -22 -22 -40 -39 -39 -83 -83 -83 -150 -150 -150 -217 -217 -217 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -79 -79 -79 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -212 -212 -212 -255 -255 -255 -255 -255 -255 -237 -237 -237 -178 -178 -178 -133 -133 -133 -98 -96 -96 -83 -83 -83 -83 -83 -83 -113 -113 -113 -157 -157 -157 -219 -219 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -158 -158 -158 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -46 -44 -44 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -122 -119 -119 -60 -56 -56 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -40 -39 -39 -112 -108 -108 -169 -160 -160 -171 -162 -162 -171 -162 -162 -170 -161 -161 -154 -146 -146 -56 -54 -54 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -81 -76 -76 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -105 -100 -100 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -76 -76 -76 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -65 -65 -65 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -47 -47 -47 -145 -140 -140 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -90 -90 -90 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -143 -143 -143 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -143 -143 -143 -47 -47 -47 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -46 -44 -44 -143 -143 -143 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -157 -157 -157 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -255 -255 -255 -241 -241 -241 -143 -143 -143 -33 -32 -32 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -76 -76 -76 -192 -192 -192 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -224 -224 -224 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -150 -150 -150 -246 -246 -246 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -108 -108 -108 -35 -35 -35 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -76 -76 -76 -194 -194 -194 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -254 -254 -254 -253 -253 -253 -204 -204 -204 -102 -100 -100 -27 -26 -26 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -17 -16 -16 -74 -73 -73 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -223 -223 -223 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -112 -108 -108 -169 -160 -160 -171 -162 -162 -171 -162 -162 -170 -161 -161 -122 -119 -119 -27 -26 -26 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -117 -112 -112 -170 -161 -161 -171 -162 -162 -171 -162 -162 -169 -160 -160 -117 -112 -112 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -66 -62 -62 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -117 -112 -112 -23 -22 -22 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -15 -15 -105 -100 -100 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -138 -134 -134 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -122 -119 -119 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -17 -16 -16 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -70 -69 -69 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -165 -165 -165 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -22 -21 -21 -143 -143 -143 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -83 -83 -83 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -143 -143 -143 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -65 -65 -65 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -175 -175 -175 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -89 -86 -86 -230 -230 -230 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -95 -95 -95 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -47 -47 -47 -224 -224 -224 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -126 -126 -126 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -204 -204 -204 -70 -69 -69 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -79 -79 -79 -231 -231 -231 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -126 -126 -126 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -63 -60 -60 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -35 -33 -33 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -56 -54 -54 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -35 -35 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -133 -129 -129 -38 -35 -35 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -33 -32 -32 -133 -129 -129 -170 -161 -161 -171 -162 -162 -171 -162 -162 -169 -160 -160 -127 -120 -120 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -90 -90 -90 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -143 -143 -143 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -157 -157 -157 -254 -254 -254 -255 -255 -255 -255 -255 -255 -254 -254 -254 -188 -188 -188 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -194 -194 -194 -254 -254 -254 -255 -255 -255 -255 -255 -255 -254 -254 -254 -173 -173 -173 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -180 -180 -180 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -90 -90 -90 -233 -233 -233 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -106 -104 -104 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -76 -76 -240 -240 -240 -255 -255 -255 -255 -255 -255 -255 -255 -255 -198 -198 -198 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -133 -133 -133 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -117 -112 -112 -170 -161 -161 -171 -162 -162 -171 -162 -162 -158 -151 -151 -59 -59 -59 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -74 -70 -70 -163 -154 -154 -171 -162 -162 -171 -162 -162 -170 -161 -161 -98 -96 -96 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -35 -35 -35 -140 -136 -136 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -47 -47 -47 -145 -140 -140 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -90 -90 -90 -8 -8 -8 -0 -0 -0 -1 -1 -1 -74 -73 -73 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -70 -66 -66 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 -234 -234 -95 -95 -95 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -79 -79 -79 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -236 -236 -236 -98 -96 -96 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -175 -175 -175 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -139 -139 -139 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -76 -76 -76 -245 -245 -245 -255 -255 -255 -255 -255 -255 -253 -253 -253 -178 -178 -178 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -25 -24 -24 -173 -173 -173 -254 -254 -254 -255 -255 -255 -255 -255 -255 -237 -237 -237 -90 -90 -90 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -148 -148 -148 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -79 -79 -79 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -215 -215 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -35 -35 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -122 -119 -119 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -35 -35 -138 -134 -134 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -30 -28 -28 -122 -119 -119 -168 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -49 -49 -49 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -74 -70 -70 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -63 -60 -60 -5 -5 -5 -35 -33 -33 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -95 -95 -95 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -93 -93 -93 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -190 -190 -190 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -113 -113 -113 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -90 -90 -90 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -151 -151 -151 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -113 -113 -113 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -108 -108 -108 -245 -245 -245 -255 -255 -255 -255 -255 -255 -253 -253 -253 -133 -133 -133 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -234 -234 -234 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -74 -70 -70 -169 -160 -160 -171 -162 -162 -171 -162 -162 -167 -158 -158 -89 -86 -86 -4 -4 -4 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -117 -112 -112 -170 -161 -161 -171 -162 -162 -171 -162 -162 -158 -151 -151 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -105 -100 -100 -167 -158 -158 -170 -161 -161 -171 -162 -162 -171 -162 -162 -158 -151 -151 -74 -73 -73 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -112 -108 -108 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -133 -129 -129 -63 -60 -60 -117 -112 -112 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -127 -120 -120 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -148 -148 -148 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -143 -143 -143 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -122 -119 -119 -251 -251 -251 -255 -255 -255 -255 -255 -255 -254 -254 -254 -151 -151 -151 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -242 -242 -242 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -58 -57 -57 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -214 -214 -214 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -74 -73 -73 -226 -226 -226 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -171 -171 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -227 -227 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -180 -180 -180 -255 -255 -255 -255 -255 -255 -255 -255 -255 -246 -246 -246 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -106 -104 -104 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -66 -62 -62 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -6 -6 -105 -100 -100 -169 -160 -160 -171 -162 -162 -171 -162 -162 -168 -160 -160 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -90 -90 -90 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -89 -86 -86 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -32 -31 -31 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -168 -160 -160 -154 -146 -146 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -40 -39 -39 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -198 -198 -198 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -79 -79 -79 -229 -229 -229 -255 -255 -255 -255 -255 -255 -255 -255 -255 -192 -192 -192 -30 -30 -30 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -90 -90 -90 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -200 -200 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -235 -235 -235 -95 -95 -95 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -205 -205 -205 -255 -255 -255 -255 -255 -255 -255 -255 -255 -202 -202 -202 -33 -32 -32 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -183 -183 -183 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -171 -171 -171 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -138 -134 -134 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -65 -65 -65 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -31 -30 -30 -32 -31 -31 -106 -104 -104 -169 -160 -160 -171 -162 -162 -171 -162 -162 -170 -161 -161 -70 -66 -66 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -74 -70 -70 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -98 -96 -96 -13 -13 -13 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -49 -49 -49 -145 -140 -140 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -74 -70 -70 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -223 -223 -223 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -58 -57 -57 -210 -210 -210 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -158 -158 -158 -255 -255 -255 -255 -255 -255 -255 -255 -255 -243 -243 -243 -118 -118 -118 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -210 -210 -210 -98 -96 -96 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -93 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -95 -126 -126 -126 -221 -221 -221 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -158 -158 -158 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -163 -154 -154 -158 -151 -151 -158 -151 -151 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -74 -73 -73 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -59 -59 -59 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -112 -108 -108 -22 -21 -21 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -6 -6 -81 -76 -76 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -102 -100 -100 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -241 -241 -241 -255 -255 -255 -255 -255 -255 -255 -255 -255 -218 -218 -218 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -196 -196 -196 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -133 -133 -133 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -138 -134 -134 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -95 -95 -95 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -246 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -247 -248 -248 -248 -248 -248 -248 -248 -248 -248 -248 -248 -248 -249 -249 -249 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -226 -226 -226 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -151 -151 -151 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -81 -76 -76 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -47 -47 -47 -138 -134 -134 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -122 -119 -119 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -127 -120 -120 -33 -32 -32 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -188 -188 -188 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -119 -119 -119 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -112 -108 -108 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -10 -11 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -81 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -28 -28 -127 -120 -120 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -143 -143 -143 -47 -47 -47 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -27 -26 -26 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -117 -112 -112 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -253 -253 -253 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -33 -32 -32 -186 -186 -186 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -148 -148 -148 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -117 -117 -117 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -249 -249 -249 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -243 -219 -219 -219 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -11 -10 -11 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -112 -108 -108 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -102 -100 -100 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -15 -15 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -145 -140 -140 -56 -54 -54 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -112 -108 -108 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -89 -86 -86 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -215 -215 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -192 -192 -192 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -17 -16 -16 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -126 -126 -126 -255 -255 -255 -255 -255 -255 -255 -255 -255 -251 -251 -251 -143 -143 -143 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -113 -113 -113 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -117 -117 -117 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -116 -106 -104 -104 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -145 -140 -140 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -98 -96 -96 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -74 -70 -70 -7 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -82 -79 -79 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -59 -59 -59 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -47 -47 -47 -200 -200 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -227 -227 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -139 -139 -139 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -128 -128 -128 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -95 -95 -95 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -165 -165 -165 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -145 -140 -140 -170 -161 -161 -171 -162 -162 -171 -162 -162 -154 -146 -146 -46 -44 -44 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -83 -83 -83 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -83 -83 -83 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -143 -143 -143 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -154 -146 -146 -168 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -140 -136 -136 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -217 -217 -217 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -63 -63 -217 -217 -217 -255 -255 -255 -255 -255 -255 -255 -255 -255 -209 -209 -209 -35 -35 -35 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -63 -63 -63 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -173 -173 -173 -255 -255 -255 -255 -255 -255 -255 -255 -255 -241 -241 -241 -113 -113 -113 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -70 -69 -69 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -194 -194 -194 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -122 -119 -119 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -5 -5 -5 -65 -65 -65 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -117 -112 -112 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -117 -112 -112 -60 -56 -56 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -106 -104 -104 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -178 -178 -178 -255 -255 -255 -255 -255 -255 -255 -255 -255 -242 -242 -242 -113 -113 -113 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -95 -95 -95 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -175 -175 -175 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -116 -116 -116 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -219 -219 -219 -255 -255 -255 -255 -255 -255 -255 -255 -255 -230 -230 -230 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -30 -30 -30 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -221 -221 -221 -47 -47 -47 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -82 -79 -79 -170 -161 -161 -171 -162 -162 -171 -162 -162 -170 -161 -161 -106 -104 -104 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -59 -59 -59 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -168 -160 -160 -117 -112 -112 -19 -19 -20 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -106 -104 -104 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -33 -32 -32 -0 -0 -0 -47 -47 -47 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -89 -86 -86 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -128 -128 -128 -254 -254 -254 -255 -255 -255 -255 -255 -255 -252 -252 -252 -158 -158 -158 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -139 -139 -139 -253 -253 -253 -255 -255 -255 -255 -255 -255 -253 -253 -253 -140 -136 -136 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -171 -171 -171 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -215 -215 -215 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -209 -209 -209 -255 -255 -255 -255 -255 -255 -255 -255 -255 -237 -237 -237 -106 -104 -104 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -43 -41 -41 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -140 -136 -136 -40 -39 -39 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -38 -35 -35 -143 -143 -143 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -127 -120 -120 -38 -35 -35 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -7 -7 -74 -73 -73 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -163 -154 -154 -56 -54 -54 -1 -1 -1 -0 -0 -0 -1 -0 -0 -90 -90 -90 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -145 -140 -140 -60 -56 -56 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -74 -73 -73 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -205 -205 -205 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -38 -38 -38 -204 -204 -204 -255 -255 -255 -255 -255 -255 -255 -255 -255 -239 -239 -239 -95 -95 -95 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -49 -49 -49 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -122 -119 -119 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -139 -139 -139 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -169 -169 -169 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -127 -120 -120 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -90 -90 -90 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -31 -30 -30 -127 -120 -120 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -145 -140 -140 -47 -47 -47 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -47 -47 -47 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -168 -160 -160 -98 -96 -96 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -117 -112 -112 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -133 -129 -129 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -202 -202 -202 -255 -255 -255 -255 -255 -255 -255 -255 -255 -245 -245 -245 -119 -119 -119 -9 -9 -9 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -108 -108 -108 -248 -248 -248 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -244 -244 -244 -128 -128 -128 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -35 -35 -35 -200 -200 -200 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -113 -113 -113 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -63 -63 -63 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -89 -86 -86 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -74 -70 -70 -163 -154 -154 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -112 -108 -108 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -56 -54 -54 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -122 -119 -119 -169 -160 -160 -171 -162 -162 -171 -162 -162 -169 -160 -160 -122 -119 -119 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -43 -41 -41 -138 -134 -134 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -112 -108 -108 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -117 -117 -117 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -228 -228 -228 -74 -73 -73 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -47 -47 -47 -237 -237 -237 -255 -255 -255 -255 -255 -255 -255 -255 -255 -247 -247 -247 -138 -134 -134 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -217 -217 -217 -74 -73 -73 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -143 -143 -143 -247 -247 -247 -255 -255 -255 -255 -255 -255 -255 -255 -255 -233 -233 -233 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -16 -18 -19 -151 -151 -151 -250 -250 -250 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -70 -69 -69 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -8 -8 -8 -19 -19 -20 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -112 -108 -108 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -53 -53 -53 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -9 -9 -9 -35 -33 -33 -74 -73 -73 -38 -38 -38 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -17 -16 -16 -105 -100 -100 -167 -158 -158 -170 -161 -161 -171 -162 -162 -171 -162 -162 -158 -151 -151 -74 -73 -73 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -106 -104 -104 -170 -161 -161 -171 -162 -162 -171 -162 -162 -170 -161 -161 -138 -134 -134 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -59 -59 -59 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -81 -76 -76 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -49 -49 -49 -196 -196 -196 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -204 -204 -204 -53 -53 -53 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -53 -53 -53 -186 -186 -186 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -210 -210 -210 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -186 -186 -186 -56 -54 -54 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -108 -108 -108 -227 -227 -227 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -138 -134 -134 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -65 -65 -65 -209 -209 -209 -254 -254 -254 -255 -255 -255 -255 -255 -255 -254 -254 -254 -207 -207 -207 -70 -69 -69 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -47 -47 -47 -117 -117 -117 -128 -128 -128 -25 -24 -24 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -46 -44 -44 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -154 -146 -146 -89 -86 -86 -38 -38 -38 -9 -9 -9 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -9 -9 -9 -27 -26 -26 -56 -54 -54 -90 -90 -90 -145 -140 -140 -154 -146 -146 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -81 -76 -76 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -158 -151 -151 -89 -86 -86 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -66 -62 -62 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -65 -65 -65 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -7 -6 -6 -83 -83 -83 -169 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -143 -143 -143 -53 -53 -53 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -6 -6 -6 -106 -104 -104 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -95 -95 -95 -23 -22 -22 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -19 -19 -20 -93 -93 -93 -194 -194 -194 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -106 -104 -104 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -223 -223 -223 -255 -255 -255 -251 -251 -251 -196 -196 -196 -76 -76 -76 -13 -13 -13 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -32 -31 -31 -138 -134 -134 -228 -228 -228 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -196 -196 -196 -42 -42 -42 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -108 -108 -108 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -214 -214 -214 -133 -133 -133 -53 -53 -53 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -8 -8 -8 -35 -35 -35 -89 -86 -86 -143 -143 -143 -198 -198 -198 -247 -247 -247 -180 -180 -180 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -56 -54 -54 -158 -151 -151 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -138 -134 -134 -105 -100 -100 -74 -70 -70 -49 -49 -49 -40 -39 -39 -35 -33 -33 -38 -35 -35 -46 -44 -44 -59 -59 -59 -81 -76 -76 -106 -104 -104 -133 -129 -129 -154 -146 -146 -169 -160 -160 -171 -162 -162 -154 -146 -146 -53 -53 -53 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -133 -129 -129 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -95 -95 -95 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -74 -70 -70 -70 -69 -69 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -43 -41 -41 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -95 -95 -95 -11 -10 -11 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -127 -120 -120 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -127 -120 -120 -32 -31 -31 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -143 -143 -143 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -234 -234 -234 -192 -192 -192 -133 -133 -133 -83 -83 -83 -74 -73 -73 -83 -83 -83 -126 -126 -126 -190 -190 -190 -233 -233 -233 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -169 -169 -169 -12 -12 -12 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -108 -108 -108 -245 -245 -245 -255 -255 -255 -254 -254 -254 -228 -228 -228 -180 -180 -180 -122 -119 -119 -83 -83 -83 -74 -73 -73 -95 -95 -95 -143 -143 -143 -204 -204 -204 -245 -245 -245 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -227 -227 -227 -90 -90 -90 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -15 -15 -15 -128 -128 -128 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -245 -245 -245 -221 -221 -221 -180 -180 -180 -126 -126 -126 -93 -93 -93 -76 -76 -76 -74 -73 -73 -83 -83 -83 -106 -104 -104 -140 -136 -136 -175 -175 -175 -214 -214 -214 -233 -233 -233 -249 -249 -249 -255 -255 -255 -255 -255 -255 -180 -180 -180 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -66 -62 -62 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -171 -162 -162 -169 -160 -160 -158 -151 -151 -154 -146 -146 -143 -143 -143 -145 -140 -140 -143 -143 -143 -154 -146 -146 -158 -151 -151 -163 -154 -154 -169 -160 -160 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -154 -146 -146 -53 -53 -53 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -140 -136 -136 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -163 -154 -154 -154 -146 -146 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -117 -112 -112 -168 -160 -160 -171 -162 -162 -171 -162 -162 -171 -162 -162 -138 -134 -134 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -145 -140 -140 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -102 -100 -100 -13 -13 -13 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -157 -157 -157 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -240 -240 -240 -151 -151 -151 -23 -22 -22 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -13 -13 -13 -126 -126 -126 -239 -239 -239 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -222 -222 -222 -95 -95 -95 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -113 -113 -113 -226 -226 -226 -252 -252 -252 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -180 -180 -180 -27 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -38 -35 -35 -117 -112 -112 -158 -151 -151 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -170 -161 -161 -163 -154 -154 -133 -129 -129 -43 -41 -41 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -140 -136 -136 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -95 -95 -95 -167 -158 -158 -171 -162 -162 -171 -162 -162 -171 -162 -162 -145 -140 -140 -40 -39 -39 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -63 -60 -60 -154 -146 -146 -171 -162 -162 -171 -162 -162 -171 -162 -162 -167 -158 -158 -82 -79 -79 -3 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -118 -118 -118 -210 -210 -210 -249 -249 -249 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -253 -253 -253 -214 -214 -214 -122 -119 -119 -26 -26 -26 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -0 -0 -0 -25 -24 -24 -128 -128 -128 -224 -224 -224 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -210 -210 -210 -90 -90 -90 -7 -7 -7 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -9 -9 -9 -79 -79 -79 -175 -175 -175 -235 -235 -235 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -248 -248 -248 -214 -214 -214 -128 -128 -128 -16 -18 -19 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -118 -118 -118 -243 -243 -243 -255 -255 -255 -255 -255 -255 -255 -255 -255 -150 -150 -150 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -169 -169 -169 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -79 -79 -79 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -63 -60 -60 -117 -112 -112 -145 -140 -140 -167 -158 -158 -170 -161 -161 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -171 -162 -162 -169 -160 -160 -158 -151 -151 -140 -136 -136 -117 -112 -112 -81 -76 -76 -35 -35 -35 -5 -5 -5 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -138 -134 -134 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -168 -160 -160 -163 -154 -154 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -66 -62 -62 -154 -146 -146 -168 -160 -160 -168 -160 -160 -168 -160 -160 -154 -146 -146 -74 -70 -70 -6 -6 -6 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -12 -12 -12 -90 -90 -90 -158 -151 -151 -168 -160 -160 -168 -160 -160 -168 -160 -160 -158 -151 -151 -43 -41 -41 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -10 -10 -10 -63 -60 -60 -140 -136 -136 -217 -217 -217 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -250 -250 -250 -218 -218 -218 -151 -151 -151 -63 -63 -63 -10 -10 -10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -0 -0 -0 -0 -0 -0 -15 -15 -15 -82 -79 -79 -180 -180 -180 -240 -240 -240 -254 -254 -254 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -224 -224 -224 -148 -148 -148 -63 -63 -63 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -32 -31 -31 -93 -93 -93 -173 -173 -173 -227 -227 -227 -251 -251 -251 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -255 -254 -254 -254 -247 -247 -247 -215 -215 -215 -169 -169 -169 -117 -117 -117 -63 -63 -63 -22 -21 -21 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -116 -116 -116 -239 -239 -239 -250 -250 -250 -250 -250 -250 -250 -250 -250 -148 -148 -148 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -13 -13 -13 -165 -165 -165 -250 -250 -250 -250 -250 -250 -250 -250 -250 -250 -250 -250 -76 -76 -76 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -19 -19 -20 -46 -44 -44 -74 -70 -70 -98 -96 -96 -117 -112 -112 -133 -129 -129 -140 -136 -136 -140 -136 -136 -138 -134 -134 -133 -129 -129 -117 -112 -112 -105 -100 -100 -81 -76 -76 -60 -56 -56 -38 -35 -35 -17 -16 -16 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -53 -53 -53 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -63 -60 -60 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -53 -53 -53 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -22 -21 -21 -60 -56 -56 -66 -62 -62 -66 -62 -62 -66 -62 -62 -66 -62 -62 -35 -33 -33 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -13 -13 -13 -42 -42 -42 -83 -83 -83 -133 -133 -133 -169 -169 -169 -194 -194 -194 -200 -200 -200 -194 -194 -194 -175 -175 -175 -133 -133 -133 -83 -83 -83 -42 -42 -42 -17 -16 -16 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -42 -42 -42 -218 -218 -218 -255 -255 -255 -255 -255 -255 -255 -255 -255 -252 -252 -252 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -27 -26 -26 -63 -63 -63 -117 -117 -117 -165 -165 -165 -192 -192 -192 -200 -200 -200 -188 -188 -188 -158 -158 -158 -102 -100 -100 -47 -47 -47 -17 -16 -16 -2 -2 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -4 -4 -23 -22 -22 -47 -47 -47 -83 -83 -83 -133 -133 -133 -169 -169 -169 -190 -190 -190 -200 -200 -200 -200 -200 -200 -190 -190 -190 -171 -171 -171 -143 -143 -143 -108 -108 -108 -63 -63 -63 -38 -38 -38 -23 -22 -22 -8 -8 -8 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -23 -22 -22 -47 -47 -47 -49 -49 -49 -49 -49 -49 -49 -49 -49 -30 -28 -28 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -2 -33 -32 -32 -49 -49 -49 -49 -49 -49 -49 -49 -49 -49 -49 -49 -15 -15 -15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -3 -3 -3 -10 -10 -10 -16 -18 -19 -22 -21 -21 -25 -24 -24 -25 -24 -24 -25 -24 -24 -22 -21 -21 -17 -16 -16 -12 -12 -12 -4 -4 -4 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0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 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/packages/linux/linux-ezx/pxa-serial-gcc4.diff b/packages/linux/linux-ezx/pxa-serial-gcc4.diff deleted file mode 100644 index 7f827965e9..0000000000 --- a/packages/linux/linux-ezx/pxa-serial-gcc4.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- /tmp/pxa.c 2006-08-29 10:51:57.000000000 +0200 -+++ linux-2.6.16/drivers/serial/pxa.c 2006-08-29 10:52:38.545780000 +0200 -@@ -241,7 +241,7 @@ - /* - * This handles the interrupt from one port. - */ --static inline irqreturn_t -+inline irqreturn_t - serial_pxa_irq(int irq, void *dev_id, struct pt_regs *regs) - { - struct uart_pxa_port *up = (struct uart_pxa_port *)dev_id; diff --git a/packages/linux/linux-ezx/sa1100-rtc-gcc4.diff b/packages/linux/linux-ezx/sa1100-rtc-gcc4.diff deleted file mode 100644 index 6fd54ece3a..0000000000 --- a/packages/linux/linux-ezx/sa1100-rtc-gcc4.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- /tmp/sa1100-rtc.c 2006-08-29 10:51:48.000000000 +0200 -+++ linux-2.6.16/drivers/char/sa1100-rtc.c 2006-08-29 10:52:14.995780000 +0200 -@@ -126,7 +126,7 @@ - tval->tm_mday = days + 1; - } - --static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) -+irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) - { - unsigned int rtsr = RTSR; - diff --git a/packages/linux/linux-ezx/wyrm-ts.diff b/packages/linux/linux-ezx/wyrm-ts.diff deleted file mode 100644 index a7ec75613c..0000000000 --- a/packages/linux/linux-ezx/wyrm-ts.diff +++ /dev/null @@ -1,119 +0,0 @@ ---- /tmp/pcap_ts.c 2007-02-04 16:55:21.000000000 -0200 -+++ linux-2.6.16/drivers/input/touchscreen/pcap_ts.c 2007-02-04 18:47:58.000000000 -0200 -@@ -31,7 +31,7 @@ - - #include "../../misc/ezx/ssp_pcap.h" - --#if 1 -+#if 0 - #define DEBUGP(x, args ...) printk(KERN_DEBUG "%s: " x, __FUNCTION__, ## args) - #else - #define DEBUGP(x, args ...) -@@ -39,6 +39,7 @@ - - #define PRESSURE 1 - #define COORDINATE 2 -+#define STANDBY 3 - - struct pcap_ts { - int irq_xy; -@@ -97,7 +98,7 @@ - int ret; - u_int32_t tmp; - DEBUGP("start xy read in mode %s\n", -- pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ pcap_ts->read_state == COORDINATE ? "COORD" : (pcap_ts->read_state == PRESSURE ? "PRESS" : "STANDBY")); - - ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC1_REGISTER, &tmp); - if (ret < 0) -@@ -122,7 +123,7 @@ - u_int32_t tmp; - - DEBUGP("get xy value in mode %s\n", -- pcap_ts->read_state == COORDINATE ? "COORD" : "PRESS"); -+ pcap_ts->read_state == COORDINATE ? "COORD" : (pcap_ts->read_state == PRESSURE ? "PRESS" : "STANDBY")); - - ret = ezx_pcap_read(SSP_PCAP_ADJ_ADC2_REGISTER, &tmp); - if (ret < 0) -@@ -145,7 +146,16 @@ - static irqreturn_t pcap_ts_irq_xy(int irq, void *dev_id, struct pt_regs *regs) - { - struct pcap_ts *pcap_ts = dev_id; -+// DEBUGP("read_state: %d\n", pcap_ts->read_state); - -+ /* -+ * Ignore further read interrupts after we set STANDBY - WM -+ */ -+ if (pcap_ts->read_state == STANDBY) -+ { -+ DEBUGP("ignored\n"); -+ return IRQ_HANDLED; -+ } - if (pcap_ts_get_xy_value(pcap_ts) < 0) { - printk("pcap_ts: error reading XY value\n"); - return IRQ_HANDLED; -@@ -160,33 +170,32 @@ - pcap_ts->pressure <= PRESSURE_MIN ) && - pcap_ts->pressure == pcap_ts->pressure_last) { - /* pen has been released */ -+ DEBUGP("UP\n"); - input_report_key(pcap_ts->input, BTN_TOUCH, 0); -- input_sync(pcap_ts->input); -- - input_report_abs(pcap_ts->input, ABS_PRESSURE, 0); -+ input_sync(pcap_ts->input); - - pcap_ts->x = pcap_ts->y = 0; - -+ /* no need for timer, we'll get interrupted with -+ * next touch down event */ -+ del_timer(&pcap_ts->timer); -+ - /* ask PCAP2 to interrupt us if touch event happens - * again */ -- pcap_ts->read_state = PRESSURE; -+ pcap_ts->read_state = STANDBY; - pcap_ts_mode(PCAP_TS_STANDBY_MODE); - ezx_pcap_bit_set(SSP_PCAP_ADJ_BIT_MSR_TSM, 0); -- -- /* no need for timer, we'll get interrupted with -- * next touch down event */ -- del_timer(&pcap_ts->timer); - } else { - /* pen has been touched down */ -+ DEBUGP("DOWN\n"); -+ - input_report_key(pcap_ts->input, BTN_TOUCH, 1); - /* don't input_sync(), we don't know position yet */ - - if (pcap_ts->pressure == 0) - pcap_ts->pressure = pcap_ts->pressure_last; - -- input_report_abs(pcap_ts->input, ABS_PRESSURE, -- pcap_ts->pressure); -- - /* switch state machine into coordinate read mode */ - pcap_ts->read_state = COORDINATE; - pcap_ts_mode(PCAP_TS_POSITION_XY_MEASUREMENT); -@@ -196,18 +205,14 @@ - /* we are in coordinate mode */ - if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX || - pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) { -- DEBUGP("invalid x/y coordinate position: PEN_UP?\n"); -- -+ DEBUGP("PEN_UP?\n"); - pcap_ts->pressure = 0; --#if 0 -- input_report_key(pcap_ts->input, BTN_TOUCH, 0); -- pcap_ts->x = pcap_ts->y = 0; --#endif - } else { -+ input_report_abs(pcap_ts->input, ABS_PRESSURE, pcap_ts->pressure); - input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x); - input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y); -+ input_sync(pcap_ts->input); - } -- input_sync(pcap_ts->input); - - /* switch back to pressure read mode */ - pcap_ts->read_state = PRESSURE; diff --git a/packages/linux/linux-ezx_2.6.16.13.bb b/packages/linux/linux-ezx_2.6.16.13.bb deleted file mode 100644 index 1e6d3e2506..0000000000 --- a/packages/linux/linux-ezx_2.6.16.13.bb +++ /dev/null @@ -1,110 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for the Motorola GSM phones A780 and E680" -SECTION = "kernel" -AUTHOR = "Harald Welte and the OpenEZX Team " -HOMEPAGE = "http://www.openezx.org" -LICENSE = "GPL" -DEPENDS += "quilt-native" -EZX = "ezx9" -PR = "${EZX}-r2" - -inherit kernel - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-ezx" -RPSRC = "http://www.rpsys.net/openzaurus/patches/archive" - -############################################################## -# source and patches -# -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2 \ - http://www.openezx.org/download/patches-2.6.16-2.6.16.13-${EZX}.tar.bz2 \ - \ - file://logo_linux_clut224.ppm \ - file://defconfig-a780 \ - file://defconfig-e680 \ - file://wyrm-ts.diff;patch=1" -S = "${WORKDIR}/linux-2.6.16" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_HOST = "arm.*-linux" -COMPATIBLE_MACHINE = '(a780|e680)' - -CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 noinitrd" -CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} mem=32M@0xA0000000 mem=16M@0xAC000000" - -############################################################### -# module configs specific to this kernel -# -module_autoload_pxaficp_ir = "pxaficp_ir" -module_autoload_snd-pcm-oss = "snd-pcm-oss" - -do_ezxpatch() { - mv ${WORKDIR}/patches ${S} && cd ${S} && quilt push -av - rm -Rf patches .pc -} - -do_configure() { - install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# check the kernel is below the 1024*1024 byte limit for the boot-over usb -# -do_compile_append() { - size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` - if [ $size -ge 1294336 ]; then - rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} - echo "Size is $size" - die "This kernel is too big for your EZX Phone. Please reduce the size of the kernel by making more of it modular." - fi -} - -############################################################### -# put into deploy directory -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${MACHINE}.tgz -C ${D} lib -} - -do_deploy[dirs] = "${S}" - -addtask deploy before do_package after do_install -addtask ezxpatch before do_patch after do_unpack diff --git a/packages/linux/linux-ezx_2.6.19+2.6.20-rc2.bb b/packages/linux/linux-ezx_2.6.19+2.6.20-rc2.bb deleted file mode 100644 index b5202fc0f5..0000000000 --- a/packages/linux/linux-ezx_2.6.19+2.6.20-rc2.bb +++ /dev/null @@ -1,125 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for the Motorola GSM phones A780 and E680" -SECTION = "kernel" -AUTHOR = "Harald Welte and the OpenEZX Team " -HOMEPAGE = "http://www.openezx.org" -LICENSE = "GPL" -DEPENDS += "quilt-native" -EZX = "ezx0" -PR = "${EZX}-r2" - -DEFAULT_PREFERENCE = "-1" -DEFAULT_PREFERENCE_rokr-e2 = "1" - -inherit kernel - -KERNEL_RELEASE = "2.6.20-rc2" - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-ezx" - -RPSRC = "http://www.rpsys.net/openzaurus/patches/archive" -DMSRC = "http://people.openezx.org/dotmonkey/patch" - -############################################################## -# source and patches -# -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.19.tar.bz2 \ - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/patch-2.6.20-rc2.bz2;patch=1 \ - ${DMSRC}/Kconfig.patch;patch=1;pnum=5 \ - ${DMSRC}/Makefile.patch;patch=1;pnum=5 \ - ${DMSRC}/head-xscale.S.patch;patch=1;pnum=5 \ - ${DMSRC}/sumatra.c.patch;patch=1;pnum=1 \ - ${DMSRC}/uncompress.h.patch;patch=1;pnum=5 \ - file://logo_linux_clut224.ppm \ - file://defconfig-${MACHINE} \ - file://wyrm-ts.diff;patch=1" - -S = "${WORKDIR}/linux-2.6.19" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_HOST = "arm.*-linux" -COMPATIBLE_MACHINE = '(a780|e680|a1200|rokr-e2)' - -CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 noinitrd" -CMDLINE_CON_rokr-e2 = "video=pxafb:mode:240x320-8,active console=ttyS2,115200n8 console=tty1" - -CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} mem=32M@0xA0000000 mem=16M@0xAC000000" -CMDLINE_rokr-e2 = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG}" - -############################################################### -# module configs specific to this kernel -# -module_autoload_pxaficp_ir = "pxaficp_ir" -module_autoload_snd-pcm-oss = "snd-pcm-oss" - -do_ezxpatch() { - #mv ${WORKDIR}/patches ${S} && cd ${S} && quilt push -av - #rm -Rf patches .pc - : -} - -do_configure() { - install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# check the kernel is below the 1024*1024 byte limit for the boot-over usb -# -do_compile_append() { - size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` - if [ $size -ge 1294336 ]; then - rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} - echo "Size is $size" - die "This kernel is too big for your EZX Phone. Please reduce the size of the kernel by making more of it modular." - fi -} - -############################################################### -# put into deploy directory -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${MACHINE}.tgz -C ${D} lib -} - -do_deploy[dirs] = "${S}" - -addtask deploy before do_package after do_install -addtask ezxpatch before do_patch after do_unpack diff --git a/packages/linux/linux-ezx_2.6.20.7.bb b/packages/linux/linux-ezx_2.6.20.7.bb deleted file mode 100644 index 7336fee762..0000000000 --- a/packages/linux/linux-ezx_2.6.20.7.bb +++ /dev/null @@ -1,125 +0,0 @@ -DESCRIPTION = "2.6 Linux Development Kernel for the Motorola GSM phones A780 and E680" -SECTION = "kernel" -AUTHOR = "Harald Welte and the OpenEZX Team " -HOMEPAGE = "http://www.openezx.org" -LICENSE = "GPL" -DEPENDS += "quilt-native" -EZX = "ezx0" -PR = "${EZX}-r0" - -DEFAULT_PREFERENCE = "-1" - - -inherit kernel - -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-ezx" -RPSRC = "http://www.rpsys.net/openzaurus/patches/archive" - -############################################################## -# source and patches -# -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.20.7.tar.bz2 \ - \ - file://ezx-core.patch;patch=1 \ - file://ezx-pcap.patch;patch=1 \ - file://ezx-mci.patch;patch=1 \ - file://usb_pxa27x_udc-r3.patch;patch=1 \ - file://usb_add_epalloc-r3.patch;patch=1 \ - file://ezx-emu.patch;patch=1 \ - file://ezx-fix-usb_pxa27x_udc-r3.patch;patch=1 \ - file://ezx-mtd-map.patch;patch=1 \ - file://ezx-serial-bug-workaround.patch;patch=1 \ - file://mux_cli.patch;patch=1 \ - file://mux-fix.patch;patch=1 \ - file://mux-fix-init-errorpath.patch;patch=1 \ - file://mux-remove-flipbuffers.patch;patch=1 \ - file://mux-remove-get_halted_bit.patch;patch=1 \ - file://mux-remove-usbh_finished_resume.patch;patch=1 \ - file://mux-fix-makefile.patch;patch=1 \ - file://mux-fix-tty-driver.patch;patch=1 \ - \ - file://logo_linux_clut224.ppm \ - file://defconfig-a780 \ - file://defconfig-e680 \ - " - -S = "${WORKDIR}/linux-2.6.20.7" - -############################################################## -# kernel image resides on a seperate flash partition (for now) -# -FILES_kernel-image = "" -ALLOW_EMPTY = "1" - -COMPATIBLE_HOST = "arm.*-linux" -COMPATIBLE_MACHINE = '(a780|e680)' - -CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 noinitrd" -CMDLINE_ROOT = "root=/dev/mmcblk0p1 rootfstype=ext3 rootdelay=5" -# uncomment if you want to boot over NFS -#CMDLINE_ROOT = "root=/dev/nfs nfsroot=192.168.1.10:/export/opie-image rootdelay=5 3" -# uncomment to enable dyntick -#CMDLINE_OTHER = "dyntick=enable" -CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' -CMDLINE_IP = "ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off" -CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDLINE_OTHER} ${CMDLINE_DEBUG} mem=32M@0xA0000000 mem=16M@0xAC000000" - -############################################################### -# module configs specific to this kernel -# -module_autoload_pxaficp_ir = "pxaficp_ir" -module_autoload_snd-pcm-oss = "snd-pcm-oss" - -do_configure() { - install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then - die "No default configuration for ${MACHINE} available." - fi - - echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config - - if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then - echo "CONFIG_AEABI=y" >> ${S}/.config - echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config - else - echo "# CONFIG_AEABI is not set" >> ${S}/.config - echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config - fi - - sed -e '/CONFIG_AEABI/d' \ - -e '/CONFIG_OABI_COMPAT=/d' \ - -e '/CONFIG_CMDLINE=/d' \ - -e '/CONFIG_MTD_MTDRAM_SA1100=/d' \ - -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ - -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' - - yes '' | oe_runmake oldconfig -} - -############################################################### -# check the kernel is below the 1024*1024 byte limit for the boot-over usb -# -do_compile_append() { - size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` - if [ $size -ge 1294336 ]; then - rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} - echo "Size is $size" - echo "This kernel is too big for your EZX Phone. Please reduce the size of the kernel by making more of it modular." - fi -} - -############################################################### -# put into deploy directory -# -do_deploy() { - install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${MACHINE}.tgz -C ${D} lib -} - -do_deploy[dirs] = "${S}" - -addtask deploy before do_package after do_install diff --git a/packages/linux/linux-ezx_2.6.21.bb b/packages/linux/linux-ezx_2.6.21.bb index 80c0122504..8b111a2c44 100644 --- a/packages/linux/linux-ezx_2.6.21.bb +++ b/packages/linux/linux-ezx_2.6.21.bb @@ -4,52 +4,59 @@ AUTHOR = "Harald Welte and the OpenEZX Team " HOMEPAGE = "http://www.openezx.org" LICENSE = "GPL" DEPENDS += "quilt-native" -EZX = "ezx0" -PR = "${EZX}-r5" +EZX = "ezxdev" +PR = "${EZX}-r6" inherit kernel -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-ezx" -RPSRC = "http://www.rpsys.net/openzaurus/patches/archive" - ############################################################## # source and patches # SRC_URI = " \ - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ - file://ezx-core.patch;patch=1 \ - file://ezx-bp.patch;patch=1 \ - file://ezx-pm.patch;patch=1 \ - file://ezx-pcap.patch;patch=1 \ - file://a780-mci.patch;patch=1 \ - file://e680-mci.patch;patch=1 \ - file://pxa27x-udc-support.2.patch;patch=1 \ - file://ezx-emu.patch;patch=1 \ - file://ezx-mtd-map.patch;patch=1 \ - file://ezx-serial-bug-workaround.patch;patch=1 \ - file://pxa-kbd.patch;patch=1 \ - file://a780-kbd.patch;patch=1 \ - file://e680-kbd.patch;patch=1 \ - file://pcap-ts.patch;patch=1 \ - file://ezx-backlight.patch;patch=1 \ - file://a780-flip.patch;patch=1 \ - file://e680-locksw.patch;patch=1 \ - file://a780-leds.patch;patch=1 \ - file://e680-leds.patch;patch=1 \ - file://a780-vibrator.patch;patch=1 \ - file://mux_cli.patch;patch=1 \ - file://mux-fix.patch;patch=1 \ - file://mux-fix-init-errorpath.patch;patch=1 \ - file://mux-remove-flipbuffers.patch;patch=1 \ - file://mux-remove-get_halted_bit.patch;patch=1 \ - file://mux-remove-usbh_finished_resume.patch;patch=1 \ - file://mux-fix-makefile.patch;patch=1 \ - file://mux-fix-tty-driver.patch;patch=1 \ - file://mux-linux-2.6.21-fix.patch;patch=1 \ - file://logo_linux_clut224.ppm \ - file://defconfig-a780 \ - file://defconfig-e680 \ - " + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ + file://logo_linux_clut224.ppm \ + \ + file://patches/patch-2.6.21.4;patch=1 \ + file://patches/ezx-core.patch;patch=1 \ + file://patches/ezx-bp.patch;patch=1 \ + file://patches/ezx-pm.patch;patch=1 \ + file://patches/ezx-pcap.patch;patch=1 \ + file://patches/a780-mci.patch;patch=1 \ + file://patches/e680-mci.patch;patch=1 \ + file://patches/a1200-mci.patch;patch=1 \ + file://patches/pxa27x-udc-support.2.patch;patch=1 \ + file://patches/ezx-emu.patch;patch=1 \ + file://patches/ezx-mtd-map.patch;patch=1 \ + file://patches/ezx-serial-bug-workaround.patch;patch=1 \ + file://patches/pxa-kbd.patch;patch=1 \ + file://patches/a780-kbd.patch;patch=1 \ + file://patches/e680-kbd.patch;patch=1 \ + file://patches/pcap-ts.patch;patch=1 \ + file://patches/a780-ts.patch;patch=1 \ + file://patches/e680-ts.patch;patch=1 \ + file://patches/a1200-ts.patch;patch=1 \ + file://patches/ezx-backlight.patch;patch=1 \ + file://patches/a780-flip.patch;patch=1 \ + file://patches/e680-locksw.patch;patch=1 \ + file://patches/a780-leds.patch;patch=1 \ + file://patches/e680-leds.patch;patch=1 \ + file://patches/a780-vibrator.patch;patch=1 \ + file://patches/mux_cli.patch;patch=1 \ + file://patches/mux-fix.patch;patch=1 \ + file://patches/mux-fix-init-errorpath.patch;patch=1 \ + file://patches/mux-remove-flipbuffers.patch;patch=1 \ + file://patches/mux-remove-get_halted_bit.patch;patch=1 \ + file://patches/mux-remove-usbh_finished_resume.patch;patch=1 \ + file://patches/mux-fix-makefile.patch;patch=1 \ + file://patches/mux-fix-tty-driver.patch;patch=1 \ + file://patches/mux-linux-2.6.21-fix.patch;patch=1 \ + file://patches/defconfig-a1200 \ + file://patches/defconfig-a780 \ + file://patches/defconfig-e2 \ + file://patches/defconfig-e6 \ + file://patches/defconfig-e680 \ + \ + " S = "${WORKDIR}/linux-${PV}" @@ -61,7 +68,7 @@ FILES_kernel-image = "" ALLOW_EMPTY = "1" COMPATIBLE_HOST = "arm.*-linux" -COMPATIBLE_MACHINE = '(a780|e680)' +COMPATIBLE_MACHINE = '(a780|e680|a1200)' # For now the code for serial console is disabled in compress.c #CMDLINE_CON = "console=ttyS2,115200n8 console=tty1 noinitrd" @@ -79,13 +86,13 @@ CMDLINE = "${CMDLINE_CON} ${CMDLINE_ROOT} ${CMDLINE_IP} ${CMDLINE_ROTATE} ${CMDL ############################################################### # module configs specific to this kernel # -module_autoload_pxaficp_ir = "pxaficp_ir" -module_autoload_snd-pcm-oss = "snd-pcm-oss" +#module_autoload_pxaficp_ir = "pxaficp_ir" +#module_autoload_snd-pcm-oss = "snd-pcm-oss" do_configure() { install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm - if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then + if [ ! -e ${WORKDIR}/patches/defconfig-${MACHINE} ]; then die "No default configuration for ${MACHINE} available." fi @@ -99,6 +106,13 @@ do_configure() { echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config fi + # + # Logo configuration + # + echo "CONFIG_LOGO=y" >> ${S}/.config + echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config + + sed -e '/CONFIG_AEABI/d' \ -e '/CONFIG_OABI_COMPAT=/d' \ -e '/CONFIG_CMDLINE=/d' \ @@ -106,7 +120,9 @@ do_configure() { -e '/CONFIG_MTDRAM_TOTAL_SIZE=/d' \ -e '/CONFIG_MTDRAM_ERASE_SIZE=/d' \ -e '/CONFIG_MTDRAM_ABS_POS=/d' \ - '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config' + -e '/CONFIG_LOGO=/d' \ + -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \ + '${WORKDIR}/patches/defconfig-${MACHINE}' >>'${S}/.config' yes '' | oe_runmake oldconfig } @@ -128,10 +144,10 @@ do_compile_append() { # do_deploy() { install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin - tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${MACHINE}.tgz -C ${D} lib + install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin + tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${PV}-${PR}-${MACHINE}-${DATETIME}.tgz -C ${D} lib } do_deploy[dirs] = "${S}" -addtask deploy before do_populate_staging after do_package +addtask deploy before do_package after do_install -- cgit v1.2.3