From 28245d5cc96ca677f9951af86f1a6f93c981d3a4 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 8 Mar 2008 15:40:32 +0000 Subject: ncurses 5.4 revamp packaging. closes #1262 --- packages/ncurses/ncurses.inc | 35 +++++++++++++++++++++++++++-------- packages/ncurses/ncurses_5.3.bb | 11 ----------- packages/ncurses/ncurses_5.4.bb | 4 ++-- 3 files changed, 29 insertions(+), 21 deletions(-) delete mode 100644 packages/ncurses/ncurses_5.3.bb (limited to 'packages') diff --git a/packages/ncurses/ncurses.inc b/packages/ncurses/ncurses.inc index 2c6cfd05b0..abb9a65a67 100644 --- a/packages/ncurses/ncurses.inc +++ b/packages/ncurses/ncurses.inc @@ -21,6 +21,7 @@ EXTRA_OECONF = "--with-shared \ --without-cxx-binding \ --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \ --enable-overwrite" + export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}" export BUILD_LDFLAGS = "" export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"' @@ -80,11 +81,29 @@ pkg_prerm_ncurses-tools () { update-alternatives --remove reset reset.${PN} } -PACKAGES_prepend = "ncurses-tools " -PACKAGES_append = " ncurses-terminfo" -FILES_ncurses_append = " ${datadir}/tabset" -# This keeps only tput/tset in ncurses -# clear/reset are in already busybox -FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack " -FILES_ncurses-terminfo = "${datadir}/terminfo" -FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* ยง{datadir}/tabset ${sysconfdir}/terminfo" + +PACKAGES =+ "${PN}-ncurses ${PN}-panel ${PN}-menu ${PN}-form ${PN}-terminfo ${PN}-tools" +FILES_${PN}-ncurses = "${libdir}/libncurses.so.*" +FILES_${PN}-panel = "${libdir}/libpanel.so.*" +FILES_${PN}-menu = "${libdir}/libmenu.so.*" +FILES_${PN}-form = "${libdir}/libform.so.*" +FILES_${PN}-terminfo = "\ + ${libdir}/terminfo \ + ${datadir}/terminfo \ +" +FILES_${PN}-tools = "\ + ${bindir}/tic \ + ${bindir}/tack \ + ${bindir}/toe \ + ${bindir}/infotocap \ + ${bindir}/captoinfo \ + ${bindir}/infocmp \ + ${bindir}/clear.${PN} \ + ${bindir}/reset.${PN} \ +" +FILES_${PN} = "\ + ${bindir}/tput \ + ${bindir}/tset \ + ${datadir}/tabset \ + ${sysconfdir}/terminfo \ +" diff --git a/packages/ncurses/ncurses_5.3.bb b/packages/ncurses/ncurses_5.3.bb deleted file mode 100644 index 0b0897a409..0000000000 --- a/packages/ncurses/ncurses_5.3.bb +++ /dev/null @@ -1,11 +0,0 @@ -BaseV := "${PV}" -SnapV := "20030906" -PV = "${BaseV}.${SnapV}" -PR = "r2" - -SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${BaseV}.tar.gz \ - file://${SnapV}.patch;patch=1 \ - file://configure.patch;patch=1" -S = "${WORKDIR}/ncurses-${BaseV}" - -require ncurses.inc diff --git a/packages/ncurses/ncurses_5.4.bb b/packages/ncurses/ncurses_5.4.bb index f361d745b3..7a55baca4d 100644 --- a/packages/ncurses/ncurses_5.4.bb +++ b/packages/ncurses/ncurses_5.4.bb @@ -1,7 +1,7 @@ -PR = "r11" +PR = "r12" SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz \ - file://visibility.patch;patch=1" + file://visibility.patch;patch=1" S = "${WORKDIR}/ncurses-${PV}" require ncurses.inc -- cgit v1.2.3 From 10cfda3e6f4e0f07b201985ba58c08e8e0d7c64e Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 8 Mar 2008 15:43:27 +0000 Subject: gstreamer update: base 0.10.17, good 0.10.7, bad 0.10.6, ugly 0.10.7 --- packages/gstreamer/gst-plugins-bad_0.10.3.bb | 5 ----- packages/gstreamer/gst-plugins-bad_0.10.5.bb | 12 ------------ packages/gstreamer/gst-plugins-bad_0.10.6.bb | 10 ++++++++++ packages/gstreamer/gst-plugins-base_0.10.12.bb | 12 ------------ packages/gstreamer/gst-plugins-base_0.10.14.bb | 12 ------------ packages/gstreamer/gst-plugins-good_0.10.5.bb | 5 ----- packages/gstreamer/gst-plugins-good_0.10.6.bb | 5 ----- packages/gstreamer/gst-plugins-good_0.10.7.bb | 4 ++++ packages/gstreamer/gst-plugins-ugly_0.10.6.bb | 9 --------- packages/gstreamer/gst-plugins-ugly_0.10.7.bb | 10 ++++++++++ packages/gstreamer/gst-plugins.inc | 3 +++ packages/gstreamer/gstreamer_0.10.12.bb | 3 --- packages/gstreamer/gstreamer_0.10.14.bb | 3 --- 13 files changed, 27 insertions(+), 66 deletions(-) delete mode 100644 packages/gstreamer/gst-plugins-bad_0.10.3.bb delete mode 100644 packages/gstreamer/gst-plugins-bad_0.10.5.bb create mode 100644 packages/gstreamer/gst-plugins-bad_0.10.6.bb delete mode 100644 packages/gstreamer/gst-plugins-base_0.10.12.bb delete mode 100644 packages/gstreamer/gst-plugins-base_0.10.14.bb delete mode 100644 packages/gstreamer/gst-plugins-good_0.10.5.bb delete mode 100644 packages/gstreamer/gst-plugins-good_0.10.6.bb create mode 100644 packages/gstreamer/gst-plugins-good_0.10.7.bb delete mode 100644 packages/gstreamer/gst-plugins-ugly_0.10.6.bb create mode 100644 packages/gstreamer/gst-plugins-ugly_0.10.7.bb delete mode 100644 packages/gstreamer/gstreamer_0.10.12.bb delete mode 100644 packages/gstreamer/gstreamer_0.10.14.bb (limited to 'packages') diff --git a/packages/gstreamer/gst-plugins-bad_0.10.3.bb b/packages/gstreamer/gst-plugins-bad_0.10.3.bb deleted file mode 100644 index 3e487314be..0000000000 --- a/packages/gstreamer/gst-plugins-bad_0.10.3.bb +++ /dev/null @@ -1,5 +0,0 @@ -require gst-plugins.inc - -DEPENDS += "gst-plugins-base directfb" -SRC_URI += "file://cross-compile.patch;patch=1" -PR = "r6" diff --git a/packages/gstreamer/gst-plugins-bad_0.10.5.bb b/packages/gstreamer/gst-plugins-bad_0.10.5.bb deleted file mode 100644 index ce61d10010..0000000000 --- a/packages/gstreamer/gst-plugins-bad_0.10.5.bb +++ /dev/null @@ -1,12 +0,0 @@ -require gst-plugins.inc - -SRC_URI += "file://vorbisenc.h file://vorbisdec.h \ - file://gst-plugins-directfb-fix.patch;patch=1;pnum=2" -DEPENDS += "gst-plugins-base directfb" - -do_compile_prepend() { - # work around missing files in upstream tarball (upstream bug #454078) - install -m 0644 ${WORKDIR}/vorbis*.h ${S}/ext/ivorbis/ -} - -PR = "r1" diff --git a/packages/gstreamer/gst-plugins-bad_0.10.6.bb b/packages/gstreamer/gst-plugins-bad_0.10.6.bb new file mode 100644 index 0000000000..2a998589ac --- /dev/null +++ b/packages/gstreamer/gst-plugins-bad_0.10.6.bb @@ -0,0 +1,10 @@ +require gst-plugins.inc + +SRC_URI += "file://vorbisenc.h file://vorbisdec.h \ + file://gst-plugins-directfb-fix.patch;patch=1;pnum=2" +DEPENDS += "gst-plugins-base directfb" + +do_compile_prepend() { + # work around missing files in upstream tarball (upstream bug #454078) + install -m 0644 ${WORKDIR}/vorbis*.h ${S}/ext/ivorbis/ +} diff --git a/packages/gstreamer/gst-plugins-base_0.10.12.bb b/packages/gstreamer/gst-plugins-base_0.10.12.bb deleted file mode 100644 index 33b189a0ff..0000000000 --- a/packages/gstreamer/gst-plugins-base_0.10.12.bb +++ /dev/null @@ -1,12 +0,0 @@ -require gst-plugins.inc - -PROVIDES += "gst-plugins" - -# gst-plugins-base only builds the alsa plugin -# if alsa has been built and is present. You will -# not get an error if this is not present, just -# a missing alsa plugin -DEPENDS += "alsa-lib" - -PR = "r2" - diff --git a/packages/gstreamer/gst-plugins-base_0.10.14.bb b/packages/gstreamer/gst-plugins-base_0.10.14.bb deleted file mode 100644 index 33b189a0ff..0000000000 --- a/packages/gstreamer/gst-plugins-base_0.10.14.bb +++ /dev/null @@ -1,12 +0,0 @@ -require gst-plugins.inc - -PROVIDES += "gst-plugins" - -# gst-plugins-base only builds the alsa plugin -# if alsa has been built and is present. You will -# not get an error if this is not present, just -# a missing alsa plugin -DEPENDS += "alsa-lib" - -PR = "r2" - diff --git a/packages/gstreamer/gst-plugins-good_0.10.5.bb b/packages/gstreamer/gst-plugins-good_0.10.5.bb deleted file mode 100644 index e009145ead..0000000000 --- a/packages/gstreamer/gst-plugins-good_0.10.5.bb +++ /dev/null @@ -1,5 +0,0 @@ -require gst-plugins.inc - -EXTRA_OECONF += "--with-check=no" -DEPENDS += "gst-plugins-base" -PR = "r3" diff --git a/packages/gstreamer/gst-plugins-good_0.10.6.bb b/packages/gstreamer/gst-plugins-good_0.10.6.bb deleted file mode 100644 index e009145ead..0000000000 --- a/packages/gstreamer/gst-plugins-good_0.10.6.bb +++ /dev/null @@ -1,5 +0,0 @@ -require gst-plugins.inc - -EXTRA_OECONF += "--with-check=no" -DEPENDS += "gst-plugins-base" -PR = "r3" diff --git a/packages/gstreamer/gst-plugins-good_0.10.7.bb b/packages/gstreamer/gst-plugins-good_0.10.7.bb new file mode 100644 index 0000000000..e84c4801f1 --- /dev/null +++ b/packages/gstreamer/gst-plugins-good_0.10.7.bb @@ -0,0 +1,4 @@ +require gst-plugins.inc + +EXTRA_OECONF += "--with-check=no" +DEPENDS += "gst-plugins-base" diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb b/packages/gstreamer/gst-plugins-ugly_0.10.6.bb deleted file mode 100644 index c88a4db990..0000000000 --- a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb +++ /dev/null @@ -1,9 +0,0 @@ -require gst-plugins.inc - -DEPENDS += "gst-plugins-base mpeg2dec libsidplay" -PR = "r3" - -SRC_URI += "file://cross-compile.patch;patch=1 \ - file://gstmad_16bit.patch;patch=1 \ - file://gstsid_autofoo_HACK.patch;patch=1" - diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.7.bb b/packages/gstreamer/gst-plugins-ugly_0.10.7.bb new file mode 100644 index 0000000000..fd008b065a --- /dev/null +++ b/packages/gstreamer/gst-plugins-ugly_0.10.7.bb @@ -0,0 +1,10 @@ +require gst-plugins.inc +PR = "r0" + +DEPENDS += "gst-plugins-base mpeg2dec libsidplay" + +SRC_URI += "\ +# file://cross-compile.patch;patch=1 \ + file://gstmad_16bit.patch;patch=1 \ + file://gstsid_autofoo_HACK.patch;patch=1 \ +" diff --git a/packages/gstreamer/gst-plugins.inc b/packages/gstreamer/gst-plugins.inc index 8e8fd0f1ca..66546d5f2b 100644 --- a/packages/gstreamer/gst-plugins.inc +++ b/packages/gstreamer/gst-plugins.inc @@ -24,3 +24,6 @@ python populate_packages_prepend () { } ALLOW_EMPTY = "1" + +FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug" + diff --git a/packages/gstreamer/gstreamer_0.10.12.bb b/packages/gstreamer/gstreamer_0.10.12.bb deleted file mode 100644 index 49d7f37053..0000000000 --- a/packages/gstreamer/gstreamer_0.10.12.bb +++ /dev/null @@ -1,3 +0,0 @@ -require gstreamer.inc - -PR = "r1" \ No newline at end of file diff --git a/packages/gstreamer/gstreamer_0.10.14.bb b/packages/gstreamer/gstreamer_0.10.14.bb deleted file mode 100644 index 9e9ae62cb1..0000000000 --- a/packages/gstreamer/gstreamer_0.10.14.bb +++ /dev/null @@ -1,3 +0,0 @@ -require gstreamer.inc - -PR = "r0" -- cgit v1.2.3 From adcb597cd9bbb8e8326f64b67d46efd1b5bedb3d Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 8 Mar 2008 17:58:31 +0000 Subject: add libgee, a collection library providing GObject-based interfaces and classes for commonly used data structures. --- packages/libgee/.mtn2git_empty | 0 packages/libgee/files/.mtn2git_empty | 0 packages/libgee/files/no-tests.patch | 12 ++++++++++++ packages/libgee/libgee_0.1.2.bb | 12 ++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 packages/libgee/.mtn2git_empty create mode 100644 packages/libgee/files/.mtn2git_empty create mode 100644 packages/libgee/files/no-tests.patch create mode 100644 packages/libgee/libgee_0.1.2.bb (limited to 'packages') diff --git a/packages/libgee/.mtn2git_empty b/packages/libgee/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libgee/files/.mtn2git_empty b/packages/libgee/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libgee/files/no-tests.patch b/packages/libgee/files/no-tests.patch new file mode 100644 index 0000000000..d2d20b2c4e --- /dev/null +++ b/packages/libgee/files/no-tests.patch @@ -0,0 +1,12 @@ +Index: libgee-0.1.2/Makefile.am +=================================================================== +--- libgee-0.1.2.orig/Makefile.am ++++ libgee-0.1.2/Makefile.am +@@ -4,7 +4,6 @@ NULL = + + SUBDIRS = \ + gee \ +- tests \ + $(NULL) + + pkgconfigdir = $(libdir)/pkgconfig diff --git a/packages/libgee/libgee_0.1.2.bb b/packages/libgee/libgee_0.1.2.bb new file mode 100644 index 0000000000..4f6d113150 --- /dev/null +++ b/packages/libgee/libgee_0.1.2.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "libgee is a collection library providing GObject-based interfaces \ +and classes for commonly used data structures." +HOMEPAGE = "http://live.gnome.org/Libgee" +SECTION = "libs" +DEPENDS = "glib-2.0" +LICENSE = "LGPL" + +SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/libgee/0.1/libgee-${PV}.tar.bz2 \ + file://no-tests.patch;patch=1" + +inherit autotools pkgconfig + -- cgit v1.2.3 From 4184f49bebf401c7f61aa045b0265c509b64df15 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 8 Mar 2008 19:59:24 +0000 Subject: gnutls (all) fix pkgconfig file at the proper location --- packages/gnutls/gnutls.inc | 4 ++-- packages/gnutls/gnutls_1.4.5.bb | 2 +- packages/gnutls/gnutls_1.6.3.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/gnutls/gnutls.inc b/packages/gnutls/gnutls.inc index 781267093c..6400e80b11 100644 --- a/packages/gnutls/gnutls.inc +++ b/packages/gnutls/gnutls.inc @@ -7,10 +7,10 @@ SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2" inherit autotools binconfig pkgconfig -EXTRA_OECONF="--with-included-opencdk --with-included-libtasn1" +EXTRA_OECONF = "--with-included-opencdk --with-included-libtasn1" # fix wrong dependency -do_configure_append() { +do_configure_prepend() { sed -i s,gcrypt,libgcrypt, lib/gnutls.pc.in } diff --git a/packages/gnutls/gnutls_1.4.5.bb b/packages/gnutls/gnutls_1.4.5.bb index 4c247717ae..749064af65 100644 --- a/packages/gnutls/gnutls_1.4.5.bb +++ b/packages/gnutls/gnutls_1.4.5.bb @@ -1,3 +1,3 @@ require gnutls.inc -PR = "r2" +PR = "r3" diff --git a/packages/gnutls/gnutls_1.6.3.bb b/packages/gnutls/gnutls_1.6.3.bb index cc35d8b7a3..ce10a4b6cf 100644 --- a/packages/gnutls/gnutls_1.6.3.bb +++ b/packages/gnutls/gnutls_1.6.3.bb @@ -6,4 +6,4 @@ SRC_URI += "\ file://configure_madness.patch;patch=1 \ " -PR = "r5" +PR = "r6" -- cgit v1.2.3 From 206c032a38fc05f3ee97f6c1f6e5d68dc3f234b9 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 8 Mar 2008 20:10:28 +0000 Subject: add c-nc, a mastermind-style game in Gtk+ --- packages/c-nc/.mtn2git_empty | 0 packages/c-nc/c-nc_0.5.bb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 packages/c-nc/.mtn2git_empty create mode 100644 packages/c-nc/c-nc_0.5.bb (limited to 'packages') diff --git a/packages/c-nc/.mtn2git_empty b/packages/c-nc/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/c-nc/c-nc_0.5.bb b/packages/c-nc/c-nc_0.5.bb new file mode 100644 index 0000000000..b7d91621db --- /dev/null +++ b/packages/c-nc/c-nc_0.5.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "A Mastermind style game in GTK+" +SECTION = "x11/games" +LICENSE = "GPLv2" +HOMEPAGE = "http://freshmeat.net/projects/c-nc/" +DEPENDS = "gtk+" +AUTHOR = "Alexandru Scvortov " +PV = "0.5" + +inherit autotools + +SRC_URI = "http://c-nc.googlecode.com/files/c-nc-${PV}.tar.gz" + +do_install() { + install -d ${D}${bindir} ${D}${docdir}/c-nc + install -m 0755 ${S}/c-nc ${D}${bindir} + install -d ${D}${datadir}/applications/ + install -m 0755 ${S}/c-nc.desktop ${D}${datadir}/applications/ +} + -- cgit v1.2.3 From 25163fc22f92e9c3995fb5e9141261cf9caa2ced Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Sat, 8 Mar 2008 22:26:56 +0000 Subject: linux-mainstone: Add 2.6.25-rc4 for Mainstone including latest PXA27x love and keypad patch by Eric Miao. --- packages/linux/linux-mainstone/.mtn2git_empty | 0 .../linux/linux-mainstone/mainstone-keypad.patch | 7631 ++++++++++++++++++++ .../linux/linux-mainstone/mainstone/.mtn2git_empty | 0 packages/linux/linux-mainstone/mainstone/defconfig | 1608 +++++ packages/linux/linux-mainstone_2.6.25-rc4.bb | 25 + 5 files changed, 9264 insertions(+) create mode 100644 packages/linux/linux-mainstone/.mtn2git_empty create mode 100644 packages/linux/linux-mainstone/mainstone-keypad.patch create mode 100644 packages/linux/linux-mainstone/mainstone/.mtn2git_empty create mode 100644 packages/linux/linux-mainstone/mainstone/defconfig create mode 100644 packages/linux/linux-mainstone_2.6.25-rc4.bb (limited to 'packages') diff --git a/packages/linux/linux-mainstone/.mtn2git_empty b/packages/linux/linux-mainstone/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/linux-mainstone/mainstone-keypad.patch b/packages/linux/linux-mainstone/mainstone-keypad.patch new file mode 100644 index 0000000000..cad6289260 --- /dev/null +++ b/packages/linux/linux-mainstone/mainstone-keypad.patch @@ -0,0 +1,7631 @@ +diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.c linux-2.6.25-rc4/arch/arm/mach-pxa/devices.c +--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.c 2008-03-08 18:25:54.000000000 +0100 ++++ linux-2.6.25-rc4/arch/arm/mach-pxa/devices.c 2008-03-08 16:22:35.000000000 +0100 +@@ -396,6 +396,31 @@ + + #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) + ++static struct resource pxa27x_resource_keypad[] = { ++ [0] = { ++ .start = 0x41500000, ++ .end = 0x4150004c, ++ .flags = IORESOURCE_MEM, ++ }, ++ [1] = { ++ .start = IRQ_KEYPAD, ++ .end = IRQ_KEYPAD, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device pxa27x_device_keypad = { ++ .name = "pxa27x-keypad", ++ .id = -1, ++ .resource = pxa27x_resource_keypad, ++ .num_resources = ARRAY_SIZE(pxa27x_resource_keypad), ++}; ++ ++void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info) ++{ ++ pxa_register_device(&pxa27x_device_keypad, info); ++} ++ + static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32); + + static struct resource pxa27x_resource_ohci[] = { +diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.h linux-2.6.25-rc4/arch/arm/mach-pxa/devices.h +--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.h 2008-03-08 18:25:54.000000000 +0100 ++++ linux-2.6.25-rc4/arch/arm/mach-pxa/devices.h 2008-03-08 16:22:35.000000000 +0100 +@@ -14,6 +14,7 @@ + + extern struct platform_device pxa27x_device_i2c_power; + extern struct platform_device pxa27x_device_ohci; ++extern struct platform_device pxa27x_device_keypad; + + extern struct platform_device pxa25x_device_ssp; + extern struct platform_device pxa25x_device_nssp; +diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/mainstone.c linux-2.6.25-rc4/arch/arm/mach-pxa/mainstone.c +--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/mainstone.c 2008-03-08 18:25:54.000000000 +0100 ++++ linux-2.6.25-rc4/arch/arm/mach-pxa/mainstone.c 2008-03-08 16:11:42.000000000 +0100 +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + #include "generic.h" + #include "devices.h" +@@ -460,6 +461,72 @@ + .init = mainstone_ohci_init, + }; + ++#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) ++static unsigned int mainstone_matrix_keys[] = { ++ KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), ++ KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), ++ KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I), ++ KEY(3, 1, KEY_J), KEY(4, 1, KEY_K), KEY(5, 1, KEY_L), ++ KEY(0, 2, KEY_M), KEY(1, 2, KEY_N), KEY(2, 2, KEY_O), ++ KEY(3, 2, KEY_P), KEY(4, 2, KEY_Q), KEY(5, 2, KEY_R), ++ KEY(0, 3, KEY_S), KEY(1, 3, KEY_T), KEY(2, 3, KEY_U), ++ KEY(3, 3, KEY_V), KEY(4, 3, KEY_W), KEY(5, 3, KEY_X), ++ KEY(2, 4, KEY_Y), KEY(3, 4, KEY_Z), ++ ++ KEY(0, 4, KEY_DOT), /* . */ ++ KEY(1, 4, KEY_CLOSE), /* @ */ ++ KEY(4, 4, KEY_SLASH), ++ KEY(5, 4, KEY_BACKSLASH), ++ KEY(0, 5, KEY_HOME), ++ KEY(1, 5, KEY_LEFTSHIFT), ++ KEY(2, 5, KEY_SPACE), ++ KEY(3, 5, KEY_SPACE), ++ KEY(4, 5, KEY_ENTER), ++ KEY(5, 5, KEY_BACKSPACE), ++ ++ KEY(0, 6, KEY_UP), ++ KEY(1, 6, KEY_DOWN), ++ KEY(2, 6, KEY_LEFT), ++ KEY(3, 6, KEY_RIGHT), ++ KEY(4, 6, KEY_SELECT), ++}; ++ ++struct pxa27x_keypad_platform_data mainstone_keypad_info = { ++ .matrix_key_rows = 6, ++ .matrix_key_cols = 7, ++ .matrix_key_map = mainstone_matrix_keys, ++ .matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys), ++ ++ .enable_rotary0 = 1, ++ .rotary0_up_key = KEY_UP, ++ .rotary0_down_key = KEY_DOWN, ++ ++ .debounce_interval = 30, ++}; ++ ++static void __init mainstone_init_keypad(void) ++{ ++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* MKIN0 */ ++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* MKIN1 */ ++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* MKIN2 */ ++ pxa_gpio_mode( 97 | GPIO_ALT_FN_3_IN); /* MKIN3 */ ++ pxa_gpio_mode( 98 | GPIO_ALT_FN_3_IN); /* MKIN4 */ ++ pxa_gpio_mode( 99 | GPIO_ALT_FN_3_IN); /* MKIN5 */ ++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* MKOUT0 */ ++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* MKOUT1 */ ++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* MKOUT2 */ ++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* MKOUT3 */ ++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* MKOUT4 */ ++ pxa_gpio_mode(108 | GPIO_ALT_FN_2_OUT); /* MKOUT5 */ ++ pxa_gpio_mode( 93 | GPIO_ALT_FN_1_IN); /* DKIN0 */ ++ pxa_gpio_mode( 94 | GPIO_ALT_FN_1_IN); /* DKIN1 */ ++ ++ pxa_set_keypad_info(&mainstone_keypad_info); ++} ++#else ++static inline void mainstone_init_keypad(void) { } ++#endif ++ + static void __init mainstone_init(void) + { + int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */ +@@ -520,6 +587,8 @@ + pxa_set_mci_info(&mainstone_mci_platform_data); + pxa_set_ficp_info(&mainstone_ficp_platform_data); + pxa_set_ohci_info(&mainstone_ohci_platform_data); ++ ++ mainstone_init_keypad(); + } + + +diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa27x.c linux-2.6.25-rc4/arch/arm/mach-pxa/pxa27x.c +--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa27x.c 2008-03-08 18:25:54.000000000 +0100 ++++ linux-2.6.25-rc4/arch/arm/mach-pxa/pxa27x.c 2008-03-08 16:22:35.000000000 +0100 +@@ -151,7 +151,7 @@ + + INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev), + INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), +- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL), ++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), + + INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), + INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), +diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa3xx.c linux-2.6.25-rc4/arch/arm/mach-pxa/pxa3xx.c +--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa3xx.c 2008-03-08 18:25:54.000000000 +0100 ++++ linux-2.6.25-rc4/arch/arm/mach-pxa/pxa3xx.c 2008-03-08 16:22:35.000000000 +0100 +@@ -185,6 +185,7 @@ + PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), + PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), + PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), ++ PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), + + PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), + PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/akita.h linux-2.6.25-rc4/include/asm-arm/arch/akita.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/akita.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/akita.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,32 @@ ++/* ++ * Hardware specific definitions for SL-C1000 (Akita) ++ * ++ * Copyright (c) 2005 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. ++ * ++ */ ++ ++/* Akita IO Expander GPIOs */ ++ ++#define AKITA_IOEXP_RESERVED_7 (1 << 7) ++#define AKITA_IOEXP_IR_ON (1 << 6) ++#define AKITA_IOEXP_AKIN_PULLUP (1 << 5) ++#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) ++#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) ++#define AKITA_IOEXP_MIC_BIAS (1 << 2) ++#define AKITA_IOEXP_RESERVED_1 (1 << 1) ++#define AKITA_IOEXP_RESERVED_0 (1 << 0) ++ ++/* Direction Bitfield 0=output 1=input */ ++#define AKITA_IOEXP_IO_DIR 0 ++/* Default Values */ ++#define AKITA_IOEXP_IO_OUT (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP) ++ ++extern struct platform_device akitaioexp_device; ++ ++void akita_set_ioexp(struct device *dev, unsigned char bitmask); ++void akita_reset_ioexp(struct device *dev, unsigned char bitmask); ++ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/audio.h linux-2.6.25-rc4/include/asm-arm/arch/audio.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/audio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/audio.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,15 @@ ++#ifndef __ASM_ARCH_AUDIO_H__ ++#define __ASM_ARCH_AUDIO_H__ ++ ++#include ++#include ++ ++typedef struct { ++ int (*startup)(struct snd_pcm_substream *, void *); ++ void (*shutdown)(struct snd_pcm_substream *, void *); ++ void (*suspend)(void *); ++ void (*resume)(void *); ++ void *priv; ++} pxa2xx_audio_ops_t; ++ ++#endif +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/bitfield.h linux-2.6.25-rc4/include/asm-arm/arch/bitfield.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/bitfield.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/bitfield.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,113 @@ ++/* ++ * FILE bitfield.h ++ * ++ * Version 1.1 ++ * Author Copyright (c) Marc A. Viredaz, 1998 ++ * DEC Western Research Laboratory, Palo Alto, CA ++ * Date April 1998 (April 1997) ++ * System Advanced RISC Machine (ARM) ++ * Language C or ARM Assembly ++ * Purpose Definition of macros to operate on bit fields. ++ */ ++ ++ ++ ++#ifndef __BITFIELD_H ++#define __BITFIELD_H ++ ++#ifndef __ASSEMBLY__ ++#define UData(Data) ((unsigned long) (Data)) ++#else ++#define UData(Data) (Data) ++#endif ++ ++ ++/* ++ * MACRO: Fld ++ * ++ * Purpose ++ * The macro "Fld" encodes a bit field, given its size and its shift value ++ * with respect to bit 0. ++ * ++ * Note ++ * A more intuitive way to encode bit fields would have been to use their ++ * mask. However, extracting size and shift value information from a bit ++ * field's mask is cumbersome and might break the assembler (255-character ++ * line-size limit). ++ * ++ * Input ++ * Size Size of the bit field, in number of bits. ++ * Shft Shift value of the bit field with respect to bit 0. ++ * ++ * Output ++ * Fld Encoded bit field. ++ */ ++ ++#define Fld(Size, Shft) (((Size) << 16) + (Shft)) ++ ++ ++/* ++ * MACROS: FSize, FShft, FMsk, FAlnMsk, F1stBit ++ * ++ * Purpose ++ * The macros "FSize", "FShft", "FMsk", "FAlnMsk", and "F1stBit" return ++ * the size, shift value, mask, aligned mask, and first bit of a ++ * bit field. ++ * ++ * Input ++ * Field Encoded bit field (using the macro "Fld"). ++ * ++ * Output ++ * FSize Size of the bit field, in number of bits. ++ * FShft Shift value of the bit field with respect to bit 0. ++ * FMsk Mask for the bit field. ++ * FAlnMsk Mask for the bit field, aligned on bit 0. ++ * F1stBit First bit of the bit field. ++ */ ++ ++#define FSize(Field) ((Field) >> 16) ++#define FShft(Field) ((Field) & 0x0000FFFF) ++#define FMsk(Field) (((UData (1) << FSize (Field)) - 1) << FShft (Field)) ++#define FAlnMsk(Field) ((UData (1) << FSize (Field)) - 1) ++#define F1stBit(Field) (UData (1) << FShft (Field)) ++ ++ ++/* ++ * MACRO: FInsrt ++ * ++ * Purpose ++ * The macro "FInsrt" inserts a value into a bit field by shifting the ++ * former appropriately. ++ * ++ * Input ++ * Value Bit-field value. ++ * Field Encoded bit field (using the macro "Fld"). ++ * ++ * Output ++ * FInsrt Bit-field value positioned appropriately. ++ */ ++ ++#define FInsrt(Value, Field) \ ++ (UData (Value) << FShft (Field)) ++ ++ ++/* ++ * MACRO: FExtr ++ * ++ * Purpose ++ * The macro "FExtr" extracts the value of a bit field by masking and ++ * shifting it appropriately. ++ * ++ * Input ++ * Data Data containing the bit-field to be extracted. ++ * Field Encoded bit field (using the macro "Fld"). ++ * ++ * Output ++ * FExtr Bit-field value. ++ */ ++ ++#define FExtr(Data, Field) \ ++ ((UData (Data) >> FShft (Field)) & FAlnMsk (Field)) ++ ++ ++#endif /* __BITFIELD_H */ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/cm-x270.h linux-2.6.25-rc4/include/asm-arm/arch/cm-x270.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/cm-x270.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/cm-x270.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,50 @@ ++/* ++ * linux/include/asm/arch-pxa/cm-x270.h ++ * ++ * Copyright Compulab Ltd., 2003, 2007 ++ * Mike Rapoport ++ * ++ * 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. ++ */ ++ ++ ++/* CM-x270 device physical addresses */ ++#define CMX270_CS1_PHYS (PXA_CS1_PHYS) ++#define MARATHON_PHYS (PXA_CS2_PHYS) ++#define CMX270_IDE104_PHYS (PXA_CS3_PHYS) ++#define CMX270_IT8152_PHYS (PXA_CS4_PHYS) ++ ++/* Statically mapped regions */ ++#define CMX270_VIRT_BASE (0xe8000000) ++#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) ++#define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + SZ_64M) ++ ++/* GPIO related definitions */ ++#define GPIO_IT8152_IRQ (22) ++ ++#define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ) ++#define PME_IRQ IRQ_GPIO(0) ++#define CMX270_IDE_IRQ IRQ_GPIO(100) ++#define CMX270_GPIRQ1 IRQ_GPIO(101) ++#define CMX270_TOUCHIRQ IRQ_GPIO(96) ++#define CMX270_ETHIRQ IRQ_GPIO(10) ++#define CMX270_GFXIRQ IRQ_GPIO(95) ++#define CMX270_NANDIRQ IRQ_GPIO(89) ++#define CMX270_MMC_IRQ IRQ_GPIO(83) ++ ++/* PCMCIA related definitions */ ++#define PCC_DETECT(x) (GPLR(84 - (x)) & GPIO_bit(84 - (x))) ++#define PCC_READY(x) (GPLR(82 - (x)) & GPIO_bit(82 - (x))) ++ ++#define PCMCIA_S0_CD_VALID IRQ_GPIO(84) ++#define PCMCIA_S0_CD_VALID_EDGE GPIO_BOTH_EDGES ++ ++#define PCMCIA_S1_CD_VALID IRQ_GPIO(83) ++#define PCMCIA_S1_CD_VALID_EDGE GPIO_BOTH_EDGES ++ ++#define PCMCIA_S0_RDYINT IRQ_GPIO(82) ++#define PCMCIA_S1_RDYINT IRQ_GPIO(81) ++ ++#define PCMCIA_RESET_GPIO 53 +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/colibri.h linux-2.6.25-rc4/include/asm-arm/arch/colibri.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/colibri.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/colibri.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,19 @@ ++#ifndef _COLIBRI_H_ ++#define _COLIBRI_H_ ++ ++/* physical memory regions */ ++#define COLIBRI_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ ++#define COLIBRI_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */ ++#define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */ ++ ++/* virtual memory regions */ ++#define COLIBRI_DISK_VIRT 0xF0000000 /* Disk On Chip region */ ++ ++/* size of flash */ ++#define COLIBRI_FLASH_SIZE 0x02000000 /* Flash size 32 MB */ ++ ++/* Ethernet Controller Davicom DM9000 */ ++#define GPIO_DM9000 114 ++#define COLIBRI_ETH_IRQ IRQ_GPIO(GPIO_DM9000) ++ ++#endif /* _COLIBRI_H_ */ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/corgi.h linux-2.6.25-rc4/include/asm-arm/arch/corgi.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/corgi.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/corgi.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,109 @@ ++/* ++ * Hardware specific definitions for SL-C7xx series of PDAs ++ * ++ * Copyright (c) 2004-2005 Richard Purdie ++ * ++ * Based on Sharp's 2.4 kernel patches ++ * ++ * 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 __ASM_ARCH_CORGI_H ++#define __ASM_ARCH_CORGI_H 1 ++ ++ ++/* ++ * Corgi (Non Standard) GPIO Definitions ++ */ ++#define CORGI_GPIO_KEY_INT (0) /* Keyboard Interrupt */ ++#define CORGI_GPIO_AC_IN (1) /* Charger Detection */ ++#define CORGI_GPIO_WAKEUP (3) /* System wakeup notification? */ ++#define CORGI_GPIO_AK_INT (4) /* Headphone Jack Control Interrupt */ ++#define CORGI_GPIO_TP_INT (5) /* Touch Panel Interrupt */ ++#define CORGI_GPIO_nSD_WP (7) /* SD Write Protect? */ ++#define CORGI_GPIO_nSD_DETECT (9) /* MMC/SD Card Detect */ ++#define CORGI_GPIO_nSD_INT (10) /* SD Interrupt for SDIO? */ ++#define CORGI_GPIO_MAIN_BAT_LOW (11) /* Main Battery Low Notification */ ++#define CORGI_GPIO_BAT_COVER (11) /* Battery Cover Detect */ ++#define CORGI_GPIO_LED_ORANGE (13) /* Orange LED Control */ ++#define CORGI_GPIO_CF_CD (14) /* Compact Flash Card Detect */ ++#define CORGI_GPIO_CHRG_FULL (16) /* Charging Complete Notification */ ++#define CORGI_GPIO_CF_IRQ (17) /* Compact Flash Interrupt */ ++#define CORGI_GPIO_LCDCON_CS (19) /* LCD Control Chip Select */ ++#define CORGI_GPIO_MAX1111_CS (20) /* MAX1111 Chip Select */ ++#define CORGI_GPIO_ADC_TEMP_ON (21) /* Select battery voltage or temperature */ ++#define CORGI_GPIO_IR_ON (22) /* Enable IR Transciever */ ++#define CORGI_GPIO_ADS7846_CS (24) /* ADS7846 Chip Select */ ++#define CORGI_GPIO_SD_PWR (33) /* MMC/SD Power */ ++#define CORGI_GPIO_CHRG_ON (38) /* Enable battery Charging */ ++#define CORGI_GPIO_DISCHARGE_ON (42) /* Enable battery Discharge */ ++#define CORGI_GPIO_CHRG_UKN (43) /* Unknown Charging (Bypass Control?) */ ++#define CORGI_GPIO_HSYNC (44) /* LCD HSync Pulse */ ++#define CORGI_GPIO_USB_PULLUP (45) /* USB show presence to host */ ++ ++ ++/* ++ * Corgi Keyboard Definitions ++ */ ++#define CORGI_KEY_STROBE_NUM (12) ++#define CORGI_KEY_SENSE_NUM (8) ++#define CORGI_GPIO_ALL_STROBE_BIT (0x00003ffc) ++#define CORGI_GPIO_HIGH_SENSE_BIT (0xfc000000) ++#define CORGI_GPIO_HIGH_SENSE_RSHIFT (26) ++#define CORGI_GPIO_LOW_SENSE_BIT (0x00000003) ++#define CORGI_GPIO_LOW_SENSE_LSHIFT (6) ++#define CORGI_GPIO_STROBE_BIT(a) GPIO_bit(66+(a)) ++#define CORGI_GPIO_SENSE_BIT(a) GPIO_bit(58+(a)) ++#define CORGI_GAFR_ALL_STROBE_BIT (0x0ffffff0) ++#define CORGI_GAFR_HIGH_SENSE_BIT (0xfff00000) ++#define CORGI_GAFR_LOW_SENSE_BIT (0x0000000f) ++#define CORGI_GPIO_KEY_SENSE(a) (58+(a)) ++#define CORGI_GPIO_KEY_STROBE(a) (66+(a)) ++ ++ ++/* ++ * Corgi Interrupts ++ */ ++#define CORGI_IRQ_GPIO_KEY_INT IRQ_GPIO(0) ++#define CORGI_IRQ_GPIO_AC_IN IRQ_GPIO(1) ++#define CORGI_IRQ_GPIO_WAKEUP IRQ_GPIO(3) ++#define CORGI_IRQ_GPIO_AK_INT IRQ_GPIO(4) ++#define CORGI_IRQ_GPIO_TP_INT IRQ_GPIO(5) ++#define CORGI_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9) ++#define CORGI_IRQ_GPIO_nSD_INT IRQ_GPIO(10) ++#define CORGI_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(11) ++#define CORGI_IRQ_GPIO_CF_CD IRQ_GPIO(14) ++#define CORGI_IRQ_GPIO_CHRG_FULL IRQ_GPIO(16) /* Battery fully charged */ ++#define CORGI_IRQ_GPIO_CF_IRQ IRQ_GPIO(17) ++#define CORGI_IRQ_GPIO_KEY_SENSE(a) IRQ_GPIO(58+(a)) /* Keyboard Sense lines */ ++ ++ ++/* ++ * Corgi SCOOP GPIOs and Config ++ */ ++#define CORGI_SCP_LED_GREEN SCOOP_GPCR_PA11 ++#define CORGI_SCP_SWA SCOOP_GPCR_PA12 /* Hinge Switch A */ ++#define CORGI_SCP_SWB SCOOP_GPCR_PA13 /* Hinge Switch B */ ++#define CORGI_SCP_MUTE_L SCOOP_GPCR_PA14 ++#define CORGI_SCP_MUTE_R SCOOP_GPCR_PA15 ++#define CORGI_SCP_AKIN_PULLUP SCOOP_GPCR_PA16 ++#define CORGI_SCP_APM_ON SCOOP_GPCR_PA17 ++#define CORGI_SCP_BACKLIGHT_CONT SCOOP_GPCR_PA18 ++#define CORGI_SCP_MIC_BIAS SCOOP_GPCR_PA19 ++ ++#define CORGI_SCOOP_IO_DIR ( CORGI_SCP_LED_GREEN | CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R | \ ++ CORGI_SCP_AKIN_PULLUP | CORGI_SCP_APM_ON | CORGI_SCP_BACKLIGHT_CONT | \ ++ CORGI_SCP_MIC_BIAS ) ++#define CORGI_SCOOP_IO_OUT ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R ) ++ ++ ++/* ++ * Shared data structures ++ */ ++extern struct platform_device corgiscoop_device; ++extern struct platform_device corgissp_device; ++ ++#endif /* __ASM_ARCH_CORGI_H */ ++ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/debug-macro.S linux-2.6.25-rc4/include/asm-arm/arch/debug-macro.S +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/debug-macro.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/debug-macro.S 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,25 @@ ++/* linux/include/asm-arm/arch-pxa/debug-macro.S ++ * ++ * Debugging macro include header ++ * ++ * Copyright (C) 1994-1999 Russell King ++ * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks ++ * ++ * 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 "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 ++ .endm ++ ++#define UART_SHIFT 2 ++#include +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/dma.h linux-2.6.25-rc4/include/asm-arm/arch/dma.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/dma.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,50 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/dma.h ++ * ++ * Author: Nicolas Pitre ++ * Created: Jun 15, 2001 ++ * Copyright: 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. ++ */ ++#ifndef __ASM_ARCH_DMA_H ++#define __ASM_ARCH_DMA_H ++ ++/* ++ * Descriptor structure for PXA's DMA engine ++ * Note: this structure must always be aligned to a 16-byte boundary. ++ */ ++ ++typedef struct pxa_dma_desc { ++ volatile u32 ddadr; /* Points to the next descriptor + flags */ ++ volatile u32 dsadr; /* DSADR value for the current transfer */ ++ volatile u32 dtadr; /* DTADR value for the current transfer */ ++ volatile u32 dcmd; /* DCMD value for the current transfer */ ++} pxa_dma_desc; ++ ++typedef enum { ++ DMA_PRIO_HIGH = 0, ++ DMA_PRIO_MEDIUM = 1, ++ DMA_PRIO_LOW = 2 ++} pxa_dma_prio; ++ ++#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) ++#define HAVE_ARCH_PCI_SET_DMA_MASK 1 ++#endif ++ ++/* ++ * DMA registration ++ */ ++ ++int __init pxa_init_dma(int num_ch); ++ ++int pxa_request_dma (char *name, ++ pxa_dma_prio prio, ++ void (*irq_handler)(int, void *), ++ void *data); ++ ++void pxa_free_dma (int dma_ch); ++ ++#endif /* _ASM_ARCH_DMA_H */ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/entry-macro.S linux-2.6.25-rc4/include/asm-arm/arch/entry-macro.S +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/entry-macro.S 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/entry-macro.S 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,57 @@ ++/* ++ * include/asm-arm/arch-pxa/entry-macro.S ++ * ++ * Low-level IRQ helper macros for PXA-based platforms ++ * ++ * This file is licensed under the terms of the GNU General Public ++ * License version 2. This program is licensed "as is" without any ++ * warranty of any kind, whether express or implied. ++ */ ++#include ++#include ++ ++ .macro disable_fiq ++ .endm ++ ++ .macro get_irqnr_preamble, base, tmp ++ .endm ++ ++ .macro arch_ret_to_user, tmp1, tmp2 ++ .endm ++ ++ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp ++ mrc p15, 0, \tmp, c0, c0, 0 @ CPUID ++ mov \tmp, \tmp, lsr #13 ++ and \tmp, \tmp, #0x7 @ Core G ++ cmp \tmp, #1 ++ bhi 1004f ++ ++ mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 ++ add \base, \base, #0x00d00000 ++ ldr \irqstat, [\base, #0] @ ICIP ++ ldr \irqnr, [\base, #4] @ ICMR ++ b 1002f ++ ++1004: ++ mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2 ++ mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2 ++ ands \irqnr, \irqstat, \irqnr ++ beq 1003f ++ rsb \irqstat, \irqnr, #0 ++ and \irqstat, \irqstat, \irqnr ++ clz \irqnr, \irqstat ++ rsb \irqnr, \irqnr, #31 ++ add \irqnr, \irqnr, #32 ++ b 1001f ++1003: ++ mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP ++ mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR ++1002: ++ ands \irqnr, \irqstat, \irqnr ++ beq 1001f ++ rsb \irqstat, \irqnr, #0 ++ and \irqstat, \irqstat, \irqnr ++ clz \irqnr, \irqstat ++ rsb \irqnr, \irqnr, #31 ++1001: ++ .endm +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/gpio.h linux-2.6.25-rc4/include/asm-arm/arch/gpio.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/gpio.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,65 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/gpio.h ++ * ++ * PXA GPIO wrappers for arch-neutral GPIO calls ++ * ++ * Written by Philipp Zabel ++ * ++ * 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 __ASM_ARCH_PXA_GPIO_H ++#define __ASM_ARCH_PXA_GPIO_H ++ ++#include ++#include ++#include ++ ++#include ++ ++ ++/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85). ++ * Those cases currently cause holes in the GPIO number space. ++ */ ++#define NR_BUILTIN_GPIO 128 ++ ++static inline int gpio_get_value(unsigned gpio) ++{ ++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) ++ return GPLR(gpio) & GPIO_bit(gpio); ++ else ++ return __gpio_get_value(gpio); ++} ++ ++static inline void gpio_set_value(unsigned gpio, int value) ++{ ++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) { ++ if (value) ++ GPSR(gpio) = GPIO_bit(gpio); ++ else ++ GPCR(gpio) = GPIO_bit(gpio); ++ } else { ++ __gpio_set_value(gpio, value); ++ } ++} ++ ++#define gpio_cansleep __gpio_cansleep ++ ++#define gpio_to_irq(gpio) IRQ_GPIO(gpio) ++#define irq_to_gpio(irq) IRQ_TO_GPIO(irq) ++ ++ ++#endif +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/hardware.h linux-2.6.25-rc4/include/asm-arm/arch/hardware.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/hardware.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/hardware.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,216 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/hardware.h ++ * ++ * Author: Nicolas Pitre ++ * Created: Jun 15, 2001 ++ * Copyright: 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. ++ */ ++ ++#ifndef __ASM_ARCH_HARDWARE_H ++#define __ASM_ARCH_HARDWARE_H ++ ++/* ++ * We requires absolute addresses. ++ */ ++#define PCIO_BASE 0 ++ ++/* ++ * Workarounds for at least 2 errata so far require this. ++ * The mapping is set in mach-pxa/generic.c. ++ */ ++#define UNCACHED_PHYS_0 0xff000000 ++#define UNCACHED_ADDR UNCACHED_PHYS_0 ++ ++/* ++ * Intel PXA2xx internal register mapping: ++ * ++ * 0x40000000 - 0x41ffffff <--> 0xf2000000 - 0xf3ffffff ++ * 0x44000000 - 0x45ffffff <--> 0xf4000000 - 0xf5ffffff ++ * 0x48000000 - 0x49ffffff <--> 0xf6000000 - 0xf7ffffff ++ * 0x4c000000 - 0x4dffffff <--> 0xf8000000 - 0xf9ffffff ++ * 0x50000000 - 0x51ffffff <--> 0xfa000000 - 0xfbffffff ++ * 0x54000000 - 0x55ffffff <--> 0xfc000000 - 0xfdffffff ++ * 0x58000000 - 0x59ffffff <--> 0xfe000000 - 0xffffffff ++ * ++ * Note that not all PXA2xx chips implement all those addresses, and the ++ * kernel only maps the minimum needed range of this mapping. ++ */ ++#define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) ++#define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1)) ++ ++#ifndef __ASSEMBLY__ ++ ++# define __REG(x) (*((volatile u32 *)io_p2v(x))) ++ ++/* With indexed regs we don't want to feed the index through io_p2v() ++ especially if it is a variable, otherwise horrible code will result. */ ++# define __REG2(x,y) \ ++ (*(volatile u32 *)((u32)&__REG(x) + (y))) ++ ++# define __PREG(x) (io_v2p((u32)&(x))) ++ ++#else ++ ++# define __REG(x) io_p2v(x) ++# define __PREG(x) io_v2p(x) ++ ++#endif ++ ++#ifndef __ASSEMBLY__ ++ ++#ifdef CONFIG_PXA25x ++#define __cpu_is_pxa21x(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xf3f; \ ++ _id == 0x212; \ ++ }) ++ ++#define __cpu_is_pxa25x(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xfff; \ ++ _id == 0x2d0 || _id == 0x290; \ ++ }) ++#else ++#define __cpu_is_pxa21x(id) (0) ++#define __cpu_is_pxa25x(id) (0) ++#endif ++ ++#ifdef CONFIG_PXA27x ++#define __cpu_is_pxa27x(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xfff; \ ++ _id == 0x411; \ ++ }) ++#else ++#define __cpu_is_pxa27x(id) (0) ++#endif ++ ++#ifdef CONFIG_CPU_PXA300 ++#define __cpu_is_pxa300(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xfff; \ ++ _id == 0x688; \ ++ }) ++#else ++#define __cpu_is_pxa300(id) (0) ++#endif ++ ++#ifdef CONFIG_CPU_PXA310 ++#define __cpu_is_pxa310(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xfff; \ ++ _id == 0x689; \ ++ }) ++#else ++#define __cpu_is_pxa310(id) (0) ++#endif ++ ++#ifdef CONFIG_CPU_PXA320 ++#define __cpu_is_pxa320(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 4 & 0xfff; \ ++ _id == 0x603 || _id == 0x682; \ ++ }) ++#else ++#define __cpu_is_pxa320(id) (0) ++#endif ++ ++#define cpu_is_pxa21x() \ ++ ({ \ ++ __cpu_is_pxa21x(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa25x() \ ++ ({ \ ++ __cpu_is_pxa25x(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa27x() \ ++ ({ \ ++ __cpu_is_pxa27x(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa300() \ ++ ({ \ ++ __cpu_is_pxa300(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa310() \ ++ ({ \ ++ __cpu_is_pxa310(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa320() \ ++ ({ \ ++ __cpu_is_pxa320(read_cpuid_id()); \ ++ }) ++ ++/* ++ * CPUID Core Generation Bit ++ * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x ++ * == 0x3 for pxa300/pxa310/pxa320 ++ */ ++#define __cpu_is_pxa2xx(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 13 & 0x7; \ ++ _id <= 0x2; \ ++ }) ++ ++#define __cpu_is_pxa3xx(id) \ ++ ({ \ ++ unsigned int _id = (id) >> 13 & 0x7; \ ++ _id == 0x3; \ ++ }) ++ ++#define cpu_is_pxa2xx() \ ++ ({ \ ++ __cpu_is_pxa2xx(read_cpuid_id()); \ ++ }) ++ ++#define cpu_is_pxa3xx() \ ++ ({ \ ++ __cpu_is_pxa3xx(read_cpuid_id()); \ ++ }) ++ ++/* ++ * Handy routine to set GPIO alternate functions ++ */ ++extern int pxa_gpio_mode( int gpio_mode ); ++ ++/* ++ * Return GPIO level, nonzero means high, zero is low ++ */ ++extern int pxa_gpio_get_value(unsigned gpio); ++ ++/* ++ * Set output GPIO level ++ */ ++extern void pxa_gpio_set_value(unsigned gpio, int value); ++ ++/* ++ * Routine to enable or disable CKEN ++ */ ++static inline void __deprecated pxa_set_cken(int clock, int enable) ++{ ++ extern void __pxa_set_cken(int clock, int enable); ++ __pxa_set_cken(clock, enable); ++} ++ ++/* ++ * return current memory and LCD clock frequency in units of 10kHz ++ */ ++extern unsigned int get_memclk_frequency_10khz(void); ++ ++#endif ++ ++#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) ++#define PCIBIOS_MIN_IO 0 ++#define PCIBIOS_MIN_MEM 0 ++#define pcibios_assign_all_busses() 1 ++#endif ++ ++#endif /* _ASM_ARCH_HARDWARE_H */ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/i2c.h linux-2.6.25-rc4/include/asm-arm/arch/i2c.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/i2c.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/i2c.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,77 @@ ++/* ++ * i2c_pxa.h ++ * ++ * Copyright (C) 2002 Intrinsyc 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. ++ * ++ */ ++#ifndef _I2C_PXA_H_ ++#define _I2C_PXA_H_ ++ ++#if 0 ++#define DEF_TIMEOUT 3 ++#else ++/* need a longer timeout if we're dealing with the fact we may well be ++ * looking at a multi-master environment ++*/ ++#define DEF_TIMEOUT 32 ++#endif ++ ++#define BUS_ERROR (-EREMOTEIO) ++#define XFER_NAKED (-ECONNREFUSED) ++#define I2C_RETRY (-2000) /* an error has occurred retry transmit */ ++ ++/* ICR initialize bit values ++* ++* 15. FM 0 (100 Khz operation) ++* 14. UR 0 (No unit reset) ++* 13. SADIE 0 (Disables the unit from interrupting on slave addresses ++* matching its slave address) ++* 12. ALDIE 0 (Disables the unit from interrupt when it loses arbitration ++* in master mode) ++* 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode) ++* 10. BEIE 1 (Enable interrupts from detected bus errors, no ACK sent) ++* 9. IRFIE 1 (Enable interrupts from full buffer received) ++* 8. ITEIE 1 (Enables the I2C unit to interrupt when transmit buffer empty) ++* 7. GCD 1 (Disables i2c unit response to general call messages as a slave) ++* 6. IUE 0 (Disable unit until we change settings) ++* 5. SCLE 1 (Enables the i2c clock output for master mode (drives SCL) ++* 4. MA 0 (Only send stop with the ICR stop bit) ++* 3. TB 0 (We are not transmitting a byte initially) ++* 2. ACKNAK 0 (Send an ACK after the unit receives a byte) ++* 1. STOP 0 (Do not send a STOP) ++* 0. START 0 (Do not send a START) ++* ++*/ ++#define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE) ++ ++/* I2C status register init values ++ * ++ * 10. BED 1 (Clear bus error detected) ++ * 9. SAD 1 (Clear slave address detected) ++ * 7. IRF 1 (Clear IDBR Receive Full) ++ * 6. ITE 1 (Clear IDBR Transmit Empty) ++ * 5. ALD 1 (Clear Arbitration Loss Detected) ++ * 4. SSD 1 (Clear Slave Stop Detected) ++ */ ++#define I2C_ISR_INIT 0x7FF /* status register init */ ++ ++struct i2c_slave_client; ++ ++struct i2c_pxa_platform_data { ++ unsigned int slave_addr; ++ struct i2c_slave_client *slave; ++ unsigned int class; ++ int use_pio; ++}; ++ ++extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); ++ ++#ifdef CONFIG_PXA27x ++extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info); ++#endif ++ ++#endif +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/idp.h linux-2.6.25-rc4/include/asm-arm/arch/idp.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/idp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/idp.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,199 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/idp.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. ++ * ++ * Copyright (c) 2001 Cliff Brake, Accelent Systems Inc. ++ * ++ * 2001-09-13: Cliff Brake ++ * Initial code ++ * ++ * 2005-02-15: Cliff Brake ++ * ++ * Changes for 2.6 kernel. ++ */ ++ ++ ++/* ++ * Note: this file must be safe to include in assembly files ++ * ++ * Support for the Vibren PXA255 IDP requires rev04 or later ++ * IDP hardware. ++ */ ++ ++ ++#define IDP_FLASH_PHYS (PXA_CS0_PHYS) ++#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) ++#define IDP_MEDIAQ_PHYS (PXA_CS3_PHYS) ++#define IDP_IDE_PHYS (PXA_CS5_PHYS + 0x03000000) ++#define IDP_ETH_PHYS (PXA_CS5_PHYS + 0x03400000) ++#define IDP_COREVOLT_PHYS (PXA_CS5_PHYS + 0x03800000) ++#define IDP_CPLD_PHYS (PXA_CS5_PHYS + 0x03C00000) ++ ++ ++/* ++ * virtual memory map ++ */ ++ ++#define IDP_COREVOLT_VIRT (0xf0000000) ++#define IDP_COREVOLT_SIZE (1*1024*1024) ++ ++#define IDP_CPLD_VIRT (IDP_COREVOLT_VIRT + IDP_COREVOLT_SIZE) ++#define IDP_CPLD_SIZE (1*1024*1024) ++ ++#if (IDP_CPLD_VIRT + IDP_CPLD_SIZE) > 0xfc000000 ++#error Your custom IO space is getting a bit large !! ++#endif ++ ++#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_VIRT) ++#define CPLD_V2P(x) ((x) - IDP_CPLD_VIRT + IDP_CPLD_PHYS) ++ ++#ifndef __ASSEMBLY__ ++# define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x))) ++#else ++# define __CPLD_REG(x) CPLD_P2V(x) ++#endif ++ ++/* board level registers in the CPLD: (offsets from CPLD_VIRT) */ ++ ++#define _IDP_CPLD_REV (IDP_CPLD_PHYS + 0x00) ++#define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04) ++#define _IDP_CPLD_LED_CONTROL (IDP_CPLD_PHYS + 0x08) ++#define _IDP_CPLD_KB_COL_HIGH (IDP_CPLD_PHYS + 0x0C) ++#define _IDP_CPLD_KB_COL_LOW (IDP_CPLD_PHYS + 0x10) ++#define _IDP_CPLD_PCCARD_EN (IDP_CPLD_PHYS + 0x14) ++#define _IDP_CPLD_GPIOH_DIR (IDP_CPLD_PHYS + 0x18) ++#define _IDP_CPLD_GPIOH_VALUE (IDP_CPLD_PHYS + 0x1C) ++#define _IDP_CPLD_GPIOL_DIR (IDP_CPLD_PHYS + 0x20) ++#define _IDP_CPLD_GPIOL_VALUE (IDP_CPLD_PHYS + 0x24) ++#define _IDP_CPLD_PCCARD_PWR (IDP_CPLD_PHYS + 0x28) ++#define _IDP_CPLD_MISC_CTRL (IDP_CPLD_PHYS + 0x2C) ++#define _IDP_CPLD_LCD (IDP_CPLD_PHYS + 0x30) ++#define _IDP_CPLD_FLASH_WE (IDP_CPLD_PHYS + 0x34) ++ ++#define _IDP_CPLD_KB_ROW (IDP_CPLD_PHYS + 0x50) ++#define _IDP_CPLD_PCCARD0_STATUS (IDP_CPLD_PHYS + 0x54) ++#define _IDP_CPLD_PCCARD1_STATUS (IDP_CPLD_PHYS + 0x58) ++#define _IDP_CPLD_MISC_STATUS (IDP_CPLD_PHYS + 0x5C) ++ ++/* FPGA register virtual addresses */ ++ ++#define IDP_CPLD_REV __CPLD_REG(_IDP_CPLD_REV) ++#define IDP_CPLD_PERIPH_PWR __CPLD_REG(_IDP_CPLD_PERIPH_PWR) ++#define IDP_CPLD_LED_CONTROL __CPLD_REG(_IDP_CPLD_LED_CONTROL) ++#define IDP_CPLD_KB_COL_HIGH __CPLD_REG(_IDP_CPLD_KB_COL_HIGH) ++#define IDP_CPLD_KB_COL_LOW __CPLD_REG(_IDP_CPLD_KB_COL_LOW) ++#define IDP_CPLD_PCCARD_EN __CPLD_REG(_IDP_CPLD_PCCARD_EN) ++#define IDP_CPLD_GPIOH_DIR __CPLD_REG(_IDP_CPLD_GPIOH_DIR) ++#define IDP_CPLD_GPIOH_VALUE __CPLD_REG(_IDP_CPLD_GPIOH_VALUE) ++#define IDP_CPLD_GPIOL_DIR __CPLD_REG(_IDP_CPLD_GPIOL_DIR) ++#define IDP_CPLD_GPIOL_VALUE __CPLD_REG(_IDP_CPLD_GPIOL_VALUE) ++#define IDP_CPLD_PCCARD_PWR __CPLD_REG(_IDP_CPLD_PCCARD_PWR) ++#define IDP_CPLD_MISC_CTRL __CPLD_REG(_IDP_CPLD_MISC_CTRL) ++#define IDP_CPLD_LCD __CPLD_REG(_IDP_CPLD_LCD) ++#define IDP_CPLD_FLASH_WE __CPLD_REG(_IDP_CPLD_FLASH_WE) ++ ++#define IDP_CPLD_KB_ROW __CPLD_REG(_IDP_CPLD_KB_ROW) ++#define IDP_CPLD_PCCARD0_STATUS __CPLD_REG(_IDP_CPLD_PCCARD0_STATUS) ++#define IDP_CPLD_PCCARD1_STATUS __CPLD_REG(_IDP_CPLD_PCCARD1_STATUS) ++#define IDP_CPLD_MISC_STATUS __CPLD_REG(_IDP_CPLD_MISC_STATUS) ++ ++ ++/* ++ * Bit masks for various registers ++ */ ++ ++// IDP_CPLD_PCCARD_PWR ++#define PCC0_PWR0 (1 << 0) ++#define PCC0_PWR1 (1 << 1) ++#define PCC0_PWR2 (1 << 2) ++#define PCC0_PWR3 (1 << 3) ++#define PCC1_PWR0 (1 << 4) ++#define PCC1_PWR1 (1 << 5) ++#define PCC1_PWR2 (1 << 6) ++#define PCC1_PWR3 (1 << 7) ++ ++// IDP_CPLD_PCCARD_EN ++#define PCC0_RESET (1 << 6) ++#define PCC1_RESET (1 << 7) ++#define PCC0_ENABLE (1 << 0) ++#define PCC1_ENABLE (1 << 1) ++ ++// IDP_CPLD_PCCARDx_STATUS ++#define _PCC_WRPROT (1 << 7) // 7-4 read as low true ++#define _PCC_RESET (1 << 6) ++#define _PCC_IRQ (1 << 5) ++#define _PCC_INPACK (1 << 4) ++#define PCC_BVD2 (1 << 3) ++#define PCC_BVD1 (1 << 2) ++#define PCC_VS2 (1 << 1) ++#define PCC_VS1 (1 << 0) ++ ++#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x))) ++ ++/* A listing of interrupts used by external hardware devices */ ++ ++#define TOUCH_PANEL_IRQ IRQ_GPIO(5) ++#define IDE_IRQ IRQ_GPIO(21) ++ ++#define TOUCH_PANEL_IRQ_EDGE IRQT_FALLING ++ ++#define ETHERNET_IRQ IRQ_GPIO(4) ++#define ETHERNET_IRQ_EDGE IRQT_RISING ++ ++#define IDE_IRQ_EDGE IRQT_RISING ++ ++#define PCMCIA_S0_CD_VALID IRQ_GPIO(7) ++#define PCMCIA_S0_CD_VALID_EDGE IRQT_BOTHEDGE ++ ++#define PCMCIA_S1_CD_VALID IRQ_GPIO(8) ++#define PCMCIA_S1_CD_VALID_EDGE IRQT_BOTHEDGE ++ ++#define PCMCIA_S0_RDYINT IRQ_GPIO(19) ++#define PCMCIA_S1_RDYINT IRQ_GPIO(22) ++ ++ ++/* ++ * Macros for LED Driver ++ */ ++ ++/* leds 0 = ON */ ++#define IDP_HB_LED (1<<5) ++#define IDP_BUSY_LED (1<<6) ++ ++#define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED) ++ ++/* ++ * macros for MTD driver ++ */ ++ ++#define FLASH_WRITE_PROTECT_DISABLE() ((IDP_CPLD_FLASH_WE) &= ~(0x1)) ++#define FLASH_WRITE_PROTECT_ENABLE() ((IDP_CPLD_FLASH_WE) |= (0x1)) ++ ++/* ++ * macros for matrix keyboard driver ++ */ ++ ++#define KEYBD_MATRIX_NUMBER_INPUTS 7 ++#define KEYBD_MATRIX_NUMBER_OUTPUTS 14 ++ ++#define KEYBD_MATRIX_INVERT_OUTPUT_LOGIC FALSE ++#define KEYBD_MATRIX_INVERT_INPUT_LOGIC FALSE ++ ++#define KEYBD_MATRIX_SETTLING_TIME_US 100 ++#define KEYBD_MATRIX_KEYSTATE_DEBOUNCE_CONSTANT 2 ++ ++#define KEYBD_MATRIX_SET_OUTPUTS(outputs) \ ++{\ ++ IDP_CPLD_KB_COL_LOW = outputs;\ ++ IDP_CPLD_KB_COL_HIGH = outputs >> 7;\ ++} ++ ++#define KEYBD_MATRIX_GET_INPUTS(inputs) \ ++{\ ++ inputs = (IDP_CPLD_KB_ROW & 0x7f);\ ++} ++ ++ +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/io.h linux-2.6.25-rc4/include/asm-arm/arch/io.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/io.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/io.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,20 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/io.h ++ * ++ * Copied from asm/arch/sa1100/io.h ++ */ ++#ifndef __ASM_ARM_ARCH_IO_H ++#define __ASM_ARM_ARCH_IO_H ++ ++#include ++ ++#define IO_SPACE_LIMIT 0xffffffff ++ ++/* ++ * We don't actually have real ISA nor PCI buses, but there is so many ++ * drivers out there that might just work if we fake them... ++ */ ++#define __io(a) ((void __iomem *)(a)) ++#define __mem_pci(a) (a) ++ ++#endif +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/irda.h linux-2.6.25-rc4/include/asm-arm/arch/irda.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/irda.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/irda.h 2008-02-26 01:20:20.000000000 +0100 +@@ -0,0 +1,17 @@ ++#ifndef ASMARM_ARCH_IRDA_H ++#define ASMARM_ARCH_IRDA_H ++ ++/* board specific transceiver capabilities */ ++ ++#define IR_OFF 1 ++#define IR_SIRMODE 2 ++#define IR_FIRMODE 4 ++ ++struct pxaficp_platform_data { ++ int transceiver_cap; ++ void (*transceiver_mode)(struct device *dev, int mode); ++}; ++ ++extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); ++ ++#endif +diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/irqs.h linux-2.6.25-rc4/include/asm-arm/arch/irqs.h +--- linux-2.6.25-rc4-orig/include/asm-arm/arch/irqs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.25-rc4/include/asm-arm/arch/irqs.h 2008-03-08 16:11:19.000000000 +0100 +@@ -0,0 +1,257 @@ ++/* ++ * linux/include/asm-arm/arch-pxa/irqs.h ++ * ++ * Author: Nicolas Pitre ++ * Created: Jun 15, 2001 ++ * Copyright: 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. ++ */ ++ ++ ++#define PXA_IRQ(x) (x) ++ ++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) ++#define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ ++#define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */ ++#define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */ ++#define IRQ_USBH1 PXA_IRQ(3) /* USB Host interrupt 2 (non-OHCI) */ ++#define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */ ++#define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */ ++#define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */ ++#endif ++ ++#define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */ ++#define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */ ++#define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */ ++#define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */ ++#define IRQ_GPIO_2_x PXA_IRQ(10) /* GPIO[2-x] Edge Detect */ ++#define IRQ_USB PXA_IRQ(11) /* USB Service */ ++#define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */ ++#define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */ ++#define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */ ++#define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request (PXA25x) */ ++#define IRQ_USIM PXA_IRQ(15) /* Smart Card interface interrupt (PXA27x) */ ++#define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request (PXA25x) */ ++#define IRQ_SSP2 PXA_IRQ(16) /* SSP2 interrupt (PXA27x) */ ++#define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */ ++#define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */ ++#define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */ ++#define IRQ_STUART PXA_IRQ(20) /* STUART Transmit/Receive/Error */ ++#define IRQ_BTUART PXA_IRQ(21) /* BTUART Transmit/Receive/Error */ ++#define IRQ_FFUART PXA_IRQ(22) /* FFUART Transmit/Receive/Error*/ ++#define IRQ_MMC PXA_IRQ(23) /* MMC Status/Error Detection */ ++#define IRQ_SSP PXA_IRQ(24) /* SSP Service Request */ ++#define IRQ_DMA PXA_IRQ(25) /* DMA Channel Service Request */ ++#define IRQ_OST0 PXA_IRQ(26) /* OS Timer match 0 */ ++#define IRQ_OST1 PXA_IRQ(27) /* OS Timer match 1 */ ++#define IRQ_OST2 PXA_IRQ(28) /* OS Timer match 2 */ ++#define IRQ_OST3 PXA_IRQ(29) /* OS Timer match 3 */ ++#define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */ ++#define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */ ++ ++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) ++#define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */ ++#define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */ ++#endif ++ ++#ifdef CONFIG_PXA3xx ++#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */ ++#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */ ++#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */ ++#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */ ++#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */ ++#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */ ++#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */ ++#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */ ++#define IRQ_USB2 PXA_IRQ(46) /* USB 2.0 Device Controller */ ++#define IRQ_WAKEUP0 PXA_IRQ(49) /* EXT_WAKEUP0 */ ++#define IRQ_WAKEUP1 PXA_IRQ(50) /* EXT_WAKEUP1 */ ++#define IRQ_DMEMC PXA_IRQ(51) /* Dynamic Memory Controller */ ++#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ ++#endif ++ ++#define PXA_GPIO_IRQ_BASE (64) ++#define PXA_GPIO_IRQ_NUM (128) ++ ++#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) ++#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) ++ ++#define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE) ++#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) ++ ++/* ++ * The next 16 interrupts are for board specific purposes. Since ++ * the kernel can only run on one machine at a time, we can re-use ++ * these. If you need more, increase IRQ_BOARD_END, but keep it ++ * within sensible limits. ++ */ ++#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM) ++#define IRQ_BOARD_END (IRQ_BOARD_START + 16) ++ ++#define IRQ_SA1111_START (IRQ_BOARD_END) ++#define IRQ_GPAIN0 (IRQ_BOARD_END + 0) ++#define IRQ_GPAIN1 (IRQ_BOARD_END + 1) ++#define IRQ_GPAIN2 (IRQ_BOARD_END + 2) ++#define IRQ_GPAIN3 (IRQ_BOARD_END + 3) ++#define IRQ_GPBIN0 (IRQ_BOARD_END + 4) ++#define IRQ_GPBIN1 (IRQ_BOARD_END + 5) ++#define IRQ_GPBIN2 (IRQ_BOARD_END + 6) ++#define IRQ_GPBIN3 (IRQ_BOARD_END + 7) ++#define IRQ_GPBIN4 (IRQ_BOARD_END + 8) ++#define IRQ_GPBIN5 (IRQ_BOARD_END + 9) ++#define IRQ_GPCIN0 (IRQ_BOARD_END + 10) ++#define IRQ_GPCIN1 (IRQ_BOARD_END + 11) ++#define IRQ_GPCIN2 (IRQ_BOARD_END + 12) ++#define IRQ_GPCIN3 (IRQ_BOARD_END + 13) ++#define IRQ_GPCIN4 (IRQ_BOARD_END + 14) ++#define IRQ_GPCIN5 (IRQ_BOARD_END + 15) ++#define IRQ_GPCIN6 (IRQ_BOARD_END + 16) ++#define IRQ_GPCIN7 (IRQ_BOARD_END +