RFC: patches I plan to push
cover RFC: patches I plan to push
Hi,
I plan to push few patches, so I'm posting them for the review first to get some feedback (if any). Thanks.
-- ynezz
Petr Štetiar (6):
zeromq: add new recipe for version 2.1.1
lua-lanes: add recipe for version 2.1.0 and delete the old one
librs232: add version 1.0.1 and remove the old one
lua-rs232: add recipe for version 1.0.1, remove old package and fix
stripping
linux-2.6.36: remove ts72xx support because 2.6.38 is now default linux-2.6.38: add support for ts72xx and make it default
recipes/librs232/librs232_1.0.0.bb | 10 - recipes/librs232/librs232_1.0.1.bb | 10 + .../linux-2.6.36/ts72xx/0001-ts72xx_base.patch | 450 -- .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 - .../linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch | 36 - .../linux-2.6.36/ts72xx/0004-ep93xx_eth.patch | 555 --- .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 886 ---- .../linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch | 223 - .../linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch | 264 -- .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 -- .../linux-2.6.36/ts72xx/0009-ts72xx_pata.patch | 437 -- .../linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 - .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 -- .../linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch | 267 -- .../linux-2.6.36/ts72xx/0013-ts72xx_max197.patch | 356 -- .../ts72xx/0014-ts7200_nor_flash.patch | 181 - .../linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch | 3298 -------------- .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 -- .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 - .../ts72xx/0018-ethoc-ts7300-fixes.patch | 93 - .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 - .../ts72xx/0023-ts72xx-add-lcd-linux-driver.patch | 4569 ------------------- .../ts72xx/0024-ts72xx-add-GPIO-keys.patch | 100 - recipes/linux/linux-2.6.36/ts72xx/defconfig | 2127 --------- .../linux-2.6.38/ts72xx/0001-ts72xx_base.patch | 451 ++ .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 + .../linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch | 36 + .../linux-2.6.38/ts72xx/0004-ep93xx_eth.patch | 553 +++ .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 870 ++++ .../linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch | 221 + .../linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch | 264 ++ .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 ++ .../linux-2.6.38/ts72xx/0009-ts72xx_pata.patch | 437 ++ .../linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 + .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 ++ .../linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch | 267 ++ .../linux-2.6.38/ts72xx/0013-ts72xx_max197.patch | 356 ++ .../ts72xx/0014-ts7200_nor_flash.patch | 181 + .../linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch | 3299 ++++++++++++++ .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 ++ .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 + .../ts72xx/0018-ethoc-ts7300-fixes.patch | 72 + .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 + .../ts72xx/0020-ts72xx-add-lcd-linux-driver.patch | 4572 ++++++++++++++++++++ .../ts72xx/0021-TS-72XX-LCD-console-driver.patch | 528 +++ ...M-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch | 38 + recipes/linux/linux-2.6.38/ts72xx/defconfig | 2214 ++++++++++ recipes/linux/linux_2.6.36.bb | 25 - recipes/linux/linux_2.6.38.bb | 26 + .../0001-fix-LanesTimer-inifinite-thread-GC.patch | 31 - recipes/lua/lua-lanes-2.0.6/makefile.patch | 207 - recipes/lua/lua-lanes-2.0.6/uclibc.patch | 13 - recipes/lua/lua-lanes-2.1.0/makefile.patch | 207 + recipes/lua/lua-lanes-2.1.0/uclibc.patch | 13 + recipes/lua/lua-lanes_2.0.6.bb | 33 - recipes/lua/lua-lanes_2.1.0.bb | 34 + recipes/lua/lua-rs232_1.0.0.bb | 28 - recipes/lua/lua-rs232_1.0.1.bb | 28 + recipes/zeromq/zeromq_2.1.1.bb | 20 + 59 files changed, 15843 insertions(+), 15335 deletions(-) delete mode 100644 recipes/librs232/librs232_1.0.0.bb create mode 100644 recipes/librs232/librs232_1.0.1.bb delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/defconfig create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0001-ts72xx_base.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0002-ts72xx_force_machine-id.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0004-ep93xx_eth.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0005-ep93xx-m2m-DMA-support.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0008-ts72xx_ts_eth100.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0009-ts72xx_pata.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0011-ts72xx_dio_keypad.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0013-ts72xx_max197.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0014-ts7200_nor_flash.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0016-ts72xx_spi_tmp124.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0018-ethoc-ts7300-fixes.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0019-ts7300-add-ethernet-support.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0020-ts72xx-add-lcd-linux-driver.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0021-TS-72XX-LCD-console-driver.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0024-ARM-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/defconfig delete mode 100644 recipes/lua/lua-lanes-2.0.6/0001-fix-LanesTimer-inifinite-thread-GC.patch delete mode 100644 recipes/lua/lua-lanes-2.0.6/makefile.patch delete mode 100644 recipes/lua/lua-lanes-2.0.6/uclibc.patch create mode 100644 recipes/lua/lua-lanes-2.1.0/makefile.patch create mode 100644 recipes/lua/lua-lanes-2.1.0/uclibc.patch delete mode 100644 recipes/lua/lua-lanes_2.0.6.bb create mode 100644 recipes/lua/lua-lanes_2.1.0.bb delete mode 100644 recipes/lua/lua-rs232_1.0.0.bb create mode 100644 recipes/lua/lua-rs232_1.0.1.bb create mode 100644 recipes/zeromq/zeromq_2.1.1.bb
PATCH 1/6 zeromq: add new recipe for version 2.1.1
--- recipes/zeromq/zeromq_2.1.1.bb | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/zeromq/zeromq_2.1.1.bb
recipes/zeromq/zeromq_2.1.1.bb new file +20 -0
@@ -0,0 +1,20 @@ +DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "LGPLv3" + +PR = "r0" + +DEPENDS += "util-linux-ng" + +S = "${WORKDIR}/zeromq-${PV}" + +SRC_URI = "http://download.zeromq.org/zeromq-${PV}.tar.gz" + +inherit autotools + +do_configure_prepend() { + ./autogen.sh +} + +SRC_URI[md5sum] = "987079513e4816979e4e3bd52ac4b0a7" +SRC_URI[sha256sum] = "963844dcc2bd7b3c9104343d17c2b21125864edb9d953ae2b9ee844ea07b39ce"
Signature · 1 line
1.7.1
PATCH 2/6 lua-lanes: add recipe for version 2.1.0 and delete the old one
In reply to Petr ŠtetiarI'm removing the old version 2.0.6, because it shouldn't have been commited anyway. It was quite buggy and untested version.
--- .../0001-fix-LanesTimer-inifinite-thread-GC.patch | 31 --- recipes/lua/lua-lanes-2.0.6/makefile.patch | 207 -------------------- recipes/lua/lua-lanes-2.0.6/uclibc.patch | 13 -- recipes/lua/lua-lanes-2.1.0/makefile.patch | 207 ++++++++++++++++++++ recipes/lua/lua-lanes-2.1.0/uclibc.patch | 13 ++ recipes/lua/lua-lanes_2.0.6.bb | 33 --- recipes/lua/lua-lanes_2.1.0.bb | 34 ++++ 7 files changed, 254 insertions(+), 284 deletions(-) delete mode 100644 recipes/lua/lua-lanes-2.0.6/0001-fix-LanesTimer-inifinite-thread-GC.patch delete mode 100644 recipes/lua/lua-lanes-2.0.6/makefile.patch delete mode 100644 recipes/lua/lua-lanes-2.0.6/uclibc.patch create mode 100644 recipes/lua/lua-lanes-2.1.0/makefile.patch create mode 100644 recipes/lua/lua-lanes-2.1.0/uclibc.patch delete mode 100644 recipes/lua/lua-lanes_2.0.6.bb create mode 100644 recipes/lua/lua-lanes_2.1.0.bb
recipes/lua/lua-lanes-2.0.6/0001-fix-LanesTimer-inifinite-thread-GC.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 69583ec6fc6cd18a0248d1233193bb2407dbda04 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <[email protected]> -Date: Sun, 31 Oct 2010 23:02:49 +0100 -Subject: [PATCH] fix LanesTimer inifinite thread GC -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -threading.c 394: pthread_cond_destroy(ref) failed, 16 EBUSY - -Signed-off-by: Petr Štetiar <[email protected]> ---- - src/lanes.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/lanes.c b/src/lanes.c -index c02c540..54cfa7a 100644 ---- a/src/lanes.c -+++ b/src/lanes.c -@@ -1559,7 +1559,7 @@ LUAG_FUNC( thread_gc ) { - - // We can read 's->status' without locks, but not wait for it - // -- if (s->status < DONE) { -+ if (s->status < DONE && strcmp(s->threadName, "LanesTimer")) { - // - selfdestruct_add(s); - assert( s->selfdestruct_next ); --- -1.7.0.4 -
recipes/lua/lua-lanes-2.0.6/makefile.patch deleted +0 -207
207 lines not on this page · raw message
recipes/lua/lua-lanes-2.0.6/uclibc.patch deleted +0 -13
@@ -1,13 +0,0 @@ -Index: lanes-2.0.6/src/threading.h -=================================================================== ---- lanes-2.0.6.orig/src/threading.h 2010-10-10 09:35:20.000000000 +0200 -+++ lanes-2.0.6/src/threading.h 2010-10-10 09:35:32.000000000 +0200 -@@ -112,7 +112,7 @@ - #ifdef PLATFORM_OSX - #define YIELD() pthread_yield_np() - #else -- #define YIELD() pthread_yield() -+ #define YIELD() sched_yield() - #endif - #endif -
recipes/lua/lua-lanes-2.1.0/makefile.patch new file +207 -0
207 lines not on this page · raw message
recipes/lua/lua-lanes-2.1.0/uclibc.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: lanes-2.0.6/src/threading.h +=================================================================== +--- lanes-2.0.6.orig/src/threading.h 2010-10-10 09:35:20.000000000 +0200 ++++ lanes-2.0.6/src/threading.h 2010-10-10 09:35:32.000000000 +0200 +@@ -112,7 +112,7 @@ + #ifdef PLATFORM_OSX + #define YIELD() pthread_yield_np() + #else +- #define YIELD() pthread_yield() ++ #define YIELD() sched_yield() + #endif + #endif +
recipes/lua/lua-lanes_2.0.6.bb deleted +0 -33
@@ -1,33 +0,0 @@ -DESCRIPTION = "Lua Lanes is a Lua extension library providing the possibility to run multiple Lua states in parallel." -LICENSE = "MIT" -HOMEPAGE = "http://kotisivu.dnainternet.net/askok/bin/lanes/index.html" - -DEPENDS += "lua5.1-native" -RDEPENDS_${PN} += "lua5.1" - -PR = "r1" -S = "${WORKDIR}/lanes-${PV}" - -SRC_URI = "http://luaforge.net/frs/download.php/4652/lanes-2.0.6.tgz \ - file://makefile.patch \ - file://0001-fix-LanesTimer-inifinite-thread-GC.patch \ - " - -UCLIBC_PATCHES = "file://uclibc.patch" -SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}" - -LUA_LIB_DIR = "${libdir}/lua/5.1" -LUA_SHARE_DIR = "${datadir}/lua/5.1" - -PACKAGES = "${PN} ${PN}-dbg" -FILES_${PN} = "${LUA_LIB_DIR}/lua51-lanes.so ${LUA_SHARE_DIR}/lanes.lua" -FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/lua51-lanes.so" - -EXTRA_OEMAKE = "MYFLAGS='${CFLAGS} ${LDFLAGS}'" - -do_install() { - oe_runmake install DESTDIR='${D}/usr' -} - -SRC_URI[md5sum] = "1716bdf138fcc65b7069aaad864da677" -SRC_URI[sha256sum] = "7b07fa1c21749981ec0addcf8e9e85acfca91efe8d3f64982a6ac0bc6a615e70"
recipes/lua/lua-lanes_2.1.0.bb new file +34 -0
@@ -0,0 +1,34 @@ +DESCRIPTION = "Lua Lanes is a Lua extension library providing the possibility to run multiple Lua states in parallel." +LICENSE = "MIT" +HOMEPAGE = "http://kotisivu.dnainternet.net/askok/bin/lanes/index.html" + +DEPENDS += "lua5.1-native" +RDEPENDS_${PN} += "lua5.1" + +PR = "r0" + +S = "${WORKDIR}/git/" +SRCREV = "5499ec1a61be9797c57834618a49731952b1d212" + +SRC_URI = "git://github.com/LuaLanes/lanes.git;protocol=git \ + file://makefile.patch \ + " + +UCLIBC_PATCHES = "file://uclibc.patch" +SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}" + +LUA_LIB_DIR = "${libdir}/lua/5.1" +LUA_SHARE_DIR = "${datadir}/lua/5.1" + +PACKAGES = "${PN} ${PN}-dbg" +FILES_${PN} = "${LUA_LIB_DIR}/lua51-lanes.so ${LUA_SHARE_DIR}/lanes.lua" +FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/lua51-lanes.so" + +EXTRA_OEMAKE = "MYFLAGS='${CFLAGS} ${LDFLAGS}'" + +do_install() { + oe_runmake install DESTDIR='${D}/usr' +} + +SRC_URI[md5sum] = "1716bdf138fcc65b7069aaad864da677" +SRC_URI[sha256sum] = "7b07fa1c21749981ec0addcf8e9e85acfca91efe8d3f64982a6ac0bc6a615e70"
Signature · 1 line
1.7.1
PATCH 3/6 librs232: add version 1.0.1 and remove the old one
In reply to Petr Štetiar--- recipes/librs232/librs232_1.0.0.bb | 10 ---------- recipes/librs232/librs232_1.0.1.bb | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 recipes/librs232/librs232_1.0.0.bb create mode 100644 recipes/librs232/librs232_1.0.1.bb
recipes/librs232/librs232_1.0.0.bb deleted +0 -10
@@ -1,10 +0,0 @@ -DESCRIPTION = "librs232 - library for serial communications over RS-232 (serial port)" -HOMEPAGE = "http://github.com/ynezz/librs232" -LICENSE = "MIT" - -SRC_URI = "git://github.com/ynezz/librs232.git;protocol=git" - -SRCREV = "ecad1e03104bc9bf348e0c5e571660f270c86421" -S = "${WORKDIR}/git/" - -inherit autotools
recipes/librs232/librs232_1.0.1.bb new file +10 -0
@@ -0,0 +1,10 @@ +DESCRIPTION = "librs232 - library for serial communications over RS-232 (serial port)" +HOMEPAGE = "http://github.com/ynezz/librs232" +LICENSE = "MIT" + +SRC_URI = "git://github.com/ynezz/librs232.git;protocol=git" + +SRCREV = "cd9811207ee08f0bd83354b609c13f56e39d5f6c" +S = "${WORKDIR}/git/" + +inherit autotools
Signature · 1 line
1.7.1
PATCH 4/6 lua-rs232: add recipe for version 1.0.1, remove old package and fix stripping
In reply to Petr ŠtetiarThis patch adds recipe for the version 1.0.1 of the package, removes the old recipe and fixes the stripping of the shared library - we install the shared library with chmod 0755 now, otherwise the do_runstrip() function doesn't strip the library and the result is, that the library is packaged unstripped.
--- recipes/lua/lua-rs232_1.0.0.bb | 28 ---------------------------- recipes/lua/lua-rs232_1.0.1.bb | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 recipes/lua/lua-rs232_1.0.0.bb create mode 100644 recipes/lua/lua-rs232_1.0.1.bb
recipes/lua/lua-rs232_1.0.0.bb deleted +0 -28
@@ -1,28 +0,0 @@ -DESCRIPTION = "Lua bindings for librs232 - library for serial communications over RS-232 (serial port)" -HOMEPAGE = "http://github.com/ynezz/librs232" -LICENSE = "MIT" - -PR = "r1" - -DEPENDS += "lua5.1" -RDEPENDS_${PN} += "librs232" - -SRC_URI = "git://github.com/ynezz/librs232.git;protocol=git" - -SRCREV = "ecad1e03104bc9bf348e0c5e571660f270c86421" -S = "${WORKDIR}/git/" - -inherit autotools - -LUA_LIB_DIR = "${libdir}/lua/5.1" -LUA_LIB = "luars232.so" - -PACKAGES = "${PN} ${PN}-dbg" -FILES_${PN} = "${LUA_LIB_DIR}/${LUA_LIB}" -FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/${LUA_LIB}" - -do_install_append() { - install -d ${D}${LUA_LIB_DIR}/.debug - install -m 0644 ${D}${libdir}/${LUA_LIB} ${D}${LUA_LIB_DIR}/${LUA_LIB} - install -m 0644 ${D}${libdir}/${LUA_LIB} ${D}${LUA_LIB_DIR}/.debug/${LUA_LIB} -}
recipes/lua/lua-rs232_1.0.1.bb new file +28 -0
@@ -0,0 +1,28 @@ +DESCRIPTION = "Lua bindings for librs232 - library for serial communications over RS-232 (serial port)" +HOMEPAGE = "http://github.com/ynezz/librs232" +LICENSE = "MIT" + +PR = "r1" + +DEPENDS += "lua5.1" +RDEPENDS_${PN} += "librs232" + +SRC_URI = "git://github.com/ynezz/librs232.git;protocol=git" + +SRCREV = "cd9811207ee08f0bd83354b609c13f56e39d5f6c" +S = "${WORKDIR}/git/" + +inherit autotools + +LUA_LIB_DIR = "${libdir}/lua/5.1" +LUA_LIB = "luars232.so" + +PACKAGES = "${PN} ${PN}-dbg" +FILES_${PN} = "${LUA_LIB_DIR}/${LUA_LIB}" +FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/${LUA_LIB}" + +do_install_append() { + install -d ${D}${LUA_LIB_DIR}/.debug + install -m 0755 ${D}${libdir}/${LUA_LIB} ${D}${LUA_LIB_DIR}/${LUA_LIB} + install -m 0755 ${D}${libdir}/${LUA_LIB} ${D}${LUA_LIB_DIR}/.debug/${LUA_LIB} +}
Signature · 1 line
1.7.1
PATCH 5/6 linux-2.6.36: remove ts72xx support because 2.6.38 is now default
In reply to Petr Štetiar--- .../linux-2.6.36/ts72xx/0001-ts72xx_base.patch | 450 -- .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 - .../linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch | 36 - .../linux-2.6.36/ts72xx/0004-ep93xx_eth.patch | 555 --- .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 886 ---- .../linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch | 223 - .../linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch | 264 -- .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 -- .../linux-2.6.36/ts72xx/0009-ts72xx_pata.patch | 437 -- .../linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 - .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 -- .../linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch | 267 -- .../linux-2.6.36/ts72xx/0013-ts72xx_max197.patch | 356 -- .../ts72xx/0014-ts7200_nor_flash.patch | 181 - .../linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch | 3298 -------------- .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 -- .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 - .../ts72xx/0018-ethoc-ts7300-fixes.patch | 93 - .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 - .../ts72xx/0023-ts72xx-add-lcd-linux-driver.patch | 4569 -------------------- .../ts72xx/0024-ts72xx-add-GPIO-keys.patch | 100 - recipes/linux/linux-2.6.36/ts72xx/defconfig | 2127 --------- recipes/linux/linux_2.6.36.bb | 25 - 23 files changed, 0 insertions(+), 15013 deletions(-) delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/defconfig
recipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch deleted +0 -450
@@ -1,450 +0,0 @@ -From f05911e053a51d9a5aa0c8632b442354a7486f45 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 10:43:24 +0200 -Subject: [PATCH 01/24] ts72xx_base -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- patch: allow to force nF bit in control reg -- register pwm1 - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/Kconfig | 3 + - arch/arm/mach-ep93xx/Kconfig | 9 ++ - arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 7 + - arch/arm/mach-ep93xx/include/mach/memory.h | 28 +++++ - arch/arm/mach-ep93xx/include/mach/ts72xx.h | 145 +++++++++++++++++++++-- - arch/arm/mach-ep93xx/ts72xx.c | 41 ++++++- - arch/arm/mm/proc-arm920.S | 5 +- - scripts/Makefile.fwinst | 2 +- - 8 files changed, 223 insertions(+), 17 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 9c26ba7..8e6c85d 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -327,6 +327,9 @@ config ARCH_EP93XX - select CPU_ARM920T - select ARM_AMBA - select ARM_VIC -+ select ARCH_SPARSEMEM_ENABLE -+ select GENERIC_GPIO -+ select HAVE_CLK - select COMMON_CLKDEV - select ARCH_REQUIRE_GPIOLIB - select ARCH_HAS_HOLES_MEMORYMODEL -diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig -index 3a08b18..b6be37e 100644 ---- a/arch/arm/mach-ep93xx/Kconfig -+++ b/arch/arm/mach-ep93xx/Kconfig -@@ -7,6 +7,15 @@ config CRUNCH - help - Enable kernel support for MaverickCrunch. - -+config CR1_NFBIT -+ bool "Turn on nF bit in ControlRegister 1" -+ help -+ Say 'Y' here to force the nF bit on. Usually this is set -+ by the bootrom. If it is not set, then the CPU core will -+ run from HCLK instead of FCLK, and performance will suffer. -+ If you see BogoMIPS of about 1/4 of your CPU clock, try -+ turning this on; your performance should double. -+ - comment "EP93xx Platforms" - - choice -diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -index c54b3e5..db351cc 100644 ---- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -@@ -83,6 +83,7 @@ - - #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) - -+#define EP93XX_IDE_PHYS_BASE EP93XX_AHB_PHYS(0x000a0000) - #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) - - #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) -@@ -97,12 +98,17 @@ - #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) - - #define EP93XX_SECURITY_BASE EP93XX_APB_IOMEM(0x00030000) -+#define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x)) -+#define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440) - - #define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000) - #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) - #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) -+#define EP93XX_GPIO_F_INT_DEBOUNCE EP93XX_GPIO_REG(0x64) - #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) -+#define EP93XX_GPIO_A_INT_DEBOUNCE EP93XX_GPIO_REG(0xa8) - #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) -+#define EP93XX_GPIO_B_INT_DEBOUNCE EP93XX_GPIO_REG(0xc4) - #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) - - #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) -@@ -220,6 +226,7 @@ - #define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3) - #define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1) - #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) -+#define EP93XX_SYSCON_CHIPID EP93XX_SYSCON_REG(0x94) - #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) - - #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) -diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h -index 554064e..78eaacf 100644 ---- a/arch/arm/mach-ep93xx/include/mach/memory.h -+++ b/arch/arm/mach-ep93xx/include/mach/memory.h -@@ -19,4 +19,32 @@ - #error "Kconfig bug: No EP93xx PHYS_OFFSET set" - #endif - -+/* -+ * Non-linear mapping like so: -+ * phys => virt -+ * 0x00000000 => 0xc0000000 -+ * 0x01000000 => 0xc1000000 -+ * 0x04000000 => 0xc4000000 -+ * 0x05000000 => 0xc5000000 -+ * 0xe0000000 => 0xc8000000 -+ * 0xe1000000 => 0xc9000000 -+ * 0xe4000000 => 0xcc000000 -+ * 0xe5000000 => 0xcd000000 -+ * -+ * As suggested here: http://marc.info/?l=linux-arm&m=122754446724900&w=2 -+ * -+ * Note that static inline functions won't work here because -+ * arch/arm/include/asm/memory.h uses "#ifndef __virt_to_phys" to check whether to -+ * use generic functions or not. -+ */ -+ -+#define __phys_to_virt(p) \ -+ (((p) & 0x07ffffff) | (((p) & 0xe0000000) ? 0x08000000 : 0) | PAGE_OFFSET) -+ -+#define __virt_to_phys(v) \ -+ (((v) & 0x07ffffff) | (((v) & 0x08000000) ? 0xe0000000 : 0 )) -+ -+#define SECTION_SIZE_BITS 24 -+#define MAX_PHYSMEM_BITS 32 -+ - #endif -diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h -index 0eabec6..1d50dec 100644 ---- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h -+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h -@@ -8,36 +8,41 @@ - * virt phys size - * febff000 22000000 4K model number register - * febfe000 22400000 4K options register -- * febfd000 22800000 4K options register #2 -+ * febfd000 22800000 4K options register #2 (JP6 and TS-9420 flags) -+ * febfc000 [67]0000000 4K NAND data register -+ * febfb000 [67]0400000 4K NAND control register -+ * febfa000 [67]0800000 4K NAND busy register - * febf9000 10800000 4K TS-5620 RTC index register - * febf8000 11700000 4K TS-5620 RTC data register -+ * febf7000 23400000 4K PLD version (3 bits) -+ * febf6000 22c00000 4K RS-485 control register -+ * febf5000 23000000 4K RS-485 mode register - */ - - #define TS72XX_MODEL_PHYS_BASE 0x22000000 - #define TS72XX_MODEL_VIRT_BASE 0xfebff000 - #define TS72XX_MODEL_SIZE 0x00001000 - --#define TS72XX_MODEL_TS7200 0x00 --#define TS72XX_MODEL_TS7250 0x01 --#define TS72XX_MODEL_TS7260 0x02 -+#define TS7XXX_MODEL_TS7200 0x00 -+#define TS7XXX_MODEL_TS7250 0x01 -+#define TS7XXX_MODEL_TS7260 0x02 -+#define TS7XXX_MODEL_TS7300 0x03 -+#define TS7XXX_MODEL_TS7400 0x04 -+#define TS7XXX_MODEL_MASK 0x07 - - - #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 - #define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000 - #define TS72XX_OPTIONS_SIZE 0x00001000 -- - #define TS72XX_OPTIONS_COM2_RS485 0x02 - #define TS72XX_OPTIONS_MAX197 0x01 - -- - #define TS72XX_OPTIONS2_PHYS_BASE 0x22800000 - #define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000 - #define TS72XX_OPTIONS2_SIZE 0x00001000 -- - #define TS72XX_OPTIONS2_TS9420 0x04 - #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 - -- - #define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000 - #define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000 - #define TS72XX_RTC_INDEX_SIZE 0x00001000 -@@ -49,32 +54,146 @@ - #define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 - #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 - -+#define TS72XX_PLD_VERSION_VIRT_BASE 0xfebf7000 -+#define TS72XX_PLD_VERSION_PHYS_BASE 0x23400000 -+#define TS72XX_PLD_VERSION_SIZE 0x00001000 -+ -+#define TS72XX_JUMPERS_MAX197_PHYS_BASE 0x10800000 // jumpers/max197 busy bit/COM1 dcd register (8-bit, read only) -+#define TS72XX_MAX197_SAMPLE_PHYS_BASE 0x10f00000 // max197 sample/control register (16-bit read/8-bit write) -+ -+/* -+ * RS485 option -+ */ -+#define TS72XX_RS485_CONTROL_VIRT_BASE 0xfebf6000 -+#define TS72XX_RS485_CONTROL_PHYS_BASE 0x22c00000 -+#define TS72XX_RS485_CONTROL_SIZE 0x00001000 -+ -+#define TS72XX_RS485_MODE_VIRT_BASE 0xfebf5000 -+#define TS72XX_RS485_MODE_PHYS_BASE 0x23000000 -+#define TS72XX_RS485_MODE_SIZE 0x00001000 -+ -+#define TS72XX_RS485_AUTO485FD 1 -+#define TS72XX_RS485_AUTO485HD 2 -+#define TS72XX_RS485_MODE_RS232 0x00 -+#define TS72XX_RS485_MODE_FD 0x01 -+#define TS72XX_RS485_MODE_9600_HD 0x04 -+#define TS72XX_RS485_MODE_19200_HD 0x05 -+#define TS72XX_RS485_MODE_57600_HD 0x06 -+#define TS72XX_RS485_MODE_115200_HD 0x07 -+ -+/* -+ * PC/104 8-bit & 16-bit bus -+ * -+ * virt phys size -+ * febf0000 11e00000 4K PC/104 8-bit I/O -+ * febef000 21e00000 4K PC/104 16-bit I/O -+ * fea00000 11a00000 1MB PC/104 8-bit memory -+ * fe900000 21a00000 1MB PC/104 16-bit memory -+ */ -+#define TS72XX_PC104_8BIT_IO_VIRT_BASE 0xfebf0000 -+#define TS72XX_PC104_8BIT_IO_PHYS_BASE 0x11e00000 -+#define TS72XX_PC104_8BIT_IO_SIZE 0x00001000 -+#define TS72XX_PC104_8BIT_MEM_VIRT_BASE 0xfea00000 -+#define TS72XX_PC104_8BIT_MEM_PHYS_BASE 0x11a00000 -+#define TS72XX_PC104_8BIT_MEM_SIZE 0x00100000 -+ -+#define TS72XX_PC104_16BIT_IO_VIRT_BASE 0xfebef000 -+#define TS72XX_PC104_16BIT_IO_PHYS_BASE 0x21e00000 -+#define TS72XX_PC104_16BIT_IO_SIZE 0x00001000 -+#define TS72XX_PC104_16BIT_MEM_VIRT_BASE 0xfe900000 -+#define TS72XX_PC104_16BIT_MEM_PHYS_BASE 0x21a00000 -+#define TS72XX_PC104_16BIT_MEM_SIZE 0x00100000 -+ -+/* -+ * TS7200 specific : CompactFlash memory map -+ * -+ * phys size description -+ * 11000000 7 CF registers (8-bit each), starting at 11000001 -+ * 10400006 2 CF aux registers (8-bit) -+ * 21000000 2 CF data register (16-bit) -+ */ -+#define TS7200_CF_CMD_PHYS_BASE 0x11000000 -+#define TS7200_CF_AUX_PHYS_BASE 0x10400006 -+#define TS7200_CF_DATA_PHYS_BASE 0x21000000 -+ -+/* -+ * TS7260 specific : SD card & Power Management -+ * -+ * phys size description -+ * 12000000 4K Power management register (8-bit) -+ * 13000000 4K SD card registers (4 x 8-bit) -+ */ -+#define TS7260_POWER_MANAGEMENT_PHYS_BASE 0x12000000 -+#define TS7260_PM_RS232_LEVEL_CONVERTER 0x01 -+#define TS7260_PM_USB 0x02 -+#define TS7260_PM_LCD 0x04 -+#define TS7260_PM_5V_SWITCHER 0x08 -+#define TS7260_PM_PC104_CLOCK 0x10 -+#define TS7260_PM_PC104_FAST_STROBES 0x20 -+#define TS7260_PM_TTL_UART_ENABLE 0x40 -+#define TS7260_PM_SCRATCH_BIT 0x80 -+ -+#define TS7260_SDCARD_PHYS_BASE 0x13000000 -+ - #ifndef __ASSEMBLY__ - - static inline int board_is_ts7200(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7200; - } - - static inline int board_is_ts7250(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7250; - } - - static inline int board_is_ts7260(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7260; -+} -+ -+static inline int board_is_ts7300(void) -+{ -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7300; -+} -+ -+static inline int board_is_ts7400(void) -+{ -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7400; - } - - static inline int is_max197_installed(void) - { - return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & -- TS72XX_OPTIONS_MAX197); -+ TS72XX_OPTIONS_MAX197); - } - - static inline int is_ts9420_installed(void) - { - return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & -- TS72XX_OPTIONS2_TS9420); -+ TS72XX_OPTIONS2_TS9420); - } -+ -+static inline int is_rs485_installed(void) -+{ -+ return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & -+ TS72XX_OPTIONS_COM2_RS485); -+} -+ -+static inline int get_ts72xx_pld_version(void) -+{ -+ return (__raw_readb(TS72XX_PLD_VERSION_VIRT_BASE) & 0x7); -+} -+ -+/* User jumper */ -+static inline int is_jp6_set(void) -+{ -+ return (__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & 0x1); -+} -+ - #endif -diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c -index 93aeab8..345ce18 100644 ---- a/arch/arm/mach-ep93xx/ts72xx.c -+++ b/arch/arm/mach-ep93xx/ts72xx.c -@@ -54,7 +54,36 @@ static struct map_desc ts72xx_io_desc[] __initdata = { - .pfn = __phys_to_pfn(TS72XX_RTC_DATA_PHYS_BASE), - .length = TS72XX_RTC_DATA_SIZE, - .type = MT_DEVICE, -- } -+ }, -+ /* Use this for debug only. Each device will map its own PC/104 address space */ -+ ///* PC/104 (8-bit) I/O bus */ -+ //{ -+ // .virtual = TS72XX_PC104_8BIT_IO_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_IO_PHYS_BASE), -+ // .length = TS72XX_PC104_8BIT_IO_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (16-bit) I/O bus */ -+ //{ -+ // .virtual = TS72XX_PC104_16BIT_IO_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_IO_PHYS_BASE), -+ // .length = TS72XX_PC104_16BIT_IO_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (8-bit) MEM bus */ -+ //{ -+ // .virtual = TS72XX_PC104_8BIT_MEM_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_MEM_PHYS_BASE), -+ // .length = TS72XX_PC104_8BIT_MEM_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (16-bit) MEM bus */ -+ //{ -+ // .virtual = TS72XX_PC104_16BIT_MEM_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_MEM_PHYS_BASE), -+ // .length = TS72XX_PC104_16BIT_MEM_SIZE, -+ // .type = MT_DEVICE, -+ //} - }; - - static void __init ts72xx_map_io(void) -@@ -194,7 +223,9 @@ static void __init ts72xx_register_flash(void) - } - } - -- -+/************************************************************************* -+ * RTC -+ *************************************************************************/ - static unsigned char ts72xx_rtc_readbyte(unsigned long addr) - { - __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); -@@ -242,6 +273,9 @@ static struct platform_device ts72xx_wdt_device = { - }; - - static struct ep93xx_eth_data __initdata ts72xx_eth_data = { -+/************************************************************************* -+ * Ethernet -+ *************************************************************************/ - .phy_id = 1, - }; - -@@ -253,6 +287,9 @@ static void __init ts72xx_init_machine(void) - platform_device_register(&ts72xx_wdt_device); - - ep93xx_register_eth(&ts72xx_eth_data, 1); -+ -+ /* PWM1 is DIO_6 on TS-72xx header */ -+ ep93xx_register_pwm(0, 1); - } - - MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") -diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S -index 86f80aa..11ea759 100644 ---- a/arch/arm/mm/proc-arm920.S -+++ b/arch/arm/mm/proc-arm920.S -@@ -190,7 +190,7 @@ ENTRY(arm920_coherent_kern_range) - */ - ENTRY(arm920_coherent_user_range) - bic r0, r0, #CACHE_DLINESIZE - 1 --1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry -+1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry - mcr p15, 0, r0, c7, c5, 1 @ invalidate I entry - add r0, r0, #CACHE_DLINESIZE - cmp r0, r1 -@@ -390,6 +390,9 @@ __arm920_setup: - mrc p15, 0, r0, c1, c0 @ get control register v4 - bic r0, r0, r5 - orr r0, r0, r6 -+#ifdef CONFIG_CR1_NFBIT -+ orr r0, r0, #0x40000000 @ set nF -+#endif - mov pc, lr - .size __arm920_setup, . - __arm920_setup - -diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst -index 6bf8e87..fb20532 100644 ---- a/scripts/Makefile.fwinst -+++ b/scripts/Makefile.fwinst -@@ -37,7 +37,7 @@ install-all-dirs: $(installed-fw-dirs) - @true - - quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) -- cmd_install = $(INSTALL) -m0644 $< $@ -+ cmd_install = $(INSTALL) -m 0644 $< $@ - - $(installed-fw-dirs): - $(call cmd,mkdir) --- -1.7.0.4 -
recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patch deleted +0 -49
49 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch deleted +0 -36
@@ -1,36 +0,0 @@ -From 31727a8a72dc85dc4dc0eeeb27f7f9313c74914b Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 10:59:31 +0200 -Subject: [PATCH 03/24] ep93xx_cpuinfo -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/kernel/setup.c | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index d5231ae..a47ad88 100644 ---- a/arch/arm/kernel/setup.c -+++ b/arch/arm/kernel/setup.c -@@ -953,6 +953,15 @@ static int c_show(struct seq_file *m, void *v) - seq_puts(m, "\n"); - - seq_printf(m, "Hardware\t: %s\n", machine_name); -+ -+ #if defined(CONFIG_ARCH_EP93XX) -+ #include <mach/io.h> -+ #include <mach/ep93xx-regs.h> -+ system_rev = *((unsigned int *)EP93XX_SYSCON_CHIPID) >> 28; -+ system_serial_low = *((unsigned int *)EP93XX_SECURITY_UNIQID); -+ system_serial_high = 0; -+ #endif -+ - seq_printf(m, "Revision\t: %04x\n", system_rev); - seq_printf(m, "Serial\t\t: %08x%08x\n", - system_serial_high, system_serial_low); --- -1.7.0.4 -
recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch deleted +0 -555
555 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patch deleted +0 -886
886 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch deleted +0 -223
223 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch deleted +0 -264
264 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch deleted +0 -278
278 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch deleted +0 -437
259 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch deleted +0 -63
63 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch deleted +0 -311
311 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch deleted +0 -267
267 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch deleted +0 -356
356 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch deleted +0 -181
181 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch deleted +0 -3298
3,298 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch deleted +0 -305
305 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch deleted +0 -53
53 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch deleted +0 -93
93 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patch deleted +0 -87
87 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patch deleted +0 -4569
4,569 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patch deleted +0 -100
100 lines not on this page · raw message
recipes/linux/linux-2.6.36/ts72xx/defconfig deleted +0 -2127
2,127 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH 5/6] linux-2.6.36: remove ts72xx support because 2.6.38 is now default
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is it really necessary to remove it from .36 instead of DP+1;ing .38?
recipes/linux/linux_2.6.36.bb
Quoted 15,212 lines · Petr Štetiar
Signed-off-by Petr Štetiar <[email protected]>--- .../linux-2.6.36/ts72xx/0001-ts72xx_base.patch | 450 -- .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 - .../linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch | 36 - .../linux-2.6.36/ts72xx/0004-ep93xx_eth.patch | 555 --- .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 886 ---- .../linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch | 223 - .../linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch | 264 -- .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 -- .../linux-2.6.36/ts72xx/0009-ts72xx_pata.patch | 437 -- .../linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 - .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 -- .../linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch | 267 -- .../linux-2.6.36/ts72xx/0013-ts72xx_max197.patch | 356 -- .../ts72xx/0014-ts7200_nor_flash.patch | 181 - .../linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch | 3298 -------------- .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 -- .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 - .../ts72xx/0018-ethoc-ts7300-fixes.patch | 93 - .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 - .../ts72xx/0023-ts72xx-add-lcd-linux-driver.patch | 4569 -------------------- .../ts72xx/0024-ts72xx-add-GPIO-keys.patch | 100 - recipes/linux/linux-2.6.36/ts72xx/defconfig | 2127 --------- recipes/linux/linux_2.6.36.bb | 25 - 23 files changed, 0 insertions(+), 15013 deletions(-) delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patch delete mode 100644 recipes/linux/linux-2.6.36/ts72xx/defconfigrecipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch deleted +0
-450@@ -1,450 +0,0 @@ -From f05911e053a51d9a5aa0c8632b442354a7486f45 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 10:43:24 +0200 -Subject: [PATCH 01/24] ts72xx_base -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- patch: allow to force nF bit in control reg -- register pwm1 - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/Kconfig | 3 + - arch/arm/mach-ep93xx/Kconfig | 9 ++ - arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 7 + - arch/arm/mach-ep93xx/include/mach/memory.h | 28 +++++ - arch/arm/mach-ep93xx/include/mach/ts72xx.h | 145 +++++++++++++++++++++-- - arch/arm/mach-ep93xx/ts72xx.c | 41 ++++++- - arch/arm/mm/proc-arm920.S | 5 +- - scripts/Makefile.fwinst | 2 +- - 8 files changed, 223 insertions(+), 17 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 9c26ba7..8e6c85d 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -327,6 +327,9 @@ config ARCH_EP93XX - select CPU_ARM920T - select ARM_AMBA - select ARM_VIC -+ select ARCH_SPARSEMEM_ENABLE -+ select GENERIC_GPIO -+ select HAVE_CLK - select COMMON_CLKDEV - select ARCH_REQUIRE_GPIOLIB - select ARCH_HAS_HOLES_MEMORYMODEL -diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig -index 3a08b18..b6be37e 100644 ---- a/arch/arm/mach-ep93xx/Kconfig -+++ b/arch/arm/mach-ep93xx/Kconfig -@@ -7,6 +7,15 @@ config CRUNCH - help - Enable kernel support for MaverickCrunch. - -+config CR1_NFBIT -+ bool "Turn on nF bit in ControlRegister 1" -+ help -+ Say 'Y' here to force the nF bit on. Usually this is set -+ by the bootrom. If it is not set, then the CPU core will -+ run from HCLK instead of FCLK, and performance will suffer. -+ If you see BogoMIPS of about 1/4 of your CPU clock, try -+ turning this on; your performance should double. -+ - comment "EP93xx Platforms" - - choice -diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -index c54b3e5..db351cc 100644 ---- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h -@@ -83,6 +83,7 @@ - - #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) - -+#define EP93XX_IDE_PHYS_BASE EP93XX_AHB_PHYS(0x000a0000) - #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) - - #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) -@@ -97,12 +98,17 @@ - #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) - - #define EP93XX_SECURITY_BASE EP93XX_APB_IOMEM(0x00030000) -+#define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x)) -+#define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440) - - #define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000) - #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) - #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) -+#define EP93XX_GPIO_F_INT_DEBOUNCE EP93XX_GPIO_REG(0x64) - #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) -+#define EP93XX_GPIO_A_INT_DEBOUNCE EP93XX_GPIO_REG(0xa8) - #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) -+#define EP93XX_GPIO_B_INT_DEBOUNCE EP93XX_GPIO_REG(0xc4) - #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) - - #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) -@@ -220,6 +226,7 @@ - #define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3) - #define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1) - #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) -+#define EP93XX_SYSCON_CHIPID EP93XX_SYSCON_REG(0x94) - #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) - - #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) -diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h -index 554064e..78eaacf 100644 ---- a/arch/arm/mach-ep93xx/include/mach/memory.h -+++ b/arch/arm/mach-ep93xx/include/mach/memory.h -@@ -19,4 +19,32 @@ - #error "Kconfig bug: No EP93xx PHYS_OFFSET set" - #endif - -+/* -+ * Non-linear mapping like so: -+ * phys => virt -+ * 0x00000000 => 0xc0000000 -+ * 0x01000000 => 0xc1000000 -+ * 0x04000000 => 0xc4000000 -+ * 0x05000000 => 0xc5000000 -+ * 0xe0000000 => 0xc8000000 -+ * 0xe1000000 => 0xc9000000 -+ * 0xe4000000 => 0xcc000000 -+ * 0xe5000000 => 0xcd000000 -+ * -+ * As suggested here: http://marc.info/?l=linux-arm&m=122754446724900&w=2 -+ * -+ * Note that static inline functions won't work here because -+ * arch/arm/include/asm/memory.h uses "#ifndef __virt_to_phys" to check whether to -+ * use generic functions or not. -+ */ -+ -+#define __phys_to_virt(p) \ -+ (((p) & 0x07ffffff) | (((p) & 0xe0000000) ? 0x08000000 : 0) | PAGE_OFFSET) -+ -+#define __virt_to_phys(v) \ -+ (((v) & 0x07ffffff) | (((v) & 0x08000000) ? 0xe0000000 : 0 )) -+ -+#define SECTION_SIZE_BITS 24 -+#define MAX_PHYSMEM_BITS 32 -+ - #endif -diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h -index 0eabec6..1d50dec 100644 ---- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h -+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h -@@ -8,36 +8,41 @@ - * virt phys size - * febff000 22000000 4K model number register - * febfe000 22400000 4K options register -- * febfd000 22800000 4K options register #2 -+ * febfd000 22800000 4K options register #2 (JP6 and TS-9420 flags) -+ * febfc000 [67]0000000 4K NAND data register -+ * febfb000 [67]0400000 4K NAND control register -+ * febfa000 [67]0800000 4K NAND busy register - * febf9000 10800000 4K TS-5620 RTC index register - * febf8000 11700000 4K TS-5620 RTC data register -+ * febf7000 23400000 4K PLD version (3 bits) -+ * febf6000 22c00000 4K RS-485 control register -+ * febf5000 23000000 4K RS-485 mode register - */ - - #define TS72XX_MODEL_PHYS_BASE 0x22000000 - #define TS72XX_MODEL_VIRT_BASE 0xfebff000 - #define TS72XX_MODEL_SIZE 0x00001000 - --#define TS72XX_MODEL_TS7200 0x00 --#define TS72XX_MODEL_TS7250 0x01 --#define TS72XX_MODEL_TS7260 0x02 -+#define TS7XXX_MODEL_TS7200 0x00 -+#define TS7XXX_MODEL_TS7250 0x01 -+#define TS7XXX_MODEL_TS7260 0x02 -+#define TS7XXX_MODEL_TS7300 0x03 -+#define TS7XXX_MODEL_TS7400 0x04 -+#define TS7XXX_MODEL_MASK 0x07 - - - #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 - #define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000 - #define TS72XX_OPTIONS_SIZE 0x00001000 -- - #define TS72XX_OPTIONS_COM2_RS485 0x02 - #define TS72XX_OPTIONS_MAX197 0x01 - -- - #define TS72XX_OPTIONS2_PHYS_BASE 0x22800000 - #define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000 - #define TS72XX_OPTIONS2_SIZE 0x00001000 -- - #define TS72XX_OPTIONS2_TS9420 0x04 - #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 - -- - #define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000 - #define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000 - #define TS72XX_RTC_INDEX_SIZE 0x00001000 -@@ -49,32 +54,146 @@ - #define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 - #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 - -+#define TS72XX_PLD_VERSION_VIRT_BASE 0xfebf7000 -+#define TS72XX_PLD_VERSION_PHYS_BASE 0x23400000 -+#define TS72XX_PLD_VERSION_SIZE 0x00001000 -+ -+#define TS72XX_JUMPERS_MAX197_PHYS_BASE 0x10800000 // jumpers/max197 busy bit/COM1 dcd register (8-bit, read only) -+#define TS72XX_MAX197_SAMPLE_PHYS_BASE 0x10f00000 // max197 sample/control register (16-bit read/8-bit write) -+ -+/* -+ * RS485 option -+ */ -+#define TS72XX_RS485_CONTROL_VIRT_BASE 0xfebf6000 -+#define TS72XX_RS485_CONTROL_PHYS_BASE 0x22c00000 -+#define TS72XX_RS485_CONTROL_SIZE 0x00001000 -+ -+#define TS72XX_RS485_MODE_VIRT_BASE 0xfebf5000 -+#define TS72XX_RS485_MODE_PHYS_BASE 0x23000000 -+#define TS72XX_RS485_MODE_SIZE 0x00001000 -+ -+#define TS72XX_RS485_AUTO485FD 1 -+#define TS72XX_RS485_AUTO485HD 2 -+#define TS72XX_RS485_MODE_RS232 0x00 -+#define TS72XX_RS485_MODE_FD 0x01 -+#define TS72XX_RS485_MODE_9600_HD 0x04 -+#define TS72XX_RS485_MODE_19200_HD 0x05 -+#define TS72XX_RS485_MODE_57600_HD 0x06 -+#define TS72XX_RS485_MODE_115200_HD 0x07 -+ -+/* -+ * PC/104 8-bit & 16-bit bus -+ * -+ * virt phys size -+ * febf0000 11e00000 4K PC/104 8-bit I/O -+ * febef000 21e00000 4K PC/104 16-bit I/O -+ * fea00000 11a00000 1MB PC/104 8-bit memory -+ * fe900000 21a00000 1MB PC/104 16-bit memory -+ */ -+#define TS72XX_PC104_8BIT_IO_VIRT_BASE 0xfebf0000 -+#define TS72XX_PC104_8BIT_IO_PHYS_BASE 0x11e00000 -+#define TS72XX_PC104_8BIT_IO_SIZE 0x00001000 -+#define TS72XX_PC104_8BIT_MEM_VIRT_BASE 0xfea00000 -+#define TS72XX_PC104_8BIT_MEM_PHYS_BASE 0x11a00000 -+#define TS72XX_PC104_8BIT_MEM_SIZE 0x00100000 -+ -+#define TS72XX_PC104_16BIT_IO_VIRT_BASE 0xfebef000 -+#define TS72XX_PC104_16BIT_IO_PHYS_BASE 0x21e00000 -+#define TS72XX_PC104_16BIT_IO_SIZE 0x00001000 -+#define TS72XX_PC104_16BIT_MEM_VIRT_BASE 0xfe900000 -+#define TS72XX_PC104_16BIT_MEM_PHYS_BASE 0x21a00000 -+#define TS72XX_PC104_16BIT_MEM_SIZE 0x00100000 -+ -+/* -+ * TS7200 specific : CompactFlash memory map -+ * -+ * phys size description -+ * 11000000 7 CF registers (8-bit each), starting at 11000001 -+ * 10400006 2 CF aux registers (8-bit) -+ * 21000000 2 CF data register (16-bit) -+ */ -+#define TS7200_CF_CMD_PHYS_BASE 0x11000000 -+#define TS7200_CF_AUX_PHYS_BASE 0x10400006 -+#define TS7200_CF_DATA_PHYS_BASE 0x21000000 -+ -+/* -+ * TS7260 specific : SD card & Power Management -+ * -+ * phys size description -+ * 12000000 4K Power management register (8-bit) -+ * 13000000 4K SD card registers (4 x 8-bit) -+ */ -+#define TS7260_POWER_MANAGEMENT_PHYS_BASE 0x12000000 -+#define TS7260_PM_RS232_LEVEL_CONVERTER 0x01 -+#define TS7260_PM_USB 0x02 -+#define TS7260_PM_LCD 0x04 -+#define TS7260_PM_5V_SWITCHER 0x08 -+#define TS7260_PM_PC104_CLOCK 0x10 -+#define TS7260_PM_PC104_FAST_STROBES 0x20 -+#define TS7260_PM_TTL_UART_ENABLE 0x40 -+#define TS7260_PM_SCRATCH_BIT 0x80 -+ -+#define TS7260_SDCARD_PHYS_BASE 0x13000000 -+ - #ifndef __ASSEMBLY__ - - static inline int board_is_ts7200(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7200; - } - - static inline int board_is_ts7250(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7250; - } - - static inline int board_is_ts7260(void) - { -- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7260; -+} -+ -+static inline int board_is_ts7300(void) -+{ -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7300; -+} -+ -+static inline int board_is_ts7400(void) -+{ -+ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & -+ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7400; - } - - static inline int is_max197_installed(void) - { - return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & -- TS72XX_OPTIONS_MAX197); -+ TS72XX_OPTIONS_MAX197); - } - - static inline int is_ts9420_installed(void) - { - return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & -- TS72XX_OPTIONS2_TS9420); -+ TS72XX_OPTIONS2_TS9420); - } -+ -+static inline int is_rs485_installed(void) -+{ -+ return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & -+ TS72XX_OPTIONS_COM2_RS485); -+} -+ -+static inline int get_ts72xx_pld_version(void) -+{ -+ return (__raw_readb(TS72XX_PLD_VERSION_VIRT_BASE) & 0x7); -+} -+ -+/* User jumper */ -+static inline int is_jp6_set(void) -+{ -+ return (__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & 0x1); -+} -+ - #endif -diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c -index 93aeab8..345ce18 100644 ---- a/arch/arm/mach-ep93xx/ts72xx.c -+++ b/arch/arm/mach-ep93xx/ts72xx.c -@@ -54,7 +54,36 @@ static struct map_desc ts72xx_io_desc[] __initdata = { - .pfn = __phys_to_pfn(TS72XX_RTC_DATA_PHYS_BASE), - .length = TS72XX_RTC_DATA_SIZE, - .type = MT_DEVICE, -- } -+ }, -+ /* Use this for debug only. Each device will map its own PC/104 address space */ -+ ///* PC/104 (8-bit) I/O bus */ -+ //{ -+ // .virtual = TS72XX_PC104_8BIT_IO_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_IO_PHYS_BASE), -+ // .length = TS72XX_PC104_8BIT_IO_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (16-bit) I/O bus */ -+ //{ -+ // .virtual = TS72XX_PC104_16BIT_IO_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_IO_PHYS_BASE), -+ // .length = TS72XX_PC104_16BIT_IO_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (8-bit) MEM bus */ -+ //{ -+ // .virtual = TS72XX_PC104_8BIT_MEM_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_MEM_PHYS_BASE), -+ // .length = TS72XX_PC104_8BIT_MEM_SIZE, -+ // .type = MT_DEVICE, -+ //}, -+ ///* PC/104 (16-bit) MEM bus */ -+ //{ -+ // .virtual = TS72XX_PC104_16BIT_MEM_VIRT_BASE, -+ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_MEM_PHYS_BASE), -+ // .length = TS72XX_PC104_16BIT_MEM_SIZE, -+ // .type = MT_DEVICE, -+ //} - }; - - static void __init ts72xx_map_io(void) -@@ -194,7 +223,9 @@ static void __init ts72xx_register_flash(void) - } - } - -- -+/************************************************************************* -+ * RTC -+ *************************************************************************/ - static unsigned char ts72xx_rtc_readbyte(unsigned long addr) - { - __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); -@@ -242,6 +273,9 @@ static struct platform_device ts72xx_wdt_device = { - }; - - static struct ep93xx_eth_data __initdata ts72xx_eth_data = { -+/************************************************************************* -+ * Ethernet -+ *************************************************************************/ - .phy_id = 1, - }; - -@@ -253,6 +287,9 @@ static void __init ts72xx_init_machine(void) - platform_device_register(&ts72xx_wdt_device); - - ep93xx_register_eth(&ts72xx_eth_data, 1); -+ -+ /* PWM1 is DIO_6 on TS-72xx header */ -+ ep93xx_register_pwm(0, 1); - } - - MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") -diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S -index 86f80aa..11ea759 100644 ---- a/arch/arm/mm/proc-arm920.S -+++ b/arch/arm/mm/proc-arm920.S -@@ -190,7 +190,7 @@ ENTRY(arm920_coherent_kern_range) - */ - ENTRY(arm920_coherent_user_range) - bic r0, r0, #CACHE_DLINESIZE - 1 --1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry -+1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry - mcr p15, 0, r0, c7, c5, 1 @ invalidate I entry - add r0, r0, #CACHE_DLINESIZE - cmp r0, r1 -@@ -390,6 +390,9 @@ __arm920_setup: - mrc p15, 0, r0, c1, c0 @ get control register v4 - bic r0, r0, r5 - orr r0, r0, r6 -+#ifdef CONFIG_CR1_NFBIT -+ orr r0, r0, #0x40000000 @ set nF -+#endif - mov pc, lr - .size __arm920_setup, . - __arm920_setup - -diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst -index 6bf8e87..fb20532 100644 ---- a/scripts/Makefile.fwinst -+++ b/scripts/Makefile.fwinst -@@ -37,7 +37,7 @@ install-all-dirs: $(installed-fw-dirs) - @true - - quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) -- cmd_install = $(INSTALL) -m0644 $< $@ -+ cmd_install = $(INSTALL) -m 0644 $< $@ - - $(installed-fw-dirs): - $(call cmd,mkdir) --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patch deleted +0
-49@@ -1,49 +0,0 @@ -From 841896f3124d3493f5bb1b98370a1d5fcdcaedb4 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 10:51:39 +0200 -Subject: [PATCH 02/24] ts72xx_force_machine-id -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/kernel/head.S | 3 +++ - arch/arm/mach-ep93xx/Kconfig | 7 +++++++ - 2 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S -index eb62bf9..543eccf 100644 ---- a/arch/arm/kernel/head.S -+++ b/arch/arm/kernel/head.S -@@ -82,6 +82,9 @@ ENTRY(stext) - bl __lookup_processor_type @ r5=procinfo r9=cpuid - movs r10, r5 @ invalid processor (r5=0)? - beq __error_p @ yes, error 'p' -+#ifdef CONFIG_MACH_TS72XX_FORCE_MACHINEID -+ ldr r1, =0x2a1 -+#endif - bl __lookup_machine_type @ r5=machinfo - movs r8, r5 @ invalid machine (r5=0)? - beq __error_a @ yes, error 'a' -diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig -index b6be37e..bd463a0 100644 ---- a/arch/arm/mach-ep93xx/Kconfig -+++ b/arch/arm/mach-ep93xx/Kconfig -@@ -205,6 +205,13 @@ config EP93XX_EARLY_UART3 - - endchoice - -+config MACH_TS72XX_FORCE_MACHINEID -+ bool "Force Machine ID" -+ depends on MACH_TS72XX -+ help -+ Say 'Y' here to force Machine ID to 0x2A1 (MACH_TYPE_TS72XX legacy value) -+ In early days Technologic Systems fixed the 0x163 value in redboot. -+ - endmenu - - endif --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch deleted +0
-36@@ -1,36 +0,0 @@ -From 31727a8a72dc85dc4dc0eeeb27f7f9313c74914b Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 10:59:31 +0200 -Subject: [PATCH 03/24] ep93xx_cpuinfo -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/kernel/setup.c | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index d5231ae..a47ad88 100644 ---- a/arch/arm/kernel/setup.c -+++ b/arch/arm/kernel/setup.c -@@ -953,6 +953,15 @@ static int c_show(struct seq_file *m, void *v) - seq_puts(m, "\n"); - - seq_printf(m, "Hardware\t: %s\n", machine_name); -+ -+ #if defined(CONFIG_ARCH_EP93XX) -+ #include <mach/io.h> -+ #include <mach/ep93xx-regs.h> -+ system_rev = *((unsigned int *)EP93XX_SYSCON_CHIPID) >> 28; -+ system_serial_low = *((unsigned int *)EP93XX_SECURITY_UNIQID); -+ system_serial_high = 0; -+ #endif -+ - seq_printf(m, "Revision\t: %04x\n", system_rev); - seq_printf(m, "Serial\t\t: %08x%08x\n", - system_serial_high, system_serial_low); --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch deleted +0
-555@@ -1,555 +0,0 @@ -From 802fa6d7ec0d57684912b39f0fb0341698cda4e3 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 13:34:14 +0200 -Subject: [PATCH 04/24] ep93xx_eth -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar <[email protected]> ---- - drivers/net/arm/Kconfig | 1 + - drivers/net/arm/ep93xx_eth.c | 346 ++++++++++++++++++++++++++++++++++-------- - 2 files changed, 280 insertions(+), 67 deletions(-) - -diff --git a/drivers/net/arm/Kconfig b/drivers/net/arm/Kconfig -index 39e1c0d..55c0dd4 100644 ---- a/drivers/net/arm/Kconfig -+++ b/drivers/net/arm/Kconfig -@@ -52,6 +52,7 @@ config EP93XX_ETH - tristate "EP93xx Ethernet support" - depends on ARM && ARCH_EP93XX - select MII -+ select PHYLIB - help - This is a driver for the ethernet hardware included in EP93xx CPUs. - Say Y if you are building a kernel for EP93xx based devices. -diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c -index 4a5ec94..7e60c4d 100644 ---- a/drivers/net/arm/ep93xx_eth.c -+++ b/drivers/net/arm/ep93xx_eth.c -@@ -2,6 +2,7 @@ - * EP93xx ethernet network device driver - * Copyright (C) 2006 Lennert Buytenhek <[email protected]> - * Dedicated to Marija Kulikova. -+ * Copyright (C) 2007 Herbert Valerio Riedel <[email protected]> - * - * 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 -@@ -16,6 +17,7 @@ - #include <linux/kernel.h> - #include <linux/netdevice.h> - #include <linux/mii.h> -+#include <linux/phy.h> - #include <linux/etherdevice.h> - #include <linux/ethtool.h> - #include <linux/init.h> -@@ -27,8 +29,8 @@ - - #include <mach/hardware.h> - --#define DRV_MODULE_NAME "ep93xx-eth" --#define DRV_MODULE_VERSION "0.1" -+#define DRV_NAME "ep93xx-eth" -+#define DRV_VERSION "0.13" - - #define RX_QUEUE_ENTRIES 64 - #define TX_QUEUE_ENTRIES 8 -@@ -40,6 +42,8 @@ - #define REG_RXCTL_DEFAULT 0x00073800 - #define REG_TXCTL 0x0004 - #define REG_TXCTL_ENABLE 0x00000001 -+#define REG_TESTCTL 0x0008 -+#define REG_TESTCTL_MFDX 0x00000040 - #define REG_MIICMD 0x0010 - #define REG_MIICMD_READ 0x00008000 - #define REG_MIICMD_WRITE 0x00004000 -@@ -48,6 +52,9 @@ - #define REG_MIISTS_BUSY 0x00000001 - #define REG_SELFCTL 0x0020 - #define REG_SELFCTL_RESET 0x00000001 -+#define REG_SELFCTL_MDCDIV_MSK 0x00007e00 -+#define REG_SELFCTL_MDCDIV_OFS 9 -+#define REG_SELFCTL_PSPRS 0x00000100 - #define REG_INTEN 0x0024 - #define REG_INTEN_TX 0x00000008 - #define REG_INTEN_RX 0x00000007 -@@ -177,8 +184,14 @@ struct ep93xx_priv - - struct net_device_stats stats; - -- struct mii_if_info mii; - u8 mdc_divisor; -+ int phy_supports_mfps:1; -+ -+ struct mii_bus mii_bus; -+ struct phy_device *phy_dev; -+ int speed; -+ int duplex; -+ int link; - }; - - #define rdb(ep, off) __raw_readb((ep)->base_addr + (off)) -@@ -188,46 +201,78 @@ struct ep93xx_priv - #define wrw(ep, off, val) __raw_writew((val), (ep)->base_addr + (off)) - #define wrl(ep, off, val) __raw_writel((val), (ep)->base_addr + (off)) - --static int ep93xx_mdio_read(struct net_device *dev, int phy_id, int reg) -+/* common MII transactions should take < 100 iterations */ -+#define EP93XX_PHY_TIMEOUT 2000 -+ -+static int ep93xx_mdio_wait(struct mii_bus *bus) - { -- struct ep93xx_priv *ep = netdev_priv(dev); -- int data; -- int i; -+ struct ep93xx_priv *ep = bus->priv; -+ unsigned int timeout = EP93XX_PHY_TIMEOUT; - -- wrl(ep, REG_MIICMD, REG_MIICMD_READ | (phy_id << 5) | reg); -+ while ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) -+ && timeout--) -+ cpu_relax(); - -- for (i = 0; i < 10; i++) { -- if ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) == 0) -- break; -- msleep(1); -+ if (timeout <= 0) { -+ dev_err(&bus->dev, "MII operation timed out\n"); -+ return -ETIMEDOUT; - } - -- if (i == 10) { -- pr_info("mdio read timed out\n"); -- data = 0xffff; -- } else { -- data = rdl(ep, REG_MIIDATA); -- } -+ return 0; -+} -+ -+static int ep93xx_mdio_read(struct mii_bus *bus, int mii_id, int reg) -+{ -+ struct ep93xx_priv *ep = bus->priv; -+ u32 selfctl; -+ u32 data; -+ -+ if (ep93xx_mdio_wait(bus) < 0) -+ return -ETIMEDOUT; -+ -+ selfctl = rdl(ep, REG_SELFCTL); - -- return data; -+ if (ep->phy_supports_mfps) -+ wrl(ep, REG_SELFCTL, selfctl | REG_SELFCTL_PSPRS); -+ else -+ wrl(ep, REG_SELFCTL, selfctl & ~REG_SELFCTL_PSPRS); -+ -+ wrl(ep, REG_MIICMD, REG_MIICMD_READ | (mii_id << 5) | reg); -+ -+ if (ep93xx_mdio_wait(bus) < 0) -+ return -ETIMEDOUT; -+ -+ data = rdl(ep, REG_MIIDATA); -+ -+ wrl(ep, REG_SELFCTL, selfctl); -+ -+ return data; - } - --static void ep93xx_mdio_write(struct net_device *dev, int phy_id, int reg, int data) -+static int ep93xx_mdio_write(struct mii_bus *bus, int mii_id, int reg, u16 data) - { -- struct ep93xx_priv *ep = netdev_priv(dev); -- int i; -+ struct ep93xx_priv *ep = bus->priv; -+ u32 selfctl; -+ -+ if (ep93xx_mdio_wait(bus) < 0) -+ return -ETIMEDOUT; -+ -+ selfctl = rdl(ep, REG_SELFCTL); -+ -+ if (ep->phy_supports_mfps) -+ wrl(ep, REG_SELFCTL, selfctl | REG_SELFCTL_PSPRS); -+ else -+ wrl(ep, REG_SELFCTL, selfctl & ~REG_SELFCTL_PSPRS); - - wrl(ep, REG_MIIDATA, data); -- wrl(ep, REG_MIICMD, REG_MIICMD_WRITE | (phy_id << 5) | reg); -+ wrl(ep, REG_MIICMD, REG_MIICMD_WRITE | (mii_id << 5) | reg); - -- for (i = 0; i < 10; i++) { -- if ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) == 0) -- break; -- msleep(1); -- } -+ if (ep93xx_mdio_wait(bus) < 0) -+ return -ETIMEDOUT; - -- if (i == 10) -- pr_info("mdio write timed out\n"); -+ wrl(ep, REG_SELFCTL, selfctl); -+ -+ return 0; - } - - static struct net_device_stats *ep93xx_get_stats(struct net_device *dev) -@@ -557,6 +602,22 @@ err: - return 1; - } - -+static int ep93xx_mdio_reset(struct mii_bus *bus) -+{ -+ struct ep93xx_priv *ep = bus->priv; -+ -+ u32 selfctl = rdl(ep, REG_SELFCTL); -+ -+ selfctl &= ~(REG_SELFCTL_MDCDIV_MSK | REG_SELFCTL_PSPRS); -+ -+ selfctl |= (ep->mdc_divisor - 1) << REG_SELFCTL_MDCDIV_OFS; -+ selfctl |= REG_SELFCTL_PSPRS; -+ -+ wrl(ep, REG_SELFCTL, selfctl); -+ -+ return 0; -+} -+ - static int ep93xx_start_hw(struct net_device *dev) - { - struct ep93xx_priv *ep = netdev_priv(dev); -@@ -575,11 +636,8 @@ static int ep93xx_start_hw(struct net_device *dev) - return 1; - } - -- wrl(ep, REG_SELFCTL, ((ep->mdc_divisor - 1) << 9)); -- -- /* Does the PHY support preamble suppress? */ -- if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) -- wrl(ep, REG_SELFCTL, ((ep->mdc_divisor - 1) << 9) | (1 << 8)); -+ /* The reset cleared REG_SELFCTL, so set the MDC divisor again */ -+ ep93xx_mdio_reset(&ep->mii_bus); - - /* Receive descriptor ring. */ - addr = ep->descs_dma_addr + offsetof(struct ep93xx_descs, rdesc); -@@ -688,6 +746,8 @@ static int ep93xx_open(struct net_device *dev) - - wrl(ep, REG_GIINTMSK, REG_GIINTMSK_ENABLE); - -+ phy_start(ep->phy_dev); -+ - netif_start_queue(dev); - - return 0; -@@ -700,6 +760,9 @@ static int ep93xx_close(struct net_device *dev) - napi_disable(&ep->napi); - netif_stop_queue(dev); - -+ if (ep->phy_dev) -+ phy_stop(ep->phy_dev); -+ - wrl(ep, REG_GIINTMSK, 0); - free_irq(ep->irq, dev); - ep93xx_stop_hw(dev); -@@ -711,47 +774,44 @@ static int ep93xx_close(struct net_device *dev) - static int ep93xx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) - { - struct ep93xx_priv *ep = netdev_priv(dev); -- struct mii_ioctl_data *data = if_mii(ifr); - -- return generic_mii_ioctl(&ep->mii, data, cmd, NULL); -+ return phy_mii_ioctl(ep->phy_dev, ifr, cmd); - } - - static void ep93xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) - { -- strcpy(info->driver, DRV_MODULE_NAME); -- strcpy(info->version, DRV_MODULE_VERSION); -+ strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); -+ strlcpy(info->version, DRV_VERSION, sizeof(info->version)); -+ strlcpy(info->bus_info, dev_name(dev->dev.parent), sizeof(info->bus_info)); - } - - static int ep93xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) - { - struct ep93xx_priv *ep = netdev_priv(dev); -- return mii_ethtool_gset(&ep->mii, cmd); -+ struct phy_device *phydev = ep->phy_dev; -+ -+ if (!phydev) -+ return -ENODEV; -+ -+ return phy_ethtool_gset(phydev, cmd); - } - - static int ep93xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) - { - struct ep93xx_priv *ep = netdev_priv(dev); -- return mii_ethtool_sset(&ep->mii, cmd); --} -+ struct phy_device *phydev = ep->phy_dev; - --static int ep93xx_nway_reset(struct net_device *dev) --{ -- struct ep93xx_priv *ep = netdev_priv(dev); -- return mii_nway_restart(&ep->mii); --} -+ if (!phydev) -+ return -ENODEV; - --static u32 ep93xx_get_link(struct net_device *dev) --{ -- struct ep93xx_priv *ep = netdev_priv(dev); -- return mii_link_ok(&ep->mii); -+ return phy_ethtool_sset(phydev, cmd); - } - - static const struct ethtool_ops ep93xx_ethtool_ops = { - .get_drvinfo = ep93xx_get_drvinfo, - .get_settings = ep93xx_get_settings, - .set_settings = ep93xx_set_settings, -- .nway_reset = ep93xx_nway_reset, -- .get_link = ep93xx_get_link, -+ .get_link = ethtool_op_get_link, - }; - - static const struct net_device_ops ep93xx_netdev_ops = { -@@ -813,6 +873,113 @@ static int ep93xx_eth_remove(struct platform_device *pdev) - return 0; - } - -+static void ep93xx_adjust_link(struct net_device *dev) -+{ -+ struct ep93xx_priv *ep = netdev_priv(dev); -+ struct phy_device *phydev = ep->phy_dev; -+ -+ int status_change = 0; -+ -+ if (phydev->link) { -+ if ((ep->speed != phydev->speed) || -+ (ep->duplex != phydev->duplex)) { -+ /* speed and/or duplex state changed */ -+ u32 testctl = rdl(ep, REG_TESTCTL); -+ -+ if (DUPLEX_FULL == phydev->duplex) -+ testctl |= REG_TESTCTL_MFDX; -+ else -+ testctl &= ~(REG_TESTCTL_MFDX); -+ -+ wrl(ep, REG_TESTCTL, testctl); -+ -+ ep->speed = phydev->speed; -+ ep->duplex = phydev->duplex; -+ status_change = 1; -+ } -+ } -+ -+ /* test for online/offline link transition */ -+ if (phydev->link != ep->link) { -+ if (phydev->link) /* link went online */ -+ netif_tx_schedule_all(dev); -+ else { /* link went offline */ -+ ep->speed = 0; -+ ep->duplex = -1; -+ } -+ ep->link = phydev->link; -+ -+ status_change = 1; -+ } -+ -+ if (status_change) -+ phy_print_status(phydev); -+} -+ -+static int ep93xx_mii_probe(struct net_device *dev, int phy_addr) -+{ -+ struct ep93xx_priv *ep = netdev_priv(dev); -+ struct phy_device *phydev = NULL; -+ int val; -+ -+ if (phy_addr >= 0 && phy_addr < PHY_MAX_ADDR) -+ phydev = ep->mii_bus.phy_map[phy_addr]; -+ -+ if (!phydev) { -+ pr_info("PHY not found at specified address," -+ " trying autodetection\n"); -+ -+ /* find the first phy */ -+ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { -+ if (ep->mii_bus.phy_map[phy_addr]) { -+ phydev = ep->mii_bus.phy_map[phy_addr]; -+ break; -+ } -+ } -+ } -+ -+ if (!phydev) { -+ pr_err("no PHY found\n"); -+ return -ENODEV; -+ } -+ -+ phydev = phy_connect(dev, dev_name(&phydev->dev), -+ ep93xx_adjust_link, 0, PHY_INTERFACE_MODE_MII); -+ -+ if (IS_ERR(phydev)) { -+ pr_err("Could not attach to PHY\n"); -+ return PTR_ERR(phydev); -+ } -+ -+ ep->phy_supports_mfps = 0; -+ -+ val = phy_read(phydev, MII_BMSR); -+ if (val < 0) { -+ pr_err("failed to read MII register\n"); -+ return val; -+ } -+ -+ if (val & 0x0040) { -+ pr_info("PHY supports MII frame preamble suppression\n"); -+ ep->phy_supports_mfps = 1; -+ } -+ -+ phydev->supported &= PHY_BASIC_FEATURES; -+ -+ phydev->advertising = phydev->supported; -+ -+ ep->link = 0; -+ ep->speed = 0; -+ ep->duplex = -1; -+ ep->phy_dev = phydev; -+ -+ pr_info("attached PHY driver [%s] " -+ "(mii_bus:phy_addr=%s, irq=%d)\n", -+ phydev->drv->name, dev_name(&phydev->dev), phydev->irq); -+ -+ return 0; -+} -+ - static int ep93xx_eth_probe(struct platform_device *pdev) - { - struct ep93xx_eth_data *data; -@@ -820,7 +987,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev) - struct ep93xx_priv *ep; - struct resource *mem; - int irq; -- int err; -+ int err, i; - - if (pdev == NULL) - return -ENODEV; -@@ -847,24 +1014,43 @@ static int ep93xx_eth_probe(struct platform_device *pdev) - if (ep->res == NULL) { - dev_err(&pdev->dev, "Could not reserve memory region\n"); - err = -ENOMEM; -- goto err_out; -+ goto err_out_request_mem_region; - } - - ep->base_addr = ioremap(mem->start, resource_size(mem)); - if (ep->base_addr == NULL) { - dev_err(&pdev->dev, "Failed to ioremap ethernet registers\n"); - err = -EIO; -- goto err_out; -+ goto err_out_ioremap; - } - ep->irq = irq; - -- ep->mii.phy_id = data->phy_id; -- ep->mii.phy_id_mask = 0x1f; -- ep->mii.reg_num_mask = 0x1f; -- ep->mii.dev = dev; -- ep->mii.mdio_read = ep93xx_mdio_read; -- ep->mii.mdio_write = ep93xx_mdio_write; -+ /* mdio/mii bus */ -+ ep->mii_bus.state = MDIOBUS_ALLOCATED; /* see mdiobus_alloc */ -+ ep->mii_bus.name = "ep93xx_mii_bus"; -+ snprintf(ep->mii_bus.id, MII_BUS_ID_SIZE, "0"); -+ -+ ep->mii_bus.read = ep93xx_mdio_read; -+ ep->mii_bus.write = ep93xx_mdio_write; -+ ep->mii_bus.reset = ep93xx_mdio_reset; -+ -+ ep->mii_bus.phy_mask = 0; -+ -+ ep->mii_bus.priv = ep; -+ ep->mii_bus.dev = dev->dev; -+ -+ ep->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); -+ if (NULL == ep->mii_bus.irq) { -+ dev_err(&pdev->dev, "Could not allocate memory\n"); -+ err = -ENOMEM; -+ goto err_out_mii_bus_irq_kmalloc; -+ } -+ -+ for (i = 0; i < PHY_MAX_ADDR; i++) -+ ep->mii_bus.irq[i] = PHY_POLL; -+ - ep->mdc_divisor = 40; /* Max HCLK 100 MHz, min MDIO clk 2.5 MHz. */ -+ ep->phy_supports_mfps = 0; /* probe without preamble suppression */ - - if (is_zero_ether_addr(dev->dev_addr)) - random_ether_addr(dev->dev_addr); -@@ -872,14 +1058,39 @@ static int ep93xx_eth_probe(struct platform_device *pdev) - err = register_netdev(dev); - if (err) { - dev_err(&pdev->dev, "Failed to register netdev\n"); -- goto err_out; -+ goto err_out_register_netdev; -+ } -+ -+ err = mdiobus_register(&ep->mii_bus); -+ if (err) { -+ dev_err(&dev->dev, "Could not register MII bus\n"); -+ goto err_out_mdiobus_register; -+ } -+ -+ err = ep93xx_mii_probe(dev, data->phy_id); -+ if (err) { -+ dev_err(&dev->dev, "failed to probe MII bus\n"); -+ goto err_out_mii_probe; - } - -- printk(KERN_INFO "%s: ep93xx on-chip ethernet, IRQ %d, %pM\n", -- dev->name, ep->irq, dev->dev_addr); -+ dev_info(&dev->dev, "ep93xx on-chip ethernet, IRQ %d, %pM\n", -+ ep->irq, dev->dev_addr); - - return 0; - -+err_out_mii_probe: -+ mdiobus_unregister(&ep->mii_bus); -+err_out_mdiobus_register: -+ unregister_netdev(dev); -+err_out_register_netdev: -+ kfree(ep->mii_bus.irq); -+err_out_mii_bus_irq_kmalloc: -+ iounmap(ep->base_addr); -+err_out_ioremap: -+ release_resource(ep->res); -+ kfree(ep->res); -+err_out_request_mem_region: -+ free_netdev(dev); - err_out: - ep93xx_eth_remove(pdev); - return err; -@@ -897,7 +1108,6 @@ static struct platform_driver ep93xx_eth_driver = { - - static int __init ep93xx_eth_init_module(void) - { -- printk(KERN_INFO DRV_MODULE_NAME " version " DRV_MODULE_VERSION " loading\n"); - return platform_driver_register(&ep93xx_eth_driver); - } - -@@ -908,5 +1118,7 @@ static void __exit ep93xx_eth_cleanup_module(void) - - module_init(ep93xx_eth_init_module); - module_exit(ep93xx_eth_cleanup_module); -+ - MODULE_LICENSE("GPL"); --MODULE_ALIAS("platform:ep93xx-eth"); -+MODULE_DESCRIPTION("EP93XX Ethernet driver"); -+MODULE_ALIAS("platform:" DRV_NAME); --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patch deleted +0
-886@@ -1,886 +0,0 @@ -From 619f5711bc905176dc23de3e646686bee36f1601 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 16:40:16 +0200 -Subject: [PATCH 05/24] ep93xx: m2m DMA support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/mach-ep93xx/Makefile | 2 +- - arch/arm/mach-ep93xx/dma-m2m.c | 753 +++++++++++++++++++++++++++++++ - arch/arm/mach-ep93xx/include/mach/dma.h | 65 +++ - 3 files changed, 819 insertions(+), 1 deletions(-) - create mode 100644 arch/arm/mach-ep93xx/dma-m2m.c - -diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile -index 33ee2c8..ea652c2 100644 ---- a/arch/arm/mach-ep93xx/Makefile -+++ b/arch/arm/mach-ep93xx/Makefile -@@ -1,7 +1,7 @@ - # - # Makefile for the linux kernel. - # --obj-y := core.o clock.o dma-m2p.o gpio.o -+obj-y := core.o clock.o dma-m2p.o dma-m2m.o gpio.o - obj-m := - obj-n := - obj- := -diff --git a/arch/arm/mach-ep93xx/dma-m2m.c b/arch/arm/mach-ep93xx/dma-m2m.c -new file mode 100644 -index 0000000..8b0d720 ---- /dev/null -+++ b/arch/arm/mach-ep93xx/dma-m2m.c -@@ -0,0 +1,753 @@ -+/* -+ * arch/arm/mach-ep93xx/dma-m2m.c -+ * M2M DMA handling for Cirrus EP93xx chips. -+ * Copyright (C) 2007 Metasoft <prylowski@xxxxxxxxxxx> -+ * -+ * Based on dma-m2p.c by: -+ * Copyright (C) 2006 Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx> -+ * Copyright (C) 2006 Applied Data Systems -+ * -+ * 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. -+ */ -+ -+#define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt -+ -+#include <linux/kernel.h> -+#include <linux/clk.h> -+#include <linux/err.h> -+#include <linux/interrupt.h> -+#include <linux/module.h> -+#include <linux/string.h> -+#include <linux/io.h> -+ -+#include <mach/dma.h> -+#include <mach/hardware.h> -+ -+/* TEMP */ -+#define DPRINTK(fmt, args...) -+ -+#define M2M_CONTROL 0x00 -+#define M2M_INTERRUPT 0x04 -+#define M2M_STATUS 0x0c -+#define M2M_BCR0 0x10 -+#define M2M_BCR1 0x14 -+#define M2M_SAR_BASE0 0x18 -+#define M2M_SAR_BASE1 0x1c -+#define M2M_SAR_CURR0 0x24 -+#define M2M_SAR_CURR1 0x28 -+#define M2M_DAR_BASE0 0x2c -+#define M2M_DAR_BASE1 0x30 -+#define M2M_DAR_CURR0 0x34 -+#define M2M_DAR_CURR1 0x3c -+ -+ -+/* control register bits */ -+#define CTRL_STALL_INT_EN 0x00000001 /* stall interrupt enable */ -+#define CTRL_SCT 0x00000002 /* source copy transfer -+ (1 elem. from source fills -+ destination block */ -+#define CTRL_DONE_INT_EN 0x00000004 /* done interrupt enable */ -+#define CTRL_ENABLE 0x00000008 /* channel enable / disable, -+ should be set after -+ write to SAR/DAR/BCR -+ registers */ -+#define CTRL_NFB_INT_EN 0x00200000 /* nfb (next frame buffer) -+ interrupt enable */ -+ -+ -+#define CTRL_START 0x00000010 /* software triggered -+ dma start, not used -+ for M2P/P2M/IDE/SSP */ -+#define CTRL_BWC_MASK 0x000001e0 /* bandwidth control (number -+ of bytes in a block -+ transfer, only M2M */ -+#define CTRL_BWC_SHIFT 5 -+ -+#define BWC_FULL 0x0 /* full bandwidth utilized */ -+#define BWC_16 0x1 /* 16 bytes per block */ -+#define BWC_32 0x5 -+#define BWC_64 0x6 -+#define BWC_128 0x7 -+#define BWC_256 0x8 -+#define BWC_512 0x9 -+#define BWC_1024 0xa -+#define BWC_2048 0xb -+#define BWC_4096 0xc -+#define BWC_8192 0xd -+#define BWC_16384 0xe -+#define BWC_32768 0xf -+ -+#define CTRL_PW_MASK 0x00000600 /* peripheral width, -+ only M2P/P2M */ -+#define CTRL_PW_SHIFT 9 -+ -+#define PW_BYTE 0x0 /* one byte width */ -+#define PW_HALFWORD 0x1 /* 16 bits */ -+#define PW_WORD 0x2 /* 32 bits */ -+#define PW_NOT_USED 0x3 -+ -+#define CTRL_DAH 0x00000800 /* destination address -+ hold, for M2P */ -+#define CTRL_SAH 0x00001000 /* source address -+ hold, for P2M */ -+#define CTRL_TM_MASK 0x00006000 /* transfer mode */ -+#define CTRL_TM_SHIFT 13 -+ -+#define TM_M2M 0x0 /* software initiated M2M transfer */ -+#define TM_M2P 0x1 /* memory to ext. peripheral -+ or IDE/SSP */ -+#define TM_P2M 0x2 /* ext. peripheral or IDE/SSP -+ to memory */ -+#define TM_NOT_USED 0x3 -+ -+#define CTRL_ETDP_MASK 0x00018000 /* end of transfer/terminal -+ count pin direction -+ & polarity */ -+#define CTRL_ETDP_SHIFT 15 -+ -+#define ETDP_ACT_LOW_EOT 0x0 /* pin programmed as active -+ * low end-of-transfer input */ -+#define ETDP_ACT_HIGH_EOT 0x1 /* active high eot input */ -+#define ETDP_ACT_LOW_TC 0x2 /* active low terminal count output */ -+#define ETDP_ACT_HIGH_TC 0x3 /* active high tc output */ -+ -+#define CTRL_DACKP 0x00020000 /* dma acknowledge pin -+ polarity */ -+#define CTRL_DREQP_MASK 0x00180000 /* dma request pin polarity */ -+#define CTRL_DREQP_SHIFT 19 -+ -+#define DREQP_ACT_LOW_LEVEL 0x0 /* DREQ is active low, level -+ sensitive */ -+#define DREQP_ACT_HIGH_LEVEL 0x1 /* active high, level sensitive */ -+#define DREQP_ACT_LOW_EDGE 0x2 /* active low, edge sensitive */ -+#define DREQP_ACT_HIGH_EDGE 0x3 /* active high, edge sensitive */ -+ -+ -+#define CTRL_RSS_MASK 0x00c00000 /* request source selection */ -+#define CTRL_RSS_SHIFT 22 -+ -+#define RSS_EXT 0x0 /* external dma request */ -+#define RSS_SSP_RX 0x1 /* internal SSPRx */ -+#define RSS_SSP_TX 0x2 /* internal SSPTx */ -+#define RSS_IDE 0x3 /* internal IDE */ -+ -+#define CTRL_NO_HDSK 0x01000000 /* no handshake, required for -+ SSP/IDE, optional for -+ ext. M2P/P2M */ -+ -+/* interrupt register bits */ -+#define INTR_STALL 0x1 -+#define INTR_DONE 0x2 -+#define INTR_NFB 0x4 -+#define INTR_ALL 0x7 -+ -+/* status register bits */ -+#define STAT_STALL 0x0001 /* waiting for software start -+ or device request */ -+#define STAT_CTL_STATE_MASK 0x000e /* control fsm state */ -+#define STAT_CTL_STATE_SHIFT 1 -+ -+#define CTL_STATE_IDLE 0x0 -+#define CTL_STATE_STALL 0x1 -+#define CTL_STATE_MEM_RD 0x2 -+#define CTL_STATE_MEM_WR 0x3 -+#define CTL_STATE_BWC_WAIT 0x4 -+ -+#define STAT_BUF_STATE_MASK 0x0030 /* buffer fsm state */ -+#define STAT_BUF_STATE_SHIFT 4 -+ -+#define BUF_STATE_NO_BUF 0x0 -+#define BUF_STATE_BUF_ON 0x1 -+#define BUF_STATE_BUF_NEXT 0x2 -+ -+#define STAT_DONE 0x0040 /* transfer completed successfully -+ (by device or BCR is 0) */ -+ -+#define STAT_TCS_MASK 0x0018 /* terminal count status */ -+#define STAT_TCS_SHIFT 7 -+ -+#define TCS_NONE 0x0 /* terminal count not reached -+ for buffer0 and buffer1 */ -+#define TCS_BUF0 0x1 /* terminal count reached -+ for buffer0 */ -+#define TCS_BUF1 0x2 -+#define TCS_BOTH 0x3 /* terminal count reached -+ for both buffers */ -+ -+#define STAT_EOTS_MASK 0x0060 /* end of transfer status */ -+#define STAT_EOTS_SHIFT 9 -+ -+#define EOTS_NONE 0x0 /* end of transfer has not been -+ requested by ext. periph. for -++ any buffer */ -+#define EOTS_BUF0 0x1 /* eot requested for buffer0 */ -+#define EOTS_BUF1 0x2 -+#define EOTS_BOTH 0x3 /* eot requested for both buffers */ -+ -+#define STAT_NFB 0x0800 /* next frame buffer interrupt */ -+#define STAT_NB 0x1000 /* next buffer status, inform which -+ buffer is free for update */ -+#define STAT_DREQS 0x2000 /* status of dma request signal from -+ ext. periph or IDE/SSP request */ -+ -+/* IDE/SSP support */ -+#define IDE_UDMA_DATAOUT 0x20 -+#define IDE_UDMA_DATAIN 0x24 -+ -+#ifndef SSPDR -+#define SSPDR 0x08 -+#endif -+ -+struct m2m_channel { -+ char *name; -+ void __iomem *base; -+ int irq; -+ -+ struct clk *clk; -+ spinlock_t lock; -+ -+ void *client; -+ unsigned next_slot:1; -+ struct ep93xx_dma_buffer *buffer_xfer; -+ struct ep93xx_dma_buffer *buffer_next; -+ struct list_head buffers_pending; -+}; -+ -+static struct m2m_channel m2m_rxtx[] = { -+ {"m2m0", EP93XX_DMA_BASE + 0x0100, IRQ_EP93XX_DMAM2M0}, -+ {"m2m1", EP93XX_DMA_BASE + 0x0140, IRQ_EP93XX_DMAM2M1}, -+ {NULL}, -+}; -+ -+ -+static void feed_buf(struct m2m_channel *ch, struct ep93xx_dma_buffer *buf) -+{ -+ struct ep93xx_dma_m2m_client *cl = ch->client; -+ u32 src_addr, dst_addr; -+ -+ if ((cl->flags & EP93XX_DMA_M2M_DIR_MASK) == EP93XX_DMA_M2M_TX) { -+ src_addr = buf->bus_addr; -+ switch (cl->flags & EP93XX_DMA_M2M_DEV_MASK) { -+ case EP93XX_DMA_M2M_DEV_IDE: -+ dst_addr = EP93XX_IDE_PHYS_BASE + IDE_UDMA_DATAOUT; -+ break; -+ case EP93XX_DMA_M2M_DEV_SSP: -+ dst_addr = EP93XX_SPI_PHYS_BASE + SSPDR; -+ break; -+ default: -+ dst_addr = buf->bus_addr2; -+ break; -+ } -+ } else { -+ switch (cl->flags & EP93XX_DMA_M2M_DEV_MASK) { -+ case EP93XX_DMA_M2M_DEV_IDE: -+ src_addr = EP93XX_IDE_PHYS_BASE + IDE_UDMA_DATAIN; -+ break; -+ case EP93XX_DMA_M2M_DEV_SSP: -+ src_addr = EP93XX_SPI_PHYS_BASE + SSPDR; -+ break; -+ default: -+ src_addr = buf->bus_addr2; -+ break; -+ } -+ dst_addr = buf->bus_addr; -+ } -+ -+ if (ch->next_slot == 0) { -+ DPRINTK("Writing src_addr: %08x\n", src_addr); -+ DPRINTK("Writing dest_addr: %08x\n", dst_addr); -+ DPRINTK("Writing size: %08x\n", buf->size); -+ writel(src_addr, ch->base + M2M_SAR_BASE0); -+ writel(dst_addr, ch->base + M2M_DAR_BASE0); -+ writel(buf->size, ch->base + M2M_BCR0); -+ } else { -+ writel(src_addr, ch->base + M2M_SAR_BASE1); -+ writel(dst_addr, ch->base + M2M_DAR_BASE1); -+ writel(buf->size, ch->base + M2M_BCR1); -+ } -+ ch->next_slot ^= 1; -+ DPRINTK("data size = %d, slot %d\n", buf->size, ch->next_slot ^ 1); -+} -+ -+static void choose_buffer_xfer(struct m2m_channel *ch) -+{ -+ struct ep93xx_dma_buffer *buf; -+ -+ ch->buffer_xfer = NULL; -+ if (!list_empty(&ch->buffers_pending)) { -+ buf = list_entry(ch->buffers_pending.next, -+ struct ep93xx_dma_buffer, list); -+ list_del(&buf->list); -+ feed_buf(ch, buf); -+ ch->buffer_xfer = buf; -+ } -+} -+ -+static void choose_buffer_next(struct m2m_channel *ch) -+{ -+ struct ep93xx_dma_buffer *buf; -+ -+ ch->buffer_next = NULL; -+ if (!list_empty(&ch->buffers_pending)) { -+ buf = list_entry(ch->buffers_pending.next, -+ struct ep93xx_dma_buffer, list); -+ list_del(&buf->list); -+ feed_buf(ch, buf); -+ ch->buffer_next = buf; -+ } -+} -+ -+static irqreturn_t m2m_irq(int irq, void *dev_id) -+{ -+ struct m2m_channel *ch = dev_id; -+ struct ep93xx_dma_m2m_client *cl; -+ u32 irq_status, dma_state, buf_state, ctl_state; -+ -+ spin_lock(&ch->lock); -+ irq_status = readl(ch->base + M2M_INTERRUPT); -+ /*if ((irq_status & INTR_ALL) == 0) { -+ spin_unlock(&ch->lock); -+ return IRQ_NONE; -+ }*/ -+ dma_state = readl(ch->base + M2M_STATUS); -+ cl = ch->client; -+ -+ //printk("intr status: %08x, dma state: %08x\n", irq_status, dma_state); -+ -+ DPRINTK("intr status %d, dma state %x\n", -+ irq_status, dma_state); -+ -+ buf_state = (dma_state & STAT_BUF_STATE_MASK) >> STAT_BUF_STATE_SHIFT; -+ ctl_state = (dma_state & STAT_CTL_STATE_MASK) >> STAT_CTL_STATE_SHIFT; -+ /*printk("STAT_CTL_STATE: %d, STAT_BUF_STATE: %d\n", -+ * ctl_state, buf_state);*/ -+ if (ctl_state == CTL_STATE_STALL && -+ buf_state == BUF_STATE_NO_BUF && -+ dma_state & STAT_DONE) { -+ /* transfer completed successfully (done) */ -+ -+ -+ /* send client the done command */ -+ if (cl->buffer_finished) { -+ cl->buffer_finished(cl->cookie, ch->buffer_xfer, ch->buffer_xfer->size, 0); -+ } -+ -+ writel(0, ch->base + M2M_INTERRUPT); -+ choose_buffer_xfer(ch); -+ choose_buffer_next(ch); -+ if (ch->buffer_xfer != NULL) { -+ /* retrigger if more buffers exist */ -+ if ((cl->flags & EP93XX_DMA_M2M_DEV_MASK) == -+ EP93XX_DMA_M2M_DEV_MEM) { -+ DPRINTK("Writing start1 to M2M control\n"); -+ writel(readl(ch->base + M2M_CONTROL) | -+ CTRL_START, ch->base + M2M_CONTROL); -+ readl(ch->base + M2M_CONTROL); -+ } -+ } else { -+ DPRINTK("DISABLING DMA: dreqs state: %d\n", dma_state & STAT_DREQS); -+ -+ writel(readl(ch->base + M2M_CONTROL) -+ & ~CTRL_ENABLE, ch->base + M2M_CONTROL); -+ readl(ch->base + M2M_CONTROL); -+ } -+ } else if (ctl_state == CTL_STATE_MEM_RD && -+ buf_state == BUF_STATE_BUF_ON && -+ dma_state & STAT_NFB) { -+ /* next frame buffer */ -+ if (cl->buffer_finished) { -+ cl->buffer_finished(cl->cookie, ch->buffer_xfer, 0, 0); -+ } -+ ch->buffer_xfer = ch->buffer_next; -+ choose_buffer_next(ch); -+ } -+ -+ if (cl->buffer_started && ch->buffer_xfer != NULL) { -+ cl->buffer_started(cl->cookie, ch->buffer_xfer); -+ } -+ -+ spin_unlock(&ch->lock); -+ return IRQ_HANDLED; -+} -+ -+static struct m2m_channel *find_free_channel(struct ep93xx_dma_m2m_client *cl, int channel_spec) -+{ -+ struct m2m_channel *ch = m2m_rxtx; -+ int i; -+ -+#if 0 -+ /* BMS: This code isn't particularly clear; look like it asserts -+ * that a requested channel must not share the same data direction -+ * as a previously requested channel - which makes sense for the SSP, -+ * but not at all for direct hardware transferrs -+ */ -+ for (i = 0; ch[i].base; i++) { -+ struct ep93xx_dma_m2m_client *cl2; -+ -+ cl2 = ch[i].client; -+ if (cl2 != NULL) { -+ int port; -+ -+ /* two the same devices in the same direction -+ are not allowed -+ (two "memory devices" should be allowed) */ -+ port = cl2->flags & (EP93XX_DMA_M2M_DEV_MASK | -+ EP93XX_DMA_M2M_DIR_MASK); -+ if (port == (cl->flags & (EP93XX_DMA_M2M_DEV_MASK | -+ EP93XX_DMA_M2M_DIR_MASK))) -+ return NULL; -+ } -+ } -+#endif -+ -+ if (channel_spec == EP93XX_DMA_M2M_REQUIRES_CH_ANY) { -+ for (i = 0; ch[i].base; i++) { -+ if (ch[i].client == NULL) -+ return ch + i; -+ } -+ } else if (channel_spec == EP93XX_DMA_M2M_REQUIRES_CH_0) { -+ if (ch[0].client == NULL) { -+ return &(ch[0]); -+ } -+ } else if (channel_spec == EP93XX_DMA_M2M_REQUIRES_CH_1) { -+ if (ch[1].client == NULL) { -+ return &(ch[1]); -+ } -+ } else { -+ printk(KERN_ERR "ep93xx-m2m dma channel request: unknown channel spec\n"); -+ } -+ return NULL; -+} -+ -+static u32 set_direction_reg(u32 outv, u32 flags) -+{ -+ switch (flags & EP93XX_DMA_M2M_DEV_MASK) { -+ case EP93XX_DMA_M2M_DEV_EXT: -+ outv &= ~(CTRL_SAH | CTRL_DAH | CTRL_TM_MASK); -+ -+ if (flags & EP93XX_DMA_M2M_EXT_FIFO) -+ outv |= (flags & EP93XX_DMA_M2M_DIR_MASK) == -+ EP93XX_DMA_M2M_TX ? CTRL_DAH : CTRL_SAH; -+ -+ outv |= (((flags & EP93XX_DMA_M2M_DIR_MASK) == -+ EP93XX_DMA_M2M_TX) ? TM_M2P : TM_P2M) << -+ CTRL_TM_SHIFT; -+ -+ break; -+ case EP93XX_DMA_M2M_DEV_IDE: -+ outv &= ~(CTRL_SAH | CTRL_DAH | CTRL_TM_MASK | CTRL_PWSC_MASK); -+ if ((flags & EP93XX_DMA_M2M_DIR_MASK) == EP93XX_DMA_M2M_TX) { -+ outv |= (2 << CTRL_PWSC_SHIFT) & CTRL_PWSC_MASK; -+ outv |= CTRL_DAH; -+ outv |= TM_M2P << CTRL_TM_SHIFT; -+ } else { -+ outv |= (1 << CTRL_PWSC_SHIFT) & CTRL_PWSC_MASK; -+ outv |= CTRL_SAH; -+ outv |= TM_P2M << CTRL_TM_SHIFT; -+ } -+ break; -+ case EP93XX_DMA_M2M_DEV_SSP: -+ outv &= ~(CTRL_SAH | CTRL_DAH | CTRL_TM_MASK | CTRL_RSS_MASK); -+ if ((flags & EP93XX_DMA_M2M_DIR_MASK) == EP93XX_DMA_M2M_TX) { -+ outv |= TM_M2P << CTRL_TM_SHIFT; -+ outv |= CTRL_DAH; -+ outv |= RSS_SSP_TX << CTRL_RSS_SHIFT; -+ } else { -+ outv |= TM_P2M << CTRL_TM_SHIFT; -+ outv |= CTRL_SAH; -+ outv |= RSS_SSP_RX << CTRL_RSS_SHIFT; -+ } -+ break; -+ case EP93XX_DMA_M2M_DEV_MEM: -+ break; -+ } -+ return outv; -+} -+ -+static void channel_enable(struct m2m_channel *ch) -+{ -+ struct ep93xx_dma_m2m_client *cl = ch->client; -+ u32 outv = 0; -+ -+ clk_enable(ch->clk); -+ -+ /* set peripheral wait state mask - IFF specified in control word */ -+ outv |= (cl->flags & CTRL_PWSC_MASK); -+ outv |= (cl->flags & EP93XX_DREQ_MASK); -+ -+ DPRINTK("Set outv to: %08x\n",outv); -+ -+ switch (cl->flags & EP93XX_DMA_M2M_DEV_MASK) { -+ case EP93XX_DMA_M2M_DEV_EXT: -+ switch (cl->flags & EP93XX_DMA_M2M_EXT_WIDTH_MASK) { -+ case EP93XX_DMA_M2M_EXT_WIDTH_BYTE: -+ outv |= PW_BYTE << CTRL_PW_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_EXT_WIDTH_2BYTES: -+ outv |= PW_HALFWORD << CTRL_PW_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_EXT_WIDTH_4BYTES: -+ outv |= PW_WORD << CTRL_PW_SHIFT; -+ break; -+ } -+ /* if NO_HDSK then PWSC, if not, then DREQ, DACK, TC/DEOT */ -+ if (cl->flags & EP93XX_DMA_M2M_EXT_NO_HDSK) { -+ outv |= CTRL_NO_HDSK; -+ /* TODO: wait states */ -+ } else { -+ /* TODO: regular handshaking */ -+ } -+ outv |= RSS_EXT << CTRL_RSS_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_DEV_IDE: -+ /* NO_HDSK, PWSC, PW, SAH, DAH */ -+ outv |= CTRL_NO_HDSK; -+ outv |= PW_WORD << CTRL_PW_SHIFT; -+ /* PWSC = 1 for read, PWSC = 2 for write in UDMA */ -+ outv |= RSS_IDE << CTRL_RSS_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_DEV_SSP: -+ outv |= CTRL_NO_HDSK; -+ outv |= PW_HALFWORD << CTRL_PW_SHIFT; -+ outv |= (8 << CTRL_PWSC_SHIFT) & CTRL_PWSC_MASK; -+ break; -+ case EP93XX_DMA_M2M_DEV_MEM: -+ switch (cl->flags & EP93XX_DMA_M2M_MEM_SPEED_MASK) { -+ case EP93XX_DMA_M2M_MEM_SPEED_FULL: -+ outv |= BWC_FULL << CTRL_BWC_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_MEM_SPEED_HALF: -+ outv |= BWC_32768 << CTRL_BWC_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_MEM_SPEED_QUART: -+ outv |= BWC_16384 << CTRL_BWC_SHIFT; -+ break; -+ case EP93XX_DMA_M2M_MEM_SPEED_SLOW: -+ outv |= BWC_16 << CTRL_BWC_SHIFT; -+ break; -+ } -+ outv |= (cl->flags & EP93XX_DMA_M2M_MEM_FILL) ? CTRL_SCT : 0; -+ outv |= TM_M2M << CTRL_TM_SHIFT; -+ break; -+ } -+ -+ // debug code -+ DPRINTK("PRE-Enable, status is: %08x\n", readl(ch->base+M2M_STATUS)); -+ -+ outv = set_direction_reg(outv, cl->flags); -+ /* STALL interrupt must be enabled */ -+ outv |= CTRL_NFB_INT_EN | CTRL_DONE_INT_EN | CTRL_STALL_INT_EN; -+ -+ writel(outv, ch->base + M2M_CONTROL); -+ outv = readl(ch->base + M2M_CONTROL); -+ DPRINTK("channel enable, writing control reg = %08x\n", outv); -+} -+ -+static void channel_disable(struct m2m_channel *ch) -+{ -+ u32 v; -+ -+ DPRINTK("Disabling channel\n"); -+ v = readl(ch->base + M2M_CONTROL); -+ -+ writel(v & ~(CTRL_NFB_INT_EN | CTRL_DONE_INT_EN | CTRL_STALL_INT_EN), -+ ch->base + M2M_CONTROL); -+ -+ v = readl(ch->base + M2M_CONTROL); -+ -+ while (readl(ch->base + M2M_STATUS) & STAT_NFB) { -+ cpu_relax(); -+ } -+ -+ writel(0, ch->base + M2M_CONTROL); -+ -+ v = readl(ch->base + M2M_CONTROL); -+ -+ while (readl(ch->base + M2M_STATUS) & STAT_STALL) { -+ cpu_relax(); -+ } -+ -+ clk_disable(ch->clk); -+} -+ -+void ep93xx_dma_m2m_set_direction(struct ep93xx_dma_m2m_client *cl, -+ int direction) -+{ -+ struct m2m_channel *ch = cl->channel; -+ u32 outv; -+ unsigned long flags; -+ -+ direction &= EP93XX_DMA_M2M_DIR_MASK; -+ -+ spin_lock_irqsave(&ch->lock, flags); -+ -+ cl->flags &= ~EP93XX_DMA_M2M_DIR_MASK; -+ cl->flags |= direction; -+ -+ outv = readl(ch->base + M2M_CONTROL); -+ outv = set_direction_reg(outv, cl->flags); -+ writel(outv, ch->base + M2M_CONTROL); -+ outv = readl(ch->base + M2M_CONTROL); -+ DPRINTK("set_direction: configured control reg = %08x\n", outv); -+ -+ spin_unlock_irqrestore(&ch->lock, flags); -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_set_direction); -+ -+int ep93xx_dma_m2m_client_register(struct ep93xx_dma_m2m_client *cl, int channel_spec) -+{ -+ struct m2m_channel *ch; -+ int err; -+ -+ ch = find_free_channel(cl, channel_spec); -+ if (ch == NULL) -+ return -1; -+ -+ err = request_irq(ch->irq, m2m_irq, IRQF_DISABLED, cl->name ? : "dma-m2m", ch); -+ if (err) -+ return err; -+ -+ ch->client = cl; -+ ch->next_slot = 0; -+ ch->buffer_xfer = NULL; -+ ch->buffer_next = NULL; -+ INIT_LIST_HEAD(&ch->buffers_pending); -+ -+ cl->channel = ch; -+ -+ channel_enable(ch); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_client_register); -+ -+void ep93xx_dma_m2m_client_unregister(struct ep93xx_dma_m2m_client *cl) -+{ -+ struct m2m_channel *ch = cl->channel; -+ -+ channel_disable(ch); -+ free_irq(ch->irq, ch); -+ ch->client = NULL; -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_client_unregister); -+ -+void ep93xx_dma_m2m_submit(struct ep93xx_dma_m2m_client *cl, -+ struct ep93xx_dma_buffer *buf) -+{ -+ struct m2m_channel *ch = cl->channel; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&ch->lock, flags); -+ -+ if (ch->buffer_xfer == NULL) { -+ ch->buffer_xfer = buf; -+ feed_buf(ch, buf); -+ if (readl(ch->base + M2M_CONTROL) & CTRL_ENABLE) { -+ DPRINTK("CTRL_ENABLE\n"); -+ if ((cl->flags & EP93XX_DMA_M2M_DEV_MASK) == -+ EP93XX_DMA_M2M_DEV_MEM) { -+ DPRINTK("WRITING START2 TO M2M control\n"); -+ writel(readl(ch->base + M2M_CONTROL) | -+ CTRL_START, ch->base + M2M_CONTROL); -+ readl(ch->base + M2M_CONTROL); -+ } -+ } -+ } else if (ch->buffer_next == NULL) { -+ ch->buffer_next = buf; -+ feed_buf(ch, buf); -+ } else -+ list_add_tail(&buf->list, &ch->buffers_pending); -+ spin_unlock_irqrestore(&ch->lock, flags); -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_submit); -+ -+void ep93xx_dma_m2m_start(struct ep93xx_dma_m2m_client *cl) -+{ -+ struct m2m_channel *ch = cl->channel; -+ u32 v; -+ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&ch->lock, flags); -+ -+ writel(readl(ch->base + M2M_STATUS), ch->base+M2M_STATUS); -+ //printk("At start, status is: %08x\n", readl(ch->base + M2M_STATUS)); -+ -+ v = readl(ch->base + M2M_CONTROL) | CTRL_ENABLE; -+ writel(v, ch->base + M2M_CONTROL); -+ v = readl(ch->base + M2M_CONTROL); -+ if (ch->buffer_xfer != NULL) { -+ if (((cl->flags & EP93XX_DMA_M2M_DEV_MASK) == -+ EP93XX_DMA_M2M_DEV_MEM)) { -+ DPRINTK("WRITING START3 to M2M controller\n"); -+ v |= CTRL_START; -+ writel(v, ch->base + M2M_CONTROL); -+ v = readl(ch->base + M2M_CONTROL); -+ } -+ } -+ -+ spin_unlock_irqrestore(&ch->lock, flags); -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_start); -+ -+void ep93xx_dma_m2m_stop(struct ep93xx_dma_m2m_client *cl) -+{ -+ struct m2m_channel *ch = cl->channel; -+ u32 v; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&ch->lock, flags); -+ -+ DPRINTK("Stopping DMA by disabling CTRL_ENABLE\n"); -+ v = readl(ch->base + M2M_CONTROL) & ~CTRL_ENABLE; -+ writel(v, ch->base + M2M_CONTROL); -+ readl(ch->base + M2M_CONTROL); -+ DPRINTK("configured control reg = %08x\n", v); -+ -+ spin_unlock_irqrestore(&ch->lock, flags); -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_stop); -+ -+void ep93xx_dma_m2m_flush(struct ep93xx_dma_m2m_client *cl) -+{ -+ struct m2m_channel *ch = cl->channel; -+ -+ channel_disable(ch); -+ ch->next_slot = 0; -+ ch->buffer_xfer = NULL; -+ ch->buffer_next = NULL; -+ INIT_LIST_HEAD(&ch->buffers_pending); -+ channel_enable(ch); -+} -+EXPORT_SYMBOL_GPL(ep93xx_dma_m2m_flush); -+ -+static int init_channel(struct m2m_channel *ch) -+{ -+ ch->clk = clk_get(NULL, ch->name); -+ if (IS_ERR(ch->clk)) -+ return PTR_ERR(ch->clk); -+ -+ spin_lock_init(&ch->lock); -+ ch->client = NULL; -+ -+ return 0; -+} -+ -+static int __init ep93xx_dma_m2m_init(void) -+{ -+ int i; -+ int ret; -+ -+ for (i = 0; m2m_rxtx[i].base; i++) { -+ ret = init_channel(m2m_rxtx + i); -+ if (ret) -+ return ret; -+ } -+ -+ pr_info("M2M DMA subsystem initialized\n"); -+ return 0; -+} -+arch_initcall(ep93xx_dma_m2m_init); -diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h -index 3a5961d..6a3552b 100644 ---- a/arch/arm/mach-ep93xx/include/mach/dma.h -+++ b/arch/arm/mach-ep93xx/include/mach/dma.h -@@ -11,6 +11,7 @@ - struct ep93xx_dma_buffer { - struct list_head list; - u32 bus_addr; -+ u32 bus_addr2; /* only used by M2M */ - u16 size; - }; - -@@ -28,6 +29,7 @@ struct ep93xx_dma_m2p_client { - void *channel; - }; - -+/* flags (m2p client) */ - #define EP93XX_DMA_M2P_PORT_I2S1 0x00 - #define EP93XX_DMA_M2P_PORT_I2S2 0x01 - #define EP93XX_DMA_M2P_PORT_AAC1 0x02 -@@ -45,6 +47,58 @@ struct ep93xx_dma_m2p_client { - #define EP93XX_DMA_M2P_IGNORE_ERROR 0x40 - #define EP93XX_DMA_M2P_ERROR_MASK 0x60 - -+ -+struct ep93xx_dma_m2m_client { -+ char *name; -+ u32 flags; -+ void *cookie; -+ void (*buffer_started)(void *cookie, -+ struct ep93xx_dma_buffer *buf); -+ void (*buffer_finished)(void *cookie, -+ struct ep93xx_dma_buffer *buf, -+ int bytes, int error); -+ -+ /* Internal to the DMA code. */ -+ void *channel; -+}; -+ -+/* flags (m2m client) */ -+#define EP93XX_DMA_M2M_RX 0x000 /* read from periph./memory */ -+#define EP93XX_DMA_M2M_TX 0x004 /* write to periph./memory */ -+#define EP93XX_DMA_M2M_DIR_MASK 0x004 /* direction mask */ -+#define EP93XX_DMA_M2M_DEV_EXT 0x000 /* external peripheral */ -+#define EP93XX_DMA_M2M_DEV_SSP 0x001 /* internal SSP */ -+#define EP93XX_DMA_M2M_DEV_IDE 0x002 /* internal IDE */ -+#define EP93XX_DMA_M2M_DEV_MEM 0x003 /* memory to memory transfer */ -+#define EP93XX_DMA_M2M_DEV_MASK 0x003 /* device mask */ -+#define EP93XX_DMA_M2M_EXT_FIFO 0x008 /* external peripheral is one location fifo */ -+#define EP93XX_DMA_M2M_EXT_NO_HDSK 0x010 /* external peripheral doesn't require regular handshaking protocol */ -+#define EP93XX_DMA_M2M_EXT_WIDTH_MASK 0x300 -+#define EP93XX_DMA_M2M_EXT_WIDTH_BYTE 0x000 /* external peripheral transfer is one byte width */ -+#define EP93XX_DMA_M2M_EXT_WIDTH_2BYTES 0x100 -+#define EP93XX_DMA_M2M_EXT_WIDTH_4BYTES 0x200 -+#define EP93XX_DMA_M2M_MEM_SPEED_FULL 0x000 /* M2M bandwidth control */ -+#define EP93XX_DMA_M2M_MEM_SPEED_HALF 0x040 /* half bus bandwidth */ -+#define EP93XX_DMA_M2M_MEM_SPEED_QUART 0x080 /* quarter bus bandwidth */ -+#define EP93XX_DMA_M2M_MEM_SPEED_SLOW 0x0c0 /* slowest speed */ -+#define EP93XX_DMA_M2M_MEM_SPEED_MASK 0x0c0 /* memory speed mask */ -+#define EP93XX_DMA_M2M_MEM_FILL 0x020 /* M2M is one location to block fill */ -+ -+/* FIXME */ -+#define CTRL_PWSC_MASK 0xfe000000 /* peripheral wait states count */ -+#define CTRL_PWSC_SHIFT 25 -+#define EP93XX_DREQ_SHIFT 19 -+#define EP93XX_DREQ_MASK 0x00180000 -+#define EP93XX_DMA_M2M_DREQ_LS_L (00 << EP93XX_DREQ_SHIFT) -+#define EP93XX_DMA_M2M_DREQ_LS_H (01 << EP93XX_DREQ_SHIFT) -+#define EP93XX_DMA_M2M_DREQ_ES_L (10 << EP93XX_DREQ_SHIFT) -+#define EP93XX_DMA_M2M_DREQ_ES_H (11 << EP93XX_DREQ_SHIFT) -+ -+/* See ep93xx_dma_m2m_client_register (channel_spec) */ -+#define EP93XX_DMA_M2M_REQUIRES_CH_ANY 0 -+#define EP93XX_DMA_M2M_REQUIRES_CH_0 1 -+#define EP93XX_DMA_M2M_REQUIRES_CH_1 2 -+ - int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p); - void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p); - void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p, -@@ -53,4 +107,15 @@ void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p, - struct ep93xx_dma_buffer *buf); - void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p); - -+int ep93xx_dma_m2m_client_register(struct ep93xx_dma_m2m_client *m2m, -+ int channel_spec); -+void ep93xx_dma_m2m_client_unregister(struct ep93xx_dma_m2m_client *m2m); -+void ep93xx_dma_m2m_submit(struct ep93xx_dma_m2m_client *m2m, -+ struct ep93xx_dma_buffer *buf); -+void ep93xx_dma_m2m_flush(struct ep93xx_dma_m2m_client *m2m); -+void ep93xx_dma_m2m_start(struct ep93xx_dma_m2m_client *m2m); -+void ep93xx_dma_m2m_stop(struct ep93xx_dma_m2m_client *m2m); -+void ep93xx_dma_m2m_set_direction(struct ep93xx_dma_m2m_client *m2m, -+ int direction); -+ - #endif /* __ASM_ARCH_DMA_H */ --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch deleted +0
-223@@ -1,223 +0,0 @@ -From 42019ca5561ebd18d47d8811cf06d3cae77ca982 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Thu, 10 Jun 2010 17:00:12 +0200 -Subject: [PATCH 06/24] ts72xx_rs485 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Crude hack... - -Signed-off-by: Petr Štetiar <[email protected]> ---- - arch/arm/include/asm/ioctls.h | 3 + - drivers/serial/Kconfig | 8 +++ - drivers/serial/amba-pl010.c | 124 ++++++++++++++++++++++++++++++++++++++++- - 3 files changed, 134 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/asm/ioctls.h -index 0b30894..a0d7401 100644 ---- a/arch/arm/include/asm/ioctls.h -+++ b/arch/arm/include/asm/ioctls.h -@@ -74,6 +74,9 @@ - #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ - #define FIOQSIZE 0x545E - -+#define TIOC_SBCC485 0x545F /* TS72xx RTS/485 mode clear */ -+#define TIOC_SBCS485 0x5460 /* TS72xx RTS/485 mode set */ -+ - /* Used for packet mode */ - #define TIOCPKT_DATA 0 - #define TIOCPKT_FLUSHREAD 1 -diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig -index 12900f7..d1bff25 100644 ---- a/drivers/serial/Kconfig -+++ b/drivers/serial/Kconfig -@@ -296,6 +296,14 @@ config SERIAL_AMBA_PL010_CONSOLE - your boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time.) - -+config SERIAL_AMBA_PL010_TS72XX -+ bool "Support for RS-485 on AMBA serial port (for TS-72XX SBC)" -+ depends on SERIAL_AMBA_PL010 != n && MACH_TS72XX -+ help -+ This add support for RS-485 on some Technologic System SBC. -+ -+ If unsure, say N. -+ - config SERIAL_AMBA_PL011 - tristate "ARM AMBA PL011 serial port support" - depends on ARM_AMBA -diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c -index 2904aa0..9135233 100644 ---- a/drivers/serial/amba-pl010.c -+++ b/drivers/serial/amba-pl010.c -@@ -51,6 +51,10 @@ - - #include <asm/io.h> - -+#if defined(CONFIG_SERIAL_AMBA_PL010_TS72XX) -+#include <mach/ts72xx.h> -+#endif -+ - #define UART_NR 8 - - #define SERIAL_AMBA_MAJOR 204 -@@ -65,6 +69,11 @@ - #define UART_DUMMY_RSR_RX 256 - #define UART_PORT_SIZE 64 - -+#if defined(CONFIG_SERIAL_AMBA_PL010_TS72XX) -+static void __iomem *ts_rs485_data9_register; -+static void __iomem *ts_rs485_control_register; -+#endif -+ - /* - * We wrap our port structure around the generic uart_port. - */ -@@ -386,7 +395,7 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios, - /* - * Ask the core to calculate the divisor for us. - */ -- baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); -+ baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); - quot = uart_get_divisor(port, baud); - - switch (termios->c_cflag & CSIZE) { -@@ -529,6 +538,105 @@ static int pl010_verify_port(struct uart_port *port, struct serial_struct *ser) - return ret; - } - -+ -+#if defined(CONFIG_SERIAL_AMBA_PL010_TS72XX) -+static int ts72xx_rs485_init(void) -+{ -+ ts_rs485_data9_register = ioremap(TS72XX_RS485_MODE_PHYS_BASE, 4096); -+ if (ts_rs485_data9_register == NULL) { -+ return -1; -+ } -+ -+ ts_rs485_control_register = ioremap(TS72XX_RS485_CONTROL_PHYS_BASE, 4096); -+ if (ts_rs485_control_register == NULL) { -+ iounmap(ts_rs485_data9_register); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+static int ts72xx_auto485(struct uart_port *port, unsigned int cmd, unsigned long *arg) -+{ -+ int baud, cflag, mode; -+ int datalength; -+ -+ mode = (int)*arg; -+ if (!is_rs485_installed()) { -+ printk("amba-pl010.c: this board does not support RS485 auto mode\n"); -+ return -EINVAL; -+ } -+ -+ if (port->line != 1) { -+ printk("amba-pl010.c: auto RS485 mode is only supported on second port (/dev/ttyAM1)\n"); -+ return -EINVAL; -+ } -+ -+ datalength = 8; -+ cflag = port->state->port.tty->termios->c_cflag; -+ if (cflag & PARENB) -+ datalength++; -+ -+ if (cflag & CSTOPB) -+ datalength++; -+ -+ baud = tty_get_baud_rate(port->state->port.tty); -+ -+ switch (cmd) { -+ case TIOC_SBCC485: -+ if ((mode & TS72XX_RS485_AUTO485FD) || (mode & TS72XX_RS485_AUTO485HD)) { -+ printk("amba-pl010.c: unsetting auto RS485 mode\n"); -+ __raw_writew(TS72XX_RS485_MODE_RS232, ts_rs485_control_register); -+ __raw_writew(TS72XX_RS485_MODE_RS232, ts_rs485_data9_register); -+ } -+ break; -+ case TIOC_SBCS485: -+ if (mode & TS72XX_RS485_AUTO485FD) { -+ printk ("amba-pl010.c: setting FULL duplex auto RS485 mode\n"); -+ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_control_register); -+ if (datalength > 8) -+ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_data9_register); -+ } else if (mode & TS72XX_RS485_AUTO485HD) { -+ printk("amba-pl010.c: setting HALF DUPLEX auto RS485 mode\n"); -+ switch (baud) { -+ case 9600: -+ __raw_writew(TS72XX_RS485_MODE_9600_HD, ts_rs485_control_register); -+ break; -+ case 19200: -+ __raw_writew(TS72XX_RS485_MODE_19200_HD, ts_rs485_control_register); -+ break; -+ case 57600: -+ __raw_writew(TS72XX_RS485_MODE_57600_HD, ts_rs485_control_register); -+ break; -+ case 115200: -+ __raw_writew(TS72XX_RS485_MODE_115200_HD, ts_rs485_control_register); -+ break; -+ default: -+ printk("amba-pl010.c: %d baud rate is not supported for auto RS485 mode\n", baud); -+ return -1; -+ } -+ if (datalength > 8) -+ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_data9_register); -+ } -+ break; -+ } -+ -+ return 0; -+} -+ -+static int pl010_ioctl(struct uart_port *port, unsigned int cmd, unsigned long arg) -+{ -+ switch (cmd) { -+ case TIOC_SBCC485: -+ case TIOC_SBCS485: -+ return ts72xx_auto485(port, cmd, (unsigned long *)arg); -+ } -+ -+ return -ENOIOCTLCMD; -+} -+#endif /* CONFIG_SERIAL_AMBA_PL010_TS72XX */ -+ -+ - static struct uart_ops amba_pl010_pops = { - .tx_empty = pl010_tx_empty, - .set_mctrl = pl010_set_mctrl, -@@ -547,6 +655,9 @@ static struct uart_ops amba_pl010_pops = { - .request_port = pl010_request_port, - .config_port = pl010_config_port, - .verify_port = pl010_verify_port, -+#if defined(CONFIG_SERIAL_AMBA_PL010_TS72XX) -+ .ioctl = pl010_ioctl, -+#endif - }; - - static struct uart_amba_port *amba_ports[UART_NR]; -@@ -805,6 +916,17 @@ static int __init pl010_init(void) - ret = uart_register_driver(&amba_reg); - if (ret == 0) { - ret = amba_driver_register(&pl010_driver); -+ -+ #if defined(CONFIG_SERIAL_AMBA_PL010_TS72XX) -+ if (!ret && is_rs485_installed()) { -+ ret = ts72xx_rs485_init(); -+ if (ret) -+ printk("amba-pl010.c: ts72xx_rs485_init() failed\n"); -+ else -+ printk("amba-pl010.c: auto RS485 mode initialized\n"); -+ } -+ #endif -+ - if (ret) - uart_unregister_driver(&amba_reg); - } --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch deleted +0
-264@@ -1,264 +0,0 @@ -From be2d6dfb434c137187d2572d8bf9264748720ece Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Wed, 16 Jun 2010 14:44:44 +0200 -Subject: [PATCH 07/24] ts72xx_ts_ser1 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -TS-SER1 - Serial Port PC/104 peripheral - -Signed-off-by: Petr Štetiar <[email protected]> ---- - drivers/serial/8250_ts_ser1.c | 197 +++++++++++++++++++++++++++++++++++++++++ - drivers/serial/Kconfig | 17 ++++ - drivers/serial/Makefile | 1 + - 3 files changed, 215 insertions(+), 0 deletions(-) - create mode 100644 drivers/serial/8250_ts_ser1.c - -diff --git a/drivers/serial/8250_ts_ser1.c b/drivers/serial/8250_ts_ser1.c -new file mode 100644 -index 0000000..e5fe616 ---- /dev/null -+++ b/drivers/serial/8250_ts_ser1.c -@@ -0,0 +1,197 @@ -+/* -+ * linux/drivers/serial/8250_ts_ser1.c -+ * Technologic Systems TS-SER1 support. -+ * -+ * (c) Copyright 2006-2008 Matthieu Crapet <[email protected]> -+ * Data taken from include/asm-i386/serial.h -+ * -+ * 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. -+ * -+ * Pin Number: -+ * 1 DCD -+ * 2 Receive data -+ * 3 Trasmit data -+ * 4 DTR -+ * 5 Signal Ground -+ * 6 DSR -+ * 7 RTS -+ * 8 CTS -+ * 9 RI -+ */ -+ -+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -+ -+#include <linux/module.h> -+#include <linux/init.h> -+#include <linux/serial_8250.h> -+#include <linux/irq.h> -+#include <linux/io.h> -+#include <mach/hardware.h> -+#include <mach/ts72xx.h> -+#include <mach/gpio.h> -+ -+#define TS72XX_SER1_IO_PHYS_BASE (TS72XX_PC104_8BIT_IO_PHYS_BASE) -+#define TS72XX_SER1_IO_SIZE (TS72XX_PC104_8BIT_IO_SIZE) -+ -+#define TS_SER1_PORT_COM3 0x3E8 -+#define TS_SER1_PORT_COM4 0x2E8 -+#define TS_SER1_PORT_COM5 0x3A8 -+ -+/* Value to write in 16550A scratch register */ -+#define MARKER_BYTE 0xAA /* or 0x55 */ -+ -+#define PORT(_base,_irq) \ -+{ \ -+ .iobase = _base, \ -+ .membase = (void __iomem *)0, \ -+ .irq = _irq, \ -+ .uartclk = 1843200, \ -+ .iotype = UPIO_PORT, \ -+ .flags = UPF_BOOT_AUTOCONF, \ -+} -+/* Note: IRQ can be shared (see CONFIG_SERIAL_8250_SHARE_IRQ) */ -+ -+ -+static struct plat_serial8250_port ts72xx_ser1_data_com3[] = { -+ PORT(TS_SER1_PORT_COM3, 0), -+ { }, -+}; -+ -+static struct plat_serial8250_port ts72xx_ser1_data_com4[] = { -+ PORT(TS_SER1_PORT_COM4, 0), -+ { }, -+}; -+ -+static struct plat_serial8250_port ts72xx_ser1_data_com5[] = { -+ PORT(TS_SER1_PORT_COM5, 0), -+ { }, -+}; -+ -+ -+static int ts_ser1_irq = CONFIG_SERIAL_8250_TS_SER1_IRQ; // 5, 6 or 7 -+static struct platform_device *serial8250_ts_ser1_dev; -+ -+ -+static int __init ts_ser1_init(void) -+{ -+ struct plat_serial8250_port *comX = NULL; -+ void __iomem *iomem; -+ -+ int ret = -ENODEV; -+ int n = 0; // COM number as printed on TS-SER1 pcb -+ -+ iomem = ioremap(TS72XX_SER1_IO_PHYS_BASE, TS72XX_SER1_IO_SIZE); -+ -+ if (iomem != NULL) { -+ __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM3 + 7); -+ if (__raw_readb(iomem + TS_SER1_PORT_COM3 + 7) == MARKER_BYTE) { -+ comX = ts72xx_ser1_data_com3; -+ n = 3; -+ } else { -+ __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM4 + 7); -+ if (__raw_readb(iomem + TS_SER1_PORT_COM4 + 7) == MARKER_BYTE) { -+ comX = ts72xx_ser1_data_com4; -+ n = 4; -+ } else { -+ __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM5 + 7); -+ if (__raw_readb(iomem + TS_SER1_PORT_COM5 + 7) == MARKER_BYTE) { -+ comX = ts72xx_ser1_data_com5; -+ n = 5; -+ } -+ } -+ } -+ -+ if (comX) { -+ switch (ts_ser1_irq) { -+ case 5: -+ ret = gpio_request(EP93XX_GPIO_LINE_F(3), "TS-SER1"); -+ if (ret < 0) { -+ pr_err("gpio_request failed, try another irq\n"); -+ goto init_error; -+ } -+ gpio_direction_input(EP93XX_GPIO_LINE_F(3)); -+ comX->irq = gpio_to_irq(EP93XX_GPIO_LINE_F(3)); -+ set_irq_type(comX->irq, IRQ_TYPE_EDGE_RISING); -+ break; -+ case 6: -+ comX->irq = IRQ_EP93XX_EXT1; -+ break; -+ case 7: -+ comX->irq = IRQ_EP93XX_EXT3; -+ break; -+ default: -+ pr_err("wrong specified irq\n"); -+ goto init_error; -+ } -+ -+ comX->iobase += (unsigned long)iomem; // virtual address -+ -+ } else { -+ pr_err("can't detect COM number\n"); -+ goto init_error; -+ } -+ -+ /* create platform_device structure */ -+ serial8250_ts_ser1_dev = platform_device_alloc("serial8250", n); -+ if (!serial8250_ts_ser1_dev) { -+ ret = -ENOMEM; -+ goto init_error; -+ } -+ -+ ret = platform_device_add_data(serial8250_ts_ser1_dev, comX, -+ 2 * sizeof(struct plat_serial8250_port)); -+ if (ret) { -+ platform_device_put(serial8250_ts_ser1_dev); -+ goto init_error; -+ } -+ -+ ret = platform_device_add(serial8250_ts_ser1_dev); -+ if (ret) { -+ platform_device_put(serial8250_ts_ser1_dev); -+ goto init_error; -+ } -+ -+ platform_set_drvdata(serial8250_ts_ser1_dev, iomem); -+ return 0; -+ } -+ -+init_error: -+ if (iomem) { -+ iounmap(iomem); -+ iomem = NULL; -+ } -+ return ret; -+} -+ -+static void __exit ts_ser1_exit(void) -+{ -+ struct platform_device *pdev = serial8250_ts_ser1_dev; -+ void __iomem *iomem = platform_get_drvdata(pdev); -+ -+ serial8250_ts_ser1_dev = NULL; -+ -+ platform_device_unregister(pdev); -+ -+ iounmap(iomem); -+ if (ts_ser1_irq == 5) -+ gpio_free(EP93XX_GPIO_LINE_F(3)); -+} -+ -+module_init(ts_ser1_init); -+module_exit(ts_ser1_exit); -+ -+module_param(ts_ser1_irq, int, 0); -+MODULE_PARM_DESC(ts_ser1_irq, "TS-SER1 IRQ, default=" __MODULE_STRING(CONFIG_SERIAL_8250_TS_SER1_IRQ) ")"); -+ -+MODULE_AUTHOR("Matthieu Crapet <[email protected]>"); -+MODULE_DESCRIPTION("8250 serial probe module for TS-SER1 (TS-72xx)"); -+MODULE_LICENSE("GPL"); -+MODULE_VERSION("0.5"); -diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig -index d1bff25..5667462 100644 ---- a/drivers/serial/Kconfig -+++ b/drivers/serial/Kconfig -@@ -267,6 +267,23 @@ config SERIAL_8250_RM9K - port hardware found on MIPS RM9122 and similar processors. - If unsure, say N. - -+config SERIAL_8250_TS_SER1 -+ tristate "Support TS-SER1 (for TS-72XX SBC)" -+ depends on SERIAL_8250 != n && MACH_TS72XX -+ help -+ Say Y here if you have a TS-SER1 PC/104 peripheral. -+ COM number will be configured automaticaly. -+ -+ To compile this driver as a module, choose M here: the module -+ will be called 8250_ts_ser1. -+ -+config SERIAL_8250_TS_SER1_IRQ -+ int "Selected IRQ (5, 6 or 7)" -+ depends on SERIAL_8250_TS_SER1 -+ default "5" -+ help -+ Enter jumper IRQ configuration -+ - comment "Non-8250 serial port support" - - config SERIAL_AMBA_PL010 -diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile -index 1ca4fd5..e379ab4 100644 ---- a/drivers/serial/Makefile -+++ b/drivers/serial/Makefile -@@ -28,6 +28,7 @@ obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o - obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o - obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o - obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o -+obj-$(CONFIG_SERIAL_8250_TS_SER1) += 8250_ts_ser1.o - obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o - obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o - obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch deleted +0
-278@@ -1,278 +0,0 @@ -From 4c63820dec1699305f30a4096a0baa550d273a87 Mon Sep 17 00:00:00 2001 -From: Matthieu Crapet <[email protected]> -Date: Fri, 18 Jun 2010 17:39:09 +0200 -Subject: [PATCH 08/24] ts72xx_ts_eth100 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -TS-ETH100 - 10/100 Ethernet PC/104 peripheral - -Signed-off-by: Petr Štetiar <[email protected]> ---- - drivers/net/Kconfig | 10 ++ - drivers/net/Makefile | 1 + - drivers/net/ax88796.c | 8 ++- - drivers/net/ax88796_ts_eth100.c | 190 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 208 insertions(+), 1 deletions(-) - create mode 100644 drivers/net/ax88796_ts_eth100.c - -diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig -index 5db667c..448c823 100644 ---- a/drivers/net/Kconfig -+++ b/drivers/net/Kconfig -@@ -248,6 +248,16 @@ config AX88796_93CX6 - help - Select this if your platform comes with an external 93CX6 eeprom. - -+config AX88796_TS_ETH100 -+ tristate "Support for TS-ETH100 (TS-72XX SBC)" -+ depends on AX88796 && MACH_TS72XX -+ help -+ Say Y here if you have a TS-ETH100 PC/104 peripheral. -+ IRQ numbers and I/O address will be configurated automatically. -+ -+ To compile this driver as a module, choose M here: the module -+ will be called ax88796_ts_eth100. -+ - config MACE - tristate "MACE (Power Mac ethernet) support" - depends on PPC_PMAC && PPC32 -diff --git a/drivers/net/Makefile b/drivers/net/Makefile -index 3e8f150..eb4765b 100644 ---- a/drivers/net/Makefile -+++ b/drivers/net/Makefile -@@ -143,6 +143,7 @@ obj-$(CONFIG_B44) += b44.o - obj-$(CONFIG_FORCEDETH) += forcedeth.o - obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o - obj-$(CONFIG_AX88796) += ax88796.o -+obj-$(CONFIG_AX88796_TS_ETH100) += ax88796_ts_eth100.o - obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o - - obj-$(CONFIG_TSI108_ETH) += tsi108_eth.o -diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c -index 20e946b..33527f7 100644 ---- a/drivers/net/ax88796.c -+++ b/drivers/net/ax88796.c -@@ -810,7 +810,9 @@ static int ax_remove(struct platform_device *_dev) - ax = to_ax_dev(dev); - - unregister_netdev(dev); -- free_irq(dev->irq, dev); -+ if (ax->running) { // already freed in ax_close? -+ free_irq(dev->irq, dev); -+ } - - iounmap(ei_status.mem); - release_resource(ax->mem); -@@ -936,7 +938,11 @@ static int ax_probe(struct platform_device *pdev) - goto exit_mem2; - } - -+ #if defined(CONFIG_AX88796_TS_ETH100) || defined(CONFIG_AX88796_TS_ETH100_MODULE) -+ ei_status.reg_offset[0x10] = ax->map2 - ei_status.mem + 0x10; /* don't know why, but +0x20 works too */ -+ #else - ei_status.reg_offset[0x1f] = ax->map2 - ei_status.mem; -+ #endif - } - - /* got resources, now initialise and register device */ -diff --git a/drivers/net/ax88796_ts_eth100.c b/drivers/net/ax88796_ts_eth100.c -new file mode 100644 -index 0000000..448b3e3 ---- /dev/null -+++ b/drivers/net/ax88796_ts_eth100.c -@@ -0,0 +1,190 @@ -+/* -+ * linux/drivers/net/ax88796_ts_eth100.c -+ * Technologic Systems TS-ETH100 support. -+ * -+ * (c) Copyright 2008 Matthieu Crapet <[email protected]> -+ * -+ * 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. -+ */ -+ -+#include <linux/module.h> -+#include <linux/init.h> -+#include <linux/platform_device.h> -+#include <linux/irq.h> -+#include <linux/io.h> -+#include <net/ax88796.h> -+#include <mach/ts72xx.h> -+#include <mach/gpio.h> -+ -+#define TS72XX_ETH100_IO8_PHYS_BASE (TS72XX_PC104_8BIT_IO_PHYS_BASE) -+#define TS72XX_ETH100_IO8_SIZE (TS72XX_PC104_8BIT_IO_SIZE) -+#define TS72XX_ETH100_IO16_PHYS_BASE (TS72XX_PC104_16BIT_IO_PHYS_BASE) -+#define TS72XX_ETH100_IO16_SIZE (TS72XX_PC104_16BIT_IO_SIZE) -+ -+/* Technologic systems I/O space */ -+#define TS_ETH100_PLD_0 0x100 -+#define TS_ETH100_PLD_1 0x110 -+#define TS_ETH100_PLD_2 0x120 -+#define TS_ETH100_PLD_3 0x130 -+ -+/* NE2000 I/O space */ -+#define TS_ETH100_MAC_0 0x200 -+#define TS_ETH100_MAC_1 0x240 -+#define TS_ETH100_MAC_2 0x300 -+#define TS_ETH100_MAC_3 0x340 -+ -+/* Board identifier must be 5 ; PLD revision should be 1 */ -+#define is_eth100_present(__iomem, __offset) \ -+ (((__raw_readb(__iomem + __offset) & 0xF) == 0x5) && \ -+ ((__raw_readb(__iomem + __offset + 4) & 0xF) == 0x1)) -+ -+/* Jumpers status (SRAM control register) */ -+#define read_irq(__iomem, __offset) \ -+ (__raw_readb(__iomem + __offset + 8) & 0xE) -+ -+ -+static u32 offsets[0x20] = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -+ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F -+}; -+ -+static struct ax_plat_data ts72xx_eth100_asix_data = { -+ .flags = AXFLG_HAS_93CX6, -+ .wordlength = 2, -+ .dcr_val = 0x48, -+ .rcr_val = 0x40, -+ .reg_offsets = offsets, -+}; -+ -+static struct resource ts72xx_eth100_resource[] = { -+ [0] = { -+ .start = TS72XX_ETH100_IO8_PHYS_BASE, -+ .end = TS72XX_ETH100_IO8_PHYS_BASE + 0x40 - 1, -+ .flags = IORESOURCE_MEM -+ }, -+ [1] = { /* 0x10 is NE_DATAPORT is 16-bit access */ -+ .start = TS72XX_ETH100_IO16_PHYS_BASE, -+ .end = TS72XX_ETH100_IO16_PHYS_BASE + 0x40 - 1, -+ .flags = IORESOURCE_MEM -+ }, -+ [2] = { -+ .start = IRQ_EP93XX_EXT1, -+ .end = IRQ_EP93XX_EXT1, -+ .flags = IORESOURCE_IRQ -+ } -+}; -+ -+static int ts_eth100_irq; // 2 [IRQ 5], 4 [IRQ 6] or 8 [IRQ 7] (jumper configuration) -+ -+ -+static void ts72xx_eth100_release(struct device *dev) -+{ -+ /* nothing to do (no kfree) because we have static struct */ -+} -+ -+static struct platform_device ts72xx_eth100_device_asix = { -+ .name = "ax88796", -+ .id = 0, -+ .num_resources = ARRAY_SIZE(ts72xx_eth100_resource), -+ .resource = ts72xx_eth100_resource, -+ .dev = { -+ .platform_data = &ts72xx_eth100_asix_data, -+ .release = ts72xx_eth100_release, -+ } -+}; -+ -+static int __init ts_eth100_init(void) -+{ -+ void __iomem *iomem; -+ struct platform_device *ethX = NULL; -+ -+ iomem = ioremap(TS72XX_ETH100_IO8_PHYS_BASE, TS72XX_ETH100_IO8_SIZE); -+ if (iomem != NULL) { -+ ethX = &ts72xx_eth100_device_asix; -+ -+ if (is_eth100_present(iomem, TS_ETH100_PLD_0)) { -+ ethX->resource[0].start += TS_ETH100_MAC_0; -+ ethX->resource[0].end += TS_ETH100_MAC_0; -+ ethX->resource[1].start += TS_ETH100_MAC_0; -+ ethX->resource[1].end += TS_ETH100_MAC_0; -+ ts_eth100_irq = read_irq(iomem, TS_ETH100_PLD_0); -+ } else if(is_eth100_present(iomem, TS_ETH100_PLD_1)) { -+ ethX->resource[0].start += TS_ETH100_MAC_1; -+ ethX->resource[0].end += TS_ETH100_MAC_1; -+ ethX->resource[1].start += TS_ETH100_MAC_1; -+ ethX->resource[1].end += TS_ETH100_MAC_1; -+ ts_eth100_irq = read_irq(iomem, TS_ETH100_PLD_1); -+ } else if(is_eth100_present(iomem, TS_ETH100_PLD_2)) { -+ ethX->resource[0].start += TS_ETH100_MAC_2; -+ ethX->resource[0].end += TS_ETH100_MAC_2; -+ ethX->resource[1].start += TS_ETH100_MAC_2; -+ ethX->resource[1].end += TS_ETH100_MAC_2; -+ ts_eth100_irq = read_irq(iomem, TS_ETH100_PLD_2); -+ } else if(is_eth100_present(iomem, TS_ETH100_PLD_3)) { -+ ethX->resource[0].start += TS_ETH100_MAC_3; -+ ethX->resource[0].end += TS_ETH100_MAC_3; -+ ethX->resource[1].start += TS_ETH100_MAC_3; -+ ethX->resource[1].end += TS_ETH100_MAC_3; -+ ts_eth100_irq = read_irq(iomem, TS_ETH100_PLD_3); -+ } else { -+ ethX = NULL; -+ } -+ -+ /* Translate IRQ number */ -+ if (ethX != NULL) { -+ int ret, irq = 0; -+ switch (ts_eth100_irq) { -+ case 0x2: /* IRQ5 */ -+ irq = gpio_to_irq(EP93XX_GPIO_LINE_F(3)); -+ ret = gpio_request(irq, "TS-ETH100"); -+ if (ret < 0) { -+ ethX = NULL; -+ goto init_error; -+ } else { -+ gpio_direction_input(irq); -+ set_irq_type(irq, IRQ_TYPE_EDGE_RISING); -+ } -+ break; -+ case 0x4: /* IRQ6 */ -+ irq = IRQ_EP93XX_EXT1; -+ break; -+ case 0x8: /* IRQ7 */ -+ default: -+ irq = IRQ_EP93XX_EXT3; -+ } -+ ethX->resource[2].start = irq; -+ ethX->resource[2].end = irq; -+ } -+init_error: -+ iounmap(iomem); -+ } -+ -+ return ((ethX == NULL) ? -ENODEV : -+ platform_device_register(&ts72xx_eth100_device_asix)); -+} -+ -+ -+static void __exit ts_eth100_exit(void) -+{ -+ platform_device_unregister(&ts72xx_eth100_device_asix); -+ if (ts_eth100_irq == 2) -+ gpio_free(EP93XX_GPIO_LINE_F(3)); -+} -+ -+module_init(ts_eth100_init); -+module_exit(ts_eth100_exit); -+ -+MODULE_AUTHOR("Matthieu Crapet <[email protected]>"); -+MODULE_DESCRIPTION("Asix 88796 ethernet probe module for TS-ETH100 (TS-72xx)"); -+MODULE_LICENSE("GPL"); -+MODULE_VERSION("0.21"); --- -1.7.0.4 -recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch deleted +0
-437@@ -1,437 +0,0 @@ -From dca6d3223e20806a2ec22704a6909d72c9ba3ef5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <[email protected]> -Date: Sat, 23 Oct 2010 19:08:37 +0200 -Subject: [PATCH 09/24] ts72xx_pata -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Support: -TS-7200 - Compact flash -TS-9600 - IDE interface PC/104 peripheral - -Signed-off-by: Petr Štetiar <[email protected]> ---- - drivers/ata/Kconfig | 20 +++++ - drivers/ata/Makefile | 3 + - drivers/ata/pata_ts7200_cf.c | 92 ++++++++++++++++++++++++ - drivers/ata/pata_ts72xx.c | 161 ++++++++++++++++++++++++++++++++++++++++++ - drivers/ata/pata_ts9600.c | 95 +++++++++++++++++++++++++ - 5 files changed, 371 insertions(+), 0 deletions(-) - create mode 100644 drivers/ata/pata_ts7200_cf.c - create mode 100644 drivers/ata/pata_ts72xx.c - create mode 100644 drivers/ata/pata_ts9600.c - -diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig -index 11ec911..6c84389 100644 ---- a/drivers/ata/Kconfig -+++ b/drivers/ata/Kconfig -@@ -862,5 +862,25 @@ config PATA_LEGACY - - If unsure, say N. - -+config PATA_TS72XX -+ bool "TS72XX ATA support" -+ depends on ARCH_EP93XX && MACH_TS72XX -+ help -+ This option enables support for ATA devices on Technologic Systems SBC. -+ -+config PATA_TS7200_CF -+ tristate "TS-7200 Compact Flash support" -+ depends on PATA_TS72XX -+ help -+ This option enables support for the compact flash control on -+ Technologic System TS-7200 SBC. -+ -+config PATA_TS9600 -+ tristate "TS-9600 IDE interface support" -+ depends on PATA_TS72XX && BLK_DEV_IDE_TS9600 != y -+ help -+ This option enables support for Technologic Systems TS-9600 PC/104 IDE interface. -+ - endif # ATA_SFF -+ - endif # ATA -diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile -index d5df04a..eb36415 100644 ---- a/drivers/ata/Makefile -+++ b/drivers/ata/Makefile -@@ -91,6 +91,9 @@ obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o - obj-$(CONFIG_PATA_SAMSUNG_CF) += pata_samsung_cf.o - - obj-$(CONFIG_PATA_PXA) += pata_pxa.o -+obj-$(CONFIG_PATA_TS72XX) += pata_ts72xx.o -+obj-$(CONFIG_PATA_TS7200_CF) += pata_ts7200_cf.o -+obj-$(CONFIG_PATA_TS9600) += pata_ts9600.o - - # Should be last but two libata driver - obj-$(CONFIG_PATA_ACPI) += pata_acpi.o -diff --git a/drivers/ata/pata_ts7200_cf.c b/drivers/ata/pata_ts7200_cf.c -new file mode 100644 -index 0000000..4126682 ---- /dev/null -+++ b/drivers/ata/pata_ts7200_cf.c -@@ -0,0 +1,92 @@ -+/* -+ * Technologic Systems TS-7200 Compact Flash PATA device driver. -+ * -+ * (c) Copyright 2008 Matthieu Crapet <[email protected]> -+ * -+ * 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. -+ * -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/libata.h> -+#include <scsi/scsi_host.h> -+#include <linux/platform_device.h> -+#include <linux/dma-mapping.h> -+ -+#include <asm/io.h> -+#include <asm/irq.h> -+#include <mach/ts72xx.h> -+ -+#define DRV_NAME "pata_ts7200_cf" -+#define DRV_VERSION "0.21" -+ -+ -+static void pata_ts7200_cf_release(struct device *dev) -+{ -+ /* nothing to do (no kfree) because we have static struct */ -+} -+ -+static struct resource ts7200_cf_resources[] = { -+ [0] = { -+ .start = TS7200_CF_CMD_PHYS_BASE, -+ .end = TS7200_CF_CMD_PHYS_BASE + 8, -+ .flags = IORESOURCE_MEM, -+ }, -+ [1] = { -+ .start = TS7200_CF_AUX_PHYS_BASE, -+ .end = TS7200_CF_AUX_PHYS_BASE + 1, -+ .flags = IORESOURCE_MEM, -+ }, -+ [2] = { -+ .start = TS7200_CF_DATA_PHYS_BASE, -+ .end = TS7200_CF_DATA_PHYS_BASE + 2, -+ .flags = IORESOURCE_MEM, -+ }, -+ [3] = { -+ .start = IRQ_EP93XX_EXT0, /* pin 103 of EP9301 */ -+ .end = IRQ_EP93XX_EXT0, -+ .flags = IORESOURCE_IRQ, -+ } -+}; -+ -+ -+static struct platform_device ts7200_cf_device = { -+ .name = "ts72xx-ide", -+ .id = 0, -+ .dev = { -+ .dma_mask = &ts7200_cf_device.dev.coherent_dma_mask, -+ .coherent_dma_mask = DMA_BIT_MASK(32), -+ .release = pata_ts7200_cf_release, -+ }, -+ .num_resources = ARRAY_SIZE(ts7200_cf_resources), -+ .resource = ts7200_cf_resources, -+}; -+ -+ -+static __init int pata_ts7200_cf_init(void) -+{ -+ return (board_is_ts7200()) ? \ -+ platform_device_register(&ts7200_cf_device) : -ENODEV; -+} -+ -+static __exit void pata_ts7200_cf_exit(void) -+{ -+ platform_device_unregister(&ts7200_cf_device); -+} -+ -+module_init(pata_ts7200_cf_init); -+module_exit(pata_ts7200_cf_exit); -+ -+MODULE_AUTHOR("Matthieu Crapet <[email protected]>"); -+MODULE_DESCRIPTION("TS-7200 CF PATA device driver"); -+MODULE_LICENSE("GPL"); -+MODULE_VERSION(DRV_VERSION); -diff --git a/drivers/ata/pata_ts72xx.c b/drivers/ata/pata_ts72xx.c -new file mode 100644 -index 0000000..d540029 ---- /dev/null -+++ b/drivers/ata/pata_ts72xx.c -@@ -0,0 +1,161 @@ -+/* -+ * TS-72XX PATA driver for Technologic Systems boards. -+ * -+ * Based on pata_platform.c by Paul Mundt & -+ * Alessandro Zummo <[email protected]> -+ * and old pata-ts72xx.c by Alessandro Zummo <[email protected]> -+ * -+ * (c) Copyright 2008 Matthieu Crapet <[email protected]> -+ * -+ * 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. -+ * -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/module.h> -+#include <linux/platform_device.h> -+#include <linux/interrupt.h> -+#include <scsi/scsi_host.h> -+#include <linux/ata.h> -+#include <linux/libata.h> -+ -+#define DRV_NAME "pata_ts72xx" -+#define DRV_VERSION "2.01" -+ -+ -+/* -+ * Provide our own set_mode() as we don't want to change anything that has -+ * already been configured.. -+ */ -+static int ts72xx_set_mode(struct ata_link *link, struct ata_device **unused) -+{ -+ struct ata_device *dev; -+ -+ ata_for_each_dev(dev, link, ENABLED) { -+ if (ata_dev_enabled(dev)) { -+ /* We don't really care */ -+ dev->pio_mode = dev->xfer_mode = XFER_PIO_0; -+ dev->xfer_shift = ATA_SHIFT_PIO; -+ dev->flags |= ATA_DFLAG_PIO; -+ ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); -+ } -+ } -+ return 0; -+} -+ -+static struct scsi_host_template ts72xx_sht = { -+ ATA_PIO_SHT(DRV_NAME), -+}; -+ -+static struct ata_port_operations ts72xx_port_ops = { -+ .inherits = &ata_sff_port_ops, -+ .set_mode = ts72xx_set_mode, -+}; -+ -+static __devinit int ts72xx_pata_probe(struct platform_device *pdev) -+{ -+ struct ata_host *host; -+ struct ata_port *ap; -+ int irq; -+ -+ struct resource *pata_cmd = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ struct resource *pata_aux = platform_get_resource(pdev, IORESOURCE_MEM, 1); -+ struct resource *pata_data = platform_get_resource(pdev, IORESOURCE_MEM, 2); -+ -+ if (!pata_cmd || !pata_aux || !pata_data) { -+ dev_err(&pdev->dev, "missing resource(s)\n"); -+ return -EINVAL; -+ } -+ -+ irq = platform_get_irq(pdev, 0); -+ if (irq < 0) -+ irq = 0; /* no irq */ -+ -+ /* -+ * Now that that's out of the way, wire up the port -+ */ -+ host = ata_host_alloc(&pdev->dev, 1); -+ if (!host) -+ return -ENOMEM;Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch deleted +0
-63Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch deleted +0
-311Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch deleted +0
-267Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch deleted +0
-356Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch deleted +0
-181Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch deleted +0
-3298Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch deleted +0
-305Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch deleted +0
-53Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch deleted +0
-93Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patch deleted +0
-87Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patch deleted +0
-4569Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patch deleted +0
-100Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.36/ts72xx/defconfig deleted +0
-2127Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFNl0niMkyGM64RGpERAlM4AJ44b/PdxftNHT4jm/ofdbd4FFHM0gCffqem D+lK+yUDwdr56dSv3Ebu89w=
=VQig
-----END PGP SIGNATURE-----
Part of the diff is not shown here. View the raw message.
Re: [PATCH 5/6] linux-2.6.36: remove ts72xx support because 2.6.38 is now default
Koen Kooi <[email protected]> [2011-04-02 18:08:48]:
Quoted 1 line
Is it really necessary to remove it from .36 instead of DP+1;ing .38?
It's not, but wouldn't it be better to remove the patches from the unsupported kernel version? It's just a start, RFC and if it's ok I would like to remove the references of ts72xx in all older and unsupported kernel versions. What's a point of keeping them in oe-dev branch, anyway?
-- ynezz
PATCH 6/6 linux-2.6.38: add support for ts72xx and make it default
In reply to Petr Štetiar--- .../linux-2.6.38/ts72xx/0001-ts72xx_base.patch | 451 ++ .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 + .../linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch | 36 + .../linux-2.6.38/ts72xx/0004-ep93xx_eth.patch | 553 +++ .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 870 ++++ .../linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch | 221 + .../linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch | 264 ++ .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 ++ .../linux-2.6.38/ts72xx/0009-ts72xx_pata.patch | 437 ++ .../linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 + .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 ++ .../linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch | 267 ++ .../linux-2.6.38/ts72xx/0013-ts72xx_max197.patch | 356 ++ .../ts72xx/0014-ts7200_nor_flash.patch | 181 + .../linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch | 3299 ++++++++++++++ .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 ++ .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 + .../ts72xx/0018-ethoc-ts7300-fixes.patch | 72 + .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 + .../ts72xx/0020-ts72xx-add-lcd-linux-driver.patch | 4572 ++++++++++++++++++++ .../ts72xx/0021-TS-72XX-LCD-console-driver.patch | 528 +++ ...M-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch | 38 + recipes/linux/linux-2.6.38/ts72xx/defconfig | 2214 ++++++++++ recipes/linux/linux_2.6.38.bb | 26 + 24 files changed, 15531 insertions(+), 0 deletions(-) create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0001-ts72xx_base.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0002-ts72xx_force_machine-id.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0004-ep93xx_eth.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0005-ep93xx-m2m-DMA-support.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0008-ts72xx_ts_eth100.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0009-ts72xx_pata.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0011-ts72xx_dio_keypad.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0013-ts72xx_max197.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0014-ts7200_nor_flash.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0016-ts72xx_spi_tmp124.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0018-ethoc-ts7300-fixes.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0019-ts7300-add-ethernet-support.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0020-ts72xx-add-lcd-linux-driver.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0021-TS-72XX-LCD-console-driver.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/0024-ARM-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch create mode 100644 recipes/linux/linux-2.6.38/ts72xx/defconfig
recipes/linux/linux-2.6.38/ts72xx/0001-ts72xx_base.patch new file +451 -0
@@ -0,0 +1,451 @@ +From 1cadb91bccdc6edd3c4e6fba08c417861586f190 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <[email protected]> +Date: Sun, 13 Mar 2011 23:47:13 +0100 +Subject: [PATCH 01/24] ts72xx_base +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- patch: allow to force nF bit in control reg +- register pwm1 + +Signed-off-by: Petr Štetiar <[email protected]> +--- + arch/arm/Kconfig | 4 + + arch/arm/mach-ep93xx/Kconfig | 9 ++ + arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 7 + + arch/arm/mach-ep93xx/include/mach/memory.h | 28 +++++ + arch/arm/mach-ep93xx/include/mach/ts72xx.h | 145 +++++++++++++++++++++-- + arch/arm/mach-ep93xx/ts72xx.c | 41 ++++++- + arch/arm/mm/proc-arm920.S | 5 +- + scripts/Makefile.fwinst | 2 +- + 8 files changed, 224 insertions(+), 17 deletions(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 166efa2..31ad31d 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -336,6 +336,10 @@ config ARCH_EP93XX + select ARM_AMBA + select ARM_VIC + select CLKDEV_LOOKUP ++ select ARCH_SPARSEMEM_ENABLE ++ select GENERIC_GPIO ++ select HAVE_CLK ++ select COMMON_CLKDEV + select ARCH_REQUIRE_GPIOLIB + select ARCH_HAS_HOLES_MEMORYMODEL + select ARCH_USES_GETTIMEOFFSET +diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig +index 3a08b18..b6be37e 100644 +--- a/arch/arm/mach-ep93xx/Kconfig ++++ b/arch/arm/mach-ep93xx/Kconfig +@@ -7,6 +7,15 @@ config CRUNCH + help + Enable kernel support for MaverickCrunch. + ++config CR1_NFBIT ++ bool "Turn on nF bit in ControlRegister 1" ++ help ++ Say 'Y' here to force the nF bit on. Usually this is set ++ by the bootrom. If it is not set, then the CPU core will ++ run from HCLK instead of FCLK, and performance will suffer. ++ If you see BogoMIPS of about 1/4 of your CPU clock, try ++ turning this on; your performance should double. ++ + comment "EP93xx Platforms" + + choice +diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +index 9ac4d10..87a5bfe 100644 +--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h ++++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +@@ -83,6 +83,7 @@ + + #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) + ++#define EP93XX_IDE_PHYS_BASE EP93XX_AHB_PHYS(0x000a0000) + #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) + + #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) +@@ -97,12 +98,17 @@ + #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) + + #define EP93XX_SECURITY_BASE EP93XX_APB_IOMEM(0x00030000) ++#define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x)) ++#define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440) + + #define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000) + #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) + #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) ++#define EP93XX_GPIO_F_INT_DEBOUNCE EP93XX_GPIO_REG(0x64) + #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) ++#define EP93XX_GPIO_A_INT_DEBOUNCE EP93XX_GPIO_REG(0xa8) + #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) ++#define EP93XX_GPIO_B_INT_DEBOUNCE EP93XX_GPIO_REG(0xc4) + #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) + + #define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000) +@@ -221,6 +227,7 @@ + #define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3) + #define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1) + #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) ++#define EP93XX_SYSCON_CHIPID EP93XX_SYSCON_REG(0x94) + #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) + + #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) +diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h +index 554064e..78eaacf 100644 +--- a/arch/arm/mach-ep93xx/include/mach/memory.h ++++ b/arch/arm/mach-ep93xx/include/mach/memory.h +@@ -19,4 +19,32 @@ + #error "Kconfig bug: No EP93xx PHYS_OFFSET set" + #endif + ++/* ++ * Non-linear mapping like so: ++ * phys => virt ++ * 0x00000000 => 0xc0000000 ++ * 0x01000000 => 0xc1000000 ++ * 0x04000000 => 0xc4000000 ++ * 0x05000000 => 0xc5000000 ++ * 0xe0000000 => 0xc8000000 ++ * 0xe1000000 => 0xc9000000 ++ * 0xe4000000 => 0xcc000000 ++ * 0xe5000000 => 0xcd000000 ++ * ++ * As suggested here: http://marc.info/?l=linux-arm&m=122754446724900&w=2 ++ * ++ * Note that static inline functions won't work here because ++ * arch/arm/include/asm/memory.h uses "#ifndef __virt_to_phys" to check whether to ++ * use generic functions or not. ++ */ ++ ++#define __phys_to_virt(p) \ ++ (((p) & 0x07ffffff) | (((p) & 0xe0000000) ? 0x08000000 : 0) | PAGE_OFFSET) ++ ++#define __virt_to_phys(v) \ ++ (((v) & 0x07ffffff) | (((v) & 0x08000000) ? 0xe0000000 : 0 )) ++ ++#define SECTION_SIZE_BITS 24 ++#define MAX_PHYSMEM_BITS 32 ++ + #endif +diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h +index 0eabec6..1d50dec 100644 +--- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h ++++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h +@@ -8,36 +8,41 @@ + * virt phys size + * febff000 22000000 4K model number register + * febfe000 22400000 4K options register +- * febfd000 22800000 4K options register #2 ++ * febfd000 22800000 4K options register #2 (JP6 and TS-9420 flags) ++ * febfc000 [67]0000000 4K NAND data register ++ * febfb000 [67]0400000 4K NAND control register ++ * febfa000 [67]0800000 4K NAND busy register + * febf9000 10800000 4K TS-5620 RTC index register + * febf8000 11700000 4K TS-5620 RTC data register ++ * febf7000 23400000 4K PLD version (3 bits) ++ * febf6000 22c00000 4K RS-485 control register ++ * febf5000 23000000 4K RS-485 mode register + */ + + #define TS72XX_MODEL_PHYS_BASE 0x22000000 + #define TS72XX_MODEL_VIRT_BASE 0xfebff000 + #define TS72XX_MODEL_SIZE 0x00001000 + +-#define TS72XX_MODEL_TS7200 0x00 +-#define TS72XX_MODEL_TS7250 0x01 +-#define TS72XX_MODEL_TS7260 0x02 ++#define TS7XXX_MODEL_TS7200 0x00 ++#define TS7XXX_MODEL_TS7250 0x01 ++#define TS7XXX_MODEL_TS7260 0x02 ++#define TS7XXX_MODEL_TS7300 0x03 ++#define TS7XXX_MODEL_TS7400 0x04 ++#define TS7XXX_MODEL_MASK 0x07 + + + #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 + #define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000 + #define TS72XX_OPTIONS_SIZE 0x00001000 +- + #define TS72XX_OPTIONS_COM2_RS485 0x02 + #define TS72XX_OPTIONS_MAX197 0x01 + +- + #define TS72XX_OPTIONS2_PHYS_BASE 0x22800000 + #define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000 + #define TS72XX_OPTIONS2_SIZE 0x00001000 +- + #define TS72XX_OPTIONS2_TS9420 0x04 + #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 + +- + #define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000 + #define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000 + #define TS72XX_RTC_INDEX_SIZE 0x00001000 +@@ -49,32 +54,146 @@ + #define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 + #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 + ++#define TS72XX_PLD_VERSION_VIRT_BASE 0xfebf7000 ++#define TS72XX_PLD_VERSION_PHYS_BASE 0x23400000 ++#define TS72XX_PLD_VERSION_SIZE 0x00001000 ++ ++#define TS72XX_JUMPERS_MAX197_PHYS_BASE 0x10800000 // jumpers/max197 busy bit/COM1 dcd register (8-bit, read only) ++#define TS72XX_MAX197_SAMPLE_PHYS_BASE 0x10f00000 // max197 sample/control register (16-bit read/8-bit write) ++ ++/* ++ * RS485 option ++ */ ++#define TS72XX_RS485_CONTROL_VIRT_BASE 0xfebf6000 ++#define TS72XX_RS485_CONTROL_PHYS_BASE 0x22c00000 ++#define TS72XX_RS485_CONTROL_SIZE 0x00001000 ++ ++#define TS72XX_RS485_MODE_VIRT_BASE 0xfebf5000 ++#define TS72XX_RS485_MODE_PHYS_BASE 0x23000000 ++#define TS72XX_RS485_MODE_SIZE 0x00001000 ++ ++#define TS72XX_RS485_AUTO485FD 1 ++#define TS72XX_RS485_AUTO485HD 2 ++#define TS72XX_RS485_MODE_RS232 0x00 ++#define TS72XX_RS485_MODE_FD 0x01 ++#define TS72XX_RS485_MODE_9600_HD 0x04 ++#define TS72XX_RS485_MODE_19200_HD 0x05 ++#define TS72XX_RS485_MODE_57600_HD 0x06 ++#define TS72XX_RS485_MODE_115200_HD 0x07 ++ ++/* ++ * PC/104 8-bit & 16-bit bus ++ * ++ * virt phys size ++ * febf0000 11e00000 4K PC/104 8-bit I/O ++ * febef000 21e00000 4K PC/104 16-bit I/O ++ * fea00000 11a00000 1MB PC/104 8-bit memory ++ * fe900000 21a00000 1MB PC/104 16-bit memory ++ */ ++#define TS72XX_PC104_8BIT_IO_VIRT_BASE 0xfebf0000 ++#define TS72XX_PC104_8BIT_IO_PHYS_BASE 0x11e00000 ++#define TS72XX_PC104_8BIT_IO_SIZE 0x00001000 ++#define TS72XX_PC104_8BIT_MEM_VIRT_BASE 0xfea00000 ++#define TS72XX_PC104_8BIT_MEM_PHYS_BASE 0x11a00000 ++#define TS72XX_PC104_8BIT_MEM_SIZE 0x00100000 ++ ++#define TS72XX_PC104_16BIT_IO_VIRT_BASE 0xfebef000 ++#define TS72XX_PC104_16BIT_IO_PHYS_BASE 0x21e00000 ++#define TS72XX_PC104_16BIT_IO_SIZE 0x00001000 ++#define TS72XX_PC104_16BIT_MEM_VIRT_BASE 0xfe900000 ++#define TS72XX_PC104_16BIT_MEM_PHYS_BASE 0x21a00000 ++#define TS72XX_PC104_16BIT_MEM_SIZE 0x00100000 ++ ++/* ++ * TS7200 specific : CompactFlash memory map ++ * ++ * phys size description ++ * 11000000 7 CF registers (8-bit each), starting at 11000001 ++ * 10400006 2 CF aux registers (8-bit) ++ * 21000000 2 CF data register (16-bit) ++ */ ++#define TS7200_CF_CMD_PHYS_BASE 0x11000000 ++#define TS7200_CF_AUX_PHYS_BASE 0x10400006 ++#define TS7200_CF_DATA_PHYS_BASE 0x21000000 ++ ++/* ++ * TS7260 specific : SD card & Power Management ++ * ++ * phys size description ++ * 12000000 4K Power management register (8-bit) ++ * 13000000 4K SD card registers (4 x 8-bit) ++ */ ++#define TS7260_POWER_MANAGEMENT_PHYS_BASE 0x12000000 ++#define TS7260_PM_RS232_LEVEL_CONVERTER 0x01 ++#define TS7260_PM_USB 0x02 ++#define TS7260_PM_LCD 0x04 ++#define TS7260_PM_5V_SWITCHER 0x08 ++#define TS7260_PM_PC104_CLOCK 0x10 ++#define TS7260_PM_PC104_FAST_STROBES 0x20 ++#define TS7260_PM_TTL_UART_ENABLE 0x40 ++#define TS7260_PM_SCRATCH_BIT 0x80 ++ ++#define TS7260_SDCARD_PHYS_BASE 0x13000000 ++ + #ifndef __ASSEMBLY__ + + static inline int board_is_ts7200(void) + { +- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; ++ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & ++ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7200; + } + + static inline int board_is_ts7250(void) + { +- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; ++ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & ++ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7250; + } + + static inline int board_is_ts7260(void) + { +- return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; ++ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & ++ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7260; ++} ++ ++static inline int board_is_ts7300(void) ++{ ++ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & ++ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7300; ++} ++ ++static inline int board_is_ts7400(void) ++{ ++ return (__raw_readb(TS72XX_MODEL_VIRT_BASE) & ++ TS7XXX_MODEL_MASK) == TS7XXX_MODEL_TS7400; + } + + static inline int is_max197_installed(void) + { + return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & +- TS72XX_OPTIONS_MAX197); ++ TS72XX_OPTIONS_MAX197); + } + + static inline int is_ts9420_installed(void) + { + return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & +- TS72XX_OPTIONS2_TS9420); ++ TS72XX_OPTIONS2_TS9420); + } ++ ++static inline int is_rs485_installed(void) ++{ ++ return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & ++ TS72XX_OPTIONS_COM2_RS485); ++} ++ ++static inline int get_ts72xx_pld_version(void) ++{ ++ return (__raw_readb(TS72XX_PLD_VERSION_VIRT_BASE) & 0x7); ++} ++ ++/* User jumper */ ++static inline int is_jp6_set(void) ++{ ++ return (__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & 0x1); ++} ++ + #endif +diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c +index c2d2cf4..a23a184 100644 +--- a/arch/arm/mach-ep93xx/ts72xx.c ++++ b/arch/arm/mach-ep93xx/ts72xx.c +@@ -54,7 +54,36 @@ static struct map_desc ts72xx_io_desc[] __initdata = { + .pfn = __phys_to_pfn(TS72XX_RTC_DATA_PHYS_BASE), + .length = TS72XX_RTC_DATA_SIZE, + .type = MT_DEVICE, +- } ++ }, ++ /* Use this for debug only. Each device will map its own PC/104 address space */ ++ ///* PC/104 (8-bit) I/O bus */ ++ //{ ++ // .virtual = TS72XX_PC104_8BIT_IO_VIRT_BASE, ++ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_IO_PHYS_BASE), ++ // .length = TS72XX_PC104_8BIT_IO_SIZE, ++ // .type = MT_DEVICE, ++ //}, ++ ///* PC/104 (16-bit) I/O bus */ ++ //{ ++ // .virtual = TS72XX_PC104_16BIT_IO_VIRT_BASE, ++ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_IO_PHYS_BASE), ++ // .length = TS72XX_PC104_16BIT_IO_SIZE, ++ // .type = MT_DEVICE, ++ //}, ++ ///* PC/104 (8-bit) MEM bus */ ++ //{ ++ // .virtual = TS72XX_PC104_8BIT_MEM_VIRT_BASE, ++ // .pfn = __phys_to_pfn(TS72XX_PC104_8BIT_MEM_PHYS_BASE), ++ // .length = TS72XX_PC104_8BIT_MEM_SIZE, ++ // .type = MT_DEVICE, ++ //}, ++ ///* PC/104 (16-bit) MEM bus */ ++ //{ ++ // .virtual = TS72XX_PC104_16BIT_MEM_VIRT_BASE, ++ // .pfn = __phys_to_pfn(TS72XX_PC104_16BIT_MEM_PHYS_BASE), ++ // .length = TS72XX_PC104_16BIT_MEM_SIZE, ++ // .type = MT_DEVICE, ++ //} + }; + + static void __init ts72xx_map_io(void) +@@ -194,7 +223,9 @@ static void __init ts72xx_register_flash(void) + } + } + +- ++/************************************************************************* ++ * RTC ++ *************************************************************************/ + static unsigned char ts72xx_rtc_readbyte(unsigned long addr) + { + __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); +@@ -242,6 +273,9 @@ static struct platform_device ts72xx_wdt_device = { + }; + + static struct ep93xx_eth_data __initdata ts72xx_eth_data = { ++/************************************************************************* ++ * Ethernet ++ *************************************************************************/ + .phy_id = 1, + }; + +@@ -253,6 +287,9 @@ static void __init ts72xx_init_machine(void) + platform_device_register(&ts72xx_wdt_device); + + ep93xx_register_eth(&ts72xx_eth_data, 1); ++ ++ /* PWM1 is DIO_6 on TS-72xx header */ ++ ep93xx_register_pwm(0, 1); + } + + MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") +diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S +index 6109f27..2b1d028 100644 +--- a/arch/arm/mm/proc-arm920.S ++++ b/arch/arm/mm/proc-arm920.S +@@ -201,7 +201,7 @@ ENTRY(arm920_coherent_kern_range) + */ + ENTRY(arm920_coherent_user_range) + bic r0, r0, #CACHE_DLINESIZE - 1 +-1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry ++1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry + mcr p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 +@@ -402,6 +402,9 @@ __arm920_setup: + mrc p15, 0, r0, c1, c0 @ get control register v4 + bic r0, r0, r5 + orr r0, r0, r6 ++#ifdef CONFIG_CR1_NFBIT ++ orr r0, r0, #0x40000000 @ set nF ++#endif + mov pc, lr + .size __arm920_setup, . - __arm920_setup + +diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst +index 6bf8e87..fb20532 100644 +--- a/scripts/Makefile.fwinst ++++ b/scripts/Makefile.fwinst +@@ -37,7 +37,7 @@ install-all-dirs: $(installed-fw-dirs) + @true + + quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) +- cmd_install = $(INSTALL) -m0644 $< $@ ++ cmd_install = $(INSTALL) -m 0644 $< $@ + + $(installed-fw-dirs): + $(call cmd,mkdir) +-- +1.7.1 +
recipes/linux/linux-2.6.38/ts72xx/0002-ts72xx_force_machine-id.patch new file +49 -0
49 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch new file +36 -0
@@ -0,0 +1,36 @@ +From a05609ce0126b285e632dcdb569dd46670d3bd4a Mon Sep 17 00:00:00 2001 +From: Matthieu Crapet <[email protected]> +Date: Thu, 10 Jun 2010 10:59:31 +0200 +Subject: [PATCH 03/24] ep93xx_cpuinfo +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Štetiar <[email protected]> +--- + arch/arm/kernel/setup.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c +index 5ea4fb7..e47448f 100644 +--- a/arch/arm/kernel/setup.c ++++ b/arch/arm/kernel/setup.c +@@ -986,6 +986,15 @@ static int c_show(struct seq_file *m, void *v) + seq_puts(m, "\n"); + + seq_printf(m, "Hardware\t: %s\n", machine_name); ++ ++ #if defined(CONFIG_ARCH_EP93XX) ++ #include <mach/io.h> ++ #include <mach/ep93xx-regs.h> ++ system_rev = *((unsigned int *)EP93XX_SYSCON_CHIPID) >> 28; ++ system_serial_low = *((unsigned int *)EP93XX_SECURITY_UNIQID); ++ system_serial_high = 0; ++ #endif ++ + seq_printf(m, "Revision\t: %04x\n", system_rev); + seq_printf(m, "Serial\t\t: %08x%08x\n", + system_serial_high, system_serial_low); +-- +1.7.1 +
recipes/linux/linux-2.6.38/ts72xx/0004-ep93xx_eth.patch new file +553 -0
553 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0005-ep93xx-m2m-DMA-support.patch new file +870 -0
870 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch new file +221 -0
221 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch new file +264 -0
264 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0008-ts72xx_ts_eth100.patch new file +278 -0
278 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0009-ts72xx_pata.patch new file +437 -0
278 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch new file +63 -0
63 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0011-ts72xx_dio_keypad.patch new file +311 -0
311 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch new file +267 -0
267 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0013-ts72xx_max197.patch new file +356 -0
356 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0014-ts7200_nor_flash.patch new file +181 -0
181 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch new file +3299 -0
3,299 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0016-ts72xx_spi_tmp124.patch new file +305 -0
305 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patch new file +53 -0
53 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0018-ethoc-ts7300-fixes.patch new file +72 -0
72 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0019-ts7300-add-ethernet-support.patch new file +87 -0
87 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0020-ts72xx-add-lcd-linux-driver.patch new file +4572 -0
4,572 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0021-TS-72XX-LCD-console-driver.patch new file +528 -0
528 lines not on this page · raw message
recipes/linux/linux-2.6.38/ts72xx/0024-ARM-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch new file +38 -0
Lines of this file are not shown. View the raw message.
recipes/linux/linux-2.6.38/ts72xx/defconfig new file +2214 -0
2,214 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.1
Part of the diff is not shown here. View the raw message.
Quoted 4 lines · Petr Štetiar
Hi,
I plan to push few patches, so I'm posting them for the review first to get some feedback (if any). Thanks.
looks ok
Quoted 135 lines
-- ynezz
Petr Štetiar (6):
zeromq: add new recipe for version 2.1.1
lua-lanes: add recipe for version 2.1.0 and delete the old one
librs232: add version 1.0.1 and remove the old one
lua-rs232: add recipe for version 1.0.1, remove old package and fix
stripping
linux-2.6.36: remove ts72xx support because 2.6.38 is now default linux-2.6.38: add support for ts72xx and make it defaultrecipes/librs232/librs232_1.0.0.bb | 10 - recipes/librs232/librs232_1.0.1.bb | 10 + .../linux-2.6.36/ts72xx/0001-ts72xx_base.patch | 450 -- .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 - .../linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch | 36 - .../linux-2.6.36/ts72xx/0004-ep93xx_eth.patch | 555 --- .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 886 ---- .../linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch | 223 - .../linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch | 264 -- .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 -- .../linux-2.6.36/ts72xx/0009-ts72xx_pata.patch | 437 -- .../linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 - .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 -- .../linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch | 267 -- .../linux-2.6.36/ts72xx/0013-ts72xx_max197.patch | 356 -- .../ts72xx/0014-ts7200_nor_flash.patch | 181 - .../linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch | 3298 -------------- .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 -- .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 - .../ts72xx/0018-ethoc-ts7300-fixes.patch | 93 - .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 - .../ts72xx/0023-ts72xx-add-lcd-linux-driver.patch | 4569 ------------------- .../ts72xx/0024-ts72xx-add-GPIO-keys.patch | 100 - recipes/linux/linux-2.6.36/ts72xx/defconfig | 2127 --------- .../linux-2.6.38/ts72xx/0001-ts72xx_base.patch | 451 ++ .../ts72xx/0002-ts72xx_force_machine-id.patch | 49 + .../linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch | 36 + .../linux-2.6.38/ts72xx/0004-ep93xx_eth.patch | 553 +++ .../ts72xx/0005-ep93xx-m2m-DMA-support.patch | 870 ++++ .../linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch | 221 + .../linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch | 264 ++ .../ts72xx/0008-ts72xx_ts_eth100.patch | 278 ++ .../linux-2.6.38/ts72xx/0009-ts72xx_pata.patch | 437 ++ .../linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch | 63 + .../ts72xx/0011-ts72xx_dio_keypad.patch | 311 ++ .../linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch | 267 ++ .../linux-2.6.38/ts72xx/0013-ts72xx_max197.patch | 356 ++ .../ts72xx/0014-ts7200_nor_flash.patch | 181 + .../linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch | 3299 ++++++++++++++ .../ts72xx/0016-ts72xx_spi_tmp124.patch | 305 ++ .../0017-ts72xx-use-CPLD-watchdog-for-reset.patch | 53 + .../ts72xx/0018-ethoc-ts7300-fixes.patch | 72 + .../ts72xx/0019-ts7300-add-ethernet-support.patch | 87 + .../ts72xx/0020-ts72xx-add-lcd-linux-driver.patch | 4572 ++++++++++++++++++++ .../ts72xx/0021-TS-72XX-LCD-console-driver.patch | 528 +++ ...M-ep93xx-Fix-inverted-RTS-and-DTR-signals.patch | 38 + recipes/linux/linux-2.6.38/ts72xx/defconfig | 2214 ++++++++++ recipes/linux/linux_2.6.36.bb | 25 - recipes/linux/linux_2.6.38.bb | 26 + .../0001-fix-LanesTimer-inifinite-thread-GC.patch | 31 - recipes/lua/lua-lanes-2.0.6/makefile.patch | 207 - recipes/lua/lua-lanes-2.0.6/uclibc.patch | 13 - recipes/lua/lua-lanes-2.1.0/makefile.patch | 207 + recipes/lua/lua-lanes-2.1.0/uclibc.patch | 13 + recipes/lua/lua-lanes_2.0.6.bb | 33 - recipes/lua/lua-lanes_2.1.0.bb | 34 + recipes/lua/lua-rs232_1.0.0.bb | 28 - recipes/lua/lua-rs232_1.0.1.bb | 28 + recipes/zeromq/zeromq_2.1.1.bb | 20 + 59 files changed, 15843 insertions(+), 15335 deletions(-)delete mode 100644 recipes/librs232/librs232_1.0.0.bb
create mode 100644 recipes/librs232/librs232_1.0.1.bb
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0001-ts72xx_base.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0002-ts72xx_force_machine-id.patchdelete mode 100644recipes/linux/linux-2.6.36/ts72xx/0003-ep93xx_cpuinfo.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0004-ep93xx_eth.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0005-ep93xx-m2m-DMA-support.patchdelete mode 100644recipes/linux/linux-2.6.36/ts72xx/0006-ts72xx_rs485.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0007-ts72xx_ts_ser1.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0008-ts72xx_ts_eth100.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0009-ts72xx_pata.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0010-ts72xx_gpio_i2c.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0011-ts72xx_dio_keypad.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0012-ts72xx_sbcinfo.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0013-ts72xx_max197.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0014-ts7200_nor_flash.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0015-ts72xx_sdcard.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0016-ts72xx_spi_tmp124.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patchdelete mode 100644recipes/linux/linux-2.6.36/ts72xx/0018-ethoc-ts7300-fixes.patch
delete mode 100644recipes/linux/linux-2.6.36/ts72xx/0019-ts7300-add-ethernet-support.patchdelete mode 100644recipes/linux/linux-2.6.36/ts72xx/0023-ts72xx-add-lcd-linux-driver.patchdelete mode 100644recipes/linux/linux-2.6.36/ts72xx/0024-ts72xx-add-GPIO-keys.patchdelete mode 100644 recipes/linux/linux-2.6.36/ts72xx/defconfig
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0001-ts72xx_base.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0002-ts72xx_force_machine-id.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0003-ep93xx_cpuinfo.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0004-ep93xx_eth.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0005-ep93xx-m2m-DMA-support.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0006-ts72xx_rs485.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0007-ts72xx_ts_ser1.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0008-ts72xx_ts_eth100.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0009-ts72xx_pata.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0010-ts72xx_gpio_i2c.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0011-ts72xx_dio_keypad.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0012-ts72xx_sbcinfo.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0013-ts72xx_max197.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0014-ts7200_nor_flash.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0015-ts72xx_sdcard.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0016-ts72xx_spi_tmp124.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0017-ts72xx-use-CPLD-watchdog-for-reset.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0018-ethoc-ts7300-fixes.patch
create mode 100644recipes/linux/linux-2.6.38/ts72xx/0019-ts7300-add-ethernet-support.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0020-ts72xx-add-lcd-linux-driver.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0021-TS-72XX-LCD-console-driver.patchcreate mode 100644recipes/linux/linux-2.6.38/ts72xx/0024-ARM-ep93xx-Fix-inverted-RTS-and-DTR-signals.patchcreate mode 100644 recipes/linux/linux-2.6.38/ts72xx/defconfig
delete mode 100644recipes/lua/lua-lanes-2.0.6/0001-fix-LanesTimer-inifinite-thread-GC.patchdelete mode 100644recipes/lua/lua-lanes-2.0.6/makefile.patch
delete mode 100644recipes/lua/lua-lanes-2.0.6/uclibc.patch
create mode 100644recipes/lua/lua-lanes-2.1.0/makefile.patch
create mode 100644recipes/lua/lua-lanes-2.1.0/uclibc.patch
delete mode 100644 recipes/lua/lua-lanes_2.0.6.bb
create mode 100644 recipes/lua/lua-lanes_2.1.0.bb
delete mode 100644 recipes/lua/lua-rs232_1.0.0.bb
create mode 100644 recipes/lua/lua-rs232_1.0.1.bb
create mode 100644 recipes/zeromq/zeromq_2.1.1.bb_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel