diff options
48 files changed, 3334 insertions, 1621 deletions
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 0dd6900d77..5de5970880 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -190,7 +190,8 @@ python packagestage_scenefunc () { # # Install the staging package somewhere temporarily so we can extract the stamp files # - cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -force-depends -f ${PSTAGE_MACHCONFIG} -o ${WORKDIR}/tstage install", d) + bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${layout_libdir}/opkg/info/ ", d)) + cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -force-depends -o ${WORKDIR}/tstage install", d) ret = os.system("PATH=\"%s\" %s %s" % (path, cmd, stagepkg)) if ret != 0: bb.fatal("Couldn't install the staging package to a temp directory") diff --git a/conf/distro/include/sane-srcdates.inc b/conf/distro/include/sane-srcdates.inc index c5b969bb7e..10a0330f17 100644 --- a/conf/distro/include/sane-srcdates.inc +++ b/conf/distro/include/sane-srcdates.inc @@ -139,7 +139,7 @@ SRCDATE_mpd ?= "20070210" SRCDATE_mystun-server ?= "20060814" SRCDATE_olsrd ?= "20060814" SRCDATE_opencvs ?= "20060814" -SRCDATE_oprofile ?= "20061011" +SRCDATE_oprofile ?= "20080210" SRCDATE_portaudio ?= "20060814" SRCDATE_putty ?= "20060814" SRCDATE_python-cairo ?= "20060814" diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc index e3d50fc52c..08575018fc 100644 --- a/conf/distro/include/sane-srcrevs.inc +++ b/conf/distro/include/sane-srcrevs.inc @@ -156,9 +156,9 @@ SRCREV_pn-openmoko-worldclock2 ?= "3365" SRCREV_pn-openocd ?= "517" SRCREV_pn-openocd-native ?= "517" SRCREV_pn-opkg ?= "4488" -SRCREV_pn-opkg-native ?= "4488" +SRCREV_pn-opkg-native ?= "4452" SRCREV_pn-opkg-sdk ?= "4488" -SRCREV_pn-oprofileui ?= "160" +SRCREV_pn-oprofileui ?= "173" SRCREV_pn-packagekit ?= "813fa8cfb139246cf180d52895b52b28616ae2f5" SRCREV_pn-psplash ?= "249" SRCREV_pn-pty-forward-native ?= "4214" diff --git a/packages/bwmon/bwmon_1.3.bb b/packages/bwmon/bwmon_1.3.bb index bc08aa7568..11b67f4522 100644 --- a/packages/bwmon/bwmon_1.3.bb +++ b/packages/bwmon/bwmon_1.3.bb @@ -1,15 +1,13 @@ DESCRIPTION = "The Linux bandwidth monitor" LICENSE = "GPL" DEPENDS = "ncurses" -PR = "r1" +PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/bwmon/${P}.tar.gz \ file://makefile.patch;patch=1" inherit autotools -EXTRA_OEMAKE = "LDFLAGS=-L${STAGING_LIBDIR}" - do_install () { install -d ${D}${bindir} install ${S}/bwmon ${D}${bindir}/bwmon diff --git a/packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty b/packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/fetchmail/fetchmail-6.3.8/.mtn2git_empty diff --git a/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch b/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch new file mode 100644 index 0000000000..d0926848c2 --- /dev/null +++ b/packages/fetchmail/fetchmail-6.3.8/CVE-2007-4565.patch @@ -0,0 +1,11 @@ +--- fetchmail-6.3.8-orig/sink.c ++++ fetchmail-6.3.8/sink.c +@@ -262,7 +262,7 @@ + const char *md1 = "MAILER-DAEMON", *md2 = "MAILER-DAEMON@"; + + /* don't bounce in reply to undeliverable bounces */ +- if (!msg->return_path[0] || ++ if (!msg || !msg->return_path[0] || + strcmp(msg->return_path, "<>") == 0 || + strcasecmp(msg->return_path, md1) == 0 || + strncasecmp(msg->return_path, md2, strlen(md2)) == 0) diff --git a/packages/fetchmail/fetchmail_6.3.8.bb b/packages/fetchmail/fetchmail_6.3.8.bb new file mode 100644 index 0000000000..9b789aae25 --- /dev/null +++ b/packages/fetchmail/fetchmail_6.3.8.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Fetchmail is a free, full-featured, robust, \ +well-documented remote-mail retrieval and forwarding utility \ +intended to be used over on-demand TCP/IP links \ +(such as SLIP or PPP connections)." +SECTION = "console/network" + +LICENSE = "GPL" + +PR = "r2" + +SRC_URI = "${DEBIAN_MIRROR}/main/f/${PN}/${PN}_${PV}.orig.tar.gz \ + file://CVE-2007-4565.patch;patch=1 \ + " + +inherit autotools gettext + +FILES_${PN} = "${bindir}/fetchmail" +PACKAGES += "${PN}conf" +FILES_${PN}conf = "${libdir}/python2.5/site-packages/fetchmailconf.py* ${bindir}/fetchmailconf" +rdepends_${PN}conf = "${PN}" diff --git a/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty b/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/gtk-webcore/midori-0.0.18/.mtn2git_empty diff --git a/packages/gtk-webcore/midori-0.0.18/desktop.patch b/packages/gtk-webcore/midori-0.0.18/desktop.patch new file mode 100644 index 0000000000..bb1225432a --- /dev/null +++ b/packages/gtk-webcore/midori-0.0.18/desktop.patch @@ -0,0 +1,7 @@ +--- midori-0.0.18/midori.desktop.in-orig 2008-03-19 14:34:52.000000000 -0700 ++++ midori-0.0.18/midori.desktop.in 2008-03-19 14:21:56.000000000 -0700 +@@ -1,4 +1,3 @@ +- + [Desktop Entry] + Version=1.0 + Encoding=UTF-8 diff --git a/packages/gtk-webcore/midori_0.0.18.bb b/packages/gtk-webcore/midori_0.0.18.bb index b879fef57b..bb144f8600 100644 --- a/packages/gtk-webcore/midori_0.0.18.bb +++ b/packages/gtk-webcore/midori_0.0.18.bb @@ -1 +1,6 @@ -require midori.inc +require midori.inc + +PR = "r2" + +SRC_URI += "file://desktop.patch;patch=1" + diff --git a/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch b/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch new file mode 100644 index 0000000000..3ab133fb15 --- /dev/null +++ b/packages/ipkg-utils/ipkg-utils/arfile_even_alignment.patch @@ -0,0 +1,11 @@ +--- ipkg-utils/arfile.py.orig 2008-06-11 21:07:01.000000000 -0500 ++++ ipkg-utils/arfile.py 2008-06-14 19:56:04.000000000 -0500 +@@ -86,6 +86,8 @@ + return FileSection(self.f, self.f.tell(), size) + + # Skip data and loop ++ if size % 2: ++ size = size + 1 + data = self.f.seek(size, 1) + # print hex(f.tell()) + diff --git a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb index f64e644bd3..707a005c5c 100644 --- a/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb +++ b/packages/ipkg-utils/ipkg-utils_1.6+cvs20050404.bb @@ -5,12 +5,13 @@ LICENSE = "GPL" CONFLICTS = "ipkg-link" RDEPENDS = "python" SRCDATE = "20050404" -PR = "r20" +PR = "r20.1" SRC_URI = "${HANDHELDS_CVS};module=ipkg-utils \ file://ipkg-utils-fix.patch;patch=1 \ file://ipkg-py-sane-vercompare.patch;patch=1 \ file://ipkg-py-tarfile.patch;patch=1 \ + file://arfile_even_alignment.patch;patch=1 \ file://ipkg-make-index-track-stamps.patch;patch=1 \ file://fields_tweaks.patch;patch=1 " diff --git a/packages/libtool/libtool-cross_2.2.4.bb b/packages/libtool/libtool-cross_2.2.4.bb index a8dadc25d2..9b3c6d78ea 100644 --- a/packages/libtool/libtool-cross_2.2.4.bb +++ b/packages/libtool/libtool-cross_2.2.4.bb @@ -1,7 +1,7 @@ require libtool.inc require libtool_${PV}.bb -PR = "r21" +PR = "r23" PACKAGES = "" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}" SRC_URI_append = " file://cross_compile.patch;patch=1 \ @@ -28,9 +28,6 @@ do_compile () { do_stage () { install -m 0755 ${HOST_SYS}-libtool ${bindir}/${HOST_SYS}-libtool - install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/ - install -d ${STAGING_INCDIR}/libltdl - install -m 0644 libltdl/libltdl/*.h ${STAGING_INCDIR}/libltdl/ install -d ${STAGING_DATADIR}/libtool ${STAGING_DATADIR}/aclocal install -c ${S}/libltdl/config/config.guess ${STAGING_DATADIR}/libtool/ install -c ${S}/libltdl/config/config.sub ${STAGING_DATADIR}/libtool/ diff --git a/packages/libtool/libtool_2.2.4.bb b/packages/libtool/libtool_2.2.4.bb index 6739802fb7..c8380d161c 100644 --- a/packages/libtool/libtool_2.2.4.bb +++ b/packages/libtool/libtool_2.2.4.bb @@ -1,6 +1,6 @@ require libtool.inc -PR = "r12" +PR = "r14" DEFAULT_PREFERENCE = "-1" @@ -18,5 +18,8 @@ inherit autotools EXTRA_AUTORECONF = "--exclude=libtoolize" do_stage () { - autotools_stage_all + install -d ${STAGING_INCDIR}/libltdl + install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/ + install -m 0644 libltdl/libltdl/*.h ${STAGING_INCDIR}/libltdl/ + oe_libinstall -a -so -C libltdl libltdl ${STAGING_LIBDIR} } diff --git a/packages/meta/slugos-packages.bb b/packages/meta/slugos-packages.bb index 2927bc6d7b..946b51b210 100644 --- a/packages/meta/slugos-packages.bb +++ b/packages/meta/slugos-packages.bb @@ -5,7 +5,7 @@ DESCRIPTION = "Packages that are compatible with the SlugOS firmware" HOMEPAGE = "http://www.nslu2-linux.org" LICENSE = "MIT" -PR = "r55" +PR = "r57" CONFLICTS = "db3" COMPATIBLE_MACHINE = "nslu2|ixp4xx" @@ -53,6 +53,7 @@ SLUGOS_PACKAGES = "\ bonnie++ \ boost \ bridge-utils \ + bwmon \ bzip2 \ ccxstream \ cdparanoia \ @@ -61,7 +62,6 @@ SLUGOS_PACKAGES = "\ coreutils \ cron \ cryptsetup \ - ctorrent \ ctrlproxy \ cups \ curl \ @@ -81,6 +81,7 @@ SLUGOS_PACKAGES = "\ expat \ ez-ipupdate \ fconfig \ + fetchmail \ file \ findutils \ fis \ @@ -208,6 +209,7 @@ SLUGOS_PACKAGES = "\ sipsak \ slugimage \ smartmontools \ + spandsp \ sqlite \ squid \ ssmtp \ @@ -216,6 +218,7 @@ SLUGOS_PACKAGES = "\ stunnel \ sudo \ sysfsutils \ + syslog-ng \ tar \ task-mokogateway-everything \ tcpdump \ @@ -251,10 +254,9 @@ SLUGOS_PACKAGES = "\ # Packages currently broken on all platforms SLUGOS_BROKEN_PACKAGES = "\ - bwmon \ + ctorrent \ dsniff \ eciadsl \ - fetchmail \ gspcav1 \ linphone \ lirc-modules lirc \ @@ -264,8 +266,6 @@ SLUGOS_BROKEN_PACKAGES = "\ postfix \ pwc \ qc-usb-messenger \ - spandsp \ - syslog-ng \ task-native-sdk \ unionfs-modules unionfs-utils \ wview-sim-mysql wview-wxt510-mysql wview-vpro-mysql \ diff --git a/packages/oprofile/oprofile/armv6_fix.patch b/packages/oprofile/oprofile/armv6_fix.patch new file mode 100644 index 0000000000..b981871e6e --- /dev/null +++ b/packages/oprofile/oprofile/armv6_fix.patch @@ -0,0 +1,54 @@ +--- + events/arm/armv6/events | 43 +++++++++++++++++++++---------------------- + 1 file changed, 21 insertions(+), 22 deletions(-) + +Index: oprofile-0.9.3/events/arm/armv6/events +=================================================================== +--- oprofile-0.9.3.orig/events/arm/armv6/events 2007-07-16 19:22:17.000000000 +0100 ++++ oprofile-0.9.3/events/arm/armv6/events 2007-09-28 11:13:32.000000000 +0100 +@@ -1,24 +1,23 @@ + # ARM V6 events + # +-event:0x00 counters:1,2 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses +-event:0x01 counters:1,2 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled +-event:0x02 counters:1,2 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency +-event:0x03 counters:1,2 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses +-event:0x04 counters:1,2 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses +-event:0x05 counters:1,2 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change +-event:0x06 counters:1,2 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted +-event:0x07 counters:1,2 um:zero minimum:500 name:INSN_EXECUTED : instructions executed +-event:0x09 counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations +-event:0x0a counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations +-event:0x0b counters:1,2 um:zero minimum:500 name:DCACHE_MISS : data cache miss +-event:0x0c counters:1,2 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline +-event:0x0d counters:1,2 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch +-event:0x0f counters:1,2 um:zero minimum:500 name:TLB_MISS : Main TLB miss +-event:0x10 counters:1,2 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access +-event:0x11 counters:1,2 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full +-event:0x12 counters:1,2 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained +-event:0x20 counters:1,2 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted +-event:0x21 counters:1,2 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted +-event:0x22 counters:1,2 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2 +-event:0xff counters:1,2 um:zero minimum:500 name:CPU_CYCLES2 : clock cycles counter +-event:0xfe counters:0 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter ++event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses ++event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled ++event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency ++event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses ++event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses ++event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change ++event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted ++event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed ++event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations ++event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations ++event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss ++event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline ++event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch ++event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss ++event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access ++event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full ++event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained ++event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted ++event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted ++event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2 ++event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter diff --git a/packages/oprofile/oprofile/fix-arith.patch b/packages/oprofile/oprofile/fix-arith.patch new file mode 100644 index 0000000000..5c55f4b349 --- /dev/null +++ b/packages/oprofile/oprofile/fix-arith.patch @@ -0,0 +1,52 @@ +Index: utils/opcontrol +=================================================================== +RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v +retrieving revision 1.148 +diff -u -r1.148 opcontrol +--- utils/opcontrol 8 Nov 2007 09:24:30 -0000 1.148 ++++ utils/opcontrol 27 Nov 2007 17:02:20 -0000 +@@ -395,7 +395,7 @@ + echo "SESSION_DIR=$SESSION_DIR" >>$SETUP_FILE + + if test "$NR_CHOSEN" != "0"; then +- for f in `seq 0 $((NR_CHOSEN - 1))`; do ++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do + get_event $f + echo "CHOSEN_EVENTS_${f}=$GOTEVENT" >>$SETUP_FILE + done +@@ -590,7 +590,7 @@ + OPHELP_ARGS= + + if test "$NR_CHOSEN" != 0; then +- for f in `seq 0 $((NR_CHOSEN - 1))`; do ++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do + get_event $f + if test "$GOTEVENT" != ""; then + OPHELP_ARGS="$OPHELP_ARGS $GOTEVENT" +@@ -612,7 +612,7 @@ + return + fi + +- for f in `seq 0 $((NR_CHOSEN - 1))`; do ++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do + get_event $f + if test "$GOTEVENT" != ""; then + EVENT=`echo $GOTEVENT | awk -F: '{print $1}'` +@@ -1226,7 +1226,7 @@ + verify_counters + + OPROFILED_EVENTS= +- for f in `seq 0 $((NR_CHOSEN - 1))`; do ++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do + get_event $f + if test "$GOTEVENT" != ""; then + EVENT=`echo $GOTEVENT | awk -F: '{print $1}'` +@@ -1383,7 +1383,7 @@ + fi + + if test "$NR_CHOSEN" != "0"; then +- for f in `seq 0 $((NR_CHOSEN - 1))`; do ++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do + get_event $f + echo "Event $f: $GOTEVENT" + done diff --git a/packages/oprofile/oprofile/oparchive_fix.patch b/packages/oprofile/oprofile/oparchive_fix.patch new file mode 100644 index 0000000000..dbdd5eb4ea --- /dev/null +++ b/packages/oprofile/oprofile/oparchive_fix.patch @@ -0,0 +1,22 @@ +Index: oprofile/pp/oparchive.cpp +=================================================================== +--- oprofile.orig/pp/oparchive.cpp ++++ oprofile/pp/oparchive.cpp +@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec + * to avoid overwriting files with the same name. The + * /usr/lib/debug search path is not going to work. + */ +- bfd * ibfd = open_bfd(exe_name); ++ bfd * ibfd = open_bfd(options::archive_path + exe_name); + if (ibfd) { + string global(options::archive_path + DEBUGDIR); + string dirname = op_dirname(options::archive_path + +@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec + /* found something copy it over */ + string dest_debug_dir = options::outdirectory + + dirname + "/.debug/"; +- if (create_dir(dest_debug_dir.c_str())) { ++ if (!options::list_files && create_dir(dest_debug_dir.c_str())) { + cerr << "Unable to create directory: " + << dest_debug_dir << "." << endl; + exit (EXIT_FAILURE); diff --git a/packages/oprofile/oprofile/opstart.patch b/packages/oprofile/oprofile/opstart.patch new file mode 100644 index 0000000000..e8da0922cc --- /dev/null +++ b/packages/oprofile/oprofile/opstart.patch @@ -0,0 +1,235 @@ +Index: oprofile/utils/Makefile.am +=================================================================== +--- oprofile.orig/utils/Makefile.am ++++ oprofile/utils/Makefile.am +@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@ + + LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ + +-bin_PROGRAMS = ophelp ++bin_PROGRAMS = ophelp opstart + dist_bin_SCRIPTS = opcontrol + + ophelp_SOURCES = ophelp.c + ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a ++ ++opstart_SOURCES = opstart.c ++ ++install-exec-local: ++ cd $(DESTDIR)/$(bindir) && \ ++ rm -f opstop && \ ++ $(LN_S) opstart opstop +Index: oprofile/utils/opstart.c +=================================================================== +--- /dev/null ++++ oprofile/utils/opstart.c +@@ -0,0 +1,110 @@ ++/** ++ * @file opstart.c ++ * Start/Stop oprofile ++ * ++ * @remark Copyright 2007 Openedhand Ltd. ++ * @remark Read the file COPYING ++ * ++ * @author Richard Purdie ++ */ ++ ++#include <signal.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++ ++int main(const int argc, const char* argv[]) ++{ ++ const char *enable = "/dev/oprofile/enable"; ++ const char *lockfile; ++ unsigned long dpid; ++ struct stat sbuf; ++ FILE *lfile, *efile; ++ int sig, enb, err; ++ ++ if (argc >= 2) { ++ printf("Error: Invalid options.\n"); ++ return 1; ++ } ++ ++ lockfile = getenv("LOCK_FILE"); ++ if (!lockfile) ++ lockfile = "/var/lib/oprofile/lock"; ++ ++ /* Add SESSION_DIR support? */ ++ ++ if (geteuid()) { ++ printf("Error: This program must be run as root.\n"); ++ return 1; ++ } ++ ++ if (stat(enable, &sbuf)) { ++ printf("Error: Could not find /dev/oprofile/enable, the" ++ " kernel module probably isn't loaded.\n"); ++ printf("This binary only works with 2.6 kernels and oprofile" ++ " must have been initialised with 'opcontrol --start-daemon'.\n"); ++ return 1; ++ } ++ ++ if (stat(lockfile, &sbuf)) { ++ printf("Error: Could not find lockfile %s.\n", lockfile); ++ printf("The oprofile daemon must be running (oprofile must" ++ " have been initialised with 'opcontrol --start-daemon').\n"); ++ return 1; ++ } ++ ++ lfile = fopen(lockfile, "r"); ++ if (!lfile) { ++ printf("Error opening lockfile %s.\n", lockfile); ++ return 1; ++ } ++ ++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid); ++ if (err != 1) { ++ printf("Error reading pid from lockfile %s.\n", lockfile); ++ return 1; ++ } ++ fclose(lfile); ++ ++ efile = fopen(enable, "r"); ++ if (!efile) { ++ printf("Error opening %s.\n", enable); ++ return 1; ++ } ++ ++ if (strstr(argv[0], "opstart")) { ++ printf("Starting Profiler\n"); ++ sig = SIGUSR1; ++ enb = 1; ++ } else if (strstr(argv[0], "opstop")) { ++ printf("Stopping Oprofile.\n"); ++ printf("You need to run 'opcontrol --dump' when the session" ++ " is finished.\n"); ++ sig = SIGUSR2; ++ enb = 0; ++ } else { ++ printf("Error: Please call as 'opstart' or 'opstop'\n"); ++ return 1; ++ } ++ ++ err = kill(dpid, 0); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ fprintf(efile, "%d\n", enb); ++ err = kill(dpid, sig); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ return 0; ++} ++ +Index: oprofile/configure.in +=================================================================== +--- oprofile.orig/configure.in ++++ oprofile/configure.in +@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs) + AM_CONFIG_HEADER(config.h) + + AC_PROG_RANLIB ++AC_PROG_LN_S + + dnl for the man page + DATE="`date '+%a %d %B %Y'`" +@@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \ + doc/xsl/catalog-1.xml \ + doc/oprofile.1 \ + doc/opcontrol.1 \ ++ doc/opstart.1 \ ++ doc/opstop.1 \ + doc/ophelp.1 \ + doc/opreport.1 \ + doc/opannotate.1 \ +Index: oprofile/doc/Makefile.am +=================================================================== +--- oprofile.orig/doc/Makefile.am ++++ oprofile/doc/Makefile.am +@@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $( + man_MANS = \ + oprofile.1 \ + opcontrol.1 \ ++ opstart.1 \ ++ opstop.1 \ + opreport.1 \ + opannotate.1 \ + opgprof.1 \ +Index: oprofile/doc/opstart.1.in +=================================================================== +--- /dev/null ++++ oprofile/doc/opstart.1.in +@@ -0,0 +1,27 @@ ++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstart \- start OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstart ++.SH DESCRIPTION ++.B opstart ++is a simple optimised command to start profiling with 2.6 Linux kernels. ++OProfile should have already been initialised by calling "opcontrol --start-daemon". ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstart. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) +Index: oprofile/doc/opstop.1.in +=================================================================== +--- /dev/null ++++ oprofile/doc/opstop.1.in +@@ -0,0 +1,28 @@ ++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstop \- stop OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstop ++.SH DESCRIPTION ++.B opstop ++is a simple optimsed command to stop profiling with 2.6 Linux kernels. ++You need to run "opcontrol --dump" before being able to view a profile ++with opreport. ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstop. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) diff --git a/packages/oprofile/oprofile/root_option.patch b/packages/oprofile/oprofile/root_option.patch new file mode 100644 index 0000000000..bcb05f6c16 --- /dev/null +++ b/packages/oprofile/oprofile/root_option.patch @@ -0,0 +1,1051 @@ +Index: oprofile/libpp/arrange_profiles.cpp +=================================================================== +--- oprofile.orig/libpp/arrange_profiles.cpp ++++ oprofile/libpp/arrange_profiles.cpp +@@ -798,7 +798,7 @@ get_iprofile(app_map_t & app_map, string + + /// Pull out all the images, removing any we can't access. + void +-verify_and_fill(string archive_path, app_map_t & app_map, ++verify_and_fill(std::vector<std::string> const & archive_paths, app_map_t & app_map, + list<inverted_profile> & plist, extra_images const & extra) + { + app_map_t::iterator it = app_map.begin(); +@@ -807,7 +807,7 @@ verify_and_fill(string archive_path, app + for (; it != end; ++it) { + plist.push_back(it->second); + inverted_profile & ip = plist.back(); +- ip.image = find_image_path(archive_path, ip.image, extra, ++ ip.image = find_image_path(archive_paths, ip.image, extra, + ip.error); + } + } +@@ -816,7 +816,7 @@ verify_and_fill(string archive_path, app + + + list<inverted_profile> const +-invert_profiles(string archive_path, profile_classes const & classes, ++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes, + extra_images const & extra) + { + app_map_t app_map; +@@ -855,7 +855,7 @@ invert_profiles(string archive_path, pro + + list<inverted_profile> inverted_list; + +- verify_and_fill(archive_path, app_map, inverted_list, extra); ++ verify_and_fill(archive_paths, app_map, inverted_list, extra); + + return inverted_list; + } +Index: oprofile/libpp/arrange_profiles.h +=================================================================== +--- oprofile.orig/libpp/arrange_profiles.h ++++ oprofile/libpp/arrange_profiles.h +@@ -239,7 +239,7 @@ class extra_images; + * applicable (hence image_set). + */ + std::list<inverted_profile> const +-invert_profiles(std::string archive_path, profile_classes const & classes, ++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes, + extra_images const & extra); + + #endif /* !ARRANGE_PROFILES_H */ +Index: oprofile/libpp/callgraph_container.cpp +=================================================================== +--- oprofile.orig/libpp/callgraph_container.cpp ++++ oprofile/libpp/callgraph_container.cpp +@@ -392,7 +392,7 @@ const symbol_collection & arc_recorder:: + } + + +-void callgraph_container::populate(string const & archive_path, ++void callgraph_container::populate(std::vector<std::string> const & archive_paths, + list<inverted_profile> const & iprofiles, + extra_images const & extra, bool debug_info, double threshold, + bool merge_lib, string_filter const & sym_filter) +@@ -405,7 +405,7 @@ void callgraph_container::populate(strin + list<inverted_profile>::const_iterator const end = iprofiles.end(); + for (it = iprofiles.begin(); it != end; ++it) { + // populate_caller_image take care about empty sample filename +- populate_for_image(archive_path, pc, *it, sym_filter, 0); ++ populate_for_image(archive_paths, pc, *it, sym_filter, 0); + } + + add_symbols(pc); +@@ -414,7 +414,7 @@ void callgraph_container::populate(strin + + for (it = iprofiles.begin(); it != end; ++it) { + for (size_t i = 0; i < it->groups.size(); ++i) { +- populate(archive_path, it->groups[i], it->image, extra, ++ populate(archive_paths, it->groups[i], it->image, extra, + i, pc, debug_info, merge_lib); + } + } +@@ -423,7 +423,7 @@ void callgraph_container::populate(strin + } + + +-void callgraph_container::populate(string const & archive_path, ++void callgraph_container::populate(std::vector<std::string> const & archive_paths, + list<image_set> const & lset, + string const & app_image, extra_images const & extra, size_t pclass, + profile_container const & pc, bool debug_info, bool merge_lib) +@@ -435,14 +435,14 @@ void callgraph_container::populate(strin + list<profile_sample_files>::const_iterator pend + = lit->files.end(); + for (pit = lit->files.begin(); pit != pend; ++pit) { +- populate(archive_path, pit->cg_files, app_image, ++ populate(archive_paths, pit->cg_files, app_image, + extra, pclass, pc, debug_info, merge_lib); + } + } + } + + +-void callgraph_container::populate(string const & archive_path, ++void callgraph_container::populate(std::vector<std::string> const & archive_paths, + list<string> const & cg_files, + string const & app_image, extra_images const & extra, size_t pclass, + profile_container const & pc, bool debug_info, bool merge_lib) +@@ -457,15 +457,15 @@ void callgraph_container::populate(strin + + image_error error; + string caller_binary = +- find_image_path(archive_path, caller_file.lib_image, ++ find_image_path(archive_paths, caller_file.lib_image, + extra, error); + + if (error != image_ok) +- report_image_error(archive_path + caller_file.lib_image, ++ report_image_error(caller_file.lib_image, + error, false); + + bool caller_bfd_ok = true; +- op_bfd caller_bfd(archive_path, caller_binary, ++ op_bfd caller_bfd(archive_paths, caller_binary, + string_filter(), caller_bfd_ok); + if (!caller_bfd_ok) + report_image_error(caller_binary, +@@ -474,13 +474,13 @@ void callgraph_container::populate(strin + parsed_filename callee_file = parse_filename(*it); + + string callee_binary = +- find_image_path(archive_path, callee_file.cg_image, ++ find_image_path(archive_paths, callee_file.cg_image, + extra, error); + if (error != image_ok) + report_image_error(callee_file.cg_image, error, false); + + bool callee_bfd_ok = true; +- op_bfd callee_bfd(archive_path, callee_binary, ++ op_bfd callee_bfd(archive_paths, callee_binary, + string_filter(), callee_bfd_ok); + if (!callee_bfd_ok) + report_image_error(callee_binary, +Index: oprofile/libpp/callgraph_container.h +=================================================================== +--- oprofile.orig/libpp/callgraph_container.h ++++ oprofile/libpp/callgraph_container.h +@@ -105,7 +105,7 @@ class callgraph_container { + public: + /** + * Populate the container, must be called once only. +- * @param archive_path oparchive prefix path ++ * @param archive_paths oparchive prefix paths + * @param iprofiles sample file list including callgraph files. + * @param extra extra image list to fixup binary name. + * @param debug_info true if we must record linenr information +@@ -116,7 +116,7 @@ public: + * Currently all errors core dump. + * FIXME: consider if this should be a ctor + */ +- void populate(std::string const & archive_path, ++ void populate(std::vector<std::string> const & archive_paths, + std::list<inverted_profile> const & iprofiles, + extra_images const & extra, bool debug_info, + double threshold, bool merge_lib, +@@ -149,13 +149,13 @@ private: + profile_container const & pc, bool debug_info, + size_t pclass); + +- void populate(std::string const & archive_path, ++ void populate(std::vector<std::string> const & archive_paths, + std::list<image_set> const & lset, + std::string const & app_image, + extra_images const & extra, size_t pclass, + profile_container const & pc, bool debug_info, + bool merge_lib); +- void populate(std::string const & archive_path, ++ void populate(std::vector<std::string> const & archive_paths, + std::list<std::string> const & cg_files, + std::string const & app_image, + extra_images const & extra, size_t pclass, +Index: oprofile/libpp/locate_images.cpp +=================================================================== +--- oprofile.orig/libpp/locate_images.cpp ++++ oprofile/libpp/locate_images.cpp +@@ -93,14 +93,14 @@ public: + } // anon namespace + + +-string const find_image_path(string const & archive_path, ++string const find_image_path(std::vector<std::string> const & archive_paths, + string const & image_name, + extra_images const & extra_images, + image_error & error) + { + error = image_ok; + +- string const image = op_realpath(archive_path + image_name); ++ string const image = op_realpath(op_findfile(archive_paths, image_name)); + + // simplest case + if (op_file_readable(image)) { +Index: oprofile/libpp/locate_images.h +=================================================================== +--- oprofile.orig/libpp/locate_images.h ++++ oprofile/libpp/locate_images.h +@@ -70,7 +70,7 @@ private: + * If we fail to find the file we fill in error and return the original string. + */ + std::string const +-find_image_path(std::string const & archive_path, ++find_image_path(std::vector<std::string> const & archive_paths, + std::string const & image_name, + extra_images const & extra_images, + image_error & error); +Index: oprofile/libpp/populate.cpp +=================================================================== +--- oprofile.orig/libpp/populate.cpp ++++ oprofile/libpp/populate.cpp +@@ -21,6 +21,7 @@ + #include "populate_for_spu.h" + + #include "image_errors.h" ++#include "file_manip.h" + + #include <iostream> + +@@ -56,16 +57,16 @@ populate_from_files(profile_t & profile, + + + void +-populate_for_image(string const & archive_path, profile_container & samples, ++populate_for_image(std::vector<std::string> const & archive_paths, profile_container & samples, + inverted_profile const & ip, string_filter const & symbol_filter, + bool * has_debug_info) + { + if (is_spu_profile(ip)) +- return populate_for_spu_image(archive_path, samples, ip, ++ return populate_for_spu_image(archive_paths, samples, ip, + symbol_filter, has_debug_info); + + bool ok = ip.error == image_ok; +- op_bfd abfd(archive_path, ip.image, symbol_filter, ok); ++ op_bfd abfd(archive_paths, ip.image, symbol_filter, ok); + if (!ok && ip.error == image_ok) + ip.error = image_format_failure; + +@@ -96,7 +97,7 @@ populate_for_image(string const & archiv + } + + if (found == true && ip.error == image_ok) +- check_mtime(archive_path + abfd.get_filename(), header); ++ check_mtime(op_findfile(archive_paths, abfd.get_filename()), header); + + if (has_debug_info) + *has_debug_info = abfd.has_debug_info(); +Index: oprofile/libpp/populate.h +=================================================================== +--- oprofile.orig/libpp/populate.h ++++ oprofile/libpp/populate.h +@@ -19,7 +19,7 @@ class string_filter; + + /// Load all sample file information for exactly one binary image. + void +-populate_for_image(std::string const & archive_path, ++populate_for_image(std::vector<std::string> const & archive_paths, + profile_container & samples, inverted_profile const & ip, + string_filter const & symbol_filter, bool * has_debug_info); + +Index: oprofile/libpp/populate_for_spu.cpp +=================================================================== +--- oprofile.orig/libpp/populate_for_spu.cpp ++++ oprofile/libpp/populate_for_spu.cpp +@@ -19,6 +19,7 @@ + #include "populate_for_spu.h" + + #include "image_errors.h" ++#include "file_manip.h" + + #include <iostream> + +@@ -46,7 +47,7 @@ static int spu_profile = unknown_profile + void + populate_spu_profile_from_files(list<profile_sample_files> const & files, + string const app_image, +- string const & archive_path, ++ std::vector<std::string> const & archive_paths, + profile_container & samples, + inverted_profile const & ip, + string_filter const & symbol_filter, +@@ -65,14 +66,14 @@ populate_spu_profile_from_files(list<pro + profile.add_sample_file(it->sample_filename); + opd_header header = profile.get_header(); + if (header.embedded_offset) { +- abfd = new op_bfd(archive_path, ++ abfd = new op_bfd(archive_paths, + header.embedded_offset, + ip.image, + symbol_filter, + ok); + fname_to_check = ip.image; + } else { +- abfd = new op_bfd(archive_path, ++ abfd = new op_bfd(archive_paths, + ip.image, + symbol_filter, + ok); +@@ -87,7 +88,7 @@ populate_spu_profile_from_files(list<pro + + samples.add(profile, *abfd, app_image, ip_grp_num); + if (ip.error == image_ok) +- check_mtime(archive_path + fname_to_check, ++ check_mtime(op_findfile(archive_paths, fname_to_check), + profile.get_header()); + + if (has_debug_info && !*has_debug_info) +@@ -98,7 +99,7 @@ populate_spu_profile_from_files(list<pro + } // anon namespace + + void +-populate_for_spu_image(string const & archive_path, ++populate_for_spu_image(std::vector<std::string> const & archive_paths, + profile_container & samples, + inverted_profile const & ip, + string_filter const & symbol_filter, +@@ -113,7 +114,7 @@ populate_for_spu_image(string const & ar + + for (; it != end; ++it) + populate_spu_profile_from_files(it->files, +- it->app_image, archive_path, samples, ip, ++ it->app_image, archive_paths, samples, ip, + symbol_filter, i, has_debug_info); + } + } +Index: oprofile/libpp/populate_for_spu.h +=================================================================== +--- oprofile.orig/libpp/populate_for_spu.h ++++ oprofile/libpp/populate_for_spu.h +@@ -13,6 +13,8 @@ + #ifndef POPULATE_FOR_SPU_H + #define POPULATE_FOR_SPU_H + ++#include <vector> ++ + class profile_container; + class inverted_profile; + class string_filter; +@@ -28,7 +30,7 @@ bool is_spu_profile(inverted_profile con + * This is a special-purpose function for CELL BE SPU profiling. + * See populate_spu_profile_from_files prologue for more details. + */ +-void populate_for_spu_image(std::string const & archive_path, ++void populate_for_spu_image(std::vector<std::string> const & archive_paths, + profile_container & samples, + inverted_profile const & ip, + string_filter const & symbol_filter, +Index: oprofile/libpp/profile_spec.cpp +=================================================================== +--- oprofile.orig/libpp/profile_spec.cpp ++++ oprofile/libpp/profile_spec.cpp +@@ -30,7 +30,7 @@ namespace { + // we should maintain the original to maintain the wordexp etc. + string const fixup_image_spec(string const & str, extra_images const & extra) + { +- string dummy_archive_path; ++ std::vector<std::string> const dummy_archive_path; + // FIXME: what todo if an error in find_image_path() ? + image_error error; + return find_image_path(dummy_archive_path, str, extra, error); +Index: oprofile/libpp/xml_utils.cpp +=================================================================== +--- oprofile.orig/libpp/xml_utils.cpp ++++ oprofile/libpp/xml_utils.cpp +@@ -111,10 +111,10 @@ string get_cpu_num(size_t pclass) + + xml_utils::xml_utils(format_output::xml_formatter * xo, + symbol_collection const & s, size_t nc, +- string_filter * sf, string const & ap) ++ string_filter * sf, std::vector<std::string> const & ap) + : + symbol_filter(sf), +- archive_path(ap), ++ archive_paths(ap), + has_subclasses(false), + bytes_index(0) + { +@@ -379,11 +379,11 @@ xml_utils::output_symbol_bytes(ostream & + string const & image_name = get_image_name(symb->image_name, true); + op_bfd * abfd = NULL; + if (symb->spu_offset) +- abfd = new op_bfd(archive_path, symb->spu_offset, ++ abfd = new op_bfd(archive_paths, symb->spu_offset, + get_image_name(symb->embedding_filename, true), + *symbol_filter, ok); + else +- abfd = new op_bfd(archive_path, image_name, *symbol_filter, ok); ++ abfd = new op_bfd(archive_paths, image_name, *symbol_filter, ok); + if (!ok) { + report_image_error(image_name, image_format_failure, false); + delete abfd; +Index: oprofile/libpp/xml_utils.h +=================================================================== +--- oprofile.orig/libpp/xml_utils.h ++++ oprofile/libpp/xml_utils.h +@@ -22,7 +22,7 @@ class xml_utils { + public: + xml_utils(format_output::xml_formatter * xo, + symbol_collection const & s, size_t nc, +- string_filter * sf, std::string const & ap); ++ string_filter * sf, std::vector<std::string> const & ap); + // these members are static because they are invoked before + // the xml_utils object has been created + static std::string get_timer_setup(size_t count); +@@ -51,7 +51,7 @@ public: + private: + string_filter * symbol_filter; + bool multiple_events; +- std::string archive_path; ++ std::vector<std::string> const & archive_paths; + bool has_subclasses; + size_t bytes_index; + static bool has_nonzero_masks; +Index: oprofile/libutil++/op_bfd.cpp +=================================================================== +--- oprofile.orig/libutil++/op_bfd.cpp ++++ oprofile/libutil++/op_bfd.cpp +@@ -27,6 +27,7 @@ + #include "string_filter.h" + #include "stream_util.h" + #include "cverb.h" ++#include "file_manip.h" + + using namespace std; + +@@ -87,11 +88,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym + } + + +-op_bfd::op_bfd(string const & archive, string const & fname, ++op_bfd::op_bfd(std::vector<std::string> const & archive, string const & fname, + string_filter const & symbol_filter, bool & ok) + : + filename(fname), +- archive_path(archive), ++ archive_paths(archive), + file_size(-1) + { + int fd; +@@ -102,7 +103,7 @@ op_bfd::op_bfd(string const & archive, s + symbols_found_t symbols; + asection const * sect; + +- string const image_path = archive_path + filename; ++ string const image_path = op_findfile(archive_paths, filename); + + cverb << vbfd << "op_bfd ctor for " << image_path << endl; + +@@ -321,8 +322,8 @@ bool op_bfd::has_debug_info() const + return debug_info.reset(true); + + // check to see if there is an .debug file +- string const global(archive_path + DEBUGDIR); +- string const image_path = archive_path + filename; ++ string const global(op_findfile(archive_paths, DEBUGDIR)); ++ string const image_path = op_findfile(archive_paths, filename); + string const dirname(image_path.substr(0, image_path.rfind('/'))); + + if (find_separate_debug_file(ibfd.abfd, dirname, global, debug_filename)) { +Index: oprofile/libutil++/op_bfd.h +=================================================================== +--- oprofile.orig/libutil++/op_bfd.h ++++ oprofile/libutil++/op_bfd.h +@@ -89,14 +89,14 @@ private: + class op_bfd { + public: + /** +- * @param archive_path oparchive prefix path ++ * @param archive_paths oparchive prefix paths + * @param filename the name of the image file + * @param symbol_filter filter to apply to symbols + * @param ok in-out parameter: on in, if not set, don't + * open the bfd (because it's not there or whatever). On out, + * it's set to false if the bfd couldn't be loaded. + */ +- op_bfd(std::string const & archive_path, ++ op_bfd(std::vector<std::string> const & archive_paths, + std::string const & filename, + string_filter const & symbol_filter, + bool & ok); +@@ -105,7 +105,7 @@ public: + * This constructor is used when processing an SPU profile + * where the SPU ELF is embedded within the PPE binary. + */ +- op_bfd(std::string const & archive_path, ++ op_bfd(std::vector<std::string> const & archive_paths, + uint64_t spu_offset, + std::string const & filename, + string_filter const & symbol_filter, +@@ -243,8 +243,8 @@ private: + /// filename we open (not including archive path) + std::string filename; + +- /// path to archive +- std::string archive_path; ++ /// paths to archive ++ std::vector<std::string> archive_paths; + + /// file size in bytes + off_t file_size; +Index: oprofile/libutil++/op_spu_bfd.cpp +=================================================================== +--- oprofile.orig/libutil++/op_spu_bfd.cpp ++++ oprofile/libutil++/op_spu_bfd.cpp +@@ -19,6 +19,7 @@ + #include "op_libiberty.h" + #include "string_filter.h" + #include "cverb.h" ++#include "file_manip.h" + + using namespace std; + +@@ -29,11 +30,11 @@ extern verbose vbfd; + * constructor in libutil++/op_bfd.cpp, with the additional processing + * needed to handle an embedded spu offset. + */ +-op_bfd::op_bfd(string const & archive, uint64_t spu_offset, ++op_bfd::op_bfd(std::vector<std::string> const & archive, uint64_t spu_offset, + string const & fname, + string_filter const & symbol_filter, bool & ok) + : +- archive_path(archive), ++ archive_paths(archive), + file_size(-1), + embedding_filename(fname) + { +@@ -48,7 +49,7 @@ op_bfd::op_bfd(string const & archive, u + symbols_found_t symbols; + asection const * sect; + +- string const image_path = archive_path + fname; ++ string const image_path = op_findfile(archive_paths, fname); + + cverb << vbfd << "op_bfd ctor for " << image_path << endl; + if (!ok) +Index: oprofile/pp/opannotate_options.cpp +=================================================================== +--- oprofile.orig/pp/opannotate_options.cpp ++++ oprofile/pp/opannotate_options.cpp +@@ -26,7 +26,7 @@ using namespace std; + profile_classes classes; + + namespace options { +- string archive_path; ++ vector<string> archive_paths; + demangle_type demangle = dmt_normal; + string output_dir; + vector<string> search_dirs; +@@ -87,6 +87,7 @@ popt::option options_array[] = { + void handle_options(options::spec const & spec) + { + using namespace options; ++ string archive_path; + + if (spec.first.size()) { + cerr << "differential profiles not allowed" << endl; +@@ -125,7 +126,9 @@ void handle_options(options::spec const + list<string> sample_files = pspec.generate_file_list(exclude_dependent, true); + + archive_path = pspec.get_archive_path(); ++ archive_paths.push_back(archive_path); + cverb << vsfile << "Archive: " << archive_path << endl; ++ archive_paths.push_back(options::root_path); + + cverb << vsfile << "Matched sample files: " << sample_files.size() + << endl; +Index: oprofile/pp/opannotate_options.h +=================================================================== +--- oprofile.orig/pp/opannotate_options.h ++++ oprofile/pp/opannotate_options.h +@@ -21,7 +21,7 @@ + class profile_classes; + + namespace options { +- extern std::string archive_path; ++ extern std::vector<std::string> archive_paths; + extern demangle_type demangle; + extern bool source; + extern bool assembly; +Index: oprofile/pp/oparchive.cpp +=================================================================== +--- oprofile.orig/pp/oparchive.cpp ++++ oprofile/pp/oparchive.cpp +@@ -59,7 +59,7 @@ int oparchive(options::spec const & spec + + /* copy over each of the executables and the debuginfo files */ + list<inverted_profile> iprofiles +- = invert_profiles(options::archive_path, classes, ++ = invert_profiles(options::archive_paths, classes, + options::extra_found_images); + + report_image_errors(iprofiles); +@@ -86,7 +86,7 @@ int oparchive(options::spec const & spec + } + + /* Copy actual executable files */ +- copy_one_file(it->error, options::archive_path + exe_name, ++ copy_one_file(it->error, op_findfile(options::archive_paths, exe_name), + exe_archive_file); + + /* If there are any debuginfo files, copy them over. +@@ -95,11 +95,10 @@ int oparchive(options::spec const & spec + * to avoid overwriting files with the same name. The + * /usr/lib/debug search path is not going to work. + */ +- bfd * ibfd = open_bfd(options::archive_path + exe_name); ++ bfd * ibfd = open_bfd(op_findfile(options::archive_paths, exe_name)); + if (ibfd) { +- string global(options::archive_path + DEBUGDIR); +- string dirname = op_dirname(options::archive_path + +- exe_name); ++ string global(op_findfile(options::archive_paths, DEBUGDIR)); ++ string dirname = op_dirname(op_findfile(options::archive_paths, exe_name)); + string debug_filename; + if (find_separate_debug_file(ibfd, dirname, global, + debug_filename)) { +@@ -130,8 +129,8 @@ int oparchive(options::spec const & spec + string sample_name = *sit; + string sample_base = sample_name; + /* Get rid of the the archive_path from the name */ +- sample_base.replace(sample_base.find(options::archive_path), +- options::archive_path.size(), ""); ++ sample_base.replace(sample_base.find(options::archive_paths[0]), ++ options::archive_paths[0].size(), ""); + string sample_archive_file = options::outdirectory + sample_base; + + cverb << vdebug << (sample_name) << endl; +@@ -149,12 +148,12 @@ int oparchive(options::spec const & spec + + /* copy over the /var/lib/oprofile/abi file if it exists */ + string abi_name = "/var/lib/oprofile/abi"; +- copy_one_file(image_ok, options::archive_path + abi_name, ++ copy_one_file(image_ok, op_findfile(options::archive_paths, abi_name), + options::outdirectory + abi_name); + + /* copy over the /var/lib/oprofile/oprofiled.log file */ + string log_name = "/var/lib/oprofile/oprofiled.log"; +- copy_one_file(image_ok, options::archive_path + log_name, ++ copy_one_file(image_ok, op_findfile(options::archive_paths, log_name), + options::outdirectory + log_name); + + return 0; +Index: oprofile/pp/oparchive_options.cpp +=================================================================== +--- oprofile.orig/pp/oparchive_options.cpp ++++ oprofile/pp/oparchive_options.cpp +@@ -31,7 +31,7 @@ profile_classes classes; + list<string> sample_files; + + namespace options { +- string archive_path; ++ std::vector<std::string> archive_paths; + demangle_type demangle = dmt_normal; + bool exclude_dependent; + merge_option merge_by; +@@ -75,6 +75,7 @@ void check_options() + void handle_options(options::spec const & spec) + { + using namespace options; ++ std::string archive_path; + + if (spec.first.size()) { + cerr << "differential profiles not allowed" << endl; +@@ -96,7 +97,9 @@ void handle_options(options::spec const + sample_files = pspec.generate_file_list(exclude_dependent, false); + + archive_path = pspec.get_archive_path(); ++ archive_paths.push_back(archive_path); + cverb << vsfile << "Archive: " << archive_path << endl; ++ archive_paths.push_back(options::root_path); + + cverb << vsfile << "Matched sample files: " << sample_files.size() + << endl; +Index: oprofile/pp/oparchive_options.h +=================================================================== +--- oprofile.orig/pp/oparchive_options.h ++++ oprofile/pp/oparchive_options.h +@@ -18,7 +18,7 @@ class profile_classes; + class merge_option; + + namespace options { +- extern std::string archive_path; ++ extern std::vector<std::string> archive_paths; + extern bool exclude_dependent; + extern merge_option merge_by; + extern std::string outdirectory; +Index: oprofile/pp/opgprof_options.cpp +=================================================================== +--- oprofile.orig/pp/opgprof_options.cpp ++++ oprofile/pp/opgprof_options.cpp +@@ -26,7 +26,7 @@ profile_classes classes; + inverted_profile image_profile; + + namespace options { +- string archive_path; ++ std::vector<std::string> archive_paths; + string gmon_filename = "gmon.out"; + + // Ugly, for build only +@@ -71,7 +71,7 @@ bool try_merge_profiles(profile_spec con + size_t nr_classes = classes.v.size(); + + list<inverted_profile> iprofiles +- = invert_profiles(options::archive_path, classes, ++ = invert_profiles(options::archive_paths, classes, + options::extra_found_images); + + if (nr_classes == 1 && iprofiles.size() == 1) { +@@ -104,6 +104,8 @@ bool try_merge_profiles(profile_spec con + + void handle_options(options::spec const & spec) + { ++ string archive_path; ++ + if (spec.first.size()) { + cerr << "differential profiles not allowed" << endl; + exit(EXIT_FAILURE); +@@ -112,8 +114,10 @@ void handle_options(options::spec const + profile_spec const pspec = + profile_spec::create(spec.common, options::extra_found_images); + +- options::archive_path = pspec.get_archive_path(); +- cverb << vsfile << "Archive: " << options::archive_path << endl; ++ archive_path = pspec.get_archive_path(); ++ options::archive_paths.push_back(archive_path); ++ cverb << vsfile << "Archive: " << archive_path << endl; ++ options::archive_paths.push_back(options::root_path); + + cverb << vsfile << "output filename: " << options::gmon_filename + << endl; +Index: oprofile/pp/opgprof_options.h +=================================================================== +--- oprofile.orig/pp/opgprof_options.h ++++ oprofile/pp/opgprof_options.h +@@ -17,7 +17,7 @@ + #include "common_option.h" + + namespace options { +- extern std::string archive_path; ++ extern std::vector<std::string> archive_paths; + extern std::string gmon_filename; + } + +Index: oprofile/pp/opreport_options.cpp +=================================================================== +--- oprofile.orig/pp/opreport_options.cpp ++++ oprofile/pp/opreport_options.cpp +@@ -32,8 +32,8 @@ profile_classes classes; + profile_classes classes2; + + namespace options { +- string archive_path; +- string archive_path2; ++ std::vector<std::string> archive_paths; ++ std::vector<std::string> archive_paths2; + demangle_type demangle = dmt_normal; + bool symbols; + bool callgraph; +@@ -314,16 +314,19 @@ void handle_options(options::spec const + symbol_filter = string_filter(include_symbols, exclude_symbols); + + if (!spec.first.size()) { +- archive_path = process_spec(classes, spec.common); ++ archive_paths.push_back(process_spec(classes, spec.common)); ++ archive_paths.push_back(options::root_path); + } else { + if (options::xml) { + cerr << "differential profiles are incompatible with --xml" << endl; + exit(EXIT_FAILURE); + } + cverb << vsfile << "profile spec 1:" << endl; +- archive_path = process_spec(classes, spec.first); ++ archive_paths.push_back(process_spec(classes, spec.first)); ++ archive_paths.push_back(options::root_path); + cverb << vsfile << "profile spec 2:" << endl; +- archive_path2 = process_spec(classes2, spec.second); ++ archive_paths2.push_back(process_spec(classes2, spec.second)); ++ archive_paths2.push_back(options::root_path); + + if (!classes.matches(classes2)) { + cerr << "profile classes are incompatible" << endl; +Index: oprofile/pp/opreport_options.h +=================================================================== +--- oprofile.orig/pp/opreport_options.h ++++ oprofile/pp/opreport_options.h +@@ -24,8 +24,8 @@ class profile_classes; + class merge_option; + + namespace options { +- extern std::string archive_path; +- extern std::string archive_path2; ++ extern std::vector<std::string> archive_paths; ++ extern std::vector<std::string> archive_paths2; + extern demangle_type demangle; + extern bool symbols; + extern bool callgraph; +Index: oprofile/libutil++/file_manip.cpp +=================================================================== +--- oprofile.orig/libutil++/file_manip.cpp ++++ oprofile/libutil++/file_manip.cpp +@@ -205,3 +205,14 @@ string op_basename(string const & path_n + + return erase_to_last_of(result, '/'); + } ++ ++string op_findfile(const vector<string> & paths, string const & file) ++{ ++ for (vector<string>::const_iterator it = paths.begin(); it!=paths.end(); ++it) ++ { ++ if (op_file_readable(*it + file)) ++ return *it + file; ++ } ++ return ""; ++} ++ +Index: oprofile/libutil++/file_manip.h +=================================================================== +--- oprofile.orig/libutil++/file_manip.h ++++ oprofile/libutil++/file_manip.h +@@ -12,6 +12,7 @@ + #ifndef FILE_MANIP_H + #define FILE_MANIP_H + ++#include <vector> + #include <string> + #include <list> + +@@ -86,4 +87,14 @@ std::string op_dirname(std::string const + */ + std::string op_basename(std::string const & path_name); + ++/** ++ * ++ * op_findfile - search a set of paths for file ++ * @param paths paths to search ++ * @param file filename to search for ++ * ++ * Returns the path to the first matching file or an empty string if not found. ++ */ ++std::string op_findfile(const std::vector<std::string> & paths, std::string const & file); ++ + #endif /* !FILE_MANIP_H */ +Index: oprofile/pp/common_option.cpp +=================================================================== +--- oprofile.orig/pp/common_option.cpp ++++ oprofile/pp/common_option.cpp +@@ -30,6 +30,7 @@ namespace options { + string session_dir = OP_SESSION_DIR_DEFAULT; + string command_options; + vector<string> image_path; ++ string root_path; + } + + namespace { +@@ -44,6 +45,8 @@ popt::option common_options_array[] = { + "specify session path to hold samples database and session data (" OP_SESSION_DIR_DEFAULT ")", "path"), + popt::option(options::image_path, "image-path", 'p', + "comma-separated path to search missing binaries", "path"), ++ popt::option(options::root_path, "root", 'R', ++ "path to filesystem to search for missing binaries", "path"), + }; + + +Index: oprofile/pp/common_option.h +=================================================================== +--- oprofile.orig/pp/common_option.h ++++ oprofile/pp/common_option.h +@@ -26,6 +26,7 @@ namespace options { + extern std::string threshold_opt; + extern std::string command_options; + extern std::vector<std::string> image_path; ++ extern std::string root_path; + + struct spec { + std::list<std::string> common; +Index: oprofile/pp/opreport.cpp +=================================================================== +--- oprofile.orig/pp/opreport.cpp ++++ oprofile/pp/opreport.cpp +@@ -403,7 +403,7 @@ void output_symbols(profile_container co + + if (options::xml) { + xml_support = new xml_utils(xml_out, symbols, nr_classes, +- &options::symbol_filter, options::archive_path); ++ &options::symbol_filter, options::archive_paths); + xml_out->output(cout); + } else { + text_out->output(cout, symbols); +@@ -479,7 +479,7 @@ void output_cg_symbols(callgraph_contain + + if (options::xml) { + xml_support = new xml_utils(xml_out, symbols, nr_classes, +- &options::symbol_filter, options::archive_path); ++ &options::symbol_filter, options::archive_paths); + xml_out->output(cout); + } else { + text_out->output(cout, symbols); +@@ -511,7 +511,7 @@ int opreport(options::spec const & spec) + } + + list<inverted_profile> iprofiles +- = invert_profiles(options::archive_path, classes, ++ = invert_profiles(options::archive_paths, classes, + options::extra_found_images); + + report_image_errors(iprofiles); +@@ -535,11 +535,11 @@ int opreport(options::spec const & spec) + list<inverted_profile>::iterator const end = iprofiles.end(); + + for (; it != end; ++it) +- populate_for_image(options::archive_path, pc1, ++ populate_for_image(options::archive_paths, pc1, + *it, options::symbol_filter, 0); + + list<inverted_profile> iprofiles2 +- = invert_profiles(options::archive_path2, classes2, ++ = invert_profiles(options::archive_paths2, classes2, + options::extra_found_images); + + report_image_errors(iprofiles2); +@@ -550,13 +550,13 @@ int opreport(options::spec const & spec) + list<inverted_profile>::iterator const end2 = iprofiles2.end(); + + for (; it2 != end2; ++it2) +- populate_for_image(options::archive_path2, pc2, ++ populate_for_image(options::archive_paths2, pc2, + *it2, options::symbol_filter, 0); + + output_diff_symbols(pc1, pc2, multiple_apps); + } else if (options::callgraph) { + callgraph_container cg_container; +- cg_container.populate(options::archive_path, iprofiles, ++ cg_container.populate(options::archive_paths, iprofiles, + options::extra_found_images, + options::debug_info, options::threshold, + options::merge_by.lib, options::symbol_filter); +@@ -569,7 +569,7 @@ int opreport(options::spec const & spec) + list<inverted_profile>::iterator const end = iprofiles.end(); + + for (; it != end; ++it) +- populate_for_image(options::archive_path, samples, ++ populate_for_image(options::archive_paths, samples, + *it, options::symbol_filter, 0); + + output_symbols(samples, multiple_apps); +Index: oprofile/pp/opannotate.cpp +=================================================================== +--- oprofile.orig/pp/opannotate.cpp ++++ oprofile/pp/opannotate.cpp +@@ -690,7 +690,7 @@ int opannotate(options::spec const & spe + list<string> images; + + list<inverted_profile> iprofiles +- = invert_profiles(options::archive_path, classes, ++ = invert_profiles(options::archive_paths, classes, + options::extra_found_images); + + report_image_errors(iprofiles); +@@ -701,7 +701,7 @@ int opannotate(options::spec const & spe + bool debug_info = false; + for (; it != end; ++it) { + bool tmp = false; +- populate_for_image(options::archive_path, *samples, *it, ++ populate_for_image(options::archive_paths, *samples, *it, + options::symbol_filter, &tmp); + images.push_back(it->image); + if (tmp) +Index: oprofile/pp/opgprof.cpp +=================================================================== +--- oprofile.orig/pp/opgprof.cpp ++++ oprofile/pp/opgprof.cpp +@@ -282,7 +282,7 @@ int opgprof(options::spec const & spec) + + bool ok = image_profile.error == image_ok; + // FIXME: symbol_filter would be allowed through option +- op_bfd abfd(options::archive_path, image_profile.image, ++ op_bfd abfd(options::archive_paths, image_profile.image, + string_filter(), ok); + if (!ok && image_profile.error == image_ok) + image_profile.error = image_format_failure; +Index: oprofile/doc/opannotate.1.in +=================================================================== +--- oprofile.orig/doc/opannotate.1.in ++++ oprofile/doc/opannotate.1.in +@@ -50,6 +50,10 @@ Comma-separated list of additional paths + This is needed to find modules in kernels 2.6 and upwards. + .br + .TP ++.BI "--root / -R [path]" ++A path to a filesystem to search for additional binaries. ++.br ++.TP + .BI "--include-file [files]" + Only include files in the given comma-separated list of glob patterns. + .br +Index: oprofile/doc/oparchive.1.in +=================================================================== +--- oprofile.orig/doc/oparchive.1.in ++++ oprofile/doc/oparchive.1.in +@@ -42,6 +42,10 @@ Comma-separated list of additional paths + This is needed to find modules in kernels 2.6 and upwards. + .br + .TP ++.BI "--root / -R [path]" ++A path to a filesystem to search for additional binaries. ++.br ++.TP + .BI "--output-directory / -o [directory]" + Output to the given directory. There is no default. This must be specified. + .br +Index: oprofile/doc/opgprof.1.in +=================================================================== +--- oprofile.orig/doc/opgprof.1.in ++++ oprofile/doc/opgprof.1.in +@@ -38,6 +38,10 @@ Comma-separated list of additional paths + This is needed to find modules in kernels 2.6 and upwards. + .br + .TP ++.BI "--root / -R [path]" ++A path to a filesystem to search for additional binaries. ++.br ++.TP + .BI "--threshold / -t [percentage]" + Only output data for symbols that have more than the given percentage + of total samples. +Index: oprofile/doc/opreport.1.in +=================================================================== +--- oprofile.orig/doc/opreport.1.in ++++ oprofile/doc/opreport.1.in +@@ -61,6 +61,10 @@ Comma-separated list of additional paths + This is needed to find modules in kernels 2.6 and upwards. + .br + .TP ++.BI "--root / -R [path]" ++A path to a filesystem to search for additional binaries. ++.br ++.TP + .BI "--include-symbols / -i [symbols]" + Only include symbols in the given comma-separated list. + .br diff --git a/packages/oprofile/oprofile/xml_callgraph_details.patch b/packages/oprofile/oprofile/xml_callgraph_details.patch new file mode 100644 index 0000000000..e5ab3d916e --- /dev/null +++ b/packages/oprofile/oprofile/xml_callgraph_details.patch @@ -0,0 +1,232 @@ +Work in Progress- This patch breaks output_symbol_bytes +--- + ChangeLog | 9 +++++++++ + libpp/callgraph_container.cpp | 10 ++++++++-- + libpp/callgraph_container.h | 14 ++++++++++---- + libpp/format_output.cpp | 30 +++++++++++++++++++++++++----- + libpp/format_output.h | 6 +++--- + pp/opreport.cpp | 5 +++-- + pp/opreport_options.cpp | 4 ++-- + 7 files changed, 60 insertions(+), 18 deletions(-) + +Index: oprofile1/pp/opreport.cpp +=================================================================== +--- oprofile1.orig/pp/opreport.cpp 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/pp/opreport.cpp 2007-05-24 20:07:14.000000000 +0100 +@@ -555,10 +555,11 @@ int opreport(options::spec const & spec) + + output_diff_symbols(pc1, pc2, multiple_apps); + } else if (options::callgraph) { +- callgraph_container cg_container; ++ callgraph_container cg_container(options::debug_info, ++ options::details); + cg_container.populate(options::archive_path, iprofiles, + options::extra_found_images, +- options::debug_info, options::threshold, ++ options::threshold, + options::merge_by.lib, options::symbol_filter); + + output_cg_symbols(cg_container, multiple_apps); +Index: oprofile1/ChangeLog +=================================================================== +--- oprofile1.orig/ChangeLog 2007-05-24 18:30:47.000000000 +0100 ++++ oprofile1/ChangeLog 2007-05-24 20:07:14.000000000 +0100 +@@ -1,5 +1,14 @@ + 2007-05-24 Richard Purdie <rpurdie@openedhand.com> + ++ * libpp/callgraph_container.cpp: ++ * libpp/callgraph_container.h: ++ * libpp/format_output.cpp: ++ * libpp/format_output.h: ++ * pp/opreport.cpp: ++ * pp/opreport_options.cpp: Add callgraph XML detail support ++ ++2007-05-24 Richard Purdie <rpurdie@openedhand.com> ++ + * events/arm/xscale1/events: + * events/arm/xscale2/events: Add extra Xscale PMU event definitions + +Index: oprofile1/libpp/callgraph_container.cpp +=================================================================== +--- oprofile1.orig/libpp/callgraph_container.cpp 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/libpp/callgraph_container.cpp 2007-05-24 20:07:14.000000000 +0100 +@@ -391,15 +391,21 @@ const symbol_collection & arc_recorder:: + return cg_syms; + } + ++callgraph_container::callgraph_container(bool debug_info, bool need_details) ++ : ++ pc(debug_info, need_details), ++ debug_info(debug_info) ++{ ++} ++ + + void callgraph_container::populate(string const & archive_path, + list<inverted_profile> const & iprofiles, +- extra_images const & extra, bool debug_info, double threshold, ++ extra_images const & extra, double threshold, + bool merge_lib, string_filter const & sym_filter) + { + // non callgraph samples container, we record sample at symbol level + // not at vma level. +- profile_container pc(debug_info, false); + + list<inverted_profile>::const_iterator it; + list<inverted_profile>::const_iterator const end = iprofiles.end(); +Index: oprofile1/libpp/callgraph_container.h +=================================================================== +--- oprofile1.orig/libpp/callgraph_container.h 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/libpp/callgraph_container.h 2007-05-24 20:07:14.000000000 +0100 +@@ -19,8 +19,8 @@ + #include "symbol.h" + #include "symbol_functors.h" + #include "string_filter.h" ++#include "profile_container.h" + +-class profile_container; + class inverted_profile; + class profile_t; + class extra_images; +@@ -103,6 +103,8 @@ private: + */ + class callgraph_container { + public: ++ callgraph_container(bool debug_info, bool need_details); ++ + /** + * Populate the container, must be called once only. + * @param archive_path oparchive prefix path +@@ -118,9 +120,8 @@ public: + */ + void populate(std::string const & archive_path, + std::list<inverted_profile> const & iprofiles, +- extra_images const & extra, bool debug_info, +- double threshold, bool merge_lib, +- string_filter const & sym_filter); ++ extra_images const & extra, double threshold, ++ bool merge_lib, string_filter const & sym_filter); + + /// return hint on how data must be displayed. + column_flags output_hint() const; +@@ -131,6 +132,9 @@ public: + // return all the cg symbols + const symbol_collection & get_symbols() const; + ++ // profile container callgraph is based on ++ profile_container pc; ++ + private: + /** + * Record caller/callee for one cg file +@@ -162,6 +166,8 @@ private: + profile_container const & pc, bool debug_info, + bool merge_lib); + ++ bool debug_info; ++ + /// record all main symbols + void add_symbols(profile_container const & pc); + +Index: oprofile1/pp/opreport_options.cpp +=================================================================== +--- oprofile1.orig/pp/opreport_options.cpp 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/pp/opreport_options.cpp 2007-05-24 20:07:14.000000000 +0100 +@@ -165,8 +165,8 @@ void check_options(bool diff) + + if (callgraph) { + symbols = true; +- if (details) { +- cerr << "--callgraph is incompatible with --details" << endl; ++ if (details && !xml) { ++ cerr << "--callgraph is incompatible with --details without --xml" << endl; + do_exit = true; + } + +Index: oprofile1/libpp/format_output.cpp +=================================================================== +--- oprofile1.orig/libpp/format_output.cpp 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/libpp/format_output.cpp 2007-05-24 20:07:14.000000000 +0100 +@@ -594,9 +594,9 @@ xml_formatter:: + xml_formatter(profile_container const * p, + symbol_collection & s) + : ++ need_details(false), + profile(p), +- symbols(s), +- need_details(false) ++ symbols(s) + { + if (profile) + counts.total = profile->samples_count(); +@@ -673,8 +673,8 @@ void xml_formatter::output_symbol_data(o + if (name.size() > 0 && name[0] != '?') { + output_attribute(out, datum, ff_vma, STARTING_ADDR); + +- if (need_details) +- xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second); ++ //if (need_details) ++ // xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second); + } + out << close_element(); + +@@ -843,7 +843,7 @@ output_attribute(ostream & out, field_da + xml_cg_formatter:: + xml_cg_formatter(callgraph_container const * cg, symbol_collection & s) + : +- xml_formatter(0, s), ++ xml_formatter(&cg->pc, s), + callgraph(cg) + { + counts.total = callgraph->samples_count(); +@@ -946,6 +946,26 @@ output_symbol(ostream & out, + + out << init_attr(ID_REF, indx); + ++ if (need_details) { ++ ostringstream details; ++ symbol_details_t & sd = symbol_details[indx]; ++ size_t const detail_lo = sd.index; ++ ++ string detail_str = output_symbol_details(symb, sd.index, lo, hi); ++ ++ if (detail_str.size() > 0) { ++ if (sd.id < 0) ++ sd.id = indx; ++ details << detail_str; ++ } ++ ++ if (sd.index > detail_lo) { ++ sd.details = sd.details + details.str(); ++ out << init_attr(DETAIL_LO, detail_lo); ++ out << init_attr(DETAIL_HI, sd.index-1); ++ } ++ } ++ + out << close_element(NONE, true); + + out << open_element(CALLERS); +Index: oprofile1/libpp/format_output.h +=================================================================== +--- oprofile1.orig/libpp/format_output.h 2007-05-24 15:32:20.000000000 +0100 ++++ oprofile1/libpp/format_output.h 2007-05-24 20:07:14.000000000 +0100 +@@ -249,6 +249,9 @@ public: + // output SymbolData XML elements + void output_symbol_data(std::ostream & out); + ++ /// true if we need to show details for each symbols ++ bool need_details; ++ + private: + /// container we work from + profile_container const * profile; +@@ -256,9 +259,6 @@ private: + // ordered collection of symbols associated with this profile + symbol_collection & symbols; + +- /// true if we need to show details for each symbols +- bool need_details; +- + // count of DetailData items output so far + size_t detail_count; + diff --git a/packages/oprofile/oprofile_0.9.3.bb b/packages/oprofile/oprofile_0.9.3.bb index 977907e305..c4194ab2e1 100644 --- a/packages/oprofile/oprofile_0.9.3.bb +++ b/packages/oprofile/oprofile_0.9.3.bb @@ -1,15 +1,18 @@ +SECTION = "devel" DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ of profiling all running code at low overhead." -SECTION = "devel" LICENSE = "GPL" DEPENDS = "popt binutils" -PR = "r1" +RDEPENDS = "binutils-symlinks" +PR = "r4" SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \ - file://acinclude.m4 \ - file://opcontrol-busybox-compat.patch;patch=1 \ - " - + file://armv6_fix.patch;patch=1 \ + file://oparchive_fix.patch;patch=1 \ + file://root_option.patch;patch=1 \ + file://opstart.patch;patch=1 \ + file://fix-arith.patch;patch=1;pnum=0 \ + file://acinclude.m4" S = "${WORKDIR}/oprofile-${PV}" inherit autotools @@ -18,12 +21,11 @@ inherit autotools # Should add the oprofile kernel modules, for those with 2.4 # kernels, as a seperate .oe file. EXTRA_OECONF = "--with-kernel-support \ - --without-x \ - --disable-werror " + --without-x" do_configure () { - cp ${WORKDIR}/acinclude.m4 ${S}/ - autotools_do_configure + cp ${WORKDIR}/acinclude.m4 ${S}/ + autotools_do_configure } # Available config options # --enable-abi enable abi portability code (default is disabled) diff --git a/packages/oprofile/oprofile_cvs.bb b/packages/oprofile/oprofile_cvs.bb index 2eec2a7836..2096a27b40 100644 --- a/packages/oprofile/oprofile_cvs.bb +++ b/packages/oprofile/oprofile_cvs.bb @@ -1,14 +1,14 @@ -PV = "0.9.2+cvs${SRCDATE}" -PR = "r1" +PV = "0.9.3+cvs${SRCDATE}" +PR = "r0" SECTION = "devel" DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ of profiling all running code at low overhead." LICENSE = "GPL" DEPENDS = "popt binutils" - -DEFAULT_PREFERENCE = "-1" +RDEPENDS = "binutils-symlinks" SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \ + file://opstart.patch;patch=1 \ file://acinclude.m4" S = "${WORKDIR}/oprofile" diff --git a/packages/oprofile/oprofileui-svn.inc b/packages/oprofile/oprofileui-svn.inc new file mode 100644 index 0000000000..6d111d1d59 --- /dev/null +++ b/packages/oprofile/oprofileui-svn.inc @@ -0,0 +1,8 @@ +require oprofileui.inc + +PV = "0.0+svnr${SRCREV}" +PR = "r1" + +S = "${WORKDIR}/trunk" + +SRC_URI = "svn://svn.o-hand.com/repos/oprofileui;module=trunk;proto=http" diff --git a/packages/oprofile/oprofileui.inc b/packages/oprofile/oprofileui.inc new file mode 100644 index 0000000000..93f4631d14 --- /dev/null +++ b/packages/oprofile/oprofileui.inc @@ -0,0 +1,16 @@ +DESCRIPTION = "User interface for the OProfile tool" +SECTION = "x11" +LICENSE = "GPLv2" +DEPENDS = "glib-2.0 gtk+ libglade gnome-vfs libxml2 avahi gconf" + +inherit autotools pkgconfig gtk-icon-cache + +PACKAGES =+ "oprofileui-server oprofileui-viewer" + +EXTRA_OECONF = "--with-avahi" + +FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/" +RDEPENDS_oprofile-viewer = "oprofile" + +FILES_oprofileui-server = "${bindir}/oprofile-server" +RDEPENDS_oprofile-server = "oprofile" diff --git a/packages/oprofile/oprofileui_svn.bb b/packages/oprofile/oprofileui_svn.bb new file mode 100644 index 0000000000..39e10b4fd2 --- /dev/null +++ b/packages/oprofile/oprofileui_svn.bb @@ -0,0 +1,2 @@ +require oprofileui-svn.inc + diff --git a/packages/pciutils/pciutils-2.2.4/configure.patch b/packages/pciutils/pciutils-2.2.4/configure.patch index 78d113c498..cfb5ef71d5 100644 --- a/packages/pciutils/pciutils-2.2.4/configure.patch +++ b/packages/pciutils/pciutils-2.2.4/configure.patch @@ -1,13 +1,8 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - Index: pciutils-2.2.4/lib/configure =================================================================== --- pciutils-2.2.4.orig/lib/configure 2006-09-09 13:06:10.000000000 +0200 -+++ pciutils-2.2.4/lib/configure 2006-10-31 11:52:13.000000000 +0100 -@@ -12,15 +12,15 @@ ++++ pciutils-2.2.4/lib/configure 2008-06-17 10:15:07.000000000 +0200 +@@ -12,15 +12,15 @@ echo_n() { echo_n "Configuring libpci for your system..." idsdir=${1:-/usr/share} version=${2:-0.0} @@ -26,10 +21,15 @@ Index: pciutils-2.2.4/lib/configure fi if [ "$sys" = "GNU/kFreeBSD" ] then -@@ -34,6 +34,11 @@ +@@ -34,6 +34,16 @@ rel=${4:-$rel} echo " $host $rel" zlib=$5 ++if [ "$host" = "linux--gnuspe" ] ++then ++ sys=linux ++fi ++ +if [ "$host" = "linux--gnueabi" ] +then + sys=linux diff --git a/packages/pciutils/pciutils_2.2.4.bb b/packages/pciutils/pciutils_2.2.4.bb index 0cd335eb32..1f863b6057 100644 --- a/packages/pciutils/pciutils_2.2.4.bb +++ b/packages/pciutils/pciutils_2.2.4.bb @@ -13,7 +13,7 @@ SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.b PARALLEL_MAKE = "" -PR="r1" +PR="r2" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) diff --git a/packages/stage-manager/files/stage-manager-ipkg b/packages/stage-manager/files/stage-manager-ipkg index 2e626d8f50..2559fdbcd8 100755 --- a/packages/stage-manager/files/stage-manager-ipkg +++ b/packages/stage-manager/files/stage-manager-ipkg @@ -878,7 +878,7 @@ diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile" if [ -n "$new_conffiles" ]; then new_conffiles='Conffiles: '`echo $new_conffiles | ipkg_protect_slashes` fi - local sed_safe_root=`echo $dest | sed -e "s/^${IPKG_OFFLINE_ROOT}//" | ipkg_protect_slashes` + local sed_safe_root=`echo $dest | sed -e "s#^${IPKG_OFFLINE_ROOT}##" | ipkg_protect_slashes` sed -e "s/\(Package:.*\)/\1\\ Status: install ok installed\\ Root: ${sed_safe_root}\\ diff --git a/packages/stage-manager/stagemanager-native_0.0.1.bb b/packages/stage-manager/stagemanager-native_0.0.1.bb index 2a2712f030..5708045e73 100644 --- a/packages/stage-manager/stagemanager-native_0.0.1.bb +++ b/packages/stage-manager/stagemanager-native_0.0.1.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Helper script for packaged-staging.bbclass" -PR = "r10" +PR = "r11" SRC_URI = "file://stage-manager \ file://stage-manager-ipkg \ diff --git a/packages/syslog-ng/syslog-ng_2.0.5.bb b/packages/syslog-ng/syslog-ng_2.0.5.bb index 217af346de..80f0fc59c6 100644 --- a/packages/syslog-ng/syslog-ng_2.0.5.bb +++ b/packages/syslog-ng/syslog-ng_2.0.5.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Alternative system logger daemon" -DEPENDS = "libol flex eventlog" -PR = "r1" +DEPENDS = "libol flex eventlog glib-2.0" +PR = "r2" SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/${P}.tar.gz \ file://syslog-ng.conf \ diff --git a/packages/u-boot/u-boot-git/beagleboard/base.patch b/packages/u-boot/u-boot-git/beagleboard/base.patch index a5f118275b..1d3a9e5154 100644 --- a/packages/u-boot/u-boot-git/beagleboard/base.patch +++ b/packages/u-boot/u-boot-git/beagleboard/base.patch @@ -1,5 +1,5 @@ diff --git a/Makefile b/Makefile -index cc988e1..16701c5 100644 +index 8bfc891..e9bf61a 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ ifeq ($(ARCH),ppc) @@ -20,7 +20,7 @@ index cc988e1..16701c5 100644 # The "tools" are needed early, so put this first # Don't include stuff already done in $(LIBS) -@@ -2562,6 +2562,12 @@ SMN42_config : unconfig +@@ -2565,6 +2565,12 @@ SMN42_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292 ######################################################################### @@ -88,10 +88,10 @@ index 0000000..7065345 +######################################################################### diff --git a/board/omap3530beagle/clock.c b/board/omap3530beagle/clock.c new file mode 100644 -index 0000000..964525b +index 0000000..1f4b4f3 --- /dev/null +++ b/board/omap3530beagle/clock.c -@@ -0,0 +1,316 @@ +@@ -0,0 +1,314 @@ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> @@ -121,14 +121,12 @@ index 0000000..964525b + */ + +#include <common.h> -+#include <asm/arch/cpu.h> +#include <asm/io.h> +#include <asm/arch/bits.h> +#include <asm/arch/clocks.h> +#include <asm/arch/clocks_omap3.h> +#include <asm/arch/mem.h> +#include <asm/arch/sys_proto.h> -+#include <asm/arch/sys_info.h> +#include <environment.h> +#include <command.h> + @@ -433,10 +431,10 @@ index 0000000..9639c43 + diff --git a/board/omap3530beagle/lowlevel_init.S b/board/omap3530beagle/lowlevel_init.S new file mode 100644 -index 0000000..7ec4d05 +index 0000000..1f9a0e9 --- /dev/null +++ b/board/omap3530beagle/lowlevel_init.S -@@ -0,0 +1,361 @@ +@@ -0,0 +1,360 @@ +/* + * Board specific setup info + * @@ -468,7 +466,6 @@ index 0000000..7ec4d05 + +#include <config.h> +#include <version.h> -+#include <asm/arch/cpu.h> +#include <asm/arch/mem.h> +#include <asm/arch/clocks_omap3.h> + @@ -800,10 +797,10 @@ index 0000000..7ec4d05 + diff --git a/board/omap3530beagle/mem.c b/board/omap3530beagle/mem.c new file mode 100644 -index 0000000..bee96c3 +index 0000000..fb803be --- /dev/null +++ b/board/omap3530beagle/mem.c -@@ -0,0 +1,251 @@ +@@ -0,0 +1,250 @@ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> @@ -829,7 +826,6 @@ index 0000000..bee96c3 + */ + +#include <common.h> -+#include <asm/arch/cpu.h> +#include <asm/io.h> +#include <asm/arch/bits.h> +#include <asm/arch/mem.h> @@ -1057,10 +1053,10 @@ index 0000000..bee96c3 +} diff --git a/board/omap3530beagle/nand.c b/board/omap3530beagle/nand.c new file mode 100644 -index 0000000..4a8b6e4 +index 0000000..2f94684 --- /dev/null +++ b/board/omap3530beagle/nand.c -@@ -0,0 +1,409 @@ +@@ -0,0 +1,408 @@ +/* + * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com> + * Rohit Choraria <rohitkc@ti.com> @@ -1086,7 +1082,6 @@ index 0000000..4a8b6e4 + +#include <common.h> +#include <asm/io.h> -+#include <asm/arch/cpu.h> +#include <asm/arch/mem.h> +#include <linux/mtd/nand_ecc.h> + @@ -1472,10 +1467,10 @@ index 0000000..4a8b6e4 +#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */ diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c new file mode 100644 -index 0000000..1daf42c +index 0000000..7d9a566 --- /dev/null +++ b/board/omap3530beagle/omap3530beagle.c -@@ -0,0 +1,781 @@ +@@ -0,0 +1,388 @@ +/* + * (C) Copyright 2004-2008 + * Texas Instruments, <www.ti.com> @@ -1508,12 +1503,10 @@ index 0000000..1daf42c + * MA 02111-1307 USA + */ +#include <common.h> -+#include <asm/arch/cpu.h> +#include <asm/io.h> +#include <asm/arch/bits.h> +#include <asm/arch/mux.h> +#include <asm/arch/sys_proto.h> -+#include <asm/arch/sys_info.h> +#include <asm/arch/mem.h> +#include <i2c.h> +#include <asm/mach-types.h> @@ -1523,54 +1516,47 @@ index 0000000..1daf42c +extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE]; +#endif + -+/* -+ * Dummy functions to handle errors for EABI incompatibility -+ */ -+void raise(void) -+{ -+} -+ -+void abort(void) -+{ -+} ++#define NOT_EARLY 0 + ++/* Permission values for registers -Full fledged permissions to all */ ++#define UNLOCK_1 0xFFFFFFFF ++#define UNLOCK_2 0x00000000 ++#define UNLOCK_3 0x0000FFFF + -+/******************************************************* ++/****************************************************************************** + * Routine: delay + * Description: spinning delay to use before udelay works -+ ******************************************************/ ++ *****************************************************************************/ +static inline void delay(unsigned long loops) +{ + __asm__ volatile ("1:\n" "subs %0, %1, #1\n" + "bne 1b":"=r" (loops):"0"(loops)); +} + -+/***************************************** ++/****************************************************************************** + * Routine: board_init + * Description: Early hardware init. -+ *****************************************/ ++ *****************************************************************************/ +int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR; + -+ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ -+ gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; /* board id for Linux */ -+ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); /* boot param addr */ ++ gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ ++ /* board id for Linux */ ++ gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE; ++ /* boot param addr */ ++ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); + + return 0; +} + -+/***************************************** ++/****************************************************************************** + * Routine: secure_unlock -+ * Description: Setup security registers for access -+ * (GP Device only) -+ *****************************************/ ++ * Description: Setup security registers for access ++ * (GP Device only) ++ *****************************************************************************/ +void secure_unlock_mem(void) +{ -+ /* Permission values for registers -Full fledged permissions to all */ -+#define UNLOCK_1 0xFFFFFFFF -+#define UNLOCK_2 0x00000000 -+#define UNLOCK_3 0x0000FFFF + /* Protection Module Register Target APE (PM_RT) */ + __raw_writel(UNLOCK_1, RT_REQ_INFO_PERMISSION_1); + __raw_writel(UNLOCK_1, RT_READ_PERMISSION_0); @@ -1594,12 +1580,12 @@ index 0000000..1daf42c + __raw_writel(UNLOCK_1, SMS_RG_ATT0); /* SDRC region 0 public */ +} + -+/********************************************************** ++/****************************************************************************** + * Routine: secureworld_exit() + * Description: If chip is EMU and boot type is external + * configure secure registers and exit secure world -+ * general use. -+ ***********************************************************/ ++ * general use. ++ *****************************************************************************/ +void secureworld_exit() +{ + unsigned long i; @@ -1624,11 +1610,11 @@ index 0000000..1daf42c + __asm__ __volatile__("mcr p15, 0, %0, c1, c1, 0":"=r"(i)); +} + -+/********************************************************** ++/****************************************************************************** + * Routine: setup_auxcr() + * Description: Write to AuxCR desired value using SMI. -+ * general use. -+ ***********************************************************/ ++ * general use. ++ *****************************************************************************/ +void setup_auxcr() +{ + unsigned long i; @@ -1649,11 +1635,11 @@ index 0000000..1daf42c + __asm__ __volatile__("mov r12, %0":"=r"(j)); +} + -+/********************************************************** ++/****************************************************************************** + * Routine: try_unlock_sram() + * Description: If chip is GP/EMU(special) type, unlock the SRAM for -+ * general use. -+ ***********************************************************/ ++ * general use. ++ *****************************************************************************/ +void try_unlock_memory() +{ + int mode; @@ -1662,11 +1648,11 @@ index 0000000..1daf42c + /* if GP device unlock device SRAM for general use */ + /* secure code breaks for Secure/Emulation device - HS/E/T */ + mode = get_device_type(); -+ if (mode == GP_DEVICE) { ++ if (mode == GP_DEVICE) + secure_unlock_mem(); -+ } -+ /* If device is EMU and boot is XIP external booting -+ * Unlock firewalls and disable L2 and put chip ++ ++ /* If device is EMU and boot is XIP external booting ++ * Unlock firewalls and disable L2 and put chip + * out of secure world + */ + /* Assuming memories are unlocked by the demon who put us in SDRAM */ @@ -1679,23 +1665,21 @@ index 0000000..1daf42c + return; +} + -+/********************************************************** ++/****************************************************************************** + * Routine: s_init + * Description: Does early system init of muxing and clocks. -+ * - Called path is with SRAM stack. -+ **********************************************************/ ++ * - Called path is with SRAM stack. ++ *****************************************************************************/ +void s_init(void) +{ + int in_sdram = running_in_sdram(); + -+#ifdef CONFIG_3430VIRTIO -+ in_sdram = 0; /* allow setup from memory for Virtio */ -+#endif + watchdog_init(); + + try_unlock_memory(); + -+ /* Right now flushing at low MPU speed. Need to move after clock init */ ++ /* Right now flushing at low MPU speed. ++ Need to move after clock init */ + v7_flush_dcache_all(get_device_type()); +#ifndef CONFIG_ICACHE_OFF + icache_enable(); @@ -1723,12 +1707,14 @@ index 0000000..1daf42c + if (!in_sdram) + sdrc_init(); +} -+/******************************************************* ++ ++/****************************************************************************** + * Routine: misc_init_r + * Description: Init ethernet (done here so udelay works) -+ ********************************************************/ ++ *****************************************************************************/ +int misc_init_r(void) +{ ++ + unsigned char byte; + +#ifdef CONFIG_DRIVER_OMAP34XX_I2C @@ -1757,10 +1743,11 @@ index 0000000..1daf42c + return (0); +} + -+/****************************************************** ++ ++/****************************************************************************** + * Routine: wait_for_command_complete + * Description: Wait for posting to finish on watchdog -+ ******************************************************/ ++ *****************************************************************************/ +void wait_for_command_complete(unsigned int wd_base) +{ + int pending = 1; @@ -1769,15 +1756,15 @@ index 0000000..1daf42c + } while (pending); +} + -+/**************************************** ++/****************************************************************************** + * Routine: watchdog_init + * Description: Shut down watch dogs -+ *****************************************/ ++ *****************************************************************************/ +void watchdog_init(void) +{ -+ /* There are 3 watch dogs WD1=Secure, WD2=MPU, WD3=IVA. WD1 is ++ /* There are 3 watch dogs WD1=Secure, WD2=MPU, WD3=IVA. WD1 is + * either taken care of by ROM (HS/EMU) or not accessible (GP). -+ * We need to take care of WD2-MPU or take a PRCM reset. WD3 ++ * We need to take care of WD2-MPU or take a PRCM reset. WD3 + * should not be running and does not generate a PRCM reset. + */ + @@ -1790,68 +1777,28 @@ index 0000000..1daf42c + __raw_writel(WD_UNLOCK2, WD2_BASE + WSPR); +} + -+/******************************************************************* -+ * Routine:ether_init -+ * Description: take the Ethernet controller out of reset and wait -+ * for the EEPROM load to complete. -+ ******************************************************************/ -+void ether_init(void) -+{ -+#ifdef CONFIG_DRIVER_LAN91C96 -+ int cnt = 20; -+ -+ __raw_writew(0x0, LAN_RESET_REGISTER); -+ do { -+ __raw_writew(0x1, LAN_RESET_REGISTER); -+ udelay(100); -+ if (cnt == 0) -+ goto h4reset_err_out; -+ --cnt; -+ } while (__raw_readw(LAN_RESET_REGISTER) != 0x1); -+ -+ cnt = 20; -+ -+ do { -+ __raw_writew(0x0, LAN_RESET_REGISTER); -+ udelay(100); -+ if (cnt == 0) -+ goto h4reset_err_out; -+ --cnt; -+ } while (__raw_readw(LAN_RESET_REGISTER) != 0x0000); -+ udelay(1000); -+ -+ *((volatile unsigned char *) ETH_CONTROL_REG) &= ~0x01; -+ udelay(1000); -+ -+ h4reset_err_out: -+ return; -+#endif -+} -+ -+/********************************************** ++/****************************************************************************** + * Routine: dram_init + * Description: sets uboots idea of sdram size -+ **********************************************/ ++ *****************************************************************************/ +int dram_init(void) +{ -+#define NOT_EARLY 0 + DECLARE_GLOBAL_DATA_PTR; + unsigned int size0 = 0, size1 = 0; + u32 mtype, btype; + + btype = get_board_type(); + mtype = get_mem_type(); -+#ifndef CONFIG_3430ZEBU -+ /* fixme... dont know why this func is crashing in ZeBu */ ++ + display_board_info(btype); -+#endif -+ /* If a second bank of DDR is attached to CS1 this is ++ ++ /* If a second bank of DDR is attached to CS1 this is + * where it can be started. Early init code will init + * memory on CS0. + */ -+ if ((mtype == DDR_COMBO) || (mtype == DDR_STACKED)) { ++ if ((mtype == DDR_COMBO) || (mtype == DDR_STACKED)) + do_sdrc_init(SDRC_CS1_OSET, NOT_EARLY); -+ } ++ + size0 = get_sdr_cs_size(SDRC_CS0_OSET); + size1 = get_sdr_cs_size(SDRC_CS1_OSET); + @@ -1863,389 +1810,30 @@ index 0000000..1daf42c + return 0; +} + -+#define MUX_VAL(OFFSET,VALUE)\ -+ __raw_writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET)); -+ -+#define CP(x) (CONTROL_PADCONF_##x) -+/* -+ * IEN - Input Enable -+ * IDIS - Input Disable -+ * PTD - Pull type Down -+ * PTU - Pull type Up -+ * DIS - Pull type selection is inactive -+ * EN - Pull type selection is active -+ * M0 - Mode 0 -+ * The commented string gives the final mux configuration for that pin -+ */ -+#define MUX_DEFAULT_ES2()\ -+ /*SDRC*/\ -+ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\ -+ MUX_VAL(CP(SDRC_D1), (IEN | PTD | DIS | M0)) /*SDRC_D1*/\ -+ MUX_VAL(CP(SDRC_D2), (IEN | PTD | DIS | M0)) /*SDRC_D2*/\ -+ MUX_VAL(CP(SDRC_D3), (IEN | PTD | DIS | M0)) /*SDRC_D3*/\ -+ MUX_VAL(CP(SDRC_D4), (IEN | PTD | DIS | M0)) /*SDRC_D4*/\ -+ MUX_VAL(CP(SDRC_D5), (IEN | PTD | DIS | M0)) /*SDRC_D5*/\ -+ MUX_VAL(CP(SDRC_D6), (IEN | PTD | DIS | M0)) /*SDRC_D6*/\ -+ MUX_VAL(CP(SDRC_D7), (IEN | PTD | DIS | M0)) /*SDRC_D7*/\ -+ MUX_VAL(CP(SDRC_D8), (IEN | PTD | DIS | M0)) /*SDRC_D8*/\ -+ MUX_VAL(CP(SDRC_D9), (IEN | PTD | DIS | M0)) /*SDRC_D9*/\ -+ MUX_VAL(CP(SDRC_D10), (IEN | PTD | DIS | M0)) /*SDRC_D10*/\ -+ MUX_VAL(CP(SDRC_D11), (IEN | PTD | DIS | M0)) /*SDRC_D11*/\ -+ MUX_VAL(CP(SDRC_D12), (IEN | PTD | DIS | M0)) /*SDRC_D12*/\ -+ MUX_VAL(CP(SDRC_D13), (IEN | PTD | DIS | M0)) /*SDRC_D13*/\ -+ MUX_VAL(CP(SDRC_D14), (IEN | PTD | DIS | M0)) /*SDRC_D14*/\ -+ MUX_VAL(CP(SDRC_D15), (IEN | PTD | DIS | M0)) /*SDRC_D15*/\ -+ MUX_VAL(CP(SDRC_D16), (IEN | PTD | DIS | M0)) /*SDRC_D16*/\ -+ MUX_VAL(CP(SDRC_D17), (IEN | PTD | DIS | M0)) /*SDRC_D17*/\ -+ MUX_VAL(CP(SDRC_D18), (IEN | PTD | DIS | M0)) /*SDRC_D18*/\ -+ MUX_VAL(CP(SDRC_D19), (IEN | PTD | DIS | M0)) /*SDRC_D19*/\ -+ MUX_VAL(CP(SDRC_D20), (IEN | PTD | DIS | M0)) /*SDRC_D20*/\ -+ MUX_VAL(CP(SDRC_D21), (IEN | PTD | DIS | M0)) /*SDRC_D21*/\ -+ MUX_VAL(CP(SDRC_D22), (IEN | PTD | DIS | M0)) /*SDRC_D22*/\ -+ MUX_VAL(CP(SDRC_D23), (IEN | PTD | DIS | M0)) /*SDRC_D23*/\ -+ MUX_VAL(CP(SDRC_D24), (IEN | PTD | DIS | M0)) /*SDRC_D24*/\ -+ MUX_VAL(CP(SDRC_D25), (IEN | PTD | DIS | M0)) /*SDRC_D25*/\ -+ MUX_VAL(CP(SDRC_D26), (IEN | PTD | DIS | M0)) /*SDRC_D26*/\ -+ MUX_VAL(CP(SDRC_D27), (IEN | PTD | DIS | M0)) /*SDRC_D27*/\ -+ MUX_VAL(CP(SDRC_D28), (IEN | PTD | DIS | M0)) /*SDRC_D28*/\ -+ MUX_VAL(CP(SDRC_D29), (IEN | PTD | DIS | M0)) /*SDRC_D29*/\ -+ MUX_VAL(CP(SDRC_D30), (IEN | PTD | DIS | M0)) /*SDRC_D30*/\ -+ MUX_VAL(CP(SDRC_D31), (IEN | PTD | DIS | M0)) /*SDRC_D31*/\ -+ MUX_VAL(CP(SDRC_CLK), (IEN | PTD | DIS | M0)) /*SDRC_CLK*/\ -+ MUX_VAL(CP(SDRC_DQS0), (IEN | PTD | DIS | M0)) /*SDRC_DQS0*/\ -+ MUX_VAL(CP(SDRC_DQS1), (IEN | PTD | DIS | M0)) /*SDRC_DQS1*/\ -+ MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)) /*SDRC_DQS2*/\ -+ MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)) /*SDRC_DQS3*/\ -+ /*GPMC*/\ -+ MUX_VAL(CP(GPMC_A1), (IDIS | PTD | DIS | M0)) /*GPMC_A1*/\ -+ MUX_VAL(CP(GPMC_A2), (IDIS | PTD | DIS | M0)) /*GPMC_A2*/\ -+ MUX_VAL(CP(GPMC_A3), (IDIS | PTD | DIS | M0)) /*GPMC_A3*/\ -+ MUX_VAL(CP(GPMC_A4), (IDIS | PTD | DIS | M0)) /*GPMC_A4*/\ -+ MUX_VAL(CP(GPMC_A5), (IDIS | PTD | DIS | M0)) /*GPMC_A5*/\ -+ MUX_VAL(CP(GPMC_A6), (IDIS | PTD | DIS | M0)) /*GPMC_A6*/\ -+ MUX_VAL(CP(GPMC_A7), (IDIS | PTD | DIS | M0)) /*GPMC_A7*/\ -+ MUX_VAL(CP(GPMC_A8), (IDIS | PTD | DIS | M0)) /*GPMC_A8*/\ -+ MUX_VAL(CP(GPMC_A9), (IDIS | PTD | DIS | M0)) /*GPMC_A9*/\ -+ MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS | M0)) /*GPMC_A10*/\ -+ MUX_VAL(CP(GPMC_D0), (IEN | PTD | DIS | M0)) /*GPMC_D0*/\ -+ MUX_VAL(CP(GPMC_D1), (IEN | PTD | DIS | M0)) /*GPMC_D1*/\ -+ MUX_VAL(CP(GPMC_D2), (IEN | PTD | DIS | M0)) /*GPMC_D2*/\ -+ MUX_VAL(CP(GPMC_D3), (IEN | PTD | DIS | M0)) /*GPMC_D3*/\ -+ MUX_VAL(CP(GPMC_D4), (IEN | PTD | DIS | M0)) /*GPMC_D4*/\ -+ MUX_VAL(CP(GPMC_D5), (IEN | PTD | DIS | M0)) /*GPMC_D5*/\ -+ MUX_VAL(CP(GPMC_D6), (IEN | PTD | DIS | M0)) /*GPMC_D6*/\ -+ MUX_VAL(CP(GPMC_D7), (IEN | PTD | DIS | M0)) /*GPMC_D7*/\ -+ MUX_VAL(CP(GPMC_D8), (IEN | PTD | DIS | M0)) /*GPMC_D8*/\ -+ MUX_VAL(CP(GPMC_D9), (IEN | PTD | DIS | M0)) /*GPMC_D9*/\ -+ MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS | M0)) /*GPMC_D10*/\ -+ MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS | M0)) /*GPMC_D11*/\ -+ MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS | M0)) /*GPMC_D12*/\ -+ MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS | M0)) /*GPMC_D13*/\ -+ MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\ -+ MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\ -+ MUX_VAL(CP(GPMC_nCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\ -+ MUX_VAL(CP(GPMC_nCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\ -+ MUX_VAL(CP(GPMC_nCS2), (IDIS | PTU | EN | M0)) /*GPMC_nCS2*/\ -+ MUX_VAL(CP(GPMC_nCS3), (IDIS | PTU | EN | M0)) /*GPMC_nCS3*/\ -+ /* For Beagle Rev 1 boards */\ -+ /*MUX_VAL(CP(GPMC_nCS4), (IDIS | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_nCS5), (IDIS | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_nCS6), (IDIS | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_nCS7), (IDIS | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_nBE1), (IDIS | PTD | DIS | M4))\ -+ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4))\ -+ MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M4))*/\ -+ /* For Beagle Rev 2 boards*/\ -+ MUX_VAL(CP(GPMC_nCS4), (IDIS | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_nCS5), (IDIS | PTD | DIS | M0))\ -+ MUX_VAL(CP(GPMC_nCS6), (IEN | PTD | DIS | M1))\ -+ MUX_VAL(CP(GPMC_nCS7), (IEN | PTU | EN | M1))\ -+ MUX_VAL(CP(GPMC_nBE1), (IEN | PTD | DIS | M0))\ -+ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M0))\ -+ MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M0))\ -+ /* till here */\ -+ MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\ -+ MUX_VAL(CP(GPMC_nADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\ -+ MUX_VAL(CP(GPMC_nOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\ -+ MUX_VAL(CP(GPMC_nWE), (IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\ -+ MUX_VAL(CP(GPMC_nBE0_CLE), (IDIS | PTD | DIS | M0)) /*GPMC_nBE0_CLE*/\ -+ MUX_VAL(CP(GPMC_nWP), (IEN | PTD | DIS | M0)) /*GPMC_nWP*/\ -+ MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /*GPMC_WAIT0*/\ -+ MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /*GPMC_WAIT1*/\ -+ /*DSS*/\ -+ MUX_VAL(CP(DSS_PCLK), (IDIS | PTD | DIS | M0)) /*DSS_PCLK*/\ -+ MUX_VAL(CP(DSS_HSYNC), (IDIS | PTD | DIS | M0)) /*DSS_HSYNC*/\ -+ MUX_VAL(CP(DSS_VSYNC), (IDIS | PTD | DIS | M0)) /*DSS_VSYNC*/\ -+ MUX_VAL(CP(DSS_ACBIAS), (IDIS | PTD | DIS | M0)) /*DSS_ACBIAS*/\ -+ MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M0)) /*DSS_DATA0*/\ -+ MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M0)) /*DSS_DATA1*/\ -+ MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M0)) /*DSS_DATA2*/\ -+ MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M0)) /*DSS_DATA3*/\ -+ MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M0)) /*DSS_DATA4*/\ -+ MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M0)) /*DSS_DATA5*/\ -+ MUX_VAL(CP(DSS_DATA6), (IDIS | PTD | DIS | M0)) /*DSS_DATA6*/\ -+ MUX_VAL(CP(DSS_DATA7), (IDIS | PTD | DIS | M0)) /*DSS_DATA7*/\ -+ MUX_VAL(CP(DSS_DATA8), (IDIS | PTD | DIS | M0)) /*DSS_DATA8*/\ -+ MUX_VAL(CP(DSS_DATA9), (IDIS | PTD | DIS | M0)) /*DSS_DATA9*/\ -+ MUX_VAL(CP(DSS_DATA10), (IDIS | PTD | DIS | M0)) /*DSS_DATA10*/\ -+ MUX_VAL(CP(DSS_DATA11), (IDIS | PTD | DIS | M0)) /*DSS_DATA11*/\ -+ MUX_VAL(CP(DSS_DATA12), (IDIS | PTD | DIS | M0)) /*DSS_DATA12*/\ -+ MUX_VAL(CP(DSS_DATA13), (IDIS | PTD | DIS | M0)) /*DSS_DATA13*/\ -+ MUX_VAL(CP(DSS_DATA14), (IDIS | PTD | DIS | M0)) /*DSS_DATA14*/\ -+ MUX_VAL(CP(DSS_DATA15), (IDIS | PTD | DIS | M0)) /*DSS_DATA15*/\ -+ MUX_VAL(CP(DSS_DATA16), (IDIS | PTD | DIS | M0)) /*DSS_DATA16*/\ -+ MUX_VAL(CP(DSS_DATA17), (IDIS | PTD | DIS | M0)) /*DSS_DATA17*/\ -+ MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M0)) /*DSS_DATA18*/\ -+ MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M0)) /*DSS_DATA19*/\ -+ MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M0)) /*DSS_DATA20*/\ -+ MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M0)) /*DSS_DATA21*/\ -+ MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M0)) /*DSS_DATA22*/\ -+ MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M0)) /*DSS_DATA23*/\ -+ /*CAMERA*/\ -+ MUX_VAL(CP(CAM_HS ), (IEN | PTU | EN | M0)) /*CAM_HS */\ -+ MUX_VAL(CP(CAM_VS ), (IEN | PTU | EN | M0)) /*CAM_VS */\ -+ MUX_VAL(CP(CAM_XCLKA), (IDIS | PTD | DIS | M0)) /*CAM_XCLKA*/\ -+ MUX_VAL(CP(CAM_PCLK), (IEN | PTU | EN | M0)) /*CAM_PCLK*/\ -+ MUX_VAL(CP(CAM_FLD), (IDIS | PTD | DIS | M4)) /*GPIO_98 - CAM_RESET*/\ -+ MUX_VAL(CP(CAM_D0 ), (IEN | PTD | DIS | M0)) /*CAM_D0 */\ -+ MUX_VAL(CP(CAM_D1 ), (IEN | PTD | DIS | M0)) /*CAM_D1 */\ -+ MUX_VAL(CP(CAM_D2 ), (IEN | PTD | DIS | M0)) /*CAM_D2 */\ -+ MUX_VAL(CP(CAM_D3 ), (IEN | PTD | DIS | M0)) /*CAM_D3 */\ -+ MUX_VAL(CP(CAM_D4 ), (IEN | PTD | DIS | M0)) /*CAM_D4 */\ -+ MUX_VAL(CP(CAM_D5 ), (IEN | PTD | DIS | M0)) /*CAM_D5 */\ -+ MUX_VAL(CP(CAM_D6 ), (IEN | PTD | DIS | M0)) /*CAM_D6 */\ -+ MUX_VAL(CP(CAM_D7 ), (IEN | PTD | DIS | M0)) /*CAM_D7 */\ -+ MUX_VAL(CP(CAM_D8 ), (IEN | PTD | DIS | M0)) /*CAM_D8 */\ -+ MUX_VAL(CP(CAM_D9 ), (IEN | PTD | DIS | M0)) /*CAM_D9 */\ -+ MUX_VAL(CP(CAM_D10), (IEN | PTD | DIS | M0)) /*CAM_D10*/\ -+ MUX_VAL(CP(CAM_D11), (IEN | PTD | DIS | M0)) /*CAM_D11*/\ -+ MUX_VAL(CP(CAM_XCLKB), (IDIS | PTD | DIS | M0)) /*CAM_XCLKB*/\ -+ MUX_VAL(CP(CAM_WEN), (IEN | PTD | DIS | M4)) /*GPIO_167*/\ -+ MUX_VAL(CP(CAM_STROBE), (IDIS | PTD | DIS | M0)) /*CAM_STROBE*/\ -+ MUX_VAL(CP(CSI2_DX0), (IEN | PTD | DIS | M0)) /*CSI2_DX0*/\ -+ MUX_VAL(CP(CSI2_DY0), (IEN | PTD | DIS | M0)) /*CSI2_DY0*/\ -+ MUX_VAL(CP(CSI2_DX1), (IEN | PTD | DIS | M0)) /*CSI2_DX1*/\ -+ MUX_VAL(CP(CSI2_DY1), (IEN | PTD | DIS | M0)) /*CSI2_DY1*/\ -+ /*Audio Interface */\ -+ MUX_VAL(CP(McBSP2_FSX), (IEN | PTD | DIS | M0)) /*McBSP2_FSX*/\ -+ MUX_VAL(CP(McBSP2_CLKX), (IEN | PTD | DIS | M0)) /*McBSP2_CLKX*/\ -+ MUX_VAL(CP(McBSP2_DR), (IEN | PTD | DIS | M0)) /*McBSP2_DR*/\ -+ MUX_VAL(CP(McBSP2_DX), (IDIS | PTD | DIS | M0)) /*McBSP2_DX*/\ -+ /*Expansion card */\ -+ MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)) /*MMC1_CLK*/\ -+ MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)) /*MMC1_CMD*/\ -+ MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)) /*MMC1_DAT0*/\ -+ MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\ -+ MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)) /*MMC1_DAT2*/\ -+ MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)) /*MMC1_DAT3*/\ -+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)) /*MMC1_DAT4*/\ -+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)) /*MMC1_DAT5*/\ -+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\ -+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\ -+ /*Wireless LAN */\ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ -+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ -+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ -+ /*Bluetooth*/\ -+ MUX_VAL(CP(McBSP3_DX), (IDIS | PTD | DIS | M4)) /*GPIO_140*/\ -+ MUX_VAL(CP(McBSP3_DR), (IDIS | PTD | DIS | M4)) /*GPIO_142*/\ -+ MUX_VAL(CP(McBSP3_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_141*/\ -+ MUX_VAL(CP(McBSP3_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_143*/\ -+ MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\ -+ MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ -+ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/\ -+ MUX_VAL(CP(UART2_RX), (IEN | PTD | DIS | M0)) /*UART2_RX*/\ -+ /*Modem Interface */\ -+ MUX_VAL(CP(UART1_TX), (IDIS | PTD | DIS | M0)) /*UART1_TX*/\ -+ MUX_VAL(CP(UART1_RTS), (IDIS | PTD | DIS | M4)) /*GPIO_149*/\ -+ MUX_VAL(CP(UART1_CTS), (IDIS | PTD | DIS | M4)) /*GPIO_150*/\ -+ MUX_VAL(CP(UART1_RX), (IEN | PTD | DIS | M0)) /*UART1_RX*/\ -+ MUX_VAL(CP(McBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX */\ -+ MUX_VAL(CP(McBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX */\ -+ MUX_VAL(CP(McBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX */\ -+ MUX_VAL(CP(McBSP4_FSX), (IEN | PTD | DIS | M1)) /*SSI1_WAKE*/\ -+ MUX_VAL(CP(McBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156*/\ -+ MUX_VAL(CP(McBSP1_FSR), (IDIS | PTU | EN | M4)) /*GPIO_157 - BT_WAKEUP*/\ -+ MUX_VAL(CP(McBSP1_DX), (IDIS | PTD | DIS | M4)) /*GPIO_158*/\ -+ MUX_VAL(CP(McBSP1_DR), (IDIS | PTD | DIS | M4)) /*GPIO_159*/\ -+ MUX_VAL(CP(McBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS */\ -+ MUX_VAL(CP(McBSP1_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_161*/\ -+ MUX_VAL(CP(McBSP1_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_162 */\ -+ /*Serial Interface*/\ -+ MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_RCTX */\ -+ MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\ -+ MUX_VAL(CP(UART3_RX_IRRX ), (IEN | PTD | DIS | M0)) /*UART3_RX_IRRX*/\ -+ MUX_VAL(CP(UART3_TX_IRTX ), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\ -+ MUX_VAL(CP(HSUSB0_CLK), (IEN | PTD | DIS | M0)) /*HSUSB0_CLK*/\ -+ MUX_VAL(CP(HSUSB0_STP), (IDIS | PTU | EN | M0)) /*HSUSB0_STP*/\ -+ MUX_VAL(CP(HSUSB0_DIR), (IEN | PTD | DIS | M0)) /*HSUSB0_DIR*/\ -+ MUX_VAL(CP(HSUSB0_NXT), (IEN | PTD | DIS | M0)) /*HSUSB0_NXT*/\ -+ MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA0 */\ -+ MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA1 */\ -+ MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA2 */\ -+ MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA3 */\ -+ MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA4 */\ -+ MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA5 */\ -+ MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA6 */\ -+ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7 */\ -+ MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ -+ MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ -+ MUX_VAL(CP(I2C2_SCL), (IDIS | PTU | DIS | M4)) /*GPIO_168*/\ -+ MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\ -+ MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\ -+ MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\ -+ MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\ -+ MUX_VAL(CP(I2C4_SDA), (IEN | PTU | EN | M0)) /*I2C4_SDA*/\ -+ MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*HDQ_SIO*/\ -+ MUX_VAL(CP(McSPI1_CLK), (IEN | PTD | DIS | M0)) /*McSPI1_CLK*/\ -+ MUX_VAL(CP(McSPI1_SIMO), (IEN | PTD | DIS | M0)) /*McSPI1_SIMO */\ -+ MUX_VAL(CP(McSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI */\ -+ MUX_VAL(CP(McSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\ -+ MUX_VAL(CP(McSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\ -+ MUX_VAL(CP(McSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176 - NOR_DPD*/\ -+ MUX_VAL(CP(McSPI1_CS3), (IEN | PTD | EN | M0)) /*McSPI1_CS3*/\ -+ MUX_VAL(CP(McSPI2_CLK), (IEN | PTD | DIS | M0)) /*McSPI2_CLK*/\ -+ MUX_VAL(CP(McSPI2_SIMO), (IEN | PTD | DIS | M0)) /*McSPI2_SIMO*/\ -+ MUX_VAL(CP(McSPI2_SOMI), (IEN | PTD | DIS | M0)) /*McSPI2_SOMI*/\ -+ MUX_VAL(CP(McSPI2_CS0), (IEN | PTD | EN | M0)) /*McSPI2_CS0*/\ -+ MUX_VAL(CP(McSPI2_CS1), (IEN | PTD | EN | M0)) /*McSPI2_CS1*/\ -+ /*Control and debug */\ -+ MUX_VAL(CP(SYS_32K), (IEN | PTD | DIS | M0)) /*SYS_32K*/\ -+ MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS | M0)) /*SYS_CLKREQ*/\ -+ MUX_VAL(CP(SYS_nIRQ), (IEN | PTU | EN | M0)) /*SYS_nIRQ*/\ -+ MUX_VAL(CP(SYS_BOOT0), (IEN | PTD | DIS | M4)) /*GPIO_2 - PEN_IRQ */\ -+ MUX_VAL(CP(SYS_BOOT1), (IEN | PTD | DIS | M4)) /*GPIO_3 */\ -+ MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /*GPIO_4 - MMC1_WP */\ -+ MUX_VAL(CP(SYS_BOOT3), (IEN | PTD | DIS | M4)) /*GPIO_5 - LCD_ENVDD*/\ -+ MUX_VAL(CP(SYS_BOOT4), (IEN | PTD | DIS | M4)) /*GPIO_6 - LAN_INTR0*/\ -+ MUX_VAL(CP(SYS_BOOT5), (IEN | PTD | DIS | M4)) /*GPIO_7 - MMC2_WP*/\ -+ MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M4)) /*GPIO_8 - LCD_ENBKL*/\ -+ MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE */\ -+ MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1 */\ -+ MUX_VAL(CP(SYS_CLKOUT2), (IEN | PTU | EN | M4)) /*GPIO_186*/\ -+ MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN | M3)) /*HSUSB1_STP*/\ -+ MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTD | DIS | M3)) /*HSUSB1_CLK*/\ -+ MUX_VAL(CP(ETK_D0_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA0*/\ -+ MUX_VAL(CP(ETK_D1_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA1*/\ -+ MUX_VAL(CP(ETK_D2_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA2*/\ -+ MUX_VAL(CP(ETK_D3_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA7*/\ -+ MUX_VAL(CP(ETK_D4_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA4*/\ -+ MUX_VAL(CP(ETK_D5_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA5*/\ -+ MUX_VAL(CP(ETK_D6_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA6*/\ -+ MUX_VAL(CP(ETK_D7_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA3*/\ -+ MUX_VAL(CP(ETK_D8_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_DIR*/\ -+ MUX_VAL(CP(ETK_D9_ES2 ), (IEN | PTD | DIS | M3)) /*HSUSB1_NXT*/\ -+ MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTU | EN | M4)) /*GPIO_24*/\ -+ MUX_VAL(CP(ETK_D15), (IEN | PTU | EN | M4)) /*GPIO_29*/\ -+ MUX_VAL(CP(d2d_mcad1), (IEN | PTD | EN | M0)) /*d2d_mcad1*/\ -+ MUX_VAL(CP(d2d_mcad2), (IEN | PTD | EN | M0)) /*d2d_mcad2*/\ -+ MUX_VAL(CP(d2d_mcad3), (IEN | PTD | EN | M0)) /*d2d_mcad3*/\ -+ MUX_VAL(CP(d2d_mcad4), (IEN | PTD | EN | M0)) /*d2d_mcad4*/\ -+ MUX_VAL(CP(d2d_mcad5), (IEN | PTD | EN | M0)) /*d2d_mcad5*/\ -+ MUX_VAL(CP(d2d_mcad6), (IEN | PTD | EN | M0)) /*d2d_mcad6*/\ -+ MUX_VAL(CP(d2d_mcad7), (IEN | PTD | EN | M0)) /*d2d_mcad7*/\ -+ MUX_VAL(CP(d2d_mcad8), (IEN | PTD | EN | M0)) /*d2d_mcad8*/\ -+ MUX_VAL(CP(d2d_mcad9), (IEN | PTD | EN | M0)) /*d2d_mcad9*/\ -+ MUX_VAL(CP(d2d_mcad10), (IEN | PTD | EN | M0)) /*d2d_mcad10*/\ -+ MUX_VAL(CP(d2d_mcad11), (IEN | PTD | EN | M0)) /*d2d_mcad11*/\ -+ MUX_VAL(CP(d2d_mcad12), (IEN | PTD | EN | M0)) /*d2d_mcad12*/\ -+ MUX_VAL(CP(d2d_mcad13), (IEN | PTD | EN | M0)) /*d2d_mcad13*/\ -+ MUX_VAL(CP(d2d_mcad14), (IEN | PTD | EN | M0)) /*d2d_mcad14*/\ -+ MUX_VAL(CP(d2d_mcad15), (IEN | PTD | EN | M0)) /*d2d_mcad15*/\ -+ MUX_VAL(CP(d2d_mcad16), (IEN | PTD | EN | M0)) /*d2d_mcad16*/\ -+ MUX_VAL(CP(d2d_mcad17), (IEN | PTD | EN | M0)) /*d2d_mcad17*/\ -+ MUX_VAL(CP(d2d_mcad18), (IEN | PTD | EN | M0)) /*d2d_mcad18*/\ -+ MUX_VAL(CP(d2d_mcad19), (IEN | PTD | EN | M0)) /*d2d_mcad19*/\ -+ MUX_VAL(CP(d2d_mcad20), (IEN | PTD | EN | M0)) /*d2d_mcad20*/\ -+ MUX_VAL(CP(d2d_mcad21), (IEN | PTD | EN | M0)) /*d2d_mcad21*/\ -+ MUX_VAL(CP(d2d_mcad22), (IEN | PTD | EN | M0)) /*d2d_mcad22*/\ -+ MUX_VAL(CP(d2d_mcad23), (IEN | PTD | EN | M0)) /*d2d_mcad23*/\ -+ MUX_VAL(CP(d2d_mcad24), (IEN | PTD | EN | M0)) /*d2d_mcad24*/\ -+ MUX_VAL(CP(d2d_mcad25), (IEN | PTD | EN | M0)) /*d2d_mcad25*/\ -+ MUX_VAL(CP(d2d_mcad26), (IEN | PTD | EN | M0)) /*d2d_mcad26*/\ -+ MUX_VAL(CP(d2d_mcad27), (IEN | PTD | EN | M0)) /*d2d_mcad27*/\ -+ MUX_VAL(CP(d2d_mcad28), (IEN | PTD | EN | M0)) /*d2d_mcad28*/\ -+ MUX_VAL(CP(d2d_mcad29), (IEN | PTD | EN | M0)) /*d2d_mcad29*/\ -+ MUX_VAL(CP(d2d_mcad30), (IEN | PTD | EN | M0)) /*d2d_mcad30*/\ -+ MUX_VAL(CP(d2d_mcad31), (IEN | PTD | EN | M0)) /*d2d_mcad31*/\ -+ MUX_VAL(CP(d2d_mcad32), (IEN | PTD | EN | M0)) /*d2d_mcad32*/\ -+ MUX_VAL(CP(d2d_mcad33), (IEN | PTD | EN | M0)) /*d2d_mcad33*/\ -+ MUX_VAL(CP(d2d_mcad34), (IEN | PTD | EN | M0)) /*d2d_mcad34*/\ -+ MUX_VAL(CP(d2d_mcad35), (IEN | PTD | EN | M0)) /*d2d_mcad35*/\ -+ MUX_VAL(CP(d2d_mcad36), (IEN | PTD | EN | M0)) /*d2d_mcad36*/\ -+ MUX_VAL(CP(d2d_clk26mi), (IEN | PTD | DIS | M0)) /*d2d_clk26mi */\ -+ MUX_VAL(CP(d2d_nrespwron ), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\ -+ MUX_VAL(CP(d2d_nreswarm), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\ -+ MUX_VAL(CP(d2d_arm9nirq), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\ -+ MUX_VAL(CP(d2d_uma2p6fiq ), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\ -+ MUX_VAL(CP(d2d_spint), (IEN | PTD | EN | M0)) /*d2d_spint*/\ -+ MUX_VAL(CP(d2d_frint), (IEN | PTD | EN | M0)) /*d2d_frint*/\ -+ MUX_VAL(CP(d2d_dmareq0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0 */\ -+ MUX_VAL(CP(d2d_dmareq1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1 */\ -+ MUX_VAL(CP(d2d_dmareq2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2 */\ -+ MUX_VAL(CP(d2d_dmareq3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3 */\ -+ MUX_VAL(CP(d2d_n3gtrst), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst */\ -+ MUX_VAL(CP(d2d_n3gtdi), (IEN | PTD | DIS | M0)) /*d2d_n3gtdi*/\ -+ MUX_VAL(CP(d2d_n3gtdo), (IEN | PTD | DIS | M0)) /*d2d_n3gtdo*/\ -+ MUX_VAL(CP(d2d_n3gtms), (IEN | PTD | DIS | M0)) /*d2d_n3gtms*/\ -+ MUX_VAL(CP(d2d_n3gtck), (IEN | PTD | DIS | M0)) /*d2d_n3gtck*/\ -+ MUX_VAL(CP(d2d_n3grtck), (IEN | PTD | DIS | M0)) /*d2d_n3grtck */\ -+ MUX_VAL(CP(d2d_mstdby), (IEN | PTU | EN | M0)) /*d2d_mstdby*/\ -+ MUX_VAL(CP(d2d_swakeup), (IEN | PTD | EN | M0)) /*d2d_swakeup */\ -+ MUX_VAL(CP(d2d_idlereq), (IEN | PTD | DIS | M0)) /*d2d_idlereq */\ -+ MUX_VAL(CP(d2d_idleack), (IEN | PTU | EN | M0)) /*d2d_idleack */\ -+ MUX_VAL(CP(d2d_mwrite), (IEN | PTD | DIS | M0)) /*d2d_mwrite*/\ -+ MUX_VAL(CP(d2d_swrite), (IEN | PTD | DIS | M0)) /*d2d_swrite*/\ -+ MUX_VAL(CP(d2d_mread), (IEN | PTD | DIS | M0)) /*d2d_mread*/\ -+ MUX_VAL(CP(d2d_sread), (IEN | PTD | DIS | M0)) /*d2d_sread*/\ -+ MUX_VAL(CP(d2d_mbusflag), (IEN | PTD | DIS | M0)) /*d2d_mbusflag */\ -+ MUX_VAL(CP(d2d_sbusflag), (IEN | PTD | DIS | M0)) /*d2d_sbusflag */\ -+ MUX_VAL(CP(sdrc_cke0), (IDIS | PTU | EN | M0)) /*sdrc_cke0 */\ -+ MUX_VAL(CP(sdrc_cke1), (IDIS | PTD | DIS | M7)) /*sdrc_cke1 not used */ -+ -+/********************************************************** ++/****************************************************************************** + * Routine: set_muxconf_regs -+ * Description: Setting up the configuration Mux registers -+ * specific to the hardware. Many pins need -+ * to be moved from protect to primary mode. -+ *********************************************************/ ++ * Description: Setting up the configuration Mux registers specific to the ++ * hardware. Many pins need to be moved from protect to primary ++ * mode. ++ *****************************************************************************/ +void set_muxconf_regs(void) +{ + MUX_DEFAULT_ES2(); +} + -+/****************************************************************************** -+ * Routine: update_mux() -+ * Description:Update balls which are different between boards. All should be -+ * updated to match functionality. However, I'm only updating ones -+ * which I'll be using for now. When power comes into play they -+ * all need updating. -+ *****************************************************************************/ -+void update_mux(u32 btype, u32 mtype) -+{ -+ /* NOTHING as of now... */ -+} -+ +#if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY) -+/********************************************************** ++/****************************************************************************** + * Routine: nand+_init + * Description: Set up nand for nand and jffs2 commands -+ *********************************************************/ ++ *****************************************************************************/ +void nand_init(void) +{ + extern flash_info_t flash_info[]; + + nand_probe(CFG_NAND_ADDR); -+ if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) { ++ if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) + print_size(nand_dev_desc[0].totlen, "\n"); -+ } ++ +#ifdef CFG_JFFS2_MEM_NAND + flash_info[CFG_JFFS2_FIRST_BANK].flash_id = nand_dev_desc[0].id; + /* only read kernel single meg partition */ @@ -2257,12 +1845,26 @@ index 0000000..1daf42c +#endif +} +#endif ++ ++/****************************************************************************** ++ * Dummy function to handle errors for EABI incompatibility ++ *****************************************************************************/ ++void raise(void) ++{ ++} ++ ++/****************************************************************************** ++ * Dummy function to handle errors for EABI incompatibility ++ *****************************************************************************/ ++void abort(void) ++{ ++} diff --git a/board/omap3530beagle/sys_info.c b/board/omap3530beagle/sys_info.c new file mode 100644 -index 0000000..017bfaa +index 0000000..a275557 --- /dev/null +++ b/board/omap3530beagle/sys_info.c -@@ -0,0 +1,315 @@ +@@ -0,0 +1,309 @@ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> @@ -2288,24 +1890,18 @@ index 0000000..017bfaa + */ + +#include <common.h> -+#include <asm/arch/cpu.h> +#include <asm/io.h> +#include <asm/arch/bits.h> +#include <asm/arch/mem.h> /* get mem tables */ +#include <asm/arch/sys_proto.h> -+#include <asm/arch/sys_info.h> +#include <i2c.h> + +/************************************************************************** -+ * get_cpu_type() - Read the FPGA Debug registers and provide the DIP switch -+ * settings -+ * 1 is on -+ * 0 is off -+ * Will return Index of type of gpmc ++ * get_gpmc0_type() + ***************************************************************************/ +u32 get_gpmc0_type(void) +{ -+ // Default NAND ++ /* Default NAND */ + return (2); +} + @@ -2315,7 +1911,7 @@ index 0000000..017bfaa + ****************************************************/ +u32 get_cpu_type(void) +{ -+ // fixme, need to get register defines for OMAP3 ++ /* fixme, need to get register defines for OMAP3 */ + return (CPU_3430); +} + @@ -2580,10 +2176,10 @@ index 0000000..017bfaa +} diff --git a/board/omap3530beagle/syslib.c b/board/omap3530beagle/syslib.c new file mode 100644 -index 0000000..1eb5d95 +index 0000000..002c6e8 --- /dev/null +++ b/board/omap3530beagle/syslib.c -@@ -0,0 +1,74 @@ +@@ -0,0 +1,72 @@ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> @@ -2608,13 +2204,11 @@ index 0000000..1eb5d95 + */ + +#include <common.h> -+#include <asm/arch/cpu.h> +#include <asm/io.h> +#include <asm/arch/bits.h> +#include <asm/arch/mem.h> +#include <asm/arch/clocks.h> +#include <asm/arch/sys_proto.h> -+#include <asm/arch/sys_info.h> + +/************************************************************ + * sdelay() - simple spin loop. Will be constant time as @@ -2727,6 +2321,19 @@ index 0000000..72f15f6 + .bss : { *(.bss) } + _end = .; +} +diff --git a/common/env_nand.c b/common/env_nand.c +index a48e98e..8b04a01 100644 +--- a/common/env_nand.c ++++ b/common/env_nand.c +@@ -231,6 +231,8 @@ int saveenv(void) + size_t total; + int ret = 0; + ++ nand_erase_options_t nand_erase_options; ++ + nand_erase_options.length = CFG_ENV_RANGE; + nand_erase_options.quiet = 0; + nand_erase_options.jffs2 = 0; diff --git a/cpu/omap3/Makefile b/cpu/omap3/Makefile new file mode 100644 index 0000000..097447a @@ -2818,10 +2425,10 @@ index 0000000..7551677 +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) diff --git a/cpu/omap3/cpu.c b/cpu/omap3/cpu.c new file mode 100644 -index 0000000..d32a8cb +index 0000000..59e6a58 --- /dev/null +++ b/cpu/omap3/cpu.c -@@ -0,0 +1,235 @@ +@@ -0,0 +1,221 @@ +/* + * (C) Copyright 2008 Texas Insturments + * @@ -2858,10 +2465,6 @@ index 0000000..d32a8cb +#include <common.h> +#include <command.h> +#include <asm/arch/sys_proto.h> -+#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) -+#include <asm/arch/cpu.h> -+#endif -+#include <asm/arch/sys_info.h> + +#ifdef CONFIG_USE_IRQ +DECLARE_GLOBAL_DATA_PTR; @@ -2876,7 +2479,8 @@ index 0000000..d32a8cb +{ + unsigned long value; + -+ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 0 @ read control reg\n":"=r"(value) ++ __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 0\ ++ @ read control reg\n":"=r"(value) + ::"memory"); + return value; +} @@ -2884,10 +2488,9 @@ index 0000000..d32a8cb +/* write to co-processor 15, register #1 (control register) */ +static void write_p15_c1(unsigned long value) +{ -+ __asm__ -+ __volatile__ -+ ("mcr p15, 0, %0, c1, c0, 0 @ write it back\n"::"r"(value) -+ : "memory"); ++ __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 0\ ++ @ write it back\n"::"r"(value) ++ : "memory"); + + read_p15_c1(); +} @@ -2927,6 +2530,8 @@ index 0000000..d32a8cb + +int cleanup_before_linux(void) +{ ++ unsigned int i; ++ + /* + * this function is called just before we call linux + * it prepares the processor for linux @@ -2935,49 +2540,37 @@ index 0000000..d32a8cb + */ + disable_interrupts(); + -+#ifdef CONFIG_LCD -+ { -+ extern void lcd_disable(void); -+ extern void lcd_panel_disable(void); -+ -+ lcd_disable(); /* proper disable of lcd & panel */ -+ lcd_panel_disable(); -+ } -+#endif -+ -+ { -+ unsigned int i; -+ -+ /* turn off I/D-cache */ -+ asm("mrc p15, 0, %0, c1, c0, 0":"=r"(i)); -+ i &= ~(C1_DC | C1_IC); -+ asm("mcr p15, 0, %0, c1, c0, 0": :"r"(i)); ++ /* turn off I/D-cache */ ++ asm("mrc p15, 0, %0, c1, c0, 0":"=r"(i)); ++ i &= ~(C1_DC | C1_IC); ++ asm("mcr p15, 0, %0, c1, c0, 0": :"r"(i)); + -+ /* invalidate I-cache */ -+ arm_cache_flush(); ++ /* invalidate I-cache */ ++ arm_cache_flush(); +#ifndef CONFIG_L2_OFF -+ /* turn off L2 cache */ -+ l2cache_disable(); -+ /* invalidate L2 cache also */ -+ v7_flush_dcache_all(get_device_type()); ++ /* turn off L2 cache */ ++ l2cache_disable(); ++ /* invalidate L2 cache also */ ++ v7_flush_dcache_all(get_device_type()); +#endif -+ i = 0; -+ /* mem barrier to sync up things */ -+ asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i)); ++ i = 0; ++ /* mem barrier to sync up things */ ++ asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i)); + +#ifndef CONFIG_L2_OFF + l2cache_enable(); +#endif -+ } + + return (0); +} + -+int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ++int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + disable_interrupts(); + reset_cpu(0); -+ /*NOTREACHED*/ return (0); ++ ++ /* NOTREACHED */ ++ return (0); +} + +void icache_enable(void) @@ -3059,10 +2652,10 @@ index 0000000..d32a8cb +} diff --git a/cpu/omap3/interrupts.c b/cpu/omap3/interrupts.c new file mode 100644 -index 0000000..007193a +index 0000000..818b833 --- /dev/null +++ b/cpu/omap3/interrupts.c -@@ -0,0 +1,299 @@ +@@ -0,0 +1,304 @@ +/* + * (C) Copyright 2008 + * Texas Instruments @@ -3100,10 +2693,6 @@ index 0000000..007193a +#include <common.h> +#include <asm/arch/bits.h> + -+#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) -+# include <asm/arch/cpu.h> -+#endif -+ +#include <asm/proc-armv/ptrace.h> + +#define TIMER_LOAD_VAL 0 @@ -3237,9 +2826,6 @@ index 0000000..007193a + bad_mode(); +} + -+#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_CINTEGRATOR) -+/* Use the IntegratorCP function from board/integratorcp.c */ -+#else + +static ulong timestamp; +static ulong lastinc; @@ -3250,8 +2836,10 @@ index 0000000..007193a + int32_t val; + + /* Start the counter ticking up */ -+ *((int32_t *) (CFG_TIMERBASE + TLDR)) = TIMER_LOAD_VAL; /* reload value on overflow */ -+ val = (CFG_PVT << 2) | BIT5 | BIT1 | BIT0; /* mask to enable timer */ ++ /* reload value on overflow */ ++ *((int32_t *) (CFG_TIMERBASE + TLDR)) = TIMER_LOAD_VAL; ++ /* mask to enable timer */ ++ val = (CFG_PVT << 2) | BIT5 | BIT1 | BIT0; + *((int32_t *) (CFG_TIMERBASE + TCLR)) = val; /* start timer */ + + reset_timer_masked(); /* init the timestamp and lastinc value */ @@ -3282,18 +2870,23 @@ index 0000000..007193a +{ + ulong tmo, tmp; + -+ if (usec >= 1000) { /* if "big" number, spread normalization to seconds */ -+ tmo = usec / 1000; /* start to normalize for usec to ticks per sec */ -+ tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */ ++ /* if "big" number, spread normalization to seconds */ ++ if (usec >= 1000) { ++ /* if "big" number, spread normalization to seconds */ ++ tmo = usec / 1000; ++ /* find number of "ticks" to wait to achieve target */ ++ tmo *= CFG_HZ; + tmo /= 1000; /* finish normalize. */ -+ } else { /* else small number, don't kill it prior to HZ multiply */ ++ } else {/* else small number, don't kill it prior to HZ multiply */ + tmo = usec * CFG_HZ; + tmo /= (1000 * 1000); + } + + tmp = get_timer(0); /* get current timestamp */ -+ if ((tmo + tmp + 1) < tmp) /* if setting this forward will roll time stamp */ -+ reset_timer_masked(); /* reset "advancing" timestamp to 0, set lastinc value */ ++ /* if setting this forward will roll time stamp */ ++ if ((tmo + tmp + 1) < tmp) ++ /* reset "advancing" timestamp to 0, set lastinc value */ ++ reset_timer_masked(); + else + tmo += tmp; /* else, set advancing stamp wake up time */ + while (get_timer_masked() < tmo) /* loop till event */ @@ -3312,8 +2905,9 @@ index 0000000..007193a + ulong now = READ_TIMER; /* current tick value */ + + if (now >= lastinc) /* normal mode (non roll) */ -+ timestamp += (now - lastinc); /* move stamp fordward with absoulte diff ticks */ -+ else /* we have rollover of incrementer */ ++ /* move stamp fordward with absoulte diff ticks */ ++ timestamp += (now - lastinc); ++ else /* we have rollover of incrementer */ + timestamp += (0xFFFFFFFF - lastinc) + now; + lastinc = now; + return timestamp; @@ -3326,11 +2920,15 @@ index 0000000..007193a + ulong endtime; + signed long diff; + -+ if (usec >= 1000) { /* if "big" number, spread normalization to seconds */ -+ tmo = usec / 1000; /* start to normalize for usec to ticks per sec */ -+ tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */ ++ /* if "big" number, spread normalization to seconds */ ++ if (usec >= 1000) { ++ /* start to normalize for usec to ticks per sec */ ++ tmo = usec / 1000; ++ /* find number of "ticks" to wait to achieve target */ ++ tmo *= CFG_HZ; + tmo /= 1000; /* finish normalize. */ -+ } else { /* else small number, don't kill it prior to HZ multiply */ ++ } else { /* else small number, */ ++ /* don't kill it prior to HZ multiply */ + tmo = usec * CFG_HZ; + tmo /= (1000 * 1000); + } @@ -3361,13 +2959,13 @@ index 0000000..007193a + tbclk = CFG_HZ; + return tbclk; +} -+#endif /* !Integrator/CP */ ++ diff --git a/cpu/omap3/mmc.c b/cpu/omap3/mmc.c new file mode 100644 -index 0000000..ff6a50d +index 0000000..741360b --- /dev/null +++ b/cpu/omap3/mmc.c -@@ -0,0 +1,551 @@ +@@ -0,0 +1,559 @@ +/* + * (C) Copyright 2008 + * Texas Instruments, <www.ti.com> @@ -3394,20 +2992,35 @@ index 0000000..ff6a50d + +#include <config.h> +#include <common.h> ++#include <fat.h> +#include <mmc.h> +#include <part.h> +#include <i2c.h> -+#include "mmc_host_def.h" -+#include "mmc_protocol.h" + -+extern int fat_register_device(block_dev_desc_t * dev_desc, int part_no); ++const unsigned short mmc_transspeed_val[15][4] = { ++ {CLKD(10, 1), CLKD(10, 10), CLKD(10, 100), CLKD(10, 1000)}, ++ {CLKD(12, 1), CLKD(12, 10), CLKD(12, 100), CLKD(12, 1000)}, ++ {CLKD(13, 1), CLKD(13, 10), CLKD(13, 100), CLKD(13, 1000)}, ++ {CLKD(15, 1), CLKD(15, 10), CLKD(15, 100), CLKD(15, 1000)}, ++ {CLKD(20, 1), CLKD(20, 10), CLKD(20, 100), CLKD(20, 1000)}, ++ {CLKD(26, 1), CLKD(26, 10), CLKD(26, 100), CLKD(26, 1000)}, ++ {CLKD(30, 1), CLKD(30, 10), CLKD(30, 100), CLKD(30, 1000)}, ++ {CLKD(35, 1), CLKD(35, 10), CLKD(35, 100), CLKD(35, 1000)}, ++ {CLKD(40, 1), CLKD(40, 10), CLKD(40, 100), CLKD(40, 1000)}, ++ {CLKD(45, 1), CLKD(45, 10), CLKD(45, 100), CLKD(45, 1000)}, ++ {CLKD(52, 1), CLKD(52, 10), CLKD(52, 100), CLKD(52, 1000)}, ++ {CLKD(55, 1), CLKD(55, 10), CLKD(55, 100), CLKD(55, 1000)}, ++ {CLKD(60, 1), CLKD(60, 10), CLKD(60, 100), CLKD(60, 1000)}, ++ {CLKD(70, 1), CLKD(70, 10), CLKD(70, 100), CLKD(70, 1000)}, ++ {CLKD(80, 1), CLKD(80, 10), CLKD(80, 100), CLKD(80, 1000)} ++}; + +mmc_card_data cur_card_data; +static block_dev_desc_t mmc_blk_dev; + +block_dev_desc_t *mmc_get_dev(int dev) +{ -+ return ((block_dev_desc_t *) & mmc_blk_dev); ++ return ((block_dev_desc_t *) &mmc_blk_dev); +} + +void twl4030_mmc_config(void) @@ -3438,7 +3051,7 @@ index 0000000..ff6a50d +void mmc_init_stream(void) +{ + volatile unsigned int mmc_stat; -+ ++ + OMAP_HSMMC_CON |= INIT_INITSTREAM; + + OMAP_HSMMC_CMD = MMC_CMD0; @@ -3537,9 +3150,8 @@ index 0000000..ff6a50d + mmc_stat = OMAP_HSMMC_STAT; + } while (mmc_stat == 0); + -+ if ((mmc_stat & ERRI_MASK) != 0) { ++ if ((mmc_stat & ERRI_MASK) != 0) + return (unsigned char) mmc_stat; -+ } + + if (mmc_stat & CC_MASK) { + OMAP_HSMMC_STAT = CC_MASK; @@ -3593,7 +3205,7 @@ index 0000000..ff6a50d + return 1; +} + -+unsigned char mmc_detect_card(mmc_card_data * mmc_card_cur) ++unsigned char mmc_detect_card(mmc_card_data *mmc_card_cur) +{ + unsigned char err; + unsigned int argument = 0; @@ -3636,9 +3248,9 @@ index 0000000..ff6a50d + + argument = ocr_value; + err = mmc_send_cmd(ret_cmd41, argument, resp); -+ if (err != 1) { ++ if (err != 1) + return err; -+ } ++ + ocr_recvd = ((mmc_resp_r3 *) resp)->ocr; + + while (!(ocr_recvd & (0x1 << 31)) && (retry_cnt > 0)) { @@ -3704,8 +3316,8 @@ index 0000000..ff6a50d + return 1; +} + -+unsigned char mmc_read_cardsize(mmc_card_data * mmc_dev_data, -+ mmc_csd_reg_t * cur_csd) ++unsigned char mmc_read_cardsize(mmc_card_data *mmc_dev_data, ++ mmc_csd_reg_t *cur_csd) +{ + mmc_extended_csd_reg_t ext_csd; + unsigned int size, count, blk_len, blk_no, card_size, argument; @@ -3759,7 +3371,7 @@ index 0000000..ff6a50d +} + +unsigned char omap_mmc_read_sect(unsigned int start_sec, unsigned int num_bytes, -+ mmc_card_data * mmc_c, ++ mmc_card_data *mmc_c, + unsigned long *output_buf) +{ + unsigned char err; @@ -3782,14 +3394,13 @@ index 0000000..ff6a50d + + while (num_sec_val) { + err = mmc_send_cmd(MMC_CMD17, argument, resp); -+ if (err != 1) { ++ if (err != 1) + return err; -+ } + + err = mmc_read_data((unsigned int *) output_buf); -+ if (err != 1) { ++ if (err != 1) + return err; -+ } ++ + output_buf += (MMCSD_SECTOR_SIZE / 4); + argument += sec_inc_val; + num_sec_val--; @@ -3797,7 +3408,7 @@ index 0000000..ff6a50d + return 1; +} + -+unsigned char configure_mmc(mmc_card_data * mmc_card_cur) ++unsigned char configure_mmc(mmc_card_data *mmc_card_cur) +{ + unsigned char ret_val; + unsigned int argument; @@ -3808,9 +3419,8 @@ index 0000000..ff6a50d + + ret_val = mmc_init_setup(); + -+ if (ret_val != 1) { ++ if (ret_val != 1) + return ret_val; -+ } + + do { + ret_val = mmc_detect_card(mmc_card_cur); @@ -3827,9 +3437,8 @@ index 0000000..ff6a50d + ((unsigned int *) &Card_CSD)[1] = resp[1]; + ((unsigned int *) &Card_CSD)[0] = resp[0]; + -+ if (mmc_card_cur->card_type == MMC_CARD) { ++ if (mmc_card_cur->card_type == MMC_CARD) + mmc_card_cur->version = Card_CSD.spec_vers; -+ } + + trans_speed = Card_CSD.tran_speed; + @@ -3902,460 +3511,28 @@ index 0000000..ff6a50d + return 0; +} + -+int mmc_read(ulong src, uchar * dst, int size) ++int mmc_read(ulong src, uchar *dst, int size) +{ -+ /* not implemented */ -+ return (0); ++ return 0; +} + -+int mmc_write(uchar * src, ulong dst, int size) ++int mmc_write(uchar *src, ulong dst, int size) +{ -+ /* not implementd */ -+ return (0); ++ return 0; +} + +int mmc2info(ulong addr) +{ -+ /*not implemented */ -+ return (0); ++ return 0; +} -diff --git a/cpu/omap3/mmc_host_def.h b/cpu/omap3/mmc_host_def.h -new file mode 100644 -index 0000000..3a84f16 ---- /dev/null -+++ b/cpu/omap3/mmc_host_def.h -@@ -0,0 +1,164 @@ -+/* -+ * (C) Copyright 2008 -+ * Texas Instruments, <www.ti.com> -+ * Syed Mohammed Khasim <khasim@ti.com> -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation's version 2 of -+ * the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef MMC_HOST_DEFINITIONS_H -+#define MMC_HOST_DEFINITIONS_H -+ -+/* -+ * OMAP HSMMC register definitions -+ */ -+#define OMAP_HSMMC_SYSCONFIG (*(unsigned int *) 0x4809C010) -+#define OMAP_HSMMC_SYSSTATUS (*(unsigned int *) 0x4809C014) -+#define OMAP_HSMMC_CON (*(unsigned int *) 0x4809C02C) -+#define OMAP_HSMMC_BLK (*(unsigned int *) 0x4809C104) -+#define OMAP_HSMMC_ARG (*(unsigned int *) 0x4809C108) -+#define OMAP_HSMMC_CMD (*(unsigned int *) 0x4809C10C) -+#define OMAP_HSMMC_RSP10 (*(unsigned int *) 0x4809C110) -+#define OMAP_HSMMC_RSP32 (*(unsigned int *) 0x4809C114) -+#define OMAP_HSMMC_RSP54 (*(unsigned int *) 0x4809C118) -+#define OMAP_HSMMC_RSP76 (*(unsigned int *) 0x4809C11C) -+#define OMAP_HSMMC_DATA (*(unsigned int *) 0x4809C120) -+#define OMAP_HSMMC_PSTATE (*(unsigned int *) 0x4809C124) -+#define OMAP_HSMMC_HCTL (*(unsigned int *) 0x4809C128) -+#define OMAP_HSMMC_SYSCTL (*(unsigned int *) 0x4809C12C) -+#define OMAP_HSMMC_STAT (*(unsigned int *) 0x4809C130) -+#define OMAP_HSMMC_IE (*(unsigned int *) 0x4809C134) -+#define OMAP_HSMMC_CAPA (*(unsigned int *) 0x4809C140) -+ -+/* T2 Register definitions */ -+#define CONTROL_DEV_CONF0 (*(unsigned int *) 0x48002274) -+#define CONTROL_PBIAS_LITE (*(unsigned int *) 0x48002520) -+ -+/* -+ * OMAP HS MMC Bit definitions -+ */ -+#define MMC_SOFTRESET (0x1 << 1) -+#define RESETDONE (0x1 << 0) -+#define NOOPENDRAIN (0x0 << 0) -+#define OPENDRAIN (0x1 << 0) -+#define OD (0x1 << 0) -+#define INIT_NOINIT (0x0 << 1) -+#define INIT_INITSTREAM (0x1 << 1) -+#define HR_NOHOSTRESP (0x0 << 2) -+#define STR_BLOCK (0x0 << 3) -+#define MODE_FUNC (0x0 << 4) -+#define DW8_1_4BITMODE (0x0 << 5) -+#define MIT_CTO (0x0 << 6) -+#define CDP_ACTIVEHIGH (0x0 << 7) -+#define WPP_ACTIVEHIGH (0x0 << 8) -+#define RESERVED_MASK (0x3 << 9) -+#define CTPL_MMC_SD (0x0 << 11) -+#define BLEN_512BYTESLEN (0x200 << 0) -+#define NBLK_STPCNT (0x0 << 16) -+#define DE_DISABLE (0x0 << 0) -+#define BCE_DISABLE (0x0 << 1) -+#define ACEN_DISABLE (0x0 << 2) -+#define DDIR_OFFSET (4) -+#define DDIR_MASK (0x1 << 4) -+#define DDIR_WRITE (0x0 << 4) -+#define DDIR_READ (0x1 << 4) -+#define MSBS_SGLEBLK (0x0 << 5) -+#define RSP_TYPE_OFFSET (16) -+#define RSP_TYPE_MASK (0x3 << 16) -+#define RSP_TYPE_NORSP (0x0 << 16) -+#define RSP_TYPE_LGHT136 (0x1 << 16) -+#define RSP_TYPE_LGHT48 (0x2 << 16) -+#define RSP_TYPE_LGHT48B (0x3 << 16) -+#define CCCE_NOCHECK (0x0 << 19) -+#define CCCE_CHECK (0x1 << 19) -+#define CICE_NOCHECK (0x0 << 20) -+#define CICE_CHECK (0x1 << 20) -+#define DP_OFFSET (21) -+#define DP_MASK (0x1 << 21) -+#define DP_NO_DATA (0x0 << 21) -+#define DP_DATA (0x1 << 21) -+#define CMD_TYPE_NORMAL (0x0 << 22) -+#define INDEX_OFFSET (24) -+#define INDEX_MASK (0x3f << 24) -+#define INDEX(i) (i << 24) -+#define DATI_MASK (0x1 << 1) -+#define DATI_CMDDIS (0x1 << 1) -+#define DTW_1_BITMODE (0x0 << 1) -+#define DTW_4_BITMODE (0x1 << 1) -+#define SDBP_PWROFF (0x0 << 8) -+#define SDBP_PWRON (0x1 << 8) -+#define SDVS_1V8 (0x5 << 9) -+#define SDVS_3V0 (0x6 << 9) -+#define ICE_MASK (0x1 << 0) -+#define ICE_STOP (0x0 << 0) -+#define ICS_MASK (0x1 << 1) -+#define ICS_NOTREADY (0x0 << 1) -+#define ICE_OSCILLATE (0x1 << 0) -+#define CEN_MASK (0x1 << 2) -+#define CEN_DISABLE (0x0 << 2) -+#define CEN_ENABLE (0x1 << 2) -+#define CLKD_OFFSET (6) -+#define CLKD_MASK (0x3FF << 6) -+#define DTO_MASK (0xF << 16) -+#define DTO_15THDTO (0xE << 16) -+#define SOFTRESETALL (0x1 << 24) -+#define CC_MASK (0x1 << 0) -+#define TC_MASK (0x1 << 1) -+#define BWR_MASK (0x1 << 4) -+#define BRR_MASK (0x1 << 5) -+#define ERRI_MASK (0x1 << 15) -+#define IE_CC (0x01 << 0) -+#define IE_TC (0x01 << 1) -+#define IE_BWR (0x01 << 4) -+#define IE_BRR (0x01 << 5) -+#define IE_CTO (0x01 << 16) -+#define IE_CCRC (0x01 << 17) -+#define IE_CEB (0x01 << 18) -+#define IE_CIE (0x01 << 19) -+#define IE_DTO (0x01 << 20) -+#define IE_DCRC (0x01 << 21) -+#define IE_DEB (0x01 << 22) -+#define IE_CERR (0x01 << 28) -+#define IE_BADA (0x01 << 29) -+ -+#define VS30_3V0SUP (1 << 25) -+#define VS18_1V8SUP (1 << 26) -+ -+/* Driver definitions */ -+#define MMCSD_SECTOR_SIZE (512) -+#define MMC_CARD 0 -+#define SD_CARD 1 -+#define BYTE_MODE 0 -+#define SECTOR_MODE 1 -+#define CLK_INITSEQ 0 -+#define CLK_400KHZ 1 -+#define CLK_MISC 2 -+ -+typedef struct { -+ unsigned int card_type; -+ unsigned int version; -+ unsigned int mode; -+ unsigned int size; -+ unsigned int RCA; -+} mmc_card_data; -+ -+#define mmc_reg_out(addr, mask, val) (addr) = ( ((addr)) & (~(mask)) ) | ( (val) & (mask) ); -+#define mmc_reg_out(addr, mask, val) (addr) = ( ((addr)) & (~(mask)) ) | ( (val) & (mask) ); -+ -+#endif /* MMC_HOST_DEFINITIONS_H */ -diff --git a/cpu/omap3/mmc_protocol.h b/cpu/omap3/mmc_protocol.h -new file mode 100644 -index 0000000..a8d9662 ---- /dev/null -+++ b/cpu/omap3/mmc_protocol.h -@@ -0,0 +1,253 @@ -+/* -+ * (C) Copyright 2008 -+ * Texas Instruments, <www.ti.com> -+ * Syed Mohammed Khasim <khasim@ti.com> -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation's version 2 of -+ * the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef MMC_PROTOCOL_H -+#define MMC_PROTOCOL_H -+ -+#include "mmc_host_def.h" -+ -+/* Responses */ -+#define RSP_TYPE_NONE (RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK) -+#define RSP_TYPE_R1 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) -+#define RSP_TYPE_R1B (RSP_TYPE_LGHT48B | CCCE_CHECK | CICE_CHECK) -+#define RSP_TYPE_R2 (RSP_TYPE_LGHT136 | CCCE_CHECK | CICE_NOCHECK) -+#define RSP_TYPE_R3 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK) -+#define RSP_TYPE_R4 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK) -+#define RSP_TYPE_R5 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) -+#define RSP_TYPE_R6 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) -+#define RSP_TYPE_R7 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) -+ -+/* All supported commands */ -+#define MMC_CMD0 ( INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD1 ( INDEX(1) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD2 ( INDEX(2) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD3 ( INDEX(3) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_SDCMD3 ( INDEX(3) | RSP_TYPE_R6 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD4 ( INDEX(4) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD6 ( INDEX(6) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD7_SELECT ( INDEX(7) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD7_DESELECT ( INDEX(7) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD8 ( INDEX(8) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) -+#define MMC_SDCMD8 ( INDEX(8) | RSP_TYPE_R7 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD9 ( INDEX(9) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD12 ( INDEX(12) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD13 ( INDEX(13) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD15 ( INDEX(15) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD16 ( INDEX(16) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_CMD17 ( INDEX(17) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) -+#define MMC_CMD24 ( INDEX(24) | RSP_TYPE_R1 | DP_DATA | DDIR_WRITE) -+#define MMC_ACMD6 ( INDEX(6) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_ACMD41 ( INDEX(41) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE) -+#define MMC_ACMD51 ( INDEX(51) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) -+#define MMC_CMD55 ( INDEX(55) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) -+ -+#define MMC_AC_CMD_RCA_MASK (unsigned int)(0xFFFF << 16) -+#define MMC_BC_CMD_DSR_MASK (unsigned int)(0xFFFF << 16) -+#define MMC_DSR_DEFAULT (0x0404) -+#define SD_CMD8_CHECK_PATTERN (0xAA) -+#define SD_CMD8_2_7_3_6_V_RANGE (0x01 << 8) -+ -+/* Clock Configurations and Macros */ -+ -+#define MMC_CLOCK_REFERENCE (96) -+#define MMC_RELATIVE_CARD_ADDRESS (0x1234) -+#define MMC_INIT_SEQ_CLK (MMC_CLOCK_REFERENCE * 1000 / 80) -+#define MMC_400kHz_CLK (MMC_CLOCK_REFERENCE * 1000 / 400) -+#define CLKDR(r,f,u) ( ( ((r)*100) / ((f)*(u)) ) + 1 ) -+#define CLKD(f,u) (CLKDR(MMC_CLOCK_REFERENCE,f,u)) -+ -+#define MMC_OCR_REG_ACCESS_MODE_MASK (0x3 << 29) -+#define MMC_OCR_REG_ACCESS_MODE_BYTE (0x0 << 29) -+#define MMC_OCR_REG_ACCESS_MODE_SECTOR (0x2 << 29) -+ -+#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_MASK (0x1 << 30) -+#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_BYTE (0x0 << 30) -+#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR (0x1 << 30) -+ -+#define MMC_SD2_CSD_C_SIZE_LSB_MASK (0xFFFF) -+#define MMC_SD2_CSD_C_SIZE_MSB_MASK (0x003F) -+#define MMC_SD2_CSD_C_SIZE_MSB_OFFSET (16) -+#define MMC_CSD_C_SIZE_LSB_MASK (0x0003) -+#define MMC_CSD_C_SIZE_MSB_MASK (0x03FF) -+#define MMC_CSD_C_SIZE_MSB_OFFSET (2) -+ -+#define MMC_CSD_TRAN_SPEED_UNIT_MASK (0x07 << 0) -+#define MMC_CSD_TRAN_SPEED_FACTOR_MASK (0x0F << 3) -+#define MMC_CSD_TRAN_SPEED_UNIT_100MHZ (0x3 << 0) -+#define MMC_CSD_TRAN_SPEED_FACTOR_1_0 (0x01 << 3) -+#define MMC_CSD_TRAN_SPEED_FACTOR_8_0 (0x0F << 3) -+ -+const unsigned short mmc_transspeed_val[15][4] = { -+ {CLKD(10, 1), CLKD(10, 10), CLKD(10, 100), CLKD(10, 1000)}, -+ {CLKD(12, 1), CLKD(12, 10), CLKD(12, 100), CLKD(12, 1000)}, -+ {CLKD(13, 1), CLKD(13, 10), CLKD(13, 100), CLKD(13, 1000)}, -+ {CLKD(15, 1), CLKD(15, 10), CLKD(15, 100), CLKD(15, 1000)}, -+ {CLKD(20, 1), CLKD(20, 10), CLKD(20, 100), CLKD(20, 1000)}, -+ {CLKD(26, 1), CLKD(26, 10), CLKD(26, 100), CLKD(26, 1000)}, -+ {CLKD(30, 1), CLKD(30, 10), CLKD(30, 100), CLKD(30, 1000)}, -+ {CLKD(35, 1), CLKD(35, 10), CLKD(35, 100), CLKD(35, 1000)}, -+ {CLKD(40, 1), CLKD(40, 10), CLKD(40, 100), CLKD(40, 1000)}, -+ {CLKD(45, 1), CLKD(45, 10), CLKD(45, 100), CLKD(45, 1000)}, -+ {CLKD(52, 1), CLKD(52, 10), CLKD(52, 100), CLKD(52, 1000)}, -+ {CLKD(55, 1), CLKD(55, 10), CLKD(55, 100), CLKD(55, 1000)}, -+ {CLKD(60, 1), CLKD(60, 10), CLKD(60, 100), CLKD(60, 1000)}, -+ {CLKD(70, 1), CLKD(70, 10), CLKD(70, 100), CLKD(70, 1000)}, -+ {CLKD(80, 1), CLKD(80, 10), CLKD(80, 100), CLKD(80, 1000)} -+}; -+ -+typedef struct { -+ unsigned not_used:1; -+ unsigned crc:7; -+ unsigned ecc:2; -+ unsigned file_format:2; -+ unsigned tmp_write_protect:1; -+ unsigned perm_write_protect:1; -+ unsigned copy:1; -+ unsigned file_format_grp:1; -+ unsigned content_prot_app:1; -+ unsigned reserved_1:4; -+ unsigned write_bl_partial:1; -+ unsigned write_bl_len:4; -+ unsigned r2w_factor:3; -+ unsigned default_ecc:2; -+ unsigned wp_grp_enable:1; -+ unsigned wp_grp_size:5; -+ unsigned erase_grp_mult:5; -+ unsigned erase_grp_size:5; -+ unsigned c_size_mult:3; -+ unsigned vdd_w_curr_max:3; -+ unsigned vdd_w_curr_min:3; -+ unsigned vdd_r_curr_max:3; -+ unsigned vdd_r_curr_min:3; -+ unsigned c_size_lsb:2; -+ unsigned c_size_msb:10; -+ unsigned reserved_2:2; -+ unsigned dsr_imp:1; -+ unsigned read_blk_misalign:1; -+ unsigned write_blk_misalign:1; -+ unsigned read_bl_partial:1; -+ unsigned read_bl_len:4; -+ unsigned ccc:12; -+ unsigned tran_speed:8; -+ unsigned nsac:8; -+ unsigned taac:8; -+ unsigned reserved_3:2; -+ unsigned spec_vers:4; -+ unsigned csd_structure:2; -+} mmc_csd_reg_t; -+ -+/* csd for sd2.0 */ -+typedef struct { -+ unsigned not_used:1; -+ unsigned crc:7; -+ unsigned reserved_1:2; -+ unsigned file_format:2; -+ unsigned tmp_write_protect:1; -+ unsigned perm_write_protect:1; -+ unsigned copy:1; -+ unsigned file_format_grp:1; -+ unsigned reserved_2:5; -+ unsigned write_bl_partial:1; -+ unsigned write_bl_len:4; -+ unsigned r2w_factor:3; -+ unsigned reserved_3:2; -+ unsigned wp_grp_enable:1; -+ unsigned wp_grp_size:7; -+ unsigned sector_size:7; -+ unsigned erase_blk_len:1; -+ unsigned reserved_4:1; -+ unsigned c_size_lsb:16; -+ unsigned c_size_msb:6; -+ unsigned reserved_5:6; -+ unsigned dsr_imp:1; -+ unsigned read_blk_misalign:1; -+ unsigned write_blk_misalign:1; -+ unsigned read_bl_partial:1; -+ unsigned read_bl_len:4; -+ unsigned ccc:12; -+ unsigned tran_speed:8; -+ unsigned nsac:8; -+ unsigned taac:8; -+ unsigned reserved_6:6; -+ unsigned csd_structure:2; -+} mmc_sd2_csd_reg_t; -+ -+/* extended csd - 512 bytes long */ -+typedef struct { -+ unsigned char reserved_1[181]; -+ unsigned char erasedmemorycontent; -+ unsigned char reserved_2; -+ unsigned char buswidthmode; -+ unsigned char reserved_3; -+ unsigned char highspeedinterfacetiming; -+ unsigned char reserved_4; -+ unsigned char powerclass; -+ unsigned char reserved_5; -+ unsigned char commandsetrevision; -+ unsigned char reserved_6; -+ unsigned char commandset; -+ unsigned char extendedcsdrevision; -+ unsigned char reserved_7; -+ unsigned char csdstructureversion; -+ unsigned char reserved_8; -+ unsigned char cardtype; -+ unsigned char reserved_9[3]; -+ unsigned char powerclass_52mhz_1_95v; -+ unsigned char powerclass_26mhz_1_95v; -+ unsigned char powerclass_52mhz_3_6v; -+ unsigned char powerclass_26mhz_3_6v; -+ unsigned char reserved_10; -+ unsigned char minreadperf_4b_26mhz; -+ unsigned char minwriteperf_4b_26mhz; -+ unsigned char minreadperf_8b_26mhz_4b_52mhz; -+ unsigned char minwriteperf_8b_26mhz_4b_52mhz; -+ unsigned char minreadperf_8b_52mhz; -+ unsigned char minwriteperf_8b_52mhz; -+ unsigned char reserved_11; -+ unsigned int sectorcount; -+ unsigned char reserved_12[288]; -+ unsigned char supportedcommandsets; -+ unsigned char reserved_13[7]; -+} mmc_extended_csd_reg_t; -+ -+/* mmc sd responce */ -+typedef struct { -+ unsigned int ocr; -+} mmc_resp_r3; -+ -+typedef struct { -+ unsigned short cardstatus; -+ unsigned short newpublishedrca; -+} mmc_resp_r6; -+ -+extern mmc_card_data mmc_dev; -+ -+unsigned char mmc_lowlevel_init(void); -+unsigned char mmc_send_command(unsigned int cmd, unsigned int arg, -+ unsigned int *response); -+unsigned char mmc_setup_clock(unsigned int iclk, unsigned short clkd); -+unsigned char mmc_set_opendrain(unsigned char state); -+unsigned char mmc_read_data(unsigned int *output_buf); -+ -+#endif /*MMC_PROTOCOL_H */ diff --git a/cpu/omap3/start.S b/cpu/omap3/start.S new file mode 100644 -index 0000000..065b3c7 +index 0000000..98706ad --- /dev/null +++ b/cpu/omap3/start.S -@@ -0,0 +1,484 @@ +@@ -0,0 +1,517 @@ +/* -+ * armboot - Startup Code for OMAP3430/ARM Cortex CPU-core ++ * armboot - Startup Code for OMAP3530/ARM Cortex CPU-core + * + * Copyright (c) 2004 Texas Instruments <r-woodruff2@ti.com> + * @@ -4364,7 +3541,7 @@ index 0000000..065b3c7 + * Copyright (c) 2002 Gary Jennejohn <gj@denx.de> + * Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com> + * Copyright (c) 2003 Kshitij <kshitij@ti.com> -+ * Copyright (c) 2006 Syed Mohammed Khasim <x0khasim@ti.com> ++ * Copyright (c) 2006-2008 Syed Mohammed Khasim <x0khasim@ti.com> + * + * See file CREDITS for list of people who contributed to this + * project. @@ -4387,9 +3564,7 @@ index 0000000..065b3c7 + +#include <config.h> +#include <version.h> -+#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) -+#include <asm/arch/cpu.h> -+#endif ++ +.globl _start +_start: b reset + ldr pc, _undefined_instruction @@ -4412,8 +3587,7 @@ index 0000000..065b3c7 +_end_vect: + + .balignl 16,0xdeadbeef -+/* -+ ************************************************************************* ++/************************************************************************* + * + * Startup Code (reset vector) + * @@ -4422,8 +3596,7 @@ index 0000000..065b3c7 + * relocate armboot to ram + * setup stack + * -+ ************************************************************************* -+ */ ++ *************************************************************************/ + +_TEXT_BASE: + .word TEXT_BASE @@ -4470,95 +3643,93 @@ index 0000000..065b3c7 + +#if (CONFIG_OMAP34XX) + /* Copy vectors to mask ROM indirect addr */ -+ adr r0, _start /* r0 <- current position of code */ -+ add r0, r0, #4 /* skip reset vector */ -+ mov r2, #64 /* r2 <- size to copy */ -+ add r2, r0, r2 /* r2 <- source end address */ -+ mov r1, #SRAM_OFFSET0 /* build vect addr */ ++ adr r0, _start @ r0 <- current position of code ++ add r0, r0, #4 @ skip reset vector ++ mov r2, #64 @ r2 <- size to copy ++ add r2, r0, r2 @ r2 <- source end address ++ mov r1, #SRAM_OFFSET0 @ build vect addr + mov r3, #SRAM_OFFSET1 + add r1, r1, r3 + mov r3, #SRAM_OFFSET2 + add r1, r1, r3 +next: -+ ldmia r0!, {r3-r10} /* copy from source address [r0] */ -+ stmia r1!, {r3-r10} /* copy to target address [r1] */ -+ cmp r0, r2 /* until source end address [r2] */ -+ bne next /* loop until equal */ ++ ldmia r0!, {r3-r10} @ copy from source address [r0] ++ stmia r1!, {r3-r10} @ copy to target address [r1] ++ cmp r0, r2 @ until source end address [r2] ++ bne next @ loop until equal */ +#if !defined(CFG_NAND_BOOT) && !defined(CFG_ONENAND_BOOT) + /* No need to copy/exec the clock code - DPLL adjust already done + * in NAND/oneNAND Boot. + */ -+ bl cpy_clk_code /* put dpll adjust code behind vectors */ ++ bl cpy_clk_code @ put dpll adjust code behind vectors +#endif /* NAND Boot */ -+#endif /* 24xx */ ++#endif + /* the mask ROM code should have PLL and others stable */ +#ifndef CONFIG_SKIP_LOWLEVEL_INIT + bl cpu_init_crit +#endif + +#ifndef CONFIG_SKIP_RELOCATE_UBOOT -+relocate: /* relocate U-Boot to RAM */ -+ adr r0, _start /* r0 <- current position of code */ -+ ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ -+ cmp r0, r1 /* don't reloc during debug */ ++relocate: @ relocate U-Boot to RAM ++ adr r0, _start @ r0 <- current position of code ++ ldr r1, _TEXT_BASE @ test if we run from flash or RAM ++ cmp r0, r1 @ don't reloc during debug + beq stack_setup + + ldr r2, _armboot_start + ldr r3, _bss_start -+ sub r2, r3, r2 /* r2 <- size of armboot */ -+ add r2, r0, r2 /* r2 <- source end address */ ++ sub r2, r3, r2 @ r2 <- size of armboot ++ add r2, r0, r2 @ r2 <- source end address + -+copy_loop: /* copy 32 bytes at a time */ -+ ldmia r0!, {r3-r10} /* copy from source address [r0] */ -+ stmia r1!, {r3-r10} /* copy to target address [r1] */ -+ cmp r0, r2 /* until source end addreee [r2] */ ++copy_loop: @ copy 32 bytes at a time ++ ldmia r0!, {r3-r10} @ copy from source address [r0] ++ stmia r1!, {r3-r10} @ copy to target address [r1] ++ cmp r0, r2 @ until source end addreee [r2] + ble copy_loop +#endif /* CONFIG_SKIP_RELOCATE_UBOOT */ + -+ /* Set up the stack */ ++ /* Set up the stack */ +stack_setup: -+ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ -+ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ -+ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ ++ ldr r0, _TEXT_BASE @ upper 128 KiB: relocated uboot ++ sub r0, r0, #CFG_MALLOC_LEN @ malloc area ++ sub r0, r0, #CFG_GBL_DATA_SIZE @ bdinfo +#ifdef CONFIG_USE_IRQ + sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) +#endif -+ sub sp, r0, #12 /* leave 3 words for abort-stack */ -+ and sp, sp, #~7 /* 8 byte alinged for (ldr/str)d */ ++ sub sp, r0, #12 @ leave 3 words for abort-stack ++ and sp, sp, #~7 @ 8 byte alinged for (ldr/str)d + + /* Clear BSS (if any). Is below tx (watch load addr - need space) */ +clear_bss: -+ ldr r0, _bss_start /* find start of bss segment */ -+ ldr r1, _bss_end /* stop here */ -+ mov r2, #0x00000000 /* clear value */ ++ ldr r0, _bss_start @ find start of bss segment ++ ldr r1, _bss_end @ stop here ++ mov r2, #0x00000000 @ clear value +clbss_l: -+ str r2, [r0] /* clear BSS location */ -+ cmp r0, r1 /* are we at the end yet */ -+ add r0, r0, #4 /* increment clear index pointer */ -+ bne clbss_l /* keep clearing till at end */ ++ str r2, [r0] @ clear BSS location ++ cmp r0, r1 @ are we at the end yet ++ add r0, r0, #4 @ increment clear index pointer ++ bne clbss_l @ keep clearing till at end + -+ ldr pc, _start_armboot /* jump to C code */ ++ ldr pc, _start_armboot @ jump to C code + +_start_armboot: .word start_armboot + + -+/* -+ ************************************************************************* ++/************************************************************************* + * + * CPU_init_critical registers + * + * setup important registers + * setup memory timing + * -+ ************************************************************************* -+ */ ++ *************************************************************************/ +cpu_init_crit: + /* + * Invalidate L1 I/D + */ -+ mov r0, #0 /* set up for MCR */ -+ mcr p15, 0, r0, c8, c7, 0 /* invalidate TLBs */ -+ mcr p15, 0, r0, c7, c5, 0 /* invalidate icache */ ++ mov r0, #0 @ set up for MCR ++ mcr p15, 0, r0, c8, c7, 0 @ invalidate TLBs ++ mcr p15, 0, r0, c7, c5, 0 @ invalidate icache + + /* + * disable MMU stuff and caches @@ -4571,13 +3742,15 @@ index 0000000..065b3c7 + mcr p15, 0, r0, c1, c0, 0 + + /* -+ * Jump to board specific initialization... The Mask ROM will have already initialized -+ * basic memory. Go here to bump up clock rate and handle wake up conditions. ++ * Jump to board specific initialization... ++ * The Mask ROM will have already initialized ++ * basic memory. Go here to bump up clock rate and handle ++ * wake up conditions. + */ -+ mov ip, lr /* persevere link reg across call */ -+ bl lowlevel_init /* go setup pll,mux,memory */ -+ mov lr, ip /* restore link */ -+ mov pc, lr /* back to my caller */ ++ mov ip, lr @ persevere link reg across call ++ bl lowlevel_init @ go setup pll,mux,memory ++ mov lr, ip @ restore link ++ mov pc, lr @ back to my caller +/* + ************************************************************************* + * @@ -4619,25 +3792,32 @@ index 0000000..065b3c7 + */ + + .macro bad_save_user_regs -+ sub sp, sp, #S_FRAME_SIZE @ carve out a frame on current user stack -+ stmia sp, {r0 - r12} @ Save user registers (now in svc mode) r0-r12 ++ sub sp, sp, #S_FRAME_SIZE @ carve out a frame on current ++ @ user stack ++ stmia sp, {r0 - r12} @ Save user registers (now in ++ @ svc mode) r0-r12 + + ldr r2, _armboot_start + sub r2, r2, #(CFG_MALLOC_LEN) -+ sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort stack -+ ldmia r2, {r2 - r3} @ get values for "aborted" pc and cpsr (into parm regs) ++ sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort ++ @ stack ++ ldmia r2, {r2 - r3} @ get values for "aborted" pc ++ @ and cpsr (into parm regs) + add r0, sp, #S_FRAME_SIZE @ grab pointer to old stack + + add r5, sp, #S_SP + mov r1, lr + stmia r5, {r0 - r3} @ save sp_SVC, lr_SVC, pc, cpsr -+ mov r0, sp @ save current stack into r0 (param register) ++ mov r0, sp @ save current stack into r0 ++ @ (param register) + .endm + + .macro irq_save_user_regs + sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ Calling r0-r12 -+ add r8, sp, #S_PC @ !!!! R8 NEEDS to be saved !!!! a reserved stack spot would be good. ++ add r8, sp, #S_PC @ !! R8 NEEDS to be saved !! ++ @ a reserved stack spot would ++ @ be good. + stmdb r8, {sp, lr}^ @ Calling SP, LR + str lr, [r8, #0] @ Save calling PC + mrs r6, spsr @@ -4651,34 +3831,45 @@ index 0000000..065b3c7 + mov r0, r0 + ldr lr, [sp, #S_PC] @ Get PC + add sp, sp, #S_FRAME_SIZE -+ subs pc, lr, #4 @ return & move spsr_svc into cpsr ++ subs pc, lr, #4 @ return & move spsr_svc into ++ @ cpsr + .endm + + .macro get_bad_stack -+ ldr r13, _armboot_start @ setup our mode stack (enter in banked mode) ++ ldr r13, _armboot_start @ setup our mode stack (enter ++ @ in banked mode) + sub r13, r13, #(CFG_MALLOC_LEN) @ move past malloc pool -+ sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ move to reserved a couple spots for abort stack ++ sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ move to reserved a couple ++ @ spots for abort stack + -+ str lr, [r13] @ save caller lr in position 0 of saved stack ++ str lr, [r13] @ save caller lr in position 0 ++ @ of saved stack + mrs lr, spsr @ get the spsr -+ str lr, [r13, #4] @ save spsr in position 1 of saved stack ++ str lr, [r13, #4] @ save spsr in position 1 of ++ @ saved stack + + mov r13, #MODE_SVC @ prepare SVC-Mode + @ msr spsr_c, r13 -+ msr spsr, r13 @ switch modes, make sure moves will execute ++ msr spsr, r13 @ switch modes, make sure ++ @ moves will execute + mov lr, pc @ capture return pc -+ movs pc, lr @ jump to next instruction & switch modes. ++ movs pc, lr @ jump to next instruction & ++ @ switch modes. + .endm + + .macro get_bad_stack_swi -+ sub r13, r13, #4 @ space on current stack for scratch reg. ++ sub r13, r13, #4 @ space on current stack for ++ @ scratch reg. + str r0, [r13] @ save R0's value. + ldr r0, _armboot_start @ get data regions start + sub r0, r0, #(CFG_MALLOC_LEN) @ move past malloc pool -+ sub r0, r0, #(CFG_GBL_DATA_SIZE+8) @ move past gbl and a couple spots for abort stack -+ str lr, [r0] @ save caller lr in position 0 of saved stack ++ sub r0, r0, #(CFG_GBL_DATA_SIZE+8) @ move past gbl and a couple ++ @ spots for abort stack ++ str lr, [r0] @ save caller lr in position 0 ++ @ of saved stack + mrs r0, spsr @ get the spsr -+ str lr, [r0, #4] @ save spsr in position 1 of saved stack ++ str lr, [r0, #4] @ save spsr in position 1 of ++ @ saved stack + ldr r0, [r13] @ restore r0 + add r13, r13, #4 @ pop stack entry + .endm @@ -4759,8 +3950,8 @@ index 0000000..065b3c7 + .align 5 +.global arm_cache_flush +arm_cache_flush: -+ mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache -+ mov pc, lr @ back to caller ++ mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache ++ mov pc, lr @ back to caller + +/* + * v7_flush_dcache_all() @@ -4777,37 +3968,54 @@ index 0000000..065b3c7 + stmfd r13!, {r0-r5, r7, r9-r12,r14} + + mov r7, r0 @ take a backup of device type -+ cmp r0, #0x3 @ check if the device type is GP -+ moveq r12, #0x1 @ set up to invalide L2 ++ cmp r0, #0x3 @ check if the device type is ++ @ GP ++ moveq r12, #0x1 @ set up to invalide L2 +smi: .word 0x01600070 @ Call SMI monitor (smieq) -+ cmp r7, #0x3 @ compare again in case its lost -+ beq finished_inval @ if GP device, inval done above ++ cmp r7, #0x3 @ compare again in case its ++ @ lost ++ beq finished_inval @ if GP device, inval done ++ @ above + + mrc p15, 1, r0, c0, c0, 1 @ read clidr + ands r3, r0, #0x7000000 @ extract loc from clidr + mov r3, r3, lsr #23 @ left align loc bit field -+ beq finished_inval @ if loc is 0, then no need to clean ++ beq finished_inval @ if loc is 0, then no need to ++ @ clean + mov r10, #0 @ start clean at cache level 0 +inval_loop1: -+ add r2, r10, r10, lsr #1 @ work out 3x current cache level -+ mov r1, r0, lsr r2 @ extract cache type bits from clidr -+ and r1, r1, #7 @ mask of the bits for current cache only -+ cmp r1, #2 @ see what cache we have at this level -+ blt skip_inval @ skip if no cache, or just i-cache -+ mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr -+ isb @ isb to sych the new cssr&csidr ++ add r2, r10, r10, lsr #1 @ work out 3x current cache ++ @ level ++ mov r1, r0, lsr r2 @ extract cache type bits from ++ @ clidr ++ and r1, r1, #7 @ mask of the bits for current ++ @ cache only ++ cmp r1, #2 @ see what cache we have at ++ @ this level ++ blt skip_inval @ skip if no cache, or just ++ @ i-cache ++ mcr p15, 2, r10, c0, c0, 0 @ select current cache level ++ @ in cssr ++ isb @ isb to sych the new ++ @ cssr&csidr + mrc p15, 1, r1, c0, c0, 0 @ read the new csidr -+ and r2, r1, #7 @ extract the length of the cache lines ++ and r2, r1, #7 @ extract the length of the ++ @ cache lines + add r2, r2, #4 @ add 4 (line length offset) + ldr r4, =0x3ff -+ ands r4, r4, r1, lsr #3 @ find maximum number on the way size -+ clz r5, r4 @ find bit position of way size increment ++ ands r4, r4, r1, lsr #3 @ find maximum number on the ++ @ way size ++ clz r5, r4 @ find bit position of way ++ @ size increment + ldr r7, =0x7fff -+ ands r7, r7, r1, lsr #13 @ extract max number of the index size ++ ands r7, r7, r1, lsr #13 @ extract max number of the ++ @ index size +inval_loop2: -+ mov r9, r4 @ create working copy of max way size ++ mov r9, r4 @ create working copy of max ++ @ way size +inval_loop3: -+ orr r11, r10, r9, lsl r5 @ factor way and cache number into r11 ++ orr r11, r10, r9, lsl r5 @ factor way and cache number ++ @ into r11 + orr r11, r11, r7, lsl r2 @ factor index number into r11 + mcr p15, 0, r11, c7, c6, 2 @ invalidate by set/way + subs r9, r9, #1 @ decrement the way @@ -4820,18 +4028,20 @@ index 0000000..065b3c7 + bgt inval_loop1 +finished_inval: + mov r10, #0 @ swith back to cache level 0 -+ mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr ++ mcr p15, 2, r10, c0, c0, 0 @ select current cache level ++ @ in cssr + isb -+ ++ + ldmfd r13!, {r0-r5, r7, r9-r12,pc} -+ ++ + + .align 5 +.global reset_cpu +reset_cpu: -+ ldr r1, rstctl /* get addr for global reset reg */ -+ mov r3, #0x2 /* full reset pll+mpu */ -+ str r3, [r1] /* force reset */ ++ ldr r1, rstctl @ get addr for global reset ++ @ reg ++ mov r3, #0x2 @ full reset pll + mpu ++ str r3, [r1] @ force reset + mov r0, r0 +_loop_forever: + b _loop_forever @@ -5165,12 +4375,12 @@ index 0000000..9bb4700 +#endif /* endif _CLOCKS_OMAP3_H_ */ diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h new file mode 100644 -index 0000000..5bb9faa +index 0000000..d47defb --- /dev/null +++ b/include/asm-arm/arch-omap3/cpu.h -@@ -0,0 +1,245 @@ +@@ -0,0 +1,250 @@ +/* -+ * (C) Copyright 2006 ++ * (C) Copyright 2006-2008 + * Texas Instruments, <www.ti.com> + * + * See file CREDITS for list of people who contributed to this @@ -5193,9 +4403,8 @@ index 0000000..5bb9faa + * + */ + -+#ifndef _OMAP34XX_CPU_H -+#define _OMAP34XX_CPU_H -+#include <asm/arch/omap3.h> ++#ifndef _CPU_H ++#define _CPU_H + +/* Register offsets of common modules */ +/* Control */ @@ -5252,13 +4461,18 @@ index 0000000..5bb9faa +#define GPMC_ECC9_RESULT (0x220) + +/* GPMC Mapping */ -+# define FLASH_BASE 0x10000000 /* NOR flash (aligned to 256 Meg) */ -+# define FLASH_BASE_SDPV1 0x04000000 /* NOR flash (aligned to 64 Meg) */ -+# define FLASH_BASE_SDPV2 0x10000000 /* NOR flash (aligned to 256 Meg) */ ++# define FLASH_BASE 0x10000000 /* NOR flash, */ ++ /* aligned to 256 Meg */ ++# define FLASH_BASE_SDPV1 0x04000000 /* NOR flash, */ ++ /* aligned to 64 Meg */ ++# define FLASH_BASE_SDPV2 0x10000000 /* NOR flash, */ ++ /* aligned to 256 Meg */ +# define DEBUG_BASE 0x08000000 /* debug board */ -+# define NAND_BASE 0x30000000 /* NAND addr (actual size small port) */ ++# define NAND_BASE 0x30000000 /* NAND addr */ ++ /* (actual size small port) */ +# define PISMO2_BASE 0x18000000 /* PISMO2 CS1/2 */ -+# define ONENAND_MAP 0x20000000 /* OneNand addr (actual size small port */ ++# define ONENAND_MAP 0x20000000 /* OneNand addr */ ++ /* (actual size small port) */ + +/* SMS */ +#define SMS_SYSCONFIG (OMAP34XX_SMS_BASE+0x10) @@ -5322,7 +4536,8 @@ index 0000000..5bb9faa +#define TCAR1 0x3c /* r */ +#define TSICR 0x40 /* rw */ +#define TCAR2 0x44 /* r */ -+#define GPT_EN ((0<<2)|BIT1|BIT0) /* enable sys_clk NO-prescale /1 */ ++ /* enable sys_clk NO-prescale /1 */ ++#define GPT_EN ((0<<2)|BIT1|BIT0) + +/* Watchdog */ +#define WWPS 0x34 /* r */ @@ -5413,15 +4628,15 @@ index 0000000..5bb9faa +#define I2C_BASE2 (OMAP34XX_CORE_L4_IO_BASE + 0x72000) +#define I2C_BASE3 (OMAP34XX_CORE_L4_IO_BASE + 0x60000) + -+#endif ++#endif /* _CPU_H */ diff --git a/include/asm-arm/arch-omap3/i2c.h b/include/asm-arm/arch-omap3/i2c.h new file mode 100644 -index 0000000..1b8524e +index 0000000..5fb0979 --- /dev/null +++ b/include/asm-arm/arch-omap3/i2c.h -@@ -0,0 +1,130 @@ +@@ -0,0 +1,128 @@ +/* -+ * (C) Copyright 2004-2006 ++ * (C) Copyright 2004-2008 + * Texas Instruments, <www.ti.com> + * + * See file CREDITS for list of people who contributed to this @@ -5442,11 +4657,8 @@ index 0000000..1b8524e + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ -+#ifndef _OMAP34XX_I2C_H_ -+#define _OMAP34XX_I2C_H_ -+ -+/* Get the i2c base addresses */ -+#include <asm/arch/cpu.h> ++#ifndef _I2C_H_ ++#define _I2C_H_ + +#define I2C_DEFAULT_BASE I2C_BASE1 + @@ -5470,25 +4682,25 @@ index 0000000..1b8524e + +/* I2C Interrupt Enable Register (I2C_IE): */ +#define I2C_IE_GC_IE (1 << 5) -+#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */ -+#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */ -+#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */ -+#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */ -+#define I2C_IE_AL_IE (1 << 0) /* Arbitration lost interrupt enable */ ++#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */ ++#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */ ++#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */ ++#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */ ++#define I2C_IE_AL_IE (1 << 0) /* Arbitration lost interrupt enable */ + +/* I2C Status Register (I2C_STAT): */ + -+#define I2C_STAT_SBD (1 << 15) /* Single byte data */ -+#define I2C_STAT_BB (1 << 12) /* Bus busy */ -+#define I2C_STAT_ROVR (1 << 11) /* Receive overrun */ -+#define I2C_STAT_XUDF (1 << 10) /* Transmit underflow */ -+#define I2C_STAT_AAS (1 << 9) /* Address as slave */ ++#define I2C_STAT_SBD (1 << 15) /* Single byte data */ ++#define I2C_STAT_BB (1 << 12) /* Bus busy */ ++#define I2C_STAT_ROVR (1 << 11) /* Receive overrun */ ++#define I2C_STAT_XUDF (1 << 10) /* Transmit underflow */ ++#define I2C_STAT_AAS (1 << 9) /* Address as slave */ +#define I2C_STAT_GC (1 << 5) -+#define I2C_STAT_XRDY (1 << 4) /* Transmit data ready */ -+#define I2C_STAT_RRDY (1 << 3) /* Receive data ready */ -+#define I2C_STAT_ARDY (1 << 2) /* Register access ready */ -+#define I2C_STAT_NACK (1 << 1) /* No acknowledgment interrupt enable */ -+#define I2C_STAT_AL (1 << 0) /* Arbitration lost interrupt enable */ ++#define I2C_STAT_XRDY (1 << 4) /* Transmit data ready */ ++#define I2C_STAT_RRDY (1 << 3) /* Receive data ready */ ++#define I2C_STAT_ARDY (1 << 2) /* Register access ready */ ++#define I2C_STAT_NACK (1 << 1) /* No acknowledgment interrupt enable */ ++#define I2C_STAT_AL (1 << 0) /* Arbitration lost interrupt enable */ + +/* I2C Interrupt Code Register (I2C_INTCODE): */ + @@ -5502,30 +4714,31 @@ index 0000000..1b8524e + +/* I2C Buffer Configuration Register (I2C_BUF): */ + -+#define I2C_BUF_RDMA_EN (1 << 15) /* Receive DMA channel enable */ -+#define I2C_BUF_XDMA_EN (1 << 7) /* Transmit DMA channel enable */ ++#define I2C_BUF_RDMA_EN (1 << 15) /* Receive DMA channel enable */ ++#define I2C_BUF_XDMA_EN (1 << 7) /* Transmit DMA channel enable */ + +/* I2C Configuration Register (I2C_CON): */ + -+#define I2C_CON_EN (1 << 15) /* I2C module enable */ -+#define I2C_CON_BE (1 << 14) /* Big endian mode */ -+#define I2C_CON_STB (1 << 11) /* Start byte mode (master mode only) */ -+#define I2C_CON_MST (1 << 10) /* Master/slave mode */ -+#define I2C_CON_TRX (1 << 9) /* Transmitter/receiver mode (master mode only) */ -+#define I2C_CON_XA (1 << 8) /* Expand address */ -+#define I2C_CON_STP (1 << 1) /* Stop condition (master mode only) */ -+#define I2C_CON_STT (1 << 0) /* Start condition (master mode only) */ ++#define I2C_CON_EN (1 << 15) /* I2C module enable */ ++#define I2C_CON_BE (1 << 14) /* Big endian mode */ ++#define I2C_CON_STB (1 << 11) /* Start byte mode (master mode only) */ ++#define I2C_CON_MST (1 << 10) /* Master/slave mode */ ++#define I2C_CON_TRX (1 << 9) /* Transmitter/receiver mode /* ++ /* (master mode only) */ ++#define I2C_CON_XA (1 << 8) /* Expand address */ ++#define I2C_CON_STP (1 << 1) /* Stop condition (master mode only) */ ++#define I2C_CON_STT (1 << 0) /* Start condition (master mode only) */ + +/* I2C System Test Register (I2C_SYSTEST): */ + -+#define I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */ -+#define I2C_SYSTEST_FREE (1 << 14) /* Free running mode (on breakpoint) */ -+#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */ -+#define I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */ -+#define I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense input value */ -+#define I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive output value */ -+#define I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense input value */ -+#define I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive output value */ ++#define I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */ ++#define I2C_SYSTEST_FREE (1 << 14) /* Free running mode, on brkpoint) */ ++#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */ ++#define I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */ ++#define I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense input value */ ++#define I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive output value */ ++#define I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense input value */ ++#define I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive output value */ + +#define I2C_SCLL_SCLL (0) +#define I2C_SCLL_SCLL_M (0xFF) @@ -5536,23 +4749,23 @@ index 0000000..1b8524e +#define I2C_SCLH_HSSCLH (8) +#define I2C_SCLH_HSSCLH_M (0xFF) + -+#define OMAP_I2C_STANDARD 100 -+#define OMAP_I2C_FAST_MODE 400 -+#define OMAP_I2C_HIGH_SPEED 3400 ++#define OMAP_I2C_STANDARD 100 ++#define OMAP_I2C_FAST_MODE 400 ++#define OMAP_I2C_HIGH_SPEED 3400 + -+#define SYSTEM_CLOCK_12 12000 -+#define SYSTEM_CLOCK_13 13000 -+#define SYSTEM_CLOCK_192 19200 -+#define SYSTEM_CLOCK_96 96000 ++#define SYSTEM_CLOCK_12 12000 ++#define SYSTEM_CLOCK_13 13000 ++#define SYSTEM_CLOCK_192 19200 ++#define SYSTEM_CLOCK_96 96000 + +#define I2C_IP_CLK SYSTEM_CLOCK_96 +#define I2C_PSC_MAX (0x0f) +#define I2C_PSC_MIN (0x00) + -+#endif ++#endif /* _I2C_H_ */ diff --git a/include/asm-arm/arch-omap3/mem.h b/include/asm-arm/arch-omap3/mem.h new file mode 100644 -index 0000000..1af53a8 +index 0000000..2c5cc51 --- /dev/null +++ b/include/asm-arm/arch-omap3/mem.h @@ -0,0 +1,220 @@ @@ -5584,7 +4797,7 @@ index 0000000..1af53a8 +#define _MEM_H_ + +#define SDRC_CS0_OSET 0x0 -+#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */ ++#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */ + +#ifndef __ASSEMBLY__ + @@ -5604,7 +4817,7 @@ index 0000000..1af53a8 +#define SDP_SDRC_MR_0_SDR 0x00000031 + +/* optimized timings good for current shipping parts */ -+#define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */ ++#define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */ + +#define DLL_OFFSET 0 +#define DLL_WRITEDDRCLKX2DIS 1 @@ -5613,7 +4826,7 @@ index 0000000..1af53a8 +#define DLL_DLLPHASE_72 0 +#define DLL_DLLPHASE_90 1 + -+// rkw - need to find of 90/72 degree recommendation for speed like before. ++/* rkw - need to find of 90/72 degree recommendation for speed like before */ +#define SDP_SDRC_DLLAB_CTRL ((DLL_ENADLL << 3) | \ + (DLL_LOCKDLL << 2) | (DLL_DLLPHASE_90 << 1)) + @@ -5640,15 +4853,15 @@ index 0000000..1af53a8 +#define TRC_165 10 +#define TRFC_165 12 +#define V_ACTIMA_165 ((TRFC_165 << 27) | (TRC_165 << 22) | (TRAS_165 << 18) \ -+ | (TRP_165 << 15) | (TRCD_165 << 12) |(TRRD_165 << 9) | \ ++ | (TRP_165 << 15) | (TRCD_165 << 12) | (TRRD_165 << 9) | \ + (TDPL_165 << 6) | (TDAL_165)) + +#define TWTR_165 1 +#define TCKE_165 2 +#define TXP_165 2 +#define XSR_165 20 -+#define V_ACTIMB_165 ((TCKE_165 << 12) | (XSR_165 << 0)) | \ -+ (TXP_165 << 8) | (TWTR_165 << 16) ++#define V_ACTIMB_165 (((TCKE_165 << 12) | (XSR_165 << 0)) | \ ++ (TXP_165 << 8) | (TWTR_165 << 16)) + +# define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_165 +# define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_165 @@ -5663,9 +4876,9 @@ index 0000000..1af53a8 + * x is GPMC config registers from 1 to 6 (there will be 6 macros) + * Value is corresponding value + * -+ * For every valid PRCM configuration there should be only one definition of -+ * the same. if values are independent of the board, this definition will be -+ * present in this file if values are dependent on the board, then this should ++ * For every valid PRCM configuration there should be only one definition of ++ * the same. if values are independent of the board, this definition will be ++ * present in this file if values are dependent on the board, then this should + * go into corresponding mem-boardName.h file + * + * Currently valid part Names are (PART): @@ -5778,193 +4991,425 @@ index 0000000..1af53a8 +#endif /* endif _MEM_H_ */ diff --git a/include/asm-arm/arch-omap3/mmc.h b/include/asm-arm/arch-omap3/mmc.h new file mode 100644 -index 0000000..f265d8a +index 0000000..8631aae --- /dev/null +++ b/include/asm-arm/arch-omap3/mmc.h -@@ -0,0 +1,175 @@ +@@ -0,0 +1,235 @@ ++/* ++ * (C) Copyright 2008 ++ * Texas Instruments, <www.ti.com> ++ * Syed Mohammed Khasim <khasim@ti.com> ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation's version 2 of ++ * the License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#ifndef MMC_H ++#define MMC_H ++ ++#include "mmc_host_def.h" ++ ++/* Responses */ ++#define RSP_TYPE_NONE (RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK) ++#define RSP_TYPE_R1 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) ++#define RSP_TYPE_R1B (RSP_TYPE_LGHT48B | CCCE_CHECK | CICE_CHECK) ++#define RSP_TYPE_R2 (RSP_TYPE_LGHT136 | CCCE_CHECK | CICE_NOCHECK) ++#define RSP_TYPE_R3 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK) ++#define RSP_TYPE_R4 (RSP_TYPE_LGHT48 | CCCE_NOCHECK | CICE_NOCHECK) ++#define RSP_TYPE_R5 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) ++#define RSP_TYPE_R6 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) ++#define RSP_TYPE_R7 (RSP_TYPE_LGHT48 | CCCE_CHECK | CICE_CHECK) ++ ++/* All supported commands */ ++#define MMC_CMD0 (INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD1 (INDEX(1) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD2 (INDEX(2) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD3 (INDEX(3) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_SDCMD3 (INDEX(3) | RSP_TYPE_R6 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD4 (INDEX(4) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD6 (INDEX(6) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD7_SELECT (INDEX(7) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD7_DESELECT (INDEX(7) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD8 (INDEX(8) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) ++#define MMC_SDCMD8 (INDEX(8) | RSP_TYPE_R7 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD9 (INDEX(9) | RSP_TYPE_R2 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD12 (INDEX(12) | RSP_TYPE_R1B | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD13 (INDEX(13) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD15 (INDEX(15) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD16 (INDEX(16) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_CMD17 (INDEX(17) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) ++#define MMC_CMD24 (INDEX(24) | RSP_TYPE_R1 | DP_DATA | DDIR_WRITE) ++#define MMC_ACMD6 (INDEX(6) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_ACMD41 (INDEX(41) | RSP_TYPE_R3 | DP_NO_DATA | DDIR_WRITE) ++#define MMC_ACMD51 (INDEX(51) | RSP_TYPE_R1 | DP_DATA | DDIR_READ) ++#define MMC_CMD55 (INDEX(55) | RSP_TYPE_R1 | DP_NO_DATA | DDIR_WRITE) ++ ++#define MMC_AC_CMD_RCA_MASK (unsigned int)(0xFFFF << 16) ++#define MMC_BC_CMD_DSR_MASK (unsigned int)(0xFFFF << 16) ++#define MMC_DSR_DEFAULT (0x0404) ++#define SD_CMD8_CHECK_PATTERN (0xAA) ++#define SD_CMD8_2_7_3_6_V_RANGE (0x01 << 8) ++ ++/* Clock Configurations and Macros */ ++ ++#define MMC_CLOCK_REFERENCE (96) ++#define MMC_RELATIVE_CARD_ADDRESS (0x1234) ++#define MMC_INIT_SEQ_CLK (MMC_CLOCK_REFERENCE * 1000 / 80) ++#define MMC_400kHz_CLK (MMC_CLOCK_REFERENCE * 1000 / 400) ++#define CLKDR(r, f, u) ((((r)*100) / ((f)*(u))) + 1) ++#define CLKD(f, u) (CLKDR(MMC_CLOCK_REFERENCE, f, u)) ++ ++#define MMC_OCR_REG_ACCESS_MODE_MASK (0x3 << 29) ++#define MMC_OCR_REG_ACCESS_MODE_BYTE (0x0 << 29) ++#define MMC_OCR_REG_ACCESS_MODE_SECTOR (0x2 << 29) ++ ++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_MASK (0x1 << 30) ++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_BYTE (0x0 << 30) ++#define MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR (0x1 << 30) ++ ++#define MMC_SD2_CSD_C_SIZE_LSB_MASK (0xFFFF) ++#define MMC_SD2_CSD_C_SIZE_MSB_MASK (0x003F) ++#define MMC_SD2_CSD_C_SIZE_MSB_OFFSET (16) ++#define MMC_CSD_C_SIZE_LSB_MASK (0x0003) ++#define MMC_CSD_C_SIZE_MSB_MASK (0x03FF) ++#define MMC_CSD_C_SIZE_MSB_OFFSET (2) ++ ++#define MMC_CSD_TRAN_SPEED_UNIT_MASK (0x07 << 0) ++#define MMC_CSD_TRAN_SPEED_FACTOR_MASK (0x0F << 3) ++#define MMC_CSD_TRAN_SPEED_UNIT_100MHZ (0x3 << 0) ++#define MMC_CSD_TRAN_SPEED_FACTOR_1_0 (0x01 << 3) ++#define MMC_CSD_TRAN_SPEED_FACTOR_8_0 (0x0F << 3) ++ ++typedef struct { ++ unsigned not_used:1; ++ unsigned crc:7; ++ unsigned ecc:2; ++ unsigned file_format:2; ++ unsigned tmp_write_protect:1; ++ unsigned perm_write_protect:1; ++ unsigned copy:1; ++ unsigned file_format_grp:1; ++ unsigned content_prot_app:1; ++ unsigned reserved_1:4; ++ unsigned write_bl_partial:1; ++ unsigned write_bl_len:4; ++ unsigned r2w_factor:3; ++ unsigned default_ecc:2; ++ unsigned wp_grp_enable:1; ++ unsigned wp_grp_size:5; ++ unsigned erase_grp_mult:5; ++ unsigned erase_grp_size:5; ++ unsigned c_size_mult:3; ++ unsigned vdd_w_curr_max:3; ++ unsigned vdd_w_curr_min:3; ++ unsigned vdd_r_curr_max:3; ++ unsigned vdd_r_curr_min:3; ++ unsigned c_size_lsb:2; ++ unsigned c_size_msb:10; ++ unsigned reserved_2:2; ++ unsigned dsr_imp:1; ++ unsigned read_blk_misalign:1; ++ unsigned write_blk_misalign:1; ++ unsigned read_bl_partial:1; ++ unsigned read_bl_len:4; ++ unsigned ccc:12; ++ unsigned tran_speed:8; ++ unsigned nsac:8; ++ unsigned taac:8; ++ unsigned reserved_3:2; ++ unsigned spec_vers:4; ++ unsigned csd_structure:2; ++} mmc_csd_reg_t; ++ ++/* csd for sd2.0 */ ++typedef struct { ++ unsigned not_used:1; ++ unsigned crc:7; ++ unsigned reserved_1:2; ++ unsigned file_format:2; ++ unsigned tmp_write_protect:1; ++ unsigned perm_write_protect:1; ++ unsigned copy:1; ++ unsigned file_format_grp:1; ++ unsigned reserved_2:5; ++ unsigned write_bl_partial:1; ++ unsigned write_bl_len:4; ++ unsigned r2w_factor:3; ++ unsigned reserved_3:2; ++ unsigned wp_grp_enable:1; ++ unsigned wp_grp_size:7; ++ unsigned sector_size:7; ++ unsigned erase_blk_len:1; ++ unsigned reserved_4:1; ++ unsigned c_size_lsb:16; ++ unsigned c_size_msb:6; ++ unsigned reserved_5:6; ++ unsigned dsr_imp:1; ++ unsigned read_blk_misalign:1; ++ unsigned write_blk_misalign:1; ++ unsigned read_bl_partial:1; ++ unsigned read_bl_len:4; ++ unsigned ccc:12; ++ unsigned tran_speed:8; ++ unsigned nsac:8; ++ unsigned taac:8; ++ unsigned reserved_6:6; ++ unsigned csd_structure:2; ++} mmc_sd2_csd_reg_t; ++ ++/* extended csd - 512 bytes long */ ++typedef struct { ++ unsigned char reserved_1[181]; ++ unsigned char erasedmemorycontent; ++ unsigned char reserved_2; ++ unsigned char buswidthmode; ++ unsigned char reserved_3; ++ unsigned char highspeedinterfacetiming; ++ unsigned char reserved_4; ++ unsigned char powerclass; ++ unsigned char reserved_5; ++ unsigned char commandsetrevision; ++ unsigned char reserved_6; ++ unsigned char commandset; ++ unsigned char extendedcsdrevision; ++ unsigned char reserved_7; ++ unsigned char csdstructureversion; ++ unsigned char reserved_8; ++ unsigned char cardtype; ++ unsigned char reserved_9[3]; ++ unsigned char powerclass_52mhz_1_95v; ++ unsigned char powerclass_26mhz_1_95v; ++ unsigned char powerclass_52mhz_3_6v; ++ unsigned char powerclass_26mhz_3_6v; ++ unsigned char reserved_10; ++ unsigned char minreadperf_4b_26mhz; ++ unsigned char minwriteperf_4b_26mhz; ++ unsigned char minreadperf_8b_26mhz_4b_52mhz; ++ unsigned char minwriteperf_8b_26mhz_4b_52mhz; ++ unsigned char minreadperf_8b_52mhz; ++ unsigned char minwriteperf_8b_52mhz; ++ unsigned char reserved_11; ++ unsigned int sectorcount; ++ unsigned char reserved_12[288]; ++ unsigned char supportedcommandsets; ++ unsigned char reserved_13[7]; ++} mmc_extended_csd_reg_t; ++ ++/* mmc sd responce */ ++typedef struct { ++ unsigned int ocr; ++} mmc_resp_r3; ++ ++typedef struct { ++ unsigned short cardstatus; ++ unsigned short newpublishedrca; ++} mmc_resp_r6; ++ ++extern mmc_card_data mmc_dev; ++ ++unsigned char mmc_lowlevel_init(void); ++unsigned char mmc_send_command(unsigned int cmd, unsigned int arg, ++ unsigned int *response); ++unsigned char mmc_setup_clock(unsigned int iclk, unsigned short clkd); ++unsigned char mmc_set_opendrain(unsigned char state); ++unsigned char mmc_read_data(unsigned int *output_buf); ++ ++#endif /* MMC_H */ +diff --git a/include/asm-arm/arch-omap3/mmc_host_def.h b/include/asm-arm/arch-omap3/mmc_host_def.h +new file mode 100644 +index 0000000..37aaa08 +--- /dev/null ++++ b/include/asm-arm/arch-omap3/mmc_host_def.h +@@ -0,0 +1,166 @@ +/* -+ * linux/drivers/mmc/mmc_pxa.h ++ * (C) Copyright 2008 ++ * Texas Instruments, <www.ti.com> ++ * Syed Mohammed Khasim <khasim@ti.com> + * -+ * Author: Vladimir Shebordaev, Igor Oblakov -+ * Copyright: MontaVista Software Inc. ++ * See file CREDITS for list of people who contributed to this ++ * project. + * -+ * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $ ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation's version 2 of ++ * the License. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#ifndef MMC_HOST_DEF_H ++#define MMC_HOST_DEF_H ++ ++/* ++ * OMAP HSMMC register definitions ++ */ ++#define OMAP_HSMMC_SYSCONFIG (*(unsigned int *) 0x4809C010) ++#define OMAP_HSMMC_SYSSTATUS (*(unsigned int *) 0x4809C014) ++#define OMAP_HSMMC_CON (*(unsigned int *) 0x4809C02C) ++#define OMAP_HSMMC_BLK (*(unsigned int *) 0x4809C104) ++#define OMAP_HSMMC_ARG (*(unsigned int *) 0x4809C108) ++#define OMAP_HSMMC_CMD (*(unsigned int *) 0x4809C10C) ++#define OMAP_HSMMC_RSP10 (*(unsigned int *) 0x4809C110) ++#define OMAP_HSMMC_RSP32 (*(unsigned int *) 0x4809C114) ++#define OMAP_HSMMC_RSP54 (*(unsigned int *) 0x4809C118) ++#define OMAP_HSMMC_RSP76 (*(unsigned int *) 0x4809C11C) ++#define OMAP_HSMMC_DATA (*(unsigned int *) 0x4809C120) ++#define OMAP_HSMMC_PSTATE (*(unsigned int *) 0x4809C124) ++#define OMAP_HSMMC_HCTL (*(unsigned int *) 0x4809C128) ++#define OMAP_HSMMC_SYSCTL (*(unsigned int *) 0x4809C12C) ++#define OMAP_HSMMC_STAT (*(unsigned int *) 0x4809C130) ++#define OMAP_HSMMC_IE (*(unsigned int *) 0x4809C134) ++#define OMAP_HSMMC_CAPA (*(unsigned int *) 0x4809C140) ++ ++/* T2 Register definitions */ ++#define CONTROL_DEV_CONF0 (*(unsigned int *) 0x48002274) ++#define CONTROL_PBIAS_LITE (*(unsigned int *) 0x48002520) ++ ++/* ++ * OMAP HS MMC Bit definitions + */ -+#ifndef __MMC_PXA_P_H__ -+#define __MMC_PXA_P_H__ -+ -+/* PXA-250 MMC controller registers */ -+ -+/* MMC_STRPCL */ -+#define MMC_STRPCL_STOP_CLK (0x0001UL) -+#define MMC_STRPCL_START_CLK (0x0002UL) -+ -+/* MMC_STAT */ -+ -+#define MMC_STAT_ERRORS (MMC_STAT_RES_CRC_ERROR|MMC_STAT_SPI_READ_ERROR_TOKEN\ -+ |MMC_STAT_CRC_READ_ERROR|MMC_STAT_TIME_OUT_RESPONSE\ -+ |MMC_STAT_READ_TIME_OUT|MMC_STAT_CRC_WRITE_ERROR) -+ -+/* MMC_CLKRT */ -+#define MMC_CLKRT_20MHZ (0x0000UL) -+#define MMC_CLKRT_10MHZ (0x0001UL) -+#define MMC_CLKRT_5MHZ (0x0002UL) -+#define MMC_CLKRT_2_5MHZ (0x0003UL) -+#define MMC_CLKRT_1_25MHZ (0x0004UL) -+#define MMC_CLKRT_0_625MHZ (0x0005UL) -+#define MMC_CLKRT_0_3125MHZ (0x0006UL) -+ -+/* MMC_SPI */ -+#define MMC_SPI_DISABLE (0x00UL) -+#define MMC_SPI_EN (0x01UL) -+#define MMC_SPI_CS_EN (0x01UL << 2) -+#define MMC_SPI_CS_ADDRESS (0x01UL << 3) -+#define MMC_SPI_CRC_ON (0x01UL << 1) -+ -+/* MMC_CMDAT */ -+#define MMC_CMDAT_MMC_DMA_EN (0x0001UL << 7) -+#define MMC_CMDAT_INIT (0x0001UL << 6) -+#define MMC_CMDAT_BUSY (0x0001UL << 5) -+#define MMC_CMDAT_STREAM (0x0001UL << 4) -+#define MMC_CMDAT_BLOCK (0x0000UL << 4) -+#define MMC_CMDAT_WRITE (0x0001UL << 3) -+#define MMC_CMDAT_READ (0x0000UL << 3) -+#define MMC_CMDAT_DATA_EN (0x0001UL << 2) -+#define MMC_CMDAT_R1 (0x0001UL) -+#define MMC_CMDAT_R2 (0x0002UL) -+#define MMC_CMDAT_R3 (0x0003UL) -+ -+/* MMC_RESTO */ -+#define MMC_RES_TO_MAX (0x007fUL) /* [6:0] */ -+ -+/* MMC_RDTO */ -+#define MMC_READ_TO_MAX (0x0ffffUL) /* [15:0] */ -+ -+/* MMC_BLKLEN */ -+#define MMC_BLK_LEN_MAX (0x03ffUL) /* [9:0] */ -+ -+/* MMC_PRTBUF */ -+#define MMC_PRTBUF_BUF_PART_FULL (0x01UL) -+#define MMC_PRTBUF_BUF_FULL (0x00UL ) -+ -+/* MMC_I_MASK */ -+#define MMC_I_MASK_TXFIFO_WR_REQ (0x01UL << 6) -+#define MMC_I_MASK_RXFIFO_RD_REQ (0x01UL << 5) -+#define MMC_I_MASK_CLK_IS_OFF (0x01UL << 4) -+#define MMC_I_MASK_STOP_CMD (0x01UL << 3) -+#define MMC_I_MASK_END_CMD_RES (0x01UL << 2) -+#define MMC_I_MASK_PRG_DONE (0x01UL << 1) -+#define MMC_I_MASK_DATA_TRAN_DONE (0x01UL) -+#define MMC_I_MASK_ALL (0x07fUL) -+ -+/* MMC_I_REG */ -+#define MMC_I_REG_TXFIFO_WR_REQ (0x01UL << 6) -+#define MMC_I_REG_RXFIFO_RD_REQ (0x01UL << 5) -+#define MMC_I_REG_CLK_IS_OFF (0x01UL << 4) -+#define MMC_I_REG_STOP_CMD (0x01UL << 3) -+#define MMC_I_REG_END_CMD_RES (0x01UL << 2) -+#define MMC_I_REG_PRG_DONE (0x01UL << 1) -+#define MMC_I_REG_DATA_TRAN_DONE (0x01UL) -+#define MMC_I_REG_ALL (0x007fUL) -+ -+/* MMC_CMD */ -+#define MMC_CMD_INDEX_MAX (0x006fUL) /* [5:0] */ -+#define CMD(x) (x) -+ -+#define MMC_DEFAULT_RCA 1 -+ -+#define MMC_BLOCK_SIZE 512 -+#define MMC_CMD_RESET 0 -+#define MMC_CMD_SEND_OP_COND 1 -+#define MMC_CMD_ALL_SEND_CID 2 -+#define MMC_CMD_SET_RCA 3 -+#define MMC_CMD_SEND_CSD 9 -+#define MMC_CMD_SEND_CID 10 -+#define MMC_CMD_SEND_STATUS 13 -+#define MMC_CMD_SET_BLOCKLEN 16 -+#define MMC_CMD_READ_BLOCK 17 -+#define MMC_CMD_RD_BLK_MULTI 18 -+#define MMC_CMD_WRITE_BLOCK 24 -+ -+#define MMC_MAX_BLOCK_SIZE 512 -+ -+#define MMC_R1_IDLE_STATE 0x01 -+#define MMC_R1_ERASE_STATE 0x02 -+#define MMC_R1_ILLEGAL_CMD 0x04 -+#define MMC_R1_COM_CRC_ERR 0x08 -+#define MMC_R1_ERASE_SEQ_ERR 0x01 -+#define MMC_R1_ADDR_ERR 0x02 -+#define MMC_R1_PARAM_ERR 0x04 -+ -+#define MMC_R1B_WP_ERASE_SKIP 0x0002 -+#define MMC_R1B_ERR 0x0004 -+#define MMC_R1B_CC_ERR 0x0008 -+#define MMC_R1B_CARD_ECC_ERR 0x0010 -+#define MMC_R1B_WP_VIOLATION 0x0020 -+#define MMC_R1B_ERASE_PARAM 0x0040 -+#define MMC_R1B_OOR 0x0080 -+#define MMC_R1B_IDLE_STATE 0x0100 -+#define MMC_R1B_ERASE_RESET 0x0200 -+#define MMC_R1B_ILLEGAL_CMD 0x0400 -+#define MMC_R1B_COM_CRC_ERR 0x0800 -+#define MMC_R1B_ERASE_SEQ_ERR 0x1000 -+#define MMC_R1B_ADDR_ERR 0x2000 -+#define MMC_R1B_PARAM_ERR 0x4000 -+ -+typedef struct mmc_cid { -+/* FIXME: BYTE_ORDER */ -+ unsigned char year:4, month:4; -+ unsigned char sn[3]; -+ unsigned char fwrev:4, hwrev:4; -+ unsigned char name[6]; -+ unsigned char id[3]; -+} mmc_cid_t; -+ -+typedef struct mmc_csd { -+ unsigned char ecc:2, -+ file_format:2, -+ tmp_write_protect:1, -+ perm_write_protect:1, copy:1, file_format_grp:1; -+ unsigned long int content_prot_app:1, -+ rsvd3:4, -+ write_bl_partial:1, -+ write_bl_len:4, -+ r2w_factor:3, -+ default_ecc:2, -+ wp_grp_enable:1, -+ wp_grp_size:5, -+ erase_grp_mult:5, -+ erase_grp_size:5, -+ c_size_mult1:3, -+ vdd_w_curr_max:3, -+ vdd_w_curr_min:3, -+ vdd_r_curr_max:3, -+ vdd_r_curr_min:3, -+ c_size:12, -+ rsvd2:2, -+ dsr_imp:1, -+ read_blk_misalign:1, write_blk_misalign:1, read_bl_partial:1; -+ -+ unsigned short read_bl_len:4, ccc:12; -+ unsigned char tran_speed; -+ unsigned char nsac; -+ unsigned char taac; -+ unsigned char rsvd1:2, spec_vers:4, csd_structure:2; -+} mmc_csd_t; -+ -+#endif /* __MMC_PXA_P_H__ */ ++#define MMC_SOFTRESET (0x1 << 1) ++#define RESETDONE (0x1 << 0) ++#define NOOPENDRAIN (0x0 << 0) ++#define OPENDRAIN (0x1 << 0) ++#define OD (0x1 << 0) ++#define INIT_NOINIT (0x0 << 1) ++#define INIT_INITSTREAM (0x1 << 1) ++#define HR_NOHOSTRESP (0x0 << 2) ++#define STR_BLOCK (0x0 << 3) ++#define MODE_FUNC (0x0 << 4) ++#define DW8_1_4BITMODE (0x0 << 5) ++#define MIT_CTO (0x0 << 6) ++#define CDP_ACTIVEHIGH (0x0 << 7) ++#define WPP_ACTIVEHIGH (0x0 << 8) ++#define RESERVED_MASK (0x3 << 9) ++#define CTPL_MMC_SD (0x0 << 11) ++#define BLEN_512BYTESLEN (0x200 << 0) ++#define NBLK_STPCNT (0x0 << 16) ++#define DE_DISABLE (0x0 << 0) ++#define BCE_DISABLE (0x0 << 1) ++#define ACEN_DISABLE (0x0 << 2) ++#define DDIR_OFFSET (4) ++#define DDIR_MASK (0x1 << 4) ++#define DDIR_WRITE (0x0 << 4) ++#define DDIR_READ (0x1 << 4) ++#define MSBS_SGLEBLK (0x0 << 5) ++#define RSP_TYPE_OFFSET (16) ++#define RSP_TYPE_MASK (0x3 << 16) ++#define RSP_TYPE_NORSP (0x0 << 16) ++#define RSP_TYPE_LGHT136 (0x1 << 16) ++#define RSP_TYPE_LGHT48 (0x2 << 16) ++#define RSP_TYPE_LGHT48B (0x3 << 16) ++#define CCCE_NOCHECK (0x0 << 19) ++#define CCCE_CHECK (0x1 << 19) ++#define CICE_NOCHECK (0x0 << 20) ++#define CICE_CHECK (0x1 << 20) ++#define DP_OFFSET (21) ++#define DP_MASK (0x1 << 21) ++#define DP_NO_DATA (0x0 << 21) ++#define DP_DATA (0x1 << 21) ++#define CMD_TYPE_NORMAL (0x0 << 22) ++#define INDEX_OFFSET (24) ++#define INDEX_MASK (0x3f << 24) ++#define INDEX(i) (i << 24) ++#define DATI_MASK (0x1 << 1) ++#define DATI_CMDDIS (0x1 << 1) ++#define DTW_1_BITMODE (0x0 << 1) ++#define DTW_4_BITMODE (0x1 << 1) ++#define SDBP_PWROFF (0x0 << 8) ++#define SDBP_PWRON (0x1 << 8) ++#define SDVS_1V8 (0x5 << 9) ++#define SDVS_3V0 (0x6 << 9) ++#define ICE_MASK (0x1 << 0) ++#define ICE_STOP (0x0 << 0) ++#define ICS_MASK (0x1 << 1) ++#define ICS_NOTREADY (0x0 << 1) ++#define ICE_OSCILLATE (0x1 << 0) ++#define CEN_MASK (0x1 << 2) ++#define CEN_DISABLE (0x0 << 2) ++#define CEN_ENABLE (0x1 << 2) ++#define CLKD_OFFSET (6) ++#define CLKD_MASK (0x3FF << 6) ++#define DTO_MASK (0xF << 16) ++#define DTO_15THDTO (0xE << 16) ++#define SOFTRESETALL (0x1 << 24) ++#define CC_MASK (0x1 << 0) ++#define TC_MASK (0x1 << 1) ++#define BWR_MASK (0x1 << 4) ++#define BRR_MASK (0x1 << 5) ++#define ERRI_MASK (0x1 << 15) ++#define IE_CC (0x01 << 0) ++#define IE_TC (0x01 << 1) ++#define IE_BWR (0x01 << 4) ++#define IE_BRR (0x01 << 5) ++#define IE_CTO (0x01 << 16) ++#define IE_CCRC (0x01 << 17) ++#define IE_CEB (0x01 << 18) ++#define IE_CIE (0x01 << 19) ++#define IE_DTO (0x01 << 20) ++#define IE_DCRC (0x01 << 21) ++#define IE_DEB (0x01 << 22) ++#define IE_CERR (0x01 << 28) ++#define IE_BADA (0x01 << 29) ++ ++#define VS30_3V0SUP (1 << 25) ++#define VS18_1V8SUP (1 << 26) ++ ++/* Driver definitions */ ++#define MMCSD_SECTOR_SIZE (512) ++#define MMC_CARD 0 ++#define SD_CARD 1 ++#define BYTE_MODE 0 ++#define SECTOR_MODE 1 ++#define CLK_INITSEQ 0 ++#define CLK_400KHZ 1 ++#define CLK_MISC 2 ++ ++typedef struct { ++ unsigned int card_type; ++ unsigned int version; ++ unsigned int mode; ++ unsigned int size; ++ unsigned int RCA; ++} mmc_card_data; ++ ++#define mmc_reg_out(addr, mask, val)\ ++ (addr) = (((addr)) & (~(mask))) | ((val) & (mask)); ++#define mmc_reg_out(addr, mask, val)\ ++ (addr) = (((addr)) & (~(mask))) | ((val) & (mask)); ++ ++#endif /* MMC_HOST_DEF_H */ diff --git a/include/asm-arm/arch-omap3/mux.h b/include/asm-arm/arch-omap3/mux.h new file mode 100644 -index 0000000..23d5c94 +index 0000000..33947b9 --- /dev/null +++ b/include/asm-arm/arch-omap3/mux.h -@@ -0,0 +1,407 @@ +@@ -0,0 +1,757 @@ +/* -+ * (C) Copyright 2006 ++ * (C) Copyright 2006-2008 + * Texas Instruments, <www.ti.com> + * Syed Mohammed Khasim <x0khasim@ti.com> + * @@ -5983,8 +5428,8 @@ index 0000000..23d5c94 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ -+#ifndef _OMAP3430_MUX_H_ -+#define _OMAP3430_MUX_H_ ++#ifndef _MUX_H_ ++#define _MUX_H_ + +/* + * IEN - Input Enable @@ -6013,9 +5458,9 @@ index 0000000..23d5c94 +#define M6 6 +#define M7 7 + -+/* -+ * To get the actual address the offset has to added -+ * with OMAP34XX_CTRL_BASE to get the actual address ++/* ++ * To get the actual address the offset has to added ++ * with OMAP34XX_CTRL_BASE to get the actual address + */ + + /*SDRC*/ @@ -6161,7 +5606,6 @@ index 0000000..23d5c94 +#define CONTROL_PADCONF_McBSP2_CLKX 0x013E +#define CONTROL_PADCONF_McBSP2_DR 0x0140 +#define CONTROL_PADCONF_McBSP2_DX 0x0142 -+#define CONTROL_PADCONF_ +#define CONTROL_PADCONF_MMC1_CLK 0x0144 +#define CONTROL_PADCONF_MMC1_CMD 0x0146 +#define CONTROL_PADCONF_MMC1_DAT0 0x0148 @@ -6369,15 +5813,366 @@ index 0000000..23d5c94 +#define CONTROL_PADCONF_d2d_sbusflag 0x0260 +#define CONTROL_PADCONF_sdrc_cke0 0x0262 +#define CONTROL_PADCONF_sdrc_cke1 0x0264 ++ ++#define MUX_VAL(OFFSET,VALUE)\ ++ __raw_writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET)); ++ ++#define CP(x) (CONTROL_PADCONF_##x) ++ ++/* ++ * IEN - Input Enable ++ * IDIS - Input Disable ++ * PTD - Pull type Down ++ * PTU - Pull type Up ++ * DIS - Pull type selection is inactive ++ * EN - Pull type selection is active ++ * M0 - Mode 0 ++ * The commented string gives the final mux configuration for that pin ++ */ ++#define MUX_DEFAULT_ES2() \ ++ /*SDRC*/\ ++ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\ ++ MUX_VAL(CP(SDRC_D1), (IEN | PTD | DIS | M0)) /*SDRC_D1*/\ ++ MUX_VAL(CP(SDRC_D2), (IEN | PTD | DIS | M0)) /*SDRC_D2*/\ ++ MUX_VAL(CP(SDRC_D3), (IEN | PTD | DIS | M0)) /*SDRC_D3*/\ ++ MUX_VAL(CP(SDRC_D4), (IEN | PTD | DIS | M0)) /*SDRC_D4*/\ ++ MUX_VAL(CP(SDRC_D5), (IEN | PTD | DIS | M0)) /*SDRC_D5*/\ ++ MUX_VAL(CP(SDRC_D6), (IEN | PTD | DIS | M0)) /*SDRC_D6*/\ ++ MUX_VAL(CP(SDRC_D7), (IEN | PTD | DIS | M0)) /*SDRC_D7*/\ ++ MUX_VAL(CP(SDRC_D8), (IEN | PTD | DIS | M0)) /*SDRC_D8*/\ ++ MUX_VAL(CP(SDRC_D9), (IEN | PTD | DIS | M0)) /*SDRC_D9*/\ ++ MUX_VAL(CP(SDRC_D10), (IEN | PTD | DIS | M0)) /*SDRC_D10*/\ ++ MUX_VAL(CP(SDRC_D11), (IEN | PTD | DIS | M0)) /*SDRC_D11*/\ ++ MUX_VAL(CP(SDRC_D12), (IEN | PTD | DIS | M0)) /*SDRC_D12*/\ ++ MUX_VAL(CP(SDRC_D13), (IEN | PTD | DIS | M0)) /*SDRC_D13*/\ ++ MUX_VAL(CP(SDRC_D14), (IEN | PTD | DIS | M0)) /*SDRC_D14*/\ ++ MUX_VAL(CP(SDRC_D15), (IEN | PTD | DIS | M0)) /*SDRC_D15*/\ ++ MUX_VAL(CP(SDRC_D16), (IEN | PTD | DIS | M0)) /*SDRC_D16*/\ ++ MUX_VAL(CP(SDRC_D17), (IEN | PTD | DIS | M0)) /*SDRC_D17*/\ ++ MUX_VAL(CP(SDRC_D18), (IEN | PTD | DIS | M0)) /*SDRC_D18*/\ ++ MUX_VAL(CP(SDRC_D19), (IEN | PTD | DIS | M0)) /*SDRC_D19*/\ ++ MUX_VAL(CP(SDRC_D20), (IEN | PTD | DIS | M0)) /*SDRC_D20*/\ ++ MUX_VAL(CP(SDRC_D21), (IEN | PTD | DIS | M0)) /*SDRC_D21*/\ ++ MUX_VAL(CP(SDRC_D22), (IEN | PTD | DIS | M0)) /*SDRC_D22*/\ ++ MUX_VAL(CP(SDRC_D23), (IEN | PTD | DIS | M0)) /*SDRC_D23*/\ ++ MUX_VAL(CP(SDRC_D24), (IEN | PTD | DIS | M0)) /*SDRC_D24*/\ ++ MUX_VAL(CP(SDRC_D25), (IEN | PTD | DIS | M0)) /*SDRC_D25*/\ ++ MUX_VAL(CP(SDRC_D26), (IEN | PTD | DIS | M0)) /*SDRC_D26*/\ ++ MUX_VAL(CP(SDRC_D27), (IEN | PTD | DIS | M0)) /*SDRC_D27*/\ ++ MUX_VAL(CP(SDRC_D28), (IEN | PTD | DIS | M0)) /*SDRC_D28*/\ ++ MUX_VAL(CP(SDRC_D29), (IEN | PTD | DIS | M0)) /*SDRC_D29*/\ ++ MUX_VAL(CP(SDRC_D30), (IEN | PTD | DIS | M0)) /*SDRC_D30*/\ ++ MUX_VAL(CP(SDRC_D31), (IEN | PTD | DIS | M0)) /*SDRC_D31*/\ ++ MUX_VAL(CP(SDRC_CLK), (IEN | PTD | DIS | M0)) /*SDRC_CLK*/\ ++ MUX_VAL(CP(SDRC_DQS0), (IEN | PTD | DIS | M0)) /*SDRC_DQS0*/\ ++ MUX_VAL(CP(SDRC_DQS1), (IEN | PTD | DIS | M0)) /*SDRC_DQS1*/\ ++ MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)) /*SDRC_DQS2*/\ ++ MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)) /*SDRC_DQS3*/\ ++ /*GPMC*/\ ++ MUX_VAL(CP(GPMC_A1), (IDIS | PTD | DIS | M0)) /*GPMC_A1*/\ ++ MUX_VAL(CP(GPMC_A2), (IDIS | PTD | DIS | M0)) /*GPMC_A2*/\ ++ MUX_VAL(CP(GPMC_A3), (IDIS | PTD | DIS | M0)) /*GPMC_A3*/\ ++ MUX_VAL(CP(GPMC_A4), (IDIS | PTD | DIS | M0)) /*GPMC_A4*/\ ++ MUX_VAL(CP(GPMC_A5), (IDIS | PTD | DIS | M0)) /*GPMC_A5*/\ ++ MUX_VAL(CP(GPMC_A6), (IDIS | PTD | DIS | M0)) /*GPMC_A6*/\ ++ MUX_VAL(CP(GPMC_A7), (IDIS | PTD | DIS | M0)) /*GPMC_A7*/\ ++ MUX_VAL(CP(GPMC_A8), (IDIS | PTD | DIS | M0)) /*GPMC_A8*/\ ++ MUX_VAL(CP(GPMC_A9), (IDIS | PTD | DIS | M0)) /*GPMC_A9*/\ ++ MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS | M0)) /*GPMC_A10*/\ ++ MUX_VAL(CP(GPMC_D0), (IEN | PTD | DIS | M0)) /*GPMC_D0*/\ ++ MUX_VAL(CP(GPMC_D1), (IEN | PTD | DIS | M0)) /*GPMC_D1*/\ ++ MUX_VAL(CP(GPMC_D2), (IEN | PTD | DIS | M0)) /*GPMC_D2*/\ ++ MUX_VAL(CP(GPMC_D3), (IEN | PTD | DIS | M0)) /*GPMC_D3*/\ ++ MUX_VAL(CP(GPMC_D4), (IEN | PTD | DIS | M0)) /*GPMC_D4*/\ ++ MUX_VAL(CP(GPMC_D5), (IEN | PTD | DIS | M0)) /*GPMC_D5*/\ ++ MUX_VAL(CP(GPMC_D6), (IEN | PTD | DIS | M0)) /*GPMC_D6*/\ ++ MUX_VAL(CP(GPMC_D7), (IEN | PTD | DIS | M0)) /*GPMC_D7*/\ ++ MUX_VAL(CP(GPMC_D8), (IEN | PTD | DIS | M0)) /*GPMC_D8*/\ ++ MUX_VAL(CP(GPMC_D9), (IEN | PTD | DIS | M0)) /*GPMC_D9*/\ ++ MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS | M0)) /*GPMC_D10*/\ ++ MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS | M0)) /*GPMC_D11*/\ ++ MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS | M0)) /*GPMC_D12*/\ ++ MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS | M0)) /*GPMC_D13*/\ ++ MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\ ++ MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\ ++ MUX_VAL(CP(GPMC_nCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\ ++ MUX_VAL(CP(GPMC_nCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\ ++ MUX_VAL(CP(GPMC_nCS2), (IDIS | PTU | EN | M0)) /*GPMC_nCS2*/\ ++ MUX_VAL(CP(GPMC_nCS3), (IDIS | PTU | EN | M0)) /*GPMC_nCS3*/\ ++ /* For Beagle Rev 2 boards*/\ ++ MUX_VAL(CP(GPMC_nCS4), (IDIS | PTU | EN | M0))\ ++ MUX_VAL(CP(GPMC_nCS5), (IDIS | PTD | DIS | M0))\ ++ MUX_VAL(CP(GPMC_nCS6), (IEN | PTD | DIS | M1))\ ++ MUX_VAL(CP(GPMC_nCS7), (IEN | PTU | EN | M1))\ ++ MUX_VAL(CP(GPMC_nBE1), (IEN | PTD | DIS | M0))\ ++ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M0))\ ++ MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M0))\ ++ /* till here */ \ ++ MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\ ++ MUX_VAL(CP(GPMC_nADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\ ++ MUX_VAL(CP(GPMC_nOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\ ++ MUX_VAL(CP(GPMC_nWE), (IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\ ++ MUX_VAL(CP(GPMC_nBE0_CLE), (IDIS | PTD | DIS | M0)) /*GPMC_nBE0_CLE*/\ ++ MUX_VAL(CP(GPMC_nWP), (IEN | PTD | DIS | M0)) /*GPMC_nWP*/\ ++ MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /*GPMC_WAIT0*/\ ++ MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /*GPMC_WAIT1*/\ ++ /*DSS*/\ ++ MUX_VAL(CP(DSS_PCLK), (IDIS | PTD | DIS | M0)) /*DSS_PCLK*/\ ++ MUX_VAL(CP(DSS_HSYNC), (IDIS | PTD | DIS | M0)) /*DSS_HSYNC*/\ ++ MUX_VAL(CP(DSS_VSYNC), (IDIS | PTD | DIS | M0)) /*DSS_VSYNC*/\ ++ MUX_VAL(CP(DSS_ACBIAS), (IDIS | PTD | DIS | M0)) /*DSS_ACBIAS*/\ ++ MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M0)) /*DSS_DATA0*/\ ++ MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M0)) /*DSS_DATA1*/\ ++ MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M0)) /*DSS_DATA2*/\ ++ MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M0)) /*DSS_DATA3*/\ ++ MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M0)) /*DSS_DATA4*/\ ++ MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M0)) /*DSS_DATA5*/\ ++ MUX_VAL(CP(DSS_DATA6), (IDIS | PTD | DIS | M0)) /*DSS_DATA6*/\ ++ MUX_VAL(CP(DSS_DATA7), (IDIS | PTD | DIS | M0)) /*DSS_DATA7*/\ ++ MUX_VAL(CP(DSS_DATA8), (IDIS | PTD | DIS | M0)) /*DSS_DATA8*/\ ++ MUX_VAL(CP(DSS_DATA9), (IDIS | PTD | DIS | M0)) /*DSS_DATA9*/\ ++ MUX_VAL(CP(DSS_DATA10), (IDIS | PTD | DIS | M0)) /*DSS_DATA10*/\ ++ MUX_VAL(CP(DSS_DATA11), (IDIS | PTD | DIS | M0)) /*DSS_DATA11*/\ ++ MUX_VAL(CP(DSS_DATA12), (IDIS | PTD | DIS | M0)) /*DSS_DATA12*/\ ++ MUX_VAL(CP(DSS_DATA13), (IDIS | PTD | DIS | M0)) /*DSS_DATA13*/\ ++ MUX_VAL(CP(DSS_DATA14), (IDIS | PTD | DIS | M0)) /*DSS_DATA14*/\ ++ MUX_VAL(CP(DSS_DATA15), (IDIS | PTD | DIS | M0)) /*DSS_DATA15*/\ ++ MUX_VAL(CP(DSS_DATA16), (IDIS | PTD | DIS | M0)) /*DSS_DATA16*/\ ++ MUX_VAL(CP(DSS_DATA17), (IDIS | PTD | DIS | M0)) /*DSS_DATA17*/\ ++ MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M0)) /*DSS_DATA18*/\ ++ MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M0)) /*DSS_DATA19*/\ ++ MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M0)) /*DSS_DATA20*/\ ++ MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M0)) /*DSS_DATA21*/\ ++ MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M0)) /*DSS_DATA22*/\ ++ MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M0)) /*DSS_DATA23*/\ ++ /*CAMERA*/\ ++ MUX_VAL(CP(CAM_HS), (IEN | PTU | EN | M0)) /*CAM_HS */\ ++ MUX_VAL(CP(CAM_VS), (IEN | PTU | EN | M0)) /*CAM_VS */\ ++ MUX_VAL(CP(CAM_XCLKA), (IDIS | PTD | DIS | M0)) /*CAM_XCLKA*/\ ++ MUX_VAL(CP(CAM_PCLK), (IEN | PTU | EN | M0)) /*CAM_PCLK*/\ ++ MUX_VAL(CP(CAM_FLD), (IDIS | PTD | DIS | M4)) /*GPIO_98*/\ ++ /* - CAM_RESET*/\ ++ MUX_VAL(CP(CAM_D0), (IEN | PTD | DIS | M0)) /*CAM_D0*/\ ++ MUX_VAL(CP(CAM_D1), (IEN | PTD | DIS | M0)) /*CAM_D1*/\ ++ MUX_VAL(CP(CAM_D2), (IEN | PTD | DIS | M0)) /*CAM_D2*/\ ++ MUX_VAL(CP(CAM_D3), (IEN | PTD | DIS | M0)) /*CAM_D3*/\ ++ MUX_VAL(CP(CAM_D4), (IEN | PTD | DIS | M0)) /*CAM_D4*/\ ++ MUX_VAL(CP(CAM_D5), (IEN | PTD | DIS | M0)) /*CAM_D5*/\ ++ MUX_VAL(CP(CAM_D6), (IEN | PTD | DIS | M0)) /*CAM_D6*/\ ++ MUX_VAL(CP(CAM_D7), (IEN | PTD | DIS | M0)) /*CAM_D7*/\ ++ MUX_VAL(CP(CAM_D8), (IEN | PTD | DIS | M0)) /*CAM_D8*/\ ++ MUX_VAL(CP(CAM_D9), (IEN | PTD | DIS | M0)) /*CAM_D9*/\ ++ MUX_VAL(CP(CAM_D10), (IEN | PTD | DIS | M0)) /*CAM_D10*/\ ++ MUX_VAL(CP(CAM_D11), (IEN | PTD | DIS | M0)) /*CAM_D11*/\ ++ MUX_VAL(CP(CAM_XCLKB), (IDIS | PTD | DIS | M0)) /*CAM_XCLKB*/\ ++ MUX_VAL(CP(CAM_WEN), (IEN | PTD | DIS | M4)) /*GPIO_167*/\ ++ MUX_VAL(CP(CAM_STROBE), (IDIS | PTD | DIS | M0)) /*CAM_STROBE*/\ ++ MUX_VAL(CP(CSI2_DX0), (IEN | PTD | DIS | M0)) /*CSI2_DX0*/\ ++ MUX_VAL(CP(CSI2_DY0), (IEN | PTD | DIS | M0)) /*CSI2_DY0*/\ ++ MUX_VAL(CP(CSI2_DX1), (IEN | PTD | DIS | M0)) /*CSI2_DX1*/\ ++ MUX_VAL(CP(CSI2_DY1), (IEN | PTD | DIS | M0)) /*CSI2_DY1*/\ ++ /*Audio Interface */\ ++ MUX_VAL(CP(McBSP2_FSX), (IEN | PTD | DIS | M0)) /*McBSP2_FSX*/\ ++ MUX_VAL(CP(McBSP2_CLKX), (IEN | PTD | DIS | M0)) /*McBSP2_CLKX*/\ ++ MUX_VAL(CP(McBSP2_DR), (IEN | PTD | DIS | M0)) /*McBSP2_DR*/\ ++ MUX_VAL(CP(McBSP2_DX), (IDIS | PTD | DIS | M0)) /*McBSP2_DX*/\ ++ /*Expansion card */\ ++ MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)) /*MMC1_CLK*/\ ++ MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)) /*MMC1_CMD*/\ ++ MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)) /*MMC1_DAT0*/\ ++ MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\ ++ MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)) /*MMC1_DAT2*/\ ++ MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)) /*MMC1_DAT3*/\ ++ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)) /*MMC1_DAT4*/\ ++ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)) /*MMC1_DAT5*/\ ++ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\ ++ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\ ++ /*Wireless LAN */\ ++ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ ++ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\ ++ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\ ++ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ ++ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\ ++ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ ++ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ ++ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ ++ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ ++ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ ++ /*Bluetooth*/\ ++ MUX_VAL(CP(McBSP3_DX), (IDIS | PTD | DIS | M4)) /*GPIO_140*/\ ++ MUX_VAL(CP(McBSP3_DR), (IDIS | PTD | DIS | M4)) /*GPIO_142*/\ ++ MUX_VAL(CP(McBSP3_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_141*/\ ++ MUX_VAL(CP(McBSP3_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_143*/\ ++ MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\ ++ MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ ++ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/\ ++ MUX_VAL(CP(UART2_RX), (IEN | PTD | DIS | M0)) /*UART2_RX*/\ ++ /*Modem Interface */\ ++ MUX_VAL(CP(UART1_TX), (IDIS | PTD | DIS | M0)) /*UART1_TX*/\ ++ MUX_VAL(CP(UART1_RTS), (IDIS | PTD | DIS | M4)) /*GPIO_149*/ \ ++ MUX_VAL(CP(UART1_CTS), (IDIS | PTD | DIS | M4)) /*GPIO_150*/ \ ++ MUX_VAL(CP(UART1_RX), (IEN | PTD | DIS | M0)) /*UART1_RX*/\ ++ MUX_VAL(CP(McBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX*/\ ++ MUX_VAL(CP(McBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX*/\ ++ MUX_VAL(CP(McBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX*/\ ++ MUX_VAL(CP(McBSP4_FSX), (IEN | PTD | DIS | M1)) /*SSI1_WAKE*/\ ++ MUX_VAL(CP(McBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156*/\ ++ MUX_VAL(CP(McBSP1_FSR), (IDIS | PTU | EN | M4)) /*GPIO_157*/\ ++ /* - BT_WAKEUP*/\ ++ MUX_VAL(CP(McBSP1_DX), (IDIS | PTD | DIS | M4)) /*GPIO_158*/\ ++ MUX_VAL(CP(McBSP1_DR), (IDIS | PTD | DIS | M4)) /*GPIO_159*/\ ++ MUX_VAL(CP(McBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS*/\ ++ MUX_VAL(CP(McBSP1_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_161*/\ ++ MUX_VAL(CP(McBSP1_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_162*/\ ++ /*Serial Interface*/\ ++ MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_*/\ ++ /* RCTX*/\ ++ MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\ ++ MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTD | DIS | M0)) /*UART3_RX_IRRX*/\ ++ MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\ ++ MUX_VAL(CP(HSUSB0_CLK), (IEN | PTD | DIS | M0)) /*HSUSB0_CLK*/\ ++ MUX_VAL(CP(HSUSB0_STP), (IDIS | PTU | EN | M0)) /*HSUSB0_STP*/\ ++ MUX_VAL(CP(HSUSB0_DIR), (IEN | PTD | DIS | M0)) /*HSUSB0_DIR*/\ ++ MUX_VAL(CP(HSUSB0_NXT), (IEN | PTD | DIS | M0)) /*HSUSB0_NXT*/\ ++ MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA0*/\ ++ MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA1*/\ ++ MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA2*/\ ++ MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA3*/\ ++ MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA4*/\ ++ MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA5*/\ ++ MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA6*/\ ++ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\ ++ MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ ++ MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ ++ MUX_VAL(CP(I2C2_SCL), (IDIS | PTU | DIS | M4)) /*GPIO_168*/\ ++ MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\ ++ MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\ ++ MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\ ++ MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\ ++ MUX_VAL(CP(I2C4_SDA), (IEN | PTU | EN | M0)) /*I2C4_SDA*/\ ++ MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*HDQ_SIO*/\ ++ MUX_VAL(CP(McSPI1_CLK), (IEN | PTD | DIS | M0)) /*McSPI1_CLK*/\ ++ MUX_VAL(CP(McSPI1_SIMO), (IEN | PTD | DIS | M0)) /*McSPI1_SIMO */\ ++ MUX_VAL(CP(McSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI */\ ++ MUX_VAL(CP(McSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\ ++ MUX_VAL(CP(McSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\ ++ MUX_VAL(CP(McSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\ ++ /* - NOR_DPD*/\ ++ MUX_VAL(CP(McSPI1_CS3), (IEN | PTD | EN | M0)) /*McSPI1_CS3*/\ ++ MUX_VAL(CP(McSPI2_CLK), (IEN | PTD | DIS | M0)) /*McSPI2_CLK*/\ ++ MUX_VAL(CP(McSPI2_SIMO), (IEN | PTD | DIS | M0)) /*McSPI2_SIMO*/\ ++ MUX_VAL(CP(McSPI2_SOMI), (IEN | PTD | DIS | M0)) /*McSPI2_SOMI*/\ ++ MUX_VAL(CP(McSPI2_CS0), (IEN | PTD | EN | M0)) /*McSPI2_CS0*/\ ++ MUX_VAL(CP(McSPI2_CS1), (IEN | PTD | EN | M0)) /*McSPI2_CS1*/\ ++ /*Control and debug */\ ++ MUX_VAL(CP(SYS_32K), (IEN | PTD | DIS | M0)) /*SYS_32K*/\ ++ MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS | M0)) /*SYS_CLKREQ*/\ ++ MUX_VAL(CP(SYS_nIRQ), (IEN | PTU | EN | M0)) /*SYS_nIRQ*/\ ++ MUX_VAL(CP(SYS_BOOT0), (IEN | PTD | DIS | M4)) /*GPIO_2*/\ ++ /* - PEN_IRQ */\ ++ MUX_VAL(CP(SYS_BOOT1), (IEN | PTD | DIS | M4)) /*GPIO_3 */\ ++ MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /*GPIO_4*/\ ++ /* - MMC1_WP */\ ++ MUX_VAL(CP(SYS_BOOT3), (IEN | PTD | DIS | M4)) /*GPIO_5*/\ ++ /* - LCD_ENVDD*/\ ++ MUX_VAL(CP(SYS_BOOT4), (IEN | PTD | DIS | M4)) /*GPIO_6*/\ ++ /* - LAN_INTR0*/\ ++ MUX_VAL(CP(SYS_BOOT5), (IEN | PTD | DIS | M4)) /*GPIO_7*/\ ++ /* - MMC2_WP*/\ ++ MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M4)) /*GPIO_8*/\ ++ /* - LCD_ENBKL*/\ ++ MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\ ++ MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\ ++ MUX_VAL(CP(SYS_CLKOUT2), (IEN | PTU | EN | M4)) /*GPIO_186*/\ ++ MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN | M3)) /*HSUSB1_STP*/\ ++ MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTD | DIS | M3)) /*HSUSB1_CLK*/\ ++ MUX_VAL(CP(ETK_D0_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA0*/\ ++ MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA1*/\ ++ MUX_VAL(CP(ETK_D2_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA2*/\ ++ MUX_VAL(CP(ETK_D3_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA7*/\ ++ MUX_VAL(CP(ETK_D4_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA4*/\ ++ MUX_VAL(CP(ETK_D5_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA5*/\ ++ MUX_VAL(CP(ETK_D6_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA6*/\ ++ MUX_VAL(CP(ETK_D7_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DATA3*/\ ++ MUX_VAL(CP(ETK_D8_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_DIR*/\ ++ MUX_VAL(CP(ETK_D9_ES2), (IEN | PTD | DIS | M3)) /*HSUSB1_NXT*/\ ++ MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTU | EN | M4)) /*GPIO_24*/\ ++ MUX_VAL(CP(ETK_D15), (IEN | PTU | EN | M4)) /*GPIO_29*/\ ++ MUX_VAL(CP(d2d_mcad1), (IEN | PTD | EN | M0)) /*d2d_mcad1*/\ ++ MUX_VAL(CP(d2d_mcad2), (IEN | PTD | EN | M0)) /*d2d_mcad2*/\ ++ MUX_VAL(CP(d2d_mcad3), (IEN | PTD | EN | M0)) /*d2d_mcad3*/\ ++ MUX_VAL(CP(d2d_mcad4), (IEN | PTD | EN | M0)) /*d2d_mcad4*/\ ++ MUX_VAL(CP(d2d_mcad5), (IEN | PTD | EN | M0)) /*d2d_mcad5*/\ ++ MUX_VAL(CP(d2d_mcad6), (IEN | PTD | EN | M0)) /*d2d_mcad6*/\ ++ MUX_VAL(CP(d2d_mcad7), (IEN | PTD | EN | M0)) /*d2d_mcad7*/\ ++ MUX_VAL(CP(d2d_mcad8), (IEN | PTD | EN | M0)) /*d2d_mcad8*/\ ++ MUX_VAL(CP(d2d_mcad9), (IEN | PTD | EN | M0)) /*d2d_mcad9*/\ ++ MUX_VAL(CP(d2d_mcad10), (IEN | PTD | EN | M0)) /*d2d_mcad10*/\ ++ MUX_VAL(CP(d2d_mcad11), (IEN | PTD | EN | M0)) /*d2d_mcad11*/\ ++ MUX_VAL(CP(d2d_mcad12), (IEN | PTD | EN | M0)) /*d2d_mcad12*/\ ++ MUX_VAL(CP(d2d_mcad13), (IEN | PTD | EN | M0)) /*d2d_mcad13*/\ ++ MUX_VAL(CP(d2d_mcad14), (IEN | PTD | EN | M0)) /*d2d_mcad14*/\ ++ MUX_VAL(CP(d2d_mcad15), (IEN | PTD | EN | M0)) /*d2d_mcad15*/\ ++ MUX_VAL(CP(d2d_mcad16), (IEN | PTD | EN | M0)) /*d2d_mcad16*/\ ++ MUX_VAL(CP(d2d_mcad17), (IEN | PTD | EN | M0)) /*d2d_mcad17*/\ ++ MUX_VAL(CP(d2d_mcad18), (IEN | PTD | EN | M0)) /*d2d_mcad18*/\ ++ MUX_VAL(CP(d2d_mcad19), (IEN | PTD | EN | M0)) /*d2d_mcad19*/\ ++ MUX_VAL(CP(d2d_mcad20), (IEN | PTD | EN | M0)) /*d2d_mcad20*/\ ++ MUX_VAL(CP(d2d_mcad21), (IEN | PTD | EN | M0)) /*d2d_mcad21*/\ ++ MUX_VAL(CP(d2d_mcad22), (IEN | PTD | EN | M0)) /*d2d_mcad22*/\ ++ MUX_VAL(CP(d2d_mcad23), (IEN | PTD | EN | M0)) /*d2d_mcad23*/\ ++ MUX_VAL(CP(d2d_mcad24), (IEN | PTD | EN | M0)) /*d2d_mcad24*/\ ++ MUX_VAL(CP(d2d_mcad25), (IEN | PTD | EN | M0)) /*d2d_mcad25*/\ ++ MUX_VAL(CP(d2d_mcad26), (IEN | PTD | EN | M0)) /*d2d_mcad26*/\ ++ MUX_VAL(CP(d2d_mcad27), (IEN | PTD | EN | M0)) /*d2d_mcad27*/\ ++ MUX_VAL(CP(d2d_mcad28), (IEN | PTD | EN | M0)) /*d2d_mcad28*/\ ++ MUX_VAL(CP(d2d_mcad29), (IEN | PTD | EN | M0)) /*d2d_mcad29*/\ ++ MUX_VAL(CP(d2d_mcad30), (IEN | PTD | EN | M0)) /*d2d_mcad30*/\ ++ MUX_VAL(CP(d2d_mcad31), (IEN | PTD | EN | M0)) /*d2d_mcad31*/\ ++ MUX_VAL(CP(d2d_mcad32), (IEN | PTD | EN | M0)) /*d2d_mcad32*/\ ++ MUX_VAL(CP(d2d_mcad33), (IEN | PTD | EN | M0)) /*d2d_mcad33*/\ ++ MUX_VAL(CP(d2d_mcad34), (IEN | PTD | EN | M0)) /*d2d_mcad34*/\ ++ MUX_VAL(CP(d2d_mcad35), (IEN | PTD | EN | M0)) /*d2d_mcad35*/\ ++ MUX_VAL(CP(d2d_mcad36), (IEN | PTD | EN | M0)) /*d2d_mcad36*/\ ++ MUX_VAL(CP(d2d_clk26mi), (IEN | PTD | DIS | M0)) /*d2d_clk26mi*/\ ++ MUX_VAL(CP(d2d_nrespwron), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\ ++ MUX_VAL(CP(d2d_nreswarm), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\ ++ MUX_VAL(CP(d2d_arm9nirq), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\ ++ MUX_VAL(CP(d2d_uma2p6fiq), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\ ++ MUX_VAL(CP(d2d_spint), (IEN | PTD | EN | M0)) /*d2d_spint*/\ ++ MUX_VAL(CP(d2d_frint), (IEN | PTD | EN | M0)) /*d2d_frint*/\ ++ MUX_VAL(CP(d2d_dmareq0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0*/\ ++ MUX_VAL(CP(d2d_dmareq1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1*/\ ++ MUX_VAL(CP(d2d_dmareq2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2*/\ ++ MUX_VAL(CP(d2d_dmareq3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3*/\ ++ MUX_VAL(CP(d2d_n3gtrst), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst*/\ ++ MUX_VAL(CP(d2d_n3gtdi), (IEN | PTD | DIS | M0)) /*d2d_n3gtdi*/\ ++ MUX_VAL(CP(d2d_n3gtdo), (IEN | PTD | DIS | M0)) /*d2d_n3gtdo*/\ ++ MUX_VAL(CP(d2d_n3gtms), (IEN | PTD | DIS | M0)) /*d2d_n3gtms*/\ ++ MUX_VAL(CP(d2d_n3gtck), (IEN | PTD | DIS | M0)) /*d2d_n3gtck*/\ ++ MUX_VAL(CP(d2d_n3grtck), (IEN | PTD | DIS | M0)) /*d2d_n3grtck*/\ ++ MUX_VAL(CP(d2d_mstdby), (IEN | PTU | EN | M0)) /*d2d_mstdby*/\ ++ MUX_VAL(CP(d2d_swakeup), (IEN | PTD | EN | M0)) /*d2d_swakeup*/\ ++ MUX_VAL(CP(d2d_idlereq), (IEN | PTD | DIS | M0)) /*d2d_idlereq*/\ ++ MUX_VAL(CP(d2d_idleack), (IEN | PTU | EN | M0)) /*d2d_idleack*/\ ++ MUX_VAL(CP(d2d_mwrite), (IEN | PTD | DIS | M0)) /*d2d_mwrite*/\ ++ MUX_VAL(CP(d2d_swrite), (IEN | PTD | DIS | M0)) /*d2d_swrite*/\ ++ MUX_VAL(CP(d2d_mread), (IEN | PTD | DIS | M0)) /*d2d_mread*/\ ++ MUX_VAL(CP(d2d_sread), (IEN | PTD | DIS | M0)) /*d2d_sread*/\ ++ MUX_VAL(CP(d2d_mbusflag), (IEN | PTD | DIS | M0)) /*d2d_mbusflag*/\ ++ MUX_VAL(CP(d2d_sbusflag), (IEN | PTD | DIS | M0)) /*d2d_sbusflag*/\ ++ MUX_VAL(CP(sdrc_cke0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\ ++ MUX_VAL(CP(sdrc_cke1), (IDIS | PTD | DIS | M7)) /*sdrc_cke1*/\ ++ /* - not used */ +#endif diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h new file mode 100644 -index 0000000..e9b494f +index 0000000..095bb29 --- /dev/null +++ b/include/asm-arm/arch-omap3/omap3.h -@@ -0,0 +1,154 @@ +@@ -0,0 +1,131 @@ +/* -+ * (C) Copyright 2006 ++ * (C) Copyright 2006-2008 + * Texas Instruments, <www.ti.com> + * Richard Woodruff <r-woodruff2@ti.com> + * Syed Mohammed Khasim <x0khasim@ti.com> @@ -6401,23 +6196,12 @@ index 0000000..e9b494f + * MA 02111-1307 USA + */ + -+#ifndef _OMAP3430_SYS_H_ -+#define _OMAP3430_SYS_H_ -+ -+#include <asm/arch/sizes.h> -+ -+/* -+ * 3430 specific Section -+ */ ++#ifndef _OMAP3_H_ ++#define _OMAP3_H_ + +/* Stuff on L3 Interconnect */ +#define SMX_APE_BASE 0x68000000 + -+/* L3 Firewall */ -+#define A_REQINFOPERM0 (SMX_APE_BASE + 0x05048) -+#define A_READPERM0 (SMX_APE_BASE + 0x05050) -+#define A_WRITEPERM0 (SMX_APE_BASE + 0x05058) -+ +/* GPMC */ +#define OMAP34XX_GPMC_BASE (0x6E000000) + @@ -6431,19 +6215,13 @@ index 0000000..e9b494f + * L4 Peripherals - L4 Wakeup and L4 Core now + */ +#define OMAP34XX_CORE_L4_IO_BASE 0x48000000 -+ +#define OMAP34XX_WAKEUP_L4_IO_BASE 0x48300000 -+ +#define OMAP34XX_L4_PER 0x49000000 -+ +#define OMAP34XX_L4_IO_BASE OMAP34XX_CORE_L4_IO_BASE + +/* CONTROL */ +#define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE+0x2000) + -+/* TAP information dont know for 3430*/ -+#define OMAP34XX_TAP_BASE (0x49000000) /*giving some junk for virtio */ -+ +/* UART */ +#define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE+0x6a000) +#define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE+0x6c000) @@ -6480,148 +6258,22 @@ index 0000000..e9b494f +#define OMAP34XX_GPIO5_BASE 0x49056000 +#define OMAP34XX_GPIO6_BASE 0x49058000 + -+/* -+ * SDP3430 specific Section -+ */ -+ -+/* -+ * The 343x's chip selects are programmable. The mask ROM -+ * does configure CS0 to 0x08000000 before dispatch. So, if -+ * you want your code to live below that address, you have to -+ * be prepared to jump though hoops, to reset the base address. -+ * Same as in SDP3430 -+ */ -+#if (CONFIG_3430SDP) -+ -+/* base address for indirect vectors (internal boot mode) */ -+#define SRAM_OFFSET0 0x40000000 -+#define SRAM_OFFSET1 0x00200000 -+#define SRAM_OFFSET2 0x0000F800 -+#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|SRAM_OFFSET2) -+ -+#define LOW_LEVEL_SRAM_STACK 0x4020FFFC -+ -+/* FPGA on Debug board.*/ -+#define ETH_CONTROL_REG (DEBUG_BASE+0x30b) -+#define LAN_RESET_REGISTER (DEBUG_BASE+0x1c) -+ -+#define DIP_SWITCH_INPUT_REG2 (DEBUG_BASE+0x60) -+#define LED_REGISTER (DEBUG_BASE+0x40) -+#define FPGA_REV_REGISTER (DEBUG_BASE+0x10) -+#define EEPROM_MAIN_BRD (DEBUG_BASE+0x10000+0x1800) -+#define EEPROM_CONN_BRD (DEBUG_BASE+0x10000+0x1900) -+#define EEPROM_UI_BRD (DEBUG_BASE+0x10000+0x1A00) -+#define EEPROM_MCAM_BRD (DEBUG_BASE+0x10000+0x1B00) -+#define ENHANCED_UI_EE_NAME "750-2075" -+ -+#elif (CONFIG_OMAP3_BEAGLE) -+ +/* base address for indirect vectors (internal boot mode) */ +#define SRAM_OFFSET0 0x40000000 +#define SRAM_OFFSET1 0x00200000 +#define SRAM_OFFSET2 0x0000F800 -+#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|SRAM_OFFSET2) ++#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|\ ++ SRAM_OFFSET2) + +#define LOW_LEVEL_SRAM_STACK 0x4020FFFC + +#define DEBUG_LED1 149 /* gpio */ +#define DEBUG_LED2 150 /* gpio */ + -+#endif /* endif (CONFIG_3430SDP) */ -+ -+#endif -diff --git a/include/asm-arm/arch-omap3/sizes.h b/include/asm-arm/arch-omap3/sizes.h -new file mode 100644 -index 0000000..c47320e ---- /dev/null -+++ b/include/asm-arm/arch-omap3/sizes.h -@@ -0,0 +1,49 @@ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+/* Size defintions -+ * Copyright (C) ARM Limited 1998. All rights reserved. -+ */ -+ -+#ifndef __sizes_h -+#define __sizes_h 1 -+ -+/* handy sizes */ -+#define SZ_1K 0x00000400 -+#define SZ_4K 0x00001000 -+#define SZ_8K 0x00002000 -+#define SZ_16K 0x00004000 -+#define SZ_32K 0x00008000 -+#define SZ_64K 0x00010000 -+#define SZ_128K 0x00020000 -+#define SZ_256K 0x00040000 -+#define SZ_512K 0x00080000 -+ -+#define SZ_1M 0x00100000 -+#define SZ_2M 0x00200000 -+#define SZ_4M 0x00400000 -+#define SZ_8M 0x00800000 -+#define SZ_16M 0x01000000 -+#define SZ_31M 0x01F00000 -+#define SZ_32M 0x02000000 -+#define SZ_64M 0x04000000 -+#define SZ_128M 0x08000000 -+#define SZ_256M 0x10000000 -+#define SZ_512M 0x20000000 -+ -+#define SZ_1G 0x40000000 -+#define SZ_2G 0x80000000 -+ -+#endif /* __sizes_h */ -diff --git a/include/asm-arm/arch-omap3/sys_info.h b/include/asm-arm/arch-omap3/sys_info.h -new file mode 100644 -index 0000000..c839e01 ---- /dev/null -+++ b/include/asm-arm/arch-omap3/sys_info.h -@@ -0,0 +1,74 @@ -+/* -+ * (C) Copyright 2006 -+ * Texas Instruments, <www.ti.com> -+ * Richard Woodruff <r-woodruff2@ti.com> -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#ifndef _OMAP34XX_SYS_INFO_H_ -+#define _OMAP34XX_SYS_INFO_H_ -+ +#define XDR_POP 5 /* package on package part */ +#define SDR_DISCRETE 4 /* 128M memory SDR module */ +#define DDR_STACKED 3 /* stacked part on 2422 */ -+#define DDR_COMBO 2 /* combo part on cpu daughter card (menalaeus) */ ++#define DDR_COMBO 2 /* combo part on cpu daughter card */ +#define DDR_DISCRETE 1 /* 2x16 parts on daughter card */ + +#define DDR_100 100 /* type found on most mem d-boards */ @@ -6642,24 +6294,9 @@ index 0000000..c839e01 +#define CPU_3430_ES1 1 +#define CPU_3430_ES2 2 + -+/* Currently Virtio models this one */ -+#define CPU_3430_CHIPID 0x0B68A000 -+ -+#define GPMC_MUXED 1 -+#define GPMC_NONMUXED 0 -+ -+#define TYPE_NAND 0x800 /* bit pos for nand in gpmc reg */ -+#define TYPE_NOR 0x000 -+#define TYPE_ONENAND 0x800 -+ +#define WIDTH_8BIT 0x0000 +#define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */ + -+#define I2C_MENELAUS 0x72 /* i2c id for companion chip */ -+#define I2C_TRITON2 0x4B /* addres of power group */ -+ -+#define BOOT_FAST_XIP 0x1f -+ +/* SDP definitions according to FPGA Rev. Is this OK?? */ +#define SDP_3430_V1 0x1 +#define SDP_3430_V2 0x2 @@ -6667,12 +6304,12 @@ index 0000000..c839e01 +#endif diff --git a/include/asm-arm/arch-omap3/sys_proto.h b/include/asm-arm/arch-omap3/sys_proto.h new file mode 100644 -index 0000000..b62bc9f +index 0000000..271b554 --- /dev/null +++ b/include/asm-arm/arch-omap3/sys_proto.h -@@ -0,0 +1,66 @@ +@@ -0,0 +1,64 @@ +/* -+ * (C) Copyright 2004-2006 ++ * (C) Copyright 2004-2008 + * Texas Instruments, <www.ti.com> + * Richard Woodruff <r-woodruff2@ti.com> + * @@ -6691,8 +6328,8 @@ index 0000000..b62bc9f + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ -+#ifndef _OMAP34XX_SYS_PROTO_H_ -+#define _OMAP34XX_SYS_PROTO_H_ ++#ifndef _SYS_PROTO_H_ ++#define _SYS_PROTO_H_ + +void prcm_init(void); +void per_clocks_enable(void); @@ -6702,7 +6339,6 @@ index 0000000..b62bc9f +void do_sdrc_init(u32, u32); +void gpmc_init(void); + -+void ether_init(void); +void watchdog_init(void); +void set_muxconf_regs(void); + @@ -6716,7 +6352,6 @@ index 0000000..b62bc9f +u32 get_gpmc0_width(void); +u32 get_board_type(void); +void display_board_info(u32); -+void update_mux(u32, u32); +u32 get_sdr_cs_size(u32 offset); +u32 running_in_sdram(void); +u32 running_in_sram(void); @@ -6739,17 +6374,17 @@ index 0000000..b62bc9f +#endif diff --git a/include/configs/omap3530beagle.h b/include/configs/omap3530beagle.h new file mode 100644 -index 0000000..03dc31b +index 0000000..fd21ab3 --- /dev/null +++ b/include/configs/omap3530beagle.h -@@ -0,0 +1,285 @@ +@@ -0,0 +1,292 @@ +/* -+ * (C) Copyright 2006 ++ * (C) Copyright 2006-2008 + * Texas Instruments. + * Richard Woodruff <r-woodruff2@ti.com> + * Syed Mohammed Khasim <x0khasim@ti.com> + * -+ * Configuration settings for the 3430 TI SDP3430 board. ++ * Configuration settings for the TI OMAP3530 Beagle board. + * + * See file CREDITS for list of people who contributed to this + * project. @@ -6772,6 +6407,7 @@ index 0000000..03dc31b + +#ifndef __CONFIG_H +#define __CONFIG_H ++#include <asm/sizes.h> + +/* + * High Level Configuration Options @@ -6784,6 +6420,7 @@ index 0000000..03dc31b +#define CONFIG_DOS_PARTITION 1 + +#include <asm/arch/cpu.h> /* get chip and board defs */ ++#include <asm/arch/omap3.h> + +/* Clock Defines */ +#define V_OSCK 26000000 /* Clock output from T2 */ @@ -6800,9 +6437,9 @@ index 0000000..03dc31b +/* + * Size of malloc() pool + */ -+#define CFG_ENV_SIZE SZ_128K /* Total Size Environment Sector */ ++#define CFG_ENV_SIZE SZ_128K /* Total Size Environment Sector */ +#define CFG_MALLOC_LEN (CFG_ENV_SIZE + SZ_128K) -+#define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */ ++#define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */ + +/* + * Hardware drivers @@ -6884,15 +6521,16 @@ index 0000000..03dc31b +#define CFG_NAND_WP + +#define CONFIG_JFFS2_NAND -+#define CONFIG_JFFS2_DEV "nand0" /* nand device jffs2 lives on */ -+#define CONFIG_JFFS2_PART_OFFSET 0x680000 /* start of jffs2 partition */ ++/* nand device jffs2 lives on */ ++#define CONFIG_JFFS2_DEV "nand0" ++/* start of jffs2 partition */ ++#define CONFIG_JFFS2_PART_OFFSET 0x680000 +#define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 partition */ + +/* Environment information */ +#define CONFIG_BOOTDELAY 10 + -+#define CONFIG_BOOTCOMMAND \ -+ "mmcinit;fatload mmc 0 0x80300000 uImage; fatload mmc 0 0x81600000 rd-ext2.bin; bootm 0x80300000\0" ++#define CONFIG_BOOTCOMMAND "mmcinit;fatload mmc 0 0x80300000 uImage; fatload mmc 0 0x81600000 rd-ext2.bin; bootm 0x80300000\0" + +#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2,115200n8 ramdisk_size=3072 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,3M " + @@ -6915,11 +6553,11 @@ index 0000000..03dc31b +#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ + +#define CFG_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest works on */ -+#define CFG_MEMTEST_END (OMAP34XX_SDRC_CS0+SZ_31M) ++#define CFG_MEMTEST_END (OMAP34XX_SDRC_CS0+0x01F00000) /* 31MB */ + +#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ + -+#define CFG_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load address */ ++#define CFG_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load address */ + +/* 2430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by + * 32KHz clk, or from external sig. This rate is divided by a local divisor. @@ -7015,14 +6653,18 @@ index 0000000..03dc31b +#endif + + -+#define WRITE_NAND_COMMAND(d, adr) __raw_writew(d, (nand_cs_base + GPMC_NAND_CMD)) -+#define WRITE_NAND_ADDRESS(d, adr) __raw_writew(d, (nand_cs_base + GPMC_NAND_ADR)) ++#define WRITE_NAND_COMMAND(d, adr)\ ++ __raw_writew(d, (nand_cs_base + GPMC_NAND_CMD)) ++#define WRITE_NAND_ADDRESS(d, adr)\ ++ __raw_writew(d, (nand_cs_base + GPMC_NAND_ADR)) +#define WRITE_NAND(d, adr) __raw_writew(d, (nand_cs_base + GPMC_NAND_DAT)) +#define READ_NAND(adr) __raw_readw((nand_cs_base + GPMC_NAND_DAT)) + +/* Other NAND Access APIs */ -+#define NAND_WP_OFF() do {*(volatile u32 *)(GPMC_CONFIG) |= 0x00000010;} while(0) -+#define NAND_WP_ON() do {*(volatile u32 *)(GPMC_CONFIG) &= ~0x00000010;} while(0) ++#define NAND_WP_OFF()\ ++ do {*(volatile u32 *)(GPMC_CONFIG) |= 0x00000010; } while (0) ++#define NAND_WP_ON()\ ++ do {*(volatile u32 *)(GPMC_CONFIG) &= ~0x00000010; } while (0) +#define NAND_DISABLE_CE(nand) +#define NAND_ENABLE_CE(nand) +#define NAND_WAIT_READY(nand) udelay(10) diff --git a/packages/u-boot/u-boot_git.bb b/packages/u-boot/u-boot_git.bb index 451828062d..68d5167b8b 100644 --- a/packages/u-boot/u-boot_git.bb +++ b/packages/u-boot/u-boot_git.bb @@ -1,8 +1,8 @@ require u-boot.inc -PR="r3" +PR="r4" SRCREV_davinci-sffsdr = "4ce1e23b5e12283579828b3d23e8fd6e1328a7aa" -SRCREV_beagleboard = "8155efbd7ae9c65564ca98affe94631d612ae088" +SRCREV_beagleboard = "a94f22f08f280905926219e568568964cb9eeb9d" SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git " SRC_URI_sequoia = "git://www.denx.de/git/u-boot.git;protocol=git;tag=cf3b41e0c1111dbb865b6e34e9f3c3d3145a6093 " diff --git a/packages/xorg-app/sessreg_1.0.4.bb b/packages/xorg-app/sessreg_1.0.4.bb new file mode 100644 index 0000000000..bd81532513 --- /dev/null +++ b/packages/xorg-app/sessreg_1.0.4.bb @@ -0,0 +1,7 @@ +require xorg-app-common.inc +PE = "1" + +DESCRIPTION = "a simple program for managing utmp/wtmp entries" + +DEPENDS += " virtual/libx11" + diff --git a/packages/xorg-app/xinit_1.1.0.bb b/packages/xorg-app/xinit_1.1.0.bb new file mode 100644 index 0000000000..ce82fb05d4 --- /dev/null +++ b/packages/xorg-app/xinit_1.1.0.bb @@ -0,0 +1,6 @@ +require xorg-app-common.inc + +DESCRIPTION = "X Window System initializer" +PE = "1" + +FILES_${PN} += "${libdir}X11/xinit" diff --git a/packages/xorg-proto/xextproto_7.0.3.bb b/packages/xorg-proto/xextproto_7.0.3.bb new file mode 100644 index 0000000000..3637929316 --- /dev/null +++ b/packages/xorg-proto/xextproto_7.0.3.bb @@ -0,0 +1,3 @@ +require xorg-proto-common.inc + +PE = "1" diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty b/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/.mtn2git_empty diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch new file mode 100644 index 0000000000..ccc19139c8 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/disable-xf86-dga-xorgcfg.patch @@ -0,0 +1,39 @@ +Index: xorg-server-1.3.0.0/configure.ac +=================================================================== +--- xorg-server-1.3.0.0.orig/configure.ac 2007-04-20 03:23:40.000000000 +0200 ++++ xorg-server-1.3.0.0/configure.ac 2007-05-09 16:51:34.000000000 +0200 +@@ -520,7 +520,11 @@ + XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' + + dnl Core modules for most extensions, et al. ++if test "$KDRIVE" = yes; then ++REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]" ++else + REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]" ++fi + REQUIRED_LIBS="xfont xau fontenc" + + AM_CONDITIONAL(XV, [test "x$XV" = xyes]) +@@ -1603,7 +1607,9 @@ + AC_SUBST(XKB_COMPILED_DIR) + + dnl and the rest of these are generic, so they're in config.h ++if test ! x"$KDRIVE" = xyes; then + AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) ++fi + AC_DEFINE(XResExtension, 1, [Build XRes extension]) + + AC_TRY_COMPILE([ +@@ -1616,10 +1622,12 @@ + + AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) + ++if test ! "x$KDRIVE" = xyes ; then + dnl xorgconfig CLI configuration utility + PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11]) + AC_SUBST(XORGCONFIG_DEP_CFLAGS) + AC_SUBST(XORGCONFIG_DEP_LIBS) ++fi + + dnl xorgcfg GUI configuration utility + AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch new file mode 100644 index 0000000000..3746be5f53 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-tslib.patch @@ -0,0 +1,24 @@ +Index: xorg-server-1.4/configure.ac +=================================================================== +--- xorg-server-1.4.orig/configure.ac 2007-09-08 16:36:37.000000000 +0200 ++++ xorg-server-1.4/configure.ac 2007-09-08 16:38:10.000000000 +0200 +@@ -1816,7 +1816,7 @@ + AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + + if test "x$TSLIB" = xyes; then +- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) ++ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xno; then + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + fi +@@ -1840,8 +1840,8 @@ + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' +- KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" +- KDRIVE_LIBS="$XSERVERLIBS_LIBS $KDRIVE_LOCAL_LIBS" ++ KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" ++ KDRIVE_LIBS="$XSERVERLIBS_LIBS $TSLIB_LIBS $KDRIVE_LOCAL_LIBS" + + # check if we can build Xephyr + PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch new file mode 100644 index 0000000000..113f1cc584 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/enable-xcalibrate.patch @@ -0,0 +1,77 @@ +--- + Xext/Makefile.am | 6 ++++++ + configure.ac | 9 ++++++++- + include/kdrive-config.h.in | 3 +++ + mi/miinitext.c | 6 ++++++ + 4 files changed, 23 insertions(+), 1 deletion(-) + +Index: xorg-server-1.4/mi/miinitext.c +=================================================================== +--- xorg-server-1.4.orig/mi/miinitext.c 2007-08-23 21:04:54.000000000 +0200 ++++ xorg-server-1.4/mi/miinitext.c 2007-09-06 23:25:35.000000000 +0200 +@@ -374,6 +374,9 @@ + #ifdef DMXEXT + extern void DMXExtensionInit(INITARGS); + #endif ++#ifdef XCALIBRATE ++extern void XCalibrateExtensionInit(INITARGS); ++#endif + #ifdef XEVIE + extern void XevieExtensionInit(INITARGS); + #endif +@@ -666,6 +669,9 @@ + #ifdef DAMAGE + if (!noDamageExtension) DamageExtensionInit(); + #endif ++#ifdef XCALIBRATE ++ XCalibrateExtensionInit (); ++#endif + } + + void +Index: xorg-server-1.4/configure.ac +=================================================================== +--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:25:15.000000000 +0200 ++++ xorg-server-1.4/configure.ac 2007-09-06 23:26:40.000000000 +0200 +@@ -500,6 +500,7 @@ + AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) + AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) + AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) ++AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) + AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) + AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) + AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) +@@ -787,6 +788,12 @@ + AC_DEFINE(XCSECURITY, 1, [Build Security extension]) + fi + ++AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes]) ++if test "x$XCALIBRATE" = xyes; then ++ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) ++ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" ++fi ++ + AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes]) + if test "x$XEVIE" = xyes; then + AC_DEFINE(XEVIE, 1, [Build XEvIE extension]) +@@ -1841,7 +1848,7 @@ + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' +- KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" ++ KDRIVE_LOCAL_LIBS="$DIX_LIB $CONFIG_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB" + KDRIVE_LIBS="$XSERVERLIBS_LIBS $TSLIB_LIBS $KDRIVE_LOCAL_LIBS" + + # check if we can build Xephyr +Index: xorg-server-1.4/include/kdrive-config.h.in +=================================================================== +--- xorg-server-1.4.orig/include/kdrive-config.h.in 2007-08-23 21:04:54.000000000 +0200 ++++ xorg-server-1.4/include/kdrive-config.h.in 2007-09-06 23:25:35.000000000 +0200 +@@ -31,4 +31,7 @@ + /* Have execinfo.h for backtrace(). */ + #undef HAVE_EXECINFO_H + ++/* Enable XCalibrate extension */ ++#undef XCALIBRATE ++ + #endif /* _KDRIVE_CONFIG_H_ */ diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch new file mode 100644 index 0000000000..4964ff5479 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/keyboard-resume-workaround.patch @@ -0,0 +1,16 @@ +Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c +=================================================================== +--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200 ++++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200 +@@ -743,11 +743,6 @@ + cfsetispeed(&nTty, 9600); + cfsetospeed(&nTty, 9600); + tcsetattr(fd, TCSANOW, &nTty); +- /* +- * Flush any pending keystrokes +- */ +- while ((n = read (fd, buf, sizeof (buf))) > 0) +- ; + KdRegisterFd (fd, LinuxKeyboardRead, ki); + return Success; + } diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch new file mode 100644 index 0000000000..36d2f8eae8 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/linux-keyboard-mediumraw.patch @@ -0,0 +1,44 @@ +Index: git/hw/kdrive/linux/keyboard.c +=================================================================== +--- git.orig/hw/kdrive/linux/keyboard.c 2007-11-14 21:30:45.000000000 +0000 ++++ git/hw/kdrive/linux/keyboard.c 2007-11-15 12:00:11.000000000 +0000 +@@ -42,6 +42,8 @@ + #include <sys/ioctl.h> + + extern int LinuxConsoleFd; ++static unsigned char mediumraw_data, mediumraw_up; ++static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT; + + static const KeySym linux_to_x[256] = { + NoSymbol, NoSymbol, NoSymbol, NoSymbol, +@@ -701,7 +703,29 @@ + else + #endif + scancode = b[0] & 0x7f; +- KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); ++ /* This is extended medium raw mode interpreter ++ see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */ ++ switch (mediumraw_state) ++ { ++ case DEFAULT: ++ if (scancode == 0) ++ { ++ mediumraw_state = EXTBYTE1; ++ mediumraw_up = b[0] & 0x80; ++ } ++ else ++ KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); ++ break; ++ case EXTBYTE1: ++ mediumraw_data = scancode; ++ mediumraw_state = EXTBYTE2; ++ break; ++ case EXTBYTE2: ++ /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */ ++ KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up); ++ mediumraw_state = DEFAULT; ++ break; ++ } + b++; + } + } diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch new file mode 100644 index 0000000000..779aa2d6ef --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/no_xkb.patch @@ -0,0 +1,12 @@ +--- dix/devices.c~ 2008-04-16 13:01:08.000000000 +0200 ++++ dix/devices.c 2008-04-16 13:01:08.000000000 +0200 +@@ -527,8 +527,8 @@ + #ifdef XKB + if (dev->key->xkbInfo) + XkbFreeInfo(dev->key->xkbInfo); +-#endif + dev->key->xkbInfo = NULL; ++#endif + xfree(dev->key->curKeySyms.map); + xfree(dev->key->modifierKeyMap); + xfree(dev->key); diff --git a/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch b/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch new file mode 100644 index 0000000000..0812a2e856 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch @@ -0,0 +1,54 @@ +Index: xorg-server-1.4/hw/kdrive/Makefile.am +=================================================================== +--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-09-06 23:32:04.000000000 +0200 ++++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:33:44.000000000 +0200 +@@ -11,6 +11,10 @@ + XFAKE_SUBDIRS = fake + endif + ++if KDRIVEW100 ++W100_SUBDIRS = w100 ++endif ++ + if XSDLSERVER + XSDL_SUBDIRS = sdl + endif +@@ -26,6 +30,7 @@ + SERVER_SUBDIRS = \ + $(XSDL_SUBDIRS) \ + $(FBDEV_SUBDIRS) \ ++ $(W100_SUBDIRS) \ + $(VESA_SUBDIRS) \ + $(XEPHYR_SUBDIRS) \ + $(XFAKE_SUBDIRS) +Index: xorg-server-1.4/configure.ac +=================================================================== +--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:32:05.000000000 +0200 ++++ xorg-server-1.4/configure.ac 2007-09-06 23:34:41.000000000 +0200 +@@ -535,6 +535,7 @@ + AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) + AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) + AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto]) ++AC_ARG_ENABLE(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no]) + AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) + AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) + AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto]) +@@ -1669,6 +1670,10 @@ + fi + AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes]) + ++AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes]) ++if test "x$KDRIVEW100" = xyes; then ++ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server]) ++fi + + dnl XWin DDX + +@@ -2112,6 +2117,7 @@ + hw/kdrive/epson/Makefile + hw/kdrive/fake/Makefile + hw/kdrive/fbdev/Makefile ++hw/kdrive/w100/Makefile + hw/kdrive/i810/Makefile + hw/kdrive/linux/Makefile + hw/kdrive/mach64/Makefile diff --git a/packages/xorg-xserver/xserver-kdrive_1.4.2.bb b/packages/xorg-xserver/xserver-kdrive_1.4.2.bb new file mode 100644 index 0000000000..5155a267b5 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive_1.4.2.bb @@ -0,0 +1,33 @@ +require xserver-kdrive-common.inc + +DEPENDS += "hal libxkbfile libxcalibrate pixman" + +PE = "1" + +SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \ + ${KDRIVE_COMMON_PATCHES} \ + file://enable-epson.patch;patch=1 \ + file://fix_default_mode.patch;patch=1 \ + file://enable-xcalibrate.patch;patch=1 \ + file://hide-cursor-and-ppm-root.patch;patch=1 \ + file://xcalibrate_coords.patch;patch=1 \ + file://w100.patch;patch=1 \ + file://w100-autofoo.patch;patch=1 \ + file://w100-fix-offscreen-bmp.patch;patch=1 \ + file://w100-new-input-world-order.patch;patch=1 \ + file://linux-keyboard-mediumraw.patch;patch=1 \ + file://xcalibrate-new-input-world-order.patch;patch=1 \ + file://tslib-default-device.patch;patch=1 \ + file://fbdev-evdev.patch;patch=1 \ + file://keyboard-resume-workaround.patch;patch=1 \ + file://xorg-avr32-support.diff;patch=1 \ + file://pkgconfig_fix.patch;patch=1 \ + file://no_xkb.patch;patch=1;pnum=0 \ + " + +S = "${WORKDIR}/xorg-server-${PV}" + +W100_OECONF = "--disable-w100" +W100_OECONF_arm = "--enable-w100" + +EXTRA_OECONF += "--enable-builtin-fonts" diff --git a/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty b/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/xorg-xserver/xserver-xorg-1.4.2/.mtn2git_empty diff --git a/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch b/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch new file mode 100644 index 0000000000..a62a767f23 --- /dev/null +++ b/packages/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch @@ -0,0 +1,13 @@ +Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am +=================================================================== +--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200 ++++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100 +@@ -41,7 +41,7 @@ + + AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) + +-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack ++INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) + + # FIXME: These need to be added to the build + LNX_EXTRA_SRCS = \ diff --git a/packages/xorg-xserver/xserver-xorg_1.4.2.bb b/packages/xorg-xserver/xserver-xorg_1.4.2.bb new file mode 100644 index 0000000000..489e01742e --- /dev/null +++ b/packages/xorg-xserver/xserver-xorg_1.4.2.bb @@ -0,0 +1,15 @@ +require xorg-xserver-common.inc + +DESCRIPTION = "the X.Org X server" +DEPENDS += "pixman" +PE = "1" + +SRC_URI += "file://drmfix.patch;patch=1 \ + file://pkgconfig_fix.patch;patch=1 \ + file://sysroot_fix.patch;patch=1" + +MESA_VER = "7.0.2" + +EXTRA_OECONF += " ac_cv_file__usr_share_sgml_X11_defs_ent=no " + +export LDFLAGS += " -ldl " |