Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: tegra: don't treat NULL clk as an error
From: Grant Likely @ 2011-01-10 23:43 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110110233033.GG12552@n2100.arm.linux.org.uk>

On Mon, Jan 10, 2011 at 11:30:33PM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 10, 2011 at 04:24:17PM -0700, Grant Likely wrote:
> > I was actually looking at the implementation of clk_enable() which is
> > called by the driver and doesn't do any NULL checking.  But I suppose
> > that it then becomes the clock-code's own fault if it returns NULL and
> > then oopses on a NULL being passed to it.  Okay, I'll apply it.
> 
> Yes absolutely.  The clk API must eat whatever cookies it produces,
> even if they contain dead flies rather than currants. ;)

nice analogy.  :-)

g.

^ permalink raw reply

* [PATCH 4/5 v2] ARM: pxa: Fix suspend/resume array index miscalculation
From: Eric Miao @ 2011-01-10 23:41 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294699993-4712-4-git-send-email-marek.vasut@gmail.com>

On Mon, Jan 10, 2011 at 4:53 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> v2: Fix loop condition as proposed by Sergei
>
> ?arch/arm/mach-pxa/irq.c | ? ?8 ++++----
> ?1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
> index 78f0e0c..a7deff5 100644
> --- a/arch/arm/mach-pxa/irq.c
> +++ b/arch/arm/mach-pxa/irq.c
> @@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i)
> ? ? ? ? ? ? ? ?0x40d00130,
> ? ? ? ?};
>
> - ? ? ? return (void __iomem *)io_p2v(phys_base[i >> 5]);
> + ? ? ? return (void __iomem *)io_p2v(phys_base[i]);
> ?}
>
> ?void __init pxa_init_irq(int irq_nr, set_wake_t fn)
> @@ -168,7 +168,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
> ? ? ? ?pxa_internal_irq_nr = irq_nr;
>
> ? ? ? ?for (n = 0; n < irq_nr; n += 32) {
> - ? ? ? ? ? ? ? void __iomem *base = irq_base(n);
> + ? ? ? ? ? ? ? void __iomem *base = irq_base(n >> 5);
>
> ? ? ? ? ? ? ? ?__raw_writel(0, base + ICMR); ? /* disable all IRQs */
> ? ? ? ? ? ? ? ?__raw_writel(0, base + ICLR); ? /* all IRQs are IRQ, not FIQ */
> @@ -200,7 +200,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
> ?{
> ? ? ? ?int i;
>
> - ? ? ? for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> + ? ? ? for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
> ? ? ? ? ? ? ? ?void __iomem *base = irq_base(i);

I prefer it to be IRQ number based instead of IRQ bank based,
in other word, I'd rather to change the statement below:

>
> ? ? ? ? ? ? ? ?saved_icmr[i] = __raw_readl(base + ICMR);

to something:

saved_icmr[i / 32] = __raw_read(base + ICMR);

> @@ -219,7 +219,7 @@ static int pxa_irq_resume(struct sys_device *dev)
> ?{
> ? ? ? ?int i;
>
> - ? ? ? for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> + ? ? ? for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
> ? ? ? ? ? ? ? ?void __iomem *base = irq_base(i);
>
> ? ? ? ? ? ? ? ?__raw_writel(saved_icmr[i], base + ICMR);
> --
> 1.7.2.3
>
>

^ permalink raw reply

* [PATCH] spi: tegra: don't treat NULL clk as an error
From: Russell King - ARM Linux @ 2011-01-10 23:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <AANLkTinOWvu5TNMtsrw19-ERc1JpopvQkyp0QH3sQpkL@mail.gmail.com>

On Mon, Jan 10, 2011 at 04:24:17PM -0700, Grant Likely wrote:
> I was actually looking at the implementation of clk_enable() which is
> called by the driver and doesn't do any NULL checking.  But I suppose
> that it then becomes the clock-code's own fault if it returns NULL and
> then oopses on a NULL being passed to it.  Okay, I'll apply it.

Yes absolutely.  The clk API must eat whatever cookies it produces,
even if they contain dead flies rather than currants. ;)

^ permalink raw reply

* [PATCH 4/4] ARM: support for Thumb-2 instructions with CONFIG_ARM_PATCH_PHYS_VIRT
From: Russell King - ARM Linux @ 2011-01-10 23:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.00.1101101740280.9794@xanadu.home>

On Mon, Jan 10, 2011 at 05:45:44PM -0500, Nicolas Pitre wrote:
> I need to rework this part entirely now anyway to go on top of Russell's 
> latest version.

I've made a few changes recently to it to fix a few quirks.  Once the
merge window is over, I'll push out new patches and tree.  Until then
it wouldn't be fair on SFR/linux-next to push new code stuff out during
the merge window.

^ permalink raw reply

* [PATCH] spi: tegra: don't treat NULL clk as an error
From: Grant Likely @ 2011-01-10 23:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110110222524.GE12552@n2100.arm.linux.org.uk>

On Mon, Jan 10, 2011 at 3:25 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Jan 10, 2011 at 10:18:02PM +0000, Russell King - ARM Linux wrote:
>> On Mon, Jan 10, 2011 at 01:58:12PM -0700, Grant Likely wrote:
>> > On Mon, Jan 10, 2011 at 4:05 AM, Jamie Iles <jamie@jamieiles.com> wrote:
>> > > Some platforms have been known to return NULL from clk_get() if they
>> > > support only a single struct clk. ?Whilst tegra doesn't do this, make
>> > > the drivers consistent with others.
>> > >
>> > > Cc: Erik Gilling <konkers@android.com>
>> > > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
>> >
>> > Hi James,
>> >
>> > If NULL does get returned, say due to a future change to the clock
>> > code, then this change causes the driver to oops. ?I'm not going to
>> > apply this patch.
>>
>> Please apply it - the clock API just defines struct clk as a cookie
>> where errors are IS_ERR/PTR_ERR. ?Other values must be considered by
>> drivers as perfectly valid, including NULL.
>
> Also note that drivers have no business ever dereferencing struct clks.
> So if they oops, that's their own fault for dereferencing something
> that they shouldn't.

I was actually looking at the implementation of clk_enable() which is
called by the driver and doesn't do any NULL checking.  But I suppose
that it then becomes the clock-code's own fault if it returns NULL and
then oopses on a NULL being passed to it.  Okay, I'll apply it.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* [PATCH 4/5] ARM: pxa: Fix suspend/resume array index miscalculation
From: Marek Vasut @ 2011-01-10 23:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <AANLkTi=fdTkrdysefE-Wnv0UXN1Wa9j61opAT-GGGwsh@mail.gmail.com>

On Monday 10 January 2011 23:49:07 Eric Miao wrote:
> On Sun, Jan 9, 2011 at 5:29 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> >  arch/arm/mach-pxa/irq.c |   10 +++++-----
> >  1 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
> > index 78f0e0c..81edf97 100644
> > --- a/arch/arm/mach-pxa/irq.c
> > +++ b/arch/arm/mach-pxa/irq.c
> > @@ -194,14 +194,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
> > 
> >  #ifdef CONFIG_PM
> >  static unsigned long saved_icmr[MAX_INTERNAL_IRQS/32];
> > -static unsigned long saved_ipr[MAX_INTERNAL_IRQS];
> > +static unsigned long saved_ipr[MAX_INTERNAL_IRQS/32];
> 
> This isn't right I'm afraid. Unlike other IRQ registers, each interrupt
> line has its own IPR register. So the changes below are also invalid.

You're right, stupid me ... I just noticed it too (unlike your email). Can you 
check v2 please ?

Cheers
> 
> >  static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
> >  {
> >        int i;
> > 
> > -       for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> > -               void __iomem *base = irq_base(i);
> > +       for (i = 0; i < pxa_internal_irq_nr; i++) {
> > +               void __iomem *base = irq_base(i << 5);
> > 
> >                saved_icmr[i] = __raw_readl(base + ICMR);
> >                __raw_writel(0, base + ICMR);
> > @@ -219,8 +219,8 @@ static int pxa_irq_resume(struct sys_device *dev)
> >  {
> >        int i;
> > 
> > -       for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> > -               void __iomem *base = irq_base(i);
> > +       for (i = 0; i < pxa_internal_irq_nr; i++) {
> > +               void __iomem *base = irq_base(i << 5);
> > 
> >                __raw_writel(saved_icmr[i], base + ICMR);
> >                __raw_writel(0, base + ICLR);
> > --
> > 1.7.2.3

^ permalink raw reply

* [PATCH 5/5 v2] ARM: pxa: Fix recursive call of pxa_(un)mask_low_gpio()
From: Marek Vasut @ 2011-01-10 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294699993-4712-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
v2: Remove dead code as proposed by Sergei

 arch/arm/mach-pxa/irq.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index a7deff5..76e69cf 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -110,16 +110,12 @@ static void pxa_ack_low_gpio(unsigned int irq)
 
 static void pxa_mask_low_gpio(unsigned int irq)
 {
-	struct irq_desc *desc = irq_to_desc(irq);
-
-	desc->chip->mask(irq);
+	pxa_mask_irq(irq);
 }
 
 static void pxa_unmask_low_gpio(unsigned int irq)
 {
-	struct irq_desc *desc = irq_to_desc(irq);
-
-	desc->chip->unmask(irq);
+	pxa_unmask_irq(irq);
 }
 
 static struct irq_chip pxa_low_gpio_chip = {
-- 
1.7.2.3

^ permalink raw reply related

* [PATCH 4/5 v2] ARM: pxa: Fix suspend/resume array index miscalculation
From: Marek Vasut @ 2011-01-10 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294699993-4712-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
v2: Fix loop condition as proposed by Sergei

 arch/arm/mach-pxa/irq.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 78f0e0c..a7deff5 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i)
 		0x40d00130,
 	};
 
-	return (void __iomem *)io_p2v(phys_base[i >> 5]);
+	return (void __iomem *)io_p2v(phys_base[i]);
 }
 
 void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -168,7 +168,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 	pxa_internal_irq_nr = irq_nr;
 
 	for (n = 0; n < irq_nr; n += 32) {
-		void __iomem *base = irq_base(n);
+		void __iomem *base = irq_base(n >> 5);
 
 		__raw_writel(0, base + ICMR);	/* disable all IRQs */
 		__raw_writel(0, base + ICLR);	/* all IRQs are IRQ, not FIQ */
@@ -200,7 +200,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
 {
 	int i;
 
-	for (i = 0; i < pxa_internal_irq_nr; i += 32) {
+	for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
 		void __iomem *base = irq_base(i);
 
 		saved_icmr[i] = __raw_readl(base + ICMR);
@@ -219,7 +219,7 @@ static int pxa_irq_resume(struct sys_device *dev)
 {
 	int i;
 
-	for (i = 0; i < pxa_internal_irq_nr; i += 32) {
+	for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
 		void __iomem *base = irq_base(i);
 
 		__raw_writel(saved_icmr[i], base + ICMR);
-- 
1.7.2.3

^ permalink raw reply related

* [PATCH 3/5 resend] ARM: pxa: Use cpu_has_ipr() consistently in irq.c
From: Marek Vasut @ 2011-01-10 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294699993-4712-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 54e91c9..78f0e0c 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -226,7 +226,7 @@ static int pxa_irq_resume(struct sys_device *dev)
 		__raw_writel(0, base + ICLR);
 	}
 
-	if (!cpu_is_pxa25x())
+	if (cpu_has_ipr())
 		for (i = 0; i < pxa_internal_irq_nr; i++)
 			__raw_writel(saved_ipr[i], IRQ_BASE + IPR(i));
 
-- 
1.7.2.3

^ permalink raw reply related

* [PATCH 2/5 resend] pxa: Remove unused variable in clock-pxa3xx.c
From: Marek Vasut @ 2011-01-10 22:53 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294699993-4712-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/clock-pxa3xx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c
index 1b08a34..3f864cd 100644
--- a/arch/arm/mach-pxa/clock-pxa3xx.c
+++ b/arch/arm/mach-pxa/clock-pxa3xx.c
@@ -115,7 +115,6 @@ static unsigned long clk_pxa3xx_smemc_getrate(struct clk *clk)
 {
 	unsigned long acsr = ACSR;
 	unsigned long memclkcfg = __raw_readl(MEMCLKCFG);
-	unsigned int smcfs = (acsr >> 23) & 0x7;
 
 	return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] /
 			df_clkdiv[(memclkcfg >> 16) & 0x3];
-- 
1.7.2.3

^ permalink raw reply related

* [PATCH 1/5 resend] pxa: Fix warning in zeus.c
From: Marek Vasut @ 2011-01-10 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/zeus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index c87f2b3..29830a3 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -830,8 +830,8 @@ static void __init zeus_init(void)
 	pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
 
 	/* Fix timings for dm9000s (CS1/CS2)*/
-	msc0 = __raw_readl(MSC0) & 0x0000ffff | (dm9000_msc << 16);
-	msc1 = __raw_readl(MSC1) & 0xffff0000 | dm9000_msc;
+	msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16);
+	msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc;
 	__raw_writel(msc0, MSC0);
 	__raw_writel(msc1, MSC1);
 
-- 
1.7.2.3

^ permalink raw reply related

* [GIT PULL] ux500-core leftovers
From: Linus Torvalds @ 2011-01-10 22:52 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <AANLkTimHzjRLxGLabXgh7bvoD+f9jOC8CRS0YFeKzMDz@mail.gmail.com>

On Mon, Jan 10, 2011 at 10:00 AM, Linus Walleij
<linus.walleij@stericsson.com> wrote:
> Linus, could you please pull:
>
> ? ? ?git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
> for-torvalds
>
> This is based on commit 0c21e3a and contains
> the following patches that couldn't be merged through
> Russell's ARM tree due to cross-branch dependencies
> now sorted out in your tree:

Please do also include a diffstat ("git diff -M --stat --summary
origin...") with the pull, so that I see what I'm pulling before I
pull, and to make it easier to verify that I'm getting what you
intend.

I pulled, but next time I might not.

              Linus

^ permalink raw reply

* [PATCH 4/5] ARM: pxa: Fix suspend/resume array index miscalculation
From: Eric Miao @ 2011-01-10 22:49 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294615746-27668-4-git-send-email-marek.vasut@gmail.com>

On Sun, Jan 9, 2011 at 5:29 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> ?arch/arm/mach-pxa/irq.c | ? 10 +++++-----
> ?1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
> index 78f0e0c..81edf97 100644
> --- a/arch/arm/mach-pxa/irq.c
> +++ b/arch/arm/mach-pxa/irq.c
> @@ -194,14 +194,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
>
> ?#ifdef CONFIG_PM
> ?static unsigned long saved_icmr[MAX_INTERNAL_IRQS/32];
> -static unsigned long saved_ipr[MAX_INTERNAL_IRQS];
> +static unsigned long saved_ipr[MAX_INTERNAL_IRQS/32];
>

This isn't right I'm afraid. Unlike other IRQ registers, each interrupt
line has its own IPR register. So the changes below are also invalid.

> ?static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
> ?{
> ? ? ? ?int i;
>
> - ? ? ? for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> - ? ? ? ? ? ? ? void __iomem *base = irq_base(i);
> + ? ? ? for (i = 0; i < pxa_internal_irq_nr; i++) {
> + ? ? ? ? ? ? ? void __iomem *base = irq_base(i << 5);
>
> ? ? ? ? ? ? ? ?saved_icmr[i] = __raw_readl(base + ICMR);
> ? ? ? ? ? ? ? ?__raw_writel(0, base + ICMR);
> @@ -219,8 +219,8 @@ static int pxa_irq_resume(struct sys_device *dev)
> ?{
> ? ? ? ?int i;
>
> - ? ? ? for (i = 0; i < pxa_internal_irq_nr; i += 32) {
> - ? ? ? ? ? ? ? void __iomem *base = irq_base(i);
> + ? ? ? for (i = 0; i < pxa_internal_irq_nr; i++) {
> + ? ? ? ? ? ? ? void __iomem *base = irq_base(i << 5);
>
> ? ? ? ? ? ? ? ?__raw_writel(saved_icmr[i], base + ICMR);
> ? ? ? ? ? ? ? ?__raw_writel(0, base + ICLR);
> --
> 1.7.2.3
>
>

^ permalink raw reply

* [PATCH 4/4] ARM: support for Thumb-2 instructions with CONFIG_ARM_PATCH_PHYS_VIRT
From: Nicolas Pitre @ 2011-01-10 22:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <AANLkTi=g+Wf7T60=nLeCpuPtYebZhE5URr4t2T6zzsCC@mail.gmail.com>

On Mon, 10 Jan 2011, Dave Martin wrote:

> Hi,
> 
> On Tue, Jan 4, 2011 at 2:20 AM, Nicolas Pitre <nico@fluxnic.net> wrote:
> > @@ -462,6 +462,8 @@ ENDPROC(__fixup_phys_virt)
> >        .pushsection .text
> >
> >  ENTRY(__fixup_pv_table_loop)
> > +#ifndef CONFIG_THUMB2_KERNEL
> > +       mov     r6, r6, lsr #24 @ constant for add/sub instructions
> >        orr     r6, r6, #0x400  @ mask in rotate right 8 bits
> >  2:     cmp     r4, r5
> >        ldrlo   r7, [r4], #4
> > @@ -471,6 +473,27 @@ ENTRY(__fixup_pv_table_loop)
> >        strlo   ip, [r7, r3]
> >        blo     2b
> >        mov     pc, lr
> > +#else
> > +       teq     r6, #0
> > +       beq     2f
> > +       clz     r7, r6
> > +       lsr     r6, #24
> > +       lsl     r6, r7
> > +       bic     r6, r6, #0x3080
> 
> Should bits 12-13 of r6 ever be nonzero here? The code already throws
> an error of the p2v offset is not a multiple of 16 MiB; i.e., (r6 &
> ~0xff000000) == 0, so r6 >> (24 - clz(r6)) must be in the range
> 0..0xff.

Yes, they should be cleared already.  This is probably a leftover from a 
previous version.

I need to rework this part entirely now anyway to go on top of Russell's 
latest version.

> I've not been able to test this code yet, but it looks to me like it
> should work for the Thumb-2 case.

Thanks for looking at it.


Nicolas

^ permalink raw reply

* [PATCH 3/5] ARM: pxa: Use cpu_has_ipr() consistently in irq.c
From: Eric Miao @ 2011-01-10 22:43 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294615746-27668-3-git-send-email-marek.vasut@gmail.com>

On Sun, Jan 9, 2011 at 5:29 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied.

> ---
> ?arch/arm/mach-pxa/irq.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
> index 54e91c9..78f0e0c 100644
> --- a/arch/arm/mach-pxa/irq.c
> +++ b/arch/arm/mach-pxa/irq.c
> @@ -226,7 +226,7 @@ static int pxa_irq_resume(struct sys_device *dev)
> ? ? ? ? ? ? ? ?__raw_writel(0, base + ICLR);
> ? ? ? ?}
>
> - ? ? ? if (!cpu_is_pxa25x())
> + ? ? ? if (cpu_has_ipr())
> ? ? ? ? ? ? ? ?for (i = 0; i < pxa_internal_irq_nr; i++)
> ? ? ? ? ? ? ? ? ? ? ? ?__raw_writel(saved_ipr[i], IRQ_BASE + IPR(i));
>
> --
> 1.7.2.3
>
>

^ permalink raw reply

* [PATCH 4/5 v4] msm: convert 7x30 to gpiomux.
From: Dima Zavin @ 2011-01-10 22:43 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294680810.12298.2.camel@c-dwalke-linux.qualcomm.com>

Send under different title:
    [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch

On Mon, Jan 10, 2011 at 9:33 AM, Daniel Walker <dwalker@codeaurora.org> wrote:
> On Sun, 2011-01-09 at 14:53 -0800, Dima Zavin wrote:
>> Greg,
>>
>> Just rebased on top of 2.6.37 and this patch is totally the wrong way
>> to go about this.
>>
>> I should have commented at the appropriate time, so sorry for the late reply.
>>
>> Having this ?msm_gpiomux_configs be always compiled in for all msm7x30
>> devices makes this entire system completely inflexible since you have
>> to modify common code to provide board specific initialization. The
>> definition of "msm_gpiomux_configs" belongs in the board file, not in
>> gpiomux-7x30.c. I think we need to delete this new file and move the
>> definition back into board-msm7x30.c, but just use the new gpiomux
>> APIs.
>>
>> I can provide a patch if you like.
>
> I would just provide the patch .. It would be easier to understand what
> your talking about.
>
> Daniel
>
>
> --
>
> Sent by a consultant of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at ?http://www.tux.org/lkml/
>

^ permalink raw reply

* [PATCH 2/5] pxa: Remove unused variable in clock-pxa3xx.c
From: Eric Miao @ 2011-01-10 22:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294615746-27668-2-git-send-email-marek.vasut@gmail.com>

On Sun, Jan 9, 2011 at 5:29 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied.

> ---
> ?arch/arm/mach-pxa/clock-pxa3xx.c | ? ?1 -
> ?1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c
> index 1b08a34..3f864cd 100644
> --- a/arch/arm/mach-pxa/clock-pxa3xx.c
> +++ b/arch/arm/mach-pxa/clock-pxa3xx.c
> @@ -115,7 +115,6 @@ static unsigned long clk_pxa3xx_smemc_getrate(struct clk *clk)
> ?{
> ? ? ? ?unsigned long acsr = ACSR;
> ? ? ? ?unsigned long memclkcfg = __raw_readl(MEMCLKCFG);
> - ? ? ? unsigned int smcfs = (acsr >> 23) & 0x7;
>
> ? ? ? ?return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] /
> ? ? ? ? ? ? ? ? ? ? ? ?df_clkdiv[(memclkcfg >> 16) & 0x3];
> --
> 1.7.2.3
>
>

^ permalink raw reply

* [PATCH] mmc, ARM: Add zboot from MMC support for SuperH Mobile ARM
From: Simon Horman @ 2011-01-10 22:41 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110110154514.GC3760@linux-sh.org>

On Tue, Jan 11, 2011 at 12:45:14AM +0900, Paul Mundt wrote:
> On Mon, Jan 10, 2011 at 10:10:19AM +0000, Pawel Moll wrote:
> > On Mon, 10 Jan 2011 07:50:42 +0900, Simon Horman <horms@verge.net.au> 
> > wrote:
> > >>>  Documentation/arm/SH-Mobile/Makefile              |    8 +
> > >>>  Documentation/arm/SH-Mobile/vrl4.c                |  169 
> > >>+++++++++++++++++++++
> > >>How about putting those two into "tools" (in particular "tools/arm")
> > >>instead of "Documentation"?
> > >>Just a thought... ;-)
> > >
> > >Thats fine by me except that tools/arm doesn't exist yet.
> > >It would be good to get some consensus before creating it.
> > 
> > I think there is consensus regarding "tools" as a place for user-space 
> > tools - eg. perf tools used to live in "Documentation/..." and then were 
> > moved to "tools/perf".
> > 
> > Now, whether your stuff should be in "tools/SH-Mobile" or 
> > "tools/arm/SH-Mobile", I have no opinion ;-)
> > 
> I agree that this is a worthwhile direction to move to, but we're a long
> way from a consensus. x86 has traditionally littered scripts/ and others
> have sunk to arch/<foo>/tools hostprogs abuse and so forth. perf is a bit
> of a special case in that it's fairly architecture agnostic. 

I would prefer to leave the code in Documentation/arm/SH-Mobile/ as
it complements the document that is in the same directory - weather
its more code or documentation is debatable IMHO.

I'm happy to move things later if a consensus is reached.

^ permalink raw reply

* [PATCH 1/5] pxa: Fix warning in zeus.c
From: Eric Miao @ 2011-01-10 22:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294615746-27668-1-git-send-email-marek.vasut@gmail.com>

On Sun, Jan 9, 2011 at 5:29 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied.

> ---
> ?arch/arm/mach-pxa/zeus.c | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
> index c87f2b3..29830a3 100644
> --- a/arch/arm/mach-pxa/zeus.c
> +++ b/arch/arm/mach-pxa/zeus.c
> @@ -830,8 +830,8 @@ static void __init zeus_init(void)
> ? ? ? ?pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
>
> ? ? ? ?/* Fix timings for dm9000s (CS1/CS2)*/
> - ? ? ? msc0 = __raw_readl(MSC0) & 0x0000ffff | (dm9000_msc << 16);
> - ? ? ? msc1 = __raw_readl(MSC1) & 0xffff0000 | dm9000_msc;
> + ? ? ? msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16);
> + ? ? ? msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc;
> ? ? ? ?__raw_writel(msc0, MSC0);
> ? ? ? ?__raw_writel(msc1, MSC1);
>
> --
> 1.7.2.3
>
>

^ permalink raw reply

* suspicious code in linux/arch/arm/common/sa1111.c
From: Eric Miao @ 2011-01-10 22:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110109071459.GA1488@ucw.cz>

On Sun, Jan 9, 2011 at 1:14 AM, Pavel Machek <pavel@ucw.cz> wrote:
> On Tue 2010-11-16 17:09:59, Eric Miao wrote:
>> On Tue, Nov 16, 2010 at 5:07 PM, Pavel Machek <pma@sysgo.com> wrote:
>> > Hi!
>> >
>> > Is this good idea?
>> >
>> > Signed-off-by: Pavel Machek <pma@sysgo.com>
>>
>> Yep, obviously was a typo.
>
> Can you apply the patch? Or should I re--generate one with better changelog?

Applied with subject line as below, which I guess is more specific?

Subject: ARM: sa1111: fix typo in sa1111_retrigger_lowirq()


>
>> > diff -ur linux.ofic//arch/arm/common/sa1111.c linux/arch/arm/common/sa1111.c
>> > --- linux.ofic//arch/arm/common/sa1111.c ? ? ? ?2010-10-17 20:31:13.000000000 +0200
>> > +++ linux/arch/arm/common/sa1111.c ? ? ?2010-11-05 10:44:17.000000000 +0100
>> > @@ -282,7 +312,7 @@
>> > ? ? ? ?for (i = 0; i < 8; i++) {
>> > ? ? ? ? ? ? ? ?sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0);
>> > ? ? ? ? ? ? ? ?sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
>> > - ? ? ? ? ? ? ? if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
>> > + ? ? ? ? ? ? ? if (sa1111_readl(mapbase + SA1111_INTSTATCLR0) & mask)
>> > ? ? ? ? ? ? ? ? ? ? ? ?break;
>> > ? ? ? ?}
>> >
>> >
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at ?http://www.tux.org/lkml/
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>

^ permalink raw reply

* [PATCH 0/3] IGEP board changes for .38 merge window
From: Tony Lindgren @ 2011-01-10 22:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294665974-10590-1-git-send-email-eballetbo@gmail.com>

Hi,

* Enric Balletbo i Serra <eballetbo@gmail.com> [110110 05:25]:
> Hi Tony,
> 
> Here's a new patches for IGEP boards. These patches are rebased on top of your 
> for-next tree. Please consider adding for .38 merge window. Thanks.

I'll add these to the devel-board, let's see if we can get these and
the beagle patches still in.

In general, everybody, please send in new code for each merge window
by -rc6 so there's enough time for people to review and ack the code
and also have it be sitting in for-next before the merge window opens.

Regards,

Tony

^ permalink raw reply

* [PATCH 1/1] ARM i.MX50: Rename devices-mx50.h
From: Uwe Kleine-König @ 2011-01-10 22:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294695869-6653-1-git-send-email-r64343@freescale.com>

On Tue, Jan 11, 2011 at 05:44:29AM +0800, Jason Liu wrote:
> There are devices-imx51.h and devices-imx53.h under
> arch/arm/mach-mx5 directory. So, had better rename
> devices-mx50.h to devices-imx50.h to follow the same
> naming convention with imx51 and imx53 part.
> 
> Signed-off-by: Jason Liu <r64343@freescale.com>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
>  arch/arm/mach-mx5/board-mx50_rdp.c                 |    2 +-
>  .../mach-mx5/{devices-mx50.h => devices-imx50.h}   |    0
>  2 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
> index fd32e4c..e5bb600 100644
> --- a/arch/arm/mach-mx5/board-mx50_rdp.c
> +++ b/arch/arm/mach-mx5/board-mx50_rdp.c
> @@ -35,7 +35,7 @@
>  #include <asm/mach/arch.h>
>  #include <asm/mach/time.h>
>  
> -#include "devices-mx50.h"
> +#include "devices-imx50.h"
>  
>  static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
>  	/* SD1 */
> diff --git a/arch/arm/mach-mx5/devices-mx50.h b/arch/arm/mach-mx5/devices-imx50.h
> similarity index 100%
> rename from arch/arm/mach-mx5/devices-mx50.h
> rename to arch/arm/mach-mx5/devices-imx50.h
> -- 
> 1.7.0.4
> 
> 
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply

* [PATCH] omap3: clocks: Fix build error 'CK_3430ES2' undeclared here
From: Tony Lindgren @ 2011-01-10 22:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110110190718.GF4957@atomide.com>

* Tony Lindgren <tony@atomide.com> [110110 11:06]:
> * Paul Walmsley <paul@pwsan.com> [110110 10:58]:
> > On Mon, 10 Jan 2011, Paul Walmsley wrote:
> > 
> > > Looks good to me.  Tony, do you want to merge this one as part of the -rc 
> > > series?  If so then it is:
> > > 
> > > Acked-by: Paul Walmsley <paul@pwsan.com>
> > 
> > (once Santosh reposts the updated fix, that is)
> 
> OK thanks will queue.

I've queued the following updated version.

Regards,

Tony

From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Sun, 9 Jan 2011 22:16:13 +0000
Subject: [PATCH] omap3: clocks: Fix build error 'CK_3430ES2' undeclared here

At latest mainline commit 0c21e3aaf6a,  omap2plus build is broken. This
patch is trivial fix for the missed usb clock node for CK_3430ES2PLUS
flag update.

 CHK     include/generated/compile.h
  CC      arch/arm/mach-omap2/clock3xxx_data.o
arch/arm/mach-omap2/clock3xxx_data.c:3289: error: 'CK_3430ES2' undeclared
here (not in a function)
make[1]: *** [arch/arm/mach-omap2/clock3xxx_data.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
[tony at atomide.com: updated mask to include CK_36XX]
Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3286,7 +3286,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"cpefuse_fck",	&cpefuse_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"ts_fck",	&ts_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"usbtll_fck",	&usbtll_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
-	CLK("ehci-omap.0",	"usbtll_fck",	&usbtll_fck,	CK_3430ES2 | CK_AM35XX),
+	CLK("ehci-omap.0",	"usbtll_fck",	&usbtll_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK("omap-mcbsp.1",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK("omap-mcbsp.5",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK(NULL,	"core_96m_fck",	&core_96m_fck,	CK_3XXX),

^ permalink raw reply

* [PATCH] spi: tegra: don't treat NULL clk as an error
From: Russell King - ARM Linux @ 2011-01-10 22:25 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20110110221802.GD12552@n2100.arm.linux.org.uk>

On Mon, Jan 10, 2011 at 10:18:02PM +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 10, 2011 at 01:58:12PM -0700, Grant Likely wrote:
> > On Mon, Jan 10, 2011 at 4:05 AM, Jamie Iles <jamie@jamieiles.com> wrote:
> > > Some platforms have been known to return NULL from clk_get() if they
> > > support only a single struct clk. ?Whilst tegra doesn't do this, make
> > > the drivers consistent with others.
> > >
> > > Cc: Erik Gilling <konkers@android.com>
> > > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> > 
> > Hi James,
> > 
> > If NULL does get returned, say due to a future change to the clock
> > code, then this change causes the driver to oops.  I'm not going to
> > apply this patch.
> 
> Please apply it - the clock API just defines struct clk as a cookie
> where errors are IS_ERR/PTR_ERR.  Other values must be considered by
> drivers as perfectly valid, including NULL.

Also note that drivers have no business ever dereferencing struct clks.
So if they oops, that's their own fault for dereferencing something
that they shouldn't.

^ permalink raw reply

* [PATCH 4/4] ARM: support for Thumb-2 instructions with CONFIG_ARM_PATCH_PHYS_VIRT
From: Dave Martin @ 2011-01-10 22:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1294129208-15201-5-git-send-email-nico@fluxnic.net>

Hi,

On Tue, Jan 4, 2011 at 2:20 AM, Nicolas Pitre <nico@fluxnic.net> wrote:
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
>  arch/arm/Kconfig              |    3 +--
>  arch/arm/include/asm/memory.h |    5 +++--
>  arch/arm/kernel/head.S        |   31 +++++++++++++++++++++++++++----
>  3 files changed, 31 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 136ed9b..feb374a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -189,8 +189,7 @@ config VECTORS_BASE
>
>  config ARM_PATCH_PHYS_VIRT
>        bool
> -       depends on EXPERIMENTAL
> -       depends on !XIP && !THUMB2_KERNEL
> +       depends on !XIP && EXPERIMENTAL
>
>  source "init/Kconfig"
>
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index f83be97..80a939d 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -157,14 +157,15 @@
>  #error "this machine configuration uses complex __virt_to_phys/__phys_to_virt and cannot use CONFIG_ARM_PATCH_PHYS_VIRT"
>  #endif
>
> +/* the stub constant 0xff000000 is used to force the required insn encoding */
>  #define __pv_stub(from,to,instr)                       \
>        __asm__(                                        \
> -       "1:     " instr "\t%0, %1, %2\n"                \
> +       "1:     " instr "\t%0, %1, #0xff000000\n"       \
>        "       .pushsection .pv_table,\"a\"\n"         \
>        "       .long   1b\n"                           \
>        "       .popsection"                            \
>        : "=r" (to)                                     \
> -       : "r" (from), "I" (1))
> +       : "r" (from))
>
>  static inline unsigned long __virt_to_phys(unsigned long x)
>  {
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 621c792..397271d 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -447,11 +447,11 @@ __fixup_pv_table:
>        adr     r0, 1f
>        ldmia   r0, {r3-r5}
>        sub     r3, r0, r3      @ PHYS_OFFSET - PAGE_OFFSET
> +       movs    r6, r3, lsl #8  @ must be 16MiB aligned
> +       bne     __error
>        add     r4, r4, r3
>        add     r5, r5, r3
> -       mov     r6, r3, lsr #24 @ constant for add/sub instructions
> -       teq     r3, r6, lsl #24 @ must be 16MiB aligned
> -       bne     __error
> +       mov     r6, r3
>        b       __fixup_pv_table_loop
>  ENDPROC(__fixup_phys_virt)
>
> @@ -462,6 +462,8 @@ ENDPROC(__fixup_phys_virt)
>        .pushsection .text
>
>  ENTRY(__fixup_pv_table_loop)
> +#ifndef CONFIG_THUMB2_KERNEL
> +       mov     r6, r6, lsr #24 @ constant for add/sub instructions
>        orr     r6, r6, #0x400  @ mask in rotate right 8 bits
>  2:     cmp     r4, r5
>        ldrlo   r7, [r4], #4
> @@ -471,6 +473,27 @@ ENTRY(__fixup_pv_table_loop)
>        strlo   ip, [r7, r3]
>        blo     2b
>        mov     pc, lr
> +#else
> +       teq     r6, #0
> +       beq     2f
> +       clz     r7, r6
> +       lsr     r6, #24
> +       lsl     r6, r7
> +       bic     r6, r6, #0x3080

Should bits 12-13 of r6 ever be nonzero here? The code already throws
an error of the p2v offset is not a multiple of 16 MiB; i.e., (r6 &
~0xff000000) == 0, so r6 >> (24 - clz(r6)) must be in the range
0..0xff.

Of course, clearing the extra bits again doesn't matter...

> +       lsrs    r7, #1
> +       orrcs   r6, r6, #0x80
> +       orr     r6, r6, r7, lsl #12
> +       orr     r6, r6, #0x4000
> +2:     cmp     r4, r5
> +       bxhs    lr
> +       ldr     r7, [r4], #4
> +       add     r7, r3
> +       ldr     ip, [r7, #2]
> +       and     ip, ip, #0x0f00
> +       orr     ip, ip, r6
> +       str     ip, [r7, #2]
> +       b       2b
> +#endif
>  ENDPROC(__fixup_phys_virt_loop)
>
>  /*
> @@ -482,7 +505,7 @@ ENTRY(fixup_pv_table)
>        mov     r3, #0          @ offset (zero as we're in virtual space)
>        mov     r4, r0          @ loop start
>        mov     r5, r1          @ loop end
> -       mov     r6, r2, lsr #24 @ constant for add/sub instructions
> +       mov     r6, r2          @ PHYS_OFFSET - PAGE_OFFSET
>        bl      __fixup_pv_table_loop
>        ldmfd   sp!, {r4 - r7, pc}
>  ENDPROC(fixup_pv_table)

I've not been able to test this code yet, but it looks to me like it
should work for the Thumb-2 case.

Cheers
---Dave

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox