Re: [yocto] Kernel config fragments are not applied
Hi Bruce Here is the error messega, I get after a bitbake linux-cubox-i -c cleansstate; bitbake linux-cubox-i using the recipe you posted: ERROR: Function failed: do_patch (log file is located at /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660) ERROR: Logfile of failure stored in: /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660 Log data follows: | DEBUG: Executing shell function do_patch | WARNING: no meta data branch found ... | ls: cannot access .meta*: No such file or directory | Already on 'imx_3.0.35_4.1.0' | [INFO] validating against known patches (cubox-i-standard-meta) error: patch failed: arch/arm/lib/memset.S:19#] (/)(110 %) | error: arch/arm/lib/memset.S: patch does not apply | ERROR. could not update git tree | ERROR. Could not apply patches for cubox-i. |Patch failures can be resolved in the devshell (bitbake -c devshell linux-cubox-i) | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_patch (log file is located at /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660) ERROR: Task 3 (/home/ubuntu/yocto/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-cubox-i_3.0.35.bb, do_patch) failed with exit code '1' Hope, it helps! Michael Am 01.05.2014 06:29, schrieb Bruce Ashfield: I'm glad that I looked again, I though there was an error without my clean up series .. but what I was seeing was a legitimate double application of the patch. What error where you seeing when you tried a bbappend like so: FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}-${PV}: inherit kernel require recipes-kernel/linux/linux-yocto.inc COMPATIBLE_MACHINE_cubox-i = (cubox-i) SRC_URI += file://videoin.cfg -- Your error message will set me straight .. and tell me if it is just the late night hacking fooling my eyes .. or not! Bruce -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Undefining a variable in a recipe?
Hi, I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = or UBOOT_MACHINE = None or python __anonymous () { bb.data.delVar('UBOOT_MACHINE_imx6qsabresd') } I could just copy the original recipe from metal-fsl-arm into my own layer and change it there I guess but I'd like to understand how to achieve this with a .bbappend if it is possible as it seems cleaner. Many thanks, Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] quilt-native do_populate_sysroot error
Hi I needed to re-setup my yocto directory due to a fs error (was using btrfs). Before I used master-next. Now I checked out daisy. When I start bitbaking, I already get an error [File not found] when building quilt-native. The error is in the step do_populate_sysroot. The problem is pretty clear: run.do_populate_sysroot: def do_populate_sysroot(d): bb.build.exec_func(sysroot_stage_all, d) for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split(): bb.build.exec_func(f, d) pn = d.getVar(PN, True) multiprov = d.getVar(MULTI_PROVIDER_WHITELIST, True).split() provdir = d.expand(/home/ubuntu/yocto/build/tmp/work/x86_64-linux/quilt-native/0.61-r0/sysroot-destdir//home/ubuntu/yocto/build/tmp/sysroots/x86_64-linux/sysroot-providers/) bb.utils.mkdirhier(provdir) for p in d.getVar(PROVIDES, True).split(): if p in multiprov: continue p = p.replace(/, _) with open(provdir + p, w) as f: f.write(pn) do_populate_sysroot(d) Well, the provdir variable is definitely wrong! How should I fix this? Thanks Michael -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Undefining a variable in a recipe?
Hi Alex, On Thursday 01 May 2014 10:42:51 Alex J Lennon wrote: I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = This should work - the python code above is checking if the value evaluates to True, and that shouldn't be the case for an empty string. I suspect something else is at work here - either the check is running before your value gets set, or the value is being set using an override somewhere and therefore your value isn't being used. (adding Otavio on CC since these are his checks and his layer) Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Build problem with current master
I'm trying to build using the latest master (). For historical (hysterical? customers), I'm maintaining some old versions of GCC in my own layers. Recent changes are causing these recipes to throw errors: NOTE: Error during finalise of /home/local/poky-cutting-edge/meta-amltd/recipes-devtools/gcc/gcc_4.7.bb ERROR: ExpansionError during parsing /home/local/poky-cutting-edge/meta-amltd/recipes-devtools/gcc/gcc_4.7.bb: Failure expanding variable oe_runconf: ExpansionError: Failure expanding variable EXTRA_OECONF, expression was ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-amltd-linux-gnueabi- --without-local-prefix --enable-target-optspace --enable-lto--enable-libssp --disable-bootstrap --disable-libmudflap--with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-float=hard --with-sysroot=/ --with-build-sysroot=/home/local/imx6-cutting-edge_2014-05-01/tmp/sysroots/nitrogen6x --with-native-system-header-dir=/home/local/imx6-cutting-edge_2014-05-01/tmp/sysroots/nitrogen6x/usr/include --with-gxx-include-dir=/usr/include/c++/ ${@get_gcc_mips_plt_setting(bb, d)} ${@get_gcc_multiarch_setting(bb, d)} ${@gettext_oeconf(d)} which triggered exception AttributeError: 'module' object has no attribute 'contains' I've noticed recent discussions about moving/renaming 'contains', but it's not clear to me what I might need to do to get these old GCC recipes (and maybe others?) going again. Sadly, just abandoning them isn't practical, at least not today. Thanks for any ideas/pointers. -- Gary Thomas | Consulting for the MLB Associates |Embedded world -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Kernel config fragments are not applied
On 14-05-01 02:32 AM, Neuer User wrote: Hi Bruce Here is the error messega, I get after a bitbake linux-cubox-i -c cleansstate; bitbake linux-cubox-i using the recipe you posted: Aha. This is what I was seeing as well, and there's some issues and assumptions that are built into those kernel recipes that are causing the yocto tools to attempt a patch (which is already on the branch) and hence the failure (the recipes should really be tweaked .. but I digress). I'm prepping a small patch that will have this particular recipe and use case working out of the box. Bruce ERROR: Function failed: do_patch (log file is located at /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660) ERROR: Logfile of failure stored in: /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660 Log data follows: | DEBUG: Executing shell function do_patch | WARNING: no meta data branch found ... | ls: cannot access .meta*: No such file or directory | Already on 'imx_3.0.35_4.1.0' | [INFO] validating against known patches (cubox-i-standard-meta) error: patch failed: arch/arm/lib/memset.S:19#] (/)(110 %) | error: arch/arm/lib/memset.S: patch does not apply | ERROR. could not update git tree | ERROR. Could not apply patches for cubox-i. |Patch failures can be resolved in the devshell (bitbake -c devshell linux-cubox-i) | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_patch (log file is located at /home/ubuntu/yocto/build/tmp/work/cubox_i-poky-linux-gnueabi/linux-cubox-i/3.0.35-r0/temp/log.do_patch.5660) ERROR: Task 3 (/home/ubuntu/yocto/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-cubox-i_3.0.35.bb, do_patch) failed with exit code '1' Hope, it helps! Michael Am 01.05.2014 06:29, schrieb Bruce Ashfield: I'm glad that I looked again, I though there was an error without my clean up series .. but what I was seeing was a legitimate double application of the patch. What error where you seeing when you tried a bbappend like so: ll ticking.. ;-) If anyone has more suggestions or info, please let me know! I’ll keep you posted. Update: Just reached 4 days of uptime! Update 2: Today it’s 4 month’s after I wrote this blog. The machine is still up running and has reached 106 days of uptime! Update 3: After 7 months (222 days of uptime) I finally retired the machine since we migrated to our CloudStack cloud. The fix described ab FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}-${PV}: inherit kernel require recipes-kernel/linux/linux-yocto.inc COMPATIBLE_MACHINE_cubox-i = (cubox-i) SRC_URI += file://videoin.cfg -- Your error message will set me straight .. and tell me if it is just the late night hacking fooling my eyes .. or not! Bruce -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Undefining a variable in a recipe?
On 01/05/2014 14:54, Paul Eggleton wrote: Hi Alex, On Thursday 01 May 2014 10:42:51 Alex J Lennon wrote: I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = This should work - the python code above is checking if the value evaluates to True, and that shouldn't be the case for an empty string. I suspect something else is at work here - either the check is running before your value gets set, or the value is being set using an override somewhere and therefore your value isn't being used. (adding Otavio on CC since these are his checks and his layer) Thanks for coming back to me on this Paul. OK, I must be misunderstanding something. I was outputting the UBOOT_MACHINE to test and it's not a True value at any point as you might expect as it's set to the machine type if set, but my build was still failing to pick up my preferred recipe version unless I commented out the if/raise, in which case all worked as expected. Caught up with something at the minute but I will go through this again first thing tomorrow. Thanks again, Alex Cheers, Paul -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Undefining a variable in a recipe?
On Thu, May 1, 2014 at 2:34 PM, Alex J Lennon ajlen...@dynamicdevices.co.uk wrote: On 01/05/2014 14:54, Paul Eggleton wrote: Hi Alex, On Thursday 01 May 2014 10:42:51 Alex J Lennon wrote: I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = This should work - the python code above is checking if the value evaluates to True, and that shouldn't be the case for an empty string. I suspect something else is at work here - either the check is running before your value gets set, or the value is being set using an override somewhere and therefore your value isn't being used. (adding Otavio on CC since these are his checks and his layer) Thanks for coming back to me on this Paul. OK, I must be misunderstanding something. I was outputting the UBOOT_MACHINE to test and it's not a True value at any point as you might expect as it's set to the machine type if set, but my build was still failing to pick up my preferred recipe version unless I commented out the if/raise, in which case all worked as expected. Caught up with something at the minute but I will go through this again first thing tomorrow. When you debug it let me know and I can try to help in solve it. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Blacklisting drivers in poky or in yocto project
The Update: I blacklisted all related drivers, i.e., libertas, libertas_sdio, cfg80211 and ipv6, but still all these driver modules got autoloaded..!! The method I used: in the file /etc/modprobe.d/blacklist.conf, i added these following lines: blacklist ipv6 blacklist cfg80211 blacklist libertas blacklist libertas_sdio I also tried the same in /lib/modprobe.d/blacklist.conf, but to no avail. Every time the modules were getting autoloaded..!!! And also where can I look for this autoload feature..? Best, - Sudhangathan BS Ph:(+91) 9731-905-205 - On Thu, May 1, 2014 at 1:46 AM, Sudhangathan B S sudhangat...@gmail.comwrote: Yes i confirm the loading of modules everytime using lsmod. I'm using the standard installation of yocto project from Gumstix Repo, and also the PM branch kernel from Kevin Hilman's repo. Kernel version is 3.4. So i did not specify autoloading of modules anywhere. A grep of module_autoload showed kernel-module-split.bbclass as a reference. Is this the file you are talking about..? It will be good to know if it is because this module_autoload..!! And moreover I now have a doubt if the blaclisting is not working because of the dependencies. I will reply again after blacklisting all related drivers. Esp. the cfg802 driver. Thanks Bruce, Sudhangathan BS. Working on a MMX Android 110. --If you have not travelled, you have not lived. On 30-Apr-2014 6:57 PM, Bruce Ashfield bruce.ashfi...@windriver.com wrote: On 14-04-30 03:40 AM, Sudhangathan B S wrote: Hi all, I need to prevent my wifi drivers auto loading during boot time. How do we do it in the Poky OS or in the Yocto project..? Are you actually seeing a confirmed auto load of modules ? In a standard image kernel modules will not be autoloaded unless specifically requested via a recipe with : module_autoload_module name. I'm not talking about a usermode helper / on demand load, but an explicit autoload + dependencies. Bruce I tried both the fedora way and debian way, neither worked.! this is as given in this website..: http://www.cyberciti.biz/tips/avoid-linux-kernel-module-driver-autoloading.html I'm using gumstix overo hardware..! Poky version 9.0.2, Yocto Project 1.4 Reference Distro, 1.4.2 overo. - Sudhangathan BS Ph:(+91) 9731-905-205 - -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Undefining a variable in a recipe?
On 01/05/2014 18:54, Otavio Salvador wrote: On Thu, May 1, 2014 at 2:34 PM, Alex J Lennon ajlen...@dynamicdevices.co.uk wrote: On 01/05/2014 14:54, Paul Eggleton wrote: Hi Alex, On Thursday 01 May 2014 10:42:51 Alex J Lennon wrote: I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = This should work - the python code above is checking if the value evaluates to True, and that shouldn't be the case for an empty string. I suspect something else is at work here - either the check is running before your value gets set, or the value is being set using an override somewhere and therefore your value isn't being used. (adding Otavio on CC since these are his checks and his layer) Thanks for coming back to me on this Paul. OK, I must be misunderstanding something. I was outputting the UBOOT_MACHINE to test and it's not a True value at any point as you might expect as it's set to the machine type if set, but my build was still failing to pick up my preferred recipe version unless I commented out the if/raise, in which case all worked as expected. Caught up with something at the minute but I will go through this again first thing tomorrow. When you debug it let me know and I can try to help in solve it. Much appreciated thanks Otavio. Will do. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH 2/2] meta-darwin on dylan branch
commit 4c50f7bd62a675dd1f034bc6730f833c6dca0c19 Author: james woodyatt james.woody...@intel.com Date: Thu May 1 11:57:41 2014 -0700 Remove usage of ‘new typename’ constructors in ld64 part of odcctools2 package. diff --git a/recipes-devtools/odcctools/files/ld64-typename.patch b/recipes-devtools/odcctools/files/ld64-typename.patch new file mode 100644 index 000..ef5d95d --- /dev/null +++ b/recipes-devtools/odcctools/files/ld64-typename.patch @@ -0,0 +1,69 @@ +diff -r -U 3 apple-x86-odcctools-758.159.orig/ld64/src/ld.cpp apple-x86-odcctools-758.159/ld64/src/ld.cpp +--- apple-x86-odcctools-758.159.orig/ld64/src/ld.cpp 2014-04-30 12:05:13.10601 -0700 apple-x86-odcctools-758.159/ld64/src/ld.cpp2014-04-30 12:06:19.22101 -0700 +@@ -2914,49 +2914,49 @@ + switch (fArchitecture) { + case CPU_TYPE_POWERPC: + if ( mach_o::relocatable::Readerppc::validFile(p) ) +- return this-addObject(new typename mach_o::relocatable::Readerppc::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addObject(new mach_o::relocatable::Readerppc::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Readerppc::validFile(p, info.options.fBundleLoader) ) +- return this-addDylib(new typename mach_o::dylib::Readerppc::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addDylib(new mach_o::dylib::Readerppc::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Readerppc::validFile(p, len) ) +- return this-addArchive(new typename archive::Readerppc::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addArchive(new archive::Readerppc::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + case CPU_TYPE_POWERPC64: + if ( mach_o::relocatable::Readerppc64::validFile(p) ) +- return this-addObject(new typename mach_o::relocatable::Readerppc64::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addObject(new mach_o::relocatable::Readerppc64::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Readerppc64::validFile(p, info.options.fBundleLoader) ) +- return this-addDylib(new typename mach_o::dylib::Readerppc64::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addDylib(new mach_o::dylib::Readerppc64::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Readerppc64::validFile(p, len) ) +- return this-addArchive(new typename archive::Readerppc64::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addArchive(new archive::Readerppc64::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + break; + case CPU_TYPE_I386: + if ( mach_o::relocatable::Readerx86::validFile(p) ) +- return this-addObject(new typename mach_o::relocatable::Readerx86::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addObject(new mach_o::relocatable::Readerx86::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( mach_o::dylib::Readerx86::validFile(p, info.options.fBundleLoader) ) +- return this-addDylib(new typename mach_o::dylib::Readerx86::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++ return this-addDylib(new mach_o::dylib::Readerx86::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len); + else if ( archive::Readerx86::validFile(p, len) ) +- return this-addArchive(new typename archive::Readerx86::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len); ++
[yocto] [PATCH 0/2] meta-darwin on dylan branch
Everyone— I’ve discovered some errors in the meta-darwin layer on the dylan branch that currently prevent the meta-toolchain target from building the components included in the OS X variant of the Arduino for Intel Galileo IDE. Follow-ups to comprise the two patches that solve the problem. These changes may need to be merged upstream, but I haven’t looked. Here are summary descriptions of the patches: 1. Properly configure util-linux when ncurses is configured —with-libterm=tinfo. 2. Remove usage of ‘new typename’ constructors in ld64 part of odcctools2 package. — james woodyatt james.woody...@intel.com Software Architect, New Devices Group -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH 1/2] meta-darwin on dylan branch
commit 980fb673e887f321d6b417b3aecbb380fa2561d3 Author: james woodyatt james.woody...@intel.com Date: Thu May 1 11:57:05 2014 -0700 Properly configure util-linux when ncurses is configured —with-libterm=tinfo. Amend oecore.patch to modify the util-linux recipe so that it applies a patch to the fdisk/Makemodule.am file to add -ltinfo to the linker command line when HAVE_TINFO and HAVE_NCURSES are both defined. diff --git a/oecore.patch b/oecore.patch index 333b715..7371244 100644 --- a/oecore.patch +++ b/oecore.patch @@ -3242,3 +3242,33 @@ index b1d2612..1ba0d12 100644 + +BBCLASSEXTEND = nativesdk \ No newline at end of file +diff --git a/meta/recipes-core/util-linux/util-linux/cfdisk-makemodule.patch b/meta/recipes-core/util-linux/util-linux/cfdisk-makemodule.patch +new file mode 100644 +index 000..df196b5 +--- /dev/null b/meta/recipes-core/util-linux/util-linux/cfdisk-makemodule.patch +@@ -0,0 +1,12 @@ ++--- util-linux-2.22.2.orig/fdisks/Makemodule.am 2014-04-30 17:02:21.469000162 -0700 + util-linux-2.22.2/fdisks/Makemodule.am2014-04-30 17:02:55.39073 -0700 ++@@ -78,6 +78,9 @@ ++ cfdisk_LDADD += -lslang ++ else ++ if HAVE_NCURSES +++if HAVE_TINFO +++cfdisk_LDADD += -ltinfo +++endif ++ cfdisk_LDADD += @NCURSES_LIBS@ ++ endif ++ endif +diff --git a/meta/recipes-core/util-linux/util-linux_2.22.2.bb b/meta/recipes-core/util-linux/util-linux_2.22.2.bb +index 43a55a6..5553411 100644 +--- a/meta/recipes-core/util-linux/util-linux_2.22.2.bb b/meta/recipes-core/util-linux/util-linux_2.22.2.bb +@@ -8,6 +8,7 @@ SRC_URI += file://util-linux-ng-replace-siginterrupt.patch \ + file://configure-sbindir.patch \ + file://fix-configure.patch \ + file://mbsalign-license.patch \ ++file://cfdisk-makemodule.patch \ + + + SRC_URI[md5sum] = 3e379b4d8b9693948d751c154614c73e — james woodyatt james.woody...@intel.com Software Architect, New Devices Group -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] is anyone giving a yocto talk at linuxcon in chicago in august?
i would think *someone* would be doing a yocto talk at linuxcon in august. if not, i'll propose one since i need an excuse to go. if one is already on the schedule, i'll propose something else. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH 1/1] dylan: fix C++ standard library headers on OS X
commit 562fa987cea60d61c256195adce7e83bf1c1a8c9 Author: james woodyatt james.woody...@intel.com Date: Thu May 1 14:44:39 2014 -0700 Fix C++ standard library header directory configuration. Remove the 4.2.1 directory from the --with-gxx-include-dir path provided to the configure script for GCC 4.7 in the cross-canadian build. diff --git a/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend b/recipes-devt index 3fcc012..083b930 100644 --- a/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend +++ b/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend @@ -4,7 +4,7 @@ INSANE_SKIP_${PN}_append_darwinsdk = staticdev LDFLAGS_darwinsdk = ${BUILDSDK_LDFLAGS} -L${libdir}/.. # Change gxx-include-dir -EXTRA_OECONF_PATHS_darwinsdk = --with-gxx-include-dir=${SDKPATH}/sysroots/${TU +EXTRA_OECONF_PATHS_darwinsdk = --with-gxx-include-dir=${SDKPATH}/sysroots/${TU --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_nat --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGE --with-build-sysroot=${STAGING_DIR_TARGET} — james woodyatt james.woody...@intel.com Software Architect, New Devices Group -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] is anyone giving a yocto talk at linuxcon in chicago in august?
i would think *someone* would be doing a yocto talk at linuxcon in august. if not, i'll propose one since i need an excuse to go. if one is already on the schedule, i'll propose something else. The typical target for YP (and the YP Dev Day) were the Embedded Linux Conferences not that much the more general LinuxCon. However, during a conversation at LinuxCon NA last year in NOLA I learned from a company that they are using YP to build custom stacks for their cloud servers. From that perspective having a YP talk at LCNA would actually be a good idea. A talk how one could use YP to build your own desktop or server distro may be interesting and extend the reach of the YP. :rjs -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] is anyone giving a yocto talk at linuxcon in chicago in august?
On Thu, 1 May 2014, Rudolf Streif wrote: i would think *someone* would be doing a yocto talk at linuxcon in august. if not, i'll propose one since i need an excuse to go. if one is already on the schedule, i'll propose something else. The typical target for YP (and the YP Dev Day) were the Embedded Linux Conferences not that much the more general LinuxCon. However, during a conversation at LinuxCon NA last year in NOLA I learned from a company that they are using YP to build custom stacks for their cloud servers. From that perspective having a YP talk at LCNA would actually be a good idea. A talk how one could use YP to build your own desktop or server distro may be interesting and extend the reach of the YP. i think that's what i'm going to submit. tomorrow's the submission deadline so i have to get something in quick. i figure i'll submit something like Building an Embedded Linux System Using YoctoProject, using the BeagleBone Black as the platform example. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] is anyone giving a yocto talk at linuxcon in chicago in august?
On Thursday, May 1, 2014, Robert P. J. Day rpj...@crashcourse.ca wrote: On Thu, 1 May 2014, Rudolf Streif wrote: i would think *someone* would be doing a yocto talk at linuxcon in august. if not, i'll propose one since i need an excuse to go. if one is already on the schedule, i'll propose something else. The typical target for YP (and the YP Dev Day) were the Embedded Linux Conferences not that much the more general LinuxCon. However, during a conversation at LinuxCon NA last year in NOLA I learned from a company that they are using YP to build custom stacks for their cloud servers. From that perspective having a YP talk at LCNA would actually be a good idea. A talk how one could use YP to build your own desktop or server distro may be interesting and extend the reach of the YP. i think that's what i'm going to submit. tomorrow's the submission deadline so i have to get something in quick. i figure i'll submit something like Building an Embedded Linux System Using YoctoProject, using the BeagleBone Black as the platform example. I have done a POC generating very small specific appliances using OE and lxc, in previous life which you then launch in thousands on demands on a big server to do specific jobs like subscriber connections etc. I think such a topic would definitely interest linuxcon attendees, I don't plan to attend this one but if someone wants to take this and develop into a talk I can help. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday = -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Blacklisting drivers in poky or in yocto project
On 2014-05-01, 2:24 PM, Sudhangathan B S wrote: The Update: I blacklisted all related drivers, i.e., libertas, libertas_sdio, cfg80211 and ipv6, but still all these driver modules got autoloaded..!! The method I used: in the file /etc/modprobe.d/blacklist.conf, i added these following lines: blacklist ipv6 blacklist cfg80211 blacklist libertas blacklist libertas_sdio I can't recall if yocto 1.4 had switched to kmod, or if it was still the legacy mod-utils ? Can you confirm with one is in play here ? I also tried the same in /lib/modprobe.d/blacklist.conf, but to no avail. Every time the modules were getting autoloaded..!!! Have you looked for /etc/modules ? Or any other references to them on the filesystem ? And also where can I look for this autoload feature..? I'm not familiar with the kernel you are using, but have you confirmed that either hotplug events or uevents and a helper are not being triggered and loading the modules ? Bruce Best, - Sudhangathan BS Ph:(+91) 9731-905-205 - On Thu, May 1, 2014 at 1:46 AM, Sudhangathan B S sudhangat...@gmail.com mailto:sudhangat...@gmail.com wrote: Yes i confirm the loading of modules everytime using lsmod. I'm using the standard installation of yocto project from Gumstix Repo, and also the PM branch kernel from Kevin Hilman's repo. Kernel version is 3.4. So i did not specify autoloading of modules anywhere. A grep of module_autoload showed kernel-module-split.bbclass as a reference. Is this the file you are talking about..? It will be good to know if it is because this module_autoload..!! And moreover I now have a doubt if the blaclisting is not working because of the dependencies. I will reply again after blacklisting all related drivers. Esp. the cfg802 driver. Thanks Bruce, Sudhangathan BS. Working on a MMX Android 110. --If you have not travelled, you have not lived. On 30-Apr-2014 6:57 PM, Bruce Ashfield bruce.ashfi...@windriver.com mailto:bruce.ashfi...@windriver.com wrote: On 14-04-30 03:40 AM, Sudhangathan B S wrote: Hi all, I need to prevent my wifi drivers auto loading during boot time. How do we do it in the Poky OS or in the Yocto project..? Are you actually seeing a confirmed auto load of modules ? In a standard image kernel modules will not be autoloaded unless specifically requested via a recipe with : module_autoload_module name. I'm not talking about a usermode helper / on demand load, but an explicit autoload + dependencies. Bruce I tried both the fedora way and debian way, neither worked.! this is as given in this website..: http://www.cyberciti.biz/tips/avoid-linux-kernel-module-driver-autoloading.html I'm using gumstix overo hardware..! Poky version 9.0.2, Yocto Project 1.4 Reference Distro, 1.4.2 overo. - Sudhangathan BS Ph:(+91) 9731-905-205 tel:%28%2B91%29%209731-905-205 - -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Undefining a variable in a recipe?
On 01/05/2014 18:54, Otavio Salvador wrote: On Thu, May 1, 2014 at 2:34 PM, Alex J Lennon ajlen...@dynamicdevices.co.uk wrote: On 01/05/2014 14:54, Paul Eggleton wrote: Hi Alex, On Thursday 01 May 2014 10:42:51 Alex J Lennon wrote: I have an issue with the build of an old u-boot (2009.08) which is failing a check in poky as both UBOOT_CONFIG and UBOOT_MACHINE are being defined for some reason. poky/meta/classes/uboot-config.bbclass ubootmachine = d.getVar(UBOOT_MACHINE, True) ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') .. if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I have a .bbappend on the original u-boot recipe and could solve the problem by undefining UBOOT_MACHINE if I could work out how to do this in the .bbappend I've tried setting it to None or an empty string, and I tried an anonymous python function but those approaches didn't help, e.g. (in the .bbappend UBOOT_MACHINE = This should work - the python code above is checking if the value evaluates to True, and that shouldn't be the case for an empty string. I suspect something else is at work here - either the check is running before your value gets set, or the value is being set using an override somewhere and therefore your value isn't being used. (adding Otavio on CC since these are his checks and his layer) Thanks for coming back to me on this Paul. OK, I must be misunderstanding something. I was outputting the UBOOT_MACHINE to test and it's not a True value at any point as you might expect as it's set to the machine type if set, but my build was still failing to pick up my preferred recipe version unless I commented out the if/raise, in which case all worked as expected. Caught up with something at the minute but I will go through this again first thing tomorrow. When you debug it let me know and I can try to help in solve it. Hi Otavio, Paul, (Thanks for your advice on this; apologies if I'm posting to the wrong list but I thought it would be worth maintaining the thread in-situ) Revisiting the issue, a little background might first be useful to explain what I'm trying to achieve and why I'm doing what I'm doing. I am currently working with a board variant based on the Freescale imx6qsabresd. I have a board port which a colleague did for an Android project, and they based on u-boot-imx 2009.08 and linux-imx kernel 3.0.35 My roadmap is to forward port the changes into the newer kernel 3.10.17 for which I understand we'll also need the newer u-boot 2013.04 for devicetree support. This is because I aim to be in sync with FSL when Yocto daisy is supported in Q3 or thereabouts. However I have not completed that work yet, and I need working images now based on the older u-boot/kernel to enable us to prove out the hardware and go to higher volume board manufacture in the short term. So I'm currently using Yocto poky daisy (5306aaab) and the last meta-fsl-arm commit before you (Otavio) removed the u-boot 2009.08 recipe (fc8bcfae0) I have my own layer in which I have various .bbappends to, e.g. modify SRC_URI / REV / BRANCH to use the custom u-boot, kernel, bring in apps and so forth. Build configuration here: http://pastebin.com/M6wL1yhB Local.conf here: http://pastebin.com/hg4LbLJ5 ... As you can see we're building for MACHINE = imx6qsabresd. Also I have preferred providers/versions set in local.conf for u-boot-imx 2009.08, linux-imx 3.0.35 When I run a bitbake of my image I see NOTE: Resolving any missing task queue dependencies NOTE: preferred version 2009.08 of u-boot-imx not available (for item u-boot) NOTE: versions of u-boot-imx available: 2013.04 NOTE: preferred version 2009.08 of u-boot-imx not available (for item u-boot-imx) NOTE: versions of u-boot-imx available: 2013.04 NOTE: preferred version 2009.08 of u-boot-imx not available (for item u-boot-imx-dev) NOTE: versions of u-boot-imx available: 2013.04 This is because of the lines in /poky/meta/classes/uboot-config.bbclass if ubootmachine and ubootconfigflags: raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) WIth these two lines commented out I no longer see the not available notes and can succesfully build u-boot-imx 2009.08 ... If I add in some logging, e.g. bb.warn(ubootmachine: %s %ubootmachine ) bb.warn(ubootmachine: %s %ubootconfigflags ) #if ubootmachine and ubootconfigflags: # raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.) I see the following, WARNING: ubootmachine: mx6q_sabresd_config | ETA: --:--:-- WARNING: ubootmachine: {'sata': 'mx6qsabresd_sata_config', 'mfgtool': 'mx6qsabresd_config', 'defaultval': 'sd', 'sd':
[linux-yocto] [PATCH 04/30] arm: rapidio updates
From: Paul Butler paul.but...@windriver.com - Added the RapidIO management options - Added the rio device to the axm55xx - Created the rio architecture support for arm - Added a file to support the RAPIDIO Bus registration Signed-off-by: Paul Butler paul.but...@windriver.com --- arch/arm/Kconfig | 18 + arch/arm/boot/dts/axm55xx.dts| 16 arch/arm/include/asm/axxia-rio.h | 82 ++ arch/arm/include/asm/rio.h | 33 +++ arch/arm/mach-axxia/Makefile |1 + arch/arm/mach-axxia/clock.c |5 +++ arch/arm/mach-axxia/rapidio.c| 44 7 files changed, 199 insertions(+) create mode 100644 arch/arm/include/asm/axxia-rio.h create mode 100644 arch/arm/include/asm/rio.h create mode 100644 arch/arm/mach-axxia/rapidio.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c796752..e7f2815 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -345,6 +345,7 @@ config ARCH_AXXIA select PCI select PCI_DOMAINS if PCI select ARCH_SUPPORTS_MSI if PCI +select HAS_RAPIDIO if (!PREEMPT_RTB) help This enables support for the LSI Axxia boards. @@ -2359,3 +2360,20 @@ source security/Kconfig source crypto/Kconfig source lib/Kconfig + +menu RapidIO management options + +config HAS_RAPIDIO + bool + default n + +config RAPIDIO + bool RapidIO support + depends on HAS_RAPIDIO || PCI + help + If you say Y here, the kernel will include drivers and + infrastructure code to support RapidIO interconnect devices. + +source drivers/rapidio/Kconfig + +endmenu diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts index aac791d..7ecb177 100644 --- a/arch/arm/boot/dts/axm55xx.dts +++ b/arch/arm/boot/dts/axm55xx.dts @@ -35,6 +35,7 @@ serial0 = axxia_serial0; timer = axxia_timers; ethernet0 = axxia_femac0; + rapidio0 = rio0; }; cpus { @@ -423,6 +424,21 @@ reg = 0x20 0x10098000 0 0x3000; interrupts = 0 45 4; }; + +rio0: rapidio { +index = 0; +status = disabled; +#address-cells = 2; +#size-cells = 2; +compatible = axxia,rapidio-delta; +device_type = rapidio; +reg = 0x0020 0x20142000 0x0 0x1000; /* SRIO Conf 0 region */ +ranges = 0x0 0x0 0x0031 0x 0x0 0x4000; +linkdown-reset = 0x0200 0x100 0x0020 0x1000 0x0 0x1; +interrupts = 0 89 4; +outb-dmes = 2 0x0003 1 0x; +}; + }; /* diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h new file mode 100644 index 000..f244c85 --- /dev/null +++ b/arch/arm/include/asm/axxia-rio.h @@ -0,0 +1,82 @@ +/* + * RapidIO support for LSI Axxia parts + * + */ +#ifndef __ASM_AXXIA_RIO_H__ +#define __ASM_AXXIA_RIO_H__ + +/* Constants, Macros, etc. */ + +#define AXXIA_RIO_SMALL_SYSTEM + +#define AXXIA_RIO_SYSMEM_BARRIER() + +#define AXXIA_RIO_DISABLE_MACHINE_CHECK() +#define AXXIA_RIO_ENABLE_MACHINE_CHECK() +#define AXXIA_RIO_IF_MACHINE_CHECK(mcsr) (mcsr = 0) + +#define IN_SRIO8(a, v, ec) {v = inb((long unsigned int)a); ec = 0;} +#define IN_SRIO16(a, v, ec){v = inw((long unsigned int)a); ec = 0;} +#define IN_SRIO32(a, v, ec){v = inl((long unsigned int)a); ec = 0;} + +#define OUT_SRIO8(a, v)outb_p(v, (long unsigned int) a) +#define OUT_SRIO16(a, v) outw_p(v, (long unsigned int) a) +#define OUT_SRIO32(a, v) outl_p(v, (long unsigned int) a) + +#define _SWAP32(x) x) 0x00FF) 24) | (((x) 0xFF00) 8) | (((x) 0x00FF) 8) | (((x) 0xFF00) 24)) +#define CORRECT_GRIO(a)_SWAP32(a) +#define CORRECT_RAB(a) (a) + +/* ACP RIO board-specific stuff */ + +extern int axxia_rio_apio_enable(struct rio_mport *mport, u32 mask, u32 bits); +extern int axxia_rio_apio_disable(struct rio_mport *mport); +extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits); +extern int axxia_rio_rpio_disable(struct rio_mport *mport); + +extern int axxia_rapidio_board_init(void); + + +/*/ +/* ACP RIO operational stuff */ +/*/ + +/** + * CNTLZW - Count leading zeros word + * @val: value from which count number of leading zeros + * + * Return: number of zeros + */ +static inline u32 CNTLZW(u32 val) +{ + int n = 0; + if (val == 0) + return 32; + if ((val 0x) == 0) + n += 16; val = val 16; + /* + // 16 bits from left are zero! so we omit 16 left bits */ + if ((val 0xFF00) == 0) + n = n + 8; val = val 8; +
[linux-yocto] [PATCH 05/30] powerpc: rapidio updates
From: Paul Butler paul.but...@windriver.com Add the rapidio device to the powerpc tree Add the rapidio support for the powerpc 44x lsi board Signed-off-by: Paul Butler paul.but...@windriver.com --- arch/powerpc/boot/dts/lsi_acp342x.dts | 317 + arch/powerpc/boot/dts/lsi_acp344x.dts | 355 + arch/powerpc/include/asm/axxia-rio.h | 103 ++ arch/powerpc/include/asm/rio.h| 41 arch/powerpc/platforms/44x/Makefile |3 +- arch/powerpc/platforms/44x/acprio.c | 65 ++ arch/powerpc/platforms/44x/acpx1.c|1 + 7 files changed, 884 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/boot/dts/lsi_acp342x.dts create mode 100644 arch/powerpc/boot/dts/lsi_acp344x.dts create mode 100644 arch/powerpc/include/asm/axxia-rio.h create mode 100644 arch/powerpc/platforms/44x/acprio.c diff --git a/arch/powerpc/boot/dts/lsi_acp342x.dts b/arch/powerpc/boot/dts/lsi_acp342x.dts new file mode 100644 index 000..da6066e --- /dev/null +++ b/arch/powerpc/boot/dts/lsi_acp342x.dts @@ -0,0 +1,317 @@ +/* + * Device Tree Source for IBM Embedded PPC 476 Platform + * + * Copyright 2009 Torez Smith, IBM Corporation. + * + * Based on earlier code: + * Copyright (c) 2006, 2007 IBM Corp. + * Josh Boyer jwbo...@linux.vnet.ibm.com, David Gibson d...@au1.ibm.com + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed as is without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/memreserve/ 0x 0x0040; + +/ { + #address-cells = 2; + #size-cells = 1; + model = ibm,acpx1-4xx; + compatible = ibm,acpx1-4xx,ibm,47x-AMP; + dcr-parent = {/cpus/cpu@0}; + + aliases { + serial0 = UART0; + serial1 = UART1; + rapidio0 = rio0; + ethernet0 = FEMAC; + }; + + cpus { + #address-cells = 1; + #size-cells = 0; + + cpu@0 { + device_type = cpu; + model = PowerPC,4xx; // real CPU changed in sim + reg = 0; +clock-frequency = 0x5f5e1000; +timebase-frequency = 0x5f5e1000; + i-cache-line-size = 32; + d-cache-line-size = 32; + i-cache-size = 32768; + d-cache-size = 32768; + dcr-controller; + dcr-access-method = native; + status = ok; + reset-type = 3; // 1=core, 2=chip, 3=system (default) + }; + cpu@1 { + device_type = cpu; + model = PowerPC,4xx; // real CPU changed in sim + reg = 1; +clock-frequency = 0x5f5e1000; +timebase-frequency = 0x5f5e1000; + i-cache-line-size = 32; + d-cache-line-size = 32; + i-cache-size = 32768; + d-cache-size = 32768; + dcr-controller; + dcr-access-method = native; + status = disabled; + enable-method = spin-table; + cpu-release-addr = 0 0x2040; + reset-type = 3; // 1=core, 2=chip, 3=system (default) + }; + }; + +memory@0 { +device_type = memory; +reg = 0x 0x 0x1000; +}; + +memory@8000 { +device_type = memory; +reg = 0x 0x 0x; +}; + + MPIC: interrupt-controller { + compatible = chrp,open-pic; + interrupt-controller; + dcr-reg = 0xffc0 0x0003; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + pic-no-reset; + }; + + plb { + /* Could be PLB6, doesn't matter */ + compatible = ibm,plb-4xx, ibm,plb4; + #address-cells = 2; + #size-cells = 1; + ranges; + clock-frequency = 0; // Filled in by zImage + + POB0: opb { + compatible = ibm,opb-4xx, ibm,opb; + #address-cells = 1; + #size-cells = 1; + /* Wish there was a nicer way of specifying a full 32-bit + range */ + ranges = 0x 0x0020 0x 0x8000 + 0x8000 0x0020 0x8000 0x8000; + clock-frequency = 0; // Filled in by zImage + UART0: serial@00404000 { +
[linux-yocto] [PATCH 00/30] Resubmit LSI AXXIA updates to 3.4 standard/axxia/base
These patches have the comments added to the rapidio patches Anders Berg (7): axxia: Fixed earlyprintk axxia: Define arch_is_coherent() ARM: 7465/1: Handle 4GB memory sizes in device tree and mem=size@start option ARM: LPAE: use phys_addr_t in alloc_init_pud() ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM arm: mmu: Fixed checkpatch issues with mmu drivers/i2c-axxia: Support I2C_M_RECV_LEN David Mercado (2): LSI AXM55xx: Enable multi-cluster wfe/sev LSI AXM55XX: Add PMU support Ivan Djelic (1): ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations John Jacques (6): arch/arm/mach-axxi: Updated DDR Retention to Wokr from Interrupt Context arch/arm/mach-axxia: Clear MTC Errors During Initialization LSI: Fix Device Tree compatible fields powerpc/mpic: Disable preemption when calling mpic_processor_id() arm/mach-axxia: Same build for HW and simlation and DDR Retention Reset and clock init. axxia: Remove Wrapper Functions Michael Bringmann (1): LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct boundary, Expand valid condition. Nicolas Pitre (1): ARM: 7670/1: fix the memset fix Paul Butler (8): drivers/rapidio/devices: Initial Submittal of LSI rapidio drivers/rapidio: new files drivers/rapidio: modified files arm: rapidio updates powerpc: rapidio updates include: rapidio updates drivers: rapidio updates arm/mach-axxia: Updated PCIe driver to set PCIe SangeethaRao (3): arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500 emulation drivers/usb: USB driver/dts on PPC was broken. arch/arm/mach-axxia: added support for ncr_read/ncr_write ningligong (1): drivers/rapidio/lsi: squash a bunch rapidio stuff together and Cleanup arch/arm/Kconfig| 19 + arch/arm/Kconfig.debug |9 + arch/arm/Makefile |3 - arch/arm/boot/dts/axm-sim.dts | 403 arch/arm/boot/dts/axm55xx.dts | 50 +- arch/arm/boot/dts/axm55xxemu.dts| 21 +- arch/arm/boot/dts/axm55xxsim.dts| 94 +- arch/arm/boot/dts/axm55xxsim16.dts | 439 arch/arm/include/asm/axxia-rio.h| 135 ++ arch/arm/include/asm/rio.h | 37 + arch/arm/include/asm/setup.h| 14 +- arch/arm/include/asm/spinlock.h |4 + arch/arm/kernel/perf_event_v7.c |3 +- arch/arm/kernel/setup.c | 70 +- arch/arm/mach-axxia/Kconfig |3 - arch/arm/mach-axxia/Makefile|3 +- arch/arm/mach-axxia/axxia-gic.c | 25 +- arch/arm/mach-axxia/axxia.c | 123 +- arch/arm/mach-axxia/axxia.h |2 +- arch/arm/mach-axxia/clock.c | 185 +- arch/arm/mach-axxia/ddr_retention.c | 300 ++- arch/arm/mach-axxia/include/mach/debug-macro.S | 16 +- arch/arm/mach-axxia/include/mach/hardware.h | 25 +- arch/arm/mach-axxia/include/mach/irqs.h |1 + arch/arm/mach-axxia/include/mach/memory.h | 19 + arch/arm/mach-axxia/include/mach/ncr.h | 44 + arch/arm/mach-axxia/ncr.c | 597 + arch/arm/mach-axxia/pci.c |7 +- arch/arm/mach-axxia/platsmp.c | 155 +- arch/arm/mach-axxia/rapidio.c | 68 + arch/arm/mach-axxia/wrappers.c | 176 -- arch/arm/mm/mmu.c | 82 +- arch/powerpc/boot/dts/ACP344xV2.dts | 20 +- arch/powerpc/boot/dts/acp25xx.dts | 16 +- arch/powerpc/boot/dts/acp342x.dts | 21 +- arch/powerpc/boot/dts/acp344x.dts | 16 +- arch/powerpc/boot/dts/lsi_acp342x.dts | 317 +++ arch/powerpc/boot/dts/lsi_acp344x.dts | 355 +++ arch/powerpc/include/asm/axxia-rio.h| 107 + arch/powerpc/include/asm/rio.h | 46 + arch/powerpc/platforms/44x/Makefile |3 +- arch/powerpc/platforms/44x/acprio.c | 65 + arch/powerpc/platforms/44x/acpx1.c |1 + arch/powerpc/sysdev/Makefile|2 - arch/powerpc/sysdev/lsi_acp_wrappers.c | 132 -- arch/powerpc/sysdev/lsi_pci.c | 19 +- arch/powerpc/sysdev/mpic.c | 119 +- drivers/i2c/busses/i2c-axxia.c | 193 +- drivers/misc/Kconfig|2 +- drivers/misc/lsi-mtc.c |9 +- drivers/misc/lsi-ncr.c | 334 +-- drivers/misc/lsi-smmon.c| 374 ++-- drivers/net/ethernet/lsi/lsi_acp_net.c |9 +- drivers/net/rionet.c| 135 +-
[linux-yocto] [PATCH 06/30] include: rapidio updates
From: Paul Butler paul.but...@windriver.com This patch adds the register definitions, support for PW messages, destination IDs, direct IO and driver support. Signed-off-by: Paul Butler paul.but...@windriver.com --- include/asm-generic/vmlinux.lds.h | 10 ++ include/linux/rio.h | 231 ++--- include/linux/rio_dio.h | 67 +++ include/linux/rio_drv.h | 202 +--- include/linux/rio_ids.h |7 ++ include/linux/rio_regs.h | 26 + include/linux/riopw.h | 30 + 7 files changed, 490 insertions(+), 83 deletions(-) create mode 100644 include/linux/rio_dio.h create mode 100644 include/linux/riopw.h diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 5d2ca6f..290711d 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -274,6 +274,16 @@ } \ \ /* RapidIO route ops */ \ + .rio_dev_fixup : AT(ADDR(.rio_dev_fixup) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__start_rio_dev_fixup_early) = .;\ + *(.rio_dev_fixup_early) \ + VMLINUX_SYMBOL(__end_rio_dev_fixup_early) = .; \ + VMLINUX_SYMBOL(__start_rio_dev_fixup_enable) = .; \ + *(.rio_dev_fixup_enable)\ + VMLINUX_SYMBOL(__end_rio_dev_fixup_enable) = .; \ + } \ + \ + /* RapidIO route ops */ \ .rio_ops: AT(ADDR(.rio_ops) - LOAD_OFFSET) {\ VMLINUX_SYMBOL(__start_rio_switch_ops) = .; \ *(.rio_switch_ops) \ diff --git a/include/linux/rio.h b/include/linux/rio.h index 4d50611..ef300e2 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -20,6 +20,8 @@ #include linux/errno.h #include linux/device.h #include linux/rio_regs.h +#include linux/radix-tree.h +#include asm/rio.h #define RIO_NO_HOPCOUNT-1 #define RIO_INVALID_DESTID 0x @@ -37,10 +39,14 @@ entry is invalid (no route exists for the device ID) */ +#define RIO_INVALID_ROUTE_WEIGHT 0xff /* Indicates that a route weight + entry is invalid (no route + exists for the device ID) */ + #define RIO_MAX_ROUTE_ENTRIES(size)(size ? (1 16) : (1 8)) #define RIO_ANY_DESTID(size) (size ? 0x : 0xff) -#define RIO_MAX_MBOX 4 +#define RIO_MAX_MBOX 8 #define RIO_MAX_MSG_SIZE 0x1000 /* @@ -77,6 +83,9 @@ #define RIO_CTAG_RESRVD0xfffe /* Reserved */ #define RIO_CTAG_UDEVID0x0001 /* Unique device identifier */ +#define RIO_DEVICE_INSERTION1 +#define RIO_DEVICE_EXTRACTION 2 + extern struct bus_type rio_bus_type; extern struct device rio_bus; extern struct list_head rio_devices; /* list of all devices */ @@ -85,6 +94,15 @@ struct rio_mport; struct rio_dev; union rio_pw_msg; +struct rio_switch_port { + struct rio_dev *rdev; +#ifdef CONFIG_RAPIDIO_DYNAMIC_ROUTES + u8 *route_weights_table; +#endif +}; + +#define NEW_STYLE 1 + /** * struct rio_switch - RIO switch info * @node: Node in global list of switches @@ -104,7 +122,12 @@ union rio_pw_msg; struct rio_switch { struct list_head node; u16 switchid; +#ifdef OLD_STYLE u8 *route_table; +#else + u32 port_init; + int update_lut; +#endif u32 port_ok; int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 route_port); @@ -119,7 +142,9 @@ struct rio_switch { int (*em_init) (struct rio_dev *dev); int (*em_handle) (struct rio_dev *dev, u8 swport); int (*sw_sysfs) (struct rio_dev *dev, int create); - struct rio_dev *nextdev[0]; +#ifdef OLD_STYLE + struct rio_switch_port port[0]; +#endif }; /** @@ -151,10 +176,19 @@ struct rio_switch { * @prev: Previous RIO device connected to the current one * @rswitch: struct rio_switch (if valid for this device) */ +#ifdef NEW_STYLE +struct rio_dyn { + int prev_port; + u16 prev_destid; + u32 swpinfo; +}; +#endif + struct rio_dev { struct list_head global_list; /* node in list of all RIO devices */ struct list_head net_list; /* node in per net list */ -
[linux-yocto] [PATCH 05/30] powerpc: rapidio updates
From: Paul Butler paul.but...@windriver.com Add the rapidio device to the powerpc tree Add the rapidio support for the powerpc 44x lsi board Signed-off-by: Paul Butler paul.but...@windriver.com --- arch/powerpc/boot/dts/lsi_acp342x.dts | 317 + arch/powerpc/boot/dts/lsi_acp344x.dts | 355 + arch/powerpc/include/asm/axxia-rio.h | 103 ++ arch/powerpc/include/asm/rio.h| 41 arch/powerpc/platforms/44x/Makefile |3 +- arch/powerpc/platforms/44x/acprio.c | 65 ++ arch/powerpc/platforms/44x/acpx1.c|1 + 7 files changed, 884 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/boot/dts/lsi_acp342x.dts create mode 100644 arch/powerpc/boot/dts/lsi_acp344x.dts create mode 100644 arch/powerpc/include/asm/axxia-rio.h create mode 100644 arch/powerpc/platforms/44x/acprio.c diff --git a/arch/powerpc/boot/dts/lsi_acp342x.dts b/arch/powerpc/boot/dts/lsi_acp342x.dts new file mode 100644 index 000..da6066e --- /dev/null +++ b/arch/powerpc/boot/dts/lsi_acp342x.dts @@ -0,0 +1,317 @@ +/* + * Device Tree Source for IBM Embedded PPC 476 Platform + * + * Copyright 2009 Torez Smith, IBM Corporation. + * + * Based on earlier code: + * Copyright (c) 2006, 2007 IBM Corp. + * Josh Boyer jwbo...@linux.vnet.ibm.com, David Gibson d...@au1.ibm.com + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed as is without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/memreserve/ 0x 0x0040; + +/ { + #address-cells = 2; + #size-cells = 1; + model = ibm,acpx1-4xx; + compatible = ibm,acpx1-4xx,ibm,47x-AMP; + dcr-parent = {/cpus/cpu@0}; + + aliases { + serial0 = UART0; + serial1 = UART1; + rapidio0 = rio0; + ethernet0 = FEMAC; + }; + + cpus { + #address-cells = 1; + #size-cells = 0; + + cpu@0 { + device_type = cpu; + model = PowerPC,4xx; // real CPU changed in sim + reg = 0; +clock-frequency = 0x5f5e1000; +timebase-frequency = 0x5f5e1000; + i-cache-line-size = 32; + d-cache-line-size = 32; + i-cache-size = 32768; + d-cache-size = 32768; + dcr-controller; + dcr-access-method = native; + status = ok; + reset-type = 3; // 1=core, 2=chip, 3=system (default) + }; + cpu@1 { + device_type = cpu; + model = PowerPC,4xx; // real CPU changed in sim + reg = 1; +clock-frequency = 0x5f5e1000; +timebase-frequency = 0x5f5e1000; + i-cache-line-size = 32; + d-cache-line-size = 32; + i-cache-size = 32768; + d-cache-size = 32768; + dcr-controller; + dcr-access-method = native; + status = disabled; + enable-method = spin-table; + cpu-release-addr = 0 0x2040; + reset-type = 3; // 1=core, 2=chip, 3=system (default) + }; + }; + +memory@0 { +device_type = memory; +reg = 0x 0x 0x1000; +}; + +memory@8000 { +device_type = memory; +reg = 0x 0x 0x; +}; + + MPIC: interrupt-controller { + compatible = chrp,open-pic; + interrupt-controller; + dcr-reg = 0xffc0 0x0003; + #address-cells = 0; + #size-cells = 0; + #interrupt-cells = 2; + pic-no-reset; + }; + + plb { + /* Could be PLB6, doesn't matter */ + compatible = ibm,plb-4xx, ibm,plb4; + #address-cells = 2; + #size-cells = 1; + ranges; + clock-frequency = 0; // Filled in by zImage + + POB0: opb { + compatible = ibm,opb-4xx, ibm,opb; + #address-cells = 1; + #size-cells = 1; + /* Wish there was a nicer way of specifying a full 32-bit + range */ + ranges = 0x 0x0020 0x 0x8000 + 0x8000 0x0020 0x8000 0x8000; + clock-frequency = 0; // Filled in by zImage + UART0: serial@00404000 { +
[linux-yocto] [PATCH 10/30] LSI AXM55xx: Enable multi-cluster wfe/sev
From: David Mercado david.merc...@windriver.com By default, the system does not enable the use of ARM wfe/sev instructions across clusters, which breaks things like arch_spin_lock. This patch enables this feature. LSI AXM55xx: Disable use of wfe/sev in arch_spin_lock By default, the system does not enable the use of ARM wfe/sev instructions across clusters, which breaks things like arch_spin_lock. The previous solution to enable wfe/sev to work across clusters still resulted in CPU stalls. This patch instead removes the use of wfe/sev in arch/arm/include/ asm/spinlock.h altogether. Signed-off-by: David Mercado david.merc...@windriver.com --- arch/arm/include/asm/spinlock.h |4 arch/arm/mach-axxia/axxia.c |1 + 2 files changed, 5 insertions(+) diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index 65fa3c8..022ef90 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h @@ -37,6 +37,10 @@ \ nop.w \ ) +#elif CONFIG_ARCH_AXXIA || CONFIG_ARCH_AXXIA_SIM +/* Disable use of wfe/sev in Axxia. */ +#define SEV +#define WFE(cond) #else #define SEVALT_SMP(sev, nop) #define WFE(cond) ALT_SMP(wfe cond, nop) diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c index 7b725ef..d87bb61 100644 --- a/arch/arm/mach-axxia/axxia.c +++ b/arch/arm/mach-axxia/axxia.c @@ -253,6 +253,7 @@ l3_set_pstate(void __iomem *l3ctrl, unsigned int req, unsigned int act) void __init axxia_dt_init(void) { void __iomem *l3ctrl; + void __iomem *apb2ser3_base; int rc; /* Enable L3-cache */ -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 09/30] axxia: Define arch_is_coherent()
From: Anders Berg anders.b...@lsi.com By defining arch_is_coherent() == 1, we can avoid unnecessary cache maintenance operations and the dma_alloc_coherent() will return normal memory. Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/Kconfig |1 + arch/arm/mach-axxia/include/mach/memory.h | 19 +++ drivers/usb/host/ehci-ci13612.c | 12 ++-- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-axxia/include/mach/memory.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e7f2815..baa0b4d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -341,6 +341,7 @@ config ARCH_AXXIA select ARM_TIMER_SP804 select ICST select NEED_MACH_IO_H + select NEED_MACH_MEMORY_H select ZONE_DMA select PCI select PCI_DOMAINS if PCI diff --git a/arch/arm/mach-axxia/include/mach/memory.h b/arch/arm/mach-axxia/include/mach/memory.h new file mode 100644 index 000..9df2aaf --- /dev/null +++ b/arch/arm/mach-axxia/include/mach/memory.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-axxia/include/mach/memory.h + * + * Copyright (c) 2013 LSI Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#include mach/hardware.h + +#define arch_is_coherent() 1 + +#endif diff --git a/drivers/usb/host/ehci-ci13612.c b/drivers/usb/host/ehci-ci13612.c index 2a30dab..b995a32 100644 --- a/drivers/usb/host/ehci-ci13612.c +++ b/drivers/usb/host/ehci-ci13612.c @@ -138,8 +138,7 @@ ci13612_fixup_usbcmd_rs(struct ehci_hcd *ehci) port_status = ehci_readl(ehci, ehci-regs-port_status[0]); pr_info(ehci-ci13612: port_status = 0x%x\n, port_status); if (port_status 0x100) { - pr_err(ehci-ci13612: USB port is in reset status, - not able to change HC status to run\n); + pr_err(ehci-ci13612: USB port is in reset status, not able to change HC status to run\n); return -EFAULT; } return 0; @@ -171,7 +170,7 @@ ci13612_fixup_txpburst(struct ehci_hcd *ehci) ehci_writel(ehci, burst_size, ehci-regs-reserved[1]); } #else -#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while(0) +#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while (0) #endif static int ci13612_ehci_run(struct usb_hcd *hcd) @@ -260,7 +259,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev) pdev-dev.coherent_dma_mask = DMA_BIT_MASK(32); pdev-dev.dma_mask = pdev-dev.coherent_dma_mask; - hcd = usb_create_hcd(ci13612_hc_driver, pdev-dev, dev_name(pdev-dev)); + hcd = usb_create_hcd(ci13612_hc_driver, pdev-dev, + dev_name(pdev-dev)); if (!hcd) { retval = -ENOMEM; goto fail_create_hcd; @@ -285,8 +285,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev) /* Set address bits [39:32] to zero */ writel(0x0, gpreg_base + 0x8); #ifndef CONFIG_LSI_USB_SW_WORKAROUND - /* hprot pass-through (let the controller drive hprot[0:3] */ - writel(0x100, gpreg_base + 0x74); + /* hprot cachable and bufferable */ + writel(0xc, gpreg_base + 0x74); #endif iounmap(gpreg_base); } -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 11/30] ARM: 7465/1: Handle 4GB memory sizes in device tree and mem=size@start option
From: Anders Berg anders.b...@lsi.com commit a5d5f7daa744b34477c4a12728bde0a1694a1707 upstream The memory regions which are passed to arm_add_memory() from device tree blobs via early_init_dt_add_memory_arch() can have sizes which are larger than will fit in a 32 bit integer, so switch to using a phys_addr_t to hold them, to avoid silently dropping the top 32 bits of the size. Similarly, use phys_addr_t in early_mem() so that mem=size@start command line options specifying more than 4GB behave sensibly. Acked-by: Will Deacon will.dea...@arm.com Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Russell King rmk+ker...@arm.linux.org.ukarm: Allow =4GB RAM to be configured Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/include/asm/setup.h | 14 - arch/arm/kernel/setup.c | 70 +- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 23ebc0c..0fbe56d 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h @@ -173,14 +173,14 @@ struct tagtable { int (*parse)(const struct tag *); }; -#define tag_member_present(tag,member) \ +#define tag_member_present(tag, member)\ ((unsigned long)(((struct tag *)0L)-member + 1) \ = (tag)-hdr.size * 4) #define tag_next(t)((struct tag *)((__u32 *)(t) + (t)-hdr.size)) #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) 2) -#define for_each_tag(t,base) \ +#define for_each_tag(t, base) \ for (t = base; t-hdr.size; t = tag_next(t)) #ifdef __KERNEL__ @@ -196,7 +196,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, fn } struct membank { phys_addr_t start; - unsigned long size; + phys_addr_t size; unsigned int highmem; }; @@ -207,17 +207,17 @@ struct meminfo { extern struct meminfo meminfo; -#define for_each_bank(iter,mi) \ +#define for_each_bank(iter, mi)\ for (iter = 0; iter (mi)-nr_banks; iter++) #define bank_pfn_start(bank) __phys_to_pfn((bank)-start) #define bank_pfn_end(bank) __phys_to_pfn((bank)-start + (bank)-size) #define bank_pfn_size(bank)((bank)-size PAGE_SHIFT) -#define bank_phys_start(bank) (bank)-start +#define bank_phys_start(bank) ((bank)-start) #define bank_phys_end(bank)((bank)-start + (bank)-size) -#define bank_phys_size(bank) (bank)-size +#define bank_phys_size(bank) ((bank)-size) -extern int arm_add_memory(phys_addr_t start, unsigned long size); +extern int arm_add_memory(phys_addr_t start, phys_addr_t size); extern void early_print(const char *str, ...); extern void dump_machine_table(void); diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 467155b..ad28e29 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -328,7 +328,7 @@ static void __init cacheid_init(void) cacheid = CACHEID_VIVT; } - printk(CPU: %s data cache, %s instruction cache\n, + printk(KERN_INFO CPU: %s data cache, %s instruction cache\n, cache_is_vivt() ? VIVT : cache_is_vipt_aliasing() ? VIPT aliasing : cache_is_vipt_nonaliasing() ? PIPT / VIPT nonaliasing : unknown, @@ -358,7 +358,7 @@ void __init early_print(const char *str, ...) #ifdef CONFIG_DEBUG_LL printascii(buf); #endif - printk(%s, buf); + printk(KERN_INFO %s, buf); } static void __init feat_v6_fixup(void) @@ -419,13 +419,13 @@ void cpu_init(void) msrcpsr_c, %7 : : r (stk), - PLC (PSR_F_BIT | PSR_I_BIT | IRQ_MODE), + PLC(PSR_F_BIT | PSR_I_BIT | IRQ_MODE), I (offsetof(struct stack, irq[0])), - PLC (PSR_F_BIT | PSR_I_BIT | ABT_MODE), + PLC(PSR_F_BIT | PSR_I_BIT | ABT_MODE), I (offsetof(struct stack, abt[0])), - PLC (PSR_F_BIT | PSR_I_BIT | UND_MODE), + PLC(PSR_F_BIT | PSR_I_BIT | UND_MODE), I (offsetof(struct stack, und[0])), - PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE) + PLC(PSR_F_BIT | PSR_I_BIT | SVC_MODE) : r14); } @@ -454,9 +454,10 @@ static void __init setup_processor(void) */ list = lookup_processor_type(read_cpuid_id()); if (!list) { - printk(CPU configuration botched (ID %08x), unable - to continue.\n, read_cpuid_id()); - while (1); + printk(KERN_INFO CPU configuration botched (ID %08x), unable to continue.\n, + read_cpuid_id()); + while (1) + ; } cpu_name = list-cpu_name; @@ -475,7 +476,7 @@ static void __init setup_processor(void)
[linux-yocto] [PATCH 15/30] arch/arm/mach-axxi: Updated DDR Retention to Wokr from Interrupt Context
From: John Jacques john.jacq...@lsi.com As procfs shouldn't be used as a module to user interface, switch to sysfs. Signed-off-by: John Jacques john.jacq...@lsi.com --- arch/arm/mach-axxia/Makefile |1 + arch/arm/mach-axxia/axxia.c|3 + arch/arm/mach-axxia/ddr_retention.c| 13 +- arch/arm/mach-axxia/include/mach/ncr.h | 44 +++ arch/arm/mach-axxia/ncr.c | 488 drivers/misc/Kconfig |2 +- drivers/misc/lsi-smmon.c | 130 - drivers/net/ethernet/lsi/lsi_acp_net.c |9 +- 8 files changed, 619 insertions(+), 71 deletions(-) create mode 100644 arch/arm/mach-axxia/include/mach/ncr.h create mode 100644 arch/arm/mach-axxia/ncr.c diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile index 2e9ddf7..85cee8f 100644 --- a/arch/arm/mach-axxia/Makefile +++ b/arch/arm/mach-axxia/Makefile @@ -5,6 +5,7 @@ obj-y += wrappers.o obj-y += axxia.o obj-y += clock.o obj-y += io.o +obj-y += ncr.o obj-y += timers.o obj-y += pci.o obj-y += ddr_retention.o diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c index d87bb61..0e368a4 100644 --- a/arch/arm/mach-axxia/axxia.c +++ b/arch/arm/mach-axxia/axxia.c @@ -49,6 +49,7 @@ #include mach/hardware.h #include mach/timers.h #include mach/axxia-gic.h +#include mach/ncr.h #include axxia.h #include pci.h #include i2c.h @@ -273,6 +274,8 @@ void __init axxia_dt_init(void) axxia_auxdata_lookup, NULL); pm_power_off = NULL; /* TBD */ + ncr_init(); + spi_register_board_info(spi_devs, ARRAY_SIZE(spi_devs)); /* diff --git a/arch/arm/mach-axxia/ddr_retention.c b/arch/arm/mach-axxia/ddr_retention.c index 988d361..1e4ba34 100644 --- a/arch/arm/mach-axxia/ddr_retention.c +++ b/arch/arm/mach-axxia/ddr_retention.c @@ -32,7 +32,7 @@ #include asm/io.h #include asm/cacheflush.h -#include ../../../drivers/misc/lsi-ncr.h ++#include mach/ncr.h extern void flush_l3(void); static void __iomem *nca_address; @@ -195,6 +195,7 @@ void initiate_retention_reset(void) if (NULL == nca_address) nca_address = ioremap(0x00202010ULL, 0x2); + BUG(); /* send stop message to other CPUs */ local_irq_disable(); @@ -215,8 +216,7 @@ void initiate_retention_reset(void) ncr_write(NCP_REGION_ID(15, 0), 0x414, 4, value); /* unlock reset register for later */ - apb_base = ioremap(0x201000, 0x4); - writel(0x00ab, apb_base + 0x31000); /* Access Key */ + writel(0x00ab, apb_base + 0x31000); /* Access Key */ /* prepare to put DDR in self refresh power-down mode */ /* first read the CTL_244 register and OR in the LP_CMD value */ @@ -246,6 +246,7 @@ void initiate_retention_reset(void) ncp_ddr_shutdown(); } +EXPORT_SYMBOL(initiate_retention_reset); static ssize_t axxia_ddr_retention_trigger(struct file *file, const char __user *buf, @@ -268,9 +269,13 @@ void axxia_ddr_retention_init(void) printk(KERN_INFO Failed to register DDR retention proc interface\n); #endif + + apb_base = ioremap(0x201000, 0x4); + nca_address = ioremap(0x00202010ULL, 0x2); + + printk(ddr_retention: ready\n); } -EXPORT_SYMBOL(initiate_retention_reset); #else diff --git a/arch/arm/mach-axxia/include/mach/ncr.h b/arch/arm/mach-axxia/include/mach/ncr.h new file mode 100644 index 000..926d366 --- /dev/null +++ b/arch/arm/mach-axxia/include/mach/ncr.h @@ -0,0 +1,44 @@ +/* + * arch/arm/mach-axxia/include/mach/ncr.h + * + * Copyright (C) 2010 LSI + * + * 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 __ARCH_ARM_MACH_AXXIA_NCR_H +#define __ARCH_ARM_MACH_AXXIA_NCR_H + +#ifndef NCP_REGION_ID +#define NCP_REGION_ID(node, target) \ +((unsigned long) node) 0x) 16) | ((target) 0x))) +#endif
[linux-yocto] [PATCH 13/30] ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM
From: Anders Berg anders.b...@lsi.com commit 36418c516b31bff4ff949c7c618430a1a514debe upstream With !HIGHMEM, sanity_check_meminfo checks for banks that completely or partially overlap the vmalloc region. The test for partial overlap checks __va(bank-start + bank-size) vmalloc_min. This is not appropriate if there is a non-linear translation between virtual and physical addresses, as bank-start + bank-size is actually in the bank following the one being interrogated. In most cases, even when using SPARSEMEM, this is not problematic as the subsequent bank will start at a higher va than the one in question. However if the physical to virtual address conversion is not monotonic increasing, the incorrect test could result in a bank not being truncated when it should be. This patch ensures we perform the va-pa conversion on memory from the bank we are interested in, not the following one. Reported-by: ??? (Steve) zhanzhe...@gmail.com Signed-off-by: Jonathan Austin jonathan.aus...@arm.com Acked-by: Nicolas Pitre n...@linaro.org Signed-off-by: Russell King rmk+ker...@arm.linux.org.ukarm/mmu: Fix detection of vmalloc area overlap Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/mm/mmu.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 0acc475..571102e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -967,8 +967,8 @@ void __init sanity_check_meminfo(void) * Check whether this memory bank would partially overlap * the vmalloc area. */ - if (__va(bank-start + bank-size) vmalloc_min || - __va(bank-start + bank-size) __va(bank-start)) { + if (__va(bank-start + bank-size - 1) = vmalloc_min || + __va(bank-start + bank-size - 1) = __va(bank-start)) { unsigned long newsize = vmalloc_min - __va(bank-start); printk(KERN_NOTICE Truncating RAM at %.8llx-%.8llx to -%.8llx (vmalloc region overlap).\n, -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 16/30] arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500 emulation
From: SangeethaRao sangeetha@lsi.com Signed-off-by: SangeethaRao sangeetha@lsi.com --- arch/powerpc/sysdev/lsi_pci.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/lsi_pci.c b/arch/powerpc/sysdev/lsi_pci.c index a25d396..75bdf53 100644 --- a/arch/powerpc/sysdev/lsi_pci.c +++ b/arch/powerpc/sysdev/lsi_pci.c @@ -20,6 +20,7 @@ #include mm/mmu_decl.h #include ppc4xx_pci.h +#include ../../../drivers/misc/lsi-ncr.h #include linux/interrupt.h @@ -70,6 +71,7 @@ fixup_acp_pci_bridge(struct pci_dev *dev) DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5101, fixup_acp_pci_bridge); DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5108, fixup_acp_pci_bridge); +DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5102, fixup_acp_pci_bridge); static int __init acp_parse_dma_ranges(struct pci_controller *hose, void __iomem *reg, @@ -954,6 +956,7 @@ acp_pciex_port_setup_hose(struct pciex_port *port) u32 pci_status; u32 link_state; u32 pci_config; + u32 version; /* Check if primary bridge */ if (of_get_property(port-node, primary, NULL)) @@ -1060,6 +1063,17 @@ acp_pciex_port_setup_hose(struct pciex_port *port) } } + /* get the device version */ + if (0 != ncr_read(NCP_REGION_ID(0x16, 0xff), 0x0, 4, version)) { + printk(KERN_ERR Unable to detect ACP revision!\n); + goto fail; + } + + port-acpChipType = (version 0xff); + printk(KERN_INFO Using PEI register set for ACP chipType %d\n, + port-acpChipType); + + /* * Set bus numbers on our root port */ @@ -1171,11 +1185,6 @@ static void __init probe_acp_pciex_bridge(struct device_node *np) return; } - - port-acpChipType = 0x2; - printk(KERN_INFO Using PEI register set for ACP chipType %d\n, - port-acpChipType); - /* Check for the PLX work-around. */ field = of_get_property(np, plx, NULL); -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 14/30] arm: mmu: Fixed checkpatch issues with mmu
From: Anders Berg anders.b...@lsi.com This patch fixes the checkpatch issues with mmu. This patch is separate to keep the continuity of the previous patches that used copies of upstream patches to update. Signed-off-by: Anders Berg anders.b...@lsi.com --- arch/arm/mm/mmu.c | 76 +++-- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 571102e..f3f16dc 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -53,13 +53,13 @@ pmd_t *top_pmd; #define CPOLICY_WRITEALLOC 4 static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; -static unsigned int ecc_mask __initdata = 0; +static unsigned int ecc_mask __initdata; pgprot_t pgprot_user; -pgprot_t pgprot_kernel; - EXPORT_SYMBOL(pgprot_user); +pgprot_t pgprot_kernel; EXPORT_SYMBOL(pgprot_kernel); + struct cachepolicy { const char policy[16]; unsigned intcr_mask; @@ -194,8 +194,8 @@ void adjust_cr(unsigned long mask, unsigned long set) } #endif -#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN -#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE +#define PROT_PTE_DEVICE (L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN) +#define PROT_SECT_DEVICE (PMD_TYPE_SECT|PMD_SECT_AP_WRITE) static struct mem_type mem_types[] = { [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ @@ -216,7 +216,7 @@ static struct mem_type mem_types[] = { .prot_l1= PMD_TYPE_TABLE, .prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB, .domain = DOMAIN_IO, - }, + }, [MT_DEVICE_WC] = { /* ioremap_wc */ .prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC, .prot_l1= PMD_TYPE_TABLE, @@ -532,7 +532,7 @@ static void __init build_mem_type_table(void) mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; break; } - printk(Memory policy: ECC %sabled, Data cache %s\n, + printk(KERN_INFO Memory policy: ECC %sabled, Data cache %s\n, ecc_mask ? en : dis, cp-policy); for (i = 0; i ARRAY_SIZE(mem_types); i++) { @@ -653,9 +653,8 @@ static void __init create_36bit_mapping(struct map_desc *md, length = PAGE_ALIGN(md-length); if (!(cpu_architecture() = CPU_ARCH_ARMv6 || cpu_is_xsc3())) { - printk(KERN_ERR MM: CPU does not support supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -666,16 +665,14 @@ static void __init create_36bit_mapping(struct map_desc *md, * of the actual domain assignments in use. */ if (type-domain) { - printk(KERN_ERR MM: invalid domain in supersection - mapping for 0x%08llx at 0x%08lx\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } if ((addr | length | __pfn_to_phys(md-pfn)) ~SUPERSECTION_MASK) { - printk(KERN_ERR MM: cannot create mapping for 0x%08llx - at 0x%08lx invalid alignment\n, - (long long)__pfn_to_phys((u64)md-pfn), addr); + printk(KERN_ERR MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n, + (long long)__pfn_to_phys((u64)md-pfn), addr); return; } @@ -717,18 +714,16 @@ static void __init create_mapping(struct map_desc *md) pgd_t *pgd; if (md-virtual != vectors_base() md-virtual TASK_SIZE) { - printk(KERN_WARNING BUG: not creating mapping for 0x%08llx - at 0x%08lx in user region\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); + printk(KERN_WARNING BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n, + (long long)__pfn_to_phys((u64)md-pfn), md-virtual); return; } if ((md-type == MT_DEVICE || md-type == MT_ROM) md-virtual = PAGE_OFFSET (md-virtual VMALLOC_START || md-virtual = VMALLOC_END)) { - printk(KERN_WARNING BUG: mapping for 0x%08llx - at 0x%08lx out of vmalloc space\n, - (long long)__pfn_to_phys((u64)md-pfn), md-virtual); +
[linux-yocto] [PATCH 20/30] LSI AXM55XX: Add PMU support
From: David Mercado david.merc...@windriver.com This patch adds PMU support to the Axxia AXM55xx platform. Note that on this platform, all PMU IRQ lines are OR'ed together into a single IRQ, and therefore, this implementation uses a rotating IRQ affinity scheme to deal with it. Signed-off-by: David Mercado david.merc...@windriver.com --- arch/arm/kernel/perf_event_v7.c |3 +- arch/arm/mach-axxia/axxia-gic.c | 25 -- arch/arm/mach-axxia/axxia.c | 55 +++ arch/arm/mach-axxia/include/mach/irqs.h |1 + 4 files changed, 81 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 7deaa7f..ae7d9d8 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c @@ -95,6 +95,7 @@ enum armv7_a5_perf_types { /* ARMv7 Cortex-A15 specific event types */ enum armv7_a15_perf_types { + ARMV7_A15_PERFCTR_CPU_CYCLES= 0x11, ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40, ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE= 0x41, ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42, @@ -489,7 +490,7 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] * Cortex-A15 HW events mapping */ static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = { - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, + [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_A15_PERFCTR_CPU_CYCLES, [PERF_COUNT_HW_INSTRUCTIONS]= ARMV7_PERFCTR_INSTR_EXECUTED, [PERF_COUNT_HW_CACHE_REFERENCES]= ARMV7_PERFCTR_L1_DCACHE_ACCESS, [PERF_COUNT_HW_CACHE_MISSES]= ARMV7_PERFCTR_L1_DCACHE_REFILL, diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c index e5ad304..8a8e8eb 100644 --- a/arch/arm/mach-axxia/axxia-gic.c +++ b/arch/arm/mach-axxia/axxia-gic.c @@ -283,6 +283,10 @@ static void gic_mask_irq(struct irq_data *d) if ((irqid = IPI0_CPU0) (irqid MAX_AXM_IPI_NUM)) return; + /* Don't mess with the PMU IRQ either. */ + if (irqid == IRQ_PMU) + return; + /* Deal with PPI interrupts directly. */ if ((irqid 16) (irqid 32)) { _gic_mask_irq(d); @@ -327,6 +331,10 @@ static void gic_unmask_irq(struct irq_data *d) if ((irqid = IPI0_CPU0) (irqid MAX_AXM_IPI_NUM)) return; + /* Don't mess with the PMU IRQ either. */ + if (irqid == IRQ_PMU) + return; + /* Deal with PPI interrupts directly. */ if ((irqid 15) (irqid 32)) { _gic_unmask_irq(d); @@ -565,8 +573,8 @@ static int gic_set_affinity(struct irq_data *d, * different than the prior cluster, remove the IRQ affinity * on the old cluster. */ - if ((cpu_logical_map(cpu) / CORES_PER_CLUSTER) != - (irq_cpuid[irqid] / CORES_PER_CLUSTER)) { + if ((irqid != IRQ_PMU) ((cpu_logical_map(cpu) / CORES_PER_CLUSTER) != + (irq_cpuid[irqid] / CORES_PER_CLUSTER))) { /* * If old cpu assignment falls within the same cluster as * the cpu we're currently running on, set the IRQ affinity @@ -775,6 +783,11 @@ static void __cpuinit gic_dist_init(struct gic_chip_data *gic) } /* +* Set the PMU IRQ to the first cpu in this cluster. +*/ + writeb_relaxed(0x01, base + GIC_DIST_TARGET + IRQ_PMU); + + /* * Set Axxia IPI interrupts to be edge triggered. */ for (i = IPI0_CPU0; i MAX_AXM_IPI_NUM; i++) { @@ -797,6 +810,14 @@ static void __cpuinit gic_dist_init(struct gic_chip_data *gic) base + GIC_DIST_ENABLE_SET + enableoff); } + /* +* Do the initial enable of the PMU IRQ here. +*/ + enablemask = 1 (IRQ_PMU % 32); + enableoff = (IRQ_PMU / 32) * 4; + writel_relaxed(enablemask, + base + GIC_DIST_ENABLE_SET + enableoff); + writel_relaxed(1, base + GIC_DIST_CTRL); } diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c index 0e368a4..1c1f20e 100644 --- a/arch/arm/mach-axxia/axxia.c +++ b/arch/arm/mach-axxia/axxia.c @@ -46,6 +46,7 @@ #include asm/mach/time.h #include asm/hardware/cache-l2x0.h #include asm/hardware/gic.h +#include asm/pmu.h #include mach/hardware.h #include mach/timers.h #include mach/axxia-gic.h @@ -178,6 +179,58 @@ static struct of_dev_auxdata axxia_auxdata_lookup[] __initdata = { {} }; +static struct resource axxia_pmu_resources[] = { + [0] = { + .start = IRQ_PMU, + .end= IRQ_PMU, + .flags = IORESOURCE_IRQ, + }, +}; + +/* + * The PMU IRQ lines of four cores are wired together into a single interrupt. + * Bounce the interrupt
[linux-yocto] [PATCH 19/30] arm/mach-axxia: Updated PCIe driver to set PCIe
From: Paul Butler paul.but...@windriver.com BASE_ADDR1 register Updated PCIe driver to set PCIe BASE_ADDR1 register to 0x0 without which PCIe inbound access wasn't working and we were seeing several suprious PEI interrupts including BAR mismatch interrupt. Signed-off-by: SangeethaRao sangeetha@lsi.com Signed-off-by: Paul Butler paul.but...@windriver.com --- arch/arm/mach-axxia/pci.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-axxia/pci.c b/arch/arm/mach-axxia/pci.c index 2600892..49565e8 100644 --- a/arch/arm/mach-axxia/pci.c +++ b/arch/arm/mach-axxia/pci.c @@ -667,20 +667,23 @@ static int axxia_pcie_setup(int portno, struct pci_sys_data *sys) /* Configure the inbound window size */ inbound_size = (u32) resource_size(port-inbound); - writel(inbound_size, port-regs + PCIE_RC_BAR0_SIZE); + writel(~(inbound_size-1), port-regs + PCIE_RC_BAR0_SIZE); /* Verify BAR0 size */ { u32 bar0_size; writel(~0, port-regs + PCI_BASE_ADDRESS_0); bar0_size = readl(port-regs + PCI_BASE_ADDRESS_0); - if ((bar0_size ~0xf) != inbound_size) + if ((bar0_size ~0xf) != ~(inbound_size-1)) pr_err(PCIE%d: Config BAR0 failed\n, port-index); } /* Set the BASE0 address to start of PCIe base */ writel(port-pci_bar, port-regs + PCI_BASE_ADDRESS_0); + /* Set the BASE1 address to 0x0 */ + writel(0x0, port-regs + PCI_BASE_ADDRESS_1); + /* Setup TPAGE registers for inbound mapping * * We set the MSB of each TPAGE to select 128-bit AXI access. For the -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 24/30] arch/arm/mach-axxia: added support for ncr_read/ncr_write
From: SangeethaRao sangeetha@lsi.com This patch adds support for ncr_read/ncr_write to access PCIe/SRIO SerDes config in 0x115 node Signed-off-by: SangeethaRao sangeetha@lsi.com --- arch/arm/mach-axxia/ncr.c | 137 - 1 file changed, 123 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-axxia/ncr.c b/arch/arm/mach-axxia/ncr.c index 84c260f..f166cd5 100644 --- a/arch/arm/mach-axxia/ncr.c +++ b/arch/arm/mach-axxia/ncr.c @@ -203,7 +203,6 @@ ncr_unlock(int domain) -- ncr_read */ - int ncr_read(unsigned long region, unsigned long address, int number, void *buffer) @@ -224,7 +223,7 @@ ncr_read(unsigned long region, unsigned long address, int number, if (0 != ncr_lock(LOCK_DOMAIN)) return -1; - if (NCP_NODE_ID(region) != 0x0153) { + if ((NCP_NODE_ID(region) != 0x0153) (NCP_NODE_ID(region) != 0x115)) { /* * Set up the read command. */ @@ -274,6 +273,7 @@ ncr_read(unsigned long region, unsigned long address, int number, *((unsigned long *) buffer) = ncr_register_read((unsigned *) address); address += 4; + buffer += 4; number -= 4; } @@ -284,17 +284,75 @@ ncr_read(unsigned long region, unsigned long address, int number, } } else { #ifdef APB2SER_PHY_PHYS_ADDRESS - void __iomem *targ_address = apb2ser0_address + -(address (~0x3)); - /* - * Copy data words to the buffer. - */ - - while (4 = number) { - *((unsigned long *) buffer) = - *((unsigned long *) targ_address); - targ_address += 4; - number -= 4; + if (NCP_NODE_ID(region) != 0x115) { + void __iomem *targ_address = apb2ser0_address + + (address (~0x3)); + /* + * Copy data words to the buffer. + */ + + while (4 = number) { + *((unsigned long *) buffer) = + *((unsigned long *) targ_address); + targ_address += 4; + number -= 4; + } + } else { + void __iomem *base; + if (0x address) { + ncr_unlock(LOCK_DOMAIN); + return -1; + } + + switch (NCP_TARGET_ID(region)) { + case 0: + base = (apb2ser0_address + 0x1e0); + break; + case 1: + base = (apb2ser0_address + 0x1f0); + break; + case 2: + base = (apb2ser0_address + 0x200); + break; + case 3: + base = (apb2ser0_address + 0x210); + break; + case 4: + base = (apb2ser0_address + 0x220); + break; + case 5: + base = (apb2ser0_address + 0x230); + break; + default: + ncr_unlock(LOCK_DOMAIN); + return -1; + } + if ((NCP_TARGET_ID(region) == 0x1) || + (NCP_TARGET_ID(region) == 0x4)) { + writel((0x84c0 + address), (base + 4)); + } else { + writel((0x8540 + address), (base + 4)); + } + do { + --wfc_timeout; + *((unsigned long *) buffer) = + readl(base + 4); + } while (0 != (*((unsigned long *) buffer) 0x8000) +0 wfc_timeout); + + if (0 == wfc_timeout) { + ncr_unlock(LOCK_DOMAIN); + return -1; + } + + if ((NCP_TARGET_ID(region) == 0x1) || + (NCP_TARGET_ID(region) == 0x4)) { + *((unsigned short *) buffer) = +
[linux-yocto] [PATCH 25/30] drivers/i2c-axxia: Support I2C_M_RECV_LEN
From: Anders Berg anders.b...@lsi.com Add support for the I2C_M_RECV_LEN flag to enable SMBus block data transfers. scripts/setlocalversion strips out the tag if there is a match since the Linux version is in Makefile. Without the tag information, there is no way to get back to the specific tag used in defect reports etc. This patch adds, in the LSI Axxia case, the lsi tag. Add a timeout condition to the soft reset code. Currently this will time out when running on simulator since it fails to clear the soft reset bit. Signed-off-by: John Jacques john.jacq...@lsi.com Signed-off-by: Anders Berg anders.b...@lsi.com --- drivers/i2c/busses/i2c-axxia.c | 193 +--- scripts/setlocalversion|8 ++ 2 files changed, 130 insertions(+), 71 deletions(-) diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c index 8061998..519cda7 100644 --- a/drivers/i2c/busses/i2c-axxia.c +++ b/drivers/i2c/busses/i2c-axxia.c @@ -27,7 +27,8 @@ #include linux/module.h #define SCL_WAIT_TIMEOUT_NS 2500 -#define I2C_TIMEOUT (msecs_to_jiffies(1000)) +#define I2C_XFER_TIMEOUT(msecs_to_jiffies(500)) +#define I2C_STOP_TIMEOUT(msecs_to_jiffies(100)) #define TX_FIFO_SIZE8 #define RX_FIFO_SIZE8 @@ -123,12 +124,10 @@ struct axxia_i2c_dev { int irq; /* xfer completion object */ struct completion msg_complete; - /* pointer to current message data */ - u8 *msg_buf; - /* size of unsent data in the message buffer */ - size_t msg_buf_remaining; - /* identifies read transfers */ - int msg_read; + /* pointer to current message */ + struct i2c_msg *msg; + /* number of bytes transferred in msg */ + size_t msg_xfrd; /* error code for completed message */ int msg_err; /* current i2c bus clock rate */ @@ -168,10 +167,21 @@ axxia_i2c_init(struct axxia_i2c_dev *idev) u32 t_setup; u32 tmo_clk; u32 prescale; + unsigned long timeout; dev_dbg(idev-dev, rate=%uHz per_clk=%uMHz - ratio=1:%u\n, idev-bus_clk_rate, clk_mhz, divisor); + /* Reset controller */ + writel(0x01, idev-regs-soft_reset); + timeout = jiffies + msecs_to_jiffies(100); + while (readl(idev-regs-soft_reset) 1) { + if (time_after(jiffies, timeout)) { + dev_warn(idev-dev, Soft reset failed\n); + break; + } + } + /* Enable Master Mode */ writel(0x1, idev-regs-global_control); @@ -186,8 +196,8 @@ axxia_i2c_init(struct axxia_i2c_dev *idev) /* SDA Setup Time */ writel(t_setup, idev-regs-sda_setup_time); - /* SDA Hold Time, 5ns */ - writel(ns_to_clk(5, clk_mhz), idev-regs-sda_hold_time); + /* SDA Hold Time, 300ns */ + writel(ns_to_clk(300, clk_mhz), idev-regs-sda_hold_time); /* Filter 50ns spikes */ writel(ns_to_clk(50, clk_mhz), idev-regs-spike_fltr_len); @@ -228,15 +238,40 @@ axxia_i2c_init(struct axxia_i2c_dev *idev) } static int -axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev) +i2c_m_rd(const struct i2c_msg *msg) { - size_t rx_fifo_avail = readl(idev-regs-mst_rx_fifo); - int bytes_to_transfer = min(rx_fifo_avail, idev-msg_buf_remaining); + return (msg-flags I2C_M_RD) != 0; +} - idev-msg_buf_remaining -= bytes_to_transfer; +static int +i2c_m_recv_len(const struct i2c_msg *msg) +{ + return (msg-flags I2C_M_RECV_LEN) != 0; +} - while (0 bytes_to_transfer--) - *idev-msg_buf++ = readl(idev-regs-mst_data); +static int +axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev) +{ + struct i2c_msg *msg = idev-msg; + size_t rx_fifo_avail = readl(idev-regs-mst_rx_fifo); + int bytes_to_transfer = min(rx_fifo_avail, msg-len - idev-msg_xfrd); + + while (0 bytes_to_transfer--) { + int c = readl(idev-regs-mst_data); + if (idev-msg_xfrd == 0 i2c_m_recv_len(msg)) { + if (c == 0 || c I2C_SMBUS_BLOCK_MAX) { + idev-msg_err = -EPROTO; + i2c_int_disable(idev, ~0); + dev_err(idev-dev, + invalid SMBus block size (%d)\n, c); + complete(idev-msg_complete); + break; + } + msg-len += c; + writel(msg-len, idev-regs-mst_rx_xfer); + } + msg-buf[idev-msg_xfrd++] = c; + } return 0; } @@ -244,18 +279,16 @@ axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev) static int axxia_i2c_fill_tx_fifo(struct axxia_i2c_dev *idev) { + struct i2c_msg *msg = idev-msg; size_t tx_fifo_avail = TX_FIFO_SIZE - readl(idev-regs-mst_tx_fifo); - int
[linux-yocto] [PATCH 23/30] powerpc/mpic: Disable preemption when calling mpic_processor_id()
From: John Jacques john.jacq...@lsi.com commit 32dda05f4ec2b854b594bd91590c46c5197d77e1 upstream Otherwise, we get a debug traceback due to the use of smp_processor_id() (or get_paca()) inside hard_smp_processor_id(). mpic_host_map() is just looking for a default CPU, so it doesn't matter if we migrate after getting the CPU ID. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: John Jacques john.jacq...@lsi.com --- arch/powerpc/sysdev/mpic.c | 119 +--- 1 file changed, 68 insertions(+), 51 deletions(-) diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 9ee7043..a3d7951 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -142,7 +142,7 @@ static u32 mpic_infos[][MPIC_IDX_END] = { }, }; -#define MPIC_INFO(name) mpic-hw_set[MPIC_IDX_##name] +#define MPIC_INFO(name) (mpic-hw_set[MPIC_IDX_##name]) #else /* CONFIG_MPIC_WEIRD */ @@ -169,7 +169,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type, struct mpic_reg_bank *rb, unsigned int reg) { - switch(type) { + switch (type) { #ifdef CONFIG_PPC_DCR case mpic_access_dcr: return dcr_read(rb-dhost, reg); @@ -183,10 +183,10 @@ static inline u32 _mpic_read(enum mpic_reg_type type, } static inline void _mpic_write(enum mpic_reg_type type, - struct mpic_reg_bank *rb, - unsigned int reg, u32 value) + struct mpic_reg_bank *rb, + unsigned int reg, u32 value) { - switch(type) { + switch (type) { #ifdef CONFIG_PPC_DCR case mpic_access_dcr: dcr_write(rb-dhost, reg, value); @@ -213,7 +213,8 @@ static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) return _mpic_read(type, mpic-gregs, offset); } -static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value) +static inline void _mpic_ipi_write(struct mpic *mpic, + unsigned int ipi, u32 value) { unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) + (ipi * MPIC_INFO(GREG_IPI_STRIDE)); @@ -250,14 +251,16 @@ static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) return _mpic_read(mpic-reg_type, mpic-cpuregs[cpu], reg); } -static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) +static inline void _mpic_cpu_write(struct mpic *mpic, + unsigned int reg, u32 value) { unsigned int cpu = mpic_processor_id(mpic); _mpic_write(mpic-reg_type, mpic-cpuregs[cpu], reg, value); } -static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigned int reg) +static inline u32 _mpic_irq_read(struct mpic *mpic, + unsigned int src_no, unsigned int reg) { unsigned intisu = src_no mpic-isu_shift; unsigned intidx = src_no mpic-isu_mask; @@ -289,16 +292,16 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, #endif } -#define mpic_read(b,r) _mpic_read(mpic-reg_type,(b),(r)) -#define mpic_write(b,r,v) _mpic_write(mpic-reg_type,(b),(r),(v)) -#define mpic_ipi_read(i) _mpic_ipi_read(mpic,(i)) -#define mpic_ipi_write(i,v)_mpic_ipi_write(mpic,(i),(v)) -#define mpic_tm_read(i)_mpic_tm_read(mpic,(i)) -#define mpic_tm_write(i,v) _mpic_tm_write(mpic,(i),(v)) -#define mpic_cpu_read(i) _mpic_cpu_read(mpic,(i)) -#define mpic_cpu_write(i,v)_mpic_cpu_write(mpic,(i),(v)) -#define mpic_irq_read(s,r) _mpic_irq_read(mpic,(s),(r)) -#define mpic_irq_write(s,r,v) _mpic_irq_write(mpic,(s),(r),(v)) +#define mpic_read(b, r)_mpic_read(mpic-reg_type, (b), (r)) +#define mpic_write(b, r, v)_mpic_write(mpic-reg_type, (b), (r), (v)) +#define mpic_ipi_read(i) _mpic_ipi_read(mpic, (i)) +#define mpic_ipi_write(i, v) _mpic_ipi_write(mpic, (i), (v)) +#define mpic_tm_read(i)_mpic_tm_read(mpic, (i)) +#define mpic_tm_write(i, v)_mpic_tm_write(mpic, (i), (v)) +#define mpic_cpu_read(i) _mpic_cpu_read(mpic, (i)) +#define mpic_cpu_write(i, v) _mpic_cpu_write(mpic, (i), (v)) +#define mpic_irq_read(s, r)_mpic_irq_read(mpic, (s), (r)) +#define mpic_irq_write(s, r, v)_mpic_irq_write(mpic, (s), (r), (v)) /* @@ -333,7 +336,7 @@ static inline void mpic_map(struct mpic *mpic, _mpic_map_mmio(mpic, phys_addr, rb, offset, size); } #else /* CONFIG_PPC_DCR */ -#define mpic_map(m,p,b,o,s)_mpic_map_mmio(m,p,b,o,s) +#define mpic_map(m, p, b, o, s)_mpic_map_mmio(m, p, b, o, s) #endif /* !CONFIG_PPC_DCR */ @@ -345,7 +348,8 @@ static void __init mpic_test_broken_ipi(struct mpic *mpic) { u32 r; -
[linux-yocto] [PATCH 17/30] arch/arm/mach-axxia: Clear MTC Errors During Initialization
From: John Jacques john.jacq...@lsi.com The MTC status registers are not cleared by a reset. So, clear them during driver initialization. Signed-off-by: John Jacques john.jacq...@lsi.com --- drivers/misc/lsi-mtc.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/misc/lsi-mtc.c b/drivers/misc/lsi-mtc.c index ebbdac8..8e1ae77 100644 --- a/drivers/misc/lsi-mtc.c +++ b/drivers/misc/lsi-mtc.c @@ -2731,6 +2731,7 @@ mtc_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct ncp_axis_mtc_MTC_CONFIG0_REG_ADDR_r_t cfg0 = { 0 }; int start_stop; + if (copy_from_user ((void *)start_stop, (void *)arg, sizeof(int))) { printk(KERN_DEBUG MTC Error ioctl\n); @@ -2740,6 +2741,10 @@ mtc_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if ((start_stop != 0) (start_stop != 1)) return -EINVAL; + /* clear interrupt status before hit start */ + if (start_stop == 1) + dev-regs-int_status = 0x7f; + cfg0 = *((struct ncp_axis_mtc_MTC_CONFIG0_REG_ADDR_r_t *) (dev-regs-config0)); @@ -3080,6 +3085,8 @@ static long _mtc_config(struct mtc_device *dev, struct lsi_mtc_cfg_t *pMTCCfg) dev-regs-config1, dev-regs-execute); #endif - /* test */ + /* clear ecc interrupt status */ + dev-regs-ecc_int_status = 0xf; + return 0; } -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 22/30] LSI: Fix Device Tree compatible fields
From: John Jacques john.jacq...@lsi.com The latest boot loader updates the frequency of the clocks in the device tree; it expects there to be a place to put them. Fix the device trees for ACP and AXM platforms such that the compatible field uses the form manufacturer,model. Signed-off-by: John Jacques john.jacq...@lsi.com Signed-off-by: David Mercado david.merc...@windriver.com Signed-off-by: Paul Butler paul.but...@windriver.com --- arch/arm/boot/dts/axm55xx.dts |4 ++-- arch/arm/boot/dts/axm55xxemu.dts| 21 +++-- arch/powerpc/boot/dts/ACP344xV2.dts | 20 ++-- arch/powerpc/boot/dts/acp25xx.dts | 16 arch/powerpc/boot/dts/acp342x.dts | 14 +++--- arch/powerpc/boot/dts/acp344x.dts | 16 6 files changed, 54 insertions(+), 37 deletions(-) diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts index f18550b..f0b325d 100644 --- a/arch/arm/boot/dts/axm55xx.dts +++ b/arch/arm/boot/dts/axm55xx.dts @@ -232,7 +232,7 @@ }; axxia_femac0: femac@0x201012 { - compatible = acp-femac; + compatible = lsi,acp-femac; device_type = network; reg = 0x20 0x1012 0 0x1000, 0x20 0x10121000 0 0x1000, @@ -314,7 +314,7 @@ USB0: usb@004a4000 { device_type = usb; - compatible = acp-usb; + compatible = lsi,acp-usb; enabled = 0; reg = 0x20 0x1014 0x0 002, 0x20 0x10094000 0x0 0002000; diff --git a/arch/arm/boot/dts/axm55xxemu.dts b/arch/arm/boot/dts/axm55xxemu.dts index 99d7a70..1b22b33 100644 --- a/arch/arm/boot/dts/axm55xxemu.dts +++ b/arch/arm/boot/dts/axm55xxemu.dts @@ -1,5 +1,5 @@ /* - * arch/arm/boot/dts/axm5500-sim.dts + * arch/arm/boot/dts/axm55xxemu.dts * * Copyright (C) 2012 LSI * @@ -93,6 +93,23 @@ */ }; + clocks { + #address-cells = 1; + #size-cells = 0; + + cpu { + frequency = 0; /* Filled in by the boot loader. */ + }; + + peripheral { + frequency = 0; /* Filled in by the boot loader. */ + }; + + emmc { + frequency = 0; /* Filled in by the boot loader. */ + }; + }; + memory@ { device_type = memory; reg = 0 0x 0 0x1000; @@ -153,7 +170,7 @@ }; axxia_femac0: femac@0x201012 { -compatible = acp-femac; +compatible = lsi,acp-femac; device_type = network; reg = 0x20 0x1012 0 0x1000, 0x20 0x10121000 0 0x1000, diff --git a/arch/powerpc/boot/dts/ACP344xV2.dts b/arch/powerpc/boot/dts/ACP344xV2.dts index 1a4040f..72db6b4 100644 --- a/arch/powerpc/boot/dts/ACP344xV2.dts +++ b/arch/powerpc/boot/dts/ACP344xV2.dts @@ -135,7 +135,7 @@ clock-frequency = 0; // Filled in by zImage UART0: serial@00404000 { device_type = serial; -compatible = acp-uart0; +compatible = lsi,acp-uart0; enabled = 0; reg = 0x00404000 0x1000; clock-reg = 0x00408040 0x20; @@ -146,7 +146,7 @@ }; UART1: serial@00405000 { device_type = serial; -compatible = acp-uart1; +compatible = lsi,acp-uart1; enabled = 0; reg = 0x00405000 0x1000; clock-reg = 0x00408060 0x20; @@ -157,7 +157,7 @@ }; USB0: usb@004a4000 { device_type = usb; -compatible = acp-usb; +compatible = lsi,acp-usb; enabled = 0; reg = 0x004a 0x0002 0x0040c000 0x1000; @@ -167,7 +167,7 @@ I2C: i2c@00403000 { #address-cells = 1; #size-cells = 0; -compatible = acp-i2c; +compatible = lsi,acp-i2c; enabled = 0; reg = 0x403000 0x1000 0x408020 0x1000; interrupt-parent = MPIC; @@ -182,7 +182,7 @@ #address-cells = 1; #size-cells = 0;
[linux-yocto] [PATCH 29/30] ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
From: Ivan Djelic ivan.dje...@parrot.com commit 455bd4c430b0c0a361f38e8658a0d6cb469942b5 upstream. Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on assumptions about the implementation of memset and similar functions. The current ARM optimized memset code does not return the value of its first argument, as is usually expected from standard implementations. For instance in the following function: void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) { memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); waiter-magic = waiter; INIT_LIST_HEAD(waiter-list); } compiled as: 800554d0 debug_mutex_lock_common: 800554d0: e92d4008push{r3, lr} 800554d4: e1a1mov r0, r1 800554d8: e3a02010mov r2, #16 ; 0x10 800554dc: e3a01011mov r1, #17 ; 0x11 800554e0: eb04426ebl 80165ea0 memset 800554e4: e1a03000mov r3, r0 800554e8: e583000cstr r0, [r3, #12] 800554ec: e583str r0, [r3] 800554f0: e5830004str r0, [r3, #4] 800554f4: e8bd8008pop {r3, pc} GCC assumes memset returns the value of pointer 'waiter' in register r0; causing register/memory corruptions. This patch fixes the return value of the assembly version of memset. It adds a 'mov' instruction and merges an additional load+store into existing load/store instructions. For ease of review, here is a breakdown of the patch into 4 simple steps: Step 1 == Perform the following substitutions: ip - r8, then r0 - ip, and insert 'mov ip, r0' as the first statement of the function. At this point, we have a memset() implementation returning the proper result, but corrupting r8 on some paths (the ones that were using ip). Step 2 == Make sure r8 is saved and restored when (! CALGN(1)+0) == 1: save r8: - str lr, [sp, #-4]! + stmfd sp!, {r8, lr} and restore r8 on both exit paths: - ldmeqfd sp!, {pc} @ Now 64 bytes to go. + ldmeqfd sp!, {r8, pc} @ Now 64 bytes to go. (...) tst r2, #16 stmneia ip!, {r1, r3, r8, lr} - ldr lr, [sp], #4 + ldmfd sp!, {r8, lr} Step 3 == Make sure r8 is saved and restored when (! CALGN(1)+0) == 0: save r8: - stmfd sp!, {r4-r7, lr} + stmfd sp!, {r4-r8, lr} and restore r8 on both exit paths: bgt 3b - ldmeqfd sp!, {r4-r7, pc} + ldmeqfd sp!, {r4-r8, pc} (...) tst r2, #16 stmneia ip!, {r4-r7} - ldmfd sp!, {r4-r7, lr} + ldmfd sp!, {r4-r8, lr} Step 4 == Rewrite register list r4-r7, r8 as r4-r8. Signed-off-by: Ivan Djelic ivan.dje...@parrot.com Reviewed-by: Nicolas Pitre n...@linaro.org Signed-off-by: Dirk Behme dirk.be...@gmail.com Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Cc: Eric Bénard e...@eukrea.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- arch/arm/lib/memset.S | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 94b0650..1039023 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -14,11 +14,27 @@ .text .align 5 + .word 0 + +1: subsr2, r2, #4 @ 1 do we have enough + blt 5f @ 1 bytes to align with? + cmp r3, #2 @ 1 + strltb r1, [ip], #1@ 1 + strleb r1, [ip], #1@ 1 + strbr1, [ip], #1@ 1 + add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) +/* + * The pointer is now aligned and the length is adjusted. Try doing the + * memset again. + */ ENTRY(memset) - andsr3, r0, #3 @ 1 unaligned? - mov ip, r0 @ preserve r0 as return value - bne 6f @ 1 +/* + * Preserve the contents of r0 for the return value. + */ + mov ip, r0 + andsr3, ip, #3 @ 1 unaligned? + bne 1b @ 1 /* * we know that the pointer in ip is aligned to a word boundary. */ -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 27/30] LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct boundary, Expand valid condition.
From: Michael Bringmann michael.bringm...@lsi.com Add additional spinlocks/mutexes to each controller state to increase concurrency and performance. Fix some bound checks for full outbound DME descriptor chains, correct a lockup/delay issue with errors in the outbound DME chains, and remove a delay loop. rapidio/LSI AXM55xx: Correct some boundary checks for argument values. Also correct formatting of platform-specific function code. LSI AXM55xx: Expand valid condition checks for inbound message DME chains. Signed-off-by: Michael Bringmann michael.bringm...@lsi.com --- arch/arm/include/asm/axxia-rio.h| 31 -- drivers/rapidio/devices/lsi/axxia-rio-ds.c | 22 ++-- drivers/rapidio/devices/lsi/axxia-rio-irq.c | 156 --- drivers/rapidio/devices/lsi/axxia-rio-irq.h | 13 +-- drivers/rapidio/devices/lsi/axxia-rio.c |3 +- drivers/rapidio/devices/lsi/axxia-rio.h | 16 ++- 6 files changed, 101 insertions(+), 140 deletions(-) diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h index e01d6a3..492d476 100644 --- a/arch/arm/include/asm/axxia-rio.h +++ b/arch/arm/include/asm/axxia-rio.h @@ -94,21 +94,32 @@ static inline u32 CNTLZW(u32 val) int n = 0; if (val == 0) return 32; - if ((val 0x) == 0) - n += 16; val = val 16; + + if ((val 0x) == 0) { + n += 16; + val = val 16; + } /* // 16 bits from left are zero! so we omit 16 left bits */ - if ((val 0xFF00) == 0) - n = n + 8; val = val 8; + if ((val 0xFF00) == 0) { + n = n + 8; + val = val 8; + } /* 8 left bits are 0 */ - if ((val 0xF000) == 0) - n = n + 4; val = val 4; + if ((val 0xF000) == 0) { + n = n + 4; + val = val 4; + } /* 4 left bits are 0 */ - if ((val 0xC000) == 0) - n = n + 2, val = val 2; + if ((val 0xC000) == 0) { + n = n + 2; + val = val 2; + } /* 110 2 left bits are zero */ - if ((val 0x8000) == 0) - n = n + 1, val = val 1; + if ((val 0x8000) == 0) { + n = n + 1; + val = val 1; + } /* first left bit is zero */ return n; } diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c b/drivers/rapidio/devices/lsi/axxia-rio-ds.c index f4f44a6..02d3751 100755 --- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c +++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c @@ -240,9 +240,10 @@ int axxia_open_ob_data_stream( int num_header_entries, int num_data_entries) { + struct rio_priv *priv = mport-priv; int rc = 0; - axxia_api_lock(); + axxia_api_lock(priv); rc = open_ob_data_stream(mport, dev_id, @@ -250,7 +251,7 @@ int axxia_open_ob_data_stream( num_header_entries, num_data_entries); - axxia_api_unlock(); + axxia_api_unlock(priv); return rc; } @@ -747,12 +748,12 @@ int axxia_close_ob_data_stream( struct rio_ds_hdr_desc *ptr_hdr_desc; u32dse_ctrl, i; - axxia_api_lock(); + axxia_api_lock(priv); ptr_dse_cfg = (ptr_ds_priv-obds_dse_cfg[dse_id]); if (ptr_dse_cfg-in_use == RIO_DS_FALSE) { - axxia_api_unlock(); + axxia_api_unlock(priv); return 0; } @@ -791,7 +792,7 @@ int axxia_close_ob_data_stream( /* release the IRQ handler */ release_irq_handler((ptr_ds_priv-ob_dse_irq[dse_id])); - axxia_api_unlock(); + axxia_api_unlock(priv); return 0; } @@ -830,9 +831,10 @@ int axxia_open_ib_data_stream( int desc_dbuf_size, int num_entries) { + struct rio_priv *priv = mport-priv; int rc = 0; - axxia_api_lock(); + axxia_api_lock(priv); rc = open_ib_data_stream(mport, dev_id, @@ -840,7 +842,7 @@ int axxia_open_ib_data_stream( cos, desc_dbuf_size, num_entries); - axxia_api_unlock(); + axxia_api_unlock(priv); return rc; } @@ -1522,7 +1524,7 @@ int axxia_close_ib_data_stream( struct rio_ids_data_desc *ptr_data_desc; u8 virt_vsid; - axxia_api_lock(); + axxia_api_lock(priv); for (i = 0; i (ptr_ds_priv-num_ibds_virtual_m); i++) { ptr_virt_m_cfg = (ptr_ds_priv-ibds_vsid_m_cfg[i]); @@
[linux-yocto] [PATCH 30/30] ARM: 7670/1: fix the memset fix
From: Nicolas Pitre nicolas.pi...@linaro.org commit 418df63adac56841ef6b0f1fcf435bc64d4ed177 upstream. Commit 455bd4c430b0 (ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations) attempted to fix a compliance issue with the memset return value. However the memset itself became broken by that patch for misaligned pointers. This fixes the above by branching over the entry code from the misaligned fixup code to avoid reloading the original pointer. Also, because the function entry alignment is wrong in the Thumb mode compilation, that fixup code is moved to the end. While at it, the entry instructions are slightly reworked to help dual issue pipelines. Signed-off-by: Nicolas Pitre n...@linaro.org Tested-by: Alexander Holler hol...@ahsoftware.de Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Cc: Eric Bénard e...@eukrea.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- arch/arm/lib/memset.S | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 1039023..94b0650 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -14,27 +14,11 @@ .text .align 5 - .word 0 - -1: subsr2, r2, #4 @ 1 do we have enough - blt 5f @ 1 bytes to align with? - cmp r3, #2 @ 1 - strltb r1, [ip], #1@ 1 - strleb r1, [ip], #1@ 1 - strbr1, [ip], #1@ 1 - add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) -/* - * The pointer is now aligned and the length is adjusted. Try doing the - * memset again. - */ ENTRY(memset) -/* - * Preserve the contents of r0 for the return value. - */ - mov ip, r0 - andsr3, ip, #3 @ 1 unaligned? - bne 1b @ 1 + andsr3, r0, #3 @ 1 unaligned? + mov ip, r0 @ preserve r0 as return value + bne 6f @ 1 /* * we know that the pointer in ip is aligned to a word boundary. */ -- 1.7.9.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH 30/30] ARM: 7670/1: fix the memset fix
On Thu, 1 May 2014, Greg Kroah-Hartman wrote: On Thu, May 01, 2014 at 08:29:52AM -0700, Charlie Paul wrote: From: Nicolas Pitre nicolas.pi...@linaro.org commit 418df63adac56841ef6b0f1fcf435bc64d4ed177 upstream. Commit 455bd4c430b0 (ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations) attempted to fix a compliance issue with the memset return value. However the memset itself became broken by that patch for misaligned pointers. This fixes the above by branching over the entry code from the misaligned fixup code to avoid reloading the original pointer. Also, because the function entry alignment is wrong in the Thumb mode compilation, that fixup code is moved to the end. While at it, the entry instructions are slightly reworked to help dual issue pipelines. Signed-off-by: Nicolas Pitre n...@linaro.org Tested-by: Alexander Holler hol...@ahsoftware.de Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Cc: Eric Bénard e...@eukrea.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- arch/arm/lib/memset.S | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) What is this patch for, and why send it to me? No idea. You did apply it to the stable trees you maintain quite a while a go already. Nicolas-- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH 30/30] ARM: 7670/1: fix the memset fix
On 2014-05-01, 9:11 PM, Nicolas Pitre wrote: On Thu, 1 May 2014, Greg Kroah-Hartman wrote: On Thu, May 01, 2014 at 08:29:52AM -0700, Charlie Paul wrote: From: Nicolas Pitre nicolas.pi...@linaro.org commit 418df63adac56841ef6b0f1fcf435bc64d4ed177 upstream. Commit 455bd4c430b0 (ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations) attempted to fix a compliance issue with the memset return value. However the memset itself became broken by that patch for misaligned pointers. This fixes the above by branching over the entry code from the misaligned fixup code to avoid reloading the original pointer. Also, because the function entry alignment is wrong in the Thumb mode compilation, that fixup code is moved to the end. While at it, the entry instructions are slightly reworked to help dual issue pipelines. Signed-off-by: Nicolas Pitre n...@linaro.org Tested-by: Alexander Holler hol...@ahsoftware.de Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Cc: Eric Bénard e...@eukrea.com Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- arch/arm/lib/memset.S | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) What is this patch for, and why send it to me? No idea. You did apply it to the stable trees you maintain quite a while a go already. Indeed. Looks like another lesson learned about git suppress-cc when porting and sending patches. This should be for the 3.4 yocto kernel tree, which also already has these changes via -stable. So the broadcast wasn't even necessary. Anyway, sorry for the noise, and I'll sort this out (and get out of your inboxes). Bruce Nicolas -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto