* [PATCH 1/2] ARM: use Kconfig to select uncompress.h
From: Arnd Bergmann @ 2013-01-17 16:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358436119-30808-2-git-send-email-shawn.guo@linaro.org>
On Thursday 17 January 2013, Shawn Guo wrote:
> Spam Status: Spamassassin 0% probability of being spam.
>
> Full report:
> No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1
> Following the approach handling DEBUG_LL inclusion, the patch creates
> a Kconfig symbol CONFIG_UNCOMPRESS_INCLUDE for choosing the correct
> uncompress header. For traditional build, mach/uncompress.h will be
> included in arch/arm/boot/compressed/misc.c. For multiplatform build,
> debug/uncompress.h which contains a suite of empty functions will be
> used. In this way, a platform with particular uncompress.h
> implementation could choose its own uncompress.h with this Kconfig
> option.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Nice trick!
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply
* [PATCH v6 14/15] KVM: ARM: Power State Coordination Interface implementation
From: Marc Zyngier @ 2013-01-17 15:55 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130116175918.29147.318.stgit@ubuntu>
On 16/01/13 17:59, Christoffer Dall wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
>
> Implement the PSCI specification (ARM DEN 0022A) to control
> virtual CPUs being "powered" on or off.
>
> PSCI/KVM is detected using the KVM_CAP_ARM_PSCI capability.
>
> A virtual CPU can now be initialized in a "powered off" state,
> using the KVM_ARM_VCPU_POWER_OFF feature flag.
>
> The guest can use either SMC or HVC to execute a PSCI function.
>
> Reviewed-by: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
A few bits went wrong when you reworked this patch. See below.
> ---
> Documentation/virtual/kvm/api.txt | 4 +
> arch/arm/include/asm/kvm_emulate.h | 5 ++
> arch/arm/include/asm/kvm_host.h | 5 +-
> arch/arm/include/asm/kvm_psci.h | 23 ++++++++
> arch/arm/include/uapi/asm/kvm.h | 16 +++++
> arch/arm/kvm/Makefile | 2 -
> arch/arm/kvm/arm.c | 28 +++++++++-
> arch/arm/kvm/psci.c | 105 ++++++++++++++++++++++++++++++++++++
> include/uapi/linux/kvm.h | 1
> 9 files changed, 184 insertions(+), 5 deletions(-)
> create mode 100644 arch/arm/include/asm/kvm_psci.h
> create mode 100644 arch/arm/kvm/psci.c
>
> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> index 38066a7a..c25439a 100644
> --- a/Documentation/virtual/kvm/api.txt
> +++ b/Documentation/virtual/kvm/api.txt
> @@ -2185,6 +2185,10 @@ return ENOEXEC for that vcpu.
> Note that because some registers reflect machine topology, all vcpus
> should be created before this ioctl is invoked.
>
> +Possible features:
> + - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
> + Depends on KVM_CAP_ARM_PSCI.
> +
>
> 4.78 KVM_GET_REG_LIST
>
> diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
> index 4c1a073..ba07de9 100644
> --- a/arch/arm/include/asm/kvm_emulate.h
> +++ b/arch/arm/include/asm/kvm_emulate.h
> @@ -32,6 +32,11 @@ void kvm_inject_undefined(struct kvm_vcpu *vcpu);
> void kvm_inject_dabt(struct kvm_vcpu *vcpu, unsigned long addr);
> void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr);
>
> +static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
> +{
> + return 1;
> +}
> +
> static inline u32 *vcpu_pc(struct kvm_vcpu *vcpu)
> {
> return (u32 *)&vcpu->arch.regs.usr_regs.ARM_pc;
> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
> index e65fc96..c9ba918 100644
> --- a/arch/arm/include/asm/kvm_host.h
> +++ b/arch/arm/include/asm/kvm_host.h
> @@ -30,7 +30,7 @@
> #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
> #define KVM_HAVE_ONE_REG
>
> -#define KVM_VCPU_MAX_FEATURES 0
> +#define KVM_VCPU_MAX_FEATURES 1
>
> /* We don't currently support large pages. */
> #define KVM_HPAGE_GFN_SHIFT(x) 0
> @@ -100,6 +100,9 @@ struct kvm_vcpu_arch {
> int last_pcpu;
> cpumask_t require_dcache_flush;
>
> + /* Don't run the guest: see copy_current_insn() */
Now that you made this field PSCI-specific, how about rewording the comment?
> + bool pause;
> +
> /* IO related fields */
> struct kvm_decode mmio_decode;
>
> diff --git a/arch/arm/include/asm/kvm_psci.h b/arch/arm/include/asm/kvm_psci.h
> new file mode 100644
> index 0000000..9a83d98
> --- /dev/null
> +++ b/arch/arm/include/asm/kvm_psci.h
> @@ -0,0 +1,23 @@
> +/*
> + * Copyright (C) 2012 - ARM Ltd
> + * Author: Marc Zyngier <marc.zyngier@arm.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#ifndef __ARM_KVM_PSCI_H__
> +#define __ARM_KVM_PSCI_H__
> +
> +bool kvm_psci_call(struct kvm_vcpu *vcpu);
> +
> +#endif /* __ARM_KVM_PSCI_H__ */
> diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h
> index bbb6b23..3303ff5 100644
> --- a/arch/arm/include/uapi/asm/kvm.h
> +++ b/arch/arm/include/uapi/asm/kvm.h
> @@ -65,6 +65,8 @@ struct kvm_regs {
> #define KVM_ARM_TARGET_CORTEX_A15 0
> #define KVM_ARM_NUM_TARGETS 1
>
> +#define KVM_ARM_VCPU_POWER_OFF 0 /* CPU is started in OFF state */
> +
> struct kvm_vcpu_init {
> __u32 target;
> __u32 features[7];
> @@ -145,4 +147,18 @@ struct kvm_arch_memory_slot {
> /* Highest supported SPI, from VGIC_NR_IRQS */
> #define KVM_ARM_IRQ_GIC_MAX 127
>
> +/* PSCI interface */
> +#define KVM_PSCI_FN_BASE 0x95c1ba5e
> +#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n))
> +
> +#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0)
> +#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1)
> +#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)
> +#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3)
> +
> +#define KVM_PSCI_RET_SUCCESS 0
> +#define KVM_PSCI_RET_NI ((unsigned long)-1)
> +#define KVM_PSCI_RET_INVAL ((unsigned long)-2)
> +#define KVM_PSCI_RET_DENIED ((unsigned long)-3)
> +
> #endif /* __ARM_KVM_H__ */
> diff --git a/arch/arm/kvm/Makefile b/arch/arm/kvm/Makefile
> index 1e45cd9..ea27987 100644
> --- a/arch/arm/kvm/Makefile
> +++ b/arch/arm/kvm/Makefile
> @@ -18,4 +18,4 @@ kvm-arm-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)
>
> obj-y += kvm-arm.o init.o interrupts.o
> obj-y += arm.o guest.o mmu.o emulate.o reset.o
> -obj-y += coproc.o coproc_a15.o mmio.o
> +obj-y += coproc.o coproc_a15.o mmio.o psci.o
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index 3168b9d..6ff5337 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -43,6 +43,7 @@
> #include <asm/kvm_mmu.h>
> #include <asm/kvm_emulate.h>
> #include <asm/kvm_coproc.h>
> +#include <asm/kvm_psci.h>
> #include <asm/opcodes.h>
>
> #ifdef REQUIRES_VIRT
> @@ -160,6 +161,7 @@ int kvm_dev_ioctl_check_extension(long ext)
> case KVM_CAP_SYNC_MMU:
> case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
> case KVM_CAP_ONE_REG:
> + case KVM_CAP_ARM_PSCI:
> r = 1;
> break;
> case KVM_CAP_COALESCED_MMIO:
> @@ -443,13 +445,17 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
> trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0),
> vcpu->arch.hsr & HSR_HVC_IMM_MASK);
>
> + if (kvm_psci_call(vcpu))
> + return 1;
> +
> return 1;
No undef injection if there is no PSCI match?
> }
>
> static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
> {
> - /* We don't support SMC; don't do that. */
> - kvm_debug("smc: at %08x", *vcpu_pc(vcpu));
> + if (!kvm_psci_call(vcpu))
Looks like you got the return value backward here.
> + return 1;
> +
> kvm_inject_undefined(vcpu);
> return 1;
> }
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply
* [PATCH V5 1/3] clk: tegra: add Tegra specific clocks
From: Peter De Schrijver @ 2013-01-17 15:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358369575-7325-1-git-send-email-swarren@wwwdotorg.org>
On Wed, Jan 16, 2013 at 09:52:53PM +0100, Stephen Warren wrote:
> From: Prashant Gaikwad <pgaikwad@nvidia.com>
>
> Add Tegra specific clocks, pll, pll_out, peripheral, frac_divider, super.
>
> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
> [swarren: alloc sizeof(*foo) not sizeof(struct foo), add comments re:
> storing pointers to stack variables, make a timeout loop more idiomatic,
> use _clk_pll_disable() not clk_disable_pll() from _program_pll() to
> avoid redundant lock operations, unified tegra_clk_periph() and
> tegra_clk_periph_nodiv(), unified tegra_clk_pll{,e}, rename all clock
> registration functions so they don't have the same name as the clock
> structs.]
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
...
> +static int clk_plle_enable(struct clk_hw *hw)
> +{
> + struct tegra_clk_pll *pll = to_clk_pll(hw);
> + unsigned long input_rate = clk_get_rate(clk_get_parent(hw->clk));
> + struct tegra_clk_pll_freq_table sel;
> + u32 val;
> + int err;
> +
> + if (_get_table_rate(hw, &sel, pll->fixed_rate, input_rate))
> + return -EBUSY;
> +
I think -EINVAL would be more appropriate here?
Cheers,
Peter.
^ permalink raw reply
* [PATCH v3] sdma-imx: Add SDMA firmware for Freescale i.MX SOCs
From: Fabio Estevam @ 2013-01-17 15:48 UTC (permalink / raw)
To: linux-arm-kernel
Add SDMA firmware for Freescale i.MX SOCs.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v2:
- Drop unrecognized chars by replacing double spaces with tabs, which caused
issues on some mail clients
Changes since v1:
- Drop 'to' information from the file name.
LICENCE.fsl_firmware | 140 +++++++++++++++++++++++++++++++++++++++++++
WHENCE | 13 ++++
imx/sdma/sdma-imx25.bin | Bin 0 -> 694 bytes
imx/sdma/sdma-imx31.bin | Bin 0 -> 3762 bytes
imx/sdma/sdma-imx35.bin | Bin 0 -> 1746 bytes
imx/sdma/sdma-imx51.bin | Bin 0 -> 1894 bytes
imx/sdma/sdma-imx53.bin | Bin 0 -> 1406 bytes
imx/sdma/sdma-imx6q.bin | Bin 0 -> 1838 bytes
8 files changed, 153 insertions(+)
create mode 100644 LICENCE.fsl_firmware
create mode 100644 imx/sdma/sdma-imx25.bin
create mode 100644 imx/sdma/sdma-imx31.bin
create mode 100644 imx/sdma/sdma-imx35.bin
create mode 100644 imx/sdma/sdma-imx51.bin
create mode 100644 imx/sdma/sdma-imx53.bin
create mode 100644 imx/sdma/sdma-imx6q.bin
diff --git a/LICENCE.fsl_firmware b/LICENCE.fsl_firmware
new file mode 100644
index 0000000..a1fef32
--- /dev/null
+++ b/LICENCE.fsl_firmware
@@ -0,0 +1,140 @@
+FREESCALE SEMICONDUCTOR SOFTWARE LICENSE AGREEMENT
+
+This is a legal agreement between you (either as an individual or as an
+authorized representative of your employer) and Freescale
+Semiconductor, Inc. ("Freescale"). It concerns your rights to use this
+file and any accompanying written materials (the "Software"). In
+consideration for Freescale allowing you to access the Software, you
+are agreeing to be bound by the terms of this Agreement. If you do not
+agree to all of the terms of this Agreement, do not download the
+Software. If you change your mind later, stop using the Software and
+delete all copies of the Software in your possession or control. Any
+copies of the Software that you have already distributed, where
+permitted, and do not destroy will continue to be governed by this
+Agreement. Your prior use will also continue to be governed by this
+Agreement.
+
+LICENSE GRANT. Freescale grants to you, free of charge, the
+non-exclusive, non-transferable right (1) to reproduce the Software,
+(2) to distribute the Software, and (3) to sublicense to others the
+right to use the distributed Software. The Software is provided to you
+only in object (machine-readable) form. You may exercise the rights
+above only with respect to such object form. You may not translate,
+reverse engineer, decompile, or disassemble the Software except to the
+extent applicable law specifically prohibits such restriction. In
+addition, you must prohibit your sublicensees from doing the same. If
+you violate any of the terms or restrictions of this Agreement,
+Freescale may immediately terminate this Agreement, and require that
+you stop using and delete all copies of the Software in your possession
+or control.
+
+COPYRIGHT. The Software is licensed to you, not sold. Freescale owns
+the Software, and United States copyright laws and international treaty
+provisions protect the Software. Therefore, you must treat the Software
+like any other copyrighted material (e.g. a book or musical
+recording). You may not use or copy the Software for any other purpose
+than what is described in this Agreement. Except as expressly provided
+herein, Freescale does not grant to you any express or implied rights
+under any Freescale or third-party patents, copyrights, trademarks, or
+trade secrets. Additionally, you must reproduce and apply any copyright
+or other proprietary rights notices included on or embedded in the
+Software to any copies or derivative works made thereof, in whole or in
+part, if any.
+
+SUPPORT. Freescale is NOT obligated to provide any support, upgrades
+or new releases of the Software. If you wish, you may contact Freescale
+and report problems and provide suggestions regarding the
+Software. Freescale has no obligation whatsoever to respond in any way
+to such a problem report or suggestion. Freescale may make changes to
+the Software at any time, without any obligation to notify or provide
+updated versions of the Software to you.
+
+NO WARRANTY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, FREESCALE
+EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE. THE SOFTWARE IS
+PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
+IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+NON-INFRINGEMENT. YOU ASSUME THE ENTIRE RISK ARISING OUT OF THE USE OR
+PERFORMANCE OF THE SOFTWARE, OR ANY SYSTEMS YOU DESIGN USING THE
+SOFTWARE (IF ANY). NOTHING IN THIS AGREEMENT MAY BE CONSTRUED AS A
+WARRANTY OR REPRESENTATION BY FREESCALE THAT THE SOFTWARE OR ANY
+DERIVATIVE WORK DEVELOPED WITH OR INCORPORATING THE SOFTWARE WILL BE
+FREE FROM INFRINGEMENT OF THE INTELLECTUAL PROPERTY RIGHTS OF THIRD
+PARTIES.
+
+INDEMNITY. You agree to fully defend and indemnify Freescale from any
+and all claims, liabilities, and costs (including reasonable attorney's
+fees) related to (1) your use (including your sublicensee's use, if
+permitted) of the Software or (2) your violation of the terms and
+conditions of this Agreement.
+
+LIMITATION OF LIABILITY. IN NO EVENT WILL FREESCALE BE LIABLE, WHETHER
+IN CONTRACT, TORT, OR OTHERWISE, FOR ANY INCIDENTAL, SPECIAL, INDIRECT,
+CONSEQUENTIAL OR PUNITIVE DAMAGES, INCLUDING, BUT NOT LIMITED TO,
+DAMAGES FOR ANY LOSS OF USE, LOSS OF TIME, INCONVENIENCE, COMMERCIAL
+LOSS, OR LOST PROFITS, SAVINGS, OR REVENUES TO THE FULL EXTENT SUCH MAY
+BE DISCLAIMED BY LAW.
+
+COMPLIANCE WITH LAWS; EXPORT RESTRICTIONS. This software may be
+subject to the U.S. Export Regulations and/or the regulatory authority
+of the country in which the download takes place. By downloading this
+software you understand and agree to comply with all applicable export
+control regulations when further transferring or exporting the software
+either as downloaded or as integrated into other software or
+commodities.
+
+GOVERNMENT USE. Use of the Software and any corresponding
+documentation, if any, is provided with RESTRICTED RIGHTS. Use,
+duplication or disclosure by the Government is subject to restrictions
+as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data
+and Computer Software clause at DFARS 252.227-7013 or subparagraphs
+(c)(l) and (2) of the Commercial Computer Software--Restricted Rights
+at 48 CFR 52.227-19, as applicable. Manufacturer is Freescale
+Semiconductor, Inc., 6501 William Cannon Drive West, Austin, TX, 78735.
+
+HIGH RISK ACTIVITIES. You acknowledge that the Software is not fault
+tolerant and is not designed, manufactured or intended by Freescale for
+incorporation into products intended for use or resale in on-line
+control equipment in hazardous, dangerous to life or potentially
+life-threatening environments requiring fail-safe performance, such as
+in the operation of nuclear facilities, aircraft navigation or
+communication systems, air traffic control, direct life support
+machines or weapons systems, in which the failure of products could
+lead directly to death, personal injury or severe physical or
+environmental damage ("High Risk Activities"). You specifically
+represent and warrant that you will not use the Software or any
+derivative work of the Software for High Risk Activities.
+
+CHOICE OF LAW; VENUE; LIMITATIONS. You agree that the statutes and
+laws of the United States and the State of Texas, USA, without regard
+to conflicts of laws principles, will apply to all matters relating to
+this Agreement or the Software, and you agree that any litigation will
+be subject to the exclusive jurisdiction of the state or federal courts
+in Texas, USA. You agree that regardless of any statute or law to the
+contrary, any claim or cause of action arising out of or related to
+this Agreement or the Software must be filed within one (1) year after
+such claim or cause of action arose or be forever barred.
+
+PRODUCT LABELING. You are not authorized to use any Freescale
+trademarks, brand names, or logos.
+
+ENTIRE AGREEMENT. This Agreement constitutes the entire agreement
+between you and Freescale regarding the subject matter of this
+Agreement, and supersedes all prior communications, negotiations,
+understandings, agreements or representations, either written or oral,
+if any. This Agreement may only be amended in written form, executed by
+you and Freescale.
+
+SEVERABILITY. If any provision of this Agreement is held for any
+reason to be invalid or unenforceable, then the remaining provisions of
+this Agreement will be unimpaired and, unless a modification or
+replacement of the invalid or unenforceable provision is further held
+to deprive you or Freescale of a material benefit, in which case the
+Agreement will immediately terminate, the invalid or unenforceable
+provision will be replaced with a provision that is valid and
+enforceable and that comes closest to the intention underlying the
+invalid or unenforceable provision.
+
+NO WAIVER. The waiver by Freescale of any breach of any provision of
+this Agreement will not operate or be construed as a waiver of any
+other or a subsequent breach of the same or a different provision.
diff --git a/WHENCE b/WHENCE
index 96142c2..64892f5 100644
--- a/WHENCE
+++ b/WHENCE
@@ -2046,3 +2046,16 @@ Downloaded from http://linuxwireless.org/en/users/Drivers/carl9170
Licence: GPLv2. Some build scripts use the New BSD (3-clause) licence.
--------------------------------------------------------------------------
+
+Driver: imx-sdma -- Freescale i.MX SDMA driver
+
+File: imx/sdma/sdma-imx25.bin
+File: imx/sdma/sdma-imx31.bin
+File: imx/sdma/sdma-imx35.bin
+File: imx/sdma/sdma-imx51.bin
+File: imx/sdma/sdma-imx53.bin
+File: imx/sdma/sdma-imx6q.bin
+
+License: Redistributable. See LICENCE.fsl_firmware for details
+
+--------------------------------------------------------------------------
diff --git a/imx/sdma/sdma-imx25.bin b/imx/sdma/sdma-imx25.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7514e09fea71dc9473121bbe066798d4475ac26f
GIT binary patch
literal 694
zcmZ`#&ubG=5T2dgeTi*}<WLPkO0l@9=2F2^#e?FZAVJ(nl_;`C3h9O{9);%ZUPHuq
z$zcT#1qt-xf8fESn#O~e5`xjPjSx_wB1$1x6xMm03jV->VP?Mfee=He(&tlWB^bpK
zDl?R8lo14YL+Mk9Q&ImHD=~nQ4Ddk#I7e0Ro)Koyd{PC7QH?Qx4eD#uBXJz+JNw+f
z_X25uVd8Ev-;PAtp~Z6j1mDh7;9*@WzPtA2#>eX==7*!;&pv at +y04D&=Y_s3^KSlP
zFX^iJUNd1Icap9|s7feq#OyfDYW_|$WHV=5f1h5fzvg7g4S`}z<c8@AK7z-MyNat^
zR>~~thHxU+FN7pN*EUYk<mYB-5?q>KgqE--%ctctkQ(DkxCU<_&R0=d=`DS>{iRQ~
z5^iIZ!-a#zGRSkU3jO>fOajt5fM@%+wrqL+Wx>mr_puJCHf;v;jjb!Yde{8ESix$1
z-E3u-af(-`239+}lWAoauw%8%s<uO%fz`@dnBXmQ#*vOeO5+uD1I at Z+;8)(xZZ@8}
z1M5CW(_N7GJy=zRB0`EWN1EO%dM0z|w^IlBCA!xUuQP?}D*c3KesgX%itb$FPfw^X
z<6&~d^aW&@s>XB+HQIPI at Q?^Rpl;wU_sp0hw#g5EcOdxxIv5Weya*h4=8r%(axo+q
GP4_1z5*wKS
literal 0
HcmV?d00001
diff --git a/imx/sdma/sdma-imx31.bin b/imx/sdma/sdma-imx31.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7ff9c75f4ca366154b778d677c8af92ce9faecf3
GIT binary patch
literal 3762
zcma)9YitzP6+V0K%<Rif*6SJ@{J>yr20JJfO+^b7S}9Es;KuBFQ(`b#kL$`i&aS9Z
z1*h!H{^*YoV?%yWb>Fy at h&U;tiqwi%)OBg%QClU(PF33!sAE+G;wT`L3W#8P?#w=I
zBGuB&+}V5Q-1B|sJLev|pKkqu35>rQd^F(o7GAc;08Zk>_oy+)a{%drzh5pj-d9%}
z&+pU$bfSUhmgUzS$KU>qzn#D}6}WyJ=YCfO at HAe3s|D!BYX#2#JY%E4d~T at kj_dbX
z%S>fE at 9mvWH7J)lrguL~Ef3D_xzTxhZ`x7 at Y4HLa=I%Z36?mmfXbGBMD)+AlcL_~O
z<xA8*L<ac*?#pS5Y7Wh|Uvf>mOGmFNK)A41po-ah+qEuCy*FIP!3-sGiENh4a*Hg=
z>}|IFS7V2`FxSpChQYEaybpJCw9TiwlvIbd`|jR{sk_e;w6!gKF<|!J>P(lG@#)$N
zJhc8$*=H}KEv|C+SpwU*peSz)0oM^e0{;M$G6cgswK>TJ;=tJ&g>0)=OxqgtZ$5Kt
zQlsjnL~#%&vC7Ls>|UeamxgFPZ2cn0Y?r%Z;R>h#(yvK&If`R8vf+q5tun<u0d|EC
zjEVAtkl}gCr6Ky`y2n7C&Eb(2;CUDE{IdwpGYjyfrA;bue|{t$F@tBRa>dU)Ek>m2
zh%_CMCKn^(BUk*)drjsdSN#SeHfA_Y{ZkSN0;IzG$I{XRwGh#75Yf9~Ag9BL(fO25
z*;i7=eWU#^9fM?M*L{rAeLYHb5wriVyC?Rf(Wi9vd9H$+al?*hm3_7{((G}%hTuHF
zR&($y#;-gm`qpB^o{Sv9y{9;nG6=&Q^XLPQ-M>Z^{dFOLwUPQd!BgKf1YX_}d{Owo
zvqh*@ZGJ}xc2p}<9Ko;Z3%)DG?+AYPN(9x_TjDqOnEfq&(a+w@Fwx%5y&4gHw?h-{
z17O7JAUTHE>LNgvL>zTl{e5>qyao_iq53M7ivdj%)t?YcCT>iHRYBk)5hqD+7=S6B
zsnB7Y3~2Jl)1q7%(lymKKW*$gj=K&Zc0;WnPyZS{cn!V&d#@;)LKDpY;#}!%=YAg<
z<}Gy>0|zPHm{;b1R8jsEF^>ig=?b;V|H5Ccg)B`1-13;EH;Iuof8e5=00-$1p&MY^
zw}ONEvqa%6$Kf)pQif at mBmGusjl4=NkyfglWt=Wm>Met0`G(^#PD$_(&~FY?wsTdl
zQx$tL3Q%vEqF<toaY_|7UlC<qFe at gsA^@BDuX2c^Po1C@sEEfggKyPZEaRLhI0&P=
zhB?}Am-r4-?G1Ib4YRhNciClAttii;b=Yw|*c8o1<rfR0;)zoKWFT7;?sh`!-bGoo
z1+%Cpn&o+zzuZYno%{vf!B67))e33F%FwzjQyILJSFAmas!eK8k3?-!y=v{LQ=Pn%
zKSi>+^m(Q_yd7mYHF+e;RBOwO*w~I^ikWoT(;a0IE$N-~Kr6+)h;k-c36(gLfUi8m
zyk1?a9B_s^g*7lOeOi=tucJmhQ6R1;%R1NBWZg8furTXb#=#CzY4)7QT*Iv9=A)(^
zk1P3H%Vv$eN9Y77QA<NNqqZK4Is{mO;Vu3}LFn8fkdTo%&bD#Poh32$e3=u1%^sG+
z%x+aIn@4{{Z>Q1QOSyPGvmjn;V=M<I1Js|58ML-2EiR*iYtnLz)#g|}R$kzPR{~aP
ziK@wEp$cH{R|7WbF?_d%t_8AO1MsRTv?<28?!|kF+|FszUA4T;@a;YHY;6okb1X5+
zv^1Yuqd3}99r^R+K#cuf=$BIwb-x(KftXzqRG~vaMRJY2GQjr0deY9J6<6u#Wwd_)
z?eEXoe?_-nc!IqXqyDV&#&hQw)9jCp`sjAL&QjRU_WKiZVAPLcex`E*wNs!|jO<O9
zmt=I>-Js6JY~2MqrNVBb=A%w=t<&`|hC1yQc0Y*eI?ar9?r=<lGai8VbVO_?L#6gO
zQ|Sz<^!_518rf(tdl-?wgUC<jkbiptvtpdBHy1>_Cc`YA**-g-0PEv|%c0t3(Z}ih
zmMH7vj9+9p-zn&9i at rM{gYl1WUoj43m2RDN48a9j>yA$b-p}pIc=i_62FCNt at x0cG
z>%tS5tE;ds)G2c>WKP(w7FCnhs9Miz>>a4$G&xPlII9e0WQ4HlP_6e4pJl4U+|KiH
z<D@+o|1fvbo{N8kW8<tfD#XtaYr3F5Xgc$ct`C}Yqo_W-hAea=3*LBE*TF@)yB>f4
zYjoGSNOxZ$AH}-M^YF<FOiedkTGtb**4>Oeh^m(uJgiLUJkSw(3e{JW<v~~9Cp*8N
zKps$OTM`)_^s&K%F=J@(p3X#GgRP1GPlE at Mh3m+|T#kjVMJ&jP;`1B3NA#{alXKbb
z@zq2gKeapQ1?s?z#O`rBo)O!zd(;^a+}J%5>>jC;TKlkj#5;D6c+d4(I`VS~<BS&E
z_P(<?CjEljh9ma0_F?zf2e3bZ-J`F#d;BfpkrP0En#e}gy9m!jVo~>4fQM;&_K{ey
zbJVfuonr<K>N$f(>sx_1w7xq1Zs-|%VI56Fl68)PTkBhyG&)CPoW-aiB7k*QuO;@6
z6;_B7h-L!Oe3(dg_hQfOqhBZj7%S#edlqEv<|NCug}wgf+!-OtPhrJqOCBaimtB-K
z$w#V{qu3E)mnCh*96Z{@`mz97r?9@>)ChRGA0}aa?ZtqX+*U-nJal^OjpSV52$<@#
z|0}R>s_+{=WU9ZX_w_$YzD^E|4VaE4MfrZFcQb0<Nkp_c31lPAe2%t`C3oT3{YEky
zEzhE8jp(R~6}Uc+N$-Qt>6nPiN0uNW!L^kL9Y>o4SAaZ;e%0t$YIQ6GtN$Iu;l#b~
jBnwfn)x{{zWKfV}qOTamX+$xCDBjGVAjcSrJIVh6jpfqk
literal 0
HcmV?d00001
diff --git a/imx/sdma/sdma-imx35.bin b/imx/sdma/sdma-imx35.bin
new file mode 100644
index 0000000000000000000000000000000000000000..cfe72272ae8064c5526aef7ac398dc224cc9f240
GIT binary patch
literal 1746
zcmZ`(U2GIp6h3q3&dj!3+b&RBD_|AfR?tX at Ci0uqm{@~FobI-`bencblVz5!JeauF
zxij%a%NAOat;x&?b`!+#f)Bn)NTAyY6GbeRQlwdGQllm{DrwSSiW$$$bS;TEo3r=c
z at BDo;=bYR2a%(dO{<9XB4Jc<&Hi`g05C8`sSL?3-_Z+DQ7~lbRqR&gXwm$;!Jz|R#
zpc|zQ<s$)LJIWFYL7UGJo5ZygGluqm)L|l&w^2&Co7=@U7q%4^+GjfYsl=X>(h^~p
z)2oeXl-IozhdUuX*Evk9Y1NKgCtn#7o%I*QDUoBx#LtBJ_)>HT6!c3;RK1SqQOMK0
z_?A?`(vrYP#!d*aP3kKK$q2HogmLHNLBt<l#)HaQwMnVh{W#?+ycSRuiDyDAq(=-v
zuGDf7*z=7FFc+DRLTfpDqcGF4#<-G97!}D+Kteouv!_6e`RGYFDmdjK;?$oL^1>JN
zER9eR4kPb}+p}XE+3na6oEQtMKkomt>(|Z!(FugWX*v&!ZL>m<ebqP1^K2?Lesk0i
zQomek)SlKy4GvKO(a_~Otsc)p>cdNtChE84pWDuiO*0_x7!uI#isWM35IF^B3xm|a
zyjgM7kVr*xwol at m<V5!wJUPiGJh`@b0v{b9r+I!mztep)8aNHNpq}Lk_ukFk-!-TA
zH;o1+NQlAiDm4rI=I{DuQ#DWn1oZ$#%{efm@!P)bE2gr`*d%&g(?qYjGaU<ZKNZ=#
zl&F`Kd&XrHP8o(NzzRa%tzdhG?m_)yY7O>VKjoR7*s4{V<%t)yK!D5C5;69?&Ta5D
z&uHsVvuRlqjy0kNcK@XAFkMbH&`-;ln1P_35MvzvhhwWz=ORH52_jOV9u9{1)olQ7
zHA7xC?_o7xH7k-5xJ(COuUQMHz_(KhJ%u}lzds~#>gK{yS5{1UyM?ZqHz)TEbJbkc
z)<MXQZDJQ=_Wl!Njp_h@M4an%9tsK0y7R&=30mveVXU?$l`)1L+a$kl-j!z}=gAdP
zrm7y2MP$-P7|@J42p44=YkUK1oHU)l1<<8O*#KSndc(xoQtinqQj0%l%PMk9AnGpZ
zOY>7wB!s!UE|mGGfnR$;UWzDEnBjY{MKdLJs0Ss=l9-*VoG^3yZeU%8AQ#OGxp-bA
z84{)Obt>!$pdHUhv{oycG`>bZBIfo&3&(7;*{T82vul+|^vU?M_+6T<TEI3_xrQ80
zgaj?Oj+>K*Rx%0JgEHBDRrh5o(^gq_pZIU4zcJHxYg}20()55Rb}x;uM6r9zv==NI
zUy0ISHCsL>=a9>)G}D}V+{~EneEZX at OGM2JQOliYcap2gx#d}Q?<~Ko37b|9Si*hX
zywqOmLW$9g=-xOeRVuUGQxH!<r5x{?fR6WHtK@aw0qg6+2iDa>g!U9VEkE{@veZ6A
zM(W2EJ8_V#XCv$9(i4gKn4M at LlWAKS3D3(@%3Rt`q)8*Ql?^)g6tsrf5HUQT at pL!2
z!zL2f3RkVU^e}J at rH*kuD$%1{=NkS}i;CzmDf5^dv+zbxT(5n2dlZ$sdQTy1mEO0+
ziO2^@Eiw}27M#qHuqdZV7$ZL6acJ~75V at Nyu%c3 at yU{`)-_O9c|1X1}$6(rHP*m=D
Mem;vuWO3d42fN~Kr~m)}
literal 0
HcmV?d00001
diff --git a/imx/sdma/sdma-imx51.bin b/imx/sdma/sdma-imx51.bin
new file mode 100644
index 0000000000000000000000000000000000000000..3569ca052af5ca763bb8aaa9d5a67fcb404c0aff
GIT binary patch
literal 1894
zcmZ`(ZERCj7=G`$AML#z9~%x9!pZ>c3KJNjXmA*bm at JZ_-mV=K!RG3ca%P+P%OUsN
z8`O|x#4RQ>X}dophQx&UQv(T_wGE>`FpQLC!)44^qr at QrX9!wjea~$>N6<F!z2|+-
zdCz&C=bm$d`vQ9f0N}9>V-v>b7~d!W9}s{t{xEgky!~IlubKdMhyeQ~fca`o8L>7Q
z;8Vmh*q6a}ABKwgIUG~Ow~6 at D`A%RB&!PHu+I(@$`<B-$tHT|cE$n7w2o7X?=J$v1
z9=-L(fKqnXL)m{3?g!^&54#kf6Gb-J`|5OCQtmxD-fC^O+mZsJGNR|ko2<2%%e@=M
zU6x|s)PD*d%1kjJV$uatv at Ui(I7B{!aQ3v6l)9urr7h_qb+Ng)ODM-CqEBO1j`=a;
zV=;pYIzY~f;`8Dj2xv@lpM~#WEjvSm6Vp9+ta8t7OL9+;dItMfn1dj;UyaZ8HbNs1
z><5^&%5TkB;_h$bv%P~=tbkS5ECrf;E4_W5dT~{-aPTygj&@{1Y%G#Ld?53>IUq{$
z^0Iol+<Z|kg>#9#@tpNG at vsI`-aSWTa~RIZe3dV!K^jh0M)1BtfKI~B$Yaxf`nY`>
z#`JvftaK=Ioe2_<Q%ScsmmvLl!$VhEe!9vAaQhT+dovEIQW;Tq6?MUtn4b#v4RoT8
z)=|ljXdCrY%wk<Q+lR at A*}q(6{~-LLc`Y#@!lD8QY-ju%Z__Ujctth;)(fwl$ChN4
zjdd1Cza@uZ5<Ki<R8<OJLoTY3rvUZVGW%|_qO=q)AntK+*%A=v{900+TbEQeN>)Yf
zq0HBg)*q5LGR4eH_ku1^KD*$|K7XVX?w9=RxU|~j{tbwl;dTrCYlsqQwrg!)WQ{Fs
zg8lc*io!^Wk8K1A*H<DQ!xwRxcp5?wP}rZiMmuK_Tb0$aTT^_^;+w@s*6o)>T=hw|
z%RDZvH}8aDMO2ZQ+Vhg78GEf$Db0AnQhPeA2Dw50f<#>+D}@U2Pg13j)Le+?>2_OK
zFSbDEkLCr$rs9ntJ1%jjrsC(T7)Lckcq~OZ&b{L?6<1B%^Z1py0v9SMcE5uPuEZ)D
zj- at KjRa9(v#67NK3)_J@S{#4ogQx{hpxW~+YI(-Gjar^UE$xe1h^a(=Px&IPRSmbQ
zzBZ=0rz(1?qNk5x#&ZpGZ885p*Nfd(7hS*NxL(q8bU~LN;#+aOjd_vnPRI39DC#0C
z7vGbXnsf2I(P2du!d8+7qS9S9f9`ai?NzQnoA0Jeq08tu|I5zV;pgXayl)Zbs787G
zi*igwOhrsH{dA_g=D6(anb!1s*)B=TZcNwq=~Cu=mvWysv-QY)n^`>4hquA6A#@tq
zEBa{Kr|-0)a*g>`hw~QaS#$Xpvltq8JmnrLx`+BOE>&GtbPaRO$$77enMze;%6ZOo
zL!iR*qbkpn>B?!Eq^0l>8Cjb{ZO4e0jd+WR31dEzH#$ink*6cRd3}-=@y1G!R+gum
zY~cwA_}CChIyJdOl-y$z#{1c((PCm4gqGUb<Q2=YLbHXIKg?OGAP)$rj$2b{yp1WZ
zI*2#-EPY^W+3SnW)i at FT7+Hgi6ulGA^N3H;6U2uzZge=bIvj`|B at 1kpHraf(!=p<X
b at bQl_@Hh-MjB*CE^e?Bb!s0%%@Q(fiL0+tj
literal 0
HcmV?d00001
diff --git a/imx/sdma/sdma-imx53.bin b/imx/sdma/sdma-imx53.bin
new file mode 100644
index 0000000000000000000000000000000000000000..34933b1a23337d147d8fedacd225ef3e71c8423e
GIT binary patch
literal 1406
zcmZuwPi)&%82|kIY{w4Je^e`IrA450tUxy^hCo%N2 at X5Zft+~R!qP<%MV(heIgyF?
z9Ek&L4Aw(9*pVjXfCLB)E<2S;Yudwn7^i5hx~SSA2oM$9p_+u2L-?NEG_6!yKj(eF
z_ws$epZ$HwcczX@03dJ>@dDyU#3}{&f&jGkxqiYu0Yiy!R0a^(#Pb5b4FJS&UtkG&
zfp(goabMtb<OJIMyLk3vgy2LDaf!Wff%zKMdb)A0k=`;Tdjal(#J`1#vY9PVnO~$Y
z^JDBH9bykoL03*yxIXi?Yvhl+!=90!boH4Dw^!*^u9KW5^QKjEM!lv*2Ww7Xj}@gM
zc^FRo!IH?WIsKp%^n73otU2a3Cs+d+f!(a&<H!lDIXb)VXhqa-!IZ`yR~u>7)8NkR
z6SIBG#<J|KS354A-{YcrD)ModA4MO-Y(Cy2Zzj=;EWEsdUS4;<L@%$Qmm@n~2vajx
zy+meY+r!`C|N4@@di_Arg__axiOeq;iP*r{*og%bM<$Mp#v;vXsQEl<jue072_1dO
zIZa~g)#miq>V<H%HC;bbJG~%vOI>eXfr;uUU&;g at oUD$pOY&v4aklkjkJ1{vsZ44x
zHNfX%J>Y6O=NjRM%s;*V%zEl3xkGfuLgpbdwTR(BH at qvbWCqDI)m0AUcdr$@1x2l&
zU!t9FzCe2MZoPF+A#73`@V_S;gmAH%Mr>Lh_QjUjOxaq3qjqlj7qm1xuTegW6{V-f
z{L<-F?4YYqvMNd`TTw}YSTsAx;A9NX$(&dR+zFp%pDtcjOYg%8iI4adzaP}_+<O|a
zUd)c+yQugF;1m3nhD+8p(BOylM_z5NQ|ZHfD+Ny1u1dQ5sUJA%PNlP0sqC-Voh)DN
zlO>p;*-n;VMt8qMy`3yY%o1s8%?VXFK`GIf5_{xrcw*f$dPwWpqDELnx#3 at fZ<Ix)
zqI8o*dYz`I8ctl(T(P%IWlyh0ojS^&!%iI!C$4Gb@V%}$cYQjz;sp5#H>VQbjo(PO
zj}^spJbWJ6?$f`RUT#{qan{7G6oP!*7P#%ic6h-W$Qrv?!Rg59$QkUAT~D{CO~KBs
zr*HY6EvKllyy!=hwpV$3#$Mt>sQgvd$j)P*{%hfsp?cLEFDJ}#H>b3fzY=Ob96s9<
v_77`V)8$AvEvRPPP9U-&BVq$%BaB6)W2D<UDiu2GX_$(19xO*XpDF(j%k|mP
literal 0
HcmV?d00001
diff --git a/imx/sdma/sdma-imx6q.bin b/imx/sdma/sdma-imx6q.bin
new file mode 100644
index 0000000000000000000000000000000000000000..f3a1cff11ad262d84da8403f8510e44d175815f9
GIT binary patch
literal 1838
zcmZ`(PfQ$T6#wSi`Li<%@=t`&E?}e!7As0qjY>$W9ymZX1H)2eaUI3Nz%F=lTj!fe
zjM3IA9N;jsgk%p*JecaGCI%bJvWLzA4}?%eLOiTdBT*07M7xLeeKWf(By=Wk=DlCu
zpWplDz3G3o?>vJLqH+=>1ab at H3Xjl-7@<5|V7hOrKkU*PJfA&?`L5p6{jB$1@g0r-
zvXJ+KLwGOv#tZ(a5Kn8-+SFD-9)lYE352rgopAQeY<OR0v^lhi81gwvaeI*j>m!%h
zr^s{qWwuHGYY<gLd5(x<uNabg-e|TYwc8NKx{PYBn!Aakf{)~sjaa*tQ`q1}%+Web
zrpecgdVbOS0o#hzA}%4Sjz(oGCKoV@N`O!~j8Z%R7?rJ<sQ(-jOoa9n)F+S!>1>#{
z1hh6 at HeRzTt@^C(bg7HSk93h6^!hkWo`pV|^_f7GZ?7ME at zGwMhhEMZA44yl(91Ii
zy<nXmp0z^5t%V+bcjIdMzqV=-3tjNTq8b|h3M^_%U`q!!MFM~X01<SLGw*Vq0L~uc
zcP+}JrhiIc^zC$R^izJ))%HhsE^Z9XF_lck3)fLsx}B^HJ8xV_x9V4Y*ZAy6zPyUd
z2XAxT0_v+LGyW=M2qGZ@CT;Ss*1z)3z-_#SMO}B1zX93s5Q5lU>pEJIo&JmIdj#Ph
zti1mYGKE at ll`VbqIb02Q{>7g-tal6b_6 at v?F`?Qh$ev=sT<pua0Zj-I;7$~KQV8o4
z0!zlBBJ)UxJwJ30CTJGTD=BV1lHzd!D{LgFqYHlU^AW7n8C^CTdDOhd&%cg(7}9E|
z>{`UTey<5wX^C{eS)}YbG!1X2d0tsU0{UY6zO^w`s`SpWm7G|`p-Q6hp6$f=gGwV%
zDQRc4QkGAS$>NN$kx~|COf(jNZz+ojSv*epDar~qXn at Woqu;l7Evo0GDx7aH1+1sI
zTlNzAj9cbXTqRy+Z?Xd{?`~X9&S?8GcVt$*No^;MFsWzVjms%fIM+;U(`JL2n4`XA
zM0rdq;TwtCIg>s+-Dh#ve$&NdPPq%aMsF_Rr~!@2-I)IXr>F#|bO@!G2$%?%sJCgw
zUE^SGcfxn<_g4p4X?5B5_UtI{;)Xp*nt=DydNwixQ~IX@I|kf&xicA(&l*v#$oq`T
z__X^h?$;lBR*57%)@*{816l}V#6_qrfi1Z<wM4K)t;lmHjQTvDCz2k|`Xv1uP?ovD
zS-jAYfzBpy3t4E)#5dxO+JhZ!A!HS-Ua+iCCQfZfrCJm=$Wh}EA!>~#a|-pHA|EB&
zw0e_OudIHX%*N-?kDT|Pq<)p)Cz(w1e{ga<{H0J|xqEK$q<~npO#236AGonY at crAg
ze@tn0GFduHk0q8Ta1c21au4Q*DL-EB1<i7`D3)|9#LIE~1XK&UtXjxAWUg~F<HZsu
z>h&;A=>n(xF`T|nGV#D$9Y#PsV+7uAH_FQESb8t9{@@zN=w;>W8mf3%aHe;sPnxr6
z2{Ge=OLfNPB<sfsXS!Ob(gT+&jG`s!yVHJieS)c=5k8Y)5L>+{pgjDy5w2eRA5gZD
ASpWb4
literal 0
HcmV?d00001
--
1.7.9.5
^ permalink raw reply related
* [PATCH 10/14] PCI: tegra: Move PCIe driver to drivers/pci/host
From: Andrew Murray @ 2013-01-17 15:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130116183101.GA28660@avionic-0098.adnet.avionic-design.de>
On Wed, Jan 16, 2013 at 06:31:01PM +0000, Thierry Reding wrote:
> Alright, putting the functions into pci_ops doesn't sound like a very
> good idea then. Or perhaps it would make sense for hardware where the
> root complex and the MSI controller are handled by the same driver.
> Basically it could be done as a shortcut and if those are not filled
> in, the drivers could still opt to look up an MSI controller from a
> phandle specified in DT.
>
> Even another alternative would be to keep the functions within the
> struct pci_ops and use generic ones if an external MSI controller is
> used. Just tossing around ideas.
I think an ideal solution would be for additional logic in drivers/msi.c
(e.g. in functions like msi_capability_init) to determine (based on the
passed in pci_dev) which MSI controller ops to use. I'm not sure the best
way to implement an association between an MSI controller and PCI busses
(I believe arch/sparc does something like this - perhaps there will be
inspiration there).
As you've pointed out, most RCs will have their own MSI controllers - so
it should be easy to register and associate both together.
I've submitted my previous work on MSI controller registration, but it
doesn't quite solve this problem - perhaps it can be a starting point?
Andrew Murray
^ permalink raw reply
* [PATCH 2/3] ARM: convert platform hotplug inline assembly to C
From: Nicolas Pitre @ 2013-01-17 15:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <50F8082F.1050906@gmail.com>
On Thu, 17 Jan 2013, Rob Herring wrote:
> On 01/16/2013 10:40 PM, Nicolas Pitre wrote:
> > On Wed, 16 Jan 2013, Rob Herring wrote:
> >
> >> From: Rob Herring <rob.herring@calxeda.com>
> >>
> >> With the addition of set_auxcr/get_auxcr, all the hotplug inline assembly
> >> code for exynos, imx, realview, spear13xx and vexpress can be converted to
> >> C code.
> >
> > That might not be all safe. Please see
> > http://article.gmane.org/gmane.linux.ports.arm.kernel/209584
>
> Other than the OR/AND operations, it's all just inline assembly
> functions that are called, so it gets compiled to the same code. Perhaps
> I should put noinline on the functions so they stay of limited
> complexity. If you don't think doing this in C is okay, then there is
> probably no point in having the set_auxcr/get_auxcr functions.
I think set_auxcr/get_auxcr is fine.
But your patch goes beyond simply converting those. You also converted
the cache flush and disable from assembly to C, which on a Cortex A9
might be unsafe if the stack is modified in the sequence according to
the discussion I referenced.
Nicolas
^ permalink raw reply
* [PATCH 2/2] ARM: use DEBUG_LL infrastructural for multiplatform uncompress debug
From: Shawn Guo @ 2013-01-17 15:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358436119-30808-3-git-send-email-shawn.guo@linaro.org>
Russell,
On Thu, Jan 17, 2013 at 11:21:59PM +0800, Shawn Guo wrote:
> arch/arm/boot/compressed/Makefile | 3 +++
> arch/arm/boot/compressed/debug.S | 3 +++
> arch/arm/include/debug/highbank.S | 3 +++
> arch/arm/include/debug/imx.S | 3 +++
> arch/arm/include/debug/mvebu.S | 3 +++
> arch/arm/include/debug/picoxcell.S | 3 +++
> arch/arm/include/debug/socfpga.S | 3 +++
> arch/arm/include/debug/sunxi.S | 3 +++
> arch/arm/include/debug/tegra.S | 3 +++
> arch/arm/include/debug/uncompress.h | 8 +++++++-
> arch/arm/include/debug/vexpress.S | 3 +++
> arch/arm/include/debug/zynq.S | 3 +++
> 12 files changed, 40 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/compressed/debug.S
>
...
> diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S
> new file mode 100644
> index 0000000..7283d5c
> --- /dev/null
> +++ b/arch/arm/boot/compressed/debug.S
> @@ -0,0 +1,3 @@
> +#define UNCOMPRESS_DEBUG
> +
> +#include "../../kernel/debug.S"
> diff --git a/arch/arm/include/debug/highbank.S b/arch/arm/include/debug/highbank.S
> index 8cad432..13056cf 100644
> --- a/arch/arm/include/debug/highbank.S
> +++ b/arch/arm/include/debug/highbank.S
> @@ -12,6 +12,9 @@
> .macro addruart,rp,rv,tmp
> ldr \rv, =0xfee36000
> ldr \rp, =0xfff36000
> +#ifdef UNCOMPRESS_DEBUG
> + mov \rv, \rp
> +#endif
> .endm
>
Are you fine with patching arch/arm/kernel/debug.S to have
UNCOMPRESS_DEBUG checked, so that we can avoid patching addruart
for all those platforms?
Shawn
^ permalink raw reply
* [PATCH 2/2] ARM: use DEBUG_LL infrastructural for multiplatform uncompress debug
From: Shawn Guo @ 2013-01-17 15:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358436119-30808-1-git-send-email-shawn.guo@linaro.org>
Instead of providing a dummy uncompress.h and losing the uncompress
debug capability completely for multiplatform build, the patch turns
the uncompress debug into part of DEBUG_LL support. Thus, when
DEBUG_LL is turned on for a particular platform, uncompress debug works
too for that platform.
To have the uncompress debug work, what most platforms need is only
a putc() implementation. Meanwhile, DEBUG_LL infrastructural already
has printch() there. We direct putc() call to printch() by creating
arch/arm/boot/compressed/debug.S which simply includes
arch/arm/kernel/debug.S.
However, there is a problem with above approach. DEBUG_LL routines
will check MMU enable bit to decide whether physical or virtual address
should be used to access debug port. In case virtual address needs
to be used, the address returned by addruart will not work for
decompressor who uses a different mapping from what kernel uses.
Fortunately, decompressor uses a flat mapping (same physical and virtual
addresses). So we can easily work it around by asking platform addruart
return physical address as virtual address when it runs in decompressor.
The macro UNCOMPRESS_DEBUG is defined for this use.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/boot/compressed/Makefile | 3 +++
arch/arm/boot/compressed/debug.S | 3 +++
arch/arm/include/debug/highbank.S | 3 +++
arch/arm/include/debug/imx.S | 3 +++
arch/arm/include/debug/mvebu.S | 3 +++
arch/arm/include/debug/picoxcell.S | 3 +++
arch/arm/include/debug/socfpga.S | 3 +++
arch/arm/include/debug/sunxi.S | 3 +++
arch/arm/include/debug/tegra.S | 3 +++
arch/arm/include/debug/uncompress.h | 8 +++++++-
arch/arm/include/debug/vexpress.S | 3 +++
arch/arm/include/debug/zynq.S | 3 +++
12 files changed, 40 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/compressed/debug.S
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5cad8a6..c9865f6 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -24,6 +24,9 @@ endif
AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
OBJS += misc.o decompress.o
+ifeq ($(CONFIG_DEBUG_LL),y)
+OBJS += debug.o
+endif
FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
# string library code (-Os is enforced to keep it much smaller)
diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S
new file mode 100644
index 0000000..7283d5c
--- /dev/null
+++ b/arch/arm/boot/compressed/debug.S
@@ -0,0 +1,3 @@
+#define UNCOMPRESS_DEBUG
+
+#include "../../kernel/debug.S"
diff --git a/arch/arm/include/debug/highbank.S b/arch/arm/include/debug/highbank.S
index 8cad432..13056cf 100644
--- a/arch/arm/include/debug/highbank.S
+++ b/arch/arm/include/debug/highbank.S
@@ -12,6 +12,9 @@
.macro addruart,rp,rv,tmp
ldr \rv, =0xfee36000
ldr \rp, =0xfff36000
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/include/debug/imx.S b/arch/arm/include/debug/imx.S
index 619d8cc..257f160 100644
--- a/arch/arm/include/debug/imx.S
+++ b/arch/arm/include/debug/imx.S
@@ -31,6 +31,9 @@
.macro addruart, rp, rv, tmp
ldr \rp, =UART_PADDR @ physical
ldr \rv, =UART_VADDR @ virtual
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
.macro senduart,rd,rx
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S
index 865c6d0..2024c1c 100644
--- a/arch/arm/include/debug/mvebu.S
+++ b/arch/arm/include/debug/mvebu.S
@@ -19,6 +19,9 @@
ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE
orr \rp, \rp, #0x00012000
orr \rv, \rv, #0x00012000
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#define UART_SHIFT 2
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S
index bc1f07c..0869efc 100644
--- a/arch/arm/include/debug/picoxcell.S
+++ b/arch/arm/include/debug/picoxcell.S
@@ -14,6 +14,9 @@
.macro addruart, rp, rv, tmp
ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
ldr \rp, =PICOXCELL_UART1_BASE
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#include "8250_32.S"
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S
index 966b2f9..0298e12 100644
--- a/arch/arm/include/debug/socfpga.S
+++ b/arch/arm/include/debug/socfpga.S
@@ -15,6 +15,9 @@
orr \rp, \rp, #0x00c00000
orr \rv, \rp, #0xfe000000 @ virtual base
orr \rp, \rp, #0xff000000 @ physical base
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#include "8250_32.S"
diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S
index 04eb56d..5c40a3a 100644
--- a/arch/arm/include/debug/sunxi.S
+++ b/arch/arm/include/debug/sunxi.S
@@ -21,6 +21,9 @@
.macro addruart, rp, rv, tmp
ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE
ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#define UART_SHIFT 2
diff --git a/arch/arm/include/debug/tegra.S b/arch/arm/include/debug/tegra.S
index 883d7c2..789fcb4 100644
--- a/arch/arm/include/debug/tegra.S
+++ b/arch/arm/include/debug/tegra.S
@@ -188,6 +188,9 @@
/* Load previously selected UART address */
100: ldr \rp, [\tmp, #4] @ Load tegra_uart_phys
ldr \rv, [\tmp, #8] @ Load tegra_uart_virt
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
/*
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
index e19955d..b142a84 100644
--- a/arch/arm/include/debug/uncompress.h
+++ b/arch/arm/include/debug/uncompress.h
@@ -1,3 +1,9 @@
-static inline void putc(int c) {}
+#ifdef CONFIG_DEBUG_LL
+extern void printch(int c);
+#else
+static inline void printch(int c) {}
+#endif
+
+static inline void putc(int c) { printch(c); }
static inline void flush(void) {}
static inline void arch_decomp_setup(void) {}
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S
index dc8e882..5015a01 100644
--- a/arch/arm/include/debug/vexpress.S
+++ b/arch/arm/include/debug/vexpress.S
@@ -43,6 +43,9 @@
orrne \rv, \rp, #DEBUG_LL_VIRT_BASE
orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index f9aa974..2795a64 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -35,6 +35,9 @@
.macro addruart, rp, rv, tmp
ldr \rp, =LL_UART_PADDR @ physical
ldr \rv, =LL_UART_VADDR @ virtual
+#ifdef UNCOMPRESS_DEBUG
+ mov \rv, \rp
+#endif
.endm
.macro senduart,rd,rx
--
1.7.9.5
^ permalink raw reply related
* [PATCH 1/2] ARM: use Kconfig to select uncompress.h
From: Shawn Guo @ 2013-01-17 15:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358436119-30808-1-git-send-email-shawn.guo@linaro.org>
Following the approach handling DEBUG_LL inclusion, the patch creates
a Kconfig symbol CONFIG_UNCOMPRESS_INCLUDE for choosing the correct
uncompress header. For traditional build, mach/uncompress.h will be
included in arch/arm/boot/compressed/misc.c. For multiplatform build,
debug/uncompress.h which contains a suite of empty functions will be
used. In this way, a platform with particular uncompress.h
implementation could choose its own uncompress.h with this Kconfig
option.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/Kconfig.debug | 5 +++++
arch/arm/boot/compressed/misc.c | 8 +-------
arch/arm/include/debug/uncompress.h | 3 +++
3 files changed, 9 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/include/debug/uncompress.h
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 05f83c8..86b273f8 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -523,6 +523,11 @@ config DEBUG_LL_INCLUDE
default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
default "mach/debug-macro.S"
+config UNCOMPRESS_INCLUDE
+ string
+ default "debug/uncompress.h" if ARCH_MULTIPLATFORM
+ default "mach/uncompress.h"
+
config EARLY_PRINTK
bool "Early printk"
depends on DEBUG_LL
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index df89983..31bd43b 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -25,13 +25,7 @@ unsigned int __machine_arch_type;
static void putstr(const char *ptr);
extern void error(char *x);
-#ifdef CONFIG_ARCH_MULTIPLATFORM
-static inline void putc(int c) {}
-static inline void flush(void) {}
-static inline void arch_decomp_setup(void) {}
-#else
-#include <mach/uncompress.h>
-#endif
+#include CONFIG_UNCOMPRESS_INCLUDE
#ifdef CONFIG_DEBUG_ICEDCC
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
new file mode 100644
index 0000000..e19955d
--- /dev/null
+++ b/arch/arm/include/debug/uncompress.h
@@ -0,0 +1,3 @@
+static inline void putc(int c) {}
+static inline void flush(void) {}
+static inline void arch_decomp_setup(void) {}
--
1.7.9.5
^ permalink raw reply related
* [PATCH 0/2] Uncompress debug for multiplatform
From: Shawn Guo @ 2013-01-17 15:21 UTC (permalink / raw)
To: linux-arm-kernel
It's not about running single zImage on multiple platforms with
uncompress debug output, but having uncompress debug work for platform
that DEBUG_LL is enabled for. But still it's better than nothing.
Shawn Guo (2):
ARM: use Kconfig to select uncompress.h
ARM: use DEBUG_LL infrastructural for multiplatform uncompress debug
arch/arm/Kconfig.debug | 5 +++++
arch/arm/boot/compressed/Makefile | 3 +++
arch/arm/boot/compressed/debug.S | 3 +++
arch/arm/boot/compressed/misc.c | 8 +-------
arch/arm/include/debug/highbank.S | 3 +++
arch/arm/include/debug/imx.S | 3 +++
arch/arm/include/debug/mvebu.S | 3 +++
arch/arm/include/debug/picoxcell.S | 3 +++
arch/arm/include/debug/socfpga.S | 3 +++
arch/arm/include/debug/sunxi.S | 3 +++
arch/arm/include/debug/tegra.S | 3 +++
arch/arm/include/debug/uncompress.h | 9 +++++++++
arch/arm/include/debug/vexpress.S | 3 +++
arch/arm/include/debug/zynq.S | 3 +++
14 files changed, 48 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/boot/compressed/debug.S
create mode 100644 arch/arm/include/debug/uncompress.h
--
1.7.9.5
^ permalink raw reply
* [PATCH RFC] Provide MSI controller registration mechanism
From: Andrew Murray @ 2013-01-17 15:21 UTC (permalink / raw)
To: linux-arm-kernel
This was my initial attempt at providing an architecture agnostic MSI
controller. Whilst it does not do anything to allow multiple MSI controllers on
a platform as has been recently discussed, it can prevent linker errors when
building multiplatform kernels.
---
Implementing MSI controller support for devices that can be supported across
multiple architectures is made difficult due to the inconsistent handling of
MSIs across the architectures. This would lead to unnecessary conditional code
in an architecture agnostic MSI driver.
At present each MSI supporting architecture implements MSI callbacks
(include/linux/msi.h). In some architectures (arm, mips, tile) the callbacks
are implemented directly for each end user (SoC), e.g.
arch/arm/mach-iop13xx/msi.c, arch/mips/pci/pci-xlr.c, arch/tile/kernel/pci_gx.c.
In these scenarios where multiple MSI controllers exist (e.g. mips) it would be
impossible to produce a kernel image with support for multiple targets due to
multiple implementations of the callbacks (linker errors).
In other architectures (ia64, x86, powerpc) the callbacks are abstracted
through machine vector tables (e.g. arch/ia64/include/asm/machvec.h,
arch/powerpc/include/asm/machdep.h) - this approach allows for a form of
registration for end-users (in the case of powerpc: /platforms/*/*msi.c,
/platforms/powernv/pci.c, /sysdev/fsl_msi.c, /sysdev/*msi.c). Where multiple
controllers exist, run-time warnings may appear or the latest registered wins.
This patch provides for registration of MSI support in a common way. It is
hoped that further development of this mechansim will allow for multiple MSI
controllers serving different PCI domains and/or host-bridges.
In the case of sparc it appears as though the MSI implementation used depends
on the requesting PCI device's host bridge controller. As such multiple MSI
controllers can co-exist and as such sparc will not immediately benefit from
this patch.
This patch preserves the existing arch_ callback mechanism such that MSI support
will not break where this registration mechanism is not used - though it is
hoped that architectures will transition to this new mechanism and the old
callbacks can be deprecated.
The existing mechanism resulted in linker errors when arch_setup_msi_irq /
arch_teardown_msi_irq were not defined or defined multiple times - this no
longer occurs and a WARN is issued instead.
Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
drivers/pci/msi.c | 113 +++++++++++++++++++++++++++++++++++++++++++--------
include/linux/msi.h | 16 +++++++-
2 files changed, 111 insertions(+), 18 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a825d78..352d4fe 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -25,9 +25,21 @@
#include "msi.h"
static int pci_msi_enable = 1;
+static struct msi_controller *ops;
/* Arch hooks */
+static int __arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
+{
+ if (!ops)
+ return arch_msi_check_device(dev, nvec, type);
+
+ if (ops->msi_check_device)
+ return ops->msi_check_device(dev, nvec, type);
+
+ return 0;
+}
+
#ifndef arch_msi_check_device
int arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
{
@@ -35,12 +47,44 @@ int arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
}
#endif
+int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
+{
+ WARN_ON_ONCE(1);
+ return 1;
+}
+
+static int __arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
+{
+ if (!ops)
+ return arch_setup_msi_irq(dev, desc);
+
+ if (ops->setup_msi_irq)
+ return ops->setup_msi_irq(dev, desc);
+
+ WARN_ON_ONCE(1);
+ return 1;
+}
+
+void __weak arch_teardown_msi_irq(unsigned int irq)
+{
+ WARN_ON_ONCE(1);
+}
+
+static void __arch_teardown_msi_irq(unsigned int irq)
+{
+ if (!ops)
+ return arch_teardown_msi_irq(irq);
+
+ if (ops->teardown_msi_irq)
+ return ops->teardown_msi_irq(irq);
+
+ WARN_ON_ONCE(1);
+}
+
#ifndef arch_setup_msi_irqs
# define arch_setup_msi_irqs default_setup_msi_irqs
-# define HAVE_DEFAULT_MSI_SETUP_IRQS
#endif
-#ifdef HAVE_DEFAULT_MSI_SETUP_IRQS
int default_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
struct msi_desc *entry;
@@ -54,7 +98,7 @@ int default_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
return 1;
list_for_each_entry(entry, &dev->msi_list, list) {
- ret = arch_setup_msi_irq(dev, entry);
+ ret = __arch_setup_msi_irq(dev, entry);
if (ret < 0)
return ret;
if (ret > 0)
@@ -63,14 +107,22 @@ int default_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
return 0;
}
-#endif
+
+static int __arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
+{
+ if (!ops)
+ return arch_setup_msi_irqs(dev, nvec, type);
+
+ if (ops->setup_msi_irqs)
+ return ops->setup_msi_irqs(dev, nvec, type);
+
+ return default_setup_msi_irqs(dev, nvec, type);
+}
#ifndef arch_teardown_msi_irqs
# define arch_teardown_msi_irqs default_teardown_msi_irqs
-# define HAVE_DEFAULT_MSI_TEARDOWN_IRQS
#endif
-#ifdef HAVE_DEFAULT_MSI_TEARDOWN_IRQS
void default_teardown_msi_irqs(struct pci_dev *dev)
{
struct msi_desc *entry;
@@ -81,17 +133,25 @@ void default_teardown_msi_irqs(struct pci_dev *dev)
continue;
nvec = 1 << entry->msi_attrib.multiple;
for (i = 0; i < nvec; i++)
- arch_teardown_msi_irq(entry->irq + i);
+ __arch_teardown_msi_irq(entry->irq + i);
}
}
-#endif
+
+static void __arch_teardown_msi_irqs(struct pci_dev *dev)
+{
+ if (!ops)
+ return arch_teardown_msi_irqs(dev);
+
+ if (ops->teardown_msi_irqs)
+ return ops->teardown_msi_irqs(dev);
+
+ default_teardown_msi_irqs(dev);
+}
#ifndef arch_restore_msi_irqs
# define arch_restore_msi_irqs default_restore_msi_irqs
-# define HAVE_DEFAULT_MSI_RESTORE_IRQS
#endif
-#ifdef HAVE_DEFAULT_MSI_RESTORE_IRQS
void default_restore_msi_irqs(struct pci_dev *dev, int irq)
{
struct msi_desc *entry;
@@ -109,7 +169,26 @@ void default_restore_msi_irqs(struct pci_dev *dev, int irq)
if (entry)
write_msi_msg(irq, &entry->msg);
}
-#endif
+
+static void __arch_restore_msi_irqs(struct pci_dev *dev, int irq)
+{
+ if (!ops)
+ return arch_restore_msi_irqs(dev, irq);
+
+ if (ops->restore_msi_irqs)
+ return ops->restore_msi_irqs(dev, irq);
+
+ default_restore_msi_irqs(dev, irq);
+}
+
+int pci_register_msi_controller(struct msi_controller *controller)
+{
+ WARN_ON(ops);
+ ops = controller;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(pci_register_msi_controller);
static void msi_set_enable(struct pci_dev *dev, int pos, int enable)
{
@@ -341,7 +420,7 @@ static void free_msi_irqs(struct pci_dev *dev)
BUG_ON(irq_has_action(entry->irq + i));
}
- arch_teardown_msi_irqs(dev);
+ __arch_teardown_msi_irqs(dev);
list_for_each_entry_safe(entry, tmp, &dev->msi_list, list) {
if (entry->msi_attrib.is_msix) {
@@ -397,7 +476,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev)
pci_intx_for_msi(dev, 0);
msi_set_enable(dev, pos, 0);
- arch_restore_msi_irqs(dev, dev->irq);
+ __arch_restore_msi_irqs(dev, dev->irq);
pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
msi_mask_irq(entry, msi_capable_mask(control), entry->masked);
@@ -425,7 +504,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev)
pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
list_for_each_entry(entry, &dev->msi_list, list) {
- arch_restore_msi_irqs(dev, entry->irq);
+ __arch_restore_msi_irqs(dev, entry->irq);
msix_mask_irq(entry, entry->masked);
}
@@ -576,7 +655,7 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
list_add_tail(&entry->list, &dev->msi_list);
/* Configure MSI capability structure */
- ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI);
+ ret = __arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSI);
if (ret) {
msi_mask_irq(entry, mask, ~mask);
free_msi_irqs(dev);
@@ -696,7 +775,7 @@ static int msix_capability_init(struct pci_dev *dev,
if (ret)
return ret;
- ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
+ ret = __arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
if (ret)
goto error;
@@ -785,7 +864,7 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type)
if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
return -EINVAL;
- ret = arch_msi_check_device(dev, nvec, type);
+ ret = __arch_msi_check_device(dev, nvec, type);
if (ret)
return ret;
diff --git a/include/linux/msi.h b/include/linux/msi.h
index ce93a34..f98c7f0 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -49,14 +49,28 @@ struct msi_desc {
struct kobject kobj;
};
+struct msi_controller {
+ int (*setup_msi_irq)(struct pci_dev *dev, struct msi_desc *desc);
+ void (*teardown_msi_irq)(unsigned int irq);
+ int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type);
+ void (*teardown_msi_irqs)(struct pci_dev *dev);
+ int (*msi_check_device)(struct pci_dev *dev, int nvec, int type);
+ void (*restore_msi_irqs)(struct pci_dev *dev, int irq);
+};
+
+/* Registration of MSI controller operations */
+int pci_register_msi_controller(struct msi_controller *);
+
/*
* The arch hook for setup up msi irqs
+ * These calls are deprecated and pci_register_msi_controller should be used
+ * instead.
*/
int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc);
void arch_teardown_msi_irq(unsigned int irq);
extern int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
extern void arch_teardown_msi_irqs(struct pci_dev *dev);
extern int arch_msi_check_device(struct pci_dev* dev, int nvec, int type);
-
+void arch_restore_msi_irqs(struct pci_dev *dev, int irq);
#endif /* LINUX_MSI_H */
--
1.7.0.4
^ permalink raw reply related
* [PATCH] sdma-imx: Add SDMA firmware for Freescale i.MX SOCs
From: Uwe Kleine-König @ 2013-01-17 15:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5DOEeiRyH6CfpR+q1pnYTOv4JSWgoUoO2x1LCS1UE5SJQ@mail.gmail.com>
On Thu, Jan 17, 2013 at 12:58:41PM -0200, Fabio Estevam wrote:
> Hi Uwe,
>
> On Thu, Jan 17, 2013 at 12:38 PM, Uwe Kleine-K?nig
> <u.kleine-koenig@pengutronix.de> wrote:
>
> >> +LICENSE GRANT.? Freescale grants to you, free of charge, the
> > What is this '?' about?
>
> Thanks for reviewing it.
>
> I don't see this '?' on my original patch.
looking more closely it's not a literal '?', but:
0000790: 6565 6d65 6e74 2e0a 2b0a 2b4c 4943 454e eement..+.+LICEN
00007a0: 5345 2047 5241 4e54 2ea0 2046 7265 6573 SE GRANT.. Frees
^
here ----------------------------------' you have a '\xa0' which is what
my Mutt chose to display as ?. Note in the line above there are also
some '\x0a' which look wrong.
> Could this be a mail issue at your side?
http://article.gmane.org/gmane.linux.ports.arm.kernel/210613 shows it,
too. (At least for me and my browser.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH v7 01/22] mfd: omap-usb-host: Consolidate OMAP USB-HS platform data
From: Alan Stern @ 2013-01-17 15:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358422231-24736-2-git-send-email-rogerq@ti.com>
On Thu, 17 Jan 2013, Roger Quadros wrote:
> Let's have a single platform data structure for the OMAP's High-Speed
> USB host subsystem instead of having 3 separate ones i.e. one for
> board data, one for USB Host (UHH) module and one for USB-TLL module.
>
> This makes the code much simpler and avoids creating multiple copies of
> platform data.
>
> CC: Alan Stern <stern@rowland.harvard.edu>
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
For the ehci-omap.c part:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply
* [PATCH v7 18/22] USB: ehci-omap: Don't free gpios that we didn't request
From: Alan Stern @ 2013-01-17 15:15 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358422231-24736-19-git-send-email-rogerq@ti.com>
On Thu, 17 Jan 2013, Roger Quadros wrote:
> This driver does not request any gpios so don't free them.
> Fixes L3 bus error on multiple modprobe/rmmod of ehci_hcd
> with ehci-omap in use.
>
> CC: Alan Stern <stern@rowland.harvard.edu>
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
> ---
> drivers/usb/host/ehci-omap.c | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> index 134c789..b96a4bf 100644
> --- a/drivers/usb/host/ehci-omap.c
> +++ b/drivers/usb/host/ehci-omap.c
> @@ -288,7 +288,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct usb_hcd *hcd = dev_get_drvdata(dev);
> - struct usbhs_omap_platform_data *pdata = dev->platform_data;
>
> usb_remove_hcd(hcd);
> disable_put_regulator(dev->platform_data);
> @@ -298,13 +297,6 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
> pm_runtime_put_sync(dev);
> pm_runtime_disable(dev);
>
> - if (pdata->phy_reset) {
> - if (gpio_is_valid(pdata->reset_gpio_port[0]))
> - gpio_free(pdata->reset_gpio_port[0]);
> -
> - if (gpio_is_valid(pdata->reset_gpio_port[1]))
> - gpio_free(pdata->reset_gpio_port[1]);
> - }
> return 0;
> }
>
>
^ permalink raw reply
* [PATCH] mmc_select_voltage only if host->ocr_avail_mmc
From: Stefano Stabellini @ 2013-01-17 15:15 UTC (permalink / raw)
To: linux-arm-kernel
On my platform (ARM Versatile Express Cortex A15 emulator)
host->ocr_avail_mmc is 0.
mmc_attach_mmc knows that it could be 0, in fact at the beginning of the
function it checks if host->ocr_avail_mmc is not 0 before setting
host->ocr_avail.
However later on, is going to call mmc_select_voltage regardeless of its
value. If host->ocr_avail_mmc is 0, host->ocr ends up being 0 too, and
we error out.
I admit that I am not terribly familiar with this code, but it seems to
me that we should only call mmc_select_voltage and check the return
value if host->ocr_avail_mmc.
If that is not the right fix please advise.
---
mmc_attach_mmc: only call mmc_select_voltage if host->ocr_avail_mmc
host->ocr_avail_mmc can be 0, in fact mmc_attach_mmc checks if
host->ocr_avail_mmc is not 0 before setting host->ocr_avail.
However later on, is going to call mmc_select_voltage regardeless of its
value. If host->ocr_avail_mmc is 0, host->ocr ends up being 0 too, and
mmc_select_voltage errors out.
This patch fixes that by only calling mmc_select_voltage iff
host->ocr_avail_mmc != 0.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index e6e3911..0edd33b 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1529,14 +1529,15 @@ int mmc_attach_mmc(struct mmc_host *host)
ocr &= ~0x7F;
}
- host->ocr = mmc_select_voltage(host, ocr);
-
- /*
- * Can we support the voltage of the card?
- */
- if (!host->ocr) {
- err = -EINVAL;
- goto err;
+ if (host->ocr_avail_mmc) {
+ host->ocr = mmc_select_voltage(host, ocr);
+ /*
+ * Can we support the voltage of the card?
+ */
+ if (!host->ocr) {
+ err = -EINVAL;
+ goto err;
+ }
}
/*
^ permalink raw reply related
* [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors
From: Subhash Jadavani @ 2013-01-17 14:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130117104741.GY23505@n2100.arm.linux.org.uk>
On 1/17/2013 4:17 PM, Russell King - ARM Linux wrote:
> On Thu, Jan 17, 2013 at 10:37:42AM +0000, Russell King - ARM Linux wrote:
>> On Thu, Jan 17, 2013 at 09:11:20AM +0000, James Bottomley wrote:
>>> I'd actually prefer page = pfn_to_page(page_to_pfn(page) + 1); because
>>> it makes the code look like the hack it is. The preferred form for all
>>> iterators like this should be to iterate over the pfn instead of a
>>> pointer into the page arrays, because that will always work correctly no
>>> matter how many weird and wonderful memory schemes we come up with.
>> So, why don't we update the code to do that then?
> Also, couldn't the addition of the scatterlist offset to the page also
> be buggy too?
>
> So, what about this patch which addresses both additions by keeping our
> iterator as a pfn as you suggest. It also simplifies some of the code
> in the loop too.
>
> Can the original folk with the problem test this patch?
Yes, this patch also fixes the issue. You may add: Tested-by: Subhash
Jadavani <subhashj@codeaurora.org> .
Regards,
Subhash
>
> arch/arm/mm/dma-mapping.c | 18 ++++++++++--------
> 1 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index 6b2fb87..076c26d 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -774,25 +774,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
> size_t size, enum dma_data_direction dir,
> void (*op)(const void *, size_t, int))
> {
> + unsigned long pfn;
> + size_t left = size;
> +
> + pfn = page_to_pfn(page) + offset / PAGE_SIZE;
> + offset %= PAGE_SIZE;
> +
> /*
> * A single sg entry may refer to multiple physically contiguous
> * pages. But we still need to process highmem pages individually.
> * If highmem is not configured then the bulk of this loop gets
> * optimized out.
> */
> - size_t left = size;
> do {
> size_t len = left;
> void *vaddr;
>
> + page = pfn_to_page(pfn);
> +
> if (PageHighMem(page)) {
> - if (len + offset > PAGE_SIZE) {
> - if (offset >= PAGE_SIZE) {
> - page += offset / PAGE_SIZE;
> - offset %= PAGE_SIZE;
> - }
> + if (len + offset > PAGE_SIZE)
> len = PAGE_SIZE - offset;
> - }
> vaddr = kmap_high_get(page);
> if (vaddr) {
> vaddr += offset;
> @@ -809,7 +811,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
> op(vaddr, len, dir);
> }
> offset = 0;
> - page++;
> + pfn++;
> left -= len;
> } while (left);
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] sdma-imx: Add SDMA firmware for Freescale i.MX SOCs
From: Fabio Estevam @ 2013-01-17 14:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130117143856.GI8668@pengutronix.de>
Hi Uwe,
On Thu, Jan 17, 2013 at 12:38 PM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
>> +LICENSE GRANT.? Freescale grants to you, free of charge, the
> What is this '?' about?
Thanks for reviewing it.
I don't see this '?' on my original patch.
Could this be a mail issue at your side?
Regards,
Fabio Estevam
^ permalink raw reply
* [PATCH v6 1/3] usb: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id
From: Fabio Estevam @ 2013-01-17 14:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20727.57269.347099.324284@ipc1.ka-ro>
On Thu, Jan 17, 2013 at 9:25 AM, Lothar Wa?mann <LW@karo-electronics.de> wrote:
> The equivalent of !cpu_is_mx51() would be
> strcmp(pdev->id_entry->name, "imx-udc-mx51") (without the '!') meaning
> id_entry->name is different from "imx-udc-mx51".
Yes, agree.
strcmp(pdev->id_entry->name, "imx-udc-mx51") is also better than
!strcmp(pdev->id_entry->name, "imx-udc-mx27"))
because in the case of another soc entry gets added, let's say
"imx-udc-mxyy" then
!strcmp(pdev->id_entry->name, "imx-udc-mx27")) will not correspond to
!cpu_is_mx51() anymore.
^ permalink raw reply
* [PATCH] sdma-imx: Add SDMA firmware for Freescale i.MX SOCs
From: Uwe Kleine-König @ 2013-01-17 14:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358424987-22312-1-git-send-email-fabio.estevam@freescale.com>
Hello Fabio,
On Thu, Jan 17, 2013 at 10:16:27AM -0200, Fabio Estevam wrote:
> Add SDMA firmware for Freescale i.MX SOCs.
great achievement that this is distributable finally! Thanks for your
effort.
One minor issue below.
> diff --git a/LICENCE.fsl_firmware b/LICENCE.fsl_firmware
> new file mode 100644
> index 0000000..a1fef32
> --- /dev/null
> +++ b/LICENCE.fsl_firmware
> @@ -0,0 +1,140 @@
> +FREESCALE SEMICONDUCTOR SOFTWARE LICENSE AGREEMENT
> +
> +This is a legal agreement between you (either as an individual or as an
> +authorized representative of your employer) and Freescale
> +Semiconductor, Inc. ("Freescale"). It concerns your rights to use this
> +file and any accompanying written materials (the "Software"). In
> +consideration for Freescale allowing you to access the Software, you
> +are agreeing to be bound by the terms of this Agreement. If you do not
> +agree to all of the terms of this Agreement, do not download the
> +Software. If you change your mind later, stop using the Software and
> +delete all copies of the Software in your possession or control. Any
> +copies of the Software that you have already distributed, where
> +permitted, and do not destroy will continue to be governed by this
> +Agreement. Your prior use will also continue to be governed by this
> +Agreement.
> +
> +LICENSE GRANT.? Freescale grants to you, free of charge, the
What is this '?' about?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH] mtd: gpmi: dump the BCH registers
From: Artem Bityutskiy @ 2013-01-17 14:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358147969-31878-1-git-send-email-b32955@freescale.com>
On Mon, 2013-01-14 at 15:19 +0800, Huang Shijie wrote:
> Dump the BCH registers in gpmi_dump_info().
>
> Signed-off-by: Huang Shijie <b32955@freescale.com>
> ---
> drivers/mtd/nand/gpmi-nand/bch-regs.h | 2 ++
> drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 5 +++++
> 2 files changed, 7 insertions(+), 0 deletions(-)
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130117/9caddbc5/attachment.sig>
^ permalink raw reply
* [RFC v2 16/18] ARM: OMAP2+: AM33XX: Basic suspend resume support
From: Peter Korsgaard @ 2013-01-17 14:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1356959231-17335-17-git-send-email-vaibhav.bedia@ti.com>
>>>>> "V" == Vaibhav Bedia <vaibhav.bedia@ti.com> writes:
Hi,
V> +static void am33xx_pm_firmware_cb(const struct firmware *fw, void *context)
V> +{
V> + struct wkup_m3_context *wkup_m3_context = context;
V> + struct platform_device *pdev = to_platform_device(wkup_m3_context->dev);
V> + int ret = 0;
V> +
V> + /* no firmware found */
V> + if (!fw) {
V> + dev_err(wkup_m3_context->dev, "request_firmware failed\n");
V> + goto err;
V> + }
V> +
V> + memcpy((void *)wkup_m3_context->code, fw->data, fw->size);
A size check would be good. I don't know much about the finer details
about the m3 and how it is connected, but don't you need to ensure data
is flushed before resetting the m3?
V> + pr_info("Copied the M3 firmware to UMEM\n");
V> +
V> + wkup_m3->state = M3_STATE_RESET;
V> +
V> + ret = omap_device_deassert_hardreset(pdev, "wkup_m3");
V> + if (ret) {
V> + pr_err("Could not deassert the reset for WKUP_M3\n");
V> + goto err;
V> + } else {
V> +#ifdef CONFIG_SUSPEND
V> + suspend_set_ops(&am33xx_pm_ops);
V> + /*
V> + * Physical resume address to be used by ROM code
V> + */
V> + wkup_m3->ipc_data.resume_addr = (AM33XX_OCMC_END -
V> + am33xx_do_wfi_sz + am33xx_resume_offset + 0x4);
V> +#endif
V> + return;
V> + }
V> +
V> +err:
V> + mailbox_put(wkup_m3_context->mbox, &wkup_mbox_notifier);
V> +}
--
Bye, Peter Korsgaard
^ permalink raw reply
* [PATCH] ARM: dts: imx6q: Remove silicon version from SDMA firmware
From: Shawn Guo @ 2013-01-17 14:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358432005-17990-1-git-send-email-fabio.estevam@freescale.com>
On Thu, Jan 17, 2013 at 12:13:25PM -0200, Fabio Estevam wrote:
> Remove silicon version from SDMA firmware.
>
> This makes it consistent with other i.MX SoCs firmware names.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied, thanks.
> ---
> arch/arm/boot/dts/imx6q.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
> index d6265ca..1acf41a 100644
> --- a/arch/arm/boot/dts/imx6q.dtsi
> +++ b/arch/arm/boot/dts/imx6q.dtsi
> @@ -797,7 +797,7 @@
> interrupts = <0 2 0x04>;
> clocks = <&clks 155>, <&clks 155>;
> clock-names = "ipg", "ahb";
> - fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q-to1.bin";
> + fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
> };
> };
>
> --
> 1.7.9.5
>
>
^ permalink raw reply
* [PATCH 2/3] ARM: convert platform hotplug inline assembly to C
From: Rob Herring @ 2013-01-17 14:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.02.1301162338420.6300@xanadu.home>
On 01/16/2013 10:40 PM, Nicolas Pitre wrote:
> On Wed, 16 Jan 2013, Rob Herring wrote:
>
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> With the addition of set_auxcr/get_auxcr, all the hotplug inline assembly
>> code for exynos, imx, realview, spear13xx and vexpress can be converted to
>> C code.
>
> That might not be all safe. Please see
> http://article.gmane.org/gmane.linux.ports.arm.kernel/209584
Other than the OR/AND operations, it's all just inline assembly
functions that are called, so it gets compiled to the same code. Perhaps
I should put noinline on the functions so they stay of limited
complexity. If you don't think doing this in C is okay, then there is
probably no point in having the set_auxcr/get_auxcr functions.
Alternatively, we could create common enter/exit coherency functions.
Rob
>
>
>>
>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>> Cc: Kukjin Kim <kgene.kim@samsung.com>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: Sascha Hauer <kernel@pengutronix.de>
>> Cc: Viresh Kumar <viresh.linux@gmail.com>
>> Cc: Shiraz Hashim <shiraz.hashim@st.com>
>> ---
>> arch/arm/mach-exynos/hotplug.c | 57 ++++++-------------------------------
>> arch/arm/mach-imx/hotplug.c | 19 ++++---------
>> arch/arm/mach-realview/hotplug.c | 32 +++++----------------
>> arch/arm/mach-spear13xx/hotplug.c | 32 +++++----------------
>> arch/arm/mach-vexpress/hotplug.c | 33 +++++----------------
>> 5 files changed, 35 insertions(+), 138 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
>> index c3f825b..5548fa3 100644
>> --- a/arch/arm/mach-exynos/hotplug.c
>> +++ b/arch/arm/mach-exynos/hotplug.c
>> @@ -26,69 +26,30 @@
>>
>> static inline void cpu_enter_lowpower_a9(void)
>> {
>> - unsigned int v;
>> -
>> flush_cache_all();
>> - asm volatile(
>> - " mcr p15, 0, %1, c7, c5, 0\n"
>> - " mcr p15, 0, %1, c7, c10, 4\n"
>> + __flush_icache_all();
>> + dsb();
>> +
>> /*
>> * Turn off coherency
>> */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, %3\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "r" (0), "Ir" (CR_C), "Ir" (0x40)
>> - : "cc");
>> + set_auxcr(get_auxcr() & ~0x40);
>> + set_cr(get_cr() & ~CR_C);
>> }
>>
>> static inline void cpu_enter_lowpower_a15(void)
>> {
>> - unsigned int v;
>> -
>> - asm volatile(
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "Ir" (CR_C)
>> - : "cc");
>> -
>> + set_cr(get_cr() & ~CR_C);
>> flush_cache_louis();
>> + set_auxcr(get_auxcr() & ~0x40);
>>
>> - asm volatile(
>> - /*
>> - * Turn off coherency
>> - */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - : "=&r" (v)
>> - : "Ir" (0x40)
>> - : "cc");
>> -
>> - isb();
>> dsb();
>> }
>>
>> static inline void cpu_leave_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> - asm volatile(
>> - "mrc p15, 0, %0, c1, c0, 0\n"
>> - " orr %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " orr %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - : "=&r" (v)
>> - : "Ir" (CR_C), "Ir" (0x40)
>> - : "cc");
>> + set_cr(get_cr() | CR_C);
>> + set_auxcr(get_auxcr() | 0x40);
>> }
>>
>> static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>> diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
>> index 3dec962..1470c75 100644
>> --- a/arch/arm/mach-imx/hotplug.c
>> +++ b/arch/arm/mach-imx/hotplug.c
>> @@ -18,24 +18,15 @@
>>
>> static inline void cpu_enter_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> flush_cache_all();
>> - asm volatile(
>> - "mcr p15, 0, %1, c7, c5, 0\n"
>> - " mcr p15, 0, %1, c7, c10, 4\n"
>> + __flush_icache_all();
>> + dsb();
>> +
>> /*
>> * Turn off coherency
>> */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, %3\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "r" (0), "Ir" (CR_C), "Ir" (0x40)
>> - : "cc");
>> + set_auxcr(get_auxcr() & ~0x40);
>> + set_cr(get_cr() & ~CR_C);
>> }
>>
>> /*
>> diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
>> index 53818e5..c17c8c0 100644
>> --- a/arch/arm/mach-realview/hotplug.c
>> +++ b/arch/arm/mach-realview/hotplug.c
>> @@ -18,39 +18,21 @@
>>
>> static inline void cpu_enter_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> flush_cache_all();
>> - asm volatile(
>> - " mcr p15, 0, %1, c7, c5, 0\n"
>> - " mcr p15, 0, %1, c7, c10, 4\n"
>> + __flush_icache_all();
>> + dsb();
>> +
>> /*
>> * Turn off coherency
>> */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, #0x20\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "r" (0), "Ir" (CR_C)
>> - : "cc");
>> + set_auxcr(get_auxcr() & ~0x40);
>> + set_cr(get_cr() & ~CR_C);
>> }
>>
>> static inline void cpu_leave_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> - asm volatile( "mrc p15, 0, %0, c1, c0, 0\n"
>> - " orr %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " orr %0, %0, #0x20\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - : "=&r" (v)
>> - : "Ir" (CR_C)
>> - : "cc");
>> + set_cr(get_cr() | CR_C);
>> + set_auxcr(get_auxcr() | 0x40);
>> }
>>
>> static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>> diff --git a/arch/arm/mach-spear13xx/hotplug.c b/arch/arm/mach-spear13xx/hotplug.c
>> index a7d2dd1..a38a087 100644
>> --- a/arch/arm/mach-spear13xx/hotplug.c
>> +++ b/arch/arm/mach-spear13xx/hotplug.c
>> @@ -19,39 +19,21 @@
>>
>> static inline void cpu_enter_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> flush_cache_all();
>> - asm volatile(
>> - " mcr p15, 0, %1, c7, c5, 0\n"
>> - " dsb\n"
>> + __flush_icache_all();
>> + dsb();
>> +
>> /*
>> * Turn off coherency
>> */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, #0x20\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "r" (0), "Ir" (CR_C)
>> - : "cc", "memory");
>> + set_auxcr(get_auxcr() & ~0x40);
>> + set_cr(get_cr() & ~CR_C);
>> }
>>
>> static inline void cpu_leave_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> - asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
>> - " orr %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " orr %0, %0, #0x20\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - : "=&r" (v)
>> - : "Ir" (CR_C)
>> - : "cc");
>> + set_cr(get_cr() | CR_C);
>> + set_auxcr(get_auxcr() | 0x40);
>> }
>>
>> static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious)
>> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
>> index a141b98..74a9eb5 100644
>> --- a/arch/arm/mach-vexpress/hotplug.c
>> +++ b/arch/arm/mach-vexpress/hotplug.c
>> @@ -18,40 +18,21 @@
>>
>> static inline void cpu_enter_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> flush_cache_all();
>> - asm volatile(
>> - "mcr p15, 0, %1, c7, c5, 0\n"
>> - " mcr p15, 0, %1, c7, c10, 4\n"
>> + __flush_icache_all();
>> + dsb();
>> +
>> /*
>> * Turn off coherency
>> */
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " bic %0, %0, %3\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - " mrc p15, 0, %0, c1, c0, 0\n"
>> - " bic %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - : "=&r" (v)
>> - : "r" (0), "Ir" (CR_C), "Ir" (0x40)
>> - : "cc");
>> + set_auxcr(get_auxcr() & ~0x40);
>> + set_cr(get_cr() & ~CR_C);
>> }
>>
>> static inline void cpu_leave_lowpower(void)
>> {
>> - unsigned int v;
>> -
>> - asm volatile(
>> - "mrc p15, 0, %0, c1, c0, 0\n"
>> - " orr %0, %0, %1\n"
>> - " mcr p15, 0, %0, c1, c0, 0\n"
>> - " mrc p15, 0, %0, c1, c0, 1\n"
>> - " orr %0, %0, %2\n"
>> - " mcr p15, 0, %0, c1, c0, 1\n"
>> - : "=&r" (v)
>> - : "Ir" (CR_C), "Ir" (0x40)
>> - : "cc");
>> + set_cr(get_cr() | CR_C);
>> + set_auxcr(get_auxcr() | 0x40);
>> }
>>
>> static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>> --
>> 1.7.10.4
>>
^ permalink raw reply
* [PATCH] ARM: remove unnecessary 'select GENERIC_GPIO'
From: Shawn Guo @ 2013-01-17 14:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACRpkdYw6V_GGjBsj_bzzkmFVTamuMq2oMwYDKhjMrXeS5j+fQ@mail.gmail.com>
On Thu, Jan 17, 2013 at 02:36:00PM +0100, Linus Walleij wrote:
> On Tue, Jan 15, 2013 at 2:13 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
>
> > The only use of GENERIC_GPIO (defined by architecture) in GPIO subsystem
> > is being selected by GPIOLIB. Also there are no any use of the option
> > at architecture level. Only two sub-architectures shmobile and orion
> > really use the option as below.
> >
> > arch/arm/mach-shmobile/Makefile:obj-$(CONFIG_GENERIC_GPIO) += $(pfc-y)
> > arch/arm/plat-orion/Makefile:orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o
> >
> > Remove all those unnecessary sub-architecture level selection of
> > GENERIC_GPIO, which are there only for confusing people.
> >
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
Thanks, Linus.
Arnd, Olof,
Can you please take a look at the patch, and apply it as a cleanup
if it looks good to you?
Shawn
^ permalink raw reply
* [PATCH 1/2] gpio: fix warning of 'struct gpio_chip' declaration
From: Shawn Guo @ 2013-01-17 14:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACRpkdaKhLcS9p9JOhViCkUcMVH1ByBR3v5A4+wOJnQUcuQrVg@mail.gmail.com>
On Thu, Jan 17, 2013 at 02:30:01PM +0100, Linus Walleij wrote:
> Shawn can you please try to repost this with something that does not
> turn into quoted-printable? Look:
>
Sorry for that. Just resent it.
> MIME-Version: 1.0
> Content-Type: text/plain; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
> (...)
> @@ -212,6 +212,43 @@ extern void gpio_unexport(unsigned gpio);
> =20
> #endif /* CONFIG_GPIO_SYSFS */
> =20
> +#ifdef CONFIG_PINCTRL
>
> I can't apply that.
>
> Second: if this is not an immediate regression I'd prefer to put it
> for-next now, as touching this file always brings down something.
>
> OK?
>
The warning the first patch tries to fix seems new to v3.8-rc, while
the second patch is definitely fine for -next.
Since I do not care much about the warning seen on blackfin, I'm fine
with both of them being for -next.
Shawn
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox